Bug 115675 - Hittest finds the truncated text instead of the floating input, when the input is clicked.
Summary: Hittest finds the truncated text instead of the floating input, when the inpu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-05-06 14:11 PDT by zalan
Modified: 2013-06-24 00:32 PDT (History)
5 users (show)

See Also:


Attachments
reduced test case (678 bytes, text/html)
2013-05-06 14:12 PDT, zalan
no flags Details
Patch (12.78 KB, patch)
2013-05-09 04:40 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (12.85 KB, patch)
2013-05-11 07:18 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (15.10 KB, patch)
2013-05-19 08:41 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (13.14 KB, patch)
2013-06-23 23:51 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2013-05-06 14:11:42 PDT
<style>
  div {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }

  input {
    float: right;
  }
</style>

<div><input type='text'>long long long long long text</div>

1, input is clicked.
2, text gets the hit test, even though it is truncated right before the floating input box.

attached test case
Comment 1 zalan 2013-05-06 14:12:10 PDT
Created attachment 200808 [details]
reduced test case
Comment 2 zalan 2013-05-06 14:19:39 PDT
1. We need to use the m_truncation at InlineTextBox::nodeAtPoint() to make sure truncated text is ignored while hittesting.
2, We need to teach the parent RootInlineBox to be smarter at hittesting (InlineFlowBox::nodeAtPoint()) to figure out that the truncated part.
Comment 3 zalan 2013-05-06 15:11:46 PDT
[12:57am] dhyatt: if i were writing this feature from scratch i would probably have let the child elements overflow
[12:57am] dhyatt: but shrink the root line
[12:57am] dhyatt: might be some reason why i didn't do that though
[12:58am] dhyatt: easiest fix at this point is to just hack it then prob
[12:58am] dhyatt: painting must just be hacking it
[12:58am] dhyatt: so hit testing can too
Comment 4 zalan 2013-05-06 15:12:21 PDT
<rdar://problem/13008605>
Comment 5 zalan 2013-05-09 04:40:43 PDT
Created attachment 201179 [details]
Patch
Comment 6 zalan 2013-05-09 12:57:27 PDT
will be moving layout test to /fast/css
Comment 7 zalan 2013-05-11 07:18:01 PDT
Created attachment 201456 [details]
Patch
Comment 8 Dave Hyatt 2013-05-16 08:55:58 PDT
Comment on attachment 201456 [details]
Patch

Make a vertical-rl test too.
Comment 9 zalan 2013-05-19 08:41:37 PDT
Created attachment 202237 [details]
Patch
Comment 10 zalan 2013-05-19 08:48:14 PDT
(In reply to comment #8)
> (From update of attachment 201456 [details])
> Make a vertical-rl test too.
added (best effort). Vertical text truncate bug is tracked here: bug #116413
Comment 11 zalan 2013-06-23 23:51:38 PDT
Created attachment 205277 [details]
Patch
Comment 12 WebKit Commit Bot 2013-06-24 00:32:51 PDT
Comment on attachment 205277 [details]
Patch

Clearing flags on attachment: 205277

Committed r151894: <http://trac.webkit.org/changeset/151894>
Comment 13 WebKit Commit Bot 2013-06-24 00:32:54 PDT
All reviewed patches have been landed.  Closing bug.