WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-100058-20121114170029.patch (text/plain), 33.66 KB, created by
Dongwoo Joshua Im (dwim)
on 2012-11-14 00:02:30 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dongwoo Joshua Im (dwim)
Created:
2012-11-14 00:02:30 PST
Size:
33.66 KB
patch
obsolete
>Subversion Revision: 134391 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 06a8be1aabafa389db0b0e80f2847f02b207df7d..7965ddaa7fda7ed627a93740814b1fbbb76e1fc5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,44 @@ >+2012-11-13 Dongwoo Joshua Im <dw.im@samsung.com> >+ >+ [CSS3] Parsing the property, text-justify. >+ https://bugs.webkit.org/show_bug.cgi?id=100058 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch implements the parsing side of the "text-justify" property specified >+ in CSS3 working draft, with "-webkit-" prefix, under ENABLE_CSS3_TEXT flag. >+ Specification link : http://www.w3.org/TR/css3-text/#text-justify >+ >+ Tests: fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html >+ fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html >+ >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore): >+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the value of the text-justify property. >+ * css/CSSParser.cpp: >+ (WebCore::CSSParser::parseValue): Parse the value, and check whether it is a proper value which text-justify can have. >+ * css/CSSPrimitiveValueMappings.h: >+ (WebCore): >+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): >+ (WebCore::CSSPrimitiveValue::operator ETextJustify): >+ * css/CSSProperty.cpp: >+ (WebCore::CSSProperty::isInheritedProperty): >+ * css/CSSPropertyNames.in: Add '-webkit-text-justify' property. >+ * css/CSSValueKeywords.in: Add the possible values of the '-webkit-text-justify' property. >+ * css/StyleBuilder.cpp: >+ (WebCore::StyleBuilder::StyleBuilder): >+ * css/StylePropertySet.cpp: >+ (WebCore): >+ * css/StyleResolver.cpp: >+ (WebCore::StyleResolver::applyProperty): >+ * rendering/style/RenderStyle.h: >+ * rendering/style/RenderStyleConstants.h: >+ * rendering/style/StyleRareInheritedData.cpp: >+ (WebCore::StyleRareInheritedData::StyleRareInheritedData): >+ (WebCore::StyleRareInheritedData::operator==): >+ * rendering/style/StyleRareInheritedData.h: >+ (StyleRareInheritedData): Add m_textJustify. >+ > 2012-11-13 Eberhard Graether <egraether@google.com> > > checkbox to toggle FPS counter in the inspector's settings >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index f575d6c91156090da8fa16a08a40c40a070c0518..9c830cfd225d7516565f437765a9b1fd30d27bac 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -184,6 +184,7 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyWebkitTextDecorationLine, > CSSPropertyWebkitTextDecorationStyle, > CSSPropertyWebkitTextAlignLast, >+ CSSPropertyWebkitTextJustify, > #endif // CSS3_TEXT > CSSPropertyTextIndent, > CSSPropertyTextRendering, >@@ -2039,6 +2040,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert > return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle()); > case CSSPropertyWebkitTextAlignLast: > return cssValuePool().createValue(style->textAlignLast()); >+ case CSSPropertyWebkitTextJustify: >+ return cssValuePool().createValue(style->textJustify()); > #endif // CSS3_TEXT > case CSSPropertyWebkitTextDecorationsInEffect: > return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect()); >diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp >index 708fb6c6789984019ff04fece2ffd96256dd72ba..54022dea6b56e3dc9c965a113d111d61d0f2e2ec 100644 >--- a/Source/WebCore/css/CSSParser.cpp >+++ b/Source/WebCore/css/CSSParser.cpp >@@ -1871,6 +1871,12 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important) > if ((id >= CSSValueLeft && id <= CSSValueJustify) || id == CSSValueStart || id == CSSValueEnd || id == CSSValueAuto) > validPrimitive = true; > break; >+ >+ case CSSPropertyWebkitTextJustify: >+ // auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida >+ if ((id >= CSSValueInterWord && id <= CSSValueKashida) || id == CSSValueAuto || id == CSSValueNone) >+ validPrimitive = true; >+ break; > #endif // CSS3_TEXT > > case CSSPropertyCursor: { >diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h >index 22f9fb707d2bd4bebeb224b87aa0e3bb9c4f8dfa..fae535087b98a36eb64d81c87652430dd9eeaabf 100644 >--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h >+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h >@@ -2251,6 +2251,58 @@ template<> inline CSSPrimitiveValue::operator ETextAlignLast() const > ASSERT_NOT_REACHED(); > return TextAlignLastAuto; > } >+ >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextJustify e) >+ : CSSValue(PrimitiveClass) >+{ >+ m_primitiveUnitType = CSS_IDENT; >+ switch (e) { >+ case TextJustifyAuto: >+ m_value.ident = CSSValueAuto; >+ break; >+ case TextJustifyNone: >+ m_value.ident = CSSValueNone; >+ break; >+ case TextJustifyInterWord: >+ m_value.ident = CSSValueInterWord; >+ break; >+ case TextJustifyInterIdeograph: >+ m_value.ident = CSSValueInterIdeograph; >+ break; >+ case TextJustifyInterCluster: >+ m_value.ident = CSSValueInterCluster; >+ break; >+ case TextJustifyDistribute: >+ m_value.ident = CSSValueDistribute; >+ break; >+ case TextJustifyKashida: >+ m_value.ident = CSSValueKashida; >+ break; >+ } >+} >+ >+template<> inline CSSPrimitiveValue::operator ETextJustify() const >+{ >+ switch (m_value.ident) { >+ case CSSValueAuto: >+ return TextJustifyAuto; >+ case CSSValueNone: >+ return TextJustifyNone; >+ case CSSValueInterWord: >+ return TextJustifyInterWord; >+ case CSSValueInterIdeograph: >+ return TextJustifyInterIdeograph; >+ case CSSValueInterCluster: >+ return TextJustifyInterCluster; >+ case CSSValueDistribute: >+ return TextJustifyDistribute; >+ case CSSValueKashida: >+ return TextJustifyKashida; >+ } >+ >+ ASSERT_NOT_REACHED(); >+ return TextJustifyAuto; >+} > #endif // CSS3_TEXT > > template<> inline CSSPrimitiveValue::operator ETextDecoration() const >diff --git a/Source/WebCore/css/CSSProperty.cpp b/Source/WebCore/css/CSSProperty.cpp >index 1f121874a8310dbad681de82987b94bb8bd0525f..ec99c576e08d46a0a1d8acd6cbd2fcfc7c160cea 100644 >--- a/Source/WebCore/css/CSSProperty.cpp >+++ b/Source/WebCore/css/CSSProperty.cpp >@@ -328,6 +328,7 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID) > #if ENABLE(CSS3_TEXT) > case CSSPropertyWebkitTextDecorationLine: > case CSSPropertyWebkitTextAlignLast: >+ case CSSPropertyWebkitTextJustify: > #endif // CSS3_TEXT > case CSSPropertyWebkitTextDecorationsInEffect: > case CSSPropertyWebkitTextEmphasis: >diff --git a/Source/WebCore/css/CSSPropertyNames.in b/Source/WebCore/css/CSSPropertyNames.in >index 3fdbbb82acd36f0c2372fb35f2a2de27cbf61193..1a83348d7a43c9b2d4332622a9f1d42360f09bce 100644 >--- a/Source/WebCore/css/CSSPropertyNames.in >+++ b/Source/WebCore/css/CSSPropertyNames.in >@@ -358,6 +358,7 @@ z-index > -webkit-text-decoration-line > -webkit-text-decoration-style > -webkit-text-align-last >+-webkit-text-justify > #endif > -webkit-text-decorations-in-effect > -webkit-text-emphasis >diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in >index 4b9cc6ea6fbbfe8f74555dad475982c5b3919cac..ff7f6498cb4b06581d1c6e32deaeee9aaec21b96 100644 >--- a/Source/WebCore/css/CSSValueKeywords.in >+++ b/Source/WebCore/css/CSSValueKeywords.in >@@ -220,6 +220,16 @@ justify > -webkit-center > -webkit-match-parent > // >+// CSS_PROP_TEXT_JUSTIFY: >+// >+//auto >+//none >+inter-word >+inter-ideograph >+inter-cluster >+distribute >+kashida >+// > // CSS_PROP_LIST_STYLE_POSITION: > // > outside >diff --git a/Source/WebCore/css/StyleBuilder.cpp b/Source/WebCore/css/StyleBuilder.cpp >index a42a1b1fb7d13e5f2a00755d2abf3a09b09ea7a1..318b17e2ac9ff8d7041e3d15d47c66b9f9454fb6 100644 >--- a/Source/WebCore/css/StyleBuilder.cpp >+++ b/Source/WebCore/css/StyleBuilder.cpp >@@ -1920,6 +1920,7 @@ StyleBuilder::StyleBuilder() > setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler()); > setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler()); > setPropertyHandler(CSSPropertyWebkitTextAlignLast, ApplyPropertyDefault<ETextAlignLast, &RenderStyle::textAlignLast, ETextAlignLast, &RenderStyle::setTextAlignLast, ETextAlignLast, &RenderStyle::initialTextAlignLast>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitTextJustify, ApplyPropertyDefault<ETextJustify, &RenderStyle::textJustify, ETextJustify, &RenderStyle::setTextJustify, ETextJustify, &RenderStyle::initialTextJustify>::createHandler()); > #endif // CSS3_TEXT > setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler()); > setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler()); >diff --git a/Source/WebCore/css/StylePropertySet.cpp b/Source/WebCore/css/StylePropertySet.cpp >index 76dd612df16c35dbfaa666323cd669c445777dc9..44ab2e1d772d04f5b1ddd4f8ad628f0b2c2d9882 100644 >--- a/Source/WebCore/css/StylePropertySet.cpp >+++ b/Source/WebCore/css/StylePropertySet.cpp >@@ -976,6 +976,7 @@ static const CSSPropertyID blockProperties[] = { > CSSPropertyTextAlign, > #if ENABLE(CSS3_TEXT) > CSSPropertyWebkitTextAlignLast, >+ CSSPropertyWebkitTextJustify, > #endif // CSS3_TEXT > CSSPropertyTextIndent, > CSSPropertyWidows >diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp >index e79c983cf2d72ae7e265916f997b4224e2a27623..7da2de0a246e4e7c803dda940452be6b737109ed 100644 >--- a/Source/WebCore/css/StyleResolver.cpp >+++ b/Source/WebCore/css/StyleResolver.cpp >@@ -3854,6 +3854,7 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value) > case CSSPropertyWebkitTextDecorationLine: > case CSSPropertyWebkitTextDecorationStyle: > case CSSPropertyWebkitTextAlignLast: >+ case CSSPropertyWebkitTextJustify: > #endif // CSS3_TEXT > case CSSPropertyWebkitTextEmphasisColor: > case CSSPropertyWebkitTextEmphasisPosition: >diff --git a/Source/WebCore/rendering/style/RenderStyle.h b/Source/WebCore/rendering/style/RenderStyle.h >index 65dcfd8e2dfe264cd16f528eb4452007b721d7de..c95df3094608f9d389eade9c279fae9c1d7a4ea0 100644 >--- a/Source/WebCore/rendering/style/RenderStyle.h >+++ b/Source/WebCore/rendering/style/RenderStyle.h >@@ -620,6 +620,7 @@ public: > #if ENABLE(CSS3_TEXT) > TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(rareNonInheritedData->m_textDecorationStyle); } > ETextAlignLast textAlignLast() const { return static_cast<ETextAlignLast>(rareInheritedData->m_textAlignLast); } >+ ETextJustify textJustify() const { return static_cast<ETextJustify>(rareInheritedData->m_textJustify); } > #else > TextDecorationStyle textDecorationStyle() const { return TextDecorationStyleSolid; } > #endif // CSS3_TEXT >@@ -1154,6 +1155,7 @@ public: > #if ENABLE(CSS3_TEXT) > void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInheritedData, m_textDecorationStyle, v); } > void setTextAlignLast(ETextAlignLast v) { SET_VAR(rareInheritedData, m_textAlignLast, v) } >+ void setTextJustify(ETextJustify v) { SET_VAR(rareInheritedData, m_textJustify, v) } > #endif // CSS3_TEXT > void setDirection(TextDirection v) { inherited_flags._direction = v; } > void setLineHeight(Length specifiedLineHeight); >@@ -1614,6 +1616,7 @@ public: > #if ENABLE(CSS3_TEXT) > static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyleSolid; } > static ETextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } >+ static ETextJustify initialTextJustify() { return TextJustifyAuto; } > #endif // CSS3_TEXT > static float initialZoom() { return 1.0f; } > static int initialOutlineOffset() { return 0; } >diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h >index 72e0c4c339bf17a482da68bf380a3c3da197148f..f92d9c804ecff8ee0831071ac1d0460e9fcb03e9 100644 >--- a/Source/WebCore/rendering/style/RenderStyleConstants.h >+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h >@@ -350,6 +350,10 @@ enum TextDecorationStyle { > enum ETextAlignLast { > TextAlignLastAuto, TextAlignLastStart, TextAlignLastEnd, TextAlignLastLeft, TextAlignLastRight, TextAlignLastCenter, TextAlignLastJustify > }; >+ >+enum ETextJustify { >+ TextJustifyAuto, TextJustifyNone, TextJustifyInterWord, TextJustifyInterIdeograph, TextJustifyInterCluster, TextJustifyDistribute, TextJustifyKashida >+}; > #endif // CSS3_TEXT > > enum EPageBreak { >diff --git a/Source/WebCore/rendering/style/StyleRareInheritedData.cpp b/Source/WebCore/rendering/style/StyleRareInheritedData.cpp >index b1ba5986a4922fdc5535b1a4db475ec2724eaf7d..3eba6e91bf4c100ab3018425502e7a89d2a510c8 100644 >--- a/Source/WebCore/rendering/style/StyleRareInheritedData.cpp >+++ b/Source/WebCore/rendering/style/StyleRareInheritedData.cpp >@@ -97,6 +97,7 @@ StyleRareInheritedData::StyleRareInheritedData() > #endif > #if ENABLE(CSS3_TEXT) > , m_textAlignLast(RenderStyle::initialTextAlignLast()) >+ , m_textJustify(RenderStyle::initialTextJustify()) > #endif // CSS3_TEXT > , hyphenationLimitBefore(-1) > , hyphenationLimitAfter(-1) >@@ -162,6 +163,7 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o) > #endif > #if ENABLE(CSS3_TEXT) > , m_textAlignLast(o.m_textAlignLast) >+ , m_textJustify(o.m_textJustify) > #endif // CSS3_TEXT > , hyphenationString(o.hyphenationString) > , hyphenationLimitBefore(o.hyphenationLimitBefore) >@@ -254,6 +256,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const > #endif > #if ENABLE(CSS3_TEXT) > && m_textAlignLast == o.m_textAlignLast >+ && m_textJustify == o.m_textJustify > #endif // CSS3_TEXT > && m_lineSnap == o.m_lineSnap > #if ENABLE(CSS_VARIABLES) >diff --git a/Source/WebCore/rendering/style/StyleRareInheritedData.h b/Source/WebCore/rendering/style/StyleRareInheritedData.h >index d07e04c330980f30889258d157b1738e921bc7b3..6b80d1e8718f9e266aa0354718c6a19efe6e5ba4 100644 >--- a/Source/WebCore/rendering/style/StyleRareInheritedData.h >+++ b/Source/WebCore/rendering/style/StyleRareInheritedData.h >@@ -112,6 +112,7 @@ public: > #endif > #if ENABLE(CSS3_TEXT) > unsigned m_textAlignLast : 3; // ETextAlignLast >+ unsigned m_textJustify : 3; // ETextJustify > #endif // CSS3_TEXT > > AtomicString hyphenationString; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index e3b98310d7dab6a1c0b66bb975c2ec3e31e56cf5..e5a4affeaaee0dcab6f1825e66fcd2f9eaac5a6d 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,33 @@ >+2012-11-13 Dongwoo Joshua Im <dw.im@samsung.com> >+ >+ [CSS3] Parsing the property, text-justify. >+ https://bugs.webkit.org/show_bug.cgi?id=100058 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch implements the parsing side of the "text-justify" property specified >+ in CSS3 working draft, with "-webkit-" prefix, under ENABLE_CSS3_TEXT flag. >+ Specification link : http://www.w3.org/TR/css3-text/#text-justify >+ >+ * fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-expected.txt: Added. >+ * fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited-expected.txt: Added. >+ * fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html: Added. >+ * fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html: Added. >+ * fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js: Added. >+ (testComputedStyle): >+ (ownValueTest): >+ (inheritanceTest): >+ * fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js: Added. >+ (testElementStyle): >+ (testComputedStyle): >+ (valueSettingTest): >+ (invalidValueSettingTest): >+ * platform/chromium/TestExpectations: Skip these new test cases. >+ * platform/mac/TestExpectations: Skip these new test cases. >+ * platform/qt-4.8/TestExpectations: Skip these new test cases. >+ * platform/qt-mac/TestExpectations: Skip these new test cases. >+ * platform/qt/TestExpectations: Skip these new test cases. >+ > 2012-11-12 Kent Tamura <tkent@chromium.org> > > Unable to set valid time value to input[type=time] with user interaction in some cases >diff --git a/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-expected.txt b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..49bb9629c18b8907a4c65045a5d614065637de6f >--- /dev/null >+++ b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-expected.txt >@@ -0,0 +1,85 @@ >+This test checks that -webkit-text-justify parses properly the properties from CSS 3 Text. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+Test the initial value: >+PASS computedStyle.webkitTextJustify is 'auto' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+ >+Value 'auto': >+PASS e.style.webkitTextJustify is 'auto' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+PASS computedStyle.webkitTextJustify is 'auto' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+ >+Value 'none': >+PASS e.style.webkitTextJustify is 'none' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'none' >+PASS computedStyle.webkitTextJustify is 'none' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'none' >+ >+Value 'inter-word': >+PASS e.style.webkitTextJustify is 'inter-word' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-word' >+PASS computedStyle.webkitTextJustify is 'inter-word' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-word' >+ >+Value 'inter-ideograph': >+PASS e.style.webkitTextJustify is 'inter-ideograph' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-ideograph' >+PASS computedStyle.webkitTextJustify is 'inter-ideograph' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-ideograph' >+ >+Value 'inter-cluster': >+PASS e.style.webkitTextJustify is 'inter-cluster' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-cluster' >+PASS computedStyle.webkitTextJustify is 'inter-cluster' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-cluster' >+ >+Value 'distribute': >+PASS e.style.webkitTextJustify is 'distribute' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'distribute' >+PASS computedStyle.webkitTextJustify is 'distribute' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'distribute' >+ >+Value 'kashida': >+PASS e.style.webkitTextJustify is 'kashida' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'kashida' >+PASS computedStyle.webkitTextJustify is 'kashida' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'kashida' >+ >+Invalid value test - '-webkit-left': >+PASS e.style.webkitTextJustify is 'auto' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+PASS computedStyle.webkitTextJustify is 'auto' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+ >+Invalid value test - '-webkit-right': >+PASS e.style.webkitTextJustify is 'auto' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+PASS computedStyle.webkitTextJustify is 'auto' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+ >+Invalid value test - '-webkit-center': >+PASS e.style.webkitTextJustify is 'auto' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+PASS computedStyle.webkitTextJustify is 'auto' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+ >+Invalid value test - '-webkit-match-parent': >+PASS e.style.webkitTextJustify is 'auto' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+PASS computedStyle.webkitTextJustify is 'auto' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+ >+Invalid value test - '-webkit-auto': >+PASS e.style.webkitTextJustify is 'auto' >+PASS e.style.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+PASS computedStyle.webkitTextJustify is 'auto' >+PASS computedStyle.getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+hello world >diff --git a/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited-expected.txt b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..b1926b3bd994934c656fa5e40126de2511b6d21d >--- /dev/null >+++ b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited-expected.txt >@@ -0,0 +1,45 @@ >+This test checks that the value of -webkit-text-justify is properly inherited to the child. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+Value of ancestor is 'auto': >+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText is 'auto' >+ >+Value of ancestor is 'none': >+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText is 'none' >+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText is 'none' >+ >+Value of ancestor is 'inter-word': >+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-word' >+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-word' >+ >+Value of ancestor is 'inter-ideograph': >+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-ideograph' >+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-ideograph' >+ >+Value of ancestor is 'inter-cluster': >+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-cluster' >+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-cluster' >+ >+Value of ancestor is 'distribute': >+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText is 'distribute' >+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText is 'distribute' >+ >+Value of ancestor is 'kashida': >+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText is 'kashida' >+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText is 'kashida' >+ >+Value of ancestor is 'inter-word, while child is 'inter-cluster': >+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-word' >+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-cluster' >+ >+Value of ancestor is 'inter-ideograph, while child is 'distribute': >+PASS window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText is 'inter-ideograph' >+PASS window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText is 'distribute' >+ >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+hello world >diff --git a/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html >new file mode 100644 >index 0000000000000000000000000000000000000000..841a93a32f4bf52aefa70cceaa87b804f9bb2448 >--- /dev/null >+++ b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html >@@ -0,0 +1,11 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <script src="../../../js/resources/js-test-pre.js"></script> >+</head> >+<body> >+ <div id="ancestor"><div id="child">hello world</div></div> >+ <script src="script-tests/getComputedStyle-text-justify-inherited.js"></script> >+ <script src="../../../js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html >new file mode 100644 >index 0000000000000000000000000000000000000000..0f06334efe900ffd7285ef99c456da2cb84acf18 >--- /dev/null >+++ b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html >@@ -0,0 +1,11 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <script src="../../../js/resources/js-test-pre.js"></script> >+</head> >+<body> >+ <div id="test">hello world</div> >+ <script src="script-tests/getComputedStyle-text-justify.js"></script> >+ <script src="../../../js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js >new file mode 100644 >index 0000000000000000000000000000000000000000..c50b31f20dd68be835c2b04152ee3110bc548e6a >--- /dev/null >+++ b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js >@@ -0,0 +1,37 @@ >+function testComputedStyle(a_value, c_value) >+{ >+ shouldBe("window.getComputedStyle(ancestor).getPropertyCSSValue('-webkit-text-justify').cssText", "'" + a_value + "'"); >+ shouldBe("window.getComputedStyle(child).getPropertyCSSValue('-webkit-text-justify').cssText", "'" + c_value + "'"); >+ debug(''); >+} >+ >+function ownValueTest(a_value, c_value) >+{ >+ debug("Value of ancestor is '" + a_value + ", while child is '" + c_value + "':"); >+ ancestor.style.webkitTextJustify = a_value; >+ child.style.webkitTextJustify = c_value; >+ testComputedStyle(a_value, c_value); >+} >+ >+function inheritanceTest(a_value) >+{ >+ debug("Value of ancestor is '" + a_value + "':"); >+ ancestor.style.webkitTextJustify = a_value; >+ testComputedStyle(a_value, a_value); >+} >+ >+description("This test checks that the value of -webkit-text-justify is properly inherited to the child."); >+ >+ancestor = document.getElementById('ancestor'); >+child = document.getElementById('child'); >+ >+inheritanceTest("auto"); >+inheritanceTest("none"); >+inheritanceTest("inter-word"); >+inheritanceTest("inter-ideograph"); >+inheritanceTest("inter-cluster"); >+inheritanceTest("distribute"); >+inheritanceTest("kashida"); >+ >+ownValueTest("inter-word", "inter-cluster"); >+ownValueTest("inter-ideograph", "distribute"); >diff --git a/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js >new file mode 100644 >index 0000000000000000000000000000000000000000..8051d976b23751d12f0c819493c394086eb6425c >--- /dev/null >+++ b/LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js >@@ -0,0 +1,54 @@ >+function testElementStyle(propertyJS, propertyCSS, type, value) >+{ >+ shouldBe("e.style." + propertyJS, "'" + value + "'"); >+ shouldBe("e.style.getPropertyCSSValue('" + propertyCSS + "').cssText", "'" + value + "'"); >+} >+ >+function testComputedStyle(propertyJS, propertyCSS, type, value) >+{ >+ computedStyle = window.getComputedStyle(e, null); >+ shouldBe("computedStyle." + propertyJS, "'" + value + "'"); >+ shouldBe("computedStyle.getPropertyCSSValue('" + propertyCSS + "').cssText", "'" + value + "'"); >+} >+ >+function valueSettingTest(value) >+{ >+ debug("Value '" + value + "':"); >+ e.style.webkitTextJustify = value; >+ testElementStyle("webkitTextJustify", "-webkit-text-justify", "[object CSSPrimitiveValue]", value); >+ testComputedStyle("webkitTextJustify", "-webkit-text-justify", "[object CSSPrimitiveValue]", value); >+ debug(''); >+} >+ >+function invalidValueSettingTest(value, defaultValue) >+{ >+ debug("Invalid value test - '" + value + "':"); >+ e.style.webkitTextJustify = value; >+ testElementStyle("webkitTextJustify", "-webkit-text-justify", "[object CSSPrimitiveValue]", defaultValue); >+ testComputedStyle("webkitTextJustify", "-webkit-text-justify", "[object CSSPrimitiveValue]", defaultValue); >+ debug(''); >+} >+ >+description("This test checks that -webkit-text-justify parses properly the properties from CSS 3 Text."); >+ >+e = document.getElementById('test'); >+ >+debug("Test the initial value:"); >+testComputedStyle("webkitTextJustify", "-webkit-text-justify", "[object CSSPrimitiveValue]", 'auto'); >+debug(''); >+ >+valueSettingTest('auto'); >+valueSettingTest('none'); >+valueSettingTest('inter-word'); >+valueSettingTest('inter-ideograph'); >+valueSettingTest('inter-cluster'); >+valueSettingTest('distribute'); >+valueSettingTest('kashida'); >+ >+defaultValue = 'auto' >+e.style.webkitTextJustify = defaultValue; >+invalidValueSettingTest('-webkit-left', defaultValue); >+invalidValueSettingTest('-webkit-right', defaultValue); >+invalidValueSettingTest('-webkit-center', defaultValue); >+invalidValueSettingTest('-webkit-match-parent', defaultValue); >+invalidValueSettingTest('-webkit-auto', defaultValue); >diff --git a/LayoutTests/platform/chromium/TestExpectations b/LayoutTests/platform/chromium/TestExpectations >index a8f1bc0ead6e090c1cebf67da64aca970d54d52e..bdc9ed88d856ccb79a05d10b73001a4fb3f79c3c 100644 >--- a/LayoutTests/platform/chromium/TestExpectations >+++ b/LayoutTests/platform/chromium/TestExpectations >@@ -202,6 +202,7 @@ webkit.org/b/89052 fast/css/image-orientation > # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). > webkit.org/b/58491 fast/css3-text/css3-text-decoration > webkit.org/b/76173 fast/css3-text/css3-text-align-last >+webkit.org/b/99945 fast/css3-text/css3-text-justify > > # Chromium does not support smart pasting in text controls yet. > webkit.org/b/60830 editing/pasteboard/smart-paste-in-text-control.html >diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations >index 83eb67b4860fae97ef24ec7d75ee347c496418a0..d26eb1291dc620db190768c3397eb0fc363592c9 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -986,6 +986,7 @@ webkit.org/b/89052 fast/css/image-orientation > # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). > webkit.org/b/58491 fast/css3-text/css3-text-decoration > webkit.org/b/76173 fast/css3-text/css3-text-align-last >+webkit.org/b/99945 fast/css3-text/css3-text-justify > > # Our slow tests, in alphabetical order. > webkit.org/b/57672 http/tests/local/fileapi/send-sliced-dragged-file.html [ Failure Pass ] >diff --git a/LayoutTests/platform/qt-4.8/TestExpectations b/LayoutTests/platform/qt-4.8/TestExpectations >index e0b29757c86c45ca3a8bbe1ed7aec5a11b1eb3a8..0a30cdfa94b32c3b708e19ce8790d5b406d23916 100644 >--- a/LayoutTests/platform/qt-4.8/TestExpectations >+++ b/LayoutTests/platform/qt-4.8/TestExpectations >@@ -708,6 +708,7 @@ webkit.org/b/89052 fast/css/image-orientation > # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). > webkit.org/b/58491 fast/css3-text/css3-text-decoration > webkit.org/b/76173 fast/css3-text/css3-text-align-last >+webkit.org/b/99945 fast/css3-text/css3-text-justify > > # Needs rebaseline after bug 86441 > # failing new tests >diff --git a/LayoutTests/platform/qt-mac/TestExpectations b/LayoutTests/platform/qt-mac/TestExpectations >index e8fa3423f2767f4c0d655940c4ded688d7808a24..2854a163a58fa9d47e5846df76dea2dae0c7e09c 100644 >--- a/LayoutTests/platform/qt-mac/TestExpectations >+++ b/LayoutTests/platform/qt-mac/TestExpectations >@@ -5807,6 +5807,7 @@ webkit.org/b/89052 fast/css/image-orientation > # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). > webkit.org/b/58491 fast/css3-text/css3-text-decoration > webkit.org/b/76173 fast/css3-text/css3-text-align-last >+webkit.org/b/99945 fast/css3-text/css3-text-justify > > # Needs rebaseline after bug 86441 > # failing new tests >diff --git a/LayoutTests/platform/qt/TestExpectations b/LayoutTests/platform/qt/TestExpectations >index a258e369ca7cb6dca9d23303e40261383b7864ea..f1bb075854cf73876dbcc5c5bf8421b18fdc745e 100644 >--- a/LayoutTests/platform/qt/TestExpectations >+++ b/LayoutTests/platform/qt/TestExpectations >@@ -352,6 +352,7 @@ webkit.org/b/89052 fast/css/image-orientation > # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). > webkit.org/b/58491 fast/css3-text/css3-text-decoration > webkit.org/b/76173 fast/css3-text/css3-text-align-last >+webkit.org/b/99945 fast/css3-text/css3-text-justify > > # Web Inspector: Implement support for InspectorClient::overrideDeviceMetrics() in platforms other than Chromium > # https://bugs.webkit.org/show_bug.cgi?id=82886
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 100058
:
174090
|
174287
|
182335
|
182732
|
183185
|
183441
|
197023