Bug 159329

Summary: [Mac] Get rid of the old timey rubber-banding linen pattern.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: Andreas Kling <kling>
Status: REOPENED ---    
Severity: Normal CC: bdakin, commit-queue, kling, sam, simon.fraser, thorton
Priority: P2 Keywords: Performance
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 159473    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Andreas Kling 2016-06-30 21:14:44 PDT
We're sometimes loading the linen pattern image despite never actually showing it.
This can happen if we go down rendering code paths from the WebPage constructor, before settings are fully loaded.
Comment 1 Andreas Kling 2016-06-30 21:49:44 PDT
Created attachment 282512 [details]
Patch
Comment 2 WebKit Commit Bot 2016-06-30 23:58:55 PDT
Comment on attachment 282512 [details]
Patch

Clearing flags on attachment: 282512

Committed r202725: <http://trac.webkit.org/changeset/202725>
Comment 3 WebKit Commit Bot 2016-06-30 23:59:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Beth Dakin 2016-07-01 00:00:41 PDT
Do we have any API clients that set backgroundExtendsBeyondPage to YES? And if so, does this change their behavior?
Comment 5 Andreas Kling 2016-07-01 00:34:11 PDT
(In reply to comment #4)
> Do we have any API clients that set backgroundExtendsBeyondPage to YES? And
> if so, does this change their behavior?

AFAICT the only client of this API is Safari, which always sets it to YES, and thus nothing changes.
Comment 6 Andreas Kling 2016-07-01 00:35:33 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > Do we have any API clients that set backgroundExtendsBeyondPage to YES? And
> > if so, does this change their behavior?
> 
> AFAICT the only client of this API is Safari, which always sets it to YES,
> and thus nothing changes.

Sorry, I spoke too soon. I found two other clients who also set it to YES. (see cf)
Comment 7 Beth Dakin 2016-07-01 09:34:04 PDT
(In reply to comment #4)
> Do we have any API clients that set backgroundExtendsBeyondPage to YES? And
> if so, does this change their behavior?

Oh yeah, I guess I meant NO. :P
Comment 8 Andreas Kling 2016-07-01 09:38:26 PDT
(In reply to comment #7)
> (In reply to comment #4)
> > Do we have any API clients that set backgroundExtendsBeyondPage to YES? And
> > if so, does this change their behavior?
> 
> Oh yeah, I guess I meant NO. :P

Oh duh, late night reading comprehension pls.
I couldn't find any clients that set this to NO.
Comment 9 Tim Horton 2016-07-01 09:41:49 PDT
Isn't NO the default for WKView? (but not WKWebView?)
Comment 10 Tim Horton 2016-07-01 09:45:38 PDT
(In reply to comment #9)
> Isn't NO the default for WKView? (but not WKWebView?)

(it is). So you have changed behavior for WKView clients. Probably most will not care, but we should make sure (App Store and iTunes come to mind).
Comment 11 Andreas Kling 2016-07-01 09:48:19 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > Isn't NO the default for WKView? (but not WKWebView?)
> 
> (it is). So you have changed behavior for WKView clients. Probably most will
> not care, but we should make sure (App Store and iTunes come to mind).

I see! I also found this in WTR:

    // This setting differs between the antique and modern Mac WebKit2 API.
    // For now, maintain the antique behavior, because some tests depend on it!
    // FIXME: We should be testing the default.
    WKPageSetBackgroundExtendsBeyondPage(m_mainWebView->page(), false);

While it appears this change hasn't affected any tests, perhaps it was wrong to remove the check for backgroundShouldExtendBeyondPage() in updateOverflowControlsLayers()..
Comment 12 Tim Horton 2016-07-01 09:51:39 PDT
Well, we've talked about making YES the only value, so it's possible you've just accelerated the transition :)
Comment 13 Andreas Kling 2016-07-06 09:53:55 PDT
This didn't end up affecting dirty "CoreUI image data" memory after all, so I'm going to roll it out since it unintentionally changed behavior. We can revisit it in the future once we're sure we want the new behavior.
Comment 14 WebKit Commit Bot 2016-07-06 09:56:03 PDT
Re-opened since this is blocked by bug 159473