- Revision
- 185595
- Author
- commit-qu...@webkit.org
- Date
- 2015-06-16 10:58:19 -0700 (Tue, 16 Jun 2015)
Log Message
Incorrect order of arguments in initial-letter property
https://bugs.webkit.org/show_bug.cgi?id=139667
Patch by sylvain-galineau <galin...@adobe.com> on 2015-06-16
Reviewed by Sam Weinig.
Source/WebCore:
The CSS specification swapped the order of the initial-letters numeric values.
The drop cap's height now comes first, followed by its optional vertical position.
See http://www.w3.org/TR/css-inline/#sizing-drop-initials.
No new tests. Existing tests updated.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): swap arguments to reflect new spec order.
LayoutTests:
Update initial-letter tests to reflect the value's new ordering, per CSS Inline Layout module.
* fast/css-generated-content/initial-letter-border-padding.html:
* fast/css-generated-content/initial-letter-clearance.html:
* fast/css-generated-content/initial-letter-descender.html:
* fast/css-generated-content/initial-letter-raised.html:
* fast/css-generated-content/initial-letter-sunken.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (185594 => 185595)
--- trunk/LayoutTests/ChangeLog 2015-06-16 17:48:47 UTC (rev 185594)
+++ trunk/LayoutTests/ChangeLog 2015-06-16 17:58:19 UTC (rev 185595)
@@ -1,3 +1,18 @@
+2015-06-16 sylvain-galineau <galin...@adobe.com>
+
+ Incorrect order of arguments in initial-letter property
+ https://bugs.webkit.org/show_bug.cgi?id=139667
+
+ Reviewed by Sam Weinig.
+
+ Update initial-letter tests to reflect the value's new ordering, per CSS Inline Layout module.
+
+ * fast/css-generated-content/initial-letter-border-padding.html:
+ * fast/css-generated-content/initial-letter-clearance.html:
+ * fast/css-generated-content/initial-letter-descender.html:
+ * fast/css-generated-content/initial-letter-raised.html:
+ * fast/css-generated-content/initial-letter-sunken.html:
+
2015-06-16 Youenn Fablet <youenn.fab...@crf.canon.fr> and Xabier Rodriguez Calvar <calva...@igalia.com>
[Streams API] Calling controller.error() should trigger storing an undefined error
Modified: trunk/LayoutTests/fast/css-generated-content/initial-letter-border-padding.html (185594 => 185595)
--- trunk/LayoutTests/fast/css-generated-content/initial-letter-border-padding.html 2015-06-16 17:48:47 UTC (rev 185594)
+++ trunk/LayoutTests/fast/css-generated-content/initial-letter-border-padding.html 2015-06-16 17:58:19 UTC (rev 185595)
@@ -2,7 +2,7 @@
<head>
<style>
div { width:400px; margin:1em }
-div::first-letter { color:red; border:2px solid red; padding:1px; -webkit-initial-letter: 2 3; margin-right:2px; margin-left:2px }
+div::first-letter { color:red; border:2px solid red; padding:1px; -webkit-initial-letter: 3 2; margin-right:2px; margin-left:2px }
span.rtl { direction:rtl; display:block }
</style>
</head>
Modified: trunk/LayoutTests/fast/css-generated-content/initial-letter-clearance.html (185594 => 185595)
--- trunk/LayoutTests/fast/css-generated-content/initial-letter-clearance.html 2015-06-16 17:48:47 UTC (rev 185594)
+++ trunk/LayoutTests/fast/css-generated-content/initial-letter-clearance.html 2015-06-16 17:58:19 UTC (rev 185595)
@@ -2,7 +2,7 @@
<head>
<style>
div { width:400px; margin:1em }
-div::first-letter { font-family: Zapfino; -webkit-initial-letter: 2 4; margin-right:2px; margin-left:2; }
+div::first-letter { font-family: Zapfino; -webkit-initial-letter: 4 2; margin-right:2px; margin-left:2; }
</style>
</head>
Modified: trunk/LayoutTests/fast/css-generated-content/initial-letter-descender.html (185594 => 185595)
--- trunk/LayoutTests/fast/css-generated-content/initial-letter-descender.html 2015-06-16 17:48:47 UTC (rev 185594)
+++ trunk/LayoutTests/fast/css-generated-content/initial-letter-descender.html 2015-06-16 17:58:19 UTC (rev 185595)
@@ -2,7 +2,7 @@
<head>
<style>
div { width:400px; margin:1em }
-div::first-letter { font-family: Zapfino; -webkit-initial-letter: 2 4; margin-right:2px; margin-left:2 }
+div::first-letter { font-family: Zapfino; -webkit-initial-letter: 4 2; margin-right:2px; margin-left:2 }
</style>
</head>
Modified: trunk/LayoutTests/fast/css-generated-content/initial-letter-raised.html (185594 => 185595)
--- trunk/LayoutTests/fast/css-generated-content/initial-letter-raised.html 2015-06-16 17:48:47 UTC (rev 185594)
+++ trunk/LayoutTests/fast/css-generated-content/initial-letter-raised.html 2015-06-16 17:58:19 UTC (rev 185595)
@@ -2,7 +2,7 @@
<head>
<style>
div { width:400px; margin:1em }
-div::first-letter { -webkit-initial-letter: 2 3; margin-right:2px; margin-left:2px }
+div::first-letter { -webkit-initial-letter: 3 2; margin-right:2px; margin-left:2px }
span.rtl { direction:rtl; display:block }
</style>
</head>
Modified: trunk/LayoutTests/fast/css-generated-content/initial-letter-sunken.html (185594 => 185595)
--- trunk/LayoutTests/fast/css-generated-content/initial-letter-sunken.html 2015-06-16 17:48:47 UTC (rev 185594)
+++ trunk/LayoutTests/fast/css-generated-content/initial-letter-sunken.html 2015-06-16 17:58:19 UTC (rev 185595)
@@ -2,7 +2,7 @@
<head>
<style>
div { width:400px; margin:1em }
-div::first-letter { -webkit-initial-letter: 3 2; margin-right:2px; margin-left:2px }
+div::first-letter { -webkit-initial-letter: 2 3; margin-right:2px; margin-left:2px }
span.rtl { direction:rtl; display:block }
</style>
</head>
Modified: trunk/Source/WebCore/ChangeLog (185594 => 185595)
--- trunk/Source/WebCore/ChangeLog 2015-06-16 17:48:47 UTC (rev 185594)
+++ trunk/Source/WebCore/ChangeLog 2015-06-16 17:58:19 UTC (rev 185595)
@@ -1,3 +1,19 @@
+2015-06-16 sylvain-galineau <galin...@adobe.com>
+
+ Incorrect order of arguments in initial-letter property
+ https://bugs.webkit.org/show_bug.cgi?id=139667
+
+ Reviewed by Sam Weinig.
+
+ The CSS specification swapped the order of the initial-letters numeric values.
+ The drop cap's height now comes first, followed by its optional vertical position.
+ See http://www.w3.org/TR/css-inline/#sizing-drop-initials.
+
+ No new tests. Existing tests updated.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue): swap arguments to reflect new spec order.
+
2015-06-16 Alex Christensen <achristen...@webkit.org>
Remove some unused values.
Modified: trunk/Source/WebCore/css/CSSParser.cpp (185594 => 185595)
--- trunk/Source/WebCore/css/CSSParser.cpp 2015-06-16 17:48:47 UTC (rev 185594)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2015-06-16 17:58:19 UTC (rev 185595)
@@ -2497,17 +2497,17 @@
validPrimitive = validateUnit(valueWithCalculation, FPositiveInteger);
if (!validPrimitive)
return false;
- RefPtr<CSSPrimitiveValue> parsedValue1 = createPrimitiveNumericValue(valueWithCalculation);
- RefPtr<CSSPrimitiveValue> parsedValue2;
+ RefPtr<CSSPrimitiveValue> height = createPrimitiveNumericValue(valueWithCalculation);
+ RefPtr<CSSPrimitiveValue> position;
if (num == 2) {
ValueWithCalculation nextValueWithCalculation(*m_valueList->next());
validPrimitive = validateUnit(nextValueWithCalculation, FPositiveInteger);
if (!validPrimitive)
return false;
- parsedValue2 = createPrimitiveNumericValue(nextValueWithCalculation);
+ position = createPrimitiveNumericValue(nextValueWithCalculation);
} else
- parsedValue2 = parsedValue1;
- addProperty(propId, createPrimitiveValuePair(parsedValue1.release(), parsedValue2.release()), important);
+ position = height;
+ addProperty(propId, createPrimitiveValuePair(position.release(), height.release()), important);
return true;
}
break;