Title: [92585] trunk
Revision
92585
Author
[email protected]
Date
2011-08-08 00:25:35 -0700 (Mon, 08 Aug 2011)

Log Message

[Chromium] Make form validation bubble fit with Chrome UI style
https://bugs.webkit.org/show_bug.cgi?id=65359

Reviewed by Hajime Morita.

Source/WebCore:

Change the appearance of validation message bubble for
Chromium. Basically it doesn't change for other ports.

- Introduce a new element to put an icon, and enclose it and the
message text by a flexible box.
- Repesent the message text by two elements. One for the heading,
another for the remaining.

- Introduce themeChromium.css

* WebCore.gyp/WebCore.gyp: Add themeChromium.css.
* css/html.css:
(::-webkit-validation-bubble-message): Make this a flexible box container.
(::-webkit-validation-bubble-text-block): Takes flexibility.
(::-webkit-validation-bubble-heading):
Make the content bold because we removed <b></b>.
* css/themeChromium.css: Added.
(::-webkit-validation-bubble):
(::-webkit-validation-bubble-message):
(::-webkit-validation-bubble-arrow):
(::-webkit-validation-bubble-arrow-clipper):
(::-webkit-validation-bubble-icon):
(::-webkit-validation-bubble-heading):
(::-webkit-validation-bubble-body):
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessageDOMAndStartTimer):
Sets the text into m_messageHeading and m_messageBody, instead of m_bubbleMessage.
Use ASSERT_NO_EXCEPTION.
(WebCore::ValidationMessage::buildBubbleTree):
Build the new structure, and use ASSERT_NO_EXCEPTION.
(WebCore::ValidationMessage::deleteBubbleTree):
Clear m_messageHeading and m_messageBody.
* html/ValidationMessage.h:
* rendering/RenderThemeChromiumMac.h: Add extraDefaultStyleSheet().
* rendering/RenderThemeChromiumMac.mm:
(WebCore::RenderThemeChromiumMac::extraDefaultStyleSheet): Append themeChromium.css.
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumSkia::extraDefaultStyleSheet): Append themeChromium.css.

LayoutTests:

* fast/forms/validation-message-appearance.html:
  Need to wait for a litle because of image loading.
* platform/chromium-mac/fast/forms/validation-message-appearance-expected.png:
* platform/chromium-mac/fast/forms/validation-message-appearance-expected.txt:
* platform/chromium/test_expectations.txt:
* platform/mac/fast/forms/validation-message-appearance-expected.png:
* platform/mac/fast/forms/validation-message-appearance-expected.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (92584 => 92585)


--- trunk/LayoutTests/ChangeLog	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/LayoutTests/ChangeLog	2011-08-08 07:25:35 UTC (rev 92585)
@@ -1,3 +1,18 @@
+2011-07-28  Kent Tamura  <[email protected]>
+
+        [Chromium] Make form validation bubble fit with Chrome UI style
+        https://bugs.webkit.org/show_bug.cgi?id=65359
+
+        Reviewed by Hajime Morita.
+
+        * fast/forms/validation-message-appearance.html:
+          Need to wait for a litle because of image loading.
+        * platform/chromium-mac/fast/forms/validation-message-appearance-expected.png:
+        * platform/chromium-mac/fast/forms/validation-message-appearance-expected.txt:
+        * platform/chromium/test_expectations.txt:
+        * platform/mac/fast/forms/validation-message-appearance-expected.png:
+        * platform/mac/fast/forms/validation-message-appearance-expected.txt:
+
 2011-08-07  Shinichiro Hamaji  <[email protected]>
 
         Layout Test fast/loader/ping-error.html is failing

Modified: trunk/LayoutTests/fast/forms/validation-message-appearance.html (92584 => 92585)


--- trunk/LayoutTests/fast/forms/validation-message-appearance.html	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/LayoutTests/fast/forms/validation-message-appearance.html	2011-08-08 07:25:35 UTC (rev 92585)
@@ -16,7 +16,7 @@
 document.getElementById('submit').click();
 if (window.layoutTestController) {
     layoutTestController.waitUntilDone();
-    setTimeout(function() { layoutTestController.notifyDone(); }, 0);
+    setTimeout(function() { layoutTestController.notifyDone(); }, 10);
 }
 </script>
 

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (92584 => 92585)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2011-08-08 07:25:35 UTC (rev 92585)
@@ -3527,6 +3527,8 @@
 // Strange scrollbar.
 BUGWK63115 : fast/css/font-face-in-shadow-DOM.html = PASS IMAGE+TEXT
 
