Bug 1454251: Remove nsINode::ePROCESSING_INSTRUCTION. r=bz

MozReview-Commit-ID: Xz5UiIgRpz
This commit is contained in:
Emilio Cobos Álvarez 2018-04-15 15:04:07 +02:00
Родитель 6766804ba7
Коммит fea49419b0
7 изменённых файлов: 9 добавлений и 27 удалений

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

@ -414,8 +414,6 @@ public:
enum {
/** nsIAttribute nodes */
eATTRIBUTE = 1 << 2,
/** xml processing instructions */
ePROCESSING_INSTRUCTION = 1 << 4,
/** form control elements */
eHTML_FORM_CONTROL = 1 << 6,
/** animation elements */

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

@ -79,12 +79,6 @@ ProcessingInstruction::GetAttrValue(nsAtom *aName, nsAString& aValue)
return nsContentUtils::GetPseudoAttributeValue(data, aName, aValue);
}
bool
ProcessingInstruction::IsNodeOfType(uint32_t aFlags) const
{
return !(aFlags & ~ePROCESSING_INSTRUCTION);
}
already_AddRefed<CharacterData>
ProcessingInstruction::CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
bool aCloneText) const

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

@ -25,9 +25,6 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsINode
virtual bool IsNodeOfType(uint32_t aFlags) const override;
virtual already_AddRefed<CharacterData>
CloneDataNode(mozilla::dom::NodeInfo *aNodeInfo,
bool aCloneText) const override;

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

@ -306,7 +306,7 @@ txXPathNodeUtils::getLocalName(const txXPathNode& aNode)
return localName.forget();
}
if (aNode.mNode->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
if (aNode.mNode->IsProcessingInstruction()) {
return NS_Atomize(aNode.mNode->NodeName());
}
@ -353,7 +353,7 @@ txXPathNodeUtils::getLocalName(const txXPathNode& aNode, nsAString& aLocalName)
return;
}
if (aNode.mNode->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
if (aNode.mNode->IsProcessingInstruction()) {
// PIs don't have a nodeinfo but do have a name
// XXXbz Not actually true, but this function looks like it wants
// different things from elements and PIs for "local name"...

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

@ -231,8 +231,7 @@ txXPathNodeUtils::isAttribute(const txXPathNode& aNode)
inline bool
txXPathNodeUtils::isProcessingInstruction(const txXPathNode& aNode)
{
return aNode.isContent() &&
aNode.Content()->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION);
return aNode.isContent() && aNode.Content()->IsProcessingInstruction();
}
/* static */

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

@ -5516,8 +5516,7 @@ nsCSSFrameConstructor::ShouldCreateItemsForChild(nsFrameConstructorState& aState
}
// never create frames for comments or PIs
if (aContent->IsComment() ||
aContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
if (aContent->IsComment() || aContent->IsProcessingInstruction()) {
return false;
}
@ -6380,8 +6379,7 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
// if we haven't already, resolve a style to find the display type of
// aContent.
if (UNSET_DISPLAY == aDisplay) {
if (aContent->IsComment() ||
aContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
if (aContent->IsComment() || aContent->IsProcessingInstruction()) {
// Comments and processing instructions never have frames, so we should
// not try to generate styles for them.
return false;
@ -10137,8 +10135,7 @@ nsCSSFrameConstructor::AddFCItemsForAnonymousContent(
"Should not be marked as needing frames");
MOZ_ASSERT(!content->GetPrimaryFrame(),
"Should have no existing frame");
MOZ_ASSERT(!content->IsComment() &&
!content->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION),
MOZ_ASSERT(!content->IsComment() && !content->IsProcessingInstruction(),
"Why is someone creating garbage anonymous content");
// Make sure we eagerly performed the servo cascade when the anonymous
@ -11484,8 +11481,7 @@ nsCSSFrameConstructor::BuildInlineChildItems(nsFrameConstructorState& aState,
// AddFrameConstructionItems. We know our parent is a non-replaced inline,
// so there is no need to do the NeedFrameFor check.
content->UnsetFlags(NODE_DESCENDANTS_NEED_FRAMES | NODE_NEEDS_FRAME);
if (content->IsComment() ||
content->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
if (content->IsComment() || content->IsProcessingInstruction()) {
continue;
}

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

@ -746,8 +746,7 @@ nsStyleUtil::IsSignificantChild(nsIContent* aChild,
{
bool isText = aChild->IsText();
if (!isText && !aChild->IsComment() &&
!aChild->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
if (!isText && !aChild->IsComment() && !aChild->IsProcessingInstruction()) {
return true;
}
@ -762,8 +761,7 @@ nsStyleUtil::ThreadSafeIsSignificantChild(const nsIContent* aChild,
{
bool isText = aChild->IsText();
if (!isText && !aChild->IsComment() &&
!aChild->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
if (!isText && !aChild->IsComment() && !aChild->IsProcessingInstruction()) {
return true;
}