Changeset 198560 in webkit
- Timestamp:
- Mar 22, 2016 3:15:45 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r198558 r198560 1 2016-03-22 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [RTL Scrollbars] Position: absolute divs are covered by vertical scrollbar 4 https://bugs.webkit.org/show_bug.cgi?id=155533 5 6 Reviewed by Darin Adler. 7 8 * TestExpectations: 9 * fast/scrolling/rtl-scrollbars-positioning-expected.html: Added. 10 * fast/scrolling/rtl-scrollbars-positioning.html: Added. 11 1 12 2016-03-22 Ryan Haddad <ryanhaddad@apple.com> 2 13 -
trunk/LayoutTests/TestExpectations
r198551 r198560 1014 1014 fast/scrolling/rtl-scrollbars-elementFromPoint-static.html [ Failure ] 1015 1015 fast/scrolling/rtl-scrollbars-iframe-scrolled.html [ ImageOnlyFailure ] 1016 fast/scrolling/rtl-scrollbars-positioning.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r198553 r198560 1 2016-03-22 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [RTL Scrollbars] Position: absolute divs are covered by vertical scrollbar 4 https://bugs.webkit.org/show_bug.cgi?id=155533 5 6 Reviewed by Darin Adler. 7 8 This patch changes the behavior of position: absolute elements when their 9 containing block has overflow: scroll in RTL scrollbar mode. Previously, we 10 were only adjusting the overflow calculation for such elements (but not 11 their position calculation). This patch updates the position calculation, 12 which automatically makes the overflow calculation work propertly, so the 13 old calculation is no longer necessary. 14 15 This patch also updates iframes to appropriately move their dirty rects 16 and their painting CTM by the scrollbar width when traversing frame 17 boundaries. This fixes all our existing RTL scrollbar RTL tests. 18 19 The RTL scrollbar tests are only marked as passing on certain OSes, so these 20 tests are transitioning from failing to passing in that other repository. 21 22 Test: fast/scrolling/rtl-scrollbars-positioning.html 23 fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html 24 fast/scrolling/rtl-scrollbars-overflow-position-absolute.html 25 fast/scrolling/rtl-scrollbars-iframe-offset.html 26 fast/scrolling/rtl-scrollbars-iframe-position-absolute.html 27 fast/scrolling/rtl-scrollbars-iframe-scrolled.html 28 fast/scrolling/rtl-scrollbars-iframe.html 29 30 * platform/ScrollView.cpp: 31 (WebCore::ScrollView::paint): 32 (WebCore::ScrollView::locationOfContents): 33 * platform/ScrollView.h: 34 * platform/graphics/ca/GraphicsLayerCA.cpp: 35 (WebCore::GraphicsLayerCA::repaintLayerDirtyRects): 36 * rendering/RenderBlock.cpp: 37 (WebCore::RenderBlock::addOverflowFromPositionedObjects): 38 * rendering/RenderBox.cpp: 39 (WebCore::RenderBox::computePositionedLogicalWidth): 40 * rendering/RenderView.cpp: 41 (WebCore::RenderView::repaintViewRectangle): 42 1 43 2016-03-22 Antti Koivisto <antti@apple.com> 2 44 -
trunk/Source/WebCore/platform/ScrollView.cpp
r198455 r198560 1223 1223 IntRect documentDirtyRect = rect; 1224 1224 if (!paintsEntireContents()) { 1225 IntRect visibleAreaWithoutScrollbars(location (), visibleContentRect(LegacyIOSDocumentVisibleRect).size());1225 IntRect visibleAreaWithoutScrollbars(locationOfContents(), visibleContentRect(LegacyIOSDocumentVisibleRect).size()); 1226 1226 documentDirtyRect.intersect(visibleAreaWithoutScrollbars); 1227 1227 } … … 1230 1230 GraphicsContextStateSaver stateSaver(context); 1231 1231 1232 context.translate(x(), y()); 1233 documentDirtyRect.moveBy(-location()); 1232 IntPoint locationOfContents = this->locationOfContents(); 1233 context.translate(locationOfContents.x(), locationOfContents.y()); 1234 documentDirtyRect.moveBy(-locationOfContents); 1234 1235 1235 1236 if (!paintsEntireContents()) { … … 1499 1500 } 1500 1501 1502 IntPoint ScrollView::locationOfContents() const 1503 { 1504 IntPoint result = location(); 1505 if (verticalScrollbarIsOnLeft() && m_verticalScrollbar) 1506 result.move(m_verticalScrollbar->occupiedWidth(), 0); 1507 return result; 1508 } 1509 1501 1510 #if !PLATFORM(COCOA) 1502 1511 -
trunk/Source/WebCore/platform/ScrollView.h
r198502 r198560 74 74 virtual void notifyPageThatContentAreaWillPaint() const; 75 75 76 IntPoint locationOfContents() const; 77 76 78 // NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea. 77 79 virtual void scrollTo(const ScrollPosition&); -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r198189 r198560 2676 2676 } 2677 2677 2678 if (!m_dirtyRects.size()) 2679 return; 2680 2681 for (size_t i = 0; i < m_dirtyRects.size(); ++i) 2682 m_layer->setNeedsDisplayInRect(m_dirtyRects[i]); 2678 for (auto& dirtyRect : m_dirtyRects) 2679 m_layer->setNeedsDisplayInRect(dirtyRect); 2683 2680 2684 2681 m_dirtyRects.clear(); -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r198074 r198560 1064 1064 1065 1065 // Fixed positioned elements don't contribute to layout overflow, since they don't scroll with the content. 1066 if (positionedObject->style().position() != FixedPosition) { 1067 LayoutUnit x = positionedObject->x(); 1068 if (style().shouldPlaceBlockDirectionScrollbarOnLeft()) 1069 x += (style().isLeftToRightDirection() ? 1 : -1) * verticalScrollbarWidth(); 1070 addOverflowFromChild(positionedObject, LayoutSize(x, positionedObject->y())); 1071 } 1066 if (positionedObject->style().position() != FixedPosition) 1067 addOverflowFromChild(positionedObject, { positionedObject->x(), positionedObject->y() }); 1072 1068 } 1073 1069 } -
trunk/Source/WebCore/rendering/RenderBox.cpp
r198255 r198560 3523 3523 3524 3524 computedValues.m_extent += bordersPlusPadding; 3525 if (is<RenderBox>(*containerBlock)) { 3526 auto& containingBox = downcast<RenderBox>(*containerBlock); 3527 if (containingBox.layer() && containingBox.layer()->verticalScrollbarIsOnLeft()) 3528 computedValues.m_position += containingBox.verticalScrollbarWidth(); 3529 } 3525 3530 3526 3531 // Adjust logicalLeft if we need to for the flipped version of our writing mode in regions. -
trunk/Source/WebCore/rendering/RenderView.cpp
r197716 r198560 636 636 adjustedRect.moveBy(-viewRect.location()); 637 637 adjustedRect.moveBy(ownerBox->contentBoxRect().location()); 638 639 // A dirty rect in an iframe is relative to the contents of that iframe. 640 // When we traverse between parent frames and child frames, we need to make sure 641 // that the coordinate system is mapped appropriately between the iframe's contents 642 // and the Renderer that contains the iframe. This transformation must account for a 643 // left scrollbar (if one exists). 644 FrameView& frameView = this->frameView(); 645 if (frameView.verticalScrollbarIsOnLeft() && frameView.verticalScrollbar()) 646 adjustedRect.move(LayoutSize(frameView.verticalScrollbar()->occupiedWidth(), 0)); 647 638 648 ownerBox->repaintRectangle(adjustedRect); 639 649 return;
Note: See TracChangeset
for help on using the changeset viewer.