Bug 24093

Summary: Autofocus inputs don't always honor selector input:focus
Product: WebKit Reporter: Anthony Ricaud <rik>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, kaustubh.ra, michelangelo, rniwa, tkent, webkit.review.bot
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://lachy.id.au/dev/markup/tests/html5/autofocus/016.html
Bug Depends on:    
Bug Blocks: 19264    
Attachments:
Description Flags
Patch for Adding test case none

Description Anthony Ricaud 2009-02-23 06:37:16 PST
This test by Lachlan Hunt fails. The focus is good but the field should be green.
Comment 1 Michelangelo De Simone 2009-11-02 14:19:27 PST
*** Bug 31031 has been marked as a duplicate of this bug. ***
Comment 2 Kaustubh Atrawalkar 2011-09-23 03:19:19 PDT
I guess this has been fixed. Can be closed.
Comment 3 Alexey Proskuryakov 2011-09-23 16:53:15 PDT
Should we land this as a regression test?
Comment 4 Kaustubh Atrawalkar 2011-11-08 01:30:55 PST
Created attachment 114010 [details]
Patch for Adding test case

As this has been already fixed, adding regression test case for the same.
Comment 5 Kent Tamura 2011-11-08 07:09:07 PST
Comment on attachment 114010 [details]
Patch for Adding test case

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

> LayoutTests/fast/forms/autofocus-input-css-style-change.html:18
> +if (window.layoutTestController) {
> +    layoutTestController.dumpAsText();
> +}
> +
> +var test = document.getElementById("test");
> +if (document.defaultView.getComputedStyle(test, null).getPropertyValue('background-color') == "rgb(0, 128, 0)")
> +    result.innerHTML = "PASS";

The code style is consistent. The first if has {} for 1-line body, and the second if has no {} for 1-line body.
Comment 6 Kent Tamura 2011-11-08 07:09:28 PST
(In reply to comment #5)
> The code style is consistent. The first if has {} for 1-line body, and the second if has no {} for 1-line body.

consistent -> inconsistent.
Comment 7 Alexey Proskuryakov 2011-11-08 08:47:43 PST
Comment on attachment 114010 [details]
Patch for Adding test case

The comment seems minor enough to land as is, marking cq+.
Comment 8 WebKit Review Bot 2011-11-08 10:04:26 PST
Comment on attachment 114010 [details]
Patch for Adding test case

Clearing flags on attachment: 114010

Committed r99582: <http://trac.webkit.org/changeset/99582>
Comment 9 WebKit Review Bot 2011-11-08 10:04:30 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Kaustubh Atrawalkar 2011-11-08 21:48:01 PST
Thanks for the review Kent & Alexey.