зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1076657 pt 2 - Add writing-mode to the reply to NS_QUERY_TEXT_RECT event. r=masayuki
This commit is contained in:
Родитель
64eb204042
Коммит
5fed88b87a
|
@ -1002,6 +1002,7 @@ ContentEventHandler::OnQueryTextRect(WidgetQueryContentEvent* aEvent)
|
|||
}
|
||||
aEvent->mReply.mRect = LayoutDevicePixel::FromUntyped(
|
||||
rect.ToOutsidePixels(mPresContext->AppUnitsPerDevPixel()));
|
||||
aEvent->mReply.mWritingMode = lastFrame->GetWritingMode();
|
||||
aEvent->mSucceeded = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1927,6 +1927,7 @@ TabParent::HandleQueryContentEvent(WidgetQueryContentEvent& aEvent)
|
|||
aEvent.mReply.mOffset = aEvent.mInput.mOffset;
|
||||
aEvent.mReply.mRect =
|
||||
aEvent.mReply.mRect - LayoutDevicePixel::FromUntyped(GetChildProcessOffset());
|
||||
aEvent.mReply.mWritingMode = mWritingMode;
|
||||
aEvent.mSucceeded = true;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -472,8 +472,9 @@ public:
|
|||
|
||||
mozilla::WritingMode GetWritingMode(void) const
|
||||
{
|
||||
NS_ASSERTION(message == NS_QUERY_SELECTED_TEXT,
|
||||
"not querying selection");
|
||||
NS_ASSERTION(message == NS_QUERY_SELECTED_TEXT ||
|
||||
message == NS_QUERY_TEXT_RECT,
|
||||
"not querying selection or text rect");
|
||||
return mReply.mWritingMode;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче