Chromium Code Reviews| 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 || style.boxReflect() | 189 || style.boxReflect() |
| 190 || style.hasFilter() | 190 || style.hasFilter() |
| 191 || style.hasBlendMode() | 191 || style.hasBlendMode() |
| 192 || style.hasIsolation() | 192 || style.hasIsolation() |
| 193 || style.position() == FixedPosition | 193 || style.position() == FixedPosition |
| 194 || isInTopLayer(e, style) | 194 || isInTopLayer(e, style) |
| 195 || hasWillChangeThatCreatesStackingContext(style))) | 195 || hasWillChangeThatCreatesStackingContext(style))) |
| 196 style.setZIndex(0); | 196 style.setZIndex(0); |
| 197 | 197 |
| 198 // will-change:transform should result in the same rendering behavior as hav ing a transform, | 198 // will-change:transform should result in the same rendering behavior as hav ing a transform, |
| 199 // including the creation of a containing block for fixed position descendan ts. | 199 // including the creation of a containing block for fixed position descendan ts. |
|
pdr.
2015/04/10 20:19:21
Please add the comment I suggested.
| |
| 200 if (!style.hasTransform() && (style.willChangeProperties().contains(CSSPrope rtyWebkitTransform) || style.willChangeProperties().contains(CSSPropertyTransfor m))) { | 200 bool isSVGElement = e && e->isSVGElement(); |
| 201 if (!isSVGElement && !style.hasTransform() && (style.willChangeProperties(). contains(CSSPropertyWebkitTransform) || style.willChangeProperties().contains(CS SPropertyTransform))) { | |
| 201 bool makeIdentity = true; | 202 bool makeIdentity = true; |
| 202 style.setTransform(TransformOperations(makeIdentity)); | 203 style.setTransform(TransformOperations(makeIdentity)); |
| 203 } | 204 } |
| 204 | 205 |
| 205 if (doesNotInheritTextDecoration(style, e)) | 206 if (doesNotInheritTextDecoration(style, e)) |
| 206 style.clearAppliedTextDecorations(); | 207 style.clearAppliedTextDecorations(); |
| 207 | 208 |
| 208 style.applyTextDecorations(); | 209 style.applyTextDecorations(); |
| 209 | 210 |
| 210 if (style.overflowX() != OVISIBLE || style.overflowY() != OVISIBLE) | 211 if (style.overflowX() != OVISIBLE || style.overflowY() != OVISIBLE) |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 221 // If we have first-letter pseudo style, transitions, or animations, do not share this style. | 222 // If we have first-letter pseudo style, transitions, or animations, do not share this style. |
| 222 if (style.hasPseudoStyle(FIRST_LETTER) || style.transitions() || style.anima tions()) | 223 if (style.hasPseudoStyle(FIRST_LETTER) || style.transitions() || style.anima tions()) |
| 223 style.setUnique(); | 224 style.setUnique(); |
| 224 | 225 |
| 225 // FIXME: when dropping the -webkit prefix on transform-style, we should als o have opacity < 1 cause flattening. | 226 // FIXME: when dropping the -webkit prefix on transform-style, we should als o have opacity < 1 cause flattening. |
| 226 if (style.preserves3D() && (style.overflowX() != OVISIBLE | 227 if (style.preserves3D() && (style.overflowX() != OVISIBLE |
| 227 || style.overflowY() != OVISIBLE | 228 || style.overflowY() != OVISIBLE |
| 228 || style.hasFilter())) | 229 || style.hasFilter())) |
| 229 style.setTransformStyle3D(TransformStyle3DFlat); | 230 style.setTransformStyle3D(TransformStyle3DFlat); |
| 230 | 231 |
| 231 if (e && e->isSVGElement()) { | 232 if (isSVGElement) { |
| 232 // Only the root <svg> element in an SVG document fragment tree honors c ss position | 233 // Only the root <svg> element in an SVG document fragment tree honors c ss position |
| 233 if (!(isSVGSVGElement(*e) && e->parentNode() && !e->parentNode()->isSVGE lement())) | 234 if (!(isSVGSVGElement(*e) && e->parentNode() && !e->parentNode()->isSVGE lement())) |
| 234 style.setPosition(ComputedStyle::initialPosition()); | 235 style.setPosition(ComputedStyle::initialPosition()); |
| 235 | 236 |
| 236 // SVG text layout code expects us to be a block-level style element. | 237 // SVG text layout code expects us to be a block-level style element. |
| 237 if ((isSVGForeignObjectElement(*e) || isSVGTextElement(*e)) && style.isD isplayInlineType()) | 238 if ((isSVGForeignObjectElement(*e) || isSVGTextElement(*e)) && style.isD isplayInlineType()) |
| 238 style.setDisplay(BLOCK); | 239 style.setDisplay(BLOCK); |
| 239 | 240 |
| 240 // Columns don't apply to svg text elements. | 241 // Columns don't apply to svg text elements. |
| 241 if (isSVGTextElement(*e)) | 242 if (isSVGTextElement(*e)) |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 486 if (style.writingMode() != TopToBottomWritingMode && (style.display() == BOX || style.display() == INLINE_BOX)) | 487 if (style.writingMode() != TopToBottomWritingMode && (style.display() == BOX || style.display() == INLINE_BOX)) |
| 487 style.setWritingMode(TopToBottomWritingMode); | 488 style.setWritingMode(TopToBottomWritingMode); |
| 488 | 489 |
| 489 if (parentStyle.isDisplayFlexibleOrGridBox()) { | 490 if (parentStyle.isDisplayFlexibleOrGridBox()) { |
| 490 style.setFloating(NoFloat); | 491 style.setFloating(NoFloat); |
| 491 style.setDisplay(equivalentBlockDisplay(style.display(), style.isFloatin g(), !m_useQuirksModeStyles)); | 492 style.setDisplay(equivalentBlockDisplay(style.display(), style.isFloatin g(), !m_useQuirksModeStyles)); |
| 492 } | 493 } |
| 493 } | 494 } |
| 494 | 495 |
| 495 } | 496 } |
| OLD | NEW |