OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #include <algorithm> | 26 #include <algorithm> |
27 #include "core/css/resolver/StyleResolver.h" | 27 #include "core/css/resolver/StyleResolver.h" |
28 #include "core/rendering/RenderTheme.h" | 28 #include "core/rendering/RenderTheme.h" |
29 #include "core/rendering/TextAutosizer.h" | 29 #include "core/rendering/TextAutosizer.h" |
30 #include "core/rendering/style/AppliedTextDecoration.h" | 30 #include "core/rendering/style/AppliedTextDecoration.h" |
31 #include "core/rendering/style/BorderEdge.h" | 31 #include "core/rendering/style/BorderEdge.h" |
32 #include "core/rendering/style/ContentData.h" | 32 #include "core/rendering/style/ContentData.h" |
33 #include "core/rendering/style/DataEquivalency.h" | 33 #include "core/rendering/style/DataEquivalency.h" |
34 #include "core/rendering/style/QuotesData.h" | 34 #include "core/rendering/style/QuotesData.h" |
| 35 #include "core/rendering/style/RenderStyleConstants.h" |
35 #include "core/rendering/style/ShadowList.h" | 36 #include "core/rendering/style/ShadowList.h" |
36 #include "core/rendering/style/StyleImage.h" | 37 #include "core/rendering/style/StyleImage.h" |
37 #include "core/rendering/style/StyleInheritedData.h" | 38 #include "core/rendering/style/StyleInheritedData.h" |
38 #include "platform/LengthFunctions.h" | 39 #include "platform/LengthFunctions.h" |
39 #include "platform/RuntimeEnabledFeatures.h" | 40 #include "platform/RuntimeEnabledFeatures.h" |
40 #include "platform/fonts/Font.h" | 41 #include "platform/fonts/Font.h" |
41 #include "platform/fonts/FontSelector.h" | 42 #include "platform/fonts/FontSelector.h" |
42 #include "platform/geometry/FloatRoundedRect.h" | 43 #include "platform/geometry/FloatRoundedRect.h" |
43 #include "wtf/MathExtras.h" | 44 #include "wtf/MathExtras.h" |
44 | 45 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 return diffPseudoStyles(oldStyle, newStyle); | 191 return diffPseudoStyles(oldStyle, newStyle); |
191 | 192 |
192 if (oldStyle->inheritedNotEqual(newStyle) | 193 if (oldStyle->inheritedNotEqual(newStyle) |
193 || oldStyle->hasExplicitlyInheritedProperties() | 194 || oldStyle->hasExplicitlyInheritedProperties() |
194 || newStyle->hasExplicitlyInheritedProperties()) | 195 || newStyle->hasExplicitlyInheritedProperties()) |
195 return Inherit; | 196 return Inherit; |
196 | 197 |
197 return NoInherit; | 198 return NoInherit; |
198 } | 199 } |
199 | 200 |
| 201 ItemPosition RenderStyle::resolveAlignment(const RenderStyle* parentStyle, const
RenderStyle* childStyle) |
| 202 { |
| 203 ItemPosition align = childStyle->alignSelf(); |
| 204 // The auto keyword computes to the parent's align-items computed value, or
to "stretch", if not set or "auto". |
| 205 if (align == ItemPositionAuto) |
| 206 align = (parentStyle->alignItems() == ItemPositionAuto) ? ItemPositionSt
retch : parentStyle->alignItems(); |
| 207 return align; |
| 208 } |
| 209 |
200 void RenderStyle::inheritFrom(const RenderStyle* inheritParent, IsAtShadowBounda
ry isAtShadowBoundary) | 210 void RenderStyle::inheritFrom(const RenderStyle* inheritParent, IsAtShadowBounda
ry isAtShadowBoundary) |
201 { | 211 { |
202 if (isAtShadowBoundary == AtShadowBoundary) { | 212 if (isAtShadowBoundary == AtShadowBoundary) { |
203 // Even if surrounding content is user-editable, shadow DOM should act a
s a single unit, and not necessarily be editable | 213 // Even if surrounding content is user-editable, shadow DOM should act a
s a single unit, and not necessarily be editable |
204 EUserModify currentUserModify = userModify(); | 214 EUserModify currentUserModify = userModify(); |
205 rareInheritedData = inheritParent->rareInheritedData; | 215 rareInheritedData = inheritParent->rareInheritedData; |
206 setUserModify(currentUserModify); | 216 setUserModify(currentUserModify); |
207 } else | 217 } else |
208 rareInheritedData = inheritParent->rareInheritedData; | 218 rareInheritedData = inheritParent->rareInheritedData; |
209 inherited = inheritParent->inherited; | 219 inherited = inheritParent->inherited; |
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 horizontal || includeLogicalRightEdge); | 1750 horizontal || includeLogicalRightEdge); |
1741 | 1751 |
1742 edges[BSLeft] = BorderEdge(borderLeftWidth(), | 1752 edges[BSLeft] = BorderEdge(borderLeftWidth(), |
1743 visitedDependentColor(CSSPropertyBorderLeftColor), | 1753 visitedDependentColor(CSSPropertyBorderLeftColor), |
1744 borderLeftStyle(), | 1754 borderLeftStyle(), |
1745 borderLeftIsTransparent(), | 1755 borderLeftIsTransparent(), |
1746 !horizontal || includeLogicalLeftEdge); | 1756 !horizontal || includeLogicalLeftEdge); |
1747 } | 1757 } |
1748 | 1758 |
1749 } // namespace blink | 1759 } // namespace blink |
OLD | NEW |