[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 01:08:21 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit c67dff515bf7e1008e84326792a5ca1e3f203926
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 14 21:21:14 2010 +0000

    2010-01-14  Evan Stade  <estade at chromium.org>
    
            Reviewed by Eric Seidel.
    
            Chromium Linux: don't stretch checkboxes
            https://bugs.webkit.org/show_bug.cgi?id=28631
    
            * fast/css/non-standard-checkbox-size.html: Added.
            * platform/mac/fast/css/non-standard-checkbox-size-expected.checksum: Added.
            * platform/mac/fast/css/non-standard-checkbox-size-expected.png: Added.
            * platform/mac/fast/css/non-standard-checkbox-size-expected.txt: Added.
            * platform/gtk/Skipped: Skipping this new test so I don't break this bot.  Just needs new results.
            * platform/qt/Skipped: ditto
            * platform/win/Skipped: ditto
    2010-01-14  Evan Stade  <estade at chromium.org>
    
            Reviewed by Eric Seidel.
    
            Chromium Linux: don't stretch checkboxes
            https://bugs.webkit.org/show_bug.cgi?id=28631
    
            Make the default size for checkboxes/radio buttons also the maximum
            size.
    
            Based on patch by Adam Langley.
    
            Test: fast/css/non-standard-checkbox-size.html
    
            * rendering/RenderThemeChromiumSkia.cpp:
            (WebCore::center):
            (WebCore::RenderThemeChromiumSkia::paintCheckbox):
            (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
            (WebCore::RenderThemeChromiumSkia::paintRadio):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53289 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 87a740f..70af328 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-01-14  Evan Stade  <estade at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Chromium Linux: don't stretch checkboxes
+        https://bugs.webkit.org/show_bug.cgi?id=28631
+
+        * fast/css/non-standard-checkbox-size.html: Added.
+        * platform/mac/fast/css/non-standard-checkbox-size-expected.checksum: Added.
+        * platform/mac/fast/css/non-standard-checkbox-size-expected.png: Added.
+        * platform/mac/fast/css/non-standard-checkbox-size-expected.txt: Added.
+        * platform/gtk/Skipped: Skipping this new test so I don't break this bot.  Just needs new results.
+        * platform/qt/Skipped: ditto
+        * platform/win/Skipped: ditto
+
 2010-01-14  Brian Weinstein  <bweinstein at apple.com>
 
         Reviewed by Oliver Hunt.
diff --git a/LayoutTests/fast/css/non-standard-checkbox-size.html b/LayoutTests/fast/css/non-standard-checkbox-size.html
new file mode 100644
index 0000000..335b8c9
--- /dev/null
+++ b/LayoutTests/fast/css/non-standard-checkbox-size.html
@@ -0,0 +1,9 @@
+<html>
+<body>
+
+The following inputs should not be stretched.
+<input type="checkbox" value="DummyValue" style="height:50px;width=60px;">
+<input type="radio" value="DummyValue2" style="height:50px;width=60px;">
+
+</body>
+</html>
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 34e06b9..87d8b99 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5746,3 +5746,6 @@ fast/profiler/dead-time.html
 
 # Fails on and off (more often fails) on the release bot
 media/event-attributes.html
+
+# Just needs pixel and rendering results generated by someone with this platform:
+fast/css/non-standard-checkbox-size.html
diff --git a/LayoutTests/platform/mac/fast/css/non-standard-checkbox-size-expected.checksum b/LayoutTests/platform/mac/fast/css/non-standard-checkbox-size-expected.checksum
new file mode 100644
index 0000000..8ca0ccf
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/css/non-standard-checkbox-size-expected.checksum
@@ -0,0 +1 @@
+f34f9ce0ea87a32ae756dcfaf1241ccc
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/css/non-standard-checkbox-size-expected.png b/LayoutTests/platform/mac/fast/css/non-standard-checkbox-size-expected.png
new file mode 100644
index 0000000..f781cc7
Binary files /dev/null and b/LayoutTests/platform/mac/fast/css/non-standard-checkbox-size-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/css/non-standard-checkbox-size-expected.txt b/LayoutTests/platform/mac/fast/css/non-standard-checkbox-size-expected.txt
new file mode 100644
index 0000000..33cc69d
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/css/non-standard-checkbox-size-expected.txt
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderText {#text} at (0,37) size 289x18
+        text run at (0,37) width 289: "The following inputs should not be stretched. "
+      RenderBlock {INPUT} at (292,3) size 12x50
+      RenderText {#text} at (307,37) size 4x18
+        text run at (307,37) width 4: " "
+      RenderBlock {INPUT} at (314,3) size 12x50
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 188f956..e30a643 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5090,3 +5090,6 @@ fast/forms/slider-thumb-shared-style.html
 fast/forms/slider-thumb-stylability.html
 fast/forms/slider-zoomed.html
 fast/forms/slider-mouse-events.html
+
+# Just needs pixel and rendering results generated by someone with this platform:
+fast/css/non-standard-checkbox-size.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index b6ffd20..1f81ec8 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -742,3 +742,6 @@ fast/frames/iframe-onload-remove-self-no-crash.html
 # FIXME: This is the wrong test to skip.  It is believed some other test is affecting this test results.
 # See https://bugs.webkit.org/show_bug.cgi?id=33374
 svg/W3C-SVG-1.1/filters-conv-01-f.svg
+
+# Just needs pixel and rendering results generated by someone with this platform:
+fast/css/non-standard-checkbox-size.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0763a9d..d26a213 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-01-14  Evan Stade  <estade at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Chromium Linux: don't stretch checkboxes
+        https://bugs.webkit.org/show_bug.cgi?id=28631
+
+        Make the default size for checkboxes/radio buttons also the maximum
+        size.
+
+        Based on patch by Adam Langley.
+
+        Test: fast/css/non-standard-checkbox-size.html
+
+        * rendering/RenderThemeChromiumSkia.cpp:
+        (WebCore::center):
+        (WebCore::RenderThemeChromiumSkia::paintCheckbox):
+        (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
+        (WebCore::RenderThemeChromiumSkia::paintRadio):
+
 2010-01-14  Brian Weinstein  <bweinstein at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebCore/rendering/RenderThemeChromiumSkia.cpp b/WebCore/rendering/RenderThemeChromiumSkia.cpp
index 016a264..7d3bcec 100644
--- a/WebCore/rendering/RenderThemeChromiumSkia.cpp
+++ b/WebCore/rendering/RenderThemeChromiumSkia.cpp
@@ -217,6 +217,22 @@ int RenderThemeChromiumSkia::minimumMenuListSize(RenderStyle* style) const
     return 0;
 }
 
+// These are the default dimensions of radio buttons and checkboxes.
+static const int widgetStandardWidth = 13;
+static const int widgetStandardHeight = 13;
+
+// Return a rectangle that has the same center point as |original|, but with a
+// size capped at |width| by |height|.
+IntRect center(const IntRect& original, int width, int height)
+{
+    width = std::min(original.width(), width);
+    height = std::min(original.height(), height);
+    int x = original.x() + (original.width() - width) / 2;
+    int y = original.y() + (original.height() - height) / 2;
+
+    return IntRect(x, y, width, height);
+}
+
 bool RenderThemeChromiumSkia::paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect)
 {
     static Image* const checkedImage = Image::loadPlatformResource("linuxCheckboxOn").releaseRef();
@@ -231,7 +247,7 @@ bool RenderThemeChromiumSkia::paintCheckbox(RenderObject* o, const RenderObject:
     else
         image = this->isChecked(o) ? disabledCheckedImage : disabledUncheckedImage;
 
-    i.context->drawImage(image, o->style()->colorSpace(), rect);
+    i.context->drawImage(image, o->style()->colorSpace(), center(rect, widgetStandardHeight, widgetStandardWidth));
     return false;
 }
 
@@ -246,7 +262,7 @@ void RenderThemeChromiumSkia::setCheckboxSize(RenderStyle* style) const
     // querying the theme gives you a larger size that accounts for the higher
     // DPI.  Until our entire engine honors a DPI setting other than 96, we
     // can't rely on the theme's metrics.
-    const IntSize size(13, 13);
+    const IntSize size(widgetStandardHeight, widgetStandardWidth);
     setSizeIfAuto(style, size);
 }
 
@@ -263,7 +279,7 @@ bool RenderThemeChromiumSkia::paintRadio(RenderObject* o, const RenderObject::Pa
     else
         image = this->isChecked(o) ? disabledCheckedImage : disabledUncheckedImage;
 
-    i.context->drawImage(image, o->style()->colorSpace(), rect);
+    i.context->drawImage(image, o->style()->colorSpace(), center(rect, widgetStandardHeight, widgetStandardWidth));
     return false;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list