OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 } | 121 } |
122 return false; | 122 return false; |
123 } | 123 } |
124 | 124 |
125 static bool prepareResourceBuffer(Resource* cachedResource, bool* hasZeroSize) | 125 static bool prepareResourceBuffer(Resource* cachedResource, bool* hasZeroSize) |
126 { | 126 { |
127 *hasZeroSize = false; | 127 *hasZeroSize = false; |
128 if (!cachedResource) | 128 if (!cachedResource) |
129 return false; | 129 return false; |
130 | 130 |
131 if (cachedResource->dataBufferingPolicy() == DoNotBufferData) | |
132 return false; | |
vsevik
2013/09/24 13:43:17
I don't think this code is ever reached. Why do yo
yusukesuzuki
2013/09/25 01:43:05
When requestContent for XHR Blob is called, this p
| |
133 | |
131 // Zero-sized resources don't have data at all -- so fake the empty buffer, instead of indicating error by returning 0. | 134 // Zero-sized resources don't have data at all -- so fake the empty buffer, instead of indicating error by returning 0. |
132 if (!cachedResource->encodedSize()) { | 135 if (!cachedResource->encodedSize()) { |
133 *hasZeroSize = true; | 136 *hasZeroSize = true; |
134 return true; | 137 return true; |
135 } | 138 } |
136 | 139 |
137 if (cachedResource->isPurgeable()) { | 140 if (cachedResource->isPurgeable()) { |
138 // If the resource is purgeable then make it unpurgeable to get | 141 // If the resource is purgeable then make it unpurgeable to get |
139 // get its data. This might fail, in which case we return an | 142 // get its data. This might fail, in which case we return an |
140 // empty String. | 143 // empty String. |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1292 } | 1295 } |
1293 | 1296 |
1294 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) | 1297 void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co nst bool* showGrid) |
1295 { | 1298 { |
1296 m_state->setBoolean(PageAgentState::showSizeOnResize, show); | 1299 m_state->setBoolean(PageAgentState::showSizeOnResize, show); |
1297 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ; | 1300 m_state->setBoolean(PageAgentState::showGridOnResize, showGrid && *showGrid) ; |
1298 } | 1301 } |
1299 | 1302 |
1300 } // namespace WebCore | 1303 } // namespace WebCore |
1301 | 1304 |
OLD | NEW |