Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / frame / FrameViewAutoSizeInfo.cpp
index 1dbd577..f94f494 100644 (file)
@@ -20,9 +20,11 @@ FrameViewAutoSizeInfo::FrameViewAutoSizeInfo(FrameView* view)
     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)
@@ -37,22 +39,6 @@ void FrameViewAutoSizeInfo::configureAutoSizeMode(const IntSize& minSize, const
     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()
@@ -101,7 +87,7 @@ 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())
@@ -110,7 +96,7 @@ void FrameViewAutoSizeInfo::autoSizeIfNeeded()
             // 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())