Changeset 163329 in webkit
- Timestamp:
- Feb 3, 2014 3:10:31 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r163328 r163329 1 2014-02-03 Radu Stavila <stavila@adobe.com> 2 3 REGRESSION (r163018): Can’t scroll in <select> lists 4 https://bugs.webkit.org/show_bug.cgi?id=128090 5 6 New test validates scrolling using the mouse wheel inside a select list. 7 This test is for the moment added as a ImageOnlyFailure expectation 8 because the current implementation of eventSender cannot simulate mouse wheel events. 9 10 Reviewed by Simon Fraser. 11 12 * TestExpectations: 13 * fast/scrolling/scroll-select-list-expected.html: Added. 14 * fast/scrolling/scroll-select-list.html: Added. 15 1 16 2014-02-03 Oliver Hunt <oliver@apple.com> 2 17 -
trunk/LayoutTests/TestExpectations
r163058 r163329 2 2 # 3 3 # See http://trac.webkit.org/wiki/TestExpectations for more information on this file. 4 5 # Incomplete implementation of eventSender causes this test to fail 6 webkit.org/b/42194 fast/scrolling/scroll-select-list.html [ ImageOnlyFailure ] 4 7 5 8 # pending functional patch and per-port verification -
trunk/Source/WebCore/ChangeLog
r163320 r163329 1 2014-02-03 Radu Stavila <stavila@adobe.com> 2 3 REGRESSION (r163018): Can’t scroll in <select> lists 4 https://bugs.webkit.org/show_bug.cgi?id=128090 5 6 The regression was caused by the fact that a new method scrollWithWheelEventLocation() was added 7 to RenderBox to replace the generic scroll() method for the particular case of scrolling using 8 the mouse wheel. This turned out to be a mistake because in the case of some elements, like select lists, 9 the scroll method was overriden and now the incorrect method was being called. 10 The solution was to remove the new method and just add two default parameters to the generic 11 scroll method. 12 13 Reviewed by Simon Fraser. 14 15 Test: fast/scrolling/scroll-select-list.html 16 17 * page/EventHandler.cpp: 18 (WebCore::scrollNode): 19 * rendering/RenderBox.cpp: 20 (WebCore::RenderBox::scroll): 21 * rendering/RenderBox.h: 22 * rendering/RenderEmbeddedObject.cpp: 23 (WebCore::RenderEmbeddedObject::scroll): 24 * rendering/RenderEmbeddedObject.h: 25 * rendering/RenderListBox.cpp: 26 (WebCore::RenderListBox::scroll): 27 * rendering/RenderListBox.h: 28 * rendering/RenderTextControlSingleLine.cpp: 29 (WebCore::RenderTextControlSingleLine::scroll): 30 * rendering/RenderTextControlSingleLine.h: 31 1 32 2014-02-03 Chris Fleizach <cfleizach@apple.com> 2 33 -
trunk/Source/WebCore/page/EventHandler.cpp
r163232 r163329 282 282 } 283 283 284 static inline bool scrollNode(float delta, ScrollGranularity granularity, ScrollDirection positiveDirection, ScrollDirection negativeDirection, Node* node, Element** stopElement, const IntPoint& absolutePoint)284 static inline bool scrollNode(float delta, ScrollGranularity granularity, ScrollDirection positiveDirection, ScrollDirection negativeDirection, Node* node, Element** stopElement, const IntPoint& wheelEventAbsolutePoint) 285 285 { 286 286 if (!delta) … … 291 291 float absDelta = delta > 0 ? delta : -delta; 292 292 293 return enclosingBox->scroll WithWheelEventLocation(delta < 0 ? negativeDirection : positiveDirection, granularity, absDelta, enclosingBox, stopElement, absolutePoint);293 return enclosingBox->scroll(delta < 0 ? negativeDirection : positiveDirection, granularity, absDelta, stopElement, enclosingBox, wheelEventAbsolutePoint); 294 294 } 295 295 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r163190 r163329 769 769 } 770 770 771 bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement) 772 { 773 if (scrollLayer(direction, granularity, multiplier, stopElement)) 774 return true; 775 776 if (stopElement && *stopElement && *stopElement == element()) 777 return true; 778 779 RenderBlock* b = containingBlock(); 780 if (b && !b->isRenderView()) 781 return b->scroll(direction, granularity, multiplier, stopElement); 782 783 return false; 784 } 785 786 bool RenderBox::scrollWithWheelEventLocation(ScrollDirection direction, ScrollGranularity granularity, float multiplier, RenderBox* startBox, Element** stopElement, IntPoint absolutePoint) 771 bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement, RenderBox* startBox, const IntPoint& wheelEventAbsolutePoint) 787 772 { 788 773 if (scrollLayer(direction, granularity, multiplier, stopElement)) … … 795 780 if (nextScrollBlock && nextScrollBlock->isRenderNamedFlowThread()) { 796 781 ASSERT(startBox); 797 nextScrollBlock = toRenderFlowThread(nextScrollBlock)->regionFromAbsolutePointAndBox( absolutePoint, *startBox);782 nextScrollBlock = toRenderFlowThread(nextScrollBlock)->regionFromAbsolutePointAndBox(wheelEventAbsolutePoint, *startBox); 798 783 } 799 784 800 785 if (nextScrollBlock && !nextScrollBlock->isRenderView()) 801 return nextScrollBlock->scroll WithWheelEventLocation(direction, granularity, multiplier, startBox, stopElement, absolutePoint);786 return nextScrollBlock->scroll(direction, granularity, multiplier, stopElement, startBox, wheelEventAbsolutePoint); 802 787 803 788 return false; -
trunk/Source/WebCore/rendering/RenderBox.h
r163018 r163329 453 453 int instrinsicScrollbarLogicalWidth() const; 454 454 int scrollbarLogicalHeight() const { return style().isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); } 455 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0); 456 virtual bool scrollWithWheelEventLocation(ScrollDirection, ScrollGranularity, float multiplier, RenderBox* startBox, Element** stopElement, IntPoint absolutePoint); 455 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint()); 457 456 virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0); 458 457 bool canBeScrolledAndHasScrollableArea() const; -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp
r163079 r163329 568 568 } 569 569 570 bool RenderEmbeddedObject::scroll(ScrollDirection direction, ScrollGranularity granularity, float, Element** )570 bool RenderEmbeddedObject::scroll(ScrollDirection direction, ScrollGranularity granularity, float, Element**, RenderBox*, const IntPoint&) 571 571 { 572 572 if (!widget() || !widget()->isPluginViewBase()) -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.h
r163079 r163329 81 81 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override final; 82 82 83 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier , Element** stopElement) override final;83 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint()) override final; 84 84 virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier, Element** stopElement) override final; 85 85 -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r162795 r163329 593 593 } 594 594 595 bool RenderListBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** )595 bool RenderListBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element**, RenderBox*, const IntPoint&) 596 596 { 597 597 return ScrollableArea::scroll(direction, granularity, multiplier); -
trunk/Source/WebCore/rendering/RenderListBox.h
r162663 r163329 75 75 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& locationInContainer, const LayoutPoint& accumulatedOffset) override; 76 76 77 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) override;77 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint()) override; 78 78 virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) override; 79 79 -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
r162791 r163329 461 461 } 462 462 463 bool RenderTextControlSingleLine::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement )463 bool RenderTextControlSingleLine::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement, RenderBox* startBox, const IntPoint& wheelEventAbsolutePoint) 464 464 { 465 465 RenderTextControlInnerBlock* renderer = innerTextElement()->renderer(); … … 469 469 if (layer && layer->scroll(direction, granularity, multiplier)) 470 470 return true; 471 return RenderBlockFlow::scroll(direction, granularity, multiplier, stopElement );471 return RenderBlockFlow::scroll(direction, granularity, multiplier, stopElement, startBox, wheelEventAbsolutePoint); 472 472 } 473 473 -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h
r162791 r163329 70 70 virtual void setScrollLeft(int) override; 71 71 virtual void setScrollTop(int) override; 72 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) override final;72 virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = nullptr, RenderBox* startBox = nullptr, const IntPoint& wheelEventAbsolutePoint = IntPoint()) override final; 73 73 virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0) override final; 74 74
Note: See TracChangeset
for help on using the changeset viewer.