+// Need to update baseline files.
+BUGWK65359 : fast/forms/validation-message-appearance.html = FAIL
 
 // This test ASSERTs in skia since it was added.
 BUGWK63400 LINUX DEBUG : svg/text/svg-zoom-large-value.xhtml = CRASH TEXT

Modified: trunk/LayoutTests/platform/chromium-mac/fast/forms/validation-message-appearance-expected.png


(Binary files differ)

Added: trunk/LayoutTests/platform/chromium-mac/fast/forms/validation-message-appearance-expected.txt (0 => 92585)


--- trunk/LayoutTests/platform/chromium-mac/fast/forms/validation-message-appearance-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium-mac/fast/forms/validation-message-appearance-expected.txt	2011-08-08 07:25:35 UTC (rev 92585)
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x39
+  RenderBlock {HTML} at (0,0) size 800x39
+    RenderBody {BODY} at (8,8) size 784x23
+      RenderBlock {FORM} at (0,0) size 784x23
+        RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+        RenderText {#text} at (129,2) size 4x18
+          text run at (129,2) width 4: " "
+        RenderButton {INPUT} at (135,3) size 54x18 [bgcolor=#C0C0C0]
+          RenderBlock (anonymous) at (8,2) size 38x13
+            RenderText at (0,0) size 38x13
+              text run at (0,0) width 38: "Submit"
+        RenderText {#text} at (0,0) size 0x0
+layer at (13,13) size 119x13
+  RenderBlock {DIV} at (3,3) size 119x13
+layer at (10,29) size 311x73
+  RenderBlock (positioned) zI: 2147483647 {DIV} at (10,29) size 311x73
+layer at (10,29) size 311x13 scrollHeight 26
+  RenderBlock {DIV} at (0,0) size 311x13
+layer at (10,41) size 311x60
+  RenderDeprecatedFlexibleBox (relative positioned) zI: 2147483644 {DIV} at (0,13) size 311x60 [bgcolor=#FFFFFF] [border: (1px solid #CCCCCC) (1px solid #AAAAAA) (1px solid #888888) (1px solid #AAAAAA)]
+    RenderBlock {DIV} at (9,9) size 17x17
+    RenderBlock {DIV} at (32,9) size 270x42
+      RenderBlock {DIV} at (0,0) size 270x16
+        RenderText {#text} at (0,0) size 87x16
+          text run at (0,0) width 87: "value missing"
+      RenderBlock {DIV} at (0,16) size 270x26 [color=#444444]
+        RenderText {#text} at (0,0) size 127x13
+          text run at (0,0) width 127: "Needs at least 8 letters."
+        RenderBR {BR} at (126,0) size 1x13
+        RenderText {#text} at (0,13) size 270x13
+          text run at (0,13) width 270: "Should not be identical with the current password."
+layer at (42,29) size 18x18 backgroundClip at (10,29) size 311x13 clip at (10,29) size 311x13 outlineClip at (10,29) size 311x13
+  RenderBlock (relative positioned) zI: 2147483645 {DIV} at (0,0) size 18x18 [bgcolor=#FFFFFF] [border: (1px solid #CCCCCC)]
+caret: position 0 of child 0 {DIV} of {#shadow-root} of child 1 {INPUT} of child 0 {FORM} of body
Property changes on: trunk/LayoutTests/platform/chromium-mac/fast/forms/validation-message-appearance-expected.txt
___________________________________________________________________

Added: svn:eol-style

Modified: trunk/LayoutTests/platform/mac/fast/forms/validation-message-appearance-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/fast/forms/validation-message-appearance-expected.txt (92584 => 92585)


--- trunk/LayoutTests/platform/mac/fast/forms/validation-message-appearance-expected.txt	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/LayoutTests/platform/mac/fast/forms/validation-message-appearance-expected.txt	2011-08-08 07:25:35 UTC (rev 92585)
@@ -19,17 +19,19 @@
 layer at (10,29) size 220x16 scrollHeight 26
   RenderBlock {DIV} at (0,0) size 220x16
 layer at (10,41) size 220x84
-  RenderBlock (relative positioned) zI: 2147483644 {DIV} at (0,16) size 220x84 [border: (2px solid #440000)]
-    RenderInline {B} at (0,0) size 93x16
-      RenderText {#text} at (10,10) size 93x16
-        text run at (10,10) width 93: "value missing"
-    RenderBR {BR} at (102,10) size 1x16
-    RenderText zI: 2147483644 {#text} at (10,26) size 150x16
-      text run at (10,26) width 150: "Needs at least 8 letters."
-    RenderBR {BR} at (159,26) size 1x16
-    RenderText zI: 2147483644 {#text} at (10,42) size 177x32
-      text run at (10,42) width 177: "Should not be identical with"
-      text run at (10,58) width 139: "the current password."
+  RenderDeprecatedFlexibleBox (relative positioned) zI: 2147483644 {DIV} at (0,16) size 220x84 [border: (2px solid #440000)]
+    RenderBlock {DIV} at (10,10) size 0x64
+    RenderBlock {DIV} at (10,10) size 200x64
+      RenderBlock {DIV} at (0,0) size 200x16
+        RenderText {#text} at (0,0) size 93x16
+          text run at (0,0) width 93: "value missing"
+      RenderBlock {DIV} at (0,16) size 200x48
+        RenderText {#text} at (0,0) size 150x16
+          text run at (0,0) width 150: "Needs at least 8 letters."
+        RenderBR {BR} at (149,0) size 1x16
+        RenderText {#text} at (0,16) size 177x32
+          text run at (0,16) width 177: "Should not be identical with"
+          text run at (0,32) width 139: "the current password."
 layer at (42,29) size 18x18 backgroundClip at (10,29) size 220x16 clip at (10,29) size 220x16 outlineClip at (10,29) size 220x16
   RenderBlock (relative positioned) zI: 2147483645 {DIV} at (0,0) size 18x18 [bgcolor=#F8ECEC] [border: (2px solid #440000) none (2px solid #440000)]
 caret: position 0 of child 0 {DIV} of {#shadow-root} of child 1 {INPUT} of child 0 {FORM} of body

Modified: trunk/Source/WebCore/ChangeLog (92584 => 92585)


--- trunk/Source/WebCore/ChangeLog	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/Source/WebCore/ChangeLog	2011-08-08 07:25:35 UTC (rev 92585)
@@ -1,3 +1,49 @@
+2011-07-28  Kent Tamura  <[email protected]>
+
+        [Chromium] Make form validation bubble fit with Chrome UI style
+        https://bugs.webkit.org/show_bug.cgi?id=65359
+
+        Reviewed by Hajime Morita.
+
+        Change the appearance of validation message bubble for
+        Chromium. Basically it doesn't change for other ports.
+
+        - Introduce a new element to put an icon, and enclose it and the
+        message text by a flexible box.
+        - Repesent the message text by two elements. One for the heading,
+        another for the remaining.
+
+        - Introduce themeChromium.css
+
+        * WebCore.gyp/WebCore.gyp: Add themeChromium.css.
+        * css/html.css:
+        (::-webkit-validation-bubble-message): Make this a flexible box container.
+        (::-webkit-validation-bubble-text-block): Takes flexibility.
+        (::-webkit-validation-bubble-heading):
+        Make the content bold because we removed <b></b>.
+        * css/themeChromium.css: Added.
+        (::-webkit-validation-bubble):
+        (::-webkit-validation-bubble-message):
+        (::-webkit-validation-bubble-arrow):
+        (::-webkit-validation-bubble-arrow-clipper):
+        (::-webkit-validation-bubble-icon):
+        (::-webkit-validation-bubble-heading):
+        (::-webkit-validation-bubble-body):
+        * html/ValidationMessage.cpp:
+        (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
+        Sets the text into m_messageHeading and m_messageBody, instead of m_bubbleMessage.
+        Use ASSERT_NO_EXCEPTION.
+        (WebCore::ValidationMessage::buildBubbleTree):
+        Build the new structure, and use ASSERT_NO_EXCEPTION.
+        (WebCore::ValidationMessage::deleteBubbleTree):
+        Clear m_messageHeading and m_messageBody.
+        * html/ValidationMessage.h:
+        * rendering/RenderThemeChromiumMac.h: Add extraDefaultStyleSheet().
+        * rendering/RenderThemeChromiumMac.mm:
+        (WebCore::RenderThemeChromiumMac::extraDefaultStyleSheet): Append themeChromium.css.
+        * rendering/RenderThemeChromiumSkia.cpp:
+        (WebCore::RenderThemeChromiumSkia::extraDefaultStyleSheet): Append themeChromium.css.
+
 2011-08-07  Keishi Hattori  <[email protected]>
 
         Sort WebCore.xcodeproj

Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (92584 => 92585)


--- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2011-08-08 07:25:35 UTC (rev 92585)
@@ -672,6 +672,7 @@
               '../css/html.css',
               '../css/quirks.css',
               '../css/view-source.css',
+              '../css/themeChromium.css', # Chromium only.
               '../css/themeChromiumLinux.css', # Chromium only.
               '../css/themeChromiumSkia.css',  # Chromium only.
               '../css/themeWin.css',

Modified: trunk/Source/WebCore/css/html.css (92584 => 92585)


--- trunk/Source/WebCore/css/html.css	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/Source/WebCore/css/html.css	2011-08-08 07:25:35 UTC (rev 92585)
@@ -724,7 +724,7 @@
 }
 
 ::-webkit-validation-bubble-message {
-    display: block;
+    display: -webkit-box;
     position: relative;
     top: -4px;
     font: message-box;
@@ -743,6 +743,14 @@
     z-index: 2147483644;
 }
 
+::-webkit-validation-bubble-text-block {
+    -webkit-box-flex: 1;
+}
+
+::-webkit-validation-bubble-heading {
+    font-weight: bold;
+}
+
 ::-webkit-validation-bubble-arrow {
     display: inline-block;
     position: relative;

Added: trunk/Source/WebCore/css/themeChromium.css (0 => 92585)


--- trunk/Source/WebCore/css/themeChromium.css	                        (rev 0)
+++ trunk/Source/WebCore/css/themeChromium.css	2011-08-08 07:25:35 UTC (rev 92585)
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2011 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. */
+
+::-webkit-validation-bubble {
+    opacity: 1;
+}
+
+::-webkit-validation-bubble-message {
+    background: white;
+    border-color: #ccc #aaa #888;
+    border-width: 1px;
+    box-shadow: 2px 2px 4px rgba(100,100,100,0.3);
+    max-width: 300px;
+    top: -1px;
+}
+
+::-webkit-validation-bubble-arrow {
+    background: white;
+    border-color: #ccc;
+    border-width: 1px;
+    box-shadow: none;
+}
+
+::-webkit-validation-bubble-arrow-clipper {
+    height: 13px;
+}
+
+::-webkit-validation-bubble-icon {
+    /* The image was taken from http://src.chromium.org/viewvc/chrome/trunk/src/chrome/app/theme/update_available.png?revision=50754&view=markup */
+    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAACVklEQVQ4T6WRMWsUURSFv/t2ZjObZNUkREUFlYiIYGWl2Cj+AEs7wdZG0NpGwcJGxcpaWwWttbMQAmqRwoAEEiKohGTXdXdnZ+YeizebRAsbHzweXO4995zvmST+99izm+3EjOt7p+zhfDu0shQwgUAOKF4J5HVd8e10Bw8OXbp3J8mazKYN7h+fb7QOzxnNxs6glwVeFFhoYKGJ3GthQxLdtLx96NzV10mWWJo1ac+3oZWAezQyKks6xQx5coQk/05b38iaAXdAwgTTTUyj7rEQTAqmqhF2Wxa9zS7pqRssXHvH3otP2NjoURVCLrwCLwUVAEmQx+zuUUAuJFGOIEwdAWBi31EGfTHKHVzIHXdtM0u2wVVAJVSBrG7wEoCqGOIlVIXA4lI89sIuEeTILcaxKCoZAEJ1VHYc1AkQJDGCxaEq5pSJAJTDTQCK/iZVAVSCymqB2jUai9TFmg0Sk5MTdD4+5cv6JzqrSwSlBItO3PWXE9Uwq4BqJi4IIaXaWGZrZYkgY3ZfRiD+ihQXjZkEtvN5LLrARW+rx8TZm5y51+XglceMBoPIawy1nvtTpGYyFipHoMkDWNamMbtArwdloehg1wzCklG/TzqdNfAdYO7QmmyytfiUldUP/Fz7DJ6ACx9/MWMm2hMu3HrbIWQv8199ymEfzweU+YBEI/Z0lrHF52Tri8xNlViZ48Mc5Tk+yGnsP/HDWjMTJsm+fnx1uvf+0ZO5tHcmCRbGm/AdiNubEapKs2x2OH357pvm0fMvTFIKzAALwElgqpb41wmAgDVg8TfGt7U0pM19vgAAAABJRU5ErkJggg==');
+    height: 17px;
+    margin-right: 6px;
+    width: 17px;
+}
+
+::-webkit-validation-bubble-heading {
+    font-weight: normal;
+}
+
+::-webkit-validation-bubble-body {
+    font-size: smaller;
+    color: #444;
+}
Property changes on: trunk/Source/WebCore/css/themeChromium.css
___________________________________________________________________

Added: svn:eol-style

Modified: trunk/Source/WebCore/html/ValidationMessage.cpp (92584 => 92585)


--- trunk/Source/WebCore/html/ValidationMessage.cpp	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/Source/WebCore/html/ValidationMessage.cpp	2011-08-08 07:25:35 UTC (rev 92585)
@@ -34,6 +34,7 @@
 #include "CSSPropertyNames.h"
 #include "CSSStyleSelector.h"
 #include "CSSValueKeywords.h"
+#include "ExceptionCodePlaceholder.h"
 #include "FormAssociatedElement.h"
 #include "HTMLBRElement.h"
 #include "HTMLDivElement.h"
@@ -80,21 +81,20 @@
 
 void ValidationMessage::setMessageDOMAndStartTimer(Timer<ValidationMessage>*)
 {
-    ASSERT(m_bubbleMessage);
-    m_bubbleMessage->removeAllChildren();
+    ASSERT(m_messageHeading);
+    ASSERT(m_messageBody);
+    m_messageHeading->removeAllChildren();
+    m_messageBody->removeAllChildren();
     Vector<String> lines;
     m_message.split('\n', lines);
-    Document* doc = m_bubbleMessage->document();
-    ExceptionCode ec = 0;
+    Document* doc = m_messageHeading->document();
     for (unsigned i = 0; i < lines.size(); ++i) {
         if (i) {
-            m_bubbleMessage->appendChild(HTMLBRElement::create(doc), ec);
-            m_bubbleMessage->appendChild(Text::create(doc, lines[i]), ec);
-        } else {
-            RefPtr<HTMLElement> bold = HTMLElement::create(bTag, doc);
-            bold->setInnerText(lines[i], ec);
-            m_bubbleMessage->appendChild(bold.release(), ec);
-        }
+            m_messageBody->appendChild(Text::create(doc, lines[i]), ASSERT_NO_EXCEPTION);
+            if (i < lines.size() - 1)
+                m_messageBody->appendChild(HTMLBRElement::create(doc), ASSERT_NO_EXCEPTION);
+        } else
+            m_messageHeading->setInnerText(lines[i], ASSERT_NO_EXCEPTION);
     }
 
     int magnification = doc->page() ? doc->page()->settings()->validationMessageTimerMaginification() : -1;
@@ -149,11 +149,23 @@
     ASSERT(!ec);
     m_bubble->appendChild(clipper.release(), ec);
     ASSERT(!ec);
-    m_bubbleMessage = HTMLDivElement::create(doc);
-    m_bubbleMessage->setShadowPseudoId("-webkit-validation-bubble-message");
-    m_bubble->appendChild(m_bubbleMessage, ec);
-    ASSERT(!ec);
 
+    RefPtr<HTMLElement> message = HTMLDivElement::create(doc);
+    message->setShadowPseudoId("-webkit-validation-bubble-message");
+    RefPtr<HTMLElement> icon = HTMLDivElement::create(doc);
+    icon->setShadowPseudoId("-webkit-validation-bubble-icon");
+    message->appendChild(icon.release(), ASSERT_NO_EXCEPTION);
+    RefPtr<HTMLElement> textBlock = HTMLDivElement::create(doc);
+    textBlock->setShadowPseudoId("-webkit-validation-bubble-text-block");
+    m_messageHeading = HTMLDivElement::create(doc);
+    m_messageHeading->setShadowPseudoId("-webkit-validation-bubble-heading");
+    textBlock->appendChild(m_messageHeading, ASSERT_NO_EXCEPTION);
+    m_messageBody = HTMLDivElement::create(doc);
+    m_messageBody->setShadowPseudoId("-webkit-validation-bubble-body");
+    textBlock->appendChild(m_messageBody, ASSERT_NO_EXCEPTION);
+    message->appendChild(textBlock.release(), ASSERT_NO_EXCEPTION);
+    m_bubble->appendChild(message.release(), ASSERT_NO_EXCEPTION);
+
     setMessageDOMAndStartTimer();
 
     // FIXME: Use transition to show the bubble.
@@ -169,7 +181,8 @@
 void ValidationMessage::deleteBubbleTree(Timer<ValidationMessage>*)
 {
     if (m_bubble) {
-        m_bubbleMessage = 0;
+        m_messageHeading = 0;
+        m_messageBody = 0;
         HTMLElement* host = toHTMLElement(m_element);
         ExceptionCode ec;
         host->shadowRoot()->removeChild(m_bubble.get(), ec);

Modified: trunk/Source/WebCore/html/ValidationMessage.h (92584 => 92585)


--- trunk/Source/WebCore/html/ValidationMessage.h	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/Source/WebCore/html/ValidationMessage.h	2011-08-08 07:25:35 UTC (rev 92585)
@@ -61,7 +61,8 @@
     String m_message;
     OwnPtr<Timer<ValidationMessage> > m_timer;
     RefPtr<HTMLElement> m_bubble;
-    RefPtr<HTMLElement> m_bubbleMessage;
+    RefPtr<HTMLElement> m_messageHeading;
+    RefPtr<HTMLElement> m_messageBody;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumMac.h (92584 => 92585)


--- trunk/Source/WebCore/rendering/RenderThemeChromiumMac.h	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumMac.h	2011-08-08 07:25:35 UTC (rev 92585)
@@ -59,6 +59,7 @@
     virtual int popupInternalPaddingRight(RenderStyle*) const;
 private:
     virtual void updateActiveState(NSCell*, const RenderObject*);
+    virtual String extraDefaultStyleSheet();
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumMac.mm (92584 => 92585)


--- trunk/Source/WebCore/rendering/RenderThemeChromiumMac.mm	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumMac.mm	2011-08-08 07:25:35 UTC (rev 92585)
@@ -160,6 +160,13 @@
 }
 #endif
 
+String RenderThemeChromiumMac::extraDefaultStyleSheet()
+{
+    return RenderThemeMac::extraDefaultStyleSheet() +
+           String(themeChromiumUserAgentStyleSheet, sizeof(themeChromiumUserAgentStyleSheet));
+}
+
+
 bool RenderThemeChromiumMac::paintMediaVolumeSliderContainer(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
 {
     return true;

Modified: trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp (92584 => 92585)


--- trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp	2011-08-08 07:03:18 UTC (rev 92584)
+++ trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp	2011-08-08 07:25:35 UTC (rev 92585)
@@ -97,7 +97,8 @@
 String RenderThemeChromiumSkia::extraDefaultStyleSheet()
 {
     return String(themeWinUserAgentStyleSheet, sizeof(themeWinUserAgentStyleSheet)) +
-           String(themeChromiumSkiaUserAgentStyleSheet, sizeof(themeChromiumSkiaUserAgentStyleSheet));
+           String(themeChromiumSkiaUserAgentStyleSheet, sizeof(themeChromiumSkiaUserAgentStyleSheet)) +
+           String(themeChromiumUserAgentStyleSheet, sizeof(themeChromiumUserAgentStyleSheet));
 }
 
 String RenderThemeChromiumSkia::extraQuirksStyleSheet()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to