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

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

Issue 334283004: Rename DOMWindow to LocalDOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 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/HTMLFrameSetElement.cpp ('k') | Source/core/inspector/ConsoleMessage.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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 m_imageElement = HTMLImageElement::create(*this); 200 m_imageElement = HTMLImageElement::create(*this);
201 m_imageElement->setAttribute(styleAttr, "-webkit-user-select: none"); 201 m_imageElement->setAttribute(styleAttr, "-webkit-user-select: none");
202 m_imageElement->setLoadManually(true); 202 m_imageElement->setLoadManually(true);
203 m_imageElement->setSrc(url().string()); 203 m_imageElement->setSrc(url().string());
204 body->appendChild(m_imageElement.get()); 204 body->appendChild(m_imageElement.get());
205 205
206 if (shouldShrinkToFit()) { 206 if (shouldShrinkToFit()) {
207 // Add event listeners 207 // Add event listeners
208 RefPtr<EventListener> listener = ImageEventListener::create(this); 208 RefPtr<EventListener> listener = ImageEventListener::create(this);
209 if (DOMWindow* domWindow = this->domWindow()) 209 if (LocalDOMWindow* domWindow = this->domWindow())
210 domWindow->addEventListener("resize", listener, false); 210 domWindow->addEventListener("resize", listener, false);
211 m_imageElement->addEventListener("click", listener.release(), false); 211 m_imageElement->addEventListener("click", listener.release(), false);
212 } 212 }
213 213
214 rootElement->appendChild(head); 214 rootElement->appendChild(head);
215 rootElement->appendChild(body); 215 rootElement->appendChild(body);
216 } 216 }
217 217
218 float ImageDocument::scale() const 218 float ImageDocument::scale() const
219 { 219 {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 } 393 }
394 394
395 bool ImageEventListener::operator==(const EventListener& listener) 395 bool ImageEventListener::operator==(const EventListener& listener)
396 { 396 {
397 if (const ImageEventListener* imageEventListener = ImageEventListener::cast( &listener)) 397 if (const ImageEventListener* imageEventListener = ImageEventListener::cast( &listener))
398 return m_doc == imageEventListener->m_doc; 398 return m_doc == imageEventListener->m_doc;
399 return false; 399 return false;
400 } 400 }
401 401
402 } 402 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFrameSetElement.cpp ('k') | Source/core/inspector/ConsoleMessage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698