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

Side by Side Diff: Source/core/html/HTMLPictureElement.h

Issue 14449003: Picture element initial implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@picture_after_rebase
Patch Set: Created 7 years, 8 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
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLPictureElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2010 Google Inc. All rights reserved.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 *
22 */
23
24 #ifndef HTMLPictureElement_h
25 #define HTMLPictureElement_h
26
27 #include "HTMLImageElement.h"
28 #include "HTMLSourceElement.h"
29
30 namespace WebCore {
31
32 class HTMLPictureElement : public HTMLImageElement {
33 HTMLPictureElement(const QualifiedName& tagName, Document* document)
34 : HTMLImageElement(tagName, document, 0),
35 m_hasSrc(false)
36 {
37 ASSERT(hasTagName(pictureTag));
38 }
39
40 ~HTMLPictureElement();
41 const AtomicString& imageSourceURL() const { return getMatchingSource()->get Attribute(HTMLNames::srcAttr); }
42 const Element* getMatchingSource() const;
43
44 virtual bool isPictureElement() const { return true; }
45 virtual void parseAttribute(const QualifiedName&, const AtomicString&);
46
47 bool m_hasSrc;
48
49 public:
50 static PassRefPtr<HTMLPictureElement> create(Document*);
51
52 static PassRefPtr<HTMLPictureElement> create(const QualifiedName& tagName, D ocument*);
53 static PassRefPtr<HTMLPictureElement> createForJSConstructor(Document*, cons t int* optionalWidth, const int* optionalHeight);
54 void sourceWasAdded();
55
56 };
57
58 } // namespace
59
60 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/HTMLPictureElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698