2011-01-21 Xiyuan Xia <xiyuan@chromium.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 20:26:01 +0000 (20:26 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 20:26:01 +0000 (20:26 +0000)
        Reviewed by Tony Chang.

        Update chromium/linux baselines after drawing code moved into
        WebThemeEngine.
        https://bugs.webkit.org/show_bug.cgi?id=52826

        * platform/chromium-linux/css1/box_properties/acid_test-expected.checksum:
        * platform/chromium-linux/css1/box_properties/acid_test-expected.png:
        * platform/chromium-linux/css2.1/t09-c5526c-display-00-e-expected.checksum:
        * platform/chromium-linux/css2.1/t09-c5526c-display-00-e-expected.png:
        * platform/chromium-linux/fast/block/basic/011-expected.checksum:
        * platform/chromium-linux/fast/block/basic/011-expected.png:
        * platform/chromium-linux/fast/block/margin-collapse/103-expected.checksum:
        * platform/chromium-linux/fast/block/margin-collapse/103-expected.png:
        * platform/chromium-linux/fast/css/non-standard-checkbox-size-expected.checksum:
        * platform/chromium-linux/fast/css/non-standard-checkbox-size-expected.png:
        * platform/chromium-linux/fast/dom/HTMLProgressElement/progress-element-expected.checksum:
        * platform/chromium-linux/fast/dom/HTMLProgressElement/progress-element-expected.png:
        * platform/chromium-linux/fast/forms/basic-inputs-expected.checksum:
        * platform/chromium-linux/fast/forms/basic-inputs-expected.png:
        * platform/chromium-linux/fast/forms/basic-selects-expected.checksum:
        * platform/chromium-linux/fast/forms/basic-selects-expected.png:
        * platform/chromium-linux/fast/forms/box-shadow-override-expected.checksum:
        * platform/chromium-linux/fast/forms/box-shadow-override-expected.png:
        * platform/chromium-linux/fast/forms/checkbox-radio-onchange-expected.checksum:
        * platform/chromium-linux/fast/forms/checkbox-radio-onchange-expected.png:
        * platform/chromium-linux/fast/forms/file-input-disabled-expected.checksum:
        * platform/chromium-linux/fast/forms/file-input-disabled-expected.png:
        * platform/chromium-linux/fast/forms/form-element-geometry-expected.checksum:
        * platform/chromium-linux/fast/forms/form-element-geometry-expected.png:
        * platform/chromium-linux/fast/forms/formmove-expected.checksum:
        * platform/chromium-linux/fast/forms/formmove-expected.png:
        * platform/chromium-linux/fast/forms/formmove2-expected.checksum:
        * platform/chromium-linux/fast/forms/formmove2-expected.png:
        * platform/chromium-linux/fast/forms/indeterminate-expected.checksum:
        * platform/chromium-linux/fast/forms/indeterminate-expected.png:
        * platform/chromium-linux/fast/forms/input-appearance-height-expected.checksum:
        * platform/chromium-linux/fast/forms/input-appearance-height-expected.png:
        * platform/chromium-linux/fast/forms/input-value-expected.checksum:
        * platform/chromium-linux/fast/forms/input-value-expected.png:
        * platform/chromium-linux/fast/forms/menulist-restrict-line-height-expected.checksum:
        * platform/chromium-linux/fast/forms/menulist-restrict-line-height-expected.png:
        * platform/chromium-linux/fast/forms/menulist-style-color-expected.checksum:
        * platform/chromium-linux/fast/forms/menulist-style-color-expected.png:
        * platform/chromium-linux/fast/forms/placeholder-position-expected.checksum:
        * platform/chromium-linux/fast/forms/placeholder-position-expected.png: Added property svn:mime-type.
        * platform/chromium-linux/fast/forms/radio-attr-order-expected.checksum:
        * platform/chromium-linux/fast/forms/radio-attr-order-expected.png:
        * platform/chromium-linux/fast/forms/radio-nested-labels-expected.checksum:
        * platform/chromium-linux/fast/forms/radio-nested-labels-expected.png:
        * platform/chromium-linux/fast/forms/radio_checked-expected.checksum:
        * platform/chromium-linux/fast/forms/radio_checked-expected.png:
        * platform/chromium-linux/fast/forms/radio_checked_dynamic-expected.checksum:
        * platform/chromium-linux/fast/forms/radio_checked_dynamic-expected.png:
        * platform/chromium-linux/fast/forms/select-baseline-expected.checksum:
        * platform/chromium-linux/fast/forms/select-baseline-expected.png:
        * platform/chromium-linux/fast/inline/positionedLifetime-expected.checksum:
        * platform/chromium-linux/fast/inline/positionedLifetime-expected.png:
        * platform/chromium-linux/fast/parser/bad-xml-slash-expected.checksum:
        * platform/chromium-linux/fast/parser/bad-xml-slash-expected.png:
        * platform/chromium-linux/fast/replaced/replaced-breaking-expected.checksum:
        * platform/chromium-linux/fast/replaced/replaced-breaking-expected.png:
        * platform/chromium-linux/fast/replaced/width100percent-checkbox-expected.checksum:
        * platform/chromium-linux/fast/replaced/width100percent-checkbox-expected.png:
        * platform/chromium-linux/fast/text/textIteratorNilRenderer-expected.checksum:
        * platform/chromium-linux/fast/text/textIteratorNilRenderer-expected.png:
        * platform/chromium-linux/fast/text/whitespace/normal-after-nowrap-breaking-expected.checksum:
        * platform/chromium-linux/fast/text/whitespace/normal-after-nowrap-breaking-expected.png:
        * platform/chromium-linux/tables/mozilla/bugs/bug1318-expected.checksum:
        * platform/chromium-linux/tables/mozilla/bugs/bug1318-expected.png:
        * platform/chromium-linux/tables/mozilla/bugs/bug4527-expected.checksum:
        * platform/chromium-linux/tables/mozilla/bugs/bug4527-expected.png: Added property svn:mime-type.
        * platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.checksum:
        * platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.png:
        * platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.checksum:
        * platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.png:
2011-01-21  Xiyuan Xia  <xiyuan@chromium.org>

        Reviewed by Tony Chang.

        Use WebThemeEngine for relevant RenderTheme parts for chromium/linux.
        https://bugs.webkit.org/show_bug.cgi?id=52826

        * platform/chromium/ChromiumBridge.h:
        * rendering/RenderThemeChromiumLinux.cpp:
        (WebCore::getWebThemeState):
        (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
        (WebCore::RenderThemeChromiumLinux::paintCheckbox):
        (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
        (WebCore::RenderThemeChromiumLinux::paintRadio):
        (WebCore::RenderThemeChromiumLinux::setRadioSize):
        (WebCore::RenderThemeChromiumLinux::paintButton):
        (WebCore::RenderThemeChromiumLinux::paintTextField):
        (WebCore::RenderThemeChromiumLinux::paintMenuList):
        (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
        (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
        (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
        (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
        (WebCore::RenderThemeChromiumLinux::paintProgressBar):
        * rendering/RenderThemeChromiumLinux.h:
        * rendering/RenderThemeChromiumSkia.cpp:
        (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
        (WebCore::RenderThemeChromiumSkia::setSizeIfAuto):
        (WebCore::RenderThemeChromiumSkia::indeterminateProgressValueRectFor):
        * rendering/RenderThemeChromiumSkia.h:
2011-01-21  Xiyuan Xia  <xiyuan@chromium.org>

        Reviewed by Tony Chang.

        Use WebThemeEngine for relevant RenderTheme parts for chromium/linux.
        https://bugs.webkit.org/show_bug.cgi?id=52826

        * WebKit.gyp:
        * src/ChromiumBridge.cpp:
        (WebCore::WebThemePart):
        (WebCore::GetWebThemeExtraParams):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76379 268f45cc-cd09-0410-ab3c-d52691b4dbfc

80 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium-linux/css1/box_properties/acid_test-expected.checksum
LayoutTests/platform/chromium-linux/css1/box_properties/acid_test-expected.png
LayoutTests/platform/chromium-linux/css2.1/t09-c5526c-display-00-e-expected.checksum
LayoutTests/platform/chromium-linux/css2.1/t09-c5526c-display-00-e-expected.png
LayoutTests/platform/chromium-linux/fast/block/basic/011-expected.checksum
LayoutTests/platform/chromium-linux/fast/block/basic/011-expected.png
LayoutTests/platform/chromium-linux/fast/block/margin-collapse/103-expected.checksum
LayoutTests/platform/chromium-linux/fast/block/margin-collapse/103-expected.png
LayoutTests/platform/chromium-linux/fast/css/non-standard-checkbox-size-expected.checksum
LayoutTests/platform/chromium-linux/fast/css/non-standard-checkbox-size-expected.png
LayoutTests/platform/chromium-linux/fast/dom/HTMLProgressElement/progress-element-expected.checksum
LayoutTests/platform/chromium-linux/fast/dom/HTMLProgressElement/progress-element-expected.png
LayoutTests/platform/chromium-linux/fast/forms/basic-inputs-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/basic-inputs-expected.png
LayoutTests/platform/chromium-linux/fast/forms/basic-selects-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/basic-selects-expected.png
LayoutTests/platform/chromium-linux/fast/forms/box-shadow-override-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/box-shadow-override-expected.png
LayoutTests/platform/chromium-linux/fast/forms/checkbox-radio-onchange-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/checkbox-radio-onchange-expected.png
LayoutTests/platform/chromium-linux/fast/forms/file-input-disabled-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/file-input-disabled-expected.png
LayoutTests/platform/chromium-linux/fast/forms/form-element-geometry-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/form-element-geometry-expected.png
LayoutTests/platform/chromium-linux/fast/forms/formmove-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/formmove-expected.png
LayoutTests/platform/chromium-linux/fast/forms/formmove2-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/formmove2-expected.png
LayoutTests/platform/chromium-linux/fast/forms/indeterminate-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/indeterminate-expected.png
LayoutTests/platform/chromium-linux/fast/forms/input-appearance-height-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/input-appearance-height-expected.png
LayoutTests/platform/chromium-linux/fast/forms/input-value-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/input-value-expected.png
LayoutTests/platform/chromium-linux/fast/forms/menulist-restrict-line-height-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/menulist-restrict-line-height-expected.png
LayoutTests/platform/chromium-linux/fast/forms/menulist-style-color-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/menulist-style-color-expected.png
LayoutTests/platform/chromium-linux/fast/forms/placeholder-position-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/placeholder-position-expected.png
LayoutTests/platform/chromium-linux/fast/forms/radio-attr-order-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/radio-attr-order-expected.png
LayoutTests/platform/chromium-linux/fast/forms/radio-nested-labels-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/radio-nested-labels-expected.png
LayoutTests/platform/chromium-linux/fast/forms/radio_checked-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/radio_checked-expected.png
LayoutTests/platform/chromium-linux/fast/forms/radio_checked_dynamic-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/radio_checked_dynamic-expected.png
LayoutTests/platform/chromium-linux/fast/forms/select-baseline-expected.checksum
LayoutTests/platform/chromium-linux/fast/forms/select-baseline-expected.png
LayoutTests/platform/chromium-linux/fast/inline/positionedLifetime-expected.checksum
LayoutTests/platform/chromium-linux/fast/inline/positionedLifetime-expected.png
LayoutTests/platform/chromium-linux/fast/parser/bad-xml-slash-expected.checksum
LayoutTests/platform/chromium-linux/fast/parser/bad-xml-slash-expected.png
LayoutTests/platform/chromium-linux/fast/replaced/replaced-breaking-expected.checksum
LayoutTests/platform/chromium-linux/fast/replaced/replaced-breaking-expected.png
LayoutTests/platform/chromium-linux/fast/replaced/width100percent-checkbox-expected.checksum
LayoutTests/platform/chromium-linux/fast/replaced/width100percent-checkbox-expected.png
LayoutTests/platform/chromium-linux/fast/text/textIteratorNilRenderer-expected.checksum
LayoutTests/platform/chromium-linux/fast/text/textIteratorNilRenderer-expected.png
LayoutTests/platform/chromium-linux/fast/text/whitespace/normal-after-nowrap-breaking-expected.checksum
LayoutTests/platform/chromium-linux/fast/text/whitespace/normal-after-nowrap-breaking-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug1318-expected.checksum
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug1318-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug4527-expected.checksum
LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug4527-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.checksum
LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.png
LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.checksum
LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.png
Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/PlatformBridge.h
Source/WebCore/rendering/RenderThemeChromiumLinux.cpp
Source/WebCore/rendering/RenderThemeChromiumLinux.h
Source/WebCore/rendering/RenderThemeChromiumSkia.cpp
Source/WebCore/rendering/RenderThemeChromiumSkia.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/src/PlatformBridge.cpp

index bc7d731bcb1c0c55b0bd98eba2c71730b6e2165c..1966691689be71f78146b26a5f75ffbb7933b34b 100644 (file)
@@ -1,3 +1,82 @@
+2011-01-21  Xiyuan Xia  <xiyuan@chromium.org>
+
+        Reviewed by Tony Chang.
+
+        Update chromium/linux baselines after drawing code moved into
+        WebThemeEngine.
+        https://bugs.webkit.org/show_bug.cgi?id=52826
+
+        * platform/chromium-linux/css1/box_properties/acid_test-expected.checksum:
+        * platform/chromium-linux/css1/box_properties/acid_test-expected.png:
+        * platform/chromium-linux/css2.1/t09-c5526c-display-00-e-expected.checksum:
+        * platform/chromium-linux/css2.1/t09-c5526c-display-00-e-expected.png:
+        * platform/chromium-linux/fast/block/basic/011-expected.checksum:
+        * platform/chromium-linux/fast/block/basic/011-expected.png:
+        * platform/chromium-linux/fast/block/margin-collapse/103-expected.checksum:
+        * platform/chromium-linux/fast/block/margin-collapse/103-expected.png:
+        * platform/chromium-linux/fast/css/non-standard-checkbox-size-expected.checksum:
+        * platform/chromium-linux/fast/css/non-standard-checkbox-size-expected.png:
+        * platform/chromium-linux/fast/dom/HTMLProgressElement/progress-element-expected.checksum:
+        * platform/chromium-linux/fast/dom/HTMLProgressElement/progress-element-expected.png:
+        * platform/chromium-linux/fast/forms/basic-inputs-expected.checksum:
+        * platform/chromium-linux/fast/forms/basic-inputs-expected.png:
+        * platform/chromium-linux/fast/forms/basic-selects-expected.checksum:
+        * platform/chromium-linux/fast/forms/basic-selects-expected.png:
+        * platform/chromium-linux/fast/forms/box-shadow-override-expected.checksum:
+        * platform/chromium-linux/fast/forms/box-shadow-override-expected.png:
+        * platform/chromium-linux/fast/forms/checkbox-radio-onchange-expected.checksum:
+        * platform/chromium-linux/fast/forms/checkbox-radio-onchange-expected.png:
+        * platform/chromium-linux/fast/forms/file-input-disabled-expected.checksum:
+        * platform/chromium-linux/fast/forms/file-input-disabled-expected.png:
+        * platform/chromium-linux/fast/forms/form-element-geometry-expected.checksum:
+        * platform/chromium-linux/fast/forms/form-element-geometry-expected.png:
+        * platform/chromium-linux/fast/forms/formmove-expected.checksum:
+        * platform/chromium-linux/fast/forms/formmove-expected.png:
+        * platform/chromium-linux/fast/forms/formmove2-expected.checksum:
+        * platform/chromium-linux/fast/forms/formmove2-expected.png:
+        * platform/chromium-linux/fast/forms/indeterminate-expected.checksum:
+        * platform/chromium-linux/fast/forms/indeterminate-expected.png:
+        * platform/chromium-linux/fast/forms/input-appearance-height-expected.checksum:
+        * platform/chromium-linux/fast/forms/input-appearance-height-expected.png:
+        * platform/chromium-linux/fast/forms/input-value-expected.checksum:
+        * platform/chromium-linux/fast/forms/input-value-expected.png:
+        * platform/chromium-linux/fast/forms/menulist-restrict-line-height-expected.checksum:
+        * platform/chromium-linux/fast/forms/menulist-restrict-line-height-expected.png:
+        * platform/chromium-linux/fast/forms/menulist-style-color-expected.checksum:
+        * platform/chromium-linux/fast/forms/menulist-style-color-expected.png:
+        * platform/chromium-linux/fast/forms/placeholder-position-expected.checksum:
+        * platform/chromium-linux/fast/forms/placeholder-position-expected.png: Added property svn:mime-type.
+        * platform/chromium-linux/fast/forms/radio-attr-order-expected.checksum:
+        * platform/chromium-linux/fast/forms/radio-attr-order-expected.png:
+        * platform/chromium-linux/fast/forms/radio-nested-labels-expected.checksum:
+        * platform/chromium-linux/fast/forms/radio-nested-labels-expected.png:
+        * platform/chromium-linux/fast/forms/radio_checked-expected.checksum:
+        * platform/chromium-linux/fast/forms/radio_checked-expected.png:
+        * platform/chromium-linux/fast/forms/radio_checked_dynamic-expected.checksum:
+        * platform/chromium-linux/fast/forms/radio_checked_dynamic-expected.png:
+        * platform/chromium-linux/fast/forms/select-baseline-expected.checksum:
+        * platform/chromium-linux/fast/forms/select-baseline-expected.png:
+        * platform/chromium-linux/fast/inline/positionedLifetime-expected.checksum:
+        * platform/chromium-linux/fast/inline/positionedLifetime-expected.png:
+        * platform/chromium-linux/fast/parser/bad-xml-slash-expected.checksum:
+        * platform/chromium-linux/fast/parser/bad-xml-slash-expected.png:
+        * platform/chromium-linux/fast/replaced/replaced-breaking-expected.checksum:
+        * platform/chromium-linux/fast/replaced/replaced-breaking-expected.png:
+        * platform/chromium-linux/fast/replaced/width100percent-checkbox-expected.checksum:
+        * platform/chromium-linux/fast/replaced/width100percent-checkbox-expected.png:
+        * platform/chromium-linux/fast/text/textIteratorNilRenderer-expected.checksum:
+        * platform/chromium-linux/fast/text/textIteratorNilRenderer-expected.png:
+        * platform/chromium-linux/fast/text/whitespace/normal-after-nowrap-breaking-expected.checksum:
+        * platform/chromium-linux/fast/text/whitespace/normal-after-nowrap-breaking-expected.png:
+        * platform/chromium-linux/tables/mozilla/bugs/bug1318-expected.checksum:
+        * platform/chromium-linux/tables/mozilla/bugs/bug1318-expected.png:
+        * platform/chromium-linux/tables/mozilla/bugs/bug4527-expected.checksum:
+        * platform/chromium-linux/tables/mozilla/bugs/bug4527-expected.png: Added property svn:mime-type.
+        * platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.checksum:
+        * platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.png:
+        * platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.checksum:
+        * platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.png:
+
 2011-01-21  Anton Muhin  <antonm@chromium.org>
 
         Reviewed by Nate Chapin.
index 5b9235922a2c7709d23b69ebaf9deacb10034b43..b7c344ce5943ab3edae6aee59e65682d4e6bc620 100644 (file)
@@ -1 +1 @@
-f353ed60c217c35a9a331a3c0773fd10
\ No newline at end of file
+e2b7a88f11dae9aeb36f3cce169928c8
\ No newline at end of file
index 18d2987371d0a855f225b6d40d92d7d5c6ae5a5b..9d615915a092d7c135d3e925d922e68816e94da1 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/css1/box_properties/acid_test-expected.png and b/LayoutTests/platform/chromium-linux/css1/box_properties/acid_test-expected.png differ
index f0e13e593a1e8015bba1b96511744541cbc33466..0d0f82612b70494e119b13b937ce6545764fab48 100644 (file)
@@ -1 +1 @@
-2fcd76111a537a8bc402afaf764042d4
\ No newline at end of file
+857651d0098974b32ff32e6a41963329
\ No newline at end of file
index c278015a3bf61e1856d1b0428867e95c38584e97..93899a12b7bd9aa9e12e7142d14be6c6886e59ea 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/css2.1/t09-c5526c-display-00-e-expected.png and b/LayoutTests/platform/chromium-linux/css2.1/t09-c5526c-display-00-e-expected.png differ
index 5b9235922a2c7709d23b69ebaf9deacb10034b43..b7c344ce5943ab3edae6aee59e65682d4e6bc620 100644 (file)
@@ -1 +1 @@
-f353ed60c217c35a9a331a3c0773fd10
\ No newline at end of file
+e2b7a88f11dae9aeb36f3cce169928c8
\ No newline at end of file
index 18d2987371d0a855f225b6d40d92d7d5c6ae5a5b..9d615915a092d7c135d3e925d922e68816e94da1 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/block/basic/011-expected.png and b/LayoutTests/platform/chromium-linux/fast/block/basic/011-expected.png differ
index 2549570c2f531e5aafd2396be155cc2690c86d67..c7e92634afc798cfe1bf8182339e245ee30ce328 100644 (file)
@@ -1 +1 @@
-5a5c6549929cc3fa39916f22943c2770
\ No newline at end of file
+0410b6c9859bd433a41bad7aa64ea036
\ No newline at end of file
index 7a753042446ae88fd4f7ebcca1dd10eb4c221cdb..4d59fd1750f1c855f5a2ae8bb5bf8d7f6f46b9ae 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/block/margin-collapse/103-expected.png and b/LayoutTests/platform/chromium-linux/fast/block/margin-collapse/103-expected.png differ
index c4ef81259c19e58448116ba5fe51a084ac98e258..bd3bfe1f92e70ba176ff083eae4e454759c59866 100644 (file)
@@ -1 +1 @@
-3561d28f3c41f52aeeed2e2f622547b9
\ No newline at end of file
+52b0e66b3d0eff7a6d46e2ef32281587
\ No newline at end of file
index 054ab0321d48199e73cd8f99f884b6b66678b1bc..c4e2fc391ca1d1e3585357845e906fb82ee35021 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/css/non-standard-checkbox-size-expected.png and b/LayoutTests/platform/chromium-linux/fast/css/non-standard-checkbox-size-expected.png differ
index 10416f5826905a513b5a773ecd96911dc40446a7..18cb20a2ee60a71c5bb84c7e6f3450c4b005f1c7 100644 (file)
@@ -1 +1 @@
-e5e7132bec9d33f172110c570d6b71e5
\ No newline at end of file
+cfed1222b4f902ccb8e72d842f3fadda
\ No newline at end of file
index 4109d523a8a6f8b0446115e908361b7e2890f13b..049128b6f0c5ab33191dd11da1a7f5514c689d5f 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/dom/HTMLProgressElement/progress-element-expected.png and b/LayoutTests/platform/chromium-linux/fast/dom/HTMLProgressElement/progress-element-expected.png differ
index 9ad3bd3f5d1f7495006caece9d60c2c3832e4485..483ead451fc0cbc42029828a11d16b6800719f80 100644 (file)
@@ -1 +1 @@
-c7b6401c6e7079364f5919e58fb92db9
\ No newline at end of file
+1d5fada71c2e5b1cd49c5c1a958c8584
\ No newline at end of file
index beee212af3bf4572bff2c502febb2ddd7da71ea2..994d2f8d70098dcfefe2692dcca8071c62d57448 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/basic-inputs-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/basic-inputs-expected.png differ
index b3176e8023cce31ac0200c6b61a443de9c1fdda6..4ce419bb199813f37097df32084d31032cc07f6a 100644 (file)
@@ -1 +1 @@
-2b77541a31cf118c3c8eaa920088f29f
\ No newline at end of file
+ce204fb3c19b6446ff77adc183742f99
\ No newline at end of file
index ac729640195f2eb1a7dbf12270e6fb0cb46f587e..9055c3988312e9f8de1d267b82b65316cebce449 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/basic-selects-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/basic-selects-expected.png differ
index 040d3b7eae7a56ab430ef20dd733189a0c61dfa5..0c5961cb6af9e091052f446feba46e95f000f62e 100644 (file)
@@ -1 +1 @@
-9fc3b723b0cd8b29e2c8ebfb04c387cb
\ No newline at end of file
+362963478a1efd5ca5f5405160862234
\ No newline at end of file
index 4824de783772ef3234664112578ad24c964d6af6..ee184c5dcbfc426670c38c3efa39ccd1332005c5 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/box-shadow-override-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/box-shadow-override-expected.png differ
index 9ab1c73563c37c49f650767454bfd341ffb4dd43..fd1d9819fe1d427b82deb817c6544f0cca12b32f 100644 (file)
@@ -1 +1 @@
-f752be0eadb0fa59942240e722638156
\ No newline at end of file
+3839bfb094e16628512a3af82b4c68aa
\ No newline at end of file
index c7ba41f7aedad78cee4df85b895cf1ec5c424832..d9020ef81c30e4d38ef27e4f613a276f40a8e130 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/checkbox-radio-onchange-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/checkbox-radio-onchange-expected.png differ
index 1682d461434b78d09be23756cba10990e7c81dc6..46ef0a3f9d693ca92a27af70dabf6eba7480ba06 100644 (file)
@@ -1 +1 @@
-557a5a3f4aec985594f35b8ba2d70057
\ No newline at end of file
+02fe74d68fb55a2fcd55b19a64c24b19
\ No newline at end of file
index 6629e33a69648bd3f62eb3b0e98f91a92a8e027d..92ba30d6606223fd1580be0aa36cfb140c31f950 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/file-input-disabled-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/file-input-disabled-expected.png differ
index 0dbc44811611ae44d6d20075332caa1f0399ff39..1225e54952e8260f5f9787f3ec4d91eb37f039a9 100644 (file)
@@ -1 +1 @@
-0d69908f5ab8763f0f963aae021ac024
\ No newline at end of file
+b1e3541f696cd7f5f50fce1f0f99ae6e
\ No newline at end of file
index 8ef983df0d8a18b25fc1ebac77810b5e54682a59..e25dd5035adbfada7d3e0c689211750772412c7b 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/form-element-geometry-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/form-element-geometry-expected.png differ
index ef4c33a25a069f476c795c2ef25a59c56a6c7822..cbaa329987f71fb3f044933749af663362cba9d1 100644 (file)
@@ -1 +1 @@
-359f5833ce5b3c2905d45c96a0ca5ed9
\ No newline at end of file
+570b7e77a0bf6835f3f2544b1e346552
\ No newline at end of file
index 72ab0e1f1634becf3758465a048f1f6b91b773b4..cb5c50604b8d7093c9a6fcd66cb0489a21c7c5d4 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/formmove-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/formmove-expected.png differ
index 9011f64e0338d6b70a7e8a0969acd04fa000c62d..eff58f94a1d3a9f95ac8a6347b82ff307eaf752e 100644 (file)
@@ -1 +1 @@
-418715c09c2aeae02cdcef085c1b287a
\ No newline at end of file
+40831efa561b3f0944340035b8493cd2
\ No newline at end of file
index b3ae3b77f8fe51a906ac5f3c9176db9da58a5072..df9d8f8d8c6aceedc0cb7ee4a0da7f729d31a664 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/formmove2-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/formmove2-expected.png differ
index 1042855c0af37d1c7e603007b831dca12d040c12..fc1dc860fd2326a210d4a858e00117797d7fae19 100644 (file)
@@ -1 +1 @@
-9c47ef09dfc0c8a302fb4bae3dbd4d64
\ No newline at end of file
+50b0c5b7834eb76d03388e15441f1c75
\ No newline at end of file
index 92907fde45934df79b49f265093d9768f279b6be..189686cc2ab84b87a9a6e987ad2761cb4b181770 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/indeterminate-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/indeterminate-expected.png differ
index e303d52ebfb710cbba47b948ce4c63ad50115e12..08ca8242af7550fa83a2b8a9bd0a0edd33f362cd 100644 (file)
@@ -1 +1 @@
-f25d50637130b97a04f9e12fade883b8
\ No newline at end of file
+15095e1d75fbcaf5f537730cb68d5b55
\ No newline at end of file
index 03d0bc733aeed962fd88b478312257bbf64ee5de..89be6fae10da4ea0521d2c45f2da52fea61c98cd 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/input-appearance-height-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/input-appearance-height-expected.png differ
index 701d4a5c36abaa8e1f092f9185f7befc5ed1fd9d..8130ad53bff5d500c86cc5b493a2b3c5e56a00d2 100644 (file)
@@ -1 +1 @@
-e0a2213afe993b7bf86bd0af0bfa00c6
\ No newline at end of file
+1f413e36b6dbe6e5894de39a58d498a5
\ No newline at end of file
index d24669af8dcb1f3dc57d14fe202cc305bd500f2d..2590568cdde110d8a4beec773cdadc2beed464c1 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/input-value-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/input-value-expected.png differ
index 5f8358320efa83d2024639950ca88fb016585472..ac7706573951bfcdd41ed3129b2848da8423fda1 100644 (file)
@@ -1 +1 @@
-74df9a5740e5718a8908df6aa288921b
\ No newline at end of file
+274fa379b74af982fa12e009f00d4503
\ No newline at end of file
index c3fd8170bcd2a91441b696575a6b0e8387ee5482..f91265d4038bd9a7e63a0d43915dc53f4ef5db30 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/menulist-restrict-line-height-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/menulist-restrict-line-height-expected.png differ
index 4a495c6217e847b7ac4c9e8183a3f020954057d1..d885632069bda58ed765191be8aca9b3717f8d6f 100644 (file)
@@ -1 +1 @@
-5f0da1e321c89006a2289df4944d23ca
\ No newline at end of file
+665a9dfb63403df20deb6c7bf8a4eebb
\ No newline at end of file
index ab433db4c2a4e192e8b3f7974d9b0e0c35252aa8..2e0058e41d3921dd8c3281a1353e7a1d66e53c80 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/menulist-style-color-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/menulist-style-color-expected.png differ
index 185dd1d6f7a2246ef3ea0430cabebcc1757f45d3..739faaf4762e3f626ea4e00cf0743e1d0e581137 100644 (file)
@@ -1 +1 @@
-138aa1ba63d923cdd5856467663dc5ef
\ No newline at end of file
+b7fc7220f4ebdd7dafc197781fff395d
\ No newline at end of file
index 044313d7a2c0b475ac4e0d6492d53160e94caf90..c607f8fd49601397fd7baf7f507cdd1f850fef9b 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/placeholder-position-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/placeholder-position-expected.png differ
index 13217da73ddd36693c50437c27bba416f883c3f5..f59f118c166d5d8440119eb6d403a9a430923c73 100644 (file)
@@ -1 +1 @@
-87cc186fe6e8ba9b768ba8a647b74768
\ No newline at end of file
+eff7fbbd6c76ac0db2adc94c34b018c9
\ No newline at end of file
index b7aed561d796fd6aec3eb80762b58fcb97c30fbc..97985b884aad73b0cfd014d72fb7f65b4db6c183 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/radio-attr-order-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/radio-attr-order-expected.png differ
index d5c3cbc951adb4652798068de8a0145c0c257a90..015c4d98ef2a659ad227a582a177022e01d5c6cc 100644 (file)
@@ -1 +1 @@
-24273da0f86748b51f877da38ab0ed24
\ No newline at end of file
+867dbe0a5e9e6d23a7c0692f0aae80c7
\ No newline at end of file
index 0700f3054dbbd347ac34bfbf358736e39d0228bd..9c1994687a68803f05c5be59e6d1818691b36759 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/radio-nested-labels-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/radio-nested-labels-expected.png differ
index 40acfd1330502046016a3f9b0c65aed38cf20020..74ec89a14cb3c82e704d1defa7e39c696f3f8ce5 100644 (file)
@@ -1 +1 @@
-3e749a763e9bc3e076248297be2a5789
\ No newline at end of file
+5cb65911f1790b06a3297fce62b68483
\ No newline at end of file
index 3a235a972193445e7f325303914fb848c36f1126..a1de57b74bef53e7d498e5f31cb514ad95322d63 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/radio_checked-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/radio_checked-expected.png differ
index 07249fabe65ef1eb62dfc97b9679f56156488b10..1208a92758422b9f56b03f60d9801d7ac139dbab 100644 (file)
@@ -1 +1 @@
-5036944b029094bf34e2c442108a37aa
\ No newline at end of file
+777f47028bcb9353783784fb53359c58
\ No newline at end of file
index b459509f2e0e99a5842e5180113b24745d66bb24..f18e54361dc157c633f60da073698cffceb61703 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/radio_checked_dynamic-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/radio_checked_dynamic-expected.png differ
index fb741f80b6e297034cdefc84c856abbdece758d4..36a9e3d7e45a7d9ed2eb20e9599d45629593a04a 100644 (file)
@@ -1 +1 @@
-6a546f8f3bfc3a99cbc588aa365c2234
\ No newline at end of file
+8c052baa6fc4ac34a4734a43aec827d9
\ No newline at end of file
index b56c144a96414117c634f86b69e168e1fb985356..2027b0a87fb862727795ecd38aeef48bcf8dd6fa 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/forms/select-baseline-expected.png and b/LayoutTests/platform/chromium-linux/fast/forms/select-baseline-expected.png differ
index f9ec128fe69789d9cde9971c11a887fcc5f00798..41c1c4e8a0e7e00fa18db48570218925a1335a2d 100644 (file)
@@ -1 +1 @@
-3db6199505319fd5fe3bb41457f04ec1
\ No newline at end of file
+a82cf56bb3d7010e23789b869af3b70e
\ No newline at end of file
index cb2f326af1fcdec8812f27d918f191fcb7fcbd5d..d1d671c716e71df0533b0f532730cebdc2f08938 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/inline/positionedLifetime-expected.png and b/LayoutTests/platform/chromium-linux/fast/inline/positionedLifetime-expected.png differ
index 54f3706885d3247c4e7b62896ee6bcbc7088766f..1ab85e0c57cd3e251a6bf1379cc8bbbb62dc6ede 100644 (file)
@@ -1 +1 @@
-ce8ed31873b1ea6f8526e30802f38152
\ No newline at end of file
+b8f56a9b331ae182bb935ca5554e615c
\ No newline at end of file
index 497312dea7d5fde7aaf4f27681ff9e4d3eb30626..749b409b361a724beee3d781706024e7053cdaf7 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/parser/bad-xml-slash-expected.png and b/LayoutTests/platform/chromium-linux/fast/parser/bad-xml-slash-expected.png differ
index bc8f4bd5ed08e02c5cb0d7bff29d0c6dce648cc6..d968dea30b1fab560153018aa57680415c63828e 100644 (file)
@@ -1 +1 @@
-9ed3840ae18149dff9148e885ce948f3
\ No newline at end of file
+7376d12828febb043bcf2927cd6b8406
\ No newline at end of file
index d17f4db46e0d546ade3b820f889542158010ed24..33f756c37a74cbab0372008054c73baf1c773cf9 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/replaced/replaced-breaking-expected.png and b/LayoutTests/platform/chromium-linux/fast/replaced/replaced-breaking-expected.png differ
index ca8a462340c2e3780a4506e72f83cc61b8f6385f..3e812cfb0ecc6a67953eefd2c852daf7ed4baf92 100644 (file)
@@ -1 +1 @@
-e7c1fdc1853425d70905da9497d90fd3
\ No newline at end of file
+75a3ba8f9403784fd7e7ec5a056fe647
\ No newline at end of file
index be1cfd22c2ed52c7201f251e6f100403ce989cfb..567b01a712367851219fa60509b22c6a6f325451 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/replaced/width100percent-checkbox-expected.png and b/LayoutTests/platform/chromium-linux/fast/replaced/width100percent-checkbox-expected.png differ
index 3fb307512b0848f5670e9382bdd1ed2a91394c8d..39375f49f4b3395b0361f417cec2c51e131c81f8 100644 (file)
@@ -1 +1 @@
-3341f820db3c325c6b5bf82f6795d455
\ No newline at end of file
+a7453705b11a9df4a7d3ac8ddfceb9e8
\ No newline at end of file
index bdaff7b020b560f6f4adc33f33d91729d6a743e3..6cfce3c030a1127516ed6504306943aece03706b 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/text/textIteratorNilRenderer-expected.png and b/LayoutTests/platform/chromium-linux/fast/text/textIteratorNilRenderer-expected.png differ
index 39ed7bc7bc781740d8b850e2a0869dff03b0f6d9..2ce0c2160144596a56ba7e3a54718e5894db7af6 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/fast/text/whitespace/normal-after-nowrap-breaking-expected.png and b/LayoutTests/platform/chromium-linux/fast/text/whitespace/normal-after-nowrap-breaking-expected.png differ
index 94220caa964a69902f3539c3b9ccbb8bf3169a07..310e4ac0062d3cef9a92713deb80ecd2ced6cdbf 100644 (file)
@@ -1 +1 @@
-2e5821c5792313f381653a3bd176553d
\ No newline at end of file
+77fc9663503d46d0f6b16df1b8b4515f
\ No newline at end of file
index 74f3aaeef12eb32aa87c3c878f7e9336b5bc6359..c3ef953fe50723d80a505b3fded316c53a11e2b9 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug1318-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug1318-expected.png differ
index 162a3ea7e53e6f2dbd2f5cb58d32717f9a5a8bd5..e1a55dca7253f48c287bc2e027fb430e32e50d7b 100644 (file)
@@ -1 +1 @@
-917fd36e5fec9e89956f6bcefb061268
\ No newline at end of file
+b75cf106d081e9c9515f8ead4d29a556
\ No newline at end of file
index 70dc10d1553aaff3da102b8af81a4628a3f46049..fc124f78c2d5f42464c8ed3f4ca3d4c68e64d0dd 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug4527-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla/bugs/bug4527-expected.png differ
index 1ae623ab596f76c1942229d6251a227cd465c1b3..3f8af3fcb9dab31ec196d6e3e84b5cf1972e538a 100644 (file)
@@ -1 +1 @@
-7eea62dbd4f182701b5e72ec76d35868
\ No newline at end of file
+d8159b0237ea43a869ad210b3b1ede15
\ No newline at end of file
index ee05aab8c9a64d1796bd75ac0f43d48af1f63fa9..5cb86d57bbd607d0ff803596fd18e43d6ec10202 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.png differ
index 9cf001b32daf4d5ae003f686c05c02bb920e4cdf..214ccb5ece2aac47252df3c6967ca214d0c56504 100644 (file)
@@ -1 +1 @@
-a90fceb21dc3db04c8ac38a2c1adfbc1
\ No newline at end of file
+56f2ab2eb09b07f3ffcb8148aa4daff4
\ No newline at end of file
index 2c1536157b0bf839e03b58430291a5b76df36cd9..8c7b67c414ca1883f28bf4fb55ee14e1f5703a77 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.png and b/LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.png differ
index a5ca3e2042eeec22749c58cd0b3f79314c7c0728..63c5e0b34ff144d71d86b6d109823ce2ea88b660 100644 (file)
@@ -1,3 +1,33 @@
+2011-01-21  Xiyuan Xia  <xiyuan@chromium.org>
+
+        Reviewed by Tony Chang.
+
+        Use WebThemeEngine for relevant RenderTheme parts for chromium/linux.
+        https://bugs.webkit.org/show_bug.cgi?id=52826
+
+        * platform/chromium/ChromiumBridge.h:
+        * rendering/RenderThemeChromiumLinux.cpp:
+        (WebCore::getWebThemeState):
+        (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
+        (WebCore::RenderThemeChromiumLinux::paintCheckbox):
+        (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
+        (WebCore::RenderThemeChromiumLinux::paintRadio):
+        (WebCore::RenderThemeChromiumLinux::setRadioSize):
+        (WebCore::RenderThemeChromiumLinux::paintButton):
+        (WebCore::RenderThemeChromiumLinux::paintTextField):
+        (WebCore::RenderThemeChromiumLinux::paintMenuList):
+        (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
+        (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
+        (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
+        (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
+        (WebCore::RenderThemeChromiumLinux::paintProgressBar):
+        * rendering/RenderThemeChromiumLinux.h:
+        * rendering/RenderThemeChromiumSkia.cpp:
+        (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
+        (WebCore::RenderThemeChromiumSkia::setSizeIfAuto):
+        (WebCore::RenderThemeChromiumSkia::indeterminateProgressValueRectFor):
+        * rendering/RenderThemeChromiumSkia.h:
+
 2011-01-21  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
index f5c1ed704d2c7ed8528e63aba80fefe928ca57b3..f6a2564418b64aa1b9283932fcf75b48cf398d1d 100644 (file)
@@ -267,6 +267,7 @@ public:
 #elif OS(LINUX)
     // The UI part which is being accessed.
     enum ThemePart {
+        // ScrollbarTheme parts
         PartScrollbarDownArrow,
         PartScrollbarLeftArrow,
         PartScrollbarRightArrow,
@@ -275,6 +276,17 @@ public:
         PartScrollbarVerticalThumb,
         PartScrollbarHorizontalTrack,
         PartScrollbarVerticalTrack,
+
+        // RenderTheme parts
+        PartCheckbox,
+        PartRadio,
+        PartButton,
+        PartTextField,
+        PartMenuList,
+        PartSliderTrack,
+        PartSliderThumb,
+        PartInnerSpinButton,
+        PartProgressBar
     };
 
     // The current state of the associated Part.
@@ -282,7 +294,7 @@ public:
         StateDisabled,
         StateHover,
         StateNormal,
-        StatePressed,
+        StatePressed
     };
 
     struct ScrollbarTrackExtraParams {
@@ -293,8 +305,51 @@ public:
         int trackHeight;
     };
 
+    struct ButtonExtraParams {
+        bool checked;
+        bool indeterminate; // Whether the button state is indeterminate.
+        bool isDefault; // Whether the button is default button.
+        unsigned backgroundColor;
+    };
+
+    struct TextFieldExtraParams {
+        bool isTextArea;
+        bool isListbox;
+        unsigned backgroundColor;
+    };
+
+    struct MenuListExtraParams {
+        int arrowX;
+        int arrowY;
+        unsigned backgroundColor;
+    };
+
+    struct SliderExtraParams {
+        bool vertical;
+        bool inDrag;
+    };
+
+    struct InnerSpinButtonExtraParams {
+        bool spinUp;
+        bool readOnly;
+    };
+
+    struct ProgressBarExtraParams {
+        bool determinate;
+        int valueRectX;
+        int valueRectY;
+        int valueRectWidth;
+        int valueRectHeight;
+    };
+
     union ThemePaintExtraParams {
         ScrollbarTrackExtraParams scrollbarTrack;
+        ButtonExtraParams button;
+        TextFieldExtraParams textField;
+        MenuListExtraParams menuList;
+        SliderExtraParams slider;
+        InnerSpinButtonExtraParams innerSpin;
+        ProgressBarExtraParams progressBar;
     };
 
     // Gets the size of the given theme part. For variable sized items
index 90736c7ee9369ee4920da4b3f80d6960e27fd466..3a2874d3e0e22f9b8db76290720a7ccbed34cc47 100644 (file)
 #include "CSSValueKeywords.h"
 #include "Color.h"
 #include "PaintInfo.h"
-#include "PlatformThemeChromiumGtk.h"
+#include "PlatformBridge.h"
 #include "RenderObject.h"
+#include "RenderProgress.h"
+#include "RenderSlider.h"
 #include "ScrollbarTheme.h"
 #include "UserAgentStyleSheets.h"
 
@@ -46,6 +48,21 @@ unsigned RenderThemeChromiumLinux::m_inactiveSelectionForegroundColor =
 
 double RenderThemeChromiumLinux::m_caretBlinkInterval;
 
+static const unsigned defaultButtonBackgroundColor = 0xffdddddd;
+
+static PlatformBridge::ThemePaintState getWebThemeState(const RenderTheme* theme, const RenderObject* o)
+{
+    if (!theme->isEnabled(o))
+        return PlatformBridge::StateDisabled;
+    if (theme->isPressed(o))
+        return PlatformBridge::StatePressed;
+    if (theme->isHovered(o))
+        return PlatformBridge::StateHover;
+
+    return PlatformBridge::StateNormal;
+}
+
+
 PassRefPtr<RenderTheme> RenderThemeChromiumLinux::create()
 {
     return adoptRef(new RenderThemeChromiumLinux());
@@ -128,15 +145,14 @@ Color RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor() const
 
 void RenderThemeChromiumLinux::adjustSliderThumbSize(RenderObject* o) const
 {
-    // These sizes match the sizes in Chromium Win.
-    const int sliderThumbAlongAxis = 11;
-    const int sliderThumbAcrossAxis = 21;
+    IntSize size = PlatformBridge::getThemePartSize(PlatformBridge::PartSliderThumb);
+
     if (o->style()->appearance() == SliderThumbHorizontalPart) {
-        o->style()->setWidth(Length(sliderThumbAlongAxis, Fixed));
-        o->style()->setHeight(Length(sliderThumbAcrossAxis, Fixed));
+        o->style()->setWidth(Length(size.width(), Fixed));
+        o->style()->setHeight(Length(size.height(), Fixed));
     } else if (o->style()->appearance() == SliderThumbVerticalPart) {
-        o->style()->setWidth(Length(sliderThumbAcrossAxis, Fixed));
-        o->style()->setHeight(Length(sliderThumbAlongAxis, Fixed));
+        o->style()->setWidth(Length(size.height(), Fixed));
+        o->style()->setHeight(Length(size.width(), Fixed));
     } else
         RenderThemeChromiumSkia::adjustSliderThumbSize(o);
 }
@@ -168,29 +184,154 @@ void RenderThemeChromiumLinux::setSelectionColors(
     m_inactiveSelectionForegroundColor = inactiveForegroundColor;
 }
 
+bool RenderThemeChromiumLinux::paintCheckbox(RenderObject* o, const PaintInfo& i, const IntRect& rect)
+{
+    PlatformBridge::ThemePaintExtraParams extraParams;
+    extraParams.button.checked = isChecked(o);
+    extraParams.button.indeterminate = isIndeterminate(o);
+
+    PlatformBridge::paintThemePart(i.context, PlatformBridge::PartCheckbox, getWebThemeState(this, o), rect, &extraParams);
+    return false;
+}
+
+void RenderThemeChromiumLinux::setCheckboxSize(RenderStyle* style) const
+{
+    // If the width and height are both specified, then we have nothing to do.
+    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+        return;
+
+    IntSize size = PlatformBridge::getThemePartSize(PlatformBridge::PartCheckbox);
+    setSizeIfAuto(style, size);
+}
+
+bool RenderThemeChromiumLinux::paintRadio(RenderObject* o, const PaintInfo& i, const IntRect& rect)
+{
+    PlatformBridge::ThemePaintExtraParams extraParams;
+    extraParams.button.checked = isChecked(o);
+
+    PlatformBridge::paintThemePart(i.context, PlatformBridge::PartRadio, getWebThemeState(this, o), rect, &extraParams);
+    return false;
+}
+
+void RenderThemeChromiumLinux::setRadioSize(RenderStyle* style) const
+{
+    // If the width and height are both specified, then we have nothing to do.
+    if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto())
+        return;
+
+    IntSize size = PlatformBridge::getThemePartSize(PlatformBridge::PartRadio);
+    setSizeIfAuto(style, size);
+}
+
+bool RenderThemeChromiumLinux::paintButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
+{
+    PlatformBridge::ThemePaintExtraParams extraParams;
+    extraParams.button.isDefault = isDefault(o);
+    extraParams.button.backgroundColor = defaultButtonBackgroundColor;
+    if (o->hasBackground())
+        extraParams.button.backgroundColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor).rgb();
+
+    PlatformBridge::paintThemePart(i.context, PlatformBridge::PartButton, getWebThemeState(this, o), rect, &extraParams);
+    return false;
+}
+
+bool RenderThemeChromiumLinux::paintTextField(RenderObject* o, const PaintInfo& i, const IntRect& rect)
+{
+    // WebThemeEngine does not handle border rounded corner and background image
+    // so return true to draw CSS border and background.
+    if (o->style()->hasBorderRadius() || o->style()->hasBackgroundImage())
+        return true;
+
+    ControlPart part = o->style()->appearance();
+
+    PlatformBridge::ThemePaintExtraParams extraParams;
+    extraParams.textField.isTextArea = part == TextAreaPart;
+    extraParams.textField.isListbox = part == ListboxPart;
+
+    // Fallback to white if the specified color object is invalid.
+    Color backgroundColor(Color::white);
+    if (o->style()->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
+        backgroundColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor);
+    extraParams.textField.backgroundColor = backgroundColor.rgb();
+
+    PlatformBridge::paintThemePart(i.context, PlatformBridge::PartTextField, getWebThemeState(this, o), rect, &extraParams);
+    return false;
+}
+
+bool RenderThemeChromiumLinux::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& rect)
+{
+    const int right = rect.x() + rect.width();
+    const int middle = rect.y() + rect.height() / 2;
+
+    PlatformBridge::ThemePaintExtraParams extraParams;
+    extraParams.menuList.arrowX = (o->style()->direction() == RTL) ? rect.x() + 7 : right - 13;
+    extraParams.menuList.arrowY = middle;
+    extraParams.menuList.backgroundColor = SkColorSetRGB(0xdd, 0xdd, 0xdd);
+    if (o->hasBackground())
+        extraParams.menuList.backgroundColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor).rgb();
+
+    PlatformBridge::paintThemePart(i.context, PlatformBridge::PartMenuList, getWebThemeState(this, o), rect, &extraParams);
+    return false;
+}
+
+bool RenderThemeChromiumLinux::paintSliderTrack(RenderObject* o, const PaintInfo& i, const IntRect& rect)
+{
+    PlatformBridge::ThemePaintExtraParams extraParams;
+    extraParams.slider.vertical = o->style()->appearance() == SliderVerticalPart;
+
+    PlatformBridge::paintThemePart(i.context, PlatformBridge::PartSliderTrack, getWebThemeState(this, o), rect, &extraParams);
+    return false;
+}
+
+bool RenderThemeChromiumLinux::paintSliderThumb(RenderObject* o, const PaintInfo& i, const IntRect& rect)
+{
+    PlatformBridge::ThemePaintExtraParams extraParams;
+    extraParams.slider.vertical = o->style()->appearance() == SliderThumbVerticalPart;
+    extraParams.slider.inDrag = toRenderSlider(o->parent())->inDragMode();
+
+    PlatformBridge::paintThemePart(i.context, PlatformBridge::PartSliderThumb, getWebThemeState(this, o), rect, &extraParams);
+    return false;
+}
+
 void RenderThemeChromiumLinux::adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
 {
-    int width = ScrollbarTheme::nativeTheme()->scrollbarThickness();
-    style->setWidth(Length(width, Fixed));
-    style->setMinWidth(Length(width, Fixed));
+    IntSize size = PlatformBridge::getThemePartSize(PlatformBridge::PartInnerSpinButton);
+
+    style->setWidth(Length(size.width(), Fixed));
+    style->setMinWidth(Length(size.width(), Fixed));
 }
 
-bool RenderThemeChromiumLinux::paintInnerSpinButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
+bool RenderThemeChromiumLinux::paintInnerSpinButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
 {
-    ControlStates northStates = controlStatesForRenderer(object);
-    ControlStates southStates = northStates;
-    if (northStates & SpinUpState)
-        southStates &= ~(HoverState | PressedState);
-    else
-        northStates &= ~(HoverState | PressedState);
+    PlatformBridge::ThemePaintExtraParams extraParams;
+    extraParams.innerSpin.spinUp = (controlStatesForRenderer(o) & SpinUpState);
+    extraParams.innerSpin.readOnly = isReadOnlyControl(o);
 
-    IntRect half = rect;
-    half.setHeight(rect.height() / 2);
-    PlatformThemeChromiumGtk::paintArrowButton(info.context, half, PlatformThemeChromiumGtk::North, northStates);
+    PlatformBridge::paintThemePart(i.context, PlatformBridge::PartInnerSpinButton, getWebThemeState(this, o), rect, &extraParams);
+    return false;
+}
+
+#if ENABLE(PROGRESS_TAG)
+
+bool RenderThemeChromiumLinux::paintProgressBar(RenderObject* o, const PaintInfo& i, const IntRect& rect)
+{
+    if (!o->isProgress())
+        return true;
 
-    half.setY(rect.y() + rect.height() / 2);
-    PlatformThemeChromiumGtk::paintArrowButton(info.context, half, PlatformThemeChromiumGtk::South, southStates);
+    RenderProgress* renderProgress = toRenderProgress(o);
+    IntRect valueRect = progressValueRectFor(renderProgress, rect);
+
+    PlatformBridge::ThemePaintExtraParams extraParams;
+    extraParams.progressBar.determinate = renderProgress->isDeterminate();
+    extraParams.progressBar.valueRectX = valueRect.x();
+    extraParams.progressBar.valueRectY = valueRect.y();
+    extraParams.progressBar.valueRectWidth = valueRect.width();
+    extraParams.progressBar.valueRectHeight = valueRect.height();
+
+    PlatformBridge::paintThemePart(i.context, PlatformBridge::PartProgressBar, getWebThemeState(this, o), rect, &extraParams);
     return false;
 }
 
+#endif
+
 } // namespace WebCore
index 9eeca976a5ac8fbdf60df9b43a6ce0a2830cf760..8f3eb982f3cf51dfc919920b3b07a3fb1fbdf9c8 100644 (file)
@@ -59,9 +59,25 @@ namespace WebCore {
         static void setCaretBlinkInterval(double interval);
         virtual double caretBlinkIntervalInternal() const;
 
+        virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&);
+        virtual void setCheckboxSize(RenderStyle*) const;
+
+        virtual bool paintRadio(RenderObject*, const PaintInfo&, const IntRect&);
+        virtual void setRadioSize(RenderStyle*) const;
+
+        virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&);
+        virtual bool paintTextField(RenderObject*, const PaintInfo&, const IntRect&);
+        virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
+        virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
+        virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
+
         virtual void adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
         virtual bool paintInnerSpinButton(RenderObject*, const PaintInfo&, const IntRect&);
 
+#if ENABLE(PROGRESS_TAG)
+        virtual bool paintProgressBar(RenderObject*, const PaintInfo&, const IntRect&);
+#endif
+
         static void setSelectionColors(unsigned activeBackgroundColor,
                                        unsigned activeForegroundColor,
                                        unsigned inactiveBackgroundColor,
index 145776605e788c2f5c4cbfedd9da923a375cbf56..96918766f20a8538c44f67d8def06d8a96713867 100644 (file)
@@ -68,38 +68,6 @@ static const float minSearchFieldResultsDecorationSize = 9;
 static const float maxSearchFieldResultsDecorationSize = 30;
 static const float defaultSearchFieldResultsButtonWidth = 18;
 
-static void setSizeIfAuto(RenderStyle* style, const IntSize& size)
-{
-    if (style->width().isIntrinsicOrAuto())
-        style->setWidth(Length(size.width(), Fixed));
-    if (style->height().isAuto())
-        style->setHeight(Length(size.height(), Fixed));
-}
-
-static void drawVertLine(SkCanvas* canvas, int x, int y1, int y2, const SkPaint& paint)
-{
-    SkIRect skrect;
-    skrect.set(x, y1, x + 1, y2 + 1);
-    canvas->drawIRect(skrect, paint);
-}
-
-static void drawHorizLine(SkCanvas* canvas, int x1, int x2, int y, const SkPaint& paint)
-{
-    SkIRect skrect;
-    skrect.set(x1, y, x2 + 1, y + 1);
-    canvas->drawIRect(skrect, paint);
-}
-
-static void drawBox(SkCanvas* canvas, const IntRect& rect, const SkPaint& paint)
-{
-    const int right = rect.x() + rect.width() - 1;
-    const int bottom = rect.y() + rect.height() - 1;
-    drawHorizLine(canvas, rect.x(), right, rect.y(), paint);
-    drawVertLine(canvas, right, rect.y(), bottom, paint);
-    drawHorizLine(canvas, rect.x(), right, bottom, paint);
-    drawVertLine(canvas, rect.x(), rect.y(), bottom, paint);
-}
-
 // We aim to match IE here.
 // -IE uses a font based on the encoding as the default font for form controls.
 // -Gecko uses MS Shell Dlg (actually calls GetStockObject(DEFAULT_GUI_FONT),
@@ -237,28 +205,6 @@ IntRect center(const IntRect& original, int width, int height)
     return IntRect(x, y, width, height);
 }
 
-bool RenderThemeChromiumSkia::paintCheckbox(RenderObject* o, const PaintInfo& i, const IntRect& rect)
-{
-    static Image* const checkedImage = Image::loadPlatformResource("linuxCheckboxOn").releaseRef();
-    static Image* const uncheckedImage = Image::loadPlatformResource("linuxCheckboxOff").releaseRef();
-    static Image* const indeterminateImage = Image::loadPlatformResource("linuxCheckboxIndeterminate").releaseRef();
-    static Image* const disabledCheckedImage = Image::loadPlatformResource("linuxCheckboxDisabledOn").releaseRef();
-    static Image* const disabledUncheckedImage = Image::loadPlatformResource("linuxCheckboxDisabledOff").releaseRef();
-    static Image* const disabledIndeterminateImage = Image::loadPlatformResource("linuxCheckboxDisabledIndeterminate").releaseRef();
-
-    Image* image;
-
-    if (isIndeterminate(o))
-        image = isEnabled(o) ? indeterminateImage : disabledIndeterminateImage;
-    else if (isChecked(o))
-        image = isEnabled(o) ? checkedImage : disabledCheckedImage;
-    else
-        image = isEnabled(o) ? uncheckedImage : disabledUncheckedImage;
-
-    i.context->drawImage(image, o->style()->colorSpace(), center(rect, widgetStandardHeight, widgetStandardWidth));
-    return false;
-}
-
 void RenderThemeChromiumSkia::setCheckboxSize(RenderStyle* style) const
 {
     // If the width and height are both specified, then we have nothing to do.
@@ -270,108 +216,16 @@ 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(widgetStandardHeight, widgetStandardWidth);
+    const IntSize size(widgetStandardWidth, widgetStandardHeight);
     setSizeIfAuto(style, size);
 }
 
-bool RenderThemeChromiumSkia::paintRadio(RenderObject* o, const PaintInfo& i, const IntRect& rect)
-{
-    static Image* const checkedImage = Image::loadPlatformResource("linuxRadioOn").releaseRef();
-    static Image* const uncheckedImage = Image::loadPlatformResource("linuxRadioOff").releaseRef();
-    static Image* const disabledCheckedImage = Image::loadPlatformResource("linuxRadioDisabledOn").releaseRef();
-    static Image* const disabledUncheckedImage = Image::loadPlatformResource("linuxRadioDisabledOff").releaseRef();
-
-    Image* image;
-    if (this->isEnabled(o))
-        image = this->isChecked(o) ? checkedImage : uncheckedImage;
-    else
-        image = this->isChecked(o) ? disabledCheckedImage : disabledUncheckedImage;
-
-    i.context->drawImage(image, o->style()->colorSpace(), center(rect, widgetStandardHeight, widgetStandardWidth));
-    return false;
-}
-
 void RenderThemeChromiumSkia::setRadioSize(RenderStyle* style) const
 {
     // Use same sizing for radio box as checkbox.
     setCheckboxSize(style);
 }
 
-static SkColor brightenColor(double h, double s, double l, float brightenAmount)
-{
-    l += brightenAmount;
-    if (l > 1.0)
-        l = 1.0;
-    if (l < 0.0)
-        l = 0.0;
-
-    return makeRGBAFromHSLA(h, s, l, 1.0);
-}
-
-static void paintButtonLike(RenderTheme* theme, RenderObject* o, const PaintInfo& i, const IntRect& rect)
-{
-    SkCanvas* const canvas = i.context->platformContext()->canvas();
-    SkPaint paint;
-    SkRect skrect;
-    const int right = rect.x() + rect.width();
-    const int bottom = rect.y() + rect.height();
-    SkColor baseColor = SkColorSetARGB(0xff, 0xdd, 0xdd, 0xdd);
-    if (o->hasBackground())
-        baseColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor).rgb();
-    double h, s, l;
-    Color(baseColor).getHSL(h, s, l);
-    // Our standard gradient is from 0xdd to 0xf8. This is the amount of
-    // increased luminance between those values.
-    SkColor lightColor(brightenColor(h, s, l, 0.105));
-
-    // If the button is too small, fallback to drawing a single, solid color
-    if (rect.width() < 5 || rect.height() < 5) {
-        paint.setColor(baseColor);
-        skrect.set(rect.x(), rect.y(), right, bottom);
-        canvas->drawRect(skrect, paint);
-        return;
-    }
-
-    const int borderAlpha = theme->isHovered(o) ? 0x80 : 0x55;
-    paint.setARGB(borderAlpha, 0, 0, 0);
-    canvas->drawLine(rect.x() + 1, rect.y(), right - 1, rect.y(), paint);
-    canvas->drawLine(right - 1, rect.y() + 1, right - 1, bottom - 1, paint);
-    canvas->drawLine(rect.x() + 1, bottom - 1, right - 1, bottom - 1, paint);
-    canvas->drawLine(rect.x(), rect.y() + 1, rect.x(), bottom - 1, paint);
-
-    paint.setColor(SK_ColorBLACK);
-    SkPoint p[2];
-    const int lightEnd = theme->isPressed(o) ? 1 : 0;
-    const int darkEnd = !lightEnd;
-    p[lightEnd].set(SkIntToScalar(rect.x()), SkIntToScalar(rect.y()));
-    p[darkEnd].set(SkIntToScalar(rect.x()), SkIntToScalar(bottom - 1));
-    SkColor colors[2];
-    colors[0] = lightColor;
-    colors[1] = baseColor;
-
-    SkShader* shader = SkGradientShader::CreateLinear(
-        p, colors, NULL, 2, SkShader::kClamp_TileMode, NULL);
-    paint.setStyle(SkPaint::kFill_Style);
-    paint.setShader(shader);
-    shader->unref();
-
-    skrect.set(rect.x() + 1, rect.y() + 1, right - 1, bottom - 1);
-    canvas->drawRect(skrect, paint);
-
-    paint.setShader(NULL);
-    paint.setColor(brightenColor(h, s, l, -0.0588));
-    canvas->drawPoint(rect.x() + 1, rect.y() + 1, paint);
-    canvas->drawPoint(right - 2, rect.y() + 1, paint);
-    canvas->drawPoint(rect.x() + 1, bottom - 2, paint);
-    canvas->drawPoint(right - 2, bottom - 2, paint);
-}
-
-bool RenderThemeChromiumSkia::paintButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
-{
-    paintButtonLike(this, o, i, rect);
-    return false;
-}
-
 void RenderThemeChromiumSkia::adjustButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
 {
     if (style->appearance() == PushButtonPart) {
@@ -380,12 +234,6 @@ void RenderThemeChromiumSkia::adjustButtonStyle(CSSStyleSelector*, RenderStyle*
     }
 }
 
-
-bool RenderThemeChromiumSkia::paintTextField(RenderObject* o, const PaintInfo& i, const IntRect& rect)
-{
-    return true;
-}
-
 bool RenderThemeChromiumSkia::paintTextArea(RenderObject* o, const PaintInfo& i, const IntRect& r)
 {
     return paintTextField(o, i, r);
@@ -622,30 +470,6 @@ void RenderThemeChromiumSkia::adjustMenuListStyle(CSSStyleSelector* selector, Re
     style->setLineHeight(RenderStyle::initialLineHeight());
 }
 
-bool RenderThemeChromiumSkia::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& rect)
-{
-    SkCanvas* const canvas = i.context->platformContext()->canvas();
-    const int right = rect.x() + rect.width();
-    const int middle = rect.y() + rect.height() / 2;
-
-    paintButtonLike(this, o, i, rect);
-
-    SkPaint paint;
-    paint.setColor(SK_ColorBLACK);
-    paint.setAntiAlias(true);
-    paint.setStyle(SkPaint::kFill_Style);
-
-    int arrowXPosition = (o->style()->direction() == RTL) ? rect.x() + 7 : right - 13;
-    SkPath path;
-    path.moveTo(arrowXPosition, middle - 3);
-    path.rLineTo(6, 0);
-    path.rLineTo(-3, 6);
-    path.close();
-    canvas->drawPath(path, paint);
-
-    return false;
-}
-
 void RenderThemeChromiumSkia::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
 {
     adjustMenuListStyle(selector, style, e);
@@ -657,69 +481,6 @@ bool RenderThemeChromiumSkia::paintMenuListButton(RenderObject* o, const PaintIn
     return paintMenuList(o, i, rect);
 }
 
-bool RenderThemeChromiumSkia::paintSliderTrack(RenderObject*, const PaintInfo& i, const IntRect& rect)
-{
-    // Just paint a grey box for now (matches the color of a scrollbar background.
-    SkCanvas* const canvas = i.context->platformContext()->canvas();
-    int verticalCenter = rect.y() + rect.height() / 2;
-    int top = std::max(rect.y(), verticalCenter - 2);
-    int bottom = std::min(rect.y() + rect.height(), verticalCenter + 2);
-
-    SkPaint paint;
-    const SkColor grey = SkColorSetARGB(0xff, 0xe3, 0xdd, 0xd8);
-    paint.setColor(grey);
-
-    SkRect skrect;
-    skrect.set(rect.x(), top, rect.x() + rect.width(), bottom);
-    canvas->drawRect(skrect, paint);
-
-    return false;
-}
-
-bool RenderThemeChromiumSkia::paintSliderThumb(RenderObject* o, const PaintInfo& i, const IntRect& rect)
-{
-    // Make a thumb similar to the scrollbar thumb.
-    const bool hovered = isHovered(o) || toRenderSlider(o->parent())->inDragMode();
-    const int midx = rect.x() + rect.width() / 2;
-    const int midy = rect.y() + rect.height() / 2;
-    const bool vertical = (o->style()->appearance() == SliderThumbVerticalPart);
-    SkCanvas* const canvas = i.context->platformContext()->canvas();
-
-    const SkColor thumbLightGrey = SkColorSetARGB(0xff, 0xf4, 0xf2, 0xef);
-    const SkColor thumbDarkGrey = SkColorSetARGB(0xff, 0xea, 0xe5, 0xe0);
-    SkPaint paint;
-    paint.setColor(hovered ? SK_ColorWHITE : thumbLightGrey);
-
-    SkIRect skrect;
-    if (vertical)
-        skrect.set(rect.x(), rect.y(), midx + 1, rect.bottom());
-    else
-        skrect.set(rect.x(), rect.y(), rect.right(), midy + 1);
-
-    canvas->drawIRect(skrect, paint);
-
-    paint.setColor(hovered ? thumbLightGrey : thumbDarkGrey);
-
-    if (vertical)
-        skrect.set(midx + 1, rect.y(), rect.right(), rect.bottom());
-    else
-        skrect.set(rect.x(), midy + 1, rect.right(), rect.bottom());
-
-    canvas->drawIRect(skrect, paint);
-
-    const SkColor borderDarkGrey = SkColorSetARGB(0xff, 0x9d, 0x96, 0x8e);
-    paint.setColor(borderDarkGrey);
-    drawBox(canvas, rect, paint);
-
-    if (rect.height() > 10 && rect.width() > 10) {
-        drawHorizLine(canvas, midx - 2, midx + 2, midy, paint);
-        drawHorizLine(canvas, midx - 2, midx + 2, midy - 3, paint);
-        drawHorizLine(canvas, midx - 2, midx + 2, midy + 3, paint);
-    }
-
-    return false;
-}
-
 int RenderThemeChromiumSkia::popupInternalPaddingLeft(RenderStyle* style) const
 {
     return menuListInternalPadding(style, LeftPadding);
@@ -758,6 +519,15 @@ double RenderThemeChromiumSkia::caretBlinkIntervalInternal() const
     return RenderTheme::caretBlinkInterval();
 }
 
+// static
+void RenderThemeChromiumSkia::setSizeIfAuto(RenderStyle* style, const IntSize& size)
+{
+    if (style->width().isIntrinsicOrAuto())
+        style->setWidth(Length(size.width(), Fixed));
+    if (style->height().isAuto())
+        style->setHeight(Length(size.height(), Fixed));
+}
+
 int RenderThemeChromiumSkia::menuListInternalPadding(RenderStyle* style, int paddingType) const
 {
     // This internal padding is in addition to the user-supplied padding.
@@ -801,7 +571,7 @@ IntRect RenderThemeChromiumSkia::indeterminateProgressValueRectFor(RenderProgres
     int movableWidth = rect.width() - valueWidth;
     if (movableWidth <= 0)
         return IntRect();
-    
+
     double progress = renderProgress->animationProgress();
     if (progress < 0.5)
         return IntRect(rect.x() + progress * 2 * movableWidth, rect.y(), valueWidth, rect.height());
@@ -818,67 +588,6 @@ double RenderThemeChromiumSkia::animationDurationForProgressBar(RenderProgress*
     return progressAnimationInterval * progressAnimationFrmaes * 2; // "2" for back and forth
 }
 
-bool RenderThemeChromiumSkia::paintProgressBar(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)
-{
-    static Image* barImage = Image::loadPlatformResource("linuxProgressBar").releaseRef();
-    static Image* valueImage = Image::loadPlatformResource("linuxProgressValue").releaseRef();
-    static Image* leftBorderImage = Image::loadPlatformResource("linuxProgressBorderLeft").releaseRef();
-    static Image* rightBorderImage = Image::loadPlatformResource("linuxProgressBorderRight").releaseRef();
-    ASSERT(barImage->height() == valueImage->height());
-
-    if (!renderObject->isProgress())
-        return true;
-
-    paintInfo.context->platformContext()->setImageResamplingHint(barImage->size(), rect.size());
-
-    RenderProgress* renderProgress = toRenderProgress(renderObject);
-    double tileScale = static_cast<double>(rect.height()) / barImage->height();
-    IntSize barTileSize(static_cast<int>(barImage->width() * tileScale), rect.height());
-    ColorSpace colorSpace = renderObject->style()->colorSpace();
-
-    paintInfo.context->drawTiledImage(barImage, colorSpace, rect, IntPoint(0, 0), barTileSize);
-
-    IntRect valueRect = progressValueRectFor(renderProgress, rect);
-    if (valueRect.width()) {
-
-        IntSize valueTileSize(std::max(1, static_cast<int>(valueImage->width() * tileScale)), valueRect.height());
-
-        int leftOffset = valueRect.x() - rect.x();
-        int roundedLeftOffset= (leftOffset / valueTileSize.width()) * valueTileSize.width();
-        int dstLeftValueWidth = roundedLeftOffset - leftOffset + (leftOffset % valueImage->width()) ? valueTileSize.width() : 0;
-
-        IntRect dstLeftValueRect(valueRect.x(), valueRect.y(), dstLeftValueWidth, valueRect.height());
-        int srcLeftValueWidth = dstLeftValueWidth / tileScale;
-        IntRect srcLeftValueRect(valueImage->width() - srcLeftValueWidth, 0, srcLeftValueWidth, valueImage->height());
-        paintInfo.context->drawImage(valueImage, colorSpace, dstLeftValueRect, srcLeftValueRect);
-
-        int rightOffset = valueRect.right() - rect.x();
-        int roundedRightOffset = (rightOffset / valueTileSize.width()) * valueTileSize.width();
-        int dstRightValueWidth = rightOffset - roundedRightOffset;
-        IntRect dstRightValueRect(rect.x() + roundedRightOffset, valueRect.y(), dstRightValueWidth, valueTileSize.height());
-        int srcRightValueWidth = dstRightValueWidth / tileScale;
-        IntRect srcRightValueRect(0, 0, srcRightValueWidth, valueImage->height());
-        paintInfo.context->drawImage(valueImage, colorSpace, dstRightValueRect, srcRightValueRect);
-        
-        IntRect alignedValueRect(dstLeftValueRect.right(), dstLeftValueRect.y(), 
-                                 dstRightValueRect.x() - dstLeftValueRect.right(), dstLeftValueRect.height());
-        paintInfo.context->drawTiledImage(valueImage, colorSpace, alignedValueRect, IntPoint(0, 0), valueTileSize);
-    }
-
-    int dstLeftBorderWidth = leftBorderImage->width() * tileScale;
-    IntRect dstLeftBorderRect(rect.x(), rect.y(), dstLeftBorderWidth, rect.height());
-    paintInfo.context->drawImage(leftBorderImage, colorSpace, dstLeftBorderRect, leftBorderImage->rect());
-
-    int dstRightBorderWidth = rightBorderImage->width() * tileScale;
-    IntRect dstRightBorderRect(rect.right() - dstRightBorderWidth, rect.y(), dstRightBorderWidth, rect.height());
-    paintInfo.context->drawImage(rightBorderImage, colorSpace, dstRightBorderRect, rightBorderImage->rect());
-
-    paintInfo.context->platformContext()->clearImageResamplingHint();
-
-    return false;
-}
-
-
 IntRect RenderThemeChromiumSkia::progressValueRectFor(RenderProgress* renderProgress, const IntRect& rect) const
 {
     return renderProgress->isDeterminate() ? determinateProgressValueRectFor(renderProgress, rect) : indeterminateProgressValueRectFor(renderProgress, rect);
index a11046dc3c1fbc7b58c2c87083f515718aa748bb..bf0af3419409e52d3f6f2c967cd2bda9948ca450 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
 
 class RenderProgress;
 
-    class RenderThemeChromiumSkia : public RenderTheme {
+class RenderThemeChromiumSkia : public RenderTheme {
     public:
         RenderThemeChromiumSkia();
         virtual ~RenderThemeChromiumSkia();
@@ -66,17 +66,12 @@ class RenderProgress;
 
         virtual int minimumMenuListSize(RenderStyle*) const;
 
-        virtual bool paintCheckbox(RenderObject*, const PaintInfo&, const IntRect&);
         virtual void setCheckboxSize(RenderStyle*) const;
 
-        virtual bool paintRadio(RenderObject*, const PaintInfo&, const IntRect&);
         virtual void setRadioSize(RenderStyle*) const;
 
-        virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&);
         virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
 
-        virtual bool paintTextField(RenderObject*, const PaintInfo&, const IntRect&);
-
         virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&);
 
         virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
@@ -112,17 +107,12 @@ class RenderProgress;
         // codepath. We never go down both. And in both cases, they render the
         // entire menulist.
         virtual void adjustMenuListStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
-        virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
         virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
         virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
 
-        virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
-        virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
-
 #if ENABLE(PROGRESS_TAG)
         virtual double animationRepeatIntervalForProgressBar(RenderProgress*) const;
         virtual double animationDurationForProgressBar(RenderProgress*) const;
-        virtual bool paintProgressBar(RenderObject*, const PaintInfo&, const IntRect&);
 #endif
 
         // These methods define the padding for the MenuList's inner block.
@@ -153,6 +143,8 @@ class RenderProgress;
 
         virtual double caretBlinkIntervalInternal() const;
 
+        static void setSizeIfAuto(RenderStyle*, const IntSize&);
+
 #if ENABLE(PROGRESS_TAG)
         IntRect determinateProgressValueRectFor(RenderProgress*, const IntRect&) const;
         IntRect indeterminateProgressValueRectFor(RenderProgress*, const IntRect&) const;
index 1b0de4aad643e56abb8b85d45c49c45fdce2d78b..05b832aba374875c68eb8342c1297dcabf5f8a00 100644 (file)
@@ -1,3 +1,15 @@
+2011-01-21  Xiyuan Xia  <xiyuan@chromium.org>
+
+        Reviewed by Tony Chang.
+
+        Use WebThemeEngine for relevant RenderTheme parts for chromium/linux.
+        https://bugs.webkit.org/show_bug.cgi?id=52826
+
+        * WebKit.gyp:
+        * src/ChromiumBridge.cpp:
+        (WebCore::WebThemePart):
+        (WebCore::GetWebThemeExtraParams):
+
 2011-01-21  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
index f40f4a2609f0aa9791ff93e08c85841c53632940..3a3672c7932eb1110d98d77f4d0453a97e489f78 100644 (file)
                             'variables': {
                                 'repack_path': '<(chromium_src_dir)/tools/data_pack/repack.py',
                                 'pak_inputs': [
+                                    '<(SHARED_INTERMEDIATE_DIR)/gfx/gfx_resources.pak',
                                     '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
                                     '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
                                     '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
index 041d4a0c4356ecbe47cda93db299ebff0bc279bd..04016fcb7611cb18812df3ee8e9050b64144df10 100644 (file)
@@ -791,6 +791,15 @@ static WebThemeEngine::Part WebThemePart(PlatformBridge::ThemePart part)
     case PlatformBridge::PartScrollbarVerticalThumb: return WebThemeEngine::PartScrollbarVerticalThumb;
     case PlatformBridge::PartScrollbarHorizontalTrack: return WebThemeEngine::PartScrollbarHorizontalTrack;
     case PlatformBridge::PartScrollbarVerticalTrack: return WebThemeEngine::PartScrollbarVerticalTrack;
+    case PlatformBridge::PartCheckbox: return WebThemeEngine::PartCheckbox;
+    case PlatformBridge::PartRadio: return WebThemeEngine::PartRadio;
+    case PlatformBridge::PartButton: return WebThemeEngine::PartButton;
+    case PlatformBridge::PartTextField: return WebThemeEngine::PartTextField;
+    case PlatformBridge::PartMenuList: return WebThemeEngine::PartMenuList;
+    case PlatformBridge::PartSliderTrack: return WebThemeEngine::PartSliderTrack;
+    case PlatformBridge::PartSliderThumb: return WebThemeEngine::PartSliderThumb;
+    case PlatformBridge::PartInnerSpinButton: return WebThemeEngine::PartInnerSpinButton;
+    case PlatformBridge::PartProgressBar: return WebThemeEngine::PartProgressBar;
     }
     ASSERT_NOT_REACHED();
     return WebThemeEngine::PartScrollbarDownArrow;
@@ -810,11 +819,53 @@ static WebThemeEngine::State WebThemeState(PlatformBridge::ThemePaintState state
 
 static void GetWebThemeExtraParams(PlatformBridge::ThemePart part, PlatformBridge::ThemePaintState state, const PlatformBridge::ThemePaintExtraParams* extraParams, WebThemeEngine::ExtraParams* webThemeExtraParams)
 {
-    if (part == PlatformBridge::PartScrollbarHorizontalTrack || part == PlatformBridge::PartScrollbarVerticalTrack) {
+    switch (part) {
+    case PlatformBridge::PartScrollbarHorizontalTrack:
+    case PlatformBridge::PartScrollbarVerticalTrack:
         webThemeExtraParams->scrollbarTrack.trackX = extraParams->scrollbarTrack.trackX;
         webThemeExtraParams->scrollbarTrack.trackY = extraParams->scrollbarTrack.trackY;
         webThemeExtraParams->scrollbarTrack.trackWidth = extraParams->scrollbarTrack.trackWidth;
         webThemeExtraParams->scrollbarTrack.trackHeight = extraParams->scrollbarTrack.trackHeight;
+        break;
+    case PlatformBridge::PartCheckbox:
+        webThemeExtraParams->button.checked = extraParams->button.checked;
+        webThemeExtraParams->button.indeterminate = extraParams->button.indeterminate;
+        break;
+    case PlatformBridge::PartRadio:
+        webThemeExtraParams->button.checked = extraParams->button.checked;
+        break;
+    case PlatformBridge::PartButton:
+        webThemeExtraParams->button.isDefault = extraParams->button.isDefault;
+        webThemeExtraParams->button.backgroundColor = extraParams->button.backgroundColor;
+        break;
+    case PlatformBridge::PartTextField:
+        webThemeExtraParams->textField.isTextArea = extraParams->textField.isTextArea;
+        webThemeExtraParams->textField.isListbox = extraParams->textField.isListbox;
+        webThemeExtraParams->textField.backgroundColor = extraParams->textField.backgroundColor;
+        break;
+    case PlatformBridge::PartMenuList:
+        webThemeExtraParams->menuList.arrowX = extraParams->menuList.arrowX;
+        webThemeExtraParams->menuList.arrowY = extraParams->menuList.arrowY;
+        webThemeExtraParams->menuList.backgroundColor = extraParams->menuList.backgroundColor;
+        break;
+    case PlatformBridge::PartSliderTrack:
+    case PlatformBridge::PartSliderThumb:
+        webThemeExtraParams->slider.vertical = extraParams->slider.vertical;
+        webThemeExtraParams->slider.inDrag = extraParams->slider.inDrag;
+        break;
+    case PlatformBridge::PartInnerSpinButton:
+        webThemeExtraParams->innerSpin.spinUp = extraParams->innerSpin.spinUp;
+        webThemeExtraParams->innerSpin.readOnly = extraParams->innerSpin.readOnly;
+        break;
+    case PlatformBridge::PartProgressBar:
+        webThemeExtraParams->progressBar.determinate = extraParams->progressBar.determinate;
+        webThemeExtraParams->progressBar.valueRectX = extraParams->progressBar.valueRectX;
+        webThemeExtraParams->progressBar.valueRectY = extraParams->progressBar.valueRectY;
+        webThemeExtraParams->progressBar.valueRectWidth = extraParams->progressBar.valueRectWidth;
+        webThemeExtraParams->progressBar.valueRectHeight = extraParams->progressBar.valueRectHeight;
+        break;
+    default:
+        break; // Parts that have no extra params get here.
     }
 }