Last Comment Bug 514412 - about:blank should derefence to an empty stream
: about:blank should derefence to an empty stream
Status: RESOLVED FIXED
: html5
Product: Core
Classification: Components
Component: Networking (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: mozilla1.9.3a5
Assigned To: Steffen Wilberg
:
Mentors:
http://www.whatwg.org/specs/web-apps/...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-03 07:05 PDT by Henri Sivonen (:hsivonen)
Modified: 2010-06-18 00:10 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (3.04 KB, patch)
2010-04-23 13:47 PDT, Steffen Wilberg
bzbarsky: review+
hsivonen: feedback+
Details | Diff | Review

Description Henri Sivonen (:hsivonen) 2009-09-03 07:05:38 PDT
Steps to reproduce:
 1) Load about:blank
 2) View source.

Actual results:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body></body></html>

Expected results:
Per http://www.whatwg.org/specs/web-apps/current-work/#fetching-resources expected the source to be empty.

Additional info:
This affects the DOM you get from <iframe src="about:blank"></iframe>. With the empty string, the doctype and the title element shouldn't be in the DOM.
Comment 1 Henri Sivonen (:hsivonen) 2009-09-03 07:10:53 PDT
See also http://www.ietf.org/id/draft-holsten-about-uri-scheme-02.txt
Comment 2 Biju 2009-12-19 06:32:01 PST
link view-source:about:blank
Comment 3 winner5 2010-03-01 03:23:48 PST
It should have Content-Type: text/plain; charset="utf-8" and be an empty document. Not Another one Content-Type: text/html; charset="iso-8859-2" empty document shown in quirks mode. We promote standards, not IE.
Comment 4 Wikiwide 2010-03-07 02:33:57 PST
I have found this bug because I don't like the fact that Firefox uses Quirks mode for about:blank.
Comment 5 winner5 2010-03-07 13:06:52 PST
Firefox should completely get rid of quirks mode and start to control markup syntax strictly. (sorry for my English). It should use only XHTML 1.1 because of the strict error checking and develop itself in that direction, develop in XHTML 2.0 rendering (W3C should start works on it again), not for another soup of tags, called HTML 5.
Comment 6 Henri Sivonen (:hsivonen) 2010-03-07 23:40:01 PST
(In reply to comment #4)
> I have found this bug because I don't like the fact that Firefox uses Quirks
> mode for about:blank.

Could you please elaborate on what kind of problems the quirks modeness of about:blank causes to you in practice?
Comment 7 winner5 2010-03-08 02:22:41 PST
I did not write that comment, but I can show tou problems with it I can see.
At first:
https://bugzilla.mozilla.org/show_bug.cgi?id=514412#c0
At second:
Firefox still uses quirks mode and do not show people that era of IE faded away permamently, and websites, or rather files, like that:
http://www.mif.pg.gda.pl/homepages/rsob/
still are created. Quirks mode should be completely deprecated and thrown out from the Internet and all browsers.
At third:
Firefox promotes strict standards, not soup of tags, and that is not exactly like 'We believe that the internet should be public, open and accessible.'
Comment 8 Wikiwide 2010-03-08 02:50:54 PST
(In reply to comment #6)
> (In reply to comment #4)
> > I have found this bug because I don't like the fact that Firefox uses Quirks
> > mode for about:blank.
> 
> Could you please elaborate on what kind of problems the quirks modeness of
> about:blank causes to you in practice?

In practice, this bug doesn't cause any problems. But the quirks mode is the most conspicuous part of the bug for a general user. I have never known that about:blank should refer to an empty stream, but everybody has heard that quirky mode is against standard. That's why I considered it a bug - and found it here and voted for it (how can such an empty page use a quirky mode? it has no vendor-specific elements).
Comment 9 Steffen Wilberg 2010-04-23 13:47:50 PDT
Created attachment 441142 [details] [diff] [review]
patch

I had to change the expected result of the designmode test.
Old: <head><title></title></head><body>abc</body>
New: <head></head><body>abc</body>

Should the mime type be changed to text/plain?
Comment 10 Steffen Wilberg 2010-04-23 13:51:45 PDT
Probably not:

> Applications resolving the URI "about:blank" MUST return a resource of zero
> length, containing no data, with the media type "text/html" and the character
> encoding "UTF-8".
http://tools.ietf.org/html/draft-holsten-about-uri-scheme-04#section-5.1.1
Comment 11 Henri Sivonen (:hsivonen) 2010-04-27 06:46:28 PDT
Comment on attachment 441142 [details] [diff] [review]
patch

Looks good to me.
Comment 12 Boris Zbarsky [:bz] 2010-04-27 12:14:02 PDT
Comment on attachment 441142 [details] [diff] [review]
patch

OK, let's give his a shot...  I assume this still creates an <html> and <body> in the sink, right?
Comment 13 Steffen Wilberg 2010-04-27 13:56:56 PDT
How do I tell? Both Firebug and DOM Inspector show <html>, <head> and <body>. Only <title> is missing.
Comment 14 Boris Zbarsky [:bz] 2010-04-27 14:11:19 PDT
> Both Firebug and DOM Inspector show <html>, <head> and <body>.

Then the answer to my question is "yes".  ;)

Note You need to log in before you can comment on or make changes to this bug.