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

Issue 2376453004: Stash ComputedStyles on new HeapHashMap on Document. (Closed)

Created:
4 years, 2 months ago by nainar
Modified:
4 years, 2 months ago
Reviewers:
meade_UTC10, esprehn
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, Bugs Nash, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stash ComputedStyles on new HeapHashMap on Document. This patch stashes ComputedStyles on new HeapHashMap on Document and adds relevant getters/setters. In Document::updateStyle, we clear space assigned after we are done with Style resolution and Layout Tree Construcion phase. The patch then adds an entry on this map in Element::recalcOwnStyle and reads this entry in Element::rebuildLayoutTree. Pair programmed with bugsnash@ BUG=595137 Committed: https://crrev.com/0e000934cd50d42e30d776ec50fb976f9f68b59c Cr-Commit-Position: refs/heads/master@{#423088}

Patch Set 1 #

Patch Set 2 : Replace takeNonAttachedStyle with getNonAttachedStyle and clear the HashMap at the end of layout tr… #

Patch Set 3 : Remove unused functions and reserve capacity for HeapHashMap at start of Document::updateStyle() #

Patch Set 4 : Add Timeout expectation on all platforms for imported/wpt/quirks-mode/unitless-length.html as a pla… #

Patch Set 5 : CL for src perf tryjob to run blink_perf.svg benchmark on all platform(s) #

Total comments: 6

Patch Set 6 : Post Elliott's review #

Patch Set 7 : Post Elliott's review #

Total comments: 12

Patch Set 8 : Post LGTM with nits changes #

Total comments: 6

Patch Set 9 : Post LGTM with nits changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -8 lines) Patch
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 4 chunks +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -6 lines 0 comments Download

Messages

Total messages: 48 (36 generated)
nainar
meade@, PTAL for a first pass through. ccing bugsnash@ since they are on leave.
4 years, 2 months ago (2016-10-04 14:30:20 UTC) #14
nainar
Hi esprehn@, There is currently one test timing out - imported/wpt/quirks-mode/unitless-length.html. I am marking it ...
4 years, 2 months ago (2016-10-04 23:35:02 UTC) #20
nainar
CL for src perf tryjob to run blink_perf.svg benchmark on all platform(s)
4 years, 2 months ago (2016-10-05 00:15:57 UTC) #21
esprehn
Your reserveInitialCapacity is causing us to make an ever bigger hash map in every call ...
4 years, 2 months ago (2016-10-05 01:04:25 UTC) #25
nainar
esprehn@ Made the changes, PTAL? Thanks! https://codereview.chromium.org/2376453004/diff/80001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2376453004/diff/80001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1261 third_party/WebKit/Source/core/dom/Document.cpp:1261: void Document::clear() { ...
4 years, 2 months ago (2016-10-05 02:00:01 UTC) #30
esprehn
lgtm w/ nits fixed. https://codereview.chromium.org/2376453004/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2376453004/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1254 third_party/WebKit/Source/core/dom/Document.cpp:1254: m_nonAttachedStyle.set(element, computedStyle); &element https://codereview.chromium.org/2376453004/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1258 third_party/WebKit/Source/core/dom/Document.cpp:1258: ...
4 years, 2 months ago (2016-10-05 02:17:40 UTC) #33
nainar
Made the changes. Thank you for the review Elliott! :) https://codereview.chromium.org/2376453004/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2376453004/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1254 ...
4 years, 2 months ago (2016-10-05 03:32:37 UTC) #36
esprehn
https://codereview.chromium.org/2376453004/diff/140001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2376453004/diff/140001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1258 third_party/WebKit/Source/core/dom/Document.cpp:1258: return m_nonAttachedStyle.get(&element); .get() https://codereview.chromium.org/2376453004/diff/140001/third_party/WebKit/Source/core/dom/Document.h File third_party/WebKit/Source/core/dom/Document.h (right): https://codereview.chromium.org/2376453004/diff/140001/third_party/WebKit/Source/core/dom/Document.h#newcode332 third_party/WebKit/Source/core/dom/Document.h:332: ...
4 years, 2 months ago (2016-10-05 03:37:22 UTC) #37
nainar
Made all the changes. Confirmed with meade@ that it is OK to land. https://codereview.chromium.org/2376453004/diff/140001/third_party/WebKit/Source/core/dom/Document.cpp File ...
4 years, 2 months ago (2016-10-05 04:33:12 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2376453004/160001
4 years, 2 months ago (2016-10-05 05:04:38 UTC) #44
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 2 months ago (2016-10-05 06:28:10 UTC) #45
commit-bot: I haz the power
4 years, 2 months ago (2016-10-05 06:29:51 UTC) #47
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/0e000934cd50d42e30d776ec50fb976f9f68b59c
Cr-Commit-Position: refs/heads/master@{#423088}

Powered by Google App Engine
This is Rietveld 408576698