Cannot click an element at 2nd line or more inside inline-block in vertical writing...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Dec 2012 00:02:18 +0000 (00:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Dec 2012 00:02:18 +0000 (00:02 +0000)
commitdab24dbe10ee8f4c6b454594d794e86340cde0cb
tree2718825f90cd20cf3638d4e120dfb281a4402f23
parent1a77cf268d9636f9bf13b99894888b54b5f52f44
Cannot click an element at 2nd line or more inside inline-block in vertical writing mode.
https://bugs.webkit.org/show_bug.cgi?id=104775

Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2012-12-18
Reviewed by Dean Jackson.

Source/WebCore:

If the parent of an inline box changes writing mode, then the inline box must flip incoming hit point coordinates.
Otherwise, the coordinate will be misunderstood because the box has a different origin from its parent.
If the InlineBox doesn't flip its offset, its children will use the wrong offset
because they don't know their grandparent changed writing modes.
InlineBox::nodeAtPoint should flip accumulatedOffset like InlineBox::paint().

Test: fast/writing-mode/vertical-inline-block-hittest.html

* rendering/InlineBox.cpp:
(WebCore::InlineBox::nodeAtPoint):

LayoutTests:

Test that we can click 2nd line inside inline-block in vertical writing mode.

* fast/writing-mode/vertical-inline-block-hittest-expected.txt: Added.
* fast/writing-mode/vertical-inline-block-hittest.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/writing-mode/vertical-inline-block-hittest-expected.txt [new file with mode: 0644]
LayoutTests/fast/writing-mode/vertical-inline-block-hittest.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineBox.cpp