summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/platform/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/Source/platform/graphics')
-rw-r--r--third_party/WebKit/Source/platform/graphics/CompositingReasons.cpp48
-rw-r--r--third_party/WebKit/Source/platform/graphics/CompositingReasons.h96
-rw-r--r--third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp12
-rw-r--r--third_party/WebKit/Source/platform/graphics/GraphicsLayer.h1
-rw-r--r--third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp13
-rw-r--r--third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h6
-rw-r--r--third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.cpp61
-rw-r--r--third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.h46
8 files changed, 176 insertions, 107 deletions
diff --git a/third_party/WebKit/Source/platform/graphics/CompositingReasons.cpp b/third_party/WebKit/Source/platform/graphics/CompositingReasons.cpp
index a096b70..5608532 100644
--- a/third_party/WebKit/Source/platform/graphics/CompositingReasons.cpp
+++ b/third_party/WebKit/Source/platform/graphics/CompositingReasons.cpp
@@ -69,51 +69,9 @@ const CompositingReasonStringMap kCompositingReasonStringMap[] = {
{ CompositingReasonNegativeZIndexChildren,
"negativeZIndexChildren",
"Parent with composited negative z-index content" },
- { CompositingReasonScrollsWithRespectToSquashingLayer,
- "scrollsWithRespectToSquashingLayer",
- "Cannot be squashed since this layer scrolls with respect to the squashing layer" },
- { CompositingReasonSquashingSparsityExceeded,
- "squashingSparsityExceeded",
- "Cannot be squashed as the squashing layer would become too sparse" },
- { CompositingReasonSquashingClippingContainerMismatch,
- "squashingClippingContainerMismatch",
- "Cannot be squashed because this layer has a different clipping container than the squashing layer" },
- { CompositingReasonSquashingOpacityAncestorMismatch,
- "squashingOpacityAncestorMismatch",
- "Cannot be squashed because this layer has a different opacity ancestor than the squashing layer" },
- { CompositingReasonSquashingTransformAncestorMismatch,
- "squashingTransformAncestorMismatch",
- "Cannot be squashed because this layer has a different transform ancestor than the squashing layer" },
- { CompositingReasonSquashingFilterMismatch,
- "squashingFilterAncestorMismatch",
- "Cannot be squashed because this layer has a different filter ancestor than the squashing layer, or this layer has a filter" },
- { CompositingReasonSquashingWouldBreakPaintOrder,
- "squashingWouldBreakPaintOrder",
- "Cannot be squashed without breaking paint order" },
- { CompositingReasonSquashingVideoIsDisallowed,
- "squashingVideoIsDisallowed",
- "Squashing video is not supported" },
- { CompositingReasonSquashedLayerClipsCompositingDescendants,
- "squashedLayerClipsCompositingDescendants",
- "Squashing a layer that clips composited descendants is not supported." },
- { CompositingReasonSquashingLayoutPartIsDisallowed,
- "squashingLayoutPartIsDisallowed",
- "Squashing a frame, iframe or plugin is not supported." },
- { CompositingReasonSquashingReflectionIsDisallowed,
- "squashingReflectionDisallowed",
- "Squashing a element with a reflection is not supported." },
- { CompositingReasonSquashingBlendingIsDisallowed,
- "squashingBlendingDisallowed",
- "Squashing a layer with blending is not supported." },
- { CompositingReasonSquashingNearestFixedPositionMismatch,
- "squashingNearestFixedPositionMismatch",
- "Cannot be squashed because this layer has a different nearest fixed position layer than the squashing layer" },
- { CompositingReasonScrollChildWithCompositedDescendants,
- "scrollChildWithCompositedDescendants",
- "Squashing a scroll child with composited descendants is not supported." },
- { CompositingReasonSquashingLayerIsAnimating,
- "squashingLayerIsAnimating",
- "Cannot squash into a layer that is animating." },
+ { CompositingReasonSquashingDisallowed,
+ "squashingDisallowed",
+ "Layer was separately composited because it could not be squashed." },
{ CompositingReasonTransformWithCompositedDescendants,
"transformWithCompositedDescendants",
"Has a transform that needs to be known by compositor because of composited descendants" },
diff --git a/third_party/WebKit/Source/platform/graphics/CompositingReasons.h b/third_party/WebKit/Source/platform/graphics/CompositingReasons.h
index 542694a..82cccab 100644
--- a/third_party/WebKit/Source/platform/graphics/CompositingReasons.h
+++ b/third_party/WebKit/Source/platform/graphics/CompositingReasons.h
@@ -36,63 +36,49 @@ const uint64_t CompositingReasonBackdropFilter = UINT6
const uint64_t CompositingReasonAssumedOverlap = UINT64_C(1) << 15;
const uint64_t CompositingReasonOverlap = UINT64_C(1) << 16;
const uint64_t CompositingReasonNegativeZIndexChildren = UINT64_C(1) << 17;
-const uint64_t CompositingReasonScrollsWithRespectToSquashingLayer = UINT64_C(1) << 18;
-const uint64_t CompositingReasonSquashingSparsityExceeded = UINT64_C(1) << 19;
-const uint64_t CompositingReasonSquashingClippingContainerMismatch = UINT64_C(1) << 20;
-const uint64_t CompositingReasonSquashingOpacityAncestorMismatch = UINT64_C(1) << 21;
-const uint64_t CompositingReasonSquashingTransformAncestorMismatch = UINT64_C(1) << 22;
-const uint64_t CompositingReasonSquashingFilterMismatch = UINT64_C(1) << 23;
-const uint64_t CompositingReasonSquashingWouldBreakPaintOrder = UINT64_C(1) << 24;
-const uint64_t CompositingReasonSquashingVideoIsDisallowed = UINT64_C(1) << 25;
-const uint64_t CompositingReasonSquashedLayerClipsCompositingDescendants = UINT64_C(1) << 26;
-const uint64_t CompositingReasonSquashingLayoutPartIsDisallowed = UINT64_C(1) << 27;
-const uint64_t CompositingReasonSquashingReflectionIsDisallowed = UINT64_C(1) << 28;
-const uint64_t CompositingReasonSquashingBlendingIsDisallowed = UINT64_C(1) << 29;
-const uint64_t CompositingReasonSquashingNearestFixedPositionMismatch = UINT64_C(1) << 30;
-const uint64_t CompositingReasonScrollChildWithCompositedDescendants = UINT64_C(1) << 31;
-const uint64_t CompositingReasonSquashingLayerIsAnimating = UINT64_C(1) << 32;
+const uint64_t CompositingReasonSquashingDisallowed = UINT64_C(1) << 18;
// Subtree reasons that require knowing what the status of your subtree is before knowing the answer
-const uint64_t CompositingReasonTransformWithCompositedDescendants = UINT64_C(1) << 33;
-const uint64_t CompositingReasonOpacityWithCompositedDescendants = UINT64_C(1) << 34;
-const uint64_t CompositingReasonMaskWithCompositedDescendants = UINT64_C(1) << 35;
-const uint64_t CompositingReasonReflectionWithCompositedDescendants = UINT64_C(1) << 36;
-const uint64_t CompositingReasonFilterWithCompositedDescendants = UINT64_C(1) << 37;
-const uint64_t CompositingReasonBlendingWithCompositedDescendants = UINT64_C(1) << 38;
-const uint64_t CompositingReasonClipsCompositingDescendants = UINT64_C(1) << 39;
-const uint64_t CompositingReasonPerspectiveWith3DDescendants = UINT64_C(1) << 40;
-const uint64_t CompositingReasonPreserve3DWith3DDescendants = UINT64_C(1) << 41;
-const uint64_t CompositingReasonReflectionOfCompositedParent = UINT64_C(1) << 42;
-const uint64_t CompositingReasonIsolateCompositedDescendants = UINT64_C(1) << 43;
-const uint64_t CompositingReasonPositionFixedWithCompositedDescendants = UINT64_C(1) << 44;
+const uint64_t CompositingReasonTransformWithCompositedDescendants = UINT64_C(1) << 19;
+const uint64_t CompositingReasonOpacityWithCompositedDescendants = UINT64_C(1) << 20;
+const uint64_t CompositingReasonMaskWithCompositedDescendants = UINT64_C(1) << 21;
+const uint64_t CompositingReasonReflectionWithCompositedDescendants = UINT64_C(1) << 22;
+const uint64_t CompositingReasonFilterWithCompositedDescendants = UINT64_C(1) << 23;
+const uint64_t CompositingReasonBlendingWithCompositedDescendants = UINT64_C(1) << 24;
+const uint64_t CompositingReasonClipsCompositingDescendants = UINT64_C(1) << 25;
+const uint64_t CompositingReasonPerspectiveWith3DDescendants = UINT64_C(1) << 26;
+const uint64_t CompositingReasonPreserve3DWith3DDescendants = UINT64_C(1) << 27;
+const uint64_t CompositingReasonReflectionOfCompositedParent = UINT64_C(1) << 28;
+const uint64_t CompositingReasonIsolateCompositedDescendants = UINT64_C(1) << 29;
+const uint64_t CompositingReasonPositionFixedWithCompositedDescendants = UINT64_C(1) << 30;
// The root layer is a special case that may be forced to be a layer, but also it needs to be
// a layer if anything else in the subtree is composited.
-const uint64_t CompositingReasonRoot = UINT64_C(1) << 45;
+const uint64_t CompositingReasonRoot = UINT64_C(1) << 31;
// CompositedLayerMapping internal hierarchy reasons
-const uint64_t CompositingReasonLayerForAncestorClip = UINT64_C(1) << 46;
-const uint64_t CompositingReasonLayerForDescendantClip = UINT64_C(1) << 47;
-const uint64_t CompositingReasonLayerForPerspective = UINT64_C(1) << 48;
-const uint64_t CompositingReasonLayerForHorizontalScrollbar = UINT64_C(1) << 49;
-const uint64_t CompositingReasonLayerForVerticalScrollbar = UINT64_C(1) << 50;
-const uint64_t CompositingReasonLayerForOverflowControlsHost = UINT64_C(1) << 51;
-const uint64_t CompositingReasonLayerForScrollCorner = UINT64_C(1) << 52;
-const uint64_t CompositingReasonLayerForScrollingContents = UINT64_C(1) << 53;
-const uint64_t CompositingReasonLayerForScrollingContainer = UINT64_C(1) << 54;
-const uint64_t CompositingReasonLayerForSquashingContents = UINT64_C(1) << 55;
-const uint64_t CompositingReasonLayerForSquashingContainer = UINT64_C(1) << 56;
-const uint64_t CompositingReasonLayerForForeground = UINT64_C(1) << 57;
-const uint64_t CompositingReasonLayerForBackground = UINT64_C(1) << 58;
-const uint64_t CompositingReasonLayerForMask = UINT64_C(1) << 59;
-const uint64_t CompositingReasonLayerForClippingMask = UINT64_C(1) << 60;
-const uint64_t CompositingReasonLayerForScrollingBlockSelection = UINT64_C(1) << 61;
+const uint64_t CompositingReasonLayerForAncestorClip = UINT64_C(1) << 32;
+const uint64_t CompositingReasonLayerForDescendantClip = UINT64_C(1) << 33;
+const uint64_t CompositingReasonLayerForPerspective = UINT64_C(1) << 34;
+const uint64_t CompositingReasonLayerForHorizontalScrollbar = UINT64_C(1) << 35;
+const uint64_t CompositingReasonLayerForVerticalScrollbar = UINT64_C(1) << 36;
+const uint64_t CompositingReasonLayerForOverflowControlsHost = UINT64_C(1) << 37;
+const uint64_t CompositingReasonLayerForScrollCorner = UINT64_C(1) << 38;
+const uint64_t CompositingReasonLayerForScrollingContents = UINT64_C(1) << 39;
+const uint64_t CompositingReasonLayerForScrollingContainer = UINT64_C(1) << 40;
+const uint64_t CompositingReasonLayerForSquashingContents = UINT64_C(1) << 41;
+const uint64_t CompositingReasonLayerForSquashingContainer = UINT64_C(1) << 42;
+const uint64_t CompositingReasonLayerForForeground = UINT64_C(1) << 43;
+const uint64_t CompositingReasonLayerForBackground = UINT64_C(1) << 44;
+const uint64_t CompositingReasonLayerForMask = UINT64_C(1) << 45;
+const uint64_t CompositingReasonLayerForClippingMask = UINT64_C(1) << 46;
+const uint64_t CompositingReasonLayerForScrollingBlockSelection = UINT64_C(1) << 47;
// Composited elements with inline transforms trigger assumed overlap so that
// we can update their transforms quickly.
-const uint64_t CompositingReasonInlineTransform = UINT64_C(1) << 62;
+const uint64_t CompositingReasonInlineTransform = UINT64_C(1) << 48;
-const uint64_t CompositingReasonCompositorProxy = UINT64_C(1) << 63;
+const uint64_t CompositingReasonCompositorProxy = UINT64_C(1) << 49;
// Various combinations of compositing reasons are defined here also, for more intutive and faster bitwise logic.
const uint64_t CompositingReasonComboAllDirectReasons =
@@ -148,18 +134,7 @@ const uint64_t CompositingReasonComboReasonsThatRequireOwnBacking =
| CompositingReasonOverlap
| CompositingReasonAssumedOverlap
| CompositingReasonNegativeZIndexChildren
- | CompositingReasonScrollsWithRespectToSquashingLayer
- | CompositingReasonSquashingSparsityExceeded
- | CompositingReasonSquashingClippingContainerMismatch
- | CompositingReasonSquashingOpacityAncestorMismatch
- | CompositingReasonSquashingTransformAncestorMismatch
- | CompositingReasonSquashingFilterMismatch
- | CompositingReasonSquashingWouldBreakPaintOrder
- | CompositingReasonSquashingVideoIsDisallowed
- | CompositingReasonSquashedLayerClipsCompositingDescendants
- | CompositingReasonSquashingLayoutPartIsDisallowed
- | CompositingReasonSquashingReflectionIsDisallowed
- | CompositingReasonSquashingBlendingIsDisallowed
+ | CompositingReasonSquashingDisallowed
| CompositingReasonTransformWithCompositedDescendants
| CompositingReasonOpacityWithCompositedDescendants
| CompositingReasonMaskWithCompositedDescendants
@@ -167,11 +142,8 @@ const uint64_t CompositingReasonComboReasonsThatRequireOwnBacking =
| CompositingReasonBlendingWithCompositedDescendants
| CompositingReasonIsolateCompositedDescendants
| CompositingReasonPreserve3DWith3DDescendants // preserve-3d has to create backing store to ensure that 3d-transformed elements intersect.
- | CompositingReasonSquashingNearestFixedPositionMismatch
- | CompositingReasonScrollChildWithCompositedDescendants
| CompositingReasonBackdropFilter
- | CompositingReasonPositionFixedWithCompositedDescendants
- | CompositingReasonSquashingLayerIsAnimating;
+ | CompositingReasonPositionFixedWithCompositedDescendants;
const uint64_t CompositingReasonComboSquashableReasons =
CompositingReasonOverlap
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index 89f0c8e..40ff0f1 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -783,6 +783,13 @@ PassRefPtr<JSONObject> GraphicsLayer::layerTreeAsJSON(LayerTreeFlags flags, Rend
compositingReasonsJSON->pushString(debug ? kCompositingReasonStringMap[i].description : kCompositingReasonStringMap[i].shortName);
}
json->setArray("compositingReasons", compositingReasonsJSON);
+
+ RefPtr<JSONArray> squashingDisallowedReasonsJSON = adoptRef(new JSONArray);
+ for (size_t i = 0; i < kNumberOfSquashingDisallowedReasons; ++i) {
+ if (m_debugInfo.squashingDisallowedReasons() & kSquashingDisallowedReasonStringMap[i].reason)
+ squashingDisallowedReasonsJSON->pushString(debug ? kSquashingDisallowedReasonStringMap[i].description : kSquashingDisallowedReasonStringMap[i].shortName);
+ }
+ json->setArray("squashingDisallowedReasons", squashingDisallowedReasonsJSON);
}
if (m_children.size()) {
@@ -838,6 +845,11 @@ void GraphicsLayer::setCompositingReasons(CompositingReasons reasons)
m_debugInfo.setCompositingReasons(reasons);
}
+void GraphicsLayer::setSquashingDisallowedReasons(SquashingDisallowedReasons reasons)
+{
+ m_debugInfo.setSquashingDisallowedReasons(reasons);
+}
+
void GraphicsLayer::setOwnerNodeId(int nodeId)
{
m_debugInfo.setOwnerNodeId(nodeId);
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
index 529ae1f..a565bc6 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
@@ -86,6 +86,7 @@ public:
void setCompositingReasons(CompositingReasons);
CompositingReasons compositingReasons() const { return m_debugInfo.compositingReasons(); }
+ void setSquashingDisallowedReasons(SquashingDisallowedReasons);
void setOwnerNodeId(int);
GraphicsLayer* parent() const { return m_parent; }
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp
index 3820b8a..b46bcad 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.cpp
@@ -25,6 +25,7 @@ namespace blink {
GraphicsLayerDebugInfo::GraphicsLayerDebugInfo()
: m_compositingReasons(CompositingReasonNone)
+ , m_squashingDisallowedReasons(SquashingDisallowedReasonsNone)
, m_ownerNodeId(0)
{
}
@@ -36,6 +37,7 @@ scoped_refptr<base::trace_event::TracedValue> GraphicsLayerDebugInfo::asTracedVa
scoped_refptr<base::trace_event::TracedValue> tracedValue = new base::trace_event::TracedValue;
appendAnnotatedInvalidateRects(tracedValue.get());
appendCompositingReasons(tracedValue.get());
+ appendSquashingDisallowedReasons(tracedValue.get());
appendOwnerNodeId(tracedValue.get());
return tracedValue;
}
@@ -69,6 +71,17 @@ void GraphicsLayerDebugInfo::appendCompositingReasons(base::trace_event::TracedV
tracedValue->EndArray();
}
+void GraphicsLayerDebugInfo::appendSquashingDisallowedReasons(base::trace_event::TracedValue* tracedValue) const
+{
+ tracedValue->BeginArray("squashing_disallowed_reasons");
+ for (size_t i = 0; i < kNumberOfSquashingDisallowedReasons; ++i) {
+ if (!(m_compositingReasons & kSquashingDisallowedReasonStringMap[i].reason))
+ continue;
+ tracedValue->AppendString(kSquashingDisallowedReasonStringMap[i].description);
+ }
+ tracedValue->EndArray();
+}
+
void GraphicsLayerDebugInfo::appendOwnerNodeId(base::trace_event::TracedValue* tracedValue) const
{
if (!m_ownerNodeId)
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h
index ccc64fa..fd79f68 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerDebugInfo.h
@@ -35,6 +35,7 @@
#include "platform/geometry/FloatRect.h"
#include "platform/graphics/CompositingReasons.h"
#include "platform/graphics/PaintInvalidationReason.h"
+#include "platform/graphics/SquashingDisallowedReasons.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
#include "wtf/Vector.h"
@@ -58,6 +59,9 @@ public:
CompositingReasons compositingReasons() const { return m_compositingReasons; }
void setCompositingReasons(CompositingReasons reasons) { m_compositingReasons = reasons; }
+
+ SquashingDisallowedReasons squashingDisallowedReasons() const { return m_squashingDisallowedReasons; }
+ void setSquashingDisallowedReasons(SquashingDisallowedReasons reasons) { m_squashingDisallowedReasons = reasons; }
void setOwnerNodeId(int id) { m_ownerNodeId = id; }
void appendAnnotatedInvalidateRect(const FloatRect&, PaintInvalidationReason);
@@ -66,6 +70,7 @@ public:
private:
void appendAnnotatedInvalidateRects(base::trace_event::TracedValue*) const;
void appendCompositingReasons(base::trace_event::TracedValue*) const;
+ void appendSquashingDisallowedReasons(base::trace_event::TracedValue*) const;
void appendOwnerNodeId(base::trace_event::TracedValue*) const;
struct AnnotatedInvalidationRect {
@@ -75,6 +80,7 @@ private:
};
CompositingReasons m_compositingReasons;
+ SquashingDisallowedReasons m_squashingDisallowedReasons;
int m_ownerNodeId;
Vector<AnnotatedInvalidationRect> m_invalidations;
Vector<AnnotatedInvalidationRect> m_previousInvalidations;
diff --git a/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.cpp b/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.cpp
new file mode 100644
index 0000000..5abeb33
--- /dev/null
+++ b/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.cpp
@@ -0,0 +1,61 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "platform/graphics/SquashingDisallowedReasons.h"
+
+#include "wtf/StdLibExtras.h"
+
+namespace blink {
+
+const SquashingDisallowedReasonStringMap kSquashingDisallowedReasonStringMap[] = {
+ { SquashingDisallowedReasonScrollsWithRespectToSquashingLayer,
+ "scrollsWithRespectToSquashingLayer",
+ "Cannot be squashed since this layer scrolls with respect to the squashing layer" },
+ { SquashingDisallowedReasonSquashingSparsityExceeded,
+ "squashingSparsityExceeded",
+ "Cannot be squashed as the squashing layer would become too sparse" },
+ { SquashingDisallowedReasonClippingContainerMismatch,
+ "squashingClippingContainerMismatch",
+ "Cannot be squashed because this layer has a different clipping container than the squashing layer" },
+ { SquashingDisallowedReasonOpacityAncestorMismatch,
+ "squashingOpacityAncestorMismatch",
+ "Cannot be squashed because this layer has a different opacity ancestor than the squashing layer" },
+ { SquashingDisallowedReasonTransformAncestorMismatch,
+ "squashingTransformAncestorMismatch",
+ "Cannot be squashed because this layer has a different transform ancestor than the squashing layer" },
+ { SquashingDisallowedReasonFilterMismatch,
+ "squashingFilterAncestorMismatch",
+ "Cannot be squashed because this layer has a different filter ancestor than the squashing layer, or this layer has a filter" },
+ { SquashingDisallowedReasonWouldBreakPaintOrder,
+ "squashingWouldBreakPaintOrder",
+ "Cannot be squashed without breaking paint order" },
+ { SquashingDisallowedReasonSquashingVideoIsDisallowed,
+ "squashingVideoIsDisallowed",
+ "Squashing video is not supported" },
+ { SquashingDisallowedReasonSquashedLayerClipsCompositingDescendants,
+ "squashedLayerClipsCompositingDescendants",
+ "Squashing a layer that clips composited descendants is not supported." },
+ { SquashingDisallowedReasonSquashingLayoutPartIsDisallowed,
+ "squashingLayoutPartIsDisallowed",
+ "Squashing a frame, iframe or plugin is not supported." },
+ { SquashingDisallowedReasonSquashingReflectionIsDisallowed,
+ "squashingReflectionDisallowed",
+ "Squashing a element with a reflection is not supported." },
+ { SquashingDisallowedReasonSquashingBlendingIsDisallowed,
+ "squashingBlendingDisallowed",
+ "Squashing a layer with blending is not supported." },
+ { SquashingDisallowedReasonNearestFixedPositionMismatch,
+ "squashingNearestFixedPositionMismatch",
+ "Cannot be squashed because this layer has a different nearest fixed position layer than the squashing layer" },
+ { SquashingDisallowedReasonScrollChildWithCompositedDescendants,
+ "scrollChildWithCompositedDescendants",
+ "Squashing a scroll child with composited descendants is not supported." },
+ { SquashingDisallowedReasonSquashingLayerIsAnimating,
+ "squashingLayerIsAnimating",
+ "Cannot squash into a layer that is animating." },
+};
+
+const size_t kNumberOfSquashingDisallowedReasons = WTF_ARRAY_LENGTH(kSquashingDisallowedReasonStringMap);
+
+} // namespace blink
diff --git a/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.h b/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.h
new file mode 100644
index 0000000..ec29090
--- /dev/null
+++ b/third_party/WebKit/Source/platform/graphics/SquashingDisallowedReasons.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SquashingDisallowedReasons_h
+#define SquashingDisallowedReasons_h
+
+#include "platform/PlatformExport.h"
+#include "wtf/Allocator.h"
+#include <stdint.h>
+
+namespace blink {
+
+const uint64_t SquashingDisallowedReasonsNone = 0;
+
+const uint64_t SquashingDisallowedReasonScrollsWithRespectToSquashingLayer = UINT64_C(1) << 0;
+const uint64_t SquashingDisallowedReasonSquashingSparsityExceeded = UINT64_C(1) << 1;
+const uint64_t SquashingDisallowedReasonClippingContainerMismatch = UINT64_C(1) << 2;
+const uint64_t SquashingDisallowedReasonOpacityAncestorMismatch = UINT64_C(1) << 3;
+const uint64_t SquashingDisallowedReasonTransformAncestorMismatch = UINT64_C(1) << 4;
+const uint64_t SquashingDisallowedReasonFilterMismatch = UINT64_C(1) << 5;
+const uint64_t SquashingDisallowedReasonWouldBreakPaintOrder = UINT64_C(1) << 6;
+const uint64_t SquashingDisallowedReasonSquashingVideoIsDisallowed = UINT64_C(1) << 7;
+const uint64_t SquashingDisallowedReasonSquashedLayerClipsCompositingDescendants = UINT64_C(1) << 8;
+const uint64_t SquashingDisallowedReasonSquashingLayoutPartIsDisallowed = UINT64_C(1) << 9;
+const uint64_t SquashingDisallowedReasonSquashingReflectionIsDisallowed = UINT64_C(1) << 10;
+const uint64_t SquashingDisallowedReasonSquashingBlendingIsDisallowed = UINT64_C(1) << 11;
+const uint64_t SquashingDisallowedReasonNearestFixedPositionMismatch = UINT64_C(1) << 12;
+const uint64_t SquashingDisallowedReasonScrollChildWithCompositedDescendants = UINT64_C(1) << 13;
+const uint64_t SquashingDisallowedReasonSquashingLayerIsAnimating = UINT64_C(1) << 14;
+
+typedef uint64_t SquashingDisallowedReasons;
+
+struct SquashingDisallowedReasonStringMap {
+ STACK_ALLOCATED();
+ SquashingDisallowedReasons reason;
+ const char* shortName;
+ const char* description;
+};
+
+PLATFORM_EXPORT extern const SquashingDisallowedReasonStringMap kSquashingDisallowedReasonStringMap[];
+PLATFORM_EXPORT extern const size_t kNumberOfSquashingDisallowedReasons;
+
+} // namespace blink
+
+#endif // SquashingDisallowedReasons_h