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, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 virtual bool canStartSelection() const; | 518 virtual bool canStartSelection() const; |
519 | 519 |
520 // Getting points into and out of screen space | 520 // Getting points into and out of screen space |
521 FloatPoint convertToPage(const FloatPoint&) const; | 521 FloatPoint convertToPage(const FloatPoint&) const; |
522 FloatPoint convertFromPage(const FloatPoint&) const; | 522 FloatPoint convertFromPage(const FloatPoint&) const; |
523 | 523 |
524 // -------------------------------------------------------------------------
---- | 524 // -------------------------------------------------------------------------
---- |
525 // Integration with rendering tree | 525 // Integration with rendering tree |
526 | 526 |
527 // As renderer() includes a branch you should avoid calling it repeatedly in
hot code paths. | 527 // As renderer() includes a branch you should avoid calling it repeatedly in
hot code paths. |
| 528 // Note that if a Node has a renderer, it's parentNode is guaranteed to have
one as well. |
528 RenderObject* renderer() const { return hasRareData() ? m_data.m_rareData->r
enderer() : m_data.m_renderer; }; | 529 RenderObject* renderer() const { return hasRareData() ? m_data.m_rareData->r
enderer() : m_data.m_renderer; }; |
529 void setRenderer(RenderObject* renderer) | 530 void setRenderer(RenderObject* renderer) |
530 { | 531 { |
531 if (hasRareData()) | 532 if (hasRareData()) |
532 m_data.m_rareData->setRenderer(renderer); | 533 m_data.m_rareData->setRenderer(renderer); |
533 else | 534 else |
534 m_data.m_renderer = renderer; | 535 m_data.m_renderer = renderer; |
535 } | 536 } |
536 bool hasRenderer() const { return renderer(); } | 537 bool hasRenderer() const { return renderer(); } |
537 | 538 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 | 953 |
953 } // namespace WebCore | 954 } // namespace WebCore |
954 | 955 |
955 #ifndef NDEBUG | 956 #ifndef NDEBUG |
956 // Outside the WebCore namespace for ease of invocation from gdb. | 957 // Outside the WebCore namespace for ease of invocation from gdb. |
957 void showTree(const WebCore::Node*); | 958 void showTree(const WebCore::Node*); |
958 void showNodePath(const WebCore::Node*); | 959 void showNodePath(const WebCore::Node*); |
959 #endif | 960 #endif |
960 | 961 |
961 #endif | 962 #endif |
OLD | NEW |