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

Issue 2318913002: Rename Document::attach/detachLayoutTree to Document::initialize/shutdown (Closed)

Created:
4 years, 3 months ago by haraken
Modified:
4 years, 3 months ago
Reviewers:
esprehn, dcheng
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, dominicc+watchlist_chromium.org, eae+blinkwatch, gavinp+loader_chromium.org, Nate Chapin, kinuko+watch, loading-reviews_chromium.org, rwlbuis, sof, tyoshino+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rename Document::attach/detachLayoutTree to Document::initialize/shutdown Document::attach/detachLayoutTree is confusing. It's indeed attaching/detaching layout trees but doing more things than that. In particular, Document::detachLayoutTree does a bunch of disruptive operations unlike other Node::detachLayoutTree. It's better to rename Document::attach/detachLayoutTree to Document::initialize/shutdown and make it clear that they can be called only once when the Document gets initialized/shut down. BUG=610176 Committed: https://crrev.com/47c70c581412441848e8c2373b8b30aab2d694eb Cr-Commit-Position: refs/heads/master@{#417175}

Patch Set 1 #

Patch Set 2 : temp #

Patch Set 3 : temp #

Total comments: 2

Patch Set 4 : temp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -24 lines) Patch
M third_party/WebKit/Source/core/dom/ActiveDOMObjectTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 1 chunk +11 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLSelectElementTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/PluginDocument.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/PluginDocument.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/xml/XSLTProcessor.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/VisualViewportTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
haraken
PTAL
4 years, 3 months ago (2016-09-07 05:09:36 UTC) #4
dcheng
Hmm, doesn't this mean that if someone calls detachLayoutTree() directly on Document by mistake, they'll ...
4 years, 3 months ago (2016-09-07 07:23:06 UTC) #7
haraken
On 2016/09/07 07:23:06, dcheng wrote: > Hmm, doesn't this mean that if someone calls detachLayoutTree() ...
4 years, 3 months ago (2016-09-07 07:31:54 UTC) #8
dcheng
On 2016/09/07 07:31:54, haraken wrote: > On 2016/09/07 07:23:06, dcheng wrote: > > Hmm, doesn't ...
4 years, 3 months ago (2016-09-07 07:41:48 UTC) #9
haraken
On 2016/09/07 07:41:48, dcheng wrote: > On 2016/09/07 07:31:54, haraken wrote: > > On 2016/09/07 ...
4 years, 3 months ago (2016-09-07 08:01:22 UTC) #10
dcheng
I think I would feel better about this if we could just make attachLayoutTree() and ...
4 years, 3 months ago (2016-09-07 19:40:21 UTC) #11
haraken
On 2016/09/07 19:40:21, dcheng wrote: > I think I would feel better about this if ...
4 years, 3 months ago (2016-09-08 01:04:09 UTC) #12
esprehn
On 2016/09/08 at 01:04:09, haraken wrote: > On 2016/09/07 19:40:21, dcheng wrote: > > I ...
4 years, 3 months ago (2016-09-08 01:06:33 UTC) #13
haraken
On 2016/09/08 01:06:33, esprehn wrote: > On 2016/09/08 at 01:04:09, haraken wrote: > > On ...
4 years, 3 months ago (2016-09-08 01:13:49 UTC) #14
esprehn
lgtm https://codereview.chromium.org/2318913002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2318913002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp#newcode2130 third_party/WebKit/Source/core/dom/Document.cpp:2130: ContainerNode::attachLayoutTree(AttachContext()); There's a default argument, you can just ...
4 years, 3 months ago (2016-09-08 01:16:27 UTC) #15
haraken
> https://codereview.chromium.org/2318913002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp > File third_party/WebKit/Source/core/dom/Document.cpp (right): > > https://codereview.chromium.org/2318913002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp#newcode2130 > third_party/WebKit/Source/core/dom/Document.cpp:2130: > ContainerNode::attachLayoutTree(AttachContext()); > There's ...
4 years, 3 months ago (2016-09-08 01:26:00 UTC) #16
dcheng
lgtm
4 years, 3 months ago (2016-09-08 01:26:45 UTC) #17
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/2318913002/60001
4 years, 3 months ago (2016-09-08 01:28:38 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-08 02:56:40 UTC) #21
commit-bot: I haz the power
4 years, 3 months ago (2016-09-08 02:58:37 UTC) #23
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/47c70c581412441848e8c2373b8b30aab2d694eb
Cr-Commit-Position: refs/heads/master@{#417175}

Powered by Google App Engine
This is Rietveld 408576698