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

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

Issue 205683003: Update <video muted=""> handling to match spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update defaultMuted test 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/html/HTMLMediaElement.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) 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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 { 737 {
738 Document& document = ownerDocumentForCurrentNode(); 738 Document& document = ownerDocumentForCurrentNode();
739 // Only associate the element with the current form if we're creating the ne w element 739 // Only associate the element with the current form if we're creating the ne w element
740 // in a document with a browsing context (rather than in <template> contents ). 740 // in a document with a browsing context (rather than in <template> contents ).
741 HTMLFormElement* form = document.frame() ? m_form.get() : 0; 741 HTMLFormElement* form = document.frame() ? m_form.get() : 0;
742 // FIXME: This can't use HTMLConstructionSite::createElement because we 742 // FIXME: This can't use HTMLConstructionSite::createElement because we
743 // have to pass the current form element. We should rework form association 743 // have to pass the current form element. We should rework form association
744 // to occur after construction to allow better code sharing here. 744 // to occur after construction to allow better code sharing here.
745 RefPtr<Element> element = HTMLElementFactory::createHTMLElement(token->name( ), document, form, true); 745 RefPtr<Element> element = HTMLElementFactory::createHTMLElement(token->name( ), document, form, true);
746 setAttributes(element.get(), token, m_parserContentPolicy); 746 setAttributes(element.get(), token, m_parserContentPolicy);
747 element->finishParsingAttributes();
747 ASSERT(element->isHTMLElement()); 748 ASSERT(element->isHTMLElement());
748 return element.release(); 749 return element.release();
749 } 750 }
750 751
751 PassRefPtr<HTMLStackItem> HTMLConstructionSite::createElementFromSavedToken(HTML StackItem* item) 752 PassRefPtr<HTMLStackItem> HTMLConstructionSite::createElementFromSavedToken(HTML StackItem* item)
752 { 753 {
753 RefPtr<Element> element; 754 RefPtr<Element> element;
754 // NOTE: Moving from item -> token -> item copies the Attribute vector twice ! 755 // NOTE: Moving from item -> token -> item copies the Attribute vector twice !
755 AtomicHTMLToken fakeToken(HTMLToken::StartTag, item->localName(), item->attr ibutes()); 756 AtomicHTMLToken fakeToken(HTMLToken::StartTag, item->localName(), item->attr ibutes());
756 if (item->namespaceURI() == HTMLNames::xhtmlNamespaceURI) 757 if (item->namespaceURI() == HTMLNames::xhtmlNamespaceURI)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 void HTMLConstructionSite::fosterParent(PassRefPtr<Node> node) 854 void HTMLConstructionSite::fosterParent(PassRefPtr<Node> node)
854 { 855 {
855 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); 856 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert);
856 findFosterSite(task); 857 findFosterSite(task);
857 task.child = node; 858 task.child = node;
858 ASSERT(task.parent); 859 ASSERT(task.parent);
859 queueTask(task); 860 queueTask(task);
860 } 861 }
861 862
862 } 863 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698