summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/html/HTMLEmbedElement.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/html/HTMLEmbedElement.cpp b/Source/WebCore/html/HTMLEmbedElement.cpp
index 9176d95be..ba830f041 100644
--- a/Source/WebCore/html/HTMLEmbedElement.cpp
+++ b/Source/WebCore/html/HTMLEmbedElement.cpp
@@ -28,6 +28,7 @@
#include "CSSPropertyNames.h"
#include "DocumentLoader.h"
#include "Frame.h"
+#include "FrameView.h"
#include "HTMLDocument.h"
#include "HTMLImageLoader.h"
#include "HTMLNames.h"
@@ -70,7 +71,9 @@ static inline RenderWidget* findWidgetRenderer(const Node* n)
RenderWidget* HTMLEmbedElement::renderWidgetForJSBindings() const
{
- document()->updateLayoutIgnorePendingStylesheets();
+ FrameView* view = document()->view();
+ if (!view || (!view->isInLayout() && !view->isPainting()))
+ document()->updateLayoutIgnorePendingStylesheets();
return findWidgetRenderer(this);
}