Changeset 90642 in webkit
- Timestamp:
- Jul 8, 2011 10:29:10 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r90640 r90642 1 2011-07-08 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSSRegions]Parse content: -webkit-from-flow 4 https://bugs.webkit.org/show_bug.cgi?id=63133 5 6 Reviewed by David Hyatt. 7 8 * fast/regions/content-webkit-from-flow-parsing-expected.txt: Added. 9 * fast/regions/content-webkit-from-flow-parsing.html: Added. 10 * fast/regions/script-tests/content-webkit-from-flow-parsing.js: Added. 11 1 12 2011-07-08 Vsevolod Vlasov <vsevik@chromium.org> 2 13 -
trunk/Source/WebCore/ChangeLog
r90635 r90642 1 2011-07-08 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSSRegions]Parse content: -webkit-from-flow 4 https://bugs.webkit.org/show_bug.cgi?id=63133 5 6 Reviewed by David Hyatt. 7 8 Test: fast/regions/content-webkit-from-flow-parsing.html 9 10 * css/CSSComputedStyleDeclaration.cpp: 11 (WebCore::contentToCSSValue): 12 * css/CSSParser.cpp: 13 (WebCore::CSSParser::parseContent): 14 (WebCore::CSSParser::parseFromFlowContent): 15 * css/CSSParser.h: 16 * css/CSSPrimitiveValue.cpp: 17 (WebCore::CSSPrimitiveValue::cleanup): 18 (WebCore::CSSPrimitiveValue::getStringValue): 19 (WebCore::CSSPrimitiveValue::cssText): 20 * css/CSSPrimitiveValue.h: 21 * css/CSSStyleSelector.cpp: 22 (WebCore::CSSStyleSelector::applyProperty): 23 * rendering/style/RenderStyle.cpp: 24 (WebCore::RenderStyle::diff): 25 * rendering/style/RenderStyle.h: 26 (WebCore::InheritedFlags::regionThread): 27 (WebCore::InheritedFlags::setRegionThread): 28 (WebCore::InheritedFlags::initialRegionThread): 29 * rendering/style/StyleRareNonInheritedData.cpp: 30 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): 31 (WebCore::StyleRareNonInheritedData::operator==): 32 * rendering/style/StyleRareNonInheritedData.h: 33 1 34 2011-07-08 Ilya Tikhonovsky <loislo@chromium.org> 2 35 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r90541 r90642 768 768 list->append(primitiveValueCache->createValue(static_cast<const TextContentData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING)); 769 769 } 770 #if ENABLE(CSS_REGIONS) 771 if (!style->regionThread().isNull()) 772 list->append(primitiveValueCache->createValue(style->regionThread(), CSSPrimitiveValue::CSS_STRING)); 773 #endif 770 774 return list.release(); 771 775 } -
trunk/Source/WebCore/css/CSSParser.cpp
r90541 r90642 2658 2658 if (!parseGeneratedImage(parsedValue)) 2659 2659 return false; 2660 #if ENABLE(CSS_REGIONS) 2661 } else if (equalIgnoringCase(val->function->name, "-webkit-from-flow(")) { 2662 parsedValue = parseFromFlowContent(args); 2663 if (!parsedValue) 2664 return false; 2665 #endif 2660 2666 } else 2661 2667 return false; … … 5866 5872 return false; 5867 5873 } 5874 5875 // The region name is now specified as an argument to the content property: 5876 // content: from-flow(flow_thread_name) 5877 PassRefPtr<CSSValue> CSSParser::parseFromFlowContent(CSSParserValueList* args) 5878 { 5879 // It should be only one name for the region thread. 5880 if (args->size() != 1) 5881 return 0; 5882 5883 CSSParserValue* argFlowThreadName = args->current(); 5884 5885 if (argFlowThreadName->unit != CSSPrimitiveValue::CSS_STRING) 5886 return 0; 5887 5888 return CSSPrimitiveValue::create(argFlowThreadName->string, CSSPrimitiveValue::CSS_FROM_FLOW); 5889 } 5868 5890 #endif 5869 5891 -
trunk/Source/WebCore/css/CSSParser.h
r90541 r90642 159 159 #if ENABLE(CSS_REGIONS) 160 160 bool parseFlowThread(int propId, bool important); 161 PassRefPtr<CSSValue> parseFromFlowContent(CSSParserValueList*); 161 162 #endif 162 163 // CSS3 Parsing Routines (for properties specific to CSS3) -
trunk/Source/WebCore/css/CSSPrimitiveValue.cpp
r89705 r90642 222 222 case CSS_URI: 223 223 case CSS_ATTR: 224 #if ENABLE(CSS_REGIONS) 225 case CSS_FROM_FLOW: 226 #endif 224 227 case CSS_PARSER_HEXCOLOR: 225 228 if (m_value.string) … … 505 508 case CSS_ATTR: 506 509 case CSS_URI: 510 #if ENABLE(CSS_REGIONS) 511 case CSS_FROM_FLOW: 512 #endif 507 513 return m_value.string; 508 514 case CSS_IDENT: … … 685 691 text = quoteCSSStringIfNeeded(m_value.string); 686 692 break; 693 #if ENABLE(CSS_REGIONS) 694 case CSS_FROM_FLOW: 695 text = "-webkit-from-flow(" + quoteCSSStringIfNeeded(m_value.string) + ")"; 696 break; 697 #endif 687 698 case CSS_URI: 688 699 text = "url(" + quoteCSSURLIfNeeded(m_value.string) + ")"; -
trunk/Source/WebCore/css/CSSPrimitiveValue.h
r89705 r90642 95 95 96 96 // This is used internally for counter names (as opposed to counter values) 97 CSS_COUNTER_NAME = 109 97 CSS_COUNTER_NAME = 109, 98 CSS_FROM_FLOW = 110 98 99 }; 99 100 -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r90541 r90642 4141 4141 int len = list->length(); 4142 4142 4143 #if ENABLE(CSS_REGIONS) 4144 if (len == 1 && list->itemWithoutBoundsCheck(0)->isPrimitiveValue()) { 4145 CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(list->itemWithoutBoundsCheck(0)); 4146 if (contentValue->primitiveType() == CSSPrimitiveValue::CSS_FROM_FLOW) { 4147 m_style->setRegionThread(contentValue->getStringValue().impl()); 4148 return; 4149 } 4150 } 4151 #endif 4152 4143 4153 bool didSet = false; 4144 4154 for (int i = 0; i < len; i++) { … … 4148 4158 didSet = true; 4149 4159 } 4150 4160 4151 4161 if (!item->isPrimitiveValue()) 4152 4162 continue; 4153 4163 4154 4164 CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(item); 4155 4165 switch (contentValue->primitiveType()) { -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r90541 r90642 346 346 347 347 #if ENABLE(CSS_REGIONS) 348 if (rareNonInheritedData->m_flowThread != other->rareNonInheritedData->m_flowThread) 349 return StyleDifferenceLayout; 348 if (rareNonInheritedData->m_flowThread != other->rareNonInheritedData->m_flowThread 349 || rareNonInheritedData->m_regionThread != other->rareNonInheritedData->m_regionThread) 350 return StyleDifferenceLayout; 350 351 #endif 351 352 if (rareNonInheritedData->m_deprecatedFlexibleBox.get() != other->rareNonInheritedData->m_deprecatedFlexibleBox.get() -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r90541 r90642 746 746 #if ENABLE(CSS_REGIONS) 747 747 const AtomicString& flowThread() const { return rareNonInheritedData->m_flowThread; } 748 const AtomicString& regionThread() const { return rareNonInheritedData->m_regionThread; } 748 749 #endif 749 750 … … 1098 1099 #if ENABLE(CSS_REGIONS) 1099 1100 void setFlowThread(const AtomicString& flowThread) { SET_VAR(rareNonInheritedData, m_flowThread, flowThread); } 1101 void setRegionThread(const AtomicString& regionThread) { SET_VAR(rareNonInheritedData, m_regionThread, regionThread); } 1100 1102 #endif 1101 1103 … … 1331 1333 #if ENABLE(CSS_REGIONS) 1332 1334 static const AtomicString& initialFlowThread() { return nullAtom; } 1335 static const AtomicString& initialRegionThread() { return nullAtom; } 1333 1336 #endif 1334 1337 -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
r90541 r90642 58 58 #if ENABLE(CSS_REGIONS) 59 59 , m_flowThread(RenderStyle::initialFlowThread()) 60 , m_regionThread(RenderStyle::initialRegionThread()) 60 61 #endif 61 62 { … … 100 101 #if ENABLE(CSS_REGIONS) 101 102 , m_flowThread(o.m_flowThread) 103 , m_regionThread(o.m_regionThread) 102 104 #endif 103 105 { … … 149 151 #if ENABLE(CSS_REGIONS) 150 152 && (m_flowThread == o.m_flowThread) 153 && (m_regionThread == o.m_regionThread) 151 154 #endif 152 155 ; -
trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h
r90541 r90642 134 134 #if ENABLE(CSS_REGIONS) 135 135 AtomicString m_flowThread; 136 AtomicString m_regionThread; 136 137 #endif 137 138
Note: See TracChangeset
for help on using the changeset viewer.