RESOLVED FIXED 17619
defining line height affects height of text box
https://bugs.webkit.org/show_bug.cgi?id=17619
Summary defining line height affects height of text box
jasneet
Reported 2008-02-29 16:36:15 PST
I Steps: Go to http://developers.facebook.com/tools.php?fbml II Issue: Notice the height of text box next to "user:" and "profile:" III Conclusion: Issue is caused due to defining line-height:32px; On varying the line height say 30px, 20px ; the height of input text box also varies in Safari but no effect seen in FF. IV Other browsers: FF: ok Opera: ok IE 7: ok V Nightly tested: 30236
Attachments
screenshot (136.82 KB, image/jpeg)
2008-02-29 16:37 PST, jasneet
no flags
reduction (238 bytes, text/html)
2008-02-29 16:37 PST, jasneet
no flags
Patch (15.55 KB, patch)
2013-08-29 05:26 PDT, gur.trio
no flags
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (515.35 KB, application/zip)
2013-08-29 08:18 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion (1.07 MB, application/zip)
2013-08-29 09:03 PDT, Build Bot
no flags
Patch (60.69 KB, patch)
2013-09-03 03:16 PDT, gur.trio
no flags
Patch (60.70 KB, patch)
2013-09-03 21:49 PDT, gur.trio
no flags
jasneet
Comment 1 2008-02-29 16:37:21 PST
Created attachment 19463 [details] screenshot
jasneet
Comment 2 2008-02-29 16:37:52 PST
Created attachment 19464 [details] reduction
gur.trio
Comment 4 2013-08-29 05:26:22 PDT
gur.trio
Comment 5 2013-08-29 05:28:26 PDT
Giving line height to input elements increase the height of the element. To make it work similiar as Mozilla and IE line-height :normal should be applied for input elements. https://bugzilla.mozilla.org/show_bug.cgi?id=82265 Hi Darin. Could you please review this. Thanks
Build Bot
Comment 6 2013-08-29 08:18:38 PDT
Comment on attachment 209966 [details] Patch Attachment 209966 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1624635 New failing tests: fast/forms/placeholder-position.html
Build Bot
Comment 7 2013-08-29 08:18:39 PDT
Created attachment 209983 [details] Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-10 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.4
Build Bot
Comment 8 2013-08-29 09:03:53 PDT
Comment on attachment 209966 [details] Patch Attachment 209966 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1581987 New failing tests: fast/workers/termination-with-port-messages.html fast/forms/placeholder-position.html
Build Bot
Comment 9 2013-08-29 09:03:56 PDT
Created attachment 209988 [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.4
gur.trio
Comment 10 2013-09-03 03:16:37 PDT
Darin Adler
Comment 11 2013-09-03 19:10:19 PDT
Comment on attachment 210346 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210346&action=review > Source/WebCore/css/html.css:425 > +input { > + line-height:normal !important; > +} Trying to prevent this with a user-agent stylesheet change will make line-height value of normal visible in getComputedStyle on the input element; because of that I think this is wrong. Unless the specification or standard practice in other browsers is to return "normal" as the computed style for the input element. Instead we can turn off the line-height inside the shadow DOM constructed by the input element somewhere in the RenderTextControl class. Can you please test what getComputedStyle does in these other browsers?
gur.trio
Comment 12 2013-09-03 21:27:00 PDT
(In reply to comment #11) > (From update of attachment 210346 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=210346&action=review > > > Source/WebCore/css/html.css:425 > > +input { > > + line-height:normal !important; > > +} > > Trying to prevent this with a user-agent stylesheet change will make line-height value of normal visible in getComputedStyle on the input element; because of that I think this is wrong. Unless the specification or standard practice in other browsers is to return "normal" as the computed style for the input element. Instead we can turn off the line-height inside the shadow DOM constructed by the input element somewhere in the RenderTextControl class. > > Can you please test what getComputedStyle does in these other browsers? The Test case input-line-height.html shows the following results. The test case compares getComputedStyle's line-height with style's line-height IE : FAIL for all inputs i.e getComputedStyle's line-height and style's line-height are same (both values show 50px) Mozilla : PASS for all inputs i.e getComputedStyle's line-height and style's line-height are different.(getComputedStyle's line height shows 16px and style's line height shows 50px) Mozilla as I can see is doing through .css
Darin Adler
Comment 13 2013-09-03 21:30:14 PDT
Comment on attachment 210346 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=210346&action=review >>> Source/WebCore/css/html.css:425 >>> +} >> >> Trying to prevent this with a user-agent stylesheet change will make line-height value of normal visible in getComputedStyle on the input element; because of that I think this is wrong. Unless the specification or standard practice in other browsers is to return "normal" as the computed style for the input element. Instead we can turn off the line-height inside the shadow DOM constructed by the input element somewhere in the RenderTextControl class. >> >> Can you please test what getComputedStyle does in these other browsers? > > The Test case input-line-height.html shows the following results. The test case compares getComputedStyle's line-height with style's line-height > > IE : FAIL for all inputs i.e getComputedStyle's line-height and style's line-height are same (both values show 50px) > Mozilla : PASS for all inputs i.e getComputedStyle's line-height and style's line-height are different.(getComputedStyle's line height shows 16px and style's line height shows 50px) > > Mozilla as I can see is doing through .css OK, lets go with the CSS solution. There should be a space after the colon to match the rest of the html.css file.
gur.trio
Comment 14 2013-09-03 21:49:05 PDT
gur.trio
Comment 15 2013-09-04 20:37:41 PDT
(In reply to comment #14) > Created an attachment (id=210429) [details] > Patch Uploaded new patch as per the review comments.
gur.trio
Comment 16 2013-09-08 23:27:32 PDT
y(In reply to comment #13) > (From update of attachment 210346 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=210346&action=review > > >>> Source/WebCore/css/html.css:425 > >>> +} > >> > >> Trying to prevent this with a user-agent stylesheet change will make line-height value of normal visible in getComputedStyle on the input element; because of that I think this is wrong. Unless the specification or standard practice in other browsers is to return "normal" as the computed style for the input element. Instead we can turn off the line-height inside the shadow DOM constructed by the input element somewhere in the RenderTextControl class. > >> > >> Can you please test what getComputedStyle does in these other browsers? > > > > The Test case input-line-height.html shows the following results. The test case compares getComputedStyle's line-height with style's line-height > > > > IE : FAIL for all inputs i.e getComputedStyle's line-height and style's line-height are same (both values show 50px) > > Mozilla : PASS for all inputs i.e getComputedStyle's line-height and style's line-height are different.(getComputedStyle's line height shows 16px and style's line height shows 50px) > > > > Mozilla as I can see is doing through .css > > OK, lets go with the CSS solution. > > There should be a space after the colon to match the rest of the html.css file. Hi Darin. Anything else needs to be done for this issue?
WebKit Commit Bot
Comment 17 2013-09-08 23:54:17 PDT
Comment on attachment 210429 [details] Patch Clearing flags on attachment: 210429 Committed r155324: <http://trac.webkit.org/changeset/155324>
WebKit Commit Bot
Comment 18 2013-09-08 23:54:20 PDT
All reviewed patches have been landed. Closing bug.
gur.trio
Comment 19 2013-12-23 22:10:22 PST
*** Bug 17751 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.