Title: [219927] branches/safari-604-branch/Source/WebCore
Revision
219927
Author
[email protected]
Date
2017-07-26 02:52:00 -0700 (Wed, 26 Jul 2017)

Log Message

Cherry-pick r219761. rdar://problem/33523829

Modified Paths

Diff

Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (219926 => 219927)


--- branches/safari-604-branch/Source/WebCore/ChangeLog	2017-07-26 09:51:57 UTC (rev 219926)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog	2017-07-26 09:52:00 UTC (rev 219927)
@@ -1,5 +1,21 @@
 2017-07-26  Jason Marcell  <[email protected]>
 
+        Cherry-pick r219761. rdar://problem/33523829
+
+    2017-07-22  Timothy Horton  <[email protected]>
+
+            Drag and Drop preview image for Twitter link is the wrong shape
+            ​https://bugs.webkit.org/show_bug.cgi?id=174731
+            <rdar://problem/33335616>
+
+            * dom/Range.cpp:
+            (WebCore::Range::absoluteRectsForRangeInText):
+            * page/TextIndicator.cpp:
+            (WebCore::initializeIndicator):
+            Apply some post-landing review feedback for r219756.
+
+2017-07-26  Jason Marcell  <[email protected]>
+
         Cherry-pick r219756. rdar://problem/33523829
 
     2017-07-21  Timothy Horton  <[email protected]>

Modified: branches/safari-604-branch/Source/WebCore/dom/Range.cpp (219926 => 219927)


--- branches/safari-604-branch/Source/WebCore/dom/Range.cpp	2017-07-26 09:51:57 UTC (rev 219926)
+++ branches/safari-604-branch/Source/WebCore/dom/Range.cpp	2017-07-26 09:52:00 UTC (rev 219927)
@@ -1175,6 +1175,7 @@
 
     if (respectClippingForTextRects == RespectClippingForTextRects::Yes) {
         Vector<FloatRect> clippedRects;
+        clippedRects.reserveInitialCapacity(textQuads.size());
 
         auto absoluteClippedOverflowRect = renderText.absoluteClippedOverflowRect();
 
@@ -1181,7 +1182,7 @@
         for (auto& quad : textQuads) {
             auto clippedRect = intersection(quad.boundingBox(), absoluteClippedOverflowRect);
             if (!clippedRect.isEmpty())
-                clippedRects.append(clippedRect);
+                clippedRects.uncheckedAppend(clippedRect);
         }
 
         return clippedRects;
@@ -1190,7 +1191,7 @@
     Vector<FloatRect> floatRects;
     floatRects.reserveInitialCapacity(textQuads.size());
     for (auto& quad : textQuads)
-        floatRects.append(quad.boundingBox());
+        floatRects.uncheckedAppend(quad.boundingBox());
     return floatRects;
 }
 

Modified: branches/safari-604-branch/Source/WebCore/page/TextIndicator.cpp (219926 => 219927)


--- branches/safari-604-branch/Source/WebCore/page/TextIndicator.cpp	2017-07-26 09:51:57 UTC (rev 219926)
+++ branches/safari-604-branch/Source/WebCore/page/TextIndicator.cpp	2017-07-26 09:52:00 UTC (rev 219927)
@@ -314,8 +314,9 @@
         Vector<IntRect> absoluteTextRects;
         range.absoluteTextRects(absoluteTextRects, textRectHeight == FrameSelection::TextRectangleHeight::SelectionHeight, nullptr, Range::RespectClippingForTextRects::Yes);
 
+        textRects.reserveInitialCapacity(absoluteTextRects.size());
         for (auto& rect : absoluteTextRects)
-            textRects.append(rect);
+            textRects.uncheckedAppend(rect);
     }
 
     if (textRects.isEmpty())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to