summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/html/html_style_element.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/html_style_element.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/html/html_style_element.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/html_style_element.cc b/chromium/third_party/blink/renderer/core/html/html_style_element.cc
index 72a1ca8b937..e4e210e3234 100644
--- a/chromium/third_party/blink/renderer/core/html/html_style_element.cc
+++ b/chromium/third_party/blink/renderer/core/html/html_style_element.cc
@@ -33,11 +33,11 @@
namespace blink {
-using namespace HTMLNames;
+using namespace html_names;
inline HTMLStyleElement::HTMLStyleElement(Document& document,
const CreateElementFlags flags)
- : HTMLElement(styleTag, document),
+ : HTMLElement(kStyleTag, document),
StyleElement(&document, flags.IsCreatedByParser()),
fired_load_(false),
loaded_sheet_(false) {}
@@ -46,18 +46,18 @@ HTMLStyleElement::~HTMLStyleElement() = default;
HTMLStyleElement* HTMLStyleElement::Create(Document& document,
const CreateElementFlags flags) {
- return new HTMLStyleElement(document, flags);
+ return MakeGarbageCollected<HTMLStyleElement>(document, flags);
}
void HTMLStyleElement::ParseAttribute(
const AttributeModificationParams& params) {
- if (params.name == titleAttr && sheet_ && IsInDocumentTree()) {
+ if (params.name == kTitleAttr && sheet_ && IsInDocumentTree()) {
sheet_->SetTitle(params.new_value);
- } else if (params.name == mediaAttr && isConnected() &&
+ } else if (params.name == kMediaAttr && isConnected() &&
GetDocument().IsActive() && sheet_) {
sheet_->SetMediaQueries(MediaQuerySet::Create(params.new_value));
GetDocument().GetStyleEngine().MediaQueriesChangedInScope(GetTreeScope());
- } else if (params.name == typeAttr) {
+ } else if (params.name == kTypeAttr) {
HTMLElement::ParseAttribute(params);
StyleElement::ChildrenChanged(*this);
} else {
@@ -101,11 +101,11 @@ void HTMLStyleElement::ChildrenChanged(const ChildrenChange& change) {
}
const AtomicString& HTMLStyleElement::media() const {
- return getAttribute(mediaAttr);
+ return getAttribute(kMediaAttr);
}
const AtomicString& HTMLStyleElement::type() const {
- return getAttribute(typeAttr);
+ return getAttribute(kTypeAttr);
}
void HTMLStyleElement::DispatchPendingEvent(
@@ -113,9 +113,9 @@ void HTMLStyleElement::DispatchPendingEvent(
if (loaded_sheet_) {
if (GetDocument().HasListenerType(
Document::kLoadListenerAtCapturePhaseOrAtStyleElement))
- DispatchEvent(*Event::Create(EventTypeNames::load));
+ DispatchEvent(*Event::Create(event_type_names::kLoad));
} else {
- DispatchEvent(*Event::Create(EventTypeNames::error));
+ DispatchEvent(*Event::Create(event_type_names::kError));
}
// Checks Document's load event synchronously here for performance.
// This is safe because dispatchPendingEvent() is called asynchronously.