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

Issue 20140002: Remove minimumLayoutDelay() and associated machinery (Closed)

Created:
7 years, 4 months ago by eseidel
Modified:
6 years, 10 months ago
Reviewers:
jamesr, esprehn, ojan
CC:
blink-reviews, kenneth.christiansen, aboxhall, eae+blinkwatch, dglazkov+blink, dmazzoni, adamk+blink_chromium.org
Visibility:
Public.

Description

Remove minimumLayoutDelay() and associated machinery In the process of moving away from Blink scheduling its own layouts, it no longer makes sense to have artificial layout-avoidance checks in Blink. If the embedder asks us to layout we should layout immediately. The embedder should decide if it wants to delay posting a frame until the onload event, etc. Blink no longer waits 250ms before allowing scheduled layouts. Performance analysis: https://docs.google.com/a/chromium.org/spreadsheet/ccc?key=0AidRaO7Awc-DdGRRaWVsLWx5T0p4cUFLSUlkaEtvd2c (editable by @chromium.org) I'm separating this change out of the larger removal of the layout timer, in order to better contain the problem. All of the LayoutTest result changes appear to be progressions. The parser changes were necessary to keep javascript: urls synchronous. It turns out we weren't actually parsing them synchronously if they were loading while isLayoutTimerActive (now parserShouldYieldAgressivelyBeforeFirstLayout) was true, it just happened to be the case that the timer would never be schedule for the first 250ms. I believe if you had a page which took longer than 250ms to reach the onload event you could have ended up with a scheduled layout which would have caused incorrect behavior for javascript: urls. Now we commonly schedule layouts immediately during loading and so were always hitting this case. Our resizeEvent behavior was wrong, it just happened that the tests didn't notice as we weren't doing a layout() during the first 250ms. It's possible we could have forced a layout during the resize-count tests which would have demonstrated the previously broken behavior. The scrolling coordinator test looks like a progression to me. The scrollbars are now correctly displaying on the region. I suspect this is a bug in region code which was being tickled by our layout avoidance before. The inlineBox test similarly had the wrong placement of the bullet. The bullet isn't rendered, so it doesn't matter. Presumably we have a bug where we were leaving the bullet needing layout while dumping before. The svg-remote test also looks like a progression. Likely a result of successive layouts negotiating the size with the nested SVG more correctly? BUG=261689

Patch Set 1 #

Patch Set 2 : Explain the resize-events failures #

Patch Set 3 : Fix the javascript url failures #

Patch Set 4 : Fix one resize-count test #

Patch Set 5 : Fix other resize event test" #

Patch Set 6 : another fix #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -116 lines) Patch
M LayoutTests/accessibility/svg-remote-element-expected.txt View 1 chunk +5 lines, -5 lines 0 comments Download
M LayoutTests/fast/events/resize-events-fixed-layout.html View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M LayoutTests/fast/events/resize-events-fixed-layout-expected.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/platform/win/fast/lists/inlineBoxWrapperNullCheck-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/platform/win/scrollingcoordinator/non-fast-scrollable-region-scaled-iframe-expected.png View Binary file 0 comments Download
M LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe-expected.png View Binary file 0 comments Download
M Source/core/dom/Document.h View 1 2 15 chunks +17 lines, -21 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 5 chunks +5 lines, -39 lines 0 comments Download
M Source/core/dom/DocumentParser.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 5 chunks +13 lines, -4 lines 0 comments Download
M Source/core/html/parser/HTMLParserScheduler.cpp View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M Source/core/loader/DocumentLoader.cpp View 1 2 10 chunks +20 lines, -19 lines 0 comments Download
M Source/core/loader/DocumentWriter.cpp View 1 2 3 chunks +7 lines, -4 lines 0 comments Download
M Source/core/page/FrameView.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/page/FrameView.cpp View 5 chunks +2 lines, -11 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 chunks +10 lines, -6 lines 2 comments Download

Messages

Total messages: 11 (0 generated)
eseidel
I believe this is ready for review.
7 years, 4 months ago (2013-07-25 00:59:18 UTC) #1
eseidel
There is some perf risk for microbenchmarks to this change, as we may do more ...
7 years, 4 months ago (2013-07-25 01:07:16 UTC) #2
esprehn
LGTM This looks great, is it going to cause us to do tons more layouts ...
7 years, 4 months ago (2013-07-25 01:15:34 UTC) #3
eseidel
I should chat with TonyG. There may be an easy way to count layouts during ...
7 years, 4 months ago (2013-07-25 01:17:57 UTC) #4
tonyg
On 2013/07/25 01:17:57, eseidel wrote: > I should chat with TonyG. There may be an ...
7 years, 4 months ago (2013-07-25 01:25:00 UTC) #5
eseidel
Assuming I did this right, the data does not look very favorable. :( https://docs.google.com/a/chromium.org/spreadsheet/ccc?key=0AidRaO7Awc-DdGRRaWVsLWx5T0p4cUFLSUlkaEtvd2c#gid=1 What ...
7 years, 4 months ago (2013-07-25 07:44:56 UTC) #6
ojan
Looks like most sites are a wash or faster (??? how's that possible). The only ...
7 years, 4 months ago (2013-07-25 17:43:16 UTC) #7
jamesr
I expect this'll trash the page cyclers and may cause lots of flashes. While this ...
7 years, 4 months ago (2013-07-25 17:58:18 UTC) #8
esprehn
On 2013/07/25 17:43:16, ojan wrote: > Looks like most sites are a wash or faster ...
7 years, 4 months ago (2013-07-25 17:58:36 UTC) #9
jamesr
On 2013/07/25 07:44:56, eseidel wrote: > Assuming I did this right, the data does not ...
7 years, 4 months ago (2013-07-25 18:00:55 UTC) #10
eseidel
6 years, 10 months ago (2014-02-07 01:23:12 UTC) #11

Powered by Google App Engine
This is Rietveld 408576698