Chromium Code Reviews| Index: Source/core/rendering/RenderBox.h |
| diff --git a/Source/core/rendering/RenderBox.h b/Source/core/rendering/RenderBox.h |
| index 0dc27147f21e9d0e97c9cd9a70a68b0612504eb4..012b4dac0a37fe4627ad2006a90d5a322f69ac64 100644 |
| --- a/Source/core/rendering/RenderBox.h |
| +++ b/Source/core/rendering/RenderBox.h |
| @@ -183,7 +183,9 @@ public: |
| // Use this with caution! No type checking is done! |
| RenderBox* previousSiblingBox() const; |
| + RenderBox* previousInFlowSiblingBox() const; |
| RenderBox* nextSiblingBox() const; |
| + RenderBox* nextInFlowSiblingBox() const; |
| RenderBox* parentBox() const; |
| bool canResize() const; |
| @@ -774,11 +776,25 @@ inline RenderBox* RenderBox::previousSiblingBox() const |
| return toRenderBox(previousSibling()); |
| } |
| +inline RenderBox* RenderBox::previousInFlowSiblingBox() const |
| +{ |
| + RenderBox* previous; |
| + for (previous = previousSiblingBox(); previous && previous->isOutOfFlowPositioned(); previous = previous->previousSiblingBox()) { } |
|
Julien - ping for review
2014/11/24 21:44:40
Nit: I prefer 2 lines to abide by Blink's 1 statem
Manuel Rego
2014/12/01 11:10:37
I've changed it for a while,
which probably makes
|
| + return previous; |
| +} |
| + |
| inline RenderBox* RenderBox::nextSiblingBox() const |
| { |
| return toRenderBox(nextSibling()); |
| } |
| +inline RenderBox* RenderBox::nextInFlowSiblingBox() const |
| +{ |
| + RenderBox* next; |
| + for (next = nextSiblingBox(); next && next->isOutOfFlowPositioned(); next = next->nextSiblingBox()) { } |
|
Julien - ping for review
2014/11/24 21:44:40
Ditto.
Manuel Rego
2014/12/01 11:10:37
Acknowledged.
|
| + return next; |
| +} |
| + |
| inline RenderBox* RenderBox::parentBox() const |
| { |
| return toRenderBox(parent()); |