Summary: | incorrect selection with absolutely positioned div. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ojan Vafai <ojan> | ||||||
Component: | HTML Editing | Assignee: | Ryosuke Niwa <rniwa> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cshu, darin, enrica, eric, hyatt, kenneth, mitz, rniwa, simon.fraser, tonikitoo | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
The problem is that RenderBlock::positionForPoint assumes that the lastChildBox is not positioned. if (lastChildBox() && contentsY > lastChildBox()->y()) { for (RenderBox* childBox = lastChildBox(); childBox; childBox = childBox->previousSiblingBox()) { if (isChildHitTestCandidate(childBox)) return positionForPointRespectingEditingBoundaries(this, childBox, pointInContents); } } else { +mitz since this code was added in http://trac.webkit.org/changeset/42467. Created attachment 107921 [details]
fixes the bug
Comment on attachment 107921 [details]
fixes the bug
Oops, something's wrong with my patch.
> LayoutTests/ChangeLog:9
> + with a absolutely positioned last child. WebKit should place the caret on the left of the first line
I guess it is "an absolutely"
Comment on attachment 107921 [details]
fixes the bug
Nope. My patch is fine. I was commenting out some code to verify my test and had forgotten to rebuild before running the test.
Comment on attachment 107921 [details]
fixes the bug
Nice test and good catch, r=me
(In reply to comment #6) > (From update of attachment 107921 [details]) > Nice test and good catch, r=me Thanks for the review! WIll fix "a absolutely". Committed r95478: <http://trac.webkit.org/changeset/95478> |
Created attachment 56732 [details] test case See the test case.