Changeset 67137 in webkit


Ignore:
Timestamp:
Sep 9, 2010 6:07:58 PM (14 years ago)
Author:
Simon Fraser
Message:

2010-09-09 Simon Fraser <Simon Fraser>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=45509
<rdar://problem/8142166> REGRESSION: WebView setDrawsBackground:NO no
longer works without setBackgroundColor:clearColor

r61215 caused RenderView to paint the viewport background when the
document element's renderer is known to not fill opaquely paint
the entire viewport, i.e. more often than it did before.

This exposed a latent, long-standing bug which was introduced
in r14638 (the RenderCanvas -> RenderView rename), where a call
to view()->isTransparent() was not converted to frameView()->isTransparent(),
yet happened to still compile because of RenderObject::isTransparent().

This resulted in us painting the viewport background, even when
WebView clients explicitly said that they wanted a transparent
WebView.

Fixed by calling frameView()->isTransparent(), as intended.

  • rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r67132 r67137  
     12010-09-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=45509
     6        <rdar://problem/8142166> REGRESSION: WebView setDrawsBackground:NO no
     7        longer works without setBackgroundColor:clearColor
     8       
     9        r61215 caused RenderView to paint the viewport background when the
     10        document element's renderer is known to not fill opaquely paint
     11        the entire viewport, i.e. more often than it did before.
     12       
     13        This exposed a latent, long-standing bug which was introduced
     14        in r14638 (the RenderCanvas -> RenderView rename), where a call
     15        to view()->isTransparent() was not converted to frameView()->isTransparent(),
     16        yet happened to still compile because of RenderObject::isTransparent().
     17       
     18        This resulted in us painting the viewport background, even when
     19        WebView clients explicitly said that they wanted a transparent
     20        WebView.
     21       
     22        Fixed by calling frameView()->isTransparent(), as intended.
     23
     24        * rendering/RenderView.cpp:
     25        (WebCore::RenderView::paintBoxDecorations):
     26
    1272010-09-09  Chris Rogers  <crogers@google.com>
    228
  • trunk/WebCore/rendering/RenderView.cpp

    r65175 r67137  
    222222    // Only fill with the base background color (typically white) if we're the root document,
    223223    // since iframes/frames with no background in the child document should show the parent's background.
    224     if (view()->isTransparent()) // FIXME: This needs to be dynamic.  We should be able to go back to blitting if we ever stop being transparent.
     224    if (frameView()->isTransparent()) // FIXME: This needs to be dynamic.  We should be able to go back to blitting if we ever stop being transparent.
    225225        frameView()->setUseSlowRepaints(); // The parent must show behind the child.
    226226    else {
Note: See TracChangeset for help on using the changeset viewer.