Bug 787554. Don't prefix WebIDL getters names with a Get if they look like simple member access on the C++ side. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 11 Sep 2012 20:08:24 +0100
changeset 113127 443937d07b1392e78bd09202748cc1c87a37bcf8
parent 113126 79a573c42da85e32e4e915369e9a6bf9f618c314
child 113128 034e75e31d2e52cf06cd8cd51228d3c243eefccc
push idunknown
push userunknown
push dateunknown
reviewerspeterv
bugs787554
milestone18.0a1
Bug 787554. Don't prefix WebIDL getters names with a Get if they look like simple member access on the C++ side. r=peterv
content/base/src/WebSocket.h
content/base/src/nsXMLHttpRequest.cpp
content/base/src/nsXMLHttpRequest.h
content/canvas/src/WebGLContext.cpp
content/canvas/src/WebGLContext.h
content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
content/canvas/src/nsCanvasRenderingContext2DAzure.h
dom/base/nsPerformance.cpp
dom/base/nsPerformance.h
dom/bindings/Codegen.py
dom/bindings/test/TestBindingHeader.h
dom/webidl/CSSStyleDeclaration.webidl
dom/webidl/CanvasRenderingContext2D.webidl
dom/webidl/WebGLRenderingContext.webidl
dom/webidl/XMLHttpRequest.webidl
dom/workers/XMLHttpRequest.cpp
dom/workers/XMLHttpRequest.h
layout/style/nsICSSDeclaration.h
--- a/content/base/src/WebSocket.h
+++ b/content/base/src/WebSocket.h
@@ -128,20 +128,20 @@ public: // WebIDL interface:
                                                  const nsAString& aUrl,
                                                  const Sequence<nsString>& aProtocols,
                                                  ErrorResult& rv);
 
   // webIDL: readonly attribute DOMString url
   void GetUrl(nsAString& aResult);
 
   // webIDL: readonly attribute unsigned short readyState;
-  uint16_t GetReadyState() { return (uint16_t)mReadyState; }
+  uint16_t ReadyState() const { return mReadyState; }
 
   // webIDL: readonly attribute unsigned long bufferedAmount;
-  uint32_t GetBufferedAmount() { return (uint32_t) mOutgoingBufferedAmount; }
+  uint32_t BufferedAmount() const { return mOutgoingBufferedAmount; }
 
   // webIDL: attribute Function? onopen;
   IMPL_EVENT_HANDLER(open)
 
   // webIDL: attribute Function? onerror;
   IMPL_EVENT_HANDLER(error)
 
   // webIDL: attribute Function? onclose;
@@ -157,18 +157,18 @@ public: // WebIDL interface:
   void Close(const Optional<uint16_t>& aCode,
              const Optional<nsAString>& aReason,
              ErrorResult& aRv);
 
   // webIDL: attribute Function? onmessage;
   IMPL_EVENT_HANDLER(message)
 
   // webIDL: attribute DOMString binaryType;
-  BinaryType GetBinaryType() { return mBinaryType; }
-  void SetBinaryType(BinaryType aData) { mBinaryType = aData; }
+  dom::BinaryType BinaryType() const { return mBinaryType; }
+  void SetBinaryType(dom::BinaryType aData) { mBinaryType = aData; }
 
   // webIDL: void send(DOMString|Blob|ArrayBufferView data);
   void Send(const nsAString& aData,
             ErrorResult& aRv);
   void Send(nsIDOMBlob* aData,
             ErrorResult& aRv);
   void Send(ArrayBuffer& aData,
             ErrorResult& aRv);
@@ -274,17 +274,17 @@ protected: //data
   nsCString mEstablishedExtensions;
 
   uint16_t mReadyState;
 
   nsCOMPtr<nsIPrincipal> mPrincipal;
 
   uint32_t mOutgoingBufferedAmount;
 
-  BinaryType mBinaryType;
+  dom::BinaryType mBinaryType;
 
   // Web Socket owner information:
   // - the script file name, UTF8 encoded.
   // - source code line number where the Web Socket object was constructed.
   // - the ID of the inner window where the script lives. Note that this may not
   //   be the same as the Web Socket owner window.
   // These attributes are used for error reporting.
   nsCString mScriptFile;
