Title: [185606] trunk
Revision
185606
Author
bfulg...@apple.com
Date
2015-06-16 13:44:18 -0700 (Tue, 16 Jun 2015)

Log Message

CSS Scroll Snap - support snapping to nested elements
https://bugs.webkit.org/show_bug.cgi?id=145843
<rdar://problem/21339581>

Reviewed by Darin Adler.

Source/WebCore:

Tested by css3/scroll-snap/nested-elements.html

The Scroll Snap Point implementation was not properly handling nested elements.
This could be resolved by recursively calling 'appendChildSnapOffsets', but this
seemed like an inefficient approach, especially considering how often this method
is called during various scaling and other operations.
        
Instead, do the following:
(1) Add a new HashSet to RenderView that holds a collection of RenderElements that
    have scroll-snap-coordinates.
(2) During RenderElement::styleWillChange, register all elements that have the
    scroll-snap-coordinates style with the RenderView.
(3) When performing 'appendChildSnapOffsets', refer to the HashSet of elements, select the
    subset of these entries relevant to the current scrolling container, and build up the
    set of scroll-snap-coordinates needed for the current scrolling container.

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::appendChildSnapOffsets): Check the scroll-snap-coordinate RenderElement HashSet
for the RenderView to find all elements that are children of the current scrolling container.
Add the scroll-snap-coordinates for these RenderElements to the current set of snap points.
* rendering/RenderElement.cpp:
(WebCore::findEnclosingScrollableContainer): New helper function.
(WebCore::RenderElement::styleWillChange): If the current element has scroll-snap-coordinate
defined, remember it for later so we can use it with the relevant scrolling container
after layout completes.
(WebCore::RenderElement::willBeRemovedFromTree): Unregister the current element from the
RenderView.
(WebCore::RenderElement::findEnclosingScrollableContainer): Added. Locate the relevant
scrolling container for the current object.
* rendering/RenderElement.h:
* rendering/RenderView.cpp:
(WebCore::Document::registerRenderElementWithScrollSnapCoordinates): Added.
(WebCore::Document::unregisterRenderElementWithScrollSnapCoordinates): Added.
* rendering/RenderView.h:

LayoutTests:

* css3/scroll-snap/nested-elements-expected.txt: Added.
* css3/scroll-snap/nested-elements.html: Added.
* css3/scroll-snap/scroll-snap-offsets-expected.txt: Updated to
  account for 50%/50% scroll-snap-coordinates.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (185605 => 185606)


--- trunk/LayoutTests/ChangeLog	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/LayoutTests/ChangeLog	2015-06-16 20:44:18 UTC (rev 185606)
@@ -1,3 +1,16 @@
+2015-06-16  Brent Fulgham  <bfulg...@apple.com>
+
+        CSS Scroll Snap - support snapping to nested elements
+        https://bugs.webkit.org/show_bug.cgi?id=145843
+        <rdar://problem/21339581>
+
+        Reviewed by Darin Adler.
+
+        * css3/scroll-snap/nested-elements-expected.txt: Added.
+        * css3/scroll-snap/nested-elements.html: Added.
+        * css3/scroll-snap/scroll-snap-offsets-expected.txt: Updated to
+          account for 50%/50% scroll-snap-coordinates.
+
 2015-06-16  Brady Eidson  <beid...@apple.com>
 
         [IndexedDB] array index keys are concatenated across cursor lifetime

Added: trunk/LayoutTests/css3/scroll-snap/nested-elements-expected.txt (0 => 185606)


--- trunk/LayoutTests/css3/scroll-snap/nested-elements-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/css3/scroll-snap/nested-elements-expected.txt	2015-06-16 20:44:18 UTC (rev 185606)
@@ -0,0 +1,9 @@
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Scroll-snap offsets for 'container': vertical = { 0, 101, 218, 335, 452, 569, 686, 803, 920, 1037, 1154, 1271, 1388, 1505, 1622, 1739, 1856, 1973, 2090, 2207, 4938 }
+PASS Scroll-snap offsets for 'invalidContainer': UNDEFINED
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/css3/scroll-snap/nested-elements.html (0 => 185606)


--- trunk/LayoutTests/css3/scroll-snap/nested-elements.html	                        (rev 0)
+++ trunk/LayoutTests/css3/scroll-snap/nested-elements.html	2015-06-16 20:44:18 UTC (rev 185606)
@@ -0,0 +1,155 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Snap points - nested snap coordinates</title>
+    <style>
+        .scrollable {
+            overflow: scroll;
+            -webkit-overflow-scrolling: touch;
+            border: 1px dashed black;
+            height: 300px;
+            margin: 0 10px;
+        }
+    
+        .center-snap-receiver {
+            -webkit-scroll-snap-type: mandatory;
+            -webkit-scroll-snap-destination: 0 0;
+        }
+    
+        .snap-point {
+            margin-top: 100px;
+            width: 15px;
+            height: 15px;
+            border: 1px solid black;
+            -webkit-scroll-snap-coordinate: 0 0px;
+        }
+    
+        .snap-point::after {
+            font-size: 1em;
+            position: relative;
+            content: '+';
+        }
+    
+        .nested > .snap-point {
+            margin-left: 50px;
+            border: 1px solid red;
+        }
+        .nested > .nested > .snap-point {
+            margin-left: 100px;
+            border: 1px solid blue;
+        }
+    
+        .large-content {
+            height: 3000px;
+            width: 100%;
+        }
+    
+        .small-content {
+            height: 200px;
+            width: 100%;
+        }
+
+        .invalidContainer {
+            border: 1px dashed black;
+            height: 300px;
+            margin: 0 10px;
+            opacity: 0.5;
+            overflow: hidden;
+        }
+    </style>
+        <script src=""
+        <script>
+        function runTest()
+        {
+            var container = document.getElementById('container');
+            debug("Scroll-snap offsets for 'container': " + window.internals.scrollSnapOffsets(container));
+
+            var invalidContainer = document.getElementById('invalidContainer');
+            try {
+                testFailed("Scroll-snap offsets for 'invalidContainer': " + window.internals.scrollSnapOffsets(invalidContainer));
+            } catch(ex) {
+                testPassed("Scroll-snap offsets for 'invalidContainer': UNDEFINED");
+            }
+
+            finishJSTest();
+            testRunner.notifyDone();
+        }
+
+        function onLoad()
+        {
+            if (window.testRunner) {
+                window.jsTestIsAsync = true;
+                testRunner.dumpAsText();
+                testRunner.waitUntilDone();
+                setTimeout(runTest, 0);
+            }
+        }
+        </script>
+</head>
+<body _onload_="onLoad();">
+    <div id="container" class="center-snap-receiver scrollable">
+        <div class="snap-point"></div>
+        <div class="nested">
+            <div class="snap-point"></div>
+        </div>
+        <div class="nested">
+            <div class="nested">
+                <div class="snap-point"></div>
+            </div>
+        </div>
+        <div class="snap-point"></div>
+        <div class="snap-point"></div>
+        <div class="nested">
+            <div class="snap-point"></div>
+        </div>
+        <div class="nested">
+            <div class="nested">
+                <div class="snap-point"></div>
+            </div>
+        </div>
+        <div class="nested">
+            <div class="snap-point"></div>
+        </div>
+        <div class="snap-point"></div>
+        <div class="nested">
+            <div class="snap-point"></div>
+        </div>
+        <div class="snap-point"></div>
+        <div class="snap-point"></div>
+        <div class="nested">
+            <div class="snap-point"></div>
+        </div>
+         <div class="snap-point"></div>
+        <div class="nested">
+            <div class="snap-point"></div>
+        </div>
+        <div class="nested">
+            <div class="nested">
+                <div class="snap-point"></div>
+            </div>
+        </div>
+         <div class="snap-point"></div>
+        <div class="nested">
+            <div class="snap-point"></div>
+        </div>
+        <div class="nested">
+            <div class="nested">
+                <div class="snap-point"></div>
+            </div>
+        </div>
+        <div class="large-content"></div>
+    </div>
+    <div id="invalidContainer" class="center-snap-receiver invalidContainer">
+        <div class="snap-point"></div>
+        <div class="nested">
+            <div class="snap-point"></div>
+        </div>
+        <div class="nested">
+            <div class="nested">
+                <div class="snap-point"></div>
+            </div>
+        </div>
+    </div>
+    <script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/css3/scroll-snap/scroll-snap-offsets-expected.txt (185605 => 185606)


--- trunk/LayoutTests/css3/scroll-snap/scroll-snap-offsets-expected.txt	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/LayoutTests/css3/scroll-snap/scroll-snap-offsets-expected.txt	2015-06-16 20:44:18 UTC (rev 185606)
@@ -2,16 +2,16 @@
  PASS successfullyParsed is true
 
 TEST COMPLETE
-Scroll-snap offsets for horizontalTarget: horizontal = { 0, 30, 60, 90, 120, 150 }, vertical = { 0, 15 }
-Scroll-snap offsets for verticalTarget: horizontal = { 0, 15 }, vertical = { 0, 30, 60, 90, 120, 150 }
-Scroll-snap offsets for horizontalBorderedTarget: horizontal = { 0, 30, 60, 90, 120, 150 }, vertical = { 0, 15 }
-Scroll-snap offsets for verticalBorderedTarget: horizontal = { 0, 15 }, vertical = { 0, 30, 60, 90, 120, 150 }
-Scroll-snap offsets for horizontalPaddedTarget: horizontal = { 0, 30, 60, 90, 120, 150, 170 }, vertical = { 0, 39 }
-Scroll-snap offsets for verticalPaddedTarget: horizontal = { 0, 35 }, vertical = { 0, 30, 60, 90, 120, 150, 174 }
-Scroll-snap offsets for horizontalBorderedPaddedTarget: horizontal = { 0, 30, 60, 90, 120, 150, 170 }, vertical = { 0, 39 }
-Scroll-snap offsets for verticalBorderedPaddedTarget: horizontal = { 0, 35 }, vertical = { 0, 30, 60, 90, 120, 150, 174 }
-Scroll-snap offsets for horizontalRotatedTarget: horizontal = { 0, 30, 60, 90, 120, 150, 170 }, vertical = { 0, 39 }
-Scroll-snap offsets for verticalRotatedTarget: horizontal = { 0, 35 }, vertical = { 0, 30, 60, 90, 120, 150, 174 }
+Scroll-snap offsets for horizontalTarget: horizontal = { 0, 30, 60, 90, 120, 150 }, vertical = { 0, 7, 15 }
+Scroll-snap offsets for verticalTarget: horizontal = { 0, 7, 15 }, vertical = { 0, 30, 60, 90, 120, 150 }
+Scroll-snap offsets for horizontalBorderedTarget: horizontal = { 0, 30, 60, 90, 120, 150 }, vertical = { 0, 7, 15 }
+Scroll-snap offsets for verticalBorderedTarget: horizontal = { 0, 7, 15 }, vertical = { 0, 30, 60, 90, 120, 150 }
+Scroll-snap offsets for horizontalPaddedTarget: horizontal = { 0, 30, 60, 90, 120, 150, 170 }, vertical = { 0, 7, 39 }
+Scroll-snap offsets for verticalPaddedTarget: horizontal = { 0, 7, 35 }, vertical = { 0, 30, 60, 90, 120, 150, 174 }
+Scroll-snap offsets for horizontalBorderedPaddedTarget: horizontal = { 0, 30, 60, 90, 120, 150, 170 }, vertical = { 0, 7, 39 }
+Scroll-snap offsets for verticalBorderedPaddedTarget: horizontal = { 0, 7, 35 }, vertical = { 0, 30, 60, 90, 120, 150, 174 }
+Scroll-snap offsets for horizontalRotatedTarget: horizontal = { 0, 30, 60, 90, 120, 150, 170 }, vertical = { 0, 7, 39 }
+Scroll-snap offsets for verticalRotatedTarget: horizontal = { 0, 7, 35 }, vertical = { 0, 30, 60, 90, 120, 150, 174 }
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/Source/WebCore/ChangeLog (185605 => 185606)


--- trunk/Source/WebCore/ChangeLog	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/Source/WebCore/ChangeLog	2015-06-16 20:44:18 UTC (rev 185606)
@@ -1,3 +1,46 @@
+2015-06-16  Brent Fulgham  <bfulg...@apple.com>
+
+        CSS Scroll Snap - support snapping to nested elements
+        https://bugs.webkit.org/show_bug.cgi?id=145843
+        <rdar://problem/21339581>
+
+        Reviewed by Darin Adler.
+
+        Tested by css3/scroll-snap/nested-elements.html
+
+        The Scroll Snap Point implementation was not properly handling nested elements.
+        This could be resolved by recursively calling 'appendChildSnapOffsets', but this
+        seemed like an inefficient approach, especially considering how often this method
+        is called during various scaling and other operations.
+        
+        Instead, do the following:
+        (1) Add a new HashSet to RenderView that holds a collection of RenderElements that
+            have scroll-snap-coordinates.
+        (2) During RenderElement::styleWillChange, register all elements that have the
+            scroll-snap-coordinates style with the RenderView.
+        (3) When performing 'appendChildSnapOffsets', refer to the HashSet of elements, select the
+            subset of these entries relevant to the current scrolling container, and build up the
+            set of scroll-snap-coordinates needed for the current scrolling container.
+
+        * page/scrolling/AxisScrollSnapOffsets.cpp:
+        (WebCore::appendChildSnapOffsets): Check the scroll-snap-coordinate RenderElement HashSet
+        for the RenderView to find all elements that are children of the current scrolling container.
+        Add the scroll-snap-coordinates for these RenderElements to the current set of snap points.
+        * rendering/RenderElement.cpp:
+        (WebCore::findEnclosingScrollableContainer): New helper function.
+        (WebCore::RenderElement::styleWillChange): If the current element has scroll-snap-coordinate
+        defined, remember it for later so we can use it with the relevant scrolling container
+        after layout completes.
+        (WebCore::RenderElement::willBeRemovedFromTree): Unregister the current element from the
+        RenderView.
+        (WebCore::RenderElement::findEnclosingScrollableContainer): Added. Locate the relevant
+        scrolling container for the current object.
+        * rendering/RenderElement.h:
+        * rendering/RenderView.cpp:
+        (WebCore::Document::registerRenderElementWithScrollSnapCoordinates): Added.
+        (WebCore::Document::unregisterRenderElementWithScrollSnapCoordinates): Added.
+        * rendering/RenderView.h:
+
 2015-06-16  Brady Eidson  <beid...@apple.com>
 
         [IndexedDB] array index keys are concatenated across cursor lifetime

Modified: trunk/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp (185605 => 185606)


--- trunk/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp	2015-06-16 20:44:18 UTC (rev 185606)
@@ -31,6 +31,7 @@
 #include "HTMLElement.h"
 #include "Length.h"
 #include "RenderBox.h"
+#include "RenderView.h"
 #include "ScrollableArea.h"
 #include "StyleScrollSnapPoints.h"
 
@@ -40,28 +41,34 @@
 
 static void appendChildSnapOffsets(HTMLElement& parent, bool shouldAddHorizontalChildOffsets, Vector<LayoutUnit>& horizontalSnapOffsetSubsequence, bool shouldAddVerticalChildOffsets, Vector<LayoutUnit>& verticalSnapOffsetSubsequence)
 {
-    // FIXME: Instead of traversing all children, register children with snap coordinates before appending to snapOffsetSubsequence.
-    for (auto& child : childrenOfType<Element>(parent)) {
-        if (RenderBox* box = child.renderBox()) {
-            const auto& scrollSnapCoordinates = box->style().scrollSnapCoordinates();
-            if (scrollSnapCoordinates.isEmpty())
-                continue;
+    RenderElement* scrollContainer = parent.renderer();
+    ASSERT(scrollContainer);
+    
+    RenderView& renderView = scrollContainer->view();
 
-            LayoutRect viewSize = box->contentBoxRect();
-            LayoutUnit viewWidth = viewSize.width();
-            LayoutUnit viewHeight = viewSize.height();
-            FloatPoint position = box->localToContainerPoint(FloatPoint(), parent.renderBox());
-            LayoutUnit left = position.x();
-            LayoutUnit top = position.y();
-            for (auto& coordinate : scrollSnapCoordinates) {
-                LayoutUnit lastPotentialSnapPositionX = left + valueForLength(coordinate.width(), viewWidth);
-                if (shouldAddHorizontalChildOffsets && lastPotentialSnapPositionX > 0)
-                    horizontalSnapOffsetSubsequence.append(lastPotentialSnapPositionX);
+    Vector<const RenderBox*> elements;
+    for (auto& element : renderView.boxesWithScrollSnapCoordinates()) {
+        if (element->findEnclosingScrollableContainer() != scrollContainer)
+            continue;
 
-                LayoutUnit lastPotentialSnapPositionY = top + valueForLength(coordinate.height(), viewHeight);
-                if (shouldAddVerticalChildOffsets && lastPotentialSnapPositionY > 0)
-                    verticalSnapOffsetSubsequence.append(lastPotentialSnapPositionY);
-            }
+        elements.append(element);
+    }
+
+    for (auto& box : elements) {
+        auto& scrollSnapCoordinates = box->style().scrollSnapCoordinates();
+        if (scrollSnapCoordinates.isEmpty())
+            continue;
+        
+        LayoutRect viewSize = box->contentBoxRect();
+        FloatPoint position = box->localToContainerPoint(FloatPoint(), parent.renderBox());
+        for (auto& coordinate : scrollSnapCoordinates) {
+            LayoutUnit lastPotentialSnapPositionX = position.x() + valueForLength(coordinate.width(), viewSize.width());
+            if (shouldAddHorizontalChildOffsets && lastPotentialSnapPositionX > 0)
+                horizontalSnapOffsetSubsequence.append(lastPotentialSnapPositionX);
+            
+            LayoutUnit lastPotentialSnapPositionY = position.y() + valueForLength(coordinate.height(), viewSize.height());
+            if (shouldAddVerticalChildOffsets && lastPotentialSnapPositionY > 0)
+                verticalSnapOffsetSubsequence.append(lastPotentialSnapPositionY);
         }
     }
 }

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (185605 => 185606)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2015-06-16 20:44:18 UTC (rev 185606)
@@ -4948,4 +4948,14 @@
     return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop();
 }
 
+const RenderBox* RenderBox::findEnclosingScrollableContainer() const
+{
+    for (auto& candidate : lineageOfType<RenderBox>(*this)) {
+        if (candidate.hasOverflowClip())
+            return &candidate;
+    }
+    
+    return nullptr;
+}
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderBox.h (185605 => 185606)


--- trunk/Source/WebCore/rendering/RenderBox.h	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2015-06-16 20:44:18 UTC (rev 185606)
@@ -625,6 +625,8 @@
     bool canHaveOutsideRegionRange() const { return !isInFlowRenderFlowThread(); }
     virtual bool needsLayoutAfterRegionRangeChange() const { return false; }
 
+    const RenderBox* findEnclosingScrollableContainer() const;
+
 protected:
     RenderBox(Element&, Ref<RenderStyle>&&, unsigned baseTypeFlags);
     RenderBox(Document&, Ref<RenderStyle>&&, unsigned baseTypeFlags);

Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (185605 => 185606)


--- trunk/Source/WebCore/rendering/RenderElement.cpp	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp	2015-06-16 20:44:18 UTC (rev 185606)
@@ -3,7 +3,7 @@
  *           (C) 1999 Antti Koivisto (koivi...@kde.org)
  *           (C) 2005 Allan Sandfeld Jensen (k...@carewolf.com)
  *           (C) 2005, 2006 Samuel Weinig (sam.wei...@gmail.com)
- * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2013, 2015 Apple Inc. All rights reserved.
  * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
@@ -904,6 +904,16 @@
         }
     }
 
