Bug 704667 - Take transitions from the comment start state to the data state into account when doing syntax highlighting. r=smaug.
authorHenri Sivonen <hsivonen@iki.fi>
Tue, 29 Nov 2011 08:55:09 +0200
changeset 80919 54f41501ef8928167376e7aa420243215e9c72ff
parent 80918 44ed0b73a4210e4da0e8631f37215fcfe0c1ebf6
child 80920 7b4d7154db3690f3398ddbcf73842b7bbfeef7cb
push id3643
push userhsivonen@iki.fi
push dateTue, 29 Nov 2011 06:56:18 +0000
treeherdermozilla-inbound@7b4d7154db36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs704667
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 704667 - Take transitions from the comment start state to the data state into account when doing syntax highlighting. r=smaug.
parser/html/nsHtml5Highlighter.cpp
parser/htmlparser/tests/reftest/bug704667-1-ref.html
parser/htmlparser/tests/reftest/bug704667-1.html
parser/htmlparser/tests/reftest/reftest.list
--- a/parser/html/nsHtml5Highlighter.cpp
+++ b/parser/html/nsHtml5Highlighter.cpp
@@ -329,16 +329,17 @@ nsHtml5Highlighter::Transition(PRInt32 a
           break;
         default:
           FinishTag();
           break;
       }
       break;
       // most comment states are omitted, because they don't matter to
       // highlighting
+    case NS_HTML5TOKENIZER_COMMENT_START:
     case NS_HTML5TOKENIZER_COMMENT_END:
     case NS_HTML5TOKENIZER_COMMENT_END_BANG:
     case NS_HTML5TOKENIZER_COMMENT_START_DASH:
     case NS_HTML5TOKENIZER_BOGUS_COMMENT:
     case NS_HTML5TOKENIZER_BOGUS_COMMENT_HYPHEN:
       if (aState == NS_HTML5TOKENIZER_DATA) {
         AddClass(sComment);
         FinishTag();
new file mode 100644
--- /dev/null
+++ b/parser/htmlparser/tests/reftest/bug704667-1-ref.html
@@ -0,0 +1,1 @@
+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><span class="error comment">&lt;!--&gt;</span> <span class="error comment">&lt;!X&gt;</span>
new file mode 100644
--- /dev/null
+++ b/parser/htmlparser/tests/reftest/bug704667-1.html
@@ -0,0 +1,1 @@
+<!--> <!X>
--- a/parser/htmlparser/tests/reftest/reftest.list
+++ b/parser/htmlparser/tests/reftest/reftest.list
@@ -11,8 +11,9 @@ fails-if(/^Windows\x20NT\x206\.1/.test(h
 == bug659763-3.html bug659763-3-ref.html
 == bug659763-4.html bug659763-4-ref.html
 == bug659763-5.html bug659763-5-ref.html
 == bug659763-6.html bug659763-6-ref.html
 == view-source:bug673094-1.html view-source:bug673094-1-ref.html
 == bug696651-1.html bug696651-1-ref.html
 == bug696651-2.html bug696651-2-ref.html
 == view-source:bug700260-1.html view-source:bug700260-1-ref.html
+== view-source:bug704667-1.html bug704667-1-ref.html