Bug 113269 - [BlackBerry] Scrolling up and down can cause the screen to flash black
Summary: [BlackBerry] Scrolling up and down can cause the screen to flash black
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Arvid Nilsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-25 20:17 PDT by Arvid Nilsson
Modified: 2013-03-26 11:23 PDT (History)
6 users (show)

See Also:


Attachments
Patch (10.14 KB, patch)
2013-03-25 20:40 PDT, Arvid Nilsson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Nilsson 2013-03-25 20:17:29 PDT
Various flaws in the code can conspire to make the screen cleared to black before rendering the web page. This only happens when the BackingStore is inactive, and the LayerTiler takes on the job of drawing the root layer. When tiles are missing, this makes the "checkerboard" effect especially noticeable since you see a black color where the tile should have been. It would be better to clear to the web page background color.

PR 296106
Comment 1 Arvid Nilsson 2013-03-25 20:40:27 PDT
Created attachment 194991 [details]
Patch
Comment 2 Jakob Petsovits 2013-03-26 09:13:03 PDT
Comment on attachment 194991 [details]
Patch

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

Looks good to me, worthwhile improvements.

> Source/WebKit/blackberry/Api/WebPage.cpp:6316
> +    if (!m_mainFrame || !m_mainFrame->view())
> +        return;

With this early return, the BackingStore won't get color updates from WebSettings until a page is loaded. I don't think this makes a difference in practice as we wouldn't draw contents in that case anyways, but I thought I'd mention it since it's a change in program logic. (Just in case you have further thoughts on it.)
Comment 3 Jakob Petsovits 2013-03-26 09:14:03 PDT
(In reply to comment #2)
> (From update of attachment 194991 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=194991&action=review
> 
> Looks good to me, worthwhile improvements.
> 
> > Source/WebKit/blackberry/Api/WebPage.cpp:6316
> > +    if (!m_mainFrame || !m_mainFrame->view())
> > +        return;
> 
> With this early return, the BackingStore won't get color updates from WebSettings until a page is loaded.

Correction; "until the main frame is created". Please excuse the inaccuracy.
Comment 4 Rob Buis 2013-03-26 10:58:47 PDT
Comment on attachment 194991 [details]
Patch

LGTM.
Comment 5 Arvid Nilsson 2013-03-26 11:02:19 PDT
Comment on attachment 194991 [details]
Patch

Thanks Jakob and Rob!
Comment 6 WebKit Review Bot 2013-03-26 11:23:45 PDT
Comment on attachment 194991 [details]
Patch

Clearing flags on attachment: 194991

Committed r146911: <http://trac.webkit.org/changeset/146911>
Comment 7 WebKit Review Bot 2013-03-26 11:23:49 PDT
All reviewed patches have been landed.  Closing bug.