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

Issue 1839803007: Guard Element and getComputedStyle methods that force a layout with inActiveDocument. (Closed)

Created:
4 years, 8 months ago by esprehn
Modified:
4 years, 8 months ago
Reviewers:
dglazkov, ojan
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Guard Element and getComputedStyle methods that force a layout with inActiveDocument. This patch makes touching an Element property that would normally force a layout not do it when the element is not in the document since the layout of the document has no impact on the element. I also fixed getComputedStyle. Note that this patch does not attempt to fix subclasses of Element, for example some canvas properties may force layouts still. This just fixes the core dom Element API, which is most of the usage I found. I added stack traces and observed forced layouts from getting innerText on google image search, getBoundingClient rect in most polymer apps, and offsetTop on various news sites like the NYT. This patch removes all of these forced layouts. BUG=585663 Committed: https://crrev.com/f6ae8a23e7de1a6199c1deeaef9041f9cc7caab9 Cr-Commit-Position: refs/heads/master@{#383928}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -28 lines) Patch
A third_party/WebKit/LayoutTests/fast/dom/forced-layout-only-in-document.html View 1 chunk +59 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/dom/forced-layout-only-in-document-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp View 1 chunk +1 line, -1 line 1 comment Download
M third_party/WebKit/Source/core/dom/Document.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 25 chunks +26 lines, -25 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839803007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839803007/1
4 years, 8 months ago (2016-03-30 00:36:35 UTC) #2
esprehn
4 years, 8 months ago (2016-03-30 01:05:09 UTC) #4
ojan
lgtm https://codereview.chromium.org/1839803007/diff/1/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp File third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp (right): https://codereview.chromium.org/1839803007/diff/1/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp#newcode570 third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp:570: styledNode = this->styledNode(); Not relevant to this patch, ...
4 years, 8 months ago (2016-03-30 01:10:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839803007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839803007/1
4 years, 8 months ago (2016-03-30 03:05:56 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_TIMED_OUT, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/195921) win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_TIMED_OUT, ...
4 years, 8 months ago (2016-03-30 06:46:47 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839803007/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839803007/1
4 years, 8 months ago (2016-03-30 06:50:56 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-03-30 08:11:58 UTC) #14
commit-bot: I haz the power
4 years, 8 months ago (2016-03-30 08:12:55 UTC) #16
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/f6ae8a23e7de1a6199c1deeaef9041f9cc7caab9
Cr-Commit-Position: refs/heads/master@{#383928}

Powered by Google App Engine
This is Rietveld 408576698