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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 , inStyle(inStyle) | 79 , inStyle(inStyle) |
80 , templateCount(templateCount) | 80 , templateCount(templateCount) |
81 { | 81 { |
82 } | 82 } |
83 | 83 |
84 KURL predictedBaseElementURL; | 84 KURL predictedBaseElementURL; |
85 bool inStyle; | 85 bool inStyle; |
86 size_t templateCount; | 86 size_t templateCount; |
87 }; | 87 }; |
88 | 88 |
89 struct Parent { | |
90 String sourceURL; | |
91 const StringImpl* tagImpl; | |
eseidel
2014/05/15 06:29:13
Why not just String?
| |
92 Parent(const StringImpl* tagImpl) | |
93 : tagImpl(tagImpl) | |
94 { | |
95 } | |
96 }; | |
97 | |
89 CSSPreloadScanner m_cssScanner; | 98 CSSPreloadScanner m_cssScanner; |
90 const KURL m_documentURL; | 99 const KURL m_documentURL; |
91 KURL m_predictedBaseElementURL; | 100 KURL m_predictedBaseElementURL; |
92 bool m_inStyle; | 101 bool m_inStyle; |
102 Vector<Parent> m_pictureParentStack; | |
93 size_t m_templateCount; | 103 size_t m_templateCount; |
94 RefPtr<MediaValues> m_mediaValues; | 104 RefPtr<MediaValues> m_mediaValues; |
95 | 105 |
96 Vector<Checkpoint> m_checkpoints; | 106 Vector<Checkpoint> m_checkpoints; |
97 }; | 107 }; |
98 | 108 |
99 class HTMLPreloadScanner { | 109 class HTMLPreloadScanner { |
100 WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner); WTF_MAKE_FAST_ALLOCATED; | 110 WTF_MAKE_NONCOPYABLE(HTMLPreloadScanner); WTF_MAKE_FAST_ALLOCATED; |
101 public: | 111 public: |
102 HTMLPreloadScanner(const HTMLParserOptions&, const KURL& documentURL, PassRe fPtr<MediaValues>); | 112 HTMLPreloadScanner(const HTMLParserOptions&, const KURL& documentURL, PassRe fPtr<MediaValues>); |
103 ~HTMLPreloadScanner(); | 113 ~HTMLPreloadScanner(); |
104 | 114 |
105 void appendToEnd(const SegmentedString&); | 115 void appendToEnd(const SegmentedString&); |
106 void scan(HTMLResourcePreloader*, const KURL& documentBaseElementURL); | 116 void scan(HTMLResourcePreloader*, const KURL& documentBaseElementURL); |
107 | 117 |
108 private: | 118 private: |
109 TokenPreloadScanner m_scanner; | 119 TokenPreloadScanner m_scanner; |
110 SegmentedString m_source; | 120 SegmentedString m_source; |
111 HTMLToken m_token; | 121 HTMLToken m_token; |
112 OwnPtr<HTMLTokenizer> m_tokenizer; | 122 OwnPtr<HTMLTokenizer> m_tokenizer; |
113 }; | 123 }; |
114 | 124 |
115 } | 125 } |
116 | 126 |
117 #endif | 127 #endif |
OLD | NEW |