[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
arv at chromium.org
arv at chromium.org
Wed Dec 22 11:11:12 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit ab76aa3324a9ef9971e03425ca21fc3ce4e68ac2
Author: arv at chromium.org <arv at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 14 19:01:53 2010 +0000
2010-07-14 Erik Arvidsson <arv at chromium.org>
Reviewed by Darin Adler.
Implement border-start and border-end properties
https://bugs.webkit.org/show_bug.cgi?id=41782
* fast/css/border-start-end-expected.txt: Added.
* fast/css/border-start-end.html: Added.
* fast/css/script-tests/border-start-end.js: Added.
(test):
(testSame):
(testWidth):
2010-07-14 Erik Arvidsson <arv at chromium.org>
Reviewed by Darin Adler.
Implement border-start and border-end properties
https://bugs.webkit.org/show_bug.cgi?id=41782
Test: fast/css/border-start-end.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::resolveDirectionAwareProperty):
* css/CSSPropertyNames.in:
* inspector/front-end/SourceCSSTokenizer.js:
(WebInspector.SourceCSSTokenizer):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6956b34..92c1e04 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-07-14 Erik Arvidsson <arv at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Implement border-start and border-end properties
+ https://bugs.webkit.org/show_bug.cgi?id=41782
+
+ * fast/css/border-start-end-expected.txt: Added.
+ * fast/css/border-start-end.html: Added.
+ * fast/css/script-tests/border-start-end.js: Added.
+ (test):
+ (testSame):
+ (testWidth):
+
2010-07-13 Eric Seidel <eric at webkit.org>
Reviewed by Adam Barth.
diff --git a/LayoutTests/fast/css/border-start-end-expected.txt b/LayoutTests/fast/css/border-start-end-expected.txt
new file mode 100644
index 0000000..fe7f945
--- /dev/null
+++ b/LayoutTests/fast/css/border-start-end-expected.txt
@@ -0,0 +1,49 @@
+Tests border-start and border-end
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS testWidth("ltr", "-webkit-border-start-width: 10px; -webkit-border-start-style: solid") is 110
+PASS testWidth("ltr", "-webkit-border-end-width: 20px; -webkit-border-end-style: solid") is 120
+PASS testWidth("rtl", "-webkit-border-start-width: 10px; -webkit-border-start-style: solid") is 110
+PASS testWidth("rtl", "-webkit-border-end-width: 20px; -webkit-border-end-style: solid") is 120
+PASS test("ltr", "-webkit-border-start-color: rgb(255, 0, 0)", "border-left-color") is "rgb(255, 0, 0)"
+PASS test("ltr", "border-left-color: rgb(255, 0, 0)", "-webkit-border-start-color") is "rgb(255, 0, 0)"
+PASS test("ltr", "-webkit-border-end-color: rgb(255, 0, 0)", "border-right-color") is "rgb(255, 0, 0)"
+PASS test("ltr", "border-right-color: rgb(255, 0, 0)", "-webkit-border-end-color") is "rgb(255, 0, 0)"
+PASS test("rtl", "-webkit-border-start-color: rgb(255, 0, 0)", "border-right-color") is "rgb(255, 0, 0)"
+PASS test("rtl", "border-right-color: rgb(255, 0, 0)", "-webkit-border-start-color") is "rgb(255, 0, 0)"
+PASS test("rtl", "-webkit-border-end-color: rgb(255, 0, 0)", "border-left-color") is "rgb(255, 0, 0)"
+PASS test("rtl", "border-left-color: rgb(255, 0, 0)", "-webkit-border-end-color") is "rgb(255, 0, 0)"
+PASS test("ltr", "-webkit-border-start-style: dotted", "border-left-style") is "dotted"
+PASS test("ltr", "border-left-style: dotted", "-webkit-border-start-style") is "dotted"
+PASS test("ltr", "-webkit-border-end-style: dotted", "border-right-style") is "dotted"
+PASS test("ltr", "border-right-style: dotted", "-webkit-border-end-style") is "dotted"
+PASS test("rtl", "-webkit-border-start-style: dotted", "border-right-style") is "dotted"
+PASS test("rtl", "border-right-style: dotted", "-webkit-border-start-style") is "dotted"
+PASS test("rtl", "-webkit-border-end-style: dotted", "border-left-style") is "dotted"
+PASS test("rtl", "border-left-style: dotted", "-webkit-border-end-style") is "dotted"
+PASS test("ltr", "-webkit-border-start-width: 10px; -webkit-border-start-style: solid", "border-left-width") is "10px"
+PASS test("ltr", "-webkit-border-end-width: 10px; -webkit-border-end-style: solid", "border-right-width") is "10px"
+PASS test("rtl", "-webkit-border-start-width: 10px; -webkit-border-start-style: solid", "border-right-width") is "10px"
+PASS test("rtl", "-webkit-border-end-width: 10px; -webkit-border-end-style: solid", "border-left-width") is "10px"
+PASS test("ltr", "border-left: 10px solid", "-webkit-border-start-width") is "10px"
+PASS test("ltr", "border-right: 10px solid", "-webkit-border-end-width") is "10px"
+PASS test("rtl", "border-left: 10px solid", "-webkit-border-end-width") is "10px"
+PASS test("rtl", "border-right: 10px solid", "-webkit-border-start-width") is "10px"
+PASS test("ltr", "-webkit-border-start: 10px solid red", "border-left-color") is "rgb(255, 0, 0)"
+PASS test("ltr", "-webkit-border-start: 10px solid red", "border-left-style") is "solid"
+PASS test("ltr", "-webkit-border-start: 10px solid red", "border-left-width") is "10px"
+PASS test("rtl", "-webkit-border-start: 10px solid red", "border-right-color") is "rgb(255, 0, 0)"
+PASS test("rtl", "-webkit-border-start: 10px solid red", "border-right-style") is "solid"
+PASS test("rtl", "-webkit-border-start: 10px solid red", "border-right-width") is "10px"
+PASS test("ltr", "-webkit-border-end: 10px solid red", "border-right-color") is "rgb(255, 0, 0)"
+PASS test("ltr", "-webkit-border-end: 10px solid red", "border-right-style") is "solid"
+PASS test("ltr", "-webkit-border-end: 10px solid red", "border-right-width") is "10px"
+PASS test("rtl", "-webkit-border-end: 10px solid red", "border-left-color") is "rgb(255, 0, 0)"
+PASS test("rtl", "-webkit-border-end: 10px solid red", "border-left-style") is "solid"
+PASS test("rtl", "-webkit-border-end: 10px solid red", "border-left-width") is "10px"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/css/border-start-end.html b/LayoutTests/fast/css/border-start-end.html
new file mode 100644
index 0000000..8e22709
--- /dev/null
+++ b/LayoutTests/fast/css/border-start-end.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/border-start-end.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/css/script-tests/border-start-end.js b/LayoutTests/fast/css/script-tests/border-start-end.js
new file mode 100644
index 0000000..5ebd66e
--- /dev/null
+++ b/LayoutTests/fast/css/script-tests/border-start-end.js
@@ -0,0 +1,74 @@
+description('Tests border-start and border-end');
+
+function test(dir, css, queryProp)
+{
+ var div = document.createElement('div');
+ div.setAttribute('style', css);
+ div.dir = dir;
+ document.body.appendChild(div);
+
+ var result = getComputedStyle(div).getPropertyValue(queryProp);
+ document.body.removeChild(div);
+ return result;
+}
+
+function testSame(dir, prop, altProp, value)
+{
+ shouldBeEqualToString('test("' + dir + '", "' + prop + ': ' + value + '", "' + altProp + '")', value);
+ shouldBeEqualToString('test("' + dir + '", "' + altProp + ': ' + value + '", "' + prop + '")', value);
+}
+
+function testWidth(dir, style)
+{
+ var div = document.createElement('div');
+ div.setAttribute('style', 'width:100px;' + style);
+ div.dir = dir;
+ document.body.appendChild(div);
+
+ var result = div.offsetWidth;
+ document.body.removeChild(div);
+ return result;
+}
+
+shouldBe('testWidth("ltr", "-webkit-border-start-width: 10px; -webkit-border-start-style: solid")', '110');
+shouldBe('testWidth("ltr", "-webkit-border-end-width: 20px; -webkit-border-end-style: solid")', '120');
+shouldBe('testWidth("rtl", "-webkit-border-start-width: 10px; -webkit-border-start-style: solid")', '110');
+shouldBe('testWidth("rtl", "-webkit-border-end-width: 20px; -webkit-border-end-style: solid")', '120');
+
+testSame('ltr', '-webkit-border-start-color', 'border-left-color', 'rgb(255, 0, 0)');
+testSame('ltr', '-webkit-border-end-color', 'border-right-color', 'rgb(255, 0, 0)');
+testSame('rtl', '-webkit-border-start-color', 'border-right-color', 'rgb(255, 0, 0)');
+testSame('rtl', '-webkit-border-end-color', 'border-left-color', 'rgb(255, 0, 0)');
+
+testSame('ltr', '-webkit-border-start-style', 'border-left-style', 'dotted');
+testSame('ltr', '-webkit-border-end-style', 'border-right-style', 'dotted');
+testSame('rtl', '-webkit-border-start-style', 'border-right-style', 'dotted');
+testSame('rtl', '-webkit-border-end-style', 'border-left-style', 'dotted');
+
+shouldBeEqualToString('test("ltr", "-webkit-border-start-width: 10px; -webkit-border-start-style: solid", "border-left-width")', '10px');
+shouldBeEqualToString('test("ltr", "-webkit-border-end-width: 10px; -webkit-border-end-style: solid", "border-right-width")', '10px');
+shouldBeEqualToString('test("rtl", "-webkit-border-start-width: 10px; -webkit-border-start-style: solid", "border-right-width")', '10px');
+shouldBeEqualToString('test("rtl", "-webkit-border-end-width: 10px; -webkit-border-end-style: solid", "border-left-width")', '10px');
+
+shouldBeEqualToString('test("ltr", "border-left: 10px solid", "-webkit-border-start-width")', '10px');
+shouldBeEqualToString('test("ltr", "border-right: 10px solid", "-webkit-border-end-width")', '10px');
+shouldBeEqualToString('test("rtl", "border-left: 10px solid", "-webkit-border-end-width")', '10px');
+shouldBeEqualToString('test("rtl", "border-right: 10px solid", "-webkit-border-start-width")', '10px');
+
+shouldBeEqualToString('test("ltr", "-webkit-border-start: 10px solid red", "border-left-color")', 'rgb(255, 0, 0)');
+shouldBeEqualToString('test("ltr", "-webkit-border-start: 10px solid red", "border-left-style")', 'solid');
+shouldBeEqualToString('test("ltr", "-webkit-border-start: 10px solid red", "border-left-width")', '10px');
+
+shouldBeEqualToString('test("rtl", "-webkit-border-start: 10px solid red", "border-right-color")', 'rgb(255, 0, 0)');
+shouldBeEqualToString('test("rtl", "-webkit-border-start: 10px solid red", "border-right-style")', 'solid');
+shouldBeEqualToString('test("rtl", "-webkit-border-start: 10px solid red", "border-right-width")', '10px');
+
+shouldBeEqualToString('test("ltr", "-webkit-border-end: 10px solid red", "border-right-color")', 'rgb(255, 0, 0)');
+shouldBeEqualToString('test("ltr", "-webkit-border-end: 10px solid red", "border-right-style")', 'solid');
+shouldBeEqualToString('test("ltr", "-webkit-border-end: 10px solid red", "border-right-width")', '10px');
+
+shouldBeEqualToString('test("rtl", "-webkit-border-end: 10px solid red", "border-left-color")', 'rgb(255, 0, 0)');
+shouldBeEqualToString('test("rtl", "-webkit-border-end: 10px solid red", "border-left-style")', 'solid');
+shouldBeEqualToString('test("rtl", "-webkit-border-end: 10px solid red", "border-left-width")', '10px');
+
+successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a540f77..433d7e7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-07-14 Erik Arvidsson <arv at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Implement border-start and border-end properties
+ https://bugs.webkit.org/show_bug.cgi?id=41782
+
+ Test: fast/css/border-start-end.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ * css/CSSProperty.cpp:
+ (WebCore::CSSProperty::resolveDirectionAwareProperty):
+ * css/CSSPropertyNames.in:
+ * inspector/front-end/SourceCSSTokenizer.js:
+ (WebInspector.SourceCSSTokenizer):
+
2010-07-14 Alexey Proskuryakov <ap at apple.com>
Tiger and Gtk build fixes.
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index 7a58b72..d6e6e46 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -1440,6 +1440,14 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
break;
/* Directional properties are resolved by resolveDirectionAwareProperty() before the switch. */
+ case CSSPropertyWebkitBorderEnd:
+ case CSSPropertyWebkitBorderEndColor:
+ case CSSPropertyWebkitBorderEndStyle:
+ case CSSPropertyWebkitBorderEndWidth:
+ case CSSPropertyWebkitBorderStart:
+ case CSSPropertyWebkitBorderStartColor:
+ case CSSPropertyWebkitBorderStartStyle:
+ case CSSPropertyWebkitBorderStartWidth:
case CSSPropertyWebkitMarginEnd:
case CSSPropertyWebkitMarginStart:
case CSSPropertyWebkitPaddingEnd:
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index d90d0ed..bd5db44 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -760,6 +760,8 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyBorderRightStyle: // Defined as: none | hidden | dotted | dashed |
case CSSPropertyBorderBottomStyle: // solid | double | groove | ridge | inset | outset
case CSSPropertyBorderLeftStyle:
+ case CSSPropertyWebkitBorderStartStyle:
+ case CSSPropertyWebkitBorderEndStyle:
case CSSPropertyWebkitColumnRuleStyle:
if (id >= CSSValueNone && id <= CSSValueDouble)
validPrimitive = true;
@@ -799,12 +801,14 @@ bool CSSParser::parseValue(int propId, bool important)
break;
}
/* nobreak */
- case CSSPropertyBackgroundColor: // <color> | inherit
- case CSSPropertyBorderTopColor: // <color> | inherit
- case CSSPropertyBorderRightColor: // <color> | inherit
- case CSSPropertyBorderBottomColor: // <color> | inherit
- case CSSPropertyBorderLeftColor: // <color> | inherit
- case CSSPropertyColor: // <color> | inherit
+ case CSSPropertyBackgroundColor: // <color> | inherit
+ case CSSPropertyBorderTopColor: // <color> | inherit
+ case CSSPropertyBorderRightColor:
+ case CSSPropertyBorderBottomColor:
+ case CSSPropertyBorderLeftColor:
+ case CSSPropertyWebkitBorderStartColor:
+ case CSSPropertyWebkitBorderEndColor:
+ case CSSPropertyColor: // <color> | inherit
case CSSPropertyTextLineThroughColor: // CSS3 text decoration colors
case CSSPropertyTextUnderlineColor:
case CSSPropertyTextOverlineColor:
@@ -953,6 +957,8 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyBorderRightWidth: // Which is defined as
case CSSPropertyBorderBottomWidth: // thin | medium | thick | <length>
case CSSPropertyBorderLeftWidth:
+ case CSSPropertyWebkitBorderStartWidth:
+ case CSSPropertyWebkitBorderEndWidth:
case CSSPropertyWebkitColumnRuleWidth:
if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick)
validPrimitive = true;
@@ -1646,6 +1652,20 @@ bool CSSParser::parseValue(int propId, bool important)
CSSPropertyBorderLeftColor };
return parseShorthand(propId, properties, 3, important);
}
+ case CSSPropertyWebkitBorderStart:
+ // [ '-webkit-border-start-width' || 'border-style' || <color> ] | inherit
+ {
+ const int properties[3] = { CSSPropertyWebkitBorderStartWidth, CSSPropertyWebkitBorderStartStyle,
+ CSSPropertyWebkitBorderStartColor };
+ return parseShorthand(propId, properties, 3, important);
+ }
+ case CSSPropertyWebkitBorderEnd:
+ // [ '-webkit-border-end-width' || 'border-style' || <color> ] | inherit
+ {
+ const int properties[3] = { CSSPropertyWebkitBorderEndWidth, CSSPropertyWebkitBorderEndStyle,
+ CSSPropertyWebkitBorderEndColor };
+ return parseShorthand(propId, properties, 3, important);
+ }
case CSSPropertyOutline:
// [ 'outline-color' || 'outline-style' || 'outline-width' ] | inherit
{
diff --git a/WebCore/css/CSSProperty.cpp b/WebCore/css/CSSProperty.cpp
index 777c0c0..453b381 100644
--- a/WebCore/css/CSSProperty.cpp
+++ b/WebCore/css/CSSProperty.cpp
@@ -45,10 +45,30 @@ int CSSProperty::resolveDirectionAwareProperty(int propertyID, TextDirection dir
return direction == LTR ? CSSPropertyMarginRight : CSSPropertyMarginLeft;
case CSSPropertyWebkitMarginStart:
return direction == LTR ? CSSPropertyMarginLeft : CSSPropertyMarginRight;
+
case CSSPropertyWebkitPaddingEnd:
return direction == LTR ? CSSPropertyPaddingRight : CSSPropertyPaddingLeft;
case CSSPropertyWebkitPaddingStart:
return direction == LTR ? CSSPropertyPaddingLeft : CSSPropertyPaddingRight;
+
+ case CSSPropertyWebkitBorderEnd:
+ return direction == LTR ? CSSPropertyBorderRight : CSSPropertyBorderLeft;
+ case CSSPropertyWebkitBorderEndColor:
+ return direction == LTR ? CSSPropertyBorderRightColor : CSSPropertyBorderLeftColor;
+ case CSSPropertyWebkitBorderEndStyle:
+ return direction == LTR ? CSSPropertyBorderRightStyle : CSSPropertyBorderLeftStyle;
+ case CSSPropertyWebkitBorderEndWidth:
+ return direction == LTR ? CSSPropertyBorderRightWidth : CSSPropertyBorderLeftWidth;
+
+ case CSSPropertyWebkitBorderStart:
+ return direction == LTR ? CSSPropertyBorderLeft : CSSPropertyBorderRight;
+ case CSSPropertyWebkitBorderStartColor:
+ return direction == LTR ? CSSPropertyBorderLeftColor : CSSPropertyBorderRightColor;
+ case CSSPropertyWebkitBorderStartStyle:
+ return direction == LTR ? CSSPropertyBorderLeftStyle : CSSPropertyBorderRightStyle;
+ case CSSPropertyWebkitBorderStartWidth:
+ return direction == LTR ? CSSPropertyBorderLeftWidth : CSSPropertyBorderRightWidth;
+
default:
return propertyID;
}
diff --git a/WebCore/css/CSSPropertyNames.in b/WebCore/css/CSSPropertyNames.in
index 1c38ff6..ac85887 100644
--- a/WebCore/css/CSSPropertyNames.in
+++ b/WebCore/css/CSSPropertyNames.in
@@ -173,14 +173,21 @@ z-index
# whereas background-size: l; is equivalent to background-size: l auto;
-webkit-background-size
-webkit-binding
+-webkit-border-end
+-webkit-border-end-color
+-webkit-border-end-style
+-webkit-border-end-width
-webkit-border-fit
-webkit-border-horizontal-spacing
-webkit-border-image
-
# -webkit-border-radius differs from border-radius only in the interpretation of
# a value consisting of two lengths: "-webkit-border-radius: l1 l2;" is equivalent
# to "border-radius: l1 / l2;"
-webkit-border-radius
+-webkit-border-start
+-webkit-border-start-color
+-webkit-border-start-style
+-webkit-border-start-width
-webkit-border-vertical-spacing
-webkit-box-align
-webkit-box-direction
diff --git a/WebCore/inspector/front-end/SourceCSSTokenizer.js b/WebCore/inspector/front-end/SourceCSSTokenizer.js
index 1d8a784..2179982 100644
--- a/WebCore/inspector/front-end/SourceCSSTokenizer.js
+++ b/WebCore/inspector/front-end/SourceCSSTokenizer.js
@@ -73,8 +73,10 @@ WebInspector.SourceCSSTokenizer = function()
"-webkit-animation-iteration-count", "-webkit-animation-name", "-webkit-animation-play-state",
"-webkit-animation-timing-function", "-webkit-appearance", "-webkit-backface-visibility",
"-webkit-background-clip", "-webkit-background-composite", "-webkit-background-origin", "-webkit-background-size",
- "-webkit-binding", "-webkit-border-fit", "-webkit-border-horizontal-spacing", "-webkit-border-image",
- "-webkit-border-radius", "-webkit-border-vertical-spacing", "-webkit-box-align", "-webkit-box-direction",
+ "-webkit-binding", "-webkit-border-end", "-webkit-border-end-color", "-webkit-border-end-style", "-webkit-border-end-width",
+ "-webkit-border-fit", "-webkit-border-horizontal-spacing", "-webkit-border-image",
+ "-webkit-border-radius", "-webkit-border-start", "-webkit-border-start-color", "-webkit-border-start-style",
+ "-webkit-border-start-width","-webkit-border-vertical-spacing", "-webkit-box-align", "-webkit-box-direction",
"-webkit-box-flex", "-webkit-box-flex-group", "-webkit-box-lines", "-webkit-box-ordinal-group",
"-webkit-box-orient", "-webkit-box-pack", "-webkit-box-reflect", "-webkit-box-shadow", "-webkit-box-sizing",
"-webkit-column-break-after", "-webkit-column-break-before", "-webkit-column-break-inside", "-webkit-column-count",
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list