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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 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 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 next = next->nextSiblingBox(); 1571 next = next->nextSiblingBox();
1572 return next; 1572 return next;
1573 } 1573 }
1574 1574
1575 inline LayoutBox* LayoutBox::parentBox() const { 1575 inline LayoutBox* LayoutBox::parentBox() const {
1576 return toLayoutBox(parent()); 1576 return toLayoutBox(parent());
1577 } 1577 }
1578 1578
1579 inline LayoutBox* LayoutBox::firstInFlowChildBox() const { 1579 inline LayoutBox* LayoutBox::firstInFlowChildBox() const {
1580 LayoutBox* first = firstChildBox(); 1580 LayoutBox* first = firstChildBox();
1581 while (first && first->isOutOfFlowPositioned()) 1581 return (first && first->isOutOfFlowPositioned())
1582 first = first->nextInFlowSiblingBox(); 1582 ? first->nextInFlowSiblingBox()
1583 return first; 1583 : first;
1584 } 1584 }
1585 1585
1586 inline LayoutBox* LayoutBox::firstChildBox() const { 1586 inline LayoutBox* LayoutBox::firstChildBox() const {
1587 return toLayoutBox(slowFirstChild()); 1587 return toLayoutBox(slowFirstChild());
1588 } 1588 }
1589 1589
1590 inline LayoutBox* LayoutBox::lastChildBox() const { 1590 inline LayoutBox* LayoutBox::lastChildBox() const {
1591 return toLayoutBox(slowLastChild()); 1591 return toLayoutBox(slowLastChild());
1592 } 1592 }
1593 1593
(...skipping 27 matching lines...) Expand all
1621 1621
1622 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { 1622 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) {
1623 return breakValue == BreakColumn || breakValue == BreakLeft || 1623 return breakValue == BreakColumn || breakValue == BreakLeft ||
1624 breakValue == BreakPage || breakValue == BreakRecto || 1624 breakValue == BreakPage || breakValue == BreakRecto ||
1625 breakValue == BreakRight || breakValue == BreakVerso; 1625 breakValue == BreakRight || breakValue == BreakVerso;
1626 } 1626 }
1627 1627
1628 } // namespace blink 1628 } // namespace blink
1629 1629
1630 #endif // LayoutBox_h 1630 #endif // LayoutBox_h
OLDNEW
« 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