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

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

Issue 240153003: Remove the HTMLSourceElement.media IDL attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update test Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLSourceElement.h ('k') | Source/core/html/HTMLSourceElement.idl » ('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) 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 if (isHTMLMediaElement(parent)) 67 if (isHTMLMediaElement(parent))
68 toHTMLMediaElement(parent)->sourceWasRemoved(this); 68 toHTMLMediaElement(parent)->sourceWasRemoved(this);
69 HTMLElement::removedFrom(removalRoot); 69 HTMLElement::removedFrom(removalRoot);
70 } 70 }
71 71
72 void HTMLSourceElement::setSrc(const String& url) 72 void HTMLSourceElement::setSrc(const String& url)
73 { 73 {
74 setAttribute(srcAttr, AtomicString(url)); 74 setAttribute(srcAttr, AtomicString(url));
75 } 75 }
76 76
77 const AtomicString& HTMLSourceElement::media() const
78 {
79 return getAttribute(mediaAttr);
80 }
81
82 void HTMLSourceElement::setMedia(const AtomicString& media)
83 {
84 setAttribute(mediaAttr, media);
85 }
86
87 const AtomicString& HTMLSourceElement::type() const 77 const AtomicString& HTMLSourceElement::type() const
88 { 78 {
89 return getAttribute(typeAttr); 79 return getAttribute(typeAttr);
90 } 80 }
91 81
92 void HTMLSourceElement::setType(const AtomicString& type) 82 void HTMLSourceElement::setType(const AtomicString& type)
93 { 83 {
94 setAttribute(typeAttr, type); 84 setAttribute(typeAttr, type);
95 } 85 }
96 86
(...skipping 17 matching lines...) Expand all
114 WTF_LOG(Media, "HTMLSourceElement::errorEventTimerFired - %p", this); 104 WTF_LOG(Media, "HTMLSourceElement::errorEventTimerFired - %p", this);
115 dispatchEvent(Event::createCancelable(EventTypeNames::error)); 105 dispatchEvent(Event::createCancelable(EventTypeNames::error));
116 } 106 }
117 107
118 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const 108 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const
119 { 109 {
120 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute) ; 110 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute) ;
121 } 111 }
122 112
123 } 113 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLSourceElement.h ('k') | Source/core/html/HTMLSourceElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698