WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
103350
:read-only selector should match to date/time input types
https://bugs.webkit.org/show_bug.cgi?id=103350
Summary
:read-only selector should match to date/time input types
Kent Tamura
Reported
2012-11-26 20:04:53 PST
How to reproduce: 1. Open data:text/html,<style>:read-only { background-color:red; }</style><input type=time readonly><input readonly> Expected: Both of the time input and the text input are red. Actual: The time input is white. According to the standard [1], date/time types should support readonly attribute, and of couse :read-only selector too. [1]
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
Attachments
Patch
(125.11 KB, patch)
2012-11-26 22:49 PST
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Patch for landing
(125.10 KB, patch)
2012-11-26 23:14 PST
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2012-11-26 22:49:05 PST
Created
attachment 176180
[details]
Patch
Kentaro Hara
Comment 2
2012-11-26 23:02:06 PST
Comment on
attachment 176180
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=176180&action=review
Looks ok
> Source/WebCore/ChangeLog:11 > + isTextFormControl check in SeelctorChecker, and just relies on
Typo: SelectorChecker
> Source/WebCore/html/HTMLTextAreaElement.cpp:539 > +bool HTMLTextAreaElement::shouldMatchReadOnlySelector() const > +{ > + return readOnly(); > +} > + > +bool HTMLTextAreaElement::shouldMatchReadWriteSelector() const > +{ > + return !readOnly();
Don't you want to change this to: bool HTMLTextAreaElement::shouldMatchReadOnlySelector() const { return supportsReadOnly() && readOnly(); } bool HTMLTextAreaElement::shouldMatchReadWriteSelector() const { return supportsReadOnly() && !readOnly(); } and implement: HTMLTextAreaElement::supportsReadOnly() { return true; } ?
Kent Tamura
Comment 3
2012-11-26 23:12:15 PST
Comment on
attachment 176180
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=176180&action=review
>> Source/WebCore/html/HTMLTextAreaElement.cpp:539 >> + return !readOnly(); > > Don't you want to change this to: > > bool HTMLTextAreaElement::shouldMatchReadOnlySelector() const > { > return supportsReadOnly() && readOnly(); > } > > bool HTMLTextAreaElement::shouldMatchReadWriteSelector() const > { > return supportsReadOnly() && !readOnly(); > } > > and implement: > > HTMLTextAreaElement::supportsReadOnly() { return true; } > > ?
It looks to help nothing and makes code readers confused.
Kent Tamura
Comment 4
2012-11-26 23:14:11 PST
Created
attachment 176186
[details]
Patch for landing Fix a typo in ChangeLog
WebKit Review Bot
Comment 5
2012-11-26 23:54:07 PST
Comment on
attachment 176186
[details]
Patch for landing Clearing flags on attachment: 176186 Committed
r135829
: <
http://trac.webkit.org/changeset/135829
>
WebKit Review Bot
Comment 6
2012-11-26 23:54:11 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug