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

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

Issue 701663002: Remove HTMLVideoElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/frame/UseCounter.cpp ('k') | sky/engine/core/html/HTMLMediaElement.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, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 25 matching lines...) Expand all
36 { 36 {
37 } 37 }
38 38
39 HTMLImageLoader::~HTMLImageLoader() 39 HTMLImageLoader::~HTMLImageLoader()
40 { 40 {
41 } 41 }
42 42
43 void HTMLImageLoader::dispatchLoadEvent() 43 void HTMLImageLoader::dispatchLoadEvent()
44 { 44 {
45 WTF_LOG(Timers, "HTMLImageLoader::dispatchLoadEvent %p", this); 45 WTF_LOG(Timers, "HTMLImageLoader::dispatchLoadEvent %p", this);
46
47 // HTMLVideoElement uses this class to load the poster image, but it should not fire events for loading or failure.
48 if (isHTMLVideoElement(*element()))
49 return;
50
51 bool errorOccurred = image()->errorOccurred(); 46 bool errorOccurred = image()->errorOccurred();
52 element()->dispatchEvent(Event::create(errorOccurred ? EventTypeNames::error : EventTypeNames::load)); 47 element()->dispatchEvent(Event::create(errorOccurred ? EventTypeNames::error : EventTypeNames::load));
53 } 48 }
54 49
55 String HTMLImageLoader::sourceURI(const AtomicString& attr) const 50 String HTMLImageLoader::sourceURI(const AtomicString& attr) const
56 { 51 {
57 return stripLeadingAndTrailingHTMLSpaces(attr); 52 return stripLeadingAndTrailingHTMLSpaces(attr);
58 } 53 }
59 54
60 void HTMLImageLoader::notifyFinished(Resource*) 55 void HTMLImageLoader::notifyFinished(Resource*)
61 { 56 {
62 ImageLoader::notifyFinished(image()); 57 ImageLoader::notifyFinished(image());
63 } 58 }
64 59
65 } 60 }
OLDNEW
« no previous file with comments | « sky/engine/core/frame/UseCounter.cpp ('k') | sky/engine/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698