зеркало из https://github.com/mozilla/gecko-dev.git
Bug 920425 part.21 Use mozilla::WidgetEvent::AsQueryContentEvent() r=smaug
This commit is contained in:
Родитель
d9506a35f8
Коммит
b9cc552b72
|
@ -1209,66 +1209,63 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_QUERY_SELECTED_TEXT:
|
case NS_QUERY_SELECTED_TEXT:
|
||||||
DoQuerySelectedText(static_cast<WidgetQueryContentEvent*>(aEvent));
|
DoQuerySelectedText(aEvent->AsQueryContentEvent());
|
||||||
break;
|
break;
|
||||||
case NS_QUERY_TEXT_CONTENT:
|
case NS_QUERY_TEXT_CONTENT:
|
||||||
{
|
{
|
||||||
if (RemoteQueryContentEvent(aEvent))
|
if (RemoteQueryContentEvent(aEvent))
|
||||||
break;
|
break;
|
||||||
nsContentEventHandler handler(mPresContext);
|
nsContentEventHandler handler(mPresContext);
|
||||||
handler.OnQueryTextContent(static_cast<WidgetQueryContentEvent*>(aEvent));
|
handler.OnQueryTextContent(aEvent->AsQueryContentEvent());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_QUERY_CARET_RECT:
|
case NS_QUERY_CARET_RECT:
|
||||||
{
|
{
|
||||||
// XXX remote event
|
// XXX remote event
|
||||||
nsContentEventHandler handler(mPresContext);
|
nsContentEventHandler handler(mPresContext);
|
||||||
handler.OnQueryCaretRect(static_cast<WidgetQueryContentEvent*>(aEvent));
|
handler.OnQueryCaretRect(aEvent->AsQueryContentEvent());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_QUERY_TEXT_RECT:
|
case NS_QUERY_TEXT_RECT:
|
||||||
{
|
{
|
||||||
// XXX remote event
|
// XXX remote event
|
||||||
nsContentEventHandler handler(mPresContext);
|
nsContentEventHandler handler(mPresContext);
|
||||||
handler.OnQueryTextRect(static_cast<WidgetQueryContentEvent*>(aEvent));
|
handler.OnQueryTextRect(aEvent->AsQueryContentEvent());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_QUERY_EDITOR_RECT:
|
case NS_QUERY_EDITOR_RECT:
|
||||||
{
|
{
|
||||||
// XXX remote event
|
// XXX remote event
|
||||||
nsContentEventHandler handler(mPresContext);
|
nsContentEventHandler handler(mPresContext);
|
||||||
handler.OnQueryEditorRect(static_cast<WidgetQueryContentEvent*>(aEvent));
|
handler.OnQueryEditorRect(aEvent->AsQueryContentEvent());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_QUERY_CONTENT_STATE:
|
case NS_QUERY_CONTENT_STATE:
|
||||||
{
|
{
|
||||||
// XXX remote event
|
// XXX remote event
|
||||||
nsContentEventHandler handler(mPresContext);
|
nsContentEventHandler handler(mPresContext);
|
||||||
handler.OnQueryContentState(static_cast<WidgetQueryContentEvent*>(aEvent));
|
handler.OnQueryContentState(aEvent->AsQueryContentEvent());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_QUERY_SELECTION_AS_TRANSFERABLE:
|
case NS_QUERY_SELECTION_AS_TRANSFERABLE:
|
||||||
{
|
{
|
||||||
// XXX remote event
|
// XXX remote event
|
||||||
nsContentEventHandler handler(mPresContext);
|
nsContentEventHandler handler(mPresContext);
|
||||||
handler.OnQuerySelectionAsTransferable(
|
handler.OnQuerySelectionAsTransferable(aEvent->AsQueryContentEvent());
|
||||||
static_cast<WidgetQueryContentEvent*>(aEvent));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_QUERY_CHARACTER_AT_POINT:
|
case NS_QUERY_CHARACTER_AT_POINT:
|
||||||
{
|
{
|
||||||
// XXX remote event
|
// XXX remote event
|
||||||
nsContentEventHandler handler(mPresContext);
|
nsContentEventHandler handler(mPresContext);
|
||||||
handler.OnQueryCharacterAtPoint(
|
handler.OnQueryCharacterAtPoint(aEvent->AsQueryContentEvent());
|
||||||
static_cast<WidgetQueryContentEvent*>(aEvent));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_QUERY_DOM_WIDGET_HITTEST:
|
case NS_QUERY_DOM_WIDGET_HITTEST:
|
||||||
{
|
{
|
||||||
// XXX remote event
|
// XXX remote event
|
||||||
nsContentEventHandler handler(mPresContext);
|
nsContentEventHandler handler(mPresContext);
|
||||||
handler.OnQueryDOMWidgetHittest(
|
handler.OnQueryDOMWidgetHittest(aEvent->AsQueryContentEvent());
|
||||||
static_cast<WidgetQueryContentEvent*>(aEvent));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NS_SELECTION_SET:
|
case NS_SELECTION_SET:
|
||||||
|
@ -3703,8 +3700,7 @@ nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext,
|
||||||
bool
|
bool
|
||||||
nsEventStateManager::RemoteQueryContentEvent(WidgetEvent* aEvent)
|
nsEventStateManager::RemoteQueryContentEvent(WidgetEvent* aEvent)
|
||||||
{
|
{
|
||||||
WidgetQueryContentEvent *queryEvent =
|
WidgetQueryContentEvent* queryEvent = aEvent->AsQueryContentEvent();
|
||||||
static_cast<WidgetQueryContentEvent*>(aEvent);
|
|
||||||
if (!IsTargetCrossProcess(queryEvent)) {
|
if (!IsTargetCrossProcess(queryEvent)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче