* add failing test for detached focus
* Clear focus if restore element is not in focus scope
* check for focus eligibility when restoring focus
* add failing test for second focus scope stealing focus
* if focus scope is not the current focus scope, don't attempt to set focus
* Harden cmap/name/post parsing against malformed fonts
Fonts are untrusted input, but several pre-existing table parsers throw out
of the GlyphTypeface constructor on hostile data, denying the whole font
instead of degrading the affected (cosmetic) table.
- name: wrap NameTable.Load in try/catch so a malformed table falls back to a
default family name (same outcome as an absent name), and bounds-check
NameRecord.GetValue's (offset,length) slice — the record array is validated
at load but each record's storage slice is read later during construction.
- post: wrap PostTable.Load so a malformed cosmetic-hint table degrades to
defaults rather than denying the font.
- cmap format 12/13: clamp the declared length and group count to the buffer,
computing the group span in long to avoid the nGroups*12 int overflow a
hostile count would wrap to a negative slice length.
- cmap format 4 selection: score a Windows Symbol subtable worse than any
Unicode subtable so ASCII resolves regardless of subtable order, while a
Symbol-only font still selects its only subtable.
maxp/cmap remain fatal by design. Behavioural hardening only; public API
unchanged. Backportable independently of the glyph-outline stack.
* Clamp cmap range contents and harden binary reader primitives
Format 12/13 group contents are attacker-controlled: TryGetRange used to
hand the raw uint32 end straight to per-codepoint consumers, so a group
with endCharCode 0x7FFFFFFF turned range enumeration into an unbounded
(for int.MaxValue, non-terminating) loop. Clamp ranges to the Unicode
range and map inverted/out-of-range groups to empty ranges so later
groups still enumerate.
Give the format 4 constructor the same treatment its format 12 sibling
already received: clamp the declared length and segment count to what
the buffer actually holds instead of slicing unchecked (debug asserts
replaced by the clamps).
In BigEndianBinaryReader, bounds-check array reads before allocating
(a hostile length is rejected instead of attempting the allocation),
make EnsureAvailable overflow-proof, and clamp ReadBytes against
negative counts.
* Add font parsing infrastructure for glyph outline/color drawing
Introduces shared utility types that subsequent PRs will use to
implement GetGlyphOutline (glyf table) and GetGlyphDrawing
(COLR v0/v1) on GlyphTypeface:
- ObjectPool<T>: thread-safe object pool used by Decyclers
- Decycler<T> / CycleGuard<T> / DecyclerException: generic
cycle-detection and depth-limiting utility for recursive
font-table traversal (composite glyphs, paint graphs)
- FontVariationSettings: parameter type for the upcoming
GetGlyphOutline / GetGlyphDrawing overloads
- IGlyphDrawing / GlyphDrawingType: return-type contract for color
glyph drawings (outline, color layers, SVG, bitmap)
- CharacterToGlyphMapDictionary: lightweight, allocation-free
IReadOnlyDictionary<int, ushort> view over the cmap, plus
CharacterToGlyphMap.AsReadOnlyDictionary() to expose it
No behavior change; types are not yet consumed in this PR.
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Validate ObjectPool maxSize and add unit tests
The ObjectPool<T> constructor previously accepted any maxSize value.
A value of 0 or below silently caused every Return to be discarded,
which is hard to diagnose at the call site.
- Reject maxSize < 1 with ArgumentOutOfRangeException at construction.
- Document the new precondition in the XML comment.
- Add ObjectPoolTests covering: factory null guard, maxSize bounds,
Rent/Return basics, Return ignoring null, max-size enforcement,
validator invocation and rejection, validator-as-reset, plus
concurrent stress tests for cap enforcement and parallel use.
* Validate Decycler maxDepth and add unit tests
The Decycler<T> constructor previously accepted any maxDepth value.
A value of 0 or below made the very first Enter throw
DepthLimitExceeded, which presents as a cycle/depth error at use time
instead of pointing at the construction site.
- Reject maxDepth < 1 with ArgumentOutOfRangeException at construction.
- Document the new precondition in the XML comment.
- Add DecyclerTests covering: maxDepth bounds, Enter/Exit lifecycle,
nested depth, cycle detection, depth-limit-exceeded, depth-vs-cycle
ordering, no state mutation on failed Enter, Reset semantics,
guard idempotency, MaxDepth/CurrentDepth properties, and a struct
type other than int.
* Add tests for CharacterToGlyphMap.AsReadOnlyDictionary
Covers the IReadOnlyDictionary<int, ushort> view returned by
AsReadOnlyDictionary, using the existing Inter font asset:
- ContainsKey agrees with the underlying map for both mapped and
unmapped code points.
- Indexer returns the same glyph id as map.GetGlyph for several
representative ASCII characters.
- Indexer throws KeyNotFoundException for an unmapped code point.
- TryGetValue: positive and negative paths.
- Count is positive and matches the enumerated pair count.
- Enumeration yields (key, value) pairs that round-trip through the
underlying CharacterToGlyphMap.
- Keys enumeration and pair-key enumeration agree.
- Two AsReadOnlyDictionary() calls produce functionally equivalent
views (no identity assumption).
Tests live alongside the existing CharacterToGlyphMap tests in
GlyphTypefaceTests so they can reuse the CustomPlatformTypeface
helper.
* Redesign FontVariationSettings; add GlyphDrawingOptions
FontVariationSettings is changed from a public record to a sealed class
with internal factory methods (FromCoordinates / FromInstance), a
FrozenDictionary backing for NormalizedCoordinates, and structural
Equals/GetHashCode. The type now exclusively models variable-font axis
configuration; palette and bitmap-strike concerns are moved out.
GlyphDrawingOptions is a new public sealed record that carries the
drawing options that are independent of axis configuration: an optional
CPAL palette index (≥ 0) and an optional bitmap-strike pixel size (≥ 1).
Both properties validate at init time and the type participates in
record-equality and with-expressions.
Tests are added for both types (48 new assertions).
* Make FontVariationSettings factories public
FromCoordinates and FromInstance are promoted from internal to public.
They were kept internal while the consuming public API was being designed;
that design is now settled (GlyphTypeface.CreateVariationSettings /
VariationAxes / VariationInstances, planned for PR2).
Class-level remarks are updated to describe the typeface-agnostic design
rationale and point to GlyphTypeface.CreateVariationSettings as the
preferred entry point for user-space axis values.
* Tighten contracts and docs on font-parsing infra
Polish pass on the shared infrastructure types so the contract surface is
unambiguous before PR2 (GetGlyphOutline) and PR3 (GetGlyphDrawing) build
on it:
- IGlyphDrawing now exposes GlyphDrawingType Type so callers can branch
on format without downcasting. The GlyphDrawingType enum was already
defined but unreferenced by the interface; this closes the loop.
PR3's ColorGlyphDrawing and ColorGlyphV1Drawing already implement the
property, so the rebase is a no-op.
- IGlyphDrawing.Bounds and Draw(origin) get explicit coordinate-space
docs (drawing-space, Y-down; origin is the post-flipped glyph anchor).
- Decycler<T> gets a class-level remarks block stating it is not
thread-safe (one instance per traversal) and that Enter throws on
cycle / depth-limit so callers can catch at the outermost site.
- FontVariationSettings.Default documents that null and Default are
interchangeable for parameters typed as FontVariationSettings?.
- ObjectPool.Return documents that callers must not return the same
item twice without an intervening Rent — the pool does not detect
duplicate returns by design.
Tests:
- ObjectPool: validator must not be invoked on Rent (pins the
validate-on-return contract).
- GlyphDrawingOptions: parameterless ctor equals Default (record
equality should make them interchangeable).
- FontVariationSettings: FromCoordinates with both coordinates AND
instanceIndex populated (combined form documented in the API).
83 tests pass (was 76).
* Reshape FontVariationSettings for cache-key use
Switch from a class wrapping FrozenDictionary + nullable instance index
to a readonly struct backed by a sorted ImmutableArray of a dedicated
FontVariationCoordinate record-struct. Driven by the type's role as a
field on FontCollectionKey:
- Hash code is computed once at construction and cached. Lookups in the
font-resolution cache no longer pay an OrderBy allocation per call.
- Equality is a parallel walk over two sorted arrays — no hash lookup,
no TryGetValue per element. Short-circuits on cached-hash mismatch.
- TryGetCoordinate / GetCoordinateOrDefault are linear scans, faster
than hash lookup for the typical handful-of-axes case.
- default(FontVariationSettings) is the "no variation" value. The old
Default singleton goes away; nullable-handling at the cache layer
becomes unnecessary.
- InstanceIndex is dropped from the type. Named-instance selection is
a typeface-level concern that resolves to coordinates; the runtime
settings carry coordinates only, matching CSS / HarfBuzz / DirectWrite
conventions.
Tests rewritten: 34 cases covering struct semantics, sorting,
TryGetCoordinate, hash caching, equality short-circuits, and the
FontVariationCoordinate record's own equality.
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Fix auto suggestion
* Add synthetic-font test harness
SyntheticFont / BigEndianBuffer build and mutate in-memory sfnt fonts so the
table parsers can be exercised against hand-crafted malformed input without a
platform shaper. Shared by every parser PR's malformed-font tests.
* Characterize cmap/name/post degradation on malformed input
Regression guards over the synthetic-font harness: a truncated post/name table
degrades to defaults / a fallback family name instead of denying the font, the
cmap format-12 nGroups*12 overflow is clamped, and Format-4 selection prefers a
Unicode subtable over Windows Symbol regardless of directory order.
* Fix dictionary wrapper contract, guard double-exit, and zero-coordinate canonicalization
CharacterToGlyphMapDictionary mixed two membership predicates: Keys and
Count filtered by ContainsGlyph while the indexer, TryGetValue and the
enumerator used TryGetGlyph, so glyph-0 mappings produced keys the
indexer rejected. Everything now answers through TryGetGlyph, and the
Count walk (O(codepoints) over the mapped ranges) is computed once and
cached.
Decycler.Exit decremented the depth unconditionally: CycleGuard is a
copyable ref struct, so a copied guard could exit the same id twice and
grant later traversals extra depth budget. Depth is now only returned
when the id was actually removed from the visited set.
FontVariationSettings.FromCoordinates kept zero-valued coordinates, so
an explicitly-default axis (wght=0 normalized) hashed and compared as a
distinct value from settings omitting the axis - producing duplicate
variation clones and font-collection cache entries downstream. Both
factories now canonicalize zeros away (after the duplicate-axis check,
which the dictionary overload previously skipped entirely).
* Document the cmap dictionary view and tighten Decycler/ObjectPool internals
Add XML docs to CharacterToGlyphMapDictionary's members. Collapse
Decycler.Enter's Contains-then-Add into a single HashSet.Add (a false
return means the id was already visited - a cycle). Make ObjectPool's
lock-free count fast-check a volatile read.
* Simplify FontVariationSettings.Equals to a span SequenceEqual
Map the coordinate comparison onto the inner array via the span overload
(Coordinates normalizes default to Empty, so both spans are valid). The
span SequenceEqual avoids the boxing the LINQ overload would incur on
this dictionary-key type, and FontVariationCoordinate's record-struct
value equality drives the element compare. The cached-hash early-out is
kept.
* Add pre-allocation validation in NameTable.Load so malformed name tables are rejected before creating the names array.
* Make PostTable.Load to catch only the malformed-data exception raised by this parsing path, instead of catching everything.
* Raise ArgumentOutOfRangeException for negative count
* Validate tableLength for CmapFormat12Or13Table ctor
* Fixes GlyphDrawingOptions ArgumentOutOfRangeException nameof usage
* Fix CmapFormat4Table ctor: clamp parallel-array offsets to tableLength
When a malformed subtable declares a length that drives _segCount to 0,
startCodeOffset = endCodeOffset + 0*2 + 2 (reservedPad) can exceed
tableLength, causing Slice() to throw and denying the font entirely.
Apply Math.Min(offset, tableLength) to each derived array offset so that
zero-length slices always start at a valid position, degrading silently
to an empty mapping instead of crashing.
* Revert change
* Only handle specific exceptions in NameTable.Load
Guard against negative count in BigEndianBuffer.Zeros
* Speak user space in the public variation API
Normalized coordinates are font-relative - the same value means different
user positions under different fvar ranges and avar maps - so they cannot
be authored in a style before font resolution and do not interpolate
meaningfully. Every mainstream API (CSS font-variation-settings,
DirectWrite, HarfBuzz, Skia) traffics in user-space values, and a public
normalized type named like theirs invites passing wght=700 into a [-1,1]
slot.
- new public currency: FontVariation (tag=value in designer units) and an
immutable FontVariationSettings with Parse/ToString ("wght=700,wdth=85"),
order-independent structural equality, a cached hash, and CSS last-wins
duplicate handling - usable as a style value and a cache key
- the normalized pair moves out of public view: FontVariationCoordinate
becomes internal NormalizedVariationCoordinate and the normalized
settings struct becomes internal NormalizedVariationPosition, unchanged
in behavior
- the user-space -> normalized conversion stays a per-font, application-
time concern; the fvar/avar reader lands in a follow-up PR
* Accept infinite font variation values
Infinities clamp to the axis range at apply time like any out-of-range
value, so only NaN is rejected now. Parse also uses explicit number
styles instead of NumberStyles.Float since the value text is pre-trimmed
and the whitespace flags were redundant.
* Guard NameRecord.GetValue against decoder exceptions
The selected encodings use replacement fallback and never throw on
malformed bytes, but degrade to an empty value anyway so an
exception-throwing fallback can never deny the font.
* Use nameof(value) in GlyphDrawingOptions setter exceptions
Matches the .NET runtime convention for property setters, also used
elsewhere in this repo (e.g. FormattedText).
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Implement TopLevel.OpenedPopups
* Delete Headless `GetOpenPopups`
* Reorganize popup tests between Headless/Primitives layers
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Add Popup.OpenedPopups to keep opened popups in tree structure
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Help NUnit suppressing CS8777
* Update suppresions
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* Fix pointer capture cancellation on Win32
A cancelled pen or mouse interaction was reported as an ordinary leave,
and nothing released the capture that came with it, so the captured
element never saw PointerCaptureLost.
Win32 constants: POINTER_FLAG_CONFIDENCE and POINTER_FLAG_CANCELED were
declared an order of magnitude too small - the SDK defines them as
0x4000 and 0x8000 - so the cancellation check in GetEventType could
never match. Ctrl+Alt+Del or Win+L mid stroke therefore arrived as a
normal button up, and the app committed an interaction the user had
aborted.
Win32 handling: WM_POINTERCAPTURECHANGED and POINTER_FLAG_CANCELED now
map to CancelCapture for non touch pointers, matching what the legacy
WM_CAPTURECHANGED path has always done.
PenDevice: handle CancelCapture by releasing the capture while keeping
the pointer alive, since the pen is still in range and a leave arrives
separately.
Pointer hardening: CaptureLost ends every capture the pointer holds, on
the element and on a gesture recognizer, and the devices release through
it instead of repeating the steps. Capturing to a recognizer clears
Captured, so the null check in the platform path used to skip the whole
release while a scroll, pull or swipe gesture owned the pointer, and a
touch up never cleared the recognizer at all. Dispose releases as well
rather than leaving that to every caller, a disposed pointer ignores
further capture calls and asserts when a capturer is passed, and devices
drop a pointer from their map before disposing it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Keep the explicit capture source in MouseTestHelper
The helper captures through Pointer.Capture(target), which is an
explicit capture, and used to release with Capture(null) - explicit as
well. Releasing as implicit changed the source that capture changing
handlers observe.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Correctly set ActualThemeVariant
* Don't call OnColorValuesChanged unnecessarily on Win32
* Don't call OnColorValuesChanged unnecessarily on macOS
* Change iOS PlatformSettings to match other platforms
* Don't call OnColorValuesChanged unnecessarily on Android
* Android: set theme using SetLocalNightMode
* Don't call OnColorValuesChanged unnecessarily on X11/Wayland
* Don't call OnColorValuesChanged unnecessarily on Browser
* Fix timer Start order
* Remove dead code in DBusPlatformSettings
* Implement visual geometry hit testing
* fix xml comment
* fix xml comment
* update api diff
* Introduced ICompositionHitTester to avoid duplicated hit test code between point and geometry
* Add geometry hit testing page to RenderDemo
* fix geometry hit testing not including stroke
* fix test
* update api and tests
* update api diff
* Update GeometryHitTestingPage with new API
* addressed reviews.
* remove nullability in GeometryHitTestResult Visual hit
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Add failing test for cursor when pointer changes
* Introduce PresentationSource.CursorElement
* Update cursor on capture change
* Set correct cursor when capture is released
* Recompute pointer-over element immediately when capture changes
* Prototype an AABB tree for hit testing
* Some optimizations
* Revert runtime knobs and add tests
* Avoid rebuilding the whole tree
* Revert an invalid optimization
* Add a hit test page
* Clean up
* Format code
* Nit
* Use weak CompositionVisual reference in server-side
* Bucket composition hit-test AABB tree by child order
* Use readback revisions for AABB hit-test updates
Return null when an IPresentationSource can't convert from/to screen coordinates
Document exceptions in VisualExtensions PointToClient and PointToScreen
Add tests for cross-root pointer event positions
* wip touch improvement textbox
* update text selection handle style
* change text selector layer z-index
* fix build issues
* fix caret detection in touch mode
* added bottom padding to text handle
* add indicator visual to selection handler theme
* improve text selector indicator handling
* add support for wrap around in selection handles
* ensure textbox context menu is shown on hold
* dampen scroll inertia
* increase default tap and double tap sizes for touch and pen
* make textbox context menu horizontal in touch mode. improve context menu show behavior for selection handles
* detect overscroll in scroll presenter and handle scroll gesture if overscrolled
* add rtl detection for selection handles
* improve context flyout behavior in handles
* restore textbox page
* addressed review
* add touch tests textbox
* keep dragged handle visible, adjust flyout position to visible handle
* Don't tick with render loop when app is idle
* Update src/Avalonia.Base/Rendering/Composition/Transport/BatchStreamArrayPool.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* wip
* wip
* api diff
* fixes
* Address review: clear wakeupPending at tick start, guard CarbonEmissionsHack subscriptions
- Clear _wakeupPending at start of TimerTick so wakeups already processed
by the current tick don't force an unnecessary extra tick
- Guard CarbonEmissionsHack against duplicate subscriptions using a private
attached property
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix lock-order inversion in Add/Remove vs TimerTick
Move Wakeup() and Stop() calls outside the _items lock in Add/Remove
to prevent deadlock with TimerTick which acquires _timerLock then _items.
Add/Remove are UI-thread-only so the extracted logic remains safe.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review: remove unused usings, guard double Stop(), fix SleepLoop extra frame
- Remove unused using directives from IRenderLoopTask.cs
- Guard TimerTick Stop() with _running check to prevent double Stop()
when Remove() already stopped the timer
- SleepLoopRenderTimer: use WaitOne(timeout) instead of Thread.Sleep
so Stop() can interrupt the sleep, and recheck _stopped before Tick
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix DisplayLinkTimer foreground handler bypassing render loop state
Only resume the display link on WillEnterForeground if the timer was
calling Start() to avoid setting _stopped=false when the render loop
had the timer stopped.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix DisplayLinkTimer thread safety, revert global NU5104 suppression
- Stop() now only sets _stopped flag; OnLinkTick() self-pauses the
CADisplayLink from the timer thread to avoid thread-affinity issues
- Revert NU5104 global suppression in SharedVersion.props
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Cap _ticksSinceLastCommit to prevent int overflow
Stop incrementing once it reaches CommitGraceTicks to prevent
wrapping negative and keeping the render loop awake indefinitely.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: remove Start/Stop from IRenderTimer, merge into Tick setter
Timer start/stop is now controlled entirely by setting the Tick
property: non-null starts, null stops. This eliminates the explicit
Start()/Stop() methods from IRenderTimer, making the API simpler.
DefaultRenderLoop controls the timer purely through Tick assignment
under its _timerLock. A new _hasItems flag tracks subscriber presence
since Tick is now transient (null when idle).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address review comments on timer thread safety and guards
- ChoreographerTimer: add _frameCallbackActive guard to prevent double
PostFrameCallback from both Tick setter and SubscribeView
- ServerCompositor: cap _ticksSinceLastCommit at int.MaxValue
- SleepLoopRenderTimer: make _tick volatile, remove _stopped recheck
(guard moved to DefaultRenderLoop)
- DefaultRenderLoop: add _running check at tick start to drop late ticks
- ThreadProxyRenderTimer: add lock for internal state manipulation
- DisplayLinkTimer: add lock for all internal state manipulation
- Re-add NU5104 suppression to SharedVersion.props
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: make _hasItems volatile for cross-thread visibility
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: guard against redundant starts in DefaultRenderTimer, make _tick volatile across all timers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove CarbonEmissionsHack, revert iOS/Android timers to always-ticking
- Delete CarbonEmissionsHack class and its XAML reference
- Revert DisplayLinkTimer (iOS) to original always-ticking implementation
- Revert ChoreographerTimer (Android) to original always-ticking implementation
- Add TODO comments for future start/stop on RenderLoop request
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix DirectCompositionConnection WaitOne not respecting process exit cancellation
Use WaitHandle.WaitAny with both _wakeEvent and cts.Token.WaitHandle so
the loop can exit when ProcessExit fires while the timer is stopped.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* timers
* XML docs
* Cache delegate
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Make some overlay-related types/members internal
* Make sure that TopLevel is no longer the actual root of the visual tree. This is needed for our future changes.
* API diff
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixed incorrect test
* Make automation to target FocusRoot
* api diff
* Hide WindowBase/EmbeddableControlRoot's parents from automation
* api diff
* Separate automation root and visual root for automation purposes
* Hide ChromeOverlayLayer from public API
* Synchronize WindowBase visibility to VisualRoot
* Hide WindowBase.ArrangeSetBounds
* api diff
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Onboard onto Central Package Management
* Remove SharpDX
* Add back <clear /> to NuGet.config package source mapping
* Package mapping
* Inline props where appropriate
* Lost a space
* Extracted IInputRoot out of TopLevel
* Move some input handling out of TopLevel
* Remove old class, make layout manager private
* Removed IRenderRoot
* Make VisualTreeAttachmentEventArgs a bit more sensible
* Move ILayoutRoot to PresentationSource
# Conflicts:
# tests/Avalonia.Controls.UnitTests/TabControlTests.cs
* Updated some VisualRoot / GetVisualRoot usages
* Updated more XxxRoot usages
* More Root usages
* Addressed review
* Hurr-durr xml
* More fixes
* Maybe fix android compilation
* API diff
* Yet another cast
* I had to use MSIL analysis to detect those casts
* Fixed automation
* Fix PointerOverPreProcessor
* Fix?
* Removed yet another cast to Visual
* The amount of random downcasts is astonishing
* Maybe fix mac
* Addressed review
* Introduce a universal IGlyphTypeface implementation that does not rely on any platform implementation
* Revert changes
* Fix Android
* Make the test happy
* Fix build
* Update baseline
* Fix naming
* Fix headless
* Move interfaces to dedicated files
Make GlyphTypeface.GlyphCount an integer
* Fix GlyphCount
* Make IGlyphTypeface NotClientImplementable
* Make sure we cache platform typefaces by their desired name, style, weight and stretch
* Update baseline
* Only use IGlyphTypeface
* Fix Android
* Try to clear the buffer before we encode somethimg
* Add needed test font
* Add more unit tests
* Reduce allocations
* Remove Direct2D1 test files
* More tests
* More complete table implementations
* More adjustments
* Use batch APIs
* Handle invalid timestamps
* Update baseline
* Introduce a CharacterToGlyphMap struct for faster access
* Remove AggressiveInlining
* Remove AggressiveInlining
* Make the head table optional for legacy fonts
* Remove Load method. Fix TextBlockTests
* Fix nullables
* Remove redundant folder
* Update Api baseline
* revert diff helper changes
* revert changes
* Use bare minimum font for Headless platform and introduce a test font manager that uses the Inter font for testing.
* Add missing font file for Headless platform
---------
Co-authored-by: Gillibald <stebner@avaloniaui.net>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Update to xunit.v3
* Little more progress
* More fixes
* Keep VSTest supported
* Adjust Nuke
* Few fixes
* Fix for xunit 2
* Fix GetData override
* Adjust
* Use MTP for xunit 2
* Fix test
* Better fix
* --no-progress
* Few more fixes
* no progress
* Fix test
* Better fix
* TRX
* Move to Directory.Build.props
* Unify on MTP v2
* Update
* Update to stable
* 1.0.1
* 1.0.2
* Fix some warnings
* Fix more warnings
* Fix more warnings
* Enable nullability in UnitTests
* Enable nullability in Base.UnitTests
* Enable nullability in Markup.UnitTests
* Enable nullability in Markup.Xaml.UnitTests
* Unify selection event handling for all SelectingItemsControl types plus TreeView
- Controls can decide whether to select on press/release, or introduce their own logic
- Container types handle events and can decide whether to forward them on to their owner
- Corrected various cases where controls checked whether a button was held when the event occurred, rather than whether it triggered the event
- Replaced various hardcoded modifier key checks with uses of PlatformHotkeyConfiguration
- ListBox no longer cares if you swipe before releasing touch (unless that triggers a gesture)
- TreeViewItem is now selected on touch/pen release
* API change requests
* Review comments
* Improve FontCollection user story
* Make adjustments after review
* Refactor IsFontFile
* Make FontFamilyLoader internal
Make tests happy again
* Update baseline
* Adjust modifier
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Remove netstandard2.0 from almost all projects
* Fix duplicated target frameworks in unit tests
* Fix DesignerSupport tests
* Fix Designer.HostApp packaging
* Build ControlCatalog.Desktop on CI
* Fix another bad auto merge
* Fix LeakTests duplicated target frameworks
* Don't hardcode target framework in DesignerSupportTests
* update mouse test to better simulate clicks on captured controls
* add tap failing test
* use captured element if available as source for tap gestures
* Only start ScrollGesture when left click pressed, also `GetCurrentPoint(null)` behaves the same as root visual
* Allow right-click pen to select items on press
* Add context menus to even items on ListBox page for testing
* Avoid global static in UpdateSelectionFromPointerEvent
* Revert "Avoid global static in UpdateSelectionFromPointerEvent"
This reverts commit 2562d73e83.
* Add comment to UpdateSelectionFromPointerEvent
* Use fully mocked rendering for list box test
* Add pen selection tests
* TouchTestHelper should use correct inputs
* Change namespace to prevent conflicts.
The `DataGrid` in the namespace name was hiding the `DataGrid` type.
* Initial impl of bindable DataGridRow.IsSelected.
* Make DataGridRow.IsSelected two-way bindable.
* Draft new API
* Push reusable ScreensBaseImpl implementation
* Fix tests and stubs
* Update ScreensPage sample to work on mobile + show new APIs
* Reimplement Windows ScreensImpl, reuse existing screens in other places of backend, use Microsoft.Windows.CsWin32 for interop
* Make X11 project buildable, don't utilize new APIs yet
* Reimplement macOS Screens API, differenciate screens by CGDirectDisplayID
* Fix build
* Adjust breaking changes file (none affect users)
* Fix missing macOS Screen.DisplayName
* Add more tests + fix screen removal
* Add screens integration tests
* Use hash set with comparer when removing screens
* Make screenimpl safer on macOS as per review
* Replace UnmanagedCallersOnly usage with source generated EnumDisplayMonitors
* Remove unused dllimport
* Only implement GetHashCode and Equals on PlatformScreen subclass, without changing base Screen
* use tap size as default size for scrolling start. reset IsGestureRecognitionSkipped when pointer is released
* use static default constant for scroll distance
* fix typo