OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 Node* next(const Node& node, const Node* stayWithin) | 221 Node* next(const Node& node, const Node* stayWithin) |
222 { | 222 { |
223 if (Node* child = pseudoAwareFirstChild(node)) | 223 if (Node* child = pseudoAwareFirstChild(node)) |
224 return child; | 224 return child; |
225 return nextSkippingChildren(node, stayWithin); | 225 return nextSkippingChildren(node, stayWithin); |
226 } | 226 } |
227 | 227 |
228 LayoutObject* nextSiblingRenderer(const Node& node) | 228 LayoutObject* nextSiblingRenderer(const Node& node) |
229 { | 229 { |
230 for (Node* sibling = NodeRenderingTraversal::nextSibling(node); sibling; sib ling = NodeRenderingTraversal::nextSibling(*sibling)) { | 230 for (Node* sibling = NodeRenderingTraversal::nextSibling(node); sibling; sib ling = NodeRenderingTraversal::nextSibling(*sibling)) { |
231 LayoutObject* renderer = sibling->renderer(); | 231 LayoutObject* renderer = sibling->layoutObject(); |
Julien - ping for review
2015/03/05 16:19:16
Ditto.
| |
232 if (renderer && !isRendererReparented(renderer)) | 232 if (renderer && !isRendererReparented(renderer)) |
233 return renderer; | 233 return renderer; |
234 } | 234 } |
235 return 0; | 235 return 0; |
236 } | 236 } |
237 | 237 |
238 LayoutObject* previousSiblingRenderer(const Node& node) | 238 LayoutObject* previousSiblingRenderer(const Node& node) |
239 { | 239 { |
240 for (Node* sibling = NodeRenderingTraversal::previousSibling(node); sibling; sibling = NodeRenderingTraversal::previousSibling(*sibling)) { | 240 for (Node* sibling = NodeRenderingTraversal::previousSibling(node); sibling; sibling = NodeRenderingTraversal::previousSibling(*sibling)) { |
241 LayoutObject* renderer = sibling->renderer(); | 241 LayoutObject* renderer = sibling->layoutObject(); |
Julien - ping for review
2015/03/05 16:19:16
Ditto.
| |
242 if (renderer && !isRendererReparented(renderer)) | 242 if (renderer && !isRendererReparented(renderer)) |
243 return renderer; | 243 return renderer; |
244 } | 244 } |
245 return 0; | 245 return 0; |
246 } | 246 } |
247 | 247 |
248 LayoutObject* nextInTopLayer(const Element& element) | 248 LayoutObject* nextInTopLayer(const Element& element) |
249 { | 249 { |
250 if (!element.isInTopLayer()) | 250 if (!element.isInTopLayer()) |
251 return 0; | 251 return 0; |
252 const WillBeHeapVector<RefPtrWillBeMember<Element> >& topLayerElements = ele ment.document().topLayerElements(); | 252 const WillBeHeapVector<RefPtrWillBeMember<Element> >& topLayerElements = ele ment.document().topLayerElements(); |
253 size_t position = topLayerElements.find(&element); | 253 size_t position = topLayerElements.find(&element); |
254 ASSERT(position != kNotFound); | 254 ASSERT(position != kNotFound); |
255 for (size_t i = position + 1; i < topLayerElements.size(); ++i) { | 255 for (size_t i = position + 1; i < topLayerElements.size(); ++i) { |
256 if (LayoutObject* renderer = topLayerElements[i]->renderer()) | 256 if (LayoutObject* renderer = topLayerElements[i]->layoutObject()) |
Julien - ping for review
2015/03/05 16:19:16
Ditto.
| |
257 return renderer; | 257 return renderer; |
258 } | 258 } |
259 return 0; | 259 return 0; |
260 } | 260 } |
261 | 261 |
262 } | 262 } |
263 | 263 |
264 } // namespace | 264 } // namespace |
OLD | NEW |