Bug 108283 - REGRESSION (r139282): Caret repainting is broken for text-align: center'd <input>
Summary: REGRESSION (r139282): Caret repainting is broken for text-align: center'd <in...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-01-29 18:54 PST by Tim Horton
Modified: 2013-01-30 09:18 PST (History)
8 users (show)

See Also:


Attachments
test (265 bytes, text/html)
2013-01-29 18:54 PST, Tim Horton
no flags Details
off caret (7.14 KB, image/png)
2013-01-29 18:54 PST, Tim Horton
no flags Details
on caret (6.83 KB, image/png)
2013-01-29 18:54 PST, Tim Horton
no flags Details
Patch (3.97 KB, patch)
2013-01-30 00:24 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (4.98 KB, patch)
2013-01-30 02:32 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff
Patch (4.90 KB, patch)
2013-01-30 02:38 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2013-01-29 18:54:13 PST
See attached testcase; the caret is not fully erased when blinking. Reproduces in Safari on Mountain Lion.

I have a hunch that this is due to a combination of r139282 (confirmed by bisection) and subpixel layout (entirely speculative).

<rdar://problem/13062683>
Comment 1 Tim Horton 2013-01-29 18:54:28 PST
Created attachment 185375 [details]
test
Comment 2 Tim Horton 2013-01-29 18:54:40 PST
Created attachment 185376 [details]
off caret
Comment 3 Tim Horton 2013-01-29 18:54:52 PST
Created attachment 185377 [details]
on caret
Comment 4 Alexandre Elias 2013-01-29 20:32:39 PST
Also reproducing on Mac Chromium 25.0.1364.45, looks like cross-platform issue.
Comment 5 Tien-Ren Chen 2013-01-29 23:54:50 PST
Confirmed on chromium-linux 25.0.1364.45 too. Looks like we still need the 1-pixel padding workaround. I'm uploading a patch now.
Comment 6 Tien-Ren Chen 2013-01-30 00:24:53 PST
Created attachment 185414 [details]
Patch
Comment 7 Tien-Ren Chen 2013-01-30 00:26:32 PST
Don't have access to a Mac right now. Waiting for Mac EWS bot result to update TestExpectations.
Comment 8 Tien-Ren Chen 2013-01-30 02:17:31 PST
Comment on attachment 185414 [details]
Patch

I'm surprised Mac EWS passed all the tests. Do they generate pixel results properly for repaint regions?
Comment 9 Tim Horton 2013-01-30 02:18:03 PST
(In reply to comment #8)
> (From update of attachment 185414 [details])
> I'm surprised Mac EWS passed all the tests. Do they generate pixel results properly for repaint regions?

Mac EWS doesn't run pixel tests.
Comment 10 Tien-Ren Chen 2013-01-30 02:19:13 PST
Got it. I'll run it on my Macbook then.
Comment 11 Tien-Ren Chen 2013-01-30 02:32:26 PST
Created attachment 185442 [details]
Patch
Comment 12 Tim Horton 2013-01-30 02:35:14 PST
Comment on attachment 185442 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=185442&action=review

> Source/WebCore/editing/FrameSelection.cpp:1330
> +    // FIXME: Need to over-paint 1 pixel to workaround some rounding problem.

s/some/a/ or s/problem/problems/.

> Source/WebCore/editing/FrameSelection.cpp:1332
> +    // Can't reproduce http://webkit.org/b/19086 but probably the same root cause.

This line doesn't belong here.
Comment 13 Tien-Ren Chen 2013-01-30 02:38:40 PST
Created attachment 185445 [details]
Patch
Comment 14 WebKit Review Bot 2013-01-30 03:22:03 PST
Comment on attachment 185445 [details]
Patch

Clearing flags on attachment: 185445

Committed r141243: <http://trac.webkit.org/changeset/141243>
Comment 15 WebKit Review Bot 2013-01-30 03:22:07 PST
All reviewed patches have been landed.  Closing bug.
Comment 16 Emil A Eklund 2013-01-30 09:18:03 PST
Thanks for adding back that workaround, I'll try to figure out why we get the repaint rect wrong for the caret when I get a chance. We had similar problems in chromium when we first turned on subpixel layout.