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

Issue 202633006: Use an unsigned of flags in ElementRareData (Closed)

Created:
6 years, 9 months ago by esprehn
Modified:
6 years, 9 months ago
CC:
blink-reviews, ed+blinkwatch_opera.com, krit, sof, eae+blinkwatch, fs, dglazkov+blink, f(malita), adamk+blink_chromium.org, gyuyoung.kim_webkit.org, Inactive, Stephen Chennney, kouhei+svg_chromium.org, pdr., rwlbuis
Visibility:
Public.

Description

Use an unsigned of flags in ElementRareData Instead of exposing tons of getters and setters on Element we can use an enum of flags and treat the bits inside ElementRareData as just a flag field like we do in Node. This removes a lot of boilerplate code and also makes the check for style sharing a lot simpler since now we can just OR the flags that disable sharing together. That's good since that check is super hot in profiles. This also lets us make all the other "flag reading" methods into simple inline getters that call hasElementFlag() which early outs on not having any rare data. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169426

Patch Set 1 #

Patch Set 2 : Add back clearHasPendingResources() #

Total comments: 1

Patch Set 3 : fix clearHasPendingResources() #

Patch Set 4 : try again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -305 lines) Patch
M Source/core/dom/Element.h View 1 2 3 7 chunks +79 lines, -42 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 11 chunks +27 lines, -173 lines 0 comments Download
M Source/core/dom/ElementRareData.h View 6 chunks +33 lines, -90 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
esprehn
Delete so much code!
6 years, 9 months ago (2014-03-18 01:50:41 UTC) #1
eseidel
lgtm https://codereview.chromium.org/202633006/diff/20001/Source/core/dom/ElementRareData.h File Source/core/dom/ElementRareData.h (left): https://codereview.chromium.org/202633006/diff/20001/Source/core/dom/ElementRareData.h#oldcode165 Source/core/dom/ElementRareData.h:165: // We optimize for :first-child and :last-child. The ...
6 years, 9 months ago (2014-03-18 03:12:20 UTC) #2
esprehn
On 2014/03/18 03:12:20, eseidel wrote: > lgtm > > https://codereview.chromium.org/202633006/diff/20001/Source/core/dom/ElementRareData.h > File Source/core/dom/ElementRareData.h (left): > ...
6 years, 9 months ago (2014-03-18 03:40:49 UTC) #3
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 9 months ago (2014-03-18 03:41:05 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/202633006/20001
6 years, 9 months ago (2014-03-18 03:41:11 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 03:49:48 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 9 months ago (2014-03-18 03:49:49 UTC) #7
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 9 months ago (2014-03-18 06:30:34 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/202633006/40001
6 years, 9 months ago (2014-03-18 06:30:41 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 06:34:07 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-18 06:34:08 UTC) #11
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 9 months ago (2014-03-18 06:36:46 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/202633006/40001
6 years, 9 months ago (2014-03-18 06:36:56 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 06:39:38 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_compile_dbg
6 years, 9 months ago (2014-03-18 06:39:38 UTC) #15
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 9 months ago (2014-03-18 06:42:32 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/202633006/60001
6 years, 9 months ago (2014-03-18 06:42:36 UTC) #17
commit-bot: I haz the power
6 years, 9 months ago (2014-03-18 07:49:09 UTC) #18
Message was sent while issue was closed.
Change committed as 169426

Powered by Google App Engine
This is Rietveld 408576698