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

Issue 1044133002: HTMLPreloadScanner should only use valid <base> urls (Closed)

Created:
5 years, 8 months ago by kouhei (in TOK)
Modified:
5 years, 8 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, rwlbuis
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

HTMLPreloadScanner should only use valid <base> urls Before this CL, HTMLPreloadScanner accepted invalid <base> urls and used it to resolve urls encountered later in the scan. This CL ensures that only valid urls specified in <base href> are actually used as base urls. BUG=471525 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193019

Patch Set 1 #

Total comments: 6

Patch Set 2 : update tests #

Total comments: 6

Patch Set 3 : doctype #

Patch Set 4 : use internals.isPreloaded #

Patch Set 5 : r #

Total comments: 1

Patch Set 6 : move the check up #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -5 lines) Patch
A LayoutTests/fast/parser/badurl-base-preloader-crash.html View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/fast/parser/badurl-base-preloader-crash-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/http/tests/loading/preload-ignore-invalid-base.html View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/loading/preload-ignore-invalid-base-expected.txt View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
A LayoutTests/http/tests/loading/resources/fail.js View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLPreloadScanner.cpp View 1 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
kouhei (in TOK)
5 years, 8 months ago (2015-03-31 10:08:33 UTC) #2
Yoav Weiss
https://codereview.chromium.org/1044133002/diff/1/LayoutTests/fast/parser/badurl-head-preloader-crash.html File LayoutTests/fast/parser/badurl-head-preloader-crash.html (right): https://codereview.chromium.org/1044133002/diff/1/LayoutTests/fast/parser/badurl-head-preloader-crash.html#newcode2 LayoutTests/fast/parser/badurl-head-preloader-crash.html:2: <script src=":"></script> Can you add another test where we ...
5 years, 8 months ago (2015-03-31 11:04:44 UTC) #4
kouhei (in TOK)
Thanks for your comments! I'll address them tomorrow. https://codereview.chromium.org/1044133002/diff/1/LayoutTests/fast/parser/badurl-head-preloader-crash.html File LayoutTests/fast/parser/badurl-head-preloader-crash.html (right): https://codereview.chromium.org/1044133002/diff/1/LayoutTests/fast/parser/badurl-head-preloader-crash.html#newcode2 LayoutTests/fast/parser/badurl-head-preloader-crash.html:2: <script ...
5 years, 8 months ago (2015-03-31 11:15:38 UTC) #5
kouhei (in TOK)
PTAL https://codereview.chromium.org/1044133002/diff/1/LayoutTests/fast/parser/badurl-head-preloader-crash.html File LayoutTests/fast/parser/badurl-head-preloader-crash.html (right): https://codereview.chromium.org/1044133002/diff/1/LayoutTests/fast/parser/badurl-head-preloader-crash.html#newcode2 LayoutTests/fast/parser/badurl-head-preloader-crash.html:2: <script src=":"></script> On 2015/03/31 11:15:38, kouhei wrote: > ...
5 years, 8 months ago (2015-04-01 03:49:05 UTC) #6
kouhei (in TOK)
yoav: Would you take a look?
5 years, 8 months ago (2015-04-02 05:11:40 UTC) #7
Yoav Weiss
Sorry for the delay :/ I think the test can be improved (possibly by using ...
5 years, 8 months ago (2015-04-02 05:29:09 UTC) #8
kouhei (in TOK)
https://codereview.chromium.org/1044133002/diff/20001/LayoutTests/fast/parser/badurl-base-preloader-crash.html File LayoutTests/fast/parser/badurl-base-preloader-crash.html (right): https://codereview.chromium.org/1044133002/diff/20001/LayoutTests/fast/parser/badurl-base-preloader-crash.html#newcode1 LayoutTests/fast/parser/badurl-base-preloader-crash.html:1: <base href="gopher:��&#279%�:0"></base> On 2015/04/02 05:29:09, Yoav Weiss wrote: > ...
5 years, 8 months ago (2015-04-02 06:19:39 UTC) #9
Yoav Weiss
On 2015/04/02 06:19:39, kouhei wrote: > https://codereview.chromium.org/1044133002/diff/20001/LayoutTests/fast/parser/badurl-base-preloader-crash.html > File LayoutTests/fast/parser/badurl-base-preloader-crash.html (right): > > https://codereview.chromium.org/1044133002/diff/20001/LayoutTests/fast/parser/badurl-base-preloader-crash.html#newcode1 > ...
5 years, 8 months ago (2015-04-02 06:54:18 UTC) #10
kouhei (in TOK)
> > > AFAIU you're just testing if the JS was applied, not if the ...
5 years, 8 months ago (2015-04-02 06:56:29 UTC) #11
kouhei (in TOK)
On 2015/04/02 06:56:29, kouhei wrote: > > > > AFAIU you're just testing if the ...
5 years, 8 months ago (2015-04-02 07:45:26 UTC) #12
Yoav Weiss
https://codereview.chromium.org/1044133002/diff/80001/LayoutTests/http/tests/loading/preload-ignore-invalid-base.html File LayoutTests/http/tests/loading/preload-ignore-invalid-base.html (right): https://codereview.chromium.org/1044133002/diff/80001/LayoutTests/http/tests/loading/preload-ignore-invalid-base.html#newcode11 LayoutTests/http/tests/loading/preload-ignore-invalid-base.html:11: shouldBeFalse("internals.isPreloaded('resources/fail.js');"); The script testing for isPreloaded should run inline ...
5 years, 8 months ago (2015-04-02 08:10:27 UTC) #13
kouhei (in TOK)
On 2015/04/02 08:10:27, Yoav Weiss wrote: > https://codereview.chromium.org/1044133002/diff/80001/LayoutTests/http/tests/loading/preload-ignore-invalid-base.html > File LayoutTests/http/tests/loading/preload-ignore-invalid-base.html (right): > > https://codereview.chromium.org/1044133002/diff/80001/LayoutTests/http/tests/loading/preload-ignore-invalid-base.html#newcode11 ...
5 years, 8 months ago (2015-04-02 08:17:55 UTC) #14
Yoav Weiss
On 2015/04/02 08:17:55, kouhei wrote: > On 2015/04/02 08:10:27, Yoav Weiss wrote: > > > ...
5 years, 8 months ago (2015-04-02 08:20:03 UTC) #15
kouhei (in TOK)
On 2015/04/02 08:20:03, Yoav Weiss wrote: > On 2015/04/02 08:17:55, kouhei wrote: > > On ...
5 years, 8 months ago (2015-04-02 08:29:04 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1044133002/100001
5 years, 8 months ago (2015-04-02 08:29:25 UTC) #19
commit-bot: I haz the power
5 years, 8 months ago (2015-04-02 09:49:04 UTC) #20
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=193019

Powered by Google App Engine
This is Rietveld 408576698