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

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

Issue 17155007: [CSS3] Parsing the property, text-justify. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parsingTextJustify
Patch Set: Modify the test case Created 7 years, 2 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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 float specifiedFontSize() const; 536 float specifiedFontSize() const;
537 float computedFontSize() const; 537 float computedFontSize() const;
538 int fontSize() const; 538 int fontSize() const;
539 539
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 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); }
547 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); }
548 TextDecoration textDecoration() const { return static_cast<TextDecoration>(v isual->textDecoration); } 549 TextDecoration textDecoration() const { return static_cast<TextDecoration>(v isual->textDecoration); }
549 #if ENABLE(CSS3_TEXT) 550 #if ENABLE(CSS3_TEXT)
550 TextUnderlinePosition textUnderlinePosition() const { return static_cast<Tex tUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); } 551 TextUnderlinePosition textUnderlinePosition() const { return static_cast<Tex tUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); }
551 #endif // CSS3_TEXT 552 #endif // CSS3_TEXT
552 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDec orationStyle>(rareNonInheritedData->m_textDecorationStyle); } 553 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDec orationStyle>(rareNonInheritedData->m_textDecorationStyle); }
553 float wordSpacing() const; 554 float wordSpacing() const;
554 float letterSpacing() const; 555 float letterSpacing() const;
555 556
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 { 1052 {
1052 SET_VAR(visual, m_textAutosizingMultiplier, v); 1053 SET_VAR(visual, m_textAutosizingMultiplier, v);
1053 setFontSize(fontDescription().specifiedSize()); 1054 setFontSize(fontDescription().specifiedSize());
1054 } 1055 }
1055 1056
1056 void setColor(const Color&); 1057 void setColor(const Color&);
1057 void setTextIndent(Length v) { SET_VAR(rareInheritedData, indent, v); } 1058 void setTextIndent(Length v) { SET_VAR(rareInheritedData, indent, v); }
1058 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text IndentLine, v); } 1059 void setTextIndentLine(TextIndentLine v) { SET_VAR(rareInheritedData, m_text IndentLine, v); }
1059 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; } 1060 void setTextAlign(ETextAlign v) { inherited_flags._text_align = v; }
1060 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl ignLast, v); } 1061 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAl ignLast, v); }
1062 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustif y, v); }
1061 void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; } 1063 void setTextTransform(ETextTransform v) { inherited_flags._text_transform = v; }
1062 void addToTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_ decorations |= v; } 1064 void addToTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_ decorations |= v; }
1063 void setTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_de corations = v; } 1065 void setTextDecorationsInEffect(TextDecoration v) { inherited_flags._text_de corations = v; }
1064 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v ); } 1066 void setTextDecoration(TextDecoration v) { SET_VAR(visual, textDecoration, v ); }
1065 #if ENABLE(CSS3_TEXT) 1067 #if ENABLE(CSS3_TEXT)
1066 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit edData, m_textUnderlinePosition, v); } 1068 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInherit edData, m_textUnderlinePosition, v); }
1067 #endif // CSS3_TEXT 1069 #endif // CSS3_TEXT
1068 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite dData, m_textDecorationStyle, v); } 1070 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInherite dData, m_textDecorationStyle, v); }
1069 void setDirection(TextDirection v) { inherited_flags._direction = v; } 1071 void setDirection(TextDirection v) { inherited_flags._direction = v; }
1070 void setLineHeight(Length specifiedLineHeight); 1072 void setLineHeight(Length specifiedLineHeight);
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 static Length initialMargin() { return Length(Fixed); } 1524 static Length initialMargin() { return Length(Fixed); }
1523 static Length initialPadding() { return Length(Fixed); } 1525 static Length initialPadding() { return Length(Fixed); }
1524 static Length initialTextIndent() { return Length(Fixed); } 1526 static Length initialTextIndent() { return Length(Fixed); }
1525 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; } 1527 static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; }
1526 static EVerticalAlign initialVerticalAlign() { return BASELINE; } 1528 static EVerticalAlign initialVerticalAlign() { return BASELINE; }
1527 static short initialWidows() { return 2; } 1529 static short initialWidows() { return 2; }
1528 static short initialOrphans() { return 2; } 1530 static short initialOrphans() { return 2; }
1529 static Length initialLineHeight() { return Length(-100.0, Percent); } 1531 static Length initialLineHeight() { return Length(-100.0, Percent); }
1530 static ETextAlign initialTextAlign() { return TASTART; } 1532 static ETextAlign initialTextAlign() { return TASTART; }
1531 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } 1533 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; }
1534 static TextJustify initialTextJustify() { return TextJustifyAuto; }
1532 static TextDecoration initialTextDecoration() { return TextDecorationNone; } 1535 static TextDecoration initialTextDecoration() { return TextDecorationNone; }
1533 #if ENABLE(CSS3_TEXT) 1536 #if ENABLE(CSS3_TEXT)
1534 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd erlinePositionAuto; } 1537 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnd erlinePositionAuto; }
1535 #endif // CSS3_TEXT 1538 #endif // CSS3_TEXT
1536 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat ionStyleSolid; } 1539 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorat ionStyleSolid; }
1537 static float initialZoom() { return 1.0f; } 1540 static float initialZoom() { return 1.0f; }
1538 static int initialOutlineOffset() { return 0; } 1541 static int initialOutlineOffset() { return 0; }
1539 static float initialOpacity() { return 1.0f; } 1542 static float initialOpacity() { return 1.0f; }
1540 static EBoxAlignment initialBoxAlign() { return BSTRETCH; } 1543 static EBoxAlignment initialBoxAlign() { return BSTRETCH; }
1541 static EBoxDecorationBreak initialBoxDecorationBreak() { return DSLICE; } 1544 static EBoxDecorationBreak initialBoxDecorationBreak() { return DSLICE; }
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) 1788 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))
1786 return false; 1789 return false;
1787 1790
1788 rareInheritedData.access()->m_textOrientation = textOrientation; 1791 rareInheritedData.access()->m_textOrientation = textOrientation;
1789 return true; 1792 return true;
1790 } 1793 }
1791 1794
1792 } // namespace WebCore 1795 } // namespace WebCore
1793 1796
1794 #endif // RenderStyle_h 1797 #endif // RenderStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698