Title: [111460] trunk/Source/WebCore
- Revision
- 111460
- Author
- macpher...@chromium.org
- Date
- 2012-03-20 16:18:52 -0700 (Tue, 20 Mar 2012)
Log Message
Use CSSPrimitiveValue::convertToLength() to handle CSSPropertyWebkitBoxReflect and in createGridTrackBreadth.
https://bugs.webkit.org/show_bug.cgi?id=81633
Reviewed by Andreas Kling.
No new tests / refactoring only.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111459 => 111460)
--- trunk/Source/WebCore/ChangeLog 2012-03-20 23:15:11 UTC (rev 111459)
+++ trunk/Source/WebCore/ChangeLog 2012-03-20 23:18:52 UTC (rev 111460)
@@ -1,3 +1,15 @@
+2012-03-20 Luke Macpherson <macpher...@chromium.org>
+
+ Use CSSPrimitiveValue::convertToLength() to handle CSSPropertyWebkitBoxReflect and in createGridTrackBreadth.
+ https://bugs.webkit.org/show_bug.cgi?id=81633
+
+ Reviewed by Andreas Kling.
+
+ No new tests / refactoring only.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::collectMatchingRulesForList):
+
2012-03-20 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r111442.
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (111459 => 111460)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-20 23:15:11 UTC (rev 111459)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-20 23:18:52 UTC (rev 111460)
@@ -2918,23 +2918,15 @@
static bool createGridTrackBreadth(CSSPrimitiveValue* primitiveValue, CSSStyleSelector* selector, Length& length)
{
- if (primitiveValue->getIdent() == CSSValueAuto) {
- length = Length();
- return true;
- }
+ Length workingLength = primitiveValue->convertToLength<FixedIntegerConversion | PercentConversion | AutoConversion>(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom());
+ if (workingLength.isUndefined())
+ return false;
- if (primitiveValue->isLength()) {
- length = primitiveValue->computeLength<Length>(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom());
- length.setQuirk(primitiveValue->isQuirkValue());
- return true;
- }
+ if (primitiveValue->isLength())
+ workingLength.setQuirk(primitiveValue->isQuirkValue());
- if (primitiveValue->isPercentage()) {
- length = Length(primitiveValue->getDoubleValue(), Percent);
- return true;
- }
-
- return false;
+ length = workingLength;
+ return true;
}
static bool createGridTrackList(CSSValue* value, Vector<Length>& lengths, CSSStyleSelector* selector)
@@ -3371,12 +3363,8 @@
CSSReflectValue* reflectValue = static_cast<CSSReflectValue*>(value);
RefPtr<StyleReflection> reflection = StyleReflection::create();
reflection->setDirection(reflectValue->direction());
- if (reflectValue->offset()) {
- if (reflectValue->offset()->isPercentage())
- reflection->setOffset(Length(reflectValue->offset()->getDoubleValue(), Percent));
- else
- reflection->setOffset(reflectValue->offset()->computeLength<Length>(style(), m_rootElementStyle, zoomFactor));
- }
+ if (reflectValue->offset())
+ reflection->setOffset(reflectValue->offset()->convertToLength<FixedIntegerConversion | PercentConversion>(style(), m_rootElementStyle, zoomFactor));
NinePieceImage mask;
mask.setMaskDefaults();
mapNinePieceImage(property, reflectValue->mask(), mask);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes