[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

hyatt at apple.com hyatt at apple.com
Wed Dec 22 14:52:51 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 054b99e4998d894beedafe76f57f3a335b5963dd
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 22 22:36:42 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=48156
    
    Reviewed by Adele Peterson.
    
    Make vertical lines hit test properly and show a vertical i-beam cursor.  Numerous bugs with overflow were discovered while getting this to work,
    so these are in the patch as well.  The broken layout tests are fixed by the overflow bug fixes as well (which just restore the old behavior).
    
    * page/EventHandler.cpp:
    (WebCore::EventHandler::selectCursor):
    * rendering/InlineBox.h:
    (WebCore::InlineBox::width):
    (WebCore::InlineBox::height):
    * rendering/InlineFlowBox.cpp:
    (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
    (WebCore::InlineFlowBox::computeBlockDirectionOverflow):
    (WebCore::InlineFlowBox::nodeAtPoint):
    * rendering/InlineFlowBox.h:
    (WebCore::InlineFlowBox::logicalTopVisibleOverflow):
    (WebCore::InlineFlowBox::logicalBottomVisibleOverflow):
    (WebCore::InlineFlowBox::visibleOverflowRect):
    (WebCore::InlineFlowBox::layoutOverflowRect):
    (WebCore::InlineFlowBox::logicalTopLayoutOverflow):
    (WebCore::InlineFlowBox::logicalBottomLayoutOverflow):
    (WebCore::InlineFlowBox::visualOverflowRect):
    (WebCore::InlineFlowBox::logicalTopVisualOverflow):
    (WebCore::InlineFlowBox::logicalBottomVisualOverflow):
    (WebCore::InlineFlowBox::setBlockDirectionOverflowPositions):
    * rendering/InlineTextBox.cpp:
    (WebCore::InlineTextBox::nodeAtPoint):
    * rendering/RenderBox.cpp:
    (WebCore::RenderBox::blockDirectionOverflow):
    * rendering/RenderBox.h:
    * rendering/RenderLineBoxList.cpp:
    (WebCore::RenderLineBoxList::hitTest):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70356 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 78bba17..e9258e5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,40 @@
+2010-10-22  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Adele Peterson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48156
+
+        Make vertical lines hit test properly and show a vertical i-beam cursor.  Numerous bugs with overflow were discovered while getting this to work,
+        so these are in the patch as well.  The broken layout tests are fixed by the overflow bug fixes as well (which just restore the old behavior).
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::selectCursor):
+        * rendering/InlineBox.h:
+        (WebCore::InlineBox::width):
+        (WebCore::InlineBox::height):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
+        (WebCore::InlineFlowBox::computeBlockDirectionOverflow):
+        (WebCore::InlineFlowBox::nodeAtPoint):
+        * rendering/InlineFlowBox.h:
+        (WebCore::InlineFlowBox::logicalTopVisibleOverflow):
+        (WebCore::InlineFlowBox::logicalBottomVisibleOverflow):
+        (WebCore::InlineFlowBox::visibleOverflowRect):
+        (WebCore::InlineFlowBox::layoutOverflowRect):
+        (WebCore::InlineFlowBox::logicalTopLayoutOverflow):
+        (WebCore::InlineFlowBox::logicalBottomLayoutOverflow):
+        (WebCore::InlineFlowBox::visualOverflowRect):
+        (WebCore::InlineFlowBox::logicalTopVisualOverflow):
+        (WebCore::InlineFlowBox::logicalBottomVisualOverflow):
+        (WebCore::InlineFlowBox::setBlockDirectionOverflowPositions):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::nodeAtPoint):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::blockDirectionOverflow):
+        * rendering/RenderBox.h:
+        * rendering/RenderLineBoxList.cpp:
+        (WebCore::RenderLineBoxList::hitTest):
+
 2010-10-22  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Anders Carlsson.
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index d3709fb..92504d3 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -1056,15 +1056,18 @@ static bool nodeIsNotBeingEdited(Node* node, Frame* frame)
 
 Cursor EventHandler::selectCursor(const MouseEventWithHitTestResults& event, Scrollbar* scrollbar)
 {
-    // During selection, use an I-beam no matter what we're over.
-    // If you're capturing mouse events for a particular node, don't treat this as a selection.
-    if (m_mousePressed && m_mouseDownMayStartSelect && m_frame->selection()->isCaretOrRange() && !m_capturingMouseEventsNode)
-        return iBeamCursor();
-
     Node* node = event.targetNode();
     RenderObject* renderer = node ? node->renderer() : 0;
     RenderStyle* style = renderer ? renderer->style() : 0;
 
+    bool horizontalText = !style || style->isHorizontalWritingMode();
+    const Cursor& iBeam = horizontalText ? iBeamCursor() : verticalTextCursor();
+
+    // During selection, use an I-beam no matter what we're over.
+    // If you're capturing mouse events for a particular node, don't treat this as a selection.
+    if (m_mousePressed && m_mouseDownMayStartSelect && m_frame->selection()->isCaretOrRange() && !m_capturingMouseEventsNode)
+        return iBeam;
+
     if (renderer && renderer->isFrameSet()) {
         RenderFrameSet* frameSetRenderer = toRenderFrameSet(renderer);
         if (frameSetRenderer->canResizeRow(event.localPoint()))
@@ -1133,7 +1136,7 @@ Cursor EventHandler::selectCursor(const MouseEventWithHitTestResults& event, Scr
             }
         }
         if ((editable || (renderer && renderer->isText() && node->canStartSelection())) && !inResizer && !scrollbar)
-            return iBeamCursor();
+            return iBeam;
         return pointerCursor();
     }
     case CURSOR_CROSS:
diff --git a/WebCore/rendering/InlineBox.h b/WebCore/rendering/InlineBox.h
index bed2dc7..2c31579 100644
--- a/WebCore/rendering/InlineBox.h
+++ b/WebCore/rendering/InlineBox.h
@@ -216,6 +216,9 @@ public:
     void setY(int y) { m_y = y; }
     int y() const { return m_y; }
 
+    int width() const { return m_isVertical ? logicalHeight() : logicalWidth(); }
+    int height() const { return m_isVertical ? logicalWidth() : logicalHeight(); }
+
     // The logicalLeft position is the left edge of the line box in a horizontal line and the top edge in a vertical line.
     int logicalLeft() const { return !m_isVertical ? m_x : m_y; }
     int logicalRight() const { return logicalLeft() + logicalWidth(); }
diff --git a/WebCore/rendering/InlineFlowBox.cpp b/WebCore/rendering/InlineFlowBox.cpp
index 9aca3e1..a051a37 100644
--- a/WebCore/rendering/InlineFlowBox.cpp
+++ b/WebCore/rendering/InlineFlowBox.cpp
@@ -299,8 +299,8 @@ int InlineFlowBox::placeBoxesInInlineDirection(int logicalLeft, bool& needsWordS
             int textShadowLogicalLeft;
             int textShadowLogicalRight;
             rt->style(m_firstLine)->getTextShadowInlineDirectionExtent(textShadowLogicalLeft, textShadowLogicalRight);
-            childOverflowLogicalLeft = min(childOverflowLogicalLeft, textShadowLogicalLeft);
-            childOverflowLogicalRight = max(childOverflowLogicalRight, textShadowLogicalRight);
+            childOverflowLogicalLeft = min(childOverflowLogicalLeft, textShadowLogicalLeft + logicalLeftGlyphOverflow);
+            childOverflowLogicalRight = max(childOverflowLogicalRight, textShadowLogicalRight + logicalRightGlyphOverflow);
             logicalLeftVisualOverflow = min(logicalLeft + childOverflowLogicalLeft, logicalLeftVisualOverflow);
             logicalRightVisualOverflow = max(logicalLeft + text->logicalWidth() + childOverflowLogicalRight, logicalRightVisualOverflow);
             
@@ -612,18 +612,18 @@ void InlineFlowBox::computeBlockDirectionOverflow(int lineTop, int lineBottom, b
             int textShadowBottom;
             curr->renderer()->style(m_firstLine)->getTextShadowBlockDirectionExtent(textShadowTop, textShadowBottom);
         
-            int childOverflowTop = min(textShadowTop, topGlyphOverflow);
-            int childOverflowBottom = max(textShadowBottom, bottomGlyphOverflow);
+            int childOverflowTop = min(textShadowTop + topGlyphOverflow, topGlyphOverflow);
+            int childOverflowBottom = max(textShadowBottom + bottomGlyphOverflow, bottomGlyphOverflow);
     
             topVisualOverflow = min(curr->logicalTop() + childOverflowTop, topVisualOverflow);
             bottomVisualOverflow = max(curr->logicalTop() + text->logicalHeight() + childOverflowBottom, bottomVisualOverflow);
         } else  if (curr->renderer()->isRenderInline()) {
             InlineFlowBox* flow = static_cast<InlineFlowBox*>(curr);
             flow->computeBlockDirectionOverflow(lineTop, lineBottom, strictMode, textBoxDataMap);
-            topLayoutOverflow = min(topLayoutOverflow, flow->topLayoutOverflow());
-            bottomLayoutOverflow = max(bottomLayoutOverflow, flow->bottomLayoutOverflow());
-            topVisualOverflow = min(topVisualOverflow, flow->topVisualOverflow());
-            bottomVisualOverflow = max(bottomVisualOverflow, flow->bottomVisualOverflow());
+            topLayoutOverflow = min(topLayoutOverflow, flow->logicalTopLayoutOverflow());
+            bottomLayoutOverflow = max(bottomLayoutOverflow, flow->logicalBottomLayoutOverflow());
+            topVisualOverflow = min(topVisualOverflow, flow->logicalTopVisualOverflow());
+            bottomVisualOverflow = max(bottomVisualOverflow, flow->logicalBottomVisualOverflow());
         } else if (!curr->boxModelObject()->hasSelfPaintingLayer()){
             // Only include overflow from replaced inlines if they do not paint themselves.
             int boxLogicalTop = curr->logicalTop();
@@ -633,9 +633,14 @@ void InlineFlowBox::computeBlockDirectionOverflow(int lineTop, int lineBottom, b
             int childBottomVisualOverflow;
             
             RenderBox* box = toRenderBox(curr->renderer());
-            box->blockDirectionOverflow(isVertical(), isFlippedLine, childTopLayoutOverflow, childBottomLayoutOverflow,
+            box->blockDirectionOverflow(isVertical(), childTopLayoutOverflow, childBottomLayoutOverflow,
                                         childTopVisualOverflow, childBottomVisualOverflow);
             
+            if (box->hasOverflowClip()) {
+                childTopLayoutOverflow = 0;
+                childBottomLayoutOverflow = curr->logicalHeight();
+            }
+
             topLayoutOverflow = min(boxLogicalTop + childTopLayoutOverflow, topLayoutOverflow);
             bottomLayoutOverflow = max(boxLogicalTop + childBottomLayoutOverflow, bottomLayoutOverflow);
             topVisualOverflow = min(boxLogicalTop + childTopVisualOverflow, topVisualOverflow);
@@ -662,7 +667,7 @@ bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
     }
 
     // Now check ourselves.
-    IntRect rect(tx + m_x, ty + m_y, m_logicalWidth, logicalHeight());
+    IntRect rect(tx + m_x, ty + m_y, width(), height());
     if (visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) {
         renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty)); // Don't add in m_x or m_y here, we want coords in the containing block's space.
         if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect))
