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

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

Issue 139743005: Replace RenderFullScreen with top layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: needs baseline Created 6 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
Index: Source/core/html/HTMLPlugInElement.cpp
diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp
index 0b2df23c31693eb216d32f4f308cd4248aba55c8..9fe43cc0d199c215aca354dbe07bacb5c08625ee 100644
--- a/Source/core/html/HTMLPlugInElement.cpp
+++ b/Source/core/html/HTMLPlugInElement.cpp
@@ -68,6 +68,7 @@ HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tagName, Document& doc
, m_needsWidgetUpdate(!createdByParser)
, m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == ShouldPreferPlugInsForImages)
, m_displayState(Playing)
+ , m_protectWidgetDuringReattach(0)
{
setHasCustomStyleCallbacks();
}
@@ -118,6 +119,16 @@ void HTMLPlugInElement::attach(const AttachContext& context)
if (!renderer() || useFallbackContent())
return;
+
+ if (m_protectWidgetDuringReattach) {
+ if (RenderEmbeddedObject* object = renderEmbeddedObject()) {
+ setNeedsWidgetUpdate(false);
+ object->setWidget(m_protectWidgetDuringReattach.get());
+ }
+ m_protectWidgetDuringReattach.clear();
+ return;
+ }
+
if (isImageType()) {
if (!m_imageLoader)
m_imageLoader = adoptPtr(new HTMLImageLoader(this));
@@ -144,6 +155,9 @@ void HTMLPlugInElement::updateWidget()
void HTMLPlugInElement::detach(const AttachContext& context)
{
+ if (context.performingReattach && renderEmbeddedObject())
+ m_protectWidgetDuringReattach = pluginWidget();
+
// Update the widget the next time we attach (detaching destroys the plugin).
// FIXME: None of this "needsWidgetUpdate" related code looks right.
if (renderer() && !useFallbackContent())

Powered by Google App Engine
This is Rietveld 408576698