OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/frame/FrameViewAutoSizeInfo.h" | 6 #include "core/frame/FrameViewAutoSizeInfo.h" |
7 | 7 |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
10 #include "core/rendering/RenderBox.h" | 10 #include "core/rendering/RenderBox.h" |
11 #include "core/rendering/RenderView.h" | 11 #include "core/rendering/RenderView.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 FrameViewAutoSizeInfo::FrameViewAutoSizeInfo(FrameView* view) | 15 FrameViewAutoSizeInfo::FrameViewAutoSizeInfo(FrameView* view) |
16 : m_frameView(view) | 16 : m_frameView(view) |
17 , m_inAutoSize(false) | 17 , m_inAutoSize(false) |
18 , m_didRunAutosize(false) | 18 , m_didRunAutosize(false) |
19 { | 19 { |
20 ASSERT(m_frameView); | 20 ASSERT(m_frameView); |
21 } | 21 } |
22 | 22 |
23 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(FrameViewAutoSizeInfo); | 23 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(FrameViewAutoSizeInfo); |
24 | 24 |
25 void FrameViewAutoSizeInfo::trace(Visitor* visitor) | 25 DEFINE_TRACE(FrameViewAutoSizeInfo) |
26 { | 26 { |
27 visitor->trace(m_frameView); | 27 visitor->trace(m_frameView); |
28 } | 28 } |
29 | 29 |
30 void FrameViewAutoSizeInfo::configureAutoSizeMode(const IntSize& minSize, const
IntSize& maxSize) | 30 void FrameViewAutoSizeInfo::configureAutoSizeMode(const IntSize& minSize, const
IntSize& maxSize) |
31 { | 31 { |
32 ASSERT(!minSize.isEmpty()); | 32 ASSERT(!minSize.isEmpty()); |
33 ASSERT(minSize.width() <= maxSize.width()); | 33 ASSERT(minSize.width() <= maxSize.width()); |
34 ASSERT(minSize.height() <= maxSize.height()); | 34 ASSERT(minSize.height() <= maxSize.height()); |
35 | 35 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Force the scrollbar state to avoid the scrollbar code adding them and
causing them to be needed. For example, | 134 // Force the scrollbar state to avoid the scrollbar code adding them and
causing them to be needed. For example, |
135 // a vertical scrollbar may cause text to wrap and thus increase the hei
ght (which is the only reason the scollbar is needed). | 135 // a vertical scrollbar may cause text to wrap and thus increase the hei
ght (which is the only reason the scollbar is needed). |
136 m_frameView->setVerticalScrollbarLock(false); | 136 m_frameView->setVerticalScrollbarLock(false); |
137 m_frameView->setHorizontalScrollbarLock(false); | 137 m_frameView->setHorizontalScrollbarLock(false); |
138 m_frameView->setScrollbarModes(horizonalScrollbarMode, verticalScrollbar
Mode, true, true); | 138 m_frameView->setScrollbarModes(horizonalScrollbarMode, verticalScrollbar
Mode, true, true); |
139 } | 139 } |
140 m_didRunAutosize = true; | 140 m_didRunAutosize = true; |
141 } | 141 } |
142 | 142 |
143 } // namespace blink | 143 } // namespace blink |
OLD | NEW |