Changeset 60862 in webkit
- Timestamp:
- Jun 8, 2010 12:56:35 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r60860 r60862 1 2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r60858. 4 http://trac.webkit.org/changeset/60858 5 https://bugs.webkit.org/show_bug.cgi?id=40325 6 7 Qt needs a clean build. Rolling out the patch for now and fix 8 it tomorrow (Requested by krit on #webkit). 9 10 * platform/mac/fast/css/getComputedStyle/computed-style-expected.txt: 11 * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 12 * platform/mac/svg/custom/non-scaling-stroke-expected.checksum: Removed. 13 * platform/mac/svg/custom/non-scaling-stroke-expected.png: Removed. 14 * platform/mac/svg/custom/non-scaling-stroke-expected.txt: Removed. 15 * svg/css/getComputedStyle-basic-expected.txt: 16 * svg/custom/non-scaling-stroke.svg: Removed. 17 1 18 2010-06-08 Robert Hogan <robert@webkit.org> 2 19 -
trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt
r60858 r60862 210 210 glyph-orientation-vertical: auto; 211 211 -webkit-svg-shadow: none; 212 vector-effect: none;213 212 214 213 Other attributes that the computed style class supports: -
trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r60858 r60862 209 209 glyph-orientation-vertical: auto 210 210 -webkit-svg-shadow: none 211 vector-effect: none212 211 background-position-x: 0% 213 212 background-position-y: 0% -
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
r60858 r60862 417 417 rect: style.getPropertyValue(-webkit-svg-shadow) : none 418 418 rect: style.getPropertyCSSValue(-webkit-svg-shadow) : [object CSSPrimitiveValue] 419 rect: style.getPropertyValue(vector-effect) : none420 rect: style.getPropertyCSSValue(vector-effect) : [object CSSPrimitiveValue]421 419 g: style.getPropertyValue(background-attachment) : scroll 422 420 g: style.getPropertyCSSValue(background-attachment) : [object CSSPrimitiveValue] … … 837 835 g: style.getPropertyValue(-webkit-svg-shadow) : none 838 836 g: style.getPropertyCSSValue(-webkit-svg-shadow) : [object CSSPrimitiveValue] 839 g: style.getPropertyValue(vector-effect) : none840 g: style.getPropertyCSSValue(vector-effect) : [object CSSPrimitiveValue]841 837 -
trunk/WebCore/ChangeLog
r60861 r60862 1 2010-06-08 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r60858. 4 http://trac.webkit.org/changeset/60858 5 https://bugs.webkit.org/show_bug.cgi?id=40325 6 7 Qt needs a clean build. Rolling out the patch for now and fix 8 it tomorrow (Requested by krit on #webkit). 9 10 * css/CSSComputedStyleDeclaration.cpp: 11 (WebCore::): 12 * css/CSSPrimitiveValueMappings.h: 13 * css/SVGCSSComputedStyleDeclaration.cpp: 14 (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): 15 * css/SVGCSSParser.cpp: 16 (WebCore::CSSParser::parseSVGValue): 17 * css/SVGCSSPropertyNames.in: 18 * css/SVGCSSStyleSelector.cpp: 19 (WebCore::CSSStyleSelector::applySVGProperty): 20 * css/SVGCSSValueKeywords.in: 21 * rendering/RenderPath.cpp: 22 (WebCore::fillAndStrokePath): 23 * rendering/RenderSVGResourceContainer.h: 24 * rendering/RenderSVGResourceGradient.cpp: 25 (WebCore::RenderSVGResourceGradient::applyResource): 26 * rendering/RenderSVGResourcePattern.cpp: 27 (WebCore::RenderSVGResourcePattern::applyResource): 28 * rendering/style/SVGRenderStyle.h: 29 (WebCore::SVGRenderStyle::NonInheritedFlags::): 30 (WebCore::SVGRenderStyle::setBitDefaults): 31 * rendering/style/SVGRenderStyleDefs.h: 32 (WebCore::): 33 * svg/SVGLocatable.cpp: 34 (WebCore::SVGLocatable::computeCTM): 35 * svg/SVGStyledElement.cpp: 36 (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): 37 * svg/svgattrs.in: 38 1 39 2010-06-08 Daniel Bates <dbates@rim.com> 2 40 -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r60858 r60862 265 265 CSSPropertyGlyphOrientationHorizontal, 266 266 CSSPropertyGlyphOrientationVertical, 267 CSSPropertyWebkitSvgShadow, 268 CSSPropertyVectorEffect 267 CSSPropertyWebkitSvgShadow 269 268 #endif 270 269 }; -
trunk/WebCore/css/CSSPrimitiveValueMappings.h
r60858 r60862 3 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 4 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) 5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.7 5 * 8 6 * Redistribution and use in source and binary forms, with or without … … 2602 2600 } 2603 2601 2604 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVectorEffect e)2605 : m_type(CSS_IDENT)2606 , m_hasCachedCSSText(false)2607 {2608 switch (e) {2609 case VE_NONE:2610 m_value.ident = CSSValueNone;2611 break;2612 case VE_NON_SCALING_STROKE:2613 m_value.ident = CSSValueNonScalingStroke;2614 break;2615 }2616 }2617 2618 template<> inline CSSPrimitiveValue::operator EVectorEffect() const2619 {2620 switch (m_value.ident) {2621 case CSSValueNone:2622 return VE_NONE;2623 case CSSValueNonScalingStroke:2624 return VE_NON_SCALING_STROKE;2625 default:2626 ASSERT_NOT_REACHED();2627 return VE_NONE;2628 }2629 }2630 2631 2602 #endif 2632 2603 -
trunk/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
r60858 r60862 169 169 case CSSPropertyWebkitSvgShadow: 170 170 return valueForShadow(svgStyle->shadow(), propertyID); 171 case CSSPropertyVectorEffect:172 return CSSPrimitiveValue::create(svgStyle->vectorEffect());173 171 case CSSPropertyMarker: 174 172 case CSSPropertyEnableBackground: -
trunk/WebCore/css/SVGCSSParser.cpp
r60858 r60862 221 221 m_valueList->next(); 222 222 223 break;224 225 case CSSPropertyVectorEffect: // none | non-scaling-stroke | inherit226 if (id == CSSValueNone || id == CSSValueNonScalingStroke)227 valid_primitive = true;228 223 break; 229 224 -
trunk/WebCore/css/SVGCSSPropertyNames.in
r60858 r60862 46 46 kerning 47 47 text-anchor 48 vector-effect49 48 writing-mode 50 49 -
trunk/WebCore/css/SVGCSSStyleSelector.cpp
r60858 r60862 553 553 return; 554 554 } 555 case CSSPropertyVectorEffect: {556 HANDLE_INHERIT_AND_INITIAL(vectorEffect, VectorEffect)557 if (!primitiveValue)558 break;559 560 svgstyle->setVectorEffect(*primitiveValue);561 break;562 }563 555 default: 564 556 // If you crash here, it's because you added a css property and are not handling it -
trunk/WebCore/css/SVGCSSValueKeywords.in
r60858 r60862 274 274 # end 275 275 276 # CSS_PROP_VECTOR_EFFECT277 # none278 non-scaling-stroke279 280 281 276 # CSS_PROP_WRITING_MODE 282 277 lr-tb -
trunk/WebCore/rendering/RenderPath.cpp
r60858 r60862 6 6 2009 Dirk Schulze <krit@webkit.org> 7 7 Copyright (C) Research In Motion Limited 2010. All rights reserved. 8 2009 Jeff Schiller <codedread@gmail.com>9 8 10 9 This library is free software; you can redistribute it and/or … … 133 132 { 134 133 context->beginPath(); 135 RenderStyle* style = object->style(); 136 137 if (RenderSVGResource* fillPaintingResource = RenderSVGResource::fillPaintingResource(object, style)) { 134 135 if (RenderSVGResource* fillPaintingResource = RenderSVGResource::fillPaintingResource(object, object->style())) { 138 136 context->addPath(path); 139 if (fillPaintingResource->applyResource(object, style, context, ApplyToFillMode))137 if (fillPaintingResource->applyResource(object, object->style(), context, ApplyToFillMode)) 140 138 fillPaintingResource->postApplyResource(object, context, ApplyToFillMode); 141 139 } 142 140 143 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::strokePaintingResource(object, style)) { 144 if (style->svgStyle()->vectorEffect() == VE_NON_SCALING_STROKE) { 145 SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableElement*>(object->node()); 146 AffineTransform transform = element->getScreenCTM(); 147 if (!transform.isInvertible()) 148 return; 149 150 Path transformedPath = path; 151 context->concatCTM(transform.inverse()); 152 transformedPath.transform(transform); 153 context->addPath(transformedPath); 154 } else 155 context->addPath(path); 156 if (strokePaintingResource->applyResource(object, style, context, ApplyToStrokeMode)) 141 if (RenderSVGResource* strokePaintingResource = RenderSVGResource::strokePaintingResource(object, object->style())) { 142 context->addPath(path); 143 if (strokePaintingResource->applyResource(object, object->style(), context, ApplyToStrokeMode)) 157 144 strokePaintingResource->postApplyResource(object, context, ApplyToStrokeMode); 158 145 } -
trunk/WebCore/rendering/RenderSVGResourceContainer.h
r60858 r60862 24 24 #if ENABLE(SVG) 25 25 #include "RenderSVGHiddenContainer.h" 26 27 #include "SVGStyledTransformableElement.h"28 26 #include "RenderSVGResource.h" 29 27 … … 83 81 84 82 virtual RenderSVGResourceContainer* toRenderSVGResourceContainer() { return this; } 85 86 static AffineTransform transformOnNonScalingStroke(RenderObject* object, const AffineTransform resourceTransform)87 {88 if (!object->isRenderPath())89 return resourceTransform;90 91 SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableElement*>(object->node());92 AffineTransform transform = resourceTransform;93 transform.multiply(element->getScreenCTM());94 return transform;95 }96 83 97 84 private: -
trunk/WebCore/rendering/RenderSVGResourceGradient.cpp
r60858 r60862 208 208 context->setFillRule(svgStyle->fillRule()); 209 209 } else if (resourceMode & ApplyToStrokeMode) { 210 if (svgStyle->vectorEffect() == VE_NON_SCALING_STROKE)211 gradientData->gradient->setGradientSpaceTransform(transformOnNonScalingStroke(object, gradientData->userspaceTransform));212 210 context->setAlpha(svgStyle->strokeOpacity()); 213 211 context->setStrokeGradient(gradientData->gradient); -
trunk/WebCore/rendering/RenderSVGResourcePattern.cpp
r60858 r60862 117 117 context->setFillRule(svgStyle->fillRule()); 118 118 } else if (resourceMode & ApplyToStrokeMode) { 119 if (svgStyle->vectorEffect() == VE_NON_SCALING_STROKE)120 patternData->pattern->setPatternSpaceTransform(transformOnNonScalingStroke(object, patternData->transform));121 119 context->setAlpha(svgStyle->strokeOpacity()); 122 120 context->setStrokePattern(patternData->pattern); -
trunk/WebCore/rendering/style/SVGRenderStyle.h
r60858 r60862 59 59 SVG_RS_DEFINE_ATTRIBUTE(EDominantBaseline, DominantBaseline, dominantBaseline, DB_AUTO) 60 60 SVG_RS_DEFINE_ATTRIBUTE(EBaselineShift, BaselineShift, baselineShift, BS_BASELINE) 61 SVG_RS_DEFINE_ATTRIBUTE(EVectorEffect, VectorEffect, vectorEffect, VE_NONE)62 61 63 62 SVG_RS_DEFINE_ATTRIBUTE_INHERITED(LineCap, CapStyle, capStyle, ButtCap) … … 170 169 unsigned _dominantBaseline : 4; // EDominantBaseline 171 170 unsigned _baselineShift : 2; // EBaselineShift 172 unsigned _vectorEffect: 1; // EVectorEffect 173 // 21 bits unused 171 // 22 bits unused 174 172 } f; 175 173 uint32_t _niflags; … … 216 214 svg_noninherited_flags.f._dominantBaseline = initialDominantBaseline(); 217 215 svg_noninherited_flags.f._baselineShift = initialBaselineShift(); 218 svg_noninherited_flags.f._vectorEffect = initialVectorEffect();219 216 } 220 217 }; -
trunk/WebCore/rendering/style/SVGRenderStyleDefs.h
r60858 r60862 122 122 DB_CENTRAL, DB_MIDDLE, DB_TEXT_AFTER_EDGE, DB_TEXT_BEFORE_EDGE 123 123 }; 124 125 enum EVectorEffect {126 VE_NONE,127 VE_NON_SCALING_STROKE128 };129 124 130 125 class CSSValue; -
trunk/WebCore/svg/SVGLocatable.cpp
r60858 r60862 92 92 93 93 SVGElement* stopAtElement = mode == NearestViewportScope ? nearestViewportElement(element) : 0; 94 95 Node* current = const_cast<SVGElement*>(element); 96 while (current && current->isSVGElement()) { 97 SVGElement* currentElement = static_cast<SVGElement*>(current); 94 for (const Node* current = element; current && current->isSVGElement(); current = current->parentNode()) { 95 const SVGElement* currentElement = static_cast<const SVGElement*>(current); 98 96 if (currentElement->isStyled()) 99 ctm = static_cast< SVGStyledElement*>(currentElement)->localCoordinateSpaceTransform(mode).multLeft(ctm);97 ctm = static_cast<const SVGStyledElement*>(currentElement)->localCoordinateSpaceTransform(mode).multLeft(ctm); 100 98 101 99 // For getCTM() computation, stop at the nearest viewport element 102 100 if (currentElement == stopAtElement) 103 101 break; 104 105 current = current->isShadowNode() ? current->shadowParentNode() : current->parentNode();106 102 } 107 103 -
trunk/WebCore/svg/SVGStyledElement.cpp
r60858 r60862 186 186 mapAttributeToCSSProperty(propertyNameToIdMap, text_renderingAttr); 187 187 mapAttributeToCSSProperty(propertyNameToIdMap, unicode_bidiAttr); 188 mapAttributeToCSSProperty(propertyNameToIdMap, vector_effectAttr);189 188 mapAttributeToCSSProperty(propertyNameToIdMap, visibilityAttr); 190 189 mapAttributeToCSSProperty(propertyNameToIdMap, word_spacingAttr); -
trunk/WebCore/svg/svgattrs.in
r60858 r60862 229 229 v-mathematical 230 230 values 231 vector-effect232 231 version 233 232 vert-adv-y
Note: See TracChangeset
for help on using the changeset viewer.