Bug 186856 - [Fullscreen] Suspend page (and pause video) while phishing warining is presented
Summary: [Fullscreen] Suspend page (and pause video) while phishing warining is presented
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-20 10:56 PDT by Jer Noble
Modified: 2018-12-18 13:50 PST (History)
6 users (show)

See Also:


Attachments
Patch (5.41 KB, patch)
2018-06-20 10:59 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (5.50 KB, patch)
2018-06-21 11:05 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (5.50 KB, patch)
2018-06-21 11:09 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (36.58 KB, patch)
2018-12-18 13:50 PST, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2018-06-20 10:56:58 PDT
[Fullscreen] Suspend page (and pause video) while phishing warining is presented
Comment 1 Jer Noble 2018-06-20 10:57:53 PDT
<rdar://problem/41212444>
Comment 2 Jer Noble 2018-06-20 10:59:01 PDT
Created attachment 343164 [details]
Patch
Comment 3 Tim Horton 2018-06-21 00:47:07 PDT
Comment on attachment 343164 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=343164&action=review

> Source/WebKit/ChangeLog:3
> +        [Fullscreen] Suspend page (and pause video) while phishing warining is presented

warining?

> Source/WebCore/html/HTMLMediaElement.cpp:5603
> +                m_shouldUnpauseInternalOnResume = true;
> +                setPausedInternal(true);

This could use an explanation in the changelog.

> Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:453
> +        page->suspendActiveDOMObjectsAndAnimations();

Should we also suspend/defer layer tree commits? Is this enough to actually stop painting? Do you even care?
Comment 4 Jer Noble 2018-06-21 11:05:55 PDT
Created attachment 343249 [details]
Patch for landing
Comment 5 Jer Noble 2018-06-21 11:07:13 PDT
(In reply to Tim Horton from comment #3)
> Comment on attachment 343164 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=343164&action=review
> 
> > Source/WebKit/ChangeLog:3
> > +        [Fullscreen] Suspend page (and pause video) while phishing warining is presented
> 
> warining?

Changed.

> > Source/WebCore/html/HTMLMediaElement.cpp:5603
> > +                m_shouldUnpauseInternalOnResume = true;
> > +                setPausedInternal(true);
> 
> This could use an explanation in the changelog.

Added.

> > Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenViewController.mm:453
> > +        page->suspendActiveDOMObjectsAndAnimations();
> 
> Should we also suspend/defer layer tree commits? Is this enough to actually
> stop painting? Do you even care?

No, this should be sufficient; JS stops running as a result of this call, so between that and video playback pausing, that should be keep anything from painting.
Comment 6 Jer Noble 2018-06-21 11:09:01 PDT
Created attachment 343250 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2018-06-21 11:47:53 PDT
Comment on attachment 343250 [details]
Patch for landing

Clearing flags on attachment: 343250

Committed r233049: <https://trac.webkit.org/changeset/233049>
Comment 8 WebKit Commit Bot 2018-06-21 11:47:54 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Jer Noble 2018-12-18 13:50:05 PST
Reopening to attach new patch.
Comment 10 Jer Noble 2018-12-18 13:50:06 PST
Created attachment 357608 [details]
Patch