Bug 70615 - Flash of white when loading a page after a web process crash
Summary: Flash of white when loading a page after a web process crash
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-21 09:48 PDT by Anders Carlsson
Modified: 2011-10-21 10:45 PDT (History)
0 users

See Also:


Attachments
Patch (7.70 KB, patch)
2011-10-21 09:59 PDT, Anders Carlsson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2011-10-21 09:48:06 PDT
Flash of white when loading a page after a web process crash
Comment 1 Anders Carlsson 2011-10-21 09:59:01 PDT
Created attachment 111977 [details]
Patch
Comment 2 Adam Roben (:aroben) 2011-10-21 10:05:04 PDT
Comment on attachment 111977 [details]
Patch

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

> Source/WebKit2/UIProcess/API/mac/WKView.mm:2075
>  - (void)_didRelaunchProcess
>  {
> -    [self setNeedsDisplay:YES];
>  }

Can we remove this method entirely?

> Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp:86
>  void DrawingAreaImpl::setNeedsDisplay(const IntRect& rect)
>  {
> +    if (!m_isPaintingEnabled)
> +        return;
> +
>      IntRect dirtyRect = rect;
>      dirtyRect.intersect(m_webPage->bounds());

Should we continue to accumulate a dirty region when painting is disabled so that the right area will be repainted when painting is reenabled?

> Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp:109
>  void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
>  {
> +    if (!m_isPaintingEnabled)
> +        return;
> +

Similar question here.
Comment 3 Anders Carlsson 2011-10-21 10:06:19 PDT
(In reply to comment #2)
> (From update of attachment 111977 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=111977&action=review
> 
> > Source/WebKit2/UIProcess/API/mac/WKView.mm:2075
> >  - (void)_didRelaunchProcess
> >  {
> > -    [self setNeedsDisplay:YES];
> >  }
> 
> Can we remove this method entirely?

Maybe.

> > Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp:86
> >  void DrawingAreaImpl::setNeedsDisplay(const IntRect& rect)
> >  {
> > +    if (!m_isPaintingEnabled)
> > +        return;
> > +
> >      IntRect dirtyRect = rect;
> >      dirtyRect.intersect(m_webPage->bounds());
> 
> Should we continue to accumulate a dirty region when painting is disabled so that the right area will be repainted when painting is reenabled?

Nope - this is about disabling painting completely, not just suspending it.

> > Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp:109
> >  void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
> >  {
> > +    if (!m_isPaintingEnabled)
> > +        return;
> > +
> 
> Similar question here.

Similar answer here.
Comment 4 Simon Fraser (smfr) 2011-10-21 10:28:19 PDT
Comment on attachment 111977 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:251
> +    m_drawingArea->setPaintingEnabled(true);

I sure hope we don't ever add an early return between setPaintingEnabled(false) and here.
Comment 5 Anders Carlsson 2011-10-21 10:45:42 PDT
Committed r98113: <http://trac.webkit.org/changeset/98113>