mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Issue #2340 - Return an array (actually frozen sequence) for {border|content}BoxSize
Resolves #2340
This commit is contained in:
parent
348f761a9b
commit
9cd7fd3bf4
3 changed files with 33 additions and 9 deletions
|
|
@ -303,6 +303,30 @@ ResizeObserverEntry::Constructor(const GlobalObject& aGlobal,
|
|||
return observerEntry.forget();
|
||||
}
|
||||
|
||||
void ResizeObserverEntry::GetBorderBoxSize(
|
||||
nsTArray<RefPtr<ResizeObserverSize>>& aRetVal) const {
|
||||
// In the resize-observer-1 spec, there will only be a single
|
||||
// ResizeObserverSize returned in the FrozenArray.
|
||||
//
|
||||
// Note: the usage of FrozenArray is to support elements that have multiple
|
||||
// fragments, which occur in multi-column scenarios. See:
|
||||
// https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface
|
||||
aRetVal.Clear();
|
||||
aRetVal.AppendElement(mBorderBoxSize);
|
||||
}
|
||||
|
||||
void ResizeObserverEntry::GetContentBoxSize(
|
||||
nsTArray<RefPtr<ResizeObserverSize>>& aRetVal) const {
|
||||
// In the resize-observer-1 spec, there will only be a single
|
||||
// ResizeObserverSize returned in the FrozenArray.
|
||||
//
|
||||
// Note: the usage of FrozenArray is to support elements that have multiple
|
||||
// fragments, which occur in multi-column scenarios.
|
||||
// https://drafts.csswg.org/resize-observer/#resize-observer-entry-interface
|
||||
aRetVal.Clear();
|
||||
aRetVal.AppendElement(mContentBoxSize);
|
||||
}
|
||||
|
||||
void
|
||||
ResizeObserverEntry::SetBorderBoxSize(const nsSize& aSize) {
|
||||
nsIFrame* frame = mTarget->GetPrimaryFrame();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue