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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

Issue 2439483002: Simplifiying the firstInFlowChildBox function (Closed)
Patch Set: Patch 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ed087e6f277f87db0e4e01b6940e59f6aafaa062 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -1578,9 +1578,9 @@ inline LayoutBox* LayoutBox::parentBox() const {
inline LayoutBox* LayoutBox::firstInFlowChildBox() const {
LayoutBox* first = firstChildBox();
- while (first && first->isOutOfFlowPositioned())
- first = first->nextInFlowSiblingBox();
- return first;
+ return (first && first->isOutOfFlowPositioned())
+ ? first->nextInFlowSiblingBox()
+ : first;
}
inline LayoutBox* LayoutBox::firstChildBox() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698