Changeset 147977 in webkit


Ignore:
Timestamp:
Apr 8, 2013, 7:43:24 PM (12 years ago)
Author:
dino@apple.com
Message:

Don't try to remove a non-existent snapshot
https://bugs.webkit.org/show_bug.cgi?id=114226
<rdar://problem/13604480>

Reviewed by Darin Adler.

We don't need to trigger the timer to remove a snapshot
if there was never a snapshot displayed.

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::setDisplayState): Detect if we're moving from the DisplayingSnapshot state.
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): Guard against a missing renderer.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147975 r147977  
     12013-04-08  Dean Jackson  <dino@apple.com>
     2
     3        Don't try to remove a non-existent snapshot
     4        https://bugs.webkit.org/show_bug.cgi?id=114226
     5        <rdar://problem/13604480>
     6
     7        Reviewed by Darin Adler.
     8
     9        We don't need to trigger the timer to remove a snapshot
     10        if there was never a snapshot displayed.
     11
     12        * html/HTMLPlugInImageElement.cpp:
     13        (WebCore::HTMLPlugInImageElement::setDisplayState): Detect if we're moving from the DisplayingSnapshot state.
     14        (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): Guard against a missing renderer.
     15
    1162013-04-08  Patrick Gansterer  <paroga@webkit.org>
    217
  • trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp

    r147693 r147977  
    9494void HTMLPlugInImageElement::setDisplayState(DisplayState state)
    9595{
     96#if PLATFORM(MAC)
     97    if (state == RestartingWithPendingMouseClick || state == Restarting) {
     98        m_restartedPlugin = true;
     99        if (displayState() == DisplayingSnapshot)
     100            m_removeSnapshotTimer.startOneShot(removeSnapshotTimerDelay);
     101    }
     102#endif
     103
    96104    HTMLPlugInElement::setDisplayState(state);
    97     if (displayState() == DisplayingSnapshot)
     105
     106    if (state == DisplayingSnapshot)
    98107        m_swapRendererTimer.startOneShot(0);
    99 
    100 #if PLATFORM(MAC)
    101     if (displayState() == RestartingWithPendingMouseClick || displayState() == Restarting) {
    102         m_restartedPlugin = true;
    103         m_removeSnapshotTimer.startOneShot(removeSnapshotTimerDelay);
    104     }
    105 #endif
    106108}
    107109
     
    416418    m_snapshotImage = nullptr;
    417419    m_restartedPlugin = false;
    418     renderer()->repaint();
     420    if (renderer())
     421        renderer()->repaint();
    419422}
    420423
Note: See TracChangeset for help on using the changeset viewer.