mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
moebius#121: DOM - Selection API - getSelection() should exist on XMLDocument / Selection.type
https://github.com/MoonchildProductions/moebius/pull/121
This commit is contained in:
parent
f0c237ae6d
commit
9db39c42c0
10 changed files with 43 additions and 32 deletions
|
|
@ -2149,26 +2149,10 @@ NS_IMETHODIMP
|
|||
nsHTMLDocument::GetSelection(nsISelection** aReturn)
|
||||
{
|
||||
ErrorResult rv;
|
||||
NS_IF_ADDREF(*aReturn = GetSelection(rv));
|
||||
NS_IF_ADDREF(*aReturn = nsDocument::GetSelection(rv));
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
|
||||
Selection*
|
||||
nsHTMLDocument::GetSelection(ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(GetScopeObject());
|
||||
if (!window) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NS_ASSERTION(window->IsInnerWindow(), "Should have inner window here!");
|
||||
if (!window->IsCurrentInnerWindow()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return nsGlobalWindow::Cast(window)->GetSelection(aRv);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::CaptureEvents()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue