1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/inspector/inCSSValueSearch.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,60 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef __inCSSValueSearch_h__ 1.9 +#define __inCSSValueSearch_h__ 1.10 + 1.11 +#include "inICSSValueSearch.h" 1.12 + 1.13 +#include "nsCOMPtr.h" 1.14 +#include "nsString.h" 1.15 +#include "nsIDOMDocument.h" 1.16 +#include "inISearchObserver.h" 1.17 +#include "nsTArray.h" 1.18 +#include "nsCSSProps.h" 1.19 + 1.20 +class nsIDOMCSSStyleSheet; 1.21 +class nsIDOMCSSRuleList; 1.22 +class nsIDOMCSSStyleRule; 1.23 +class nsIURI; 1.24 + 1.25 +class inCSSValueSearch : public inICSSValueSearch 1.26 +{ 1.27 +public: 1.28 + NS_DECL_ISUPPORTS 1.29 + NS_DECL_INISEARCHPROCESS 1.30 + NS_DECL_INICSSVALUESEARCH 1.31 + 1.32 + inCSSValueSearch(); 1.33 + virtual ~inCSSValueSearch(); 1.34 + 1.35 +protected: 1.36 + nsCOMPtr<inISearchObserver> mObserver; 1.37 + nsCOMPtr<nsIDOMDocument> mDocument; 1.38 + nsTArray<nsAutoString *>* mResults; 1.39 + nsCSSProperty* mProperties; 1.40 + nsString mLastResult; 1.41 + nsString mBaseURL; 1.42 + nsString mTextCriteria; 1.43 + int32_t mResultCount; 1.44 + uint32_t mPropertyCount; 1.45 + bool mIsActive; 1.46 + bool mHoldResults; 1.47 + bool mReturnRelativeURLs; 1.48 + bool mNormalizeChromeURLs; 1.49 + 1.50 + nsresult InitSearch(); 1.51 + nsresult KillSearch(int16_t aResult); 1.52 + nsresult SearchStyleSheet(nsIDOMCSSStyleSheet* aStyleSheet, nsIURI* aBaseURI); 1.53 + nsresult SearchRuleList(nsIDOMCSSRuleList* aRuleList, nsIURI* aBaseURI); 1.54 + nsresult SearchStyleRule(nsIDOMCSSStyleRule* aStyleRule, nsIURI* aBaseURI); 1.55 + nsresult SearchStyleValue(const nsAFlatString& aValue, nsIURI* aBaseURI); 1.56 + nsresult EqualizeURL(nsAutoString* aURL); 1.57 +}; 1.58 + 1.59 +// {4D977F60-FBE7-4583-8CB7-F5ED882293EF} 1.60 +#define IN_CSSVALUESEARCH_CID \ 1.61 +{ 0x4d977f60, 0xfbe7, 0x4583, { 0x8c, 0xb7, 0xf5, 0xed, 0x88, 0x22, 0x93, 0xef } } 1.62 + 1.63 +#endif // __inCSSValueSearch_h__