| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 ScrollOffsetClamped | 46 ScrollOffsetClamped |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 struct RenderBoxRareData { | 49 struct RenderBoxRareData { |
| 50 WTF_MAKE_NONCOPYABLE(RenderBoxRareData); WTF_MAKE_FAST_ALLOCATED; | 50 WTF_MAKE_NONCOPYABLE(RenderBoxRareData); WTF_MAKE_FAST_ALLOCATED; |
| 51 public: | 51 public: |
| 52 RenderBoxRareData() | 52 RenderBoxRareData() |
| 53 : m_inlineBoxWrapper(0) | 53 : m_inlineBoxWrapper(0) |
| 54 , m_overrideLogicalContentHeight(-1) | 54 , m_overrideLogicalContentHeight(-1) |
| 55 , m_overrideLogicalContentWidth(-1) | 55 , m_overrideLogicalContentWidth(-1) |
| 56 , m_previousBorderBoxSize(-1, -1) | |
| 57 { | 56 { |
| 58 } | 57 } |
| 59 | 58 |
| 60 // For inline replaced elements, the inline box that owns us. | 59 // For inline replaced elements, the inline box that owns us. |
| 61 InlineBox* m_inlineBoxWrapper; | 60 InlineBox* m_inlineBoxWrapper; |
| 62 | |
| 63 LayoutUnit m_overrideLogicalContentHeight; | 61 LayoutUnit m_overrideLogicalContentHeight; |
| 64 LayoutUnit m_overrideLogicalContentWidth; | 62 LayoutUnit m_overrideLogicalContentWidth; |
| 65 | |
| 66 // Set by RenderBox::updatePreviousBorderBoxSizeIfNeeded(). | |
| 67 LayoutSize m_previousBorderBoxSize; | |
| 68 }; | 63 }; |
| 69 | 64 |
| 70 | 65 |
| 71 class RenderBox : public RenderBoxModelObject { | 66 class RenderBox : public RenderBoxModelObject { |
| 72 public: | 67 public: |
| 73 explicit RenderBox(ContainerNode*); | 68 explicit RenderBox(ContainerNode*); |
| 74 | 69 |
| 75 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since | 70 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since |
| 76 // position:static elements that are not flex-items get their z-index coerce
d to auto. | 71 // position:static elements that are not flex-items get their z-index coerce
d to auto. |
| 77 virtual LayerType layerTypeRequired() const override | 72 virtual LayerType layerTypeRequired() const override |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 // These include tables, positioned objects, floats and flexible boxes. | 554 // These include tables, positioned objects, floats and flexible boxes. |
| 560 virtual void computePreferredLogicalWidths() { clearPreferredLogicalWidthsDi
rty(); } | 555 virtual void computePreferredLogicalWidths() { clearPreferredLogicalWidthsDi
rty(); } |
| 561 | 556 |
| 562 RenderBoxRareData& ensureRareData() | 557 RenderBoxRareData& ensureRareData() |
| 563 { | 558 { |
| 564 if (!m_rareData) | 559 if (!m_rareData) |
| 565 m_rareData = adoptPtr(new RenderBoxRareData()); | 560 m_rareData = adoptPtr(new RenderBoxRareData()); |
| 566 return *m_rareData.get(); | 561 return *m_rareData.get(); |
| 567 } | 562 } |
| 568 | 563 |
| 569 void savePreviousBorderBoxSizeIfNeeded(); | |
| 570 LayoutSize computePreviousBorderBoxSize(const LayoutSize& previousBoundsSize
) const; | |
| 571 | |
| 572 bool logicalHeightComputesAsNone(SizeType) const; | 564 bool logicalHeightComputesAsNone(SizeType) const; |
| 573 | 565 |
| 574 bool isBox() const = delete; // This will catch anyone doing an unnecessary
check. | 566 bool isBox() const = delete; // This will catch anyone doing an unnecessary
check. |
| 575 | 567 |
| 576 // The width/height of the contents + borders + padding. The x/y location i
s relative to our container (which is not always our parent). | 568 // The width/height of the contents + borders + padding. The x/y location i
s relative to our container (which is not always our parent). |
| 577 LayoutRect m_frameRect; | 569 LayoutRect m_frameRect; |
| 578 | 570 |
| 579 // Our intrinsic height, used for min-height: min-content etc. Maintained by | 571 // Our intrinsic height, used for min-height: min-content etc. Maintained by |
| 580 // updateLogicalHeight. This is logicalHeight() before it is clamped to | 572 // updateLogicalHeight. This is logicalHeight() before it is clamped to |
| 581 // min/max. | 573 // min/max. |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 if (UNLIKELY(inlineBoxWrapper() != 0)) | 627 if (UNLIKELY(inlineBoxWrapper() != 0)) |
| 636 deleteLineBoxWrapper(); | 628 deleteLineBoxWrapper(); |
| 637 } | 629 } |
| 638 | 630 |
| 639 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 631 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
| 640 } | 632 } |
| 641 | 633 |
| 642 } // namespace blink | 634 } // namespace blink |
| 643 | 635 |
| 644 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ | 636 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ |
| OLD | NEW |