Title: [153710] branches/safari-537-branch/Source/WebCore
Revision
153710
Author
[email protected]
Date
2013-08-05 10:27:04 -0700 (Mon, 05 Aug 2013)

Log Message

Merged r153591.  <rdar://problem/14616012>

Modified Paths

Diff

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153709 => 153710)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-05 17:20:48 UTC (rev 153709)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-05 17:27:04 UTC (rev 153710)
@@ -1,3 +1,20 @@
+2013-08-05  Lucas Forschler  <[email protected]>
+
+        Merge r153591
+
+    2013-08-01  Tim Horton  <[email protected]>
+
+            Unavailable plug-in indicator arrow should be inside the rounded rect, not in its own circle
+            https://bugs.webkit.org/show_bug.cgi?id=119400
+            <rdar://problem/14616012>
+
+            Reviewed by Anders Carlsson.
+
+            * rendering/RenderEmbeddedObject.cpp:
+            (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
+            Shift the arrow in by 9px, and make the text's rounded rect include it,
+            instead of having the arrow in a separate circle.
+
 2013-08-05  Filip Pizlo  <[email protected]>
 
         DFG optimizations don't handle neutered arrays properly

Modified: branches/safari-537-branch/Source/WebCore/rendering/RenderEmbeddedObject.cpp (153709 => 153710)


--- branches/safari-537-branch/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2013-08-05 17:20:48 UTC (rev 153709)
+++ branches/safari-537-branch/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2013-08-05 17:27:04 UTC (rev 153710)
@@ -71,7 +71,7 @@
 static const float replacementTextRoundedRectBottomTextPadding = 1;
 static const float replacementTextRoundedRectOpacity = 0.8f;
 static const float replacementTextRoundedRectRadius = 5;
-static const float replacementArrowLeftMargin = 5;
+static const float replacementArrowLeftMargin = -4;
 static const float replacementArrowPadding = 4;
 
 static const Color& replacementTextRoundedRectPressedColor()
@@ -324,17 +324,22 @@
 
     replacementTextRect.setHeight(replacementTextRect.height() + replacementTextRoundedRectBottomTextPadding);
 
-    path.addRoundedRect(replacementTextRect, FloatSize(replacementTextRoundedRectRadius, replacementTextRoundedRectRadius));
+    FloatRect indicatorRect(replacementTextRect);
 
+    // Expand the background rect to include the arrow, if it will be used.
     if (shouldUnavailablePluginMessageBeButton(document(), m_pluginUnavailabilityReason)) {
-        arrowRect = path.boundingRect();
+        arrowRect = indicatorRect;
         arrowRect.setX(ceilf(arrowRect.maxX() + replacementArrowLeftMargin));
         arrowRect.setWidth(arrowRect.height());
+        indicatorRect.unite(arrowRect);
         arrowRect.inflate(-0.5);
-        path.addEllipse(arrowRect);
-        addReplacementArrowPath(path, arrowRect);
     }
 
+    path.addRoundedRect(indicatorRect, FloatSize(replacementTextRoundedRectRadius, replacementTextRoundedRectRadius));
+
+    if (shouldUnavailablePluginMessageBeButton(document(), m_pluginUnavailabilityReason))
+        addReplacementArrowPath(path, arrowRect);
+
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to