| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #include "core/rendering/style/RenderStyleConstants.h" | 49 #include "core/rendering/style/RenderStyleConstants.h" |
| 50 #include "core/svg/SVGSVGElement.h" | 50 #include "core/svg/SVGSVGElement.h" |
| 51 #include "platform/Length.h" | 51 #include "platform/Length.h" |
| 52 #include "platform/transforms/TransformOperations.h" | 52 #include "platform/transforms/TransformOperations.h" |
| 53 #include "wtf/Assertions.h" | 53 #include "wtf/Assertions.h" |
| 54 | 54 |
| 55 namespace blink { | 55 namespace blink { |
| 56 | 56 |
| 57 using namespace HTMLNames; | 57 using namespace HTMLNames; |
| 58 | 58 |
| 59 // FIXME: This is duplicated with StyleResolver.cpp | |
| 60 // Perhaps this should move onto ElementResolveContext or even Element? | |
| 61 static inline bool isAtShadowBoundary(const Element* element) | |
| 62 { | |
| 63 if (!element) | |
| 64 return false; | |
| 65 ContainerNode* parentNode = element->parentNode(); | |
| 66 return parentNode && parentNode->isShadowRoot(); | |
| 67 } | |
| 68 | |
| 69 | |
| 70 static EDisplay equivalentBlockDisplay(EDisplay display, bool isFloating, bool s
trictParsing) | 59 static EDisplay equivalentBlockDisplay(EDisplay display, bool isFloating, bool s
trictParsing) |
| 71 { | 60 { |
| 72 switch (display) { | 61 switch (display) { |
| 73 case BLOCK: | 62 case BLOCK: |
| 74 case TABLE: | 63 case TABLE: |
| 75 case BOX: | 64 case BOX: |
| 76 case FLEX: | 65 case FLEX: |
| 77 case GRID: | 66 case GRID: |
| 78 return display; | 67 return display; |
| 79 | 68 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) | 449 if (style->writingMode() != TopToBottomWritingMode && (style->display() == B
OX || style->display() == INLINE_BOX)) |
| 461 style->setWritingMode(TopToBottomWritingMode); | 450 style->setWritingMode(TopToBottomWritingMode); |
| 462 | 451 |
| 463 if (parentStyle->isDisplayFlexibleOrGridBox()) { | 452 if (parentStyle->isDisplayFlexibleOrGridBox()) { |
| 464 style->setFloating(NoFloat); | 453 style->setFloating(NoFloat); |
| 465 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); | 454 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloa
ting(), !m_useQuirksModeStyles)); |
| 466 } | 455 } |
| 467 } | 456 } |
| 468 | 457 |
| 469 } | 458 } |
| OLD | NEW |