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

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 371413004: Fix for input/datalist failure when datalist is created outside document (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another approach Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/forms/datalist/datalist-inside-shadow-dom-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 6d8dc594f20539c21e4f8d93fbd9c4eee9d1dbf5..ab5730fc585d2ee2f73f2cd267b65b419f6a6d78 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -44,6 +44,7 @@
#include "core/events/MutationEvent.h"
#include "core/html/HTMLCollection.h"
#include "core/html/HTMLFrameOwnerElement.h"
+#include "core/html/HTMLInputElement.h"
#include "core/html/HTMLTagCollection.h"
#include "core/html/RadioNodeList.h"
#include "core/inspector/InspectorInstrumentation.h"
@@ -780,6 +781,9 @@ void ContainerNode::notifyNodeInserted(Node& root)
NodeVector postInsertionNotificationTargets;
notifyNodeInsertedInternal(root, postInsertionNotificationTargets);
+ if (isHTMLInputElement(root) && toHTMLInputElement(root).dataList())
+ toHTMLInputElement(root).listAttributeTargetChanged();
esprehn 2014/07/16 19:43:49 I think you might want to use didNotifySubtreeInse
+
for (size_t i = 0; i < postInsertionNotificationTargets.size(); ++i) {
Node* targetNode = postInsertionNotificationTargets[i].get();
if (targetNode->inDocument())
« no previous file with comments | « LayoutTests/fast/forms/datalist/datalist-inside-shadow-dom-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698