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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
7 * (http://www.torchmobile.com/) | 7 * (http://www.torchmobile.com/) |
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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 // Integration with layout tree | 559 // Integration with layout tree |
560 | 560 |
561 // As layoutObject() includes a branch you should avoid calling it repeatedly | 561 // As layoutObject() includes a branch you should avoid calling it repeatedly |
562 // in hot code paths. | 562 // in hot code paths. |
563 // Note that if a Node has a layoutObject, it's parentNode is guaranteed to | 563 // Note that if a Node has a layoutObject, it's parentNode is guaranteed to |
564 // have one as well. | 564 // have one as well. |
565 LayoutObject* layoutObject() const { | 565 LayoutObject* layoutObject() const { |
566 return hasRareData() ? m_data.m_rareData->layoutObject() | 566 return hasRareData() ? m_data.m_rareData->layoutObject() |
567 : m_data.m_layoutObject; | 567 : m_data.m_layoutObject; |
568 } | 568 } |
569 void setLayoutObject(LayoutObject* layoutObject) { | 569 virtual void setLayoutObject(LayoutObject* layoutObject) { |
570 if (hasRareData()) | 570 if (hasRareData()) |
571 m_data.m_rareData->setLayoutObject(layoutObject); | 571 m_data.m_rareData->setLayoutObject(layoutObject); |
572 else | 572 else |
573 m_data.m_layoutObject = layoutObject; | 573 m_data.m_layoutObject = layoutObject; |
574 } | 574 } |
575 | 575 |
576 // Use these two methods with caution. | 576 // Use these two methods with caution. |
577 LayoutBox* layoutBox() const; | 577 LayoutBox* layoutBox() const; |
578 LayoutBoxModelObject* layoutBoxModelObject() const; | 578 LayoutBoxModelObject* layoutBoxModelObject() const; |
579 | 579 |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 } // namespace blink | 1017 } // namespace blink |
1018 | 1018 |
1019 #ifndef NDEBUG | 1019 #ifndef NDEBUG |
1020 // Outside the WebCore namespace for ease of invocation from gdb. | 1020 // Outside the WebCore namespace for ease of invocation from gdb. |
1021 void showNode(const blink::Node*); | 1021 void showNode(const blink::Node*); |
1022 void showTree(const blink::Node*); | 1022 void showTree(const blink::Node*); |
1023 void showNodePath(const blink::Node*); | 1023 void showNodePath(const blink::Node*); |
1024 #endif | 1024 #endif |
1025 | 1025 |
1026 #endif // Node_h | 1026 #endif // Node_h |
OLD | NEW |