+#if ENABLE(CSS_SCROLL_SNAP)
+    if (!newStyle.scrollSnapCoordinates().isEmpty() || (oldStyle && !oldStyle->scrollSnapCoordinates().isEmpty())) {
+        ASSERT(is<RenderBox>(this));
+        if (newStyle.scrollSnapCoordinates().isEmpty())
+            view().unregisterBoxWithScrollSnapCoordinates(downcast<RenderBox>(*this));
+        else
+            view().registerBoxWithScrollSnapCoordinates(downcast<RenderBox>(*this));
+    }
+#endif
+
     if (isRoot() || isBody())
         view().frameView().updateExtendBackgroundIfNecessary();
 }
@@ -1058,6 +1068,14 @@
     if (auto* containerFlowThread = parent()->renderNamedFlowThreadWrapper())
         containerFlowThread->removeFlowChild(*this);
 
+    
+#if ENABLE(CSS_SCROLL_SNAP)
+    if (!m_style->scrollSnapCoordinates().isEmpty()) {
+        ASSERT(is<RenderBox>(this));
+        view().unregisterBoxWithScrollSnapCoordinates(downcast<RenderBox>(*this));
+    }
+#endif
+
     RenderObject::willBeRemovedFromTree();
 }
 

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (185605 => 185606)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2015-06-16 20:44:18 UTC (rev 185606)
@@ -1428,4 +1428,16 @@
     return 0;
 }
 
+#if ENABLE(CSS_SCROLL_SNAP)
+void RenderView::registerBoxWithScrollSnapCoordinates(const RenderBox& box)
+{
+    m_boxesWithScrollSnapCoordinates.add(&box);
+}
+
+void RenderView::unregisterBoxWithScrollSnapCoordinates(const RenderBox& box)
+{
+    m_boxesWithScrollSnapCoordinates.remove(&box);
+}
+#endif
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderView.h (185605 => 185606)


--- trunk/Source/WebCore/rendering/RenderView.h	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/Source/WebCore/rendering/RenderView.h	2015-06-16 20:44:18 UTC (rev 185606)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1999 Lars Knoll (kn...@kde.org)
- * Copyright (C) 2006 Apple Inc.
+ * Copyright (C) 2006, 2015 Apple Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -245,6 +245,12 @@
     void protectRenderWidgetUntilLayoutIsDone(RenderWidget& widget) { m_protectedRenderWidgets.append(&widget); }
     void releaseProtectedRenderWidgets() { m_protectedRenderWidgets.clear(); }
 
+#if ENABLE(CSS_SCROLL_SNAP)
+    void registerBoxWithScrollSnapCoordinates(const RenderBox&);
+    void unregisterBoxWithScrollSnapCoordinates(const RenderBox&);
+    const HashSet<const RenderBox*>& boxesWithScrollSnapCoordinates() { return m_boxesWithScrollSnapCoordinates; }
+#endif
+
 protected:
     virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
     virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;
@@ -367,6 +373,9 @@
 #if ENABLE(SERVICE_CONTROLS)
     SelectionRectGatherer m_selectionRectGatherer;
 #endif
+#if ENABLE(CSS_SCROLL_SNAP)
+    HashSet<const RenderBox*> m_boxesWithScrollSnapCoordinates;
+#endif
 };
 
 // Stack-based class to assist with LayoutState push/pop

Modified: trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme (185605 => 185606)


--- trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme	2015-06-16 20:27:51 UTC (rev 185605)
+++ trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme	2015-06-16 20:44:18 UTC (rev 185606)
@@ -153,6 +153,8 @@
             ReferencedContainer = "container:Source/WebKit2/WebKit2.xcodeproj">
          </BuildableReference>
       </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
    </TestAction>
    <LaunchAction
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -162,8 +164,10 @@
       buildConfiguration = "Debug"
       ignoresPersistentStateOnLaunch = "NO"
       debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
       allowLocationSimulation = "YES">
-      <BuildableProductRunnable>
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
          <BuildableReference
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "1A50DB1D110A3BDC000D3FE5"
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to