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

Side by Side Diff: sky/engine/core/rendering/style/RenderStyle.h

Issue 761283002: Remove webkit-line-clamp (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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 15 matching lines...) Expand all
26 #define SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ 26 #define SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_
27 27
28 #include "gen/sky/core/CSSPropertyNames.h" 28 #include "gen/sky/core/CSSPropertyNames.h"
29 #include "sky/engine/core/animation/css/CSSAnimationData.h" 29 #include "sky/engine/core/animation/css/CSSAnimationData.h"
30 #include "sky/engine/core/animation/css/CSSTransitionData.h" 30 #include "sky/engine/core/animation/css/CSSTransitionData.h"
31 #include "sky/engine/core/css/CSSLineBoxContainValue.h" 31 #include "sky/engine/core/css/CSSLineBoxContainValue.h"
32 #include "sky/engine/core/css/CSSPrimitiveValue.h" 32 #include "sky/engine/core/css/CSSPrimitiveValue.h"
33 #include "sky/engine/core/rendering/style/BorderValue.h" 33 #include "sky/engine/core/rendering/style/BorderValue.h"
34 #include "sky/engine/core/rendering/style/CounterDirectives.h" 34 #include "sky/engine/core/rendering/style/CounterDirectives.h"
35 #include "sky/engine/core/rendering/style/DataRef.h" 35 #include "sky/engine/core/rendering/style/DataRef.h"
36 #include "sky/engine/core/rendering/style/LineClampValue.h"
37 #include "sky/engine/core/rendering/style/NinePieceImage.h" 36 #include "sky/engine/core/rendering/style/NinePieceImage.h"
38 #include "sky/engine/core/rendering/style/OutlineValue.h" 37 #include "sky/engine/core/rendering/style/OutlineValue.h"
39 #include "sky/engine/core/rendering/style/RenderStyleConstants.h" 38 #include "sky/engine/core/rendering/style/RenderStyleConstants.h"
40 #include "sky/engine/core/rendering/style/ShapeValue.h" 39 #include "sky/engine/core/rendering/style/ShapeValue.h"
41 #include "sky/engine/core/rendering/style/StyleBackgroundData.h" 40 #include "sky/engine/core/rendering/style/StyleBackgroundData.h"
42 #include "sky/engine/core/rendering/style/StyleBoxData.h" 41 #include "sky/engine/core/rendering/style/StyleBoxData.h"
43 #include "sky/engine/core/rendering/style/StyleDifference.h" 42 #include "sky/engine/core/rendering/style/StyleDifference.h"
44 #include "sky/engine/core/rendering/style/StyleFilterData.h" 43 #include "sky/engine/core/rendering/style/StyleFilterData.h"
45 #include "sky/engine/core/rendering/style/StyleFlexibleBoxData.h" 44 #include "sky/engine/core/rendering/style/StyleFlexibleBoxData.h"
46 #include "sky/engine/core/rendering/style/StyleInheritedData.h" 45 #include "sky/engine/core/rendering/style/StyleInheritedData.h"
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 bool hasCurrentTransformAnimation() const { return rareNonInheritedData->m_h asCurrentTransformAnimation; } 776 bool hasCurrentTransformAnimation() const { return rareNonInheritedData->m_h asCurrentTransformAnimation; }
778 bool hasCurrentFilterAnimation() const { return rareNonInheritedData->m_hasC urrentFilterAnimation; } 777 bool hasCurrentFilterAnimation() const { return rareNonInheritedData->m_hasC urrentFilterAnimation; }
779 bool shouldCompositeForCurrentAnimations() { return hasCurrentOpacityAnimati on() || hasCurrentTransformAnimation() || hasCurrentFilterAnimation(); } 778 bool shouldCompositeForCurrentAnimations() { return hasCurrentOpacityAnimati on() || hasCurrentTransformAnimation() || hasCurrentFilterAnimation(); }
780 779
781 bool isRunningOpacityAnimationOnCompositor() const { return rareNonInherited Data->m_runningOpacityAnimationOnCompositor; } 780 bool isRunningOpacityAnimationOnCompositor() const { return rareNonInherited Data->m_runningOpacityAnimationOnCompositor; }
782 bool isRunningTransformAnimationOnCompositor() const { return rareNonInherit edData->m_runningTransformAnimationOnCompositor; } 781 bool isRunningTransformAnimationOnCompositor() const { return rareNonInherit edData->m_runningTransformAnimationOnCompositor; }
783 bool isRunningFilterAnimationOnCompositor() const { return rareNonInheritedD ata->m_runningFilterAnimationOnCompositor; } 782 bool isRunningFilterAnimationOnCompositor() const { return rareNonInheritedD ata->m_runningFilterAnimationOnCompositor; }
784 bool isRunningAnimationOnCompositor() { return isRunningOpacityAnimationOnCo mpositor() || isRunningTransformAnimationOnCompositor() || isRunningFilterAnimat ionOnCompositor(); } 783 bool isRunningAnimationOnCompositor() { return isRunningOpacityAnimationOnCo mpositor() || isRunningTransformAnimationOnCompositor() || isRunningFilterAnimat ionOnCompositor(); }
785 784
786 LineBoxContain lineBoxContain() const { return rareInheritedData->m_lineBoxC ontain; } 785 LineBoxContain lineBoxContain() const { return rareInheritedData->m_lineBoxC ontain; }
787 const LineClampValue& lineClamp() const { return rareNonInheritedData->lineC lamp; }
788 Color tapHighlightColor() const { return rareInheritedData->tapHighlightColo r; } 786 Color tapHighlightColor() const { return rareInheritedData->tapHighlightColo r; }
789 787
790 EImageRendering imageRendering() const { return static_cast<EImageRendering> (rareInheritedData->m_imageRendering); } 788 EImageRendering imageRendering() const { return static_cast<EImageRendering> (rareInheritedData->m_imageRendering); }
791 789
792 ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak); } 790 ESpeak speak() const { return static_cast<ESpeak>(rareInheritedData->speak); }
793 791
794 FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_ filter.access()->m_operations; } 792 FilterOperations& mutableFilter() { return rareNonInheritedData.access()->m_ filter.access()->m_operations; }
795 const FilterOperations& filter() const { return rareNonInheritedData->m_filt er->m_operations; } 793 const FilterOperations& filter() const { return rareNonInheritedData->m_filt er->m_operations; }
796 bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operation s.operations().isEmpty(); } 794 bool hasFilter() const { return !rareNonInheritedData->m_filter->m_operation s.operations().isEmpty(); }
797 795
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 1142
1145 void setHasCurrentOpacityAnimation(bool b = true) { SET_VAR(rareNonInherited Data, m_hasCurrentOpacityAnimation, b); } 1143 void setHasCurrentOpacityAnimation(bool b = true) { SET_VAR(rareNonInherited Data, m_hasCurrentOpacityAnimation, b); }
1146 void setHasCurrentTransformAnimation(bool b = true) { SET_VAR(rareNonInherit edData, m_hasCurrentTransformAnimation, b); } 1144 void setHasCurrentTransformAnimation(bool b = true) { SET_VAR(rareNonInherit edData, m_hasCurrentTransformAnimation, b); }
1147 void setHasCurrentFilterAnimation(bool b = true) { SET_VAR(rareNonInheritedD ata, m_hasCurrentFilterAnimation, b); } 1145 void setHasCurrentFilterAnimation(bool b = true) { SET_VAR(rareNonInheritedD ata, m_hasCurrentFilterAnimation, b); }
1148 1146
1149 void setIsRunningOpacityAnimationOnCompositor(bool b = true) { SET_VAR(rareN onInheritedData, m_runningOpacityAnimationOnCompositor, b); } 1147 void setIsRunningOpacityAnimationOnCompositor(bool b = true) { SET_VAR(rareN onInheritedData, m_runningOpacityAnimationOnCompositor, b); }
1150 void setIsRunningTransformAnimationOnCompositor(bool b = true) { SET_VAR(rar eNonInheritedData, m_runningTransformAnimationOnCompositor, b); } 1148 void setIsRunningTransformAnimationOnCompositor(bool b = true) { SET_VAR(rar eNonInheritedData, m_runningTransformAnimationOnCompositor, b); }
1151 void setIsRunningFilterAnimationOnCompositor(bool b = true) { SET_VAR(rareNo nInheritedData, m_runningFilterAnimationOnCompositor, b); } 1149 void setIsRunningFilterAnimationOnCompositor(bool b = true) { SET_VAR(rareNo nInheritedData, m_runningFilterAnimationOnCompositor, b); }
1152 1150
1153 void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_line BoxContain, c); } 1151 void setLineBoxContain(LineBoxContain c) { SET_VAR(rareInheritedData, m_line BoxContain, c); }
1154 void setLineClamp(LineClampValue c) { SET_VAR(rareNonInheritedData, lineClam p, c); }
1155 void setTapHighlightColor(const Color& c) { SET_VAR(rareInheritedData, tapHi ghlightColor, c); } 1152 void setTapHighlightColor(const Color& c) { SET_VAR(rareInheritedData, tapHi ghlightColor, c); }
1156 void setTouchAction(TouchAction t) { SET_VAR(rareNonInheritedData, m_touchAc tion, t); } 1153 void setTouchAction(TouchAction t) { SET_VAR(rareNonInheritedData, m_touchAc tion, t); }
1157 void setTouchActionDelay(TouchActionDelay t) { SET_VAR(rareInheritedData, m_ touchActionDelay, t); } 1154 void setTouchActionDelay(TouchActionDelay t) { SET_VAR(rareInheritedData, m_ touchActionDelay, t); }
1158 1155
1159 void setScrollBehavior(ScrollBehavior b) { SET_VAR(rareNonInheritedData, m_s crollBehavior, b); } 1156 void setScrollBehavior(ScrollBehavior b) { SET_VAR(rareNonInheritedData, m_s crollBehavior, b); }
1160 1157
1161 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_ VAR(rareNonInheritedData.access()->m_willChange, m_properties, properties); } 1158 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_ VAR(rareNonInheritedData.access()->m_willChange, m_properties, properties); }
1162 void setWillChangeContents(bool b) { SET_VAR(rareNonInheritedData.access()-> m_willChange, m_contents, b); } 1159 void setWillChangeContents(bool b) { SET_VAR(rareNonInheritedData.access()-> m_willChange, m_contents, b); }
1163 void setWillChangeScrollPosition(bool b) { SET_VAR(rareNonInheritedData.acce ss()->m_willChange, m_scrollPosition, b); } 1160 void setWillChangeScrollPosition(bool b) { SET_VAR(rareNonInheritedData.acce ss()->m_willChange, m_scrollPosition, b); }
1164 void setSubtreeWillChangeContents(bool b) { SET_VAR(rareInheritedData, m_sub treeWillChangeContents, b); } 1161 void setSubtreeWillChangeContents(bool b) { SET_VAR(rareInheritedData, m_sub treeWillChangeContents, b); }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 1346
1350 static unsigned initialTabSize() { return 8; } 1347 static unsigned initialTabSize() { return 8; }
1351 1348
1352 static WrapFlow initialWrapFlow() { return WrapFlowAuto; } 1349 static WrapFlow initialWrapFlow() { return WrapFlowAuto; }
1353 static WrapThrough initialWrapThrough() { return WrapThroughWrap; } 1350 static WrapThrough initialWrapThrough() { return WrapThroughWrap; }
1354 1351
1355 static QuotesData* initialQuotes() { return 0; } 1352 static QuotesData* initialQuotes() { return 0; }
1356 1353
1357 // Keep these at the end. 1354 // Keep these at the end.
1358 // FIXME: Why? Seems these should all be one big sorted list. 1355 // FIXME: Why? Seems these should all be one big sorted list.
1359 static LineClampValue initialLineClamp() { return LineClampValue(); }
1360 static Color initialTapHighlightColor(); 1356 static Color initialTapHighlightColor();
1361 static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterO perations, ops, ()); return ops; } 1357 static const FilterOperations& initialFilter() { DEFINE_STATIC_LOCAL(FilterO perations, ops, ()); return ops; }
1362 1358
1363 Color colorIncludingFallback(int colorProperty) const; 1359 Color colorIncludingFallback(int colorProperty) const;
1364 1360
1365 private: 1361 private:
1366 void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags. unicodeBidi = parent->noninherited_flags.unicodeBidi; } 1362 void inheritUnicodeBidiFrom(const RenderStyle* parent) { noninherited_flags. unicodeBidi = parent->noninherited_flags.unicodeBidi; }
1367 void getShadowExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const; 1363 void getShadowExtent(const ShadowList*, LayoutUnit& top, LayoutUnit& right, LayoutUnit& bottom, LayoutUnit& left) const;
1368 LayoutBoxExtent getShadowInsetExtent(const ShadowList*) const; 1364 LayoutBoxExtent getShadowInsetExtent(const ShadowList*) const;
1369 void getShadowHorizontalExtent(const ShadowList*, LayoutUnit& left, LayoutUn it& right) const; 1365 void getShadowHorizontalExtent(const ShadowList*, LayoutUnit& left, LayoutUn it& right) const;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 1424
1429 rareInheritedData.access()->m_textOrientation = textOrientation; 1425 rareInheritedData.access()->m_textOrientation = textOrientation;
1430 return true; 1426 return true;
1431 } 1427 }
1432 1428
1433 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); 1429 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&);
1434 1430
1435 } // namespace blink 1431 } // namespace blink
1436 1432
1437 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_ 1433 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_RENDERSTYLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698