michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef __inCSSValueSearch_h__ michael@0: #define __inCSSValueSearch_h__ michael@0: michael@0: #include "inICSSValueSearch.h" michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsString.h" michael@0: #include "nsIDOMDocument.h" michael@0: #include "inISearchObserver.h" michael@0: #include "nsTArray.h" michael@0: #include "nsCSSProps.h" michael@0: michael@0: class nsIDOMCSSStyleSheet; michael@0: class nsIDOMCSSRuleList; michael@0: class nsIDOMCSSStyleRule; michael@0: class nsIURI; michael@0: michael@0: class inCSSValueSearch : public inICSSValueSearch michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_INISEARCHPROCESS michael@0: NS_DECL_INICSSVALUESEARCH michael@0: michael@0: inCSSValueSearch(); michael@0: virtual ~inCSSValueSearch(); michael@0: michael@0: protected: michael@0: nsCOMPtr mObserver; michael@0: nsCOMPtr mDocument; michael@0: nsTArray* mResults; michael@0: nsCSSProperty* mProperties; michael@0: nsString mLastResult; michael@0: nsString mBaseURL; michael@0: nsString mTextCriteria; michael@0: int32_t mResultCount; michael@0: uint32_t mPropertyCount; michael@0: bool mIsActive; michael@0: bool mHoldResults; michael@0: bool mReturnRelativeURLs; michael@0: bool mNormalizeChromeURLs; michael@0: michael@0: nsresult InitSearch(); michael@0: nsresult KillSearch(int16_t aResult); michael@0: nsresult SearchStyleSheet(nsIDOMCSSStyleSheet* aStyleSheet, nsIURI* aBaseURI); michael@0: nsresult SearchRuleList(nsIDOMCSSRuleList* aRuleList, nsIURI* aBaseURI); michael@0: nsresult SearchStyleRule(nsIDOMCSSStyleRule* aStyleRule, nsIURI* aBaseURI); michael@0: nsresult SearchStyleValue(const nsAFlatString& aValue, nsIURI* aBaseURI); michael@0: nsresult EqualizeURL(nsAutoString* aURL); michael@0: }; michael@0: michael@0: // {4D977F60-FBE7-4583-8CB7-F5ED882293EF} michael@0: #define IN_CSSVALUESEARCH_CID \ michael@0: { 0x4d977f60, 0xfbe7, 0x4583, { 0x8c, 0xb7, 0xf5, 0xed, 0x88, 0x22, 0x93, 0xef } } michael@0: michael@0: #endif // __inCSSValueSearch_h__