Title: [107998] trunk/Source/WebCore
Revision
107998
Author
[email protected]
Date
2012-02-16 16:46:50 -0800 (Thu, 16 Feb 2012)

Log Message

Add a themeChromiumAndroid.css file for android-specific default styles
https://bugs.webkit.org/show_bug.cgi?id=78547

Reviewed by Adam Barth.

This includes the themeChromiumAndroid.css file from the Chromium-Android port
as well as some addidtional changes they had to html.css.  I believe those
changes were made before themeChromiumAndroid was created, but it's now the better place for this CSS.

* WebCore.gyp/WebCore.gyp:
* css/themeChromiumAndroid.css: Added.
(select[size][multiple]):
(input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):
* rendering/RenderThemeChromiumAndroid.cpp:
(WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet):
(WebCore):
* rendering/RenderThemeChromiumAndroid.h:
(RenderThemeChromiumAndroid):
(WebCore::RenderThemeChromiumAndroid::delegatesMenuListRendering):
(WebCore::RenderThemeChromiumAndroid::platformTapHighlightColor):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107997 => 107998)


--- trunk/Source/WebCore/ChangeLog	2012-02-17 00:46:38 UTC (rev 107997)
+++ trunk/Source/WebCore/ChangeLog	2012-02-17 00:46:50 UTC (rev 107998)
@@ -1,3 +1,26 @@
+2012-02-16  Eric Seidel  <[email protected]>
+
+        Add a themeChromiumAndroid.css file for android-specific default styles
+        https://bugs.webkit.org/show_bug.cgi?id=78547
+
+        Reviewed by Adam Barth.
+
+        This includes the themeChromiumAndroid.css file from the Chromium-Android port
+        as well as some addidtional changes they had to html.css.  I believe those
+        changes were made before themeChromiumAndroid was created, but it's now the better place for this CSS.
+
+        * WebCore.gyp/WebCore.gyp:
+        * css/themeChromiumAndroid.css: Added.
+        (select[size][multiple]):
+        (input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):
+        * rendering/RenderThemeChromiumAndroid.cpp:
+        (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet):
+        (WebCore):
+        * rendering/RenderThemeChromiumAndroid.h:
+        (RenderThemeChromiumAndroid):
+        (WebCore::RenderThemeChromiumAndroid::delegatesMenuListRendering):
+        (WebCore::RenderThemeChromiumAndroid::platformTapHighlightColor):
+
 2012-02-16  Brady Eidson  <[email protected]>
 
         <rdar://problem/10616280> and https://bugs.webkit.org/show_bug.cgi?id=78767

Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (107997 => 107998)


--- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2012-02-17 00:46:38 UTC (rev 107997)
+++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2012-02-17 00:46:50 UTC (rev 107998)
@@ -813,6 +813,7 @@
               '../css/quirks.css',
               '../css/view-source.css',
               '../css/themeChromium.css', # Chromium only.
+              '../css/themeChromiumAndroid.css', # Chromium only.
               '../css/themeChromiumLinux.css', # Chromium only.
               '../css/themeChromiumSkia.css',  # Chromium only.
               '../css/themeWin.css',

Added: trunk/Source/WebCore/css/themeChromiumAndroid.css (0 => 107998)


--- trunk/Source/WebCore/css/themeChromiumAndroid.css	                        (rev 0)
+++ trunk/Source/WebCore/css/themeChromiumAndroid.css	2012-02-17 00:46:50 UTC (rev 107998)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* These styles override other user-agent styles for Chromium on Android. */
+
+select[size],
+select[multiple],
+select[size][multiple] {
+    -webkit-appearance: menulist;
+    -webkit-box-align: center;
+    border: 1px solid;
+    -webkit-border-radius: 5px;
+    white-space: pre;
+}
+
+input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"] {
+    -webkit-appearance: menulist-button;
+}

Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumAndroid.cpp (107997 => 107998)


--- trunk/Source/WebCore/rendering/RenderThemeChromiumAndroid.cpp	2012-02-17 00:46:38 UTC (rev 107997)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumAndroid.cpp	2012-02-17 00:46:50 UTC (rev 107998)
@@ -63,6 +63,12 @@
     return RenderTheme::systemColor(cssValueId);
 }
 
+String RenderThemeChromiumAndroid::extraDefaultStyleSheet()
+{
+    return RenderThemeChromiumLinux::extraDefaultStyleSheet() +
+        String(themeChromiumAndroidUserAgentStyleSheet, sizeof(themeChromiumAndroidUserAgentStyleSheet));
+}
+
 void RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
 {
     if (PlatformSupport::layoutTestMode()) {

Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumAndroid.h (107997 => 107998)


--- trunk/Source/WebCore/rendering/RenderThemeChromiumAndroid.h	2012-02-17 00:46:38 UTC (rev 107997)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumAndroid.h	2012-02-17 00:46:50 UTC (rev 107998)
@@ -33,14 +33,25 @@
 class RenderThemeChromiumAndroid : public RenderThemeChromiumLinux {
 public:
     static PassRefPtr<RenderTheme> create();
+    virtual String extraDefaultStyleSheet() OVERRIDE;
 
-    virtual Color systemColor(int cssValidId) const;
+    virtual Color systemColor(int cssValidId) const OVERRIDE;
 
-    virtual void adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+    virtual void adjustInnerSpinButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const OVERRIDE;
 
+    virtual bool delegatesMenuListRendering() const OVERRIDE { return true; }
+
+#if ENABLE(TOUCH_EVENTS)
+    virtual Color platformTapHighlightColor() const OVERRIDE
+    {
+        return RenderThemeChromiumAndroid::defaultTapHighlightColor;
+    }
+#endif
+
 private:
     virtual ~RenderThemeChromiumAndroid();
 
+    static const RGBA32 defaultTapHighlightColor = 0x6633b5e5;
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to