WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
reduction
(238 bytes, text/html)
2008-02-29 16:37 PST
,
jasneet
no flags
Details
Patch
(15.55 KB, patch)
2013-08-29 05:26 PDT
,
gur.trio
no flags
Details
Formatted Diff
Diff
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
Details
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
Details
Patch
(60.69 KB, patch)
2013-09-03 03:16 PDT
,
gur.trio
no flags
Details
Formatted Diff
Diff
Patch
(60.70 KB, patch)
2013-09-03 21:49 PDT
,
gur.trio
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
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
Robert Blaut
Comment 3
2008-03-04 12:08:45 PST
Very odd issue. Check this test case:
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cp%20style%3D'border%3A1px%20solid%20red%3B'%3Etest%20test%20%3Cinput%20type%3D'text'%20style%3D%22line-height%3A10em%3B%22%3Etest%3Cbr%3Etest%20test%20test%20test%20test%20test%20test%20%3C%2Fp%3E
Notice strange very height of input box.
gur.trio
Comment 4
2013-08-29 05:26:22 PDT
Created
attachment 209966
[details]
Patch
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
Created
attachment 210346
[details]
Patch
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
Created
attachment 210429
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug