diff options
Diffstat (limited to 'Source/WebKit/android/nav')
-rw-r--r-- | Source/WebKit/android/nav/CacheBuilder.cpp | 1 | ||||
-rw-r--r-- | Source/WebKit/android/nav/CachedRoot.cpp | 13 | ||||
-rw-r--r-- | Source/WebKit/android/nav/CachedRoot.h | 8 |
3 files changed, 19 insertions, 3 deletions
diff --git a/Source/WebKit/android/nav/CacheBuilder.cpp b/Source/WebKit/android/nav/CacheBuilder.cpp index 798960e..9759819 100644 --- a/Source/WebKit/android/nav/CacheBuilder.cpp +++ b/Source/WebKit/android/nav/CacheBuilder.cpp @@ -53,7 +53,6 @@ #include "RenderInline.h" #include "RenderLayerBacking.h" #include "RenderListBox.h" -#include "RenderSkinCombo.h" #include "RenderTextControl.h" #include "RenderView.h" #include "RenderWidget.h" diff --git a/Source/WebKit/android/nav/CachedRoot.cpp b/Source/WebKit/android/nav/CachedRoot.cpp index ddebaba..eeb53fd 100644 --- a/Source/WebKit/android/nav/CachedRoot.cpp +++ b/Source/WebKit/android/nav/CachedRoot.cpp @@ -1023,6 +1023,16 @@ private: typedef BoundsCanvas INHERITED; }; +CachedRoot::CachedRoot() + : mPicture(0) +{ +} + +CachedRoot::~CachedRoot() +{ + SkSafeUnref(mPicture); +} + bool CachedRoot::adjustForScroll(BestData* best, CachedFrame::Direction direction, WebCore::IntPoint* scrollPtr, bool findClosest) { @@ -1264,7 +1274,8 @@ void CachedRoot::init(WebCore::Frame* frame, CachedHistory* history) CachedFrame::init(this, -1, frame); reset(); mHistory = history; - mPicture = NULL; + SkSafeUnref(mPicture); + mPicture = 0; } bool CachedRoot::innerDown(const CachedNode* test, BestData* bestData) const diff --git a/Source/WebKit/android/nav/CachedRoot.h b/Source/WebKit/android/nav/CachedRoot.h index dc055a5..362d95b 100644 --- a/Source/WebKit/android/nav/CachedRoot.h +++ b/Source/WebKit/android/nav/CachedRoot.h @@ -45,6 +45,8 @@ class CachedNode; class CachedRoot : public CachedFrame { public: + CachedRoot(); + ~CachedRoot(); bool adjustForScroll(BestData* , Direction , WebCore::IntPoint* scrollPtr, bool findClosest); const SkRegion& baseUncovered() const { return mBaseUncovered; } @@ -96,7 +98,11 @@ public: void setFocusBounds(const WebCore::IntRect& r) { mFocusBounds = r; } void setTextGeneration(int textGeneration) { mTextGeneration = textGeneration; } void setMaxScroll(int x, int y) { mMaxXScroll = x; mMaxYScroll = y; } - void setPicture(SkPicture* picture) { mPicture = picture; } + void setPicture(SkPicture* picture) { + SkSafeRef(picture); + SkSafeUnref(mPicture); + mPicture = picture; + } void setRootLayer(WebCore::LayerAndroid* layer) { mRootLayer = layer; resetLayers(); |