| Index: Source/core/css/parser/NewCSSTokenizer.h
|
| diff --git a/Source/core/html/URLRegistry.h b/Source/core/css/parser/NewCSSTokenizer.h
|
| similarity index 62%
|
| copy from Source/core/html/URLRegistry.h
|
| copy to Source/core/css/parser/NewCSSTokenizer.h
|
| index f6f2c3bcbf0020d347b1606f141bc379075ae41f..522da08ccde83f5577dfafcef948870c10543655 100644
|
| --- a/Source/core/html/URLRegistry.h
|
| +++ b/Source/core/css/parser/NewCSSTokenizer.h
|
| @@ -28,35 +28,54 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef URLRegistry_h
|
| -#define URLRegistry_h
|
| +#ifndef NewCSSTokenizer_h
|
| +#define NewCSSTokenizer_h
|
|
|
| +#include "core/css/parser/CSSToken.h"
|
| +#include "core/html/parser/InputStreamPreprocessor.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| namespace WebCore {
|
|
|
| -class KURL;
|
| -class SecurityOrigin;
|
| -class URLRegistry;
|
| +class CSSInputStream;
|
|
|
| -class URLRegistrable {
|
| -public:
|
| - virtual ~URLRegistrable() { }
|
| - virtual URLRegistry& registry() const = 0;
|
| -};
|
| -
|
| -class URLRegistry {
|
| +class NewCSSTokenizer {
|
| + WTF_MAKE_NONCOPYABLE(NewCSSTokenizer);
|
| WTF_MAKE_FAST_ALLOCATED;
|
| public:
|
| - virtual ~URLRegistry() { }
|
| - virtual void registerURL(SecurityOrigin*, const KURL&, URLRegistrable*) = 0;
|
| - virtual void unregisterURL(const KURL&) = 0;
|
| + NewCSSTokenizer();
|
| +
|
| + CSSToken nextToken(CSSInputStream&);
|
| + static void tokenize(String, Vector<CSSToken>&);
|
| +
|
| +private:
|
| + UChar consume();
|
| + void reconsume(UChar);
|
|
|
| - // These are optional APIs
|
| - virtual URLRegistrable* lookup(const String&) { ASSERT_NOT_REACHED(); return 0; }
|
| - virtual bool contains(const String&) { ASSERT_NOT_REACHED(); return false; }
|
| + CSSToken consumeStringTokenUntil(UChar);
|
| + CSSToken consumeNumericToken();
|
| + CSSToken consumeIdentLikeToken();
|
| + CSSToken consumeNumber();
|
| + CSSToken consumeURLToken();
|
| +
|
| + void consumeUntilNotWhitespace();
|
| + void consumeThroughCommentEndOrUntilEOF();
|
| +
|
| + bool consumeIfNext(UChar);
|
| + bool consumeIfNext(String);
|
| + String consumeName();
|
| + UChar consumeEscape();
|
| +
|
| + bool nextCharIsNameChar();
|
| + bool nextTwoCharsAreValidEscape();
|
| + bool nextCharsAreNumber();
|
| + bool nextCharsAreIdentifier();
|
| + double convertToNumber(String);
|
| +
|
| + CSSInputStream* m_input;
|
| };
|
|
|
| +
|
| } // namespace WebCore
|
|
|
| -#endif // URLRegistry_h
|
| +#endif // NewCSSTokenizer_h
|
|
|