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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTextFragment.cpp

Issue 2405633002: Reformat comments in core/layout (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 UChar LayoutTextFragment::previousCharacter() const { 114 UChar LayoutTextFragment::previousCharacter() const {
115 if (start()) { 115 if (start()) {
116 StringImpl* original = completeText().get(); 116 StringImpl* original = completeText().get();
117 if (original && start() <= original->length()) 117 if (original && start() <= original->length())
118 return (*original)[start() - 1]; 118 return (*original)[start() - 1];
119 } 119 }
120 120
121 return LayoutText::previousCharacter(); 121 return LayoutText::previousCharacter();
122 } 122 }
123 123
124 // If this is the layoutObject for a first-letter pseudoNode then we have to loo k 124 // If this is the layoutObject for a first-letter pseudoNode then we have to
125 // at the node for the remaining text to find our content. 125 // look at the node for the remaining text to find our content.
126 Text* LayoutTextFragment::associatedTextNode() const { 126 Text* LayoutTextFragment::associatedTextNode() const {
127 Node* node = this->firstLetterPseudoElement(); 127 Node* node = this->firstLetterPseudoElement();
128 if (m_isRemainingTextLayoutObject || !node) { 128 if (m_isRemainingTextLayoutObject || !node) {
129 // If we don't have a node, then we aren't part of a first-letter pseudo 129 // If we don't have a node, then we aren't part of a first-letter pseudo
130 // element, so use the actual node. Likewise, if we have a node, but 130 // element, so use the actual node. Likewise, if we have a node, but
131 // we're the remainingTextLayoutObject for a pseudo element use the real 131 // we're the remainingTextLayoutObject for a pseudo element use the real
132 // text node. 132 // text node.
133 node = this->node(); 133 node = this->node();
134 } 134 }
135 135
(...skipping 19 matching lines...) Expand all
155 LayoutObject::updateHitTestResult(result, point); 155 LayoutObject::updateHitTestResult(result, point);
156 156
157 // If we aren't part of a first-letter element, or if we 157 // If we aren't part of a first-letter element, or if we
158 // are part of first-letter but we're the remaining text then return. 158 // are part of first-letter but we're the remaining text then return.
159 if (m_isRemainingTextLayoutObject || !firstLetterPseudoElement()) 159 if (m_isRemainingTextLayoutObject || !firstLetterPseudoElement())
160 return; 160 return;
161 result.setInnerNode(firstLetterPseudoElement()); 161 result.setInnerNode(firstLetterPseudoElement());
162 } 162 }
163 163
164 } // namespace blink 164 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTextFragment.h ('k') | third_party/WebKit/Source/core/layout/LayoutTextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698