summaryrefslogtreecommitdiff
path: root/chromium/cc/layers/layer.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/cc/layers/layer.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/cc/layers/layer.h')
-rw-r--r--chromium/cc/layers/layer.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/chromium/cc/layers/layer.h b/chromium/cc/layers/layer.h
index 43debb199e8..a2da20587d1 100644
--- a/chromium/cc/layers/layer.h
+++ b/chromium/cc/layers/layer.h
@@ -333,9 +333,24 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
// must be opaque or visual errors can occur. This applies only to this layer
// and not to children, and does not imply the layer should be composited
// opaquely, as effects may be applied such as opacity() or filters().
+ // Note that this also calls SetContentsOpaqueForText(opaque) internally.
+ // To override a different contents_opaque_for_text, the client should call
+ // SetContentsOpaqueForText() after SetContentsOpaque().
void SetContentsOpaque(bool opaque);
bool contents_opaque() const { return inputs_.contents_opaque; }
+ // Whether the contents area containing text is known to be opaque.
+ // For example, blink will SetContentsOpaque(false) but
+ // SetContentsOpaqueForText(true) for the following case:
+ // <div style="overflow: hidden; border-radius: 10px; background: white">
+ // TEXT
+ // </div>
+ // See also the note for SetContentsOpaque().
+ void SetContentsOpaqueForText(bool opaque);
+ bool contents_opaque_for_text() const {
+ return inputs_.contents_opaque_for_text;
+ }
+
// Set or get whether this layer should be a hit test target
void SetHitTestable(bool should_hit_test);
virtual bool HitTestable() const;
@@ -829,6 +844,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
bool hit_testable : 1;
bool contents_opaque : 1;
+ bool contents_opaque_for_text : 1;
bool is_drawable : 1;
bool double_sided : 1;