| 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 // object wedged in between them. Auto z-index also becomes 0 for objects th
at specify transforms/masks/reflections. | 189 // object wedged in between them. Auto z-index also becomes 0 for objects th
at specify transforms/masks/reflections. |
| 190 if (style.hasAutoZIndex() && ((element && element->document().documentElemen
t() == element) | 190 if (style.hasAutoZIndex() && ((element && element->document().documentElemen
t() == element) |
| 191 || style.hasOpacity() | 191 || style.hasOpacity() |
| 192 || style.hasTransformRelatedProperty() | 192 || style.hasTransformRelatedProperty() |
| 193 || style.hasMask() | 193 || style.hasMask() |
| 194 || style.clipPath() | 194 || style.clipPath() |
| 195 || style.boxReflect() | 195 || style.boxReflect() |
| 196 || style.hasFilterInducingProperty() | 196 || style.hasFilterInducingProperty() |
| 197 || style.hasBlendMode() | 197 || style.hasBlendMode() |
| 198 || style.hasIsolation() | 198 || style.hasIsolation() |
| 199 || style.position() == FixedPosition | 199 || style.hasViewportConstrainedPosition() |
| 200 || isInTopLayer(element, style) | 200 || isInTopLayer(element, style) |
| 201 || hasWillChangeThatCreatesStackingContext(style) | 201 || hasWillChangeThatCreatesStackingContext(style) |
| 202 || style.containsPaint())) | 202 || style.containsPaint())) |
| 203 style.setZIndex(0); | 203 style.setZIndex(0); |
| 204 | 204 |
| 205 if (doesNotInheritTextDecoration(style, element)) | 205 if (doesNotInheritTextDecoration(style, element)) |
| 206 style.clearAppliedTextDecorations(); | 206 style.clearAppliedTextDecorations(); |
| 207 | 207 |
| 208 style.applyTextDecorations(); | 208 style.applyTextDecorations(); |
| 209 | 209 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 style.setDisplay(INLINE_BLOCK); | 429 style.setDisplay(INLINE_BLOCK); |
| 430 | 430 |
| 431 // After performing the display mutation, check table rows. We do not honor
position: relative table rows or cells. | 431 // After performing the display mutation, check table rows. We do not honor
position: relative table rows or cells. |
| 432 // This has been established for position: relative in CSS2.1 (and caused a
crash in containingBlock() | 432 // This has been established for position: relative in CSS2.1 (and caused a
crash in containingBlock() |
| 433 // on some sites). | 433 // on some sites). |
| 434 if ((style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW_G
ROUP | 434 if ((style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW_G
ROUP |
| 435 || style.display() == TABLE_FOOTER_GROUP || style.display() == TABLE_ROW
) | 435 || style.display() == TABLE_FOOTER_GROUP || style.display() == TABLE_ROW
) |
| 436 && style.position() == RelativePosition) | 436 && style.position() == RelativePosition) |
| 437 style.setPosition(StaticPosition); | 437 style.setPosition(StaticPosition); |
| 438 | 438 |
| 439 // Cannot support position: sticky for table columns and column groups becau
se current code is only doing |
| 440 // background painting through columns / column groups |
| 441 if ((style.display() == TABLE_COLUMN_GROUP || style.display() == TABLE_COLUM
N) |
| 442 && style.position() == StickyPosition) |
| 443 style.setPosition(StaticPosition); |
| 444 |
| 439 // writing-mode does not apply to table row groups, table column groups, tab
le rows, and table columns. | 445 // writing-mode does not apply to table row groups, table column groups, tab
le rows, and table columns. |
| 440 // FIXME: Table cells should be allowed to be perpendicular or flipped with
respect to the table, though. | 446 // FIXME: Table cells should be allowed to be perpendicular or flipped with
respect to the table, though. |
| 441 if (style.display() == TABLE_COLUMN || style.display() == TABLE_COLUMN_GROUP
|| style.display() == TABLE_FOOTER_GROUP | 447 if (style.display() == TABLE_COLUMN || style.display() == TABLE_COLUMN_GROUP
|| style.display() == TABLE_FOOTER_GROUP |
| 442 || style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW
|| style.display() == TABLE_ROW_GROUP | 448 || style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW
|| style.display() == TABLE_ROW_GROUP |
| 443 || style.display() == TABLE_CELL) | 449 || style.display() == TABLE_CELL) |
| 444 style.setWritingMode(parentStyle.getWritingMode()); | 450 style.setWritingMode(parentStyle.getWritingMode()); |
| 445 | 451 |
| 446 // FIXME: Since we don't support block-flow on flexible boxes yet, disallow
setting | 452 // FIXME: Since we don't support block-flow on flexible boxes yet, disallow
setting |
| 447 // of block-flow to anything other than TopToBottomWritingMode. | 453 // of block-flow to anything other than TopToBottomWritingMode. |
| 448 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. | 454 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. |
| 449 if (style.getWritingMode() != TopToBottomWritingMode && (style.display() ==
BOX || style.display() == INLINE_BOX)) | 455 if (style.getWritingMode() != TopToBottomWritingMode && (style.display() ==
BOX || style.display() == INLINE_BOX)) |
| 450 style.setWritingMode(TopToBottomWritingMode); | 456 style.setWritingMode(TopToBottomWritingMode); |
| 451 | 457 |
| 452 if (parentStyle.isDisplayFlexibleOrGridBox()) { | 458 if (parentStyle.isDisplayFlexibleOrGridBox()) { |
| 453 style.setFloating(NoFloat); | 459 style.setFloating(NoFloat); |
| 454 style.setDisplay(equivalentBlockDisplay(style.display())); | 460 style.setDisplay(equivalentBlockDisplay(style.display())); |
| 455 | 461 |
| 456 // We want to count vertical percentage paddings/margins on flex items b
ecause our current | 462 // We want to count vertical percentage paddings/margins on flex items b
ecause our current |
| 457 // behavior is different from the spec and we want to gather compatibili
ty data. | 463 // behavior is different from the spec and we want to gather compatibili
ty data. |
| 458 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen
t()) | 464 if (style.paddingBefore().hasPercent() || style.paddingAfter().hasPercen
t()) |
| 459 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert
ical); | 465 UseCounter::count(document, UseCounter::FlexboxPercentagePaddingVert
ical); |
| 460 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent(
)) | 466 if (style.marginBefore().hasPercent() || style.marginAfter().hasPercent(
)) |
| 461 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti
cal); | 467 UseCounter::count(document, UseCounter::FlexboxPercentageMarginVerti
cal); |
| 462 } | 468 } |
| 463 } | 469 } |
| 464 | 470 |
| 465 } // namespace blink | 471 } // namespace blink |
| OLD | NEW |