From cb5c41409208f488fa8334f0082b9b245119da93 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Fri, 20 Jan 2017 18:17:13 -0800 Subject: [PATCH] Bug 1331322 - Stop using a node bit for HasExplicitBaseURI. r=bholley This is only called during URI resolution, and the proptable bit should make this relatively fast. --HG-- extra : rebase_source : 866dd136e6630db3ff7423e30d59151a01c258a6 --- dom/base/nsINode.cpp | 1 - dom/base/nsINode.h | 11 ++++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp index 05ce34bac905..3c04635d0557 100644 --- a/dom/base/nsINode.cpp +++ b/dom/base/nsINode.cpp @@ -1529,7 +1529,6 @@ nsINode::SetExplicitBaseURI(nsIURI* aURI) { nsresult rv = SetProperty(nsGkAtoms::baseURIProperty, aURI, ReleaseURI); if (NS_SUCCEEDED(rv)) { - SetHasExplicitBaseURI(); NS_ADDREF(aURI); } return rv; diff --git a/dom/base/nsINode.h b/dom/base/nsINode.h index e49b8a8d9d28..b9c24adb9e37 100644 --- a/dom/base/nsINode.h +++ b/dom/base/nsINode.h @@ -1303,10 +1303,11 @@ public: protected: nsIURI* GetExplicitBaseURI() const { - if (HasExplicitBaseURI()) { - return static_cast(GetProperty(nsGkAtoms::baseURIProperty)); + if (!HasProperties()) { + return nullptr; } - return nullptr; + + return static_cast(GetProperty(nsGkAtoms::baseURIProperty)); } public: @@ -1514,8 +1515,6 @@ private: // Maybe set if the node is a root of a subtree // which needs to be kept in the purple buffer. NodeIsPurpleRoot, - // Set if the node has an explicit base URI stored - NodeHasExplicitBaseURI, // Set if the element has some style states locked ElementHasLockedStyleStates, // Set if element has pointer locked @@ -1721,8 +1720,6 @@ protected: void ClearHasName() { ClearBoolFlag(ElementHasName); } void SetMayHaveContentEditableAttr() { SetBoolFlag(ElementMayHaveContentEditableAttr); } - bool HasExplicitBaseURI() const { return GetBoolFlag(NodeHasExplicitBaseURI); } - void SetHasExplicitBaseURI() { SetBoolFlag(NodeHasExplicitBaseURI); } void SetHasLockedStyleStates() { SetBoolFlag(ElementHasLockedStyleStates); } void ClearHasLockedStyleStates() { ClearBoolFlag(ElementHasLockedStyleStates); } bool HasLockedStyleStates() const