diff --git a/WebCore/rendering/InlineFlowBox.h b/WebCore/rendering/InlineFlowBox.h
index 5a779d1..a168f98 100644
--- a/WebCore/rendering/InlineFlowBox.h
+++ b/WebCore/rendering/InlineFlowBox.h
@@ -174,28 +174,39 @@ public:
     void checkConsistency() const;
     void setHasBadChildList();
 
+    // Line visual and layout overflow are in the coordinate space of the block.  This means that - unlike other unprefixed uses of the words
+    // top/right/bottom/left in the code - these aren't purely physical directions.  For horizontal-tb and vertical-lr they will match physical
+    // directions, but for horizontal-bt and vertical-rl, the top/bottom and left/right respectively are inverted when compared to
+    // their physical counterparts.
     int topVisibleOverflow() const { return std::min(topLayoutOverflow(), topVisualOverflow()); }
     int bottomVisibleOverflow() const { return std::max(bottomLayoutOverflow(), bottomVisualOverflow()); }
     int leftVisibleOverflow() const { return std::min(leftLayoutOverflow(), leftVisualOverflow()); }
     int rightVisibleOverflow() const { return std::max(rightLayoutOverflow(), rightVisualOverflow()); }
-    IntRect visibleOverflowRect() const { return m_overflow ? m_overflow->visibleOverflowRect() : IntRect(m_x, m_y, m_logicalWidth, logicalHeight());  }
+    int logicalTopVisibleOverflow() const { return std::min(logicalTopLayoutOverflow(), logicalTopVisualOverflow()); }
+    int logicalBottomVisibleOverflow() const { return std::max(logicalBottomLayoutOverflow(), logicalBottomVisualOverflow()); }
+
+    IntRect visibleOverflowRect() const { return m_overflow ? m_overflow->visibleOverflowRect() : IntRect(m_x, m_y, width(), height());  }
 
     int topLayoutOverflow() const { return m_overflow ? m_overflow->topLayoutOverflow() : m_y; }
     int bottomLayoutOverflow() const { return m_overflow ? m_overflow->bottomLayoutOverflow() : m_y + logicalHeight(); }
     int leftLayoutOverflow() const { return m_overflow ? m_overflow->leftLayoutOverflow() : m_x; }
     int rightLayoutOverflow() const { return m_overflow ? m_overflow->rightLayoutOverflow() : m_x + m_logicalWidth; }
-    IntRect layoutOverflowRect() const { return m_overflow ? m_overflow->layoutOverflowRect() : IntRect(m_x, m_y, m_logicalWidth, logicalHeight()); }
+    IntRect layoutOverflowRect() const { return m_overflow ? m_overflow->layoutOverflowRect() : IntRect(m_x, m_y, width(), height()); }
     int logicalLeftLayoutOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? leftLayoutOverflow() : topLayoutOverflow(); }
     int logicalRightLayoutOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? rightLayoutOverflow() : bottomLayoutOverflow(); }
-    
+    int logicalTopLayoutOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? topVisualOverflow() : leftVisualOverflow(); }
+    int logicalBottomLayoutOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? bottomLayoutOverflow() : rightLayoutOverflow(); }
+
     int topVisualOverflow() const { return m_overflow ? m_overflow->topVisualOverflow() : m_y; }
     int bottomVisualOverflow() const { return m_overflow ? m_overflow->bottomVisualOverflow() : m_y + logicalHeight(); }
     int leftVisualOverflow() const { return m_overflow ? m_overflow->leftVisualOverflow() : m_x; }
     int rightVisualOverflow() const { return m_overflow ? m_overflow->rightVisualOverflow() : m_x + m_logicalWidth; }
-    IntRect visualOverflowRect() const { return m_overflow ? m_overflow->visualOverflowRect() : IntRect(m_x, m_y, m_logicalWidth, logicalHeight()); }
+    IntRect visualOverflowRect() const { return m_overflow ? m_overflow->visualOverflowRect() : IntRect(m_x, m_y, width(), height()); }
     int logicalLeftVisualOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? leftVisualOverflow() : topVisualOverflow(); }
     int logicalRightVisualOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? rightVisualOverflow() : bottomVisualOverflow(); }
-    
+    int logicalTopVisualOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? topVisualOverflow() : leftVisualOverflow(); }
+    int logicalBottomVisualOverflow() const { return renderer()->style()->isHorizontalWritingMode() ? bottomVisualOverflow() : rightVisualOverflow(); }
+
     void setInlineDirectionOverflowPositions(int logicalLeftLayoutOverflow, int logicalRightLayoutOverflow,
                                              int logicalLeftVisualOverflow, int logicalRightVisualOverflow);
     void setBlockDirectionOverflowPositions(int logicalTopLayoutOverflow, int logicalBottomLayoutOverflow,
@@ -266,7 +277,7 @@ inline void InlineFlowBox::setBlockDirectionOverflowPositions(int logicalTopLayo
         m_overflow->setTopLayoutOverflow(logicalTopLayoutOverflow);
         m_overflow->setBottomLayoutOverflow(logicalBottomLayoutOverflow);
         m_overflow->setTopVisualOverflow(logicalTopVisualOverflow); 
-        m_overflow->setBottomVisualOverflow(logicalBottomVisualOverflow);  
+        m_overflow->setBottomVisualOverflow(logicalBottomVisualOverflow);
     } else {
         m_overflow->setLeftLayoutOverflow(logicalTopLayoutOverflow);
         m_overflow->setRightLayoutOverflow(logicalBottomLayoutOverflow);
diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp
index 1d2528f..f228ea8 100644
--- a/WebCore/rendering/InlineTextBox.cpp
+++ b/WebCore/rendering/InlineTextBox.cpp
@@ -302,7 +302,7 @@ bool InlineTextBox::nodeAtPoint(const HitTestRequest&, HitTestResult& result, in
     if (isLineBreak())
         return false;
 
-    IntRect rect(tx + m_x, ty + m_y, m_logicalWidth, logicalHeight());
+    IntRect rect(tx + m_x, ty + m_y, width(), height());
     if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) {
         renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty));
         if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect))
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 7a7c5a6..5a95e0b 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -3172,33 +3172,19 @@ int RenderBox::baselinePosition(bool /*firstLine*/, LineDirectionMode direction,
     return 0;
 }
 
