WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
21402
Add a clip in RenderView::layout to avoid doing offscreen paint
https://bugs.webkit.org/show_bug.cgi?id=21402
Summary
Add a clip in RenderView::layout to avoid doing offscreen paint
Julien Chaffraix
Reported
2008-10-06 08:39:59 PDT
Currently in RenderView.cpp, there is a FIXME about adding a clip to the LayoutState. Path forthcoming.
Attachments
Proposed fix: add a clip to the viewRect
(1.43 KB, patch)
2008-10-06 08:44 PDT
,
Julien Chaffraix
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Julien Chaffraix
Comment 1
2008-10-06 08:44:15 PDT
Created
attachment 24114
[details]
Proposed fix: add a clip to the viewRect
Eric Seidel (no email)
Comment 2
2008-10-06 14:45:16 PDT
Comment on
attachment 24114
[details]
Proposed fix: add a clip to the viewRect This one is for Hyatt.
Julien Chaffraix
Comment 3
2008-10-07 02:55:23 PDT
Comment on
attachment 24114
[details]
Proposed fix: add a clip to the viewRect As discussed with David Hyatt and Dan Bernstein, the win is odd and should be confirmed on ToT (I had done some rough testing on ToT and good experiment on an old bramch) before thinking of integrating this patch. Clearing the review flag to give me some time for performance experiments on ToT.
Ahmad Saleem
Comment 4
2023-05-08 10:26:31 PDT
I checked and we don't have FIXME in Webkit Source, which this patch was trying to modify and also this is current source:
https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderView.cpp#183
void RenderView::layout() { StackStats::LayoutCheckPoint layoutCheckPoint; if (!document().paginated()) m_pageLogicalSize = { }; if (shouldUsePrintingLayout()) { if (!m_pageLogicalSize) m_pageLogicalSize = LayoutSize(logicalWidth(), 0_lu); m_minPreferredLogicalWidth = m_pageLogicalSize->width(); m_maxPreferredLogicalWidth = m_minPreferredLogicalWidth; } // Use calcWidth/Height to get the new width/height, since this will take the full page zoom factor into account. bool relayoutChildren = !shouldUsePrintingLayout() && (width() != viewWidth() || height() != viewHeight()); if (relayoutChildren) { setChildNeedsLayout(MarkOnlyThis); for (auto& box : childrenOfType<RenderBox>(*this)) { if (box.hasRelativeLogicalHeight() || box.style().logicalHeight().isPercentOrCalculated() || box.style().logicalMinHeight().isPercentOrCalculated() || box.style().logicalMaxHeight().isPercentOrCalculated() || box.isSVGRootOrLegacySVGRoot() ) box.setChildNeedsLayout(MarkOnlyThis); } } ASSERT(!frameView().layoutContext().layoutState()); if (!needsLayout()) return; ensureLayoutState().setViewportSize(frameView().size()); LayoutStateMaintainer statePusher(*this, { }, false, valueOrDefault(m_pageLogicalSize).height(), m_pageLogicalHeightChanged); m_pageLogicalHeightChanged = false; RenderBlockFlow::layout(); #ifndef NDEBUG frameView().layoutContext().checkLayoutState(); #endif clearNeedsLayout(); } ________ Do we need anything else? Or we can close now?
Simon Fraser (smfr)
Comment 5
2023-05-08 10:48:29 PDT
I don't think we need this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug