Title: [153069] branches/safari-537-branch/Source/WebCore
- Revision
- 153069
- Author
- [email protected]
- Date
- 2013-07-23 17:26:01 -0700 (Tue, 23 Jul 2013)
Log Message
Merged r153068. <rdar://problem/14523331>
Modified Paths
Diff
Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153068 => 153069)
--- branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-23 23:46:33 UTC (rev 153068)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog 2013-07-24 00:26:01 UTC (rev 153069)
@@ -1,5 +1,24 @@
2013-07-23 Lucas Forschler <[email protected]>
+ Merge r153068
+
+ 2013-07-23 Tim Horton <[email protected]>
+
+ Pixel-snap the unavailable plugin indicator arrow for maximum sharpness
+ https://bugs.webkit.org/show_bug.cgi?id=119024
+ <rdar://problem/14523331>
+
+ Reviewed by Anders Carlsson.
+
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::addReplacementArrowPath):
+ (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
+ Pixel-snap the unavailable plugin indicator arrow. Snapping directions
+ were chosen by eye/symmetry to look best on 1x and 2x devices at
+ 1x and 2x page scale.
+
+2013-07-23 Lucas Forschler <[email protected]>
+
Merge r153060
2013-07-23 Alexey Proskuryakov <[email protected]>
Modified: branches/safari-537-branch/Source/WebCore/rendering/RenderEmbeddedObject.cpp (153068 => 153069)
--- branches/safari-537-branch/Source/WebCore/rendering/RenderEmbeddedObject.cpp 2013-07-23 23:46:33 UTC (rev 153068)
+++ branches/safari-537-branch/Source/WebCore/rendering/RenderEmbeddedObject.cpp 2013-07-24 00:26:01 UTC (rev 153069)
@@ -279,21 +279,21 @@
static void addReplacementArrowPath(Path& path, const FloatRect& insideRect)
{
- FloatRect insideRectWithMargin(insideRect);
- insideRectWithMargin.inflate(-replacementArrowPadding);
+ FloatRect rect(insideRect);
+ rect.inflate(-replacementArrowPadding);
- FloatPoint center = insideRectWithMargin.center();
- FloatSize arrowEdge(insideRectWithMargin.width() / 2, insideRectWithMargin.height() / 3);
+ FloatPoint center = rect.center();
+ FloatSize arrowEdge(rect.width() / 2, rect.height() / 3);
FloatSize arrowHorizontalEdge(arrowEdge.width(), 0);
FloatSize arrowVerticalEdge(0, arrowEdge.height());
- path.moveTo(FloatPoint(center.x(), insideRectWithMargin.y()));
- path.addLineTo(path.currentPoint() + arrowVerticalEdge);
- path.addLineTo(path.currentPoint() - arrowHorizontalEdge);
- path.addLineTo(path.currentPoint() + arrowVerticalEdge);
- path.addLineTo(path.currentPoint() + arrowHorizontalEdge);
- path.addLineTo(path.currentPoint() + arrowVerticalEdge);
- path.addLineTo(center + arrowHorizontalEdge);
+ path.moveTo(FloatPoint(floorf(center.x()), floorf(rect.y())));
+ path.addLineTo(FloatPoint(floorf(center.x()), floorf(rect.y() + arrowEdge.height())));
+ path.addLineTo(FloatPoint(ceilf(center.x() - arrowEdge.width()), floorf(rect.y() + arrowEdge.height())));
+ path.addLineTo(FloatPoint(ceilf(center.x() - arrowEdge.width()), ceilf(rect.y() + arrowEdge.height() + arrowEdge.height())));
+ path.addLineTo(FloatPoint(floorf(center.x()), ceilf(rect.y() + arrowEdge.height() + arrowEdge.height())));
+ path.addLineTo(FloatPoint(floorf(center.x()), ceilf(rect.y() + arrowEdge.height() + arrowEdge.height() + arrowEdge.height())));
+ path.addLineTo(FloatPoint(ceilf(center.x() + arrowEdge.width()), center.y()));
path.closeSubpath();
}
@@ -328,8 +328,9 @@
if (shouldUnavailablePluginMessageBeButton(document(), m_pluginUnavailabilityReason)) {
arrowRect = path.boundingRect();
- arrowRect.setX(arrowRect.maxX() + replacementArrowLeftMargin);
+ arrowRect.setX(ceilf(arrowRect.maxX() + replacementArrowLeftMargin));
arrowRect.setWidth(arrowRect.height());
+ arrowRect.inflate(-0.5);
path.addEllipse(arrowRect);
addReplacementArrowPath(path, arrowRect);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes