| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 RenderBox::RenderBox(ContainerNode* node) | 98 RenderBox::RenderBox(ContainerNode* node) |
| 99 : RenderBoxModelObject(node) | 99 : RenderBoxModelObject(node) |
| 100 , m_intrinsicContentLogicalHeight(-1) | 100 , m_intrinsicContentLogicalHeight(-1) |
| 101 , m_minPreferredLogicalWidth(-1) | 101 , m_minPreferredLogicalWidth(-1) |
| 102 , m_maxPreferredLogicalWidth(-1) | 102 , m_maxPreferredLogicalWidth(-1) |
| 103 { | 103 { |
| 104 setIsBox(); | 104 setIsBox(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 LayerType RenderBox::layerTypeRequired() const |
| 108 { |
| 109 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since |
| 110 // position:static elements that are not flex-items get their z-index coerce
d to auto. |
| 111 if (isPositioned() || createsGroup() || hasClipPath() || hasTransformRelated
Property() |
| 112 || hasHiddenBackface() || hasReflection() || style()->specifiesColumns() |
| 113 || !style()->hasAutoZIndex() || style()->shouldCompositeForCurrentAnimat
ions()) |
| 114 return NormalLayer; |
| 115 |
| 116 // Ensure that explicit use of scroll-blocks-on creates a RenderLayer (since
we might need |
| 117 // it to be composited). |
| 118 if (style()->hasScrollBlocksOn()) { |
| 119 if (isDocumentElement()) { |
| 120 ASSERT(style()->scrollBlocksOn() == view()->style()->scrollBlocksOn(
)); |
| 121 return NoLayer; |
| 122 } |
| 123 return NormalLayer; |
| 124 } |
| 125 if (hasOverflowClip()) |
| 126 return OverflowClipLayer; |
| 127 |
| 128 return NoLayer; |
| 129 } |
| 130 |
| 107 void RenderBox::willBeRemovedFromTree() | 131 void RenderBox::willBeRemovedFromTree() |
| 108 { | 132 { |
| 109 if (m_rareData && m_rareData->m_spannerPlaceholder) { | 133 if (m_rareData && m_rareData->m_spannerPlaceholder) { |
| 110 m_rareData->m_spannerPlaceholder->spannerWillBeRemoved(); | 134 m_rareData->m_spannerPlaceholder->spannerWillBeRemoved(); |
| 111 m_rareData->m_spannerPlaceholder = 0; | 135 m_rareData->m_spannerPlaceholder = 0; |
| 112 } | 136 } |
| 113 RenderBoxModelObject::willBeRemovedFromTree(); | 137 RenderBoxModelObject::willBeRemovedFromTree(); |
| 114 } | 138 } |
| 115 | 139 |
| 116 void RenderBox::willBeDestroyed() | 140 void RenderBox::willBeDestroyed() |
| (...skipping 4404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4521 computedValues.m_margins.m_end = marginEnd(); | 4545 computedValues.m_margins.m_end = marginEnd(); |
| 4522 | 4546 |
| 4523 setLogicalTop(oldLogicalTop); | 4547 setLogicalTop(oldLogicalTop); |
| 4524 setLogicalWidth(oldLogicalWidth); | 4548 setLogicalWidth(oldLogicalWidth); |
| 4525 setLogicalLeft(oldLogicalLeft); | 4549 setLogicalLeft(oldLogicalLeft); |
| 4526 setMarginLeft(oldMarginLeft); | 4550 setMarginLeft(oldMarginLeft); |
| 4527 setMarginRight(oldMarginRight); | 4551 setMarginRight(oldMarginRight); |
| 4528 } | 4552 } |
| 4529 | 4553 |
| 4530 } // namespace blink | 4554 } // namespace blink |
| OLD | NEW |