116 CachedCSSStyleSheet* DocLoader::requestUserCSSStyleSheet(const String& url, const String& charset) |
116 CachedCSSStyleSheet* DocLoader::requestUserCSSStyleSheet(const String& url, const String& charset) |
117 { |
117 { |
118 return cache()->requestUserCSSStyleSheet(this, url, charset); |
118 return cache()->requestUserCSSStyleSheet(this, url, charset); |
119 } |
119 } |
120 |
120 |
|
121 /* DocLoader::requestScript |
|
122 * |
|
123 * If we've been given the charset, just pass it on. |
|
124 * Otherwise, get it from the enclosing frame. |
|
125 * |
|
126 * Notes: |
|
127 * |
|
128 * o We do this because some oddly-programmed web pages |
|
129 * and/or servers deliver JavaScript that doesn't bear |
|
130 * any obvious character set selection but the intended |
|
131 * character set isn't the ISO-Latin-1 that will later |
|
132 * be defaulted-in. |
|
133 * |
|
134 * o We don't conditionalize this code for S60/Symbian |
|
135 * because it should be either benign or even helpful |
|
136 * to the other platforms as well. |
|
137 * |
|
138 */ |
|
139 |
121 CachedScript* DocLoader::requestScript(const String& url, const String& charset) |
140 CachedScript* DocLoader::requestScript(const String& url, const String& charset) |
122 { |
141 { |
123 return static_cast<CachedScript*>(requestResource(CachedResource::Script, url, charset)); |
142 |
|
143 if (!!charset) |
|
144 return static_cast<CachedScript*>(requestResource(CachedResource::Script, url, charset)); |
|
145 else |
|
146 return static_cast<CachedScript*>(requestResource(CachedResource::Script, url, frame()->loader()->encoding() )); |
124 } |
147 } |
125 |
148 |
126 #if ENABLE(XSLT) |
149 #if ENABLE(XSLT) |
127 CachedXSLStyleSheet* DocLoader::requestXSLStyleSheet(const String& url) |
150 CachedXSLStyleSheet* DocLoader::requestXSLStyleSheet(const String& url) |
128 { |
151 { |