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

Unified Diff: Source/core/html/HTMLFrameElementBase.cpp

Issue 24066002: Remove ShouldSetAttached flag to lazyAttach (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use setNeedsStyleRecalc() in HTMLFrameElementBase Created 7 years, 3 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/core/dom/Node.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFrameElementBase.cpp
diff --git a/Source/core/html/HTMLFrameElementBase.cpp b/Source/core/html/HTMLFrameElementBase.cpp
index ffe15f84921b709e5c095eb7237d99e82228a22c..6d7ae602554b53532c7a87bea7e623d9f563d1e2 100644
--- a/Source/core/html/HTMLFrameElementBase.cpp
+++ b/Source/core/html/HTMLFrameElementBase.cpp
@@ -163,13 +163,12 @@ void HTMLFrameElementBase::didNotifySubtreeInsertions(ContainerNode*)
return;
// JavaScript in src=javascript: and beforeonload can access the renderer
- // during attribute parsing *before* the normal parser machinery would
- // attach the element. To support this, we lazyAttach here, but only
- // if we don't already have a renderer (if we're inserted
- // as part of a DocumentFragment, insertedInto from an earlier element
- // could have forced a style resolve and already attached us).
+ // during attribute parsing *before* the call to lazyAttach in ContainerNode,
+ // so mark ourself as needing a style recalc to ensure the renderer gets created
+ // if needed.
+ // FIXME: Letting script run before calling lazyAttach on all the nodes is probably bad.
if (!renderer())
- lazyAttach(DoNotSetAttached);
+ setNeedsStyleRecalc();
setNameAndOpenURL();
}
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698