[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:21:58 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 932f171e3918eb3c9ca97f4f9c32704e5ca245f0
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 28 21:29:17 2009 +0000
2009-10-28 Jonathan Dixon <joth at chromium.org>
Reviewed by Eric Seidel.
Bug 30547: (Chromium) searchbox not rendered properly due to the css property -webkit-border-radius
https://bugs.webkit.org/show_bug.cgi?id=30547
* fast/css/text-input-with-webkit-border-radius-expected.checksum: Added.
* fast/css/text-input-with-webkit-border-radius-expected.png: Added.
* fast/css/text-input-with-webkit-border-radius-expected.txt: Added.
* fast/css/text-input-with-webkit-border-radius.html: Added.
2009-10-28 Jonathan Dixon <joth at chromium.org>
Reviewed by Eric Seidel.
Bug 30547: (Chromium) searchbox not rendered properly due to the css property -webkit-border-radius
https://bugs.webkit.org/show_bug.cgi?id=30547
Test: fast/css/text-input-with-webkit-border-radius.html
* rendering/RenderThemeChromiumWin.cpp:
(WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
Implemented rounded border rendering in Chromium Windows theme renderer.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6c8555d..8dfbb78 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-28 Jonathan Dixon <joth at chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Bug 30547: (Chromium) searchbox not rendered properly due to the css property -webkit-border-radius
+ https://bugs.webkit.org/show_bug.cgi?id=30547
+
+ * fast/css/text-input-with-webkit-border-radius-expected.checksum: Added.
+ * fast/css/text-input-with-webkit-border-radius-expected.png: Added.
+ * fast/css/text-input-with-webkit-border-radius-expected.txt: Added.
+ * fast/css/text-input-with-webkit-border-radius.html: Added.
+
2009-10-27 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.checksum b/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.checksum
new file mode 100644
index 0000000..2ffa629
--- /dev/null
+++ b/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.checksum
@@ -0,0 +1 @@
+e4322ab9e556f8a34be4f803a318c556
\ No newline at end of file
diff --git a/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.png b/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.png
new file mode 100644
index 0000000..ce965a2
Binary files /dev/null and b/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.png differ
diff --git a/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.txt b/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.txt
new file mode 100644
index 0000000..a47368d
--- /dev/null
+++ b/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x137
+ RenderBlock {HTML} at (0,0) size 800x137
+ RenderBody {BODY} at (8,16) size 784x113
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 301x18
+ text run at (0,0) width 301: "This test checks that text input fields handle the "
+ RenderInline {CODE} at (0,0) size 168x15
+ RenderText {#text} at (301,2) size 168x15
+ text run at (301,2) width 168: "-webkit-border-radius"
+ RenderText {#text} at (469,0) size 295x18
+ text run at (469,0) width 295: " CSS property correctly, or degrade gracefully."
+ RenderBlock {P} at (0,34) size 784x18
+ RenderText {#text} at (0,0) size 617x18
+ text run at (0,0) width 617: "If the test passes, you will see a text entry field containing \"default text\" inside the grey div below."
+ RenderBlock {DIV} at (0,68) size 163x45 [bgcolor=#888888]
+ RenderTextControl {INPUT} at (11,9) size 133x19 [bgcolor=#00FF00] [border: (2px inset #000000)]
+ RenderBlock {DIV} at (3,3) size 127x13
+ RenderBlock {DIV} at (0,0) size 8x11
+ RenderBlock {DIV} at (114,0) size 13x11
+ RenderText {#text} at (0,0) size 0x0
+layer at (30,96) size 106x13
+ RenderBlock {DIV} at (8,0) size 106x13
+ RenderText {#text} at (1,0) size 63x13
+ text run at (1,0) width 63: "default text"
diff --git a/LayoutTests/fast/css/text-input-with-webkit-border-radius.html b/LayoutTests/fast/css/text-input-with-webkit-border-radius.html
new file mode 100644
index 0000000..06bf04a
--- /dev/null
+++ b/LayoutTests/fast/css/text-input-with-webkit-border-radius.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<HEAD>
+</HEAD>
+<BODY>
+<p>This test checks that text input fields handle the <code>-webkit-border-radius</code> CSS property correctly, or degrade gracefully.</p>
+<p>If the test passes, you will see a text entry field containing "default text" inside the grey div below.</p>
+ <DIV style="background-color: #888888; width: 163px; height: 45px; background-position: 100% 0;">
+ <INPUT type="search" value="default text" style="margin-top: 9px; margin-left: 11px; -webkit-border-radius: 9px; width: 133px; background-color: #00FF00;">
+ </DIV>
+</BODY>
+</HTML>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index be0d47e..1eb95a0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-28 Jonathan Dixon <joth at chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Bug 30547: (Chromium) searchbox not rendered properly due to the css property -webkit-border-radius
+ https://bugs.webkit.org/show_bug.cgi?id=30547
+
+ Test: fast/css/text-input-with-webkit-border-radius.html
+
+ * rendering/RenderThemeChromiumWin.cpp:
+ (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
+ Implemented rounded border rendering in Chromium Windows theme renderer.
+
2009-10-28 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/rendering/RenderThemeChromiumWin.cpp b/WebCore/rendering/RenderThemeChromiumWin.cpp
index 20503f3..4b38d53 100644
--- a/WebCore/rendering/RenderThemeChromiumWin.cpp
+++ b/WebCore/rendering/RenderThemeChromiumWin.cpp
@@ -611,21 +611,11 @@ bool RenderThemeChromiumWin::paintTextFieldInternal(RenderObject* o,
const IntRect& r,
bool drawEdges)
{
- // Nasty hack to make us not paint the border on text fields with a
- // border-radius. Webkit paints elements with border-radius for us.
- // FIXME: Get rid of this if-check once we can properly clip rounded
- // borders: http://b/1112604 and http://b/1108635
- // FIXME: make sure we do the right thing if css background-clip is set.
- if (o->style()->hasBorderRadius())
- return false;
-
- const ThemeData& themeData = getThemeData(o);
-
// Fallback to white if the specified color object is invalid.
+ // (Note ChromiumBridge::paintTextField duplicates this check).
Color backgroundColor(Color::white);
- if (o->style()->backgroundColor().isValid()) {
+ if (o->style()->backgroundColor().isValid())
backgroundColor = o->style()->backgroundColor();
- }
// If we have background-image, don't fill the content area to expose the
// parent's background. Also, we shouldn't fill the content area if the
@@ -634,17 +624,32 @@ bool RenderThemeChromiumWin::paintTextFieldInternal(RenderObject* o,
// Note that we should paint the content area white if we have neither the
// background color nor background image explicitly specified to keep the
// appearance of select element consistent with other browsers.
- bool fillContentArea = !o->style()->hasBackgroundImage() && backgroundColor.alpha() != 0;
-
- WebCore::ThemePainter painter(i.context, r);
- ChromiumBridge::paintTextField(painter.context(),
- themeData.m_part,
- themeData.m_state,
- themeData.m_classicState,
- painter.drawRect(),
- backgroundColor,
- fillContentArea,
- drawEdges);
+ bool fillContentArea = !o->style()->hasBackgroundImage() && backgroundColor.alpha();
+
+ if (o->style()->hasBorderRadius()) {
+ // If the style has rounded borders, setup the context to clip the
+ // background (themed or filled) appropriately.
+ // FIXME: make sure we do the right thing if css background-clip is set.
+ i.context->save();
+ IntSize topLeft, topRight, bottomLeft, bottomRight;
+ o->style()->getBorderRadiiForRect(r, topLeft, topRight, bottomLeft, bottomRight);
+ i.context->addRoundedRectClip(r, topLeft, topRight, bottomLeft, bottomRight);
+ }
+ {
+ const ThemeData& themeData = getThemeData(o);
+ WebCore::ThemePainter painter(i.context, r);
+ ChromiumBridge::paintTextField(painter.context(),
+ themeData.m_part,
+ themeData.m_state,
+ themeData.m_classicState,
+ painter.drawRect(),
+ backgroundColor,
+ fillContentArea,
+ drawEdges);
+ // End of block commits the painter before restoring context.
+ }
+ if (o->style()->hasBorderRadius())
+ i.context->restore();
return false;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list