| 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 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1410 // of block-flow to anything other than TopToBottomWritingMode. | 1410 // of block-flow to anything other than TopToBottomWritingMode. |
| 1411 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. | 1411 // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. |
| 1412 if (style->writingMode() != TopToBottomWritingMode && (style->display()
== BOX || style->display() == INLINE_BOX)) | 1412 if (style->writingMode() != TopToBottomWritingMode && (style->display()
== BOX || style->display() == INLINE_BOX)) |
| 1413 style->setWritingMode(TopToBottomWritingMode); | 1413 style->setWritingMode(TopToBottomWritingMode); |
| 1414 | 1414 |
| 1415 if (isDisplayFlexibleBox(parentStyle->display())) { | 1415 if (isDisplayFlexibleBox(parentStyle->display())) { |
| 1416 style->setFloating(NoFloat); | 1416 style->setFloating(NoFloat); |
| 1417 style->setDisplay(equivalentBlockDisplay(style->display(), style->is
Floating(), !document()->inQuirksMode())); | 1417 style->setDisplay(equivalentBlockDisplay(style->display(), style->is
Floating(), !document()->inQuirksMode())); |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 #if ENABLE(DIALOG_ELEMENT) | |
| 1421 // Per the spec, position 'static' and 'relative' in the top layer compu
te to 'absolute'. | 1420 // Per the spec, position 'static' and 'relative' in the top layer compu
te to 'absolute'. |
| 1422 if (e && e->isInTopLayer() && (style->position() == StaticPosition || st
yle->position() == RelativePosition)) { | 1421 if (e && e->isInTopLayer() && (style->position() == StaticPosition || st
yle->position() == RelativePosition)) { |
| 1423 style->setPosition(AbsolutePosition); | 1422 style->setPosition(AbsolutePosition); |
| 1424 style->setDisplay(BLOCK); | 1423 style->setDisplay(BLOCK); |
| 1425 } | 1424 } |
| 1426 #endif | |
| 1427 } | 1425 } |
| 1428 | 1426 |
| 1429 // Make sure our z-index value is only applied if the object is positioned. | 1427 // Make sure our z-index value is only applied if the object is positioned. |
| 1430 if (style->position() == StaticPosition && !isDisplayFlexibleBox(parentStyle
->display())) | 1428 if (style->position() == StaticPosition && !isDisplayFlexibleBox(parentStyle
->display())) |
| 1431 style->setHasAutoZIndex(); | 1429 style->setHasAutoZIndex(); |
| 1432 | 1430 |
| 1433 // Auto z-index becomes 0 for the root element and transparent objects. This
prevents | 1431 // Auto z-index becomes 0 for the root element and transparent objects. This
prevents |
| 1434 // cases where objects that should be blended as a single unit end up with a
non-transparent | 1432 // cases where objects that should be blended as a single unit end up with a
non-transparent |
| 1435 // object wedged in between them. Auto z-index also becomes 0 for objects th
at specify transforms/masks/reflections. | 1433 // object wedged in between them. Auto z-index also becomes 0 for objects th
at specify transforms/masks/reflections. |
| 1436 if (style->hasAutoZIndex() && ((e && e->document()->documentElement() == e) | 1434 if (style->hasAutoZIndex() && ((e && e->document()->documentElement() == e) |
| 1437 || style->opacity() < 1.0f | 1435 || style->opacity() < 1.0f |
| 1438 || style->hasTransformRelatedProperty() | 1436 || style->hasTransformRelatedProperty() |
| 1439 || style->hasMask() | 1437 || style->hasMask() |
| 1440 || style->clipPath() | 1438 || style->clipPath() |
| 1441 || style->boxReflect() | 1439 || style->boxReflect() |
| 1442 || style->hasFilter() | 1440 || style->hasFilter() |
| 1443 || style->hasBlendMode() | 1441 || style->hasBlendMode() |
| 1444 || style->position() == StickyPosition | 1442 || style->position() == StickyPosition |
| 1445 || (style->position() == FixedPosition && e && e->document()->page() &&
e->document()->page()->settings()->fixedPositionCreatesStackingContext()) | 1443 || (style->position() == FixedPosition && e && e->document()->page() &&
e->document()->page()->settings()->fixedPositionCreatesStackingContext()) |
| 1446 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) | 1444 #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) |
| 1447 // Touch overflow scrolling creates a stacking context. | 1445 // Touch overflow scrolling creates a stacking context. |
| 1448 || ((style->overflowX() != OHIDDEN || style->overflowY() != OHIDDEN) &&
style->useTouchOverflowScrolling()) | 1446 || ((style->overflowX() != OHIDDEN || style->overflowY() != OHIDDEN) &&
style->useTouchOverflowScrolling()) |
| 1449 #endif | 1447 #endif |
| 1450 #if ENABLE(DIALOG_ELEMENT) | |
| 1451 || (e && e->isInTopLayer()) | 1448 || (e && e->isInTopLayer()) |
| 1452 #endif | |
| 1453 )) | 1449 )) |
| 1454 style->setZIndex(0); | 1450 style->setZIndex(0); |
| 1455 | 1451 |
| 1456 // Textarea considers overflow visible as auto. | 1452 // Textarea considers overflow visible as auto. |
| 1457 if (e && e->hasTagName(textareaTag)) { | 1453 if (e && e->hasTagName(textareaTag)) { |
| 1458 style->setOverflowX(style->overflowX() == OVISIBLE ? OAUTO : style->over
flowX()); | 1454 style->setOverflowX(style->overflowX() == OVISIBLE ? OAUTO : style->over
flowX()); |
| 1459 style->setOverflowY(style->overflowY() == OVISIBLE ? OAUTO : style->over
flowY()); | 1455 style->setOverflowY(style->overflowY() == OVISIBLE ? OAUTO : style->over
flowY()); |
| 1460 } | 1456 } |
| 1461 | 1457 |
| 1462 if (doesNotInheritTextDecoration(style, e)) | 1458 if (doesNotInheritTextDecoration(style, e)) |
| (...skipping 2977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4440 info.addMember(m_state, "state"); | 4436 info.addMember(m_state, "state"); |
| 4441 | 4437 |
| 4442 // FIXME: move this to a place where it would be called only once? | 4438 // FIXME: move this to a place where it would be called only once? |
| 4443 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); | 4439 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); |
| 4444 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); | 4440 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl
e"); |
| 4445 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle,"defaultPrintStyle")
; | 4441 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle,"defaultPrintStyle")
; |
| 4446 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); | 4442 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo
urceStyle"); |
| 4447 } | 4443 } |
| 4448 | 4444 |
| 4449 } // namespace WebCore | 4445 } // namespace WebCore |
| OLD | NEW |