Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Issue 1025213002: Begin tracking why layout is invalidated (Closed)

Created:
5 years, 9 months ago by pdr.
Modified:
5 years, 8 months ago
CC:
aandrey+blink_chromium.org, apavlov+blink_chromium.org, blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-rendering, caseq+blink_chromium.org, devtools-reviews_chromium.org, dglazkov+blink, Dominik Röttsches, dshwang, krit, eae+blinkwatch, ed+blinkwatch_opera.com, eustas+blink_chromium.org, f(malita), fs, gyuyoung.kim_webkit.org, jchaffraix+rendering, jfernandez, kouhei+svg_chromium.org, kozyatinskiy+blink_chromium.org, leviw+renderwatch, loislo+blink_chromium.org, lushnikov+blink_chromium.org, malch+blink_chromium.org, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, pfeldman+blink_chromium.org, Manuel Rego, rwlbuis, Stephen Chennney, sergeyv+blink_chromium.org, sof, slimming-paint-reviews_chromium.org, svillar, yurys+blink_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Begin tracking why layout is invalidated This is the first of a few patches to track the reasons for calls to LayoutObject::setNeedsLayout in order to improve the causes shown in devtools. This patch adds invalidation reasons to most calls of setNeedsLayout. Future patches will remove Unknown causes and track additional layout invalidations (e.g., positioned layout movement). Screenshot: http://pr.gg/changeCanvasSize.png BUG=410701 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192989

Patch Set 1 #

Total comments: 18

Patch Set 2 : Update per reviewer comments, only emit trace event on the first call to setNeedsLayout #

Patch Set 3 : Rebase #

Patch Set 4 : Instrument SubtreeLayoutScope::setNeedsLayout #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -142 lines) Patch
M LayoutTests/inspector/tracing/timeline-layout-with-invalidations-expected.txt View 4 chunks +4 lines, -4 lines 0 comments Download
M LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations-expected.txt View 3 chunks +3 lines, -3 lines 0 comments Download
M LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations-on-deleted-node-expected.txt View 1 5 chunks +5 lines, -5 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 5 chunks +6 lines, -6 lines 0 comments Download
M Source/core/frame/LocalFrame.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLFrameSetElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLInputElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLTableColElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLTextAreaElement.cpp View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/html/forms/NumberInputType.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/forms/RangeInputType.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/shadow/SliderThumbElement.cpp View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/inspector/InspectorTraceEvents.h View 1 2 3 4 1 chunk +44 lines, -1 line 0 comments Download
M Source/core/inspector/InspectorTraceEvents.cpp View 1 2 3 4 1 chunk +37 lines, -1 line 0 comments Download
M Source/core/layout/LayoutBlock.cpp View 1 2 3 4 6 chunks +10 lines, -10 lines 0 comments Download
M Source/core/layout/LayoutBlockFlow.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutBlockFlowLine.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutBox.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutCounter.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutFieldset.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutFlowThread.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutFrameSet.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutFullScreen.cpp View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M Source/core/layout/LayoutGrid.cpp View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M Source/core/layout/LayoutHTMLCanvas.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutImage.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutInline.cpp View 1 2 3 4 4 chunks +6 lines, -6 lines 0 comments Download
M Source/core/layout/LayoutListItem.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutListMarker.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutMenuList.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutMultiColumnFlowThread.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutObject.h View 1 2 3 4 4 chunks +15 lines, -15 lines 0 comments Download
M Source/core/layout/LayoutObject.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutObjectChildList.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutReplaced.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutRubyBase.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutTable.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutTable.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutTableCell.cpp View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M Source/core/layout/LayoutTableCol.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutTableSection.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutText.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutTextControlSingleLine.cpp View 1 2 3 4 5 chunks +10 lines, -10 lines 0 comments Download
M Source/core/layout/LayoutVideo.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/SubtreeLayoutScope.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/layout/SubtreeLayoutScope.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/TextAutosizer.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGInlineText.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/svg/LayoutSVGResourceContainer.cpp View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGRoot.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/svg/SVGLayoutSupport.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/svg/SVGClipPathElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGFilterElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGGradientElement.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGMarkerElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGMaskElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPatternElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGSVGElement.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (4 generated)
pdr.
5 years, 9 months ago (2015-03-23 03:38:50 UTC) #2
kouhei (in TOK)
lgtm
5 years, 9 months ago (2015-03-23 04:24:19 UTC) #3
Erik Dahlström (inactive)
https://codereview.chromium.org/1025213002/diff/1/Source/core/svg/SVGClipPathElement.cpp File Source/core/svg/SVGClipPathElement.cpp (right): https://codereview.chromium.org/1025213002/diff/1/Source/core/svg/SVGClipPathElement.cpp#newcode67 Source/core/svg/SVGClipPathElement.cpp:67: object->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::Unknown); Should be LayoutInvalidationReason::ChildChanged, no?
5 years, 9 months ago (2015-03-23 09:17:17 UTC) #5
esprehn
I have some concerns that if you go through an n^2 layout (which is pretty ...
5 years, 9 months ago (2015-03-23 20:19:44 UTC) #6
pdr.
Thanks for the reviews! Updated. https://codereview.chromium.org/1025213002/diff/1/Source/core/layout/LayoutBlock.cpp File Source/core/layout/LayoutBlock.cpp (right): https://codereview.chromium.org/1025213002/diff/1/Source/core/layout/LayoutBlock.cpp#newcode1733 Source/core/layout/LayoutBlock.cpp:1733: r->setNeedsLayout(LayoutInvalidationReason::AncestorMoved, MarkOnlyThis); On 2015/03/23 ...
5 years, 9 months ago (2015-03-24 03:56:19 UTC) #7
pdr.
Ping
5 years, 9 months ago (2015-03-26 17:45:47 UTC) #8
pdr.
On 2015/03/24 at 03:56:19, pdr wrote: > https://codereview.chromium.org/1025213002/diff/1/Source/core/layout/SubtreeLayoutScope.cpp#newcode58 > Source/core/layout/SubtreeLayoutScope.cpp:58: descendant->setNeedsLayout(LayoutInvalidationReason::Unknown, MarkContainerChain, this); > I'll ...
5 years, 8 months ago (2015-03-29 00:59:53 UTC) #9
esprehn
On 2015/03/29 at 00:59:53, pdr wrote: > On 2015/03/24 at 03:56:19, pdr wrote: > > ...
5 years, 8 months ago (2015-03-29 04:40:50 UTC) #10
esprehn
lgtm, I'm not a huge fan of this being the first argument since it pushes ...
5 years, 8 months ago (2015-04-01 04:40:23 UTC) #11
pdr.
On 2015/04/01 at 04:40:23, esprehn wrote: > lgtm, I'm not a huge fan of this ...
5 years, 8 months ago (2015-04-02 01:49:24 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1025213002/80001
5 years, 8 months ago (2015-04-02 01:49:47 UTC) #15
commit-bot: I haz the power
5 years, 8 months ago (2015-04-02 03:34:16 UTC) #16
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192989

Powered by Google App Engine
This is Rietveld 408576698