| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights |
| 5 * reserved. | 5 * reserved. |
| 6 * Copyright (C) 2010 Google Inc. All rights reserved. | 6 * Copyright (C) 2010 Google 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 return nullptr; | 359 return nullptr; |
| 360 } | 360 } |
| 361 } | 361 } |
| 362 | 362 |
| 363 void HTMLImageElement::attachLayoutTree(const AttachContext& context) { | 363 void HTMLImageElement::attachLayoutTree(const AttachContext& context) { |
| 364 HTMLElement::attachLayoutTree(context); | 364 HTMLElement::attachLayoutTree(context); |
| 365 if (layoutObject() && layoutObject()->isImage()) { | 365 if (layoutObject() && layoutObject()->isImage()) { |
| 366 LayoutImage* layoutImage = toLayoutImage(layoutObject()); | 366 LayoutImage* layoutImage = toLayoutImage(layoutObject()); |
| 367 LayoutImageResource* layoutImageResource = layoutImage->imageResource(); | 367 LayoutImageResource* layoutImageResource = layoutImage->imageResource(); |
| 368 if (m_isFallbackImage) { | 368 if (m_isFallbackImage) { |
| 369 float deviceScaleFactor = blink::deviceScaleFactor(layoutImage->frame()); | 369 float deviceScaleFactor = |
| 370 blink::deviceScaleFactorDeprecated(layoutImage->frame()); |
| 370 std::pair<Image*, float> brokenImageAndImageScaleFactor = | 371 std::pair<Image*, float> brokenImageAndImageScaleFactor = |
| 371 ImageResourceContent::brokenImage(deviceScaleFactor); | 372 ImageResourceContent::brokenImage(deviceScaleFactor); |
| 372 ImageResourceContent* newImageResource = | 373 ImageResourceContent* newImageResource = |
| 373 ImageResourceContent::create(brokenImageAndImageScaleFactor.first); | 374 ImageResourceContent::create(brokenImageAndImageScaleFactor.first); |
| 374 layoutImage->imageResource()->setImageResource(newImageResource); | 375 layoutImage->imageResource()->setImageResource(newImageResource); |
| 375 } | 376 } |
| 376 if (layoutImageResource->hasImage()) | 377 if (layoutImageResource->hasImage()) |
| 377 return; | 378 return; |
| 378 | 379 |
| 379 if (!imageLoader().image() && !layoutImageResource->cachedImage()) | 380 if (!imageLoader().image() && !layoutImageResource->cachedImage()) |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 void HTMLImageElement::associateWith(HTMLFormElement* form) { | 921 void HTMLImageElement::associateWith(HTMLFormElement* form) { |
| 921 if (form && form->isConnected()) { | 922 if (form && form->isConnected()) { |
| 922 m_form = form; | 923 m_form = form; |
| 923 m_formWasSetByParser = true; | 924 m_formWasSetByParser = true; |
| 924 m_form->associate(*this); | 925 m_form->associate(*this); |
| 925 m_form->didAssociateByParser(); | 926 m_form->didAssociateByParser(); |
| 926 } | 927 } |
| 927 }; | 928 }; |
| 928 | 929 |
| 929 } // namespace blink | 930 } // namespace blink |
| OLD | NEW |