Changeset 150525 in webkit
- Timestamp:
- May 22, 2013 11:38:07 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r150524 r150525 1 2013-05-22 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> 2 3 [css] Update ETextDecorations enum to TextDecorations 4 https://bugs.webkit.org/show_bug.cgi?id=116581 5 6 Reviewed by Andreas Kling. 7 8 Currently, ETextDecorations enum uses a C-like coding style for its 9 enumeration values, as well as a 'E' prefix that surely had some meaning 10 in the past, but not nowadays. 11 12 No behavior changes, covered by existing tests. 13 14 * accessibility/AccessibilityRenderObject.cpp: 15 (WebCore::AccessibilityRenderObject::hasPlainText): 16 (WebCore::AccessibilityRenderObject::hasUnderline): 17 * accessibility/atk/WebKitAccessibleInterfaceText.cpp: 18 (getAttributeSetForAccessibilityObject): 19 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: 20 (AXAttributeStringSetStyle): 21 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 22 (AXAttributeStringSetStyle): 23 * css/CSSComputedStyleDeclaration.cpp: 24 (WebCore::renderTextDecorationFlagsToCSSValue): 25 * css/CSSPrimitiveValueMappings.h: 26 (WebCore::CSSPrimitiveValue::operator TextDecoration): 27 * css/DeprecatedStyleBuilder.cpp: 28 (WebCore::ApplyPropertyTextDecoration::applyValue): 29 (WebCore::ApplyPropertyTextDecoration::createHandler): 30 * editing/mac/EditorMac.mm: 31 (WebCore::Editor::fontAttributesForSelectionStart): 32 * platform/mac/HTMLConverter.mm: 33 (+[WebHTMLConverter editingAttributedStringFromRange:]): 34 * rendering/InlineTextBox.cpp: 35 (WebCore::InlineTextBox::paint): 36 (WebCore::InlineTextBox::paintDecoration): 37 * rendering/InlineTextBox.h: 38 * rendering/RenderObject.cpp: 39 (WebCore::RenderObject::getTextDecorationColors): 40 * rendering/style/RenderStyle.h: 41 * rendering/style/RenderStyleConstants.h: 42 (WebCore::operator|): 43 (WebCore::operator|=): 44 * rendering/style/StyleVisualData.h: 45 (StyleVisualData): 46 * rendering/svg/SVGInlineTextBox.cpp: 47 (WebCore::SVGInlineTextBox::paint): 48 (WebCore::positionOffsetForDecoration): 49 (WebCore::thicknessForDecoration): 50 (WebCore::findRenderObjectDefininingTextDecoration): 51 (WebCore::SVGInlineTextBox::paintDecoration): 52 (WebCore::SVGInlineTextBox::paintDecorationWithStyle): 53 * rendering/svg/SVGInlineTextBox.h: 54 1 55 2013-05-22 Lori Anderson <lori@rkymtnhi.com> 2 56 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r149858 r150525 3235 3235 return style->fontDescription().weight() == FontWeightNormal 3236 3236 && style->fontDescription().italic() == FontItalicOff 3237 && style->textDecorationsInEffect() == T DNONE;3237 && style->textDecorationsInEffect() == TextDecorationNone; 3238 3238 } 3239 3239 … … 3267 3267 return false; 3268 3268 3269 return m_renderer->style()->textDecorationsInEffect() & UNDERLINE;3269 return m_renderer->style()->textDecorationsInEffect() & TextDecorationUnderline; 3270 3270 } 3271 3271 -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp
r150518 r150525 314 314 } 315 315 316 result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_UNDERLINE), (style->textDecoration() & UNDERLINE) ? "single" : "none");316 result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_UNDERLINE), (style->textDecoration() & TextDecorationUnderline) ? "single" : "none"); 317 317 318 318 result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STYLE), style->font().italic() ? "italic" : "normal"); 319 319 320 result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STRIKETHROUGH), (style->textDecoration() & LINE_THROUGH) ? "true" : "false");320 result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STRIKETHROUGH), (style->textDecoration() & TextDecorationLineThrough) ? "true" : "false"); 321 321 322 322 result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_INVISIBLE), (style->visibility() == HIDDEN) ? "true" : "false"); -
trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
r150145 r150525 1505 1505 1506 1506 int decor = style->textDecorationsInEffect(); 1507 if ((decor & ( UNDERLINE | LINE_THROUGH)) != 0) {1507 if ((decor & (TextDecorationUnderline | TextDecorationLineThrough)) != 0) { 1508 1508 // find colors using quirk mode approach (strict mode would use current 1509 1509 // color for all but the root line box, which would use getTextDecorationColors) … … 1511 1511 renderer->getTextDecorationColors(decor, underline, overline, linethrough); 1512 1512 1513 if (decor & UNDERLINE)1513 if (decor & TextDecorationUnderline) 1514 1514 AXAttributeStringSetNumber(attrString, UIAccessibilityTokenUnderline, [NSNumber numberWithBool:YES], range); 1515 1515 } -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r150214 r150525 673 673 // set underline and strikethrough 674 674 int decor = style->textDecorationsInEffect(); 675 if ((decor & UNDERLINE) == 0) {675 if ((decor & TextDecorationUnderline) == 0) { 676 676 [attrString removeAttribute:NSAccessibilityUnderlineTextAttribute range:range]; 677 677 [attrString removeAttribute:NSAccessibilityUnderlineColorTextAttribute range:range]; 678 678 } 679 679 680 if ((decor & LINE_THROUGH) == 0) {680 if ((decor & TextDecorationLineThrough) == 0) { 681 681 [attrString removeAttribute:NSAccessibilityStrikethroughTextAttribute range:range]; 682 682 [attrString removeAttribute:NSAccessibilityStrikethroughColorTextAttribute range:range]; 683 683 } 684 684 685 if ((decor & ( UNDERLINE | LINE_THROUGH)) != 0) {685 if ((decor & (TextDecorationUnderline | TextDecorationLineThrough)) != 0) { 686 686 // find colors using quirk mode approach (strict mode would use current 687 687 // color for all but the root line box, which would use getTextDecorationColors) … … 689 689 renderer->getTextDecorationColors(decor, underline, overline, linethrough); 690 690 691 if ((decor & UNDERLINE) != 0) {691 if ((decor & TextDecorationUnderline) != 0) { 692 692 AXAttributeStringSetNumber(attrString, NSAccessibilityUnderlineTextAttribute, [NSNumber numberWithBool:YES], range); 693 693 AXAttributeStringSetColor(attrString, NSAccessibilityUnderlineColorTextAttribute, nsColor(underline), range); 694 694 } 695 695 696 if ((decor & LINE_THROUGH) != 0) {696 if ((decor & TextDecorationLineThrough) != 0) { 697 697 AXAttributeStringSetNumber(attrString, NSAccessibilityStrikethroughTextAttribute, [NSNumber numberWithBool:YES], range); 698 698 AXAttributeStringSetColor(attrString, NSAccessibilityStrikethroughColorTextAttribute, nsColor(linethrough), range); -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r150387 r150525 1336 1336 // Blink value is ignored. 1337 1337 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); 1338 if (textDecoration & UNDERLINE)1338 if (textDecoration & TextDecorationUnderline) 1339 1339 list->append(cssValuePool().createIdentifierValue(CSSValueUnderline)); 1340 if (textDecoration & OVERLINE)1340 if (textDecoration & TextDecorationOverline) 1341 1341 list->append(cssValuePool().createIdentifierValue(CSSValueOverline)); 1342 if (textDecoration & LINE_THROUGH)1342 if (textDecoration & TextDecorationLineThrough) 1343 1343 list->append(cssValuePool().createIdentifierValue(CSSValueLineThrough)); 1344 1344 -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r148949 r150525 2412 2412 #endif // CSS3_TEXT 2413 2413 2414 template<> inline CSSPrimitiveValue::operator ETextDecoration() const2414 template<> inline CSSPrimitiveValue::operator TextDecoration() const 2415 2415 { 2416 2416 switch (m_value.ident) { 2417 2417 case CSSValueNone: 2418 return T DNONE;2418 return TextDecorationNone; 2419 2419 case CSSValueUnderline: 2420 return UNDERLINE;2420 return TextDecorationUnderline; 2421 2421 case CSSValueOverline: 2422 return OVERLINE;2422 return TextDecorationOverline; 2423 2423 case CSSValueLineThrough: 2424 return LINE_THROUGH;2424 return TextDecorationLineThrough; 2425 2425 case CSSValueBlink: 2426 return BLINK;2427 } 2428 2429 ASSERT_NOT_REACHED(); 2430 return T DNONE;2426 return TextDecorationBlink; 2427 } 2428 2429 ASSERT_NOT_REACHED(); 2430 return TextDecorationNone; 2431 2431 } 2432 2432 -
trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp
r150387 r150525 1252 1252 static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value) 1253 1253 { 1254 ETextDecoration t = RenderStyle::initialTextDecoration();1254 TextDecoration t = RenderStyle::initialTextDecoration(); 1255 1255 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { 1256 1256 CSSValue* item = i.value(); … … 1262 1262 static PropertyHandler createHandler() 1263 1263 { 1264 PropertyHandler handler = ApplyPropertyDefaultBase< ETextDecoration, &RenderStyle::textDecoration, ETextDecoration, &RenderStyle::setTextDecoration, ETextDecoration, &RenderStyle::initialTextDecoration>::createHandler();1264 PropertyHandler handler = ApplyPropertyDefaultBase<TextDecoration, &RenderStyle::textDecoration, TextDecoration, &RenderStyle::setTextDecoration, TextDecoration, &RenderStyle::initialTextDecoration>::createHandler(); 1265 1265 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); 1266 1266 } -
trunk/Source/WebCore/editing/mac/EditorMac.mm
r150351 r150525 208 208 209 209 int decoration = style->textDecorationsInEffect(); 210 if (decoration & LINE_THROUGH)210 if (decoration & TextDecorationLineThrough) 211 211 [result setObject:[NSNumber numberWithInt:NSUnderlineStyleSingle] forKey:NSStrikethroughStyleAttributeName]; 212 212 … … 232 232 [result setObject:[NSNumber numberWithInt:superscriptInt] forKey:NSSuperscriptAttributeName]; 233 233 234 if (decoration & UNDERLINE)234 if (decoration & TextDecorationUnderline) 235 235 [result setObject:[NSNumber numberWithInt:NSUnderlineStyleSingle] forKey:NSUnderlineStyleAttributeName]; 236 236 -
trunk/Source/WebCore/platform/mac/HTMLConverter.mm
r149255 r150525 1693 1693 continue; 1694 1694 RenderStyle* style = renderer->style(); 1695 if (style->textDecorationsInEffect() & UNDERLINE)1695 if (style->textDecorationsInEffect() & TextDecorationUnderline) 1696 1696 [attrs.get() setObject:[NSNumber numberWithInteger:NSUnderlineStyleSingle] forKey:NSUnderlineStyleAttributeName]; 1697 1697 if (NSFont *font = style->font().primaryFont()->getNSFont()) -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r150365 r150525 780 780 781 781 // Paint decorations 782 ETextDecoration textDecorations = styleToUse->textDecorationsInEffect();783 if (textDecorations != T DNONE&& paintInfo.phase != PaintPhaseSelection) {782 TextDecoration textDecorations = styleToUse->textDecorationsInEffect(); 783 if (textDecorations != TextDecorationNone && paintInfo.phase != PaintPhaseSelection) { 784 784 updateGraphicsContext(context, textFillColor, textStrokeColor, textStrokeWidth, styleToUse->colorSpace()); 785 785 if (combinedText) … … 1120 1120 #endif // CSS3_TEXT 1121 1121 1122 void InlineTextBox::paintDecoration(GraphicsContext* context, const FloatPoint& boxOrigin, ETextDecoration deco, TextDecorationStyle decorationStyle, const ShadowData* shadow)1122 void InlineTextBox::paintDecoration(GraphicsContext* context, const FloatPoint& boxOrigin, TextDecoration deco, TextDecorationStyle decorationStyle, const ShadowData* shadow) 1123 1123 { 1124 1124 // FIXME: We should improve this rule and not always just assume 1. … … 1147 1147 context->setStrokeThickness(textDecorationThickness); 1148 1148 1149 bool linesAreOpaque = !isPrinting && (!(deco & UNDERLINE) || underline.alpha() == 255) && (!(deco & OVERLINE) || overline.alpha() == 255) && (!(deco & LINE_THROUGH) || linethrough.alpha() == 255);1149 bool linesAreOpaque = !isPrinting && (!(deco & TextDecorationUnderline) || underline.alpha() == 255) && (!(deco & TextDecorationOverline) || overline.alpha() == 255) && (!(deco & TextDecorationLineThrough) || linethrough.alpha() == 255); 1150 1150 1151 1151 RenderStyle* styleToUse = renderer()->style(isFirstLineStyle()); … … 1195 1195 #endif // CSS3_TEXT 1196 1196 context->setStrokeStyle(textDecorationStyleToStrokeStyle(decorationStyle)); 1197 if (deco & UNDERLINE) {1197 if (deco & TextDecorationUnderline) { 1198 1198 context->setStrokeColor(underline, colorSpace); 1199 1199 #if ENABLE(CSS3_TEXT) … … 1219 1219 #endif // CSS3_TEXT 1220 1220 } 1221 if (deco & OVERLINE) {1221 if (deco & TextDecorationOverline) { 1222 1222 context->setStrokeColor(overline, colorSpace); 1223 1223 #if ENABLE(CSS3_TEXT) … … 1238 1238 #endif // CSS3_TEXT 1239 1239 } 1240 if (deco & LINE_THROUGH) {1240 if (deco & TextDecorationLineThrough) { 1241 1241 context->setStrokeColor(linethrough, colorSpace); 1242 1242 #if ENABLE(CSS3_TEXT) -
trunk/Source/WebCore/rendering/InlineTextBox.h
r150312 r150525 185 185 186 186 private: 187 void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, ETextDecoration, TextDecorationStyle, const ShadowData*);187 void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDecoration, TextDecorationStyle, const ShadowData*); 188 188 void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, RenderStyle*, const Font&, Color textColor); 189 189 void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrigin, DocumentMarker*, RenderStyle*, const Font&, bool grammar); -
trunk/Source/WebCore/rendering/RenderObject.cpp
r150355 r150525 2815 2815 RenderObject* curr = this; 2816 2816 RenderStyle* styleToUse = 0; 2817 ETextDecoration currDecs = TDNONE;2817 TextDecoration currDecs = TextDecorationNone; 2818 2818 Color resultColor; 2819 2819 do { … … 2823 2823 // Parameter 'decorations' is cast as an int to enable the bitwise operations below. 2824 2824 if (currDecs) { 2825 if (currDecs & UNDERLINE) {2826 decorations &= ~ UNDERLINE;2825 if (currDecs & TextDecorationUnderline) { 2826 decorations &= ~TextDecorationUnderline; 2827 2827 underline = resultColor; 2828 2828 } 2829 if (currDecs & OVERLINE) {2830 decorations &= ~ OVERLINE;2829 if (currDecs & TextDecorationOverline) { 2830 decorations &= ~TextDecorationOverline; 2831 2831 overline = resultColor; 2832 2832 } 2833 if (currDecs & LINE_THROUGH) {2834 decorations &= ~ LINE_THROUGH;2833 if (currDecs & TextDecorationLineThrough) { 2834 decorations &= ~TextDecorationLineThrough; 2835 2835 linethrough = resultColor; 2836 2836 } … … 2848 2848 styleToUse = curr->style(firstlineStyle); 2849 2849 resultColor = decorationColor(styleToUse); 2850 if (decorations & UNDERLINE)2850 if (decorations & TextDecorationUnderline) 2851 2851 underline = resultColor; 2852 if (decorations & OVERLINE)2852 if (decorations & TextDecorationOverline) 2853 2853 overline = resultColor; 2854 if (decorations & LINE_THROUGH)2854 if (decorations & TextDecorationLineThrough) 2855 2855 linethrough = resultColor; 2856 2856 } -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r150387 r150525 190 190 unsigned _text_align : 4; // ETextAlign 191 191 unsigned _text_transform : 2; // ETextTransform 192 unsigned _text_decorations : ETextDecorationBits;192 unsigned _text_decorations : TextDecorationBits; 193 193 unsigned _cursor_style : 6; // ECursor 194 194 #if ENABLE(CURSOR_VISIBILITY) … … 575 575 ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flags._text_align); } 576 576 ETextTransform textTransform() const { return static_cast<ETextTransform>(inherited_flags._text_transform); } 577 ETextDecoration textDecorationsInEffect() const { return static_cast<ETextDecoration>(inherited_flags._text_decorations); }578 ETextDecoration textDecoration() const { return static_cast<ETextDecoration>(visual->textDecoration); }577 TextDecoration textDecorationsInEffect() const { return static_cast<TextDecoration>(inherited_flags._text_decorations); } 578 TextDecoration textDecoration() const { return static_cast<TextDecoration>(visual->textDecoration); } 579 579 #if ENABLE(CSS3_TEXT) 580 580 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(rareNonInheritedData->m_textDecorationStyle); } … … 1144 1144 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; } 1145 1145 void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; } 1146 void addToTextDecorationsInEffect( ETextDecoration v) { inherited_flags._text_decorations |= v; }1147 void setTextDecorationsInEffect( ETextDecoration v) { inherited_flags._text_decorations = v; }1148 void setTextDecoration( ETextDecoration v) { SET_VAR(visual, textDecoration, v); }1146 void addToTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_decorations |= v; } 1147 void setTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_decorations = v; } 1148 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v); } 1149 1149 #if ENABLE(CSS3_TEXT) 1150 1150 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInheritedData, m_textDecorationStyle, v); } … … 1629 1629 static Length initialLineHeight() { return Length(-100.0, Percent); } 1630 1630 static ETextAlign initialTextAlign() { return TASTART; } 1631 static ETextDecoration initialTextDecoration() { return TDNONE; }1631 static TextDecoration initialTextDecoration() { return TextDecorationNone; } 1632 1632 #if ENABLE(CSS3_TEXT) 1633 1633 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyleSolid; } -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r150259 r150525 340 340 }; 341 341 342 static const size_t ETextDecorationBits = 4;343 enum ETextDecoration {344 T DNONE = 0x0 , UNDERLINE = 0x1, OVERLINE = 0x2, LINE_THROUGH= 0x4, BLINK= 0x8345 }; 346 inline ETextDecoration operator|(ETextDecoration a, ETextDecoration b) { return ETextDecoration(int(a) | int(b)); }347 inline ETextDecoration& operator|=(ETextDecoration& a, ETextDecoration b) { return a = a | b; }342 static const size_t TextDecorationBits = 4; 343 enum TextDecoration { 344 TextDecorationNone = 0x0, TextDecorationUnderline = 0x1, TextDecorationOverline = 0x2, TextDecorationLineThrough = 0x4, TextDecorationBlink = 0x8 345 }; 346 inline TextDecoration operator| (TextDecoration a, TextDecoration b) { return TextDecoration(int(a) | int(b)); } 347 inline TextDecoration& operator|= (TextDecoration& a, TextDecoration b) { return a = a | b; } 348 348 349 349 enum TextDecorationStyle { -
trunk/Source/WebCore/rendering/style/StyleVisualData.h
r125925 r150525 53 53 LengthBox clip; 54 54 bool hasClip : 1; 55 unsigned textDecoration : ETextDecorationBits; // Text decorations defined *only* by this element.55 unsigned textDecoration : TextDecorationBits; // Text decorations defined *only* by this element. 56 56 57 57 #if ENABLE(TEXT_AUTOSIZING) -
trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
r127421 r150525 319 319 // Spec: All text decorations except line-through should be drawn before the text is filled and stroked; thus, the text is rendered on top of these decorations. 320 320 int decorations = style->textDecorationsInEffect(); 321 if (decorations & UNDERLINE)322 paintDecoration(paintInfo.context, UNDERLINE, fragment);323 if (decorations & OVERLINE)324 paintDecoration(paintInfo.context, OVERLINE, fragment);321 if (decorations & TextDecorationUnderline) 322 paintDecoration(paintInfo.context, TextDecorationUnderline, fragment); 323 if (decorations & TextDecorationOverline) 324 paintDecoration(paintInfo.context, TextDecorationOverline, fragment); 325 325 326 326 // Fill text … … 337 337 338 338 // Spec: Line-through should be drawn after the text is filled and stroked; thus, the line-through is rendered on top of the text. 339 if (decorations & LINE_THROUGH)340 paintDecoration(paintInfo.context, LINE_THROUGH, fragment);339 if (decorations & TextDecorationLineThrough) 340 paintDecoration(paintInfo.context, TextDecorationLineThrough, fragment); 341 341 342 342 m_paintingResourceMode = ApplyToDefaultMode; … … 479 479 } 480 480 481 static inline float positionOffsetForDecoration( ETextDecoration decoration, const FontMetrics& fontMetrics, float thickness)481 static inline float positionOffsetForDecoration(TextDecoration decoration, const FontMetrics& fontMetrics, float thickness) 482 482 { 483 483 // FIXME: For SVG Fonts we need to use the attributes defined in the <font-face> if specified. 484 484 // Compatible with Batik/Opera. 485 if (decoration == UNDERLINE)485 if (decoration == TextDecorationUnderline) 486 486 return fontMetrics.floatAscent() + thickness * 1.5f; 487 if (decoration == OVERLINE)487 if (decoration == TextDecorationOverline) 488 488 return thickness; 489 if (decoration == LINE_THROUGH)489 if (decoration == TextDecorationLineThrough) 490 490 return fontMetrics.floatAscent() * 5 / 8.0f; 491 491 … … 494 494 } 495 495 496 static inline float thicknessForDecoration( ETextDecoration, const Font& font)496 static inline float thicknessForDecoration(TextDecoration, const Font& font) 497 497 { 498 498 // FIXME: For SVG Fonts we need to use the attributes defined in the <font-face> if specified. … … 508 508 renderer = parentBox->renderer(); 509 509 510 if (renderer->style() && renderer->style()->textDecoration() != T DNONE)510 if (renderer->style() && renderer->style()->textDecoration() != TextDecorationNone) 511 511 break; 512 512 … … 518 518 } 519 519 520 void SVGInlineTextBox::paintDecoration(GraphicsContext* context, ETextDecoration decoration, const SVGTextFragment& fragment)521 { 522 if (textRenderer()->style()->textDecorationsInEffect() == T DNONE)520 void SVGInlineTextBox::paintDecoration(GraphicsContext* context, TextDecoration decoration, const SVGTextFragment& fragment) 521 { 522 if (textRenderer()->style()->textDecorationsInEffect() == TextDecorationNone) 523 523 return; 524 524 … … 548 548 } 549 549 550 void SVGInlineTextBox::paintDecorationWithStyle(GraphicsContext* context, ETextDecoration decoration, const SVGTextFragment& fragment, RenderObject* decorationRenderer)550 void SVGInlineTextBox::paintDecorationWithStyle(GraphicsContext* context, TextDecoration decoration, const SVGTextFragment& fragment, RenderObject* decorationRenderer) 551 551 { 552 552 ASSERT(!m_paintingResource); -
trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h
r149110 r150525 75 75 void restoreGraphicsContextAfterTextPainting(GraphicsContext*&, TextRun&); 76 76 77 void paintDecoration(GraphicsContext*, ETextDecoration, const SVGTextFragment&);78 void paintDecorationWithStyle(GraphicsContext*, ETextDecoration, const SVGTextFragment&, RenderObject* decorationRenderer);77 void paintDecoration(GraphicsContext*, TextDecoration, const SVGTextFragment&); 78 void paintDecorationWithStyle(GraphicsContext*, TextDecoration, const SVGTextFragment&, RenderObject* decorationRenderer); 79 79 void paintTextWithShadows(GraphicsContext*, RenderStyle*, TextRun&, const SVGTextFragment&, int startPosition, int endPosition); 80 80 void paintText(GraphicsContext*, RenderStyle*, RenderStyle* selectionStyle, const SVGTextFragment&, bool hasSelection, bool paintSelectedTextOnly);
Note: See TracChangeset
for help on using the changeset viewer.