Reproducible crash with Optimize Legibility extension
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jul 2010 01:06:05 +0000 (01:06 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jul 2010 01:06:05 +0000 (01:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=41585

Reviewed by Sam Weinig.

WebCore:

Test: fast/css/text-rendering-priority.html

Moved the text-rendering CSS property to the “high priority” group, because applying it
during style selection invalidates the font.

* css/CSSPropertyNames.in: Moved text-rendering to the “high priority” section at the top.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyDeclarations): Updated compile-time assertion.

LayoutTests:

* fast/css/text-rendering-priority-expected.txt: Added.
* fast/css/text-rendering-priority.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62513 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/css/text-rendering-priority-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/text-rendering-priority.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/css/CSSPropertyNames.in
WebCore/css/CSSStyleSelector.cpp

index 63d5501888b6e6b93717418db2993aeec70e21c9..33e6dd221b6aca6955e0169629b190e7dd17ebd8 100644 (file)
@@ -1,3 +1,13 @@
+2010-07-05  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Reproducible crash with Optimize Legibility extension
+        https://bugs.webkit.org/show_bug.cgi?id=41585
+
+        * fast/css/text-rendering-priority-expected.txt: Added.
+        * fast/css/text-rendering-priority.html: Added.
+
 2010-07-05  Alice Liu  <alice.liu@apple.com>
 
         Reviewed by Dan Bernstein.
 2010-07-05  Alice Liu  <alice.liu@apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/LayoutTests/fast/css/text-rendering-priority-expected.txt b/LayoutTests/fast/css/text-rendering-priority-expected.txt
new file mode 100644 (file)
index 0000000..229b440
--- /dev/null
@@ -0,0 +1,5 @@
+Test for https://bugs.webkit.org/show_bug.cgi?id=41585 Reproducible crash with Optimize Legibility extension.
+
+No crash means test passed.
+
+
diff --git a/LayoutTests/fast/css/text-rendering-priority.html b/LayoutTests/fast/css/text-rendering-priority.html
new file mode 100644 (file)
index 0000000..122f250
--- /dev/null
@@ -0,0 +1,19 @@
+<head>
+    <script>
+        if (window.layoutTestController)
+            layoutTestController.dumpAsText();
+    </script>
+    <style>
+        #target { text-rendering: optimizelegibility; }
+    </style>
+</head>
+<body>
+    <p>
+        Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=41585">https://bugs.webkit.org/show_bug.cgi?id=41585</a>
+        Reproducible crash with Optimize Legibility extension</i>.
+    </p>
+    <p>
+        No crash means test passed.
+    </p>
+    <div id="target" style="text-indent: 2ex;"></div>
+</body>
index cb585240c6e8a02d6d7f6207885c20a7ab38796e..f521ac3320fee87578a9283ead723fdfc983436a 100644 (file)
@@ -1,3 +1,19 @@
+2010-07-05  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Reproducible crash with Optimize Legibility extension
+        https://bugs.webkit.org/show_bug.cgi?id=41585
+
+        Test: fast/css/text-rendering-priority.html
+
+        Moved the text-rendering CSS property to the “high priority” group, because applying it
+        during style selection invalidates the font.
+
+        * css/CSSPropertyNames.in: Moved text-rendering to the “high priority” section at the top.
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applyDeclarations): Updated compile-time assertion.
+
 2010-07-05  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Sam Weinig.
 2010-07-05  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Sam Weinig.
index 8f2e79e1d800c585f6ce567a996eec0a71575b30..fa9347ffbc2e9915e875e564398d608d3aa357bf 100644 (file)
@@ -19,6 +19,7 @@ font-size
 font-style
 font-variant
 font-weight
 font-style
 font-variant
 font-weight
+text-rendering
 -webkit-text-size-adjust
 zoom
 
 -webkit-text-size-adjust
 zoom
 
@@ -134,7 +135,6 @@ text-overline-color
 text-overline-mode
 text-overline-style
 text-overline-width
 text-overline-mode
 text-overline-style
 text-overline-width
-text-rendering
 text-shadow
 text-transform
 text-underline
 text-shadow
 text-transform
 text-underline
index 7e54b95977a1a372fe686664dc07ee5384e4ecb4..24ecfe5412d5f8d1295906a8edc2618a71010d4d 100644 (file)
@@ -2920,7 +2920,7 @@ void CSSStyleSelector::applyDeclarations(bool isImportant, int startIndex, int e
 
                 if (applyFirst) {
                     COMPILE_ASSERT(firstCSSProperty == CSSPropertyColor, CSS_color_is_first_property);
 
                 if (applyFirst) {
                     COMPILE_ASSERT(firstCSSProperty == CSSPropertyColor, CSS_color_is_first_property);
-                    COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 10, CSS_zoom_is_end_of_first_prop_range);
+                    COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 11, CSS_zoom_is_end_of_first_prop_range);
                     COMPILE_ASSERT(CSSPropertyLineHeight == CSSPropertyZoom + 1, CSS_line_height_is_after_zoom);
 
                     // give special priority to font-xxx, color properties, etc
                     COMPILE_ASSERT(CSSPropertyLineHeight == CSSPropertyZoom + 1, CSS_line_height_is_after_zoom);
 
                     // give special priority to font-xxx, color properties, etc