| 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 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2187 } | 2187 } |
| 2188 return; | 2188 return; |
| 2189 } | 2189 } |
| 2190 | 2190 |
| 2191 container->mapLocalToAncestor(ancestor, transformState, mode); | 2191 container->mapLocalToAncestor(ancestor, transformState, mode); |
| 2192 } | 2192 } |
| 2193 | 2193 |
| 2194 const LayoutObject* LayoutObject::pushMappingToContainer( | 2194 const LayoutObject* LayoutObject::pushMappingToContainer( |
| 2195 const LayoutBoxModelObject* ancestorToStopAt, | 2195 const LayoutBoxModelObject* ancestorToStopAt, |
| 2196 LayoutGeometryMap& geometryMap) const { | 2196 LayoutGeometryMap& geometryMap) const { |
| 2197 ASSERT_NOT_REACHED(); | 2197 NOTREACHED(); |
| 2198 return nullptr; | 2198 return nullptr; |
| 2199 } | 2199 } |
| 2200 | 2200 |
| 2201 void LayoutObject::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, | 2201 void LayoutObject::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, |
| 2202 TransformState& transformState, | 2202 TransformState& transformState, |
| 2203 MapCoordinatesFlags mode) const { | 2203 MapCoordinatesFlags mode) const { |
| 2204 if (this == ancestor) | 2204 if (this == ancestor) |
| 2205 return; | 2205 return; |
| 2206 | 2206 |
| 2207 AncestorSkipInfo skipInfo(ancestor); | 2207 AncestorSkipInfo skipInfo(ancestor); |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3385 return FloatRect(); | 3385 return FloatRect(); |
| 3386 } | 3386 } |
| 3387 | 3387 |
| 3388 AffineTransform LayoutObject::localSVGTransform() const { | 3388 AffineTransform LayoutObject::localSVGTransform() const { |
| 3389 return AffineTransform(); | 3389 return AffineTransform(); |
| 3390 } | 3390 } |
| 3391 | 3391 |
| 3392 bool LayoutObject::nodeAtFloatPoint(HitTestResult&, | 3392 bool LayoutObject::nodeAtFloatPoint(HitTestResult&, |
| 3393 const FloatPoint&, | 3393 const FloatPoint&, |
| 3394 HitTestAction) { | 3394 HitTestAction) { |
| 3395 ASSERT_NOT_REACHED(); | 3395 NOTREACHED(); |
| 3396 return false; | 3396 return false; |
| 3397 } | 3397 } |
| 3398 | 3398 |
| 3399 bool LayoutObject::isRelayoutBoundaryForInspector() const { | 3399 bool LayoutObject::isRelayoutBoundaryForInspector() const { |
| 3400 return objectIsRelayoutBoundary(this); | 3400 return objectIsRelayoutBoundary(this); |
| 3401 } | 3401 } |
| 3402 | 3402 |
| 3403 static PaintInvalidationReason documentLifecycleBasedPaintInvalidationReason( | 3403 static PaintInvalidationReason documentLifecycleBasedPaintInvalidationReason( |
| 3404 const DocumentLifecycle& documentLifecycle) { | 3404 const DocumentLifecycle& documentLifecycle) { |
| 3405 switch (documentLifecycle.state()) { | 3405 switch (documentLifecycle.state()) { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3645 const blink::LayoutObject* root = object1; | 3645 const blink::LayoutObject* root = object1; |
| 3646 while (root->parent()) | 3646 while (root->parent()) |
| 3647 root = root->parent(); | 3647 root = root->parent(); |
| 3648 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3648 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3649 } else { | 3649 } else { |
| 3650 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3650 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
| 3651 } | 3651 } |
| 3652 } | 3652 } |
| 3653 | 3653 |
| 3654 #endif | 3654 #endif |
| OLD | NEW |