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

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

Issue 2561043002: Clean-up after Form Association Refactoring (Closed)
Patch Set: Removed constructorNeedsFormElement from scripts and HTMLTagNames Created 4 years 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
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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 for (const auto& attribute : token->attributes()) 929 for (const auto& attribute : token->attributes())
930 element->setAttribute(attribute.name(), attribute.value()); 930 element->setAttribute(attribute.name(), attribute.value());
931 931
932 // "9. If will execute script is true, then ..." etc. The CEReactionsScope 932 // "9. If will execute script is true, then ..." etc. The CEReactionsScope
933 // and ThrowOnDynamicMarkupInsertionCountIncrementer destructors implement 933 // and ThrowOnDynamicMarkupInsertionCountIncrementer destructors implement
934 // steps 9.1-3. 934 // steps 9.1-3.
935 } else { 935 } else {
936 // FIXME: This can't use HTMLConstructionSite::createElement because we have 936 // FIXME: This can't use HTMLConstructionSite::createElement because we have
937 // to pass the current form element. We should rework form association to 937 // to pass the current form element. We should rework form association to
938 // occur after construction to allow better code sharing here. 938 // occur after construction to allow better code sharing here.
939 element = HTMLElementFactory::createHTMLElement( 939 element = HTMLElementFactory::createHTMLElement(token->name(), document,
940 token->name(), document, form, getCreateElementFlags()); 940 getCreateElementFlags());
941 if (FormAssociated* formAssociatedElement = 941 if (FormAssociated* formAssociatedElement =
942 element->toFormAssociatedOrNull()) { 942 element->toFormAssociatedOrNull()) {
943 formAssociatedElement->associateWith(form); 943 formAssociatedElement->associateWith(form);
944 } 944 }
945 // Definition for the created element does not exist here and it cannot be 945 // Definition for the created element does not exist here and it cannot be
946 // custom or failed. 946 // custom or failed.
947 DCHECK_NE(element->getCustomElementState(), CustomElementState::Custom); 947 DCHECK_NE(element->getCustomElementState(), CustomElementState::Custom);
948 DCHECK_NE(element->getCustomElementState(), CustomElementState::Failed); 948 DCHECK_NE(element->getCustomElementState(), CustomElementState::Failed);
949 949
950 // "8. Append each attribute in the given token to element." 950 // "8. Append each attribute in the given token to element."
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 ASSERT(task.parent); 1072 ASSERT(task.parent);
1073 queueTask(task); 1073 queueTask(task);
1074 } 1074 }
1075 1075
1076 DEFINE_TRACE(HTMLConstructionSite::PendingText) { 1076 DEFINE_TRACE(HTMLConstructionSite::PendingText) {
1077 visitor->trace(parent); 1077 visitor->trace(parent);
1078 visitor->trace(nextChild); 1078 visitor->trace(nextChild);
1079 } 1079 }
1080 1080
1081 } // namespace blink 1081 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698