mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 729044 - Avoid nsIParserService in nsFind. r=bzbarsky.
This commit is contained in:
parent
32145c2ed9
commit
5090eda0f2
@ -55,13 +55,13 @@
|
||||
#include "nsTextFragment.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIWordBreaker.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsRange.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
// Yikes! Casting a char to unichar can fill with ones!
|
||||
#define CHAR_TO_UNICHAR(c) ((PRUnichar)(const unsigned char)c)
|
||||
@ -786,15 +786,7 @@ bool nsFind::IsBlockNode(nsIContent* aContent)
|
||||
atom == sTdAtom)
|
||||
return true;
|
||||
|
||||
if (!mParserService) {
|
||||
mParserService = do_GetService(NS_PARSERSERVICE_CONTRACTID);
|
||||
if (!mParserService)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isBlock = false;
|
||||
mParserService->IsBlock(mParserService->HTMLAtomTagToId(atom), isBlock);
|
||||
return isBlock;
|
||||
return nsContentUtils::IsHTMLBlock(atom);
|
||||
}
|
||||
|
||||
bool nsFind::IsTextNode(nsIDOMNode* aNode)
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMRange.h"
|
||||
#include "nsIContentIterator.h"
|
||||
#include "nsIParserService.h"
|
||||
#include "nsIWordBreaker.h"
|
||||
|
||||
class nsIAtom;
|
||||
@ -89,7 +88,6 @@ protected:
|
||||
bool mCaseSensitive;
|
||||
|
||||
nsCOMPtr<nsIWordBreaker> mWordBreaker;
|
||||
nsCOMPtr<nsIParserService> mParserService;
|
||||
|
||||
PRInt32 mIterOffset;
|
||||
nsCOMPtr<nsIDOMNode> mIterNode;
|
||||
|
Loading…
Reference in New Issue
Block a user