Title: [124340] trunk
Revision
124340
Author
[email protected]
Date
2012-08-01 09:54:53 -0700 (Wed, 01 Aug 2012)

Log Message

Layout Test fast/text/descent-clip-in-scaled-page.html is failing on linux since it was added
https://bugs.webkit.org/show_bug.cgi?id=91386

Reviewed by Tony Chang.

Tools:

Added font mapping from SubpixelPositioningAhem to Ahem on Linux and Android
(used in layout test fast/text/descent-clip-in-scaled-page.html).
Added font mapping from SubpixelPositioning to Times New Roman on Android to match Linux
(used in platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html)

* DumpRenderTree/chromium/android_main_fonts.xml:
* DumpRenderTree/chromium/fonts.conf:

LayoutTests:

The failure was because of the caching of font data. Now use the fake font families which are
only used when subpixel text positioing is enabled. This is the same method used in
platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html.

On Linux and Android, the fake font families will be mapped to Time New Roman and Ahem, respectively.
On other platforms, they will fall back to system default fonts.

* fast/text/descent-clip-in-scaled-page-expected.html:
* fast/text/descent-clip-in-scaled-page.html:
* platform/chromium/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (124339 => 124340)


--- trunk/LayoutTests/ChangeLog	2012-08-01 16:40:15 UTC (rev 124339)
+++ trunk/LayoutTests/ChangeLog	2012-08-01 16:54:53 UTC (rev 124340)
@@ -1,3 +1,21 @@
+2012-08-01  Xianzhu Wang  <[email protected]>
+
+        Layout Test fast/text/descent-clip-in-scaled-page.html is failing on linux since it was added
+        https://bugs.webkit.org/show_bug.cgi?id=91386
+
+        Reviewed by Tony Chang.
+
+        The failure was because of the caching of font data. Now use the fake font families which are
+        only used when subpixel text positioing is enabled. This is the same method used in
+        platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html.
+
+        On Linux and Android, the fake font families will be mapped to Time New Roman and Ahem, respectively.
+        On other platforms, they will fall back to system default fonts.
+
+        * fast/text/descent-clip-in-scaled-page-expected.html:
+        * fast/text/descent-clip-in-scaled-page.html:
+        * platform/chromium/TestExpectations:
+
 2012-08-01  Ryosuke Niwa  <[email protected]>
 
         REGRESSION(r122498): Assertion failure: m_nodeListCounts is sometimes not zero in the Document destructor

Modified: trunk/LayoutTests/fast/text/descent-clip-in-scaled-page-expected.html (124339 => 124340)


--- trunk/LayoutTests/fast/text/descent-clip-in-scaled-page-expected.html	2012-08-01 16:40:15 UTC (rev 124339)
+++ trunk/LayoutTests/fast/text/descent-clip-in-scaled-page-expected.html	2012-08-01 16:54:53 UTC (rev 124340)
@@ -2,9 +2,12 @@
 <html>
 <head>
 <style>
+    body {
+        font-family: SubpixelPositioning;
+    }
     div {
-        font-family: ahem;
-        font-size: 16px;
+        font-family: SubpixelPositioningAhem;
+        border: solid thin blue;
     }
 </style>
 <script>
@@ -19,6 +22,12 @@
     If success, the text in the "overflow: hidden" div (the test case) should be displayed
     the same as in a normal div (the ref html).
     'p' is the character in ahem font with only the descent part.
-    <div>&nbsp;pppp&nbsp;</div>
+    <br><br>
+    <div style="font-size: 13px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 14px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 15px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 16px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 17px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 18px">&nbsp;pppp&nbsp;</div>
 </body>
 </html>

Modified: trunk/LayoutTests/fast/text/descent-clip-in-scaled-page.html (124339 => 124340)


--- trunk/LayoutTests/fast/text/descent-clip-in-scaled-page.html	2012-08-01 16:40:15 UTC (rev 124339)
+++ trunk/LayoutTests/fast/text/descent-clip-in-scaled-page.html	2012-08-01 16:54:53 UTC (rev 124340)
@@ -2,10 +2,19 @@
 <html>
 <head>
 <style>
+    /* Use a fake font family for all of the text that we draw.
+       The setTextSubpixelPositioning() call changes a global text style
+       setting.  It gets reset after we're dumped, but if we run first, our
+       style would be cached and would affect other tests, and if we run after
+       another test, we'd use its cached style and subpixel positioning won't be
+       enabled. */
+    body {
+        font-family: SubpixelPositioning;
+    }
     div {
-        font-family: ahem;
-        font-size: 16px;
+        font-family: SubpixelPositioningAhem;
         overflow: hidden; /* the only difference between the test the the ref html */
+        border: solid thin blue;
     }
 </style>
 <script>
@@ -20,6 +29,12 @@
     If success, the text in the "overflow: hidden" div (the test case) should be displayed
     the same as in a normal div (the ref html).
     'p' is the character in ahem font with only the descent part.
-    <div>&nbsp;pppp&nbsp;</div>
+    <br><br>
+    <div style="font-size: 13px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 14px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 15px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 16px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 17px">&nbsp;pppp&nbsp;</div>
+    <div style="font-size: 18px">&nbsp;pppp&nbsp;</div>
 </body>
 </html>

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (124339 => 124340)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-08-01 16:40:15 UTC (rev 124339)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-08-01 16:54:53 UTC (rev 124340)
@@ -3456,9 +3456,6 @@
 // Fails on Mac 10.7
 BUGWK91255 LION : fast/multicol/table-vertical-align.html = TEXT
 
-// Fails since creation in 122651
-BUGWK91386 LINUX : fast/text/descent-clip-in-scaled-page.html = IMAGE
-
 // Fails since creation in 122663
 BUGWK91372 WIN : css2.1/20110323/vertical-align-boxes-001.htm = IMAGE
 

Modified: trunk/Tools/ChangeLog (124339 => 124340)


--- trunk/Tools/ChangeLog	2012-08-01 16:40:15 UTC (rev 124339)
+++ trunk/Tools/ChangeLog	2012-08-01 16:54:53 UTC (rev 124340)
@@ -1,3 +1,18 @@
+2012-08-01  Xianzhu Wang  <[email protected]>
+
+        Layout Test fast/text/descent-clip-in-scaled-page.html is failing on linux since it was added
+        https://bugs.webkit.org/show_bug.cgi?id=91386
+
+        Reviewed by Tony Chang.
+
+        Added font mapping from SubpixelPositioningAhem to Ahem on Linux and Android
+        (used in layout test fast/text/descent-clip-in-scaled-page.html).
+        Added font mapping from SubpixelPositioning to Times New Roman on Android to match Linux
+        (used in platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html)
+
+        * DumpRenderTree/chromium/android_main_fonts.xml:
+        * DumpRenderTree/chromium/fonts.conf:
+
 2012-08-01  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r124325.

Modified: trunk/Tools/DumpRenderTree/chromium/android_main_fonts.xml (124339 => 124340)


--- trunk/Tools/DumpRenderTree/chromium/android_main_fonts.xml	2012-08-01 16:40:15 UTC (rev 124339)
+++ trunk/Tools/DumpRenderTree/chromium/android_main_fonts.xml	2012-08-01 16:54:53 UTC (rev 124340)
@@ -23,6 +23,8 @@
             <name>Times</name>
             <name>Times New Roman</name>
             <name>Monaco</name>
+            <!-- Match chromium-linux. See comments of SubpixelPositioning in fonts.conf -->
+            <name>SubpixelPositioning</name>
         </nameset>
         <fileset>
             <file>Times_New_Roman.ttf</file>
@@ -107,10 +109,12 @@
     <family>
         <nameset>
             <name>Ahem</name>
+            <!-- Match chromium-linux. See comments of SubpixelPositioning in fonts.conf -->
+            <name>SubpixelPositioningAhem</name>
         </nameset>
         <fileset>
             <file>AHEM____.TTF</file>
         </fileset>
     </family>
 
-</familyset>
\ No newline at end of file
+</familyset>

Modified: trunk/Tools/DumpRenderTree/chromium/fonts.conf (124339 => 124340)


--- trunk/Tools/DumpRenderTree/chromium/fonts.conf	2012-08-01 16:40:15 UTC (rev 124339)
+++ trunk/Tools/DumpRenderTree/chromium/fonts.conf	2012-08-01 16:54:53 UTC (rev 124340)
@@ -239,4 +239,14 @@
     </edit>
   </match>
 
+  <match target="pattern">
+    <!-- See comments above -->
+    <test name="family" compare="eq">
+      <string>SubpixelPositioningAhem</string>
+    </test>
+    <edit name="family" mode="assign">
+      <string>ahem</string>
+    </edit>
+  </match>
+
 </fontconfig>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to