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

Issue 1962953002: Storage of ComputedStyle separate from LayoutObject. (Closed)

Created:
4 years, 7 months ago by Bugs Nash
Modified:
4 years, 4 months ago
Reviewers:
Timothy Loh, esprehn
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, nainar, rwlbuis, rune, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Storage of ComputedStyle separate from LayoutObject. Part of stage 1 in separation of style resolution and layout tree construction Design doc: bit.ly/24nQ9UQ Changes the Node::m_data DataUnion to now allow a ComputedStyle. Updates Node flags with new flag HasLayoutObject to indicate whether the DataUnion is a LayoutObject or a ComputedStyle. Adds new hasLayoutObject method to check flag. Updates ComputedStyle and Layoutobject getters and setters accordingly. Written with nainar@ Originally landed as: https://crrev.com/11af5b8769875ef50b16cb94d7eb758def0d9b08 but was reverted. BUG=595137 Committed: https://crrev.com/7f405ec2b6914d482d081d2cb5d80bdf5226bd57 Cr-Commit-Position: refs/heads/master@{#411933}

Patch Set 1 #

Patch Set 2 : Added clearLayoutObject method and continued steps #

Patch Set 3 : Completed Node::setLayoutObject and flipped default DataUnion type from LayoutObject to ComputedSty… #

Patch Set 4 : compressed Node::setLayoutObject and added Node::setComputedStyle method #

Total comments: 2

Patch Set 5 : Addressed reviewer comments #

Patch Set 6 : Added TODOs to remove redundant ComputedStyle members #

Total comments: 3

Patch Set 7 : Addressed reviewer comments #

Patch Set 8 : Removed ComputedStyle from ElementRareData #

Total comments: 1

Patch Set 9 : Removed Node::setComputedStyle which is not yet needed #

Patch Set 10 : Removed ComputedStyle from NodeRareData, instead use existing ComputedStyle from ElementRareData #

Total comments: 3

Patch Set 11 : Addressed reviewer comments #

Total comments: 1

Patch Set 12 : Fixed LayoutObject access in Node::ensureRareData #

Total comments: 2

Patch Set 13 : Rebased #

Total comments: 11

Patch Set 14 : Addressed Elliott's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -10 lines) Patch
M third_party/WebKit/Source/core/dom/Node.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +12 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/NodeComputedStyle.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +10 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/NodeRareData.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/NodeRareData.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLOptGroupElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLOptionElement.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 76 (28 generated)
Bugs Nash
Tim could you please eyeball this WIP to make sure we're on the right track? ...
4 years, 7 months ago (2016-05-26 01:10:47 UTC) #3
Bugs Nash
On 2016/05/26 at 01:10:47, Bugs Nash wrote: > Tim could you please eyeball this WIP ...
4 years, 7 months ago (2016-05-26 01:30:07 UTC) #4
Timothy Loh
This patch is not intended to change behavior, right? So the current code which clears ...
4 years, 7 months ago (2016-05-26 07:06:37 UTC) #5
Bugs Nash
On 2016/05/26 at 07:06:37, timloh wrote: > This patch is not intended to change behavior, ...
4 years, 6 months ago (2016-06-01 06:21:28 UTC) #11
Timothy Loh
Just to confirm, are we moving the ComputedStyle up from ElementRareData to NodeRareData because we ...
4 years, 6 months ago (2016-06-01 07:36:38 UTC) #12
Bugs Nash
On 2016/06/01 at 07:36:38, timloh wrote: > Just to confirm, are we moving the ComputedStyle ...
4 years, 6 months ago (2016-06-01 08:39:29 UTC) #13
Bugs Nash
On 2016/06/01 at 08:39:29, Bugs Nash wrote: > On 2016/06/01 at 07:36:38, timloh wrote: > ...
4 years, 6 months ago (2016-06-01 09:22:01 UTC) #14
Bugs Nash
On 2016/06/01 at 09:22:01, Bugs Nash wrote: > On 2016/06/01 at 08:39:29, Bugs Nash wrote: ...
4 years, 6 months ago (2016-06-01 09:36:49 UTC) #15
Timothy Loh
On 2016/06/01 08:39:29, Bugs Nash wrote: > On 2016/06/01 at 07:36:38, timloh wrote: > > ...
4 years, 6 months ago (2016-06-02 04:49:35 UTC) #16
Timothy Loh
On 2016/06/01 09:22:01, Bugs Nash wrote: > Having a problem when changing the ElementRareData to ...
4 years, 6 months ago (2016-06-02 05:10:17 UTC) #17
Timothy Loh
https://codereview.chromium.org/1962953002/diff/200001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): https://codereview.chromium.org/1962953002/diff/200001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h#newcode68 third_party/WebKit/Source/core/dom/NodeComputedStyle.h:68: m_data.m_computedStyle = computedStyle.get(); Actually here you can write computedStyle.leakRef() ...
4 years, 6 months ago (2016-06-02 05:10:32 UTC) #18
Bugs Nash
On 2016/06/02 at 04:49:35, timloh wrote: > On 2016/06/01 08:39:29, Bugs Nash wrote: > > ...
4 years, 6 months ago (2016-06-02 05:26:56 UTC) #19
Timothy Loh
On 2016/06/02 05:26:56, Bugs Nash wrote: > Are Elements the only Node objects that have ...
4 years, 6 months ago (2016-06-02 05:39:16 UTC) #20
Bugs Nash
On 2016/06/02 at 05:10:32, timloh wrote: > https://codereview.chromium.org/1962953002/diff/200001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h > File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): > > https://codereview.chromium.org/1962953002/diff/200001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h#newcode68 ...
4 years, 6 months ago (2016-06-22 04:27:10 UTC) #21
Bugs Nash
On 2016/06/02 at 05:39:16, timloh wrote: > On 2016/06/02 05:26:56, Bugs Nash wrote: > > ...
4 years, 6 months ago (2016-06-22 04:27:34 UTC) #22
Bugs Nash
On 2016/06/22 at 04:27:34, Bugs Nash wrote: > On 2016/06/02 at 05:39:16, timloh wrote: > ...
4 years, 6 months ago (2016-06-23 00:41:58 UTC) #23
Timothy Loh
lgtm but description needs updating since we're not touching NodeRareDataBase any more https://codereview.chromium.org/1962953002/diff/240001/third_party/WebKit/Source/core/dom/Node.h File third_party/WebKit/Source/core/dom/Node.h ...
4 years, 6 months ago (2016-06-23 23:58:02 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1962953002/260001
4 years, 6 months ago (2016-06-24 04:09:32 UTC) #28
commit-bot: I haz the power
Committed patchset #11 (id:260001)
4 years, 6 months ago (2016-06-24 05:36:36 UTC) #31
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/11af5b8769875ef50b16cb94d7eb758def0d9b08 Cr-Commit-Position: refs/heads/master@{#401821}
4 years, 6 months ago (2016-06-24 05:37:57 UTC) #33
rnephew (Reviews Here)
A revert of this CL (patchset #11 id:260001) has been created in https://codereview.chromium.org/2093143002/ by rnephew@chromium.org. ...
4 years, 6 months ago (2016-06-24 17:40:37 UTC) #34
esprehn
https://codereview.chromium.org/1962953002/diff/260001/third_party/WebKit/Source/core/dom/Node.h File third_party/WebKit/Source/core/dom/Node.h (right): https://codereview.chromium.org/1962953002/diff/260001/third_party/WebKit/Source/core/dom/Node.h#newcode847 third_party/WebKit/Source/core/dom/Node.h:847: ComputedStyle* m_computedStyle; You'll want to replace ElementRareDatas member with ...
4 years, 6 months ago (2016-06-24 17:51:14 UTC) #36
Bugs Nash
On 2016/06/24 at 17:51:14, esprehn wrote: > https://codereview.chromium.org/1962953002/diff/260001/third_party/WebKit/Source/core/dom/Node.h > File third_party/WebKit/Source/core/dom/Node.h (right): > > https://codereview.chromium.org/1962953002/diff/260001/third_party/WebKit/Source/core/dom/Node.h#newcode847 ...
4 years, 5 months ago (2016-06-27 00:07:25 UTC) #37
Bugs Nash
Want to reland this patch. It was reverted because it was crashing android perf bots ...
4 years, 5 months ago (2016-07-18 03:09:49 UTC) #38
esprehn
https://codereview.chromium.org/1962953002/diff/280001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): https://codereview.chromium.org/1962953002/diff/280001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h#newcode56 third_party/WebKit/Source/core/dom/NodeComputedStyle.h:56: return static_cast<ElementRareData*>(rareData)->ensureComputedStyle(); didn't you rename this recently?
4 years, 5 months ago (2016-07-18 20:58:52 UTC) #39
Bugs Nash
https://codereview.chromium.org/1962953002/diff/280001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): https://codereview.chromium.org/1962953002/diff/280001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h#newcode56 third_party/WebKit/Source/core/dom/NodeComputedStyle.h:56: return static_cast<ElementRareData*>(rareData)->ensureComputedStyle(); On 2016/07/18 at 20:58:52, esprehn wrote: > ...
4 years, 5 months ago (2016-07-18 23:16:53 UTC) #41
Bugs Nash
https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h#newcode53 third_party/WebKit/Source/core/dom/NodeComputedStyle.h:53: if (hasRareData()) { Alternatively I could land the patch ...
4 years, 5 months ago (2016-07-19 01:20:36 UTC) #44
esprehn
https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h#newcode53 third_party/WebKit/Source/core/dom/NodeComputedStyle.h:53: if (hasRareData()) { On 2016/07/19 at 01:20:36, Bugs Nash ...
4 years, 5 months ago (2016-07-19 01:59:10 UTC) #45
Bugs Nash
On 2016/07/19 at 01:59:10, esprehn wrote: > https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h > File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): > > https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h#newcode53 ...
4 years, 5 months ago (2016-07-19 03:19:57 UTC) #48
esprehn
Hmm, why not set the hasLayoutObject flag correctly in this patch? https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): ...
4 years, 5 months ago (2016-07-19 03:25:03 UTC) #49
Bugs Nash
On 2016/07/19 at 03:25:03, esprehn wrote: > Hmm, why not set the hasLayoutObject flag correctly ...
4 years, 4 months ago (2016-08-05 05:29:32 UTC) #50
esprehn
https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/Node.cpp File third_party/WebKit/Source/core/dom/Node.cpp (right): https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/Node.cpp#newcode267 third_party/WebKit/Source/core/dom/Node.cpp:267: if (!hasRareData() && !hasLayoutObject() && m_data.m_computedStyle) !hasLayoutObject() doesn't make ...
4 years, 4 months ago (2016-08-05 21:26:26 UTC) #51
Bugs Nash
Tim PTAL at Elliott's comments re: moving ComputedStyle from ElementRareData to back to NodeRareData https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/Node.cpp ...
4 years, 4 months ago (2016-08-12 03:55:33 UTC) #52
Bugs Nash
Tim PTAL at Elliott's comments re: moving ComputedStyle from ElementRareData to back to NodeRareData https://codereview.chromium.org/1962953002/diff/300001/third_party/WebKit/Source/core/dom/Node.cpp ...
4 years, 4 months ago (2016-08-12 03:55:33 UTC) #53
esprehn
Text also has a computedStyle, but I don't think it ever really has rare data. ...
4 years, 4 months ago (2016-08-12 04:10:38 UTC) #54
esprehn
Text also has a computedStyle, but I don't think it ever really has rare data. ...
4 years, 4 months ago (2016-08-12 04:10:39 UTC) #55
blink-reviews
What do you think the behavior should be instead? return nullptr for ComputedStyle? On Fri, ...
4 years, 4 months ago (2016-08-12 04:42:31 UTC) #56
chromium-reviews
What do you think the behavior should be instead? return nullptr for ComputedStyle? On Fri, ...
4 years, 4 months ago (2016-08-12 04:42:31 UTC) #57
esprehn
I think so? That or you can assert inActiveDocument at the top the whole function? ...
4 years, 4 months ago (2016-08-12 05:00:16 UTC) #58
esprehn
I think so? That or you can assert inActiveDocument at the top the whole function? ...
4 years, 4 months ago (2016-08-12 05:00:16 UTC) #59
esprehn
Lgtm let's figure this out as we go. I don't want you stuck for so ...
4 years, 4 months ago (2016-08-12 05:13:14 UTC) #60
Bugs Nash
On 2016/08/12 at 05:00:16, esprehn wrote: > I think so? That or you can assert ...
4 years, 4 months ago (2016-08-12 05:16:10 UTC) #63
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/1962953002/320001
4 years, 4 months ago (2016-08-14 21:51:38 UTC) #68
commit-bot: I haz the power
Exceeded global retry quota
4 years, 4 months ago (2016-08-15 00:00:31 UTC) #70
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/1962953002/320001
4 years, 4 months ago (2016-08-15 00:07:51 UTC) #72
commit-bot: I haz the power
Committed patchset #14 (id:320001)
4 years, 4 months ago (2016-08-15 01:56:35 UTC) #73
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/7f405ec2b6914d482d081d2cb5d80bdf5226bd57 Cr-Commit-Position: refs/heads/master@{#411933}
4 years, 4 months ago (2016-08-15 01:58:40 UTC) #75
Bugs Nash
4 years, 2 months ago (2016-09-28 02:12:08 UTC) #76
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:320001) has been created in
https://codereview.chromium.org/2380503002/ by bugsnash@chromium.org.

The reason for reverting is: Squad project needs redesign, no longer will use
ComputedStyle on Node's data union.

Powered by Google App Engine
This is Rietveld 408576698