Bug 125728 - Subpixel layout: Default style of input type=checkbox/radio (0.5ex) adds 1px extra margin on both left and right.
Summary: Subpixel layout: Default style of input type=checkbox/radio (0.5ex) adds 1px ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks: 126283
  Show dependency treegraph
 
Reported: 2013-12-13 20:51 PST by zalan
Modified: 2014-01-24 17:29 PST (History)
12 users (show)

See Also:


Attachments
test case (953 bytes, text/html)
2013-12-13 20:51 PST, zalan
no flags Details
Patch (1.93 KB, patch)
2014-01-22 19:42 PST, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion (424.14 KB, application/zip)
2014-01-22 20:50 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (417.21 KB, application/zip)
2014-01-22 21:48 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 (405.13 KB, application/zip)
2014-01-22 22:29 PST, Build Bot
no flags Details
Patch (123.66 KB, patch)
2014-01-23 07:59 PST, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion (1.45 MB, application/zip)
2014-01-23 09:16 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 (1.41 MB, application/zip)
2014-01-23 09:48 PST, Build Bot
no flags Details
Patch (1.09 MB, patch)
2014-01-23 10:01 PST, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (1.47 MB, application/zip)
2014-01-23 12:47 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2 (1.42 MB, application/zip)
2014-01-23 14:00 PST, Build Bot
no flags Details
Patch (147.11 KB, patch)
2014-01-24 16:03 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2013-12-13 20:51:00 PST
Created attachment 219228 [details]
test case

The default left and right margins for input[type="radio"] and input[type="checkbox"] are 0.5ex. 0.5*font x-height gets resolved to 2.9px (using the default font on Mac OS X) and gets rounded to 2px(subpixel off) and to 3px(subpixel on). -> 1px shift on each side.
Using the 0.5ex value is a long-standing (khtml) behavior. However other browsers (FF, Opera with Presto) disagree as they set static margins values. 

This dynamic behavior is rather hidden though, as in order to get the margins changed, the input's font size needs to be set. -which can result in some odd layout. see attached test case.

html.css
...
input[type="radio"], input[type="checkbox"] {
    margin: 3px 0.5ex;
...

Bug 16362 is somewhat related.
Comment 1 zalan 2013-12-13 21:17:26 PST
<rdar://problem/15662705>
Comment 2 zalan 2014-01-22 19:42:44 PST
Created attachment 221938 [details]
Patch
Comment 3 Build Bot 2014-01-22 20:50:29 PST
Comment on attachment 221938 [details]
Patch

Attachment 221938 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6053768818851840

New failing tests:
fast/block/basic/011.html
fast/parser/bad-xml-slash.html
css1/box_properties/acid_test.html
fast/text/textIteratorNilRenderer.html
fast/forms/basic-inputs.html
fast/replaced/replaced-breaking.html
css2.1/t09-c5526c-display-00-e.html
fast/forms/indeterminate.html
css3/selectors3/xml/css3-modsel-70.xml
fast/inline/positionedLifetime.html
fast/forms/input-value.html
fast/text/whitespace/normal-after-nowrap-breaking.html
http/tests/navigation/javascriptlink-frames.html
compositing/overflow/theme-affects-visual-overflow.html
css3/selectors3/xhtml/css3-modsel-70.xml
fast/replaced/width100percent-radio.html
fast/replaced/width100percent-checkbox.html
fast/css/non-standard-checkbox-size.html
fast/forms/001.html
fast/forms/formmove.html
fast/block/margin-collapse/103.html
fast/forms/file/file-input-disabled.html
fast/forms/input-appearance-height.html
css3/selectors3/xml/css3-modsel-25.xml
css3/selectors3/xhtml/css3-modsel-25.xml
fast/forms/form-element-geometry.html
fast/forms/box-shadow-override.html
css3/selectors3/html/css3-modsel-70.html
css3/selectors3/html/css3-modsel-25.html
fast/forms/formmove2.html
Comment 4 Build Bot 2014-01-22 20:50:31 PST
Created attachment 221941 [details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 5 Build Bot 2014-01-22 21:48:07 PST
Comment on attachment 221938 [details]
Patch

Attachment 221938 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6025361905156096

New failing tests:
fast/block/basic/011.html
fast/parser/bad-xml-slash.html
css1/box_properties/acid_test.html
fast/text/textIteratorNilRenderer.html
fast/forms/basic-inputs.html
fast/replaced/replaced-breaking.html
css2.1/t09-c5526c-display-00-e.html
fast/forms/indeterminate.html
css3/selectors3/xml/css3-modsel-70.xml
fast/inline/positionedLifetime.html
fast/forms/input-value.html
fast/text/whitespace/normal-after-nowrap-breaking.html
http/tests/navigation/javascriptlink-frames.html
compositing/overflow/theme-affects-visual-overflow.html
css3/selectors3/xhtml/css3-modsel-70.xml
fast/replaced/width100percent-radio.html
fast/replaced/width100percent-checkbox.html
fast/css/non-standard-checkbox-size.html
fast/forms/001.html
fast/forms/formmove.html
fast/block/margin-collapse/103.html
fast/forms/file/file-input-disabled.html
fast/forms/input-appearance-height.html
css3/selectors3/xml/css3-modsel-25.xml
css3/selectors3/xhtml/css3-modsel-25.xml
fast/forms/form-element-geometry.html
fast/forms/box-shadow-override.html
css3/selectors3/html/css3-modsel-70.html
css3/selectors3/html/css3-modsel-25.html
fast/forms/formmove2.html
Comment 6 Build Bot 2014-01-22 21:48:10 PST
Created attachment 221945 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 7 Build Bot 2014-01-22 22:29:43 PST
Comment on attachment 221938 [details]
Patch

Attachment 221938 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4748834274017280

New failing tests:
fast/block/basic/011.html
fast/parser/bad-xml-slash.html
css1/box_properties/acid_test.html
fast/text/textIteratorNilRenderer.html
fast/forms/basic-inputs.html
fast/replaced/replaced-breaking.html
css2.1/t09-c5526c-display-00-e.html
fast/forms/indeterminate.html
css3/selectors3/xml/css3-modsel-70.xml
fast/inline/positionedLifetime.html
fast/forms/input-value.html
fast/text/whitespace/normal-after-nowrap-breaking.html
http/tests/navigation/javascriptlink-frames.html
compositing/overflow/theme-affects-visual-overflow.html
css3/selectors3/xhtml/css3-modsel-70.xml
fast/replaced/width100percent-radio.html
fast/replaced/width100percent-checkbox.html
fast/css/non-standard-checkbox-size.html
fast/forms/001.html
fast/forms/formmove.html
fast/block/margin-collapse/103.html
fast/forms/file/file-input-disabled.html
fast/forms/input-appearance-height.html
css3/selectors3/xml/css3-modsel-25.xml
css3/selectors3/xhtml/css3-modsel-25.xml
fast/forms/form-element-geometry.html
fast/forms/box-shadow-override.html
css3/selectors3/html/css3-modsel-70.html
css3/selectors3/html/css3-modsel-25.html
fast/forms/formmove2.html
Comment 8 Build Bot 2014-01-22 22:29:45 PST
Created attachment 221949 [details]
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-11  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 9 zalan 2014-01-23 07:59:37 PST
Created attachment 221981 [details]
Patch
Comment 10 Build Bot 2014-01-23 09:16:27 PST
Comment on attachment 221981 [details]
Patch

Attachment 221981 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/4881730762702848

New failing tests:
fast/text/textIteratorNilRenderer.html
http/tests/navigation/javascriptlink-frames.html
fast/forms/form-element-geometry.html
fast/block/margin-collapse/103.html
tables/mozilla/bugs/bug4527.html
fast/forms/box-shadow-override.html
fast/forms/basic-inputs.html
fast/forms/input-value.html
fast/forms/input-appearance-height.html
fast/replaced/replaced-breaking.html
Comment 11 Build Bot 2014-01-23 09:16:29 PST
Created attachment 221988 [details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 12 Build Bot 2014-01-23 09:48:00 PST
Comment on attachment 221981 [details]
Patch

Attachment 221981 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5969668326031360

New failing tests:
fast/text/textIteratorNilRenderer.html
http/tests/navigation/javascriptlink-frames.html
fast/forms/form-element-geometry.html
fast/block/margin-collapse/103.html
tables/mozilla/bugs/bug4527.html
fast/forms/box-shadow-override.html
fast/forms/basic-inputs.html
fast/forms/input-value.html
fast/forms/input-appearance-height.html
fast/replaced/replaced-breaking.html
Comment 13 Build Bot 2014-01-23 09:48:03 PST
Created attachment 221992 [details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-14  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 14 zalan 2014-01-23 10:01:10 PST
Created attachment 221995 [details]
Patch
Comment 15 zalan 2014-01-23 10:01:41 PST
Comment on attachment 221995 [details]
Patch

ews testing
Comment 16 Build Bot 2014-01-23 12:47:05 PST
Comment on attachment 221995 [details]
Patch

Attachment 221995 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/6587904910426112

New failing tests:
fast/text/textIteratorNilRenderer.html
http/tests/navigation/javascriptlink-frames.html
fast/forms/form-element-geometry.html
fast/block/margin-collapse/103.html
tables/mozilla/bugs/bug4527.html
fast/forms/box-shadow-override.html
fast/forms/basic-inputs.html
fast/forms/input-value.html
fast/forms/input-appearance-height.html
fast/replaced/replaced-breaking.html
Comment 17 Build Bot 2014-01-23 12:47:09 PST
Created attachment 222018 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 18 Build Bot 2014-01-23 14:00:19 PST
Comment on attachment 221995 [details]
Patch

Attachment 221995 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5308561928224768

New failing tests:
fast/text/textIteratorNilRenderer.html
http/tests/navigation/javascriptlink-frames.html
fast/forms/form-element-geometry.html
fast/block/margin-collapse/103.html
tables/mozilla/bugs/bug4527.html
fast/forms/box-shadow-override.html
fast/forms/basic-inputs.html
fast/forms/input-value.html
fast/forms/input-appearance-height.html
fast/replaced/replaced-breaking.html
Comment 19 Build Bot 2014-01-23 14:00:22 PST
Created attachment 222026 [details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 20 zalan 2014-01-24 16:03:13 PST
Created attachment 222164 [details]
Patch
Comment 21 zalan 2014-01-24 16:03:59 PST
Comment on attachment 222164 [details]
Patch

EWS testing
Comment 22 WebKit Commit Bot 2014-01-24 17:29:41 PST
Comment on attachment 222164 [details]
Patch

Clearing flags on attachment: 222164

Committed r162742: <http://trac.webkit.org/changeset/162742>
Comment 23 WebKit Commit Bot 2014-01-24 17:29:45 PST
All reviewed patches have been landed.  Closing bug.