Closed
Bug 713810
Opened 11 years ago
Closed 11 years ago
"View Selection Source" generates XHTML, which is then (incorrectly) syntax highlighted.
Categories
(Toolkit :: View Source, defect)
Toolkit
View Source
Tracking
()
People
(Reporter: henry.fai.hang.chan, Assigned: hsivonen)
References
Details
(Keywords: regression, Whiteboard: [qa+][qa!:11][qa!:12])
Attachments
(3 files)
334 bytes,
text/html
|
Details | |
363 bytes,
text/html
|
Details | |
2.88 KB,
patch
|
Gavin
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0a1) Gecko/20111227 Firefox/12.0a1 Build ID: 20111227031015 Steps to reproduce: Select and view source an HTML document. Actual results: The first element has a xmlns="http://www.w3.org/1999/xhtml" attribute appended. iframes are self closing (/>) and thus text after it fails to be highlighted correctly in the html5 syntax highlighter. Expected results: text/html view source should dump html5 code. text/xml view source should dump xml code.
Comment 1•11 years ago
|
||
Seems to be caused by selfclosing elements. Such as <script/> and <a/> on this page. I have no idea why there's a selfclosing 'a' element, but there is
Reporter | ||
Comment 2•11 years ago
|
||
it happens everywhere even on html5 validating pages which don't ever have /> in them. The view selection source code generator is dumping xhtml code at the wrong time.
There is a new View source parser in Firefox 11 or 12 (bug 482921). Can you provide some sample URL where this happens? Is this the same as bug 503039?
Component: General → View Source
Depends on: 482921
Product: Firefox → Toolkit
QA Contact: general → view.source
Mozilla/5.0 (Windows NT 5.1; rv:12.0a1) Gecko/20111227 Firefox/12.0a1 Confirming with the attached testcase
Status: UNCONFIRMED → NEW
tracking-firefox12:
--- → ?
Ever confirmed: true
Keywords: regression
Summary: View Selection Source generates XHTML, which is then (incorrectly) syntax highlighted. → "View Selection Source" generates XHTML, which is then (incorrectly) syntax highlighted.
Reporter | ||
Comment 6•11 years ago
|
||
@aceman this is firefox 12. seen on firefox 11 as well. @aceman and @jj I meant about HTML5 documents showing up XHTML markup (and forced appending of XHTML attributes when they didn't exist in original document).
Reporter | ||
Comment 7•11 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Attachment #585182 -
Attachment mime type: text/plain → text/html
Reporter | ||
Comment 8•11 years ago
|
||
==Action 1== Result of testcase: the <html> becomes <html xmlns="http://www.w3.org/1999/xhtml"> iframe becomes self closing syntax not highlighted after iframe. Expected result: no attribute appended (it's not even there in firebug or web inspector.) iframe is not self closing. syntax highlighted after iframe. ==Action2== Result: <div xmlns="http://www.w3.org/1999/xhtml">Select All, and then View Selection Source.</div> Expected Result: <div>Select All, and then View Selection Source.</div> This bug is about HTML spitting out as XHTML, then incorrect syntax highlighting.
Assignee | ||
Comment 9•11 years ago
|
||
This is odd. The View Source changes shouldn't have affected the serialization step in View Selection Source.
Updated•11 years ago
|
Assignee | ||
Comment 10•11 years ago
|
||
My wild guess is that this bug was caused by correctness fixes to createDocument() rather than changes to the View Source back end. As usual with front end code, I have no clue what kind of unit test this should have.
Assignee | ||
Updated•11 years ago
|
OS: Windows 7 → All
Hardware: x86 → All
status-firefox10:
--- → affected
status-firefox11:
--- → affected
status-firefox12:
--- → affected
tracking-firefox10:
--- → ?
tracking-firefox11:
--- → ?
Version: 12 Branch → Trunk
Updated•11 years ago
|
Attachment #589477 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 11•11 years ago
|
||
Thanks for the r. https://hg.mozilla.org/integration/mozilla-inbound/rev/d0db3841139c
Comment 12•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d0db3841139c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Comment 13•11 years ago
|
||
No need to track for FF10/11. We'd consider uplifting for FF11 Aurora if nominated, but this bug does not need to be tracked for release. The "Page Source" Web Developer tool still has proper highlighting.
Assignee | ||
Comment 14•11 years ago
|
||
Comment on attachment 589477 [details] [diff] [review] Use the HTMLness mode of the original doc for the serialization [Approval Request Comment] Regression caused by (bug #): Unknown. Something that changed document.createDocument() most likely. User impact if declined: View Selection Source looks wrong for HTML documents. Testing completed (on m-c, etc.): Has baked on m-c without complaints. Risk to taking this patch (and alternatives if risky): Very low risk.
Attachment #589477 -
Flags: approval-mozilla-aurora?
Comment 15•11 years ago
|
||
Comment on attachment 589477 [details] [diff] [review] Use the HTMLness mode of the original doc for the serialization [Triage Comment] Recent regression and low risk - approved for Aurora.
Attachment #589477 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 16•11 years ago
|
||
Thanks for the approval. Landed. https://hg.mozilla.org/releases/mozilla-aurora/rev/c826632d845f
tracking-firefox-esr10:
--- → ?
Comment 17•10 years ago
|
||
Minusing for tracking-esr10. It's affected, but we will not fix minor functional regressions unless they affect enterprise users significantly.
status-firefox-esr10:
--- → affected
Comment 18•10 years ago
|
||
(In reply to Alex Keybl [:akeybl] from comment #13) > The "Page Source" Web Developer tool still has proper highlighting. "View Selection Source" is a snapshot of current DOM and is partly unrelated to "Page source".
Comment 19•10 years ago
|
||
(In reply to henry.fai.hang.chan from comment #8) > ==Action 1== > Result of testcase: > the <html> becomes <html xmlns="http://www.w3.org/1999/xhtml"> > iframe becomes self closing > syntax not highlighted after iframe. > > Expected result: > no attribute appended (it's not even there in firebug or web inspector.) > iframe is not self closing. > syntax highlighted after iframe. > > ==Action2== > Result: > <div xmlns="http://www.w3.org/1999/xhtml">Select All, and then View > Selection Source.</div> > > Expected Result: > <div>Select All, and then View Selection Source.</div> > > This bug is about HTML spitting out as XHTML, then incorrect syntax > highlighting. FF 11b3: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0 Action 1 - the issue is still reproducible <html xmlns="http://www.w3.org/1999/xhtml"> Action 2 - the issue is not reproducible <div>Select All, and then View Selection Source.</div> Same results on FF 12.
Assignee | ||
Comment 20•10 years ago
|
||
(In reply to Paul Silaghi [QA] from comment #19) > Action 1 - the issue is still reproducible > <html xmlns="http://www.w3.org/1999/xhtml"> The source of the test case actually contains xmlns="http://www.w3.org/1999/xhtml"
Comment 21•10 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #20) > (In reply to Paul Silaghi [QA] from comment #19) > > Action 1 - the issue is still reproducible > > <html xmlns="http://www.w3.org/1999/xhtml"> > > The source of the test case actually contains > xmlns="http://www.w3.org/1999/xhtml" Indeed, there is no xmlns attribute appended. But there is still one difference: test case: <div style="height:2em;background:gold"></div> view selection source: <div style="height: 2em; background: none repeat scroll 0% 0% gold;"></div> What do you think?
Assignee | ||
Comment 22•10 years ago
|
||
(In reply to Paul Silaghi [QA] from comment #21) > Indeed, there is no xmlns attribute appended. > But there is still one difference: > test case: <div style="height:2em;background:gold"></div> > view selection source: <div style="height: 2em; background: none repeat > scroll 0% 0% gold;"></div> > What do you think? That is a separate bug outside the scope of this bug.
Comment 23•10 years ago
|
||
Verified fixed on FF 11b4: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0 Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0 New bug 731172 filed.
Updated•10 years ago
|
Whiteboard: [qa+] → [qa+][qa!:11]
Comment 24•10 years ago
|
||
Verified fixed on FF 12b1: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20100101 Firefox/12.0
Whiteboard: [qa+][qa!:11] → [qa+][qa!:11][qa!:12]
Updated•3 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•