Changeset 67667 in webkit
- Timestamp:
- Sep 16, 2010 2:37:06 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r67660 r67667 1 2010-09-16 takano takumi <takano1@asia.apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 https://bugs.webkit.org/show_bug.cgi?id=45020 6 Support "block-flow" and "writing-mode": interpret properties into RenderStyle 7 8 Added code that interprets "block-flow" property and "writing-mode" property settings 9 into a RenderStyle object. 10 11 * fast/css/getComputedStyle/computed-style-expected.txt: 12 * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 13 * fast/text/international/block-flow-parser-test-expected.txt: Added. 14 * fast/text/international/block-flow-parser-test.html: Added. 15 * svg/css/getComputedStyle-basic-expected.txt: 16 1 17 2010-09-15 David Hyatt <hyatt@apple.com> 2 18 -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
r66585 r67667 97 97 -webkit-background-origin: padding-box; 98 98 -webkit-background-size: auto auto; 99 -webkit-block-flow: tb; 99 100 -webkit-border-fit: border; 100 101 -webkit-border-image: none; -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r66585 r67667 96 96 -webkit-background-origin: padding-box 97 97 -webkit-background-size: auto auto 98 -webkit-block-flow: tb 98 99 -webkit-border-fit: border 99 100 -webkit-border-image: none -
trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt
r66591 r67667 108 108 -webkit-background-origin: padding-box; 109 109 -webkit-background-size: auto auto; 110 -webkit-block-flow: tb; 110 111 -webkit-border-fit: border; 111 112 -webkit-border-horizontal-spacing: 0px; -
trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r66591 r67667 107 107 -webkit-background-origin: padding-box 108 108 -webkit-background-size: auto auto 109 -webkit-block-flow: tb 109 110 -webkit-border-fit: border 110 111 -webkit-border-horizontal-spacing: 0px -
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
r66585 r67667 213 213 rect: style.getPropertyValue(-webkit-background-size) : auto auto 214 214 rect: style.getPropertyCSSValue(-webkit-background-size) : [object CSSValueList] 215 rect: style.getPropertyValue(-webkit-block-flow) : tb 216 rect: style.getPropertyCSSValue(-webkit-block-flow) : [object CSSPrimitiveValue] 215 217 rect: style.getPropertyValue(-webkit-border-fit) : border 216 218 rect: style.getPropertyCSSValue(-webkit-border-fit) : [object CSSPrimitiveValue] … … 633 635 g: style.getPropertyValue(-webkit-background-size) : auto auto 634 636 g: style.getPropertyCSSValue(-webkit-background-size) : [object CSSValueList] 637 g: style.getPropertyValue(-webkit-block-flow) : tb 638 g: style.getPropertyCSSValue(-webkit-block-flow) : [object CSSPrimitiveValue] 635 639 g: style.getPropertyValue(-webkit-border-fit) : border 636 640 g: style.getPropertyCSSValue(-webkit-border-fit) : [object CSSPrimitiveValue] -
trunk/WebCore/ChangeLog
r67664 r67667 1 2010-09-16 takano takumi <takano1@asia.apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 https://bugs.webkit.org/show_bug.cgi?id=45020 6 Support "block-flow" and "writing-mode": interpret properties into RenderStyle 7 8 Added code that interprets "block-flow" property and "writing-mode" property settings 9 into a RenderStyle object. 10 11 Test: fast/text/international/block-flow-parser-test.html 12 13 * css/CSSComputedStyleDeclaration.cpp: 14 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 15 * css/CSSParser.cpp: 16 (WebCore::CSSParser::parseValue): 17 * css/CSSPrimitiveValueMappings.h: 18 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 19 (WebCore::CSSPrimitiveValue::operator EBlockFlowDirection): 20 * css/CSSPropertyNames.in: 21 * css/CSSStyleSelector.cpp: 22 (WebCore::CSSStyleSelector::applyProperty): 23 * css/CSSValueKeywords.in: 24 * css/SVGCSSValueKeywords.in: 25 * rendering/style/RenderStyle.cpp: 26 (WebCore::RenderStyle::diff): 27 * rendering/style/RenderStyle.h: 28 (WebCore::InheritedFlags::setBitDefaults): 29 (WebCore::InheritedFlags::blockFlow): 30 (WebCore::InheritedFlags::setBlockFlow): 31 (WebCore::InheritedFlags::initialBlockFlow): 32 * rendering/style/RenderStyleConstants.h: 33 1 34 2010-09-16 Martin Robinson <mrobinson@igalia.com> 2 35 -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r67634 r67667 159 159 CSSPropertyWebkitBackgroundOrigin, 160 160 CSSPropertyWebkitBackgroundSize, 161 CSSPropertyWebkitBlockFlow, 161 162 CSSPropertyWebkitBorderFit, 162 163 CSSPropertyWebkitBorderHorizontalSpacing, … … 1353 1354 case CSSPropertyWebkitBackfaceVisibility: 1354 1355 return CSSPrimitiveValue::createIdentifier((style->backfaceVisibility() == BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible); 1356 case CSSPropertyWebkitBlockFlow: 1357 return CSSPrimitiveValue::create(style->blockFlow()); 1355 1358 case CSSPropertyWebkitBorderImage: 1356 1359 return valueForNinePieceImage(style->borderImage()); … … 1472 1475 case CSSPropertyMargin: 1473 1476 case CSSPropertyPadding: 1477 case CSSPropertyWebkitWritingMode: 1474 1478 break; 1475 1479 -
trunk/WebCore/css/CSSParser.cpp
r67574 r67667 1720 1720 break; 1721 1721 #endif 1722 1723 // CSS Text Layout Module Level 3: Vertical writing support 1724 case CSSPropertyWebkitBlockFlow: 1725 // [ "tb" | "rl" | "lr" | "bt" ] 1726 if (id == CSSValueTb || id == CSSValueRl || id == CSSValueLr || id == CSSValueBt) 1727 validPrimitive = true; 1728 break; 1729 1730 case CSSPropertyWebkitWritingMode: 1731 // [ "lr-tb" | "rl-tb" | "tb-rl" | "bt-rl" | "tb-lr" | "bt-lr" ] 1732 if (id == CSSValueLrTb || id == CSSValueRlTb || id == CSSValueTbRl || id == CSSValueBtRl || id == CSSValueTbLr || id == CSSValueBtLr) 1733 validPrimitive = true; 1734 break; 1722 1735 1723 1736 #if ENABLE(SVG) -
trunk/WebCore/css/CSSPrimitiveValueMappings.h
r66581 r67667 2004 2004 } 2005 2005 2006 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBlockFlowDirection e) 2007 : m_type(CSS_IDENT) 2008 , m_hasCachedCSSText(false) 2009 { 2010 switch (e) { 2011 case TopToBottomBlockFlow: 2012 m_value.ident = CSSValueTb; 2013 break; 2014 case RightToLeftBlockFlow: 2015 m_value.ident = CSSValueRl; 2016 break; 2017 case LeftToRightBlockFlow: 2018 m_value.ident = CSSValueLr; 2019 break; 2020 case BottomToTopBlockFlow: 2021 m_value.ident = CSSValueBt; 2022 break; 2023 } 2024 } 2025 2026 template<> inline CSSPrimitiveValue::operator EBlockFlowDirection() const 2027 { 2028 switch (m_value.ident) { 2029 case CSSValueTb: 2030 return TopToBottomBlockFlow; 2031 case CSSValueRl: 2032 return RightToLeftBlockFlow; 2033 case CSSValueLr: 2034 return LeftToRightBlockFlow; 2035 case CSSValueBt: 2036 return BottomToTopBlockFlow; 2037 default: 2038 ASSERT_NOT_REACHED(); 2039 return TopToBottomBlockFlow; 2040 } 2041 } 2042 2006 2043 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPointerEvents e) 2007 2044 : m_type(CSS_IDENT) -
trunk/WebCore/css/CSSPropertyNames.in
r66109 r67667 174 174 # whereas background-size: l; is equivalent to background-size: l auto; 175 175 -webkit-background-size 176 # CSS Text Layout Module Level 3: Vertical writing support 177 -webkit-block-flow 176 178 -webkit-border-end 177 179 -webkit-border-end-color … … 276 278 -webkit-user-select 277 279 -webkit-variable-declaration-block 280 # CSS Text Layout Module Level 3: Vertical writing support 281 -webkit-writing-mode -
trunk/WebCore/css/CSSStyleSelector.cpp
r67653 r67667 5521 5521 return; 5522 5522 #endif 5523 5524 // CSS Text Layout Module Level 3: Vertical writing support 5525 case CSSPropertyWebkitBlockFlow: 5526 HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(blockFlow, BlockFlow) 5527 return; 5528 5529 case CSSPropertyWebkitWritingMode: 5530 // The 'writing-mode' property is a shorthand property for the 'direction' property and the 'block-flow' property. 5531 if (isInherit) { 5532 m_style->setDirection(m_parentStyle->direction()); 5533 m_style->setBlockFlow(m_parentStyle->blockFlow()); 5534 } else if (isInitial) { 5535 m_style->setDirection(m_style->initialDirection()); 5536 m_style->setBlockFlow(m_style->initialBlockFlow()); 5537 } else { 5538 if (!primitiveValue) 5539 return; 5540 switch (primitiveValue->getIdent()) { 5541 case CSSValueLrTb: 5542 m_style->setDirection(LTR); 5543 m_style->setBlockFlow(TopToBottomBlockFlow); 5544 break; 5545 case CSSValueRlTb: 5546 m_style->setDirection(RTL); 5547 m_style->setBlockFlow(TopToBottomBlockFlow); 5548 break; 5549 case CSSValueTbRl: 5550 m_style->setDirection(LTR); 5551 m_style->setBlockFlow(RightToLeftBlockFlow); 5552 break; 5553 case CSSValueBtRl: 5554 m_style->setDirection(RTL); 5555 m_style->setBlockFlow(RightToLeftBlockFlow); 5556 break; 5557 case CSSValueTbLr: 5558 m_style->setDirection(LTR); 5559 m_style->setBlockFlow(LeftToRightBlockFlow); 5560 break; 5561 case CSSValueBtLr: 5562 m_style->setDirection(RTL); 5563 m_style->setBlockFlow(LeftToRightBlockFlow); 5564 break; 5565 default: 5566 break; 5567 } 5568 } 5569 return; 5523 5570 5524 5571 #if ENABLE(SVG) -
trunk/WebCore/css/CSSValueKeywords.in
r67032 r67667 743 743 manual 744 744 # auto 745 746 # -webkit-block-flow 747 tb 748 rl 749 lr 750 bt 751 752 # -webkit-writing-mode 753 lr-tb 754 rl-tb 755 tb-rl 756 bt-rl 757 tb-lr 758 bt-lr -
trunk/WebCore/css/SVGCSSValueKeywords.in
r60885 r67667 277 277 # none 278 278 non-scaling-stroke 279 280 281 # CSS_PROP_WRITING_MODE282 lr-tb283 rl-tb284 tb-rl285 lr286 rl287 tb -
trunk/WebCore/rendering/style/RenderStyle.cpp
r66615 r67667 440 440 inherited_flags._white_space != other->inherited_flags._white_space || 441 441 noninherited_flags._clear != other->noninherited_flags._clear) 442 return StyleDifferenceLayout; 443 444 // Check block flow direction. 445 if (inherited_flags._blockFlow != other->inherited_flags._blockFlow) 442 446 return StyleDifferenceLayout; 443 447 -
trunk/WebCore/rendering/style/RenderStyle.h
r67568 r67667 179 179 (_force_backgrounds_to_white == other._force_backgrounds_to_white) && 180 180 (_pointerEvents == other._pointerEvents) && 181 (_insideLink == other._insideLink); 181 (_insideLink == other._insideLink) && 182 (_blockFlow == other._blockFlow); 182 183 } 183 184 … … 205 206 unsigned _insideLink : 2; // EInsideLink 206 207 // 43 bits 208 209 // CSS Text Layout Module Level 3: Vertical writing support 210 unsigned _blockFlow : 2; // EBlockFlowDirection 211 // 45 bits 207 212 } inherited_flags; 208 213 … … 280 285 inherited_flags._pointerEvents = initialPointerEvents(); 281 286 inherited_flags._insideLink = NotInsideLink; 287 inherited_flags._blockFlow = initialBlockFlow(); 282 288 283 289 noninherited_flags._effectiveDisplay = noninherited_flags._originalDisplay = initialDisplay(); … … 712 718 bool textSizeAdjust() const { return rareInheritedData->textSizeAdjust; } 713 719 ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(rareInheritedData->textSecurity); } 720 721 EBlockFlowDirection blockFlow() const { return static_cast<EBlockFlowDirection>(inherited_flags._blockFlow); } 714 722 715 723 // attribute setter methods … … 1088 1096 } 1089 1097 1098 void setBlockFlow(EBlockFlowDirection v) { inherited_flags._blockFlow = v; } 1099 1090 1100 // To tell if this style matched attribute selectors. This makes it impossible to share. 1091 1101 bool affectedByAttributeSelectors() const { return m_affectedByAttributeSelectors; } … … 1127 1137 static EClear initialClear() { return CNONE; } 1128 1138 static TextDirection initialDirection() { return LTR; } 1139 static EBlockFlowDirection initialBlockFlow() { return TopToBottomBlockFlow; } 1129 1140 static EDisplay initialDisplay() { return INLINE; } 1130 1141 static EEmptyCell initialEmptyCells() { return SHOW; } -
trunk/WebCore/rendering/style/RenderStyleConstants.h
r67032 r67667 127 127 enum EUnicodeBidi { 128 128 UBNormal, Embed, Override 129 }; 130 131 // CSS Text Layout Module Level 3: Vertical writing support 132 enum EBlockFlowDirection { 133 TopToBottomBlockFlow, RightToLeftBlockFlow, LeftToRightBlockFlow, BottomToTopBlockFlow 129 134 }; 130 135
Note: See TracChangeset
for help on using the changeset viewer.