Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Issue 11415195: Merge 135829 - :read-only selector should match to date/time input types (Closed)

Created:
8 years ago by tkent
Modified:
8 years ago
Reviewers:
tkent
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Visibility:
Public.

Description

Merge 135829 - :read-only selector should match to date/time input types https://bugs.webkit.org/show_bug.cgi?id=103350 Reviewed by Kentaro Hara. Source/WebCore: We supported :read-only and :read-write only for text form controls; i.e. <textarea> and text-field <input>. According to [1], we should support them for date/time types. So, this patch removes isTextFormControl check in SelectorChecker, and just relies on shouldMatchRead{Only,Write}Selector virtual functions. Tests: Update fast/forms/*/*-appearance-pseudo-classes.html. [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): Remove isFormControlElement check and isTextFormControl check. * html/HTMLFormControlElement.cpp: Remove shouldMatchRead{Only,Write}Selector functions. We don't need common implementations any more. * html/HTMLFormControlElement.h: Ditto. * html/HTMLTextAreaElement.h: (HTMLTextAreaElement): Add shouldMatchRead{Only,Write}Selector overrides. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::shouldMatchReadOnlySelector): Added. (WebCore::HTMLTextAreaElement::shouldMatchReadWriteSelector): Added. * html/HTMLInputElement.h: (HTMLInputElement): Add shouldMatchRead{Only,Write}Selector overrides. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::shouldMatchReadOnlySelector): Added. This checks InputType::supportsReadOnly and readOnly. (WebCore::HTMLInputElement::shouldMatchReadWriteSelector): Ditto. * html/InputType.h: (InputType): Add supportsReadOnly. * html/InputType.cpp: (WebCore::InputType::supportsReadOnly): Added. Returns false by default. * html/BaseDateAndTimeInputType.h: (BaseDateAndTimeInputType): Add supportsReadOnly. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::supportsReadOnly): Added. Returns true. * html/TextFieldInputType.h: (TextFieldInputType): Add supportsReadOnly. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::supportsReadOnly): Added. Returns true. LayoutTests: The text color becomes yellow as specified for :read-only in *-appearance-pseudo-classes.html * platform/chromium-mac/fast/forms/date/date-appearance-pseudo-classes-expected.png: * platform/chromium-mac/fast/forms/month/month-appearance-pseudo-classes-expected.png: * platform/chromium-mac/fast/forms/time/time-appearance-pseudo-classes-expected.png: * platform/chromium-mac/fast/forms/week/week-appearance-pseudo-classes-expected.png: * platform/chromium/TestExpectations: TBR=tkent@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=136091

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -18 lines) Patch
M LayoutTests/platform/chromium/TestExpectations View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/WebCore/css/SelectorChecker.cpp View 1 chunk +2 lines, -6 lines 0 comments Download
M Source/WebCore/html/BaseDateAndTimeInputType.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/html/BaseDateAndTimeInputType.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/WebCore/html/HTMLFormControlElement.h View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/WebCore/html/HTMLFormControlElement.cpp View 1 chunk +0 lines, -10 lines 0 comments Download
M Source/WebCore/html/HTMLInputElement.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/WebCore/html/HTMLInputElement.cpp View 1 chunk +10 lines, -0 lines 0 comments Download
M Source/WebCore/html/HTMLTextAreaElement.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/WebCore/html/HTMLTextAreaElement.cpp View 1 chunk +10 lines, -0 lines 0 comments Download
M Source/WebCore/html/InputType.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/html/InputType.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/WebCore/html/TextFieldInputType.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/html/TextFieldInputType.cpp View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
tkent
8 years ago (2012-11-29 05:18:28 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698