Instantiate WebKit plug-ins at layout time, instead of at style resolution time
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Aug 2016 01:31:17 +0000 (01:31 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Aug 2016 01:31:17 +0000 (01:31 +0000)
commitde892345184bc9bcab8c69355be76671930b07b5
tree233952358ac453b63172ec628bfe3e16741c3944
parent2433fe53e95cf4ffed3be7ee975c1743e3de3c3e
Instantiate WebKit plug-ins at layout time, instead of at style resolution time
https://bugs.webkit.org/show_bug.cgi?id=160715

Reviewed by Tim Horton.

Source/WebCore:

This gets rid of the differentiation of WebKit plug-ins and Netscape plug-ins, and
always instantiates plug-ins at layout time.

Initially, plug-ins were always instantiated after style recalc, but that lead to bugs
where plug-ins wouldn't be instantiated with their correct size. Fixing that bug lead
to a regression in the Web Clip widget which is why the special casing was introduced.

The Web Clip widget has now been fixed, so we can get rid of the special case.

* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
* html/HTMLAppletElement.h:
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLEmbedElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateWidget):
* html/HTMLObjectElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::isImageType):
(WebCore::HTMLPlugInImageElement::wouldLoadAsPlugIn):
(WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
(WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin): Deleted.
* html/HTMLPlugInImageElement.h:
* loader/EmptyClients.h:
* loader/FrameLoaderTypes.h:
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::shouldUsePlugin):
* page/FrameView.cpp:
(WebCore::FrameView::updateEmbeddedObject):

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::objectContentType):

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::objectContentType):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAppletElement.cpp
Source/WebCore/html/HTMLAppletElement.h
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLEmbedElement.h
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLObjectElement.h
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.h
Source/WebCore/loader/EmptyClients.h
Source/WebCore/loader/FrameLoaderTypes.h
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/page/FrameView.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp