Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Issue 5708007: Have Chrome Frame "support" IE conditional comment tags (of the downlevel-hid... (Closed)

Created:
10 years ago by robertshield
Modified:
5 years, 8 months ago
Reviewers:
amit
CC:
chromium-reviews, amit, Paweł Hajdan Jr.
Visibility:
Public.

Description

Have Chrome Frame "support" IE conditional comment tags (of the downlevel-hidden variety) by ignoring them (rather than treating them as comment start/end) when parsing HTML streams. BUG=65627 TEST=chrome_frame_unittests.exe, also syntax like <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]--> will now activate CF. Offtopic: I wonder what happens if I paste HTML into CL comments. Heh. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69177

Patch Set 1 #

Total comments: 8

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -5 lines) Patch
M chrome_frame/html_utils.h View 1 1 chunk +8 lines, -1 line 0 comments Download
M chrome_frame/html_utils.cc View 1 3 chunks +33 lines, -3 lines 0 comments Download
M chrome_frame/test/html_util_unittests.cc View 1 chunk +101 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
robertshield
10 years ago (2010-12-13 22:01:14 UTC) #1
amit
Very nice and excellent tests. LGTM with a few nits. http://codereview.chromium.org/5708007/diff/1/chrome_frame/html_utils.cc File chrome_frame/html_utils.cc (right): http://codereview.chromium.org/5708007/diff/1/chrome_frame/html_utils.cc#newcode226 ...
10 years ago (2010-12-13 22:19:56 UTC) #2
robertshield
10 years ago (2010-12-13 22:29:28 UTC) #3
Thanks!

http://codereview.chromium.org/5708007/diff/1/chrome_frame/html_utils.cc
File chrome_frame/html_utils.cc (right):

http://codereview.chromium.org/5708007/diff/1/chrome_frame/html_utils.cc#newc...
chrome_frame/html_utils.cc:226: bool
HTMLScanner::IsIEConditionalCommentClose(StringRange* html_string,
On 2010/12/13 22:19:56, amit wrote:
> nit: const StringRange*?

Done.

http://codereview.chromium.org/5708007/diff/1/chrome_frame/html_utils.cc#newc...
chrome_frame/html_utils.cc:227: StrPos pos) {
On 2010/12/13 22:19:56, amit wrote:
> nit: indent

Done.

http://codereview.chromium.org/5708007/diff/1/chrome_frame/html_utils.cc#newc...
chrome_frame/html_utils.cc:230: return *(pos-1) == L']';
On 2010/12/13 22:19:56, amit wrote:
> In the following expression: <!--[if IE 8]>, is white space allowed between
the
> last > and preceeding ]?
> 

Not according to the spec
http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx#syntax

http://codereview.chromium.org/5708007/diff/1/chrome_frame/html_utils.cc#newc...
chrome_frame/html_utils.cc:258: if (StartsWith(tag_name, L"!--[if", true)) {
On 2010/12/13 22:19:56, amit wrote:
> Is white space allowed between '!--' and '['?

Again, not according to the spec.

Powered by Google App Engine
This is Rietveld 408576698