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

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

Issue 99333011: Make sure getAttribute() / setAttribute() callers use AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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/HTMLSelectElement.cpp ('k') | Source/core/html/HTMLSourceElement.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) 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 17 matching lines...) Expand all
28 28
29 #include "core/html/HTMLElement.h" 29 #include "core/html/HTMLElement.h"
30 #include "platform/Timer.h" 30 #include "platform/Timer.h"
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 class HTMLSourceElement FINAL : public HTMLElement { 34 class HTMLSourceElement FINAL : public HTMLElement {
35 public: 35 public:
36 static PassRefPtr<HTMLSourceElement> create(Document&); 36 static PassRefPtr<HTMLSourceElement> create(Document&);
37 37
38 String media() const; 38 const AtomicString& media() const;
39 String type() const; 39 const AtomicString& type() const;
40 void setSrc(const String&); 40 void setSrc(const String&);
41 void setMedia(const String&); 41 void setMedia(const AtomicString&);
42 void setType(const String&); 42 void setType(const AtomicString&);
43 43
44 void scheduleErrorEvent(); 44 void scheduleErrorEvent();
45 void cancelPendingErrorEvent(); 45 void cancelPendingErrorEvent();
46 46
47 private: 47 private:
48 explicit HTMLSourceElement(Document&); 48 explicit HTMLSourceElement(Document&);
49 49
50 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 50 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
51 virtual void removedFrom(ContainerNode*) OVERRIDE; 51 virtual void removedFrom(ContainerNode*) OVERRIDE;
52 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; 52 virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
53 53
54 void errorEventTimerFired(Timer<HTMLSourceElement>*); 54 void errorEventTimerFired(Timer<HTMLSourceElement>*);
55 55
56 Timer<HTMLSourceElement> m_errorEventTimer; 56 Timer<HTMLSourceElement> m_errorEventTimer;
57 }; 57 };
58 58
59 DEFINE_NODE_TYPE_CASTS(HTMLSourceElement, hasTagName(HTMLNames::sourceTag)); 59 DEFINE_NODE_TYPE_CASTS(HTMLSourceElement, hasTagName(HTMLNames::sourceTag));
60 60
61 } // namespace WebCore 61 } // namespace WebCore
62 62
63 #endif 63 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLSelectElement.cpp ('k') | Source/core/html/HTMLSourceElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698