| 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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 case EDisplay::kWebkitInlineBox: | 207 case EDisplay::kWebkitInlineBox: |
| 208 return new LayoutDeprecatedFlexibleBox(*element); | 208 return new LayoutDeprecatedFlexibleBox(*element); |
| 209 case EDisplay::kFlex: | 209 case EDisplay::kFlex: |
| 210 case EDisplay::kInlineFlex: | 210 case EDisplay::kInlineFlex: |
| 211 return new LayoutFlexibleBox(element); | 211 return new LayoutFlexibleBox(element); |
| 212 case EDisplay::kGrid: | 212 case EDisplay::kGrid: |
| 213 case EDisplay::kInlineGrid: | 213 case EDisplay::kInlineGrid: |
| 214 return new LayoutGrid(element); | 214 return new LayoutGrid(element); |
| 215 } | 215 } |
| 216 | 216 |
| 217 ASSERT_NOT_REACHED(); | 217 NOTREACHED(); |
| 218 return nullptr; | 218 return nullptr; |
| 219 } | 219 } |
| 220 | 220 |
| 221 LayoutObject::LayoutObject(Node* node) | 221 LayoutObject::LayoutObject(Node* node) |
| 222 : m_style(nullptr), | 222 : m_style(nullptr), |
| 223 m_node(node), | 223 m_node(node), |
| 224 m_parent(nullptr), | 224 m_parent(nullptr), |
| 225 m_previous(nullptr), | 225 m_previous(nullptr), |
| 226 m_next(nullptr), | 226 m_next(nullptr), |
| 227 #if DCHECK_IS_ON() | 227 #if DCHECK_IS_ON() |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 } | 645 } |
| 646 | 646 |
| 647 LayoutBox* LayoutObject::enclosingBox() const { | 647 LayoutBox* LayoutObject::enclosingBox() const { |
| 648 LayoutObject* curr = const_cast<LayoutObject*>(this); | 648 LayoutObject* curr = const_cast<LayoutObject*>(this); |
| 649 while (curr) { | 649 while (curr) { |
| 650 if (curr->isBox()) | 650 if (curr->isBox()) |
| 651 return toLayoutBox(curr); | 651 return toLayoutBox(curr); |
| 652 curr = curr->parent(); | 652 curr = curr->parent(); |
| 653 } | 653 } |
| 654 | 654 |
| 655 ASSERT_NOT_REACHED(); | 655 NOTREACHED(); |
| 656 return nullptr; | 656 return nullptr; |
| 657 } | 657 } |
| 658 | 658 |
| 659 LayoutBoxModelObject* LayoutObject::enclosingBoxModelObject() const { | 659 LayoutBoxModelObject* LayoutObject::enclosingBoxModelObject() const { |
| 660 LayoutObject* curr = const_cast<LayoutObject*>(this); | 660 LayoutObject* curr = const_cast<LayoutObject*>(this); |
| 661 while (curr) { | 661 while (curr) { |
| 662 if (curr->isBoxModelObject()) | 662 if (curr->isBoxModelObject()) |
| 663 return toLayoutBoxModelObject(curr); | 663 return toLayoutBoxModelObject(curr); |
| 664 curr = curr->parent(); | 664 curr = curr->parent(); |
| 665 } | 665 } |
| 666 | 666 |
| 667 ASSERT_NOT_REACHED(); | 667 NOTREACHED(); |
| 668 return nullptr; | 668 return nullptr; |
| 669 } | 669 } |
| 670 | 670 |
| 671 LayoutBox* LayoutObject::enclosingScrollableBox() const { | 671 LayoutBox* LayoutObject::enclosingScrollableBox() const { |
| 672 for (LayoutObject* ancestor = parent(); ancestor; | 672 for (LayoutObject* ancestor = parent(); ancestor; |
| 673 ancestor = ancestor->parent()) { | 673 ancestor = ancestor->parent()) { |
| 674 if (!ancestor->isBox()) | 674 if (!ancestor->isBox()) |
| 675 continue; | 675 continue; |
| 676 | 676 |
| 677 LayoutBox* ancestorBox = toLayoutBox(ancestor); | 677 LayoutBox* ancestorBox = toLayoutBox(ancestor); |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2176 } | 2176 } |
| 2177 return; | 2177 return; |
| 2178 } | 2178 } |
| 2179 | 2179 |
| 2180 container->mapLocalToAncestor(ancestor, transformState, mode); | 2180 container->mapLocalToAncestor(ancestor, transformState, mode); |
| 2181 } | 2181 } |
| 2182 | 2182 |
| 2183 const LayoutObject* LayoutObject::pushMappingToContainer( | 2183 const LayoutObject* LayoutObject::pushMappingToContainer( |
| 2184 const LayoutBoxModelObject* ancestorToStopAt, | 2184 const LayoutBoxModelObject* ancestorToStopAt, |
| 2185 LayoutGeometryMap& geometryMap) const { | 2185 LayoutGeometryMap& geometryMap) const { |
| 2186 ASSERT_NOT_REACHED(); | 2186 NOTREACHED(); |
| 2187 return nullptr; | 2187 return nullptr; |
| 2188 } | 2188 } |
| 2189 | 2189 |
| 2190 void LayoutObject::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, | 2190 void LayoutObject::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, |
| 2191 TransformState& transformState, | 2191 TransformState& transformState, |
| 2192 MapCoordinatesFlags mode) const { | 2192 MapCoordinatesFlags mode) const { |
| 2193 if (this == ancestor) | 2193 if (this == ancestor) |
| 2194 return; | 2194 return; |
| 2195 | 2195 |
| 2196 AncestorSkipInfo skipInfo(ancestor); | 2196 AncestorSkipInfo skipInfo(ancestor); |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3374 return FloatRect(); | 3374 return FloatRect(); |
| 3375 } | 3375 } |
| 3376 | 3376 |
| 3377 AffineTransform LayoutObject::localSVGTransform() const { | 3377 AffineTransform LayoutObject::localSVGTransform() const { |
| 3378 return AffineTransform(); | 3378 return AffineTransform(); |
| 3379 } | 3379 } |
| 3380 | 3380 |
| 3381 bool LayoutObject::nodeAtFloatPoint(HitTestResult&, | 3381 bool LayoutObject::nodeAtFloatPoint(HitTestResult&, |
| 3382 const FloatPoint&, | 3382 const FloatPoint&, |
| 3383 HitTestAction) { | 3383 HitTestAction) { |
| 3384 ASSERT_NOT_REACHED(); | 3384 NOTREACHED(); |
| 3385 return false; | 3385 return false; |
| 3386 } | 3386 } |
| 3387 | 3387 |
| 3388 bool LayoutObject::isRelayoutBoundaryForInspector() const { | 3388 bool LayoutObject::isRelayoutBoundaryForInspector() const { |
| 3389 return objectIsRelayoutBoundary(this); | 3389 return objectIsRelayoutBoundary(this); |
| 3390 } | 3390 } |
| 3391 | 3391 |
| 3392 static PaintInvalidationReason documentLifecycleBasedPaintInvalidationReason( | 3392 static PaintInvalidationReason documentLifecycleBasedPaintInvalidationReason( |
| 3393 const DocumentLifecycle& documentLifecycle) { | 3393 const DocumentLifecycle& documentLifecycle) { |
| 3394 switch (documentLifecycle.state()) { | 3394 switch (documentLifecycle.state()) { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3597 const blink::LayoutObject* root = object1; | 3597 const blink::LayoutObject* root = object1; |
| 3598 while (root->parent()) | 3598 while (root->parent()) |
| 3599 root = root->parent(); | 3599 root = root->parent(); |
| 3600 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3600 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3601 } else { | 3601 } else { |
| 3602 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3602 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3603 } | 3603 } |
| 3604 } | 3604 } |
| 3605 | 3605 |
| 3606 #endif | 3606 #endif |
| OLD | NEW |