Take into account the entire run length to get a proper selection.
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2007 17:05:28 +0000 (17:05 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2007 17:05:28 +0000 (17:05 +0000)
        Doesn't seem to affect the Mac build but is a problem for Qt.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20574 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/Font.cpp

index 746333cdf82976ad1b9ca75f7c090bf7f31dc17e..309e2b1ac7c5f776b3608d10e83e59ed68807290 100644 (file)
@@ -1,3 +1,13 @@
+2007-03-29  Adam Treat  <adam@staikos.net>
+
+        Reviewed by David Hyatt, committed by George Staikos.
+
+        Take into account the entire run length to get a proper selection.
+        Doesn't seem to affect the Mac build but is a problem for Qt.
+
+        * platform/Font.cpp:
+        (WebCore::WidthIterator::WidthIterator):
+
 2007-03-29  David Hyatt  <hyatt@apple.com>
 
         Fix for <rdar://problem/4545060>, technorati and arstechnica fail because of getComputedStyle not
index 62878d3ef789ed666bfbc0b315fb51246c3a202c..ad047907626d75cbaecb75d4c26e3d2902e78443 100644 (file)
@@ -101,7 +101,7 @@ WidthIterator::WidthIterator(const Font* font, const TextRun& run, const TextSty
         m_padPerSpace = 0;
     else {
         float numSpaces = 0;
-        for (int i = run.from(); i < m_end; i++)
+        for (int i = 0; i < run.length(); i++)
             if (Font::treatAsSpace(m_run[i]))
                 numSpaces++;