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

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

Issue 267693002: Add picture related attributes to Source (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 7 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
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void HTMLSourceElement::setSrc(const String& url) 82 void HTMLSourceElement::setSrc(const String& url)
83 { 83 {
84 setAttribute(srcAttr, AtomicString(url)); 84 setAttribute(srcAttr, AtomicString(url));
85 } 85 }
86 86
87 const AtomicString& HTMLSourceElement::type() const 87 const AtomicString& HTMLSourceElement::type() const
88 { 88 {
89 return getAttribute(typeAttr); 89 return getAttribute(typeAttr);
90 } 90 }
91 91
92 const AtomicString& HTMLSourceElement::media() const
93 {
94 return getAttribute(mediaAttr);
95 }
96
97 const AtomicString& HTMLSourceElement::srcset() const
98 {
99 return getAttribute(srcsetAttr);
100 }
101
102 const AtomicString& HTMLSourceElement::sizes() const
103 {
104 return getAttribute(sizesAttr);
105 }
106
92 void HTMLSourceElement::setType(const AtomicString& type) 107 void HTMLSourceElement::setType(const AtomicString& type)
93 { 108 {
94 setAttribute(typeAttr, type); 109 setAttribute(typeAttr, type);
95 } 110 }
96 111
97 void HTMLSourceElement::scheduleErrorEvent() 112 void HTMLSourceElement::scheduleErrorEvent()
98 { 113 {
99 WTF_LOG(Media, "HTMLSourceElement::scheduleErrorEvent - %p", this); 114 WTF_LOG(Media, "HTMLSourceElement::scheduleErrorEvent - %p", this);
100 sourceErrorEventSender().dispatchEventSoon(this); 115 sourceErrorEventSender().dispatchEventSoon(this);
101 } 116 }
(...skipping 10 matching lines...) Expand all
112 WTF_LOG(Media, "HTMLSourceElement::dispatchPendingEvent - %p", this); 127 WTF_LOG(Media, "HTMLSourceElement::dispatchPendingEvent - %p", this);
113 dispatchEvent(Event::createCancelable(EventTypeNames::error)); 128 dispatchEvent(Event::createCancelable(EventTypeNames::error));
114 } 129 }
115 130
116 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const 131 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const
117 { 132 {
118 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute) ; 133 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute) ;
119 } 134 }
120 135
121 } 136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698