Changeset 146250 in webkit


Ignore:
Timestamp:
Mar 19, 2013 1:30:34 PM (11 years ago)
Author:
dino@apple.com
Message:

Source/WebCore: Allow PlugIn Snapshotting to be tested
https://bugs.webkit.org/show_bug.cgi?id=98696

Reviewed by Tim Horton.

Expose a new setting maximumPlugInSnapshotAttempts that can
be set by testing scripts.

Tests: plugins/snapshotting/restart.html

plugins/snapshotting/simple.html

  • page/Settings.in:

Source/WebKit2: Allow PlugIn Snapshotting to be tested
https://bugs.webkit.org/show_bug.cgi?id=98696

Reviewed by Tim Horton.

Use the new maximumPlugInSnapshotAttempts setting rather than a hardcoded
value. At the same time, if this value is 0, then snapshot immediately
(don't wait to get a snapshot and test it).

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::didInitializePlugin): Snapshot immediately if maximum attempts are 0.
(WebKit::PluginView::pluginSnapshotTimerFired): Use setting rather than file local variable.

LayoutTests: Allow PlugIn Snapshotting to be tested
https://bugs.webkit.org/show_bug.cgi?id=98696
<rdar://problem/12456731>

Reviewed by Tim Horton.

Two new simple tests for plugin snapshotting. One that makes
sure the plugin was snapshotted (looks for the RenderSnapshottedPlugin)
and one that restarts a snapshotted plugin by clicking.

Since this feature is currently only enabled in WebKit2, the tests
are skipped everywhere else.

  • platform/chromium/TestExpectations: Skip plugins/snapshotting.
  • platform/efl/TestExpectations: Ditto.
  • platform/gtk/TestExpectations: Ditto.
  • platform/mac-wk2/TestExpectations: Ditto.
  • platform/mac-wk2/plugins/snapshotting/restart-expected.txt: Added.
  • platform/mac-wk2/plugins/snapshotting/simple-expected.txt: Added.
  • platform/mac/TestExpectations: Skip plugins/snapshotting.
  • platform/qt/TestExpectations: Ditto.
  • platform/win/TestExpectations: Ditto.
  • plugins/snapshotting/restart.html: Added.
  • plugins/snapshotting/simple.html: Added.
Location:
trunk
Files:
6 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r146240 r146250  
     12013-03-19  Dean Jackson  <dino@apple.com>
     2
     3        Allow PlugIn Snapshotting to be tested
     4        https://bugs.webkit.org/show_bug.cgi?id=98696
     5        <rdar://problem/12456731>
     6
     7        Reviewed by Tim Horton.
     8
     9        Two new simple tests for plugin snapshotting. One that makes
     10        sure the plugin was snapshotted (looks for the RenderSnapshottedPlugin)
     11        and one that restarts a snapshotted plugin by clicking.
     12
     13        Since this feature is currently only enabled in WebKit2, the tests
     14        are skipped everywhere else.
     15
     16        * platform/chromium/TestExpectations: Skip plugins/snapshotting.
     17        * platform/efl/TestExpectations: Ditto.
     18        * platform/gtk/TestExpectations: Ditto.
     19        * platform/mac-wk2/TestExpectations: Ditto.
     20        * platform/mac-wk2/plugins/snapshotting/restart-expected.txt: Added.
     21        * platform/mac-wk2/plugins/snapshotting/simple-expected.txt: Added.
     22        * platform/mac/TestExpectations: Skip plugins/snapshotting.
     23        * platform/qt/TestExpectations: Ditto.
     24        * platform/win/TestExpectations: Ditto.
     25        * plugins/snapshotting/restart.html: Added.
     26        * plugins/snapshotting/simple.html: Added.
     27
    1282013-03-19  James Robinson  <jamesr@chromium.org>
    229
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r146172 r146250  
    44254425webkit.org/b/112288 http/tests/security/cross-origin-appcache-allowed.html [ Failure ]
    44264426webkit.org/b/112288 http/tests/security/same-origin-appcache-blocked.html [ Failure ]
     4427
     4428# Snapshotted plugins not enabled
     4429webkit.org/b/98696 plugins/snapshotting [ Skip ]
  • trunk/LayoutTests/platform/efl/TestExpectations

    r146189 r146250  
    18671867# Started failing on EFL afrer r145025.
    18681868webkit.org/b/111860 fast/forms/number/number-validation-message.html [ Failure ]
     1869
     1870# Snapshotted plugins not enabled
     1871webkit.org/b/98696 plugins/snapshotting [ Skip ]
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r146211 r146250  
    429429# Require ENABLE(CUSTOM_ELEMENTS) support
    430430webkit.org/b/110735 fast/dom/custom [ Failure ]
     431
     432# Snapshotted plugins not enabled
     433webkit.org/b/98696 plugins/snapshotting [ Skip ]
    431434
    432435#////////////////////////////////////////////////////////////////////////////////////////
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r146221 r146250  
    428428### START OF (5) Features that are not supported in WebKit1, so skipped in mac/TestExpectations then re-enabled here
    429429
     430# Snapshotted plugins not enabled on WK1 but are on WK2
     431plugins/snapshotting [ Pass ]
     432
    430433### END OF (5) Features that are not supported in WebKit1, so skipped in mac/TestExpectations then re-enabled here
    431434########################################
  • trunk/LayoutTests/platform/mac/TestExpectations

    r146221 r146250  
    15171517# Feature not implemented
    15181518webkit.org/b/91611 media/media-higher-prio-audio-stream.html [ Skip ]
     1519
     1520# Snapshotted plugins not enabled on WK1
     1521plugins/snapshotting [ Skip ]
  • trunk/LayoutTests/platform/qt/TestExpectations

    r146201 r146250  
    363363# CURSOR_VISIBILITY is not enabled in qt
    364364webkit.org/b/107601 fullscreen/video-cursor-auto-hide.html [ Failure ]
     365
     366# Snapshotted plugins not enabled
     367webkit.org/b/98696 plugins/snapshotting [ Skip ]
    365368
    366369# =========================================================================== #
  • trunk/LayoutTests/platform/win/TestExpectations

    r146122 r146250  
    26952695fast/borders/border-fit.html
    26962696fast/repaint/border-fit-lines.html
     2697
     2698# Snapshotted plugins not enabled
     2699webkit.org/b/98696 plugins/snapshotting [ Skip ]
  • trunk/Source/WebCore/ChangeLog

    r146248 r146250  
     12013-03-19  Dean Jackson  <dino@apple.com>
     2
     3        Allow PlugIn Snapshotting to be tested
     4        https://bugs.webkit.org/show_bug.cgi?id=98696
     5
     6        Reviewed by Tim Horton.
     7
     8        Expose a new setting maximumPlugInSnapshotAttempts that can
     9        be set by testing scripts.
     10
     11        Tests: plugins/snapshotting/restart.html
     12               plugins/snapshotting/simple.html
     13
     14        * page/Settings.in:
     15
    1162013-03-19  Dean Jackson  <dino@apple.com>
    217
  • trunk/Source/WebCore/page/Settings.in

    r145849 r146250  
    182182applyPageScaleFactorInCompositor initial=false
    183183plugInSnapshottingEnabled initial=false
     184maximumPlugInSnapshotAttempts type=unsigned, initial=20
    184185frameFlatteningEnabled initial=false
    185186
  • trunk/Source/WebKit2/ChangeLog

    r146248 r146250  
     12013-03-19  Dean Jackson  <dino@apple.com>
     2
     3        Allow PlugIn Snapshotting to be tested
     4        https://bugs.webkit.org/show_bug.cgi?id=98696
     5
     6        Reviewed by Tim Horton.
     7
     8        Use the new maximumPlugInSnapshotAttempts setting rather than a hardcoded
     9        value. At the same time, if this value is 0, then snapshot immediately
     10        (don't wait to get a snapshot and test it).
     11
     12        * WebProcess/Plugins/PluginView.cpp:
     13        (WebKit::PluginView::didInitializePlugin): Snapshot immediately if maximum attempts are 0.
     14        (WebKit::PluginView::pluginSnapshotTimerFired): Use setting rather than file local variable.
     15
    1162013-03-19  Dean Jackson  <dino@apple.com>
    217
  • trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp

    r145477 r146250  
    7474// This simulated mouse click delay in HTMLPlugInImageElement.cpp should generally be the same or shorter than this delay.
    7575static const double pluginSnapshotTimerDelay = 1.1;
    76 static const unsigned maximumSnapshotRetries = 60;
    7776
    7877class PluginView::URLRequest : public RefCounted<URLRequest> {
     
    571570
    572571#if PLATFORM(MAC)
    573     if (m_pluginElement->displayState() < HTMLPlugInElement::PlayingWithPendingMouseClick)
     572    if (m_pluginElement->displayState() < HTMLPlugInElement::PlayingWithPendingMouseClick) {
     573        if (frame() && !frame()->settings()->maximumPlugInSnapshotAttempts()) {
     574            m_pluginElement->setDisplayState(HTMLPlugInElement::DisplayingSnapshot);
     575            return;
     576        }
    574577        m_pluginSnapshotTimer.restart();
    575     else {
     578    } else {
    576579        if (m_plugin->pluginLayer()) {
    577580            if (frame()) {
     
    16241627
    16251628#if PLATFORM(MAC)
     1629    unsigned maximumSnapshotRetries = frame() ? frame()->settings()->maximumPlugInSnapshotAttempts() : 0;
    16261630    if (snapshotImage && isAlmostSolidColor(static_cast<BitmapImage*>(snapshotImage.get())) && m_countSnapshotRetries < maximumSnapshotRetries) {
    16271631        ++m_countSnapshotRetries;
Note: See TracChangeset for help on using the changeset viewer.