Changeset 170743 in webkit
- Timestamp:
- Jul 2, 2014, 8:31:05 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r170738 r170743 1 2014-07-02 Roger Fong <roger_fong@apple.com> 2 3 Improve handling of primary offscreen plugins. 4 https://bugs.webkit.org/show_bug.cgi?id=134528. 5 <rdar://problem/17471864> 6 7 Reviewed by Dean Jackson. 8 9 * WebProcess/Plugins/PluginView.cpp: 10 Determine whether or not the plugin starts offscreen when the plugin is initialized. 11 (WebKit::PluginView::initializePlugin): 12 (WebKit::PluginView::pluginSnapshotTimerFired): 13 * WebProcess/WebPage/WebPage.cpp: 14 (WebKit::WebPage::createPlugin): 15 Use the PluginProcessTypeNormal for offscreen plugins that are potentially primary plugins. 16 1 17 2014-07-02 Enrica Casucci <enrica@apple.com> 2 18 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
r170423 r170743 592 592 } 593 593 594 HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(m_pluginElement.get()); 595 m_didPlugInStartOffScreen = !m_webPage->plugInIntersectsSearchRect(*plugInImageElement); 594 596 m_plugin->initialize(this, m_parameters); 595 597 … … 1713 1715 HTMLPlugInImageElement* plugInImageElement = toHTMLPlugInImageElement(m_pluginElement.get()); 1714 1716 bool isPlugInOnScreen = m_webPage->plugInIntersectsSearchRect(*plugInImageElement); 1715 if (!m_countSnapshotRetries)1716 m_didPlugInStartOffScreen = !isPlugInOnScreen;1717 1718 1717 bool plugInCameOnScreen = isPlugInOnScreen && m_didPlugInStartOffScreen; 1719 1718 bool snapshotFound = false; -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r170725 r170743 617 617 PassRefPtr<Plugin> WebPage::createPlugin(WebFrame* frame, HTMLPlugInElement* pluginElement, const Plugin::Parameters& parameters, String& newMIMEType) 618 618 { 619 HTMLPlugInImageElement& pluginImageElement = toHTMLPlugInImageElement(*pluginElement); 619 620 String frameURLString = frame->coreFrame()->loader().documentLoader()->responseURL().string(); 620 621 String pageURLString = m_page->mainFrame().loader().documentLoader()->responseURL().string(); 621 PluginProcessType processType = pluginElement->displayState() == HTMLPlugInElement::WaitingForSnapshot ? PluginProcessTypeSnapshot : PluginProcessTypeNormal;622 622 unsigned pluginArea = 0; 623 PluginProcessType processType = pluginElement->displayState() == HTMLPlugInElement::WaitingForSnapshot && !(plugInIsPrimarySize(pluginImageElement, pluginArea) && !plugInIntersectsSearchRect(pluginImageElement))? PluginProcessTypeSnapshot : PluginProcessTypeNormal; 623 624 bool allowOnlyApplicationPlugins = !frame->coreFrame()->loader().subframeLoader().allowPlugins(NotAboutToInstantiatePlugin); 624 625
Note:
See TracChangeset
for help on using the changeset viewer.