Backport https://src.chromium.org/viewvc/blink?diff_format=u&view=revision&revision=195908 to chromium-44's WebKit as this is used by components/plugins/renderer/webview_plugin.cc. Also backport https://src.chromium.org/viewvc/blink?revision=195691&view=revision, same type of problem. -gmt --- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp 2015/05/26 12:35:04 195907 +++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp 2015/05/26 13:12:12 195908 @@ -413,6 +413,12 @@ invalidateRect(rect); } +void WebPluginContainerImpl::setNeedsLayout() +{ + if (m_element->layoutObject()) + m_element->layoutObject()->setNeedsLayout("Plugin needs layout"); +} + void WebPluginContainerImpl::reportGeometry() { // We cannot compute geometry without a parent or layoutObject. --- a/third_party/WebKit/Source/web/WebPluginContainerImpl.h 2015/05/26 12:35:04 195907 +++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.h 2015/05/26 13:12:12 195908 @@ -102,6 +102,7 @@ virtual void invalidate() override; virtual void invalidateRect(const WebRect&) override; virtual void scrollRect(const WebRect&) override; + virtual void setNeedsLayout() override; virtual void reportGeometry() override; virtual void allowScriptObjects() override; virtual void clearScriptObjects() override; --- a/third_party/WebKit/public/web/WebPluginContainer.h 2015/05/26 12:35:04 195907 +++ b/third_party/WebKit/public/web/WebPluginContainer.h 2015/05/26 13:12:12 195908 @@ -63,6 +63,12 @@ virtual void invalidateRect(const WebRect&) = 0; virtual void scrollRect(const WebRect&) = 0; + // Causes the container to be marked as needing layout, which in turn will cause + // layoutIfNeeded() to be called on any contained WebPlugin during the container's + // web view's lifecycle update, and in particular before calling paint() on the + // WebPlugin. + virtual void setNeedsLayout() = 0; + // Causes the container to report its current geometry via // WebPlugin::updateGeometry. virtual void reportGeometry() = 0; --- a/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp 2015/05/21 12:40:33 195690 +++ b/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp 2015/05/21 15:06:45 195691 @@ -193,6 +193,11 @@ void WebRuntimeFeatures::enablePagePopup RuntimeEnabledFeatures::setPagePopupEnabled(enable); } +void WebRuntimeFeatures::enablePermissionsAPI(bool enable) +{ + RuntimeEnabledFeatures::setPermissionsEnabled(enable); +} + void WebRuntimeFeatures::enableRequestAutocomplete(bool enable) { RuntimeEnabledFeatures::setRequestAutocompleteEnabled(enable); --- a/third_party/WebKit/public/web/WebRuntimeFeatures.h 2015/05/21 12:40:33 195690 +++ b/third_party/WebKit/public/web/WebRuntimeFeatures.h 2015/05/21 15:06:45 195691 @@ -101,6 +101,8 @@ public: BLINK_EXPORT static void enablePagePopup(bool); + BLINK_EXPORT static void enablePermissionsAPI(bool); + BLINK_EXPORT static void enableRequestAutocomplete(bool); BLINK_EXPORT static void enableScreenOrientation(bool);