gfx/thebes/gfxGradientCache.h
author Emilio Cobos Álvarez <emilio@crisal.io>
Fri, 24 Sep 2021 05:45:33 +0000
changeset 593121 64bfebfc3f6c63388d8a27b2a0c91020dc859666
parent 573550 c991ad5e4a43704cf812e833ab2debc9eb39dc9d
permissions -rw-r--r--
Bug 1732267 - Make textarea::placeholder honor white-space. r=layout-reviewers,jfkthame This comes from https://hg.mozilla.org/mozilla-central/rev/0f28fd24bdf3, and was done because of implementation limitations which don't apply anymore (https://bugzilla.mozilla.org/show_bug.cgi?id=737786#c33): * white-space changes don't reframe anymore, they only reflow. * We fixed reframing of native-anonymous content to do the right thing. This aligns <textarea> and <input>, so I think it should be uncontroversial. See https://github.com/w3c/csswg-drafts/issues/6669 for the discussion that prompted this. Differential Revision: https://phabricator.services.mozilla.com/D126471


/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 GFX_GRADIENT_CACHE_H
#define GFX_GRADIENT_CACHE_H

#include "nsTArray.h"
#include "gfxPattern.h"
#include "mozilla/gfx/2D.h"

namespace mozilla {
namespace gfx {

class gfxGradientCache {
 public:
  static void Init();

  static already_AddRefed<gfx::GradientStops> GetOrCreateGradientStops(
      const gfx::DrawTarget* aDT, nsTArray<gfx::GradientStop>& aStops,
      gfx::ExtendMode aExtend);

  static void PurgeAllCaches();
  static void Shutdown();
};

}  // namespace gfx
}  // namespace mozilla

#endif