Bug 59613 - Speech input button layout issues with padding and border.
Summary: Speech input button layout issues with padding and border.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Satish Sampath
URL:
Keywords:
Depends on:
Blocks: 39485 59742
  Show dependency treegraph
 
Reported: 2011-04-27 09:01 PDT by Satish Sampath
Modified: 2011-04-28 14:51 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.29 KB, patch)
2011-04-27 09:42 PDT, Satish Sampath
no flags Details | Formatted Diff | Diff
Updated an existing layout test to check for padding and rtl cases. Also fixed the code to handle RTL cases properly. (8.35 KB, patch)
2011-04-28 08:27 PDT, Satish Sampath
tonyg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Satish Sampath 2011-04-27 09:01:02 PDT
The bounding box where the mouse cursor turns from an text insert cursor to a pointer is misaligned with the speech input mic icon. Here's one example that illustrates the problem: http://slides.html5rocks.com/#speech-input - the mic icon appears to partially overlap the right padding and for the right half of the mic icon the cursor turns into the text insert cursor. Ideally the button should appear inside and honour the padding of the input field.
Comment 1 Satish Sampath 2011-04-27 09:42:13 PDT
Created attachment 91300 [details]
Patch
Comment 2 Tony Gentilcore 2011-04-28 03:36:16 PDT
Comment on attachment 91300 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        No new tests, existing tests cover this code.

Is it really impossible to add a regression test for this bug? Seems like it would be easy to add a test for an input with padding, and click in particular locations to verify the bounds of the button target.

> Source/WebCore/rendering/RenderTextControlSingleLine.cpp:311
> +            int x = width() - borderRight() - paddingRight() - button->width();

Does this work for RTL? Seems worth adding an rtl input to the click target test suggested above.
Comment 3 Satish Sampath 2011-04-28 08:27:04 PDT
Created attachment 91494 [details]
Updated an existing layout test to check for padding and rtl cases. Also fixed the code to handle RTL cases properly.
Comment 4 Satish Sampath 2011-04-28 09:12:34 PDT
Committed r85190: <http://trac.webkit.org/changeset/85190>
Comment 5 Pavel Feldman 2011-04-28 09:19:05 PDT
Committed r85191: <http://trac.webkit.org/changeset/85191>