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

Side by Side Diff: sky/engine/core/html/HTMLImageElement.cpp

Issue 758623002: Remove didNotifySubtreeInsertionsToDocument. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/html/HTMLImageElement.h ('k') | sky/engine/core/html/HTMLImportElement.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed.
5 * Copyright (C) 2010 Google Inc. All rights reserved. 5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 159
160 bool HTMLImageElement::canStartSelection() const 160 bool HTMLImageElement::canStartSelection() const
161 { 161 {
162 if (shadow()) 162 if (shadow())
163 return HTMLElement::canStartSelection(); 163 return HTMLElement::canStartSelection();
164 164
165 return false; 165 return false;
166 } 166 }
167 167
168 Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode* insertionPoint) 168 void HTMLImageElement::insertedInto(ContainerNode* insertionPoint)
169 { 169 {
170 HTMLElement::insertedInto(insertionPoint);
171
170 if (m_listener) 172 if (m_listener)
171 document().mediaQueryMatcher().addViewportListener(m_listener.get()); 173 document().mediaQueryMatcher().addViewportListener(m_listener.get());
172 174
173 // If we have been inserted from a renderer-less document, 175 // If we have been inserted from a renderer-less document,
174 // our loader may have not fetched the image, so do it now. 176 // our loader may have not fetched the image, so do it now.
175 if ((insertionPoint->inDocument() && !imageLoader().image())) 177 if ((insertionPoint->inDocument() && !imageLoader().image()))
176 imageLoader().updateFromElement(ImageLoader::UpdateNormal, m_elementCrea tedByParser ? ImageLoader::ForceLoadImmediately : ImageLoader::LoadNormally); 178 imageLoader().updateFromElement(ImageLoader::UpdateNormal, m_elementCrea tedByParser ? ImageLoader::ForceLoadImmediately : ImageLoader::LoadNormally);
177
178 return HTMLElement::insertedInto(insertionPoint);
179 } 179 }
180 180
181 void HTMLImageElement::removedFrom(ContainerNode* insertionPoint) 181 void HTMLImageElement::removedFrom(ContainerNode* insertionPoint)
182 { 182 {
183 if (m_listener) 183 if (m_listener)
184 document().mediaQueryMatcher().removeViewportListener(m_listener.get()); 184 document().mediaQueryMatcher().removeViewportListener(m_listener.get());
185 HTMLElement::removedFrom(insertionPoint); 185 HTMLElement::removedFrom(insertionPoint);
186 } 186 }
187 187
188 int HTMLImageElement::width(bool ignorePendingStylesheets) 188 int HTMLImageElement::width(bool ignorePendingStylesheets)
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 383 }
384 imageLoader().updateFromElement(behavior); 384 imageLoader().updateFromElement(behavior);
385 } 385 }
386 386
387 const KURL& HTMLImageElement::sourceURL() const 387 const KURL& HTMLImageElement::sourceURL() const
388 { 388 {
389 return cachedImage()->response().url(); 389 return cachedImage()->response().url();
390 } 390 }
391 391
392 } 392 }
OLDNEW
« no previous file with comments | « sky/engine/core/html/HTMLImageElement.h ('k') | sky/engine/core/html/HTMLImportElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698