Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef __inCSSValueSearch_h__
6 #define __inCSSValueSearch_h__
8 #include "inICSSValueSearch.h"
10 #include "nsCOMPtr.h"
11 #include "nsString.h"
12 #include "nsIDOMDocument.h"
13 #include "inISearchObserver.h"
14 #include "nsTArray.h"
15 #include "nsCSSProps.h"
17 class nsIDOMCSSStyleSheet;
18 class nsIDOMCSSRuleList;
19 class nsIDOMCSSStyleRule;
20 class nsIURI;
22 class inCSSValueSearch : public inICSSValueSearch
23 {
24 public:
25 NS_DECL_ISUPPORTS
26 NS_DECL_INISEARCHPROCESS
27 NS_DECL_INICSSVALUESEARCH
29 inCSSValueSearch();
30 virtual ~inCSSValueSearch();
32 protected:
33 nsCOMPtr<inISearchObserver> mObserver;
34 nsCOMPtr<nsIDOMDocument> mDocument;
35 nsTArray<nsAutoString *>* mResults;
36 nsCSSProperty* mProperties;
37 nsString mLastResult;
38 nsString mBaseURL;
39 nsString mTextCriteria;
40 int32_t mResultCount;
41 uint32_t mPropertyCount;
42 bool mIsActive;
43 bool mHoldResults;
44 bool mReturnRelativeURLs;
45 bool mNormalizeChromeURLs;
47 nsresult InitSearch();
48 nsresult KillSearch(int16_t aResult);
49 nsresult SearchStyleSheet(nsIDOMCSSStyleSheet* aStyleSheet, nsIURI* aBaseURI);
50 nsresult SearchRuleList(nsIDOMCSSRuleList* aRuleList, nsIURI* aBaseURI);
51 nsresult SearchStyleRule(nsIDOMCSSStyleRule* aStyleRule, nsIURI* aBaseURI);
52 nsresult SearchStyleValue(const nsAFlatString& aValue, nsIURI* aBaseURI);
53 nsresult EqualizeURL(nsAutoString* aURL);
54 };
56 // {4D977F60-FBE7-4583-8CB7-F5ED882293EF}
57 #define IN_CSSVALUESEARCH_CID \
58 { 0x4d977f60, 0xfbe7, 0x4583, { 0x8c, 0xb7, 0xf5, 0xed, 0x88, 0x22, 0x93, 0xef } }
60 #endif // __inCSSValueSearch_h__