Title: [163331] tags/Safari-538.16

Diff

Modified: tags/Safari-538.16/LayoutTests/ChangeLog (163330 => 163331)


--- tags/Safari-538.16/LayoutTests/ChangeLog	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/LayoutTests/ChangeLog	2014-02-03 23:27:19 UTC (rev 163331)
@@ -1,3 +1,22 @@
+2014-02-03  Lucas Forschler  <lforsch...@apple.com>
+
+        Merge r163329
+
+    2014-02-03  Radu Stavila  <stav...@adobe.com>
+
+            REGRESSION (r163018): Can’t scroll in <select> lists
+            https://bugs.webkit.org/show_bug.cgi?id=128090
+
+            New test validates scrolling using the mouse wheel inside a select list.
+            This test is for the moment added as a ImageOnlyFailure expectation
+            because the current implementation of eventSender cannot simulate mouse wheel events.
+
+            Reviewed by Simon Fraser.
+
+            * TestExpectations:
+            * fast/scrolling/scroll-select-list-expected.html: Added.
+            * fast/scrolling/scroll-select-list.html: Added.
+
 2014-02-03  Krzysztof Czech  <k.cz...@samsung.com>
 
         [ATK] Expose aria-controls through ATK_RELATION_CONTROLLER_FOR

Modified: tags/Safari-538.16/LayoutTests/TestExpectations (163330 => 163331)


--- tags/Safari-538.16/LayoutTests/TestExpectations	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/LayoutTests/TestExpectations	2014-02-03 23:27:19 UTC (rev 163331)
@@ -2,6 +2,9 @@
 #
 # See http://trac.webkit.org/wiki/TestExpectations for more information on this file.
 
+# Incomplete implementation of eventSender causes this test to fail
+webkit.org/b/42194 fast/scrolling/scroll-select-list.html [ ImageOnlyFailure ]
+
 # pending functional patch and per-port verification
 webkit.org/b/109954 css3/line-break [ Skip ]
 

Copied: tags/Safari-538.16/LayoutTests/fast/scrolling/scroll-select-list-expected.html (from rev 163329, trunk/LayoutTests/fast/scrolling/scroll-select-list-expected.html) (0 => 163331)


--- tags/Safari-538.16/LayoutTests/fast/scrolling/scroll-select-list-expected.html	                        (rev 0)
+++ tags/Safari-538.16/LayoutTests/fast/scrolling/scroll-select-list-expected.html	2014-02-03 23:27:19 UTC (rev 163331)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<style>
+  
+</style>
+
+<script type="text/_javascript_">
+  _onload_ = function() {
+      var selectList = document.getElementById("list");
+      selectList.scrollTop = 84;
+  }
+</script>
+
+<body style="font: 16px/16px monospace;">
+  <p>Scrolling inside the list using the mouse wheel should work as expected<br/>
+  <select id="list" size="2">
+      <option>content1</option>
+      <option>content2</option>
+      <option>content3</option>
+      <option>content4</option>
+      <option>content5</option>
+      <option>content6</option>
+      <option>content7</option>
+      <option>content8</option>
+      <option>content9</option>
+      <option>content10</option>
+  </select>
+</body>

Copied: tags/Safari-538.16/LayoutTests/fast/scrolling/scroll-select-list.html (from rev 163329, trunk/LayoutTests/fast/scrolling/scroll-select-list.html) (0 => 163331)


--- tags/Safari-538.16/LayoutTests/fast/scrolling/scroll-select-list.html	                        (rev 0)
+++ tags/Safari-538.16/LayoutTests/fast/scrolling/scroll-select-list.html	2014-02-03 23:27:19 UTC (rev 163331)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+
+<script>
+  _onload_ = function() {
+    if (window.eventSender) {
+      var selectList = document.getElementById("list");
+      var left = selectList.offsetLeft;
+      var top = selectList.offsetTop;
+
+      // scroll the list all the way down
+      eventSender.mouseMoveTo(left + 10, top + 10);
+      eventSender.continuousMouseScrollBy(0, -10000);
+      eventSender.mouseMoveTo(0, 0);
+    }
+  }
+</script>
+
+<body style="font: 16px/16px monospace;">
+    <p>Scrolling inside the list using the mouse wheel should work as expected<br/>
+    <select id="list" size="2">
+      <option>content1</option>
+      <option>content2</option>
+      <option>content3</option>
+      <option>content4</option>
+      <option>content5</option>
+      <option>content6</option>
+      <option>content7</option>
+      <option>content8</option>
+      <option>content9</option>
+      <option>content10</option>
+    </select>
+</body>

