forked from mirrors/gecko-dev
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:
parent
ca85669dab
commit
33b8a6dacd
33 changed files with 66 additions and 74 deletions
|
|
@ -1630,7 +1630,7 @@ nsFocusManager::CheckIfFocusable(Element* aElement, uint32_t aFlags)
|
||||||
// offscreen browsers can still be focused.
|
// offscreen browsers can still be focused.
|
||||||
nsIDocument* subdoc = doc->GetSubDocumentFor(aElement);
|
nsIDocument* subdoc = doc->GetSubDocumentFor(aElement);
|
||||||
if (subdoc && IsWindowVisible(subdoc->GetWindow())) {
|
if (subdoc && IsWindowVisible(subdoc->GetWindow())) {
|
||||||
const nsStyleUserInterface* ui = frame->StyleUserInterface();
|
const nsStyleUI* ui = frame->StyleUI();
|
||||||
int32_t tabIndex = (ui->mUserFocus == StyleUserFocus::Ignore ||
|
int32_t tabIndex = (ui->mUserFocus == StyleUserFocus::Ignore ||
|
||||||
ui->mUserFocus == StyleUserFocus::None) ? -1 : 0;
|
ui->mUserFocus == StyleUserFocus::None) ? -1 : 0;
|
||||||
return aElement->IsFocusable(&tabIndex, aFlags & FLAG_BYMOUSE) ? aElement : nullptr;
|
return aElement->IsFocusable(&tabIndex, aFlags & FLAG_BYMOUSE) ? aElement : nullptr;
|
||||||
|
|
|
||||||
|
|
@ -3191,7 +3191,7 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
|
||||||
bool suppressBlur = false;
|
bool suppressBlur = false;
|
||||||
if (mCurrentTarget) {
|
if (mCurrentTarget) {
|
||||||
mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(newFocus));
|
mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(newFocus));
|
||||||
const nsStyleUserInterface* ui = mCurrentTarget->StyleUserInterface();
|
const nsStyleUI* ui = mCurrentTarget->StyleUI();
|
||||||
activeContent = mCurrentTarget->GetContent();
|
activeContent = mCurrentTarget->GetContent();
|
||||||
|
|
||||||
// In some cases, we do not want to even blur the current focused
|
// 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?
|
// XXX Is this even what we want?
|
||||||
if (mCurrentTarget)
|
if (mCurrentTarget)
|
||||||
{
|
{
|
||||||
const nsStyleUserInterface* ui = mCurrentTarget->StyleUserInterface();
|
const nsStyleUI* ui = mCurrentTarget->StyleUI();
|
||||||
if (ui->mUserInput == StyleUserInput::None) {
|
if (ui->mUserInput == StyleUserInput::None) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ HTMLOptGroupElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
|
||||||
if (nsIFrame* frame = GetPrimaryFrame()) {
|
if (nsIFrame* frame = GetPrimaryFrame()) {
|
||||||
// FIXME(emilio): This poking at the style of the frame is broken unless we
|
// 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.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2180,8 +2180,7 @@ nsGenericHTMLFormElement::IsElementDisabledForEvents(EventMessage aMessage,
|
||||||
|
|
||||||
// FIXME(emilio): This poking at the style of the frame is slightly bogus
|
// 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.
|
// unless we flush before every event, which we don't really want to do.
|
||||||
if (aFrame &&
|
if (aFrame && aFrame->StyleUI()->mUserInput == StyleUserInput::None) {
|
||||||
aFrame->StyleUserInterface()->mUserInput == StyleUserInput::None) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ nsXULPopupListener::FireFocusOnTargetContent(nsIContent* aTargetContent,
|
||||||
nsIFrame* targetFrame = aTargetContent->GetPrimaryFrame();
|
nsIFrame* targetFrame = aTargetContent->GetPrimaryFrame();
|
||||||
if (!targetFrame) return NS_ERROR_FAILURE;
|
if (!targetFrame) return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
const nsStyleUserInterface* ui = targetFrame->StyleUserInterface();
|
const nsStyleUI* ui = targetFrame->StyleUI();
|
||||||
bool suppressBlur = (ui->mUserFocus == StyleUserFocus::Ignore);
|
bool suppressBlur = (ui->mUserFocus == StyleUserFocus::Ignore);
|
||||||
|
|
||||||
RefPtr<Element> newFocusElement;
|
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
|
// now we have a frame, check whether it's appropriate to show the caret here
|
||||||
const nsStyleUserInterface* userinterface = frame->StyleUserInterface();
|
const nsStyleUI* ui = frame->StyleUI();
|
||||||
if ((!mIgnoreUserModify &&
|
if ((!mIgnoreUserModify && ui->mUserModify == StyleUserModify::ReadOnly) ||
|
||||||
userinterface->mUserModify == StyleUserModify::ReadOnly) ||
|
|
||||||
frame->IsContentDisabled()) {
|
frame->IsContentDisabled()) {
|
||||||
return nullptr;
|
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">
|
First look into <a href="http://lxr.mozilla.org/seamonkey/source/content/shared/public/nsStyleStruct.h">
|
||||||
nsStyleStruct.h</a>
|
nsStyleStruct.h</a>
|
||||||
to see the existing style strucs. Find the one that you want to store the
|
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
|
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).
|
values, so we will use that one (remember, our property is not inherited).
|
||||||
Add a <a href="#ComputedStyleMember">data member</a>
|
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
|
// Use style defined cursor if one is provided, otherwise when
|
||||||
// the cursor style is "auto" we use the pointer cursor.
|
// the cursor style is "auto" we use the pointer cursor.
|
||||||
FillCursorInformationFromStyle(StyleUserInterface(), aCursor);
|
FillCursorInformationFromStyle(StyleUI(), aCursor);
|
||||||
|
|
||||||
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
|
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
|
||||||
aCursor.mCursor = NS_STYLE_CURSOR_POINTER;
|
aCursor.mCursor = NS_STYLE_CURSOR_POINTER;
|
||||||
|
|
|
||||||
|
|
@ -2393,7 +2393,7 @@ nsIFrame::DisplayCaret(nsDisplayListBuilder* aBuilder,
|
||||||
nscolor
|
nscolor
|
||||||
nsIFrame::GetCaretColorAt(int32_t aOffset)
|
nsIFrame::GetCaretColorAt(int32_t aOffset)
|
||||||
{
|
{
|
||||||
return nsLayoutUtils::GetColor(this, &nsStyleUserInterface::mCaretColor);
|
return nsLayoutUtils::GetColor(this, &nsStyleUI::mCaretColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -5202,7 +5202,7 @@ nsresult
|
||||||
nsFrame::GetCursor(const nsPoint& aPoint,
|
nsFrame::GetCursor(const nsPoint& aPoint,
|
||||||
nsIFrame::Cursor& aCursor)
|
nsIFrame::Cursor& aCursor)
|
||||||
{
|
{
|
||||||
FillCursorInformationFromStyle(StyleUserInterface(), aCursor);
|
FillCursorInformationFromStyle(StyleUI(), aCursor);
|
||||||
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
|
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
|
||||||
// If this is editable, I-beam cursor is better for most elements.
|
// If this is editable, I-beam cursor is better for most elements.
|
||||||
aCursor.mCursor =
|
aCursor.mCursor =
|
||||||
|
|
@ -6503,7 +6503,7 @@ nsIFrame::IsContentDisabled() const
|
||||||
{
|
{
|
||||||
// FIXME(emilio): Doing this via CSS means callers must ensure the style is up
|
// FIXME(emilio): Doing this via CSS means callers must ensure the style is up
|
||||||
// to date, and they don't!
|
// to date, and they don't!
|
||||||
if (StyleUserInterface()->mUserInput == StyleUserInput::None) {
|
if (StyleUI()->mUserInput == StyleUserInput::None) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9997,7 +9997,7 @@ nsIFrame::IsFocusable(int32_t *aTabIndex, bool aWithMouse)
|
||||||
if (mContent && mContent->IsElement() && IsVisibleConsideringAncestors() &&
|
if (mContent && mContent->IsElement() && IsVisibleConsideringAncestors() &&
|
||||||
Style()->GetPseudo() != nsCSSAnonBoxes::anonymousFlexItem &&
|
Style()->GetPseudo() != nsCSSAnonBoxes::anonymousFlexItem &&
|
||||||
Style()->GetPseudo() != nsCSSAnonBoxes::anonymousGridItem) {
|
Style()->GetPseudo() != nsCSSAnonBoxes::anonymousGridItem) {
|
||||||
const nsStyleUserInterface* ui = StyleUserInterface();
|
const nsStyleUI* ui = StyleUI();
|
||||||
if (ui->mUserFocus != StyleUserFocus::Ignore &&
|
if (ui->mUserFocus != StyleUserFocus::Ignore &&
|
||||||
ui->mUserFocus != StyleUserFocus::None) {
|
ui->mUserFocus != StyleUserFocus::None) {
|
||||||
// Pass in default tabindex of -1 for nonfocusable and 0 for focusable
|
// Pass in default tabindex of -1 for nonfocusable and 0 for focusable
|
||||||
|
|
@ -10097,7 +10097,7 @@ nsIFrame::VerticalAlignEnum() const
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void nsFrame::FillCursorInformationFromStyle(const nsStyleUserInterface* ui,
|
void nsFrame::FillCursorInformationFromStyle(const nsStyleUI* ui,
|
||||||
nsIFrame::Cursor& aCursor)
|
nsIFrame::Cursor& aCursor)
|
||||||
{
|
{
|
||||||
aCursor.mCursor = ui->mCursor;
|
aCursor.mCursor = ui->mCursor;
|
||||||
|
|
@ -11262,7 +11262,7 @@ nsIFrame::GetCompositorHitTestInfo(nsDisplayListBuilder* aBuilder)
|
||||||
// are the event targets for any regions viewport frames may cover.
|
// are the event targets for any regions viewport frames may cover.
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
const uint8_t pointerEvents = StyleUserInterface()->GetEffectivePointerEvents(this);
|
const uint8_t pointerEvents = StyleUI()->GetEffectivePointerEvents(this);
|
||||||
if (pointerEvents == NS_STYLE_POINTER_EVENTS_NONE) {
|
if (pointerEvents == NS_STYLE_POINTER_EVENTS_NONE) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -685,7 +685,7 @@ protected:
|
||||||
mozilla::TableSelection* aTarget);
|
mozilla::TableSelection* aTarget);
|
||||||
|
|
||||||
// Fills aCursor with the appropriate information from ui
|
// Fills aCursor with the appropriate information from ui
|
||||||
static void FillCursorInformationFromStyle(const nsStyleUserInterface* ui,
|
static void FillCursorInformationFromStyle(const nsStyleUI* ui,
|
||||||
nsIFrame::Cursor& aCursor);
|
nsIFrame::Cursor& aCursor);
|
||||||
NS_IMETHOD DoXULLayout(nsBoxLayoutState& aBoxLayoutState) override;
|
NS_IMETHOD DoXULLayout(nsBoxLayoutState& aBoxLayoutState) override;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2201,8 +2201,7 @@ nsImageFrame::GetCursor(const nsPoint& aPoint,
|
||||||
PresShell()->StyleSet()->
|
PresShell()->StyleSet()->
|
||||||
ResolveStyleFor(area->AsElement(), Style(),
|
ResolveStyleFor(area->AsElement(), Style(),
|
||||||
LazyComputeBehavior::Allow);
|
LazyComputeBehavior::Allow);
|
||||||
FillCursorInformationFromStyle(areaStyle->StyleUserInterface(),
|
FillCursorInformationFromStyle(areaStyle->StyleUI(), aCursor);
|
||||||
aCursor);
|
|
||||||
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
|
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
|
||||||
aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
|
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
|
// If we are pointer-events:none then we don't need to HitTest background
|
||||||
bool pointerEventsNone =
|
bool pointerEventsNone =
|
||||||
StyleUserInterface()->mPointerEvents == NS_STYLE_POINTER_EVENTS_NONE;
|
StyleUI()->mPointerEvents == NS_STYLE_POINTER_EVENTS_NONE;
|
||||||
if (!aBuilder->IsForEventDelivery() || !pointerEventsNone) {
|
if (!aBuilder->IsForEventDelivery() || !pointerEventsNone) {
|
||||||
nsDisplayListCollection decorations(aBuilder);
|
nsDisplayListCollection decorations(aBuilder);
|
||||||
DisplayBorderBackgroundOutline(aBuilder, decorations);
|
DisplayBorderBackgroundOutline(aBuilder, decorations);
|
||||||
|
|
|
||||||
|
|
@ -4633,7 +4633,7 @@ nsresult
|
||||||
nsTextFrame::GetCursor(const nsPoint& aPoint,
|
nsTextFrame::GetCursor(const nsPoint& aPoint,
|
||||||
nsIFrame::Cursor& aCursor)
|
nsIFrame::Cursor& aCursor)
|
||||||
{
|
{
|
||||||
FillCursorInformationFromStyle(StyleUserInterface(), aCursor);
|
FillCursorInformationFromStyle(StyleUI(), aCursor);
|
||||||
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
|
if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
|
||||||
if (!IsSelectable(nullptr)) {
|
if (!IsSelectable(nullptr)) {
|
||||||
aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
|
aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@ nsDisplayRemote::nsDisplayRemote(nsDisplayListBuilder* aBuilder,
|
||||||
, mEventRegionsOverride(EventRegionsOverride::NoOverride)
|
, mEventRegionsOverride(EventRegionsOverride::NoOverride)
|
||||||
{
|
{
|
||||||
bool frameIsPointerEventsNone =
|
bool frameIsPointerEventsNone =
|
||||||
aFrame->StyleUserInterface()->GetEffectivePointerEvents(aFrame) ==
|
aFrame->StyleUI()->GetEffectivePointerEvents(aFrame) ==
|
||||||
NS_STYLE_POINTER_EVENTS_NONE;
|
NS_STYLE_POINTER_EVENTS_NONE;
|
||||||
if (aBuilder->IsInsidePointerEventsNoneDoc() || frameIsPointerEventsNone) {
|
if (aBuilder->IsInsidePointerEventsNoneDoc() || frameIsPointerEventsNone) {
|
||||||
mEventRegionsOverride |= EventRegionsOverride::ForceEmptyHitRegion;
|
mEventRegionsOverride |= EventRegionsOverride::ForceEmptyHitRegion;
|
||||||
|
|
|
||||||
|
|
@ -2851,7 +2851,7 @@ static bool
|
||||||
IsFrameReceivingPointerEvents(nsIFrame* aFrame)
|
IsFrameReceivingPointerEvents(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
return NS_STYLE_POINTER_EVENTS_NONE !=
|
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
|
// 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(XUL);
|
||||||
DO_STRUCT_DIFFERENCE(Column);
|
DO_STRUCT_DIFFERENCE(Column);
|
||||||
DO_STRUCT_DIFFERENCE(Content);
|
DO_STRUCT_DIFFERENCE(Content);
|
||||||
DO_STRUCT_DIFFERENCE(UserInterface);
|
DO_STRUCT_DIFFERENCE(UI);
|
||||||
DO_STRUCT_DIFFERENCE(Visibility);
|
DO_STRUCT_DIFFERENCE(Visibility);
|
||||||
DO_STRUCT_DIFFERENCE(Outline);
|
DO_STRUCT_DIFFERENCE(Outline);
|
||||||
DO_STRUCT_DIFFERENCE(TableBorder);
|
DO_STRUCT_DIFFERENCE(TableBorder);
|
||||||
|
|
|
||||||
|
|
@ -1576,7 +1576,7 @@ Gecko_InitializeImageCropRect(nsStyleImage* aImage)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Gecko_SetCursorArrayLength(nsStyleUserInterface* aStyleUI, size_t aLen)
|
Gecko_SetCursorArrayLength(nsStyleUI* aStyleUI, size_t aLen)
|
||||||
{
|
{
|
||||||
aStyleUI->mCursorImages.Clear();
|
aStyleUI->mCursorImages.Clear();
|
||||||
aStyleUI->mCursorImages.SetLength(aLen);
|
aStyleUI->mCursorImages.SetLength(aLen);
|
||||||
|
|
@ -1593,8 +1593,7 @@ Gecko_SetCursorImageValue(nsCursorImage* aCursor,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Gecko_CopyCursorArrayFrom(nsStyleUserInterface* aDest,
|
Gecko_CopyCursorArrayFrom(nsStyleUI* aDest, const nsStyleUI* aSrc)
|
||||||
const nsStyleUserInterface* aSrc)
|
|
||||||
{
|
{
|
||||||
aDest->mCursorImages = aSrc->mCursorImages;
|
aDest->mCursorImages = aSrc->mCursorImages;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -379,11 +379,10 @@ void Gecko_SetListStyleImageImageValue(nsStyleList* style_struct,
|
||||||
void Gecko_CopyListStyleImageFrom(nsStyleList* dest, const nsStyleList* src);
|
void Gecko_CopyListStyleImageFrom(nsStyleList* dest, const nsStyleList* src);
|
||||||
|
|
||||||
// cursor style.
|
// cursor style.
|
||||||
void Gecko_SetCursorArrayLength(nsStyleUserInterface* ui, size_t len);
|
void Gecko_SetCursorArrayLength(nsStyleUI* ui, size_t len);
|
||||||
void Gecko_SetCursorImageValue(nsCursorImage* aCursor,
|
void Gecko_SetCursorImageValue(nsCursorImage* aCursor,
|
||||||
mozilla::css::ImageValue* aImageValue);
|
mozilla::css::ImageValue* aImageValue);
|
||||||
void Gecko_CopyCursorArrayFrom(nsStyleUserInterface* dest,
|
void Gecko_CopyCursorArrayFrom(nsStyleUI* dest, const nsStyleUI* src);
|
||||||
const nsStyleUserInterface* src);
|
|
||||||
|
|
||||||
void Gecko_SetContentDataImageValue(nsStyleContentData* aList,
|
void Gecko_SetContentDataImageValue(nsStyleContentData* aList,
|
||||||
mozilla::css::ImageValue* aImageValue);
|
mozilla::css::ImageValue* aImageValue);
|
||||||
|
|
|
||||||
|
|
@ -338,7 +338,7 @@ whitelist-types = [
|
||||||
"nsStyleUIReset",
|
"nsStyleUIReset",
|
||||||
"nsStyleUnion",
|
"nsStyleUnion",
|
||||||
"nsStyleUnit",
|
"nsStyleUnit",
|
||||||
"nsStyleUserInterface",
|
"nsStyleUI",
|
||||||
"nsStyleVisibility",
|
"nsStyleVisibility",
|
||||||
"nsStyleXUL",
|
"nsStyleXUL",
|
||||||
"nsTArrayHeader",
|
"nsTArrayHeader",
|
||||||
|
|
@ -585,7 +585,7 @@ structs-types = [
|
||||||
"nsStyleUIReset",
|
"nsStyleUIReset",
|
||||||
"nsStyleUnion",
|
"nsStyleUnion",
|
||||||
"nsStyleUnit",
|
"nsStyleUnit",
|
||||||
"nsStyleUserInterface",
|
"nsStyleUI",
|
||||||
"nsStyleVisibility",
|
"nsStyleVisibility",
|
||||||
"nsStyleXUL",
|
"nsStyleXUL",
|
||||||
"nsTimingFunction",
|
"nsTimingFunction",
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,4 @@ STYLE_STRUCT(Text, (mTextEmphasisColor,
|
||||||
mWebkitTextStrokeColor))
|
mWebkitTextStrokeColor))
|
||||||
STYLE_STRUCT(TextReset, (mTextDecorationColor))
|
STYLE_STRUCT(TextReset, (mTextDecorationColor))
|
||||||
STYLE_STRUCT(SVG, (mFill, mStroke))
|
STYLE_STRUCT(SVG, (mFill, mStroke))
|
||||||
STYLE_STRUCT(UserInterface, (mCaretColor))
|
STYLE_STRUCT(UI, (mCaretColor))
|
||||||
|
|
|
||||||
|
|
@ -727,7 +727,7 @@ CollectImageURLsForProperty(nsCSSPropertyID aProp,
|
||||||
|
|
||||||
switch (aProp) {
|
switch (aProp) {
|
||||||
case eCSSProperty_cursor:
|
case eCSSProperty_cursor:
|
||||||
for (auto& image : aStyle.StyleUserInterface()->mCursorImages) {
|
for (auto& image : aStyle.StyleUI()->mCursorImages) {
|
||||||
AddImageURL(*image.mImage, aURLs);
|
AddImageURL(*image.mImage, aURLs);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -2985,7 +2985,7 @@ already_AddRefed<CSSValue>
|
||||||
nsComputedDOMStyle::DoGetScrollbarFaceColor()
|
nsComputedDOMStyle::DoGetScrollbarFaceColor()
|
||||||
{
|
{
|
||||||
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
||||||
SetValueForWidgetColor(val, StyleUserInterface()->mScrollbarFaceColor,
|
SetValueForWidgetColor(val, StyleUI()->mScrollbarFaceColor,
|
||||||
StyleAppearance::ScrollbarthumbVertical);
|
StyleAppearance::ScrollbarthumbVertical);
|
||||||
return val.forget();
|
return val.forget();
|
||||||
}
|
}
|
||||||
|
|
@ -2994,7 +2994,7 @@ already_AddRefed<CSSValue>
|
||||||
nsComputedDOMStyle::DoGetScrollbarTrackColor()
|
nsComputedDOMStyle::DoGetScrollbarTrackColor()
|
||||||
{
|
{
|
||||||
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
||||||
SetValueForWidgetColor(val, StyleUserInterface()->mScrollbarTrackColor,
|
SetValueForWidgetColor(val, StyleUI()->mScrollbarTrackColor,
|
||||||
StyleAppearance::ScrollbarVertical);
|
StyleAppearance::ScrollbarVertical);
|
||||||
return val.forget();
|
return val.forget();
|
||||||
}
|
}
|
||||||
|
|
@ -3477,7 +3477,7 @@ already_AddRefed<CSSValue>
|
||||||
nsComputedDOMStyle::DoGetCaretColor()
|
nsComputedDOMStyle::DoGetCaretColor()
|
||||||
{
|
{
|
||||||
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
||||||
SetValueFromComplexColor(val, StyleUserInterface()->mCaretColor);
|
SetValueFromComplexColor(val, StyleUI()->mCaretColor);
|
||||||
return val.forget();
|
return val.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3486,7 +3486,7 @@ nsComputedDOMStyle::DoGetCursor()
|
||||||
{
|
{
|
||||||
RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
|
RefPtr<nsDOMCSSValueList> valueList = GetROCSSValueList(true);
|
||||||
|
|
||||||
const nsStyleUserInterface *ui = StyleUserInterface();
|
const nsStyleUI *ui = StyleUI();
|
||||||
|
|
||||||
for (const nsCursorImage& item : ui->mCursorImages) {
|
for (const nsCursorImage& item : ui->mCursorImages) {
|
||||||
RefPtr<nsDOMCSSValueList> itemList = GetROCSSValueList(false);
|
RefPtr<nsDOMCSSValueList> itemList = GetROCSSValueList(false);
|
||||||
|
|
|
||||||
|
|
@ -382,7 +382,7 @@ enum class StyleContent : uint8_t {
|
||||||
AltContent
|
AltContent
|
||||||
};
|
};
|
||||||
|
|
||||||
// See nsStyleUserInterface
|
// See nsStyleUI
|
||||||
#define NS_STYLE_CURSOR_AUTO 1
|
#define NS_STYLE_CURSOR_AUTO 1
|
||||||
#define NS_STYLE_CURSOR_CROSSHAIR 2
|
#define NS_STYLE_CURSOR_CROSSHAIR 2
|
||||||
#define NS_STYLE_CURSOR_DEFAULT 3 // ie: an arrow
|
#define NS_STYLE_CURSOR_DEFAULT 3 // ie: an arrow
|
||||||
|
|
|
||||||
|
|
@ -4559,7 +4559,7 @@ nsStyleText::TextEmphasisSide(WritingMode aWM) const
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------
|
//-----------------------
|
||||||
// nsStyleUserInterface
|
// nsStyleUI
|
||||||
//
|
//
|
||||||
|
|
||||||
nsCursorImage::nsCursorImage()
|
nsCursorImage::nsCursorImage()
|
||||||
|
|
@ -4605,7 +4605,7 @@ nsCursorImage::operator==(const nsCursorImage& aOther) const
|
||||||
DefinitelyEqualImages(mImage, aOther.mImage);
|
DefinitelyEqualImages(mImage, aOther.mImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsStyleUserInterface::nsStyleUserInterface(const nsPresContext* aContext)
|
nsStyleUI::nsStyleUI(const nsPresContext* aContext)
|
||||||
: mUserInput(StyleUserInput::Auto)
|
: mUserInput(StyleUserInput::Auto)
|
||||||
, mUserModify(StyleUserModify::ReadOnly)
|
, mUserModify(StyleUserModify::ReadOnly)
|
||||||
, mUserFocus(StyleUserFocus::None)
|
, mUserFocus(StyleUserFocus::None)
|
||||||
|
|
@ -4615,10 +4615,10 @@ nsStyleUserInterface::nsStyleUserInterface(const nsPresContext* aContext)
|
||||||
, mScrollbarFaceColor(StyleComplexColor::Auto())
|
, mScrollbarFaceColor(StyleComplexColor::Auto())
|
||||||
, mScrollbarTrackColor(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)
|
: mUserInput(aSource.mUserInput)
|
||||||
, mUserModify(aSource.mUserModify)
|
, mUserModify(aSource.mUserModify)
|
||||||
, mUserFocus(aSource.mUserFocus)
|
, mUserFocus(aSource.mUserFocus)
|
||||||
|
|
@ -4629,17 +4629,17 @@ nsStyleUserInterface::nsStyleUserInterface(const nsStyleUserInterface& aSource)
|
||||||
, mScrollbarFaceColor(aSource.mScrollbarFaceColor)
|
, mScrollbarFaceColor(aSource.mScrollbarFaceColor)
|
||||||
, mScrollbarTrackColor(aSource.mScrollbarTrackColor)
|
, mScrollbarTrackColor(aSource.mScrollbarTrackColor)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(nsStyleUserInterface);
|
MOZ_COUNT_CTOR(nsStyleUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsStyleUserInterface::~nsStyleUserInterface()
|
nsStyleUI::~nsStyleUI()
|
||||||
{
|
{
|
||||||
MOZ_COUNT_DTOR(nsStyleUserInterface);
|
MOZ_COUNT_DTOR(nsStyleUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsStyleUserInterface::FinishStyle(
|
nsStyleUI::FinishStyle(nsPresContext* aPresContext,
|
||||||
nsPresContext* aPresContext, const nsStyleUserInterface* aOldStyle)
|
const nsStyleUI* aOldStyle)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
|
|
@ -4658,7 +4658,7 @@ nsStyleUserInterface::FinishStyle(
|
||||||
}
|
}
|
||||||
|
|
||||||
nsChangeHint
|
nsChangeHint
|
||||||
nsStyleUserInterface::CalcDifference(const nsStyleUserInterface& aNewData) const
|
nsStyleUI::CalcDifference(const nsStyleUI& aNewData) const
|
||||||
{
|
{
|
||||||
nsChangeHint hint = nsChangeHint(0);
|
nsChangeHint hint = nsChangeHint(0);
|
||||||
if (mCursor != aNewData.mCursor) {
|
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);
|
explicit nsStyleUI(const nsPresContext* aContext);
|
||||||
nsStyleUserInterface(const nsStyleUserInterface& aOther);
|
nsStyleUI(const nsStyleUI& aOther);
|
||||||
~nsStyleUserInterface();
|
~nsStyleUI();
|
||||||
|
|
||||||
void FinishStyle(nsPresContext*, const nsStyleUserInterface*);
|
void FinishStyle(nsPresContext*, const nsStyleUI*);
|
||||||
const static bool kHasFinishStyle = true;
|
const static bool kHasFinishStyle = true;
|
||||||
|
|
||||||
nsChangeHint CalcDifference(const nsStyleUserInterface& aNewData) const;
|
nsChangeHint CalcDifference(const nsStyleUI& aNewData) const;
|
||||||
|
|
||||||
mozilla::StyleUserInput mUserInput;
|
mozilla::StyleUserInput mUserInput;
|
||||||
mozilla::StyleUserModify mUserModify; // (modify-content)
|
mozilla::StyleUserModify mUserModify; // (modify-content)
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,7 @@ nsStyleDisplay::IsAbsolutelyPositioned(const nsIFrame* aContextFrame) const
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t
|
uint8_t
|
||||||
nsStyleUserInterface::GetEffectivePointerEvents(nsIFrame* aFrame) const
|
nsStyleUI::GetEffectivePointerEvents(nsIFrame* aFrame) const
|
||||||
{
|
{
|
||||||
if (aFrame->GetContent() && !aFrame->GetContent()->GetParent()) {
|
if (aFrame->GetContent() && !aFrame->GetContent()->GetParent()) {
|
||||||
// The root element has a cluster of frames associated with it
|
// The root element has a cluster of frames associated with it
|
||||||
|
|
@ -255,7 +255,7 @@ nsStyleUserInterface::GetEffectivePointerEvents(nsIFrame* aFrame) const
|
||||||
// frame.
|
// frame.
|
||||||
nsIFrame* f = aFrame->GetContent()->GetPrimaryFrame();
|
nsIFrame* f = aFrame->GetContent()->GetPrimaryFrame();
|
||||||
if (f) {
|
if (f) {
|
||||||
return f->StyleUserInterface()->mPointerEvents;
|
return f->StyleUI()->mPointerEvents;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mPointerEvents;
|
return mPointerEvents;
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ STYLE_STRUCT_INHERITED(Color)
|
||||||
STYLE_STRUCT_INHERITED(List)
|
STYLE_STRUCT_INHERITED(List)
|
||||||
STYLE_STRUCT_INHERITED(Text)
|
STYLE_STRUCT_INHERITED(Text)
|
||||||
STYLE_STRUCT_INHERITED(Visibility)
|
STYLE_STRUCT_INHERITED(Visibility)
|
||||||
STYLE_STRUCT_INHERITED(UserInterface)
|
STYLE_STRUCT_INHERITED(UI)
|
||||||
STYLE_STRUCT_INHERITED(TableBorder)
|
STYLE_STRUCT_INHERITED(TableBorder)
|
||||||
STYLE_STRUCT_INHERITED(SVG)
|
STYLE_STRUCT_INHERITED(SVG)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -502,7 +502,7 @@ nsSVGImageFrame::GetHitTestFlags()
|
||||||
{
|
{
|
||||||
uint16_t flags = 0;
|
uint16_t flags = 0;
|
||||||
|
|
||||||
switch (StyleUserInterface()->mPointerEvents) {
|
switch (StyleUI()->mPointerEvents) {
|
||||||
case NS_STYLE_POINTER_EVENTS_NONE:
|
case NS_STYLE_POINTER_EVENTS_NONE:
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED:
|
case NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED:
|
||||||
|
|
|
||||||
|
|
@ -1704,7 +1704,7 @@ nsSVGUtils::GetGeometryHitTestFlags(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
uint16_t flags = 0;
|
uint16_t flags = 0;
|
||||||
|
|
||||||
switch (aFrame->StyleUserInterface()->mPointerEvents) {
|
switch (aFrame->StyleUI()->mPointerEvents) {
|
||||||
case NS_STYLE_POINTER_EVENTS_NONE:
|
case NS_STYLE_POINTER_EVENTS_NONE:
|
||||||
break;
|
break;
|
||||||
case NS_STYLE_POINTER_EVENTS_AUTO:
|
case NS_STYLE_POINTER_EVENTS_AUTO:
|
||||||
|
|
|
||||||
|
|
@ -2442,8 +2442,7 @@ nsTreeBodyFrame::GetCursor(const nsPoint& aPoint,
|
||||||
// Our scratch array is already prefilled.
|
// Our scratch array is already prefilled.
|
||||||
ComputedStyle* childContext = GetPseudoComputedStyle(child);
|
ComputedStyle* childContext = GetPseudoComputedStyle(child);
|
||||||
|
|
||||||
FillCursorInformationFromStyle(childContext->StyleUserInterface(),
|
FillCursorInformationFromStyle(childContext->StyleUI(), aCursor);
|
||||||
aCursor);
|
|
||||||
if (aCursor.mCursor == NS_STYLE_CURSOR_AUTO)
|
if (aCursor.mCursor == NS_STYLE_CURSOR_AUTO)
|
||||||
aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
|
aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
<%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",
|
${helpers.predefined_type("cursor",
|
||||||
"Cursor",
|
"Cursor",
|
||||||
|
|
|
||||||
|
|
@ -2748,7 +2748,7 @@ nsNativeThemeCocoa::ComputeScrollbarParams(nsIFrame* aFrame, bool aIsHorizontal)
|
||||||
// generally good enough for use cases of custom scrollbars.
|
// generally good enough for use cases of custom scrollbars.
|
||||||
if (!params.overlay) {
|
if (!params.overlay) {
|
||||||
ComputedStyle* style = nsLayoutUtils::StyleForScrollbar(aFrame);
|
ComputedStyle* style = nsLayoutUtils::StyleForScrollbar(aFrame);
|
||||||
if (style->StyleUserInterface()->HasCustomScrollbars()) {
|
if (style->StyleUI()->HasCustomScrollbars()) {
|
||||||
params.custom = true;
|
params.custom = true;
|
||||||
params.trackColor =
|
params.trackColor =
|
||||||
GetScrollbarTrackColor(style, &GetAutoScrollbarTrackColor);
|
GetScrollbarTrackColor(style, &GetAutoScrollbarTrackColor);
|
||||||
|
|
|
||||||
|
|
@ -849,8 +849,7 @@ nscolor
|
||||||
nsNativeTheme::GetScrollbarFaceColor(ComputedStyle* aStyle,
|
nsNativeTheme::GetScrollbarFaceColor(ComputedStyle* aStyle,
|
||||||
AutoColorGetter aAutoGetter)
|
AutoColorGetter aAutoGetter)
|
||||||
{
|
{
|
||||||
StyleComplexColor complexColor =
|
StyleComplexColor complexColor = aStyle->StyleUI()->mScrollbarFaceColor;
|
||||||
aStyle->StyleUserInterface()->mScrollbarFaceColor;
|
|
||||||
if (complexColor.IsAuto()) {
|
if (complexColor.IsAuto()) {
|
||||||
return aAutoGetter(aStyle);
|
return aAutoGetter(aStyle);
|
||||||
}
|
}
|
||||||
|
|
@ -866,8 +865,7 @@ nscolor
|
||||||
nsNativeTheme::GetScrollbarTrackColor(ComputedStyle* aStyle,
|
nsNativeTheme::GetScrollbarTrackColor(ComputedStyle* aStyle,
|
||||||
AutoColorGetter aAutoGetter)
|
AutoColorGetter aAutoGetter)
|
||||||
{
|
{
|
||||||
StyleComplexColor complexColor =
|
StyleComplexColor complexColor = aStyle->StyleUI()->mScrollbarTrackColor;
|
||||||
aStyle->StyleUserInterface()->mScrollbarTrackColor;
|
|
||||||
nscolor color;
|
nscolor color;
|
||||||
if (complexColor.IsAuto()) {
|
if (complexColor.IsAuto()) {
|
||||||
color = aAutoGetter(aStyle);
|
color = aAutoGetter(aStyle);
|
||||||
|
|
|
||||||
|
|
@ -1559,7 +1559,7 @@ nsNativeThemeWin::DrawWidgetBackground(gfxContext* aContext,
|
||||||
|
|
||||||
if (IsWidgetScrollbarPart(aWidgetType)) {
|
if (IsWidgetScrollbarPart(aWidgetType)) {
|
||||||
ComputedStyle* style = nsLayoutUtils::StyleForScrollbar(aFrame);
|
ComputedStyle* style = nsLayoutUtils::StyleForScrollbar(aFrame);
|
||||||
if (style->StyleUserInterface()->HasCustomScrollbars()) {
|
if (style->StyleUI()->HasCustomScrollbars()) {
|
||||||
return DrawCustomScrollbarPart(aContext, aFrame, style,
|
return DrawCustomScrollbarPart(aContext, aFrame, style,
|
||||||
aWidgetType, aRect, aDirtyRect);
|
aWidgetType, aRect, aDirtyRect);
|
||||||
}
|
}
|
||||||
|
|
@ -3192,7 +3192,7 @@ nsresult nsNativeThemeWin::ClassicGetThemePartAndState(nsIFrame* aFrame, WidgetT
|
||||||
else {
|
else {
|
||||||
if (contentState.HasAllStates(NS_EVENT_STATE_ACTIVE | NS_EVENT_STATE_HOVER)) {
|
if (contentState.HasAllStates(NS_EVENT_STATE_ACTIVE | NS_EVENT_STATE_HOVER)) {
|
||||||
aState |= DFCS_PUSHED;
|
aState |= DFCS_PUSHED;
|
||||||
const nsStyleUserInterface *uiData = aFrame->StyleUserInterface();
|
const nsStyleUI *uiData = aFrame->StyleUI();
|
||||||
// The down state is flat if the button is focusable
|
// The down state is flat if the button is focusable
|
||||||
if (uiData->mUserFocus == StyleUserFocus::Normal) {
|
if (uiData->mUserFocus == StyleUserFocus::Normal) {
|
||||||
if (!aFrame->GetContent()->IsHTMLElement())
|
if (!aFrame->GetContent()->IsHTMLElement())
|
||||||
|
|
@ -4231,8 +4231,8 @@ nsNativeThemeWin::DrawCustomScrollbarPart(gfxContext* aContext,
|
||||||
const nsRect& aRect,
|
const nsRect& aRect,
|
||||||
const nsRect& aClipRect)
|
const nsRect& aClipRect)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(!aStyle->StyleUserInterface()->mScrollbarFaceColor.IsAuto() ||
|
MOZ_ASSERT(!aStyle->StyleUI()->mScrollbarFaceColor.IsAuto() ||
|
||||||
!aStyle->StyleUserInterface()->mScrollbarTrackColor.IsAuto());
|
!aStyle->StyleUI()->mScrollbarTrackColor.IsAuto());
|
||||||
|
|
||||||
gfxRect tr(aRect.X(), aRect.Y(), aRect.Width(), aRect.Height()),
|
gfxRect tr(aRect.X(), aRect.Y(), aRect.Width(), aRect.Height()),
|
||||||
dr(aClipRect.X(), aClipRect.Y(),
|
dr(aClipRect.X(), aClipRect.Y(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue