2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef __inCSSValueSearch_h__
|
|
|
|
#define __inCSSValueSearch_h__
|
|
|
|
|
|
|
|
#include "inICSSValueSearch.h"
|
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsIDOMDocument.h"
|
|
|
|
#include "inISearchObserver.h"
|
2009-02-03 06:42:18 -08:00
|
|
|
#include "nsTArray.h"
|
2009-08-10 15:52:29 -07:00
|
|
|
#include "nsCSSProps.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsIDOMCSSStyleSheet;
|
|
|
|
class nsIDOMCSSRuleList;
|
|
|
|
class nsIDOMCSSStyleRule;
|
|
|
|
class nsIURI;
|
|
|
|
|
|
|
|
class inCSSValueSearch : public inICSSValueSearch
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_INISEARCHPROCESS
|
|
|
|
NS_DECL_INICSSVALUESEARCH
|
|
|
|
|
|
|
|
inCSSValueSearch();
|
|
|
|
|
|
|
|
protected:
|
2014-06-23 15:40:01 -07:00
|
|
|
virtual ~inCSSValueSearch();
|
2007-03-22 10:30:00 -07:00
|
|
|
nsCOMPtr<inISearchObserver> mObserver;
|
|
|
|
nsCOMPtr<nsIDOMDocument> mDocument;
|
2009-02-03 06:42:18 -08:00
|
|
|
nsTArray<nsAutoString *>* mResults;
|
2007-03-22 10:30:00 -07:00
|
|
|
nsCSSProperty* mProperties;
|
|
|
|
nsString mLastResult;
|
|
|
|
nsString mBaseURL;
|
|
|
|
nsString mTextCriteria;
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t mResultCount;
|
|
|
|
uint32_t mPropertyCount;
|
2011-09-28 23:19:26 -07:00
|
|
|
bool mIsActive;
|
|
|
|
bool mHoldResults;
|
|
|
|
bool mReturnRelativeURLs;
|
|
|
|
bool mNormalizeChromeURLs;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsresult InitSearch();
|
2012-08-22 08:56:38 -07:00
|
|
|
nsresult KillSearch(int16_t aResult);
|
2007-03-22 10:30:00 -07:00
|
|
|
nsresult SearchStyleSheet(nsIDOMCSSStyleSheet* aStyleSheet, nsIURI* aBaseURI);
|
|
|
|
nsresult SearchRuleList(nsIDOMCSSRuleList* aRuleList, nsIURI* aBaseURI);
|
|
|
|
nsresult SearchStyleRule(nsIDOMCSSStyleRule* aStyleRule, nsIURI* aBaseURI);
|
|
|
|
nsresult SearchStyleValue(const nsAFlatString& aValue, nsIURI* aBaseURI);
|
|
|
|
nsresult EqualizeURL(nsAutoString* aURL);
|
|
|
|
};
|
|
|
|
|
|
|
|
// {4D977F60-FBE7-4583-8CB7-F5ED882293EF}
|
|
|
|
#define IN_CSSVALUESEARCH_CID \
|
|
|
|
{ 0x4d977f60, 0xfbe7, 0x4583, { 0x8c, 0xb7, 0xf5, 0xed, 0x88, 0x22, 0x93, 0xef } }
|
|
|
|
|
|
|
|
#endif // __inCSSValueSearch_h__
|