Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in: https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ They should be CamelCase, and that's what most of them already do. This converts the rest, which are a few. For the ones that already used `e` or `k` prefixes, I've mostly done: for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done For the ones that used uppercase, I've removed the prefix if it was already in the type name, and turn them into CamelCase. Depends on D28680 Differential Revision: https://phabricator.services.mozilla.com/D28681
This commit is contained in:
@@ -1638,7 +1638,7 @@ bool HTMLMediaElement::IsVideoDecodingSuspended() const {
|
||||
}
|
||||
|
||||
bool HTMLMediaElement::IsVisible() const {
|
||||
return mVisibilityState == Visibility::APPROXIMATELY_VISIBLE;
|
||||
return mVisibilityState == Visibility::ApproximatelyVisible;
|
||||
}
|
||||
|
||||
already_AddRefed<layers::Image> HTMLMediaElement::GetCurrentImage() {
|
||||
@@ -4314,7 +4314,7 @@ void HTMLMediaElement::ReportTelemetry() {
|
||||
|
||||
void HTMLMediaElement::UnbindFromTree(bool aDeep, bool aNullParent) {
|
||||
mUnboundFromTree = true;
|
||||
mVisibilityState = Visibility::UNTRACKED;
|
||||
mVisibilityState = Visibility::Untracked;
|
||||
|
||||
if (IsInComposedDoc()) {
|
||||
NotifyUAWidgetTeardown();
|
||||
@@ -6352,14 +6352,14 @@ bool HTMLMediaElement::AudioChannelAgentBlockedPlay() {
|
||||
|
||||
static const char* VisibilityString(Visibility aVisibility) {
|
||||
switch (aVisibility) {
|
||||
case Visibility::UNTRACKED: {
|
||||
return "UNTRACKED";
|
||||
case Visibility::Untracked: {
|
||||
return "Untracked";
|
||||
}
|
||||
case Visibility::APPROXIMATELY_NONVISIBLE: {
|
||||
return "APPROXIMATELY_NONVISIBLE";
|
||||
case Visibility::ApproximatelyNonVisible: {
|
||||
return "ApproximatelyNonVisible";
|
||||
}
|
||||
case Visibility::APPROXIMATELY_VISIBLE: {
|
||||
return "APPROXIMATELY_VISIBLE";
|
||||
case Visibility::ApproximatelyVisible: {
|
||||
return "ApproximatelyVisible";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6380,11 +6380,11 @@ void HTMLMediaElement::OnVisibilityChange(Visibility aNewVisibility) {
|
||||
}
|
||||
|
||||
switch (aNewVisibility) {
|
||||
case Visibility::UNTRACKED: {
|
||||
case Visibility::Untracked: {
|
||||
MOZ_ASSERT_UNREACHABLE("Shouldn't notify for untracked visibility");
|
||||
return;
|
||||
}
|
||||
case Visibility::APPROXIMATELY_NONVISIBLE: {
|
||||
case Visibility::ApproximatelyNonVisible: {
|
||||
if (mPlayTime.IsStarted()) {
|
||||
// Not visible, play time is running -> Start hidden play time if
|
||||
// needed.
|
||||
@@ -6392,7 +6392,7 @@ void HTMLMediaElement::OnVisibilityChange(Visibility aNewVisibility) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Visibility::APPROXIMATELY_VISIBLE: {
|
||||
case Visibility::ApproximatelyVisible: {
|
||||
// Visible -> Just pause hidden play time (no-op if already paused).
|
||||
HiddenVideoStop();
|
||||
break;
|
||||
@@ -6942,7 +6942,7 @@ void HTMLMediaElement::NotifyCueDisplayStatesChanged() {
|
||||
}
|
||||
|
||||
void HTMLMediaElement::MarkAsContentSource(CallerAPI aAPI) {
|
||||
const bool isVisible = mVisibilityState == Visibility::APPROXIMATELY_VISIBLE;
|
||||
const bool isVisible = mVisibilityState == Visibility::ApproximatelyVisible;
|
||||
|
||||
if (isVisible) {
|
||||
// 0 = ALL_VISIBLE
|
||||
|
||||
Reference in New Issue
Block a user