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
This commit is contained in:
Bobby Holley 2017-01-20 18:17:13 -08:00
Родитель a2e79b81e4
Коммит cb5c414092
2 изменённых файлов: 4 добавлений и 8 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -1303,10 +1303,11 @@ public:
protected:
nsIURI* GetExplicitBaseURI() const {
if (HasExplicitBaseURI()) {
return static_cast<nsIURI*>(GetProperty(nsGkAtoms::baseURIProperty));
if (!HasProperties()) {
return nullptr;
}
return nullptr;
return static_cast<nsIURI*>(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