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

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

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

Powered by Google App Engine
This is Rietveld 408576698