зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1625855 - Replace MOZ_MUST_USE with [[nodiscard]] in layout. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D68751 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
585cd46052
Коммит
4a9feda3ee
|
@ -230,7 +230,7 @@ class AccessibleCaretManager {
|
|||
// See the mRefCnt assertions in AccessibleCaretEventHub.
|
||||
//
|
||||
// Returns whether mPresShell we're holding is still valid.
|
||||
MOZ_MUST_USE MOZ_CAN_RUN_SCRIPT bool FlushLayout();
|
||||
[[nodiscard]] MOZ_CAN_RUN_SCRIPT bool FlushLayout();
|
||||
|
||||
dom::Element* GetEditingHostForFrame(nsIFrame* aFrame) const;
|
||||
dom::Selection* GetSelection() const;
|
||||
|
|
|
@ -327,8 +327,8 @@ class nsTextControlFrame : public nsContainerFrame,
|
|||
|
||||
void CacheValue(const nsAString& aValue) { mCachedValue.Assign(aValue); }
|
||||
|
||||
MOZ_MUST_USE bool CacheValue(const nsAString& aValue,
|
||||
const mozilla::fallible_t& aFallible) {
|
||||
[[nodiscard]] bool CacheValue(const nsAString& aValue,
|
||||
const mozilla::fallible_t& aFallible) {
|
||||
if (!mCachedValue.Assign(aValue, aFallible)) {
|
||||
ClearCachedValue();
|
||||
return false;
|
||||
|
|
|
@ -39,7 +39,7 @@ struct AspectRatio {
|
|||
}
|
||||
|
||||
// Inverts the ratio, in order to get the height / width ratio.
|
||||
MOZ_MUST_USE AspectRatio Inverted() const {
|
||||
[[nodiscard]] AspectRatio Inverted() const {
|
||||
return *this ? AspectRatio(1.0f / mRatio) : *this;
|
||||
}
|
||||
|
||||
|
|
|
@ -2040,7 +2040,7 @@ class nsIFrame : public nsQueryFrame {
|
|||
*
|
||||
* Returns whether the image was in fact associated with the frame.
|
||||
*/
|
||||
MOZ_MUST_USE bool AssociateImage(const mozilla::StyleImage&);
|
||||
[[nodiscard]] bool AssociateImage(const mozilla::StyleImage&);
|
||||
|
||||
/**
|
||||
* This needs to be called if the above caller returned true, once the above
|
||||
|
@ -3720,7 +3720,7 @@ class nsIFrame : public nsQueryFrame {
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
MOZ_MUST_USE FrameProperties::PropertyType<T> TakeProperty(
|
||||
[[nodiscard]] FrameProperties::PropertyType<T> TakeProperty(
|
||||
FrameProperties::Descriptor<T> aProperty, bool* aFoundResult = nullptr) {
|
||||
return mProperties.Take(aProperty, aFoundResult);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ struct ImportScanner final {
|
|||
};
|
||||
|
||||
void EmitUrl();
|
||||
MOZ_MUST_USE State Scan(char16_t aChar);
|
||||
[[nodiscard]] State Scan(char16_t aChar);
|
||||
|
||||
static constexpr const uint32_t kMaxRuleNameLength = 7; // (charset, import)
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ class MOZ_RAII AutoReferenceChainGuard {
|
|||
* If it returns false then an error message will be reported to the DevTools
|
||||
* console (only once).
|
||||
*/
|
||||
MOZ_MUST_USE bool Reference() {
|
||||
[[nodiscard]] bool Reference() {
|
||||
if (MOZ_UNLIKELY(*mFrameInUse)) {
|
||||
mBrokeReference = true;
|
||||
ReportErrorToConsole();
|
||||
|
|
Загрузка…
Ссылка в новой задаче