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

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

Issue 596773002: Re-attach plugin renderers in the standard way. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 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/html/HTMLPlugInElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLPlugInElement.cpp
diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp
index 477ddddbc48c7f78fa61219ad2f415870bffff8c..107e71308eda5e0c611ebd75b42bfd9485e59875 100644
--- a/Source/core/html/HTMLPlugInElement.cpp
+++ b/Source/core/html/HTMLPlugInElement.cpp
@@ -70,7 +70,6 @@ HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tagName, Document& doc
, m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == ShouldPreferPlugInsForImages)
, m_usePlaceholderContent(false)
{
- setHasCustomStyleCallbacks();
}
HTMLPlugInElement::~HTMLPlugInElement()
@@ -245,13 +244,6 @@ RenderObject* HTMLPlugInElement::createRenderer(RenderStyle* style)
return new RenderEmbeddedObject(this);
}
-void HTMLPlugInElement::willRecalcStyle(StyleRecalcChange)
-{
- // FIXME: Why is this necessary? Manual re-attach is almost always wrong.
- if (!useFallbackContent() && !usePlaceholderContent() && needsWidgetUpdate() && renderer() && !isImageType())
- reattach();
-}
-
void HTMLPlugInElement::finishParsingChildren()
{
HTMLFrameOwnerElement::finishParsingChildren();
@@ -260,7 +252,7 @@ void HTMLPlugInElement::finishParsingChildren()
setNeedsWidgetUpdate(true);
if (inDocument())
- setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::Plugin));
+ lazyReattachIfNeeded();
}
void HTMLPlugInElement::resetInstance()
@@ -598,4 +590,10 @@ void HTMLPlugInElement::setUsePlaceholderContent(bool use)
}
}
+void HTMLPlugInElement::lazyReattachIfNeeded()
+{
+ if (!useFallbackContent() && !usePlaceholderContent() && needsWidgetUpdate() && renderer() && !isImageType())
+ lazyReattachIfAttached();
+}
+
}
« no previous file with comments | « Source/core/html/HTMLPlugInElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698