Add Parser flags initialization and fix flag-name typo

This commit is contained in:
iska
2015-03-01 23:50:04 +01:00
parent f0e5a7cb26
commit 41e2795d27
+8 -2
View File
@@ -34,8 +34,9 @@
HTMLElement *_formElementPointer;
BOOL _scriptingFlag;
BOOL _framesetOkFlag;
BOOL _fragmentParsingAlgorithm;
BOOL _fosterParting;
BOOL _fosterParenting;
}
@end
@@ -55,6 +56,11 @@
_stackOfOpenElements = [NSMutableArray new];
_tokenizer = [[HTMLTokenizer alloc] initWithString:string];
_scriptingFlag = NO;
_framesetOkFlag = YES;
_fragmentParsingAlgorithm = NO;
_fosterParenting = NO;
}
return self;
}
@@ -339,7 +345,7 @@
target = overrideTarget;
}
if (_fosterParting && matches(target.tagName, @"table", @"tbody", @"tfoot", @"thead", @"tr")) {
if (_fosterParenting && matches(target.tagName, @"table", @"tbody", @"tfoot", @"thead", @"tr")) {
HTMLElement *lastTemplate = nil;
HTMLElement *lastTable = nil;
for (HTMLElement *element in _stackOfOpenElements.reverseObjectEnumerator) {