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

Issue 2001453002: Set ComputedStyle on Node and use that in buildOwnLayout() (Closed)

Created:
4 years, 7 months ago by nainar
Modified:
4 years, 2 months ago
Reviewers:
sashab, Bugs Nash
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@storage
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Set ComputedStyle on Node and use that in buildOwnLayout() This patch builds on: https://codereview.chromium.org/1962953002 to contain Layout Tree Construction code in its own function -> Element::buildOwnLayout(). We also add a function Node::setComputedStyle to allow us to store the ComputedStyle on Node in case localChange == Reattach and we need to perform a Reattach. This patch also changes the if conditions which call layoutObject() to check if one exists to use hasLayoutObject() instead for efficiency. With lots of help from @bugsnash Design doc: http://bit.ly/29MBWvf BUG=595137

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Total comments: 4

Patch Set 4 #

Patch Set 5 #

Patch Set 6 #

Patch Set 7 : For Sasha to review #

Patch Set 8 : Initial review #

Total comments: 16

Patch Set 9 : make sure ensureRareData() only uses layoutObject if flag is set #

Patch Set 10 #

Total comments: 3

Patch Set 11 : setStyleInternal -> setStyle #

Patch Set 12 : send out for review to test the waters #

Patch Set 13 : add commit and replace ASSERT with early exit #

Patch Set 14 : add commit and replace ASSERT with early exit #

Patch Set 15 : setStyleInternal -> setStyle #

Patch Set 16 : Rebased #

Patch Set 17 : deal with Pseudo Elements and TableElement #

Patch Set 18 : deal with Pseudo Elements and TableElement #

Patch Set 19 : Handle pseudo and table subtype elements #

Patch Set 20 : test #

Patch Set 21 : Images should not crash #

Patch Set 22 : Images shouldn't crash #

Patch Set 23 : Images shouldn't crash #

Patch Set 24 : Sending for Bugs' input #

Total comments: 4

Patch Set 25 : Send over for review #

Total comments: 1

Patch Set 26 : Remove any cases that are forcing the newStyle on the old LayoutObject #

Patch Set 27 : Remove any cases that are forcing the newStyle on the old LayoutObject #

Patch Set 28 : Remove any cases that are forcing the newStyle on the old LayoutObject #

Patch Set 29 : Remove any cases that are forcing the newStyle on the old LayoutObject #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -53 lines) Patch
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +4 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ElementRareData.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -14 lines 0 comments Download
D third_party/WebKit/Source/core/dom/ElementRareDataTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +0 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +1 line, -0 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 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 83 (63 generated)
nainar
Hi Sasha! Can you take a look at this patch to see if I am ...
4 years, 5 months ago (2016-07-01 08:00:20 UTC) #6
sashab
Some suggestions about how to approach this change that might make landing it a little ...
4 years, 5 months ago (2016-07-04 07:57:13 UTC) #8
nainar
@sashab, Just a progress update. Will get back to you with a clean CL that ...
4 years, 5 months ago (2016-07-05 00:26:56 UTC) #9
sashab
On 2016/07/05 at 00:26:56, nainar wrote: > @sashab, > > Just a progress update. > ...
4 years, 5 months ago (2016-07-05 01:51:36 UTC) #10
nainar
Hi! There is currently still one failing test -> fast/shapes/shape-outside-floats/shape-outside-no-image-crash.html While I poke around that, ...
4 years, 5 months ago (2016-07-06 04:17:18 UTC) #11
sashab
Some questions mainly. :) https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h File third_party/WebKit/Source/core/dom/Node.h (right): https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h#newcode525 third_party/WebKit/Source/core/dom/Node.h:525: if (hasRareData() && hasLayoutObject()) Why ...
4 years, 5 months ago (2016-07-06 04:22:02 UTC) #13
Bugs Nash
Maybe give this patch a different title to the previous one, it's confusing which is ...
4 years, 5 months ago (2016-07-06 04:30:42 UTC) #14
nainar
https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h File third_party/WebKit/Source/core/dom/Node.h (right): https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h#newcode525 third_party/WebKit/Source/core/dom/Node.h:525: if (hasRareData() && hasLayoutObject()) To make sure that we ...
4 years, 5 months ago (2016-07-06 04:51:53 UTC) #17
Bugs Nash
https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h File third_party/WebKit/Source/core/dom/Node.h (right): https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h#newcode525 third_party/WebKit/Source/core/dom/Node.h:525: if (hasRareData() && hasLayoutObject()) On 2016/07/06 at 04:51:53, nainar ...
4 years, 5 months ago (2016-07-06 05:00:21 UTC) #18
Bugs Nash
https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h File third_party/WebKit/Source/core/dom/Node.h (right): https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h#newcode525 third_party/WebKit/Source/core/dom/Node.h:525: if (hasRareData() && hasLayoutObject()) On 2016/07/06 at 05:00:21, Bugs ...
4 years, 5 months ago (2016-07-06 05:04:44 UTC) #19
sashab
Some comments for how to make this a little easier to follow :) https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h File ...
4 years, 5 months ago (2016-07-06 05:10:40 UTC) #20
Bugs Nash
https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h File third_party/WebKit/Source/core/dom/Node.h (right): https://codereview.chromium.org/2001453002/diff/140001/third_party/WebKit/Source/core/dom/Node.h#newcode525 third_party/WebKit/Source/core/dom/Node.h:525: if (hasRareData() && hasLayoutObject()) On 2016/07/06 at 05:10:40, sashab ...
4 years, 5 months ago (2016-07-06 05:19:06 UTC) #21
nainar
Hi! Still got two failing tests: fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash.html fast/shapes/shape-outside-floats/shape-outside-no-image-crash.html But PTAL? https://codereview.chromium.org/2001453002/diff/180001/third_party/WebKit/Source/core/dom/Node.cpp File third_party/WebKit/Source/core/dom/Node.cpp (left): https://codereview.chromium.org/2001453002/diff/180001/third_party/WebKit/Source/core/dom/Node.cpp#oldcode283 ...
4 years, 5 months ago (2016-07-06 07:09:03 UTC) #22
Bugs Nash
https://codereview.chromium.org/2001453002/diff/180001/third_party/WebKit/Source/core/dom/Node.cpp File third_party/WebKit/Source/core/dom/Node.cpp (left): https://codereview.chromium.org/2001453002/diff/180001/third_party/WebKit/Source/core/dom/Node.cpp#oldcode283 third_party/WebKit/Source/core/dom/Node.cpp:283: m_data.m_rareData = ElementRareData::create(m_data.m_layoutObject); On 2016/07/06 at 07:09:03, nainar wrote: ...
4 years, 5 months ago (2016-07-06 21:32:21 UTC) #23
sashab
Definitely looks good & on the right, track, just gotta fix those failing tests. :) ...
4 years, 5 months ago (2016-07-07 01:20:35 UTC) #24
nainar
Sending to Bugs for input: The current crashing tests in fast land are fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash.html fast/shapes/shape-outside-floats/shape-outside-no-image-crash.html ...
4 years, 4 months ago (2016-08-22 01:37:45 UTC) #59
Bugs Nash
https://codereview.chromium.org/2001453002/diff/460001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): https://codereview.chromium.org/2001453002/diff/460001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h#newcode64 third_party/WebKit/Source/core/dom/NodeComputedStyle.h:64: // printf("In Node::setComputedStyle nodeName %s hasRareData %d hasLayoutObject %d ...
4 years, 4 months ago (2016-08-23 02:37:52 UTC) #60
Bugs Nash
https://codereview.chromium.org/2001453002/diff/460001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h File third_party/WebKit/Source/core/dom/NodeComputedStyle.h (right): https://codereview.chromium.org/2001453002/diff/460001/third_party/WebKit/Source/core/dom/NodeComputedStyle.h#newcode83 third_party/WebKit/Source/core/dom/NodeComputedStyle.h:83: // If the DataUnion is a ComputedStyle - make ...
4 years, 4 months ago (2016-08-23 02:40:20 UTC) #61
nainar
Sending for input: The current crashing tests in fast land are fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash.html I have narrowed ...
4 years, 3 months ago (2016-09-16 01:35:47 UTC) #65
Bugs Nash
4 years, 3 months ago (2016-09-16 01:45:05 UTC) #66
https://codereview.chromium.org/2001453002/diff/480001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right):

https://codereview.chromium.org/2001453002/diff/480001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/layout/LayoutObject.cpp:1566: void
LayoutObject::setStyleFromNodeOrElement(PassRefPtr<ComputedStyle> computedStyle)
method name should describe what it does, not where it is called from

could this logic should be added to the setStyle method?

Powered by Google App Engine
This is Rietveld 408576698