зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1313565 - Convert NS_STYLE_USER_MODIFY_* to enum class ; r=manishearth,xidorn
MozReview-Commit-ID: IA4bGLgRxd6 --HG-- extra : rebase_source : 6632c53a96df170e8604d65b351f7ee2717ec9ec
This commit is contained in:
Родитель
a356b476dd
Коммит
9260566b60
|
@ -1264,11 +1264,11 @@ nsGenericHTMLElement::MapCommonAttributesIntoExceptHidden(const nsMappedAttribut
|
|||
if (value) {
|
||||
if (value->Equals(nsGkAtoms::_empty, eCaseMatters) ||
|
||||
value->Equals(nsGkAtoms::_true, eIgnoreCase)) {
|
||||
userModify->SetIntValue(NS_STYLE_USER_MODIFY_READ_WRITE,
|
||||
userModify->SetIntValue(StyleUserModify::ReadWrite,
|
||||
eCSSUnit_Enumerated);
|
||||
}
|
||||
else if (value->Equals(nsGkAtoms::_false, eIgnoreCase)) {
|
||||
userModify->SetIntValue(NS_STYLE_USER_MODIFY_READ_ONLY,
|
||||
userModify->SetIntValue(StyleUserModify::ReadOnly,
|
||||
eCSSUnit_Enumerated);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -514,7 +514,7 @@ 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 == NS_STYLE_USER_MODIFY_READ_ONLY) ||
|
||||
userinterface->mUserModify == StyleUserModify::ReadOnly) ||
|
||||
userinterface->mUserInput == StyleUserInput::None ||
|
||||
userinterface->mUserInput == StyleUserInput::Disabled) {
|
||||
return nullptr;
|
||||
|
|
|
@ -2129,9 +2129,9 @@ const KTableEntry nsCSSProps::kUserInputKTable[] = {
|
|||
};
|
||||
|
||||
const KTableEntry nsCSSProps::kUserModifyKTable[] = {
|
||||
{ eCSSKeyword_read_only, NS_STYLE_USER_MODIFY_READ_ONLY },
|
||||
{ eCSSKeyword_read_write, NS_STYLE_USER_MODIFY_READ_WRITE },
|
||||
{ eCSSKeyword_write_only, NS_STYLE_USER_MODIFY_WRITE_ONLY },
|
||||
{ eCSSKeyword_read_only, StyleUserModify::ReadOnly },
|
||||
{ eCSSKeyword_read_write, StyleUserModify::ReadWrite },
|
||||
{ eCSSKeyword_write_only, StyleUserModify::WriteOnly },
|
||||
{ eCSSKeyword_UNKNOWN, -1 }
|
||||
};
|
||||
|
||||
|
|
|
@ -1418,6 +1418,7 @@ struct SetEnumValueHelper
|
|||
DEFINE_ENUM_CLASS_SETTER(StyleUserFocus, None, SelectMenu)
|
||||
DEFINE_ENUM_CLASS_SETTER(StyleUserSelect, None, MozText)
|
||||
DEFINE_ENUM_CLASS_SETTER(StyleUserInput, None, Auto)
|
||||
DEFINE_ENUM_CLASS_SETTER(StyleUserModify, ReadOnly, WriteOnly)
|
||||
#ifdef MOZ_XUL
|
||||
DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None, Popup)
|
||||
#else
|
||||
|
@ -5120,7 +5121,7 @@ nsRuleNode::ComputeUserInterfaceData(void* aStartStruct,
|
|||
ui->mUserModify, conditions,
|
||||
SETVAL_ENUMERATED | SETVAL_UNSET_INHERIT,
|
||||
parentUI->mUserModify,
|
||||
NS_STYLE_USER_MODIFY_READ_ONLY);
|
||||
StyleUserModify::ReadOnly);
|
||||
|
||||
// user-focus: enum, inherit, initial
|
||||
SetValue(*aRuleData->ValueForUserFocus(),
|
||||
|
|
|
@ -220,9 +220,11 @@ enum class StyleUserInput : uint8_t {
|
|||
};
|
||||
|
||||
// user-modify
|
||||
#define NS_STYLE_USER_MODIFY_READ_ONLY 0
|
||||
#define NS_STYLE_USER_MODIFY_READ_WRITE 1
|
||||
#define NS_STYLE_USER_MODIFY_WRITE_ONLY 2
|
||||
enum class StyleUserModify : uint8_t {
|
||||
ReadOnly,
|
||||
ReadWrite,
|
||||
WriteOnly,
|
||||
};
|
||||
|
||||
// -moz-window-dragging
|
||||
#define NS_STYLE_WINDOW_DRAGGING_DEFAULT 0
|
||||
|
|
|
@ -4010,7 +4010,7 @@ nsCursorImage::operator==(const nsCursorImage& aOther) const
|
|||
|
||||
nsStyleUserInterface::nsStyleUserInterface(StyleStructContext aContext)
|
||||
: mUserInput(StyleUserInput::Auto)
|
||||
, mUserModify(NS_STYLE_USER_MODIFY_READ_ONLY)
|
||||
, mUserModify(StyleUserModify::ReadOnly)
|
||||
, mUserFocus(StyleUserFocus::None)
|
||||
, mPointerEvents(NS_STYLE_POINTER_EVENTS_AUTO)
|
||||
, mCursor(NS_STYLE_CURSOR_AUTO)
|
||||
|
|
|
@ -3398,7 +3398,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleUserInterface
|
|||
}
|
||||
|
||||
mozilla::StyleUserInput mUserInput; // [inherited]
|
||||
uint8_t mUserModify; // [inherited] (modify-content)
|
||||
mozilla::StyleUserModify mUserModify; // [inherited] (modify-content)
|
||||
mozilla::StyleUserFocus mUserFocus; // [inherited] (auto-select)
|
||||
uint8_t mPointerEvents; // [inherited] see nsStyleConsts.h
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче