| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 : HTMLDocument(initializer, ImageDocumentClass) | 187 : HTMLDocument(initializer, ImageDocumentClass) |
| 188 , m_imageElement(nullptr) | 188 , m_imageElement(nullptr) |
| 189 , m_imageSizeIsKnown(false) | 189 , m_imageSizeIsKnown(false) |
| 190 , m_didShrinkImage(false) | 190 , m_didShrinkImage(false) |
| 191 , m_shouldShrinkImage(shouldShrinkToFit()) | 191 , m_shouldShrinkImage(shouldShrinkToFit()) |
| 192 , m_shrinkToFitMode(frame()->settings()->viewportEnabled() ? Viewport : Desk
top) | 192 , m_shrinkToFitMode(frame()->settings()->viewportEnabled() ? Viewport : Desk
top) |
| 193 { | 193 { |
| 194 setCompatibilityMode(QuirksMode); | 194 setCompatibilityMode(QuirksMode); |
| 195 lockCompatibilityMode(); | 195 lockCompatibilityMode(); |
| 196 UseCounter::count(*this, UseCounter::ImageDocument); | 196 UseCounter::count(*this, UseCounter::ImageDocument); |
| 197 if (ownerElement()) | 197 if (!isInMainFrame()) |
| 198 UseCounter::count(*this, UseCounter::ImageDocumentInFrame); | 198 UseCounter::count(*this, UseCounter::ImageDocumentInFrame); |
| 199 } | 199 } |
| 200 | 200 |
| 201 DocumentParser* ImageDocument::createParser() | 201 DocumentParser* ImageDocument::createParser() |
| 202 { | 202 { |
| 203 return ImageDocumentParser::create(this); | 203 return ImageDocumentParser::create(this); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void ImageDocument::createDocumentStructure() | 206 void ImageDocument::createDocumentStructure() |
| 207 { | 207 { |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 } | 443 } |
| 444 | 444 |
| 445 bool ImageEventListener::operator==(const EventListener& listener) const | 445 bool ImageEventListener::operator==(const EventListener& listener) const |
| 446 { | 446 { |
| 447 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) | 447 if (const ImageEventListener* imageEventListener = ImageEventListener::cast(
&listener)) |
| 448 return m_doc == imageEventListener->m_doc; | 448 return m_doc == imageEventListener->m_doc; |
| 449 return false; | 449 return false; |
| 450 } | 450 } |
| 451 | 451 |
| 452 } // namespace blink | 452 } // namespace blink |
| OLD | NEW |