Title: [148911] trunk/Source/WebKit2
- Revision
- 148911
- Author
- [email protected]
- Date
- 2013-04-22 13:46:06 -0700 (Mon, 22 Apr 2013)
Log Message
Slow/beachballing when using the find bar on a page with plug-ins
https://bugs.webkit.org/show_bug.cgi?id=114990
<rdar://problem/12832313>
Reviewed by Tim Horton.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::notifyWidget):
Call shouldCreateTransientPaintingSnapshot().
(WebKit::PluginView::shouldCreateTransientPaintingSnapshot):
Don't create a painting snapshot if we're asked to paint the find indicator.
* WebProcess/Plugins/PluginView.h:
Add new member function.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (148910 => 148911)
--- trunk/Source/WebKit2/ChangeLog 2013-04-22 20:40:57 UTC (rev 148910)
+++ trunk/Source/WebKit2/ChangeLog 2013-04-22 20:46:06 UTC (rev 148911)
@@ -1,3 +1,21 @@
+2013-04-22 Anders Carlsson <[email protected]>
+
+ Slow/beachballing when using the find bar on a page with plug-ins
+ https://bugs.webkit.org/show_bug.cgi?id=114990
+ <rdar://problem/12832313>
+
+ Reviewed by Tim Horton.
+
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::notifyWidget):
+ Call shouldCreateTransientPaintingSnapshot().
+
+ (WebKit::PluginView::shouldCreateTransientPaintingSnapshot):
+ Don't create a painting snapshot if we're asked to paint the find indicator.
+
+ * WebProcess/Plugins/PluginView.h:
+ Add new member function.
+
2013-04-22 Alexey Proskuryakov <[email protected]>
<rdar://problem/13334446> [Mac] Tweak sandbox profiles.
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (148910 => 148911)
--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2013-04-22 20:40:57 UTC (rev 148910)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2013-04-22 20:46:06 UTC (rev 148911)
@@ -929,7 +929,7 @@
{
switch (notification) {
case WillPaintFlattened:
- if (m_plugin && m_isInitialized)
+ if (shouldCreateTransientPaintingSnapshot())
m_transientPaintingSnapshot = m_plugin->snapshot();
break;
case DidPaintFlattened:
@@ -1672,4 +1672,23 @@
m_didReceiveUserInteraction = true;
}
+bool PluginView::shouldCreateTransientPaintingSnapshot() const
+{
+ if (!m_plugin)
+ return false;
+
+ if (!m_isInitialized)
+ return false;
+
+ if (FrameView* frameView = frame()->view()) {
+ if (frameView->paintBehavior() & (PaintBehaviorSelectionOnly | PaintBehaviorForceBlackText)) {
+ // This paint behavior is used when drawing the find indicator and there's no need to
+ // snapshot plug-ins, because they can never be painted as part of the find indicator.
+ return false;
+ }
+ }
+
+ return true;
+}
+
} // namespace WebKit
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h (148910 => 148911)
--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h 2013-04-22 20:40:57 UTC (rev 148910)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h 2013-04-22 20:46:06 UTC (rev 148911)
@@ -135,6 +135,8 @@
void pluginSnapshotTimerFired(WebCore::DeferrableOneShotTimer<PluginView>*);
void pluginDidReceiveUserInteraction();
+ bool shouldCreateTransientPaintingSnapshot() const;
+
// WebCore::PluginViewBase
#if PLATFORM(MAC)
virtual PlatformLayer* platformLayer() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes