diff options
Diffstat (limited to 'WebCore/rendering/RenderTable.cpp')
-rw-r--r-- | WebCore/rendering/RenderTable.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp index d158284..de10680 100644 --- a/WebCore/rendering/RenderTable.cpp +++ b/WebCore/rendering/RenderTable.cpp @@ -268,7 +268,7 @@ void RenderTable::layout() recalcSectionsIfNeeded(); LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); - LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y())); + LayoutStateMaintainer statePusher(view(), this, IntSize(x(), y()), style()->isFlippedBlocksWritingMode()); setLogicalHeight(0); m_overflow.clear(); @@ -1211,10 +1211,12 @@ bool RenderTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu // Check kids first. if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectForPoint(xPos, yPos))) { for (RenderObject* child = lastChild(); child; child = child->previousSibling()) { - if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption) && - child->nodeAtPoint(request, result, xPos, yPos, tx, ty, action)) { - updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty)); - return true; + if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption)) { + IntPoint childPoint = flipForWritingMode(toRenderBox(child), IntPoint(tx, ty), ParentToChildFlippingAdjustment); + if (child->nodeAtPoint(request, result, xPos, yPos, childPoint.x(), childPoint.y(), action)) { + updateHitTestResult(result, IntPoint(xPos - childPoint.x(), yPos - childPoint.y())); + return true; + } } } } @@ -1222,7 +1224,7 @@ bool RenderTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu // Check our bounds next. IntRect boundsRect = IntRect(tx, ty, width(), height()); if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(xPos, yPos))) { - updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty)); + updateHitTestResult(result, flipForWritingMode(IntPoint(xPos - tx, yPos - ty))); if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect)) return true; } |