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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 // object wedged in between them. Auto z-index also becomes 0 for objects th
at specify transforms/masks/reflections. | 203 // object wedged in between them. Auto z-index also becomes 0 for objects th
at specify transforms/masks/reflections. |
204 if (style->hasAutoZIndex() && ((e && e->document().documentElement() == e) | 204 if (style->hasAutoZIndex() && ((e && e->document().documentElement() == e) |
205 || style->opacity() < 1.0f | 205 || style->opacity() < 1.0f |
206 || style->hasTransformRelatedProperty() | 206 || style->hasTransformRelatedProperty() |
207 || style->hasMask() | 207 || style->hasMask() |
208 || style->clipPath() | 208 || style->clipPath() |
209 || style->boxReflect() | 209 || style->boxReflect() |
210 || style->hasFilter() | 210 || style->hasFilter() |
211 || style->hasBlendMode() | 211 || style->hasBlendMode() |
212 || style->hasIsolation() | 212 || style->hasIsolation() |
213 || style->position() == StickyPosition | |
214 || style->position() == FixedPosition | 213 || style->position() == FixedPosition |
215 || isInTopLayer(e, style) | 214 || isInTopLayer(e, style) |
216 || hasWillChangeThatCreatesStackingContext(style))) | 215 || hasWillChangeThatCreatesStackingContext(style))) |
217 style->setZIndex(0); | 216 style->setZIndex(0); |
218 | 217 |
219 // will-change:transform should result in the same rendering behavior as hav
ing a transform, | 218 // will-change:transform should result in the same rendering behavior as hav
ing a transform, |
220 // including the creation of a containing block for fixed position descendan
ts. | 219 // including the creation of a containing block for fixed position descendan
ts. |
221 if (!style->hasTransform() && (style->willChangeProperties().contains(CSSPro
pertyWebkitTransform) || style->willChangeProperties().contains(CSSPropertyTrans
form))) { | 220 if (!style->hasTransform() && (style->willChangeProperties().contains(CSSPro
pertyWebkitTransform) || style->willChangeProperties().contains(CSSPropertyTrans
form))) { |
222 bool makeIdentity = true; | 221 bool makeIdentity = true; |
223 style->setTransform(TransformOperations(makeIdentity)); | 222 style->setTransform(TransformOperations(makeIdentity)); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 style->setDisplay(INLINE_BLOCK); | 388 style->setDisplay(INLINE_BLOCK); |
390 | 389 |
391 // After performing the display mutation, check table rows. We do not honor
position: relative table rows or cells. | 390 // After performing the display mutation, check table rows. We do not honor
position: relative table rows or cells. |
392 // This has been established for position: relative in CSS2.1 (and caused a
crash in containingBlock() | 391 // This has been established for position: relative in CSS2.1 (and caused a
crash in containingBlock() |
393 // on some sites). | 392 // on some sites). |
394 if ((style->display() == TABLE_HEADER_GROUP || style->display() == TABLE_ROW
_GROUP | 393 if ((style->display() == TABLE_HEADER_GROUP || style->display() == TABLE_ROW
_GROUP |
395 || style->display() == TABLE_FOOTER_GROUP || style->display() == TABLE_R
OW) | 394 || style->display() == TABLE_FOOTER_GROUP || style->display() == TABLE_R
OW) |
396 && style->position() == RelativePosition) | 395 && style->position() == RelativePosition) |
397 style->setPosition(StaticPosition); | 396 style->setPosition(StaticPosition); |
398 | 397 |
399 // Cannot support position: sticky for table columns and column groups becau
se current code is only doing | |
400 // background painting through columns / column groups | |
401 if ((style->display() == TABLE_COLUMN_GROUP || style->display() == TABLE_COL
UMN) | |
402 && style->position() == StickyPosition) | |
403 style->setPosition(StaticPosition); | |
404 | |
405 // writing-mode does not apply to table row groups, table column groups, tab
le rows, and table columns. | 398 // writing-mode does not apply to table row groups, table column groups, tab
le rows, and table columns. |
406 // FIXME: Table cells should be allowed to be perpendicular or flipped with
respect to the table, though. | 399 // FIXME: Table cells should be allowed to be perpendicular or flipped with
respect to the table, though. |
407 if (style->display() == TABLE_COLUMN || style->display() == TABLE_COLUMN_GRO
UP || style->display() == TABLE_FOOTER_GROUP | 400 if (style->display() == TABLE_COLUMN || style->display() == TABLE_COLUMN_GRO
UP || style->display() == TABLE_FOOTER_GROUP |
408 || style->display() == TABLE_HEADER_GROUP || style->display() == TABLE_R
OW || style->display() == TABLE_ROW_GROUP | 401 || style->display() == TABLE_HEADER_GROUP || style->display() == TABLE_R
OW || style->display() == TABLE_ROW_GROUP |
409 || style->display() == TABLE_CELL) | 402 || style->display() == TABLE_CELL) |
410 style->setWritingMode(parentStyle->writingMode()); | 403 style->setWritingMode(parentStyle->writingMode()); |
411 | 404 |
412 // FIXME: Since we don't support block-flow on flexible boxes yet, disallow
setting | 405 // FIXME: Since we don't support block-flow on flexible boxes yet, disallow
setting |
413 // of block-flow to anything other than TopToBottomWritingMode. | 406 // of block-flow to anything other than TopToBottomWritingMode. |
414 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. | 407 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. |
415 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 408 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
416 style->setWritingMode(TopToBottomWritingMode); | 409 style->setWritingMode(TopToBottomWritingMode); |
417 | 410 |
418 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { | 411 if (isDisplayFlexibleBox(parentStyle->display()) || isDisplayGridBox(parentS
tyle->display())) { |
419 style->setFloating(NoFloat); | 412 style->setFloating(NoFloat); |
420 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 413 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
421 } | 414 } |
422 } | 415 } |
423 | 416 |
424 } | 417 } |
OLD | NEW |