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

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed)

Created:
4 years, 7 months ago by bokan
Modified:
4 years, 7 months ago
Reviewers:
dcheng
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-style_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, dglazkov+blink, dshwang, dtapuska+blinkwatch_chromium.org, eae+blinkwatch, eric.carlson_apple.com, feature-media-reviews_chromium.org, gavinp+loader_chromium.org, Nate Chapin, jchaffraix+rendering, kozyatinskiy+blink_chromium.org, leviw+renderwatch, loading-reviews_chromium.org, lushnikov+blink_chromium.org, mlamouri+watch-blink_chromium.org, pdr+renderingwatchlist_chromium.org, pfeldman+blink_chromium.org, philipj_slow, rwlbuis, sergeyv+blink_chromium.org, sof, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, tyoshino+watch_chromium.org, zoltan1, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rename Document::ownerElement to localOwner and fix main frame checks. Document::ownerElement returns nullptr if the owner is in a remote frame so the new name is more clear of that. I've updated call sites that were using !ownerElement as a signal that the document was in the main frame to check the frame's isMainFrame method instead since that should work in OOPIF scenarios. BUG=607001 Committed: https://crrev.com/f66e6b578fce9b4aed705f973acc547235e73e2c Cr-Commit-Position: refs/heads/master@{#392637}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Replaced uses of ownerElement for main frame check #

Patch Set 3 : Remove duplication in const overload #

Total comments: 6

Patch Set 4 : Renamed to localOwner + fixed up rootScroller warnings #

Total comments: 9

Patch Set 5 : Removed const changes and some gratuitous checks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -60 lines) Patch
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 10 chunks +20 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Fullscreen.cpp View 1 2 3 4 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/ImageDocument.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/MediaDocument.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/PluginDocument.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/TextDocument.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/input/TouchActionUtil.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/TouchEventManager.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/SinkDocument.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/TouchAdjustment.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/ViewPainter.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 33 (14 generated)
bokan
Hi Daniel, I used isMainFrame rather than Frame::owner, they seem equivalent but the former is ...
4 years, 7 months ago (2016-04-30 17:01:37 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1942623002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1942623002/1
4 years, 7 months ago (2016-04-30 17:01:52 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-30 19:58:19 UTC) #7
bokan
ping
4 years, 7 months ago (2016-05-03 17:55:48 UTC) #8
dcheng
I think if we're changing this, we should fix all the main frame checks (like ...
4 years, 7 months ago (2016-05-03 18:47:40 UTC) #9
bokan
> I think if we're changing this, we should fix all the main > frame ...
4 years, 7 months ago (2016-05-03 21:41:03 UTC) #11
bokan
> I think if we're changing this, we should fix all the main > frame ...
4 years, 7 months ago (2016-05-03 21:41:04 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1942623002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1942623002/40001
4 years, 7 months ago (2016-05-05 12:38:24 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-05 14:02:01 UTC) #16
bokan
ping
4 years, 7 months ago (2016-05-05 14:59:11 UTC) #17
dcheng
Sorry for the delay on the review, I was looking at how topDocument() and parentDocument() ...
4 years, 7 months ago (2016-05-07 06:09:08 UTC) #18
bokan
ptal https://codereview.chromium.org/1942623002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1942623002/diff/40001/third_party/WebKit/Source/core/dom/Document.cpp#newcode601 third_party/WebKit/Source/core/dom/Document.cpp:601: if (!frame()) { On 2016/05/07 06:09:07, dcheng wrote: ...
4 years, 7 months ago (2016-05-09 20:43:58 UTC) #20
esprehn
We usually just mark the getters as const, like Node* firstChild() const. no need for ...
4 years, 7 months ago (2016-05-09 21:22:34 UTC) #22
dcheng
lgtm with nits addressed https://codereview.chromium.org/1942623002/diff/60001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1942623002/diff/60001/third_party/WebKit/Source/core/dom/Document.cpp#newcode632 third_party/WebKit/Source/core/dom/Document.cpp:632: if (!frame() || !isInMainFrame()) Nit: ...
4 years, 7 months ago (2016-05-09 21:26:16 UTC) #24
bokan
https://codereview.chromium.org/1942623002/diff/60001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1942623002/diff/60001/third_party/WebKit/Source/core/dom/Document.cpp#newcode632 third_party/WebKit/Source/core/dom/Document.cpp:632: if (!frame() || !isInMainFrame()) On 2016/05/09 21:26:16, dcheng wrote: ...
4 years, 7 months ago (2016-05-09 22:26:18 UTC) #25
dcheng
(still )lgtm
4 years, 7 months ago (2016-05-10 01:22:46 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1942623002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1942623002/80001
4 years, 7 months ago (2016-05-10 15:58:09 UTC) #28
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-10 17:29:24 UTC) #30
commit-bot: I haz the power
4 years, 7 months ago (2016-05-10 17:31:12 UTC) #32
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/f66e6b578fce9b4aed705f973acc547235e73e2c
Cr-Commit-Position: refs/heads/master@{#392637}

Powered by Google App Engine
This is Rietveld 408576698