Bug 69402 - Input styles are unexpectedly shared regardless of required status difference.
Summary: Input styles are unexpectedly shared regardless of required status difference.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-05 00:04 PDT by Kent Tamura
Modified: 2011-10-05 02:24 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.18 KB, patch)
2011-10-05 00:06 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff
Patch for landing (3.47 KB, patch)
2011-10-05 01:21 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Kent Tamura 2011-10-05 00:06:39 PDT
Created attachment 109751 [details]
Patch
Comment 2 Daniel Bates 2011-10-05 00:59:25 PDT
Comment on attachment 109751 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=109751&action=review

This patch looks straightforward. I have some minor nits.

> LayoutTests/fast/css/pseudo-required-shared-expected.html:4
> +<input value=required style="color:red;">
> +<input value=optional>

Nit: For consistency with the style attribute, I suggest surrounding all attribute values with quotes:

<input value="required" style="color:red">
<input value="optional">

> LayoutTests/fast/css/pseudo-required-shared.html:2
> +<!DOCTYPE html>
> +<!-- There was a bug that styles are unexpectedly shared regardless of required status difference. -->

This isn't a valid HTML5 document as per section 8.1.2.4 <http://dev.w3.org/html5/spec/Overview.html#optional-tags> which states that "An html element's start tag may be omitted if the first thing inside the html element is not a comment.". That is, we need an <html> tag here since the first thing is a comment.

For you consideration, you may want to make the markup closer resemble the form of a basic HTML document as described in section 1.8 of the HTML5 spec. <http://dev.w3.org/html5/spec/Overview.html#a-quick-introduction-to-html>.

> LayoutTests/fast/css/pseudo-required-shared.html:7
> +

Nit: Please remove this empty line as it doesn't seem to improve the readability of this markup given that we have exactly one CSS block.

> LayoutTests/fast/css/pseudo-required-shared.html:11
> +<input required value=required>
> +<input value=optional>

Nit: I suggest surrounding attribute values in quotes so as to demarcate them from the rest of the markup.
Comment 3 Kent Tamura 2011-10-05 01:12:14 PDT
Daniel, thank you!
I'll follow your comments and land the patch.
Comment 4 Kent Tamura 2011-10-05 01:21:03 PDT
Created attachment 109759 [details]
Patch for landing
Comment 5 WebKit Review Bot 2011-10-05 02:24:40 PDT
Comment on attachment 109759 [details]
Patch for landing

Clearing flags on attachment: 109759

Committed r96686: <http://trac.webkit.org/changeset/96686>
Comment 6 WebKit Review Bot 2011-10-05 02:24:44 PDT
All reviewed patches have been landed.  Closing bug.