OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
7 | 7 |
8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 if (!image || image != m_image) | 486 if (!image || image != m_image) |
487 return; | 487 return; |
488 notifyObservers(&rect); | 488 notifyObservers(&rect); |
489 } | 489 } |
490 | 490 |
491 bool ImageResource::currentFrameKnownToBeOpaque(const LayoutObject* renderer) | 491 bool ImageResource::currentFrameKnownToBeOpaque(const LayoutObject* renderer) |
492 { | 492 { |
493 blink::Image* image = imageForRenderer(renderer); | 493 blink::Image* image = imageForRenderer(renderer); |
494 if (image->isBitmapImage()) { | 494 if (image->isBitmapImage()) { |
495 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage
", "data", InspectorPaintImageEvent::data(renderer, *this)); | 495 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage
", "data", InspectorPaintImageEvent::data(renderer, *this)); |
496 image->nativeImageForCurrentFrame(); // force decode | 496 SkBitmap dummy; |
| 497 if (!image->bitmapForCurrentFrame(&dummy)) { // force decode |
| 498 // We don't care about failures here, since we don't use "dummy" |
| 499 } |
497 } | 500 } |
498 return image->currentFrameKnownToBeOpaque(); | 501 return image->currentFrameKnownToBeOpaque(); |
499 } | 502 } |
500 | 503 |
501 bool ImageResource::isAccessAllowed(ExecutionContext* context, SecurityOrigin* s
ecurityOrigin) | 504 bool ImageResource::isAccessAllowed(ExecutionContext* context, SecurityOrigin* s
ecurityOrigin) |
502 { | 505 { |
503 if (response().wasFetchedViaServiceWorker()) | 506 if (response().wasFetchedViaServiceWorker()) |
504 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; | 507 return response().serviceWorkerResponseType() != WebServiceWorkerRespons
eTypeOpaque; |
505 if (!image()->currentFrameHasSingleSecurityOrigin()) | 508 if (!image()->currentFrameHasSingleSecurityOrigin()) |
506 return false; | 509 return false; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 if (node && isHTMLImageElement(node)) { | 545 if (node && isHTMLImageElement(node)) { |
543 const AtomicString& urlString = toHTMLImageElement(node)->imageSourceURL
(); | 546 const AtomicString& urlString = toHTMLImageElement(node)->imageSourceURL
(); |
544 KURL url = node->document().completeURL(urlString); | 547 KURL url = node->document().completeURL(urlString); |
545 imageForContainer->setURL(url); | 548 imageForContainer->setURL(url); |
546 } | 549 } |
547 | 550 |
548 return imageForContainer.get(); | 551 return imageForContainer.get(); |
549 } | 552 } |
550 | 553 |
551 } // namespace blink | 554 } // namespace blink |
OLD | NEW |