RESOLVED FIXED 44422
`document.compatMode` is `undefined` when using `application/xhtml+xml`
https://bugs.webkit.org/show_bug.cgi?id=44422
Summary `document.compatMode` is `undefined` when using `application/xhtml+xml`
Mathias Bynens
Reported 2010-08-23 07:29:09 PDT
Created attachment 65115 [details] Example XHTML5 document. When served with the correct MIME type (application/xhtml+xml), `document.compatMode` will be undefined. As the title says, `document.compatMode` is `undefined` when using `application/xhtml+xml`. I would have expected a value of "CSS1Compat" instead. You can test this using the example XHTML5 document (see attachment) or on <http://mathiasbynens.be/demo/xhtml5>.
Attachments
Example XHTML5 document. When served with the correct MIME type (application/xhtml+xml), `document.compatMode` will be undefined. (242 bytes, application/xhtml+xml)
2010-08-23 07:29 PDT, Mathias Bynens
no flags
Patch (4.89 KB, patch)
2010-09-14 00:52 PDT, Adam Barth
commit-queue: commit-queue-
Alexey Proskuryakov
Comment 1 2010-08-23 11:35:09 PDT
Confirmed with r65737.
Adam Barth
Comment 2 2010-09-14 00:27:22 PDT
Sayth the spec: The compatMode IDL attribute must return the literal string "CSS1Compat" unless the document has been set to quirks mode by the HTML parser, in which case it must instead return the literal string "BackCompat".
Adam Barth
Comment 3 2010-09-14 00:52:58 PDT
Eric Seidel (no email)
Comment 4 2010-09-14 03:49:52 PDT
Comment on attachment 67525 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=67525&action=prettypatch Seems fine to me. Can you get into quirks mode for XML?
Ms2ger (he/him; ⌚ UTC+1/+2)
Comment 5 2010-09-14 04:02:50 PDT
(In reply to comment #4) > (From update of attachment 67525 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=67525&action=prettypatch > > Seems fine to me. Can you get into quirks mode for XML? No.
Adam Barth
Comment 6 2010-09-14 10:32:56 PDT
Comment on attachment 67525 [details] Patch Nope. Only the HTML parser can put you in quirk mode (AFAIK).
WebKit Commit Bot
Comment 7 2010-09-14 15:22:03 PDT
Comment on attachment 67525 [details] Patch Rejecting patch 67525 from commit-queue. Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing,media', '--quiet']" exit_code: 1 Running build-dumprendertree Compiling Java tests make: Nothing to be done for `default'. Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests Testing 20991 test cases. fast/css/visited-link-hang.html -> failed Exiting early after 1 failures. 6198 tests run. 120.64s total testing time 6197 test cases (99%) succeeded 1 test case (<1%) had incorrect layout Full output: http://queues.webkit.org/results/4038011
Adam Barth
Comment 8 2010-09-14 15:40:27 PDT
Comment on attachment 67525 [details] Patch commit-queue bug should be fixed now.
Adam Barth
Comment 9 2010-09-14 16:27:31 PDT
Comment on attachment 67525 [details] Patch Clearing flags on attachment: 67525 Committed r67512: <http://trac.webkit.org/changeset/67512>
Adam Barth
Comment 10 2010-09-14 16:27:36 PDT
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 11 2010-09-14 16:58:12 PDT
Comment on attachment 67525 [details] Patch Rejecting patch 67525 from commit-queue. Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--force']" exit_code: 1 Last 500 characters of output: tching file WebCore/html/HTMLDocument.cpp Hunk #1 FAILED at 136. 1 out of 1 hunk FAILED -- saving rejects to file WebCore/html/HTMLDocument.cpp.rej patching file WebCore/html/HTMLDocument.h Hunk #1 FAILED at 50. 1 out of 1 hunk FAILED -- saving rejects to file WebCore/html/HTMLDocument.h.rej patching file LayoutTests/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file LayoutTests/fast/parser/compatMode-in-xhtml-expected.txt patching file LayoutTests/fast/parser/compatMode-in-xhtml.xhtml Full output: http://queues.webkit.org/results/4027013
Note You need to log in before you can comment on or make changes to this bug.