| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 void PageSerializer::retrieveResourcesForProperties(const StylePropertySet* styl
eDeclaration, Document& document) | 514 void PageSerializer::retrieveResourcesForProperties(const StylePropertySet* styl
eDeclaration, Document& document) |
| 515 { | 515 { |
| 516 if (!styleDeclaration) | 516 if (!styleDeclaration) |
| 517 return; | 517 return; |
| 518 | 518 |
| 519 // The background-image and list-style-image (for ul or ol) are the CSS prop
erties | 519 // The background-image and list-style-image (for ul or ol) are the CSS prop
erties |
| 520 // that make use of images. We iterate to make sure we include any other | 520 // that make use of images. We iterate to make sure we include any other |
| 521 // image properties there might be. | 521 // image properties there might be. |
| 522 unsigned propertyCount = styleDeclaration->propertyCount(); | 522 unsigned propertyCount = styleDeclaration->propertyCount(); |
| 523 for (unsigned i = 0; i < propertyCount; ++i) { | 523 for (unsigned i = 0; i < propertyCount; ++i) { |
| 524 RefPtrWillBeRawPtr<CSSValue> cssValue = styleDeclaration->propertyAt(i).
value(); | 524 RefPtr<CSSValue> cssValue = styleDeclaration->propertyAt(i).value(); |
| 525 retrieveResourcesForCSSValue(cssValue.get(), document); | 525 retrieveResourcesForCSSValue(cssValue.get(), document); |
| 526 } | 526 } |
| 527 } | 527 } |
| 528 | 528 |
| 529 void PageSerializer::retrieveResourcesForCSSValue(CSSValue* cssValue, Document&
document) | 529 void PageSerializer::retrieveResourcesForCSSValue(CSSValue* cssValue, Document&
document) |
| 530 { | 530 { |
| 531 if (cssValue->isImageValue()) { | 531 if (cssValue->isImageValue()) { |
| 532 CSSImageValue* imageValue = toCSSImageValue(cssValue); | 532 CSSImageValue* imageValue = toCSSImageValue(cssValue); |
| 533 StyleImage* styleImage = imageValue->cachedOrPendingImage(); | 533 StyleImage* styleImage = imageValue->cachedOrPendingImage(); |
| 534 // Non cached-images are just place-holders and do not contain data. | 534 // Non cached-images are just place-holders and do not contain data. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 | 571 |
| 572 return fakeURL; | 572 return fakeURL; |
| 573 } | 573 } |
| 574 | 574 |
| 575 PageSerializer::Delegate* PageSerializer::delegate() | 575 PageSerializer::Delegate* PageSerializer::delegate() |
| 576 { | 576 { |
| 577 return m_delegate.get(); | 577 return m_delegate.get(); |
| 578 } | 578 } |
| 579 | 579 |
| 580 } // namespace blink | 580 } // namespace blink |
| OLD | NEW |