ASSERT(m_frameView);
}
-FrameViewAutoSizeInfo::~FrameViewAutoSizeInfo()
+DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(FrameViewAutoSizeInfo);
+
+void FrameViewAutoSizeInfo::trace(Visitor* visitor)
{
- removeAutoSizeMode();
+ visitor->trace(m_frameView);
}
void FrameViewAutoSizeInfo::configureAutoSizeMode(const IntSize& minSize, const IntSize& maxSize)
m_minAutoSize = minSize;
m_maxAutoSize = maxSize;
m_didRunAutosize = false;
-
- m_frameView->setLayoutSizeFixedToFrameSize(true);
- m_frameView->setNeedsLayout();
- m_frameView->scheduleRelayout();
-}
-
-void FrameViewAutoSizeInfo::removeAutoSizeMode()
-{
- m_frameView->setLayoutSizeFixedToFrameSize(false);
- m_frameView->setNeedsLayout();
- m_frameView->scheduleRelayout();
-
- // Since autosize mode forces the scrollbar mode, change them to being auto.
- m_frameView->setVerticalScrollbarLock(false);
- m_frameView->setHorizontalScrollbarLock(false);
- m_frameView->setScrollbarModes(ScrollbarAuto, ScrollbarAuto);
}
void FrameViewAutoSizeInfo::autoSizeIfNeeded()
// Since the dimensions are only for the view rectangle, once a
// dimension exceeds the maximum, there is no need to increase it further.
if (newSize.width() > m_maxAutoSize.width()) {
- RefPtr<Scrollbar> localHorizontalScrollbar = m_frameView->horizontalScrollbar();
+ RefPtrWillBeRawPtr<Scrollbar> localHorizontalScrollbar = m_frameView->horizontalScrollbar();
if (!localHorizontalScrollbar)
localHorizontalScrollbar = m_frameView->createScrollbar(HorizontalScrollbar);
if (!localHorizontalScrollbar->isOverlayScrollbar())
// Don't bother checking for a vertical scrollbar because the width is at
// already greater the maximum.
} else if (newSize.height() > m_maxAutoSize.height()) {
- RefPtr<Scrollbar> localVerticalScrollbar = m_frameView->verticalScrollbar();
+ RefPtrWillBeRawPtr<Scrollbar> localVerticalScrollbar = m_frameView->verticalScrollbar();
if (!localVerticalScrollbar)
localVerticalScrollbar = m_frameView->createScrollbar(VerticalScrollbar);
if (!localVerticalScrollbar->isOverlayScrollbar())