Commit 5514046a authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Remove using directives ("using namespace x") from renderer/core/html/track/.

Bug: 82078
Change-Id: I27457fb30c8f78060cdcc2bfdae18fd5d78c3920
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1870048
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarsrirama chandra sekhar <srirama.m@samsung.com>
Cr-Commit-Position: refs/heads/master@{#707729}
parent ffca24e7
...@@ -40,8 +40,6 @@ ...@@ -40,8 +40,6 @@
namespace blink { namespace blink {
using namespace html_names;
static String UrlForLoggingTrack(const KURL& url) { static String UrlForLoggingTrack(const KURL& url) {
static const unsigned kMaximumURLLengthForLogging = 128; static const unsigned kMaximumURLLengthForLogging = 128;
...@@ -51,7 +49,7 @@ static String UrlForLoggingTrack(const KURL& url) { ...@@ -51,7 +49,7 @@ static String UrlForLoggingTrack(const KURL& url) {
} }
HTMLTrackElement::HTMLTrackElement(Document& document) HTMLTrackElement::HTMLTrackElement(Document& document)
: HTMLElement(kTrackTag, document), : HTMLElement(html_names::kTrackTag, document),
load_timer_(document.GetTaskRunner(TaskType::kNetworking), load_timer_(document.GetTaskRunner(TaskType::kNetworking),
this, this,
&HTMLTrackElement::LoadTimerFired) { &HTMLTrackElement::LoadTimerFired) {
...@@ -83,13 +81,13 @@ void HTMLTrackElement::RemovedFrom(ContainerNode& insertion_point) { ...@@ -83,13 +81,13 @@ void HTMLTrackElement::RemovedFrom(ContainerNode& insertion_point) {
void HTMLTrackElement::ParseAttribute( void HTMLTrackElement::ParseAttribute(
const AttributeModificationParams& params) { const AttributeModificationParams& params) {
const QualifiedName& name = params.name; const QualifiedName& name = params.name;
if (name == kSrcAttr) { if (name == html_names::kSrcAttr) {
ScheduleLoad(); ScheduleLoad();
// 4.8.10.12.3 Sourcing out-of-band text tracks // 4.8.10.12.3 Sourcing out-of-band text tracks
// As the kind, label, and srclang attributes are set, changed, or removed, // As the kind, label, and srclang attributes are set, changed, or removed,
// the text track must update accordingly... // the text track must update accordingly...
} else if (name == kKindAttr) { } else if (name == html_names::kKindAttr) {
AtomicString lower_case_value = params.new_value.LowerASCII(); AtomicString lower_case_value = params.new_value.LowerASCII();
// 'missing value default' ("subtitles") // 'missing value default' ("subtitles")
if (lower_case_value.IsNull()) if (lower_case_value.IsNull())
...@@ -99,11 +97,11 @@ void HTMLTrackElement::ParseAttribute( ...@@ -99,11 +97,11 @@ void HTMLTrackElement::ParseAttribute(
lower_case_value = TextTrack::MetadataKeyword(); lower_case_value = TextTrack::MetadataKeyword();
track()->SetKind(lower_case_value); track()->SetKind(lower_case_value);
} else if (name == kLabelAttr) { } else if (name == html_names::kLabelAttr) {
track()->SetLabel(params.new_value); track()->SetLabel(params.new_value);
} else if (name == kSrclangAttr) { } else if (name == html_names::kSrclangAttr) {
track()->SetLanguage(params.new_value); track()->SetLanguage(params.new_value);
} else if (name == kIdAttr) { } else if (name == html_names::kIdAttr) {
track()->SetId(params.new_value); track()->SetId(params.new_value);
} }
...@@ -115,7 +113,7 @@ const AtomicString& HTMLTrackElement::kind() { ...@@ -115,7 +113,7 @@ const AtomicString& HTMLTrackElement::kind() {
} }
void HTMLTrackElement::setKind(const AtomicString& kind) { void HTMLTrackElement::setKind(const AtomicString& kind) {
setAttribute(kKindAttr, kind); setAttribute(html_names::kKindAttr, kind);
} }
LoadableTextTrack* HTMLTrackElement::EnsureTrack() { LoadableTextTrack* HTMLTrackElement::EnsureTrack() {
...@@ -131,7 +129,7 @@ TextTrack* HTMLTrackElement::track() { ...@@ -131,7 +129,7 @@ TextTrack* HTMLTrackElement::track() {
} }
bool HTMLTrackElement::IsURLAttribute(const Attribute& attribute) const { bool HTMLTrackElement::IsURLAttribute(const Attribute& attribute) const {
return attribute.GetName() == kSrcAttr || return attribute.GetName() == html_names::kSrcAttr ||
HTMLElement::IsURLAttribute(attribute); HTMLElement::IsURLAttribute(attribute);
} }
...@@ -169,7 +167,7 @@ void HTMLTrackElement::LoadTimerFired(TimerBase*) { ...@@ -169,7 +167,7 @@ void HTMLTrackElement::LoadTimerFired(TimerBase*) {
DVLOG(TRACK_LOG_LEVEL) << "loadTimerFired"; DVLOG(TRACK_LOG_LEVEL) << "loadTimerFired";
// 7. [X] Let URL be the track URL of the track element. // 7. [X] Let URL be the track URL of the track element.
KURL url = GetNonEmptyURLAttribute(kSrcAttr); KURL url = GetNonEmptyURLAttribute(html_names::kSrcAttr);
// Whenever a track element has its src attribute set, changed, // Whenever a track element has its src attribute set, changed,
// or removed, the user agent must immediately empty the // or removed, the user agent must immediately empty the
......
...@@ -52,8 +52,6 @@ ...@@ -52,8 +52,6 @@
namespace blink { namespace blink {
using namespace html_names;
const unsigned kFileIdentifierLength = 6; const unsigned kFileIdentifierLength = 6;
const unsigned kRegionIdentifierLength = 6; const unsigned kRegionIdentifierLength = 6;
const unsigned kStyleIdentifierLength = 5; const unsigned kStyleIdentifierLength = 5;
...@@ -608,7 +606,7 @@ void VTTTreeBuilder::ConstructTreeFromToken(Document& document) { ...@@ -608,7 +606,7 @@ void VTTTreeBuilder::ConstructTreeFromToken(Document& document) {
child->SetTrack(track_); child->SetTrack(track_);
if (!token_.Classes().IsEmpty()) if (!token_.Classes().IsEmpty())
child->setAttribute(kClassAttr, token_.Classes()); child->setAttribute(html_names::kClassAttr, token_.Classes());
if (node_type == kVTTNodeTypeVoice) { if (node_type == kVTTNodeTypeVoice) {
child->setAttribute(VTTElement::VoiceAttributeName(), child->setAttribute(VTTElement::VoiceAttributeName(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment