Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBox.h |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h |
| index ee2fb8feb987cb4f8132bf4dcab6fc6016e075c6..a6efc6ed30d2b791376f71ec096bd08eabdfaeef 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.h |
| @@ -1578,9 +1578,8 @@ inline LayoutBox* LayoutBox::parentBox() const { |
| inline LayoutBox* LayoutBox::firstInFlowChildBox() const { |
| LayoutBox* first = firstChildBox(); |
| - while (first && first->isOutOfFlowPositioned()) |
| - first = first->nextInFlowSiblingBox(); |
| - return first; |
| + return !first->isOutOfFlowPositioned() ? first |
| + : first->nextInFlowSiblingBox(); |
|
Manuel Rego
2016/10/19 11:49:55
Don't you need to check if first is not null?
What
|
| } |
| inline LayoutBox* LayoutBox::firstChildBox() const { |