Title: [178494] branches/safari-600.5-branch/Source/WebCore
Revision
178494
Author
[email protected]
Date
2015-01-15 00:51:26 -0800 (Thu, 15 Jan 2015)

Log Message

Merged r178304. rdar://problem/19447156

Modified Paths

Diff

Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (178493 => 178494)


--- branches/safari-600.5-branch/Source/WebCore/ChangeLog	2015-01-15 08:48:05 UTC (rev 178493)
+++ branches/safari-600.5-branch/Source/WebCore/ChangeLog	2015-01-15 08:51:26 UTC (rev 178494)
@@ -1,5 +1,28 @@
 2015-01-15  Babak Shafiei  <[email protected]>
 
+        Merge r178304. rdar://problem/19447156
+
+    2015-01-12  Timothy Horton  <[email protected]>
+
+            REGRESSION (r177656): Text in find-in-page yellow bouncy rectangle is not crisp
+            https://bugs.webkit.org/show_bug.cgi?id=140373
+            <rdar://problem/19447156>
+
+            Reviewed by Simon Fraser.
+
+            * page/mac/TextIndicatorWindow.mm:
+            (WebCore::TextIndicatorWindow::setTextIndicator):
+            Expand the window margin to the nearest integer.
+            The window was already being pixel-snapped, but then we'd translate by
+            the non-integral margin when building up the layer tree.
+            It's OK to do this on 2x because it's fine to have the margin be bigger
+            than needed.
+
+            * platform/spi/cg/CoreGraphicsSPI.h:
+            Add a CGCeiling to match CGFloor.
+
+2015-01-15  Babak Shafiei  <[email protected]>
+
         Merge r178290. rdar://problem/19441243
 
     2015-01-12  Timothy Horton  <[email protected]>

Modified: branches/safari-600.5-branch/Source/WebCore/page/mac/TextIndicatorWindow.mm (178493 => 178494)


--- branches/safari-600.5-branch/Source/WebCore/page/mac/TextIndicatorWindow.mm	2015-01-15 08:48:05 UTC (rev 178493)
+++ branches/safari-600.5-branch/Source/WebCore/page/mac/TextIndicatorWindow.mm	2015-01-15 08:51:26 UTC (rev 178494)
@@ -60,6 +60,18 @@
 const CGFloat rimShadowBlurRadius = 1;
 #endif
 
+#ifdef CGFLOAT_IS_DOUBLE
+#define CGRound(value) round((value))
+#define CGFloor(value) floor((value))
+#define CGCeiling(value) ceil((value))
+#define CGFAbs(value) fabs((value))
+#else
+#define CGRound(value) roundf((value))
+#define CGFloor(value) floorf((value))
+#define CGCeiling(value) ceilf((value))
+#define CGFAbs(value) fabsf((value))
+#endif
+
 NSString *textLayerKey = @"TextLayer";
 NSString *dropShadowLayerKey = @"DropShadowLayer";
 NSString *rimShadowLayerKey = @"RimShadowLayer";
@@ -389,6 +401,9 @@
         verticalMargin = std::max(verticalMargin, textBoundingRectInScreenCoordinates.size.height * (midBounceScale - 1) + verticalMargin);
     }
 
+    horizontalMargin = CGCeiling(horizontalMargin);
+    verticalMargin = CGCeiling(verticalMargin);
+
     CGRect contentRect = CGRectInset(textBoundingRectInScreenCoordinates, -horizontalMargin, -verticalMargin);
     NSRect windowContentRect = [NSWindow contentRectForFrameRect:NSIntegralRect(NSRectFromCGRect(contentRect)) styleMask:NSBorderlessWindowMask];
     m_textIndicatorWindow = adoptNS([[NSWindow alloc] initWithContentRect:windowContentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to