Bug 1420525 - Initialize nsIFrame::Cursor to avoid uninitialized value inside. r?tnikkel
MozReview-Commit-ID: EjAUocKMwl9
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -1981,20 +1981,20 @@ public:
/**
* This structure holds information about a cursor. mContainer represents a
* loaded image that should be preferred. If it is not possible to use it, or
* if it is null, mCursor should be used.
*/
struct MOZ_STACK_CLASS Cursor {
nsCOMPtr<imgIContainer> mContainer;
- int32_t mCursor;
- bool mHaveHotspot;
- bool mLoading;
- float mHotspotX, mHotspotY;
+ int32_t mCursor = NS_STYLE_CURSOR_AUTO;
+ bool mHaveHotspot = false;
+ bool mLoading = false;
+ float mHotspotX = 0.0f, mHotspotY = 0.0f;
};
/**
* Get the cursor for a given frame.
*/
virtual nsresult GetCursor(const nsPoint& aPoint,
Cursor& aCursor) = 0;
/**