Bug 536097 - Copy endTag flag when copying HTML5 tokenizer state. rs=sicking.
authorHenri Sivonen <hsivonen@iki.fi>
Fri, 12 Mar 2010 12:27:15 +0200
changeset 39348 d2dfc88b95d02758b018828781a195538b0b96cd
parent 39347 1428074561688643dade4e207b72e46b21b51d44
child 39349 6ff8448d081eff38213978281ce0de2682bca554
push id12133
push userhsivonen@iki.fi
push dateFri, 12 Mar 2010 10:33:45 +0000
treeherdermozilla-central@6ff8448d081e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssicking
bugs536097
milestone1.9.3a3pre
Bug 536097 - Copy endTag flag when copying HTML5 tokenizer state. rs=sicking.
parser/html/nsHtml5Tokenizer.cpp
parser/html/nsHtml5TreeBuilder.cpp
--- a/parser/html/nsHtml5Tokenizer.cpp
+++ b/parser/html/nsHtml5Tokenizer.cpp
@@ -3866,16 +3866,17 @@ nsHtml5Tokenizer::resetToDataState()
   entCol = -1;
   lo = 0;
   hi = (nsHtml5NamedCharacters::NAMES.length - 1);
   candidate = -1;
   strBufMark = 0;
   prevValue = -1;
   value = 0;
   seenDigits = PR_FALSE;
+  endTag = PR_FALSE;
   shouldSuspend = PR_FALSE;
   initDoctypeFields();
   if (!!tagName) {
     tagName->release();
     tagName = nsnull;
   }
   if (!!attributeName) {
     attributeName->release();
@@ -3913,16 +3914,17 @@ nsHtml5Tokenizer::loadState(nsHtml5Token
   entCol = other->entCol;
   lo = other->lo;
   hi = other->hi;
   candidate = other->candidate;
   strBufMark = other->strBufMark;
   prevValue = other->prevValue;
   value = other->value;
   seenDigits = other->seenDigits;
+  endTag = other->endTag;
   shouldSuspend = PR_FALSE;
   nsHtml5Portability::releaseLocal(doctypeName);
   if (!other->doctypeName) {
     doctypeName = nsnull;
   } else {
     doctypeName = nsHtml5Portability::newLocalFromLocal(other->doctypeName, interner);
   }
   nsHtml5Portability::releaseString(systemIdentifier);
--- a/parser/html/nsHtml5TreeBuilder.cpp
+++ b/parser/html/nsHtml5TreeBuilder.cpp
@@ -1777,16 +1777,20 @@ nsHtml5TreeBuilder::startTag(nsHtml5Elem
                 goto starttagloop_end;
               }
               default: {
 
                 goto starttagloop_end;
               }
             }
           }
+          case NS_HTML5TREE_BUILDER_TEXT: {
+
+            goto starttagloop_end;
+          }
         }
       }
     }
   }
   starttagloop_end: ;
   if (needsPostProcessing && foreignFlag == NS_HTML5TREE_BUILDER_IN_FOREIGN && !hasForeignInScope()) {
     foreignFlag = NS_HTML5TREE_BUILDER_NOT_IN_FOREIGN;
   }