Index: Source/core/frame/FrameView.h |
diff --git a/Source/core/frame/FrameView.h b/Source/core/frame/FrameView.h |
index 22d6f29f043221229cc324f9b367bfa7650ac350..f17b6f210a24033500ed7a0a6da37ace23e64044 100644 |
--- a/Source/core/frame/FrameView.h |
+++ b/Source/core/frame/FrameView.h |
@@ -41,6 +41,7 @@ class DocumentLifecycle; |
class Cursor; |
class Element; |
class FloatSize; |
+class FrameView; |
class HTMLFrameOwnerElement; |
class LocalFrame; |
class KURL; |
@@ -56,6 +57,34 @@ class RenderWidget; |
typedef unsigned long long DOMTimeStamp; |
+struct FrameViewAutoSizeData { |
ostap
2014/08/10 05:01:51
Shouldn't it go into separate .h & .cpp ?
Shanmuga Pandi
2014/08/10 09:56:48
I thought it is going to be used only in FrameView
Shanmuga Pandi
2014/08/11 08:58:00
Done.
ostap
2014/08/11 19:24:27
I see.
Ok.
|
+ WTF_MAKE_NONCOPYABLE(FrameViewAutoSizeData); WTF_MAKE_FAST_ALLOCATED; |
+public: |
+ FrameViewAutoSizeData(FrameView *view) |
+ : m_frameView(view) |
+ , m_shouldAutoSize(false) |
+ , m_inAutoSize(false) |
+ , m_didRunAutosize(false) |
+ { |
+ } |
+ |
+ void enableAutoSizeMode(bool enable, const IntSize& minSize, const IntSize& maxSize); |
+ void autoSizeIfEnabled(); |
+ |
+private: |
+ FrameView *m_frameView; |
+ |
+ // If true, automatically resize the frame view around its content. |
+ bool m_shouldAutoSize; |
+ bool m_inAutoSize; |
+ // True if autosize has been run since m_shouldAutoSize was set. |
+ bool m_didRunAutosize; |
+ // The lower bound on the size when autosizing. |
+ IntSize m_minAutoSize; |
+ // The upper bound on the size when autosizing. |
+ IntSize m_maxAutoSize; |
+}; |
+ |
class FrameView FINAL : public ScrollView { |
public: |
friend class RenderView; |
@@ -355,7 +384,6 @@ private: |
void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); |
void updateCounters(); |
- void autoSizeIfEnabled(); |
void forceLayoutParentViewIfNeeded(); |
void performPreLayoutTasks(); |
void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); |
@@ -414,6 +442,13 @@ private: |
return !isInPerformLayout() || canInvalidatePaintDuringPerformLayout(); |
} |
+ FrameViewAutoSizeData& ensureAutoSizeData() |
ostap
2014/08/10 05:01:51
autoSizeData() ?
Shanmuga Pandi
2014/08/10 09:56:48
I have referred ensureRareData in RenderBox.h.
Ca
Shanmuga Pandi
2014/08/11 08:58:00
Done.
ostap
2014/08/11 19:24:26
I sees it both ways in code, so it should be fine
|
+ { |
+ if (!m_autoSizeData) |
+ m_autoSizeData = adoptPtr(new FrameViewAutoSizeData(this)); |
+ return *m_autoSizeData.get(); |
+ } |
+ |
static double s_currentFrameTimeStamp; // used for detecting decoded resource thrash in the cache |
static bool s_inPaintContents; |
@@ -485,19 +520,10 @@ private: |
// Renderer to hold our custom scroll corner. |
RenderScrollbarPart* m_scrollCorner; |
- // If true, automatically resize the frame view around its content. |
- bool m_shouldAutoSize; |
- bool m_inAutoSize; |
- // True if autosize has been run since m_shouldAutoSize was set. |
- bool m_didRunAutosize; |
- // The lower bound on the size when autosizing. |
- IntSize m_minAutoSize; |
- // The upper bound on the size when autosizing. |
- IntSize m_maxAutoSize; |
- |
OwnPtr<ScrollableAreaSet> m_scrollableAreas; |
OwnPtr<ResizerAreaSet> m_resizerAreas; |
OwnPtr<ViewportConstrainedObjectSet> m_viewportConstrainedObjects; |
+ OwnPtr<FrameViewAutoSizeData> m_autoSizeData; |
bool m_hasSoftwareFilters; |