Commit 63be8d15 authored by Sylvestre Ledru's avatar Sylvestre Ledru
Browse files

Bug 1519636 - Reformat recent changes to the Google coding style r=necko-reviewers,dragana

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D77580
parent 42e0c61e
...@@ -667,8 +667,7 @@ void DOMIntersectionObserver::QueueIntersectionObserverEntry( ...@@ -667,8 +667,7 @@ void DOMIntersectionObserver::QueueIntersectionObserverEntry(
} }
RefPtr<DOMIntersectionObserverEntry> entry = new DOMIntersectionObserverEntry( RefPtr<DOMIntersectionObserverEntry> entry = new DOMIntersectionObserverEntry(
this, time, rootBounds.forget(), boundingClientRect.forget(), this, time, rootBounds.forget(), boundingClientRect.forget(),
intersectionRect.forget(), aIsIntersecting, aTarget, intersectionRect.forget(), aIsIntersecting, aTarget, aIntersectionRatio);
aIntersectionRatio);
mQueuedEntries.AppendElement(entry.forget()); mQueuedEntries.AppendElement(entry.forget());
} }
......
...@@ -86,7 +86,8 @@ void HTMLDialogElement::ShowModal(ErrorResult& aError) { ...@@ -86,7 +86,8 @@ void HTMLDialogElement::ShowModal(ErrorResult& aError) {
} }
if (Open()) { if (Open()) {
aError.ThrowInvalidStateError("Dialog element already has an 'open' attribute"); aError.ThrowInvalidStateError(
"Dialog element already has an 'open' attribute");
return; return;
} }
......
...@@ -1949,8 +1949,7 @@ MediaManager::MediaManager(UniquePtr<base::Thread> aMediaThread) ...@@ -1949,8 +1949,7 @@ MediaManager::MediaManager(UniquePtr<base::Thread> aMediaThread)
mPrefs.mHPFOn ? "on" : "off", mPrefs.mHPFOn ? "on" : "off",
mPrefs.mExperimentalInputProcessing ? "on" : "off", mPrefs.mExperimentalInputProcessing ? "on" : "off",
mPrefs.mNoiseOn ? "on" : "off", mPrefs.mAec, mPrefs.mAgc, mPrefs.mNoise, mPrefs.mNoiseOn ? "on" : "off", mPrefs.mAec, mPrefs.mAgc, mPrefs.mNoise,
mPrefs.mRoutingMode, mPrefs.mRoutingMode, mPrefs.mExtendedFilter ? "on" : "off",
mPrefs.mExtendedFilter ? "on" : "off",
mPrefs.mDelayAgnostic ? "on" : "off", mPrefs.mChannels); mPrefs.mDelayAgnostic ? "on" : "off", mPrefs.mChannels);
} }
......
...@@ -463,8 +463,7 @@ class RestyleManager { ...@@ -463,8 +463,7 @@ class RestyleManager {
* attribute changes that happens not to have any effect on the style of that * attribute changes that happens not to have any effect on the style of that
* element or any descendant or sibling. * element or any descendant or sibling.
*/ */
bool ProcessPostTraversal(Element* aElement, bool ProcessPostTraversal(Element* aElement, ServoRestyleState& aRestyleState,
ServoRestyleState& aRestyleState,
ServoPostTraversalFlags aFlags); ServoPostTraversalFlags aFlags);
struct TextPostTraversalState; struct TextPostTraversalState;
......
...@@ -104,7 +104,8 @@ template <class SpanT, bool IsConst> ...@@ -104,7 +104,8 @@ template <class SpanT, bool IsConst>
class span_iterator { class span_iterator {
using element_type_ = typename SpanT::element_type; using element_type_ = typename SpanT::element_type;
template <class ElementType, size_t Extent> friend class ::mozilla::Span; template <class ElementType, size_t Extent>
friend class ::mozilla::Span;
public: public:
using iterator_category = std::random_access_iterator_tag; using iterator_category = std::random_access_iterator_tag;
...@@ -125,11 +126,11 @@ class span_iterator { ...@@ -125,11 +126,11 @@ class span_iterator {
private: private:
// For whatever reason, the compiler doesn't like optimizing away the above // For whatever reason, the compiler doesn't like optimizing away the above
// MOZ_RELEASE_ASSERT when `span_iterator` is constructed for obviously-correct // MOZ_RELEASE_ASSERT when `span_iterator` is constructed for
// cases like `span.begin()` or `span.end()`. We provide this private // obviously-correct cases like `span.begin()` or `span.end()`. We provide
// constructor for such cases. // this private constructor for such cases.
constexpr span_iterator(const SpanT* span, typename SpanT::index_type index, constexpr span_iterator(const SpanT* span, typename SpanT::index_type index,
SpanKnownBounds) SpanKnownBounds)
: span_(span), index_(index) {} : span_(span), index_(index) {}
public: public:
...@@ -693,10 +694,16 @@ class Span { ...@@ -693,10 +694,16 @@ class Span {
// [Span.iter], Span iterator support // [Span.iter], Span iterator support
iterator begin() const { return {this, 0, span_details::SpanKnownBounds{}}; } iterator begin() const { return {this, 0, span_details::SpanKnownBounds{}}; }
iterator end() const { return {this, Length(), span_details::SpanKnownBounds{}}; } iterator end() const {
return {this, Length(), span_details::SpanKnownBounds{}};
}
const_iterator cbegin() const { return {this, 0, span_details::SpanKnownBounds{}}; } const_iterator cbegin() const {
const_iterator cend() const { return {this, Length(), span_details::SpanKnownBounds{}}; } return {this, 0, span_details::SpanKnownBounds{}};
}
const_iterator cend() const {
return {this, Length(), span_details::SpanKnownBounds{}};
}
reverse_iterator rbegin() const { return reverse_iterator{end()}; } reverse_iterator rbegin() const { return reverse_iterator{end()}; }
reverse_iterator rend() const { return reverse_iterator{begin()}; } reverse_iterator rend() const { return reverse_iterator{begin()}; }
......
...@@ -95,8 +95,7 @@ nsresult net_GetFileFromURLSpec(const nsACString& aURL, nsIFile** result) { ...@@ -95,8 +95,7 @@ nsresult net_GetFileFromURLSpec(const nsACString& aURL, nsIFile** result) {
// remove leading '\' // remove leading '\'
if (path.CharAt(0) == '\\') path.Cut(0, 1); if (path.CharAt(0) == '\\') path.Cut(0, 1);
if (IsUtf8(path)) if (IsUtf8(path)) rv = localFile->InitWithPath(NS_ConvertUTF8toUTF16(path));
rv = localFile->InitWithPath(NS_ConvertUTF8toUTF16(path));
// XXX In rare cases, a valid UTF-8 string can be valid as a native // XXX In rare cases, a valid UTF-8 string can be valid as a native
// encoding (e.g. 0xC5 0x83 is valid both as UTF-8 and Windows-125x). // encoding (e.g. 0xC5 0x83 is valid both as UTF-8 and Windows-125x).
// However, the chance is very low that a meaningful word in a legacy // However, the chance is very low that a meaningful word in a legacy
......
...@@ -1645,10 +1645,8 @@ bool GfxInfoBase::InitFeatureObject(JSContext* aCx, ...@@ -1645,10 +1645,8 @@ bool GfxInfoBase::InitFeatureObject(JSContext* aCx,
nsCString status; nsCString status;
auto value = aFeatureState.GetValue(); auto value = aFeatureState.GetValue();
if (value == FeatureStatus::Blacklisted || if (value == FeatureStatus::Blacklisted ||
value == FeatureStatus::Unavailable || value == FeatureStatus::Unavailable || value == FeatureStatus::Blocked) {
value == FeatureStatus::Blocked) { status.AppendPrintf("%s:%s", FeatureStatusToString(value),
status.AppendPrintf("%s:%s",
FeatureStatusToString(value),
aFeatureState.GetFailureId().get()); aFeatureState.GetFailureId().get());
} else { } else {
status.Append(FeatureStatusToString(value)); status.Append(FeatureStatusToString(value));
......
...@@ -182,8 +182,7 @@ class nsTStringRepr { ...@@ -182,8 +182,7 @@ class nsTStringRepr {
comparator_type) const; comparator_type) const;
bool NS_FASTCALL Equals(const char_type* aData) const; bool NS_FASTCALL Equals(const char_type* aData) const;
bool NS_FASTCALL Equals(const char_type* aData, bool NS_FASTCALL Equals(const char_type* aData, comparator_type) const;
comparator_type) const;
/** /**
* Compares a given string to this string. * Compares a given string to this string.
...@@ -220,8 +219,7 @@ class nsTStringRepr { ...@@ -220,8 +219,7 @@ class nsTStringRepr {
return Equals(static_cast<const char16_t*>(aData)); return Equals(static_cast<const char16_t*>(aData));
} }
template <typename Q = T, typename EnableIfChar16 = Char16OnlyT<Q>> template <typename Q = T, typename EnableIfChar16 = Char16OnlyT<Q>>
bool NS_FASTCALL Equals(char16ptr_t aData, bool NS_FASTCALL Equals(char16ptr_t aData, comparator_type aComp) const {
comparator_type aComp) const {
return Equals(static_cast<const char16_t*>(aData), aComp); return Equals(static_cast<const char16_t*>(aData), aComp);
} }
#endif #endif
......
Supports Markdown
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