OLD | NEW |
---|---|
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 Loading... | |
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->isOutOfFlowPositioned() ? first |
1582 first = first->nextInFlowSiblingBox(); | 1582 : first->nextInFlowSiblingBox(); |
Manuel Rego
2016/10/19 11:49:55
Don't you need to check if first is not null?
What
| |
1583 return first; | |
1584 } | 1583 } |
1585 | 1584 |
1586 inline LayoutBox* LayoutBox::firstChildBox() const { | 1585 inline LayoutBox* LayoutBox::firstChildBox() const { |
1587 return toLayoutBox(slowFirstChild()); | 1586 return toLayoutBox(slowFirstChild()); |
1588 } | 1587 } |
1589 | 1588 |
1590 inline LayoutBox* LayoutBox::lastChildBox() const { | 1589 inline LayoutBox* LayoutBox::lastChildBox() const { |
1591 return toLayoutBox(slowLastChild()); | 1590 return toLayoutBox(slowLastChild()); |
1592 } | 1591 } |
1593 | 1592 |
(...skipping 27 matching lines...) Expand all Loading... | |
1621 | 1620 |
1622 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { | 1621 inline bool LayoutBox::isForcedFragmentainerBreakValue(EBreak breakValue) { |
1623 return breakValue == BreakColumn || breakValue == BreakLeft || | 1622 return breakValue == BreakColumn || breakValue == BreakLeft || |
1624 breakValue == BreakPage || breakValue == BreakRecto || | 1623 breakValue == BreakPage || breakValue == BreakRecto || |
1625 breakValue == BreakRight || breakValue == BreakVerso; | 1624 breakValue == BreakRight || breakValue == BreakVerso; |
1626 } | 1625 } |
1627 | 1626 |
1628 } // namespace blink | 1627 } // namespace blink |
1629 | 1628 |
1630 #endif // LayoutBox_h | 1629 #endif // LayoutBox_h |
OLD | NEW |