mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
d55c8c26d0
This patch: - Gives layout/generic/AnonymousContentKey.h an include for `<stdint.h>` to provide the uint8_t type, and TypedEnumBits.h to provide the MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS macro. (This is a change in another directory, but it's needed in order for layout/style/ServoStyleSet.cpp to build successfully.) - Adds a missing "nsINode" forward-decl to dom/base/IdentifierMapEntry.h, because it uses that type in function declarations. (This change is needed in order for layout/style/CachedInheritingStyles.cpp to build successfully.) - Gives CSSStyleRule.cpp an include for PseudoStyleType.h, nsCSSPseudoElements.h, and CSSEnabledState.h because it uses those types. - Gives GeckoBindings.cpp an include for gfxTextRun.h, to provide the definition of type gfxFontGroup (so GeckoBindings can call GetFirstValidFont() on an object of that type). - Gives Loader.h an include for nsIContentInlines.h, to provide the inline function IsInUAWidget(). - Gives Rule.cpp an include for HoldDropJSObjects.h, to provide DropJSObjects(). - Gives nsImageLoader.cpp an include for DocumentInlines.h (and Document.h for good measure), to provide the inline function GetPresContext(). - Gives nsStyleStruct.cpp an include for DocumentInlines.h, to provide inline function Document::GetPresContext(). - Gives nsStyleTransformMatrix.h an include for Units.h (instead of gfxPoint.h, which isn't useful) to provide the CSSPoint type. - Gives nsStyleTransformMatrix.h an include for ServoStyleConsts.h, to provide LengthPercentage and the various StyleRotate/StyleScale/StyleTransform/etc types. (These can't be easily forward-declared, because some of them are legitimate types whereas others are type aliases. We could theoretically forward-declare all of the underlying types and then repeat the type aliases, but that'd be verbose and unmaintainable.) Depends on D50165 Differential Revision: https://phabricator.services.mozilla.com/D50166 --HG-- extra : moz-landing-system : lando
63 lines
2.0 KiB
C++
63 lines
2.0 KiB
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/. */
|
|
|
|
/* values to identify particular subtrees of native anonymous content */
|
|
|
|
#ifndef mozilla_AnonymousContentKey_h
|
|
#define mozilla_AnonymousContentKey_h
|
|
|
|
#include "mozilla/TypedEnumBits.h"
|
|
#include <stdint.h>
|
|
|
|
namespace mozilla {
|
|
|
|
// clang-format off
|
|
|
|
// We currently use cached anonymous content styles only for scrollbar parts,
|
|
// and we can fit the type of scrollbar part element along with its different
|
|
// options (such as orientation, and other attribute values that can affect
|
|
// styling) into a uint8_t.
|
|
//
|
|
// The lower three bits hold a Type_* value identifying the type of
|
|
// element, and the remaining bits store Flag_* values.
|
|
//
|
|
// A value of 0 is used to represent an anonymous content subtree that we don't
|
|
// cache styles for.
|
|
enum class AnonymousContentKey : uint8_t {
|
|
None = 0x00,
|
|
|
|
// all
|
|
Type_ScrollCorner = 0x01,
|
|
Type_Resizer = 0x02,
|
|
Type_Scrollbar = 0x03,
|
|
Type_ScrollbarButton = 0x04,
|
|
Type_Slider = 0x05,
|
|
|
|
// scrollbar, scrollbarbutton, slider
|
|
Flag_Vertical = 0x08,
|
|
|
|
// resizer
|
|
// 3-bit bitfield in 0x38 storing dir="" and flip=""
|
|
Flag_Resizer_Right = 0x08,
|
|
Flag_Resizer_Bottom = 0x10,
|
|
Flag_Resizer_BottomLeft = 0x18,
|
|
Flag_Resizer_BottomRight = 0x20,
|
|
Flag_Resizer_Bottom_Flip = 0x28,
|
|
|
|
// scrollbarbutton
|
|
Flag_ScrollbarButton_Down = 0x10,
|
|
Flag_ScrollbarButton_Bottom = 0x20,
|
|
Flag_ScrollbarButton_Decrement = 0x40,
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(AnonymousContentKey)
|
|
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_AnonymousContentKey_h
|