OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2010 Google Inc. All Rights Reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 class CSSPreloadScanner { | 39 class CSSPreloadScanner { |
40 WTF_MAKE_NONCOPYABLE(CSSPreloadScanner); | 40 WTF_MAKE_NONCOPYABLE(CSSPreloadScanner); |
41 public: | 41 public: |
42 CSSPreloadScanner(); | 42 CSSPreloadScanner(); |
43 ~CSSPreloadScanner(); | 43 ~CSSPreloadScanner(); |
44 | 44 |
45 void reset(); | 45 void reset(); |
46 | 46 |
47 void scan(const HTMLToken::DataVector&, const SegmentedString&, PreloadReque
stStream&); | 47 void scan(const HTMLToken::DataVector&, const SegmentedString&, PreloadReque
stStream&); |
48 void scan(const HTMLIdentifier&, const SegmentedString&, PreloadRequestStrea
m&); | 48 void scan(const String&, const SegmentedString&, PreloadRequestStream&); |
49 | 49 |
50 private: | 50 private: |
51 enum State { | 51 enum State { |
52 Initial, | 52 Initial, |
53 MaybeComment, | 53 MaybeComment, |
54 Comment, | 54 Comment, |
55 MaybeCommentEnd, | 55 MaybeCommentEnd, |
56 RuleStart, | 56 RuleStart, |
57 Rule, | 57 Rule, |
58 AfterRule, | 58 AfterRule, |
(...skipping 12 matching lines...) Expand all Loading... |
71 StringBuilder m_rule; | 71 StringBuilder m_rule; |
72 StringBuilder m_ruleValue; | 72 StringBuilder m_ruleValue; |
73 | 73 |
74 // Only non-zero during scan() | 74 // Only non-zero during scan() |
75 PreloadRequestStream* m_requests; | 75 PreloadRequestStream* m_requests; |
76 }; | 76 }; |
77 | 77 |
78 } | 78 } |
79 | 79 |
80 #endif | 80 #endif |
OLD | NEW |