Bug 27794 - [HTML5][Forms] Part 3 of datalist&list: Introduce new pseudo selector, new appearance, and new control part for the list attribute support
Summary: [HTML5][Forms] Part 3 of datalist&list: Introduce new pseudo selector, new ap...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: HTML5Forms 27247
  Show dependency treegraph
 
Reported: 2009-07-29 00:01 PDT by Kent Tamura
Modified: 2009-10-05 11:05 PDT (History)
5 users (show)

See Also:


Attachments
Proposed patch (12.16 KB, patch)
2009-07-29 00:20 PDT, Kent Tamura
eric: review-
Details | Formatted Diff | Diff
Proposed patch (rev.2) (16.23 KB, patch)
2009-08-27 22:03 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.
Description Kent Tamura 2009-07-29 00:01:53 PDT
To show a button for a list attribute of an input element, introduce a pseudo CSS selector, new appearance value, and a ControlPart value.
Comment 1 Kent Tamura 2009-07-29 00:20:35 PDT
Created attachment 33697 [details]
Proposed patch

* See https://bugs.webkit.org/attachment.cgi?id=33600 for the actual appearance.
* I'll add tests with another patch.
Comment 2 Peter Kasting 2009-08-04 15:59:19 PDT
dhyatt was working on <datalist> support, he should be CCed on all bugs about it
Comment 3 Eric Seidel 2009-08-07 13:52:34 PDT
Comment on attachment 33697 [details]
Proposed patch

No { }:
 if (part == ListButtonPart) {
 337         [buttonCell setBezelStyle:NSRoundedDisclosureBezelStyle];
 338     } el

Tabs:
47         case ListButtonPart:
 448 	{
 449             LengthSize result = sizeFromFont(font, LengthSize(zoomedSize.width(), Length()), zoomFactor, buttonSizes());
 450             result.setWidth(result.height());
 451             return result;
 452 	}

Where are the tests?

Parts of this at least should be guarded by some sort of DATALIST define.  Otherwise this looks OK.
Comment 4 Kent Tamura 2009-08-27 22:03:08 PDT
Created attachment 38715 [details]
Proposed patch (rev.2)

- update for the latest WebKit source
- add a test

Please refer to bug#27247 for the proposed UI.
Comment 5 Kent Tamura 2009-08-27 22:06:54 PDT
Add more Forms people to CC, and Eric who reviewed the previous patch.
Comment 6 Eric Seidel 2009-09-08 13:33:41 PDT
Comment on attachment 38715 [details]
Proposed patch (rev.2)

Should we be getting these from AppKit somehow?
 317     static const IntSize sizes[3] = { IntSize(21, 21), IntSize(19, 18), IntSize(17, 16) };
Comment 7 Kent Tamura 2009-09-13 21:11:34 PDT
(In reply to comment #6)
> Should we be getting these from AppKit somehow?
>  317     static const IntSize sizes[3] = { IntSize(21, 21), IntSize(19, 18),
> IntSize(17, 16) };

We use similar fixed-size arrays for other controls; radioSizes(), checkboxSizes(), buttonSizes().  They were introduced by hyatt 4 years ago.
http://trac.webkit.org/changeset/10091

I don't know the reason why fixed values were used in them. performance? simpler code?
Comment 8 Eric Seidel 2009-09-23 10:21:31 PDT
Comment on attachment 38715 [details]
Proposed patch (rev.2)

This looks right to me (and no one has complained in the 3 weeks this has been up for review, so it can't be *that* awful).   The only thing it's missing is the mac pixel results.  I'll approve this now, but it would be better if you could post a patch with the mac pixel results.  Otherwise someone will need to make a second commit to add this missing mac pixel results.
Comment 9 Eric Seidel 2009-10-05 10:54:33 PDT
Comment on attachment 38715 [details]
Proposed patch (rev.2)

Adding cq+ since it looks like this is still waiting for commit.
Comment 10 WebKit Commit Bot 2009-10-05 11:05:46 PDT
Comment on attachment 38715 [details]
Proposed patch (rev.2)

Clearing flags on attachment: 38715

Committed r49103: <http://trac.webkit.org/changeset/49103>
Comment 11 WebKit Commit Bot 2009-10-05 11:05:50 PDT
All reviewed patches have been landed.  Closing bug.