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