Diff
Modified: trunk/LayoutTests/ChangeLog (200635 => 200636)
--- trunk/LayoutTests/ChangeLog 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/LayoutTests/ChangeLog 2016-05-10 19:31:22 UTC (rev 200636)
@@ -1,5 +1,16 @@
2016-05-10 Simon Fraser <[email protected]>
+ Fix scrolling tree dumping
+ https://bugs.webkit.org/show_bug.cgi?id=157529
+
+ Reviewed by Tim Horton.
+
+ * fast/scrolling/ios/remove-scrolling-role-expected.txt: Renamed from LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt.
+ * fast/scrolling/ios/remove-scrolling-role.html: Renamed from LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html.
+ * platform/ios-simulator-wk2/TestExpectations:
+
+2016-05-10 Simon Fraser <[email protected]>
+
Mark fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html as flakey.
* platform/ios-simulator-wk2/TestExpectations:
Copied: trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role-expected.txt (from rev 200635, trunk/LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt) (0 => 200636)
--- trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role-expected.txt 2016-05-10 19:31:22 UTC (rev 200636)
@@ -0,0 +1,11 @@
+(Frame scrolling node
+ (scrollable area size 800 600)
+ (contents size 800 2513)
+ (children 1
+ (Overflow scrolling node
+ (scrollable area size 300 400)
+ (contents size 300 2000)
+ )
+ )
+)
+
Copied: trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role.html (from rev 200635, trunk/LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html) (0 => 200636)
--- trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role.html (rev 0)
+++ trunk/LayoutTests/fast/scrolling/ios/remove-scrolling-role.html 2016-05-10 19:31:22 UTC (rev 200636)
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <style>
+ body {
+ margin: 0;
+ height: 2500px;
+ }
+
+ #fixed {
+ position: fixed;
+ left: 10px;
+ top: 10px;
+ -webkit-overflow-scrolling: touch;
+ height: 400px;
+ width: 300px;
+ overflow: auto;
+ border: 4px solid black;
+ }
+
+ #fixed.changed {
+ position: absolute;
+ border: 4px solid green;
+ }
+
+ .content {
+ height: 2000px;
+ background-color: silver;
+ }
+
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ }
+
+ function doTest()
+ {
+ window.setTimeout(function() {
+ document.getElementById('fixed').classList.add('changed');
+
+ if (window.internals)
+ document.getElementById('results').innerText = internals.scrollingStateTreeAsText();
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+
+ }, 0);
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <pre id="results"></pre>
+ <div id="fixed">
+ <div class="content">
+ </div>
+ </div>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (200635 => 200636)
--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations 2016-05-10 19:31:22 UTC (rev 200636)
@@ -1664,7 +1664,7 @@
http/tests/loading/preload-img-srcset-sizes.html [ Failure ]
http/tests/navigation/postredirect-basic.html [ Failure ]
http/tests/navigation/postredirect-goback1.html [ Failure ]
-platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html [ Failure ]
+
platform/ios-simulator/ios/fast/text/underline-scaling.html [ Failure ]
compositing/masks/compositing-clip-path-on-subpixel-position.html [ ImageOnlyFailure ]
fast/borders/dashed-border-on-subpixel-position.html [ ImageOnlyFailure ]
Deleted: trunk/LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt (200635 => 200636)
--- trunk/LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role-expected.txt 2016-05-10 19:31:22 UTC (rev 200636)
@@ -1,12 +0,0 @@
-(Frame scrolling node
- (scrollable area size 800 600)
- (contents size 800 2513)
- (children 1
- (Overflow scrolling node
- (scrollable area size 300 400)
- (contents size 300 2000)
- (scrolled contents layer 22)
- )
- )
-)
-
Deleted: trunk/LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html (200635 => 200636)
--- trunk/LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/scrolling/remove-scrolling-role.html 2016-05-10 19:31:22 UTC (rev 200636)
@@ -1,63 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
- <style>
- body {
- margin: 0;
- height: 2500px;
- }
-
- #fixed {
- position: fixed;
- left: 10px;
- top: 10px;
- -webkit-overflow-scrolling: touch;
- height: 400px;
- width: 300px;
- overflow: auto;
- border: 4px solid black;
- }
-
- #fixed.changed {
- position: absolute;
- border: 4px solid green;
- }
-
- .content {
- height: 2000px;
- background-color: silver;
- }
-
- </style>
- <script>
- if (window.testRunner) {
- testRunner.waitUntilDone();
- testRunner.dumpAsText();
- }
-
- function doTest()
- {
- window.setTimeout(function() {
- document.getElementById('fixed').classList.add('changed');
-
- if (window.internals)
- document.getElementById('results').innerText = internals.scrollingStateTreeAsText();
-
- if (window.testRunner)
- testRunner.notifyDone();
-
- }, 0);
- }
-
- window.addEventListener('load', doTest, false);
- </script>
-</head>
-<body>
- <pre id="results"></pre>
- <div id="fixed">
- <div class="content">
- </div>
- </div>
-</body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (200635 => 200636)
--- trunk/Source/WebCore/ChangeLog 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/ChangeLog 2016-05-10 19:31:22 UTC (rev 200636)
@@ -1,3 +1,41 @@
+2016-05-10 Simon Fraser <[email protected]>
+
+ Fix scrolling tree dumping
+ https://bugs.webkit.org/show_bug.cgi?id=157529
+
+ Reviewed by Tim Horton.
+
+ Scrolling tree dumps cannot contain layerIDs because they are not stable between
+ runs. Fix by adding ScrollingStateTreeAsTextBehavior flags, and not dumping
+ the layerID for tests.
+
+ Sadly RemoteScrollingCoordinatorTransaction has a lot of duplicated code for dumping
+ the scrolling state tree, which should be converted to dumpProperties() at some point.
+
+ Fix the one test that suffered from this problem, and unskip it.
+
+ Test: fast/scrolling/ios/remove-scrolling-role.html
+
+ * page/scrolling/ScrollingStateFixedNode.cpp:
+ (WebCore::ScrollingStateFixedNode::dumpProperties):
+ * page/scrolling/ScrollingStateFixedNode.h:
+ * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
+ (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
+ * page/scrolling/ScrollingStateFrameScrollingNode.h:
+ * page/scrolling/ScrollingStateNode.cpp:
+ (WebCore::ScrollingStateNode::dump):
+ (WebCore::ScrollingStateNode::scrollingStateTreeAsText):
+ * page/scrolling/ScrollingStateNode.h:
+ * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
+ (WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
+ * page/scrolling/ScrollingStateOverflowScrollingNode.h:
+ * page/scrolling/ScrollingStateScrollingNode.cpp:
+ (WebCore::ScrollingStateScrollingNode::dumpProperties):
+ * page/scrolling/ScrollingStateScrollingNode.h:
+ * page/scrolling/ScrollingStateStickyNode.cpp:
+ (WebCore::ScrollingStateStickyNode::dumpProperties):
+ * page/scrolling/ScrollingStateStickyNode.h:
+
2016-05-10 Csaba Osztrogonác <[email protected]>
Fix the !ENABLE(CSS_REGIONS) build after r198990
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp 2016-05-10 19:31:22 UTC (rev 200636)
@@ -75,7 +75,7 @@
static_cast<GraphicsLayer*>(layer())->syncPosition(position);
}
-void ScrollingStateFixedNode::dumpProperties(TextStream& ts, int indent) const
+void ScrollingStateFixedNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior) const
{
ts << "(" << "Fixed node" << "\n";
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h 2016-05-10 19:31:22 UTC (rev 200636)
@@ -58,7 +58,7 @@
void syncLayerPositionForViewportRect(const LayoutRect& viewportRect) override;
- void dumpProperties(TextStream&, int indent) const override;
+ void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
FixedPositionViewportConstraints m_constraints;
};
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp 2016-05-10 19:31:22 UTC (rev 200636)
@@ -221,11 +221,11 @@
}
#endif
-void ScrollingStateFrameScrollingNode::dumpProperties(TextStream& ts, int indent) const
+void ScrollingStateFrameScrollingNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
{
ts << "(Frame scrolling node" << "\n";
- ScrollingStateScrollingNode::dumpProperties(ts, indent);
+ ScrollingStateScrollingNode::dumpProperties(ts, indent, behavior);
if (m_frameScaleFactor != 1) {
writeIndent(ts, indent + 1);
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h 2016-05-10 19:31:22 UTC (rev 200636)
@@ -119,7 +119,7 @@
#endif
void setScrollerImpsFromScrollbars(Scrollbar* verticalScrollbar, Scrollbar* horizontalScrollbar);
- void dumpProperties(TextStream&, int indent) const override;
+ void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
private:
ScrollingStateFrameScrollingNode(ScrollingStateTree&, ScrollingNodeID);
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp 2016-05-10 19:31:22 UTC (rev 200636)
@@ -112,17 +112,17 @@
setPropertyChanged(ScrollLayer);
}
-void ScrollingStateNode::dump(TextStream& ts, int indent) const
+void ScrollingStateNode::dump(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
{
writeIndent(ts, indent);
- dumpProperties(ts, indent);
+ dumpProperties(ts, indent, behavior);
if (m_children) {
writeIndent(ts, indent + 1);
ts << "(children " << children()->size() << "\n";
for (auto& child : *m_children)
- child->dump(ts, indent + 2);
+ child->dump(ts, indent + 2, behavior);
writeIndent(ts, indent + 1);
ts << ")\n";
}
@@ -135,7 +135,7 @@
{
TextStream ts;
- dump(ts, 0);
+ dump(ts, 0, ScrollingStateTreeAsTextBehaviorNormal);
return ts.release();
}
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h 2016-05-10 19:31:22 UTC (rev 200636)
@@ -40,6 +40,13 @@
class ScrollingStateTree;
class TextStream;
+enum ScrollingStateTreeAsTextBehaviorFlags {
+ ScrollingStateTreeAsTextBehaviorNormal = 0,
+ ScrollingStateTreeAsTextBehaviorIncludeLayerIDs = 1 << 0,
+ ScrollingStateTreeAsTextBehaviorDebug = ScrollingStateTreeAsTextBehaviorIncludeLayerIDs
+};
+typedef unsigned ScrollingStateTreeAsTextBehavior;
+
// Used to allow ScrollingStateNodes to refer to layers in various contexts:
// a) Async scrolling, main thread: ScrollingStateNode holds onto a GraphicsLayer, and uses m_layerID
// to detect whether that GraphicsLayer's underlying PlatformLayer changed.
@@ -238,9 +245,9 @@
ScrollingStateNode(const ScrollingStateNode&, ScrollingStateTree&);
private:
- void dump(TextStream&, int indent) const;
+ void dump(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const;
- virtual void dumpProperties(TextStream&, int indent) const = 0;
+ virtual void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const = 0;
const ScrollingNodeType m_nodeType;
ScrollingNodeID m_nodeID;
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp 2016-05-10 19:31:22 UTC (rev 200636)
@@ -68,13 +68,13 @@
setPropertyChanged(ScrolledContentsLayer);
}
-void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, int indent) const
+void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior behavior) const
{
ts << "(" << "Overflow scrolling node" << "\n";
- ScrollingStateScrollingNode::dumpProperties(ts, indent);
+ ScrollingStateScrollingNode::dumpProperties(ts, indent, behavior);
- if (m_scrolledContentsLayer.layerID()) {
+ if ((behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) && m_scrolledContentsLayer.layerID()) {
writeIndent(ts, indent + 1);
ts << "(scrolled contents layer " << m_scrolledContentsLayer.layerID() << ")\n";
}
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h 2016-05-10 19:31:22 UTC (rev 200636)
@@ -48,7 +48,7 @@
const LayerRepresentation& scrolledContentsLayer() const { return m_scrolledContentsLayer; }
WEBCORE_EXPORT void setScrolledContentsLayer(const LayerRepresentation&);
- void dumpProperties(TextStream&, int indent) const override;
+ void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
private:
ScrollingStateOverflowScrollingNode(ScrollingStateTree&, ScrollingNodeID);
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2016-05-10 19:31:22 UTC (rev 200636)
@@ -168,7 +168,7 @@
setPropertyChanged(ExpectsWheelEventTestTrigger);
}
-void ScrollingStateScrollingNode::dumpProperties(TextStream& ts, int indent) const
+void ScrollingStateScrollingNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior) const
{
if (m_scrollPosition != FloatPoint()) {
writeIndent(ts, indent + 1);
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h 2016-05-10 19:31:22 UTC (rev 200636)
@@ -95,11 +95,11 @@
bool expectsWheelEventTestTrigger() const { return m_expectsWheelEventTestTrigger; }
WEBCORE_EXPORT void setExpectsWheelEventTestTrigger(bool);
- void dumpProperties(TextStream&, int indent) const override;
-
protected:
ScrollingStateScrollingNode(ScrollingStateTree&, ScrollingNodeType, ScrollingNodeID);
ScrollingStateScrollingNode(const ScrollingStateScrollingNode&, ScrollingStateTree&);
+
+ void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
private:
FloatSize m_scrollableAreaSize;
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp 2016-05-10 19:31:22 UTC (rev 200636)
@@ -75,7 +75,7 @@
static_cast<GraphicsLayer*>(layer())->syncPosition(position);
}
-void ScrollingStateStickyNode::dumpProperties(TextStream& ts, int indent) const
+void ScrollingStateStickyNode::dumpProperties(TextStream& ts, int indent, ScrollingStateTreeAsTextBehavior) const
{
ts << "(" << "Sticky node" << "\n";
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h (200635 => 200636)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h 2016-05-10 19:31:16 UTC (rev 200635)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h 2016-05-10 19:31:22 UTC (rev 200636)
@@ -58,7 +58,7 @@
void syncLayerPositionForViewportRect(const LayoutRect& viewportRect) override;
- void dumpProperties(TextStream&, int indent) const override;
+ void dumpProperties(TextStream&, int indent, ScrollingStateTreeAsTextBehavior) const override;
StickyPositionViewportConstraints m_constraints;
};