Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: Source/core/rendering/style/RenderStyle.h

Issue 40733004: Replace compile flag with runtime check for text-underline-position (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Julien's review #2 (rebased) Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 float textAutosizingMultiplier() const { return visual->m_textAutosizingMult iplier; } 540 float textAutosizingMultiplier() const { return visual->m_textAutosizingMult iplier; }
541 541
542 Length textIndent() const { return rareInheritedData->indent; } 542 Length textIndent() const { return rareInheritedData->indent; }
543 TextIndentLine textIndentLine() const { return static_cast<TextIndentLine>(r areInheritedData->m_textIndentLine); } 543 TextIndentLine textIndentLine() const { return static_cast<TextIndentLine>(r areInheritedData->m_textIndentLine); }
544 ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flag s._text_align); } 544 ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flag s._text_align); }
545 TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(rare InheritedData->m_textAlignLast); } 545 TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(rare InheritedData->m_textAlignLast); }
546 TextJustify textJustify() const { return static_cast<TextJustify>(rareInheri tedData->m_textJustify); } 546 TextJustify textJustify() const { return static_cast<TextJustify>(rareInheri tedData->m_textJustify); }
547 ETextTransform textTransform() const { return static_cast<ETextTransform>(in herited_flags._text_transform); } 547 ETextTransform textTransform() const { return static_cast<ETextTransform>(in herited_flags._text_transform); }
548 TextDecoration textDecorationsInEffect() const { return static_cast<TextDeco ration>(inherited_flags._text_decorations); } 548 TextDecoration textDecorationsInEffect() const { return static_cast<TextDeco ration>(inherited_flags._text_decorations); }
549 TextDecoration textDecoration() const { return static_cast<TextDecoration>(v isual->textDecoration); } 549 TextDecoration textDecoration() const { return static_cast<TextDecoration>(v isual->textDecoration); }
550 #if ENABLE(CSS3_TEXT)
551 TextUnderlinePosition textUnderlinePosition() const { return static_cast<Tex tUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); } 550 TextUnderlinePosition textUnderlinePosition() const { return static_cast<Tex tUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); }
552 #endif // CSS3_TEXT
553 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDec orationStyle>(rareNonInheritedData->m_textDecorationStyle); } 551 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDec orationStyle>(rareNonInheritedData->m_textDecorationStyle); }
554 float wordSpacing() const; 552 float wordSpacing() const;
555 float letterSpacing() const; 553 float letterSpacing() const;
556 554
557 float zoom() const { return visual->m_zoom; } 555 float zoom() const { return visual->m_zoom; }
558 float effectiveZoom() const { return rareInheritedData->m_effectiveZoom; } 556 float effectiveZoom() const { return rareInheritedData->m_effectiveZoom; }
559 557
560 TextDirection direction() const { return static_cast<TextDirection>(inherite d_flags._direction); } 558 TextDirection direction() const { return static_cast<TextDirection>(inherite d_flags._direction); }
561 bool isLeftToRightDirection() const { return direction() == LTR; } 559 bool isLeftToRightDirection() const { return direction() == LTR; }
562 560
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 void setColor(const Color&); 1062 void setColor(const Color&);
1065 void setTextIndent(Length v) { SET_VAR(rareInheritedData, indent, v); } 1063 void setTextIndent(Length v) { SET_VAR(rareInheritedData, indent, v); }
1066 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text IndentLine, v); } 1064 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text IndentLine, v); }
1067 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; } 1065 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; }
1068 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl ignLast, v); } 1066 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl ignLast, v); }
1069 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif y, v); } 1067 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif y, v); }
1070 void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; } 1068 void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; }
1071 void addToTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_ decorations |= v; } 1069 void addToTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_ decorations |= v; }
1072 void setTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_de corations = v; } 1070 void setTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_de corations = v; }
1073 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v ); } 1071 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v ); }
1074 #if ENABLE(CSS3_TEXT)
1075 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit edData, m_textUnderlinePosition, v); } 1072 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit edData, m_textUnderlinePosition, v); }
1076 #endif // CSS3_TEXT
1077 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite dData, m_textDecorationStyle, v); } 1073 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite dData, m_textDecorationStyle, v); }
1078 void setDirection(TextDirection v) { inherited_flags._direction = v; } 1074 void setDirection(TextDirection v) { inherited_flags._direction = v; }
1079 void setLineHeight(Length specifiedLineHeight); 1075 void setLineHeight(Length specifiedLineHeight);
1080 bool setZoom(float); 1076 bool setZoom(float);
1081 void setZoomWithoutReturnValue(float f) { setZoom(f); } 1077 void setZoomWithoutReturnValue(float f) { setZoom(f); }
1082 bool setEffectiveZoom(float); 1078 bool setEffectiveZoom(float);
1083 1079
1084 void setImageRendering(EImageRendering v) { SET_VAR(rareInheritedData, m_ima geRendering, v); } 1080 void setImageRendering(EImageRendering v) { SET_VAR(rareInheritedData, m_ima geRendering, v); }
1085 1081
1086 void setWhiteSpace(EWhiteSpace v) { inherited_flags._white_space = v; } 1082 void setWhiteSpace(EWhiteSpace v) { inherited_flags._white_space = v; }
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 static Length initialTextIndent() { return Length(Fixed); } 1548 static Length initialTextIndent() { return Length(Fixed); }
1553 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; } 1549 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; }
1554 static EVerticalAlign initialVerticalAlign() { return BASELINE; } 1550 static EVerticalAlign initialVerticalAlign() { return BASELINE; }
1555 static short initialWidows() { return 2; } 1551 static short initialWidows() { return 2; }
1556 static short initialOrphans() { return 2; } 1552 static short initialOrphans() { return 2; }
1557 static Length initialLineHeight() { return Length(-100.0, Percent); } 1553 static Length initialLineHeight() { return Length(-100.0, Percent); }
1558 static ETextAlign initialTextAlign() { return TASTART; } 1554 static ETextAlign initialTextAlign() { return TASTART; }
1559 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } 1555 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; }
1560 static TextJustify initialTextJustify() { return TextJustifyAuto; } 1556 static TextJustify initialTextJustify() { return TextJustifyAuto; }
1561 static TextDecoration initialTextDecoration() { return TextDecorationNone; } 1557 static TextDecoration initialTextDecoration() { return TextDecorationNone; }
1562 #if ENABLE(CSS3_TEXT)
1563 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd erlinePositionAuto; } 1558 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd erlinePositionAuto; }
1564 #endif // CSS3_TEXT
1565 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat ionStyleSolid; } 1559 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat ionStyleSolid; }
1566 static float initialZoom() { return 1.0f; } 1560 static float initialZoom() { return 1.0f; }
1567 static int initialOutlineOffset() { return 0; } 1561 static int initialOutlineOffset() { return 0; }
1568 static float initialOpacity() { return 1.0f; } 1562 static float initialOpacity() { return 1.0f; }
1569 static EBoxAlignment initialBoxAlign() { return BSTRETCH; } 1563 static EBoxAlignment initialBoxAlign() { return BSTRETCH; }
1570 static EBoxDecorationBreak initialBoxDecorationBreak() { return DSLICE; } 1564 static EBoxDecorationBreak initialBoxDecorationBreak() { return DSLICE; }
1571 static EBoxDirection initialBoxDirection() { return BNORMAL; } 1565 static EBoxDirection initialBoxDirection() { return BNORMAL; }
1572 static EBoxLines initialBoxLines() { return SINGLE; } 1566 static EBoxLines initialBoxLines() { return SINGLE; }
1573 static EBoxOrient initialBoxOrient() { return HORIZONTAL; } 1567 static EBoxOrient initialBoxOrient() { return HORIZONTAL; }
1574 static EBoxPack initialBoxPack() { return Start; } 1568 static EBoxPack initialBoxPack() { return Start; }
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) 1822 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))
1829 return false; 1823 return false;
1830 1824
1831 rareInheritedData.access()->m_textOrientation = textOrientation; 1825 rareInheritedData.access()->m_textOrientation = textOrientation;
1832 return true; 1826 return true;
1833 } 1827 }
1834 1828
1835 } // namespace WebCore 1829 } // namespace WebCore
1836 1830
1837 #endif // RenderStyle_h 1831 #endif // RenderStyle_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RootInlineBox.cpp ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698