Changeset 83140 in webkit


Ignore:
Timestamp:
Apr 6, 2011 9:39:55 PM (13 years ago)
Author:
Beth Dakin
Message:

https://bugs.webkit.org/show_bug.cgi?id=58009
Frame::scalePage() results in visual artifacts with scale factors less than 1
-and corresponding-
<rdar://problem/8683230>

Reviewed by Dan Bernstein.

Source/WebCore:

Fall into the case where we fill with a background base color when there is a page
scale factor that is less than 1.

  • rendering/RenderView.cpp:

(WebCore::RenderView::paintBoxDecorations):

LayoutTests:

  • fast/repaint/scale-page-shrink.html: Added.
  • platform/gtk/Skipped:
  • platform/mac/fast/repaint/scale-page-shrink-expected.checksum: Added.
  • platform/mac/fast/repaint/scale-page-shrink-expected.png: Added.
  • platform/mac/fast/repaint/scale-page-shrink-expected.txt: Added.
  • platform/qt/Skipped:
  • platform/win/Skipped:
Location:
trunk
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83139 r83140  
     12011-04-06  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=58009
     6        Frame::scalePage() results in visual artifacts with scale factors less than 1
     7        -and corresponding-
     8        <rdar://problem/8683230>
     9
     10        * fast/repaint/scale-page-shrink.html: Added.
     11        * platform/gtk/Skipped:
     12        * platform/mac/fast/repaint/scale-page-shrink-expected.checksum: Added.
     13        * platform/mac/fast/repaint/scale-page-shrink-expected.png: Added.
     14        * platform/mac/fast/repaint/scale-page-shrink-expected.txt: Added.
     15        * platform/qt/Skipped:
     16        * platform/win/Skipped:
     17
    1182011-04-06  Chang Shu  <cshu@webkit.org>
    219
  • trunk/LayoutTests/platform/gtk/Skipped

    r83077 r83140  
    13701370fast/dom/Range/scale-page-bounding-client-rect.html
    13711371fast/dom/Range/scale-page-client-rects.html
     1372fast/repaint/scale-page-shrink.html
  • trunk/LayoutTests/platform/qt/Skipped

    r83137 r83140  
    123123fast/dom/Range/scale-page-bounding-client-rect.html
    124124fast/dom/Range/scale-page-client-rects.html
     125fast/repaint/scale-page-shrink.html
    125126
    126127# =========================================================================== #
  • trunk/LayoutTests/platform/win/Skipped

    r82780 r83140  
    12291229fast/dom/Range/scale-page-bounding-client-rect.html
    12301230fast/dom/Range/scale-page-client-rects.html
     1231fast/repaint/scale-page-shrink.html
  • trunk/Source/WebCore/ChangeLog

    r83135 r83140  
     12011-04-06  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=58009
     6        Frame::scalePage() results in visual artifacts with scale factors less than 1
     7        -and corresponding-
     8        <rdar://problem/8683230>
     9
     10        Fall into the case where we fill with a background base color when there is a page
     11        scale factor that is less than 1.
     12        * rendering/RenderView.cpp:
     13        (WebCore::RenderView::paintBoxDecorations):
     14
    1152011-04-06  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r78066 r83140  
    220220        rootFillsViewport = rootBox && !rootBox->x() && !rootBox->y() && rootBox->width() >= width() && rootBox->height() >= height();
    221221    }
    222    
     222
     223    float pageScaleFactor = 1;
     224    if (Frame* frame = m_frameView->frame())
     225        pageScaleFactor = frame->pageScaleFactor();
     226
    223227    // If painting will entirely fill the view, no need to fill the background.
    224     if (rootFillsViewport && rendererObscuresBackground(firstChild()))
     228    if (rootFillsViewport && rendererObscuresBackground(firstChild()) && pageScaleFactor >= 1)
    225229        return;
    226230
    227231    // This code typically only executes if the root element's visibility has been set to hidden,
    228     // or there is a transform on the <html>.
     232    // if there is a transform on the <html>, or if there is a page scale factor less than 1.
    229233    // Only fill with the base background color (typically white) if we're the root document,
    230234    // since iframes/frames with no background in the child document should show the parent's background.
Note: See TracChangeset for help on using the changeset viewer.