Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: Source/core/html/ImageDocument.cpp

Issue 14839007: Devirtualize Document class type checking (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Try again Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/ImageDocument.h ('k') | Source/core/html/MediaDocument.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/html/ImageDocument.h ('k') | Source/core/html/MediaDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698