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

Unified Diff: Source/WebCore/dom/Element.cpp

Issue 11846002: Merge 138131 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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 | « Source/WebCore/dom/Element.h ('k') | Source/WebCore/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/Element.cpp
===================================================================
--- Source/WebCore/dom/Element.cpp (revision 139387)
+++ Source/WebCore/dom/Element.cpp (working copy)
@@ -1101,16 +1101,19 @@
if (!insertionPoint->isInTreeScope())
return InsertionDone;
+ TreeScope* scope = insertionPoint->treeScope();
+ if (scope != treeScope())
+ return InsertionDone;
+
const AtomicString& idValue = getIdAttribute();
if (!idValue.isNull())
- updateId(nullAtom, idValue);
+ updateId(scope, nullAtom, idValue);
const AtomicString& nameValue = getNameAttribute();
if (!nameValue.isNull())
updateName(nullAtom, nameValue);
if (hasTagName(labelTag)) {
- TreeScope* scope = treeScope();
if (scope->shouldCacheLabelsByForAttribute())
updateLabel(scope, nullAtom, fastGetAttribute(forAttr));
}
@@ -1134,9 +1137,9 @@
setSavedLayerScrollOffset(IntSize());
- if (insertionPoint->inDocument()) {
+ if (insertionPoint->isInTreeScope() && treeScope() == document()) {
const AtomicString& idValue = getIdAttribute();
- if (!idValue.isNull() && inDocument())
+ if (!idValue.isNull())
updateId(insertionPoint->treeScope(), idValue, nullAtom);
const AtomicString& nameValue = getNameAttribute();
« no previous file with comments | « Source/WebCore/dom/Element.h ('k') | Source/WebCore/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698