WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
revert all properties back to the giant switch (somewhat incomplete)
apply-style-revert.patch (text/plain), 196.78 KB, created by
Antti Koivisto
on 2011-10-04 05:51:46 PDT
(
hide
)
Description:
revert all properties back to the giant switch (somewhat incomplete)
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2011-10-04 05:51:46 PDT
Size:
196.78 KB
patch
obsolete
>Index: Source/WebCore/css/CSSStyleSelector.cpp >=================================================================== >--- Source/WebCore/css/CSSStyleSelector.cpp (revision 96517) >+++ Source/WebCore/css/CSSStyleSelector.cpp (working copy) >@@ -178,6 +178,176 @@ if (id == propID) { \ > return; \ > } > >+#define HANDLE_FILL_LAYER_INHERIT_AND_INITIAL(layerType, LayerType, prop, Prop) \ >+if (isInherit) { \ >+FillLayer* currChild = m_style->access##LayerType##Layers(); \ >+FillLayer* prevChild = 0; \ >+const FillLayer* currParent = m_parentStyle->layerType##Layers(); \ >+while (currParent && currParent->is##Prop##Set()) { \ >+if (!currChild) { \ >+/* Need to make a new layer.*/ \ >+currChild = new FillLayer(LayerType##FillLayer); \ >+prevChild->setNext(currChild); \ >+} \ >+currChild->set##Prop(currParent->prop()); \ >+prevChild = currChild; \ >+currChild = prevChild->next(); \ >+currParent = currParent->next(); \ >+} \ >+\ >+while (currChild) { \ >+/* Reset any remaining layers to not have the property set. */ \ >+currChild->clear##Prop(); \ >+currChild = currChild->next(); \ >+} \ >+} else if (isInitial) { \ >+FillLayer* currChild = m_style->access##LayerType##Layers(); \ >+currChild->set##Prop(FillLayer::initialFill##Prop(LayerType##FillLayer)); \ >+for (currChild = currChild->next(); currChild; currChild = currChild->next()) \ >+currChild->clear##Prop(); \ >+} >+ >+#define HANDLE_FILL_LAYER_VALUE(layerType, LayerType, prop, Prop, value) { \ >+HANDLE_FILL_LAYER_INHERIT_AND_INITIAL(layerType, LayerType, prop, Prop) \ >+if (isInherit || isInitial) \ >+return; \ >+FillLayer* currChild = m_style->access##LayerType##Layers(); \ >+FillLayer* prevChild = 0; \ >+if (value->isValueList()) { \ >+/* Walk each value and put it into a layer, creating new layers as needed. */ \ >+CSSValueList* valueList = static_cast<CSSValueList*>(value); \ >+for (unsigned int i = 0; i < valueList->length(); i++) { \ >+if (!currChild) { \ >+/* Need to make a new layer to hold this value */ \ >+currChild = new FillLayer(LayerType##FillLayer); \ >+prevChild->setNext(currChild); \ >+} \ >+mapFill##Prop(property, currChild, valueList->itemWithoutBoundsCheck(i)); \ >+prevChild = currChild; \ >+currChild = currChild->next(); \ >+} \ >+} else { \ >+mapFill##Prop(property, currChild, value); \ >+currChild = currChild->next(); \ >+} \ >+while (currChild) { \ >+/* Reset all remaining layers to not have the property set. */ \ >+currChild->clear##Prop(); \ >+currChild = currChild->next(); \ >+} } >+ >+#define HANDLE_BACKGROUND_INHERIT_AND_INITIAL(prop, Prop) \ >+HANDLE_FILL_LAYER_INHERIT_AND_INITIAL(background, Background, prop, Prop) >+ >+#define HANDLE_BACKGROUND_VALUE(prop, Prop, value) \ >+HANDLE_FILL_LAYER_VALUE(background, Background, prop, Prop, value) >+ >+#define HANDLE_MASK_INHERIT_AND_INITIAL(prop, Prop) \ >+HANDLE_FILL_LAYER_INHERIT_AND_INITIAL(mask, Mask, prop, Prop) >+ >+#define HANDLE_MASK_VALUE(prop, Prop, value) \ >+HANDLE_FILL_LAYER_VALUE(mask, Mask, prop, Prop, value) >+ >+#define HANDLE_ANIMATION_INHERIT_AND_INITIAL(prop, Prop) \ >+if (isInherit) { \ >+AnimationList* list = m_style->accessAnimations(); \ >+const AnimationList* parentList = m_parentStyle->animations(); \ >+size_t i = 0, parentSize = parentList ? parentList->size() : 0; \ >+for ( ; i < parentSize && parentList->animation(i)->is##Prop##Set(); ++i) { \ >+if (list->size() <= i) \ >+list->append(Animation::create()); \ >+list->animation(i)->set##Prop(parentList->animation(i)->prop()); \ >+} \ >+\ >+/* Reset any remaining animations to not have the property set. */ \ >+for ( ; i < list->size(); ++i) \ >+list->animation(i)->clear##Prop(); \ >+} else if (isInitial) { \ >+AnimationList* list = m_style->accessAnimations(); \ >+if (list->isEmpty()) \ >+list->append(Animation::create()); \ >+list->animation(0)->set##Prop(Animation::initialAnimation##Prop()); \ >+for (size_t i = 1; i < list->size(); ++i) \ >+list->animation(0)->clear##Prop(); \ >+} >+ >+#define HANDLE_ANIMATION_VALUE(prop, Prop, value) { \ >+HANDLE_ANIMATION_INHERIT_AND_INITIAL(prop, Prop) \ >+if (isInherit || isInitial) \ >+return; \ >+AnimationList* list = m_style->accessAnimations(); \ >+size_t childIndex = 0; \ >+if (value->isValueList()) { \ >+/* Walk each value and put it into an animation, creating new animations as needed. */ \ >+CSSValueList* valueList = static_cast<CSSValueList*>(value); \ >+for (unsigned int i = 0; i < valueList->length(); i++) { \ >+if (childIndex <= list->size()) \ >+list->append(Animation::create()); \ >+mapAnimation##Prop(list->animation(childIndex), valueList->itemWithoutBoundsCheck(i)); \ >+++childIndex; \ >+} \ >+} else { \ >+if (list->isEmpty()) \ >+list->append(Animation::create()); \ >+mapAnimation##Prop(list->animation(childIndex), value); \ >+childIndex = 1; \ >+} \ >+for ( ; childIndex < list->size(); ++childIndex) { \ >+/* Reset all remaining animations to not have the property set. */ \ >+list->animation(childIndex)->clear##Prop(); \ >+} \ >+} >+ >+#define HANDLE_TRANSITION_INHERIT_AND_INITIAL(prop, Prop) \ >+if (isInherit) { \ >+AnimationList* list = m_style->accessTransitions(); \ >+const AnimationList* parentList = m_parentStyle->transitions(); \ >+size_t i = 0, parentSize = parentList ? parentList->size() : 0; \ >+for ( ; i < parentSize && parentList->animation(i)->is##Prop##Set(); ++i) { \ >+if (list->size() <= i) \ >+list->append(Animation::create()); \ >+list->animation(i)->set##Prop(parentList->animation(i)->prop()); \ >+} \ >+\ >+/* Reset any remaining transitions to not have the property set. */ \ >+for ( ; i < list->size(); ++i) \ >+list->animation(i)->clear##Prop(); \ >+} else if (isInitial) { \ >+AnimationList* list = m_style->accessTransitions(); \ >+if (list->isEmpty()) \ >+list->append(Animation::create()); \ >+list->animation(0)->set##Prop(Animation::initialAnimation##Prop()); \ >+for (size_t i = 1; i < list->size(); ++i) \ >+list->animation(0)->clear##Prop(); \ >+} >+ >+#define HANDLE_TRANSITION_VALUE(prop, Prop, value) { \ >+HANDLE_TRANSITION_INHERIT_AND_INITIAL(prop, Prop) \ >+if (isInherit || isInitial) \ >+return; \ >+AnimationList* list = m_style->accessTransitions(); \ >+size_t childIndex = 0; \ >+if (value->isValueList()) { \ >+/* Walk each value and put it into a transition, creating new animations as needed. */ \ >+CSSValueList* valueList = static_cast<CSSValueList*>(value); \ >+for (unsigned int i = 0; i < valueList->length(); i++) { \ >+if (childIndex <= list->size()) \ >+list->append(Animation::create()); \ >+mapAnimation##Prop(list->animation(childIndex), valueList->itemWithoutBoundsCheck(i)); \ >+++childIndex; \ >+} \ >+} else { \ >+if (list->isEmpty()) \ >+list->append(Animation::create()); \ >+mapAnimation##Prop(list->animation(childIndex), value); \ >+childIndex = 1; \ >+} \ >+for ( ; childIndex < list->size(); ++childIndex) { \ >+/* Reset all remaining transitions to not have the property set. */ \ >+list->animation(childIndex)->clear##Prop(); \ >+} \ >+} >+ > class RuleData { > public: > RuleData(CSSStyleRule*, CSSSelector*, unsigned position); >@@ -2401,1546 +2571,2657 @@ bool CSSStyleSelector::useSVGZoomRules() > > void CSSStyleSelector::applyProperty(int id, CSSValue *value) > { >+ CSSPrimitiveValue* primitiveValue = 0; >+ if (value->isPrimitiveValue()) >+ primitiveValue = static_cast<CSSPrimitiveValue*>(value); >+ >+ float zoomFactor = m_style->effectiveZoom(); >+ >+ // SVG handles zooming in a different way compared to CSS. The whole document is scaled instead >+ // of each individual length value in the render style / tree. CSSPrimitiveValue::computeLength*() >+ // multiplies each resolved length with the zoom multiplier - so for SVG we need to disable that. >+ // Though all CSS values that can be applied to outermost <svg> elements (width/height/border/padding...) >+ // need to respect the scaling. RenderBox (the parent class of RenderSVGRoot) grabs values like >+ // width/height/border/padding/... from the RenderStyle -> for SVG these values would never scale, >+ // if we'd pass a 1.0 zoom factor everyhwere. So we only pass a zoom factor of 1.0 for specific >+ // properties that are NOT allowed to scale within a zoomed SVG document (letter/word-spacing/font-size). >+ bool useSVGZoomRules = m_element && m_element->isSVGElement(); >+ > Length l; >- >+ bool apply = false; >+ > unsigned short valueType = value->cssValueType(); >- >+ > bool isInherit = m_parentNode && valueType == CSSValue::CSS_INHERIT; > bool isInitial = valueType == CSSValue::CSS_INITIAL || (!m_parentNode && valueType == CSSValue::CSS_INHERIT); >- >+ > if (m_checker.isMatchingVisitedPseudoClass() && !isValidVisitedLinkProperty(id)) { > // Limit the properties that can be applied to only the ones honored by :visited. > return; > } >- >- CSSPropertyID property = static_cast<CSSPropertyID>(id); >- >- // check lookup table for implementations and use when available >- if (ApplyPropertyBase* handler = m_applyProperty.propertyHandler(property)) { >- if (isInherit) >- handler->applyInheritValue(this); >- else if (isInitial) >- handler->applyInitialValue(this); >- else >- handler->applyValue(this, value); >- return; >- } >- >- CSSPrimitiveValue* primitiveValue = value->isPrimitiveValue() ? static_cast<CSSPrimitiveValue*>(value) : 0; >- >- float zoomFactor = m_style->effectiveZoom(); > > // What follows is a list that maps the CSS properties into their corresponding front-end > // RenderStyle values. Shorthands (e.g. border, background) occur in this list as well and > // are only hit when mapping "inherit" or "initial" into front-end values. >+ CSSPropertyID property = static_cast<CSSPropertyID>(id); > switch (property) { >-// ident only properties >- case CSSPropertyBorderCollapse: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(borderCollapse, BorderCollapse) >- return; >- case CSSPropertyCaptionSide: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(captionSide, CaptionSide) >- return; >- case CSSPropertyClear: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(clear, Clear) >- return; >- case CSSPropertyDisplay: { >- SVGDisplayPropertyGuard guard(m_element, m_style.get()); >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(display, Display) >- return; >- } >- case CSSPropertyEmptyCells: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(emptyCells, EmptyCells) >- return; >- case CSSPropertyFloat: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(floating, Floating) >- return; >- case CSSPropertyPageBreakBefore: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(pageBreakBefore, PageBreakBefore, PageBreak) >- return; >- case CSSPropertyPageBreakAfter: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(pageBreakAfter, PageBreakAfter, PageBreak) >- return; >- case CSSPropertyPageBreakInside: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(pageBreakInside, PageBreakInside, PageBreak) >- return; >- case CSSPropertyPosition: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(position, Position) >- return; >- case CSSPropertyTableLayout: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(tableLayout, TableLayout) >- return; >- case CSSPropertyUnicodeBidi: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(unicodeBidi, UnicodeBidi) >- return; >- case CSSPropertyTextTransform: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textTransform, TextTransform) >- return; >- case CSSPropertyVisibility: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(visibility, Visibility) >- return; >- case CSSPropertyWhiteSpace: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(whiteSpace, WhiteSpace) >- return; >-// uri || inherit >- case CSSPropertyBorderImageSource: >- { >- HANDLE_INHERIT_AND_INITIAL(borderImageSource, BorderImageSource) >- m_style->setBorderImageSource(styleImage(CSSPropertyBorderImageSource, value)); >- return; >- } >- case CSSPropertyWebkitMaskBoxImageSource: >- { >- HANDLE_INHERIT_AND_INITIAL(maskBoxImageSource, MaskBoxImageSource) >- m_style->setMaskBoxImageSource(styleImage(CSSPropertyWebkitMaskBoxImageSource, value)); >- return; >- } >- case CSSPropertyWordBreak: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(wordBreak, WordBreak) >- return; >- case CSSPropertyWordWrap: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(wordWrap, WordWrap) >- return; >- case CSSPropertyWebkitNbspMode: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(nbspMode, NBSPMode) >- return; >- case CSSPropertyWebkitLineBreak: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(khtmlLineBreak, KHTMLLineBreak) >- return; >- case CSSPropertyWebkitMatchNearestMailBlockquoteColor: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(matchNearestMailBlockquoteColor, MatchNearestMailBlockquoteColor) >- return; >- >- case CSSPropertyResize: >- { >- HANDLE_INHERIT_AND_INITIAL(resize, Resize) >- >- if (!primitiveValue->getIdent()) >+ // ident only properties >+ case CSSPropertyBackgroundAttachment: >+ HANDLE_BACKGROUND_VALUE(attachment, Attachment, value) > return; >- >- EResize r = RESIZE_NONE; >- if (primitiveValue->getIdent() == CSSValueAuto) { >- if (Settings* settings = m_checker.document()->settings()) >- r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE; >- } else >- r = *primitiveValue; >- >- m_style->setResize(r); >- return; >- } >- case CSSPropertyVerticalAlign: >- { >- HANDLE_INHERIT_AND_INITIAL(verticalAlign, VerticalAlign) >- if (!primitiveValue) >+ case CSSPropertyBackgroundClip: >+ case CSSPropertyWebkitBackgroundClip: >+ HANDLE_BACKGROUND_VALUE(clip, Clip, value) > return; >- >- if (primitiveValue->getIdent()) { >- m_style->setVerticalAlign(*primitiveValue); >- return; >- } >- >- int type = primitiveValue->primitiveType(); >- Length length; >- if (CSSPrimitiveValue::isUnitTypeLength(type)) >- length = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); >- else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >- length = Length(primitiveValue->getDoubleValue(), Percent); >- >- m_style->setVerticalAlign(LENGTH); >- m_style->setVerticalAlignLength(length); >- return; >- } >- case CSSPropertyFontSize: >- { >- FontDescription fontDescription = m_style->fontDescription(); >- fontDescription.setKeywordSize(0); >- float oldSize = 0; >- float size = 0; >- >- bool parentIsAbsoluteSize = false; >- if (m_parentNode) { >- oldSize = m_parentStyle->fontDescription().specifiedSize(); >- parentIsAbsoluteSize = m_parentStyle->fontDescription().isAbsoluteSize(); >- } >- >- if (isInherit) { >- size = oldSize; >- if (m_parentNode) >- fontDescription.setKeywordSize(m_parentStyle->fontDescription().keywordSize()); >- } else if (isInitial) { >- size = fontSizeForKeyword(m_checker.document(), CSSValueMedium, fontDescription.useFixedDefaultSize()); >- fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1); >- } else if (primitiveValue->getIdent()) { >- // Keywords are being used. >+ case CSSPropertyWebkitBackgroundComposite: >+ HANDLE_BACKGROUND_VALUE(composite, Composite, value) >+ return; >+ case CSSPropertyBackgroundOrigin: >+ case CSSPropertyWebkitBackgroundOrigin: >+ HANDLE_BACKGROUND_VALUE(origin, Origin, value) >+ return; >+ case CSSPropertyBackgroundSize: >+ case CSSPropertyWebkitBackgroundSize: >+ HANDLE_BACKGROUND_VALUE(size, Size, value) >+ return; >+ case CSSPropertyWebkitMaskAttachment: >+ HANDLE_MASK_VALUE(attachment, Attachment, value) >+ return; >+ case CSSPropertyWebkitMaskClip: >+ HANDLE_MASK_VALUE(clip, Clip, value) >+ return; >+ case CSSPropertyWebkitMaskComposite: >+ HANDLE_MASK_VALUE(composite, Composite, value) >+ return; >+ case CSSPropertyWebkitMaskOrigin: >+ HANDLE_MASK_VALUE(origin, Origin, value) >+ return; >+ case CSSPropertyWebkitMaskSize: >+ HANDLE_MASK_VALUE(size, Size, value) >+ return; >+ case CSSPropertyBorderCollapse: >+ HANDLE_INHERIT_AND_INITIAL(borderCollapse, BorderCollapse) >+ if (!primitiveValue) >+ return; > switch (primitiveValue->getIdent()) { >- case CSSValueXxSmall: >- case CSSValueXSmall: >- case CSSValueSmall: >- case CSSValueMedium: >- case CSSValueLarge: >- case CSSValueXLarge: >- case CSSValueXxLarge: >- case CSSValueWebkitXxxLarge: >- size = fontSizeForKeyword(m_checker.document(), primitiveValue->getIdent(), fontDescription.useFixedDefaultSize()); >- fontDescription.setKeywordSize(primitiveValue->getIdent() - CSSValueXxSmall + 1); >- break; >- case CSSValueLarger: >- size = largerFontSize(oldSize, m_checker.document()->inQuirksMode()); >+ case CSSValueCollapse: >+ m_style->setBorderCollapse(BCOLLAPSE); > break; >- case CSSValueSmaller: >- size = smallerFontSize(oldSize, m_checker.document()->inQuirksMode()); >+ case CSSValueSeparate: >+ m_style->setBorderCollapse(BSEPARATE); > break; > default: > return; > } >- >- fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize && >- (primitiveValue->getIdent() == CSSValueLarger || >- primitiveValue->getIdent() == CSSValueSmaller)); >- } else { >- int type = primitiveValue->primitiveType(); >- fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize || >- (type != CSSPrimitiveValue::CSS_PERCENTAGE && >- type != CSSPrimitiveValue::CSS_EMS && >- type != CSSPrimitiveValue::CSS_EXS && >- type != CSSPrimitiveValue::CSS_REMS)); >- if (CSSPrimitiveValue::isUnitTypeLength(type)) >- size = primitiveValue->computeLength<float>(m_parentStyle, m_rootElementStyle, 1.0, true); >- else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >- size = (primitiveValue->getFloatValue() * oldSize) / 100.0f; >- else >- return; >- } >- >- if (size < 0) >- return; >- >- setFontSize(fontDescription, size); >- setFontDescription(fontDescription); >- return; >- } >- >- case CSSPropertyWidows: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(widows, Widows) >- return; >- case CSSPropertyOrphans: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(orphans, Orphans) >- return; >-// length, percent, number >- case CSSPropertyLineHeight: >- { >- HANDLE_INHERIT_AND_INITIAL(lineHeight, LineHeight) >- if (!primitiveValue) > return; >- Length lineHeight; >- int type = primitiveValue->primitiveType(); >- if (primitiveValue->getIdent() == CSSValueNormal) >- lineHeight = Length(-100.0, Percent); >- else if (CSSPrimitiveValue::isUnitTypeLength(type)) { >- double multiplier = zoomFactor; >- if (m_style->textSizeAdjust()) { >- if (Frame* frame = m_checker.document()->frame()) >- multiplier *= frame->textZoomFactor(); >- } >- lineHeight = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, multiplier); >- } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >- lineHeight = Length((m_style->fontSize() * primitiveValue->getIntValue()) / 100, Fixed); >- else if (type == CSSPrimitiveValue::CSS_NUMBER) >- lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent); >- else >+ case CSSPropertyBorderTopStyle: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(borderTopStyle, BorderTopStyle, BorderStyle) > return; >- m_style->setLineHeight(lineHeight); >- return; >- } >- >-// string >- case CSSPropertyTextAlign: >- { >- HANDLE_INHERIT_AND_INITIAL(textAlign, TextAlign) >- if (!primitiveValue) >+ case CSSPropertyBorderRightStyle: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(borderRightStyle, BorderRightStyle, BorderStyle) > return; >- if (primitiveValue->getIdent() == CSSValueWebkitMatchParent) { >- if (m_parentStyle->textAlign() == TASTART) >- m_style->setTextAlign(m_parentStyle->isLeftToRightDirection() ? LEFT : RIGHT); >- else if (m_parentStyle->textAlign() == TAEND) >- m_style->setTextAlign(m_parentStyle->isLeftToRightDirection() ? RIGHT : LEFT); >- else >- m_style->setTextAlign(m_parentStyle->textAlign()); >+ case CSSPropertyBorderBottomStyle: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(borderBottomStyle, BorderBottomStyle, BorderStyle) > return; >- } >- m_style->setTextAlign(*primitiveValue); >- return; >- } >- >-// rect >- case CSSPropertyClip: >- { >- Length top; >- Length right; >- Length bottom; >- Length left; >- bool hasClip = true; >- if (isInherit) { >- if (m_parentStyle->hasClip()) { >- top = m_parentStyle->clipTop(); >- right = m_parentStyle->clipRight(); >- bottom = m_parentStyle->clipBottom(); >- left = m_parentStyle->clipLeft(); >- } else { >- hasClip = false; >- top = right = bottom = left = Length(); >+ case CSSPropertyBorderLeftStyle: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(borderLeftStyle, BorderLeftStyle, BorderStyle) >+ return; >+ case CSSPropertyOutlineStyle: >+ HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(outlineStyle, OutlineStyle, BorderStyle) >+ if (primitiveValue) { >+ if (primitiveValue->getIdent() == CSSValueAuto) >+ m_style->setOutlineStyle(DOTTED); >+ else >+ m_style->setOutlineStyle(*primitiveValue); > } >- } else if (isInitial) { >- hasClip = false; >- top = right = bottom = left = Length(); >- } else if (!primitiveValue) { > return; >- } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RECT) { >- Rect* rect = primitiveValue->getRectValue(); >- if (!rect) >- return; >- top = convertToIntLength(rect->top(), style(), m_rootElementStyle, zoomFactor); >- right = convertToIntLength(rect->right(), style(), m_rootElementStyle, zoomFactor); >- bottom = convertToIntLength(rect->bottom(), style(), m_rootElementStyle, zoomFactor); >- left = convertToIntLength(rect->left(), style(), m_rootElementStyle, zoomFactor); >- } else if (primitiveValue->getIdent() != CSSValueAuto) { >+ case CSSPropertyCaptionSide: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(captionSide, CaptionSide) > return; >- } >- m_style->setClip(top, right, bottom, left); >- m_style->setHasClip(hasClip); >- >- // rect, ident >- return; >- } >- >-// lists >- case CSSPropertyContent: >- // list of string, uri, counter, attr, i >- { >- // FIXME: In CSS3, it will be possible to inherit content. In CSS2 it is not. This >- // note is a reminder that eventually "inherit" needs to be supported. >- >- if (isInitial) { >- m_style->clearContent(); >+ case CSSPropertyClear: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(clear, Clear) > return; >- } >- >- if (!value->isValueList()) >+ case CSSPropertyDirection: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(direction, Direction) >+ if (!isInherit && !isInitial && m_element && m_element == m_element->document()->documentElement()) >+ m_element->document()->setDirectionSetOnDocumentElement(true); >+ return; >+ case CSSPropertyDisplay: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(display, Display) >+#if ENABLE(WCSS) >+ if (primitiveValue) { >+ if (primitiveValue->getIdent() == CSSValueWapMarquee) { >+ // Initialize WAP Marquee style >+ m_style->setOverflowX(OMARQUEE); >+ m_style->setOverflowY(OMARQUEE); >+ m_style->setWhiteSpace(NOWRAP); >+ m_style->setMarqueeDirection(MLEFT); >+ m_style->setMarqueeSpeed(85); // Normal speed >+ m_style->setMarqueeLoopCount(1); >+ m_style->setMarqueeBehavior(MSCROLL); >+ >+ if (m_parentStyle) >+ m_style->setDisplay(m_parentStyle->display()); >+ else >+ m_style->setDisplay(*primitiveValue); >+ } else >+ m_style->setDisplay(*primitiveValue); >+ } >+#endif > return; >- >- CSSValueListInspector inspector = value; >- if (inspector.length() == 1 && inspector.first()->isPrimitiveValue()) { >- CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(inspector.first()); >- if (contentValue->primitiveType() == CSSPrimitiveValue::CSS_FROM_FLOW) { >- m_style->setRegionThread(contentValue->getStringValue().impl()); >- return; >+ case CSSPropertyEmptyCells: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(emptyCells, EmptyCells) >+ return; >+ case CSSPropertyFloat: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(floating, Floating) >+ return; >+ case CSSPropertyFontStyle: >+ { >+ FontDescription fontDescription = m_style->fontDescription(); >+ if (isInherit) >+ fontDescription.setItalic(m_parentStyle->fontDescription().italic()); >+ else if (isInitial) >+ fontDescription.setItalic(false); >+ else { >+ if (!primitiveValue) >+ return; >+ switch (primitiveValue->getIdent()) { >+ case CSSValueOblique: >+ // FIXME: oblique is the same as italic for the moment... >+ case CSSValueItalic: >+ fontDescription.setItalic(true); >+ break; >+ case CSSValueNormal: >+ fontDescription.setItalic(false); >+ break; >+ default: >+ return; >+ } > } >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ return; > } >- >- bool didSet = false; >- for (CSSValueListIterator i = value; i.hasMore(); i.advance()) { >- CSSValue* item = i.value(); >- if (item->isImageGeneratorValue()) { >- m_style->setContent(static_cast<CSSImageGeneratorValue*>(item)->generatedImage(), didSet); >- didSet = true; >- } >- >- if (!item->isPrimitiveValue()) >- continue; >- >- CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(item); >- switch (contentValue->primitiveType()) { >- case CSSPrimitiveValue::CSS_STRING: >- m_style->setContent(contentValue->getStringValue().impl(), didSet); >- didSet = true; >- break; >- case CSSPrimitiveValue::CSS_ATTR: { >- // FIXME: Can a namespace be specified for an attr(foo)? >- if (m_style->styleType() == NOPSEUDO) >- m_style->setUnique(); >+ >+ case CSSPropertyFontVariant: >+ { >+ FontDescription fontDescription = m_style->fontDescription(); >+ if (isInherit) >+ fontDescription.setSmallCaps(m_parentStyle->fontDescription().smallCaps()); >+ else if (isInitial) >+ fontDescription.setSmallCaps(false); >+ else { >+ if (!primitiveValue) >+ return; >+ int id = primitiveValue->getIdent(); >+ if (id == CSSValueNormal) >+ fontDescription.setSmallCaps(false); >+ else if (id == CSSValueSmallCaps) >+ fontDescription.setSmallCaps(true); > else >- m_parentStyle->setUnique(); >- QualifiedName attr(nullAtom, contentValue->getStringValue().impl(), nullAtom); >- m_style->setContent(m_element->getAttribute(attr).impl(), didSet); >- didSet = true; >- // register the fact that the attribute value affects the style >- m_features.attrsInRules.add(attr.localName().impl()); >- break; >+ return; > } >- case CSSPrimitiveValue::CSS_URI: { >- if (!contentValue->isImageValue()) >- break; >- m_style->setContent(cachedOrPendingFromValue(CSSPropertyContent, static_cast<CSSImageValue*>(contentValue)), didSet); >- didSet = true; >- break; >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ return; >+ } >+ >+ case CSSPropertyFontWeight: >+ { >+ FontDescription fontDescription = m_style->fontDescription(); >+ if (isInherit) >+ fontDescription.setWeight(m_parentStyle->fontDescription().weight()); >+ else if (isInitial) >+ fontDescription.setWeight(FontWeightNormal); >+ else { >+ if (!primitiveValue) >+ return; >+ if (primitiveValue->getIdent()) { >+ switch (primitiveValue->getIdent()) { >+ case CSSValueBolder: >+ fontDescription.setWeight(fontDescription.bolderWeight()); >+ break; >+ case CSSValueLighter: >+ fontDescription.setWeight(fontDescription.lighterWeight()); >+ break; >+ case CSSValueBold: >+ case CSSValue700: >+ fontDescription.setWeight(FontWeightBold); >+ break; >+ case CSSValueNormal: >+ case CSSValue400: >+ fontDescription.setWeight(FontWeightNormal); >+ break; >+ case CSSValue900: >+ fontDescription.setWeight(FontWeight900); >+ break; >+ case CSSValue800: >+ fontDescription.setWeight(FontWeight800); >+ break; >+ case CSSValue600: >+ fontDescription.setWeight(FontWeight600); >+ break; >+ case CSSValue500: >+ fontDescription.setWeight(FontWeight500); >+ break; >+ case CSSValue300: >+ fontDescription.setWeight(FontWeight300); >+ break; >+ case CSSValue200: >+ fontDescription.setWeight(FontWeight200); >+ break; >+ case CSSValue100: >+ fontDescription.setWeight(FontWeight100); >+ break; >+ default: >+ return; >+ } >+ } else >+ ASSERT_NOT_REACHED(); > } >- case CSSPrimitiveValue::CSS_COUNTER: { >- Counter* counterValue = contentValue->getCounterValue(); >- EListStyleType listStyleType = NoneListStyle; >- int listStyleIdent = counterValue->listStyleIdent(); >- if (listStyleIdent != CSSValueNone) >- listStyleType = static_cast<EListStyleType>(listStyleIdent - CSSValueDisc); >- OwnPtr<CounterContent> counter = adoptPtr(new CounterContent(counterValue->identifier(), listStyleType, counterValue->separator())); >- m_style->setContent(counter.release(), didSet); >- didSet = true; >- break; >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ return; >+ } >+ >+ case CSSPropertyListStylePosition: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(listStylePosition, ListStylePosition) >+ return; >+ case CSSPropertyListStyleType: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(listStyleType, ListStyleType) >+ return; >+ case CSSPropertyOverflow: >+ { >+ if (isInherit) { >+ m_style->setOverflowX(m_parentStyle->overflowX()); >+ m_style->setOverflowY(m_parentStyle->overflowY()); >+ return; > } >- case CSSPrimitiveValue::CSS_IDENT: >- switch (contentValue->getIdent()) { >- case CSSValueOpenQuote: >- m_style->setContent(OPEN_QUOTE, didSet); >- didSet = true; >- break; >- case CSSValueCloseQuote: >- m_style->setContent(CLOSE_QUOTE, didSet); >- didSet = true; >- break; >- case CSSValueNoOpenQuote: >- m_style->setContent(NO_OPEN_QUOTE, didSet); >- didSet = true; >- break; >- case CSSValueNoCloseQuote: >- m_style->setContent(NO_CLOSE_QUOTE, didSet); >- didSet = true; >- break; >- default: >- // normal and none do not have any effect. >- {} >- } >+ >+ if (isInitial) { >+ m_style->setOverflowX(RenderStyle::initialOverflowX()); >+ m_style->setOverflowY(RenderStyle::initialOverflowY()); >+ return; > } >+ >+ EOverflow o = *primitiveValue; >+ >+ m_style->setOverflowX(o); >+ m_style->setOverflowY(o); >+ return; > } >- if (!didSet) >- m_style->clearContent(); >- return; >- } >- case CSSPropertyQuotes: >- if (isInherit) { >- if (m_parentStyle) >- m_style->setQuotes(m_parentStyle->quotes()); >+ >+ case CSSPropertyOverflowX: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(overflowX, OverflowX) >+ return; >+ case CSSPropertyOverflowY: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(overflowY, OverflowY) >+ return; >+ case CSSPropertyPageBreakBefore: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(pageBreakBefore, PageBreakBefore, PageBreak) >+ return; >+ case CSSPropertyPageBreakAfter: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(pageBreakAfter, PageBreakAfter, PageBreak) >+ return; >+ case CSSPropertyPageBreakInside: { >+ HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(pageBreakInside, PageBreakInside, PageBreak) >+ if (!primitiveValue) >+ return; >+ EPageBreak pageBreak = *primitiveValue; >+ if (pageBreak != PBALWAYS) >+ m_style->setPageBreakInside(pageBreak); > return; > } >- if (isInitial) { >- m_style->setQuotes(0); >+ >+ case CSSPropertyPosition: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(position, Position) >+ return; >+ case CSSPropertyTableLayout: { >+ HANDLE_INHERIT_AND_INITIAL(tableLayout, TableLayout) >+ >+ ETableLayout l = *primitiveValue; >+ if (l == TAUTO) >+ l = RenderStyle::initialTableLayout(); >+ >+ m_style->setTableLayout(l); > return; > } >- if (value->isValueList()) { >- CSSValueList* list = static_cast<CSSValueList*>(value); >- QuotesData* data = QuotesData::create(list->length()); >- if (!data) >- return; // Out of memory >- String* quotes = data->data(); >- for (CSSValueListIterator i = list; i.hasMore(); i.advance()) { >- CSSValue* item = i.value(); >- ASSERT(item->isPrimitiveValue()); >- primitiveValue = static_cast<CSSPrimitiveValue*>(item); >- ASSERT(primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_STRING); >- quotes[i.index()] = primitiveValue->getStringValue(); >- } >- m_style->setQuotes(adoptRef(data)); >- } else if (primitiveValue) { >- ASSERT(primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_IDENT); >- if (primitiveValue->getIdent() == CSSValueNone) >- m_style->setQuotes(adoptRef(QuotesData::create(0))); >+ >+ case CSSPropertyUnicodeBidi: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(unicodeBidi, UnicodeBidi) >+ return; >+ case CSSPropertyTextTransform: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textTransform, TextTransform) >+ return; >+ case CSSPropertyVisibility: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(visibility, Visibility) >+ return; >+ case CSSPropertyWhiteSpace: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(whiteSpace, WhiteSpace) >+ return; >+ >+ case CSSPropertyBackgroundPosition: >+ HANDLE_BACKGROUND_INHERIT_AND_INITIAL(xPosition, XPosition); >+ HANDLE_BACKGROUND_INHERIT_AND_INITIAL(yPosition, YPosition); >+ return; >+ case CSSPropertyBackgroundPositionX: { >+ HANDLE_BACKGROUND_VALUE(xPosition, XPosition, value) >+ return; > } >- return; >- case CSSPropertyFontFamily: { >- // list of strings and ids >- if (isInherit) { >- FontDescription parentFontDescription = m_parentStyle->fontDescription(); >- FontDescription fontDescription = m_style->fontDescription(); >- fontDescription.setGenericFamily(parentFontDescription.genericFamily()); >- fontDescription.setFamily(parentFontDescription.firstFamily()); >- fontDescription.setIsSpecifiedFont(parentFontDescription.isSpecifiedFont()); >- setFontDescription(fontDescription); >+ case CSSPropertyBackgroundPositionY: { >+ HANDLE_BACKGROUND_VALUE(yPosition, YPosition, value) > return; >- } else if (isInitial) { >- FontDescription initialDesc = FontDescription(); >- FontDescription fontDescription = m_style->fontDescription(); >- // We need to adjust the size to account for the generic family change from monospace >- // to non-monospace. >- if (fontDescription.keywordSize() && fontDescription.useFixedDefaultSize()) >- setFontSize(fontDescription, fontSizeForKeyword(m_checker.document(), CSSValueXxSmall + fontDescription.keywordSize() - 1, false)); >- fontDescription.setGenericFamily(initialDesc.genericFamily()); >- if (!initialDesc.firstFamily().familyIsEmpty()) >- fontDescription.setFamily(initialDesc.firstFamily()); >- setFontDescription(fontDescription); >+ } >+ case CSSPropertyWebkitMaskPosition: >+ HANDLE_MASK_INHERIT_AND_INITIAL(xPosition, XPosition); >+ HANDLE_MASK_INHERIT_AND_INITIAL(yPosition, YPosition); >+ return; >+ case CSSPropertyWebkitMaskPositionX: { >+ HANDLE_MASK_VALUE(xPosition, XPosition, value) > return; > } >- >- if (!value->isValueList()) >+ case CSSPropertyWebkitMaskPositionY: { >+ HANDLE_MASK_VALUE(yPosition, YPosition, value) > return; >- FontDescription fontDescription = m_style->fontDescription(); >- FontFamily& firstFamily = fontDescription.firstFamily(); >- FontFamily* currFamily = 0; >- >- // Before mapping in a new font-family property, we should reset the generic family. >- bool oldFamilyUsedFixedDefaultSize = fontDescription.useFixedDefaultSize(); >- fontDescription.setGenericFamily(FontDescription::NoFamily); >- >- for (CSSValueListIterator i = value; i.hasMore(); i.advance()) { >- CSSValue* item = i.value(); >- if (!item->isPrimitiveValue()) >- continue; >- CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(item); >- AtomicString face; >- Settings* settings = m_checker.document()->settings(); >- if (contentValue->primitiveType() == CSSPrimitiveValue::CSS_STRING) { >- if (contentValue->isFontFamilyValue()) >- face = static_cast<FontFamilyValue*>(contentValue)->familyName(); >- } else if (contentValue->primitiveType() == CSSPrimitiveValue::CSS_IDENT && settings) { >- switch (contentValue->getIdent()) { >- case CSSValueWebkitBody: >- face = settings->standardFontFamily(); >- break; >- case CSSValueSerif: >- face = serifFamily; >- fontDescription.setGenericFamily(FontDescription::SerifFamily); >- break; >- case CSSValueSansSerif: >- face = sansSerifFamily; >- fontDescription.setGenericFamily(FontDescription::SansSerifFamily); >- break; >- case CSSValueCursive: >- face = cursiveFamily; >- fontDescription.setGenericFamily(FontDescription::CursiveFamily); >- break; >- case CSSValueFantasy: >- face = fantasyFamily; >- fontDescription.setGenericFamily(FontDescription::FantasyFamily); >- break; >- case CSSValueMonospace: >- face = monospaceFamily; >- fontDescription.setGenericFamily(FontDescription::MonospaceFamily); >- break; >- case CSSValueWebkitPictograph: >- face = pictographFamily; >- fontDescription.setGenericFamily(FontDescription::PictographFamily); >- break; >- } >+ } >+ case CSSPropertyBackgroundRepeat: >+ HANDLE_BACKGROUND_INHERIT_AND_INITIAL(repeatX, RepeatX); >+ HANDLE_BACKGROUND_INHERIT_AND_INITIAL(repeatY, RepeatY); >+ return; >+ case CSSPropertyBackgroundRepeatX: >+ HANDLE_BACKGROUND_VALUE(repeatX, RepeatX, value) >+ return; >+ case CSSPropertyBackgroundRepeatY: >+ HANDLE_BACKGROUND_VALUE(repeatY, RepeatY, value) >+ return; >+ case CSSPropertyWebkitMaskRepeat: >+ HANDLE_MASK_INHERIT_AND_INITIAL(repeatX, RepeatX); >+ HANDLE_MASK_INHERIT_AND_INITIAL(repeatY, RepeatY); >+ return; >+ case CSSPropertyWebkitMaskRepeatX: >+ HANDLE_MASK_VALUE(repeatX, RepeatX, value) >+ return; >+ case CSSPropertyWebkitMaskRepeatY: >+ HANDLE_MASK_VALUE(repeatY, RepeatY, value) >+ return; >+ case CSSPropertyBorderSpacing: { >+ if (isInherit) { >+ m_style->setHorizontalBorderSpacing(m_parentStyle->horizontalBorderSpacing()); >+ m_style->setVerticalBorderSpacing(m_parentStyle->verticalBorderSpacing()); > } >- >- if (!face.isEmpty()) { >- if (!currFamily) { >- // Filling in the first family. >- firstFamily.setFamily(face); >- firstFamily.appendFamily(0); // Remove any inherited family-fallback list. >- currFamily = &firstFamily; >- fontDescription.setIsSpecifiedFont(fontDescription.genericFamily() == FontDescription::NoFamily); >- } else { >- RefPtr<SharedFontFamily> newFamily = SharedFontFamily::create(); >- newFamily->setFamily(face); >- currFamily->appendFamily(newFamily); >- currFamily = newFamily.get(); >- } >+ else if (isInitial) { >+ m_style->setHorizontalBorderSpacing(0); >+ m_style->setVerticalBorderSpacing(0); > } >+ return; > } >- >- // We can't call useFixedDefaultSize() until all new font families have been added >- // If currFamily is non-zero then we set at least one family on this description. >- if (currFamily) { >- if (fontDescription.keywordSize() && fontDescription.useFixedDefaultSize() != oldFamilyUsedFixedDefaultSize) >- setFontSize(fontDescription, fontSizeForKeyword(m_checker.document(), CSSValueXxSmall + fontDescription.keywordSize() - 1, !oldFamilyUsedFixedDefaultSize)); >- >- setFontDescription(fontDescription); >- } >- return; >- } >- case CSSPropertyTextDecoration: { >- // list of ident >- HANDLE_INHERIT_AND_INITIAL(textDecoration, TextDecoration) >- int t = RenderStyle::initialTextDecoration(); >- if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) { >- // do nothing >- } else { >- if (!value->isValueList()) >+ case CSSPropertyWebkitBorderHorizontalSpacing: { >+ HANDLE_INHERIT_AND_INITIAL(horizontalBorderSpacing, HorizontalBorderSpacing) >+ if (!primitiveValue) > return; >- for (CSSValueListIterator i = value; i.hasMore(); i.advance()) >- { >- CSSValue* item = i.value(); >- if (!item->isPrimitiveValue()) >- continue; >- primitiveValue = static_cast<CSSPrimitiveValue*>(item); >- switch (primitiveValue->getIdent()) { >- case CSSValueNone: >- t = TDNONE; break; >- case CSSValueUnderline: >- t |= UNDERLINE; break; >- case CSSValueOverline: >- t |= OVERLINE; break; >- case CSSValueLineThrough: >- t |= LINE_THROUGH; break; >- case CSSValueBlink: >- t |= BLINK; break; >- default: >- return; >- } >- } >+ short spacing = primitiveValue->computeLength<unsigned short>(style(), m_rootElementStyle, zoomFactor); >+ m_style->setHorizontalBorderSpacing(spacing); >+ return; > } >- >- m_style->setTextDecoration(t); >- return; >- } >- >- case CSSPropertyZoom: >- { >- // Reset the zoom in effect before we do anything. This allows the setZoom method to accurately compute a new >- // zoom in effect. >- setEffectiveZoom(m_parentStyle ? m_parentStyle->effectiveZoom() : RenderStyle::initialZoom()); >- >- if (isInherit) >- setZoom(m_parentStyle->zoom()); >- else if (isInitial || primitiveValue->getIdent() == CSSValueNormal) >- setZoom(RenderStyle::initialZoom()); >- else if (primitiveValue->getIdent() == CSSValueReset) { >- setEffectiveZoom(RenderStyle::initialZoom()); >- setZoom(RenderStyle::initialZoom()); >- } else if (primitiveValue->getIdent() == CSSValueDocument) { >- float docZoom = m_checker.document()->renderer()->style()->zoom(); >- setEffectiveZoom(docZoom); >- setZoom(docZoom); >- } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE) { >- if (primitiveValue->getFloatValue()) >- setZoom(primitiveValue->getFloatValue() / 100.0f); >- } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) { >- if (primitiveValue->getFloatValue()) >- setZoom(primitiveValue->getFloatValue()); >+ case CSSPropertyWebkitBorderVerticalSpacing: { >+ HANDLE_INHERIT_AND_INITIAL(verticalBorderSpacing, VerticalBorderSpacing) >+ if (!primitiveValue) >+ return; >+ short spacing = primitiveValue->computeLength<unsigned short>(style(), m_rootElementStyle, zoomFactor); >+ m_style->setVerticalBorderSpacing(spacing); >+ return; > } >- return; >- } >-// shorthand properties >- case CSSPropertyBackground: >- if (isInitial) { >- m_style->clearBackgroundLayers(); >- m_style->setBackgroundColor(Color()); >- } >- else if (isInherit) { >- m_style->inheritBackgroundLayers(*m_parentStyle->backgroundLayers()); >- m_style->setBackgroundColor(m_parentStyle->backgroundColor()); >- } >- return; >- case CSSPropertyWebkitMask: >- if (isInitial) >- m_style->clearMaskLayers(); >- else if (isInherit) >- m_style->inheritMaskLayers(*m_parentStyle->maskLayers()); >- return; >- case CSSPropertyFont: >- if (isInherit) { >- FontDescription fontDescription = m_parentStyle->fontDescription(); >- m_style->setLineHeight(m_parentStyle->lineHeight()); >- m_lineHeightValue = 0; >- setFontDescription(fontDescription); >- } else if (isInitial) { >- Settings* settings = m_checker.document()->settings(); >- ASSERT(settings); // If we're doing style resolution, this document should always be in a frame and thus have settings >- if (!settings) >+ case CSSPropertyCursor: >+ if (isInherit) { >+ m_style->setCursor(m_parentStyle->cursor()); >+ m_style->setCursorList(m_parentStyle->cursors()); > return; >- FontDescription fontDescription; >- fontDescription.setGenericFamily(FontDescription::StandardFamily); >- fontDescription.setRenderingMode(settings->fontRenderingMode()); >- fontDescription.setUsePrinterFont(m_checker.document()->printing()); >- const AtomicString& standardFontFamily = m_checker.document()->settings()->standardFontFamily(); >- if (!standardFontFamily.isEmpty()) { >- fontDescription.firstFamily().setFamily(standardFontFamily); >- fontDescription.firstFamily().appendFamily(0); >- } >- fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1); >- setFontSize(fontDescription, fontSizeForKeyword(m_checker.document(), CSSValueMedium, false)); >- m_style->setLineHeight(RenderStyle::initialLineHeight()); >- m_lineHeightValue = 0; >- setFontDescription(fontDescription); >- } else if (primitiveValue) { >- m_style->setLineHeight(RenderStyle::initialLineHeight()); >- m_lineHeightValue = 0; >- >- FontDescription fontDescription; >- RenderTheme::defaultTheme()->systemFont(primitiveValue->getIdent(), fontDescription); >- >- // Double-check and see if the theme did anything. If not, don't bother updating the font. >- if (fontDescription.isAbsoluteSize()) { >- // Make sure the rendering mode and printer font settings are updated. >- Settings* settings = m_checker.document()->settings(); >- ASSERT(settings); // If we're doing style resolution, this document should always be in a frame and thus have settings >- if (!settings) >- return; >- fontDescription.setRenderingMode(settings->fontRenderingMode()); >- fontDescription.setUsePrinterFont(m_checker.document()->printing()); >- >- // Handle the zoom factor. >- fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(m_checker.document(), m_style.get(), fontDescription.isAbsoluteSize(), fontDescription.specifiedSize(), useSVGZoomRules())); >- setFontDescription(fontDescription); > } >- } else if (value->isFontValue()) { >- FontValue *font = static_cast<FontValue*>(value); >- if (!font->style || !font->variant || !font->weight || >- !font->size || !font->lineHeight || !font->family) >+ m_style->clearCursorList(); >+ if (isInitial) { >+ m_style->setCursor(RenderStyle::initialCursor()); > return; >- applyProperty(CSSPropertyFontStyle, font->style.get()); >- applyProperty(CSSPropertyFontVariant, font->variant.get()); >- applyProperty(CSSPropertyFontWeight, font->weight.get()); >- // The previous properties can dirty our font but they don't try to read the font's >- // properties back, which is safe. However if font-size is using the 'ex' unit, it will >- // need query the dirtied font's x-height to get the computed size. To be safe in this >- // case, let's just update the font now. >- updateFont(); >- applyProperty(CSSPropertyFontSize, font->size.get()); >- >- m_lineHeightValue = font->lineHeight.get(); >- >- applyProperty(CSSPropertyFontFamily, font->family.get()); >+ } >+ if (value->isValueList()) { >+ CSSValueList* list = static_cast<CSSValueList*>(value); >+ int len = list->length(); >+ m_style->setCursor(CURSOR_AUTO); >+ for (int i = 0; i < len; i++) { >+ CSSValue* item = list->itemWithoutBoundsCheck(i); >+ if (!item->isPrimitiveValue()) >+ continue; >+ primitiveValue = static_cast<CSSPrimitiveValue*>(item); >+ int type = primitiveValue->primitiveType(); >+ if (type == CSSPrimitiveValue::CSS_URI) { >+ if (primitiveValue->isCursorImageValue()) { >+ CSSCursorImageValue* image = static_cast<CSSCursorImageValue*>(primitiveValue); >+ if (image->updateIfSVGCursorIsUsed(m_element)) // Elements with SVG cursors are not allowed to share style. >+ m_style->setUnique(); >+ m_style->addCursor(cachedOrPendingFromValue(CSSPropertyCursor, image), image->hotSpot()); >+ } >+ } else if (type == CSSPrimitiveValue::CSS_IDENT) >+ m_style->setCursor(*primitiveValue); >+ } >+ } else if (primitiveValue) { >+ int type = primitiveValue->primitiveType(); >+ if (type == CSSPrimitiveValue::CSS_IDENT && m_style->cursor() != ECursor(*primitiveValue)) >+ m_style->setCursor(*primitiveValue); >+ } >+ return; >+ // colors || inherit >+ case CSSPropertyColor: >+ // If the 'currentColor' keyword is set on the 'color' property itself, >+ // it is treated as 'color:inherit' at parse time >+ if (primitiveValue && primitiveValue->getIdent() == CSSValueCurrentcolor) >+ isInherit = true; >+ case CSSPropertyBackgroundColor: >+ case CSSPropertyBorderTopColor: >+ case CSSPropertyBorderRightColor: >+ case CSSPropertyBorderBottomColor: >+ case CSSPropertyBorderLeftColor: >+ case CSSPropertyOutlineColor: >+ case CSSPropertyWebkitColumnRuleColor: >+ case CSSPropertyWebkitTextStrokeColor: >+ case CSSPropertyWebkitTextEmphasisColor: >+ case CSSPropertyWebkitTextFillColor: { >+ Color col; >+ if (isInherit) { >+ HANDLE_INHERIT_COND(CSSPropertyBackgroundColor, backgroundColor, BackgroundColor) >+ HANDLE_INHERIT_COND_WITH_BACKUP(CSSPropertyBorderTopColor, borderTopColor, color, BorderTopColor) >+ HANDLE_INHERIT_COND_WITH_BACKUP(CSSPropertyBorderBottomColor, borderBottomColor, color, BorderBottomColor) >+ HANDLE_INHERIT_COND_WITH_BACKUP(CSSPropertyBorderRightColor, borderRightColor, color, BorderRightColor) >+ HANDLE_INHERIT_COND_WITH_BACKUP(CSSPropertyBorderLeftColor, borderLeftColor, color, BorderLeftColor) >+ HANDLE_INHERIT_COND(CSSPropertyColor, color, Color) >+ HANDLE_INHERIT_COND_WITH_BACKUP(CSSPropertyOutlineColor, outlineColor, color, OutlineColor) >+ HANDLE_INHERIT_COND_WITH_BACKUP(CSSPropertyWebkitColumnRuleColor, columnRuleColor, color, ColumnRuleColor) >+ HANDLE_INHERIT_COND_WITH_BACKUP(CSSPropertyWebkitTextStrokeColor, textStrokeColor, color, TextStrokeColor) >+ HANDLE_INHERIT_COND_WITH_BACKUP(CSSPropertyWebkitTextEmphasisColor, textEmphasisColor, color, TextEmphasisColor) >+ HANDLE_INHERIT_COND_WITH_BACKUP(CSSPropertyWebkitTextFillColor, textFillColor, color, TextFillColor) >+ return; >+ } >+ if (isInitial) { >+ // The border/outline colors will just map to the invalid color |col| above. This will have the >+ // effect of forcing the use of the currentColor when it comes time to draw the borders (and of >+ // not painting the background since the color won't be valid). >+ if (id == CSSPropertyColor) >+ col = RenderStyle::initialColor(); >+ } else { >+ if (!primitiveValue) >+ return; >+ col = getColorFromPrimitiveValue(primitiveValue); >+ } >+ >+ switch (id) { >+ case CSSPropertyBackgroundColor: >+ m_style->setBackgroundColor(col); >+ break; >+ case CSSPropertyBorderTopColor: >+ m_style->setBorderTopColor(col); >+ break; >+ case CSSPropertyBorderRightColor: >+ m_style->setBorderRightColor(col); >+ break; >+ case CSSPropertyBorderBottomColor: >+ m_style->setBorderBottomColor(col); >+ break; >+ case CSSPropertyBorderLeftColor: >+ m_style->setBorderLeftColor(col); >+ break; >+ case CSSPropertyColor: >+ m_style->setColor(col); >+ break; >+ case CSSPropertyOutlineColor: >+ m_style->setOutlineColor(col); >+ break; >+ case CSSPropertyWebkitColumnRuleColor: >+ m_style->setColumnRuleColor(col); >+ break; >+ case CSSPropertyWebkitTextStrokeColor: >+ m_style->setTextStrokeColor(col); >+ break; >+ case CSSPropertyWebkitTextEmphasisColor: >+ m_style->setTextEmphasisColor(col); >+ break; >+ case CSSPropertyWebkitTextFillColor: >+ m_style->setTextFillColor(col); >+ break; >+ } >+ >+ return; >+ } >+ >+ // uri || inherit >+ case CSSPropertyBackgroundImage: >+ HANDLE_BACKGROUND_VALUE(image, Image, value) >+ return; >+ case CSSPropertyWebkitMaskImage: >+ HANDLE_MASK_VALUE(image, Image, value) >+ return; >+ case CSSPropertyListStyleImage: >+ { >+ HANDLE_INHERIT_AND_INITIAL(listStyleImage, ListStyleImage) >+ m_style->setListStyleImage(styleImage(CSSPropertyListStyleImage, value)); >+ return; >+ } >+ >+ // length >+ case CSSPropertyBorderTopWidth: >+ case CSSPropertyBorderRightWidth: >+ case CSSPropertyBorderBottomWidth: >+ case CSSPropertyBorderLeftWidth: >+ case CSSPropertyOutlineWidth: >+ case CSSPropertyWebkitColumnRuleWidth: >+ { >+ if (isInherit) { >+ HANDLE_INHERIT_COND(CSSPropertyBorderTopWidth, borderTopWidth, BorderTopWidth) >+ HANDLE_INHERIT_COND(CSSPropertyBorderRightWidth, borderRightWidth, BorderRightWidth) >+ HANDLE_INHERIT_COND(CSSPropertyBorderBottomWidth, borderBottomWidth, BorderBottomWidth) >+ HANDLE_INHERIT_COND(CSSPropertyBorderLeftWidth, borderLeftWidth, BorderLeftWidth) >+ HANDLE_INHERIT_COND(CSSPropertyOutlineWidth, outlineWidth, OutlineWidth) >+ HANDLE_INHERIT_COND(CSSPropertyWebkitColumnRuleWidth, columnRuleWidth, ColumnRuleWidth) >+ return; >+ } >+ else if (isInitial) { >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBorderTopWidth, BorderTopWidth, BorderWidth) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBorderRightWidth, BorderRightWidth, BorderWidth) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBorderBottomWidth, BorderBottomWidth, BorderWidth) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBorderLeftWidth, BorderLeftWidth, BorderWidth) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyOutlineWidth, OutlineWidth, BorderWidth) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyWebkitColumnRuleWidth, ColumnRuleWidth, BorderWidth) >+ return; >+ } >+ >+ if (!primitiveValue) >+ return; >+ short width = 3; >+ switch (primitiveValue->getIdent()) { >+ case CSSValueThin: >+ width = 1; >+ break; >+ case CSSValueMedium: >+ width = 3; >+ break; >+ case CSSValueThick: >+ width = 5; >+ break; >+ case CSSValueInvalid: >+ width = primitiveValue->computeLength<unsigned short>(style(), m_rootElementStyle, zoomFactor); >+ break; >+ default: >+ return; >+ } >+ >+ if (width < 0) return; >+ switch (id) { >+ case CSSPropertyBorderTopWidth: >+ m_style->setBorderTopWidth(width); >+ break; >+ case CSSPropertyBorderRightWidth: >+ m_style->setBorderRightWidth(width); >+ break; >+ case CSSPropertyBorderBottomWidth: >+ m_style->setBorderBottomWidth(width); >+ break; >+ case CSSPropertyBorderLeftWidth: >+ m_style->setBorderLeftWidth(width); >+ break; >+ case CSSPropertyOutlineWidth: >+ m_style->setOutlineWidth(width); >+ break; >+ case CSSPropertyWebkitColumnRuleWidth: >+ m_style->setColumnRuleWidth(width); >+ break; >+ default: >+ return; >+ } >+ return; >+ } >+ >+ case CSSPropertyWebkitFontSmoothing: { >+ FontDescription fontDescription = m_style->fontDescription(); >+ if (isInherit) >+ fontDescription.setFontSmoothing(m_parentStyle->fontDescription().fontSmoothing()); >+ else if (isInitial) >+ fontDescription.setFontSmoothing(AutoSmoothing); >+ else { >+ if (!primitiveValue) >+ return; >+ int id = primitiveValue->getIdent(); >+ FontSmoothingMode smoothing; >+ switch (id) { >+ case CSSValueAuto: >+ smoothing = AutoSmoothing; >+ break; >+ case CSSValueNone: >+ smoothing = NoSmoothing; >+ break; >+ case CSSValueAntialiased: >+ smoothing = Antialiased; >+ break; >+ case CSSValueSubpixelAntialiased: >+ smoothing = SubpixelAntialiased; >+ break; >+ default: >+ ASSERT_NOT_REACHED(); >+ smoothing = AutoSmoothing; >+ } >+ fontDescription.setFontSmoothing(smoothing); >+ } >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ return; >+ } >+ >+ case CSSPropertyLetterSpacing: >+ case CSSPropertyWordSpacing: >+ { >+ >+ if (isInherit) { >+ HANDLE_INHERIT_COND(CSSPropertyLetterSpacing, letterSpacing, LetterSpacing) >+ HANDLE_INHERIT_COND(CSSPropertyWordSpacing, wordSpacing, WordSpacing) >+ return; >+ } >+ else if (isInitial) { >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyLetterSpacing, LetterSpacing, LetterWordSpacing) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyWordSpacing, WordSpacing, LetterWordSpacing) >+ return; >+ } >+ >+ int width = 0; >+ if (primitiveValue && primitiveValue->getIdent() == CSSValueNormal) { >+ width = 0; >+ } else { >+ if (!primitiveValue) >+ return; >+ width = primitiveValue->computeLength<int>(style(), m_rootElementStyle, useSVGZoomRules ? 1.0f : zoomFactor); >+ } >+ switch (id) { >+ case CSSPropertyLetterSpacing: >+ m_style->setLetterSpacing(width); >+ break; >+ case CSSPropertyWordSpacing: >+ m_style->setWordSpacing(width); >+ break; >+ // ### needs the definitions in renderstyle >+ default: break; >+ } >+ return; >+ } >+ >+ case CSSPropertyWordBreak: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(wordBreak, WordBreak) >+ return; >+ case CSSPropertyWordWrap: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(wordWrap, WordWrap) >+ return; >+ case CSSPropertyWebkitNbspMode: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(nbspMode, NBSPMode) >+ return; >+ case CSSPropertyWebkitLineBreak: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(khtmlLineBreak, KHTMLLineBreak) >+ return; >+ case CSSPropertyWebkitMatchNearestMailBlockquoteColor: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(matchNearestMailBlockquoteColor, MatchNearestMailBlockquoteColor) >+ return; >+ >+ case CSSPropertyResize: >+ { >+ HANDLE_INHERIT_AND_INITIAL(resize, Resize) >+ >+ if (!primitiveValue->getIdent()) >+ return; >+ >+ EResize r = RESIZE_NONE; >+ if (primitiveValue->getIdent() == CSSValueAuto) { >+ if (Settings* settings = m_checker.document()->settings()) >+ r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE; >+ } else >+ r = *primitiveValue; >+ >+ m_style->setResize(r); >+ return; >+ } >+ >+ // length, percent >+ case CSSPropertyMaxWidth: >+ // +none +inherit >+ if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) { >+ l = Length(Undefined); >+ apply = true; >+ } >+ case CSSPropertyTop: >+ case CSSPropertyLeft: >+ case CSSPropertyRight: >+ case CSSPropertyBottom: >+ case CSSPropertyWidth: >+ case CSSPropertyMinWidth: >+ case CSSPropertyMarginTop: >+ case CSSPropertyMarginRight: >+ case CSSPropertyMarginBottom: >+ case CSSPropertyMarginLeft: >+ // +inherit +auto >+ if (id == CSSPropertyWidth || id == CSSPropertyMinWidth || id == CSSPropertyMaxWidth) { >+ if (primitiveValue && primitiveValue->getIdent() == CSSValueIntrinsic) { >+ l = Length(Intrinsic); >+ apply = true; >+ } >+ else if (primitiveValue && primitiveValue->getIdent() == CSSValueMinIntrinsic) { >+ l = Length(MinIntrinsic); >+ apply = true; >+ } >+ } >+ if (id != CSSPropertyMaxWidth && primitiveValue && primitiveValue->getIdent() == CSSValueAuto) >+ apply = true; >+ case CSSPropertyPaddingTop: >+ case CSSPropertyPaddingRight: >+ case CSSPropertyPaddingBottom: >+ case CSSPropertyPaddingLeft: >+ case CSSPropertyTextIndent: >+ // +inherit >+ { >+ if (isInherit) { >+ HANDLE_INHERIT_COND(CSSPropertyMaxWidth, maxWidth, MaxWidth) >+ HANDLE_INHERIT_COND(CSSPropertyBottom, bottom, Bottom) >+ HANDLE_INHERIT_COND(CSSPropertyTop, top, Top) >+ HANDLE_INHERIT_COND(CSSPropertyLeft, left, Left) >+ HANDLE_INHERIT_COND(CSSPropertyRight, right, Right) >+ HANDLE_INHERIT_COND(CSSPropertyWidth, width, Width) >+ HANDLE_INHERIT_COND(CSSPropertyMinWidth, minWidth, MinWidth) >+ HANDLE_INHERIT_COND(CSSPropertyPaddingTop, paddingTop, PaddingTop) >+ HANDLE_INHERIT_COND(CSSPropertyPaddingRight, paddingRight, PaddingRight) >+ HANDLE_INHERIT_COND(CSSPropertyPaddingBottom, paddingBottom, PaddingBottom) >+ HANDLE_INHERIT_COND(CSSPropertyPaddingLeft, paddingLeft, PaddingLeft) >+ HANDLE_INHERIT_COND(CSSPropertyMarginTop, marginTop, MarginTop) >+ HANDLE_INHERIT_COND(CSSPropertyMarginRight, marginRight, MarginRight) >+ HANDLE_INHERIT_COND(CSSPropertyMarginBottom, marginBottom, MarginBottom) >+ HANDLE_INHERIT_COND(CSSPropertyMarginLeft, marginLeft, MarginLeft) >+ HANDLE_INHERIT_COND(CSSPropertyTextIndent, textIndent, TextIndent) >+ return; >+ } >+ else if (isInitial) { >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyMaxWidth, MaxWidth, MaxSize) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBottom, Bottom, Offset) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyTop, Top, Offset) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyLeft, Left, Offset) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyRight, Right, Offset) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyWidth, Width, Size) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyMinWidth, MinWidth, MinSize) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyPaddingTop, PaddingTop, Padding) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyPaddingRight, PaddingRight, Padding) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyPaddingBottom, PaddingBottom, Padding) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyPaddingLeft, PaddingLeft, Padding) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyMarginTop, MarginTop, Margin) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyMarginRight, MarginRight, Margin) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyMarginBottom, MarginBottom, Margin) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyMarginLeft, MarginLeft, Margin) >+ HANDLE_INITIAL_COND(CSSPropertyTextIndent, TextIndent) >+ return; >+ } >+ >+ if (primitiveValue && !apply) { >+ int type = primitiveValue->primitiveType(); >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ // Handle our quirky margin units if we have them. >+ l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); >+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ l = Length(primitiveValue->getDoubleValue(), Percent); >+ else >+ return; >+ apply = true; >+ } >+ if (!apply) return; >+ switch (id) { >+ case CSSPropertyMaxWidth: >+ m_style->setMaxWidth(l); >+ break; >+ case CSSPropertyBottom: >+ m_style->setBottom(l); >+ break; >+ case CSSPropertyTop: >+ m_style->setTop(l); >+ break; >+ case CSSPropertyLeft: >+ m_style->setLeft(l); >+ break; >+ case CSSPropertyRight: >+ m_style->setRight(l); >+ break; >+ case CSSPropertyWidth: >+ m_style->setWidth(l); >+ break; >+ case CSSPropertyMinWidth: >+ m_style->setMinWidth(l); >+ break; >+ case CSSPropertyPaddingTop: >+ m_style->setPaddingTop(l); >+ break; >+ case CSSPropertyPaddingRight: >+ m_style->setPaddingRight(l); >+ break; >+ case CSSPropertyPaddingBottom: >+ m_style->setPaddingBottom(l); >+ break; >+ case CSSPropertyPaddingLeft: >+ m_style->setPaddingLeft(l); >+ break; >+ case CSSPropertyMarginTop: >+ m_style->setMarginTop(l); >+ break; >+ case CSSPropertyMarginRight: >+ m_style->setMarginRight(l); >+ break; >+ case CSSPropertyMarginBottom: >+ m_style->setMarginBottom(l); >+ break; >+ case CSSPropertyMarginLeft: >+ m_style->setMarginLeft(l); >+ break; >+ case CSSPropertyTextIndent: >+ m_style->setTextIndent(l); >+ break; >+ default: >+ break; >+ } >+ return; >+ } >+ >+ case CSSPropertyMaxHeight: >+ if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) { >+ l = Length(Undefined); >+ apply = true; >+ } >+ case CSSPropertyHeight: >+ case CSSPropertyMinHeight: >+ if (primitiveValue && primitiveValue->getIdent() == CSSValueIntrinsic) { >+ l = Length(Intrinsic); >+ apply = true; >+ } else if (primitiveValue && primitiveValue->getIdent() == CSSValueMinIntrinsic) { >+ l = Length(MinIntrinsic); >+ apply = true; >+ } else if (id != CSSPropertyMaxHeight && primitiveValue && primitiveValue->getIdent() == CSSValueAuto) >+ apply = true; >+ if (isInherit) { >+ HANDLE_INHERIT_COND(CSSPropertyMaxHeight, maxHeight, MaxHeight) >+ HANDLE_INHERIT_COND(CSSPropertyHeight, height, Height) >+ HANDLE_INHERIT_COND(CSSPropertyMinHeight, minHeight, MinHeight) >+ return; >+ } >+ if (isInitial) { >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyMaxHeight, MaxHeight, MaxSize) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyHeight, Height, Size) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyMinHeight, MinHeight, MinSize) >+ return; >+ } >+ >+ if (primitiveValue && !apply) { >+ unsigned short type = primitiveValue->primitiveType(); >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); >+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ l = Length(primitiveValue->getDoubleValue(), Percent); >+ else >+ return; >+ apply = true; >+ } >+ if (apply) >+ switch (id) { >+ case CSSPropertyMaxHeight: >+ m_style->setMaxHeight(l); >+ break; >+ case CSSPropertyHeight: >+ m_style->setHeight(l); >+ break; >+ case CSSPropertyMinHeight: >+ m_style->setMinHeight(l); >+ break; >+ } >+ return; >+ >+ case CSSPropertyVerticalAlign: >+ HANDLE_INHERIT_AND_INITIAL(verticalAlign, VerticalAlign) >+ if (!primitiveValue) >+ return; >+ if (primitiveValue->getIdent()) { >+ EVerticalAlign align; >+ >+ switch (primitiveValue->getIdent()) { >+ case CSSValueTop: >+ align = TOP; break; >+ case CSSValueBottom: >+ align = BOTTOM; break; >+ case CSSValueMiddle: >+ align = MIDDLE; break; >+ case CSSValueBaseline: >+ align = BASELINE; break; >+ case CSSValueTextBottom: >+ align = TEXT_BOTTOM; break; >+ case CSSValueTextTop: >+ align = TEXT_TOP; break; >+ case CSSValueSub: >+ align = SUB; break; >+ case CSSValueSuper: >+ align = SUPER; break; >+ case CSSValueWebkitBaselineMiddle: >+ align = BASELINE_MIDDLE; break; >+ default: >+ return; >+ } >+ m_style->setVerticalAlign(align); >+ return; >+ } else { >+ int type = primitiveValue->primitiveType(); >+ Length l; >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); >+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ l = Length(primitiveValue->getDoubleValue(), Percent); >+ >+ m_style->setVerticalAlign(LENGTH); >+ m_style->setVerticalAlignLength(l); >+ } >+ return; >+ >+ case CSSPropertyFontSize: >+ { >+ FontDescription fontDescription = m_style->fontDescription(); >+ fontDescription.setKeywordSize(0); >+ float oldSize = 0; >+ float size = 0; >+ >+ bool parentIsAbsoluteSize = false; >+ if (m_parentNode) { >+ oldSize = m_parentStyle->fontDescription().specifiedSize(); >+ parentIsAbsoluteSize = m_parentStyle->fontDescription().isAbsoluteSize(); >+ } >+ >+ if (isInherit) { >+ size = oldSize; >+ if (m_parentNode) >+ fontDescription.setKeywordSize(m_parentStyle->fontDescription().keywordSize()); >+ } else if (isInitial) { >+ size = fontSizeForKeyword(m_checker.document(), CSSValueMedium, fontDescription.useFixedDefaultSize()); >+ fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1); >+ } else if (primitiveValue->getIdent()) { >+ // Keywords are being used. >+ switch (primitiveValue->getIdent()) { >+ case CSSValueXxSmall: >+ case CSSValueXSmall: >+ case CSSValueSmall: >+ case CSSValueMedium: >+ case CSSValueLarge: >+ case CSSValueXLarge: >+ case CSSValueXxLarge: >+ case CSSValueWebkitXxxLarge: >+ size = fontSizeForKeyword(m_checker.document(), primitiveValue->getIdent(), fontDescription.useFixedDefaultSize()); >+ fontDescription.setKeywordSize(primitiveValue->getIdent() - CSSValueXxSmall + 1); >+ break; >+ case CSSValueLarger: >+ size = largerFontSize(oldSize, m_checker.document()->inQuirksMode()); >+ break; >+ case CSSValueSmaller: >+ size = smallerFontSize(oldSize, m_checker.document()->inQuirksMode()); >+ break; >+ default: >+ return; >+ } >+ >+ fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize && >+ (primitiveValue->getIdent() == CSSValueLarger || >+ primitiveValue->getIdent() == CSSValueSmaller)); >+ } else { >+ int type = primitiveValue->primitiveType(); >+ fontDescription.setIsAbsoluteSize(parentIsAbsoluteSize || >+ (type != CSSPrimitiveValue::CSS_PERCENTAGE && >+ type != CSSPrimitiveValue::CSS_EMS && >+ type != CSSPrimitiveValue::CSS_EXS && >+ type != CSSPrimitiveValue::CSS_REMS)); >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ size = primitiveValue->computeLength<float>(m_parentStyle, m_rootElementStyle, true); >+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ size = (primitiveValue->getFloatValue() * oldSize) / 100.0f; >+ else >+ return; >+ } >+ >+ if (size < 0) >+ return; >+ >+ setFontSize(fontDescription, size); >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ return; >+ } >+ >+ case CSSPropertyZIndex: { >+ if (isInherit) { >+ if (m_parentStyle->hasAutoZIndex()) >+ m_style->setHasAutoZIndex(); >+ else >+ m_style->setZIndex(m_parentStyle->zIndex()); >+ return; >+ } else if (isInitial || primitiveValue->getIdent() == CSSValueAuto) { >+ m_style->setHasAutoZIndex(); >+ return; >+ } >+ >+ // FIXME: Should clamp all sorts of other integer properties too. >+ m_style->setZIndex(clampToInteger(primitiveValue->getDoubleValue())); >+ return; >+ } >+ case CSSPropertyWidows: >+ { >+ HANDLE_INHERIT_AND_INITIAL(widows, Widows) >+ if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER) >+ return; >+ m_style->setWidows(primitiveValue->getIntValue()); >+ return; >+ } >+ >+ case CSSPropertyOrphans: >+ { >+ HANDLE_INHERIT_AND_INITIAL(orphans, Orphans) >+ if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER) >+ return; >+ m_style->setOrphans(primitiveValue->getIntValue()); >+ return; >+ } >+ >+ // length, percent, number >+ case CSSPropertyLineHeight: >+ { >+ HANDLE_INHERIT_AND_INITIAL(lineHeight, LineHeight) >+ if (!primitiveValue) >+ return; >+ Length lineHeight; >+ int type = primitiveValue->primitiveType(); >+ if (primitiveValue->getIdent() == CSSValueNormal) >+ lineHeight = Length(-100.0, Percent); >+ else if (CSSPrimitiveValue::isUnitTypeLength(type)) { >+ double multiplier = zoomFactor; >+ if (m_style->textSizeAdjust()) { >+ if (Frame* frame = m_checker.document()->frame()) >+ multiplier *= frame->textZoomFactor(); >+ } >+ lineHeight = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); >+ } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ lineHeight = Length((m_style->fontSize() * primitiveValue->getIntValue()) / 100, Fixed); >+ else if (type == CSSPrimitiveValue::CSS_NUMBER) >+ lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent); >+ else >+ return; >+ m_style->setLineHeight(lineHeight); >+ return; >+ } >+ >+ // string >+ case CSSPropertyTextAlign: >+ { >+ HANDLE_INHERIT_AND_INITIAL(textAlign, TextAlign) >+ if (!primitiveValue) >+ return; >+ int id = primitiveValue->getIdent(); >+ if (id == CSSValueStart) >+ m_style->setTextAlign(m_style->isLeftToRightDirection() ? LEFT : RIGHT); >+ else if (id == CSSValueEnd) >+ m_style->setTextAlign(m_style->isLeftToRightDirection() ? RIGHT : LEFT); >+ else >+ m_style->setTextAlign(*primitiveValue); >+ return; >+ } >+ >+ // rect >+ case CSSPropertyClip: >+ { >+ Length top; >+ Length right; >+ Length bottom; >+ Length left; >+ bool hasClip = true; >+ if (isInherit) { >+ if (m_parentStyle->hasClip()) { >+ top = m_parentStyle->clipTop(); >+ right = m_parentStyle->clipRight(); >+ bottom = m_parentStyle->clipBottom(); >+ left = m_parentStyle->clipLeft(); >+ } else { >+ hasClip = false; >+ top = right = bottom = left = Length(); >+ } >+ } else if (isInitial) { >+ hasClip = false; >+ top = right = bottom = left = Length(); >+ } else if (!primitiveValue) { >+ return; >+ } else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_RECT) { >+ Rect* rect = primitiveValue->getRectValue(); >+ if (!rect) >+ return; >+ top = convertToIntLength(rect->top(), style(), m_rootElementStyle, zoomFactor); >+ right = convertToIntLength(rect->right(), style(), m_rootElementStyle, zoomFactor); >+ bottom = convertToIntLength(rect->bottom(), style(), m_rootElementStyle, zoomFactor); >+ left = convertToIntLength(rect->left(), style(), m_rootElementStyle, zoomFactor); >+ } else if (primitiveValue->getIdent() != CSSValueAuto) { >+ return; >+ } >+ m_style->setClip(top, right, bottom, left); >+ m_style->setHasClip(hasClip); >+ >+ // rect, ident >+ return; >+ } >+ >+ // lists >+ case CSSPropertyContent: >+ // list of string, uri, counter, attr, i >+ { >+ // FIXME: In CSS3, it will be possible to inherit content. In CSS2 it is not. This >+ // note is a reminder that eventually "inherit" needs to be supported. >+ >+ if (isInitial) { >+ m_style->clearContent(); >+ return; >+ } >+ >+ if (!value->isValueList()) >+ return; >+ >+ CSSValueList* list = static_cast<CSSValueList*>(value); >+ int len = list->length(); >+ >+ bool didSet = false; >+ for (int i = 0; i < len; i++) { >+ CSSValue* item = list->itemWithoutBoundsCheck(i); >+ if (item->isImageGeneratorValue()) { >+ m_style->setContent(static_cast<CSSImageGeneratorValue*>(item)->generatedImage(), didSet); >+ didSet = true; >+ } >+ >+ if (!item->isPrimitiveValue()) >+ continue; >+ >+ CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(item); >+ switch (contentValue->primitiveType()) { >+ case CSSPrimitiveValue::CSS_STRING: >+ m_style->setContent(contentValue->getStringValue().impl(), didSet); >+ didSet = true; >+ break; >+ case CSSPrimitiveValue::CSS_ATTR: { >+ // FIXME: Can a namespace be specified for an attr(foo)? >+ if (m_style->styleType() == NOPSEUDO) >+ m_style->setUnique(); >+ else >+ m_parentStyle->setUnique(); >+ QualifiedName attr(nullAtom, contentValue->getStringValue().impl(), nullAtom); >+ m_style->setContent(m_element->getAttribute(attr).impl(), didSet); >+ didSet = true; >+ // register the fact that the attribute value affects the style >+ m_features.attrsInRules.add(attr.localName().impl()); >+ break; >+ } >+ case CSSPrimitiveValue::CSS_URI: { >+ if (!contentValue->isImageValue()) >+ break; >+ m_style->setContent(cachedOrPendingFromValue(CSSPropertyContent, static_cast<CSSImageValue*>(contentValue)), didSet); >+ didSet = true; >+ break; >+ } >+ case CSSPrimitiveValue::CSS_COUNTER: { >+/* Counter* counterValue = contentValue->getCounterValue(); >+ OwnPtr<CounterContent> counter = adoptPtr(new CounterContent(counterValue->identifier(), >+ (EListStyleType)counterValue->listStyleNumber(), counterValue->separator())); >+ m_style->setContent(counter.release(), didSet); >+ didSet = true;*/ >+ break; >+ } >+ case CSSPrimitiveValue::CSS_IDENT: >+ switch (contentValue->getIdent()) { >+ case CSSValueOpenQuote: >+ m_style->setContent(OPEN_QUOTE, didSet); >+ didSet = true; >+ break; >+ case CSSValueCloseQuote: >+ m_style->setContent(CLOSE_QUOTE, didSet); >+ didSet = true; >+ break; >+ case CSSValueNoOpenQuote: >+ m_style->setContent(NO_OPEN_QUOTE, didSet); >+ didSet = true; >+ break; >+ case CSSValueNoCloseQuote: >+ m_style->setContent(NO_CLOSE_QUOTE, didSet); >+ didSet = true; >+ break; >+ default: >+ // normal and none do not have any effect. >+ {} >+ } >+ } >+ } >+ if (!didSet) >+ m_style->clearContent(); >+ return; >+ } >+ case CSSPropertyQuotes: >+ if (isInherit) { >+ if (m_parentStyle) >+ m_style->setQuotes(m_parentStyle->quotes()); >+ return; >+ } >+ if (isInitial) { >+ m_style->setQuotes(0); >+ return; >+ } >+ if (value->isValueList()) { >+ CSSValueList* list = static_cast<CSSValueList*>(value); >+ size_t length = list->length(); >+ QuotesData* data = QuotesData::create(length); >+ if (!data) >+ return; // Out of memory >+ String* quotes = data->data(); >+ for (size_t i = 0; i < length; i++) { >+ CSSValue* item = list->itemWithoutBoundsCheck(i); >+ ASSERT(item->isPrimitiveValue()); >+ primitiveValue = static_cast<CSSPrimitiveValue*>(item); >+ ASSERT(primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_STRING); >+ quotes[i] = primitiveValue->getStringValue(); >+ } >+ m_style->setQuotes(adoptRef(data)); >+ } else if (primitiveValue) { >+ ASSERT(primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_IDENT); >+ if (primitiveValue->getIdent() == CSSValueNone) >+ m_style->setQuotes(adoptRef(QuotesData::create(0))); >+ } >+ return; >+ >+ case CSSPropertyCounterIncrement: >+// applyCounterList(style(), value->isValueList() ? static_cast<CSSValueList*>(value) : 0, false); >+ return; >+ case CSSPropertyCounterReset: >+// applyCounterList(style(), value->isValueList() ? static_cast<CSSValueList*>(value) : 0, true); >+ return; >+ >+ case CSSPropertyFontFamily: { >+ // list of strings and ids >+ if (isInherit) { >+ FontDescription parentFontDescription = m_parentStyle->fontDescription(); >+ FontDescription fontDescription = m_style->fontDescription(); >+ fontDescription.setGenericFamily(parentFontDescription.genericFamily()); >+ fontDescription.setFamily(parentFontDescription.firstFamily()); >+ fontDescription.setIsSpecifiedFont(parentFontDescription.isSpecifiedFont()); >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ return; >+ } else if (isInitial) { >+ FontDescription initialDesc = FontDescription(); >+ FontDescription fontDescription = m_style->fontDescription(); >+ // We need to adjust the size to account for the generic family change from monospace >+ // to non-monospace. >+ if (fontDescription.keywordSize() && fontDescription.useFixedDefaultSize()) >+ setFontSize(fontDescription, fontSizeForKeyword(m_checker.document(), CSSValueXxSmall + fontDescription.keywordSize() - 1, false)); >+ fontDescription.setGenericFamily(initialDesc.genericFamily()); >+ if (!initialDesc.firstFamily().familyIsEmpty()) >+ fontDescription.setFamily(initialDesc.firstFamily()); >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ return; >+ } >+ >+ if (!value->isValueList()) >+ return; >+ FontDescription fontDescription = m_style->fontDescription(); >+ CSSValueList* list = static_cast<CSSValueList*>(value); >+ int len = list->length(); >+ FontFamily& firstFamily = fontDescription.firstFamily(); >+ FontFamily* currFamily = 0; >+ >+ // Before mapping in a new font-family property, we should reset the generic family. >+ bool oldFamilyUsedFixedDefaultSize = fontDescription.useFixedDefaultSize(); >+ fontDescription.setGenericFamily(FontDescription::NoFamily); >+ >+ for (int i = 0; i < len; i++) { >+ CSSValue* item = list->itemWithoutBoundsCheck(i); >+ if (!item->isPrimitiveValue()) >+ continue; >+ CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(item); >+ AtomicString face; >+ Settings* settings = m_checker.document()->settings(); >+ if (contentValue->primitiveType() == CSSPrimitiveValue::CSS_STRING) { >+ if (contentValue->isFontFamilyValue()) >+ face = static_cast<FontFamilyValue*>(contentValue)->familyName(); >+ } else if (contentValue->primitiveType() == CSSPrimitiveValue::CSS_IDENT && settings) { >+ switch (contentValue->getIdent()) { >+ case CSSValueWebkitBody: >+ face = settings->standardFontFamily(); >+ break; >+ case CSSValueSerif: >+ face = "-webkit-serif"; >+ fontDescription.setGenericFamily(FontDescription::SerifFamily); >+ break; >+ case CSSValueSansSerif: >+ face = "-webkit-sans-serif"; >+ fontDescription.setGenericFamily(FontDescription::SansSerifFamily); >+ break; >+ case CSSValueCursive: >+ face = "-webkit-cursive"; >+ fontDescription.setGenericFamily(FontDescription::CursiveFamily); >+ break; >+ case CSSValueFantasy: >+ face = "-webkit-fantasy"; >+ fontDescription.setGenericFamily(FontDescription::FantasyFamily); >+ break; >+ case CSSValueMonospace: >+ face = "-webkit-monospace"; >+ fontDescription.setGenericFamily(FontDescription::MonospaceFamily); >+ break; >+ } >+ } >+ >+ if (!face.isEmpty()) { >+ if (!currFamily) { >+ // Filling in the first family. >+ firstFamily.setFamily(face); >+ firstFamily.appendFamily(0); // Remove any inherited family-fallback list. >+ currFamily = &firstFamily; >+ fontDescription.setIsSpecifiedFont(fontDescription.genericFamily() == FontDescription::NoFamily); >+ } else { >+ RefPtr<SharedFontFamily> newFamily = SharedFontFamily::create(); >+ newFamily->setFamily(face); >+ currFamily->appendFamily(newFamily); >+ currFamily = newFamily.get(); >+ } >+ } >+ } >+ >+ // We can't call useFixedDefaultSize() until all new font families have been added >+ // If currFamily is non-zero then we set at least one family on this description. >+ if (currFamily) { >+ if (fontDescription.keywordSize() && fontDescription.useFixedDefaultSize() != oldFamilyUsedFixedDefaultSize) >+ setFontSize(fontDescription, fontSizeForKeyword(m_checker.document(), CSSValueXxSmall + fontDescription.keywordSize() - 1, !oldFamilyUsedFixedDefaultSize)); >+ >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ } >+ return; >+ } >+ case CSSPropertyTextDecoration: { >+ // list of ident >+ HANDLE_INHERIT_AND_INITIAL(textDecoration, TextDecoration) >+ int t = RenderStyle::initialTextDecoration(); >+ if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) { >+ // do nothing >+ } else { >+ if (!value->isValueList()) >+ return; >+ CSSValueList *list = static_cast<CSSValueList*>(value); >+ int len = list->length(); >+ for (int i = 0; i < len; i++) >+ { >+ CSSValue *item = list->itemWithoutBoundsCheck(i); >+ if (!item->isPrimitiveValue()) >+ continue; >+ primitiveValue = static_cast<CSSPrimitiveValue*>(item); >+ switch (primitiveValue->getIdent()) { >+ case CSSValueNone: >+ t = TDNONE; break; >+ case CSSValueUnderline: >+ t |= UNDERLINE; break; >+ case CSSValueOverline: >+ t |= OVERLINE; break; >+ case CSSValueLineThrough: >+ t |= LINE_THROUGH; break; >+ case CSSValueBlink: >+ t |= BLINK; break; >+ default: >+ return; >+ } >+ } >+ } >+ >+ m_style->setTextDecoration(t); >+ return; >+ } >+ >+ case CSSPropertyZoom: >+ { >+ // Reset the zoom in effect before we do anything. This allows the setZoom method to accurately compute a new >+ // zoom in effect. >+ m_style->setEffectiveZoom(m_parentStyle ? m_parentStyle->effectiveZoom() : RenderStyle::initialZoom()); >+ >+ // Now we can handle inherit and initial. >+ HANDLE_INHERIT_AND_INITIAL(zoom, Zoom) >+ >+ // Handle normal/reset, numbers and percentages. >+ int type = primitiveValue->primitiveType(); >+ if (primitiveValue->getIdent() == CSSValueNormal) >+ m_style->setZoom(RenderStyle::initialZoom()); >+ else if (primitiveValue->getIdent() == CSSValueReset) { >+ m_style->setEffectiveZoom(RenderStyle::initialZoom()); >+ m_style->setZoom(RenderStyle::initialZoom()); >+ } else if (primitiveValue->getIdent() == CSSValueDocument) { >+ float docZoom = m_checker.document()->renderer()->style()->zoom(); >+ m_style->setEffectiveZoom(docZoom); >+ m_style->setZoom(docZoom); >+ } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) { >+ if (primitiveValue->getFloatValue()) >+ m_style->setZoom(primitiveValue->getFloatValue() / 100.0f); >+ } else if (type == CSSPrimitiveValue::CSS_NUMBER) { >+ if (primitiveValue->getFloatValue()) >+ m_style->setZoom(primitiveValue->getFloatValue()); >+ } >+ >+ m_fontDirty = true; >+ return; >+ } >+ // shorthand properties >+ case CSSPropertyBackground: >+ if (isInitial) { >+ m_style->clearBackgroundLayers(); >+ m_style->setBackgroundColor(Color()); >+ } >+ else if (isInherit) { >+ m_style->inheritBackgroundLayers(*m_parentStyle->backgroundLayers()); >+ m_style->setBackgroundColor(m_parentStyle->backgroundColor()); >+ } >+ return; >+ case CSSPropertyWebkitMask: >+ if (isInitial) >+ m_style->clearMaskLayers(); >+ else if (isInherit) >+ m_style->inheritMaskLayers(*m_parentStyle->maskLayers()); >+ return; >+ >+ case CSSPropertyBorder: >+ case CSSPropertyBorderStyle: >+ case CSSPropertyBorderWidth: >+ case CSSPropertyBorderColor: >+ if (id == CSSPropertyBorder || id == CSSPropertyBorderColor) >+ { >+ if (isInherit) { >+ m_style->setBorderTopColor(m_parentStyle->borderTopColor().isValid() ? m_parentStyle->borderTopColor() : m_parentStyle->color()); >+ m_style->setBorderBottomColor(m_parentStyle->borderBottomColor().isValid() ? m_parentStyle->borderBottomColor() : m_parentStyle->color()); >+ m_style->setBorderLeftColor(m_parentStyle->borderLeftColor().isValid() ? m_parentStyle->borderLeftColor() : m_parentStyle->color()); >+ m_style->setBorderRightColor(m_parentStyle->borderRightColor().isValid() ? m_parentStyle->borderRightColor(): m_parentStyle->color()); >+ } >+ else if (isInitial) { >+ m_style->setBorderTopColor(Color()); // Reset to invalid color so currentColor is used instead. >+ m_style->setBorderBottomColor(Color()); >+ m_style->setBorderLeftColor(Color()); >+ m_style->setBorderRightColor(Color()); >+ } >+ } >+ if (id == CSSPropertyBorder || id == CSSPropertyBorderStyle) >+ { >+ if (isInherit) { >+ m_style->setBorderTopStyle(m_parentStyle->borderTopStyle()); >+ m_style->setBorderBottomStyle(m_parentStyle->borderBottomStyle()); >+ m_style->setBorderLeftStyle(m_parentStyle->borderLeftStyle()); >+ m_style->setBorderRightStyle(m_parentStyle->borderRightStyle()); >+ } >+ else if (isInitial) { >+ m_style->setBorderTopStyle(RenderStyle::initialBorderStyle()); >+ m_style->setBorderBottomStyle(RenderStyle::initialBorderStyle()); >+ m_style->setBorderLeftStyle(RenderStyle::initialBorderStyle()); >+ m_style->setBorderRightStyle(RenderStyle::initialBorderStyle()); >+ } >+ } >+ if (id == CSSPropertyBorder || id == CSSPropertyBorderWidth) >+ { >+ if (isInherit) { >+ m_style->setBorderTopWidth(m_parentStyle->borderTopWidth()); >+ m_style->setBorderBottomWidth(m_parentStyle->borderBottomWidth()); >+ m_style->setBorderLeftWidth(m_parentStyle->borderLeftWidth()); >+ m_style->setBorderRightWidth(m_parentStyle->borderRightWidth()); >+ } >+ else if (isInitial) { >+ m_style->setBorderTopWidth(RenderStyle::initialBorderWidth()); >+ m_style->setBorderBottomWidth(RenderStyle::initialBorderWidth()); >+ m_style->setBorderLeftWidth(RenderStyle::initialBorderWidth()); >+ m_style->setBorderRightWidth(RenderStyle::initialBorderWidth()); >+ } >+ } >+ return; >+ case CSSPropertyBorderTop: >+ if (isInherit) { >+ m_style->setBorderTopColor(m_parentStyle->borderTopColor().isValid() ? m_parentStyle->borderTopColor() : m_parentStyle->color()); >+ m_style->setBorderTopStyle(m_parentStyle->borderTopStyle()); >+ m_style->setBorderTopWidth(m_parentStyle->borderTopWidth()); >+ } >+ else if (isInitial) >+ m_style->resetBorderTop(); >+ return; >+ case CSSPropertyBorderRight: >+ if (isInherit) { >+ m_style->setBorderRightColor(m_parentStyle->borderRightColor().isValid() ? m_parentStyle->borderRightColor() : m_parentStyle->color()); >+ m_style->setBorderRightStyle(m_parentStyle->borderRightStyle()); >+ m_style->setBorderRightWidth(m_parentStyle->borderRightWidth()); >+ } >+ else if (isInitial) >+ m_style->resetBorderRight(); >+ return; >+ case CSSPropertyBorderBottom: >+ if (isInherit) { >+ m_style->setBorderBottomColor(m_parentStyle->borderBottomColor().isValid() ? m_parentStyle->borderBottomColor() : m_parentStyle->color()); >+ m_style->setBorderBottomStyle(m_parentStyle->borderBottomStyle()); >+ m_style->setBorderBottomWidth(m_parentStyle->borderBottomWidth()); >+ } >+ else if (isInitial) >+ m_style->resetBorderBottom(); >+ return; >+ case CSSPropertyBorderLeft: >+ if (isInherit) { >+ m_style->setBorderLeftColor(m_parentStyle->borderLeftColor().isValid() ? m_parentStyle->borderLeftColor() : m_parentStyle->color()); >+ m_style->setBorderLeftStyle(m_parentStyle->borderLeftStyle()); >+ m_style->setBorderLeftWidth(m_parentStyle->borderLeftWidth()); >+ } >+ else if (isInitial) >+ m_style->resetBorderLeft(); >+ return; >+ case CSSPropertyMargin: >+ if (isInherit) { >+ m_style->setMarginTop(m_parentStyle->marginTop()); >+ m_style->setMarginBottom(m_parentStyle->marginBottom()); >+ m_style->setMarginLeft(m_parentStyle->marginLeft()); >+ m_style->setMarginRight(m_parentStyle->marginRight()); >+ } >+ else if (isInitial) >+ m_style->resetMargin(); >+ return; >+ case CSSPropertyPadding: >+ if (isInherit) { >+ m_style->setPaddingTop(m_parentStyle->paddingTop()); >+ m_style->setPaddingBottom(m_parentStyle->paddingBottom()); >+ m_style->setPaddingLeft(m_parentStyle->paddingLeft()); >+ m_style->setPaddingRight(m_parentStyle->paddingRight()); >+ } >+ else if (isInitial) >+ m_style->resetPadding(); >+ return; >+ case CSSPropertyFont: >+ if (isInherit) { >+ FontDescription fontDescription = m_parentStyle->fontDescription(); >+ m_style->setLineHeight(m_parentStyle->lineHeight()); >+ m_lineHeightValue = 0; >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ } else if (isInitial) { >+ Settings* settings = m_checker.document()->settings(); >+ ASSERT(settings); // If we're doing style resolution, this document should always be in a frame and thus have settings >+ if (!settings) >+ return; >+ FontDescription fontDescription; >+ fontDescription.setGenericFamily(FontDescription::StandardFamily); >+ fontDescription.setRenderingMode(settings->fontRenderingMode()); >+ fontDescription.setUsePrinterFont(m_checker.document()->printing()); >+ const AtomicString& standardFontFamily = m_checker.document()->settings()->standardFontFamily(); >+ if (!standardFontFamily.isEmpty()) { >+ fontDescription.firstFamily().setFamily(standardFontFamily); >+ fontDescription.firstFamily().appendFamily(0); >+ } >+ fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1); >+ setFontSize(fontDescription, fontSizeForKeyword(m_checker.document(), CSSValueMedium, false)); >+ m_style->setLineHeight(RenderStyle::initialLineHeight()); >+ m_lineHeightValue = 0; >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ } else if (primitiveValue) { >+ m_style->setLineHeight(RenderStyle::initialLineHeight()); >+ m_lineHeightValue = 0; >+ >+ FontDescription fontDescription; >+ RenderTheme::defaultTheme()->systemFont(primitiveValue->getIdent(), fontDescription); >+ >+ // Double-check and see if the theme did anything. If not, don't bother updating the font. >+ if (fontDescription.isAbsoluteSize()) { >+ // Make sure the rendering mode and printer font settings are updated. >+ Settings* settings = m_checker.document()->settings(); >+ ASSERT(settings); // If we're doing style resolution, this document should always be in a frame and thus have settings >+ if (!settings) >+ return; >+ fontDescription.setRenderingMode(settings->fontRenderingMode()); >+ fontDescription.setUsePrinterFont(m_checker.document()->printing()); >+ >+ // Handle the zoom factor. >+ fontDescription.setComputedSize(getComputedSizeFromSpecifiedSize(m_checker.document(), m_style.get(), fontDescription.isAbsoluteSize(), fontDescription.specifiedSize(), useSVGZoomRules)); >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ } >+ } else if (value->isFontValue()) { >+ FontValue *font = static_cast<FontValue*>(value); >+ if (!font->style || !font->variant || !font->weight || >+ !font->size || !font->lineHeight || !font->family) >+ return; >+ applyProperty(CSSPropertyFontStyle, font->style.get()); >+ applyProperty(CSSPropertyFontVariant, font->variant.get()); >+ applyProperty(CSSPropertyFontWeight, font->weight.get()); >+ applyProperty(CSSPropertyFontSize, font->size.get()); >+ >+ m_lineHeightValue = font->lineHeight.get(); >+ >+ applyProperty(CSSPropertyFontFamily, font->family.get()); >+ } >+ return; >+ >+ case CSSPropertyListStyle: >+ if (isInherit) { >+ m_style->setListStyleType(m_parentStyle->listStyleType()); >+ m_style->setListStyleImage(m_parentStyle->listStyleImage()); >+ m_style->setListStylePosition(m_parentStyle->listStylePosition()); >+ } >+ else if (isInitial) { >+ m_style->setListStyleType(RenderStyle::initialListStyleType()); >+ m_style->setListStyleImage(RenderStyle::initialListStyleImage()); >+ m_style->setListStylePosition(RenderStyle::initialListStylePosition()); >+ } >+ return; >+ case CSSPropertyOutline: >+ if (isInherit) { >+ m_style->setOutlineWidth(m_parentStyle->outlineWidth()); >+ m_style->setOutlineColor(m_parentStyle->outlineColor().isValid() ? m_parentStyle->outlineColor() : m_parentStyle->color()); >+ m_style->setOutlineStyle(m_parentStyle->outlineStyle()); >+ } >+ else if (isInitial) >+ m_style->resetOutline(); >+ return; >+ >+ // CSS3 Properties >+ case CSSPropertyWebkitAppearance: { >+ HANDLE_INHERIT_AND_INITIAL(appearance, Appearance) >+ if (!primitiveValue) >+ return; >+ m_style->setAppearance(*primitiveValue); >+ return; > } >- return; >- >- case CSSPropertyOutline: >- if (isInherit) { >- m_style->setOutlineWidth(m_parentStyle->outlineWidth()); >- m_style->setOutlineColor(m_parentStyle->outlineColor().isValid() ? m_parentStyle->outlineColor() : m_parentStyle->color()); >- m_style->setOutlineStyle(m_parentStyle->outlineStyle()); >+ >+ case CSSPropertyWebkitBorderImage: >+ case CSSPropertyWebkitMaskBoxImage: { >+ if (isInherit) { >+ HANDLE_INHERIT_COND(CSSPropertyWebkitBorderImage, borderImage, BorderImage) >+ HANDLE_INHERIT_COND(CSSPropertyWebkitMaskBoxImage, maskBoxImage, MaskBoxImage) >+ return; >+ } else if (isInitial) { >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyWebkitBorderImage, BorderImage, NinePieceImage) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyWebkitMaskBoxImage, MaskBoxImage, NinePieceImage) >+ return; >+ } >+ >+ NinePieceImage image; >+ mapNinePieceImage(property, value, image); >+ >+ if (id == CSSPropertyWebkitBorderImage) >+ m_style->setBorderImage(image); >+ else >+ m_style->setMaskBoxImage(image); >+ return; > } >- else if (isInitial) >- m_style->resetOutline(); >- return; >- >- // CSS3 Properties >- case CSSPropertyWebkitAppearance: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(appearance, Appearance) >- return; >- case CSSPropertyBorderImage: >- case CSSPropertyWebkitBorderImage: >- case CSSPropertyWebkitMaskBoxImage: { >- if (isInherit) { >- HANDLE_INHERIT_COND(CSSPropertyBorderImage, borderImage, BorderImage) >- HANDLE_INHERIT_COND(CSSPropertyWebkitBorderImage, borderImage, BorderImage) >- HANDLE_INHERIT_COND(CSSPropertyWebkitMaskBoxImage, maskBoxImage, MaskBoxImage) >+ >+ case CSSPropertyBorderRadius: >+ case CSSPropertyWebkitBorderRadius: >+ if (isInherit) { >+ m_style->setBorderTopLeftRadius(m_parentStyle->borderTopLeftRadius()); >+ m_style->setBorderTopRightRadius(m_parentStyle->borderTopRightRadius()); >+ m_style->setBorderBottomLeftRadius(m_parentStyle->borderBottomLeftRadius()); >+ m_style->setBorderBottomRightRadius(m_parentStyle->borderBottomRightRadius()); >+ return; >+ } >+ if (isInitial) { >+ m_style->resetBorderRadius(); >+ return; >+ } >+ // Fall through >+ case CSSPropertyBorderTopLeftRadius: >+ case CSSPropertyBorderTopRightRadius: >+ case CSSPropertyBorderBottomLeftRadius: >+ case CSSPropertyBorderBottomRightRadius: { >+ if (isInherit) { >+ HANDLE_INHERIT_COND(CSSPropertyBorderTopLeftRadius, borderTopLeftRadius, BorderTopLeftRadius) >+ HANDLE_INHERIT_COND(CSSPropertyBorderTopRightRadius, borderTopRightRadius, BorderTopRightRadius) >+ HANDLE_INHERIT_COND(CSSPropertyBorderBottomLeftRadius, borderBottomLeftRadius, BorderBottomLeftRadius) >+ HANDLE_INHERIT_COND(CSSPropertyBorderBottomRightRadius, borderBottomRightRadius, BorderBottomRightRadius) >+ return; >+ } >+ >+ if (isInitial) { >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBorderTopLeftRadius, BorderTopLeftRadius, BorderRadius) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBorderTopRightRadius, BorderTopRightRadius, BorderRadius) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBorderBottomLeftRadius, BorderBottomLeftRadius, BorderRadius) >+ HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBorderBottomRightRadius, BorderBottomRightRadius, BorderRadius) >+ return; >+ } >+ >+ if (!primitiveValue) >+ return; >+ >+ Pair* pair = primitiveValue->getPairValue(); >+ if (!pair || !pair->first() || !pair->second()) >+ return; >+ >+ Length radiusWidth; >+ Length radiusHeight; >+ if (pair->first()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE) >+ radiusWidth = Length(pair->first()->getDoubleValue(), Percent); >+ else >+ radiusWidth = Length(max(intMinForLength, min(intMaxForLength, pair->first()->computeLength<int>(style(), m_rootElementStyle, zoomFactor))), Fixed); >+ if (pair->second()->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE) >+ radiusHeight = Length(pair->second()->getDoubleValue(), Percent); >+ else >+ radiusHeight = Length(max(intMinForLength, min(intMaxForLength, pair->second()->computeLength<int>(style(), m_rootElementStyle, zoomFactor))), Fixed); >+ int width = radiusWidth.value(); >+ int height = radiusHeight.value(); >+ if (width < 0 || height < 0) >+ return; >+ if (width == 0) >+ radiusHeight = radiusWidth; // Null out the other value. >+ else if (height == 0) >+ radiusWidth = radiusHeight; // Null out the other value. >+ >+ LengthSize size(radiusWidth, radiusHeight); >+ switch (id) { >+ case CSSPropertyBorderTopLeftRadius: >+ m_style->setBorderTopLeftRadius(size); >+ break; >+ case CSSPropertyBorderTopRightRadius: >+ m_style->setBorderTopRightRadius(size); >+ break; >+ case CSSPropertyBorderBottomLeftRadius: >+ m_style->setBorderBottomLeftRadius(size); >+ break; >+ case CSSPropertyBorderBottomRightRadius: >+ m_style->setBorderBottomRightRadius(size); >+ break; >+ default: >+ m_style->setBorderRadius(size); >+ break; >+ } >+ return; >+ } >+ >+ case CSSPropertyOutlineOffset: >+ HANDLE_INHERIT_AND_INITIAL(outlineOffset, OutlineOffset) >+ m_style->setOutlineOffset(primitiveValue->computeLength<int>(style(), m_rootElementStyle, zoomFactor)); > return; >- } else if (isInitial) { >- HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyBorderImage, BorderImage, NinePieceImage) >- HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyWebkitBorderImage, BorderImage, NinePieceImage) >- HANDLE_INITIAL_COND_WITH_VALUE(CSSPropertyWebkitMaskBoxImage, MaskBoxImage, NinePieceImage) >+ case CSSPropertyTextRendering: { >+ FontDescription fontDescription = m_style->fontDescription(); >+ if (isInherit) >+ fontDescription.setTextRenderingMode(m_parentStyle->fontDescription().textRenderingMode()); >+ else if (isInitial) >+ fontDescription.setTextRenderingMode(AutoTextRendering); >+ else { >+ if (!primitiveValue) >+ return; >+ fontDescription.setTextRenderingMode(*primitiveValue); >+ } >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; > return; > } >- >- NinePieceImage image; >- if (property == CSSPropertyWebkitMaskBoxImage) >- image.setMaskDefaults(); >- mapNinePieceImage(property, value, image); >- >- if (id != CSSPropertyWebkitMaskBoxImage) >- m_style->setBorderImage(image); >- else >- m_style->setMaskBoxImage(image); >- return; >- } >- case CSSPropertyBorderImageOutset: >- case CSSPropertyWebkitMaskBoxImageOutset: { >- bool isBorderImage = id == CSSPropertyBorderImageOutset; >- NinePieceImage image(isBorderImage ? m_style->borderImage() : m_style->maskBoxImage()); >- if (isInherit) >- image.copyOutsetFrom(isBorderImage ? m_parentStyle->borderImage() : m_parentStyle->maskBoxImage()); >- else if (isInitial) >- image.setOutset(LengthBox()); >- else >- image.setOutset(mapNinePieceImageQuad(value)); >- >- if (isBorderImage) >- m_style->setBorderImage(image); >- else >- m_style->setMaskBoxImage(image); >- return; >- } >- case CSSPropertyBorderImageRepeat: >- case CSSPropertyWebkitMaskBoxImageRepeat: { >- bool isBorderImage = id == CSSPropertyBorderImageRepeat; >- NinePieceImage image(isBorderImage ? m_style->borderImage() : m_style->maskBoxImage()); >- if (isInherit) >- image.copyRepeatFrom(isBorderImage ? m_parentStyle->borderImage() : m_parentStyle->maskBoxImage()); >- else if (isInitial) { >- image.setHorizontalRule(StretchImageRule); >- image.setVerticalRule(StretchImageRule); >- } else >- mapNinePieceImageRepeat(value, image); >- >- if (isBorderImage) >- m_style->setBorderImage(image); >- else >- m_style->setMaskBoxImage(image); >- return; >- } >- case CSSPropertyBorderImageSlice: >- case CSSPropertyWebkitMaskBoxImageSlice: { >- bool isBorderImage = id == CSSPropertyBorderImageSlice; >- NinePieceImage image(isBorderImage ? m_style->borderImage() : m_style->maskBoxImage()); >- if (isInherit) >- image.copyImageSlicesFrom(isBorderImage ? m_parentStyle->borderImage() : m_parentStyle->maskBoxImage()); >- else if (isInitial) { >- // Masks have a different initial value for slices. Preserve the value of 0 for backwards compatibility. >- image.setImageSlices(isBorderImage ? LengthBox(Length(100, Percent), Length(100, Percent), Length(100, Percent), Length(100, Percent)) : LengthBox()); >- image.setFill(false); >- } else >- mapNinePieceImageSlice(value, image); >- >- if (isBorderImage) >- m_style->setBorderImage(image); >- else >- m_style->setMaskBoxImage(image); >- return; >- } >- case CSSPropertyBorderImageWidth: >- case CSSPropertyWebkitMaskBoxImageWidth: { >- bool isBorderImage = id == CSSPropertyBorderImageWidth; >- NinePieceImage image(isBorderImage ? m_style->borderImage() : m_style->maskBoxImage()); >- if (isInherit) >- image.copyBorderSlicesFrom(isBorderImage ? m_parentStyle->borderImage() : m_parentStyle->maskBoxImage()); >- else if (isInitial) { >- // Masks have a different initial value for slices. They use an 'auto' value rather than trying to fit to the border. >- image.setBorderSlices(isBorderImage ? LengthBox(Length(1, Relative), Length(1, Relative), Length(1, Relative), Length(1, Relative)) : LengthBox()); >- } else >- image.setBorderSlices(mapNinePieceImageQuad(value)); >- >- if (isBorderImage) >- m_style->setBorderImage(image); >- else >- m_style->setMaskBoxImage(image); >- return; >- } >- case CSSPropertyImageRendering: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(imageRendering, ImageRendering); >- return; >- case CSSPropertyTextShadow: >- case CSSPropertyBoxShadow: >- case CSSPropertyWebkitBoxShadow: { >- if (isInherit) { >- if (id == CSSPropertyTextShadow) >- return m_style->setTextShadow(m_parentStyle->textShadow() ? adoptPtr(new ShadowData(*m_parentStyle->textShadow())) : nullptr); >- return m_style->setBoxShadow(m_parentStyle->boxShadow() ? adoptPtr(new ShadowData(*m_parentStyle->boxShadow())) : nullptr); >+ case CSSPropertyTextShadow: >+ case CSSPropertyBoxShadow: >+ case CSSPropertyWebkitBoxShadow: { >+/* if (isInherit) { >+ if (id == CSSPropertyTextShadow) >+ return m_style->setTextShadow(m_parentStyle->textShadow() ? new ShadowData(*m_parentStyle->textShadow()) : 0); >+ return m_style->setBoxShadow(m_parentStyle->boxShadow() ? new ShadowData(*m_parentStyle->boxShadow()) : 0); >+ } >+ if (isInitial || primitiveValue) // initial | none >+ return id == CSSPropertyTextShadow ? m_style->setTextShadow(0) : m_style->setBoxShadow(0); >+ >+ if (!value->isValueList()) >+ return; >+ >+ CSSValueList *list = static_cast<CSSValueList*>(value); >+ int len = list->length(); >+ for (int i = 0; i < len; i++) { >+ CSSValue* currValue = list->itemWithoutBoundsCheck(i); >+ if (!currValue->isShadowValue()) >+ continue; >+ ShadowValue* item = static_cast<ShadowValue*>(list->itemWithoutBoundsCheck(i)); >+ int x = item->x->computeLength<int>(style(), m_rootElementStyle, zoomFactor); >+ int y = item->y->computeLength<int>(style(), m_rootElementStyle, zoomFactor); >+ int blur = item->blur ? item->blur->computeLength<int>(style(), m_rootElementStyle, zoomFactor) : 0; >+ int spread = item->spread ? item->spread->computeLength<int>(style(), m_rootElementStyle, zoomFactor) : 0; >+ ShadowStyle shadowStyle = item->style && item->style->getIdent() == CSSValueInset ? Inset : Normal; >+ Color color; >+ if (item->color) >+ color = getColorFromPrimitiveValue(item->color.get()); >+ ShadowData* shadowData = new ShadowData(x, y, blur, spread, shadowStyle, id == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparent); >+ if (id == CSSPropertyTextShadow) >+ m_style->setTextShadow(shadowData, i != 0); >+ else >+ m_style->setBoxShadow(shadowData, i != 0); >+ }*/ >+ return; > } >- if (isInitial || primitiveValue) // initial | none >- return id == CSSPropertyTextShadow ? m_style->setTextShadow(nullptr) : m_style->setBoxShadow(nullptr); >- >- if (!value->isValueList()) >+ case CSSPropertyWebkitBoxReflect: { >+ HANDLE_INHERIT_AND_INITIAL(boxReflect, BoxReflect) >+ if (primitiveValue) { >+ m_style->setBoxReflect(RenderStyle::initialBoxReflect()); >+ return; >+ } >+ >+ if (!value->isReflectValue()) >+ return; >+ >+ CSSReflectValue* reflectValue = static_cast<CSSReflectValue*>(value); >+ RefPtr<StyleReflection> reflection = StyleReflection::create(); >+ reflection->setDirection(reflectValue->direction()); >+ if (reflectValue->offset()) { >+ int type = reflectValue->offset()->primitiveType(); >+ if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ reflection->setOffset(Length(reflectValue->offset()->getDoubleValue(), Percent)); >+ else >+ reflection->setOffset(reflectValue->offset()->computeLength<Length>(style(), m_rootElementStyle, zoomFactor)); >+ } >+ NinePieceImage mask; >+ mapNinePieceImage(property, reflectValue->mask(), mask); >+ reflection->setMask(mask); >+ >+ m_style->setBoxReflect(reflection.release()); > return; >- >- for (CSSValueListIterator i = value; i.hasMore(); i.advance()) { >- CSSValue* currValue = i.value(); >- if (!currValue->isShadowValue()) >- continue; >- ShadowValue* item = static_cast<ShadowValue*>(currValue); >- int x = item->x->computeLength<int>(style(), m_rootElementStyle, zoomFactor); >- int y = item->y->computeLength<int>(style(), m_rootElementStyle, zoomFactor); >- int blur = item->blur ? item->blur->computeLength<int>(style(), m_rootElementStyle, zoomFactor) : 0; >- int spread = item->spread ? item->spread->computeLength<int>(style(), m_rootElementStyle, zoomFactor) : 0; >- ShadowStyle shadowStyle = item->style && item->style->getIdent() == CSSValueInset ? Inset : Normal; >- Color color; >- if (item->color) >- color = getColorFromPrimitiveValue(item->color.get()); >- OwnPtr<ShadowData> shadowData = adoptPtr(new ShadowData(x, y, blur, spread, shadowStyle, id == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparent)); >- if (id == CSSPropertyTextShadow) >- m_style->setTextShadow(shadowData.release(), i.index()); // add to the list if this is not the first entry >+ } >+ case CSSPropertyOpacity: >+ HANDLE_INHERIT_AND_INITIAL(opacity, Opacity) >+ if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER) >+ return; // Error case. >+ // Clamp opacity to the range 0-1 >+ m_style->setOpacity(min(1.0f, max(0.0f, primitiveValue->getFloatValue()))); >+ return; >+ case CSSPropertyWebkitBoxAlign: >+ { >+ HANDLE_INHERIT_AND_INITIAL(boxAlign, BoxAlign) >+ if (!primitiveValue) >+ return; >+ EBoxAlignment boxAlignment = *primitiveValue; >+ if (boxAlignment != BJUSTIFY) >+ m_style->setBoxAlign(boxAlignment); >+ return; >+ } >+ case CSSPropertySrc: // Only used in @font-face rules. >+ return; >+ case CSSPropertyUnicodeRange: // Only used in @font-face rules. >+ return; >+ case CSSPropertyWebkitBackfaceVisibility: >+ HANDLE_INHERIT_AND_INITIAL(backfaceVisibility, BackfaceVisibility) >+ if (primitiveValue) >+ m_style->setBackfaceVisibility((primitiveValue->getIdent() == CSSValueVisible) ? BackfaceVisibilityVisible : BackfaceVisibilityHidden); >+ return; >+ case CSSPropertyWebkitBoxDirection: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxDirection, BoxDirection) >+ return; >+ case CSSPropertyWebkitBoxLines: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxLines, BoxLines) >+ return; >+ case CSSPropertyWebkitBoxOrient: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxOrient, BoxOrient) >+ return; >+ case CSSPropertyWebkitBoxPack: >+ { >+ HANDLE_INHERIT_AND_INITIAL(boxPack, BoxPack) >+ if (!primitiveValue) >+ return; >+ EBoxAlignment boxPack = *primitiveValue; >+ if (boxPack != BSTRETCH && boxPack != BBASELINE) >+ m_style->setBoxPack(boxPack); >+ return; >+ } >+ case CSSPropertyWebkitBoxFlex: >+ HANDLE_INHERIT_AND_INITIAL(boxFlex, BoxFlex) >+ if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER) >+ return; // Error case. >+ m_style->setBoxFlex(primitiveValue->getFloatValue()); >+ return; >+ case CSSPropertyWebkitBoxFlexGroup: >+ HANDLE_INHERIT_AND_INITIAL(boxFlexGroup, BoxFlexGroup) >+ if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER) >+ return; // Error case. >+ m_style->setBoxFlexGroup((unsigned int)(primitiveValue->getDoubleValue())); >+ return; >+ case CSSPropertyWebkitBoxOrdinalGroup: >+ HANDLE_INHERIT_AND_INITIAL(boxOrdinalGroup, BoxOrdinalGroup) >+ if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER) >+ return; // Error case. >+ m_style->setBoxOrdinalGroup((unsigned int)(primitiveValue->getDoubleValue())); >+ return; >+ case CSSPropertyBoxSizing: >+ HANDLE_INHERIT_AND_INITIAL(boxSizing, BoxSizing) >+ if (!primitiveValue) >+ return; >+ if (primitiveValue->getIdent() == CSSValueContentBox) >+ m_style->setBoxSizing(CONTENT_BOX); > else >- m_style->setBoxShadow(shadowData.release(), i.index()); // add to the list if this is not the first entry >+ m_style->setBoxSizing(BORDER_BOX); >+ return; >+ case CSSPropertyWebkitColumnCount: { >+ if (isInherit) { >+ if (m_parentStyle->hasAutoColumnCount()) >+ m_style->setHasAutoColumnCount(); >+ else >+ m_style->setColumnCount(m_parentStyle->columnCount()); >+ return; >+ } else if (isInitial || primitiveValue->getIdent() == CSSValueAuto) { >+ m_style->setHasAutoColumnCount(); >+ return; >+ } >+ m_style->setColumnCount(static_cast<unsigned short>(primitiveValue->getDoubleValue())); >+ return; > } >- return; >- } >- case CSSPropertyWebkitBoxReflect: { >- HANDLE_INHERIT_AND_INITIAL(boxReflect, BoxReflect) >- if (primitiveValue) { >- m_style->setBoxReflect(RenderStyle::initialBoxReflect()); >+ case CSSPropertyWebkitColumnGap: { >+ if (isInherit) { >+ if (m_parentStyle->hasNormalColumnGap()) >+ m_style->setHasNormalColumnGap(); >+ else >+ m_style->setColumnGap(m_parentStyle->columnGap()); >+ return; >+ } else if (isInitial || primitiveValue->getIdent() == CSSValueNormal) { >+ m_style->setHasNormalColumnGap(); >+ return; >+ } >+ m_style->setColumnGap(primitiveValue->computeLength<float>(style(), m_rootElementStyle, zoomFactor)); > return; > } >- >- if (!value->isReflectValue()) >+ case CSSPropertyWebkitColumnSpan: { >+ HANDLE_INHERIT_AND_INITIAL(columnSpan, ColumnSpan) >+ m_style->setColumnSpan(primitiveValue->getIdent() == CSSValueAll); > return; >- >- CSSReflectValue* reflectValue = static_cast<CSSReflectValue*>(value); >- RefPtr<StyleReflection> reflection = StyleReflection::create(); >- reflection->setDirection(reflectValue->direction()); >- if (reflectValue->offset()) { >- int type = reflectValue->offset()->primitiveType(); >- if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >- reflection->setOffset(Length(reflectValue->offset()->getDoubleValue(), Percent)); >+ } >+ case CSSPropertyWebkitColumnWidth: { >+ if (isInherit) { >+ if (m_parentStyle->hasAutoColumnWidth()) >+ m_style->setHasAutoColumnWidth(); >+ else >+ m_style->setColumnWidth(m_parentStyle->columnWidth()); >+ return; >+ } else if (isInitial || primitiveValue->getIdent() == CSSValueAuto) { >+ m_style->setHasAutoColumnWidth(); >+ return; >+ } >+ m_style->setColumnWidth(primitiveValue->computeLength<float>(style(), m_rootElementStyle, zoomFactor)); >+ return; >+ } >+ case CSSPropertyWebkitColumnRuleStyle: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnRuleStyle, ColumnRuleStyle, BorderStyle) >+ return; >+ case CSSPropertyWebkitColumnBreakBefore: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnBreakBefore, ColumnBreakBefore, PageBreak) >+ return; >+ case CSSPropertyWebkitColumnBreakAfter: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnBreakAfter, ColumnBreakAfter, PageBreak) >+ return; >+ case CSSPropertyWebkitColumnBreakInside: { >+ HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(columnBreakInside, ColumnBreakInside, PageBreak) >+ EPageBreak pb = *primitiveValue; >+ if (pb != PBALWAYS) >+ m_style->setColumnBreakInside(pb); >+ return; >+ } >+ case CSSPropertyWebkitColumnRule: >+ if (isInherit) { >+ m_style->setColumnRuleColor(m_parentStyle->columnRuleColor().isValid() ? m_parentStyle->columnRuleColor() : m_parentStyle->color()); >+ m_style->setColumnRuleStyle(m_parentStyle->columnRuleStyle()); >+ m_style->setColumnRuleWidth(m_parentStyle->columnRuleWidth()); >+ } >+ else if (isInitial) >+ m_style->resetColumnRule(); >+ return; >+ case CSSPropertyWebkitColumns: >+ if (isInherit) { >+ if (m_parentStyle->hasAutoColumnWidth()) >+ m_style->setHasAutoColumnWidth(); >+ else >+ m_style->setColumnWidth(m_parentStyle->columnWidth()); >+ m_style->setColumnCount(m_parentStyle->columnCount()); >+ } else if (isInitial) { >+ m_style->setHasAutoColumnWidth(); >+ m_style->setColumnCount(RenderStyle::initialColumnCount()); >+ } >+ return; >+ case CSSPropertyWebkitMarquee: >+ if (valueType != CSSValue::CSS_INHERIT || !m_parentNode) return; >+ m_style->setMarqueeDirection(m_parentStyle->marqueeDirection()); >+ m_style->setMarqueeIncrement(m_parentStyle->marqueeIncrement()); >+ m_style->setMarqueeSpeed(m_parentStyle->marqueeSpeed()); >+ m_style->setMarqueeLoopCount(m_parentStyle->marqueeLoopCount()); >+ m_style->setMarqueeBehavior(m_parentStyle->marqueeBehavior()); >+ return; >+#if ENABLE(WCSS) >+ case CSSPropertyWapMarqueeLoop: >+#endif >+ case CSSPropertyWebkitMarqueeRepetition: { >+ HANDLE_INHERIT_AND_INITIAL(marqueeLoopCount, MarqueeLoopCount) >+ if (!primitiveValue) >+ return; >+ if (primitiveValue->getIdent() == CSSValueInfinite) >+ m_style->setMarqueeLoopCount(-1); // -1 means repeat forever. >+ else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) >+ m_style->setMarqueeLoopCount(primitiveValue->getIntValue()); >+ return; >+ } >+#if ENABLE(WCSS) >+ case CSSPropertyWapMarqueeSpeed: >+#endif >+ case CSSPropertyWebkitMarqueeSpeed: { >+ HANDLE_INHERIT_AND_INITIAL(marqueeSpeed, MarqueeSpeed) >+ if (!primitiveValue) >+ return; >+ if (primitiveValue->getIdent()) { >+ switch (primitiveValue->getIdent()) { >+ case CSSValueSlow: >+ m_style->setMarqueeSpeed(500); // 500 msec. >+ break; >+ case CSSValueNormal: >+ m_style->setMarqueeSpeed(85); // 85msec. The WinIE default. >+ break; >+ case CSSValueFast: >+ m_style->setMarqueeSpeed(10); // 10msec. Super fast. >+ break; >+ } >+ } >+ else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_S) >+ m_style->setMarqueeSpeed(1000 * primitiveValue->getIntValue()); >+ else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_MS) >+ m_style->setMarqueeSpeed(primitiveValue->getIntValue()); >+ else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) // For scrollamount support. >+ m_style->setMarqueeSpeed(primitiveValue->getIntValue()); >+ return; >+ } >+ case CSSPropertyWebkitMarqueeIncrement: { >+ HANDLE_INHERIT_AND_INITIAL(marqueeIncrement, MarqueeIncrement) >+ if (!primitiveValue) >+ return; >+ if (primitiveValue->getIdent()) { >+ switch (primitiveValue->getIdent()) { >+ case CSSValueSmall: >+ m_style->setMarqueeIncrement(Length(1, Fixed)); // 1px. >+ break; >+ case CSSValueNormal: >+ m_style->setMarqueeIncrement(Length(6, Fixed)); // 6px. The WinIE default. >+ break; >+ case CSSValueLarge: >+ m_style->setMarqueeIncrement(Length(36, Fixed)); // 36px. >+ break; >+ } >+ } >+ else { >+ bool ok = true; >+ Length marqueeLength = convertToIntLength(primitiveValue, style(), m_rootElementStyle, 1, &ok); >+ if (ok) >+ m_style->setMarqueeIncrement(marqueeLength); >+ } >+ return; >+ } >+#if ENABLE(WCSS) >+ case CSSPropertyWapMarqueeStyle: >+#endif >+ case CSSPropertyWebkitMarqueeStyle: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marqueeBehavior, MarqueeBehavior) >+ return; >+#if ENABLE(WCSS) >+ case CSSPropertyWapMarqueeDir: >+ HANDLE_INHERIT_AND_INITIAL(marqueeDirection, MarqueeDirection) >+ if (primitiveValue && primitiveValue->getIdent()) { >+ switch (primitiveValue->getIdent()) { >+ case CSSValueLtr: >+ m_style->setMarqueeDirection(MRIGHT); >+ break; >+ case CSSValueRtl: >+ m_style->setMarqueeDirection(MLEFT); >+ break; >+ default: >+ m_style->setMarqueeDirection(*primitiveValue); >+ break; >+ } >+ } >+ return; >+#endif >+ case CSSPropertyWebkitMarqueeDirection: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marqueeDirection, MarqueeDirection) >+ return; >+ case CSSPropertyWebkitUserDrag: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(userDrag, UserDrag) >+ return; >+ case CSSPropertyWebkitUserModify: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(userModify, UserModify) >+ return; >+ case CSSPropertyWebkitUserSelect: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(userSelect, UserSelect) >+ return; >+ >+ case CSSPropertyTextOverflow: { >+ // This property is supported by WinIE, and so we leave off the "-webkit-" in order to >+ // work with WinIE-specific pages that use the property. >+ HANDLE_INHERIT_AND_INITIAL(textOverflow, TextOverflow) >+ if (!primitiveValue || !primitiveValue->getIdent()) >+ return; >+// m_style->setTextOverflow(primitiveValue->getIdent() == CSSValueEllipsis); >+ return; >+ } >+ case CSSPropertyWebkitMarginCollapse: { >+ if (isInherit) { >+ m_style->setMarginBeforeCollapse(m_parentStyle->marginBeforeCollapse()); >+ m_style->setMarginAfterCollapse(m_parentStyle->marginAfterCollapse()); >+ } >+ else if (isInitial) { >+ m_style->setMarginBeforeCollapse(MCOLLAPSE); >+ m_style->setMarginAfterCollapse(MCOLLAPSE); >+ } >+ return; >+ } >+ >+ case CSSPropertyWebkitMarginBeforeCollapse: >+ case CSSPropertyWebkitMarginTopCollapse: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marginBeforeCollapse, MarginBeforeCollapse) >+ return; >+ case CSSPropertyWebkitMarginAfterCollapse: >+ case CSSPropertyWebkitMarginBottomCollapse: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marginAfterCollapse, MarginAfterCollapse) >+ return; >+ case CSSPropertyWebkitLineClamp: { >+ HANDLE_INHERIT_AND_INITIAL(lineClamp, LineClamp) >+ if (!primitiveValue) >+ return; >+ int type = primitiveValue->primitiveType(); >+ if (type == CSSPrimitiveValue::CSS_NUMBER) >+ m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_NUMBER), LineClampLineCount)); >+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_PERCENTAGE), LineClampPercentage)); >+ return; >+ } >+ case CSSPropertyWebkitHighlight: { >+ HANDLE_INHERIT_AND_INITIAL(highlight, Highlight); >+ if (primitiveValue->getIdent() == CSSValueNone) >+ m_style->setHighlight(nullAtom); > else >- reflection->setOffset(reflectValue->offset()->computeLength<Length>(style(), m_rootElementStyle, zoomFactor)); >+ m_style->setHighlight(primitiveValue->getStringValue()); >+ return; > } >- NinePieceImage mask; >- mask.setMaskDefaults(); >- mapNinePieceImage(property, reflectValue->mask(), mask); >- reflection->setMask(mask); >- >- m_style->setBoxReflect(reflection.release()); >- return; >- } >- case CSSPropertyOpacity: >- HANDLE_INHERIT_AND_INITIAL(opacity, Opacity) >- if (!primitiveValue || primitiveValue->primitiveType() != CSSPrimitiveValue::CSS_NUMBER) >- return; // Error case. >- // Clamp opacity to the range 0-1 >- m_style->setOpacity(clampTo<float>(primitiveValue->getDoubleValue(), 0, 1)); >- return; >- case CSSPropertyWebkitBoxAlign: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxAlign, BoxAlign) >- return; >- case CSSPropertySrc: // Only used in @font-face rules. >- return; >- case CSSPropertyUnicodeRange: // Only used in @font-face rules. >- return; >- case CSSPropertyWebkitBackfaceVisibility: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(backfaceVisibility, BackfaceVisibility) >- return; >- case CSSPropertyWebkitBoxDirection: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxDirection, BoxDirection) >- return; >- case CSSPropertyWebkitBoxLines: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxLines, BoxLines) >- return; >- case CSSPropertyWebkitBoxOrient: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxOrient, BoxOrient) >- return; >- case CSSPropertyWebkitBoxPack: >- { >- HANDLE_INHERIT_AND_INITIAL(boxPack, BoxPack) >- if (!primitiveValue) >+ case CSSPropertyWebkitHyphens: { >+ HANDLE_INHERIT_AND_INITIAL(hyphens, Hyphens); >+ m_style->setHyphens(*primitiveValue); >+ return; >+ } >+ case CSSPropertyWebkitHyphenateCharacter: { >+ HANDLE_INHERIT_AND_INITIAL(hyphenationString, HyphenationString); >+ if (primitiveValue->getIdent() == CSSValueAuto) >+ m_style->setHyphenationString(nullAtom); >+ else >+ m_style->setHyphenationString(primitiveValue->getStringValue()); >+ return; >+ } >+ case CSSPropertyWebkitHyphenateLimitAfter: { >+ HANDLE_INHERIT_AND_INITIAL(hyphenationLimitAfter, HyphenationLimitAfter); >+ if (primitiveValue->getIdent() == CSSValueAuto) >+ m_style->setHyphenationLimitAfter(-1); >+ else >+ m_style->setHyphenationLimitAfter(min(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_NUMBER), static_cast<int>(numeric_limits<short>::max()))); >+ return; >+ } >+ case CSSPropertyWebkitHyphenateLimitBefore: { >+ HANDLE_INHERIT_AND_INITIAL(hyphenationLimitBefore, HyphenationLimitBefore); >+ if (primitiveValue->getIdent() == CSSValueAuto) >+ m_style->setHyphenationLimitBefore(-1); >+ else >+ m_style->setHyphenationLimitBefore(min(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_NUMBER), static_cast<int>(numeric_limits<short>::max()))); >+ return; >+ } >+ case CSSPropertyWebkitLocale: { >+ HANDLE_INHERIT_AND_INITIAL(locale, Locale); >+ if (primitiveValue->getIdent() == CSSValueAuto) >+ m_style->setLocale(nullAtom); >+ else >+ m_style->setLocale(primitiveValue->getStringValue()); > return; >- EBoxAlignment boxPack = *primitiveValue; >- if (boxPack != BSTRETCH && boxPack != BBASELINE) >- m_style->setBoxPack(boxPack); >- return; >- } >- case CSSPropertyWebkitBoxFlex: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxFlex, BoxFlex) >- return; >- case CSSPropertyWebkitBoxFlexGroup: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxFlexGroup, BoxFlexGroup) >- return; >- case CSSPropertyWebkitBoxOrdinalGroup: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxOrdinalGroup, BoxOrdinalGroup) >- return; >- case CSSPropertyBoxSizing: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxSizing, BoxSizing); >- return; >- case CSSPropertyWebkitColumnSpan: { >- HANDLE_INHERIT_AND_INITIAL(columnSpan, ColumnSpan) >- m_style->setColumnSpan(primitiveValue->getIdent() == CSSValueAll); >- return; >- } >- case CSSPropertyWebkitColumnRuleStyle: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnRuleStyle, ColumnRuleStyle, BorderStyle) >- return; >- case CSSPropertyWebkitColumnBreakBefore: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnBreakBefore, ColumnBreakBefore, PageBreak) >- return; >- case CSSPropertyWebkitColumnBreakAfter: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnBreakAfter, ColumnBreakAfter, PageBreak) >- return; >- case CSSPropertyWebkitColumnBreakInside: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnBreakInside, ColumnBreakInside, PageBreak) >- return; >- case CSSPropertyWebkitColumnRule: >- if (isInherit) { >- m_style->setColumnRuleColor(m_parentStyle->columnRuleColor().isValid() ? m_parentStyle->columnRuleColor() : m_parentStyle->color()); >- m_style->setColumnRuleStyle(m_parentStyle->columnRuleStyle()); >- m_style->setColumnRuleWidth(m_parentStyle->columnRuleWidth()); > } >- else if (isInitial) >- m_style->resetColumnRule(); >- return; >- case CSSPropertyWebkitRegionBreakBefore: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(regionBreakBefore, RegionBreakBefore, PageBreak) >- return; >- case CSSPropertyWebkitRegionBreakAfter: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(regionBreakAfter, RegionBreakAfter, PageBreak) >- return; >- case CSSPropertyWebkitRegionBreakInside: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(regionBreakInside, RegionBreakInside, PageBreak) >- return; >- case CSSPropertyWebkitMarquee: >- if (valueType != CSSValue::CSS_INHERIT || !m_parentNode) return; >- m_style->setMarqueeDirection(m_parentStyle->marqueeDirection()); >- m_style->setMarqueeIncrement(m_parentStyle->marqueeIncrement()); >- m_style->setMarqueeSpeed(m_parentStyle->marqueeSpeed()); >- m_style->setMarqueeLoopCount(m_parentStyle->marqueeLoopCount()); >- m_style->setMarqueeBehavior(m_parentStyle->marqueeBehavior()); >- return; >- case CSSPropertyWebkitMarqueeRepetition: { >- HANDLE_INHERIT_AND_INITIAL(marqueeLoopCount, MarqueeLoopCount) >- if (!primitiveValue) >+ case CSSPropertyWebkitBorderFit: { >+ HANDLE_INHERIT_AND_INITIAL(borderFit, BorderFit); >+ if (primitiveValue->getIdent() == CSSValueBorder) >+ m_style->setBorderFit(BorderFitBorder); >+ else >+ m_style->setBorderFit(BorderFitLines); > return; >- if (primitiveValue->getIdent() == CSSValueInfinite) >- m_style->setMarqueeLoopCount(-1); // -1 means repeat forever. >- else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) >- m_style->setMarqueeLoopCount(primitiveValue->getIntValue()); >- return; >- } >- case CSSPropertyWebkitMarqueeSpeed: { >- HANDLE_INHERIT_AND_INITIAL(marqueeSpeed, MarqueeSpeed) >- if (!primitiveValue) >+ } >+ case CSSPropertyWebkitTextSizeAdjust: { >+ HANDLE_INHERIT_AND_INITIAL(textSizeAdjust, TextSizeAdjust) >+ if (!primitiveValue || !primitiveValue->getIdent()) return; >+ m_style->setTextSizeAdjust(primitiveValue->getIdent() == CSSValueAuto); >+ m_fontDirty = true; > return; >- if (primitiveValue->getIdent()) { >- switch (primitiveValue->getIdent()) { >- case CSSValueSlow: >- m_style->setMarqueeSpeed(500); // 500 msec. >- break; >- case CSSValueNormal: >- m_style->setMarqueeSpeed(85); // 85msec. The WinIE default. >- break; >- case CSSValueFast: >- m_style->setMarqueeSpeed(10); // 10msec. Super fast. >- break; >- } > } >- else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_S) >- m_style->setMarqueeSpeed(1000 * primitiveValue->getIntValue()); >- else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_MS) >- m_style->setMarqueeSpeed(primitiveValue->getIntValue()); >- else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) // For scrollamount support. >- m_style->setMarqueeSpeed(primitiveValue->getIntValue()); >- return; >- } >- case CSSPropertyWebkitMarqueeIncrement: { >- HANDLE_INHERIT_AND_INITIAL(marqueeIncrement, MarqueeIncrement) >- if (!primitiveValue) >+ case CSSPropertyWebkitTextSecurity: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textSecurity, TextSecurity) >+ return; >+ >+#if ENABLE(DASHBOARD_SUPPORT) >+ case CSSPropertyWebkitDashboardRegion: { >+ HANDLE_INHERIT_AND_INITIAL(dashboardRegions, DashboardRegions) >+ if (!primitiveValue) >+ return; >+ >+ if (primitiveValue->getIdent() == CSSValueNone) { >+ m_style->setDashboardRegions(RenderStyle::noneDashboardRegions()); >+ return; >+ } >+ >+ DashboardRegion *region = primitiveValue->getDashboardRegionValue(); >+ if (!region) >+ return; >+ >+ DashboardRegion *first = region; >+ while (region) { >+ Length top = convertToIntLength(region->top(), style(), m_rootElementStyle); >+ Length right = convertToIntLength(region->right(), style(), m_rootElementStyle); >+ Length bottom = convertToIntLength(region->bottom(), style(), m_rootElementStyle); >+ Length left = convertToIntLength(region->left(), style(), m_rootElementStyle); >+ if (region->m_isCircle) >+ m_style->setDashboardRegion(StyleDashboardRegion::Circle, region->m_label, top, right, bottom, left, region == first ? false : true); >+ else if (region->m_isRectangle) >+ m_style->setDashboardRegion(StyleDashboardRegion::Rectangle, region->m_label, top, right, bottom, left, region == first ? false : true); >+ region = region->m_next.get(); >+ } >+ >+ m_element->document()->setHasDashboardRegions(true); >+ > return; >- if (primitiveValue->getIdent()) { >+ } >+#endif >+ case CSSPropertyWebkitRtlOrdering: >+// HANDLE_INHERIT_AND_INITIAL(visuallyOrdered, VisuallyOrdered) >+// if (!primitiveValue || !primitiveValue->getIdent()) >+// return; >+// m_style->setVisuallyOrdered(primitiveValue->getIdent() == CSSValueVisual); >+ return; >+ case CSSPropertyWebkitTextStrokeWidth: { >+ HANDLE_INHERIT_AND_INITIAL(textStrokeWidth, TextStrokeWidth) >+ float width = 0; > switch (primitiveValue->getIdent()) { >- case CSSValueSmall: >- m_style->setMarqueeIncrement(Length(1, Fixed)); // 1px. >- break; >- case CSSValueNormal: >- m_style->setMarqueeIncrement(Length(6, Fixed)); // 6px. The WinIE default. >+ case CSSValueThin: >+ case CSSValueMedium: >+ case CSSValueThick: { >+ double result = 1.0 / 48; >+ if (primitiveValue->getIdent() == CSSValueMedium) >+ result *= 3; >+ else if (primitiveValue->getIdent() == CSSValueThick) >+ result *= 5; >+ width = CSSPrimitiveValue::create(result, CSSPrimitiveValue::CSS_EMS)->computeLength<float>(style(), m_rootElementStyle, zoomFactor); > break; >- case CSSValueLarge: >- m_style->setMarqueeIncrement(Length(36, Fixed)); // 36px. >+ } >+ default: >+ width = primitiveValue->computeLength<float>(style(), m_rootElementStyle, zoomFactor); > break; > } >+ m_style->setTextStrokeWidth(width); >+ return; > } >- else { >- bool ok = true; >- Length marqueeLength = convertToIntLength(primitiveValue, style(), m_rootElementStyle, 1, &ok); >- if (ok) >- m_style->setMarqueeIncrement(marqueeLength); >+ case CSSPropertyWebkitTransform: { >+ HANDLE_INHERIT_AND_INITIAL(transform, Transform); >+ TransformOperations operations; >+ createTransformOperations(value, style(), m_rootElementStyle, operations); >+ m_style->setTransform(operations); >+ return; > } >- return; >- } >- case CSSPropertyWebkitMarqueeStyle: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marqueeBehavior, MarqueeBehavior) >- return; >- case CSSPropertyWebkitFlow: >- if (isInitial) >- HANDLE_INITIAL_COND(CSSPropertyWebkitFlow, FlowThread); >- if (isInherit) { >- m_style->setFlowThread(nullAtom); >+ case CSSPropertyWebkitTransformOrigin: >+ HANDLE_INHERIT_AND_INITIAL(transformOriginX, TransformOriginX) >+ HANDLE_INHERIT_AND_INITIAL(transformOriginY, TransformOriginY) >+ HANDLE_INHERIT_AND_INITIAL(transformOriginZ, TransformOriginZ) > return; >+ case CSSPropertyWebkitTransformOriginX: { >+ HANDLE_INHERIT_AND_INITIAL(transformOriginX, TransformOriginX) >+ if (!primitiveValue) >+ return; >+ Length l; >+ int type = primitiveValue->primitiveType(); >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); >+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ l = Length(primitiveValue->getDoubleValue(), Percent); >+ else >+ return; >+ m_style->setTransformOriginX(l); >+ break; > } >- if (primitiveValue->getIdent() == CSSValueAuto) >- m_style->setFlowThread(nullAtom); >- else >- m_style->setFlowThread(primitiveValue->getStringValue()); >- return; >- case CSSPropertyWebkitContentOrder: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(regionIndex, RegionIndex); >- return; >- case CSSPropertyWebkitRegionOverflow: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(regionOverflow, RegionOverflow); >- return; >- case CSSPropertyWebkitMarqueeDirection: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marqueeDirection, MarqueeDirection) >- return; >- case CSSPropertyWebkitUserDrag: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(userDrag, UserDrag) >- return; >- case CSSPropertyWebkitUserModify: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(userModify, UserModify) >- return; >- case CSSPropertyWebkitUserSelect: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(userSelect, UserSelect) >- return; >- >- case CSSPropertyTextOverflow: { >- // This property is supported by WinIE, and so we leave off the "-webkit-" in order to >- // work with WinIE-specific pages that use the property. >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textOverflow, TextOverflow) >- return; >- } >- case CSSPropertyWebkitLineClamp: { >- HANDLE_INHERIT_AND_INITIAL(lineClamp, LineClamp) >- if (!primitiveValue) >+ case CSSPropertyWebkitTransformOriginY: { >+ HANDLE_INHERIT_AND_INITIAL(transformOriginY, TransformOriginY) >+ if (!primitiveValue) >+ return; >+ Length l; >+ int type = primitiveValue->primitiveType(); >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); >+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ l = Length(primitiveValue->getDoubleValue(), Percent); >+ else >+ return; >+ m_style->setTransformOriginY(l); >+ break; >+ } >+ case CSSPropertyWebkitTransformOriginZ: { >+ HANDLE_INHERIT_AND_INITIAL(transformOriginZ, TransformOriginZ) >+ if (!primitiveValue) >+ return; >+ float f; >+ int type = primitiveValue->primitiveType(); >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ f = static_cast<float>(primitiveValue->computeLength<int>(style(), m_rootElementStyle)); >+ else >+ return; >+ m_style->setTransformOriginZ(f); >+ break; >+ } >+ case CSSPropertyWebkitTransformStyle: >+ HANDLE_INHERIT_AND_INITIAL(transformStyle3D, TransformStyle3D) >+ if (primitiveValue) >+ m_style->setTransformStyle3D((primitiveValue->getIdent() == CSSValuePreserve3d) ? TransformStyle3DPreserve3D : TransformStyle3DFlat); >+ return; >+ case CSSPropertyWebkitPerspective: { >+ HANDLE_INHERIT_AND_INITIAL(perspective, Perspective) >+ if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) { >+ m_style->setPerspective(0); >+ return; >+ } >+ >+ float perspectiveValue; >+ int type = primitiveValue->primitiveType(); >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ perspectiveValue = static_cast<float>(primitiveValue->computeLength<int>(style(), m_rootElementStyle, zoomFactor)); >+ else if (type == CSSPrimitiveValue::CSS_NUMBER) { >+ // For backward compatibility, treat valueless numbers as px. >+ perspectiveValue = CSSPrimitiveValue::create(primitiveValue->getDoubleValue(), CSSPrimitiveValue::CSS_PX)->computeLength<float>(style(), m_rootElementStyle, zoomFactor); >+ } else >+ return; >+ >+ if (perspectiveValue >= 0.0f) >+ m_style->setPerspective(perspectiveValue); > return; >- int type = primitiveValue->primitiveType(); >- if (type == CSSPrimitiveValue::CSS_NUMBER) >- m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_NUMBER), LineClampLineCount)); >- else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >- m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_PERCENTAGE), LineClampPercentage)); >- return; >- } >- case CSSPropertyWebkitHyphens: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(hyphens, Hyphens); >- return; >- case CSSPropertyWebkitHyphenateLimitAfter: { >- HANDLE_INHERIT_AND_INITIAL(hyphenationLimitAfter, HyphenationLimitAfter); >- if (primitiveValue->getIdent() == CSSValueAuto) >- m_style->setHyphenationLimitAfter(-1); >- else >- m_style->setHyphenationLimitAfter(primitiveValue->getValue<short>(CSSPrimitiveValue::CSS_NUMBER)); >- return; >- } >- case CSSPropertyWebkitHyphenateLimitBefore: { >- HANDLE_INHERIT_AND_INITIAL(hyphenationLimitBefore, HyphenationLimitBefore); >- if (primitiveValue->getIdent() == CSSValueAuto) >- m_style->setHyphenationLimitBefore(-1); >- else >- m_style->setHyphenationLimitBefore(primitiveValue->getValue<short>(CSSPrimitiveValue::CSS_NUMBER)); >- return; >- } >- case CSSPropertyWebkitHyphenateLimitLines: { >- HANDLE_INHERIT_AND_INITIAL(hyphenationLimitLines, HyphenationLimitLines); >- if (primitiveValue->getIdent() == CSSValueNoLimit) >- m_style->setHyphenationLimitLines(-1); >- else >- m_style->setHyphenationLimitLines(primitiveValue->getValue<short>(CSSPrimitiveValue::CSS_NUMBER)); >- return; >- } >- case CSSPropertyWebkitLocale: { >- HANDLE_INHERIT_AND_INITIAL(locale, Locale); >- if (primitiveValue->getIdent() == CSSValueAuto) >- m_style->setLocale(nullAtom); >- else >- m_style->setLocale(primitiveValue->getStringValue()); >- FontDescription fontDescription = m_style->fontDescription(); >- fontDescription.setScript(localeToScriptCodeForFontSelection(m_style->locale())); >- setFontDescription(fontDescription); >- return; >- } >- case CSSPropertyWebkitBorderFit: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(borderFit, BorderFit); >- return; >- case CSSPropertyWebkitTextSizeAdjust: { >- HANDLE_INHERIT_AND_INITIAL(textSizeAdjust, TextSizeAdjust) >- if (!primitiveValue || !primitiveValue->getIdent()) >+ } >+ case CSSPropertyWebkitPerspectiveOrigin: >+ HANDLE_INHERIT_AND_INITIAL(perspectiveOriginX, PerspectiveOriginX) >+ HANDLE_INHERIT_AND_INITIAL(perspectiveOriginY, PerspectiveOriginY) > return; >- setTextSizeAdjust(primitiveValue->getIdent() == CSSValueAuto); >- return; >- } >- case CSSPropertyWebkitTextSecurity: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textSecurity, TextSecurity) >- return; >- >-#if ENABLE(DASHBOARD_SUPPORT) >- case CSSPropertyWebkitDashboardRegion: { >- HANDLE_INHERIT_AND_INITIAL(dashboardRegions, DashboardRegions) >- if (!primitiveValue) >+ case CSSPropertyWebkitPerspectiveOriginX: { >+ HANDLE_INHERIT_AND_INITIAL(perspectiveOriginX, PerspectiveOriginX) >+ if (!primitiveValue) >+ return; >+ Length l; >+ int type = primitiveValue->primitiveType(); >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); >+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ l = Length(primitiveValue->getDoubleValue(), Percent); >+ else >+ return; >+ m_style->setPerspectiveOriginX(l); > return; >- >- if (primitiveValue->getIdent() == CSSValueNone) { >- m_style->setDashboardRegions(RenderStyle::noneDashboardRegions()); >+ } >+ case CSSPropertyWebkitPerspectiveOriginY: { >+ HANDLE_INHERIT_AND_INITIAL(perspectiveOriginY, PerspectiveOriginY) >+ if (!primitiveValue) >+ return; >+ Length l; >+ int type = primitiveValue->primitiveType(); >+ if (CSSPrimitiveValue::isUnitTypeLength(type)) >+ l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); >+ else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) >+ l = Length(primitiveValue->getDoubleValue(), Percent); >+ else >+ return; >+ m_style->setPerspectiveOriginY(l); > return; > } >- >- DashboardRegion *region = primitiveValue->getDashboardRegionValue(); >- if (!region) >+ case CSSPropertyWebkitAnimation: >+ if (isInitial) >+ m_style->clearAnimations(); >+ else if (isInherit) >+ m_style->inheritAnimations(m_parentStyle->animations()); >+ return; >+ case CSSPropertyWebkitAnimationDelay: >+ HANDLE_ANIMATION_VALUE(delay, Delay, value) >+ return; >+ case CSSPropertyWebkitAnimationDirection: >+ HANDLE_ANIMATION_VALUE(direction, Direction, value) >+ return; >+ case CSSPropertyWebkitAnimationDuration: >+ HANDLE_ANIMATION_VALUE(duration, Duration, value) >+ return; >+ case CSSPropertyWebkitAnimationFillMode: >+ HANDLE_ANIMATION_VALUE(fillMode, FillMode, value) >+ return; >+ case CSSPropertyWebkitAnimationIterationCount: >+ HANDLE_ANIMATION_VALUE(iterationCount, IterationCount, value) >+ return; >+ case CSSPropertyWebkitAnimationName: >+ HANDLE_ANIMATION_VALUE(name, Name, value) >+ return; >+ case CSSPropertyWebkitAnimationPlayState: >+ HANDLE_ANIMATION_VALUE(playState, PlayState, value) >+ return; >+ case CSSPropertyWebkitAnimationTimingFunction: >+ HANDLE_ANIMATION_VALUE(timingFunction, TimingFunction, value) >+ return; >+ case CSSPropertyWebkitTransition: >+ if (isInitial) >+ m_style->clearTransitions(); >+ else if (isInherit) >+ m_style->inheritTransitions(m_parentStyle->transitions()); >+ return; >+ case CSSPropertyWebkitTransitionDelay: >+ HANDLE_TRANSITION_VALUE(delay, Delay, value) >+ return; >+ case CSSPropertyWebkitTransitionDuration: >+ HANDLE_TRANSITION_VALUE(duration, Duration, value) >+ return; >+ case CSSPropertyWebkitTransitionProperty: >+ HANDLE_TRANSITION_VALUE(property, Property, value) >+ return; >+ case CSSPropertyWebkitTransitionTimingFunction: >+ HANDLE_TRANSITION_VALUE(timingFunction, TimingFunction, value) >+ return; >+ case CSSPropertyPointerEvents: >+ { >+#if ENABLE(DASHBOARD_SUPPORT) >+ // <rdar://problem/6561077> Work around the Stocks widget's misuse of the >+ // pointer-events property by not applying it in Dashboard. >+ Settings* settings = m_checker.document()->settings(); >+ if (settings && settings->usesDashboardBackwardCompatibilityMode()) >+ return; >+#endif >+ HANDLE_INHERIT_AND_INITIAL(pointerEvents, PointerEvents) >+ if (!primitiveValue) >+ return; >+ m_style->setPointerEvents(*primitiveValue); > return; >- >- DashboardRegion *first = region; >- while (region) { >- Length top = convertToIntLength(region->top(), style(), m_rootElementStyle); >- Length right = convertToIntLength(region->right(), style(), m_rootElementStyle); >- Length bottom = convertToIntLength(region->bottom(), style(), m_rootElementStyle); >- Length left = convertToIntLength(region->left(), style(), m_rootElementStyle); >- if (region->m_isCircle) >- m_style->setDashboardRegion(StyleDashboardRegion::Circle, region->m_label, top, right, bottom, left, region == first ? false : true); >- else if (region->m_isRectangle) >- m_style->setDashboardRegion(StyleDashboardRegion::Rectangle, region->m_label, top, right, bottom, left, region == first ? false : true); >- region = region->m_next.get(); > } >- >- m_element->document()->setHasDashboardRegions(true); >- >- return; >- } >-#endif >- case CSSPropertyWebkitRtlOrdering: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(rtlOrdering, RTLOrdering) >- return; >- case CSSPropertyWebkitTextStrokeWidth: { >- HANDLE_INHERIT_AND_INITIAL(textStrokeWidth, TextStrokeWidth) >- float width = 0; >- switch (primitiveValue->getIdent()) { >- case CSSValueThin: >- case CSSValueMedium: >- case CSSValueThick: { >- double result = 1.0 / 48; >- if (primitiveValue->getIdent() == CSSValueMedium) >- result *= 3; >- else if (primitiveValue->getIdent() == CSSValueThick) >- result *= 5; >- width = CSSPrimitiveValue::create(result, CSSPrimitiveValue::CSS_EMS)->computeLength<float>(style(), m_rootElementStyle, zoomFactor); >- break; >+ case CSSPropertyWebkitColorCorrection: >+ if (isInherit) >+ m_style->setColorSpace(m_parentStyle->colorSpace()); >+ else if (isInitial) >+ m_style->setColorSpace(ColorSpaceDeviceRGB); >+ else { >+ if (!primitiveValue) >+ return; >+ m_style->setColorSpace(*primitiveValue); > } >- default: >- width = primitiveValue->computeLength<float>(style(), m_rootElementStyle, zoomFactor); >- break; >- } >- m_style->setTextStrokeWidth(width); >- return; >- } >- case CSSPropertyWebkitTransform: { >- HANDLE_INHERIT_AND_INITIAL(transform, Transform); >- TransformOperations operations; >- createTransformOperations(value, style(), m_rootElementStyle, operations); >- m_style->setTransform(operations); >- return; >- } >- case CSSPropertyWebkitTransformStyle: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(transformStyle3D, TransformStyle3D) >- return; >- case CSSPropertyWebkitPerspective: { >- HANDLE_INHERIT_AND_INITIAL(perspective, Perspective) >- if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) { >- m_style->setPerspective(0); > return; >- } >- >- float perspectiveValue; >- int type = primitiveValue->primitiveType(); >- if (CSSPrimitiveValue::isUnitTypeLength(type)) >- perspectiveValue = primitiveValue->computeLength<float>(style(), m_rootElementStyle, zoomFactor); >- else if (type == CSSPrimitiveValue::CSS_NUMBER) { >- // For backward compatibility, treat valueless numbers as px. >- perspectiveValue = CSSPrimitiveValue::create(primitiveValue->getDoubleValue(), CSSPrimitiveValue::CSS_PX)->computeLength<float>(style(), m_rootElementStyle, zoomFactor); >- } else >+ case CSSPropertySize: >+ applyPageSizeProperty(value); > return; >- >- if (perspectiveValue >= 0.0f) >- m_style->setPerspective(perspectiveValue); >- return; >- } >- case CSSPropertyWebkitAnimation: >- if (isInitial) >- m_style->clearAnimations(); >- else if (isInherit) >- m_style->inheritAnimations(m_parentStyle->animations()); >- return; >- case CSSPropertyWebkitTransition: >- if (isInitial) >- m_style->clearTransitions(); >- else if (isInherit) >- m_style->inheritTransitions(m_parentStyle->transitions()); >- return; >- case CSSPropertyPointerEvents: >- { >-#if ENABLE(DASHBOARD_SUPPORT) >- // <rdar://problem/6561077> Work around the Stocks widget's misuse of the >- // pointer-events property by not applying it in Dashboard. >- Settings* settings = m_checker.document()->settings(); >- if (settings && settings->usesDashboardBackwardCompatibilityMode()) >+ >+ case CSSPropertySpeak: >+ HANDLE_INHERIT_AND_INITIAL(speak, Speak); >+ if (!primitiveValue) >+ return; >+ m_style->setSpeak(*primitiveValue); > return; >-#endif >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(pointerEvents, PointerEvents) >- return; >- } >-#if ENABLE(TOUCH_EVENTS) >- case CSSPropertyWebkitTapHighlightColor: { >- HANDLE_INHERIT_AND_INITIAL(tapHighlightColor, TapHighlightColor); >- if (!primitiveValue) >- break; >- >- Color col = getColorFromPrimitiveValue(primitiveValue); >- m_style->setTapHighlightColor(col); >- return; >- } >-#endif >- case CSSPropertyWebkitColorCorrection: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(colorSpace, ColorSpace); >- return; >- case CSSPropertySize: >- applyPageSizeProperty(value); >- return; >- case CSSPropertySpeak: >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(speak, Speak); >- return; >- case CSSPropertyInvalid: >- return; >- // 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 CSSPropertyWebkitBorderBefore: >- case CSSPropertyWebkitBorderBeforeColor: >- case CSSPropertyWebkitBorderBeforeStyle: >- case CSSPropertyWebkitBorderBeforeWidth: >- case CSSPropertyWebkitBorderAfter: >- case CSSPropertyWebkitBorderAfterColor: >- case CSSPropertyWebkitBorderAfterStyle: >- case CSSPropertyWebkitBorderAfterWidth: >- case CSSPropertyWebkitMarginEnd: >- case CSSPropertyWebkitMarginStart: >- case CSSPropertyWebkitMarginBefore: >- case CSSPropertyWebkitMarginAfter: >- case CSSPropertyWebkitMarginCollapse: >- case CSSPropertyWebkitMarginBeforeCollapse: >- case CSSPropertyWebkitMarginTopCollapse: >- case CSSPropertyWebkitMarginAfterCollapse: >- case CSSPropertyWebkitMarginBottomCollapse: >- case CSSPropertyWebkitPaddingEnd: >- case CSSPropertyWebkitPaddingStart: >- case CSSPropertyWebkitPaddingBefore: >- case CSSPropertyWebkitPaddingAfter: >- case CSSPropertyWebkitLogicalWidth: >- case CSSPropertyWebkitLogicalHeight: >- case CSSPropertyWebkitMinLogicalWidth: >- case CSSPropertyWebkitMinLogicalHeight: >- case CSSPropertyWebkitMaxLogicalWidth: >- case CSSPropertyWebkitMaxLogicalHeight: >- { >- int newId = CSSProperty::resolveDirectionAwareProperty(id, m_style->direction(), m_style->writingMode()); >- ASSERT(newId != id); >- return applyProperty(newId, value); >- } >- case CSSPropertyFontStretch: >- case CSSPropertyPage: >- case CSSPropertyTextLineThrough: >- case CSSPropertyTextLineThroughColor: >- case CSSPropertyTextLineThroughMode: >- case CSSPropertyTextLineThroughStyle: >- case CSSPropertyTextLineThroughWidth: >- case CSSPropertyTextOverline: >- case CSSPropertyTextOverlineColor: >- case CSSPropertyTextOverlineMode: >- case CSSPropertyTextOverlineStyle: >- case CSSPropertyTextOverlineWidth: >- case CSSPropertyTextUnderline: >- case CSSPropertyTextUnderlineColor: >- case CSSPropertyTextUnderlineMode: >- case CSSPropertyTextUnderlineStyle: >- case CSSPropertyTextUnderlineWidth: >- case CSSPropertyWebkitFontSizeDelta: >- case CSSPropertyWebkitTextDecorationsInEffect: >- case CSSPropertyWebkitTextStroke: >- case CSSPropertyWebkitTextEmphasis: >- return; >- >- // CSS Text Layout Module Level 3: Vertical writing support >- case CSSPropertyWebkitWritingMode: { >- HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(writingMode, WritingMode) >- if (!isInherit && !isInitial && m_element && m_element == m_element->document()->documentElement()) >- m_element->document()->setWritingModeSetOnDocumentElement(true); >- FontDescription fontDescription = m_style->fontDescription(); >- fontDescription.setOrientation(m_style->isHorizontalWritingMode() ? Horizontal : Vertical); >- setFontDescription(fontDescription); >- return; >- } >- >- case CSSPropertyWebkitLineBoxContain: { >- HANDLE_INHERIT_AND_INITIAL(lineBoxContain, LineBoxContain) >- if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) { >- m_style->setLineBoxContain(LineBoxContainNone); >+ >+ case CSSPropertyInvalid: > return; >+ >+ // 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 CSSPropertyWebkitBorderBefore: >+ case CSSPropertyWebkitBorderBeforeColor: >+ case CSSPropertyWebkitBorderBeforeStyle: >+ case CSSPropertyWebkitBorderBeforeWidth: >+ case CSSPropertyWebkitBorderAfter: >+ case CSSPropertyWebkitBorderAfterColor: >+ case CSSPropertyWebkitBorderAfterStyle: >+ case CSSPropertyWebkitBorderAfterWidth: >+ case CSSPropertyWebkitMarginEnd: >+ case CSSPropertyWebkitMarginStart: >+ case CSSPropertyWebkitMarginBefore: >+ case CSSPropertyWebkitMarginAfter: >+ case CSSPropertyWebkitPaddingEnd: >+ case CSSPropertyWebkitPaddingStart: >+ case CSSPropertyWebkitPaddingBefore: >+ case CSSPropertyWebkitPaddingAfter: >+ case CSSPropertyWebkitLogicalWidth: >+ case CSSPropertyWebkitLogicalHeight: >+ case CSSPropertyWebkitMinLogicalWidth: >+ case CSSPropertyWebkitMinLogicalHeight: >+ case CSSPropertyWebkitMaxLogicalWidth: >+ case CSSPropertyWebkitMaxLogicalHeight: >+ { >+ int newId = CSSProperty::resolveDirectionAwareProperty(id, m_style->direction(), m_style->writingMode()); >+ ASSERT(newId != id); >+ return applyProperty(newId, value); > } >- >- if (!value->isCSSLineBoxContainValue()) >+ >+ case CSSPropertyFontStretch: >+ case CSSPropertyPage: >+ case CSSPropertyTextLineThrough: >+ case CSSPropertyTextLineThroughColor: >+ case CSSPropertyTextLineThroughMode: >+ case CSSPropertyTextLineThroughStyle: >+ case CSSPropertyTextLineThroughWidth: >+ case CSSPropertyTextOverline: >+ case CSSPropertyTextOverlineColor: >+ case CSSPropertyTextOverlineMode: >+ case CSSPropertyTextOverlineStyle: >+ case CSSPropertyTextOverlineWidth: >+ case CSSPropertyTextUnderline: >+ case CSSPropertyTextUnderlineColor: >+ case CSSPropertyTextUnderlineMode: >+ case CSSPropertyTextUnderlineStyle: >+ case CSSPropertyTextUnderlineWidth: >+ case CSSPropertyWebkitFontSizeDelta: >+ case CSSPropertyWebkitTextDecorationsInEffect: >+ case CSSPropertyWebkitTextStroke: >+ case CSSPropertyWebkitTextEmphasis: >+ return; >+#if ENABLE(WCSS) >+ case CSSPropertyWapInputFormat: >+ if (primitiveValue && m_element->hasTagName(WebCore::inputTag)) { >+ String mask = primitiveValue->getStringValue(); >+ static_cast<HTMLInputElement*>(m_element)->setWapInputFormat(mask); >+ } > return; >- >- CSSLineBoxContainValue* lineBoxContainValue = static_cast<CSSLineBoxContainValue*>(value); >- m_style->setLineBoxContain(lineBoxContainValue->value()); >- return; >- } >- >- case CSSPropertyWebkitWrapShape: >- HANDLE_INHERIT_AND_INITIAL(wrapShape, WrapShape); >- if (!primitiveValue) >+ >+ case CSSPropertyWapInputRequired: >+ if (primitiveValue && m_element->isFormControlElement()) { >+ HTMLFormControlElement* element = static_cast<HTMLFormControlElement*>(m_element); >+ bool required = primitiveValue->getStringValue() == "true"; >+ element->setRequired(required); >+ } > return; >- >- if (primitiveValue->getIdent() == CSSValueAuto) >- m_style->setWrapShape(0); >- else if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_SHAPE) >- m_style->setWrapShape(primitiveValue->getShapeValue()); >- >- return; >- >- // CSS Fonts Module Level 3 >- case CSSPropertyWebkitFontFeatureSettings: { >- if (primitiveValue && primitiveValue->getIdent() == CSSValueNormal) { >- setFontDescription(m_style->fontDescription().makeNormalFeatureSettings()); >+#endif >+ >+ // CSS Text Layout Module Level 3: Vertical writing support >+ case CSSPropertyWebkitWritingMode: { >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(writingMode, WritingMode) >+ if (!isInherit && !isInitial && m_element && m_element == m_element->document()->documentElement()) >+ m_element->document()->setWritingModeSetOnDocumentElement(true); >+ FontDescription fontDescription = m_style->fontDescription(); >+ fontDescription.setOrientation(m_style->isHorizontalWritingMode() ? Horizontal : Vertical); >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; > return; > } >- >- if (!value->isValueList()) >+ >+ case CSSPropertyWebkitTextCombine: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textCombine, TextCombine) >+ if (m_style->hasTextCombine()) >+ m_style->setUnique(); // The style could be modified in RenderCombineText depending on text metrics. >+ return; >+ >+ case CSSPropertyWebkitTextEmphasisPosition: >+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textEmphasisPosition, TextEmphasisPosition) >+ return; >+ >+ case CSSPropertyWebkitTextEmphasisStyle: >+ HANDLE_INHERIT_AND_INITIAL(textEmphasisFill, TextEmphasisFill) >+ HANDLE_INHERIT_AND_INITIAL(textEmphasisMark, TextEmphasisMark) >+ HANDLE_INHERIT_AND_INITIAL(textEmphasisCustomMark, TextEmphasisCustomMark) >+ if (isInherit || isInitial) >+ return; >+ >+ if (value->isValueList()) { >+ CSSValueList* list = static_cast<CSSValueList*>(value); >+ ASSERT(list->length() == 2); >+ if (list->length() != 2) >+ return; >+ for (unsigned i = 0; i < 2; ++i) { >+ ASSERT(list->itemWithoutBoundsCheck(i)->isPrimitiveValue()); >+ CSSPrimitiveValue* value = static_cast<CSSPrimitiveValue*>(list->itemWithoutBoundsCheck(i)); >+ if (value->getIdent() == CSSValueFilled || value->getIdent() == CSSValueOpen) >+ m_style->setTextEmphasisFill(*value); >+ else >+ m_style->setTextEmphasisMark(*value); >+ } >+ m_style->setTextEmphasisCustomMark(nullAtom); >+ return; >+ } >+ >+ if (!primitiveValue) >+ return; >+ >+ if (primitiveValue->primitiveType() == CSSPrimitiveValue::CSS_STRING) { >+ m_style->setTextEmphasisFill(TextEmphasisFillFilled); >+ m_style->setTextEmphasisMark(TextEmphasisMarkCustom); >+ m_style->setTextEmphasisCustomMark(primitiveValue->getStringValue()); >+ return; >+ } >+ >+ m_style->setTextEmphasisCustomMark(nullAtom); >+ >+ if (primitiveValue->getIdent() == CSSValueFilled || primitiveValue->getIdent() == CSSValueOpen) { >+ m_style->setTextEmphasisFill(*primitiveValue); >+ m_style->setTextEmphasisMark(TextEmphasisMarkAuto); >+ } else { >+ m_style->setTextEmphasisFill(TextEmphasisFillFilled); >+ m_style->setTextEmphasisMark(*primitiveValue); >+ } >+ >+ return; >+ >+ case CSSPropertyWebkitTextOrientation: { >+ if (!isInherit && !isInitial && !primitiveValue) >+ return; >+ >+ TextOrientation result; >+ if (isInherit) >+ result = m_parentStyle->fontDescription().textOrientation(); >+ else if (isInitial) >+ result = RenderStyle::initialTextOrientation(); >+ else >+ result = *primitiveValue; >+ >+ FontDescription fontDescription = m_style->fontDescription(); >+ if (fontDescription.textOrientation() != result) { >+ fontDescription.setTextOrientation(result); >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ } > return; >- >- FontDescription fontDescription = m_style->fontDescription(); >- CSSValueList* list = static_cast<CSSValueList*>(value); >- RefPtr<FontFeatureSettings> settings = FontFeatureSettings::create(); >- int len = list->length(); >- for (int i = 0; i < len; ++i) { >- CSSValue* item = list->itemWithoutBoundsCheck(i); >- if (!item->isFontFeatureValue()) >- continue; >- FontFeatureValue* feature = static_cast<FontFeatureValue*>(item); >- settings->append(FontFeature(feature->tag(), feature->value())); > } >- fontDescription.setFeatureSettings(settings.release()); >- setFontDescription(fontDescription); >- return; >- } >- >-#if ENABLE(CSS_FILTERS) >- case CSSPropertyWebkitFilter: >- return; >-#endif >- >- // These properties are implemented in the CSSStyleApplyProperty lookup table. >- case CSSPropertyColor: >- case CSSPropertyDirection: >- case CSSPropertyBackgroundAttachment: >- case CSSPropertyBackgroundClip: >- case CSSPropertyWebkitBackgroundClip: >- case CSSPropertyWebkitBackgroundComposite: >- case CSSPropertyBackgroundOrigin: >- case CSSPropertyWebkitBackgroundOrigin: >- case CSSPropertyBackgroundImage: >- case CSSPropertyBackgroundSize: >- case CSSPropertyWebkitBackgroundSize: >- case CSSPropertyWebkitMaskAttachment: >- case CSSPropertyWebkitMaskClip: >- case CSSPropertyWebkitMaskComposite: >- case CSSPropertyWebkitMaskOrigin: >- case CSSPropertyWebkitMaskImage: >- case CSSPropertyWebkitMaskSize: >- case CSSPropertyBackgroundColor: >- case CSSPropertyBorderBottomColor: >- case CSSPropertyBorderLeftColor: >- case CSSPropertyBorderRightColor: >- case CSSPropertyBorderTopColor: >- case CSSPropertyBorderTopStyle: >- case CSSPropertyBorderRightStyle: >- case CSSPropertyBorderBottomStyle: >- case CSSPropertyBorderLeftStyle: >- case CSSPropertyBorderTopWidth: >- case CSSPropertyBorderRightWidth: >- case CSSPropertyBorderBottomWidth: >- case CSSPropertyBorderLeftWidth: >- case CSSPropertyBorder: >- case CSSPropertyBorderStyle: >- case CSSPropertyBorderWidth: >- case CSSPropertyBorderColor: >- case CSSPropertyBorderTop: >- case CSSPropertyBorderRight: >- case CSSPropertyBorderBottom: >- case CSSPropertyBorderLeft: >- case CSSPropertyBorderRadius: >- case CSSPropertyWebkitBorderRadius: >- case CSSPropertyBorderTopLeftRadius: >- case CSSPropertyBorderTopRightRadius: >- case CSSPropertyBorderBottomLeftRadius: >- case CSSPropertyBorderBottomRightRadius: >- case CSSPropertyBorderSpacing: >- case CSSPropertyWebkitBorderHorizontalSpacing: >- case CSSPropertyWebkitBorderVerticalSpacing: >- case CSSPropertyCounterIncrement: >- case CSSPropertyCounterReset: >- case CSSPropertyLetterSpacing: >- case CSSPropertyWordSpacing: >-#if ENABLE(CSS3_FLEXBOX) >- case CSSPropertyWebkitFlexOrder: >- case CSSPropertyWebkitFlexPack: >- case CSSPropertyWebkitFlexAlign: >- case CSSPropertyWebkitFlexFlow: >-#endif >- case CSSPropertyFontStyle: >- case CSSPropertyFontVariant: >- case CSSPropertyTextRendering: >- case CSSPropertyWebkitTextOrientation: >- case CSSPropertyWebkitFontSmoothing: >- case CSSPropertyFontWeight: >- case CSSPropertyOutlineStyle: >- case CSSPropertyOutlineWidth: >- case CSSPropertyOutlineOffset: >- case CSSPropertyWebkitColumnRuleWidth: >- case CSSPropertyOutlineColor: >- case CSSPropertyWebkitColumnRuleColor: >- case CSSPropertyWebkitTextEmphasisColor: >- case CSSPropertyWebkitTextFillColor: >- case CSSPropertyWebkitTextStrokeColor: >- case CSSPropertyBackgroundPosition: >- case CSSPropertyBackgroundPositionX: >- case CSSPropertyBackgroundPositionY: >- case CSSPropertyWebkitMaskPosition: >- case CSSPropertyWebkitMaskPositionX: >- case CSSPropertyWebkitMaskPositionY: >- case CSSPropertyBackgroundRepeat: >- case CSSPropertyBackgroundRepeatX: >- case CSSPropertyBackgroundRepeatY: >- case CSSPropertyWebkitMaskRepeat: >- case CSSPropertyWebkitMaskRepeatX: >- case CSSPropertyWebkitMaskRepeatY: >- case CSSPropertyOverflow: >- case CSSPropertyOverflowX: >- case CSSPropertyOverflowY: >- case CSSPropertyMaxWidth: >- case CSSPropertyTop: >- case CSSPropertyLeft: >- case CSSPropertyRight: >- case CSSPropertyBottom: >- case CSSPropertyWidth: >- case CSSPropertyMinWidth: >- case CSSPropertyListStyle: >- case CSSPropertyListStyleImage: >- case CSSPropertyListStylePosition: >- case CSSPropertyListStyleType: >- case CSSPropertyMarginTop: >- case CSSPropertyMarginRight: >- case CSSPropertyMarginBottom: >- case CSSPropertyMarginLeft: >- case CSSPropertyMargin: >- case CSSPropertyPaddingTop: >- case CSSPropertyPaddingRight: >- case CSSPropertyPaddingBottom: >- case CSSPropertyPaddingLeft: >- case CSSPropertyPadding: >- case CSSPropertyTextIndent: >- case CSSPropertyMaxHeight: >- case CSSPropertyHeight: >- case CSSPropertyMinHeight: >- case CSSPropertyWebkitTransformOriginX: >- case CSSPropertyWebkitTransformOriginY: >- case CSSPropertyWebkitTransformOriginZ: >- case CSSPropertyWebkitTransformOrigin: >- case CSSPropertyWebkitPerspectiveOriginX: >- case CSSPropertyWebkitPerspectiveOriginY: >- case CSSPropertyWebkitPerspectiveOrigin: >- case CSSPropertyWebkitAnimationDelay: >- case CSSPropertyWebkitAnimationDirection: >- case CSSPropertyWebkitAnimationDuration: >- case CSSPropertyWebkitAnimationFillMode: >- case CSSPropertyWebkitAnimationIterationCount: >- case CSSPropertyWebkitAnimationName: >- case CSSPropertyWebkitAnimationPlayState: >- case CSSPropertyWebkitAnimationTimingFunction: >- case CSSPropertyWebkitTransitionDelay: >- case CSSPropertyWebkitTransitionDuration: >- case CSSPropertyWebkitTransitionProperty: >- case CSSPropertyWebkitTransitionTimingFunction: >- case CSSPropertyCursor: >- case CSSPropertyWebkitColumns: >- case CSSPropertyWebkitColumnCount: >- case CSSPropertyWebkitColumnGap: >- case CSSPropertyWebkitColumnWidth: >- case CSSPropertyWebkitHighlight: >- case CSSPropertyWebkitHyphenateCharacter: >- case CSSPropertyWebkitTextCombine: >- case CSSPropertyWebkitTextEmphasisPosition: >- case CSSPropertyWebkitTextEmphasisStyle: >- case CSSPropertyZIndex: >- ASSERT_NOT_REACHED(); >- return; >+ > #if ENABLE(SVG) >- default: >- // Try the SVG properties >- applySVGProperty(id, value); >- return; >+ default: >+ // Try the SVG properties >+ applySVGProperty(id, value); > #endif > } > } >Index: Source/WebCore/css/SVGCSSStyleSelector.cpp >=================================================================== >--- Source/WebCore/css/SVGCSSStyleSelector.cpp (revision 96498) >+++ Source/WebCore/css/SVGCSSStyleSelector.cpp (working copy) >@@ -598,7 +598,7 @@ void CSSStyleSelector::applySVGProperty( > default: > // If you crash here, it's because you added a css property and are not handling it > // in either this switch statement or the one in CSSStyleSelector::applyProperty >- ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", id); >+// ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", id); > return; > } > }
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 68944
:
108915
|
108917
|
109086
|
109612
|
109718
|
109744
|
110801
|
111712
|
111716