Closed
Bug 699356
Opened 13 years ago
Closed 13 years ago
"Source of: [URL]" does not appear in the title bar with HTML5 parser-based View Source
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla11
Tracking | Status | |
---|---|---|
firefox10 | --- | unaffected |
People
(Reporter: hsivonen, Assigned: hsivonen)
References
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
smaug
:
review+
christian
:
approval-mozilla-aurora-
|
Details | Diff | Splinter Review |
STR: 1) View Source Actual results: The title bar doesn't say "Source of: [URL]" Expected results: Expected it to say "Source of: [URL]"
Comment 1•13 years ago
|
||
In this code, mURL is never set. http://mxr.mozilla.org/mozilla-central/source/parser/html/nsHtml5Highlighter.cpp#122
Assignee | ||
Comment 3•13 years ago
|
||
The mochitest fails. It sees the right title element but not the right window title. However, visual inspection shows that the window title looks right.
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•13 years ago
|
||
See bug 702448 comment 11 about the mochitest todo that this patch leaves in place.
Attachment #576918 -
Attachment is obsolete: true
Attachment #577928 -
Flags: review?(bugs)
Comment 5•13 years ago
|
||
Comment on attachment 577928 [details] [diff] [review] Add URL to the document title >+nsHtml5StreamParser::SetURL(nsIURI* aURL) >+{ >+ if (aURL) { >+ nsCOMPtr<nsIURI> temp; >+ bool isViewSource; >+ aURL->SchemeIs("view-source", &isViewSource); >+ if (isViewSource) { >+ nsCOMPtr<nsINestedURI> nested = do_QueryInterface(aURL); >+ NS_ASSERTION(nested, "URI with scheme view-source didn't QI to nested!"); Useless assertion. There will be crash anyway pointing to the right place. >+ nested->GetInnerURI(getter_AddRefs(temp)); >+ } else { >+ temp = aURL; >+ } >+ bool isData; >+ temp->SchemeIs("data", &isData); >+ if (isData) { >+ // Avoid showing potentially huge data: URLs >+ mURL.AssignLiteral("data:\xE2\x80\xA6"); Please explain what \xE2\x80\xA6 means >+ /** >+ * Sets the URL for View Source title. If aURL is a view-source: URL, >+ * takes the inner URL. >+ */ >+ void SetURL(nsIURI* aURL); ... > /** >+ * The URL of the document being parsed. >+ */ >+ nsCString mURL; >+ This is kind of strange. SetURL sets the URL for View Source, but mURL is about document... some inconsistency here. Also, since data: url handling is special, mURL is wrong. Maybe mURLforViewSourceTitle; or something like that, and rename also SetURL
Attachment #577928 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 6•13 years ago
|
||
Is it OK to do the same s/aURL/aTitle/ substitution in the already-reviewed bug 703965, too?
Attachment #577928 -
Attachment is obsolete: true
Attachment #577981 -
Flags: review?(bugs)
Updated•13 years ago
|
Attachment #577981 -
Flags: review?(bugs) → review+
Comment 7•13 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #6) > Is it OK to do the same s/aURL/aTitle/ substitution in the already-reviewed > bug 703965, too? Should be ok.
Assignee | ||
Comment 8•13 years ago
|
||
Thanks. https://hg.mozilla.org/integration/mozilla-inbound/rev/38814e0bafb9
Target Milestone: --- → mozilla11
Comment 9•13 years ago
|
||
Backed out on inbound (along with two other bugs from the same push) because of test failures: https://hg.mozilla.org/integration/mozilla-inbound/rev/20a24dd3f56b
Target Milestone: mozilla11 → ---
Comment 10•13 years ago
|
||
Re-landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/b03e24707280
Comment 11•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b03e24707280
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Assignee | ||
Updated•13 years ago
|
status-firefox10:
--- → affected
Assignee | ||
Comment 12•13 years ago
|
||
Comment on attachment 577981 [details] [diff] [review] Add URL to the document title, v2 (This comment has been posted on all the bugs mentioned in this comment, except bug 710142, so that the release drivers see it regardless of the order in which they process approval requests.) The new View Source implementation landed before Firefox 10 moved to Aurora. Afterwards, a bunch of regressions were identified. Many of the regression fixes didn't land before Firefox 10 moved to Aurora but they have now been fixed on trunk except for bug 710142. To avoid shipping with regressions, we either need to land all the regression fixes on Aurora for Firefox 10 (followed by a fix for bug 710142 in Beta if it doesn't make it before Dec 20th) or switch back to the old View Source implementation on Aurora. The new View Source implementation provides much better diagnostics for Web developers than the old View Source implementation. So I'd like to ask the release drivers to either approve bug 535530, bug 699356, bug 699365, bug 700034, bug 700361, bug 703965, bug 704667 and bug 705473 plus bug 695640, which is a non-regression tweak, or to approve bug 710175 for reverting to the old View Source implementation for Firefox 10.
Attachment #577981 -
Flags: approval-mozilla-aurora?
Comment 13•13 years ago
|
||
Comment on attachment 577981 [details] [diff] [review] Add URL to the document title, v2 [triage comment] We decided to back out the new view source parser (bug 710175) rather than take this fixup for Firefox 10. Denying for Aurora.
Attachment #577981 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
You need to log in
before you can comment on or make changes to this bug.
Description
•