mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895274 part.145 Rename NS_SELECTION_SET to eSetSelection r=smaug
This commit is contained in:
parent
a7cf86ebab
commit
2e2f4270d9
@ -2026,7 +2026,7 @@ nsDOMWindowUtils::SendSelectionSetEvent(uint32_t aOffset,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
WidgetSelectionEvent selectionEvent(true, NS_SELECTION_SET, widget);
|
||||
WidgetSelectionEvent selectionEvent(true, eSetSelection, widget);
|
||||
InitEvent(selectionEvent);
|
||||
|
||||
selectionEvent.mOffset = aOffset;
|
||||
|
@ -743,7 +743,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||
InitLineOrPageDelta(aTargetFrame, this, wheelEvent);
|
||||
}
|
||||
break;
|
||||
case NS_SELECTION_SET:
|
||||
case eSetSelection:
|
||||
IMEStateManager::HandleSelectionEvent(aPresContext, GetFocusedContent(),
|
||||
aEvent->AsSelectionEvent());
|
||||
break;
|
||||
|
@ -149,8 +149,8 @@ GetEventMessageName(EventMessage aMessage)
|
||||
return "NS_COMPOSITION_COMMIT_AS_IS";
|
||||
case NS_COMPOSITION_COMMIT:
|
||||
return "NS_COMPOSITION_COMMIT";
|
||||
case NS_SELECTION_SET:
|
||||
return "NS_SELECTION_SET";
|
||||
case eSetSelection:
|
||||
return "eSetSelection";
|
||||
default:
|
||||
return "unacceptable event message";
|
||||
}
|
||||
|
@ -39,8 +39,8 @@ GetEventMessageName(EventMessage aMessage)
|
||||
return "NS_COMPOSITION_COMMIT_AS_IS";
|
||||
case NS_COMPOSITION_COMMIT:
|
||||
return "NS_COMPOSITION_COMMIT";
|
||||
case NS_SELECTION_SET:
|
||||
return "NS_SELECTION_SET";
|
||||
case eSetSelection:
|
||||
return "eSetSelection";
|
||||
default:
|
||||
return "unacceptable event message";
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ NS_EVENT_MESSAGE(ePluginInputEvent, ePluginEventFirst)
|
||||
// Events to manipulate selection (WidgetSelectionEvent)
|
||||
NS_EVENT_MESSAGE(eSelectionEventFirst, 3700)
|
||||
// Clear any previous selection and set the given range as the selection
|
||||
NS_EVENT_MESSAGE(NS_SELECTION_SET, eSelectionEventFirst)
|
||||
NS_EVENT_MESSAGE(eSetSelection, eSelectionEventFirst)
|
||||
|
||||
// Events of commands for the contents
|
||||
NS_EVENT_MESSAGE(NS_CONTENT_COMMAND_EVENT_START, 3800)
|
||||
|
@ -1808,7 +1808,7 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *ae)
|
||||
RemoveIMEComposition();
|
||||
|
||||
{
|
||||
WidgetSelectionEvent event(true, NS_SELECTION_SET, this);
|
||||
WidgetSelectionEvent event(true, eSetSelection, this);
|
||||
InitEvent(event, nullptr);
|
||||
event.mOffset = uint32_t(ae->Start());
|
||||
event.mLength = uint32_t(ae->End() - ae->Start());
|
||||
@ -1888,7 +1888,7 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *ae)
|
||||
*/
|
||||
AutoIMEMask selMask(mIMEMaskSelectionUpdate);
|
||||
RemoveIMEComposition();
|
||||
WidgetSelectionEvent selEvent(true, NS_SELECTION_SET, this);
|
||||
WidgetSelectionEvent selEvent(true, eSetSelection, this);
|
||||
InitEvent(selEvent, nullptr);
|
||||
|
||||
int32_t start = ae->Start(), end = ae->End();
|
||||
@ -1967,7 +1967,7 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *ae)
|
||||
RemoveIMEComposition();
|
||||
|
||||
{
|
||||
WidgetSelectionEvent event(true, NS_SELECTION_SET, this);
|
||||
WidgetSelectionEvent event(true, eSetSelection, this);
|
||||
InitEvent(event, nullptr);
|
||||
event.mOffset = uint32_t(ae->Start());
|
||||
event.mLength = uint32_t(ae->End() - ae->Start());
|
||||
|
@ -354,7 +354,7 @@ public:
|
||||
bool DispatchEvent(WidgetGUIEvent& aEvent);
|
||||
|
||||
/**
|
||||
* SetSelection() dispatches NS_SELECTION_SET event for the aRange.
|
||||
* SetSelection() dispatches eSetSelection event for the aRange.
|
||||
*
|
||||
* @param aRange The range which will be selected.
|
||||
* @return TRUE if setting selection is succeeded and
|
||||
|
@ -3965,7 +3965,7 @@ TextInputHandlerBase::SetSelection(NSRange& aRange)
|
||||
MOZ_ASSERT(!Destroyed());
|
||||
|
||||
nsRefPtr<TextInputHandlerBase> kungFuDeathGrip(this);
|
||||
WidgetSelectionEvent selectionEvent(true, NS_SELECTION_SET, mWidget);
|
||||
WidgetSelectionEvent selectionEvent(true, eSetSelection, mWidget);
|
||||
selectionEvent.mOffset = aRange.location;
|
||||
selectionEvent.mLength = aRange.length;
|
||||
selectionEvent.mReversed = false;
|
||||
|
@ -2053,7 +2053,7 @@ IMContextWrapper::DeleteText(GtkIMContext* aContext,
|
||||
g_utf8_offset_to_pointer(utf8Str.get(), endInUTF8Characters);
|
||||
|
||||
// Set selection to delete
|
||||
WidgetSelectionEvent selectionEvent(true, NS_SELECTION_SET,
|
||||
WidgetSelectionEvent selectionEvent(true, eSetSelection,
|
||||
mLastFocusedWindow);
|
||||
|
||||
nsDependentCSubstring utf8StrBeforeOffset(utf8Str, 0,
|
||||
|
@ -1889,9 +1889,9 @@ TestApp::TestSelection(void)
|
||||
* nsTextStore::GetSelection not sending NS_QUERY_SELECTED_TEXT
|
||||
* NS_QUERY_SELECTED_TEXT not handled by ContentEventHandler
|
||||
* Bug in NS_QUERY_SELECTED_TEXT handler
|
||||
* nsTextStore::SetSelection not sending NS_SELECTION_SET
|
||||
* NS_SELECTION_SET not handled by ContentEventHandler
|
||||
* Bug in NS_SELECTION_SET handler
|
||||
* nsTextStore::SetSelection not sending eSetSelection
|
||||
* eSetSelection not handled by ContentEventHandler
|
||||
* Bug in eSetSelection handler
|
||||
*/
|
||||
|
||||
TS_SELECTION_ACP testSel;
|
||||
@ -1965,7 +1965,7 @@ TestApp::TestText(void)
|
||||
* Bug in NS_QUERY_TEXT_CONTENT handler
|
||||
* nsTextStore::SetText not calling SetSelection or InsertTextAtSelection
|
||||
* Bug in SetSelection or InsertTextAtSelection
|
||||
* NS_SELECTION_SET bug or NS_COMPOSITION_* / NS_COMPOSITION_CHANGE bug
|
||||
* eSetSelection bug or NS_COMPOSITION_* / NS_COMPOSITION_CHANGE bug
|
||||
*/
|
||||
|
||||
if (!mMgr->GetFocusedStore()) {
|
||||
|
@ -1689,7 +1689,7 @@ TSFTextStore::FlushPendingActions()
|
||||
|
||||
if (action.mAdjustSelection) {
|
||||
// Select composition range so the new composition replaces the range
|
||||
WidgetSelectionEvent selectionSet(true, NS_SELECTION_SET, mWidget);
|
||||
WidgetSelectionEvent selectionSet(true, eSetSelection, mWidget);
|
||||
mWidget->InitEvent(selectionSet);
|
||||
selectionSet.mOffset = static_cast<uint32_t>(action.mSelectionStart);
|
||||
selectionSet.mLength = static_cast<uint32_t>(action.mSelectionLength);
|
||||
@ -1698,7 +1698,7 @@ TSFTextStore::FlushPendingActions()
|
||||
if (!selectionSet.mSucceeded) {
|
||||
MOZ_LOG(sTextStoreLog, LogLevel::Error,
|
||||
("TSF: 0x%p TSFTextStore::FlushPendingActions() "
|
||||
"FAILED due to NS_SELECTION_SET failure", this));
|
||||
"FAILED due to eSetSelection failure", this));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1815,15 +1815,15 @@ TSFTextStore::FlushPendingActions()
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PendingAction::SELECTION_SET: {
|
||||
case PendingAction::SET_SELECTION: {
|
||||
MOZ_LOG(sTextStoreLog, LogLevel::Debug,
|
||||
("TSF: 0x%p TSFTextStore::FlushPendingActions() "
|
||||
"flushing SELECTION_SET={ mSelectionStart=%d, "
|
||||
"flushing SET_SELECTION={ mSelectionStart=%d, "
|
||||
"mSelectionLength=%d, mSelectionReversed=%s }",
|
||||
this, action.mSelectionStart, action.mSelectionLength,
|
||||
GetBoolName(action.mSelectionReversed)));
|
||||
|
||||
WidgetSelectionEvent selectionSet(true, NS_SELECTION_SET, mWidget);
|
||||
WidgetSelectionEvent selectionSet(true, eSetSelection, mWidget);
|
||||
selectionSet.mOffset =
|
||||
static_cast<uint32_t>(action.mSelectionStart);
|
||||
selectionSet.mLength =
|
||||
@ -2712,7 +2712,7 @@ TSFTextStore::SetSelectionInternal(const TS_SELECTION_ACP* pSelection,
|
||||
|
||||
CompleteLastActionIfStillIncomplete();
|
||||
PendingAction* action = mPendingActions.AppendElement();
|
||||
action->mType = PendingAction::SELECTION_SET;
|
||||
action->mType = PendingAction::SET_SELECTION;
|
||||
action->mSelectionStart = pSelection->acpStart;
|
||||
action->mSelectionLength = pSelection->acpEnd - pSelection->acpStart;
|
||||
action->mSelectionReversed = (pSelection->style.ase == TS_AE_START);
|
||||
|
@ -511,7 +511,7 @@ protected:
|
||||
COMPOSITION_START,
|
||||
COMPOSITION_UPDATE,
|
||||
COMPOSITION_END,
|
||||
SELECTION_SET
|
||||
SET_SELECTION
|
||||
};
|
||||
ActionType mType;
|
||||
// For compositionstart and selectionset
|
||||
|
Loading…
Reference in New Issue
Block a user