| 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. All r
ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 // rest of the layout tree will move to a similar model. | 628 // rest of the layout tree will move to a similar model. |
| 629 virtual bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParen
t, HitTestAction); | 629 virtual bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParen
t, HitTestAction); |
| 630 | 630 |
| 631 bool isAnonymous() const { return m_bitfields.isAnonymous(); } | 631 bool isAnonymous() const { return m_bitfields.isAnonymous(); } |
| 632 bool isAnonymousBlock() const | 632 bool isAnonymousBlock() const |
| 633 { | 633 { |
| 634 // This function is kept in sync with anonymous block creation condition
s in | 634 // This function is kept in sync with anonymous block creation condition
s in |
| 635 // LayoutBlock::createAnonymousBlock(). This includes creating an anonym
ous | 635 // LayoutBlock::createAnonymousBlock(). This includes creating an anonym
ous |
| 636 // LayoutBlock having a BLOCK or BOX display. Other classes such as Layo
utTextFragment | 636 // LayoutBlock having a BLOCK or BOX display. Other classes such as Layo
utTextFragment |
| 637 // are not LayoutBlocks and will return false. See https://bugs.webkit.o
rg/show_bug.cgi?id=56709. | 637 // are not LayoutBlocks and will return false. See https://bugs.webkit.o
rg/show_bug.cgi?id=56709. |
| 638 return isAnonymous() && (style()->display() == BLOCK || style()->display
() == BOX) && style()->styleType() == NOPSEUDO && isLayoutBlock() && !isListMark
er() && !isLayoutFlowThread() && !isLayoutMultiColumnSet() | 638 return isAnonymous() && (style()->display() == BLOCK || style()->display
() == BOX) && style()->styleType() == PseudoIdNone && isLayoutBlock() && !isList
Marker() && !isLayoutFlowThread() && !isLayoutMultiColumnSet() |
| 639 && !isLayoutFullScreen() | 639 && !isLayoutFullScreen() |
| 640 && !isLayoutFullScreenPlaceholder(); | 640 && !isLayoutFullScreenPlaceholder(); |
| 641 } | 641 } |
| 642 bool isElementContinuation() const { return node() && node()->layoutObject()
!= this; } | 642 bool isElementContinuation() const { return node() && node()->layoutObject()
!= this; } |
| 643 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } | 643 bool isInlineElementContinuation() const { return isElementContinuation() &&
isInline(); } |
| 644 virtual LayoutBoxModelObject* virtualContinuation() const { return nullptr;
} | 644 virtual LayoutBoxModelObject* virtualContinuation() const { return nullptr;
} |
| 645 | 645 |
| 646 bool isFloating() const { return m_bitfields.floating(); } | 646 bool isFloating() const { return m_bitfields.floating(); } |
| 647 | 647 |
| 648 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione
d(); } // absolute or fixed positioning | 648 bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositione
d(); } // absolute or fixed positioning |
| (...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1948 // Allow equality comparisons of LayoutObjects by reference or pointer, intercha
ngeably. | 1948 // Allow equality comparisons of LayoutObjects by reference or pointer, intercha
ngeably. |
| 1949 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(LayoutObject) | 1949 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(LayoutObject) |
| 1950 | 1950 |
| 1951 inline bool LayoutObject::documentBeingDestroyed() const | 1951 inline bool LayoutObject::documentBeingDestroyed() const |
| 1952 { | 1952 { |
| 1953 return document().lifecycle().state() >= DocumentLifecycle::Stopping; | 1953 return document().lifecycle().state() >= DocumentLifecycle::Stopping; |
| 1954 } | 1954 } |
| 1955 | 1955 |
| 1956 inline bool LayoutObject::isBeforeContent() const | 1956 inline bool LayoutObject::isBeforeContent() const |
| 1957 { | 1957 { |
| 1958 if (style()->styleType() != BEFORE) | 1958 if (style()->styleType() != PseudoIdBefore) |
| 1959 return false; | 1959 return false; |
| 1960 // Text nodes don't have their own styles, so ignore the style on a text nod
e. | 1960 // Text nodes don't have their own styles, so ignore the style on a text nod
e. |
| 1961 if (isText() && !isBR()) | 1961 if (isText() && !isBR()) |
| 1962 return false; | 1962 return false; |
| 1963 return true; | 1963 return true; |
| 1964 } | 1964 } |
| 1965 | 1965 |
| 1966 inline bool LayoutObject::isAfterContent() const | 1966 inline bool LayoutObject::isAfterContent() const |
| 1967 { | 1967 { |
| 1968 if (style()->styleType() != AFTER) | 1968 if (style()->styleType() != PseudoIdAfter) |
| 1969 return false; | 1969 return false; |
| 1970 // Text nodes don't have their own styles, so ignore the style on a text nod
e. | 1970 // Text nodes don't have their own styles, so ignore the style on a text nod
e. |
| 1971 if (isText() && !isBR()) | 1971 if (isText() && !isBR()) |
| 1972 return false; | 1972 return false; |
| 1973 return true; | 1973 return true; |
| 1974 } | 1974 } |
| 1975 | 1975 |
| 1976 inline bool LayoutObject::isBeforeOrAfterContent() const | 1976 inline bool LayoutObject::isBeforeOrAfterContent() const |
| 1977 { | 1977 { |
| 1978 return isBeforeContent() || isAfterContent(); | 1978 return isBeforeContent() || isAfterContent(); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 void showTree(const blink::LayoutObject*); | 2150 void showTree(const blink::LayoutObject*); |
| 2151 void showLineTree(const blink::LayoutObject*); | 2151 void showLineTree(const blink::LayoutObject*); |
| 2152 void showLayoutTree(const blink::LayoutObject* object1); | 2152 void showLayoutTree(const blink::LayoutObject* object1); |
| 2153 // We don't make object2 an optional parameter so that showLayoutTree | 2153 // We don't make object2 an optional parameter so that showLayoutTree |
| 2154 // can be called from gdb easily. | 2154 // can be called from gdb easily. |
| 2155 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2155 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
| 2156 | 2156 |
| 2157 #endif | 2157 #endif |
| 2158 | 2158 |
| 2159 #endif // LayoutObject_h | 2159 #endif // LayoutObject_h |
| OLD | NEW |