Change Element::isReadOnlyFormControl to Element::shouldMatchReadOnlySelector/shouldM...
authoryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 07:58:47 +0000 (07:58 +0000)
committeryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 07:58:47 +0000 (07:58 +0000)
commite2b37bca952da57494c2b0e7187e165701b8149a
treefed8f63832eb24d5ec160424f33ad034b8263c25
parent9dd3a3121a94f8e53345b40748360441350c7188
Change Element::isReadOnlyFormControl to Element::shouldMatchReadOnlySelector/shouldMatchReadWriteSelector or HTMLFormControlElement::readOnly
https://bugs.webkit.org/show_bug.cgi?id=92602

Reviewed by Kent Tamura.

This patch replaces Element::isReadOnlyFormControl() by
Element::shouldMatchReadOnlySelector/shouldMatchReadOnlySelector or
HTMLFormControlElement::readOnly() to make intention of functions
self descriptive.

No new tests. This patch doesn't change behavior.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOneSelector): Replaced isReadOnlyFormControl() by shouldMatchReadOnlySelector() for :read-only pseudo class, and replaced isReadOnlyFormControl() by shouldMatchReadOnlySelector() for :read-only pseudo class.
* dom/Element.cpp:
(WebCore::Element::shouldMatchReadOnlySelector): Added for default implementation.
(WebCore::Element::shouldMatchReadWriteSelector): for default implementation.
* dom/Element.h:
(Element): Removed isReadOnlyFormControl() and added shouldMatchReadOnlySelector and shouldMatchReadWriteSelector.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::shouldMatchReadOnlySelector): Added.
(WebCore::HTMLFormControlElement::shouldMatchReadWriteSelector): Added.
* html/HTMLFormControlElement.h:
(HTMLFormControlElement): Removed isReadOnlyFormControl() and added shouldMatchReadOnlySelector and shouldMatchReadWriteSelector.
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::shouldMatchReadOnlySelector): Added.
(WebCore::SliderThumbElement::shouldMatchReadWriteSelector): Added.
(WebCore::SliderThumbElement::willRespondToMouseMoveEvents): Replaced isReadOnlyFormControl() by readOnly().
(WebCore::SliderThumbElement::willRespondToMouseClickEvents): ditto.
(SliderThumbElement):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
(WebCore::SpinButtonElement::willRespondToMouseMoveEvents): ditto.
(WebCore::SpinButtonElement::willRespondToMouseClickEvents): ditto.
(WebCore::SpinButtonElement::shouldMatchReadOnlySelector): Added.
(WebCore::SpinButtonElement::shouldMatchReadWriteSelector): Added.
(WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents): Replaced isReadOnlyFormControl() by readOnly().
* html/shadow/TextControlInnerElements.h:
(SpinButtonElement): Removed isReadOnlyFormControl() and added shouldMatchReadOnlySelector and shouldMatchReadWriteSelector.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isReadOnlyControl): Replaced isReadOnlyControl() by shouldMatchReadOnlySelector().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124180 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.cpp
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