Diff
Modified: trunk/LayoutTests/ChangeLog (243673 => 243674)
--- trunk/LayoutTests/ChangeLog 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/LayoutTests/ChangeLog 2019-03-30 08:28:07 UTC (rev 243674)
@@ -1,3 +1,15 @@
+2019-03-30 Antti Koivisto <[email protected]>
+
+ Hit-testing of boxes over scrollers should account for border-radius
+ https://bugs.webkit.org/show_bug.cgi?id=195374
+ <rdar://problem/48649993>
+
+ Reviewed by Simon Fraser.
+
+ * fast/scrolling/ios/border-radius-event-region-expected.txt: Added.
+ * fast/scrolling/ios/border-radius-event-region.html: Added.
+ * fast/scrolling/ios/overflow-scroll-overlap-2-expected.txt:
+
2019-03-29 Zalan Bujtas <[email protected]>
[ContentChangeObserver] Expand DOM timer observation to 350ms
Added: trunk/LayoutTests/fast/scrolling/ios/border-radius-event-region-expected.txt (0 => 243674)
--- trunk/LayoutTests/fast/scrolling/ios/border-radius-event-region-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/border-radius-event-region-expected.txt 2019-03-30 08:28:07 UTC (rev 243674)
@@ -0,0 +1,273 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 1616.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 1616.00)
+ (contentsOpaque 1)
+ (children 24
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=200)
+ )
+ )
+ (GraphicsLayer
+ (position 208.00 8.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (6,0) width=194 height=6)
+ (rect (0,6) width=200 height=194)
+ )
+ )
+ (GraphicsLayer
+ (position 408.00 8.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (31,0) width=169 height=4)
+ (rect (15,4) width=185 height=11)
+ (rect (4,15) width=196 height=16)
+ (rect (0,31) width=200 height=169)
+ )
+ )
+ (GraphicsLayer
+ (position 8.00 208.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (172,0) width=28 height=3)
+ (rect (144,3) width=56 height=6)
+ (rect (117,9) width=83 height=10)
+ (rect (92,19) width=108 height=13)
+ (rect (70,32) width=130 height=17)
+ (rect (49,49) width=151 height=21)
+ (rect (32,70) width=168 height=22)
+ (rect (19,92) width=181 height=25)
+ (rect (9,117) width=191 height=27)
+ (rect (3,144) width=197 height=28)
+ (rect (0,172) width=200 height=28)
+ )
+ )
+ (GraphicsLayer
+ (position 208.00 208.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (20,0) width=180 height=21)
+ (rect (6,21) width=194 height=55)
+ (rect (0,76) width=200 height=124)
+ )
+ )
+ (GraphicsLayer
+ (position 408.00 208.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (15,0) width=185 height=6)
+ (rect (0,6) width=200 height=194)
+ )
+ )
+ (GraphicsLayer
+ (position 8.00 408.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=200)
+ )
+ )
+ (GraphicsLayer
+ (position 208.00 408.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=194 height=6)
+ (rect (0,6) width=200 height=194)
+ )
+ )
+ (GraphicsLayer
+ (position 408.00 408.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=169 height=4)
+ (rect (0,4) width=185 height=11)
+ (rect (0,15) width=196 height=16)
+ (rect (0,31) width=200 height=169)
+ )
+ )
+ (GraphicsLayer
+ (position 8.00 608.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=28 height=3)
+ (rect (0,3) width=56 height=6)
+ (rect (0,9) width=83 height=10)
+ (rect (0,19) width=108 height=13)
+ (rect (0,32) width=130 height=17)
+ (rect (0,49) width=151 height=21)
+ (rect (0,70) width=168 height=22)
+ (rect (0,92) width=181 height=25)
+ (rect (0,117) width=191 height=27)
+ (rect (0,144) width=197 height=28)
+ (rect (0,172) width=200 height=28)
+ )
+ )
+ (GraphicsLayer
+ (position 208.00 608.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=180 height=21)
+ (rect (0,21) width=194 height=54)
+ (rect (0,75) width=200 height=125)
+ )
+ )
+ (GraphicsLayer
+ (position 408.00 608.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=185 height=6)
+ (rect (0,6) width=200 height=194)
+ )
+ )
+ (GraphicsLayer
+ (position 8.00 808.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=200)
+ )
+ )
+ (GraphicsLayer
+ (position 208.00 808.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=194)
+ (rect (6,194) width=194 height=6)
+ )
+ )
+ (GraphicsLayer
+ (position 408.00 808.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=169)
+ (rect (4,169) width=196 height=16)
+ (rect (15,185) width=185 height=11)
+ (rect (31,196) width=169 height=4)
+ )
+ )
+ (GraphicsLayer
+ (position 8.00 1008.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=28)
+ (rect (3,28) width=197 height=28)
+ (rect (9,56) width=191 height=27)
+ (rect (19,83) width=181 height=25)
+ (rect (32,108) width=168 height=22)
+ (rect (49,130) width=151 height=21)
+ (rect (70,151) width=130 height=17)
+ (rect (92,168) width=108 height=13)
+ (rect (117,181) width=83 height=10)
+ (rect (144,191) width=56 height=6)
+ (rect (172,197) width=28 height=3)
+ )
+ )
+ (GraphicsLayer
+ (position 208.00 1008.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=125)
+ (rect (6,125) width=194 height=54)
+ (rect (21,179) width=179 height=21)
+ )
+ )
+ (GraphicsLayer
+ (position 408.00 1008.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=194)
+ (rect (15,194) width=185 height=6)
+ )
+ )
+ (GraphicsLayer
+ (position 8.00 1208.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=200)
+ )
+ )
+ (GraphicsLayer
+ (position 208.00 1208.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=194)
+ (rect (0,194) width=194 height=6)
+ )
+ )
+ (GraphicsLayer
+ (position 408.00 1208.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=169)
+ (rect (0,169) width=196 height=16)
+ (rect (0,185) width=185 height=11)
+ (rect (0,196) width=169 height=4)
+ )
+ )
+ (GraphicsLayer
+ (position 8.00 1408.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=28)
+ (rect (0,28) width=197 height=28)
+ (rect (0,56) width=191 height=27)
+ (rect (0,83) width=181 height=25)
+ (rect (0,108) width=168 height=22)
+ (rect (0,130) width=151 height=21)
+ (rect (0,151) width=130 height=17)
+ (rect (0,168) width=108 height=13)
+ (rect (0,181) width=83 height=10)
+ (rect (0,191) width=56 height=6)
+ (rect (0,197) width=28 height=3)
+ )
+ )
+ (GraphicsLayer
+ (position 208.00 1408.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=124)
+ (rect (0,124) width=194 height=55)
+ (rect (0,179) width=180 height=21)
+ )
+ )
+ (GraphicsLayer
+ (position 408.00 1408.00)
+ (bounds 200.00 200.00)
+ (drawsContent 1)
+ (event region
+ (rect (0,0) width=200 height=194)
+ (rect (0,194) width=185 height=6)
+ )
+ )
+ )
+ )
+ )
+)
+
Added: trunk/LayoutTests/fast/scrolling/ios/border-radius-event-region.html (0 => 243674)
--- trunk/LayoutTests/fast/scrolling/ios/border-radius-event-region.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/border-radius-event-region.html 2019-03-30 08:28:07 UTC (rev 243674)
@@ -0,0 +1,39 @@
+<html>
+<style>
+.testdiv {
+ display: inline-block;
+ box-sizing: border-box;
+ border: 2px solid blue;
+ position: relative;
+ height: 200px;
+ width: 200px;
+ will-change: transform;
+}
+
+</style>
+<script>
+window._onload_ = function () {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ const properties = [ 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-left-radius', 'border-bottom-right-radius' ];
+ const values = [ '5px', '20px', '50px', '200px', '40px 150px', '50px 20px'];
+
+ for (const property of properties) {
+ for (const value of values) {
+ const div = document.createElement("div");
+ div.setAttribute("class", "testdiv");
+ div.setAttribute("style", property + ": " + value);
+ document.body.appendChild(div);
+ }
+ }
+
+ if (window.internals)
+ results.innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_EVENT_REGION);
+}
+</script>
+<body>
+<pre id="results"></pre>
+</body>
+</html>
+
Modified: trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2-expected.txt (243673 => 243674)
--- trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2-expected.txt 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-overlap-2-expected.txt 2019-03-30 08:28:07 UTC (rev 243674)
@@ -4,5 +4,5 @@
case 2:
case 3: Scrollable 3
case 4: Scrollable 4
-case 5:
+case 5: Scrollable 5
Modified: trunk/Source/WebCore/ChangeLog (243673 => 243674)
--- trunk/Source/WebCore/ChangeLog 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/ChangeLog 2019-03-30 08:28:07 UTC (rev 243674)
@@ -1,3 +1,41 @@
+2019-03-30 Antti Koivisto <[email protected]>
+
+ Hit-testing of boxes over scrollers should account for border-radius
+ https://bugs.webkit.org/show_bug.cgi?id=195374
+ <rdar://problem/48649993>
+
+ Reviewed by Simon Fraser.
+
+ Test: fast/scrolling/ios/border-radious-event-region.html
+
+ * page/Frame.h:
+ * platform/graphics/GraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::dumpProperties const):
+
+ Testing support.
+
+ * platform/graphics/GraphicsLayerClient.h:
+ * platform/graphics/RoundedRect.cpp:
+ (WebCore::approximateAsRegion):
+
+ Add a function to approximate RoundedRects as Regions.
+ It cuts away rectangles from the corners following the corner shapes.
+ More rectangles are cut for larger radii.
+
+ * platform/graphics/RoundedRect.h:
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::paintObject):
+
+ Use the new interface to get rounded corners right.
+ In rectangle case this takes optimized paths.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::layerTreeAsText):
+ * testing/Internals.cpp:
+ (WebCore::toLayerTreeFlags):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2019-03-29 Zalan Bujtas <[email protected]>
[ContentChangeObserver] Expand DOM timer observation to 350ms
Modified: trunk/Source/WebCore/page/Frame.h (243673 => 243674)
--- trunk/Source/WebCore/page/Frame.h 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/page/Frame.h 2019-03-30 08:28:07 UTC (rev 243674)
@@ -106,15 +106,16 @@
#endif
enum {
- LayerTreeFlagsIncludeDebugInfo = 1 << 0,
- LayerTreeFlagsIncludeVisibleRects = 1 << 1,
- LayerTreeFlagsIncludeTileCaches = 1 << 2,
- LayerTreeFlagsIncludeRepaintRects = 1 << 3,
- LayerTreeFlagsIncludePaintingPhases = 1 << 4,
- LayerTreeFlagsIncludeContentLayers = 1 << 5,
- LayerTreeFlagsIncludeAcceleratesDrawing = 1 << 6,
- LayerTreeFlagsIncludeBackingStoreAttached = 1 << 7,
- LayerTreeFlagsIncludeRootLayerProperties = 1 << 8,
+ LayerTreeFlagsIncludeDebugInfo = 1 << 0,
+ LayerTreeFlagsIncludeVisibleRects = 1 << 1,
+ LayerTreeFlagsIncludeTileCaches = 1 << 2,
+ LayerTreeFlagsIncludeRepaintRects = 1 << 3,
+ LayerTreeFlagsIncludePaintingPhases = 1 << 4,
+ LayerTreeFlagsIncludeContentLayers = 1 << 5,
+ LayerTreeFlagsIncludeAcceleratesDrawing = 1 << 6,
+ LayerTreeFlagsIncludeBackingStoreAttached = 1 << 7,
+ LayerTreeFlagsIncludeRootLayerProperties = 1 << 8,
+ LayerTreeFlagsIncludeEventRegion = 1 << 9,
};
typedef unsigned LayerTreeFlags;
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (243673 => 243674)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2019-03-30 08:28:07 UTC (rev 243674)
@@ -926,6 +926,9 @@
ts << indent << ")\n";
}
+ if (behavior & LayerTreeAsTextIncludeEventRegion && !m_eventRegion.isEmpty())
+ ts << indent << "(event region" << m_eventRegion << ")\n";
+
if (behavior & LayerTreeAsTextIncludePaintingPhases && paintingPhase()) {
ts << indent << "(paintingPhases\n";
TextStream::IndentScope indentScope(ts);
Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h (243673 => 243674)
--- trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h 2019-03-30 08:28:07 UTC (rev 243674)
@@ -73,6 +73,7 @@
LayerTreeAsTextIncludeAcceleratesDrawing = 1 << 7,
LayerTreeAsTextIncludeBackingStoreAttached = 1 << 8,
LayerTreeAsTextIncludeRootLayerProperties = 1 << 9,
+ LayerTreeAsTextIncludeEventRegion = 1 << 10,
LayerTreeAsTextShowAll = 0xFFFF
};
typedef unsigned LayerTreeAsTextBehavior;
Modified: trunk/Source/WebCore/platform/graphics/Region.cpp (243673 => 243674)
--- trunk/Source/WebCore/platform/graphics/Region.cpp 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/platform/graphics/Region.cpp 2019-03-30 08:28:07 UTC (rev 243674)
@@ -650,5 +650,17 @@
*m_shape = WTFMove(shape);
}
+TextStream& operator<<(TextStream& ts, const Region& region)
+{
+ ts << "\n";
+ {
+ TextStream::IndentScope indentScope(ts);
+ for (auto& rect : region.rects())
+ ts << indent << "(rect " << rect << ")\n";
+ }
+ ts << indent;
+ return ts;
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/Region.h (243673 => 243674)
--- trunk/Source/WebCore/platform/graphics/Region.h 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/platform/graphics/Region.h 2019-03-30 08:28:07 UTC (rev 243674)
@@ -208,6 +208,8 @@
return !(a == b);
}
+WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const Region&);
+
template<class Encoder>
void Region::Span::encode(Encoder& encoder) const
{
Modified: trunk/Source/WebCore/platform/graphics/RoundedRect.cpp (243673 => 243674)
--- trunk/Source/WebCore/platform/graphics/RoundedRect.cpp 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/platform/graphics/RoundedRect.cpp 2019-03-30 08:28:07 UTC (rev 243674)
@@ -32,6 +32,7 @@
#include "GeometryUtilities.h"
#include "LayoutRect.h"
#include "LayoutUnit.h"
+#include "Region.h"
#include <algorithm>
@@ -305,4 +306,69 @@
return snappedRoundedRect;
}
+Region approximateAsRegion(const RoundedRect& roundedRect, unsigned stepLength)
+{
+ Region region;
+
+ auto& rect = roundedRect.rect();
+ region.unite(enclosingIntRect(rect));
+
+ if (!roundedRect.isRounded())
+ return region;
+
+ auto& radii = roundedRect.radii();
+
+ auto makeIntRect = [] (LayoutPoint a, LayoutPoint b) {
+ return enclosingIntRect(LayoutRect {
+ LayoutPoint { std::min(a.x(), b.x()), std::min(a.y(), b.y()) },
+ LayoutPoint { std::max(a.x(), b.x()), std::max(a.y(), b.y()) }
+ });
+ };
+
+ auto subtractCornerRects = [&] (LayoutPoint corner, LayoutPoint ellipsisCenter, LayoutSize axes, double fromAngle) {
+ double toAngle = fromAngle + M_PI / 2;
+
+ // Substract more rects for longer, more rounded arcs.
+ auto arcLengthFactor = roundToInt(std::min(axes.width(), axes.height()));
+ auto count = (arcLengthFactor + (stepLength / 2)) / stepLength;
+
+ for (auto i = 0u; i < count; ++i) {
+ auto angle = fromAngle + (i + 1) * (toAngle - fromAngle) / (count + 1);
+ auto ellipsisPoint = LayoutPoint { axes.width() * cos(angle), axes.height() * sin(angle) };
+ auto cornerRect = makeIntRect(corner, ellipsisCenter + ellipsisPoint);
+ region.subtract(cornerRect);
+ }
+ };
+
+ {
+ auto corner = rect.maxXMaxYCorner();
+ auto axes = radii.bottomRight();
+ auto ellipsisCenter = LayoutPoint(corner.x() - axes.width(), corner.y() - axes.height());
+ subtractCornerRects(corner, ellipsisCenter, axes, 0);
+ }
+
+ {
+ auto corner = rect.minXMaxYCorner();
+ auto axes = radii.bottomLeft();
+ auto ellipsisCenter = LayoutPoint(corner.x() + axes.width(), corner.y() - axes.height());
+ subtractCornerRects(corner, ellipsisCenter, axes, M_PI / 2);
+ }
+
+ {
+ auto corner = rect.minXMinYCorner();
+ auto axes = radii.topLeft();
+ auto ellipsisCenter = LayoutPoint(corner.x() + axes.width(), corner.y() + axes.height());
+ subtractCornerRects(corner, ellipsisCenter, axes, M_PI);
+ }
+
+ {
+ auto corner = rect.maxXMinYCorner();
+ auto axes = radii.topRight();
+ auto ellipsisCenter = LayoutPoint(corner.x() - axes.width(), corner.y() + axes.height());
+ subtractCornerRects(corner, ellipsisCenter, axes, M_PI * 3 / 2);
+ }
+
+ return region;
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/RoundedRect.h (243673 => 243674)
--- trunk/Source/WebCore/platform/graphics/RoundedRect.h 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/platform/graphics/RoundedRect.h 2019-03-30 08:28:07 UTC (rev 243674)
@@ -35,6 +35,7 @@
class FloatRoundedRect;
class LayoutUnit;
+class Region;
class RoundedRect {
public:
@@ -78,7 +79,7 @@
LayoutSize m_bottomRight;
};
- explicit RoundedRect(const LayoutRect&, const Radii& = Radii());
+ WEBCORE_EXPORT explicit RoundedRect(const LayoutRect&, const Radii& = Radii());
RoundedRect(const LayoutUnit&, const LayoutUnit&, const LayoutUnit& width, const LayoutUnit& height);
WEBCORE_EXPORT RoundedRect(const LayoutRect&, const LayoutSize& topLeft, const LayoutSize& topRight, const LayoutSize& bottomLeft, const LayoutSize& bottomRight);
@@ -127,6 +128,8 @@
return a.rect() == b.rect() && a.radii() == b.radii();
}
+// Snip away rectangles from corners, roughly one per step length of arc.
+WEBCORE_EXPORT Region approximateAsRegion(const RoundedRect&, unsigned stepLength = 20);
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (243673 => 243674)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2019-03-30 08:28:07 UTC (rev 243674)
@@ -1241,11 +1241,13 @@
return;
if (paintPhase == PaintPhase::EventRegion) {
- // FIXME: Handle inlines, lineboxes, SVG too.
- // FIXME: Transforms?
- if (visibleToHitTesting())
- paintInfo.eventRegion->unite(enclosingIntRect(LayoutRect(paintOffset, size())));
+ auto borderRect = LayoutRect(paintOffset, size());
+ if (visibleToHitTesting()) {
+ auto borderRegion = approximateAsRegion(style().getRoundedBorderFor(borderRect));
+ paintInfo.eventRegion->unite(borderRegion);
+ }
+
// No need to check descendants if we don't have overflow.
if (!hasVisualOverflow())
return;
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (243673 => 243674)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-03-30 08:28:07 UTC (rev 243674)
@@ -1943,6 +1943,8 @@
layerTreeBehavior |= LayerTreeAsTextIncludeBackingStoreAttached;
if (flags & LayerTreeFlagsIncludeRootLayerProperties)
layerTreeBehavior |= LayerTreeAsTextIncludeRootLayerProperties;
+ if (flags & LayerTreeFlagsIncludeEventRegion)
+ layerTreeBehavior |= LayerTreeAsTextIncludeEventRegion;
// We skip dumping the scroll and clip layers to keep layerTreeAsText output
// similar between platforms.
Modified: trunk/Source/WebCore/testing/Internals.cpp (243673 => 243674)
--- trunk/Source/WebCore/testing/Internals.cpp 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/testing/Internals.cpp 2019-03-30 08:28:07 UTC (rev 243674)
@@ -2518,6 +2518,8 @@
layerTreeFlags |= LayerTreeFlagsIncludeBackingStoreAttached;
if (flags & Internals::LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES)
layerTreeFlags |= LayerTreeFlagsIncludeRootLayerProperties;
+ if (flags & Internals::LAYER_TREE_INCLUDES_EVENT_REGION)
+ layerTreeFlags |= LayerTreeFlagsIncludeEventRegion;
return layerTreeFlags;
}
Modified: trunk/Source/WebCore/testing/Internals.h (243673 => 243674)
--- trunk/Source/WebCore/testing/Internals.h 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/testing/Internals.h 2019-03-30 08:28:07 UTC (rev 243674)
@@ -347,6 +347,7 @@
LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32,
LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 64,
LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 128,
+ LAYER_TREE_INCLUDES_EVENT_REGION = 256,
};
ExceptionOr<String> layerTreeAsText(Document&, unsigned short flags) const;
ExceptionOr<uint64_t> layerIDForElement(Element&);
Modified: trunk/Source/WebCore/testing/Internals.idl (243673 => 243674)
--- trunk/Source/WebCore/testing/Internals.idl 2019-03-30 02:56:17 UTC (rev 243673)
+++ trunk/Source/WebCore/testing/Internals.idl 2019-03-30 08:28:07 UTC (rev 243674)
@@ -372,6 +372,7 @@
const unsigned short LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32;
const unsigned short LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 64;
const unsigned short LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 128;
+ const unsigned short LAYER_TREE_INCLUDES_EVENT_REGION = 256;
[MayThrowException] DOMString layerTreeAsText(Document document, optional unsigned short flags = 0);
[MayThrowException] unsigned long long layerIDForElement(Element element);