WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
61768
REGRESSION (
r87067
): Text overflows from short height text field
https://bugs.webkit.org/show_bug.cgi?id=61768
Summary
REGRESSION (r87067): Text overflows from short height text field
Yuzo Fujishima
Reported
2011-05-31 00:38:44 PDT
Created
attachment 95400
[details]
Reduction Text typed into a short height text field overflows from the field to below. Reproduction steps: 1. Open the attached reduction with Safari (WebKit 87713). 2. Observe the text field. Firefox 4.0.1 and Opera 11.11 behave correctly -- they render text only inside the text field.
Attachments
Reduction
(315 bytes, text/html)
2011-05-31 00:38 PDT
,
Yuzo Fujishima
no flags
Details
Screenshot
(13.20 KB, image/png)
2011-05-31 00:39 PDT
,
Yuzo Fujishima
no flags
Details
Patch
(13.54 KB, patch)
2011-05-31 06:05 PDT
,
Yuzo Fujishima
no flags
Details
Formatted Diff
Diff
Patch 2
(6.30 KB, patch)
2011-05-31 22:52 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Patch
(8.43 KB, patch)
2011-07-04 01:22 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-01
(1.58 MB, application/zip)
2011-07-04 01:53 PDT
,
WebKit Review Bot
no flags
Details
Patch 4
(9.32 KB, patch)
2011-07-04 01:57 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Yuzo Fujishima
Comment 1
2011-05-31 00:39:20 PDT
Created
attachment 95401
[details]
Screenshot
Kent Tamura
Comment 2
2011-05-31 03:28:06 PDT
I think we need to add overflow-y:hidden or something to the UA stylesheet for <input>.
Yuzo Fujishima
Comment 3
2011-05-31 06:05:15 PDT
Created
attachment 95424
[details]
Patch
mitz
Comment 4
2011-05-31 08:36:16 PDT
This is a fairly recent regression (the bug doesn’t occur in
r86179
). I expect the lightweight control clip mechanism to do this automatically. I think it’s important to understand how the regression occurred before attempting this fix.
mitz
Comment 5
2011-05-31 08:39:18 PDT
Specifically, it seems likely that this was caused by
r87067
.
mitz
Comment 6
2011-05-31 08:46:42 PDT
<
rdar://problem/9527476
>
mitz
Comment 7
2011-05-31 09:16:00 PDT
Comment on
attachment 95424
[details]
Patch This should be handled by hasControlClip() / controlClipRect().
Kent Tamura
Comment 8
2011-05-31 18:07:43 PDT
(In reply to
comment #4
)
> I think it’s important to understand how the regression occurred before attempting this fix.
At the beginning of RenderTextControlSingleLine::layout(), we change the inner text height to 1 by innerTextRenderer->style()->setHeight(Length(desiredheight, Fixed)) in this case. I confirmed this was called on ToT, but it was not effective?
mitz
Comment 9
2011-05-31 18:29:58 PDT
I would investigate whether hasControlClip() and controlClipRect() are still consulted and what values they return. This is something that happens at paint time, not layout time.
Kent Tamura
Comment 10
2011-05-31 19:07:28 PDT
Well, I found the root cause. As I wrote in
Comment #8
, RenderTextControlSingleLine::layout() adjusts the height of the inner text block. However TextControlInnerTextElement::styleForRenderer() resets the RenderStyle since
r87067
. It shows the problem in a case that: 1. RenderTextControlSingleLine::layout() is done. RenderStyle for the inner text has height=1. 2. HTMLInputElement::value is updated. So, TextControlInnerTextElement::styleForRenderer() resets the RenderStyle. It has no height. 3. The inner text is laid out and it has a natural height such as 13px, but RenderTextControlSingleLine::layout() is not called (is it normal?)
> I would investigate whether hasControlClip() and controlClipRect() are still consulted and what values they return.
We have never used the control clip to clip the inner text of <input> AFAIK.
Kent Tamura
Comment 11
2011-05-31 21:32:35 PDT
(In reply to
comment #10
)
> Well, I found the root cause. > > As I wrote in
Comment #8
, RenderTextControlSingleLine::layout() adjusts the height of the inner text block. However TextControlInnerTextElement::styleForRenderer() resets the RenderStyle since
r87067
. It shows the problem in a case that: > 1. RenderTextControlSingleLine::layout() is done. > RenderStyle for the inner text has height=1. > 2. HTMLInputElement::value is updated. > So, TextControlInnerTextElement::styleForRenderer() resets the RenderStyle. It has no height. > 3. The inner text is laid out and it has a natural height such as 13px, > but RenderTextControlSingleLine::layout() is not called (is it normal?)
Correction: RenderTextControlSingleLine::layout() was called. But the RenderBlock for the inner text still has an old small height. So setHeight() is not called.
Kent Tamura
Comment 12
2011-05-31 22:52:10 PDT
Created
attachment 95547
[details]
Patch 2
Kent Tamura
Comment 13
2011-06-28 03:59:48 PDT
I found the patch causes another problem.
Kent Tamura
Comment 14
2011-07-04 01:22:26 PDT
Created
attachment 99607
[details]
Patch
WebKit Review Bot
Comment 15
2011-07-04 01:53:19 PDT
Comment on
attachment 99607
[details]
Patch
Attachment 99607
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/8979717
New failing tests: fast/forms/textfield-overflow-by-value-update.html
WebKit Review Bot
Comment 16
2011-07-04 01:53:24 PDT
Created
attachment 99608
[details]
Archive of layout-test-results from ec2-cr-linux-01 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-01 Port: Chromium Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Kent Tamura
Comment 17
2011-07-04 01:57:33 PDT
Created
attachment 99609
[details]
Patch 4 The test fails on Chromium expectedly
Dimitri Glazkov (Google)
Comment 18
2011-07-04 09:50:57 PDT
Comment on
attachment 99609
[details]
Patch 4 View in context:
https://bugs.webkit.org/attachment.cgi?id=99609&action=review
> LayoutTests/fast/forms/textfield-overflow-by-value-update.html:15 > + So, the test result should be just white. -->
That's pretty clever :)
Kent Tamura
Comment 19
2011-07-04 17:34:47 PDT
Comment on
attachment 99609
[details]
Patch 4 Thank you for r+!
WebKit Review Bot
Comment 20
2011-07-04 18:27:59 PDT
Comment on
attachment 99609
[details]
Patch 4 Clearing flags on attachment: 99609 Committed
r90379
: <
http://trac.webkit.org/changeset/90379
>
WebKit Review Bot
Comment 21
2011-07-04 18:28:07 PDT
All reviewed patches have been landed. Closing 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