Commit a43d36a5 authored by morrita@google.com's avatar morrita@google.com

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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9b381bf1
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-30 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
......@@ -3215,3 +3215,6 @@ BUGWK44797 : fullscreen = FAIL
// Started at http://trac.webkit.org/changeset/66318/
BUG53796 : fast/js/array-splice.html = TEXT
// Need rebasline to pick the results.
BUG47946 WIN LINUX MAC : scrollbars/custom-scrollbar-with-incomplete-style.html = MISSING
......@@ -298,3 +298,7 @@ inspector/dom-breakpoints.html
# https://bugs.webkit.org/show_bug.cgi?id=44566
fast/canvas/webgl/gl-teximage.html
# Safari doesn't allow to customize outermost scrollbars.
# https://bugs.webkit.org/show_bug.cgi?id=43960
scrollbars/custom-scrollbar-with-incomplete-style.html
\ No newline at end of file
<html>
<head>
<title>Incomplete scrollbar</title>
<style>
/* Turn on a 13x13 scrollbar with no background specification. */
::-webkit-scrollbar {
width: 13px;
height: 13px;
}
pre { background-color: green; }
</style>
</head>
<body>
<h2>It's OK if nothing drawn for a scrollbar (for an outermost frame and an element with overlow)</h2>
<p>Note that Safari doesn't allow to customize the outermost scdrollbars and just show Cocoa's.</p>
<pre style="height: 100px; width:100px; overflow:auto;">
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
</pre>
<pre style="height:200%;"></pre>
<pre style="width:200%;"></pre>
</body>
</html>
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.
2010-08-30 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
......@@ -383,14 +383,7 @@ public:
bool hasBoxDecorations() const { return m_paintBackground; }
bool mustRepaintBackgroundOrBorder() const;
bool hasBackground() const
{
Color color = style()->visitedDependentColor(CSSPropertyBackgroundColor);
if (color.isValid() && color.alpha() > 0)
return true;
return style()->hasBackgroundImage();
}
bool hasBackground() const { return style()->hasBackground(); }
bool needsLayout() const { return m_needsLayout || m_normalChildNeedsLayout || m_posChildNeedsLayout || m_needsPositionedMovementLayout; }
bool selfNeedsLayout() const { return m_needsLayout; }
bool needsPositionedMovementLayout() const { return m_needsPositionedMovementLayout; }
......
......@@ -27,6 +27,7 @@
#include "RenderScrollbar.h"
#include "Frame.h"
#include "FrameView.h"
#include "RenderPart.h"
#include "RenderScrollbarPart.h"
#include "RenderScrollbarTheme.h"
......@@ -150,6 +151,14 @@ PassRefPtr<RenderStyle> RenderScrollbar::getScrollbarPseudoStyle(ScrollbarPart p
RefPtr<RenderStyle> result = owningRenderer()->getUncachedPseudoStyle(pseudoId, owningRenderer()->style());
s_styleResolvePart = NoPart;
s_styleResolveScrollbar = 0;
// Scrollbars for root frames should always have background color
// unless explicitly specified as transparent. So we force it.
// This is because WebKit assumes scrollbar to be always painted and missing background
// causes visual artifact like non-repainted dirty region.
if (result && m_owningFrame && m_owningFrame->view() && !m_owningFrame->view()->isTransparent() && !result->hasBackground())
result->setBackgroundColor(Color::white);
return result;
}
......
......@@ -345,6 +345,14 @@ public:
bool hasFixedBackgroundImage() const { return m_background->background().hasFixedImage(); }
bool hasAppearance() const { return appearance() != NoControlPart; }
bool hasBackground() const
{
Color color = visitedDependentColor(CSSPropertyBackgroundColor);
if (color.isValid() && color.alpha() > 0)
return true;
return hasBackgroundImage();
}
bool visuallyOrdered() const { return inherited_flags._visuallyOrdered; }
void setVisuallyOrdered(bool b) { inherited_flags._visuallyOrdered = b; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment