layout/style/GeckoStyleContext.h
author Manish Goregaokar <manishearth@gmail.com>
Sat, 10 Jun 2017 22:27:45 -0700
changeset 595118 9de24730826c96bc2d986b0b0803fa7c3cb01d52
parent 595117 8087e7e9fc8a75d8086c43f449e03c547e22cccf
child 593881 3e2d689a0a696b1f850bb74bd3f44b1d88ddd9d7
child 594312 e56114c350a9ab384e721e2de27bb18d9aeac573
permissions -rw-r--r--
Bug 1373018 - Part 3: stylo: Move mPresContext to ServoStyleContext; r?bholley MozReview-Commit-ID: 2BmRpIjxEO8

/* -*- 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 mozilla_GeckoStyleContext_h
#define mozilla_GeckoStyleContext_h

#include "nsStyleContext.h"

namespace mozilla {

class GeckoStyleContext final : public nsStyleContext {
public:
  GeckoStyleContext(nsStyleContext* aParent,
                    nsIAtom* aPseudoTag,
                    CSSPseudoElementType aPseudoType,
                    already_AddRefed<nsRuleNode> aRuleNode,
                    bool aSkipParentDisplayBasedStyleFixup);

  void* operator new(size_t sz, nsPresContext* aPresContext);

  nsPresContext* PresContext() const {
    return mSource.AsGeckoRuleNode()->PresContext();
  }
};

}

#endif // mozilla_GeckoStyleContext_h