Modified: tags/Safari-538.16/Source/WebCore/ChangeLog (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/ChangeLog	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/ChangeLog	2014-02-03 23:27:19 UTC (rev 163331)
@@ -1,3 +1,38 @@
+2014-02-03  Lucas Forschler  <lforsch...@apple.com>
+
+        Merge r163329
+
+    2014-02-03  Radu Stavila  <stav...@adobe.com>
+
+            REGRESSION (r163018): Can’t scroll in <select> lists
+            https://bugs.webkit.org/show_bug.cgi?id=128090
+
+            The regression was caused by the fact that a new method scrollWithWheelEventLocation() was added
+            to RenderBox to replace the generic scroll() method for the particular case of scrolling using 
+            the mouse wheel. This turned out to be a mistake because in the case of some elements, like select lists, 
+            the scroll method was overriden and now the incorrect method was being called.
+            The solution was to remove the new method and just add two default parameters to the generic
+            scroll method.
+
+            Reviewed by Simon Fraser.
+
+            Test: fast/scrolling/scroll-select-list.html
+
+            * page/EventHandler.cpp:
+            (WebCore::scrollNode):
+            * rendering/RenderBox.cpp:
+            (WebCore::RenderBox::scroll):
+            * rendering/RenderBox.h:
+            * rendering/RenderEmbeddedObject.cpp:
+            (WebCore::RenderEmbeddedObject::scroll):
+            * rendering/RenderEmbeddedObject.h:
+            * rendering/RenderListBox.cpp:
+            (WebCore::RenderListBox::scroll):
+            * rendering/RenderListBox.h:
+            * rendering/RenderTextControlSingleLine.cpp:
+            (WebCore::RenderTextControlSingleLine::scroll):
+            * rendering/RenderTextControlSingleLine.h:
+
 2014-02-03  Krzysztof Czech  <k.cz...@samsung.com>
 
         [ATK] Expose aria-controls through ATK_RELATION_CONTROLLER_FOR

Modified: tags/Safari-538.16/Source/WebCore/page/EventHandler.cpp (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/page/EventHandler.cpp	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/page/EventHandler.cpp	2014-02-03 23:27:19 UTC (rev 163331)
@@ -281,7 +281,7 @@
     }
 }
 
-static inline bool scrollNode(float delta, ScrollGranularity granularity, ScrollDirection positiveDirection, ScrollDirection negativeDirection, Node* node, Element** stopElement, const IntPoint& absolutePoint)
+static inline bool scrollNode(float delta, ScrollGranularity granularity, ScrollDirection positiveDirection, ScrollDirection negativeDirection, Node* node, Element** stopElement, const IntPoint& wheelEventAbsolutePoint)
 {
     if (!delta)
         return false;
@@ -290,7 +290,7 @@
     RenderBox* enclosingBox = node->renderer()->enclosingBox();
     float absDelta = delta > 0 ? delta : -delta;
 
-    return enclosingBox->scrollWithWheelEventLocation(delta < 0 ? negativeDirection : positiveDirection, granularity, absDelta, enclosingBox, stopElement, absolutePoint);
+    return enclosingBox->scroll(delta < 0 ? negativeDirection : positiveDirection, granularity, absDelta, stopElement, enclosingBox, wheelEventAbsolutePoint);
 }
 
 #if (ENABLE(TOUCH_EVENTS) && !PLATFORM(IOS))

Modified: tags/Safari-538.16/Source/WebCore/rendering/RenderBox.cpp (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/rendering/RenderBox.cpp	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/rendering/RenderBox.cpp	2014-02-03 23:27:19 UTC (rev 163331)
@@ -768,7 +768,7 @@
     return false;
 }
 
-bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement)
+bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement, RenderBox* startBox, const IntPoint& wheelEventAbsolutePoint)
 {
     if (scrollLayer(direction, granularity, multiplier, stopElement))
         return true;
@@ -776,29 +776,14 @@
     if (stopElement && *stopElement && *stopElement == element())
         return true;
 
-    RenderBlock* b = containingBlock();
-    if (b && !b->isRenderView())
-        return b->scroll(direction, granularity, multiplier, stopElement);
-
-    return false;
-}
-
-bool RenderBox::scrollWithWheelEventLocation(ScrollDirection direction, ScrollGranularity granularity, float multiplier, RenderBox* startBox, Element** stopElement, IntPoint absolutePoint)
-{
-    if (scrollLayer(direction, granularity, multiplier, stopElement))
-        return true;
-
-    if (stopElement && *stopElement && *stopElement == element())
-        return true;
-
     RenderBlock* nextScrollBlock = containingBlock();
     if (nextScrollBlock && nextScrollBlock->isRenderNamedFlowThread()) {
         ASSERT(startBox);
-        nextScrollBlock = toRenderFlowThread(nextScrollBlock)->regionFromAbsolutePointAndBox(absolutePoint, *startBox);
+        nextScrollBlock = toRenderFlowThread(nextScrollBlock)->regionFromAbsolutePointAndBox(wheelEventAbsolutePoint, *startBox);
     }
 
     if (nextScrollBlock && !nextScrollBlock->isRenderView())
-        return nextScrollBlock->scrollWithWheelEventLocation(direction, granularity, multiplier, startBox, stopElement, absolutePoint);
+        return nextScrollBlock->scroll(direction, granularity, multiplier, stopElement, startBox, wheelEventAbsolutePoint);
 
     return false;
 }

