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

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

Issue 224723023: Implements hanging property for text-indent from CSS3 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update description Created 6 years, 8 months 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
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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 const FontDescription& fontDescription() const; 569 const FontDescription& fontDescription() const;
570 float specifiedFontSize() const; 570 float specifiedFontSize() const;
571 float computedFontSize() const; 571 float computedFontSize() const;
572 int fontSize() const; 572 int fontSize() const;
573 FontWeight fontWeight() const; 573 FontWeight fontWeight() const;
574 574
575 float textAutosizingMultiplier() const { return visual->m_textAutosizingMult iplier; } 575 float textAutosizingMultiplier() const { return visual->m_textAutosizingMult iplier; }
576 576
577 const Length& textIndent() const { return rareInheritedData->indent; } 577 const Length& textIndent() const { return rareInheritedData->indent; }
578 TextIndentLine textIndentLine() const { return static_cast<TextIndentLine>(r areInheritedData->m_textIndentLine); } 578 TextIndentLine textIndentLine() const { return static_cast<TextIndentLine>(r areInheritedData->m_textIndentLine); }
579 TextIndentType textIndentType() const { return static_cast<TextIndentType>(r areInheritedData->m_textIndentType); }
579 ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flag s._text_align); } 580 ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flag s._text_align); }
580 TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(rare InheritedData->m_textAlignLast); } 581 TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(rare InheritedData->m_textAlignLast); }
581 TextJustify textJustify() const { return static_cast<TextJustify>(rareInheri tedData->m_textJustify); } 582 TextJustify textJustify() const { return static_cast<TextJustify>(rareInheri tedData->m_textJustify); }
582 ETextTransform textTransform() const { return static_cast<ETextTransform>(in herited_flags._text_transform); } 583 ETextTransform textTransform() const { return static_cast<ETextTransform>(in herited_flags._text_transform); }
583 TextDecoration textDecorationsInEffect() const { return static_cast<TextDeco ration>(inherited_flags._text_decorations); } 584 TextDecoration textDecorationsInEffect() const { return static_cast<TextDeco ration>(inherited_flags._text_decorations); }
584 TextDecoration textDecoration() const { return static_cast<TextDecoration>(v isual->textDecoration); } 585 TextDecoration textDecoration() const { return static_cast<TextDecoration>(v isual->textDecoration); }
585 TextUnderlinePosition textUnderlinePosition() const { return static_cast<Tex tUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); } 586 TextUnderlinePosition textUnderlinePosition() const { return static_cast<Tex tUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); }
586 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDec orationStyle>(rareNonInheritedData->m_textDecorationStyle); } 587 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDec orationStyle>(rareNonInheritedData->m_textDecorationStyle); }
587 float wordSpacing() const; 588 float wordSpacing() const;
588 float letterSpacing() const; 589 float letterSpacing() const;
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 1102
1102 void setTextAutosizingMultiplier(float v) 1103 void setTextAutosizingMultiplier(float v)
1103 { 1104 {
1104 SET_VAR(visual, m_textAutosizingMultiplier, v); 1105 SET_VAR(visual, m_textAutosizingMultiplier, v);
1105 setFontSize(fontDescription().specifiedSize()); 1106 setFontSize(fontDescription().specifiedSize());
1106 } 1107 }
1107 1108
1108 void setColor(const Color&); 1109 void setColor(const Color&);
1109 void setTextIndent(Length v) { SET_VAR(rareInheritedData, indent, v); } 1110 void setTextIndent(Length v) { SET_VAR(rareInheritedData, indent, v); }
1110 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text IndentLine, v); } 1111 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text IndentLine, v); }
1112 void setTextIndentType(TextIndentType v) { SET_VAR(rareInheritedData, m_text IndentType, v); }
1111 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; } 1113 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; }
1112 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl ignLast, v); } 1114 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl ignLast, v); }
1113 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif y, v); } 1115 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif y, v); }
1114 void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; } 1116 void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; }
1115 void addToTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_ decorations |= v; } 1117 void addToTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_ decorations |= v; }
1116 void setTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_de corations = v; } 1118 void setTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_de corations = v; }
1117 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v ); } 1119 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v ); }
1118 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit edData, m_textUnderlinePosition, v); } 1120 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit edData, m_textUnderlinePosition, v); }
1119 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite dData, m_textDecorationStyle, v); } 1121 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite dData, m_textDecorationStyle, v); }
1120 void setDirection(TextDirection v) { inherited_flags._direction = v; } 1122 void setDirection(TextDirection v) { inherited_flags._direction = v; }
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 static unsigned short initialOutlineWidth() { return 3; } 1562 static unsigned short initialOutlineWidth() { return 3; }
1561 static float initialLetterWordSpacing() { return 0.0f; } 1563 static float initialLetterWordSpacing() { return 0.0f; }
1562 static Length initialSize() { return Length(); } 1564 static Length initialSize() { return Length(); }
1563 static Length initialMinSize() { return Length(Fixed); } 1565 static Length initialMinSize() { return Length(Fixed); }
1564 static Length initialMaxSize() { return Length(Undefined); } 1566 static Length initialMaxSize() { return Length(Undefined); }
1565 static Length initialOffset() { return Length(); } 1567 static Length initialOffset() { return Length(); }
1566 static Length initialMargin() { return Length(Fixed); } 1568 static Length initialMargin() { return Length(Fixed); }
1567 static Length initialPadding() { return Length(Fixed); } 1569 static Length initialPadding() { return Length(Fixed); }
1568 static Length initialTextIndent() { return Length(Fixed); } 1570 static Length initialTextIndent() { return Length(Fixed); }
1569 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; } 1571 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; }
1572 static TextIndentType initialTextIndentType() { return TextIndentNormal; }
1570 static EVerticalAlign initialVerticalAlign() { return BASELINE; } 1573 static EVerticalAlign initialVerticalAlign() { return BASELINE; }
1571 static short initialWidows() { return 2; } 1574 static short initialWidows() { return 2; }
1572 static short initialOrphans() { return 2; } 1575 static short initialOrphans() { return 2; }
1573 static Length initialLineHeight() { return Length(-100.0, Percent); } 1576 static Length initialLineHeight() { return Length(-100.0, Percent); }
1574 static ETextAlign initialTextAlign() { return TASTART; } 1577 static ETextAlign initialTextAlign() { return TASTART; }
1575 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } 1578 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; }
1576 static TextJustify initialTextJustify() { return TextJustifyAuto; } 1579 static TextJustify initialTextJustify() { return TextJustifyAuto; }
1577 static TextDecoration initialTextDecoration() { return TextDecorationNone; } 1580 static TextDecoration initialTextDecoration() { return TextDecorationNone; }
1578 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd erlinePositionAuto; } 1581 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd erlinePositionAuto; }
1579 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat ionStyleSolid; } 1582 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat ionStyleSolid; }
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 inline bool RenderStyle::hasPseudoElementStyle() const 1872 inline bool RenderStyle::hasPseudoElementStyle() const
1870 { 1873 {
1871 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; 1874 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK;
1872 } 1875 }
1873 1876
1874 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); 1877 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&);
1875 1878
1876 } // namespace WebCore 1879 } // namespace WebCore
1877 1880
1878 #endif // RenderStyle_h 1881 #endif // RenderStyle_h
OLDNEW
« no previous file with comments | « Source/core/rendering/line/BreakingContextInlineHeaders.h ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698