WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
11974
REGRESSION: Caret drawn over input when smaller than font size on initial focus
https://bugs.webkit.org/show_bug.cgi?id=11974
Summary
REGRESSION: Caret drawn over input when smaller than font size on initial focus
Matt Lilek
Reported
2006-12-25 23:02:46 PST
When an input is smaller than the font size, the caret will be drawn over the focus ring until text is entered into it, after that the caret is properly clipped.
Attachments
Set controlClip for non-search text controls
(8.95 KB, patch)
2007-02-14 07:10 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
if caret is on a layer make sure it is painted by that layer
(1.83 KB, patch)
2007-02-18 13:30 PST
,
Antti Koivisto
hyatt
: review-
Details
Formatted Diff
Diff
do a more generic test to avoid double paint
(1.74 KB, patch)
2007-02-18 14:53 PST
,
Antti Koivisto
hyatt
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2007-01-28 19:06:07 PST
<
rdar://problem/4960258
>
Antti Koivisto
Comment 2
2007-02-14 07:10:14 PST
Created
attachment 13163
[details]
Set controlClip for non-search text controls Set controlClip but don't enable it for search fields (which have m_innerBlock) since icons would get clipped away. Search fields have minimum height anyway.
Maciej Stachowiak
Comment 3
2007-02-14 10:01:22 PST
Comment on
attachment 13163
[details]
Set controlClip for non-search text controls r=me
Sam Weinig
Comment 4
2007-02-14 12:34:20 PST
Landed in
r19626
!
Antti Koivisto
Comment 5
2007-02-14 13:38:25 PST
Turns out fix is not good. It causes problems with some text fields (google!) so reopening and reverting the patch.
Sam Weinig
Comment 6
2007-02-14 14:43:53 PST
Comment on
attachment 13163
[details]
Set controlClip for non-search text controls Removing review flag so that this does not get landed accidentally.
Antti Koivisto
Comment 7
2007-02-18 13:30:59 PST
Created
attachment 13229
[details]
if caret is on a layer make sure it is painted by that layer Actual problem is that the caret is painted twice, once by the associated renderer and another time by renderer's containing block. Painting done by the containing block won't respect clipping established by the renderer. I'm not actually sure why it is ever necessary to paint caret in both the associated renderer and the containing block. The patch just fixes a case where this double painting actually causes problems.
Dave Hyatt
Comment 8
2007-02-18 14:30:37 PST
Comment on
attachment 13229
[details]
if caret is on a layer make sure it is painted by that layer Seems like we should just let the block that the caret is in always paint the renderer. I do not understand how a double painting situation is occurring and think we should stop that rather than adding a layer check that should not be necessary.
Antti Koivisto
Comment 9
2007-02-18 14:53:49 PST
Created
attachment 13230
[details]
do a more generic test to avoid double paint
Dave Hyatt
Comment 10
2007-02-19 01:17:20 PST
Comment on
attachment 13230
[details]
do a more generic test to avoid double paint I'd probably ask isBlockFlow first (since it's quicker than containingBlock()). r=me!
Dave Hyatt
Comment 11
2007-02-19 01:23:17 PST
Disregard my comment. I'm wrong about that ordering being better.
Antti Koivisto
Comment 12
2007-02-19 01:33:12 PST
r19706
mitz
Comment 13
2007-02-19 16:20:35 PST
The fix caused a regression where sometimes the caret isn't painted at all. See for example <
http://build.webkit.org/results/post-commit-pixel-powerpc-mac-os-x/3675/editing/pasteboard/4641033-diffs.html
>. You can open the test in Safari and see that when the caret is at the very end of the contenteditable div, after the select, it does not paint.
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