2012-05-21 15:12:37 +04: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/. */
|
2006-05-17 06:21:49 +04: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 17:42:18 +03:00
|
|
|
#include "nsTArray.h"
|
2009-08-11 02:52:29 +04:00
|
|
|
#include "nsCSSProps.h"
|
2006-05-17 06:21:49 +04:00
|
|
|
|
2006-05-17 06:38:28 +04:00
|
|
|
class nsIDOMCSSStyleSheet;
|
|
|
|
class nsIDOMCSSRuleList;
|
|
|
|
class nsIDOMCSSStyleRule;
|
|
|
|
class nsIURI;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class inCSSValueSearch final : public inICSSValueSearch
|
2006-05-17 06:21:49 +04:00
|
|
|
{
|
|
|
|
public:
|
2006-05-17 06:22:14 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_INISEARCHPROCESS
|
|
|
|
NS_DECL_INICSSVALUESEARCH
|
|
|
|
|
2006-05-17 06:21:49 +04:00
|
|
|
inCSSValueSearch();
|
|
|
|
|
|
|
|
protected:
|
2014-06-24 02:40:01 +04:00
|
|
|
virtual ~inCSSValueSearch();
|
2006-05-17 06:21:49 +04:00
|
|
|
nsCOMPtr<inISearchObserver> mObserver;
|
|
|
|
nsCOMPtr<nsIDOMDocument> mDocument;
|
2009-02-03 17:42:18 +03:00
|
|
|
nsTArray<nsAutoString *>* mResults;
|
2006-05-17 06:34:11 +04:00
|
|
|
nsCSSProperty* mProperties;
|
2006-05-17 06:38:17 +04:00
|
|
|
nsString mLastResult;
|
|
|
|
nsString mBaseURL;
|
|
|
|
nsString mTextCriteria;
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t mResultCount;
|
|
|
|
uint32_t mPropertyCount;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mIsActive;
|
|
|
|
bool mHoldResults;
|
|
|
|
bool mReturnRelativeURLs;
|
|
|
|
bool mNormalizeChromeURLs;
|
2006-05-17 06:21:49 +04:00
|
|
|
|
|
|
|
nsresult InitSearch();
|
2012-08-22 19:56:38 +04:00
|
|
|
nsresult KillSearch(int16_t aResult);
|
2006-05-17 06:38:28 +04: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);
|
2006-05-17 06:21:49 +04:00
|
|
|
nsresult EqualizeURL(nsAutoString* aURL);
|
|
|
|
};
|
|
|
|
|
2006-05-19 22:59:39 +04:00
|
|
|
// {4D977F60-FBE7-4583-8CB7-F5ED882293EF}
|
|
|
|
#define IN_CSSVALUESEARCH_CID \
|
|
|
|
{ 0x4d977f60, 0xfbe7, 0x4583, { 0x8c, 0xb7, 0xf5, 0xed, 0x88, 0x22, 0x93, 0xef } }
|
|
|
|
|
2006-05-17 06:22:13 +04:00
|
|
|
#endif // __inCSSValueSearch_h__
|