fune/layout/base/nsPresContextInlines.h
Emilio Cobos Álvarez b8d58c68d0 Bug 1777135 - Part 1: make nsPresContext::DefaultBackgroundColor account for default-background color-scheme. r=dholbert
And remove one unused caller.

This might change behavior of some selection contrast checks and backplating
which will potentially use the right background-color after this patch. The
next patch ensures this is also accounted for for scrollbars.

Unfortunately selection contrast checks are non-trivial to test because we only
do the contrast check with system colors, and we'd need a default selection
color close to the highlight color to do this.

Differential Revision: https://phabricator.services.mozilla.com/D151017
2022-07-12 09:51:47 +00:00

22 lines
784 B
C

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsPresContextInlines_h
#define nsPresContextInlines_h
#include "mozilla/dom/Document.h"
#include "mozilla/PresShell.h"
#include "nsCSSFrameConstructor.h"
inline mozilla::ServoStyleSet* nsPresContext::StyleSet() const {
return mDocument->StyleSetForPresShellOrMediaQueryEvaluation();
}
inline nsCSSFrameConstructor* nsPresContext::FrameConstructor() const {
return PresShell()->FrameConstructor();
}
#endif // #ifndef nsPresContextInlines_h