Title: [113989] trunk/Source/WebCore
Revision
113989
Author
[email protected]
Date
2012-04-12 09:00:09 -0700 (Thu, 12 Apr 2012)

Log Message

font-size:0 text runs has non zero width in case of Windows Safari.
https://bugs.webkit.org/show_bug.cgi?id=83559

Patch by Pravinin D <[email protected]> on 2012-04-12
Reviewed by Dan Bernstein.

Test case already exits.
LayoutTest/fast/text/font-size-zero.html

* platform/graphics/win/SimpleFontDataCGWin.cpp:
(WebCore):
(WebCore::SimpleFontData::platformBoundsForGlyph):
(WebCore::SimpleFontData::platformWidthForGlyph):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (113988 => 113989)


--- trunk/Source/WebCore/ChangeLog	2012-04-12 15:57:19 UTC (rev 113988)
+++ trunk/Source/WebCore/ChangeLog	2012-04-12 16:00:09 UTC (rev 113989)
@@ -1,3 +1,18 @@
+2012-04-12  Pravinin D  <[email protected]>
+
+        font-size:0 text runs has non zero width in case of Windows Safari.
+        https://bugs.webkit.org/show_bug.cgi?id=83559
+
+        Reviewed by Dan Bernstein.
+
+        Test case already exits.
+        LayoutTest/fast/text/font-size-zero.html
+
+        * platform/graphics/win/SimpleFontDataCGWin.cpp:
+        (WebCore):
+        (WebCore::SimpleFontData::platformBoundsForGlyph):
+        (WebCore::SimpleFontData::platformWidthForGlyph):
+
 2012-04-12  Alexei Filippov  <[email protected]>
 
         Web Inspector: Move meta node out of nodes in snapshot serialization.

Modified: trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp (113988 => 113989)


--- trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp	2012-04-12 15:57:19 UTC (rev 113988)
+++ trunk/Source/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp	2012-04-12 16:00:09 UTC (rev 113989)
@@ -29,9 +29,9 @@
 #include "config.h"
 #include "SimpleFontData.h"
 
+#include "FloatRect.h"
 #include "Font.h"
 #include "FontCache.h"
-#include "FloatRect.h"
 #include "FontDescription.h"
 #include "HWndDC.h"
 #include "PlatformString.h"
@@ -46,7 +46,7 @@
 
 namespace WebCore {
 
-using std::max;
+using namespace std;
 
 void SimpleFontData::platformInit()
 {
@@ -103,6 +103,9 @@
 
 FloatRect SimpleFontData::platformBoundsForGlyph(Glyph glyph) const
 {
+    if (!platformData().size())
+        return FloatRect();
+
     if (m_platformData.useGDI())
         return boundsForGDIGlyph(glyph);
 
@@ -119,6 +122,9 @@
 
 float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
 {
+    if (!platformData().size())
+        return 0;
+
     if (m_platformData.useGDI())
         return widthForGDIGlyph(glyph);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to