--- a/content/base/src/nsXMLHttpRequest.cpp
+++ b/content/base/src/nsXMLHttpRequest.cpp
@@ -953,17 +953,17 @@ nsXMLHttpRequest::StaticAssertions()
   ASSERT_ENUM_EQUAL(Moz_blob, MOZ_BLOB);
 #undef ASSERT_ENUM_EQUAL
 }
 #endif
 
 /* attribute AString responseType; */
 NS_IMETHODIMP nsXMLHttpRequest::SetResponseType(const nsAString& aResponseType)
 {
-  nsXMLHttpRequest::ResponseType responseType;
+  nsXMLHttpRequest::ResponseTypeEnum responseType;
   if (aResponseType.IsEmpty()) {
     responseType = XML_HTTP_RESPONSE_TYPE_DEFAULT;
   } else if (aResponseType.EqualsLiteral("arraybuffer")) {
     responseType = XML_HTTP_RESPONSE_TYPE_ARRAYBUFFER;
   } else if (aResponseType.EqualsLiteral("blob")) {
     responseType = XML_HTTP_RESPONSE_TYPE_BLOB;
   } else if (aResponseType.EqualsLiteral("document")) {
     responseType = XML_HTTP_RESPONSE_TYPE_DOCUMENT;
@@ -985,21 +985,21 @@ NS_IMETHODIMP nsXMLHttpRequest::SetRespo
   SetResponseType(responseType, rv);
   return rv.ErrorCode();
 }
 
 void
 nsXMLHttpRequest::SetResponseType(XMLHttpRequestResponseType aType,
                                   ErrorResult& aRv)
 {
-  SetResponseType(ResponseType(aType), aRv);
+  SetResponseType(ResponseTypeEnum(aType), aRv);
 }
 
 void
-nsXMLHttpRequest::SetResponseType(nsXMLHttpRequest::ResponseType aResponseType,
+nsXMLHttpRequest::SetResponseType(nsXMLHttpRequest::ResponseTypeEnum aResponseType,
                                   ErrorResult& aRv)
 {
   // If the state is not OPENED or HEADERS_RECEIVED raise an
   // INVALID_STATE_ERR exception and terminate these steps.
   if (!(mState & (XML_HTTP_REQUEST_OPENED | XML_HTTP_REQUEST_SENT |
                   XML_HTTP_REQUEST_HEADERS_RECEIVED))) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
@@ -1151,22 +1151,22 @@ nsXMLHttpRequest::GetResponse(JSContext*
 
   return JSVAL_NULL;
 }
 
 /* readonly attribute unsigned long status; */
 NS_IMETHODIMP
 nsXMLHttpRequest::GetStatus(uint32_t *aStatus)
 {
-  *aStatus = GetStatus();
+  *aStatus = Status();
   return NS_OK;
 }
 
 uint32_t
-nsXMLHttpRequest::GetStatus()
+nsXMLHttpRequest::Status()
 {
   if (mState & XML_HTTP_REQUEST_USE_XSITE_AC) {
     // Make sure we don't leak status information from denied cross-site
     // requests.
     if (mChannel) {
       nsresult status;
       mChannel->GetStatus(&status);
       if (NS_FAILED(status)) {
@@ -3171,17 +3171,17 @@ nsXMLHttpRequest::SetRequestHeader(const
   }
   return rv;
 }
 
 /* attribute unsigned long timeout; */
 NS_IMETHODIMP
 nsXMLHttpRequest::GetTimeout(uint32_t *aTimeout)
 {
-  *aTimeout = GetTimeout();
+  *aTimeout = Timeout();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsXMLHttpRequest::SetTimeout(uint32_t aTimeout)
 {
   ErrorResult rv;
   SetTimeout(aTimeout, rv);
@@ -3235,22 +3235,22 @@ nsXMLHttpRequest::StartTimeoutTimer()
     nsITimer::TYPE_ONE_SHOT
   );
 }
 
 /* readonly attribute unsigned short readyState; */
 NS_IMETHODIMP
 nsXMLHttpRequest::GetReadyState(uint16_t *aState)
 {
-  *aState = GetReadyState();
+  *aState = ReadyState();
   return NS_OK;
 }
 
 uint16_t
-nsXMLHttpRequest::GetReadyState()
+nsXMLHttpRequest::ReadyState()
 {
   // Translate some of our internal states for external consumers
   if (mState & XML_HTTP_REQUEST_UNSENT) {
     return UNSENT;
   }
   if (mState & (XML_HTTP_REQUEST_OPENED | XML_HTTP_REQUEST_SENT)) {
     return OPENED;
   }
@@ -3271,22 +3271,22 @@ nsXMLHttpRequest::SlowOverrideMimeType(c
   OverrideMimeType(aMimeType);
   return NS_OK;
 }
 
 /* attribute boolean multipart; */
 NS_IMETHODIMP
 nsXMLHttpRequest::GetMultipart(bool *_retval)
 {
-  *_retval = GetMultipart();
+  *_retval = Multipart();
   return NS_OK;
 }
 
 bool
-nsXMLHttpRequest::GetMultipart()
+nsXMLHttpRequest::Multipart()
 {
   return !!(mState & XML_HTTP_REQUEST_MULTIPART);
 }
 
 NS_IMETHODIMP
 nsXMLHttpRequest::SetMultipart(bool aMultipart)
 {
   nsresult rv = NS_OK;
@@ -3309,22 +3309,22 @@ nsXMLHttpRequest::SetMultipart(bool aMul
     mState &= ~XML_HTTP_REQUEST_MULTIPART;
   }
 }
 
 /* attribute boolean mozBackgroundRequest; */
 NS_IMETHODIMP
 nsXMLHttpRequest::GetMozBackgroundRequest(bool *_retval)
 {
-  *_retval = GetMozBackgroundRequest();
+  *_retval = MozBackgroundRequest();
   return NS_OK;
 }
 
 bool
-nsXMLHttpRequest::GetMozBackgroundRequest()
+nsXMLHttpRequest::MozBackgroundRequest()
 {
   return !!(mState & XML_HTTP_REQUEST_BACKGROUND);
 }
 
 NS_IMETHODIMP
 nsXMLHttpRequest::SetMozBackgroundRequest(bool aMozBackgroundRequest)
 {
   nsresult rv = NS_OK;
@@ -3358,22 +3358,22 @@ nsXMLHttpRequest::SetMozBackgroundReques
     mState &= ~XML_HTTP_REQUEST_BACKGROUND;
   }
 }
 
 /* attribute boolean withCredentials; */
 NS_IMETHODIMP
 nsXMLHttpRequest::GetWithCredentials(bool *_retval)
 {
-  *_retval = GetWithCredentials();
+  *_retval = WithCredentials();
   return NS_OK;
 }
 
 bool
-nsXMLHttpRequest::GetWithCredentials()
+nsXMLHttpRequest::WithCredentials()
 {
   return !!(mState & XML_HTTP_REQUEST_AC_WITH_CREDENTIALS);
 }
 
 NS_IMETHODIMP
 nsXMLHttpRequest::SetWithCredentials(bool aWithCredentials)
 {
   nsresult rv = NS_OK;
@@ -3771,55 +3771,55 @@ nsXMLHttpRequest::GetInterface(JSContext
   NS_ENSURE_FALSE(aRv.Failed(), JSVAL_NULL);
 
   JSObject* global = JS_GetGlobalForObject(aCx, GetWrapper());
   aRv = nsContentUtils::WrapNative(aCx, global, result, iid, &v);
   return aRv.Failed() ? JSVAL_NULL : v;
 }
 
 nsXMLHttpRequestUpload*
-nsXMLHttpRequest::GetUpload()
+nsXMLHttpRequest::Upload()
 {
   if (!mUpload) {
     mUpload = new nsXMLHttpRequestUpload(this);
   }
   return mUpload;
 }
 
 NS_IMETHODIMP
 nsXMLHttpRequest::GetUpload(nsIXMLHttpRequestUpload** aUpload)
 {
-  nsRefPtr<nsXMLHttpRequestUpload> upload = GetUpload();
+  nsRefPtr<nsXMLHttpRequestUpload> upload = Upload();
   upload.forget(aUpload);
   return NS_OK;
 }
 
 bool
-nsXMLHttpRequest::GetMozAnon()
+nsXMLHttpRequest::MozAnon()
 {
   return mIsAnon;
 }
 
 NS_IMETHODIMP
 nsXMLHttpRequest::GetMozAnon(bool* aAnon)
 {
-  *aAnon = GetMozAnon();
+  *aAnon = MozAnon();
   return NS_OK;
 }
 
 bool
-nsXMLHttpRequest::GetMozSystem()
+nsXMLHttpRequest::MozSystem()
 {
   return IsSystemXHR();
 }
 
 NS_IMETHODIMP
 nsXMLHttpRequest::GetMozSystem(bool* aSystem)
 {
-  *aSystem = GetMozSystem();
+  *aSystem = MozSystem();
   return NS_OK;
 }
 
 void
 nsXMLHttpRequest::HandleTimeoutCallback()
 {
   if (mState & XML_HTTP_REQUEST_DONE) {
     NS_NOTREACHED("nsXMLHttpRequest::HandleTimeoutCallback with completed request");
--- a/content/base/src/nsXMLHttpRequest.h
+++ b/content/base/src/nsXMLHttpRequest.h
@@ -36,16 +36,22 @@
 #include "nsIScriptObjectPrincipal.h"
 
 #include "mozilla/Assertions.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/TypedArray.h"
 #include "mozilla/dom/XMLHttpRequestBinding.h"
 #include "mozilla/dom/XMLHttpRequestUploadBinding.h"
 
+#ifdef Status
+/* Xlib headers insist on this for some reason... Nuke it because
+   it'll override our member name */
+#undef Status
+#endif
+
 class nsILoadGroup;
 class AsyncVerifyRedirectCallbackForwarder;
 class nsIUnicodeDecoder;
 class nsIDOMFormData;
 
 #define IMPL_EVENT_HANDLER(_lowercase)                                  \
   inline JSObject* GetOn##_lowercase(JSContext* aCx)                    \
   {                                                                     \
@@ -231,41 +237,41 @@ public:
 #ifdef DEBUG
   void StaticAssertions();
 #endif
 
   // event handler
   IMPL_EVENT_HANDLER(readystatechange)
 
   // states
-  uint16_t GetReadyState();
+  uint16_t ReadyState();
 
   // request
   void Open(const nsAString& aMethod, const nsAString& aUrl, bool aAsync,
             const mozilla::dom::Optional<nsAString>& aUser,
             const mozilla::dom::Optional<nsAString>& aPassword,
             ErrorResult& aRv)
   {
     aRv = Open(NS_ConvertUTF16toUTF8(aMethod), NS_ConvertUTF16toUTF8(aUrl),
                aAsync, aUser, aPassword);
   }
   void SetRequestHeader(const nsAString& aHeader, const nsAString& aValue,
                         ErrorResult& aRv)
   {
     aRv = SetRequestHeader(NS_ConvertUTF16toUTF8(aHeader),
                            NS_ConvertUTF16toUTF8(aValue));
   }
-  uint32_t GetTimeout()
+  uint32_t Timeout()
   {
     return mTimeoutMilliseconds;
   }
   void SetTimeout(uint32_t aTimeout, ErrorResult& aRv);
-  bool GetWithCredentials();
+  bool WithCredentials();
   void SetWithCredentials(bool aWithCredentials, nsresult& aRv);
-  nsXMLHttpRequestUpload* GetUpload();
+  nsXMLHttpRequestUpload* Upload();
 
 private:
   class RequestBody
   {
   public:
     RequestBody() : mType(Uninitialized)
     {
     }
@@ -382,17 +388,17 @@ public:
     NS_ASSERTION(aStream, "Null should go to string version");
     aRv = Send(RequestBody(aStream));
   }
   void SendAsBinary(const nsAString& aBody, ErrorResult& aRv);
 
   void Abort();
 
   // response
-  uint32_t GetStatus();
+  uint32_t Status();
   void GetStatusText(nsString& aStatusText);
   void GetResponseHeader(const nsACString& aHeader, nsACString& aResult,
                          ErrorResult& aRv);
   void GetResponseHeader(const nsAString& aHeader, nsString& aResult,
                          ErrorResult& aRv)
   {
     nsCString result;
     GetResponseHeader(NS_ConvertUTF16toUTF8(aHeader), result, aRv);
@@ -408,32 +414,32 @@ public:
     }
   }
   void GetAllResponseHeaders(nsString& aResponseHeaders);
   void OverrideMimeType(const nsAString& aMimeType)
   {
     // XXX Should we do some validation here?
     mOverrideMimeType = aMimeType;
   }
-  XMLHttpRequestResponseType GetResponseType()
+  XMLHttpRequestResponseType ResponseType()
   {
     return XMLHttpRequestResponseType(mResponseType);
   }
   void SetResponseType(XMLHttpRequestResponseType aType, ErrorResult& aRv);
   JS::Value GetResponse(JSContext* aCx, ErrorResult& aRv);
   void GetResponseText(nsString& aResponseText, ErrorResult& aRv);
   nsIDocument* GetResponseXML(ErrorResult& aRv);
 
-  bool GetMozBackgroundRequest();
+  bool MozBackgroundRequest();
   void SetMozBackgroundRequest(bool aMozBackgroundRequest, nsresult& aRv);
-  bool GetMultipart();
+  bool Multipart();
   void SetMultipart(bool aMultipart, nsresult& aRv);
 
-  bool GetMozAnon();
-  bool GetMozSystem();
+  bool MozAnon();
+  bool MozSystem();
 
   nsIChannel* GetChannel()
   {
     return mChannel;
   }
 
   // We need a GetInterface callable from JS for chrome JS
   JS::Value GetInterface(JSContext* aCx, nsIJSIID* aIID, ErrorResult& aRv);
@@ -569,31 +575,31 @@ protected:
   // In cases where we've only received half a surrogate, the decoder itself
   // carries the state to remember this. Next time we receive more data we
   // simply feed the new data into the decoder which will handle the second
   // part of the surrogate.
   nsCOMPtr<nsIUnicodeDecoder> mDecoder;
 
   nsCString mResponseCharset;
 
-  enum ResponseType {
+  enum ResponseTypeEnum {
     XML_HTTP_RESPONSE_TYPE_DEFAULT,
     XML_HTTP_RESPONSE_TYPE_ARRAYBUFFER,
     XML_HTTP_RESPONSE_TYPE_BLOB,
     XML_HTTP_RESPONSE_TYPE_DOCUMENT,
     XML_HTTP_RESPONSE_TYPE_JSON,
     XML_HTTP_RESPONSE_TYPE_TEXT,
     XML_HTTP_RESPONSE_TYPE_CHUNKED_TEXT,
     XML_HTTP_RESPONSE_TYPE_CHUNKED_ARRAYBUFFER,
     XML_HTTP_RESPONSE_TYPE_MOZ_BLOB
   };
 
-  void SetResponseType(nsXMLHttpRequest::ResponseType aType, ErrorResult& aRv);
+  void SetResponseType(nsXMLHttpRequest::ResponseTypeEnum aType, ErrorResult& aRv);
 
-  ResponseType mResponseType;
+  ResponseTypeEnum mResponseType;
 
   // It is either a cached blob-response from the last call to GetResponse,
   // but is also explicitly set in OnStopRequest.
   nsCOMPtr<nsIDOMBlob> mResponseBlob;
   // Non-null only when we are able to get a os-file representation of the
   // response, i.e. when loading from a file, or when the http-stream
   // caches into a file or is reading from a cached file.
   nsRefPtr<nsDOMFile> mDOMFile;
--- a/content/canvas/src/WebGLContext.cpp
+++ b/content/canvas/src/WebGLContext.cpp
@@ -1524,25 +1524,25 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(WebGLExt
 NS_IMPL_CYCLE_COLLECTING_RELEASE(WebGLExtension)
 
 DOMCI_DATA(WebGLExtension, WebGLExtension)
 
 /* readonly attribute WebGLsizei drawingBufferWidth; */
 NS_IMETHODIMP
 WebGLContext::GetDrawingBufferWidth(WebGLsizei *aWidth)
 {
-    *aWidth = GetDrawingBufferWidth();
+    *aWidth = DrawingBufferWidth();
     return NS_OK;
 }
 
 /* readonly attribute WebGLsizei drawingBufferHeight; */
 NS_IMETHODIMP
 WebGLContext::GetDrawingBufferHeight(WebGLsizei *aHeight)
 {
-    *aHeight = GetDrawingBufferHeight();
+    *aHeight = DrawingBufferHeight();
     return NS_OK;
 }
 
 /* [noscript] attribute WebGLint location; */
 NS_IMETHODIMP
 WebGLUniformLocation::GetLocation(WebGLint *aLocation)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
--- a/content/canvas/src/WebGLContext.h
+++ b/content/canvas/src/WebGLContext.h
@@ -600,22 +600,22 @@ public:
             mContextLossTimerRunning = false;
         }
     }
 
     // WebIDL WebGLRenderingContext API
     nsHTMLCanvasElement* GetCanvas() const {
         return mCanvasElement;
     }
-    WebGLsizei GetDrawingBufferWidth() const {
+    WebGLsizei DrawingBufferWidth() const {
         if (!IsContextStable())
             return 0;
         return mWidth;
     }
-    WebGLsizei GetDrawingBufferHeight() const {
+    WebGLsizei DrawingBufferHeight() const {
         if (!IsContextStable())
             return 0;
         return mHeight;
     }
         
     JSObject *GetContextAttributes(ErrorResult &rv);
     bool IsContextLost() const { return !IsContextStable(); }
     void GetSupportedExtensions(dom::Nullable< nsTArray<nsString> > &retval);
--- a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
+++ b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
@@ -1449,17 +1449,17 @@ nsCanvasRenderingContext2DAzure::SetGlob
 {
   SetGlobalAlpha((double)aGlobalAlpha);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::GetGlobalAlpha(float *aGlobalAlpha)
 {
-  *aGlobalAlpha = GetGlobalAlpha();
+  *aGlobalAlpha = GlobalAlpha();
   return NS_OK;
 }
 
 void
 nsCanvasRenderingContext2DAzure::SetStyleFromJSValue(JSContext* cx,
                                                      JS::Value& value,
                                                      Style whichStyle)
 {
@@ -1896,45 +1896,45 @@ nsCanvasRenderingContext2DAzure::SetShad
 {
   SetShadowOffsetX((double)x);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::GetShadowOffsetX(float *x)
 {
-  *x = static_cast<float>(GetShadowOffsetX());
+  *x = static_cast<float>(ShadowOffsetX());
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::SetShadowOffsetY(float y)
 {
   SetShadowOffsetY((double)y);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::GetShadowOffsetY(float *y)
 {
-  *y = static_cast<float>(GetShadowOffsetY());
+  *y = static_cast<float>(ShadowOffsetY());
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::SetShadowBlur(float blur)
 {
   SetShadowBlur((double)blur);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::GetShadowBlur(float *blur)
 {
-  *blur = GetShadowBlur();
+  *blur = ShadowBlur();
   return NS_OK;
 }
 
 void
 nsCanvasRenderingContext2DAzure::SetShadowColor(const nsAString& shadowColor)
 {
   nscolor color;
   if (!ParseColor(shadowColor, &color)) {
@@ -3404,17 +3404,17 @@ nsCanvasRenderingContext2DAzure::SetLine
 {
   SetLineWidth((double)width);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::GetLineWidth(float *width)
 {
-  *width = GetLineWidth();
+  *width = LineWidth();
   return NS_OK;
 }
 
 void
 nsCanvasRenderingContext2DAzure::SetLineCap(const nsAString& capstyle)
 {
   CapStyle cap;
 
@@ -3523,17 +3523,17 @@ nsCanvasRenderingContext2DAzure::SetMite
 {
   SetMiterLimit((double)miter);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::GetMiterLimit(float *miter)
 {
-  *miter = GetMiterLimit();
+  *miter = MiterLimit();
   return NS_OK;
 }
 
 void
 nsCanvasRenderingContext2DAzure::SetMozDash(JSContext* cx,
                                             const JS::Value& mozDash,
                                             ErrorResult& error)
 {
@@ -3583,17 +3583,17 @@ nsCanvasRenderingContext2DAzure::SetMozD
     state.dashOffset = offset;
   }
   return NS_OK;
 }
  
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::GetMozDashOffset(float* offset)
 {
-  *offset = GetMozDashOffset();
+  *offset = MozDashOffset();
   return NS_OK;
 }
 
 bool
 nsCanvasRenderingContext2DAzure::IsPointInPath(double x, double y)
 {
   if (!FloatValidate(x,y)) {
     return false;
@@ -4601,17 +4601,17 @@ nsCanvasRenderingContext2DAzure::CreateI
 {
   /* Should never be called; handled entirely in new bindings */
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::GetMozImageSmoothingEnabled(bool *retVal)
 {
-  *retVal = GetImageSmoothingEnabled();
+  *retVal = ImageSmoothingEnabled();
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCanvasRenderingContext2DAzure::SetMozImageSmoothingEnabled(bool val)
 {
   SetImageSmoothingEnabled(val);
   return NS_OK;
--- a/content/canvas/src/nsCanvasRenderingContext2DAzure.h
+++ b/content/canvas/src/nsCanvasRenderingContext2DAzure.h
@@ -151,17 +151,17 @@ public:
   void Scale(double x, double y, mozilla::ErrorResult& error);
   void Rotate(double angle, mozilla::ErrorResult& error);
   void Translate(double x, double y, mozilla::ErrorResult& error);
   void Transform(double m11, double m12, double m21, double m22, double dx,
                  double dy, mozilla::ErrorResult& error);
   void SetTransform(double m11, double m12, double m21, double m22, double dx,
                     double dy, mozilla::ErrorResult& error);
 
-  double GetGlobalAlpha()
+  double GlobalAlpha()
   {
     return CurrentState().globalAlpha;
   }
 
   void SetGlobalAlpha(double globalAlpha)
   {
     if (mozilla::CanvasUtils::FloatValidate(globalAlpha) &&
         globalAlpha >= 0.0 && globalAlpha <= 1.0) {
@@ -191,41 +191,41 @@ public:
                          mozilla::ErrorResult& aError);
   already_AddRefed<nsIDOMCanvasGradient>
     CreateRadialGradient(double x0, double y0, double r0, double x1, double y1,
                          double r1, mozilla::ErrorResult& aError);
   already_AddRefed<nsIDOMCanvasPattern>
     CreatePattern(const HTMLImageOrCanvasOrVideoElement& element,
                   const nsAString& repeat, mozilla::ErrorResult& error);
 
-  double GetShadowOffsetX()
+  double ShadowOffsetX()
   {
     return CurrentState().shadowOffset.x;
   }
 
   void SetShadowOffsetX(double shadowOffsetX)
   {
     if (mozilla::CanvasUtils::FloatValidate(shadowOffsetX)) {
       CurrentState().shadowOffset.x = shadowOffsetX;
     }
   }
 
-  double GetShadowOffsetY()
+  double ShadowOffsetY()
   {
     return CurrentState().shadowOffset.y;
   }
 
   void SetShadowOffsetY(double shadowOffsetY)
   {
     if (mozilla::CanvasUtils::FloatValidate(shadowOffsetY)) {
       CurrentState().shadowOffset.y = shadowOffsetY;
     }
   }
 
-  double GetShadowBlur()
+  double ShadowBlur()
   {
     return CurrentState().shadowBlur;
   }
 
   void SetShadowBlur(double shadowBlur)
   {
     if (mozilla::CanvasUtils::FloatValidate(shadowBlur) && shadowBlur >= 0.0) {
       CurrentState().shadowBlur = shadowBlur;
@@ -296,33 +296,33 @@ public:
                  mozilla::ErrorResult& error);
   void PutImageData(JSContext* cx, mozilla::dom::ImageData* imageData,
                     double dx, double dy, mozilla::ErrorResult& error);
   void PutImageData(JSContext* cx, mozilla::dom::ImageData* imageData,
                     double dx, double dy, double dirtyX, double dirtyY,
                     double dirtyWidth, double dirtyHeight,
                     mozilla::ErrorResult& error);
 
-  double GetLineWidth()
+  double LineWidth()
   {
     return CurrentState().lineWidth;
   }
 
   void SetLineWidth(double width)
   {
     if (mozilla::CanvasUtils::FloatValidate(width) && width > 0.0) {
       CurrentState().lineWidth = width;
     }
   }
   void GetLineCap(nsAString& linecap);
   void SetLineCap(const nsAString& linecap);
   void GetLineJoin(nsAString& linejoin, mozilla::ErrorResult& error);
   void SetLineJoin(const nsAString& linejoin);
 
-  double GetMiterLimit()
+  double MiterLimit()
   {
     return CurrentState().miterLimit;
   }
 
   void SetMiterLimit(double miter)
   {
     if (mozilla::CanvasUtils::FloatValidate(miter) && miter > 0.0) {
       CurrentState().miterLimit = miter;
@@ -418,17 +418,17 @@ public:
   void SetMozCurrentTransformInverse(JSContext* cx, JSObject& currentTransform, 
                                      mozilla::ErrorResult& error);
   void GetFillRule(nsAString& fillRule);
   void SetFillRule(const nsAString& fillRule);
   JS::Value GetMozDash(JSContext* cx, mozilla::ErrorResult& error);
   void SetMozDash(JSContext* cx, const JS::Value& mozDash,
                   mozilla::ErrorResult& error);
 
-  double GetMozDashOffset()
+  double MozDashOffset()
   {
     return CurrentState().dashOffset;
   }
 
   void SetMozDashOffset(double mozDashOffset, mozilla::ErrorResult& error);
 
   void GetMozTextStyle(nsAString& mozTextStyle)
   {
@@ -436,17 +436,17 @@ public:
   }
 
   void SetMozTextStyle(const nsAString& mozTextStyle,
                        mozilla::ErrorResult& error)
   {
     SetFont(mozTextStyle, error);
   }
 
-  bool GetImageSmoothingEnabled()
+  bool ImageSmoothingEnabled()
   {
     return CurrentState().imageSmoothingEnabled;
   }
 
   void SetImageSmoothingEnabled(bool imageSmoothingEnabled)
   {
     if (imageSmoothingEnabled != CurrentState().imageSmoothingEnabled) {
       CurrentState().imageSmoothingEnabled = imageSmoothingEnabled;
--- a/dom/base/nsPerformance.cpp
+++ b/dom/base/nsPerformance.cpp
@@ -40,91 +40,91 @@ nsPerformanceTiming::nsPerformanceTiming
   SetIsDOMBinding();
 }
 
 nsPerformanceTiming::~nsPerformanceTiming()
 {
 }
 
 DOMTimeMilliSec
-nsPerformanceTiming::GetDomainLookupStart() const
+nsPerformanceTiming::DomainLookupStart() const
 {
   if (!mChannel) {
-    return GetFetchStart();
+    return FetchStart();
   }
   mozilla::TimeStamp stamp;
   mChannel->GetDomainLookupStart(&stamp);
   return GetDOMTiming()->TimeStampToDOMOrFetchStart(stamp);
 }
 
 DOMTimeMilliSec
-nsPerformanceTiming::GetDomainLookupEnd() const
+nsPerformanceTiming::DomainLookupEnd() const
 {
   if (!mChannel) {
-    return GetFetchStart();
+    return FetchStart();
   }
   mozilla::TimeStamp stamp;
   mChannel->GetDomainLookupEnd(&stamp);
   return GetDOMTiming()->TimeStampToDOMOrFetchStart(stamp);
 }
 
 DOMTimeMilliSec
-nsPerformanceTiming::GetConnectStart() const
+nsPerformanceTiming::ConnectStart() const
 {
   if (!mChannel) {
-    return GetFetchStart();
+    return FetchStart();
   }
   mozilla::TimeStamp stamp;
   mChannel->GetConnectStart(&stamp);
   return GetDOMTiming()->TimeStampToDOMOrFetchStart(stamp);
 }
 
 DOMTimeMilliSec
-nsPerformanceTiming::GetConnectEnd() const
+nsPerformanceTiming::ConnectEnd() const
 {
   if (!mChannel) {
-    return GetFetchStart();
+    return FetchStart();
   }
   mozilla::TimeStamp stamp;
   mChannel->GetConnectEnd(&stamp);
   return GetDOMTiming()->TimeStampToDOMOrFetchStart(stamp);
 }
 
 DOMTimeMilliSec
-nsPerformanceTiming::GetRequestStart() const
+nsPerformanceTiming::RequestStart() const
 {
   if (!mChannel) {
-    return GetFetchStart();
+    return FetchStart();
   }
   mozilla::TimeStamp stamp;
   mChannel->GetRequestStart(&stamp);
   return GetDOMTiming()->TimeStampToDOMOrFetchStart(stamp);
 }
 
 DOMTimeMilliSec
-nsPerformanceTiming::GetResponseStart() const
+nsPerformanceTiming::ResponseStart() const
 {
   if (!mChannel) {
-    return GetFetchStart();
+    return FetchStart();
   }
   mozilla::TimeStamp stamp;
   mChannel->GetResponseStart(&stamp);
   mozilla::TimeStamp cacheStamp;
   mChannel->GetCacheReadStart(&cacheStamp);
   if (stamp.IsNull() || (!cacheStamp.IsNull() && cacheStamp < stamp)) {
     stamp = cacheStamp;
   }
   return GetDOMTiming()->TimeStampToDOMOrFetchStart(stamp);
 }
 
 DOMTimeMilliSec
-nsPerformanceTiming::GetResponseEnd() const
+nsPerformanceTiming::ResponseEnd() const
 {
   if (!mChannel) {
-    return GetFetchStart();
+    return FetchStart();
   }
   mozilla::TimeStamp stamp;
   mChannel->GetResponseEnd(&stamp);
   mozilla::TimeStamp cacheStamp;
   mChannel->GetCacheReadEnd(&cacheStamp);
   if (stamp.IsNull() || (!cacheStamp.IsNull() && cacheStamp < stamp)) {
     stamp = cacheStamp;
   }
@@ -199,26 +199,26 @@ nsPerformance::~nsPerformance()
 // QueryInterface implementation for nsPerformance
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsPerformance)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 
 nsPerformanceTiming*
-nsPerformance::GetTiming()
+nsPerformance::Timing()
 {
   if (!mTiming) {
     mTiming = new nsPerformanceTiming(this, mChannel);
   }
   return mTiming;
 }
 
 nsPerformanceNavigation*
-nsPerformance::GetNavigation()
+nsPerformance::Navigation()
 {
   if (!mNavigation) {
     mNavigation = new nsPerformanceNavigation(this);
   }
   return mNavigation;
 }
 
 DOMHighResTimeStamp
--- a/dom/base/nsPerformance.h
+++ b/dom/base/nsPerformance.h
@@ -34,60 +34,60 @@ public:
   nsPerformance* GetParentObject() const
   {
     return mPerformance;
   }
 
   JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap);
 
   // PerformanceNavigation WebIDL methods
-  DOMTimeMilliSec GetNavigationStart() const {
+  DOMTimeMilliSec NavigationStart() const {
     return GetDOMTiming()->GetNavigationStart();
   }
-  DOMTimeMilliSec GetUnloadEventStart() {
+  DOMTimeMilliSec UnloadEventStart() {
     return GetDOMTiming()->GetUnloadEventStart();
   }
-  DOMTimeMilliSec GetUnloadEventEnd() {
+  DOMTimeMilliSec UnloadEventEnd() {
     return GetDOMTiming()->GetUnloadEventEnd();
   }
-  DOMTimeMilliSec GetRedirectStart() {
+  DOMTimeMilliSec RedirectStart() {
     return GetDOMTiming()->GetRedirectStart();
   }
-  DOMTimeMilliSec GetRedirectEnd() {
+  DOMTimeMilliSec RedirectEnd() {
     return GetDOMTiming()->GetRedirectEnd();
   }
-  DOMTimeMilliSec GetFetchStart() const {
+  DOMTimeMilliSec FetchStart() const {
     return GetDOMTiming()->GetFetchStart();
   }
-  DOMTimeMilliSec GetDomainLookupStart() const;
-  DOMTimeMilliSec GetDomainLookupEnd() const;
-  DOMTimeMilliSec GetConnectStart() const;
-  DOMTimeMilliSec GetConnectEnd() const;
-  DOMTimeMilliSec GetRequestStart() const;
-  DOMTimeMilliSec GetResponseStart() const;
-  DOMTimeMilliSec GetResponseEnd() const;
-  DOMTimeMilliSec GetDomLoading() const {
+  DOMTimeMilliSec DomainLookupStart() const;
+  DOMTimeMilliSec DomainLookupEnd() const;
+  DOMTimeMilliSec ConnectStart() const;
+  DOMTimeMilliSec ConnectEnd() const;
+  DOMTimeMilliSec RequestStart() const;
+  DOMTimeMilliSec ResponseStart() const;
+  DOMTimeMilliSec ResponseEnd() const;
+  DOMTimeMilliSec DomLoading() const {
     return GetDOMTiming()->GetDomLoading();
   }
-  DOMTimeMilliSec GetDomInteractive() const {
+  DOMTimeMilliSec DomInteractive() const {
     return GetDOMTiming()->GetDomInteractive();
   }
-  DOMTimeMilliSec GetDomContentLoadedEventStart() const {
+  DOMTimeMilliSec DomContentLoadedEventStart() const {
     return GetDOMTiming()->GetDomContentLoadedEventStart();
   }
-  DOMTimeMilliSec GetDomContentLoadedEventEnd() const {
+  DOMTimeMilliSec DomContentLoadedEventEnd() const {
     return GetDOMTiming()->GetDomContentLoadedEventEnd();
   }
-  DOMTimeMilliSec GetDomComplete() const {
+  DOMTimeMilliSec DomComplete() const {
     return GetDOMTiming()->GetDomComplete();
   }
-  DOMTimeMilliSec GetLoadEventStart() const {
+  DOMTimeMilliSec LoadEventStart() const {
     return GetDOMTiming()->GetLoadEventStart();
   }
-  DOMTimeMilliSec GetLoadEventEnd() const {
+  DOMTimeMilliSec LoadEventEnd() const {
     return GetDOMTiming()->GetLoadEventEnd();
   }
 
 private:
   ~nsPerformanceTiming();
   nsRefPtr<nsPerformance> mPerformance;
   nsCOMPtr<nsITimedChannel> mChannel;
 };
@@ -106,20 +106,20 @@ public:
   nsPerformance* GetParentObject() const
   {
     return mPerformance;
   }
 
   JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap);
 
   // PerformanceNavigation WebIDL methods
-  uint16_t GetType() const {
+  uint16_t Type() const {
     return GetDOMTiming()->GetType();
   }
-  uint16_t GetRedirectCount() const {
+  uint16_t RedirectCount() const {
     return GetDOMTiming()->GetRedirectCount();
   }
 
 private:
   ~nsPerformanceNavigation();
   nsRefPtr<nsPerformance> mPerformance;
 };
 
@@ -149,18 +149,18 @@ public:
   {
     return mWindow.get();
   }
 
   JSObject* WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap);
 
   // Performance WebIDL methods
   DOMHighResTimeStamp Now();
-  nsPerformanceTiming* GetTiming();
-  nsPerformanceNavigation* GetNavigation();
+  nsPerformanceTiming* Timing();
+  nsPerformanceNavigation* Navigation();
 
 private:
   ~nsPerformance();
 
   nsCOMPtr<nsIDOMWindow> mWindow;
   nsRefPtr<nsDOMNavigationTiming> mDOMTiming;
   nsCOMPtr<nsITimedChannel> mChannel;
   nsRefPtr<nsPerformanceTiming> mTiming;
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -3476,17 +3476,26 @@ class CGSpecializedGetter(CGAbstractStat
         args = [ Argument('JSContext*', 'cx'),
                  Argument('JSHandleObject', 'obj'),
                  Argument('%s*' % descriptor.nativeType, 'self'),
                  Argument('JS::Value*', 'vp') ]
         CGAbstractStaticMethod.__init__(self, descriptor, name, "bool", args)
 
     def definition_body(self):
         name = self.attr.identifier.name
-        nativeName = "Get" + MakeNativeName(self.descriptor.binaryNames.get(name, name))
+        nativeName = MakeNativeName(self.descriptor.binaryNames.get(name, name))
+        # resultOutParam does not depend on whether resultAlreadyAddRefed is set
+        (_, resultOutParam) = getRetvalDeclarationForType(self.attr.type,
+                                                          self.descriptor,
+                                                          False)
+        infallible = ('infallible' in
+                      self.descriptor.getExtendedAttributes(self.attr,
+                                                            getter=True))
+        if resultOutParam or self.attr.type.nullable() or not infallible:
+            nativeName = "Get" + nativeName
         return CGIndenter(CGGetterCall(self.attr.type, nativeName,
                                        self.descriptor, self.attr)).define()
 
 class CGGenericSetter(CGAbstractBindingMethod):
     """
     A class for generating the C++ code for an IDL attribute setter.
     """
     def __init__(self, descriptor):
@@ -4717,17 +4726,17 @@ class CGDOMJSProxyHandler_getOwnProperty
     def __init__(self, descriptor):
         args = [Argument('JSContext*', 'cx'), Argument('JSObject*', 'proxy'),
                 Argument('JS::AutoIdVector&', 'props')]
         ClassMethod.__init__(self, "getOwnPropertyNames", "bool", args)
         self.descriptor = descriptor
     def getBody(self):
         indexedGetter = self.descriptor.operations['IndexedGetter']
         if indexedGetter:
-            addIndices = """uint32_t length = UnwrapProxy(proxy)->GetLength();
+            addIndices = """uint32_t length = UnwrapProxy(proxy)->Length();
 MOZ_ASSERT(int32_t(length) >= 0);
 for (int32_t i = 0; i < int32_t(length); ++i) {
   if (!props.append(INT_TO_JSID(i))) {
     return false;
   }
 }
 
 """
--- a/dom/bindings/test/TestBindingHeader.h
+++ b/dom/bindings/test/TestBindingHeader.h
@@ -45,18 +45,18 @@ class IndirectlyImplementedInterface : p
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID)
   NS_DECL_ISUPPORTS
 
   // We need a GetParentObject to make binding codegen happy
   virtual nsISupports* GetParentObject();
 
-  bool GetIndirectlyImplementedProperty();
-  void SetIndirectlyImplementedProperty(bool);
+  bool IndirectlyImplementedProperty();
+  void IndirectlyImplementedProperty(bool);
   void IndirectlyImplementedMethod();
 };
 
 // IID for the TestExternalInterface
 #define NS_TEST_EXTERNAL_INTERFACE_IID \
 { 0xd5ba0c99, 0x9b1d, 0x4e71, \
  { 0x8a, 0x94, 0x56, 0x38, 0x6c, 0xa3, 0xda, 0x3d } }
 class TestExternalInterface : public nsISupports
@@ -123,91 +123,91 @@ public:
   /*  static
   already_AddRefed<TestInterface> Constructor(nsISupports*,
                                               uint32_t, uint32_t,
                                               const TestInterfaceOrOnlyForUseInConstructor&,
                                               ErrorResult&);
   */
   
   // Integer types
-  int8_t GetReadonlyByte();
-  int8_t GetWritableByte();
+  int8_t ReadonlyByte();
+  int8_t WritableByte();
   void SetWritableByte(int8_t);
   void PassByte(int8_t);
   int8_t ReceiveByte();
   void PassOptionalByte(const Optional<int8_t>&);
   void PassOptionalByteWithDefault(int8_t);
   void PassNullableByte(Nullable<int8_t>&);
   void PassOptionalNullableByte(const Optional< Nullable<int8_t> >&);
 
-  int16_t GetReadonlyShort();
-  int16_t GetWritableShort();
+  int16_t ReadonlyShort();
+  int16_t WritableShort();
   void SetWritableShort(int16_t);
   void PassShort(int16_t);
   int16_t ReceiveShort();
   void PassOptionalShort(const Optional<int16_t>&);
   void PassOptionalShortWithDefault(int16_t);
 
-  int32_t GetReadonlyLong();
-  int32_t GetWritableLong();
+  int32_t ReadonlyLong();
+  int32_t WritableLong();
   void SetWritableLong(int32_t);
   void PassLong(int32_t);
   int16_t ReceiveLong();
   void PassOptionalLong(const Optional<int32_t>&);
   void PassOptionalLongWithDefault(int32_t);
 
-  int64_t GetReadonlyLongLong();
-  int64_t GetWritableLongLong();
+  int64_t ReadonlyLongLong();
+  int64_t WritableLongLong();
   void SetWritableLongLong(int64_t);
   void PassLongLong(int64_t);
   int64_t ReceiveLongLong();
   void PassOptionalLongLong(const Optional<int64_t>&);
   void PassOptionalLongLongWithDefault(int64_t);
 
-  uint8_t GetReadonlyOctet();
-  uint8_t GetWritableOctet();
+  uint8_t ReadonlyOctet();
+  uint8_t WritableOctet();
   void SetWritableOctet(uint8_t);
   void PassOctet(uint8_t);
   uint8_t ReceiveOctet();
   void PassOptionalOctet(const Optional<uint8_t>&);
   void PassOptionalOctetWithDefault(uint8_t);
 
-  uint16_t GetReadonlyUnsignedShort();
-  uint16_t GetWritableUnsignedShort();
+  uint16_t ReadonlyUnsignedShort();
+  uint16_t WritableUnsignedShort();
   void SetWritableUnsignedShort(uint16_t);
   void PassUnsignedShort(uint16_t);
   uint16_t ReceiveUnsignedShort();
   void PassOptionalUnsignedShort(const Optional<uint16_t>&);
   void PassOptionalUnsignedShortWithDefault(uint16_t);
 
-  uint32_t GetReadonlyUnsignedLong();
-  uint32_t GetWritableUnsignedLong();
+  uint32_t ReadonlyUnsignedLong();
+  uint32_t WritableUnsignedLong();
   void SetWritableUnsignedLong(uint32_t);
   void PassUnsignedLong(uint32_t);
   uint32_t ReceiveUnsignedLong();
   void PassOptionalUnsignedLong(const Optional<uint32_t>&);
   void PassOptionalUnsignedLongWithDefault(uint32_t);
 
-  uint64_t GetReadonlyUnsignedLongLong();
-  uint64_t GetWritableUnsignedLongLong();
+  uint64_t ReadonlyUnsignedLongLong();
+  uint64_t WritableUnsignedLongLong();
   void SetWritableUnsignedLongLong(uint64_t);
   void PassUnsignedLongLong(uint64_t);
   uint64_t ReceiveUnsignedLongLong();
   void PassOptionalUnsignedLongLong(const Optional<uint64_t>&);
   void PassOptionalUnsignedLongLongWithDefault(uint64_t);
 
   // Interface types
   already_AddRefed<TestInterface> ReceiveSelf();
   already_AddRefed<TestInterface> ReceiveNullableSelf();
   TestInterface* ReceiveWeakSelf();
   TestInterface* ReceiveWeakNullableSelf();
   void PassSelf(TestInterface&);
   void PassSelf2(NonNull<TestInterface>&);
   void PassNullableSelf(TestInterface*);
-  already_AddRefed<TestInterface> GetNonNullSelf();
+  already_AddRefed<TestInterface> NonNullSelf();
   void SetNonNullSelf(TestInterface&);
   already_AddRefed<TestInterface> GetNullableSelf();
   void SetNullableSelf(TestInterface*);
   void PassOptionalSelf(const Optional<TestInterface*> &);
   void PassOptionalNonNullSelf(const Optional<NonNull<TestInterface> >&);
   void PassOptionalSelfWithDefault(TestInterface*);
 
   already_AddRefed<TestNonWrapperCacheInterface> ReceiveNonWrapperCacheInterface();
@@ -219,47 +219,47 @@ public:
 
   already_AddRefed<TestNonCastableInterface> ReceiveOther();
   already_AddRefed<TestNonCastableInterface> ReceiveNullableOther();
   TestNonCastableInterface* ReceiveWeakOther();
   TestNonCastableInterface* ReceiveWeakNullableOther();
   void PassOther(TestNonCastableInterface&);
   void PassOther2(NonNull<TestNonCastableInterface>&);
   void PassNullableOther(TestNonCastableInterface*);
-  already_AddRefed<TestNonCastableInterface> GetNonNullOther();
+  already_AddRefed<TestNonCastableInterface> NonNullOther();
   void SetNonNullOther(TestNonCastableInterface&);
   already_AddRefed<TestNonCastableInterface> GetNullableOther();
   void SetNullableOther(TestNonCastableInterface*);
   void PassOptionalOther(const Optional<TestNonCastableInterface*>&);
   void PassOptionalNonNullOther(const Optional<NonNull<TestNonCastableInterface> >&);
   void PassOptionalOtherWithDefault(TestNonCastableInterface*);
 
   already_AddRefed<TestExternalInterface> ReceiveExternal();
   already_AddRefed<TestExternalInterface> ReceiveNullableExternal();
   TestExternalInterface* ReceiveWeakExternal();
   TestExternalInterface* ReceiveWeakNullableExternal();
   void PassExternal(TestExternalInterface*);
   void PassExternal2(TestExternalInterface*);
   void PassNullableExternal(TestExternalInterface*);
-  already_AddRefed<TestExternalInterface> GetNonNullExternal();
+  already_AddRefed<TestExternalInterface> NonNullExternal();
   void SetNonNullExternal(TestExternalInterface*);
   already_AddRefed<TestExternalInterface> GetNullableExternal();
   void SetNullableExternal(TestExternalInterface*);
   void PassOptionalExternal(const Optional<TestExternalInterface*>&);
   void PassOptionalNonNullExternal(const Optional<TestExternalInterface*>&);
   void PassOptionalExternalWithDefault(TestExternalInterface*);
 
   already_AddRefed<TestCallbackInterface> ReceiveCallbackInterface();
   already_AddRefed<TestCallbackInterface> ReceiveNullableCallbackInterface();
   TestCallbackInterface* ReceiveWeakCallbackInterface();
   TestCallbackInterface* ReceiveWeakNullableCallbackInterface();
   void PassCallbackInterface(TestCallbackInterface&);
   void PassCallbackInterface2(OwningNonNull<TestCallbackInterface>);
   void PassNullableCallbackInterface(TestCallbackInterface*);
-  already_AddRefed<TestCallbackInterface> GetNonNullCallbackInterface();
+  already_AddRefed<TestCallbackInterface> NonNullCallbackInterface();
   void SetNonNullCallbackInterface(TestCallbackInterface&);
   already_AddRefed<TestCallbackInterface> GetNullableCallbackInterface();
   void SetNullableCallbackInterface(TestCallbackInterface*);
   void PassOptionalCallbackInterface(const Optional<nsRefPtr<TestCallbackInterface> >&);
   void PassOptionalNonNullCallbackInterface(const Optional<OwningNonNull<TestCallbackInterface> >&);
   void PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface*);
 
   already_AddRefed<IndirectlyImplementedInterface> ReceiveConsequentialInterface();
@@ -321,18 +321,18 @@ public:
   void PassOptionalNullableString(const Optional<nsAString>&);
   void PassOptionalNullableStringWithDefaultValue(const nsAString&);
 
   // Enumarated types
   void PassEnum(TestEnum);
   void PassOptionalEnum(const Optional<TestEnum>&);
   void PassEnumWithDefault(TestEnum);
   TestEnum ReceiveEnum();
-  TestEnum GetEnumAttribute();
-  TestEnum GetReadonlyEnumAttribute();
+  TestEnum EnumAttribute();
+  TestEnum ReadonlyEnumAttribute();
   void SetEnumAttribute(TestEnum);
 
   // Callback types
   void PassCallback(JSContext*, JSObject*);
   void PassNullableCallback(JSContext*, JSObject*);
   void PassOptionalCallback(JSContext*, const Optional<JSObject*>&);
   void PassOptionalNullableCallback(JSContext*, const Optional<JSObject*>&);
   void PassOptionalNullableCallbackWithDefaultValue(JSContext*, JSObject*);
@@ -379,44 +379,44 @@ public:
   void PassUnionWithString(JSContext*, const StringOrObject&);
   //void PassUnionWithEnum(JSContext*, const TestEnumOrObject&);
   void PassUnionWithCallback(JSContext*, const TestCallbackOrLong&);
   void PassUnionWithObject(JSContext*, const ObjectOrLong&);
 
   // binaryNames tests
   void MethodRenamedTo();
   void MethodRenamedTo(int8_t);
-  int8_t GetAttributeGetterRenamedTo();
-  int8_t GetAttributeRenamedTo();
+  int8_t AttributeGetterRenamedTo();
+  int8_t AttributeRenamedTo();
   void SetAttributeRenamedTo(int8_t);
 
   // Dictionary tests
   void PassDictionary(const Dict&);
   void PassOtherDictionary(const GrandparentDict&);
   void PassSequenceOfDictionaries(const Sequence<Dict>&);
   void PassDictionaryOrLong(const Dict&);
   void PassDictionaryOrLong(int32_t);
   void PassDictContainingDict(const DictContainingDict&);
 
   // Typedefs
   void ExerciseTypedefInterfaces1(TestInterface&);
   already_AddRefed<TestInterface> ExerciseTypedefInterfaces2(TestInterface*);
   void ExerciseTypedefInterfaces3(TestInterface&);
 
   // Methods and properties imported via "implements"
-  bool GetImplementedProperty();
+  bool ImplementedProperty();
   void SetImplementedProperty(bool);
   void ImplementedMethod();
-  bool GetImplementedParentProperty();
+  bool ImplementedParentProperty();
   void SetImplementedParentProperty(bool);
   void ImplementedParentMethod();
-  bool GetIndirectlyImplementedProperty();
+  bool IndirectlyImplementedProperty();
   void SetIndirectlyImplementedProperty(bool);
   void IndirectlyImplementedMethod();
-  uint32_t GetDiamondImplementedProperty();
+  uint32_t DiamondImplementedProperty();
 
   // Test EnforceRange/Clamp
   void DontEnforceRangeOrClamp(int8_t);
   void DoEnforceRange(int8_t);
   void DoClamp(int8_t);
 
 private:
   // We add signatures here that _could_ start matching if the codegen
@@ -551,17 +551,17 @@ public:
 
   // We need a GetParentObject to make binding codegen happy
   virtual nsISupports* GetParentObject();
 
   uint32_t IndexedGetter(uint32_t, bool&);
   uint32_t IndexedGetter(uint32_t&) MOZ_DELETE;
   uint32_t Item(uint32_t&);
   uint32_t Item(uint32_t, bool&) MOZ_DELETE;
-  uint32_t GetLength();
+  uint32_t Length();
 };
 
 class TestNamedGetterInterface : public nsISupports,
                                  public nsWrapperCache
 {
 public:
   NS_DECL_ISUPPORTS
 
@@ -578,17 +578,17 @@ public:
   NS_DECL_ISUPPORTS
 
   // We need a GetParentObject to make binding codegen happy
   virtual nsISupports* GetParentObject();
 
   uint32_t IndexedGetter(uint32_t, bool&);
   void NamedGetter(const nsAString&, bool&, nsAString&);
   void NamedItem(const nsAString&, nsAString&);
-  uint32_t GetLength();
+  uint32_t Length();
 };
 
 class TestIndexedSetterInterface : public nsISupports,
                                    public nsWrapperCache
 {
 public:
   NS_DECL_ISUPPORTS
 
@@ -631,15 +631,15 @@ public:
   uint32_t IndexedGetter(uint32_t, bool&);
   uint32_t Item(uint32_t);
   void NamedGetter(const nsAString&, bool&, nsAString&);
   void NamedItem(const nsAString&, nsAString&);
   void IndexedSetter(uint32_t, int32_t&);
   void IndexedSetter(uint32_t, const nsAString&) MOZ_DELETE;
   void NamedSetter(const nsAString&, const nsAString&);
   void Stringify(nsAString&);
-  uint32_t GetLength();
+  uint32_t Length();
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif /* TestBindingHeader_h */
--- a/dom/webidl/CSSStyleDeclaration.webidl
+++ b/dom/webidl/CSSStyleDeclaration.webidl
@@ -25,10 +25,10 @@ interface CSSStyleDeclaration {
   DOMString getPropertyPriority(DOMString property);
   // This would be nicer if it used a string default value of "".
   // See bug 759622.
   [Throws]
   void setProperty(DOMString property, DOMString value, [TreatNullAs=EmptyString] optional DOMString priority);
   [Throws]
   DOMString removeProperty(DOMString property);
 
-  readonly attribute CSSRule parentRule;
+  readonly attribute CSSRule? parentRule;
 };
--- a/dom/webidl/CanvasRenderingContext2D.webidl
+++ b/dom/webidl/CanvasRenderingContext2D.webidl
@@ -19,18 +19,19 @@ interface HTMLImageElement;
 interface HTMLVideoElement;
 interface ImageData;
 interface TextMetrics;
 interface Window;
 interface XULElement;
 
 interface CanvasRenderingContext2D {
 
-  // back-reference to the canvas
-  readonly attribute HTMLCanvasElement canvas;
+  // back-reference to the canvas.  Might be null if we're not
+  // associated with a canvas.
+  readonly attribute HTMLCanvasElement? canvas;
 
   // state
   void save(); // push state on state stack
   void restore(); // pop state stack and restore state
 
   // transformations (default transform is the identity matrix)
 // NOT IMPLEMENTED           attribute SVGMatrix currentTransform;
   [Throws]
--- a/dom/webidl/WebGLRenderingContext.webidl
+++ b/dom/webidl/WebGLRenderingContext.webidl
@@ -467,17 +467,18 @@ interface WebGLRenderingContext {
     
     /* WebGL-specific enums */
     const unsigned long UNPACK_FLIP_Y_WEBGL            = 0x9240;
     const unsigned long UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;
     const unsigned long CONTEXT_LOST_WEBGL             = 0x9242;
     const unsigned long UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243;
     const unsigned long BROWSER_DEFAULT_WEBGL          = 0x9244;
 
-    readonly attribute HTMLCanvasElement canvas;
+    // The canvas might actually be null in some cases, apparently.
+    readonly attribute HTMLCanvasElement? canvas;
 
     readonly attribute long drawingBufferWidth;
 
     readonly attribute long drawingBufferHeight;
 
     [WebGLHandlesContextLoss, Throws] WebGLContextAttributes getContextAttributes();
     [WebGLHandlesContextLoss] boolean isContextLost();
 
--- a/dom/webidl/XMLHttpRequest.webidl
+++ b/dom/webidl/XMLHttpRequest.webidl
@@ -132,17 +132,17 @@ interface XMLHttpRequest : XMLHttpReques
   // Mozilla-specific stuff
   [SetterThrows=Workers]
   attribute boolean multipart;
 
   [SetterThrows=Workers]
   attribute boolean mozBackgroundRequest;
 
   [ChromeOnly]
-  readonly attribute MozChannel channel;
+  readonly attribute MozChannel? channel;
 
   [Throws]
   void sendAsBinary(DOMString body);
   [Throws, ChromeOnly]
   any getInterface(IID iid);
 
   readonly attribute boolean mozAnon;
   readonly attribute boolean mozSystem;
--- a/dom/workers/XMLHttpRequest.cpp
+++ b/dom/workers/XMLHttpRequest.cpp
@@ -601,17 +601,17 @@ public:
         }
       }
     }
 
     mStatusResult = xhr->GetStatus(&mStatus);
 
     xhr->GetStatusText(mStatusText);
 
-    mReadyState = xhr->GetReadyState();
+    mReadyState = xhr->ReadyState();
 
     return true;
   }
 
   bool
   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
   {
     if (mEventStreamId != mProxy->mOuterEventStreamId) {
--- a/dom/workers/XMLHttpRequest.h
+++ b/dom/workers/XMLHttpRequest.h
@@ -108,59 +108,59 @@ public:
     SetEventListener(NS_LITERAL_STRING(#_type), aListener, aRv);               \
   }
 
   IMPL_GETTER_AND_SETTER(readystatechange)
 
 #undef IMPL_GETTER_AND_SETTER
 
   uint16_t
-  GetReadyState() const
+  ReadyState() const
   {
     return mStateData.mReadyState;
   }
 
   void
   Open(const nsAString& aMethod, const nsAString& aUrl, bool aAsync,
        const Optional<nsAString>& aUser, const Optional<nsAString>& aPassword,
        ErrorResult& aRv);
 
   void
   SetRequestHeader(const nsAString& aHeader, const nsAString& aValue,
                    ErrorResult& aRv);
 
   uint32_t
-  GetTimeout() const
+  Timeout() const
   {
     return mTimeout;
   }
 
   void
   SetTimeout(uint32_t aTimeout, ErrorResult& aRv);
 
   bool
-  GetWithCredentials() const
+  WithCredentials() const
   {
     return mWithCredentials;
   }
 
   void
   SetWithCredentials(bool aWithCredentials, ErrorResult& aRv);
 
   bool
-  GetMultipart() const
+  Multipart() const
   {
     return mMultipart;
   }
 
   void
   SetMultipart(bool aMultipart, ErrorResult& aRv);
 
   bool
-  GetMozBackgroundRequest() const
+  MozBackgroundRequest() const
   {
     return mBackgroundRequest;
   }
 
   void
   SetMozBackgroundRequest(bool aBackgroundRequest, ErrorResult& aRv);
 
   XMLHttpRequestUpload*
@@ -205,17 +205,17 @@ public:
 
   void
   GetAllResponseHeaders(nsAString& aResponseHeaders, ErrorResult& aRv);
 
   void
   OverrideMimeType(const nsAString& aMimeType, ErrorResult& aRv);
 
   XMLHttpRequestResponseType
-  GetResponseType() const
+  ResponseType() const
   {
     return mResponseType;
   }
 
   void
   SetResponseType(XMLHttpRequestResponseType aResponseType, ErrorResult& aRv);
 
   jsval
@@ -257,22 +257,22 @@ public:
 
   void
   NullResponseText()
   {
     mStateData.mResponseText.SetIsVoid(true);
     mStateData.mResponse = JSVAL_NULL;
   }
 
-  bool GetMozAnon() {
+  bool MozAnon() {
     // TODO: bug 761227
     return false;
   }
 
-  bool GetMozSystem() {
+  bool MozSystem() {
     // TODO: bug 761227
     return false;
   }
 
 private:
   enum ReleaseType { Default, XHRIsGoingAway, WorkerIsGoingAway };
 
   void
--- a/layout/style/nsICSSDeclaration.h
+++ b/layout/style/nsICSSDeclaration.h
@@ -89,17 +89,17 @@ public:
   void SetCssText(const nsAString& aString, mozilla::ErrorResult& rv) {
     rv = SetCssText(aString);
   }
   void GetCssText(nsString& aString) {
     // Cast to nsAString& so we end up calling our virtual
     // |GetCssText(nsAString& aCssText)| overload, which does the real work.
     GetCssText(static_cast<nsAString&>(aString));
   }
-  uint32_t GetLength() {
+  uint32_t Length() {
     uint32_t length;
     GetLength(&length);
     return length;
   }
   void Item(uint32_t aIndex, nsString& aPropName) {
     Item(aIndex, static_cast<nsAString&>(aPropName));
   }