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

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

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed const changes and some gratuitous checks Created 4 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
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 : HTMLDocument(initializer, ImageDocumentClass) 186 : HTMLDocument(initializer, ImageDocumentClass)
187 , m_imageElement(nullptr) 187 , m_imageElement(nullptr)
188 , m_imageSizeIsKnown(false) 188 , m_imageSizeIsKnown(false)
189 , m_didShrinkImage(false) 189 , m_didShrinkImage(false)
190 , m_shouldShrinkImage(shouldShrinkToFit()) 190 , m_shouldShrinkImage(shouldShrinkToFit())
191 , m_shrinkToFitMode(frame()->settings()->viewportEnabled() ? Viewport : Desk top) 191 , m_shrinkToFitMode(frame()->settings()->viewportEnabled() ? Viewport : Desk top)
192 { 192 {
193 setCompatibilityMode(QuirksMode); 193 setCompatibilityMode(QuirksMode);
194 lockCompatibilityMode(); 194 lockCompatibilityMode();
195 UseCounter::count(*this, UseCounter::ImageDocument); 195 UseCounter::count(*this, UseCounter::ImageDocument);
196 if (ownerElement()) 196 if (!isInMainFrame())
197 UseCounter::count(*this, UseCounter::ImageDocumentInFrame); 197 UseCounter::count(*this, UseCounter::ImageDocumentInFrame);
198 } 198 }
199 199
200 DocumentParser* ImageDocument::createParser() 200 DocumentParser* ImageDocument::createParser()
201 { 201 {
202 return ImageDocumentParser::create(this); 202 return ImageDocumentParser::create(this);
203 } 203 }
204 204
205 void ImageDocument::createDocumentStructure() 205 void ImageDocument::createDocumentStructure()
206 { 206 {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 } 442 }
443 443
444 bool ImageEventListener::operator==(const EventListener& listener) const 444 bool ImageEventListener::operator==(const EventListener& listener) const
445 { 445 {
446 if (const ImageEventListener* imageEventListener = ImageEventListener::cast( &listener)) 446 if (const ImageEventListener* imageEventListener = ImageEventListener::cast( &listener))
447 return m_doc == imageEventListener->m_doc; 447 return m_doc == imageEventListener->m_doc;
448 return false; 448 return false;
449 } 449 }
450 450
451 } // namespace blink 451 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp ('k') | third_party/WebKit/Source/core/html/MediaDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698