Changeset 66372 in webkit


Ignore:
Timestamp:
Aug 30, 2010 12:44:46 AM (14 years ago)
Author:
morrita@google.com
Message:

2010-08-13 MORITA Hajime <morrita@google.com>

Reviewed by Kent Tamura.

https://bugs.webkit.org/show_bug.cgi?id=43960
[Chromium] styled scroll bar on the window is painted badly.

  • platform/chromium/test_expectations.txt: Skips at this time and will rebaseline shortly.
  • platform/mac/Skipped: Mac doesn't suffer from the problem.
  • scrollbars/custom-scrollbar-with-incomplete-style.html: Added.

2010-08-13 MORITA Hajime <morrita@google.com>

Reviewed by Kent Tamura.

https://bugs.webkit.org/show_bug.cgi?id=43960
[Chromium] styled scroll bar on the window is painted badly.

WebKit assumes outermost scrollbar always painted.
So force their style to have the background color if it isn't
given by the stylesheet.

Test: scrollbars/custom-scrollbar-with-incomplete-style.html

  • rendering/RenderObject.h: (WebCore::RenderObject::hasBackground): Extracted body to RenderStyle for sharing.
  • rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::getScrollbarPseudoStyle): Added the workaround as mentioned above.
  • rendering/RenderScrollbar.h:
  • rendering/style/RenderStyle.h: (WebCore::InheritedFlags::hasBackground): Extracted from RenderObject.
Location:
trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r66371 r66372  
     12010-08-13  MORITA Hajime  <morrita@google.com>
     2
     3        Reviewed by Kent Tamura.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=43960
     6        [Chromium] styled scroll bar on the window is painted badly.
     7       
     8        * platform/chromium/test_expectations.txt: Skips at this time and will rebaseline shortly.
     9        * platform/mac/Skipped: Mac doesn't suffer from the problem.
     10        * scrollbars/custom-scrollbar-with-incomplete-style.html: Added.
     11
    1122010-08-30  Adam Barth  <abarth@webkit.org>
    213
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r66354 r66372  
    32163216BUG53796 : fast/js/array-splice.html = TEXT
    32173217
     3218// Need rebasline to pick the results.
     3219BUG47946 WIN LINUX MAC : scrollbars/custom-scrollbar-with-incomplete-style.html = MISSING
     3220
  • trunk/LayoutTests/platform/mac/Skipped

    r66311 r66372  
    299299# https://bugs.webkit.org/show_bug.cgi?id=44566
    300300fast/canvas/webgl/gl-teximage.html
     301
     302# Safari doesn't allow to customize outermost scrollbars.
     303# https://bugs.webkit.org/show_bug.cgi?id=43960
     304scrollbars/custom-scrollbar-with-incomplete-style.html
  • trunk/WebCore/ChangeLog

    r66371 r66372  
     12010-08-13  MORITA Hajime  <morrita@google.com>
     2
     3        Reviewed by Kent Tamura.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=43960
     6        [Chromium] styled scroll bar on the window is painted badly.
     7
     8        WebKit assumes outermost scrollbar always painted.
     9        So force their style to have the  background color if it isn't
     10        given by the stylesheet.
     11       
     12        Test: scrollbars/custom-scrollbar-with-incomplete-style.html
     13
     14        * rendering/RenderObject.h:
     15        (WebCore::RenderObject::hasBackground): Extracted body to RenderStyle for sharing.
     16        * rendering/RenderScrollbar.cpp:
     17        (WebCore::RenderScrollbar::getScrollbarPseudoStyle): Added the workaround as mentioned above.
     18        * rendering/RenderScrollbar.h:
     19        * rendering/style/RenderStyle.h:
     20        (WebCore::InheritedFlags::hasBackground): Extracted from RenderObject.
     21
    1222010-08-30  Adam Barth  <abarth@webkit.org>
    223
  • trunk/WebCore/rendering/RenderObject.h

    r65017 r66372  
    384384    bool hasBoxDecorations() const { return m_paintBackground; }
    385385    bool mustRepaintBackgroundOrBorder() const;
    386     bool hasBackground() const
    387     {
    388         Color color = style()->visitedDependentColor(CSSPropertyBackgroundColor);
    389         if (color.isValid() && color.alpha() > 0)
    390             return true;
    391         return style()->hasBackgroundImage();
    392     }
    393 
     386    bool hasBackground() const { return style()->hasBackground(); }
    394387    bool needsLayout() const { return m_needsLayout || m_normalChildNeedsLayout || m_posChildNeedsLayout || m_needsPositionedMovementLayout; }
    395388    bool selfNeedsLayout() const { return m_needsLayout; }
  • trunk/WebCore/rendering/RenderScrollbar.cpp

    r64780 r66372  
    2828
    2929#include "Frame.h"
     30#include "FrameView.h"
    3031#include "RenderPart.h"
    3132#include "RenderScrollbarPart.h"
     
    151152    s_styleResolvePart = NoPart;
    152153    s_styleResolveScrollbar = 0;
     154
     155    // Scrollbars for root frames should always have background color
     156    // unless explicitly specified as transparent. So we force it.
     157    // This is because WebKit assumes scrollbar to be always painted and missing background
     158    // causes visual artifact like non-repainted dirty region.
     159    if (result && m_owningFrame && m_owningFrame->view() && !m_owningFrame->view()->isTransparent() && !result->hasBackground())
     160        result->setBackgroundColor(Color::white);
     161
    153162    return result;
    154163}
  • trunk/WebCore/rendering/style/RenderStyle.h

    r66334 r66372  
    345345    bool hasFixedBackgroundImage() const { return m_background->background().hasFixedImage(); }
    346346    bool hasAppearance() const { return appearance() != NoControlPart; }
     347
     348    bool hasBackground() const
     349    {
     350        Color color = visitedDependentColor(CSSPropertyBackgroundColor);
     351        if (color.isValid() && color.alpha() > 0)
     352            return true;
     353        return hasBackgroundImage();
     354    }
    347355
    348356    bool visuallyOrdered() const { return inherited_flags._visuallyOrdered; }
Note: See TracChangeset for help on using the changeset viewer.