Changeset 194210 in webkit
- Timestamp:
- Dec 16, 2015 10:56:55 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r194209 r194210 1 2015-12-16 Simon Fraser <simon.fraser@apple.com> 2 3 Fix the debug region overlays for RTL documents 4 https://bugs.webkit.org/show_bug.cgi?id=152372 5 6 Reviewed by Darin Adler. 7 8 Fix document overlays to use document coordinates when painting, which requires 9 translating the CTM, and counter-translating the dirtyRect by the scroll origin. 10 This is only non-zero for RTL documents. 11 12 While doing this, I noticed that the scroll origin was misplaced by the scrollbar 13 width when using overlay scrollbars. Fix by using occupiedWidth/Height() in 14 ScrollView::updateScrollbars(). I was not able to make a test for this change. 15 16 * page/FrameView.cpp: 17 (WebCore::FrameView::adjustViewSize): 18 * page/PageOverlay.cpp: 19 (WebCore::PageOverlay::drawRect): 20 * platform/ScrollView.cpp: 21 (WebCore::ScrollView::updateScrollbars): 22 1 23 2015-12-16 Andy Estes <aestes@apple.com> 2 24 -
trunk/Source/WebCore/page/FrameView.cpp
r194184 r194210 642 642 ScrollView::setScrollOrigin(IntPoint(-rect.x(), -rect.y()), !frame().document()->printing(), size == contentsSize()); 643 643 644 LOG (Layout, "FrameView %p adjustViewSize: unscaled document size changed to %dx%d (scaled to %dx%d)", this, renderView->unscaledDocumentRect().width(), renderView->unscaledDocumentRect().height(), size.width(), size.height());644 LOG_WITH_STREAM(Layout, stream << "FrameView " << this << " adjustViewSize: unscaled document rect changed to " << renderView->unscaledDocumentRect() << " (scaled to " << size << ")"); 645 645 646 646 setContentsSize(size); -
trunk/Source/WebCore/page/PageOverlay.cpp
r194117 r194210 179 179 180 180 GraphicsContextStateSaver stateSaver(graphicsContext); 181 182 if (m_overlayType == PageOverlay::OverlayType::Document) { 183 if (FrameView* frameView = m_page->mainFrame().view()) { 184 auto offset = frameView->scrollOrigin(); 185 graphicsContext.translate(toFloatSize(offset)); 186 paintRect.moveBy(-offset); 187 } 188 } 189 181 190 m_client.drawRect(*this, graphicsContext, paintRect); 182 191 } -
trunk/Source/WebCore/platform/ScrollView.cpp
r194184 r194210 660 660 if (hasHorizontalScrollbar != newHasHorizontalScrollbar && (hasHorizontalScrollbar || !avoidScrollbarCreation())) { 661 661 if (scrollOrigin().y() && !newHasHorizontalScrollbar) 662 ScrollableArea::setScrollOrigin(IntPoint(scrollOrigin().x(), scrollOrigin().y() - m_horizontalScrollbar-> height()));662 ScrollableArea::setScrollOrigin(IntPoint(scrollOrigin().x(), scrollOrigin().y() - m_horizontalScrollbar->occupiedHeight())); 663 663 if (m_horizontalScrollbar) 664 664 m_horizontalScrollbar->invalidate(); … … 673 673 if (hasVerticalScrollbar != newHasVerticalScrollbar && (hasVerticalScrollbar || !avoidScrollbarCreation())) { 674 674 if (scrollOrigin().x() && !newHasVerticalScrollbar) 675 ScrollableArea::setScrollOrigin(IntPoint(scrollOrigin().x() - m_verticalScrollbar-> width(), scrollOrigin().y()));675 ScrollableArea::setScrollOrigin(IntPoint(scrollOrigin().x() - m_verticalScrollbar->occupiedWidth(), scrollOrigin().y())); 676 676 if (m_verticalScrollbar) 677 677 m_verticalScrollbar->invalidate();
Note: See TracChangeset
for help on using the changeset viewer.