Chromium Code Reviews

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

Issue 839733003: Image() constructor's arguments should not have default values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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, 2008, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved.
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 25 matching lines...)
36 class ImageCandidate; 36 class ImageCandidate;
37 class ShadowRoot; 37 class ShadowRoot;
38 38
39 class HTMLImageElement final : public HTMLElement, public CanvasImageSource { 39 class HTMLImageElement final : public HTMLElement, public CanvasImageSource {
40 DEFINE_WRAPPERTYPEINFO(); 40 DEFINE_WRAPPERTYPEINFO();
41 public: 41 public:
42 class ViewportChangeListener; 42 class ViewportChangeListener;
43 43
44 static PassRefPtrWillBeRawPtr<HTMLImageElement> create(Document&); 44 static PassRefPtrWillBeRawPtr<HTMLImageElement> create(Document&);
45 static PassRefPtrWillBeRawPtr<HTMLImageElement> create(Document&, HTMLFormEl ement*, bool createdByParser); 45 static PassRefPtrWillBeRawPtr<HTMLImageElement> create(Document&, HTMLFormEl ement*, bool createdByParser);
46 static PassRefPtrWillBeRawPtr<HTMLImageElement> createForJSConstructor(Docum ent&);
47 static PassRefPtrWillBeRawPtr<HTMLImageElement> createForJSConstructor(Docum ent&, int width);
46 static PassRefPtrWillBeRawPtr<HTMLImageElement> createForJSConstructor(Docum ent&, int width, int height); 48 static PassRefPtrWillBeRawPtr<HTMLImageElement> createForJSConstructor(Docum ent&, int width, int height);
47 49
48 virtual ~HTMLImageElement(); 50 virtual ~HTMLImageElement();
49 virtual void trace(Visitor*) override; 51 virtual void trace(Visitor*) override;
50 52
51 int width(bool ignorePendingStylesheets = false); 53 int width(bool ignorePendingStylesheets = false);
52 int height(bool ignorePendingStylesheets = false); 54 int height(bool ignorePendingStylesheets = false);
53 55
54 int naturalWidth() const; 56 int naturalWidth() const;
55 int naturalHeight() const; 57 int naturalHeight() const;
(...skipping 100 matching lines...)
156 unsigned m_elementCreatedByParser : 1; 158 unsigned m_elementCreatedByParser : 1;
157 // Intrinsic sizing is viewport dependant if the 'w' descriptor was used for the picked resource. 159 // Intrinsic sizing is viewport dependant if the 'w' descriptor was used for the picked resource.
158 unsigned m_intrinsicSizingViewportDependant : 1; 160 unsigned m_intrinsicSizingViewportDependant : 1;
159 unsigned m_useFallbackContent : 1; 161 unsigned m_useFallbackContent : 1;
160 unsigned m_isFallbackImage : 1; 162 unsigned m_isFallbackImage : 1;
161 }; 163 };
162 164
163 } // namespace blink 165 } // namespace blink
164 166
165 #endif // HTMLImageElement_h 167 #endif // HTMLImageElement_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/js/script-tests/custom-constructors.js ('k') | Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine