Bug 569629 - Initialize nsIPresShell::gCaptureInfo without a constructor. r=roc,a=bsmedberg
authorMike Hommey <mh+mozilla@glandium.org>
Sun, 07 Nov 2010 09:25:39 +0100
changeset 57052 df36c2dcf88f521e8132a5b8da2e63037133a4ee
parent 57051 abcec14992b1f218594429f47a75999a8cb93411
child 57053 0a9ee83b1093b8641fb42a2801628b721d1dce2d
push id16768
push usermh@glandium.org
push dateSun, 07 Nov 2010 08:26:25 +0000
treeherdermozilla-central@0a9ee83b1093 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, bsmedberg
bugs569629
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 569629 - Initialize nsIPresShell::gCaptureInfo without a constructor. r=roc,a=bsmedberg
layout/base/nsIPresShell.h
layout/base/nsPresShell.cpp
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -128,20 +128,16 @@ class LayerManager;
 #define CAPTURE_PREVENTDRAG 4
 
 typedef struct CapturingContentInfo {
   // capture should only be allowed during a mousedown event
   PRPackedBool mAllowed;
   PRPackedBool mRetargetToElement;
   PRPackedBool mPreventDrag;
   nsIContent* mContent;
-
-  CapturingContentInfo() :
-    mAllowed(PR_FALSE), mRetargetToElement(PR_FALSE), mPreventDrag(PR_FALSE),
-    mContent(nsnull) { }
 } CapturingContentInfo;
 
 #define NS_IPRESSHELL_IID     \
  { 0xd1978bee, 0x43b9, 0x40de, \
     { 0x95, 0x47, 0x85, 0x06, 0x5e, 0x02, 0xec, 0xb4 } }
 
 // Constants for ScrollContentIntoView() function
 #define NS_PRESSHELL_SCROLL_TOP      0
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -232,17 +232,19 @@ static NS_DEFINE_IID(kRangeCID,     NS_R
 /* for NS_MEMORY_REPORTER_IMPLEMENT */
 #include "nsIMemoryReporter.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::layers;
 
 PRBool nsIPresShell::gIsAccessibilityActive = PR_FALSE;
-CapturingContentInfo nsIPresShell::gCaptureInfo;
+CapturingContentInfo nsIPresShell::gCaptureInfo =
+  { PR_FALSE /* mAllowed */,     PR_FALSE /* mRetargetToElement */,
+    PR_FALSE /* mPreventDrag */, nsnull /* mContent */ };
 nsIContent* nsIPresShell::gKeyDownTarget;
 
 static PRUint32
 ChangeFlag(PRUint32 aFlags, PRBool aOnOff, PRUint32 aFlag)
 {
   PRUint32 flags;
   if (aOnOff) {
     flags = (aFlags | aFlag);