Changeset 146977 in webkit
- Timestamp:
- Mar 27, 2013 4:06:48 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r146975 r146977 1 2013-03-27 Kent Tamura <tkent@chromium.org> 2 3 Rename HTMLFormControlElement::readOnly to isReadOnly 4 https://bugs.webkit.org/show_bug.cgi?id=113297 5 6 Reviewed by Alexey Proskuryakov. 7 8 HTMLFormControlElement::readOnly is not an implementation of 9 'readOnly' IDL attribute. It's confusing and we don't need to 10 violate our naming convention. 11 12 No new tests. Just a refactoring. 13 14 * accessibility/AccessibilityNodeObject.cpp: 15 (WebCore::AccessibilityNodeObject::isReadOnly): 16 * html/BaseMultipleFieldsDateAndTimeInputType.cpp: 17 (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly): 18 * html/HTMLFormControlElement.cpp: 19 (WebCore::HTMLFormControlElement::HTMLFormControlElement): 20 (WebCore::HTMLFormControlElement::parseAttribute): 21 * html/HTMLFormControlElement.h: 22 (WebCore::HTMLFormControlElement::isReadOnly): 23 (WebCore::HTMLFormControlElement::isDisabledOrReadOnly): 24 * html/HTMLInputElement.cpp: 25 (WebCore::HTMLInputElement::matchesReadOnlyPseudoClass): 26 (WebCore::HTMLInputElement::matchesReadWritePseudoClass): 27 * html/HTMLTextAreaElement.cpp: 28 (WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass): 29 (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass): 30 * html/shadow/SliderThumbElement.cpp: 31 (WebCore::SliderThumbElement::defaultEventHandler): 32 (WebCore::SliderThumbElement::willRespondToMouseMoveEvents): 33 (WebCore::SliderThumbElement::willRespondToMouseClickEvents): 34 * html/shadow/TextControlInnerElements.cpp: 35 (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents): 36 (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): 37 * html/shadow/TextFieldDecorationElement.cpp: 38 (WebCore::TextFieldDecorationElement::updateImage): 39 * rendering/RenderTextControl.cpp: 40 (WebCore::updateUserModifyProperty): 41 * rendering/RenderThemeMacShared.mm: 42 (WebCore::RenderThemeMacShared::paintSearchFieldCancelButton): 43 1 44 2013-03-27 Yury Semikhatsky <yurys@chromium.org> 2 45 -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r146860 r146977 684 684 685 685 if (node->hasTagName(textareaTag)) 686 return static_cast<HTMLTextAreaElement*>(node)-> readOnly();686 return static_cast<HTMLTextAreaElement*>(node)->isReadOnly(); 687 687 688 688 if (node->hasTagName(inputTag)) { 689 689 HTMLInputElement* input = static_cast<HTMLInputElement*>(node); 690 690 if (input->isTextField()) 691 return input-> readOnly();691 return input->isReadOnly(); 692 692 } 693 693 -
trunk/Source/WebCore/html/BaseMultipleFieldsDateAndTimeInputType.cpp
r146746 r146977 177 177 bool BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly() const 178 178 { 179 return element()-> readOnly();179 return element()->isReadOnly(); 180 180 } 181 181 -
trunk/Source/WebCore/html/HTMLFormControlElement.cpp
r145818 r146977 52 52 : LabelableElement(tagName, document) 53 53 , m_disabled(false) 54 , m_ readOnly(false)54 , m_isReadOnly(false) 55 55 , m_isRequired(false) 56 56 , m_valueMatchesRenderer(false) … … 134 134 disabledAttributeChanged(); 135 135 } else if (name == readonlyAttr) { 136 bool oldReadOnly = m_readOnly;137 m_ readOnly = !value.isNull();138 if ( oldReadOnly != m_readOnly) {136 bool wasReadOnly = m_isReadOnly; 137 m_isReadOnly = !value.isNull(); 138 if (wasReadOnly != m_isReadOnly) { 139 139 setNeedsWillValidateCheck(); 140 140 setNeedsStyleRecalc(); -
trunk/Source/WebCore/html/HTMLFormControlElement.h
r141292 r146977 95 95 virtual void setCustomValidity(const String&) OVERRIDE; 96 96 97 bool readOnly() const { return m_readOnly; }98 bool isDisabledOrReadOnly() const { return disabled() || m_ readOnly; }97 bool isReadOnly() const { return m_isReadOnly; } 98 bool isDisabledOrReadOnly() const { return disabled() || m_isReadOnly; } 99 99 100 100 bool hasAutofocused() { return m_hasAutofocused; } … … 149 149 OwnPtr<ValidationMessage> m_validationMessage; 150 150 bool m_disabled : 1; 151 bool m_ readOnly : 1;151 bool m_isReadOnly : 1; 152 152 bool m_isRequired : 1; 153 153 bool m_valueMatchesRenderer : 1; -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r146860 r146977 1457 1457 bool HTMLInputElement::matchesReadOnlyPseudoClass() const 1458 1458 { 1459 return m_inputType->supportsReadOnly() && readOnly();1459 return m_inputType->supportsReadOnly() && isReadOnly(); 1460 1460 } 1461 1461 1462 1462 bool HTMLInputElement::matchesReadWritePseudoClass() const 1463 1463 { 1464 return m_inputType->supportsReadOnly() && ! readOnly();1464 return m_inputType->supportsReadOnly() && !isReadOnly(); 1465 1465 } 1466 1466 -
trunk/Source/WebCore/html/HTMLTextAreaElement.cpp
r143843 r146977 530 530 bool HTMLTextAreaElement::matchesReadOnlyPseudoClass() const 531 531 { 532 return readOnly();532 return isReadOnly(); 533 533 } 534 534 535 535 bool HTMLTextAreaElement::matchesReadWritePseudoClass() const 536 536 { 537 return ! readOnly();537 return !isReadOnly(); 538 538 } 539 539 -
trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp
r146638 r146977 345 345 // Missing this kind of check is likely to occur elsewhere if adding it in each shadow element. 346 346 HTMLInputElement* input = hostInput(); 347 if (!input || input-> readOnly() || !input->isEnabledFormControl()) {347 if (!input || input->isDisabledOrReadOnly()) { 348 348 stopDragging(); 349 349 HTMLDivElement::defaultEventHandler(event); … … 376 376 { 377 377 const HTMLInputElement* input = hostInput(); 378 if (input && !input-> readOnly() && input->isEnabledFormControl() && m_inDragMode)378 if (input && !input->isDisabledOrReadOnly() && m_inDragMode) 379 379 return true; 380 380 … … 385 385 { 386 386 const HTMLInputElement* input = hostInput(); 387 if (input && !input-> readOnly() && input->isEnabledFormControl())387 if (input && !input->isDisabledOrReadOnly()) 388 388 return true; 389 389 -
trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp
r145977 r146977 350 350 { 351 351 const HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowHost()); 352 if (input && !input-> disabled() && !input->readOnly())352 if (input && !input->isDisabledOrReadOnly()) 353 353 return true; 354 354 … … 387 387 // here, we take a temporary reference. 388 388 RefPtr<HTMLInputElement> input(static_cast<HTMLInputElement*>(shadowHost())); 389 if (!input || input-> disabled() || input->readOnly())389 if (!input || input->isDisabledOrReadOnly()) 390 390 return; 391 391 -
trunk/Source/WebCore/html/shadow/TextFieldDecorationElement.cpp
r145977 r146977 145 145 if (hostInput()->disabled()) 146 146 image = m_textFieldDecorator->imageForDisabledState(); 147 else if (hostInput()-> readOnly())147 else if (hostInput()->isReadOnly()) 148 148 image = m_textFieldDecorator->imageForReadonlyState(); 149 149 else if (m_isInHoverState) -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r145562 r146977 83 83 Element* element = toElement(node); 84 84 isEnabled = element->isEnabledFormControl(); 85 isReadOnlyControl = element->isTextFormControl() && toHTMLTextFormControlElement(element)-> readOnly();85 isReadOnlyControl = element->isTextFormControl() && toHTMLTextFormControlElement(element)->isReadOnly(); 86 86 } 87 87 -
trunk/Source/WebCore/rendering/RenderThemeMacShared.mm
r145196 r146977 1551 1551 NSSearchFieldCell* search = this->search(); 1552 1552 1553 if (input->isEnabledFormControl() && (input->isTextFormControl() && ! static_cast<HTMLTextFormControlElement*>(input)->readOnly())) {1553 if (input->isEnabledFormControl() && (input->isTextFormControl() && !toHTMLTextFormControlElement(input)->isReadOnly())) { 1554 1554 updateActiveState([search cancelButtonCell], o); 1555 1555 updatePressedState([search cancelButtonCell], o); -
trunk/Source/WebKit/chromium/ChangeLog
r146961 r146977 1 2013-03-27 Kent Tamura <tkent@chromium.org> 2 3 Rename HTMLFormControlElement::readOnly to isReadOnly 4 https://bugs.webkit.org/show_bug.cgi?id=113297 5 6 Reviewed by Alexey Proskuryakov. 7 8 * src/WebFormControlElement.cpp: 9 (WebKit::WebFormControlElement::isReadOnly): 10 1 11 2013-03-26 Hayato Ito <hayato@chromium.org> 2 12 -
trunk/Source/WebKit/chromium/src/WebFormControlElement.cpp
r95901 r146977 47 47 bool WebFormControlElement::isReadOnly() const 48 48 { 49 return constUnwrap<HTMLFormControlElement>()-> readOnly();49 return constUnwrap<HTMLFormControlElement>()->isReadOnly(); 50 50 } 51 51 -
trunk/Source/WebKit/win/ChangeLog
r146961 r146977 1 2013-03-27 Kent Tamura <tkent@chromium.org> 2 3 Rename HTMLFormControlElement::readOnly to isReadOnly 4 https://bugs.webkit.org/show_bug.cgi?id=113297 5 6 Reviewed by Alexey Proskuryakov. 7 8 * DOMHTMLClasses.cpp: 9 (DOMHTMLInputElement::readOnly): 10 1 11 2013-03-26 Hayato Ito <hayato@chromium.org> 2 12 -
trunk/Source/WebKit/win/DOMHTMLClasses.cpp
r145745 r146977 1124 1124 ASSERT(m_element && m_element->hasTagName(inputTag)); 1125 1125 HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); 1126 *result = inputElement-> readOnly() ? TRUE : FALSE;1126 *result = inputElement->isReadOnly() ? TRUE : FALSE; 1127 1127 return S_OK; 1128 1128 }
Note: See TracChangeset
for help on using the changeset viewer.