|
|
Created:
4 years, 9 months ago by hyunjunekim2 Modified:
4 years, 9 months ago CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, dglazkov+blink, krit, eae+blinkwatch, f(malita), gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, sof, tfarina Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix SVGDocument return title that is not a child of the root element
The title element should be a child of the root element.
But currently return invalid title that is not a child of
the root element.
Because on getting, if the root element is an svg element in the SVG
namespace, then let value ba a concatenation of the data of all
the child Text nodes of the first title element in the SVG namespace
that is a child of the root element.[1]
And on setting, let element be the first title element in the SVG
namespace that is a child of the root element, if any.
If there isn't one, create a title element in the SVG namespace,
insert it as the first child of the root element, and let element
be that element.[1]
About a patch reverted[2][3], didn't consider inner svg document
in <html> or etc but is not <svg>.
If be inner svg document and insert <title> element that is not
svg namespace two times, occurred to crash.
Because call the member function of instance(m_titleElement)
that is null.
And added crash case that is
set-title-element-on-inner-svg-document.html.
[1] https://html.spec.whatwg.org/multipage/dom.html#document.title
[2] https://codereview.chromium.org/1771703003/
[3] https://codereview.chromium.org/1752713002/
BUG=543061, 592323
Committed: https://crrev.com/962d172872d7097c7074c6597fd52732882a1d9f
Cr-Commit-Position: refs/heads/master@{#380634}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #Patch Set 5 : #
Total comments: 6
Patch Set 6 : #Patch Set 7 : #Patch Set 8 : #
Total comments: 3
Patch Set 9 : #Patch Set 10 : #
Total comments: 5
Patch Set 11 : #Patch Set 12 : #Patch Set 13 : #
Total comments: 2
Patch Set 14 : #Messages
Total messages: 64 (40 generated)
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] [1] https://html.spec.whatwg.org/multipage/dom.html#document.title BUG=543061 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] [1] https://html.spec.whatwg.org/multipage/dom.html#document.title BUG=543061 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] [1] https://html.spec.whatwg.org/multipage/dom.html#document.title BUG=543061 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About patch reverted[2], [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] BUG=543061 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About patch reverted[2], [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] BUG=543061 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About patch reverted[2], [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About patch reverted[2], [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document, [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document, [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element[2]. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[3], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://html.spec.whatwg.org/multipage/infrastructure.html#root-element [3] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element[2]. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[3], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://html.spec.whatwg.org/multipage/infrastructure.html#root-element [3] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document on <html> and Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document on <html> and Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document on <html> and file extension is svg. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document on <html> and file extension is svg. Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document on <html> and file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document on <html> and file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document on <html> and the file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document on <html> and the file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document in <html> and the file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document in <html> and the file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document in <html> and concurrently the file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ==========
hyunjune.kim@samsung.com changed reviewers: + fs@opera.com, pdr@chromium.org
fs, pdr Hi, Could you check this patch and give me advice? Thank you.
On 2016/03/08 16:20:36, hyunjunekim2 wrote: > fs, pdr > Hi, Could you check this patch and give me advice? > Thank you. Added Test(file-extension-svg-and-inner-svg-document.svg). this case is crash.
On 2016/03/08 at 16:21:55, hyunjune.kim wrote: > On 2016/03/08 16:20:36, hyunjunekim2 wrote: > > fs, pdr > > Hi, Could you check this patch and give me advice? > > Thank you. > > Added Test(file-extension-svg-and-inner-svg-document.svg). this case is crash. "Because shouldn't use documentElement function, then want to get root element of the document." Could you expand on what you mean by this please? I guess the above document will get an image/svg+xml content type based on the file extension and thus get marked as "SVG document". Please also add a link to the old code review. https://codereview.chromium.org/1774913003/diff/80001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/svg/dom/file-extension-svg-and-inner-svg-document.svg (right): https://codereview.chromium.org/1774913003/diff/80001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/svg/dom/file-extension-svg-and-inner-svg-document.svg:1: <html xmlns="http://www.w3.org/1999/xhtml" xlink="http://www.w3.org/1999/xlink"> xlink="..." is not useful for anything (to declare/open the xlink NS you'd do xmlns:xlink="...", but you don't use the xlink NS in any way here, so just drop this and the same thing below.) https://codereview.chromium.org/1774913003/diff/80001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/svg/dom/file-extension-svg-and-inner-svg-document.svg:3: <script src="../../resources/js-test.js"></script> Use testharness.js instead (there no need to involve the testRunner in this test.) https://codereview.chromium.org/1774913003/diff/80001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/svg/dom/file-extension-svg-and-inner-svg-document.svg:13: testRunner.waitUntilDone(); You don't need waitUntilDone in this case, because your calling notifyDone within the same script-execution. And the test completes before onload.
On 2016/03/08 at 17:05:26, fs wrote: > On 2016/03/08 at 16:21:55, hyunjune.kim wrote: > > On 2016/03/08 16:20:36, hyunjunekim2 wrote: ... > Please also add a link to the old code review. Disregard this, I saw it now. *blind*
On 2016/03/08 at 17:05:26, fs wrote: > On 2016/03/08 at 16:21:55, hyunjune.kim wrote: > > On 2016/03/08 16:20:36, hyunjunekim2 wrote: > > > fs, pdr > > > Hi, Could you check this patch and give me advice? > > > Thank you. > > > > Added Test(file-extension-svg-and-inner-svg-document.svg). this case is crash. > > "Because shouldn't use documentElement function, > then want to get root element of the document." > > Could you expand on what you mean by this please? I guess the above document will get an image/svg+xml content type based on the file extension and thus get marked as "SVG document". Looking at the TC, it looks like the problem would be that the second call to Document::setTitleElement results in Traversal<SVGTitleElement>::firstWithin returning nullptr, and then then m_titleElement->parentNode() will be a null-dereference? So an additional null-check upon the original fix would suffice.
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2], didn't consider inner svg document in <html> and concurrently the file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> and concurrently the file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> and concurrently the file extension is svg such as "*.svg". Because shouldn't use documentElement function, then want to get root element of the document. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. Because [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. Because [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. Because [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. Because [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because when insert at second time, |m_titleElement| is null. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because when insert at second time, |m_titleElement| is null. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because when insert at second time, |m_titleElement| that is attribute of the document is null. If call member functions of |m_titleElement|, crash. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because when insert at second time, |m_titleElement| that is attribute of the document is null. If call member functions of |m_titleElement|, crash. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. When insert at second time, |m_titleElement| that is attribute of the document is null. If call member functions of |m_titleElement|, crash. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. When insert at second time, |m_titleElement| that is attribute of the document is null. If call member functions of |m_titleElement|, crash. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. When insert at second time, |m_titleElement| that is attribute of the document is null. If call member functions of |m_titleElement|, crash. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. When insert at second time, |m_titleElement| that is attribute of the document is null. If call member functions of |m_titleElement|, crash. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because it recognizes the root element wrong. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because it recognizes the root element wrong. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because it recognizes the root element wrong. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because it recognizes the root element wrong. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because it recognizes the root element wrong. And added crash test that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because it recognizes the root element wrong. And added crash test that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because it recognizes the root element wrong. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occur to crash. Because it recognizes the root element wrong. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. So Through iterator, find the root element from <title> element. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. So Through iterator, find the root element from <title> element. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. So through iterator, find the root element from <title> element. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. So through iterator, find the root element from <title> element. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. So through iterator, find the root element from <title> element. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. So through iterator, find the root element from <title> element. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. So through iterator, find the root element from <title> element. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
fs, Could you check this patch? > So an additional null-check upon the original fix would suffice. Add null-check logic. For cover this case, // svg != SVG var doc = document.implementation.createDocument(SVG_NAMESPACE, "SVG", null); doc.documentElement.appendChild(doc.createElementNS(HTML_NAMESPACE, "title")); doc.documentElement.lastChild.textContent = "bar"; assert_equals(doc.title, "bar"); doc.documentElement.appendChild(doc.createElementNS(HTML_NAMESPACE, "title")); doc.documentElement.lastChild.textContent = "foo"; assert_equals(doc.title, "foo"); If this case is correct, i'll make a test about this case. https://codereview.chromium.org/1774913003/diff/80001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/svg/dom/file-extension-svg-and-inner-svg-document.svg (right): https://codereview.chromium.org/1774913003/diff/80001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/svg/dom/file-extension-svg-and-inner-svg-document.svg:1: <html xmlns="http://www.w3.org/1999/xhtml" xlink="http://www.w3.org/1999/xlink"> On 2016/03/08 17:05:26, fs wrote: > xlink="..." is not useful for anything (to declare/open the xlink NS you'd do > xmlns:xlink="...", but you don't use the xlink NS in any way here, so just drop > this and the same thing below.) Done. Remove this test. https://codereview.chromium.org/1774913003/diff/80001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/svg/dom/file-extension-svg-and-inner-svg-document.svg:3: <script src="../../resources/js-test.js"></script> On 2016/03/08 17:05:26, fs wrote: > Use testharness.js instead (there no need to involve the testRunner in this > test.) Done. https://codereview.chromium.org/1774913003/diff/80001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/svg/dom/file-extension-svg-and-inner-svg-document.svg:13: testRunner.waitUntilDone(); On 2016/03/08 17:05:26, fs wrote: > You don't need waitUntilDone in this case, because your calling notifyDone > within the same script-execution. And the test completes before onload. Done. Remove this test.
On 2016/03/09 at 15:54:46, hyunjune.kim wrote: ... > For cover this case, > > // svg != SVG > var doc = document.implementation.createDocument(SVG_NAMESPACE, "SVG", null); > doc.documentElement.appendChild(doc.createElementNS(HTML_NAMESPACE, "title")); > doc.documentElement.lastChild.textContent = "bar"; > assert_equals(doc.title, "bar"); > > doc.documentElement.appendChild(doc.createElementNS(HTML_NAMESPACE, "title")); > doc.documentElement.lastChild.textContent = "foo"; > > assert_equals(doc.title, "foo"); > > If this case is correct, i'll make a test about this case. Yes, that's probably a reasonable interpretation of the specification. I'd suggest that you check the behavior in other browsers too though. https://codereview.chromium.org/1774913003/diff/140001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html (right): https://codereview.chromium.org/1774913003/diff/140001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html:9: var svgDoc = doc.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null); You don't need to create another document (to just transplant its doc-root). Just doc.createElementNS(...) should be enough. https://codereview.chromium.org/1774913003/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1774913003/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/dom/Document.cpp:1338: while (parent) { I don't think you need this while-loop.
Add test(set-title-html-namespace-on-SVG.html).
> Yes, that's probably a reasonable interpretation of the specification. I'd > suggest that you check the behavior in other browsers too though. Ok, I'll check them(IE and firefox).
fs, I rewrote codes on the document. Could you check PS15(code, tests)? Thank you.
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because it recognizes the root element wrong. So through iterator, find the root element from <title> element. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because call the member function of instance(m_titleElement) that is null. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because call the member function of instance(m_titleElement) that is null. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because call the member function of instance(m_titleElement) that is null. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
https://codereview.chromium.org/1774913003/diff/180001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1774913003/diff/180001/third_party/WebKit/Sou... third_party/WebKit/Source/core/dom/Document.cpp:1336: // If the root element is an svg element in the SVG namespace, then let value be the child Maybe you'd be better served to just fold this logic into the above block. Then hopefully the comments could be paired with reasonably corresponding code and thus make more sense. Then maybe the code could be written in a more "forward" way, i.e maybe like: // If the root element is an svg element in the SVG namespace, ... if (isSVGSVGElement(documentElement())) { m_titleElement = Traversal<SVGTitleElement>::firstChild(*documentElement()); } else { m_titleElement = Traversal<HTMLTitleElement>::firstWithin(*this); } or whatever. https://codereview.chromium.org/1774913003/diff/180001/third_party/WebKit/Sou... third_party/WebKit/Source/core/dom/Document.cpp:1344: // Otherwise, let value be the child text content of the title element. This comment is very confusing together with the code that follows - i.e it's very hard to connect the two.
fs, Could you give me advice? Also I will check other browsers. Thank you. https://codereview.chromium.org/1774913003/diff/140001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html (right): https://codereview.chromium.org/1774913003/diff/140001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/svg/dom/set-title-element-on-inner-svg-document.html:9: var svgDoc = doc.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null); On 2016/03/09 16:06:48, fs wrote: > You don't need to create another document (to just transplant its doc-root). > Just doc.createElementNS(...) should be enough. Done. https://codereview.chromium.org/1774913003/diff/180001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1774913003/diff/180001/third_party/WebKit/Sou... third_party/WebKit/Source/core/dom/Document.cpp:1332: if (!m_titleElement) Moved it. https://codereview.chromium.org/1774913003/diff/180001/third_party/WebKit/Sou... third_party/WebKit/Source/core/dom/Document.cpp:1336: // If the root element is an svg element in the SVG namespace, then let value be the child On 2016/03/10 14:41:47, fs wrote: > Maybe you'd be better served to just fold this logic into the above block. Then > hopefully the comments could be paired with reasonably corresponding code and > thus make more sense. Then maybe the code could be written in a more "forward" > way, i.e maybe like: > > // If the root element is an svg element in the SVG namespace, ... > if (isSVGSVGElement(documentElement())) { > m_titleElement = Traversal<SVGTitleElement>::firstChild(*documentElement()); > } else { > m_titleElement = Traversal<HTMLTitleElement>::firstWithin(*this); > } > > or whatever. Done. https://codereview.chromium.org/1774913003/diff/180001/third_party/WebKit/Sou... third_party/WebKit/Source/core/dom/Document.cpp:1344: // Otherwise, let value be the child text content of the title element. On 2016/03/10 14:41:47, fs wrote: > This comment is very confusing together with the code that follows - i.e it's > very hard to connect the two. Done.
On 2016/03/10 at 15:00:44, hyunjune.kim wrote: ... > https://codereview.chromium.org/1774913003/diff/180001/third_party/WebKit/Sou... > third_party/WebKit/Source/core/dom/Document.cpp:1336: // If the root element is an svg element in the SVG namespace, then let value be the child > On 2016/03/10 14:41:47, fs wrote: > > Maybe you'd be better served to just fold this logic into the above block. Then > > hopefully the comments could be paired with reasonably corresponding code and > > thus make more sense. Then maybe the code could be written in a more "forward" > > way, i.e maybe like: > > > > // If the root element is an svg element in the SVG namespace, ... > > if (isSVGSVGElement(documentElement())) { > > m_titleElement = Traversal<SVGTitleElement>::firstChild(*documentElement()); > > } else { > > m_titleElement = Traversal<HTMLTitleElement>::firstWithin(*this); > > } > > > > or whatever. > > Done. I don't see this being "Done."
On 2016/03/10 15:09:37, fs wrote: > On 2016/03/10 at 15:00:44, hyunjune.kim wrote: > ... > > > https://codereview.chromium.org/1774913003/diff/180001/third_party/WebKit/Sou... > > third_party/WebKit/Source/core/dom/Document.cpp:1336: // If the root element > is an svg element in the SVG namespace, then let value be the child > > On 2016/03/10 14:41:47, fs wrote: > > > Maybe you'd be better served to just fold this logic into the above block. > Then > > > hopefully the comments could be paired with reasonably corresponding code > and > > > thus make more sense. Then maybe the code could be written in a more > "forward" > > > way, i.e maybe like: > > > > > > // If the root element is an svg element in the SVG namespace, ... > > > if (isSVGSVGElement(documentElement())) { > > > m_titleElement = > Traversal<SVGTitleElement>::firstChild(*documentElement()); > > > } else { > > > m_titleElement = Traversal<HTMLTitleElement>::firstWithin(*this); > > > } > > > > > > or whatever. > > > > Done. > > I don't see this being "Done." fs, Rewrote code in a more "forward". Could you check PS13?
https://codereview.chromium.org/1774913003/diff/240001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1774913003/diff/240001/third_party/WebKit/Sou... third_party/WebKit/Source/core/dom/Document.cpp:1323: if (m_titleElement && documentElement() == m_titleElement->parentNode()) { Traversal<SVGTitleElement>::firstChild guarantees that the returned element is a) a child of the node passed to it, b) is a SVGTitleElement. So both this line and the next are redundant (always hold if Traversal<SVGTitleElement>::firstChild return non-null.)
fs, Could you check PS14? Thank you. https://codereview.chromium.org/1774913003/diff/240001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/1774913003/diff/240001/third_party/WebKit/Sou... third_party/WebKit/Source/core/dom/Document.cpp:1323: if (m_titleElement && documentElement() == m_titleElement->parentNode()) { On 2016/03/10 16:47:01, fs wrote: > Traversal<SVGTitleElement>::firstChild guarantees that the returned element is > a) a child of the node passed to it, b) is a SVGTitleElement. > > So both this line and the next are redundant (always hold if > Traversal<SVGTitleElement>::firstChild return non-null.) Done.
lgtm
On 2016/03/10 17:09:41, fs wrote: > lgtm > Yes, that's probably a reasonable interpretation of the specification. I'd > suggest that you check the behavior in other browsers too though. + How to test behavior Run tests 1. document.title-09.html 2. set-title-html-namespace-on-SVG.html (crash test, new) 3. svg-document-set-title-mutations.html (new) + Results Firefox 45.0 Pass document.title-09.html Pass set-title-html-namespace-on-SVG.html Pass svg-document-set-title-mutations.html IE 11.0.9600.17843 Pass document.title-09.html Pass set-title-html-namespace-on-SVG.html Pass svg-document-set-title-mutations.html Chromium without this patch Fail document.title-09.html Pass set-title-html-namespace-on-SVG.html Fail svg-document-set-title-mutations.html fs, Will landing this patch? Thank you.
On 2016/03/11 at 08:56:42, hyunjune.kim wrote: > On 2016/03/10 17:09:41, fs wrote: > > lgtm > > > Yes, that's probably a reasonable interpretation of the specification. I'd > > suggest that you check the behavior in other browsers too though. > > + How to test behavior > Run tests > 1. document.title-09.html > 2. set-title-html-namespace-on-SVG.html (crash test, new) > 3. svg-document-set-title-mutations.html (new) > > + Results > Firefox 45.0 > Pass document.title-09.html > Pass set-title-html-namespace-on-SVG.html > Pass svg-document-set-title-mutations.html > > IE 11.0.9600.17843 > Pass document.title-09.html > Pass set-title-html-namespace-on-SVG.html > Pass svg-document-set-title-mutations.html > > Chromium without this patch > Fail document.title-09.html > Pass set-title-html-namespace-on-SVG.html > Fail svg-document-set-title-mutations.html > > fs, Will landing this patch? Go ahead.
The CQ bit was checked by hyunjune.kim@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1774913003/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1774913003/260001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by hyunjune.kim@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1774913003/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1774913003/260001
Message was sent while issue was closed.
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because call the member function of instance(m_titleElement) that is null. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because call the member function of instance(m_titleElement) that is null. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ==========
Message was sent while issue was closed.
Committed patchset #14 (id:260001)
Message was sent while issue was closed.
Description was changed from ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because call the member function of instance(m_titleElement) that is null. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 ========== to ========== Fix SVGDocument return title that is not a child of the root element The title element should be a child of the root element. But currently return invalid title that is not a child of the root element. Because on getting, if the root element is an svg element in the SVG namespace, then let value ba a concatenation of the data of all the child Text nodes of the first title element in the SVG namespace that is a child of the root element.[1] And on setting, let element be the first title element in the SVG namespace that is a child of the root element, if any. If there isn't one, create a title element in the SVG namespace, insert it as the first child of the root element, and let element be that element.[1] About a patch reverted[2][3], didn't consider inner svg document in <html> or etc but is not <svg>. If be inner svg document and insert <title> element that is not svg namespace two times, occurred to crash. Because call the member function of instance(m_titleElement) that is null. And added crash case that is set-title-element-on-inner-svg-document.html. [1] https://html.spec.whatwg.org/multipage/dom.html#document.title [2] https://codereview.chromium.org/1771703003/ [3] https://codereview.chromium.org/1752713002/ BUG=543061, 592323 Committed: https://crrev.com/962d172872d7097c7074c6597fd52732882a1d9f Cr-Commit-Position: refs/heads/master@{#380634} ==========
Message was sent while issue was closed.
Patchset 14 (id:??) landed as https://crrev.com/962d172872d7097c7074c6597fd52732882a1d9f Cr-Commit-Position: refs/heads/master@{#380634} |