OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 } | 882 } |
883 bool isColumnSpanAll() const { | 883 bool isColumnSpanAll() const { |
884 return style()->getColumnSpan() == ColumnSpanAll && spannerPlaceholder(); | 884 return style()->getColumnSpan() == ColumnSpanAll && spannerPlaceholder(); |
885 } | 885 } |
886 | 886 |
887 // We include isLayoutButton() in this check, because buttons are | 887 // We include isLayoutButton() in this check, because buttons are |
888 // implemented using flex box but should still support things like | 888 // implemented using flex box but should still support things like |
889 // first-line, first-letter and text-overflow. | 889 // first-line, first-letter and text-overflow. |
890 // The flex box and grid specs require that flex box and grid do not | 890 // The flex box and grid specs require that flex box and grid do not |
891 // support first-line|first-letter, though. | 891 // support first-line|first-letter, though. |
| 892 // When LayoutObject and display do not agree, allow first-line|first-letter |
| 893 // only when both indicate it's a block container. |
892 // TODO(cbiesinger): Remove when buttons are implemented with align-items | 894 // TODO(cbiesinger): Remove when buttons are implemented with align-items |
893 // instead of flex box. crbug.com/226252. | 895 // instead of flex box. crbug.com/226252. |
894 bool behavesLikeBlockContainer() const { | 896 bool behavesLikeBlockContainer() const { |
895 return isLayoutBlockFlow() || isLayoutButton(); | 897 return (isLayoutBlockFlow() && style()->isDisplayBlockContainer()) || |
| 898 isLayoutButton(); |
896 } | 899 } |
897 | 900 |
898 // May be optionally passed to container() and various other similar methods | 901 // May be optionally passed to container() and various other similar methods |
899 // that search the ancestry for some sort of containing block. Used to | 902 // that search the ancestry for some sort of containing block. Used to |
900 // determine if we skipped certain objects while walking the ancestry. | 903 // determine if we skipped certain objects while walking the ancestry. |
901 class AncestorSkipInfo { | 904 class AncestorSkipInfo { |
902 public: | 905 public: |
903 AncestorSkipInfo(const LayoutObject* ancestor, bool checkForFilters = false) | 906 AncestorSkipInfo(const LayoutObject* ancestor, bool checkForFilters = false) |
904 : m_ancestor(ancestor), m_checkForFilters(checkForFilters) {} | 907 : m_ancestor(ancestor), m_checkForFilters(checkForFilters) {} |
905 | 908 |
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2711 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2714 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
2712 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2715 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
2713 // We don't make object2 an optional parameter so that showLayoutTree | 2716 // We don't make object2 an optional parameter so that showLayoutTree |
2714 // can be called from gdb easily. | 2717 // can be called from gdb easily. |
2715 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2718 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
2716 const blink::LayoutObject* object2); | 2719 const blink::LayoutObject* object2); |
2717 | 2720 |
2718 #endif | 2721 #endif |
2719 | 2722 |
2720 #endif // LayoutObject_h | 2723 #endif // LayoutObject_h |
OLD | NEW |