OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 static bool isDisplayGridBox(EDisplay display) | 155 static bool isDisplayGridBox(EDisplay display) |
156 { | 156 { |
157 return display == GRID || display == INLINE_GRID; | 157 return display == GRID || display == INLINE_GRID; |
158 } | 158 } |
159 | 159 |
160 static bool parentStyleForcesZIndexToCreateStackingContext(const RenderStyle* pa
rentStyle) | 160 static bool parentStyleForcesZIndexToCreateStackingContext(const RenderStyle* pa
rentStyle) |
161 { | 161 { |
162 return isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(pare
ntStyle->display()); | 162 return isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(pare
ntStyle->display()); |
163 } | 163 } |
164 | 164 |
165 static bool hasWillChangeThatCreatesStackingContext(const RenderStyle* style, El
ement* e) | 165 static bool hasWillChangeThatCreatesStackingContext(const RenderStyle* style) |
166 { | 166 { |
167 for (size_t i = 0; i < style->willChangeProperties().size(); ++i) { | 167 for (size_t i = 0; i < style->willChangeProperties().size(); ++i) { |
168 switch (style->willChangeProperties()[i]) { | 168 switch (style->willChangeProperties()[i]) { |
169 case CSSPropertyOpacity: | 169 case CSSPropertyOpacity: |
170 case CSSPropertyTransform: | 170 case CSSPropertyTransform: |
171 case CSSPropertyWebkitTransform: | 171 case CSSPropertyWebkitTransform: |
172 case CSSPropertyTransformStyle: | 172 case CSSPropertyTransformStyle: |
173 case CSSPropertyWebkitTransformStyle: | 173 case CSSPropertyWebkitTransformStyle: |
174 case CSSPropertyPerspective: | 174 case CSSPropertyPerspective: |
175 case CSSPropertyWebkitPerspective: | 175 case CSSPropertyWebkitPerspective: |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 || style->hasTransformRelatedProperty() | 227 || style->hasTransformRelatedProperty() |
228 || style->hasMask() | 228 || style->hasMask() |
229 || style->clipPath() | 229 || style->clipPath() |
230 || style->boxReflect() | 230 || style->boxReflect() |
231 || style->hasFilter() | 231 || style->hasFilter() |
232 || style->hasBlendMode() | 232 || style->hasBlendMode() |
233 || style->hasIsolation() | 233 || style->hasIsolation() |
234 || style->position() == StickyPosition | 234 || style->position() == StickyPosition |
235 || style->position() == FixedPosition | 235 || style->position() == FixedPosition |
236 || isInTopLayer(e, style) | 236 || isInTopLayer(e, style) |
237 || hasWillChangeThatCreatesStackingContext(style, e))) | 237 || hasWillChangeThatCreatesStackingContext(style))) |
238 style->setZIndex(0); | 238 style->setZIndex(0); |
239 | 239 |
240 // will-change:transform should result in the same rendering behavior as hav
ing a transform, | 240 // will-change:transform should result in the same rendering behavior as hav
ing a transform, |
241 // including the creation of a containing block for fixed position descendan
ts. | 241 // including the creation of a containing block for fixed position descendan
ts. |
242 if (!style->hasTransform() && (style->willChangeProperties().contains(CSSPro
pertyWebkitTransform) || style->willChangeProperties().contains(CSSPropertyTrans
form))) { | 242 if (!style->hasTransform() && (style->willChangeProperties().contains(CSSPro
pertyWebkitTransform) || style->willChangeProperties().contains(CSSPropertyTrans
form))) { |
243 bool makeIdentity = true; | 243 bool makeIdentity = true; |
244 style->setTransform(TransformOperations(makeIdentity)); | 244 style->setTransform(TransformOperations(makeIdentity)); |
245 } | 245 } |
246 | 246 |
247 if (doesNotInheritTextDecoration(style, e)) | 247 if (doesNotInheritTextDecoration(style, e)) |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 446 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
447 style->setWritingMode(TopToBottomWritingMode); | 447 style->setWritingMode(TopToBottomWritingMode); |
448 | 448 |
449 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { | 449 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { |
450 style->setFloating(NoFloat); | 450 style->setFloating(NoFloat); |
451 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 451 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
452 } | 452 } |
453 } | 453 } |
454 | 454 |
455 } | 455 } |
OLD | NEW |