Changeset 249222 in webkit
- Timestamp:
- Aug 28, 2019, 3:32:01 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
rendering/RenderBox.h (modified) (1 diff)
-
rendering/RenderLayer.cpp (modified) (2 diffs)
-
rendering/RenderView.cpp (modified) (1 diff)
-
rendering/RenderView.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r249218 r249222 1 2019-08-28 Simon Fraser <simon.fraser@apple.com> 2 3 Devirtualize RenderBox::visualOverflowRect() 4 https://bugs.webkit.org/show_bug.cgi?id=201231 5 6 Reviewed by Zalan Bujtas. 7 8 The only override of RenderBox::visualOverflowRect() was in RenderView, for "paintsEntireContents" views, and as 9 far as I can tell this is not necessary. visualOverflowRect() is hot when called from RenderLayer::localBoundingBox() -- 10 this shows in profiles when scrolling large patch reviews, so making it non-virtual is a performance enhancement. 11 12 RenderLayer::localBoundingBox() can also just call visualOverflowRect(), since that returns borderBoxRect() 13 when there is no overflow. 14 15 * rendering/RenderBox.h: 16 (WebCore::RenderBox::visualOverflowRect const): 17 * rendering/RenderLayer.cpp: 18 (WebCore::performOverlapTests): Minor optimization to avoid a call to boundingBox(). 19 (WebCore::RenderLayer::calculateClipRects const): 20 * rendering/RenderView.cpp: 21 (WebCore::RenderView::visualOverflowRect const): Deleted. 22 * rendering/RenderView.h: 23 1 24 2019-08-28 Austin Eng <enga@chromium.org> 2 25 -
trunk/Source/WebCore/rendering/RenderBox.h
r247256 r249222 192 192 LayoutUnit logicalRightLayoutOverflow() const { return style().isHorizontalWritingMode() ? layoutOverflowRect().maxX() : layoutOverflowRect().maxY(); } 193 193 194 virtualLayoutRect visualOverflowRect() const { return m_overflow ? m_overflow->visualOverflowRect() : borderBoxRect(); }194 LayoutRect visualOverflowRect() const { return m_overflow ? m_overflow->visualOverflowRect() : borderBoxRect(); } 195 195 LayoutUnit logicalLeftVisualOverflow() const { return style().isHorizontalWritingMode() ? visualOverflowRect().x() : visualOverflowRect().y(); } 196 196 LayoutUnit logicalRightVisualOverflow() const { return style().isHorizontalWritingMode() ? visualOverflowRect().maxX() : visualOverflowRect().maxY(); } -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r249120 r249222 4095 4095 static void performOverlapTests(OverlapTestRequestMap& overlapTestRequests, const RenderLayer* rootLayer, const RenderLayer* layer) 4096 4096 { 4097 if (overlapTestRequests.isEmpty()) 4098 return; 4099 4097 4100 Vector<OverlapTestRequestClient*> overlappedRequestClients; 4098 4101 LayoutRect boundingBox = layer->boundingBox(rootLayer, layer->offsetFromAncestor(rootLayer)); … … 5935 5938 result = box->maskClipRect(LayoutPoint()); 5936 5939 box->flipForWritingMode(result); // The mask clip rect is in physical coordinates, so we have to flip, since localBoundingBox is not. 5937 } else { 5938 LayoutRect bbox = box->borderBoxRect(); 5939 result = bbox; 5940 LayoutRect overflowRect = box->visualOverflowRect(); 5941 if (bbox != overflowRect) 5942 result.unite(overflowRect); 5943 } 5940 } else 5941 result = box->visualOverflowRect(); 5944 5942 } 5945 5943 return result; -
trunk/Source/WebCore/rendering/RenderView.cpp
r248846 r249222 515 515 } 516 516 517 LayoutRect RenderView::visualOverflowRect() const518 {519 if (frameView().paintsEntireContents())520 return layoutOverflowRect();521 522 return RenderBlockFlow::visualOverflowRect();523 }524 525 517 Optional<LayoutRect> RenderView::computeVisibleRectInContainer(const LayoutRect& rect, const RenderLayerModelObject* container, VisibleRectContext context) const 526 518 { -
trunk/Source/WebCore/rendering/RenderView.h
r245716 r249222 69 69 FrameView& frameView() const { return m_frameView; } 70 70 71 LayoutRect visualOverflowRect() const override;72 71 Optional<LayoutRect> computeVisibleRectInContainer(const LayoutRect&, const RenderLayerModelObject* container, VisibleRectContext) const override; 73 72 void repaintRootContents();
Note:
See TracChangeset
for help on using the changeset viewer.