WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
120826
DOMParser.parseFromString() should support creating HTML Document with mime-type text/html
https://bugs.webkit.org/show_bug.cgi?id=120826
Summary
DOMParser.parseFromString() should support creating HTML Document with mime-t...
Vivek Galatage
Reported
2013-09-05 21:38:48 PDT
The specification
http://domparsing.spec.whatwg.org/#the-domparser-interface
for DOMParser.parseFromString() allows the document creation if the mimeType is one of the supported types: ["text/html", "text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"] Also script elements get marked unexecutable and the contents of noscript get parsed as markup. blink review URL:
https://codereview.chromium.org/23903014/
Attachments
Patch
(9.67 KB, patch)
2013-09-05 21:43 PDT
,
Vivek Galatage
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2
(719.83 KB, application/zip)
2013-09-06 02:38 PDT
,
Build Bot
no flags
Details
Patch
(11.60 KB, patch)
2013-09-11 06:09 PDT
,
Vivek Galatage
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Vivek Galatage
Comment 1
2013-09-05 21:43:29 PDT
Created
attachment 210700
[details]
Patch
Build Bot
Comment 2
2013-09-06 02:38:43 PDT
Comment on
attachment 210700
[details]
Patch
Attachment 210700
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/1714115
New failing tests: media/video-object-fit.html
Build Bot
Comment 3
2013-09-06 02:38:44 PDT
Created
attachment 210713
[details]
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-09 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.4
Vivek Galatage
Comment 4
2013-09-06 02:49:15 PDT
(In reply to
comment #2
)
> (From update of
attachment 210700
[details]
) >
Attachment 210700
[details]
did not pass mac-wk2-ews (mac-wk2): > Output:
http://webkit-queues.appspot.com/results/1714115
> > New failing tests: > media/video-object-fit.html
I suppose the above failure is not related the proposed patch.
Ryosuke Niwa
Comment 5
2013-09-06 10:19:35 PDT
Comment on
attachment 210700
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=210700&action=review
> Source/WebCore/xml/DOMParser.cpp:29 > + if (!DOMImplementation::isXMLMIMEType(contentType) && contentType != "text/html")
isXMLMiMEType allows any MIME type that ends with +xml. That doesn't seem to match the spec.
Darin Adler
Comment 6
2013-09-06 12:39:43 PDT
Comment on
attachment 210700
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=210700&action=review
>> Source/WebCore/xml/DOMParser.cpp:29 >> + if (!DOMImplementation::isXMLMIMEType(contentType) && contentType != "text/html") > > isXMLMiMEType allows any MIME type that ends with +xml. That doesn't seem to match the spec.
Lets make sure we have some test coverage for this, either way. Some bogus type that ends in "+xml" to make sure we don’t support it. Also, should this be case sensitive or not? Need test coverage for that too.
Vivek Galatage
Comment 7
2013-09-11 06:09:06 PDT
Created
attachment 211302
[details]
Patch
Vivek Galatage
Comment 8
2013-09-11 07:19:02 PDT
(In reply to
comment #6
)
> (From update of
attachment 210700
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=210700&action=review
> > >> Source/WebCore/xml/DOMParser.cpp:29 > >> + if (!DOMImplementation::isXMLMIMEType(contentType) && contentType != "text/html") > > > > isXMLMiMEType allows any MIME type that ends with +xml. That doesn't seem to match the spec. > > Lets make sure we have some test coverage for this, either way. Some bogus type that ends in "+xml" to make sure we don’t support it. > > Also, should this be case sensitive or not? Need test coverage for that too.
FF and opera 12 raise exception in case of type mismatch or incorrect case. Matching our behavior with it. Also made changes in order to support only listed types. Please take a look, thank you.
WebKit Commit Bot
Comment 9
2013-09-11 18:40:48 PDT
Comment on
attachment 211302
[details]
Patch Clearing flags on attachment: 211302 Committed
r155584
: <
http://trac.webkit.org/changeset/155584
>
WebKit Commit Bot
Comment 10
2013-09-11 18:40:51 PDT
All reviewed patches have been landed. Closing bug.
Lucas Forschler
Comment 11
2019-02-06 09:03:10 PST
Mass moving XML DOM bugs to the "DOM" Component.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug