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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 Resource::error(status); | 418 Resource::error(status); |
419 notifyObservers(); | 419 notifyObservers(); |
420 } | 420 } |
421 | 421 |
422 void ImageResource::responseReceived(const ResourceResponse& response, PassOwnPt
r<WebDataConsumerHandle> handle) | 422 void ImageResource::responseReceived(const ResourceResponse& response, PassOwnPt
r<WebDataConsumerHandle> handle) |
423 { | 423 { |
424 if (m_loadingMultipartContent && m_data) | 424 if (m_loadingMultipartContent && m_data) |
425 finishOnePart(); | 425 finishOnePart(); |
426 else if (response.isMultipart()) | 426 else if (response.isMultipart()) |
427 m_loadingMultipartContent = true; | 427 m_loadingMultipartContent = true; |
428 if (RuntimeEnabledFeatures::clientHintsDprEnabled()) { | 428 if (RuntimeEnabledFeatures::clientHintsEnabled()) { |
429 m_devicePixelRatioHeaderValue = response.httpHeaderField("DPR").toFloat(
&m_hasDevicePixelRatioHeaderValue); | 429 m_devicePixelRatioHeaderValue = response.httpHeaderField("DPR").toFloat(
&m_hasDevicePixelRatioHeaderValue); |
430 if (!m_hasDevicePixelRatioHeaderValue || m_devicePixelRatioHeaderValue <
= 0.0) { | 430 if (!m_hasDevicePixelRatioHeaderValue || m_devicePixelRatioHeaderValue <
= 0.0) { |
431 m_devicePixelRatioHeaderValue = 1.0; | 431 m_devicePixelRatioHeaderValue = 1.0; |
432 m_hasDevicePixelRatioHeaderValue = false; | 432 m_hasDevicePixelRatioHeaderValue = false; |
433 } | 433 } |
434 } | 434 } |
435 Resource::responseReceived(response, handle); | 435 Resource::responseReceived(response, handle); |
436 } | 436 } |
437 | 437 |
438 void ImageResource::decodedSizeChanged(const blink::Image* image, int delta) | 438 void ImageResource::decodedSizeChanged(const blink::Image* image, int delta) |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 if (node && isHTMLImageElement(node)) { | 554 if (node && isHTMLImageElement(node)) { |
555 const AtomicString& urlString = toHTMLImageElement(node)->imageSourceURL
(); | 555 const AtomicString& urlString = toHTMLImageElement(node)->imageSourceURL
(); |
556 KURL url = node->document().completeURL(urlString); | 556 KURL url = node->document().completeURL(urlString); |
557 imageForContainer->setURL(url); | 557 imageForContainer->setURL(url); |
558 } | 558 } |
559 | 559 |
560 return imageForContainer.get(); | 560 return imageForContainer.get(); |
561 } | 561 } |
562 | 562 |
563 } // namespace blink | 563 } // namespace blink |
OLD | NEW |