| 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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 bool IsAtomicInlineLevel() const { return bitfields_.IsAtomicInlineLevel(); } | 785 bool IsAtomicInlineLevel() const { return bitfields_.IsAtomicInlineLevel(); } |
| 786 bool IsHorizontalWritingMode() const { | 786 bool IsHorizontalWritingMode() const { |
| 787 return bitfields_.HorizontalWritingMode(); | 787 return bitfields_.HorizontalWritingMode(); |
| 788 } | 788 } |
| 789 bool HasFlippedBlocksWritingMode() const { | 789 bool HasFlippedBlocksWritingMode() const { |
| 790 return Style()->IsFlippedBlocksWritingMode(); | 790 return Style()->IsFlippedBlocksWritingMode(); |
| 791 } | 791 } |
| 792 | 792 |
| 793 bool HasLayer() const { return bitfields_.HasLayer(); } | 793 bool HasLayer() const { return bitfields_.HasLayer(); } |
| 794 | 794 |
| 795 // This may be different from styleRef().hasBoxDecorationBackground() because | 795 // This may be different from StyleRef().hasBoxDecorationBackground() because |
| 796 // some objects may have box decoration background other than from their own | 796 // some objects may have box decoration background other than from their own |
| 797 // style. | 797 // style. |
| 798 bool HasBoxDecorationBackground() const { | 798 bool HasBoxDecorationBackground() const { |
| 799 return bitfields_.HasBoxDecorationBackground(); | 799 return bitfields_.HasBoxDecorationBackground(); |
| 800 } | 800 } |
| 801 | 801 |
| 802 bool BackgroundIsKnownToBeObscured() const; | 802 bool BackgroundIsKnownToBeObscured() const; |
| 803 | 803 |
| 804 bool NeedsLayout() const { | 804 bool NeedsLayout() const { |
| 805 return bitfields_.SelfNeedsLayout() || | 805 return bitfields_.SelfNeedsLayout() || |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 // | 1334 // |
| 1335 // CSS 2.1 calls this width the "preferred width". However CSS 3 calls it | 1335 // CSS 2.1 calls this width the "preferred width". However CSS 3 calls it |
| 1336 // the "max-content inline size". | 1336 // the "max-content inline size". |
| 1337 // https://drafts.csswg.org/css-sizing-3/#max-content-inline-size | 1337 // https://drafts.csswg.org/css-sizing-3/#max-content-inline-size |
| 1338 // TODO(jchaffraix): We will probably want to rename it to match CSS 3. | 1338 // TODO(jchaffraix): We will probably want to rename it to match CSS 3. |
| 1339 virtual LayoutUnit MaxPreferredLogicalWidth() const { return LayoutUnit(); } | 1339 virtual LayoutUnit MaxPreferredLogicalWidth() const { return LayoutUnit(); } |
| 1340 | 1340 |
| 1341 const ComputedStyle* Style() const { return style_.Get(); } | 1341 const ComputedStyle* Style() const { return style_.Get(); } |
| 1342 ComputedStyle* MutableStyle() const { return style_.Get(); } | 1342 ComputedStyle* MutableStyle() const { return style_.Get(); } |
| 1343 | 1343 |
| 1344 // m_style can only be nullptr before the first style is set, thus most | 1344 // style_ can only be nullptr before the first style is set, thus most |
| 1345 // callers will never see a nullptr style and should use styleRef(). | 1345 // callers will never see a nullptr style and should use StyleRef(). |
| 1346 // FIXME: It would be better if style() returned a const reference. | 1346 // FIXME: It would be better if style() returned a const reference. |
| 1347 const ComputedStyle& StyleRef() const { return MutableStyleRef(); } | 1347 const ComputedStyle& StyleRef() const { return MutableStyleRef(); } |
| 1348 ComputedStyle& MutableStyleRef() const { | 1348 ComputedStyle& MutableStyleRef() const { |
| 1349 DCHECK(style_); | 1349 DCHECK(style_); |
| 1350 return *style_; | 1350 return *style_; |
| 1351 } | 1351 } |
| 1352 | 1352 |
| 1353 /* The following methods are inlined in LayoutObjectInlines.h */ | 1353 /* The following methods are inlined in LayoutObjectInlines.h */ |
| 1354 inline const ComputedStyle* FirstLineStyle() const; | 1354 inline const ComputedStyle* FirstLineStyle() const; |
| 1355 inline const ComputedStyle& FirstLineStyleRef() const; | 1355 inline const ComputedStyle& FirstLineStyleRef() const; |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 kLayoutObjectSVGInline, | 1999 kLayoutObjectSVGInline, |
| 2000 kLayoutObjectSVGInlineText, | 2000 kLayoutObjectSVGInlineText, |
| 2001 kLayoutObjectSVGImage, | 2001 kLayoutObjectSVGImage, |
| 2002 kLayoutObjectSVGForeignObject, | 2002 kLayoutObjectSVGForeignObject, |
| 2003 kLayoutObjectSVGResourceContainer, | 2003 kLayoutObjectSVGResourceContainer, |
| 2004 kLayoutObjectSVGResourceFilter, | 2004 kLayoutObjectSVGResourceFilter, |
| 2005 kLayoutObjectSVGResourceFilterPrimitive, | 2005 kLayoutObjectSVGResourceFilterPrimitive, |
| 2006 }; | 2006 }; |
| 2007 virtual bool IsOfType(LayoutObjectType type) const { return false; } | 2007 virtual bool IsOfType(LayoutObjectType type) const { return false; } |
| 2008 | 2008 |
| 2009 // Overrides should call the superclass at the end. m_style will be 0 the | 2009 // Overrides should call the superclass at the end. style_ will be 0 the |
| 2010 // first time this function will be called. | 2010 // first time this function will be called. |
| 2011 virtual void StyleWillChange(StyleDifference, const ComputedStyle& new_style); | 2011 virtual void StyleWillChange(StyleDifference, const ComputedStyle& new_style); |
| 2012 // Overrides should call the superclass at the start. |oldStyle| will be 0 the | 2012 // Overrides should call the superclass at the start. |oldStyle| will be 0 the |
| 2013 // first time this function is called. | 2013 // first time this function is called. |
| 2014 virtual void StyleDidChange(StyleDifference, const ComputedStyle* old_style); | 2014 virtual void StyleDidChange(StyleDifference, const ComputedStyle* old_style); |
| 2015 void PropagateStyleToAnonymousChildren(); | 2015 void PropagateStyleToAnonymousChildren(); |
| 2016 // Return true for objects that don't want style changes automatically | 2016 // Return true for objects that don't want style changes automatically |
| 2017 // propagated via propagateStyleToAnonymousChildren(), but rather rely on | 2017 // propagated via propagateStyleToAnonymousChildren(), but rather rely on |
| 2018 // other custom mechanisms (if they need to be notified of parent style | 2018 // other custom mechanisms (if they need to be notified of parent style |
| 2019 // changes at all). | 2019 // changes at all). |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2825 CORE_EXPORT void showLineTree(const blink::LayoutObject*); | 2825 CORE_EXPORT void showLineTree(const blink::LayoutObject*); |
| 2826 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); | 2826 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1); |
| 2827 // We don't make object2 an optional parameter so that showLayoutTree | 2827 // We don't make object2 an optional parameter so that showLayoutTree |
| 2828 // can be called from gdb easily. | 2828 // can be called from gdb easily. |
| 2829 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, | 2829 CORE_EXPORT void showLayoutTree(const blink::LayoutObject* object1, |
| 2830 const blink::LayoutObject* object2); | 2830 const blink::LayoutObject* object2); |
| 2831 | 2831 |
| 2832 #endif | 2832 #endif |
| 2833 | 2833 |
| 2834 #endif // LayoutObject_h | 2834 #endif // LayoutObject_h |
| OLD | NEW |