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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 // Auto z-index becomes 0 for the root element and transparent objects. This
prevents | 190 // Auto z-index becomes 0 for the root element and transparent objects. This
prevents |
191 // cases where objects that should be blended as a single unit end up with a
non-transparent | 191 // cases where objects that should be blended as a single unit end up with a
non-transparent |
192 // object wedged in between them. Auto z-index also becomes 0 for objects th
at specify transforms/masks/reflections. | 192 // object wedged in between them. Auto z-index also becomes 0 for objects th
at specify transforms/masks/reflections. |
193 if (style.hasAutoZIndex() && ((element && element->document().documentElemen
t() == element) | 193 if (style.hasAutoZIndex() && ((element && element->document().documentElemen
t() == element) |
194 || style.hasOpacity() | 194 || style.hasOpacity() |
195 || style.hasTransformRelatedProperty() | 195 || style.hasTransformRelatedProperty() |
196 || style.hasMask() | 196 || style.hasMask() |
197 || style.clipPath() | 197 || style.clipPath() |
198 || style.boxReflect() | 198 || style.boxReflect() |
199 || style.hasFilter() | 199 || style.hasFilterInducingProperty() |
200 || style.hasBlendMode() | 200 || style.hasBlendMode() |
201 || style.hasIsolation() | 201 || style.hasIsolation() |
202 || style.position() == FixedPosition | 202 || style.position() == FixedPosition |
203 || isInTopLayer(element, style) | 203 || isInTopLayer(element, style) |
204 || hasWillChangeThatCreatesStackingContext(style) | 204 || hasWillChangeThatCreatesStackingContext(style) |
205 || style.containsPaint())) | 205 || style.containsPaint())) |
206 style.setZIndex(0); | 206 style.setZIndex(0); |
207 | 207 |
208 if (doesNotInheritTextDecoration(style, element)) | 208 if (doesNotInheritTextDecoration(style, element)) |
209 style.clearAppliedTextDecorations(); | 209 style.clearAppliedTextDecorations(); |
(...skipping 11 matching lines...) Expand all Loading... |
221 if (style.hasAppearance()) | 221 if (style.hasAppearance()) |
222 LayoutTheme::theme().adjustStyle(style, element); | 222 LayoutTheme::theme().adjustStyle(style, element); |
223 | 223 |
224 // If we have first-letter pseudo style, transitions, or animations, do not
share this style. | 224 // If we have first-letter pseudo style, transitions, or animations, do not
share this style. |
225 if (style.hasPseudoStyle(PseudoIdFirstLetter) || style.transitions() || styl
e.animations()) | 225 if (style.hasPseudoStyle(PseudoIdFirstLetter) || style.transitions() || styl
e.animations()) |
226 style.setUnique(); | 226 style.setUnique(); |
227 | 227 |
228 // FIXME: when dropping the -webkit prefix on transform-style, we should als
o have opacity < 1 cause flattening. | 228 // FIXME: when dropping the -webkit prefix on transform-style, we should als
o have opacity < 1 cause flattening. |
229 if (style.preserves3D() && (style.overflowX() != OverflowVisible | 229 if (style.preserves3D() && (style.overflowX() != OverflowVisible |
230 || style.overflowY() != OverflowVisible | 230 || style.overflowY() != OverflowVisible |
231 || style.hasFilter())) | 231 || style.hasFilterInducingProperty())) |
232 style.setTransformStyle3D(TransformStyle3DFlat); | 232 style.setTransformStyle3D(TransformStyle3DFlat); |
233 | 233 |
234 adjustStyleForEditing(style); | 234 adjustStyleForEditing(style); |
235 | 235 |
236 bool isSVGElement = element && element->isSVGElement(); | 236 bool isSVGElement = element && element->isSVGElement(); |
237 if (isSVGElement) { | 237 if (isSVGElement) { |
238 // Only the root <svg> element in an SVG document fragment tree honors c
ss position | 238 // Only the root <svg> element in an SVG document fragment tree honors c
ss position |
239 if (!(isSVGSVGElement(*element) && element->parentNode() && !element->pa
rentNode()->isSVGElement())) | 239 if (!(isSVGSVGElement(*element) && element->parentNode() && !element->pa
rentNode()->isSVGElement())) |
240 style.setPosition(ComputedStyle::initialPosition()); | 240 style.setPosition(ComputedStyle::initialPosition()); |
241 | 241 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 // We want to count vertical percentage paddings/margins on flex items b
ecause our current | 459 // We want to count vertical percentage paddings/margins on flex items b
ecause our current |
460 // behavior is different from the spec and we want to gather compatibili
ty data. | 460 // behavior is different from the spec and we want to gather compatibili
ty data. |
461 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen
t()) | 461 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen
t()) |
462 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert
ical); | 462 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert
ical); |
463 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent(
)) | 463 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent(
)) |
464 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti
cal); | 464 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti
cal); |
465 } | 465 } |
466 } | 466 } |
467 | 467 |
468 } // namespace blink | 468 } // namespace blink |
OLD | NEW |