[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:55:52 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e57dafc25d9ff5f904dae2fec22859343cf82777
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 25 16:05:03 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=48246
    
    Reviewed by Sam Weinig.
    
    Make selectionRect() on InlineTextBox give the right value for a vertical line.  Selection is still too broken
    to test anything though.
    
    * rendering/InlineTextBox.cpp:
    (WebCore::InlineTextBox::selectionRect):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70456 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7a36ee3..f0f461b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-25  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48246
+
+        Make selectionRect() on InlineTextBox give the right value for a vertical line.  Selection is still too broken
+        to test anything though.
+
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::selectionRect):
+
 2010-10-25  Benjamin Poulain  <benjamin.poulain at nokia.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp
index f228ea8..9c89d58 100644
--- a/WebCore/rendering/InlineTextBox.cpp
+++ b/WebCore/rendering/InlineTextBox.cpp
@@ -154,12 +154,19 @@ IntRect InlineTextBox::selectionRect(int tx, int ty, int startPos, int endPos)
     }
 
     IntRect r = enclosingIntRect(f.selectionRectForText(TextRun(characters, len, textObj->allowTabs(), textPos(), m_toAdd, !isLeftToRightDirection(), m_dirOverride),
-                                                        IntPoint(tx + m_x, ty + selTop), selHeight, sPos, ePos));
-    if (r.x() > tx + m_x + m_logicalWidth)
-        r.setWidth(0);
-    else if (r.right() - 1 > tx + m_x + m_logicalWidth)
-        r.setWidth(tx + m_x + m_logicalWidth - r.x());
-    return r;
+                                                        IntPoint(), selHeight, sPos, ePos));
+                                                        
+    int logicalWidth = r.width();
+    if (r.x() > m_logicalWidth)
+        logicalWidth  = 0;
+    else if (r.right() > m_logicalWidth)
+        logicalWidth = m_logicalWidth - r.x();
+    
+    IntPoint topPoint = m_isVertical ? IntPoint(tx + selTop, ty + m_y + r.x()) : IntPoint(tx + m_x + r.x(), ty + selTop);
+    int width = m_isVertical ? selHeight : logicalWidth;
+    int height = m_isVertical ? logicalWidth : selHeight;
+    
+    return IntRect(topPoint, IntSize(width, height));
 }
 
 void InlineTextBox::deleteLine(RenderArena* arena)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list