inCSSValueSearch.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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/. */
  4. #ifndef __inCSSValueSearch_h__
  5. #define __inCSSValueSearch_h__
  6. #include "inICSSValueSearch.h"
  7. #include "nsCOMPtr.h"
  8. #include "nsString.h"
  9. #include "nsIDOMDocument.h"
  10. #include "inISearchObserver.h"
  11. #include "nsTArray.h"
  12. #include "nsCSSProps.h"
  13. class nsIDOMCSSStyleSheet;
  14. class nsIDOMCSSRuleList;
  15. class nsIDOMCSSStyleRule;
  16. class nsIURI;
  17. class inCSSValueSearch final : public inICSSValueSearch
  18. {
  19. public:
  20. NS_DECL_ISUPPORTS
  21. NS_DECL_INISEARCHPROCESS
  22. NS_DECL_INICSSVALUESEARCH
  23. inCSSValueSearch();
  24. protected:
  25. virtual ~inCSSValueSearch();
  26. nsCOMPtr<inISearchObserver> mObserver;
  27. nsCOMPtr<nsIDOMDocument> mDocument;
  28. nsTArray<nsAutoString *>* mResults;
  29. nsCSSPropertyID* mProperties;
  30. nsString mLastResult;
  31. nsString mBaseURL;
  32. nsString mTextCriteria;
  33. int32_t mResultCount;
  34. uint32_t mPropertyCount;
  35. bool mIsActive;
  36. bool mHoldResults;
  37. bool mReturnRelativeURLs;
  38. bool mNormalizeChromeURLs;
  39. nsresult InitSearch();
  40. nsresult KillSearch(int16_t aResult);
  41. nsresult SearchStyleSheet(nsIDOMCSSStyleSheet* aStyleSheet, nsIURI* aBaseURI);
  42. nsresult SearchRuleList(nsIDOMCSSRuleList* aRuleList, nsIURI* aBaseURI);
  43. nsresult SearchStyleRule(nsIDOMCSSStyleRule* aStyleRule, nsIURI* aBaseURI);
  44. nsresult SearchStyleValue(const nsAFlatString& aValue, nsIURI* aBaseURI);
  45. nsresult EqualizeURL(nsAutoString* aURL);
  46. };
  47. // {4D977F60-FBE7-4583-8CB7-F5ED882293EF}
  48. #define IN_CSSVALUESEARCH_CID \
  49. { 0x4d977f60, 0xfbe7, 0x4583, { 0x8c, 0xb7, 0xf5, 0xed, 0x88, 0x22, 0x93, 0xef } }
  50. #endif // __inCSSValueSearch_h__