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

Side by Side Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 193623002: Use new is*Element() helper functions more in core/ code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 5 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2008 Holger Hans Peter Freyther 7 * Copyright (C) 2008 Holger Hans Peter Freyther
8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 } 1003 }
1004 1004
1005 newElement->beginParsingChildren(); 1005 newElement->beginParsingChildren();
1006 1006
1007 ScriptLoader* scriptLoader = toScriptLoaderIfPossible(newElement.get()); 1007 ScriptLoader* scriptLoader = toScriptLoaderIfPossible(newElement.get());
1008 if (scriptLoader) 1008 if (scriptLoader)
1009 m_scriptStartPosition = textPosition(); 1009 m_scriptStartPosition = textPosition();
1010 1010
1011 m_currentNode->parserAppendChild(newElement.get()); 1011 m_currentNode->parserAppendChild(newElement.get());
1012 1012
1013 if (newElement->hasTagName(HTMLNames::templateTag)) 1013 if (isHTMLTemplateElement(*newElement))
1014 pushCurrentNode(toHTMLTemplateElement(newElement.get())->content()); 1014 pushCurrentNode(toHTMLTemplateElement(*newElement).content());
1015 else 1015 else
1016 pushCurrentNode(newElement.get()); 1016 pushCurrentNode(newElement.get());
1017 1017
1018 if (newElement->hasTagName(HTMLNames::htmlTag)) 1018 if (isHTMLHtmlElement(*newElement))
1019 toHTMLHtmlElement(newElement)->insertedByParser(); 1019 toHTMLHtmlElement(*newElement).insertedByParser();
1020 1020
1021 if (!m_parsingFragment && isFirstElement && document()->frame()) 1021 if (!m_parsingFragment && isFirstElement && document()->frame())
1022 document()->frame()->loader().dispatchDocumentElementAvailable(); 1022 document()->frame()->loader().dispatchDocumentElementAvailable();
1023 } 1023 }
1024 1024
1025 void XMLDocumentParser::endElementNs() 1025 void XMLDocumentParser::endElementNs()
1026 { 1026 {
1027 if (isStopped()) 1027 if (isStopped())
1028 return; 1028 return;
1029 1029
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 sax.initialized = XML_SAX2_MAGIC; 1634 sax.initialized = XML_SAX2_MAGIC;
1635 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state); 1635 RefPtr<XMLParserContext> parser = XMLParserContext::createStringParser(&sax, &state);
1636 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />"; 1636 String parseString = "<?xml version=\"1.0\"?><attrs " + string + " />";
1637 parseChunk(parser->context(), parseString); 1637 parseChunk(parser->context(), parseString);
1638 finishParsing(parser->context()); 1638 finishParsing(parser->context());
1639 attrsOK = state.gotAttributes; 1639 attrsOK = state.gotAttributes;
1640 return state.attributes; 1640 return state.attributes;
1641 } 1641 }
1642 1642
1643 } // namespace WebCore 1643 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698