[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 15:25:48 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 643496f0a5af9e819ef949eb49be94158e0fe7e3
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 3 07:45:29 2010 +0000
2010-11-03 takano takumi <takano1 at asia.apple.com>
Reviewed by Dan Bernstein.
Add text-combine property to our property list. Reflect the setting to a RenderStyle object.
https://bugs.webkit.org/show_bug.cgi?id=48608
* fast/css/getComputedStyle/computed-style-expected.txt: Updated.
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Updated.
* fast/text/international/text-combine-parser-test-expected.txt: Added.
* fast/text/international/text-combine-parser-test.html: Added.
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Updated.
* svg/css/getComputedStyle-basic-expected.txt: Updated.
2010-11-03 takano takumi <takano1 at asia.apple.com>
Reviewed by Dan Bernstein.
Add text-combine property to our property list. Reflect the setting to a RenderStyle object.
https://bugs.webkit.org/show_bug.cgi?id=48608
Test: fast/text/international/text-combine-parser-test.html
* css/CSSComputedStyleDeclaration.cpp: Added text-combine property support.
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp: Added text-combine property support.
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h: Added a primitive value mapper for text-combine
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TextCombine):
* css/CSSPropertyNames.in: Added "text-combine".
* css/CSSStyleSelector.cpp: Added text-combine property support.
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in: Added values for text-combine.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff): Added check of text-combine value.
* rendering/style/RenderStyle.h: Added accessors for text-combine.
(WebCore::InheritedFlags::textCombine):
(WebCore::InheritedFlags::setTextCombine):
(WebCore::InheritedFlags::initialTextCombine):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp: Added text-combine property support.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h: Added text-combine entry for RenderStyle object here.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7d02a26..db993f4 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-03 takano takumi <takano1 at asia.apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add text-combine property to our property list. Reflect the setting to a RenderStyle object.
+ https://bugs.webkit.org/show_bug.cgi?id=48608
+
+ * fast/css/getComputedStyle/computed-style-expected.txt: Updated.
+ * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Updated.
+ * fast/text/international/text-combine-parser-test-expected.txt: Added.
+ * fast/text/international/text-combine-parser-test.html: Added.
+ * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Updated.
+ * svg/css/getComputedStyle-basic-expected.txt: Updated.
+
2010-11-02 Benjamin Kalman <kalman at chromium.org>
Reviewed by Ojan Vafai.
diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt b/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
index 25303a9..dd21e2b 100644
--- a/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
@@ -157,6 +157,7 @@ zoom: 1;
-webkit-perspective: none;
-webkit-perspective-origin: 392px 288px;
-webkit-rtl-ordering: logical;
+-webkit-text-combine: none;
-webkit-text-decorations-in-effect: none;
-webkit-text-fill-color: rgb(0, 0, 0);
-webkit-text-security: none;
diff --git a/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt b/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
index e6e29a1..bfe5942 100644
--- a/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
+++ b/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
@@ -156,6 +156,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-perspective: none
-webkit-perspective-origin: 50% 50%
-webkit-rtl-ordering: logical
+ -webkit-text-combine: none
-webkit-text-decorations-in-effect: none
-webkit-text-fill-color: rgb(0, 0, 0)
-webkit-text-security: none
diff --git a/LayoutTests/fast/text/international/text-combine-parser-test-expected.txt b/LayoutTests/fast/text/international/text-combine-parser-test-expected.txt
new file mode 100644
index 0000000..4cda7b5
--- /dev/null
+++ b/LayoutTests/fast/text/international/text-combine-parser-test-expected.txt
@@ -0,0 +1,11 @@
+text-combine parser test
+
+-webkit-text-combine:none
+-webkit-text-combine:cluster
+-webkit-text-combine:upright
+Okay if -webkit-text-combine values above and below are the same.
+
+-webkit-text-combine:none
+-webkit-text-combine:cluster
+-webkit-text-combine:upright
+
diff --git a/LayoutTests/fast/text/international/text-combine-parser-test.html b/LayoutTests/fast/text/international/text-combine-parser-test.html
new file mode 100644
index 0000000..61fd180
--- /dev/null
+++ b/LayoutTests/fast/text/international/text-combine-parser-test.html
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<title>text-combine parser test</title>
+<script>
+function print(message)
+{
+ var paragraph = document.createElement("li");
+ paragraph.appendChild(document.createTextNode(message));
+ document.getElementById("console").appendChild(paragraph);
+}
+function test()
+{
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var textCombineValues = ["none", "cluster", "upright"];
+ var pElems = document.getElementsByTagName("div");
+ for ( i = 0 ; i < pElems.length ; ++i )
+ {
+ var elem = pElems[i];
+ elem.style.webkitTextCombine = textCombineValues[i];
+ print("-webkit-text-combine:" + elem.style.webkitTextCombine);
+ }
+}
+</script>
+</head>
+<body onload="test()">
+<p>text-combine parser test</p>
+<div>-webkit-text-combine:none</div>
+<div>-webkit-text-combine:cluster</div>
+<div>-webkit-text-combine:upright</div>
+<p>Okay if -webkit-text-combine values above and below are the same.</p>
+<hr>
+<p><ol id=console></ol></p>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt b/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
index e6e29a1..bfe5942 100644
--- a/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
+++ b/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
@@ -156,6 +156,7 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-perspective: none
-webkit-perspective-origin: 50% 50%
-webkit-rtl-ordering: logical
+ -webkit-text-combine: none
-webkit-text-decorations-in-effect: none
-webkit-text-fill-color: rgb(0, 0, 0)
-webkit-text-security: none
diff --git a/LayoutTests/svg/css/getComputedStyle-basic-expected.txt b/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
index d8c7504..1755873 100644
--- a/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
+++ b/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
@@ -312,6 +312,8 @@ rect: style.getPropertyValue(-webkit-perspective-origin) : 0px 0px
rect: style.getPropertyCSSValue(-webkit-perspective-origin) : [object CSSValueList]
rect: style.getPropertyValue(-webkit-rtl-ordering) : logical
rect: style.getPropertyCSSValue(-webkit-rtl-ordering) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-text-combine) : none
+rect: style.getPropertyCSSValue(-webkit-text-combine) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-text-decorations-in-effect) : none
rect: style.getPropertyCSSValue(-webkit-text-decorations-in-effect) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-text-fill-color) : rgb(0, 0, 0)
@@ -734,6 +736,8 @@ g: style.getPropertyValue(-webkit-perspective-origin) : 0px 0px
g: style.getPropertyCSSValue(-webkit-perspective-origin) : [object CSSValueList]
g: style.getPropertyValue(-webkit-rtl-ordering) : logical
g: style.getPropertyCSSValue(-webkit-rtl-ordering) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-text-combine) : none
+g: style.getPropertyCSSValue(-webkit-text-combine) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-text-decorations-in-effect) : none
g: style.getPropertyCSSValue(-webkit-text-decorations-in-effect) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-text-fill-color) : rgb(0, 0, 0)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3dbf2f5..0391a3b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,35 @@
+2010-11-03 takano takumi <takano1 at asia.apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add text-combine property to our property list. Reflect the setting to a RenderStyle object.
+ https://bugs.webkit.org/show_bug.cgi?id=48608
+
+ Test: fast/text/international/text-combine-parser-test.html
+
+ * css/CSSComputedStyleDeclaration.cpp: Added text-combine property support.
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp: Added text-combine property support.
+ (WebCore::CSSParser::parseValue):
+ * css/CSSPrimitiveValueMappings.h: Added a primitive value mapper for text-combine
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator TextCombine):
+ * css/CSSPropertyNames.in: Added "text-combine".
+ * css/CSSStyleSelector.cpp: Added text-combine property support.
+ (WebCore::CSSStyleSelector::applyProperty):
+ * css/CSSValueKeywords.in: Added values for text-combine.
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::diff): Added check of text-combine value.
+ * rendering/style/RenderStyle.h: Added accessors for text-combine.
+ (WebCore::InheritedFlags::textCombine):
+ (WebCore::InheritedFlags::setTextCombine):
+ (WebCore::InheritedFlags::initialTextCombine):
+ * rendering/style/RenderStyleConstants.h:
+ * rendering/style/StyleRareNonInheritedData.cpp: Added text-combine property support.
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+ (WebCore::StyleRareNonInheritedData::operator==):
+ * rendering/style/StyleRareNonInheritedData.h: Added text-combine entry for RenderStyle object here.
+
2010-11-02 Daniel Bates <dbates at rim.com>
Reviewed by Adam Barth.
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index faa1771..db61591 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -211,6 +211,7 @@ static const int computedProperties[] = {
CSSPropertyWebkitPerspective,
CSSPropertyWebkitPerspectiveOrigin,
CSSPropertyWebkitRtlOrdering,
+ CSSPropertyWebkitTextCombine,
CSSPropertyWebkitTextDecorationsInEffect,
CSSPropertyWebkitTextFillColor,
CSSPropertyWebkitTextSecurity,
@@ -1533,6 +1534,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
return CSSPrimitiveValue::create(style->colorSpace());
case CSSPropertyWebkitWritingMode:
return CSSPrimitiveValue::create(style->writingMode());
+ case CSSPropertyWebkitTextCombine:
+ return CSSPrimitiveValue::create(style->textCombine());
/* Shorthand properties, currently not supported see bug 13658*/
case CSSPropertyBackground:
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index 26c3876..43df662 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -1786,6 +1786,11 @@ bool CSSParser::parseValue(int propId, bool important)
validPrimitive = true;
break;
+ case CSSPropertyWebkitTextCombine:
+ if (id == CSSValueNone || id == CSSValueCluster || id == CSSValueUpright)
+ validPrimitive = true;
+ break;
+
#if ENABLE(SVG)
default:
return parseSVGValue(propId, important);
diff --git a/WebCore/css/CSSPrimitiveValueMappings.h b/WebCore/css/CSSPrimitiveValueMappings.h
index a57a882..c055875 100644
--- a/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/WebCore/css/CSSPrimitiveValueMappings.h
@@ -2040,6 +2040,38 @@ template<> inline CSSPrimitiveValue::operator WritingMode() const
}
}
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextCombine e)
+ : m_type(CSS_IDENT)
+ , m_hasCachedCSSText(false)
+{
+ switch (e) {
+ case TextCombineNone:
+ m_value.ident = CSSValueNone;
+ break;
+ case TextCombineCluster:
+ m_value.ident = CSSValueCluster;
+ break;
+ case TextCombineUpright:
+ m_value.ident = CSSValueUpright;
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator TextCombine() const
+{
+ switch (m_value.ident) {
+ case CSSValueNone:
+ return TextCombineNone;
+ case CSSValueCluster:
+ return TextCombineCluster;
+ case CSSValueUpright:
+ return TextCombineUpright;
+ default:
+ ASSERT_NOT_REACHED();
+ return TextCombineNone;
+ }
+}
+
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPointerEvents e)
: m_type(CSS_IDENT)
, m_hasCachedCSSText(false)
diff --git a/WebCore/css/CSSPropertyNames.in b/WebCore/css/CSSPropertyNames.in
index 9fd2d2c..ab69fa7 100644
--- a/WebCore/css/CSSPropertyNames.in
+++ b/WebCore/css/CSSPropertyNames.in
@@ -276,6 +276,7 @@ z-index
-webkit-perspective-origin-x
-webkit-perspective-origin-y
-webkit-rtl-ordering
+-webkit-text-combine
-webkit-text-decorations-in-effect
-webkit-text-fill-color
-webkit-text-security
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index b902f59..d3eedb6 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -5604,6 +5604,11 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
m_fontDirty = true;
return;
}
+
+ case CSSPropertyWebkitTextCombine:
+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textCombine, TextCombine)
+ return;
+
#if ENABLE(SVG)
default:
// Try the SVG properties
diff --git a/WebCore/css/CSSValueKeywords.in b/WebCore/css/CSSValueKeywords.in
index fa0a214..cd37519 100644
--- a/WebCore/css/CSSValueKeywords.in
+++ b/WebCore/css/CSSValueKeywords.in
@@ -764,3 +764,7 @@ horizontal-tb
vertical-rl
vertical-lr
horizontal-bt
+
+# -webkit-text-combine
+cluster
+upright
diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp
index ec77367..3273821 100644
--- a/WebCore/rendering/style/RenderStyle.cpp
+++ b/WebCore/rendering/style/RenderStyle.cpp
@@ -463,6 +463,10 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
if (inherited_flags.m_writingMode != other->inherited_flags.m_writingMode)
return StyleDifferenceLayout;
+ // Check text combine mode.
+ if (rareNonInheritedData->m_textCombine != other->rareNonInheritedData->m_textCombine)
+ return StyleDifferenceLayout;
+
// Overflow returns a layout hint.
if (noninherited_flags._overflowX != other->noninherited_flags._overflowX ||
noninherited_flags._overflowY != other->noninherited_flags._overflowY)
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index 86a5574..2345e05 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -717,6 +717,8 @@ public:
void setPageScaleTransform(float);
bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rareNonInheritedData->m_maskBoxImage.hasImage(); }
+
+ TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInheritedData->m_textCombine); }
// End CSS3 Getters
// Apple-specific property getter methods
@@ -1053,6 +1055,7 @@ public:
void setTransformOriginY(Length l) { SET_VAR(rareNonInheritedData.access()->m_transform, m_y, l); }
void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m_transform, m_z, f); }
void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); }
+ void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCombine, v); }
// End CSS3 Setters
// Apple-specific property setters
@@ -1178,6 +1181,7 @@ public:
static EClear initialClear() { return CNONE; }
static TextDirection initialDirection() { return LTR; }
static WritingMode initialWritingMode() { return TopToBottomWritingMode; }
+ static TextCombine initialTextCombine() { return TextCombineNone; }
static EDisplay initialDisplay() { return INLINE; }
static EEmptyCell initialEmptyCells() { return SHOW; }
static EFloat initialFloating() { return FNONE; }
diff --git a/WebCore/rendering/style/RenderStyleConstants.h b/WebCore/rendering/style/RenderStyleConstants.h
index 0112c03..b8e2079 100644
--- a/WebCore/rendering/style/RenderStyleConstants.h
+++ b/WebCore/rendering/style/RenderStyleConstants.h
@@ -133,6 +133,10 @@ enum WritingMode {
TopToBottomWritingMode, RightToLeftWritingMode, LeftToRightWritingMode, BottomToTopWritingMode
};
+enum TextCombine {
+ TextCombineNone, TextCombineCluster, TextCombineUpright
+};
+
enum EFillAttachment {
ScrollBackgroundAttachment, LocalBackgroundAttachment, FixedBackgroundAttachment
};
diff --git a/WebCore/rendering/style/StyleRareNonInheritedData.cpp b/WebCore/rendering/style/StyleRareNonInheritedData.cpp
index e0f7f7a..42cf966 100644
--- a/WebCore/rendering/style/StyleRareNonInheritedData.cpp
+++ b/WebCore/rendering/style/StyleRareNonInheritedData.cpp
@@ -42,6 +42,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
, matchNearestMailBlockquoteColor(RenderStyle::initialMatchNearestMailBlockquoteColor())
, m_appearance(RenderStyle::initialAppearance())
, m_borderFit(RenderStyle::initialBorderFit())
+ , m_textCombine(RenderStyle::initialTextCombine())
, m_counterIncrement(0)
, m_counterReset(0)
#if USE(ACCELERATED_COMPOSITING)
@@ -78,6 +79,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
, matchNearestMailBlockquoteColor(o.matchNearestMailBlockquoteColor)
, m_appearance(o.m_appearance)
, m_borderFit(o.m_borderFit)
+ , m_textCombine(o.m_textCombine)
, m_counterIncrement(o.m_counterIncrement)
, m_counterReset(o.m_counterReset)
#if USE(ACCELERATED_COMPOSITING)
@@ -123,6 +125,7 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
&& matchNearestMailBlockquoteColor == o.matchNearestMailBlockquoteColor
&& m_appearance == o.m_appearance
&& m_borderFit == o.m_borderFit
+ && m_textCombine == o.m_textCombine
&& m_counterIncrement == o.m_counterIncrement
&& m_counterReset == o.m_counterReset
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebCore/rendering/style/StyleRareNonInheritedData.h b/WebCore/rendering/style/StyleRareNonInheritedData.h
index 3f693f9..a53eee7 100644
--- a/WebCore/rendering/style/StyleRareNonInheritedData.h
+++ b/WebCore/rendering/style/StyleRareNonInheritedData.h
@@ -103,6 +103,7 @@ public:
unsigned matchNearestMailBlockquoteColor : 1; // EMatchNearestMailBlockquoteColor, FIXME: This property needs to be eliminated. It should never have been added.
unsigned m_appearance : 6; // EAppearance
unsigned m_borderFit : 1; // EBorderFit
+ unsigned m_textCombine : 2; // CSS3 text-combine properties
short m_counterIncrement;
short m_counterReset;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list