Unreviewed, rolling out r124171.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 05:46:43 +0000 (05:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 05:46:43 +0000 (05:46 +0000)
http://trac.webkit.org/changeset/124171
https://bugs.webkit.org/show_bug.cgi?id=92712

Start failing fast/css/square-button-appearance.html
(Requested by yosin on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-07-30

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector):
* dom/Element.cpp:
* dom/Element.h:
(Element):
(WebCore::Element::isReadOnlyFormControl):
* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::isReadOnlyFormControl):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::isReadOnlyFormControl):
(WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
(WebCore::SliderThumbElement::willRespondToMouseClickEvents):
* html/shadow/SliderThumbElement.h:
(SliderThumbElement):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
(WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
(WebCore::SpinButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
* html/shadow/TextControlInnerElements.h:
(WebCore::SpinButtonElement::isReadOnlyFormControl):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isReadOnlyControl):

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

Source/WebCore/ChangeLog
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/html/HTMLFormControlElement.h
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/html/shadow/SliderThumbElement.h
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/html/shadow/TextControlInnerElements.h
Source/WebCore/rendering/RenderTheme.cpp

index 401355b..e12d1d4 100644 (file)
@@ -1,3 +1,36 @@
+2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r124171.
+        http://trac.webkit.org/changeset/124171
+        https://bugs.webkit.org/show_bug.cgi?id=92712
+
+        Start failing fast/css/square-button-appearance.html
+        (Requested by yosin on #webkit).
+
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::checkOneSelector):
+        * dom/Element.cpp:
+        * dom/Element.h:
+        (Element):
+        (WebCore::Element::isReadOnlyFormControl):
+        * html/HTMLFormControlElement.h:
+        (WebCore::HTMLFormControlElement::isReadOnlyFormControl):
+        * html/shadow/SliderThumbElement.cpp:
+        (WebCore::SliderThumbElement::isReadOnlyFormControl):
+        (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
+        (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
+        * html/shadow/SliderThumbElement.h:
+        (SliderThumbElement):
+        * html/shadow/TextControlInnerElements.cpp:
+        (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
+        (WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
+        (WebCore::SpinButtonElement::willRespondToMouseClickEvents):
+        (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
+        * html/shadow/TextControlInnerElements.h:
+        (WebCore::SpinButtonElement::isReadOnlyFormControl):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::isReadOnlyControl):
+
 2012-07-30  Yoshifumi Inoue  <yosin@chromium.org>
 
         [CSS] Change Element::isReadOnlyFormControl to shouldMatchReadWriteSelector or HTMLTextFormControlElement::readOnly
index 0fc7ed8..ef6ea82 100644 (file)
@@ -1066,11 +1066,11 @@ bool SelectorChecker::checkOneSelector(const SelectorCheckingContext& context, P
         case CSSSelector::PseudoReadOnly:
             if (!element || !element->isFormControlElement())
                 return false;
-            return element->isTextFormControl() && !element->shouldMatchReadWriteSelector();
+            return element->isTextFormControl() && element->isReadOnlyFormControl();
         case CSSSelector::PseudoReadWrite:
             if (!element || !element->isFormControlElement())
                 return false;
-            return element->isTextFormControl() && element->shouldMatchReadWriteSelector();
+            return element->isTextFormControl() && !element->isReadOnlyFormControl();
         case CSSSelector::PseudoOptional:
             return element && element->isOptionalFormControl();
         case CSSSelector::PseudoRequired:
index 3ead1d8..c323fa1 100644 (file)
@@ -1783,12 +1783,6 @@ unsigned Element::childElementCount() const
     return count;
 }
 
-
-bool Element::shouldMatchReadWriteSelector() const
-{
-    return false;
-}
-
 bool Element::webkitMatchesSelector(const String& selector, ExceptionCode& ec)
 {
     if (selector.isEmpty()) {
index 47549cc..0159021 100644 (file)
@@ -350,7 +350,6 @@ public:
     Element* nextElementSibling() const;
     unsigned childElementCount() const;
 
-    virtual bool shouldMatchReadWriteSelector() const;
     bool webkitMatchesSelector(const String& selectors, ExceptionCode&);
 
     DOMTokenList* classList();
@@ -374,6 +373,7 @@ public:
 
     virtual bool isFormControlElement() const { return false; }
     virtual bool isEnabledFormControl() const { return true; }
+    virtual bool isReadOnlyFormControl() const { return false; }
     virtual bool isSpinButtonElement() const { return false; }
     virtual bool isTextFormControl() const { return false; }
     virtual bool isOptionalFormControl() const { return false; }
index cddc4dd..b132cbe 100644 (file)
@@ -81,7 +81,7 @@ public:
 
     virtual const AtomicString& formControlType() const OVERRIDE = 0;
     virtual bool isEnabledFormControl() const { return !disabled(); }
-    virtual bool shouldMatchReadWriteSelector() const OVERRIDE { return !readOnly(); }
+    virtual bool isReadOnlyFormControl() const { return readOnly(); }
 
     virtual bool canTriggerImplicitSubmission() const { return false; }
 
index f753a69..b020b38 100644 (file)
@@ -214,9 +214,9 @@ bool SliderThumbElement::isEnabledFormControl() const
     return hostInput()->isEnabledFormControl();
 }
 
-bool SliderThumbElement::shouldMatchReadWriteSelector() const
+bool SliderThumbElement::isReadOnlyFormControl() const
 {
-    return hostInput()->shouldMatchReadWriteSelector();
+    return hostInput()->isReadOnlyFormControl();
 }
 
 Node* SliderThumbElement::focusDelegate()
@@ -334,7 +334,7 @@ void SliderThumbElement::defaultEventHandler(Event* event)
 bool SliderThumbElement::willRespondToMouseMoveEvents()
 {
     const HTMLInputElement* input = hostInput();
-    if (input && !input->readOnly() && input->isEnabledFormControl() && m_inDragMode)
+    if (input && !input->isReadOnlyFormControl() && input->isEnabledFormControl() && m_inDragMode)
         return true;
 
     return HTMLDivElement::willRespondToMouseMoveEvents();
@@ -343,7 +343,7 @@ bool SliderThumbElement::willRespondToMouseMoveEvents()
 bool SliderThumbElement::willRespondToMouseClickEvents()
 {
     const HTMLInputElement* input = hostInput();
-    if (input && !input->readOnly() && input->isEnabledFormControl())
+    if (input && !input->isReadOnlyFormControl() && input->isEnabledFormControl())
         return true;
 
     return HTMLDivElement::willRespondToMouseClickEvents();
index df5c168..11d3503 100644 (file)
@@ -66,7 +66,7 @@ private:
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
     virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren();
     virtual bool isEnabledFormControl() const;
-    virtual bool shouldMatchReadWriteSelector() const OVERRIDE;
+    virtual bool isReadOnlyFormControl() const;
     virtual Node* focusDelegate();
     void startDragging();
     void stopDragging();
index 57571eb..0fd41c6 100644 (file)
@@ -242,7 +242,7 @@ void SearchFieldCancelButtonElement::defaultEventHandler(Event* event)
 bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents()
 {
     const HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost());
-    if (!input->disabled() && !input->readOnly())
+    if (!input->disabled() && !input->isReadOnlyFormControl())
         return true;
 
     return HTMLDivElement::willRespondToMouseClickEvents();
@@ -345,7 +345,7 @@ void SpinButtonElement::defaultEventHandler(Event* event)
 bool SpinButtonElement::willRespondToMouseMoveEvents()
 {
     const HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost());
-    if (renderBox() && !input->disabled() && !input->readOnly())
+    if (renderBox() && !input->disabled() && !input->isReadOnlyFormControl())
         return true;
 
     return HTMLDivElement::willRespondToMouseMoveEvents();
@@ -354,7 +354,7 @@ bool SpinButtonElement::willRespondToMouseMoveEvents()
 bool SpinButtonElement::willRespondToMouseClickEvents()
 {
     const HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost());
-    if (renderBox() && !input->disabled() && !input->readOnly())
+    if (renderBox() && !input->disabled() && !input->isReadOnlyFormControl())
         return true;
 
     return HTMLDivElement::willRespondToMouseClickEvents();
@@ -514,7 +514,7 @@ void InputFieldSpeechButtonElement::defaultEventHandler(Event* event)
 bool InputFieldSpeechButtonElement::willRespondToMouseClickEvents()
 {
     const HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost());
-    if (!input->disabled() && !input->readOnly())
+    if (!input->disabled() && !input->isReadOnlyFormControl())
         return true;
 
     return HTMLDivElement::willRespondToMouseClickEvents();
index a0b1f43..2e89096 100644 (file)
@@ -125,7 +125,7 @@ private:
     virtual void detach();
     virtual bool isSpinButtonElement() const { return true; }
     virtual bool isEnabledFormControl() const { return shadowHost()->isEnabledFormControl(); }
-    virtual bool shouldMatchReadWriteSelector() const OVERRIDE { return shadowHost()->shouldMatchReadWriteSelector(); }
+    virtual bool isReadOnlyFormControl() const { return shadowHost()->isReadOnlyFormControl(); }
     virtual void defaultEventHandler(Event*);
     void doStepAction(int);
     void startRepeatingTimer();
index 355b8cc..f166172 100644 (file)
@@ -828,7 +828,7 @@ bool RenderTheme::isReadOnlyControl(const RenderObject* o) const
     Node* node = o->node();
     if (!node || !node->isElementNode())
         return false;
-    return !static_cast<Element*>(node)->shouldMatchReadWriteSelector();
+    return static_cast<Element*>(node)->isReadOnlyFormControl();
 }
 
 bool RenderTheme::isHovered(const RenderObject* o) const