Bug 1449393. Devirtualize some nsINode bits. r=mccr8

This commit is contained in:
Boris Zbarsky 2018-03-28 18:01:46 -04:00
Родитель 75860ea92d
Коммит 70b26cdb6c
3 изменённых файлов: 5 добавлений и 26 удалений

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

@ -182,7 +182,7 @@ nsIContent::GetAssignedSlotByMode() const
nsIContent::IMEState nsIContent::IMEState
nsIContent::GetDesiredIMEState() nsIContent::GetDesiredIMEState()
{ {
if (!IsEditableInternal()) { if (!IsEditable()) {
// Check for the special case where we're dealing with elements which don't // Check for the special case where we're dealing with elements which don't
// have the editable flag set, but are readwrite (such as text controls). // have the editable flag set, but are readwrite (such as text controls).
if (!IsElement() || if (!IsElement() ||
@ -227,7 +227,7 @@ dom::Element*
nsIContent::GetEditingHost() nsIContent::GetEditingHost()
{ {
// If this isn't editable, return nullptr. // If this isn't editable, return nullptr.
if (!IsEditableInternal()) { if (!IsEditable()) {
return nullptr; return nullptr;
} }

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

@ -205,7 +205,7 @@ nsINode::CreateSlots()
} }
bool bool
nsINode::IsEditableInternal() const nsINode::IsEditable() const
{ {
if (HasFlag(NODE_IS_EDITABLE)) { if (HasFlag(NODE_IS_EDITABLE)) {
// The node is in an editable contentEditable subtree. // The node is in an editable contentEditable subtree.

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

@ -1217,14 +1217,7 @@ public:
} }
} }
bool IsEditable() const bool IsEditable() const;
{
#ifdef MOZILLA_INTERNAL_API
return IsEditableInternal();
#else
return IsEditableExternal();
#endif
}
/** /**
* Returns true if |this| is native anonymous (i.e. created by * Returns true if |this| is native anonymous (i.e. created by
@ -1298,7 +1291,7 @@ public:
*/ */
nsIContent* GetSelectionRootContent(nsIPresShell* aPresShell); nsIContent* GetSelectionRootContent(nsIPresShell* aPresShell);
virtual nsINodeList* ChildNodes(); nsINodeList* ChildNodes();
nsIContent* GetFirstChild() const { return mFirstChild; } nsIContent* GetFirstChild() const { return mFirstChild; }
nsIContent* GetLastChild() const nsIContent* GetLastChild() const
{ {
@ -1349,14 +1342,6 @@ public:
*/ */
virtual bool IsNodeApzAwareInternal() const; virtual bool IsNodeApzAwareInternal() const;
// HTML elements named <shadow> may or may not be HTMLShadowElement. This is
// a way to ask an element whether it's an HTMLShadowElement.
virtual bool IsHTMLShadowElement() const { return false; }
// Elements named <content> may or may not be HTMLContentElement. This is a
// way to ask an element whether it's an HTMLContentElement.
virtual bool IsHTMLContentElement() const { return false; }
void GetTextContent(nsAString& aTextContent, void GetTextContent(nsAString& aTextContent,
mozilla::OOMReporter& aError) mozilla::OOMReporter& aError)
{ {
@ -1961,12 +1946,6 @@ protected:
*/ */
void InvalidateChildNodes(); void InvalidateChildNodes();
bool IsEditableInternal() const;
virtual bool IsEditableExternal() const
{
return IsEditableInternal();
}
virtual void GetTextContentInternal(nsAString& aTextContent, virtual void GetTextContentInternal(nsAString& aTextContent,
mozilla::OOMReporter& aError); mozilla::OOMReporter& aError);
virtual void SetTextContentInternal(const nsAString& aTextContent, virtual void SetTextContentInternal(const nsAString& aTextContent,