-void RenderBox::blockDirectionOverflow(bool isLineVertical, bool isFlippedLine, int& logicalTopLayoutOverflow, int& logicalBottomLayoutOverflow,
+void RenderBox::blockDirectionOverflow(bool isLineVertical, int& logicalTopLayoutOverflow, int& logicalBottomLayoutOverflow,
                                        int& logicalTopVisualOverflow, int& logicalBottomVisualOverflow)
 {
     if (isLineVertical) {
-        if (isFlippedLine) {
-            logicalTopLayoutOverflow = leftLayoutOverflow();
-            logicalBottomLayoutOverflow = rightLayoutOverflow();
-            logicalTopVisualOverflow = leftVisualOverflow();
-            logicalBottomVisualOverflow = rightVisualOverflow();
-        } else {
-            logicalTopLayoutOverflow = rightLayoutOverflow();
-            logicalBottomLayoutOverflow = leftLayoutOverflow();
-            logicalTopVisualOverflow = rightVisualOverflow();
-            logicalBottomVisualOverflow = leftVisualOverflow();
-        } 
+        logicalTopLayoutOverflow = leftLayoutOverflow();
+        logicalBottomLayoutOverflow = rightLayoutOverflow();
+        logicalTopVisualOverflow = leftVisualOverflow();
+        logicalBottomVisualOverflow = rightVisualOverflow();
     } else {
-        if (isFlippedLine) {
-            logicalTopLayoutOverflow = bottomLayoutOverflow();
-            logicalBottomLayoutOverflow = topLayoutOverflow();
-            logicalTopVisualOverflow = bottomVisualOverflow();
-            logicalBottomVisualOverflow = topVisualOverflow();
-        } else {
-            logicalTopLayoutOverflow = topLayoutOverflow();
-            logicalBottomLayoutOverflow = bottomLayoutOverflow();
-            logicalTopVisualOverflow = topVisualOverflow();
-            logicalBottomVisualOverflow = bottomVisualOverflow();
-        }
+        logicalTopLayoutOverflow = topLayoutOverflow();
+        logicalBottomLayoutOverflow = bottomLayoutOverflow();
+        logicalTopVisualOverflow = topVisualOverflow();
+        logicalBottomVisualOverflow = bottomVisualOverflow();
     }
 }
 
diff --git a/WebCore/rendering/RenderBox.h b/WebCore/rendering/RenderBox.h
index 6b5923b..39ab16b 100644
--- a/WebCore/rendering/RenderBox.h
+++ b/WebCore/rendering/RenderBox.h
@@ -155,7 +155,7 @@ public:
     void addOverflowFromChild(RenderBox* child, const IntSize& delta);
     void clearLayoutOverflow();
 
-    void blockDirectionOverflow(bool isLineVertical, bool isFlippedLine, int& logicalTopLayoutOverflow, int& logicalBottomLayoutOverflow,
+    void blockDirectionOverflow(bool isLineVertical, int& logicalTopLayoutOverflow, int& logicalBottomLayoutOverflow,
                                 int& logicalTopVisualOverflow, int& logicalBottomVisualOverflow);
 
     int contentWidth() const { return clientWidth() - paddingLeft() - paddingRight(); }
diff --git a/WebCore/rendering/RenderLineBoxList.cpp b/WebCore/rendering/RenderLineBoxList.cpp
index 1e58e63..20b6004 100644
--- a/WebCore/rendering/RenderLineBoxList.cpp
+++ b/WebCore/rendering/RenderLineBoxList.cpp
@@ -246,20 +246,26 @@ bool RenderLineBoxList::hitTest(RenderBoxModelObject* renderer, const HitTestReq
     if (!firstLineBox())
         return false;
 
+    bool isVertical = firstLineBox()->isVertical();
+    
+    int logicalPointStart = isVertical ? x - result.leftPadding() : y - result.topPadding();
+    int logicalPointEnd = isVertical ? x + result.rightPadding() : y + result.bottomPadding();
+    int offset = isVertical ? tx : ty;
+
     // We can check the first box and last box and avoid hit testing if we don't
     // contain the point.  This is a quick short-circuit that we can take to avoid walking any lines.
     // FIXME: This check is flawed in the following extremely obscure way:
     // if some line in the middle has a huge overflow, it might actually extend below the last line.
-    if (y - result.topPadding() >= ty + lastLineBox()->root()->bottomVisibleOverflow()
-     || y + result.bottomPadding() < ty + firstLineBox()->root()->topVisibleOverflow())
+    if (logicalPointStart >= offset + lastLineBox()->root()->logicalBottomVisibleOverflow()
+        || logicalPointEnd < offset + firstLineBox()->root()->logicalTopVisibleOverflow())
         return false;
 
     // See if our root lines contain the point.  If so, then we hit test
     // them further.  Note that boxes can easily overlap, so we can't make any assumptions
     // based off positions of our first line box or our last line box.
     for (InlineFlowBox* curr = lastLineBox(); curr; curr = curr->prevLineBox()) {
-        if (y + result.bottomPadding() >= ty + curr->root()->topVisibleOverflow()
-         && y - result.topPadding() < ty + curr->root()->bottomVisibleOverflow()) {
+        if (logicalPointEnd >= offset + curr->root()->logicalTopVisibleOverflow()
+         && logicalPointStart < offset + curr->root()->logicalBottomVisibleOverflow()) {
             bool inside = curr->nodeAtPoint(request, result, x, y, tx, ty);
             if (inside) {
                 renderer->updateHitTestResult(result, IntPoint(x - tx, y - ty));

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list