| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 setWidth(size); | 150 setWidth(size); |
| 151 } | 151 } |
| 152 | 152 |
| 153 LayoutPoint location() const { return m_frameRect.location(); } | 153 LayoutPoint location() const { return m_frameRect.location(); } |
| 154 LayoutSize locationOffset() const { return LayoutSize(m_frameRect.x(), m_fra
meRect.y()); } | 154 LayoutSize locationOffset() const { return LayoutSize(m_frameRect.x(), m_fra
meRect.y()); } |
| 155 LayoutSize size() const { return m_frameRect.size(); } | 155 LayoutSize size() const { return m_frameRect.size(); } |
| 156 IntSize pixelSnappedSize() const { return m_frameRect.pixelSnappedSize(); } | 156 IntSize pixelSnappedSize() const { return m_frameRect.pixelSnappedSize(); } |
| 157 | 157 |
| 158 void setLocation(const LayoutPoint& location) { m_frameRect.setLocation(loca
tion); } | 158 void setLocation(const LayoutPoint& location) { m_frameRect.setLocation(loca
tion); } |
| 159 | 159 |
| 160 // FIXME: Currently scrollbars are using int geometry and positioned based o
n |
| 161 // pixelSnappedBorderBoxRect whose size may change when location changes bec
ause of |
| 162 // pixel snapping. This function is used to change location of the RenderBox
outside |
| 163 // of RenderBox::layout(). Will remove when we use LayoutUnits for scrollbar
s. |
| 164 void setLocationAndUpdateOverflowControlsIfNeeded(const LayoutPoint&); |
| 165 |
| 160 void setSize(const LayoutSize& size) { m_frameRect.setSize(size); } | 166 void setSize(const LayoutSize& size) { m_frameRect.setSize(size); } |
| 161 void move(LayoutUnit dx, LayoutUnit dy) { m_frameRect.move(dx, dy); } | 167 void move(LayoutUnit dx, LayoutUnit dy) { m_frameRect.move(dx, dy); } |
| 162 | 168 |
| 163 LayoutRect frameRect() const { return m_frameRect; } | 169 LayoutRect frameRect() const { return m_frameRect; } |
| 164 void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; } | 170 void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; } |
| 165 | 171 |
| 166 LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size());
} | 172 LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size());
} |
| 167 LayoutRect paddingBoxRect() const { return LayoutRect(borderLeft(), borderTo
p(), clientWidth(), clientHeight()); } | 173 LayoutRect paddingBoxRect() const { return LayoutRect(borderLeft(), borderTo
p(), clientWidth(), clientHeight()); } |
| 168 IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), m_fra
meRect.pixelSnappedSize()); } | 174 IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), m_fra
meRect.pixelSnappedSize()); } |
| 169 virtual IntRect borderBoundingBox() const override final { return pixelSnapp
edBorderBoxRect(); } | 175 virtual IntRect borderBoundingBox() const override final { return pixelSnapp
edBorderBoxRect(); } |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 if (UNLIKELY(inlineBoxWrapper() != 0)) | 856 if (UNLIKELY(inlineBoxWrapper() != 0)) |
| 851 deleteLineBoxWrapper(); | 857 deleteLineBoxWrapper(); |
| 852 } | 858 } |
| 853 | 859 |
| 854 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 860 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
| 855 } | 861 } |
| 856 | 862 |
| 857 } // namespace blink | 863 } // namespace blink |
| 858 | 864 |
| 859 #endif // LayoutBox_h | 865 #endif // LayoutBox_h |
| OLD | NEW |