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

Side by Side Diff: Source/core/html/HTMLVideoElement.cpp

Issue 41343003: Remove dead code for reflected attributes on <audio>, <video> and <track> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 | « Source/core/html/HTMLVideoElement.h ('k') | no next file » | 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) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return player()->naturalSize().width(); 136 return player()->naturalSize().width();
137 } 137 }
138 138
139 unsigned HTMLVideoElement::videoHeight() const 139 unsigned HTMLVideoElement::videoHeight() const
140 { 140 {
141 if (!player()) 141 if (!player())
142 return 0; 142 return 0;
143 return player()->naturalSize().height(); 143 return player()->naturalSize().height();
144 } 144 }
145 145
146 unsigned HTMLVideoElement::width() const
147 {
148 bool ok;
149 unsigned w = getAttribute(widthAttr).string().toUInt(&ok);
150 return ok ? w : 0;
151 }
152
153 unsigned HTMLVideoElement::height() const
154 {
155 bool ok;
156 unsigned h = getAttribute(heightAttr).string().toUInt(&ok);
157 return ok ? h : 0;
158 }
159
160 bool HTMLVideoElement::isURLAttribute(const Attribute& attribute) const 146 bool HTMLVideoElement::isURLAttribute(const Attribute& attribute) const
161 { 147 {
162 return attribute.name() == posterAttr || HTMLMediaElement::isURLAttribute(at tribute); 148 return attribute.name() == posterAttr || HTMLMediaElement::isURLAttribute(at tribute);
163 } 149 }
164 150
165 const AtomicString HTMLVideoElement::imageSourceURL() const 151 const AtomicString HTMLVideoElement::imageSourceURL() const
166 { 152 {
167 const AtomicString& url = getAttribute(posterAttr); 153 const AtomicString& url = getAttribute(posterAttr);
168 if (!stripLeadingAndTrailingHTMLSpaces(url).isEmpty()) 154 if (!stripLeadingAndTrailingHTMLSpaces(url).isEmpty())
169 return url; 155 return url;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 261
276 KURL HTMLVideoElement::posterImageURL() const 262 KURL HTMLVideoElement::posterImageURL() const
277 { 263 {
278 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); 264 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL());
279 if (url.isEmpty()) 265 if (url.isEmpty())
280 return KURL(); 266 return KURL();
281 return document().completeURL(url); 267 return document().completeURL(url);
282 } 268 }
283 269
284 } 270 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLVideoElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698