Changeset 227272 in webkit


Ignore:
Timestamp:
Jan 20, 2018 8:55:45 AM (6 years ago)
Author:
jer.noble@apple.com
Message:

Release ASSERT when reloading Vimeo page @ WebCore: WebCore::Document::updateLayout
https://bugs.webkit.org/show_bug.cgi?id=181840
<rdar://problem/36186214>

Reviewed by Simon Fraser.

Source/WebCore:

Test: media/video-fullscreen-reload-crash.html

Short circuit play() or pause() operations if the document is suspended or stopped.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):

Source/WebKit:

Updating layout while the document is suspended or stopped is unsafe.

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::inlineVideoFrame):

LayoutTests:

  • media/video-fullscreen-reload-crash-expected.txt: Added.
  • media/video-fullscreen-reload-crash.html: Added.
  • platform/ios/TestExpectations:
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r227270 r227272  
     12018-01-20  Jer Noble  <jer.noble@apple.com>
     2
     3        Release ASSERT when reloading Vimeo page @ WebCore: WebCore::Document::updateLayout
     4        https://bugs.webkit.org/show_bug.cgi?id=181840
     5        <rdar://problem/36186214>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * media/video-fullscreen-reload-crash-expected.txt: Added.
     10        * media/video-fullscreen-reload-crash.html: Added.
     11        * platform/ios/TestExpectations:
     12
    1132018-01-20  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/LayoutTests/platform/ios/TestExpectations

    r227223 r227272  
    952952media/restricted-audio-playback-with-document-gesture.html [ Skip ]
    953953media/restricted-audio-playback-with-multiple-settimeouts.html [ Skip ]
     954media/video-fullscreen-reload-crash.html [ Skip ]
    954955scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html [ Skip ]
    955956scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html [ Skip ]
  • trunk/Source/WebCore/ChangeLog

    r227270 r227272  
     12018-01-20  Jer Noble  <jer.noble@apple.com>
     2
     3        Release ASSERT when reloading Vimeo page @ WebCore: WebCore::Document::updateLayout
     4        https://bugs.webkit.org/show_bug.cgi?id=181840
     5        <rdar://problem/36186214>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Test: media/video-fullscreen-reload-crash.html
     10
     11        Short circuit play() or pause() operations if the document is suspended or stopped.
     12
     13        * html/HTMLMediaElement.cpp:
     14        (WebCore::HTMLMediaElement::playInternal):
     15        (WebCore::HTMLMediaElement::pauseInternal):
     16
    1172018-01-20  Youenn Fablet  <youenn@apple.com>
    218
  • trunk/Source/WebCore/dom/Document.h

    r227006 r227272  
    12521252    bool inStyleRecalc() const { return m_inStyleRecalc; }
    12531253    bool inRenderTreeUpdate() const { return m_inRenderTreeUpdate; }
    1254     bool isSafeToUpdateStyleOrLayout() const;
     1254    WEBCORE_EXPORT bool isSafeToUpdateStyleOrLayout() const;
    12551255
    12561256    void updateTextRenderer(Text&, unsigned offsetOfReplacedText, unsigned lengthOfReplacedText);
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r226990 r227272  
    34433443    ALWAYS_LOG(LOGIDENTIFIER);
    34443444
     3445    if (isSuspended()) {
     3446        ALWAYS_LOG(LOGIDENTIFIER, "  returning because context is suspended");
     3447        return;
     3448    }
     3449
    34453450    if (!m_mediaSession->clientWillBeginPlayback()) {
    34463451        ALWAYS_LOG(LOGIDENTIFIER, "  returning because of interruption");
     
    35273532{
    35283533    ALWAYS_LOG(LOGIDENTIFIER);
     3534
     3535    if (isSuspended()) {
     3536        ALWAYS_LOG(LOGIDENTIFIER, "  returning because context is suspended");
     3537        return;
     3538    }
    35293539
    35303540    if (!m_mediaSession->clientWillPausePlayback()) {
  • trunk/Source/WebKit/ChangeLog

    r227269 r227272  
     12018-01-20  Jer Noble  <jer.noble@apple.com>
     2
     3        Release ASSERT when reloading Vimeo page @ WebCore: WebCore::Document::updateLayout
     4        https://bugs.webkit.org/show_bug.cgi?id=181840
     5        <rdar://problem/36186214>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Updating layout while the document is suspended or stopped is unsafe.
     10
     11        * WebProcess/cocoa/VideoFullscreenManager.mm:
     12        (WebKit::inlineVideoFrame):
     13
    1142018-01-20  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm

    r226217 r227272  
    5959static IntRect inlineVideoFrame(HTMLVideoElement& element)
    6060{
    61     element.document().updateLayoutIgnorePendingStylesheets();
     61    auto& document = element.document();
     62    if (!document.isSafeToUpdateStyleOrLayout())
     63        return { };
     64
     65    document.updateLayoutIgnorePendingStylesheets();
    6266    auto* renderer = element.renderer();
    6367    if (!renderer)
Note: See TracChangeset for help on using the changeset viewer.