mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-07 07:47:30 +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
|
|
@ -12846,3 +12846,19 @@ nsDocument::CheckCustomElementName(const ElementCreationOptions& aOptions,
|
|||
|
||||
return is;
|
||||
}
|
||||
|
||||
Selection*
|
||||
nsIDocument::GetSelection(ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = GetInnerWindow();
|
||||
if (!window) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NS_ASSERTION(window->IsInnerWindow(), "Should have inner window here!");
|
||||
if (!window->IsCurrentInnerWindow()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return nsGlobalWindow::Cast(window)->GetSelection(aRv);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ class NodeIterator;
|
|||
enum class OrientationType : uint32_t;
|
||||
class ProcessingInstruction;
|
||||
class Promise;
|
||||
class Selection;
|
||||
class StyleSheetList;
|
||||
class SVGDocument;
|
||||
class SVGSVGElement;
|
||||
|
|
@ -898,6 +899,8 @@ public:
|
|||
*/
|
||||
Element* GetRootElement() const;
|
||||
|
||||
mozilla::dom::Selection* GetSelection(mozilla::ErrorResult& aRv);
|
||||
|
||||
/**
|
||||
* Retrieve information about the viewport as a data structure.
|
||||
* This will return information in the viewport META data section
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue