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

Issue 135643004: Make TreeScope::baseURL pure virtual (Closed)

Created:
6 years, 11 months ago by adamk
Modified:
6 years, 11 months ago
Reviewers:
esprehn
CC:
blink-reviews, dglazkov+blink, sof, eae+blinkwatch, adamk+blink_chromium.org, Inactive
Visibility:
Public.

Description

Make TreeScope::baseURL pure virtual This allows completeURL and baseURL work correctly when called on a ShadowRoot. They should fall back to the ShadowRoot's Document's baseURL unless the ShadowRoot itself has a baseURL specified. Since no code in Blink yet calls either on a ShadowRoot, there's no test I can write that triggers this, but once we start calling treeScope().completeURL() this will be well-tested. R=esprehn@chromium.org BUG=311682 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165025

Patch Set 1 #

Total comments: 2

Patch Set 2 : Handle fallback in baseURL #

Total comments: 1

Patch Set 3 : Made TreeScope::baseURL virtual #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -16 lines) Patch
M Source/core/dom/Document.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 chunks +10 lines, -10 lines 0 comments Download
M Source/core/dom/TreeScope.h View 1 2 3 chunks +1 line, -5 lines 0 comments Download
M Source/core/dom/shadow/ShadowRoot.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
adamk
6 years, 11 months ago (2014-01-13 22:18:22 UTC) #1
adamk
+abarth
6 years, 11 months ago (2014-01-14 00:19:33 UTC) #2
esprehn
LGTM, but why isn't this handled inside the getter for baseURL()? https://codereview.chromium.org/135643004/diff/1/Source/core/dom/TreeScope.cpp File Source/core/dom/TreeScope.cpp (right): ...
6 years, 11 months ago (2014-01-14 00:22:12 UTC) #3
adamk
https://codereview.chromium.org/135643004/diff/1/Source/core/dom/TreeScope.cpp File Source/core/dom/TreeScope.cpp (right): https://codereview.chromium.org/135643004/diff/1/Source/core/dom/TreeScope.cpp#newcode500 Source/core/dom/TreeScope.cpp:500: return document().completeURLWithOverride(url, m_baseURL.isEmpty() ? document().baseURL() : m_baseURL); On 2014/01/14 ...
6 years, 11 months ago (2014-01-14 00:34:03 UTC) #4
esprehn
Couldn't you just make this virtual too? https://codereview.chromium.org/135643004/diff/70001/Source/core/dom/TreeScope.cpp File Source/core/dom/TreeScope.cpp (right): https://codereview.chromium.org/135643004/diff/70001/Source/core/dom/TreeScope.cpp#newcode500 Source/core/dom/TreeScope.cpp:500: if (!m_baseURL.isEmpty() ...
6 years, 11 months ago (2014-01-14 00:36:36 UTC) #5
adamk
Okay, made baseURL virtual, now this is quite a bit different. Not sure why I ...
6 years, 11 months ago (2014-01-14 00:51:15 UTC) #6
esprehn
lgtm, beautiful.
6 years, 11 months ago (2014-01-14 00:52:22 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adamk@chromium.org/135643004/30002
6 years, 11 months ago (2014-01-14 00:55:01 UTC) #8
commit-bot: I haz the power
6 years, 11 months ago (2014-01-14 04:28:08 UTC) #9
Message was sent while issue was closed.
Change committed as 165025

Powered by Google App Engine
This is Rietveld 408576698