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

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

Issue 1055323002: Remove the x,y,width,height methods from HTMLImageElement. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove attrs Created 5 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 | « sky/engine/core/html/HTMLAttributeNames.in ('k') | sky/engine/core/html/HTMLImageElement.cpp » ('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, 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 27 matching lines...) Expand all
38 DEFINE_WRAPPERTYPEINFO(); 38 DEFINE_WRAPPERTYPEINFO();
39 public: 39 public:
40 class ViewportChangeListener; 40 class ViewportChangeListener;
41 41
42 static PassRefPtr<HTMLImageElement> create(Document&); 42 static PassRefPtr<HTMLImageElement> create(Document&);
43 static PassRefPtr<HTMLImageElement> create(Document&, bool createdByParser); 43 static PassRefPtr<HTMLImageElement> create(Document&, bool createdByParser);
44 static PassRefPtr<HTMLImageElement> createForJSConstructor(Document&, int wi dth, int height); 44 static PassRefPtr<HTMLImageElement> createForJSConstructor(Document&, int wi dth, int height);
45 45
46 virtual ~HTMLImageElement(); 46 virtual ~HTMLImageElement();
47 47
48 int width();
49 int height();
50
51 int naturalWidth() const; 48 int naturalWidth() const;
52 int naturalHeight() const; 49 int naturalHeight() const;
53 const String& currentSrc() const; 50 const String& currentSrc() const;
54 51
55 ImageResource* cachedImage() const { return imageLoader().image(); } 52 ImageResource* cachedImage() const { return imageLoader().image(); }
56 void setImageResource(ImageResource* i) { imageLoader().setImage(i); }; 53 void setImageResource(ImageResource* i) { imageLoader().setImage(i); };
57 54
58 void setHeight(int);
59
60 KURL src() const; 55 KURL src() const;
61 void setSrc(const String&); 56 void setSrc(const String&);
62 57
63 void setWidth(int);
64
65 int x() const;
66 int y() const;
67
68 bool complete() const; 58 bool complete() const;
69 59
70 bool hasPendingActivity() const { return imageLoader().hasPendingActivity(); } 60 bool hasPendingActivity() const { return imageLoader().hasPendingActivity(); }
71 61
72 virtual bool canContainRangeEndPoint() const override { return false; } 62 virtual bool canContainRangeEndPoint() const override { return false; }
73 63
74 void addClient(ImageLoaderClient* client) { imageLoader().addClient(client); } 64 void addClient(ImageLoaderClient* client) { imageLoader().addClient(client); }
75 void removeClient(ImageLoaderClient* client) { imageLoader().removeClient(cl ient); } 65 void removeClient(ImageLoaderClient* client) { imageLoader().removeClient(cl ient); }
76 66
77 virtual const AtomicString imageSourceURL() const override; 67 virtual const AtomicString imageSourceURL() const override;
(...skipping 28 matching lines...) Expand all
106 unsigned m_elementCreatedByParser : 1; 96 unsigned m_elementCreatedByParser : 1;
107 // Intrinsic sizing is viewport dependant if the 'w' descriptor was used for the picked resource. 97 // Intrinsic sizing is viewport dependant if the 'w' descriptor was used for the picked resource.
108 unsigned m_intrinsicSizingViewportDependant : 1; 98 unsigned m_intrinsicSizingViewportDependant : 1;
109 // Effective size is viewport dependant if the sizes attribute's effective s ize used v* length units. 99 // Effective size is viewport dependant if the sizes attribute's effective s ize used v* length units.
110 unsigned m_effectiveSizeViewportDependant : 1; 100 unsigned m_effectiveSizeViewportDependant : 1;
111 }; 101 };
112 102
113 } // namespace blink 103 } // namespace blink
114 104
115 #endif // SKY_ENGINE_CORE_HTML_HTMLIMAGEELEMENT_H_ 105 #endif // SKY_ENGINE_CORE_HTML_HTMLIMAGEELEMENT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/html/HTMLAttributeNames.in ('k') | sky/engine/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698