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

Side by Side Diff: Source/core/html/parser/HTMLConstructionSite.cpp

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Hack for XML prefix Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 632
633 void HTMLConstructionSite::insertScriptElement(AtomicHTMLToken* token) 633 void HTMLConstructionSite::insertScriptElement(AtomicHTMLToken* token)
634 { 634 {
635 // http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.h tml#already-started 635 // http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.h tml#already-started
636 // http://html5.org/specs/dom-parsing.html#dom-range-createcontextualfragmen t 636 // http://html5.org/specs/dom-parsing.html#dom-range-createcontextualfragmen t
637 // For createContextualFragment, the specifications say to mark it parser-in serted and already-started and later unmark them. 637 // For createContextualFragment, the specifications say to mark it parser-in serted and already-started and later unmark them.
638 // However, we short circuit that logic to avoid the subtree traversal to fi nd script elements since scripts can never see 638 // However, we short circuit that logic to avoid the subtree traversal to fi nd script elements since scripts can never see
639 // those flags or effects thereof. 639 // those flags or effects thereof.
640 const bool parserInserted = m_parserContentPolicy != AllowScriptingContentAn dDoNotMarkAlreadyStarted; 640 const bool parserInserted = m_parserContentPolicy != AllowScriptingContentAn dDoNotMarkAlreadyStarted;
641 const bool alreadyStarted = m_isParsingFragment && parserInserted; 641 const bool alreadyStarted = m_isParsingFragment && parserInserted;
642 RefPtr<HTMLScriptElement> element = HTMLScriptElement::create(scriptTag, own erDocumentForCurrentNode(), parserInserted, alreadyStarted); 642 RefPtr<HTMLScriptElement> element = HTMLScriptElement::create(ownerDocumentF orCurrentNode(), parserInserted, alreadyStarted);
643 setAttributes(element.get(), token, m_parserContentPolicy); 643 setAttributes(element.get(), token, m_parserContentPolicy);
644 if (scriptingContentIsAllowed(m_parserContentPolicy)) 644 if (scriptingContentIsAllowed(m_parserContentPolicy))
645 attachLater(currentNode(), element); 645 attachLater(currentNode(), element);
646 m_openElements.push(HTMLStackItem::create(element.release(), token)); 646 m_openElements.push(HTMLStackItem::create(element.release(), token));
647 } 647 }
648 648
649 void HTMLConstructionSite::insertForeignElement(AtomicHTMLToken* token, const At omicString& namespaceURI) 649 void HTMLConstructionSite::insertForeignElement(AtomicHTMLToken* token, const At omicString& namespaceURI)
650 { 650 {
651 ASSERT(token->type() == HTMLToken::StartTag); 651 ASSERT(token->type() == HTMLToken::StartTag);
652 notImplemented(); // parseError when xmlns or xmlns:xlink are wrong. 652 notImplemented(); // parseError when xmlns or xmlns:xlink are wrong.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 void HTMLConstructionSite::fosterParent(PassRefPtr<Node> node) 851 void HTMLConstructionSite::fosterParent(PassRefPtr<Node> node)
852 { 852 {
853 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); 853 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert);
854 findFosterSite(task); 854 findFosterSite(task);
855 task.child = node; 855 task.child = node;
856 ASSERT(task.parent); 856 ASSERT(task.parent);
857 queueTask(task); 857 queueTask(task);
858 } 858 }
859 859
860 } 860 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698