| 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 void FrameSerializer::retrieveResourcesForProperties(const StylePropertySet* sty
leDeclaration, Document& document) | 423 void FrameSerializer::retrieveResourcesForProperties(const StylePropertySet* sty
leDeclaration, Document& document) |
| 424 { | 424 { |
| 425 if (!styleDeclaration) | 425 if (!styleDeclaration) |
| 426 return; | 426 return; |
| 427 | 427 |
| 428 // The background-image and list-style-image (for ul or ol) are the CSS prop
erties | 428 // The background-image and list-style-image (for ul or ol) are the CSS prop
erties |
| 429 // that make use of images. We iterate to make sure we include any other | 429 // that make use of images. We iterate to make sure we include any other |
| 430 // image properties there might be. | 430 // image properties there might be. |
| 431 unsigned propertyCount = styleDeclaration->propertyCount(); | 431 unsigned propertyCount = styleDeclaration->propertyCount(); |
| 432 for (unsigned i = 0; i < propertyCount; ++i) { | 432 for (unsigned i = 0; i < propertyCount; ++i) { |
| 433 const CSSValue* cssValue = styleDeclaration->propertyAt(i).value(); | 433 const CSSValue& cssValue = styleDeclaration->propertyAt(i).value(); |
| 434 retrieveResourcesForCSSValue(*cssValue, document); | 434 retrieveResourcesForCSSValue(cssValue, document); |
| 435 } | 435 } |
| 436 } | 436 } |
| 437 | 437 |
| 438 void FrameSerializer::retrieveResourcesForCSSValue(const CSSValue& cssValue, Doc
ument& document) | 438 void FrameSerializer::retrieveResourcesForCSSValue(const CSSValue& cssValue, Doc
ument& document) |
| 439 { | 439 { |
| 440 if (cssValue.isImageValue()) { | 440 if (cssValue.isImageValue()) { |
| 441 const CSSImageValue& imageValue = toCSSImageValue(cssValue); | 441 const CSSImageValue& imageValue = toCSSImageValue(cssValue); |
| 442 if (imageValue.isCachePending()) | 442 if (imageValue.isCachePending()) |
| 443 return; | 443 return; |
| 444 StyleImage* styleImage = imageValue.cachedImage(); | 444 StyleImage* styleImage = imageValue.cachedImage(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 continue; | 476 continue; |
| 477 } | 477 } |
| 478 emitsMinus = ch == '-'; | 478 emitsMinus = ch == '-'; |
| 479 builder.append(ch); | 479 builder.append(ch); |
| 480 } | 480 } |
| 481 CString escapedUrl = builder.toString().ascii(); | 481 CString escapedUrl = builder.toString().ascii(); |
| 482 return String::format("saved from url=(%04d)%s", static_cast<int>(escapedUrl
.length()), escapedUrl.data()); | 482 return String::format("saved from url=(%04d)%s", static_cast<int>(escapedUrl
.length()), escapedUrl.data()); |
| 483 } | 483 } |
| 484 | 484 |
| 485 } // namespace blink | 485 } // namespace blink |
| OLD | NEW |