Modified: tags/Safari-538.16/Source/WebCore/rendering/RenderBox.h (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/rendering/RenderBox.h	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/rendering/RenderBox.h	2014-02-03 23:27:19 UTC (rev 163331)
@@ -452,8 +452,7 @@
     int horizontalScrollbarHeight() const;
     int instrinsicScrollbarLogicalWidth() const;
     int scrollbarLogicalHeight() const { return style().isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); }
-    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0);
-    virtual bool scrollWithWheelEventLocation(ScrollDirection, ScrollGranularity, float multiplier, RenderBox* startBox, Element** stopElement, IntPoint absolutePoint);
+    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint());
     virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0);
     bool canBeScrolledAndHasScrollableArea() const;
     virtual bool canBeProgramaticallyScrolled() const;

Modified: tags/Safari-538.16/Source/WebCore/rendering/RenderEmbeddedObject.cpp (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2014-02-03 23:27:19 UTC (rev 163331)
@@ -567,7 +567,7 @@
     return true;
 }
 
-bool RenderEmbeddedObject::scroll(ScrollDirection direction, ScrollGranularity granularity, float, Element**)
+bool RenderEmbeddedObject::scroll(ScrollDirection direction, ScrollGranularity granularity, float, Element**, RenderBox*, const IntPoint&)
 {
     if (!widget() || !widget()->isPluginViewBase())
         return false;

Modified: tags/Safari-538.16/Source/WebCore/rendering/RenderEmbeddedObject.h (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/rendering/RenderEmbeddedObject.h	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/rendering/RenderEmbeddedObject.h	2014-02-03 23:27:19 UTC (rev 163331)
@@ -80,7 +80,7 @@
 
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override final;
 
-    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier, Element** stopElement) override final;
+    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint()) override final;
     virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier, Element** stopElement) override final;
 
     void setUnavailablePluginIndicatorIsPressed(bool);

Modified: tags/Safari-538.16/Source/WebCore/rendering/RenderListBox.cpp (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/rendering/RenderListBox.cpp	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/rendering/RenderListBox.cpp	2014-02-03 23:27:19 UTC (rev 163331)
@@ -592,7 +592,7 @@
     return index >= m_indexOffset && index < m_indexOffset + numVisibleItems();
 }
 
-bool RenderListBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element**)
+bool RenderListBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element**, RenderBox*, const IntPoint&)
 {
     return ScrollableArea::scroll(direction, granularity, multiplier);
 }

Modified: tags/Safari-538.16/Source/WebCore/rendering/RenderListBox.h (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/rendering/RenderListBox.h	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/rendering/RenderListBox.h	2014-02-03 23:27:19 UTC (rev 163331)
@@ -74,7 +74,7 @@
 
     virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& locationInContainer, const LayoutPoint& accumulatedOffset) override;
 
-    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) override;
+    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint()) override;
     virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) override;
 
     virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const override;

Modified: tags/Safari-538.16/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2014-02-03 23:27:19 UTC (rev 163331)
@@ -460,7 +460,7 @@
         innerTextElement()->setScrollTop(newTop);
 }
 
-bool RenderTextControlSingleLine::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement)
+bool RenderTextControlSingleLine::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement, RenderBox* startBox, const IntPoint& wheelEventAbsolutePoint)
 {
     RenderTextControlInnerBlock* renderer = innerTextElement()->renderer();
     if (!renderer)
@@ -468,7 +468,7 @@
     RenderLayer* layer = renderer->layer();
     if (layer && layer->scroll(direction, granularity, multiplier))
         return true;
-    return RenderBlockFlow::scroll(direction, granularity, multiplier, stopElement);
+    return RenderBlockFlow::scroll(direction, granularity, multiplier, stopElement, startBox, wheelEventAbsolutePoint);
 }
 
 bool RenderTextControlSingleLine::logicalScroll(ScrollLogicalDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement)

Modified: tags/Safari-538.16/Source/WebCore/rendering/RenderTextControlSingleLine.h (163330 => 163331)


--- tags/Safari-538.16/Source/WebCore/rendering/RenderTextControlSingleLine.h	2014-02-03 23:12:11 UTC (rev 163330)
+++ tags/Safari-538.16/Source/WebCore/rendering/RenderTextControlSingleLine.h	2014-02-03 23:27:19 UTC (rev 163331)
@@ -69,7 +69,7 @@
     virtual int scrollHeight() const override;
     virtual void setScrollLeft(int) override;
     virtual void setScrollTop(int) override;
-    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) override final;
+    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint()) override final;
     virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) override final;
 
     int textBlockWidth() const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to