diff options
| author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-08-13 12:21:14 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-13 14:22:53 +0200 |
| commit | 9af68289ed0dc78c82fb7ab67ee7e661159f20b7 (patch) | |
| tree | 801d8d967faa33cb7f2a7b83a618fea0e738c40d | |
| parent | 0a7e9ff70ff2e043d8c4d1c74732450899aa95db (diff) | |
| download | qtwebkit-9af68289ed0dc78c82fb7ab67ee7e661159f20b7.tar.gz | |
[Qt][WK2] Composited and transformed links asserts in tap highlight
https://bugs.webkit.org/show_bug.cgi?id=94345
Reviewed by Jocelyn Turcotte.
Use a mapping that does not assert when hitting transforms. We still skip
transforms that produces non-rectangular areas.
* page/GestureTapHighlighter.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Task-number: QTBUG-32454
Change-Id: I608ed624047dd850c5809cdbbc688ca718add736
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| -rw-r--r-- | Source/WebCore/page/GestureTapHighlighter.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/WebCore/page/GestureTapHighlighter.cpp b/Source/WebCore/page/GestureTapHighlighter.cpp index 6688d1501..74d67af65 100644 --- a/Source/WebCore/page/GestureTapHighlighter.cpp +++ b/Source/WebCore/page/GestureTapHighlighter.cpp @@ -199,8 +199,7 @@ Path absolutePathForRenderer(RenderObject* const o) drawableRects.append(last); // Clip the overflow rects if needed, before the ring path is formed to - // ensure rounded highlight rects. This clipping has the problem with nested - // divs with transforms, which could be resolved by proper Path::intersecting. + // ensure rounded highlight rects. for (int i = drawableRects.size() - 1; i >= 0; --i) { LayoutRect& ringRect = drawableRects.at(i); LayoutPoint ringRectLocation = ringRect.location(); @@ -220,7 +219,12 @@ Path absolutePathForRenderer(RenderObject* const o) currentRenderer->container(layerRenderer, &containerSkipped); if (containerSkipped) continue; - ringRect.move(currentRenderer->offsetFromAncestorContainer(layerRenderer)); + FloatQuad ringQuad = currentRenderer->localToContainerQuad(FloatQuad(ringRect), layerRenderer); + // Ignore quads that are not rectangular, since we can not currently highlight them nicely. + if (ringQuad.isRectilinear()) + ringRect = ringQuad.enclosingBoundingBox(); + else + ringRect = LayoutRect(); currentRenderer = layerRenderer; ASSERT(layerRenderer->isBox()); |
