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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 document()->imageUpdated(); | 159 document()->imageUpdated(); |
160 } | 160 } |
161 | 161 |
162 document()->finishedParsing(); | 162 document()->finishedParsing(); |
163 } | 163 } |
164 | 164 |
165 // -------- | 165 // -------- |
166 | 166 |
167 ImageDocument::ImageDocument(Frame* frame, const KURL& url) | 167 ImageDocument::ImageDocument(Frame* frame, const KURL& url) |
168 : HTMLDocument(frame, url) | 168 : HTMLDocument(frame, url, ImageDocumentClass) |
169 , m_imageElement(0) | 169 , m_imageElement(0) |
170 , m_imageSizeIsKnown(false) | 170 , m_imageSizeIsKnown(false) |
171 , m_didShrinkImage(false) | 171 , m_didShrinkImage(false) |
172 , m_shouldShrinkImage(shouldShrinkToFit()) | 172 , m_shouldShrinkImage(shouldShrinkToFit()) |
173 { | 173 { |
174 setCompatibilityMode(QuirksMode); | 174 setCompatibilityMode(QuirksMode); |
175 lockCompatibilityMode(); | 175 lockCompatibilityMode(); |
176 } | 176 } |
177 | 177 |
178 PassRefPtr<DocumentParser> ImageDocument::createParser() | 178 PassRefPtr<DocumentParser> ImageDocument::createParser() |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 void ImageDocumentElement::didMoveToNewDocument(Document* oldDocument) | 395 void ImageDocumentElement::didMoveToNewDocument(Document* oldDocument) |
396 { | 396 { |
397 if (m_imageDocument) { | 397 if (m_imageDocument) { |
398 m_imageDocument->disconnectImageElement(); | 398 m_imageDocument->disconnectImageElement(); |
399 m_imageDocument = 0; | 399 m_imageDocument = 0; |
400 } | 400 } |
401 HTMLImageElement::didMoveToNewDocument(oldDocument); | 401 HTMLImageElement::didMoveToNewDocument(oldDocument); |
402 } | 402 } |
403 | 403 |
404 } | 404 } |
OLD | NEW |