Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Xidorn Quan 2018-08-14 08:37:37 +00:00
Родитель ca85669dab
Коммит 33b8a6dacd
33 изменённых файлов: 66 добавлений и 74 удалений

Просмотреть файл

@ -1630,7 +1630,7 @@ nsFocusManager::CheckIfFocusable(Element* aElement, uint32_t aFlags)
// offscreen browsers can still be focused.
nsIDocument* subdoc = doc->GetSubDocumentFor(aElement);
if (subdoc && IsWindowVisible(subdoc->GetWindow())) {
const nsStyleUserInterface* ui = frame->StyleUserInterface();
const nsStyleUI* ui = frame->StyleUI();
int32_t tabIndex = (ui->mUserFocus == StyleUserFocus::Ignore ||
ui->mUserFocus == StyleUserFocus::None) ? -1 : 0;
return aElement->IsFocusable(&tabIndex, aFlags & FLAG_BYMOUSE) ? aElement : nullptr;

Просмотреть файл

@ -3191,7 +3191,7 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
bool suppressBlur = false;
if (mCurrentTarget) {
mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(newFocus));
const nsStyleUserInterface* ui = mCurrentTarget->StyleUserInterface();
const nsStyleUI* ui = mCurrentTarget->StyleUI();
activeContent = mCurrentTarget->GetContent();
// In some cases, we do not want to even blur the current focused
@ -5221,7 +5221,7 @@ EventStateManager::SetContentState(nsIContent* aContent, EventStates aState)
// XXX Is this even what we want?
if (mCurrentTarget)
{
const nsStyleUserInterface* ui = mCurrentTarget->StyleUserInterface();
const nsStyleUI* ui = mCurrentTarget->StyleUI();
if (ui->mUserInput == StyleUserInput::None) {
return false;
}

Просмотреть файл

@ -53,7 +53,7 @@ HTMLOptGroupElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
if (nsIFrame* frame = GetPrimaryFrame()) {
// FIXME(emilio): This poking at the style of the frame is broken unless we
// flush before every event handling, which we don't really want to.
if (frame->StyleUserInterface()->mUserInput == StyleUserInput::None) {
if (frame->StyleUI()->mUserInput == StyleUserInput::None) {
return;
}
}

Просмотреть файл

@ -2180,8 +2180,7 @@ nsGenericHTMLFormElement::IsElementDisabledForEvents(EventMessage aMessage,
// FIXME(emilio): This poking at the style of the frame is slightly bogus
// unless we flush before every event, which we don't really want to do.
if (aFrame &&
aFrame->StyleUserInterface()->mUserInput == StyleUserInput::None) {
if (aFrame && aFrame->StyleUI()->mUserInput == StyleUserInput::None) {
return true;
}

Просмотреть файл

@ -205,7 +205,7 @@ nsXULPopupListener::FireFocusOnTargetContent(nsIContent* aTargetContent,
nsIFrame* targetFrame = aTargetContent->GetPrimaryFrame();
if (!targetFrame) return NS_ERROR_FAILURE;
const nsStyleUserInterface* ui = targetFrame->StyleUserInterface();
const nsStyleUI* ui = targetFrame->StyleUI();
bool suppressBlur = (ui->mUserFocus == StyleUserFocus::Ignore);
RefPtr<Element> newFocusElement;

Просмотреть файл

@ -510,9 +510,8 @@ nsCaret::GetPaintGeometry(nsRect* aRect)
}
// now we have a frame, check whether it's appropriate to show the caret here
const nsStyleUserInterface* userinterface = frame->StyleUserInterface();
if ((!mIgnoreUserModify &&
userinterface->mUserModify == StyleUserModify::ReadOnly) ||
const nsStyleUI* ui = frame->StyleUI();
if ((!mIgnoreUserModify && ui->mUserModify == StyleUserModify::ReadOnly) ||
frame->IsContentDisabled()) {
return nullptr;
}

Просмотреть файл

@ -287,7 +287,7 @@ value can be held for the layout objects to use.<br>
First look into <a href="http://lxr.mozilla.org/seamonkey/source/content/shared/public/nsStyleStruct.h">
nsStyleStruct.h</a>
to see the existing style strucs. Find the one that you want to store the
data on. In this example, we want to put it on the nsStyleUserInterface struct,
data on. In this example, we want to put it on the nsStyleUI struct,
however there is also a class nsStyleUIReset that holds the non-inherited
values, so we will use that one (remember, our property is not inherited).
Add a <a href="#ComputedStyleMember">data member</a>

Просмотреть файл

@ -176,7 +176,7 @@ nsImageControlFrame::GetCursor(const nsPoint& aPoint,
{
// Use style defined cursor if one is provided, otherwise when
// the cursor style is "auto" we use the pointer cursor.
FillCursorInformationFromStyle(StyleUserInterface(), aCursor);
FillCursorInformationFromStyle(StyleUI(), aCursor);
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
aCursor.mCursor = NS_STYLE_CURSOR_POINTER;

Просмотреть файл

@ -2393,7 +2393,7 @@ nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
nscolor
nsIFrame::GetCaretColorAt(int32_t aOffset)
{
return nsLayoutUtils::GetColor(this, &nsStyleUserInterface::mCaretColor);
return nsLayoutUtils::GetColor(this, &nsStyleUI::mCaretColor);
}
bool
@ -5202,7 +5202,7 @@ nsresult
nsFrame::GetCursor(const nsPoint& aPoint,
nsIFrame::Cursor& aCursor)
{
FillCursorInformationFromStyle(StyleUserInterface(), aCursor);
FillCursorInformationFromStyle(StyleUI(), aCursor);
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
// If this is editable, I-beam cursor is better for most elements.
aCursor.mCursor =
@ -6503,7 +6503,7 @@ nsIFrame::IsContentDisabled() const
{
// FIXME(emilio): Doing this via CSS means callers must ensure the style is up
// to date, and they don't!
if (StyleUserInterface()->mUserInput == StyleUserInput::None) {
if (StyleUI()->mUserInput == StyleUserInput::None) {
return true;
}
@ -9997,7 +9997,7 @@ nsIFrame::IsFocusable(int32_t *aTabIndex, bool aWithMouse)
if (mContent && mContent->IsElement() && IsVisibleConsideringAncestors() &&
Style()->GetPseudo() != nsCSSAnonBoxes::anonymousFlexItem &&
Style()->GetPseudo() != nsCSSAnonBoxes::anonymousGridItem) {
const nsStyleUserInterface* ui = StyleUserInterface();
const nsStyleUI* ui = StyleUI();
if (ui->mUserFocus != StyleUserFocus::Ignore &&
ui->mUserFocus != StyleUserFocus::None) {
// Pass in default tabindex of -1 for nonfocusable and 0 for focusable
@ -10097,7 +10097,7 @@ nsIFrame::VerticalAlignEnum() const
}
/* static */
void nsFrame::FillCursorInformationFromStyle(const nsStyleUserInterface* ui,
void nsFrame::FillCursorInformationFromStyle(const nsStyleUI* ui,
nsIFrame::Cursor& aCursor)
{
aCursor.mCursor = ui->mCursor;
@ -11262,7 +11262,7 @@ nsIFrame::GetCompositorHitTestInfo(nsDisplayListBuilder* aBuilder)
// are the event targets for any regions viewport frames may cover.
return result;
}
const uint8_t pointerEvents = StyleUserInterface()->GetEffectivePointerEvents(this);
const uint8_t pointerEvents = StyleUI()->GetEffectivePointerEvents(this);
if (pointerEvents == NS_STYLE_POINTER_EVENTS_NONE) {
return result;
}

Просмотреть файл

@ -685,7 +685,7 @@ protected:
mozilla::TableSelection* aTarget);
// Fills aCursor with the appropriate information from ui
static void FillCursorInformationFromStyle(const nsStyleUserInterface* ui,
static void FillCursorInformationFromStyle(const nsStyleUI* ui,
nsIFrame::Cursor& aCursor);
NS_IMETHOD DoXULLayout(nsBoxLayoutState& aBoxLayoutState) override;

Просмотреть файл

@ -2201,8 +2201,7 @@ nsImageFrame::GetCursor(const nsPoint& aPoint,
PresShell()->StyleSet()->
ResolveStyleFor(area->AsElement(), Style(),
LazyComputeBehavior::Allow);
FillCursorInformationFromStyle(areaStyle->StyleUserInterface(),
aCursor);
FillCursorInformationFromStyle(areaStyle->StyleUI(), aCursor);
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
}

Просмотреть файл

@ -340,7 +340,7 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// If we are pointer-events:none then we don't need to HitTest background
bool pointerEventsNone =
StyleUserInterface()->mPointerEvents == NS_STYLE_POINTER_EVENTS_NONE;
StyleUI()->mPointerEvents == NS_STYLE_POINTER_EVENTS_NONE;
if (!aBuilder->IsForEventDelivery() || !pointerEventsNone) {
nsDisplayListCollection decorations(aBuilder);
DisplayBorderBackgroundOutline(aBuilder, decorations);

Просмотреть файл

@ -4633,7 +4633,7 @@ nsresult
nsTextFrame::GetCursor(const nsPoint& aPoint,
nsIFrame::Cursor& aCursor)
{
FillCursorInformationFromStyle(StyleUserInterface(), aCursor);
FillCursorInformationFromStyle(StyleUI(), aCursor);
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
if (!IsSelectable(nullptr)) {
aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;

Просмотреть файл

@ -351,7 +351,7 @@ nsDisplayRemote::nsDisplayRemote(nsDisplayListBuilder* aBuilder,
, mEventRegionsOverride(EventRegionsOverride::NoOverride)
{
bool frameIsPointerEventsNone =
aFrame->StyleUserInterface()->GetEffectivePointerEvents(aFrame) ==
aFrame->StyleUI()->GetEffectivePointerEvents(aFrame) ==
NS_STYLE_POINTER_EVENTS_NONE;
if (aBuilder->IsInsidePointerEventsNoneDoc() || frameIsPointerEventsNone) {
mEventRegionsOverride |= EventRegionsOverride::ForceEmptyHitRegion;

Просмотреть файл

@ -2851,7 +2851,7 @@ static bool
IsFrameReceivingPointerEvents(nsIFrame* aFrame)
{
return NS_STYLE_POINTER_EVENTS_NONE !=
aFrame->StyleUserInterface()->GetEffectivePointerEvents(aFrame);
aFrame->StyleUI()->GetEffectivePointerEvents(aFrame);
}
// A list of frames, and their z depth. Used for sorting

Просмотреть файл

@ -131,7 +131,7 @@ ComputedStyle::CalcStyleDifference(ComputedStyle* aNewContext,
DO_STRUCT_DIFFERENCE(XUL);
DO_STRUCT_DIFFERENCE(Column);
DO_STRUCT_DIFFERENCE(Content);
DO_STRUCT_DIFFERENCE(UserInterface);
DO_STRUCT_DIFFERENCE(UI);
DO_STRUCT_DIFFERENCE(Visibility);
DO_STRUCT_DIFFERENCE(Outline);
DO_STRUCT_DIFFERENCE(TableBorder);

Просмотреть файл

@ -1576,7 +1576,7 @@ Gecko_InitializeImageCropRect(nsStyleImage* aImage)
}
void
Gecko_SetCursorArrayLength(nsStyleUserInterface* aStyleUI, size_t aLen)
Gecko_SetCursorArrayLength(nsStyleUI* aStyleUI, size_t aLen)
{
aStyleUI->mCursorImages.Clear();
aStyleUI->mCursorImages.SetLength(aLen);
@ -1593,8 +1593,7 @@ Gecko_SetCursorImageValue(nsCursorImage* aCursor,
}
void
Gecko_CopyCursorArrayFrom(nsStyleUserInterface* aDest,
const nsStyleUserInterface* aSrc)
Gecko_CopyCursorArrayFrom(nsStyleUI* aDest, const nsStyleUI* aSrc)
{
aDest->mCursorImages = aSrc->mCursorImages;
}

Просмотреть файл

@ -379,11 +379,10 @@ void Gecko_SetListStyleImageImageValue(nsStyleList* style_struct,
void Gecko_CopyListStyleImageFrom(nsStyleList* dest, const nsStyleList* src);
// cursor style.
void Gecko_SetCursorArrayLength(nsStyleUserInterface* ui, size_t len);
void Gecko_SetCursorArrayLength(nsStyleUI* ui, size_t len);
void Gecko_SetCursorImageValue(nsCursorImage* aCursor,
mozilla::css::ImageValue* aImageValue);
void Gecko_CopyCursorArrayFrom(nsStyleUserInterface* dest,
const nsStyleUserInterface* src);
void Gecko_CopyCursorArrayFrom(nsStyleUI* dest, const nsStyleUI* src);
void Gecko_SetContentDataImageValue(nsStyleContentData* aList,
mozilla::css::ImageValue* aImageValue);

Просмотреть файл

@ -338,7 +338,7 @@ whitelist-types = [
"nsStyleUIReset",
"nsStyleUnion",
"nsStyleUnit",
"nsStyleUserInterface",
"nsStyleUI",
"nsStyleVisibility",
"nsStyleXUL",
"nsTArrayHeader",
@ -585,7 +585,7 @@ structs-types = [
"nsStyleUIReset",
"nsStyleUnion",
"nsStyleUnit",
"nsStyleUserInterface",
"nsStyleUI",
"nsStyleVisibility",
"nsStyleXUL",
"nsTimingFunction",

Просмотреть файл

@ -33,4 +33,4 @@ STYLE_STRUCT(Text, (mTextEmphasisColor,
mWebkitTextStrokeColor))
STYLE_STRUCT(TextReset, (mTextDecorationColor))
STYLE_STRUCT(SVG, (mFill, mStroke))
STYLE_STRUCT(UserInterface, (mCaretColor))
STYLE_STRUCT(UI, (mCaretColor))

Просмотреть файл

@ -727,7 +727,7 @@ CollectImageURLsForProperty(nsCSSPropertyID aProp,
switch (aProp) {
case eCSSProperty_cursor:
for (auto& image : aStyle.StyleUserInterface()->mCursorImages) {
for (auto& image : aStyle.StyleUI()->mCursorImages) {
AddImageURL(*image.mImage, aURLs);
}
break;
@ -2985,7 +2985,7 @@ already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetScrollbarFaceColor()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueForWidgetColor(val, StyleUserInterface()->mScrollbarFaceColor,
SetValueForWidgetColor(val, StyleUI()->mScrollbarFaceColor,
StyleAppearance::ScrollbarthumbVertical);
return val.forget();
}
@ -2994,7 +2994,7 @@ already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetScrollbarTrackColor()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueForWidgetColor(val, StyleUserInterface()->mScrollbarTrackColor,
SetValueForWidgetColor(val, StyleUI()->mScrollbarTrackColor,
StyleAppearance::ScrollbarVertical);
return val.forget();
}
@ -3477,7 +3477,7 @@ already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetCaretColor()
{
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueFromComplexColor(val, StyleUserInterface()->mCaretColor);
SetValueFromComplexColor(val, StyleUI()->mCaretColor);
return val.forget();
}
@ -3486,7 +3486,7 @@ nsComputedDOMStyle::DoGetCursor()
{
RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
const nsStyleUserInterface *ui = StyleUserInterface();
const nsStyleUI *ui = StyleUI();
for (const nsCursorImage& item : ui->mCursorImages) {
RefPtr<nsDOMCSSValueList> itemList = GetROCSSValueList(false);

Просмотреть файл

@ -382,7 +382,7 @@ enum class StyleContent : uint8_t {
AltContent
};
// See nsStyleUserInterface
// See nsStyleUI
#define NS_STYLE_CURSOR_AUTO 1
#define NS_STYLE_CURSOR_CROSSHAIR 2
#define NS_STYLE_CURSOR_DEFAULT 3 // ie: an arrow

Просмотреть файл

@ -4559,7 +4559,7 @@ nsStyleText::TextEmphasisSide(WritingMode aWM) const
}
//-----------------------
// nsStyleUserInterface
// nsStyleUI
//
nsCursorImage::nsCursorImage()
@ -4605,7 +4605,7 @@ nsCursorImage::operator==(const nsCursorImage& aOther) const
DefinitelyEqualImages(mImage, aOther.mImage);
}
nsStyleUserInterface::nsStyleUserInterface(const nsPresContext* aContext)
nsStyleUI::nsStyleUI(const nsPresContext* aContext)
: mUserInput(StyleUserInput::Auto)
, mUserModify(StyleUserModify::ReadOnly)
, mUserFocus(StyleUserFocus::None)
@ -4615,10 +4615,10 @@ nsStyleUserInterface::nsStyleUserInterface(const nsPresContext* aContext)
, mScrollbarFaceColor(StyleComplexColor::Auto())
, mScrollbarTrackColor(StyleComplexColor::Auto())
{
MOZ_COUNT_CTOR(nsStyleUserInterface);
MOZ_COUNT_CTOR(nsStyleUI);
}
nsStyleUserInterface::nsStyleUserInterface(const nsStyleUserInterface& aSource)
nsStyleUI::nsStyleUI(const nsStyleUI& aSource)
: mUserInput(aSource.mUserInput)
, mUserModify(aSource.mUserModify)
, mUserFocus(aSource.mUserFocus)
@ -4629,17 +4629,17 @@ nsStyleUserInterface::nsStyleUserInterface(const nsStyleUserInterface& aSource)
, mScrollbarFaceColor(aSource.mScrollbarFaceColor)
, mScrollbarTrackColor(aSource.mScrollbarTrackColor)
{
MOZ_COUNT_CTOR(nsStyleUserInterface);
MOZ_COUNT_CTOR(nsStyleUI);
}
nsStyleUserInterface::~nsStyleUserInterface()
nsStyleUI::~nsStyleUI()
{
MOZ_COUNT_DTOR(nsStyleUserInterface);
MOZ_COUNT_DTOR(nsStyleUI);
}
void
nsStyleUserInterface::FinishStyle(
nsPresContext* aPresContext, const nsStyleUserInterface* aOldStyle)
nsStyleUI::FinishStyle(nsPresContext* aPresContext,
const nsStyleUI* aOldStyle)
{
MOZ_ASSERT(NS_IsMainThread());
@ -4658,7 +4658,7 @@ nsStyleUserInterface::FinishStyle(
}
nsChangeHint
nsStyleUserInterface::CalcDifference(const nsStyleUserInterface& aNewData) const
nsStyleUI::CalcDifference(const nsStyleUI& aNewData) const
{
nsChangeHint hint = nsChangeHint(0);
if (mCursor != aNewData.mCursor) {

Просмотреть файл

@ -2776,16 +2776,16 @@ struct nsCursorImage
}
};
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUserInterface
struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUI
{
explicit nsStyleUserInterface(const nsPresContext* aContext);
nsStyleUserInterface(const nsStyleUserInterface& aOther);
~nsStyleUserInterface();
explicit nsStyleUI(const nsPresContext* aContext);
nsStyleUI(const nsStyleUI& aOther);
~nsStyleUI();
void FinishStyle(nsPresContext*, const nsStyleUserInterface*);
void FinishStyle(nsPresContext*, const nsStyleUI*);
const static bool kHasFinishStyle = true;
nsChangeHint CalcDifference(const nsStyleUserInterface& aNewData) const;
nsChangeHint CalcDifference(const nsStyleUI& aNewData) const;
mozilla::StyleUserInput mUserInput;
mozilla::StyleUserModify mUserModify; // (modify-content)

Просмотреть файл

@ -246,7 +246,7 @@ nsStyleDisplay::IsAbsolutelyPositioned(const nsIFrame* aContextFrame) const
}
uint8_t
nsStyleUserInterface::GetEffectivePointerEvents(nsIFrame* aFrame) const
nsStyleUI::GetEffectivePointerEvents(nsIFrame* aFrame) const
{
if (aFrame->GetContent() && !aFrame->GetContent()->GetParent()) {
// The root element has a cluster of frames associated with it
@ -255,7 +255,7 @@ nsStyleUserInterface::GetEffectivePointerEvents(nsIFrame* aFrame) const
// frame.
nsIFrame* f = aFrame->GetContent()->GetPrimaryFrame();
if (f) {
return f->StyleUserInterface()->mPointerEvents;
return f->StyleUI()->mPointerEvents;
}
}
return mPointerEvents;

Просмотреть файл

@ -37,7 +37,7 @@ STYLE_STRUCT_INHERITED(Color)
STYLE_STRUCT_INHERITED(List)
STYLE_STRUCT_INHERITED(Text)
STYLE_STRUCT_INHERITED(Visibility)
STYLE_STRUCT_INHERITED(UserInterface)
STYLE_STRUCT_INHERITED(UI)
STYLE_STRUCT_INHERITED(TableBorder)
STYLE_STRUCT_INHERITED(SVG)

Просмотреть файл

@ -502,7 +502,7 @@ nsSVGImageFrame::GetHitTestFlags()
{
uint16_t flags = 0;
switch (StyleUserInterface()->mPointerEvents) {
switch (StyleUI()->mPointerEvents) {
case NS_STYLE_POINTER_EVENTS_NONE:
break;
case NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED:

Просмотреть файл

@ -1704,7 +1704,7 @@ nsSVGUtils::GetGeometryHitTestFlags(nsIFrame* aFrame)
{
uint16_t flags = 0;
switch (aFrame->StyleUserInterface()->mPointerEvents) {
switch (aFrame->StyleUI()->mPointerEvents) {
case NS_STYLE_POINTER_EVENTS_NONE:
break;
case NS_STYLE_POINTER_EVENTS_AUTO:

Просмотреть файл

@ -2442,8 +2442,7 @@ nsTreeBodyFrame::GetCursor(const nsPoint& aPoint,
// Our scratch array is already prefilled.
ComputedStyle* childContext = GetPseudoComputedStyle(child);
FillCursorInformationFromStyle(childContext->StyleUserInterface(),
aCursor);
FillCursorInformationFromStyle(childContext->StyleUI(), aCursor);
if (aCursor.mCursor == NS_STYLE_CURSOR_AUTO)
aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;

Просмотреть файл

@ -4,7 +4,7 @@
<%namespace name="helpers" file="/helpers.mako.rs" />
<% data.new_style_struct("InheritedUI", inherited=True, gecko_name="UserInterface") %>
<% data.new_style_struct("InheritedUI", inherited=True, gecko_name="UI") %>
${helpers.predefined_type("cursor",
"Cursor",

Просмотреть файл

@ -2748,7 +2748,7 @@ nsNativeThemeCocoa::ComputeScrollbarParams(nsIFrame* aFrame, bool aIsHorizontal)
// generally good enough for use cases of custom scrollbars.
if (!params.overlay) {
ComputedStyle* style = nsLayoutUtils::StyleForScrollbar(aFrame);
if (style->StyleUserInterface()->HasCustomScrollbars()) {
if (style->StyleUI()->HasCustomScrollbars()) {
params.custom = true;
params.trackColor =
GetScrollbarTrackColor(style, &GetAutoScrollbarTrackColor);

Просмотреть файл

@ -849,8 +849,7 @@ nscolor
nsNativeTheme::GetScrollbarFaceColor(ComputedStyle* aStyle,
AutoColorGetter aAutoGetter)
{
StyleComplexColor complexColor =
aStyle->StyleUserInterface()->mScrollbarFaceColor;
StyleComplexColor complexColor = aStyle->StyleUI()->mScrollbarFaceColor;
if (complexColor.IsAuto()) {
return aAutoGetter(aStyle);
}
@ -866,8 +865,7 @@ nscolor
nsNativeTheme::GetScrollbarTrackColor(ComputedStyle* aStyle,
AutoColorGetter aAutoGetter)
{
StyleComplexColor complexColor =
aStyle->StyleUserInterface()->mScrollbarTrackColor;
StyleComplexColor complexColor = aStyle->StyleUI()->mScrollbarTrackColor;
nscolor color;
if (complexColor.IsAuto()) {
color = aAutoGetter(aStyle);

Просмотреть файл

@ -1559,7 +1559,7 @@ nsNativeThemeWin::DrawWidgetBackground(gfxContext* aContext,
if (IsWidgetScrollbarPart(aWidgetType)) {
ComputedStyle* style = nsLayoutUtils::StyleForScrollbar(aFrame);
if (style->StyleUserInterface()->HasCustomScrollbars()) {
if (style->StyleUI()->HasCustomScrollbars()) {
return DrawCustomScrollbarPart(aContext, aFrame, style,
aWidgetType, aRect, aDirtyRect);
}
@ -3192,7 +3192,7 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, WidgetT
else {
if (contentState.HasAllStates(NS_EVENT_STATE_ACTIVE | NS_EVENT_STATE_HOVER)) {
aState |= DFCS_PUSHED;
const nsStyleUserInterface *uiData = aFrame->StyleUserInterface();
const nsStyleUI *uiData = aFrame->StyleUI();
// The down state is flat if the button is focusable
if (uiData->mUserFocus == StyleUserFocus::Normal) {
if (!aFrame->GetContent()->IsHTMLElement())
@ -4231,8 +4231,8 @@ nsNativeThemeWin::DrawCustomScrollbarPart(gfxContext* aContext,
const nsRect& aRect,
const nsRect& aClipRect)
{
MOZ_ASSERT(!aStyle->StyleUserInterface()->mScrollbarFaceColor.IsAuto() ||
!aStyle->StyleUserInterface()->mScrollbarTrackColor.IsAuto());
MOZ_ASSERT(!aStyle->StyleUI()->mScrollbarFaceColor.IsAuto() ||
!aStyle->StyleUI()->mScrollbarTrackColor.IsAuto());
gfxRect tr(aRect.X(), aRect.Y(), aRect.Width(), aRect.Height()),
dr(aClipRect.X(), aClipRect.Y(),