Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: Source/core/dom/Node.h

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/LayoutTreeBuilder.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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. (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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 enum StyleChangeType { 93 enum StyleChangeType {
94 NoStyleChange = 0, 94 NoStyleChange = 0,
95 LocalStyleChange = 1 << nodeStyleChangeShift, 95 LocalStyleChange = 1 << nodeStyleChangeShift,
96 SubtreeStyleChange = 2 << nodeStyleChangeShift, 96 SubtreeStyleChange = 2 << nodeStyleChangeShift,
97 NeedsReattachStyleChange = 3 << nodeStyleChangeShift, 97 NeedsReattachStyleChange = 3 << nodeStyleChangeShift,
98 }; 98 };
99 99
100 class NodeRareDataBase { 100 class NodeRareDataBase {
101 public: 101 public:
102 LayoutObject* renderer() const { return m_layoutObject; } 102 LayoutObject* layoutObject() const { return m_layoutObject; }
103 void setLayoutObject(LayoutObject* layoutObject) { m_layoutObject = layoutOb ject; } 103 void setLayoutObject(LayoutObject* layoutObject) { m_layoutObject = layoutOb ject; }
104 104
105 protected: 105 protected:
106 NodeRareDataBase(LayoutObject* layoutObject) 106 NodeRareDataBase(LayoutObject* layoutObject)
107 : m_layoutObject(layoutObject) 107 : m_layoutObject(layoutObject)
108 { } 108 { }
109 109
110 protected: 110 protected:
111 LayoutObject* m_layoutObject; 111 LayoutObject* m_layoutObject;
112 }; 112 };
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // Number of DOM 16-bit units contained in node. Note that rendered text len gth can be different - e.g. because of 491 // Number of DOM 16-bit units contained in node. Note that rendered text len gth can be different - e.g. because of
492 // css-transform:capitalize breaking up precomposed characters and ligatures . 492 // css-transform:capitalize breaking up precomposed characters and ligatures .
493 virtual int maxCharacterOffset() const; 493 virtual int maxCharacterOffset() const;
494 494
495 // Whether or not a selection can be started in this object 495 // Whether or not a selection can be started in this object
496 virtual bool canStartSelection() const; 496 virtual bool canStartSelection() const;
497 497
498 // ------------------------------------------------------------------------- ---- 498 // ------------------------------------------------------------------------- ----
499 // Integration with rendering tree 499 // Integration with rendering tree
500 500
501 // As renderer() includes a branch you should avoid calling it repeatedly in hot code paths. 501 // As layoutObject() includes a branch you should avoid calling it repeatedl y in hot code paths.
502 // Note that if a Node has a renderer, it's parentNode is guaranteed to have one as well. 502 // Note that if a Node has a renderer, it's parentNode is guaranteed to have one as well.
503 LayoutObject* renderer() const { return hasRareData() ? m_data.m_rareData->r enderer() : m_data.m_layoutObject; }; 503 LayoutObject* layoutObject() const { return hasRareData() ? m_data.m_rareDat a->layoutObject() : m_data.m_layoutObject; };
504 void setLayoutObject(LayoutObject* layoutObject) 504 void setLayoutObject(LayoutObject* layoutObject)
505 { 505 {
506 if (hasRareData()) 506 if (hasRareData())
507 m_data.m_rareData->setLayoutObject(layoutObject); 507 m_data.m_rareData->setLayoutObject(layoutObject);
508 else 508 else
509 m_data.m_layoutObject = layoutObject; 509 m_data.m_layoutObject = layoutObject;
510 } 510 }
511 511
512 // Use these two methods with caution. 512 // Use these two methods with caution.
513 LayoutBox* layoutBox() const; 513 LayoutBox* layoutBox() const;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 } // namespace blink 900 } // namespace blink
901 901
902 #ifndef NDEBUG 902 #ifndef NDEBUG
903 // Outside the WebCore namespace for ease of invocation from gdb. 903 // Outside the WebCore namespace for ease of invocation from gdb.
904 void showNode(const blink::Node*); 904 void showNode(const blink::Node*);
905 void showTree(const blink::Node*); 905 void showTree(const blink::Node*);
906 void showNodePath(const blink::Node*); 906 void showNodePath(const blink::Node*);
907 #endif 907 #endif
908 908
909 #endif // Node_h 909 #endif // Node_h
OLDNEW
« no previous file with comments | « Source/core/dom/LayoutTreeBuilder.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698