Bug 186856

Summary: [Fullscreen] Suspend page (and pause video) while phishing warining is presented
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, jeremyj-wk, jonlee, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing
none
Patch none

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