Bug 23093 - REGRESSION (3.2-ToT): Clear button in search field fails to redraw correctly
Summary: REGRESSION (3.2-ToT): Clear button in search field fails to redraw correctly
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P1 Normal
Assignee: Simon Fraser (smfr)
Keywords: InRadar
Depends on:
Reported: 2009-01-03 17:04 PST by Simon Fraser (smfr)
Modified: 2009-03-11 12:00 PDT (History)
1 user (show)

See Also:

Testcase (1.83 KB, text/html)
2009-01-03 17:05 PST, Simon Fraser (smfr)
no flags Details
Patch, testcase, changelog (8.33 KB, patch)
2009-03-10 21:56 PDT, Simon Fraser (smfr)
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2009-01-03 17:04:42 PST
In the attached testcase, type a character into the search field. Note how the Clear button shows up, but only half of it draws.
Comment 1 Simon Fraser (smfr) 2009-01-03 17:05:06 PST
Created attachment 26395 [details]
Comment 2 Cameron Zwarich (cpst) 2009-03-10 16:03:44 PDT
I'll take this bug.
Comment 3 Simon Fraser (smfr) 2009-03-10 16:07:17 PDT
Comment 4 Cameron Zwarich (cpst) 2009-03-10 16:45:12 PDT
Between the r37126 and r37300 nightlies, the clear button disappears entirely, but I am not sure if this is the root cause of the bug. I'll see where it goes to being half-drawn.
Comment 5 Cameron Zwarich (cpst) 2009-03-10 17:11:50 PDT
The change from an undrawn clear button and a half-drawn clear button occurs between the r38676 and r38683 nightlies. The only relevant change is r38678:


Simon, I am not an expert on this code, but it seems to me that the inflation of the rect for repainting is causing the button to be partially drawn, and the real problem occurred earlier when it was no longer drawn at all. What do you think?
Comment 6 Simon Fraser (smfr) 2009-03-10 17:25:56 PDT
I think it would be instructive to debug through clippedOverflowRectForRepaint() and figure out why the rect ends up being wrong.
Comment 7 Cameron Zwarich (cpst) 2009-03-10 18:57:22 PDT
Odd, a local debug build of r37126 demonstrates the same problematic behaviour. I'll just do as you suggest and debug the problem in ToT instead of trying to find the regression.
Comment 8 Simon Fraser (smfr) 2009-03-10 20:39:33 PDT
I think the real issue here is that no-one tells the clear button to repaint when it is shown or hidden.
Comment 9 Cameron Zwarich (cpst) 2009-03-10 20:44:36 PDT
Simon has a good idea of what causes this bug so I will unassign it.
Comment 10 Simon Fraser (smfr) 2009-03-10 21:54:04 PDT
As a related issue, I found that the cancel button's div is also too short: bug 24509.
Comment 11 Simon Fraser (smfr) 2009-03-10 21:56:52 PDT
Created attachment 28464 [details]
Patch, testcase, changelog
Comment 12 Simon Fraser (smfr) 2009-03-11 12:00:49 PDT