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(); |
} |