Title: [225480] trunk/Source
Revision
225480
Author
fred.w...@free.fr
Date
2017-12-04 08:45:51 -0800 (Mon, 04 Dec 2017)

Log Message

Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes
https://bugs.webkit.org/show_bug.cgi?id=180353

Patch by Frederic Wang <fw...@igalia.com> on 2017-12-04
Reviewed by Antonio Gomes.

This function was introduced in bug 175135 to solve a rendering bug with fixed positioned
nodes in overflow nodes. For a frame node, the reference frame to use for fixed nodes is
actually the frame node itself or otherwise we will get the same rendering bug. This patch
makes enclosingFrameNode return the node itself when it is a frame node and renames it to
clarify this behavior. Currently, enclosingFrameNode is not used for frame nodes so the
behavior is unchanged.

Source/WebCore:

No new tests, behavior is unchanged.

* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::enclosingFrameNodeIncludingSelf): Start the search from a frame
scrolling node from the node itself. Renamed to make explicit that this function may include
the node itself.
* page/scrolling/ScrollingTreeNode.h: Renamed.

Source/WebKit:

* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll): Use auto* and
the new function name.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (225479 => 225480)


--- trunk/Source/WebCore/ChangeLog	2017-12-04 16:41:49 UTC (rev 225479)
+++ trunk/Source/WebCore/ChangeLog	2017-12-04 16:45:51 UTC (rev 225480)
@@ -1,3 +1,25 @@
+2017-12-04  Frederic Wang  <fw...@igalia.com>
+
+        Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes
+        https://bugs.webkit.org/show_bug.cgi?id=180353
+
+        Reviewed by Antonio Gomes.
+
+        This function was introduced in bug 175135 to solve a rendering bug with fixed positioned
+        nodes in overflow nodes. For a frame node, the reference frame to use for fixed nodes is
+        actually the frame node itself or otherwise we will get the same rendering bug. This patch
+        makes enclosingFrameNode return the node itself when it is a frame node and renames it to
+        clarify this behavior. Currently, enclosingFrameNode is not used for frame nodes so the
+        behavior is unchanged.
+
+        No new tests, behavior is unchanged.
+
+        * page/scrolling/ScrollingTreeNode.cpp:
+        (WebCore::ScrollingTreeNode::enclosingFrameNodeIncludingSelf): Start the search from a frame
+        scrolling node from the node itself. Renamed to make explicit that this function may include
+        the node itself.
+        * page/scrolling/ScrollingTreeNode.h: Renamed.
+
 2017-12-04  Michael Catanzaro  <mcatanz...@igalia.com>
 
         [WPE][GTK] Implement PAL::SleepDisabler

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp (225479 => 225480)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp	2017-12-04 16:41:49 UTC (rev 225479)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp	2017-12-04 16:45:51 UTC (rev 225480)
@@ -77,9 +77,9 @@
         ts.dumpProperty("nodeID", scrollingNodeID());
 }
 
-ScrollingTreeFrameScrollingNode* ScrollingTreeNode::enclosingFrameNode() const
+ScrollingTreeFrameScrollingNode* ScrollingTreeNode::enclosingFrameNodeIncludingSelf()
 {
-    auto* node = parent();
+    auto* node = this;
     while (node && !node->isFrameScrollingNode())
         node = node->parent();
 

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h (225479 => 225480)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h	2017-12-04 16:41:49 UTC (rev 225479)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h	2017-12-04 16:45:51 UTC (rev 225480)
@@ -66,7 +66,7 @@
     void appendChild(Ref<ScrollingTreeNode>&&);
     void removeChild(ScrollingTreeNode&);
 
-    WEBCORE_EXPORT ScrollingTreeFrameScrollingNode* enclosingFrameNode() const;
+    WEBCORE_EXPORT ScrollingTreeFrameScrollingNode* enclosingFrameNodeIncludingSelf();
 
     WEBCORE_EXPORT void dump(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const;
 

Modified: trunk/Source/WebKit/ChangeLog (225479 => 225480)


--- trunk/Source/WebKit/ChangeLog	2017-12-04 16:41:49 UTC (rev 225479)
+++ trunk/Source/WebKit/ChangeLog	2017-12-04 16:45:51 UTC (rev 225480)
@@ -1,3 +1,21 @@
+2017-12-04  Frederic Wang  <fw...@igalia.com>
+
+        Make ScrollingTreeNode::enclosingFrameNode return the node itself for frame nodes
+        https://bugs.webkit.org/show_bug.cgi?id=180353
+
+        Reviewed by Antonio Gomes.
+
+        This function was introduced in bug 175135 to solve a rendering bug with fixed positioned
+        nodes in overflow nodes. For a frame node, the reference frame to use for fixed nodes is
+        actually the frame node itself or otherwise we will get the same rendering bug. This patch
+        makes enclosingFrameNode return the node itself when it is a frame node and renames it to
+        clarify this behavior. Currently, enclosingFrameNode is not used for frame nodes so the
+        behavior is unchanged.
+
+        * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
+        (WebKit::ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll): Use auto* and
+        the new function name.
+
 2017-12-04  Michael Catanzaro  <mcatanz...@igalia.com>
 
         [GTK] Implement PAL::SleepDisabler

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (225479 => 225480)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm	2017-12-04 16:41:49 UTC (rev 225479)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm	2017-12-04 16:45:51 UTC (rev 225480)
@@ -246,7 +246,7 @@
         return;
 
     FloatRect fixedPositionRect;
-    ScrollingTreeFrameScrollingNode* frameNode = scrollingNode().enclosingFrameNode();
+    auto* frameNode = scrollingNode().enclosingFrameNodeIncludingSelf();
     if (frameNode && frameNode->parent())
         fixedPositionRect = frameNode->fixedPositionRect();
     else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to