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

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

Issue 134473008: Remove CSS regions support, keeping a bare minimum to support "region-based" multicol. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 ColumnFill columnFill() const { return static_cast<ColumnFill>(rareNonInheri tedData->m_multiCol->m_fill); } 846 ColumnFill columnFill() const { return static_cast<ColumnFill>(rareNonInheri tedData->m_multiCol->m_fill); }
847 float columnGap() const { return rareNonInheritedData->m_multiCol->m_gap; } 847 float columnGap() const { return rareNonInheritedData->m_multiCol->m_gap; }
848 bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m _normalGap; } 848 bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m _normalGap; }
849 EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiC ol->m_rule.style(); } 849 EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiC ol->m_rule.style(); }
850 unsigned short columnRuleWidth() const { return rareNonInheritedData->m_mult iCol->ruleWidth(); } 850 unsigned short columnRuleWidth() const { return rareNonInheritedData->m_mult iCol->ruleWidth(); }
851 bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiC ol->m_rule.isTransparent(); } 851 bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiC ol->m_rule.isTransparent(); }
852 ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheri tedData->m_multiCol->m_columnSpan); } 852 ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(rareNonInheri tedData->m_multiCol->m_columnSpan); }
853 EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakBefore); } 853 EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakBefore); }
854 EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakInside); } 854 EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_multiCol->m_breakInside); }
855 EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNon InheritedData->m_multiCol->m_breakAfter); } 855 EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNon InheritedData->m_multiCol->m_breakAfter); }
856 EPageBreak regionBreakBefore() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_regionBreakBefore); }
857 EPageBreak regionBreakInside() const { return static_cast<EPageBreak>(rareNo nInheritedData->m_regionBreakInside); }
858 EPageBreak regionBreakAfter() const { return static_cast<EPageBreak>(rareNon InheritedData->m_regionBreakAfter); }
859 const TransformOperations& transform() const { return rareNonInheritedData-> m_transform->m_operations; } 856 const TransformOperations& transform() const { return rareNonInheritedData-> m_transform->m_operations; }
860 Length transformOriginX() const { return rareNonInheritedData->m_transform-> m_x; } 857 Length transformOriginX() const { return rareNonInheritedData->m_transform-> m_x; }
861 Length transformOriginY() const { return rareNonInheritedData->m_transform-> m_y; } 858 Length transformOriginY() const { return rareNonInheritedData->m_transform-> m_y; }
862 float transformOriginZ() const { return rareNonInheritedData->m_transform->m _z; } 859 float transformOriginZ() const { return rareNonInheritedData->m_transform->m _z; }
863 bool hasTransform() const { return !rareNonInheritedData->m_transform->m_ope rations.operations().isEmpty(); } 860 bool hasTransform() const { return !rareNonInheritedData->m_transform->m_ope rations.operations().isEmpty(); }
864 bool transformDataEquivalent(const RenderStyle* otherStyle) const { return r areNonInheritedData->m_transform == otherStyle->rareNonInheritedData->m_transfor m; } 861 bool transformDataEquivalent(const RenderStyle* otherStyle) const { return r areNonInheritedData->m_transform == otherStyle->rareNonInheritedData->m_transfor m; }
865 862
866 TextEmphasisFill textEmphasisFill() const { return static_cast<TextEmphasisF ill>(rareInheritedData->textEmphasisFill); } 863 TextEmphasisFill textEmphasisFill() const { return static_cast<TextEmphasisF ill>(rareInheritedData->textEmphasisFill); }
867 TextEmphasisMark textEmphasisMark() const; 864 TextEmphasisMark textEmphasisMark() const;
868 const AtomicString& textEmphasisCustomMark() const { return rareInheritedDat a->textEmphasisCustomMark; } 865 const AtomicString& textEmphasisCustomMark() const { return rareInheritedDat a->textEmphasisCustomMark; }
(...skipping 17 matching lines...) Expand all
886 883
887 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rar eNonInheritedData->m_maskBoxImage.hasImage(); } 884 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rar eNonInheritedData->m_maskBoxImage.hasImage(); }
888 885
889 TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInh eritedData->m_textCombine); } 886 TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInh eritedData->m_textCombine); }
890 bool hasTextCombine() const { return textCombine() != TextCombineNone; } 887 bool hasTextCombine() const { return textCombine() != TextCombineNone; }
891 888
892 unsigned tabSize() const { return rareInheritedData->m_tabSize; } 889 unsigned tabSize() const { return rareInheritedData->m_tabSize; }
893 890
894 // End CSS3 Getters 891 // End CSS3 Getters
895 892
896 const AtomicString& flowThread() const { return rareNonInheritedData->m_flow Thread; }
897 bool hasFlowFrom() const { return !rareNonInheritedData->m_regionThread.isNu ll(); }
898 const AtomicString& regionThread() const { return rareNonInheritedData->m_re gionThread; }
899 RegionFragment regionFragment() const { return static_cast<RegionFragment>(r areNonInheritedData->m_regionFragment); }
900
901 const AtomicString& lineGrid() const { return rareInheritedData->m_lineGrid; } 893 const AtomicString& lineGrid() const { return rareInheritedData->m_lineGrid; }
902 LineSnap lineSnap() const { return static_cast<LineSnap>(rareInheritedData-> m_lineSnap); } 894 LineSnap lineSnap() const { return static_cast<LineSnap>(rareInheritedData-> m_lineSnap); }
903 LineAlign lineAlign() const { return static_cast<LineAlign>(rareInheritedDat a->m_lineAlign); } 895 LineAlign lineAlign() const { return static_cast<LineAlign>(rareInheritedDat a->m_lineAlign); }
904 896
905 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedDat a->m_wrapFlow); } 897 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedDat a->m_wrapFlow); }
906 WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInh eritedData->m_wrapThrough); } 898 WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInh eritedData->m_wrapThrough); }
907 899
908 // Apple-specific property getter methods 900 // Apple-specific property getter methods
909 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in herited_flags._pointerEvents); } 901 EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(in herited_flags._pointerEvents); }
910 const CSSAnimationDataList* animations() const { return rareNonInheritedData ->m_animations.get(); } 902 const CSSAnimationDataList* animations() const { return rareNonInheritedData ->m_animations.get(); }
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 void setHasNormalColumnGap() { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_normalGap, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_g ap, 0); } 1307 void setHasNormalColumnGap() { SET_VAR(rareNonInheritedData.access()->m_mult iCol, m_normalGap, true); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_g ap, 0); }
1316 void setColumnRuleColor(const StyleColor& c) { SET_BORDERVALUE_COLOR(rareNon InheritedData.access()->m_multiCol, m_rule, c); } 1308 void setColumnRuleColor(const StyleColor& c) { SET_BORDERVALUE_COLOR(rareNon InheritedData.access()->m_multiCol, m_rule, c); }
1317 void setColumnRuleStyle(EBorderStyle b) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_rule.m_style, b); } 1309 void setColumnRuleStyle(EBorderStyle b) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_rule.m_style, b); }
1318 void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_rule.m_width, w); } 1310 void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_rule.m_width, w); }
1319 void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()); } 1311 void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()); }
1320 void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_columnSpan, columnSpan); } 1312 void setColumnSpan(ColumnSpan columnSpan) { SET_VAR(rareNonInheritedData.acc ess()->m_multiCol, m_columnSpan, columnSpan); }
1321 void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_breakBefore, p); } 1313 void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.acces s()->m_multiCol, m_breakBefore, p); }
1322 // For valid values of column-break-inside see http://www.w3.org/TR/css3-mul ticol/#break-before-break-after-break-inside 1314 // For valid values of column-break-inside see http://www.w3.org/TR/css3-mul ticol/#break-before-break-after-break-inside
1323 void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID ); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); } 1315 void setColumnBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID ); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); }
1324 void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access ()->m_multiCol, m_breakAfter, p); } 1316 void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access ()->m_multiCol, m_breakAfter, p); }
1325 void setRegionBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData, m_re gionBreakBefore, p); }
1326 void setRegionBreakInside(EPageBreak p) { ASSERT(p == PBAUTO || p == PBAVOID ); SET_VAR(rareNonInheritedData, m_regionBreakInside, p); }
1327 void setRegionBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData, m_reg ionBreakAfter, p); }
1328 void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData .access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; } 1317 void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData .access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; }
1329 void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInherited Data.access()->m_transform, m_operations, ops); } 1318 void setTransform(const TransformOperations& ops) { SET_VAR(rareNonInherited Data.access()->m_transform, m_operations, ops); }
1330 void setTransformOriginX(Length l) { SET_VAR(rareNonInheritedData.access()-> m_transform, m_x, l); } 1319 void setTransformOriginX(Length l) { SET_VAR(rareNonInheritedData.access()-> m_transform, m_x, l); }
1331 void setTransformOriginY(Length l) { SET_VAR(rareNonInheritedData.access()-> m_transform, m_y, l); } 1320 void setTransformOriginY(Length l) { SET_VAR(rareNonInheritedData.access()-> m_transform, m_y, l); }
1332 void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m _transform, m_z, f); } 1321 void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m _transform, m_z, f); }
1333 void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); } 1322 void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); }
1334 void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCom bine, v); } 1323 void setTextCombine(TextCombine v) { SET_VAR(rareNonInheritedData, m_textCom bine, v); }
1335 void setTextDecorationColor(const StyleColor& c) { SET_VAR(rareNonInheritedD ata, m_textDecorationColor, c); } 1324 void setTextDecorationColor(const StyleColor& c) { SET_VAR(rareNonInheritedD ata, m_textDecorationColor, c); }
1336 void setTextEmphasisColor(const StyleColor& c) { SET_VAR(rareInheritedData, textEmphasisColor, c); } 1325 void setTextEmphasisColor(const StyleColor& c) { SET_VAR(rareInheritedData, textEmphasisColor, c); }
1337 void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(rareInheritedData, textEmphasisFill, fill); } 1326 void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(rareInheritedData, textEmphasisFill, fill); }
(...skipping 10 matching lines...) Expand all
1348 void setFilter(const FilterOperations& ops) { SET_VAR(rareNonInheritedData.a ccess()->m_filter, m_operations, ops); } 1337 void setFilter(const FilterOperations& ops) { SET_VAR(rareNonInheritedData.a ccess()->m_filter, m_operations, ops); }
1349 1338
1350 void setTabSize(unsigned size) { SET_VAR(rareInheritedData, m_tabSize, size) ; } 1339 void setTabSize(unsigned size) { SET_VAR(rareInheritedData, m_tabSize, size) ; }
1351 1340
1352 // End CSS3 Setters 1341 // End CSS3 Setters
1353 1342
1354 void setLineGrid(const AtomicString& lineGrid) { SET_VAR(rareInheritedData, m_lineGrid, lineGrid); } 1343 void setLineGrid(const AtomicString& lineGrid) { SET_VAR(rareInheritedData, m_lineGrid, lineGrid); }
1355 void setLineSnap(LineSnap lineSnap) { SET_VAR(rareInheritedData, m_lineSnap, lineSnap); } 1344 void setLineSnap(LineSnap lineSnap) { SET_VAR(rareInheritedData, m_lineSnap, lineSnap); }
1356 void setLineAlign(LineAlign lineAlign) { SET_VAR(rareInheritedData, m_lineAl ign, lineAlign); } 1345 void setLineAlign(LineAlign lineAlign) { SET_VAR(rareInheritedData, m_lineAl ign, lineAlign); }
1357 1346
1358 void setFlowThread(const AtomicString& flowThread) { SET_VAR(rareNonInherite dData, m_flowThread, flowThread); }
1359 void setRegionThread(const AtomicString& regionThread) { SET_VAR(rareNonInhe ritedData, m_regionThread, regionThread); }
1360 void setRegionFragment(RegionFragment regionFragment) { SET_VAR(rareNonInher itedData, m_regionFragment, regionFragment); }
1361
1362 void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(rareNonInheritedData, m_wrapFl ow, wrapFlow); } 1347 void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(rareNonInheritedData, m_wrapFl ow, wrapFlow); }
1363 void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(rareNonInheritedData, m_wrapThrough, wrapThrough); } 1348 void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(rareNonInheritedData, m_wrapThrough, wrapThrough); }
1364 1349
1365 // Apple-specific property setters 1350 // Apple-specific property setters
1366 void setPointerEvents(EPointerEvents p) { inherited_flags._pointerEvents = p ; } 1351 void setPointerEvents(EPointerEvents p) { inherited_flags._pointerEvents = p ; }
1367 1352
1368 void clearAnimations() 1353 void clearAnimations()
1369 { 1354 {
1370 rareNonInheritedData.access()->m_animations.clear(); 1355 rareNonInheritedData.access()->m_animations.clear();
1371 } 1356 }
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 const AtomicString& hyphenString() const; 1491 const AtomicString& hyphenString() const;
1507 1492
1508 bool inheritedNotEqual(const RenderStyle*) const; 1493 bool inheritedNotEqual(const RenderStyle*) const;
1509 bool inheritedDataShared(const RenderStyle*) const; 1494 bool inheritedDataShared(const RenderStyle*) const;
1510 1495
1511 StyleDifference diff(const RenderStyle*, unsigned& changedContextSensitivePr operties) const; 1496 StyleDifference diff(const RenderStyle*, unsigned& changedContextSensitivePr operties) const;
1512 1497
1513 bool isDisplayReplacedType() const { return isDisplayReplacedType(display()) ; } 1498 bool isDisplayReplacedType() const { return isDisplayReplacedType(display()) ; }
1514 bool isDisplayInlineType() const { return isDisplayInlineType(display()); } 1499 bool isDisplayInlineType() const { return isDisplayInlineType(display()); }
1515 bool isOriginalDisplayInlineType() const { return isDisplayInlineType(origin alDisplay()); } 1500 bool isOriginalDisplayInlineType() const { return isDisplayInlineType(origin alDisplay()); }
1516 bool isDisplayRegionType() const
1517 {
1518 return display() == BLOCK || display() == INLINE_BLOCK
1519 || display() == TABLE_CELL || display() == TABLE_CAPTION
1520 || display() == LIST_ITEM;
1521 }
1522 1501
1523 bool setWritingMode(WritingMode v) 1502 bool setWritingMode(WritingMode v)
1524 { 1503 {
1525 if (v == writingMode()) 1504 if (v == writingMode())
1526 return false; 1505 return false;
1527 1506
1528 inherited_flags.m_writingMode = v; 1507 inherited_flags.m_writingMode = v;
1529 return true; 1508 return true;
1530 } 1509 }
1531 1510
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 static GridPosition initialGridColumnEnd() { return GridPosition(); } 1699 static GridPosition initialGridColumnEnd() { return GridPosition(); }
1721 static GridPosition initialGridRowStart() { return GridPosition(); } 1700 static GridPosition initialGridRowStart() { return GridPosition(); }
1722 static GridPosition initialGridRowEnd() { return GridPosition(); } 1701 static GridPosition initialGridRowEnd() { return GridPosition(); }
1723 1702
1724 static unsigned initialTabSize() { return 8; } 1703 static unsigned initialTabSize() { return 8; }
1725 1704
1726 static const AtomicString& initialLineGrid() { return nullAtom; } 1705 static const AtomicString& initialLineGrid() { return nullAtom; }
1727 static LineSnap initialLineSnap() { return LineSnapNone; } 1706 static LineSnap initialLineSnap() { return LineSnapNone; }
1728 static LineAlign initialLineAlign() { return LineAlignNone; } 1707 static LineAlign initialLineAlign() { return LineAlignNone; }
1729 1708
1730 static const AtomicString& initialFlowThread() { return nullAtom; }
1731 static const AtomicString& initialRegionThread() { return nullAtom; }
1732 static RegionFragment initialRegionFragment() { return AutoRegionFragment; }
1733
1734 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } 1709 static WrapFlow initialWrapFlow() { return WrapFlowAuto; }
1735 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } 1710 static WrapThrough initialWrapThrough() { return WrapThroughWrap; }
1736 1711
1737 static QuotesData* initialQuotes() { return 0; } 1712 static QuotesData* initialQuotes() { return 0; }
1738 1713
1739 // Keep these at the end. 1714 // Keep these at the end.
1740 // FIXME: Why? Seems these should all be one big sorted list. 1715 // FIXME: Why? Seems these should all be one big sorted list.
1741 static LineClampValue initialLineClamp() { return LineClampValue(); } 1716 static LineClampValue initialLineClamp() { return LineClampValue(); }
1742 static ETextSecurity initialTextSecurity() { return TSNONE; } 1717 static ETextSecurity initialTextSecurity() { return TSNONE; }
1743 static Color initialTapHighlightColor(); 1718 static Color initialTapHighlightColor();
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 } 1881 }
1907 1882
1908 inline bool RenderStyle::hasPseudoElementStyle() const 1883 inline bool RenderStyle::hasPseudoElementStyle() const
1909 { 1884 {
1910 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; 1885 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK;
1911 } 1886 }
1912 1887
1913 } // namespace WebCore 1888 } // namespace WebCore
1914 1889
1915 #endif // RenderStyle_h 1890 #endif // RenderStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698