Skip to content

[Testing] Port HybridWebView title readiness repair to candidate - #40197

Merged
kubaflo merged 1 commit into
candidate/11.0.1xx-sr2from
kubaflo-candidate-hybridwebview-readiness
Nov 12, 2026
Merged

kubaflo merged 1 commit into
candidate/11.0.1xx-sr2from
kubaflo-candidate-hybridwebview-readiness

Conversation

@kubaflo

@kubaflo kubaflo commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Target Branch

This PR is for Initial base
New features, API changes, or .NET 12 work (including .NET 12 fixes) main
.NET 11 servicing fixes net11, for review
Older servicing, release integration, infrastructure, or documentation The branch designated for that work

For .NET 11 fixes, only a maintainer retargets the approved PR to the active
inflight lane and merges it after CI validates that final base. Do not merge
individual fixes directly into net11; agents must not retarget or merge.

Description of Change

This is the explicitly coordinated candidate test-infrastructure port of #40195, commit 6ea507c4f29cdf488df36df75855616109831467, to candidate/11.0.1xx-sr2. The existing main PR remains the forward/shared-infrastructure repair; this separate branch port does not retarget or replace it.

The HybridWebView gallery's image.html requests two remote Picsum images. Its DOM and expected title can already be ready while pending image requests keep document.readyState at interactive. Requiring complete makes the test host report a reload timeout despite having the expected document.

Observed evidence: candidate UI build 1677338, test run 46750668, result 100059, exposes a native WebView titled HybridWebView Image Page while StatusLabel reports a timeout waiting for that title. The original shared sample is byte-identical across main, net11, and candidate; this is not a claim that #40116 introduced the problem.

In ReloadAndWaitForDocumentTitleAsync, accept a parsed document (document.readyState !== 'loading') without waiting for unrelated image downloads. Keep the old-document reload-pending marker, exact expected-title comparison, polling bounds, existing test assertions, and all visual baselines unchanged. The only source changes are the readiness predicate and its explanatory comment in one test-host file. No production APIs, handlers, timeouts, retries, skips, pipeline tests, or snapshots change.

Validation

  • Verified that the candidate baseline and gallery document match the independently validated source, and that the entire modified C# file is byte-identical to [Testing] Make HybridWebView title readiness independent of remote images #40195 (blob 588b381228a1744bbbf98710987731e6494be2f8). The exact JavaScript expression matches the native-tested expression.
  • Reused the existing iPhone 17e CoreSimulator / iOS 26.5 native UIKit/WKWebView evidence from [Testing] Make HybridWebView title readiness independent of remote images #40195: three independent runs passed all seven causal/safety cases using the repository's real image.html, changing only remote image URLs to controlled local responses. Cases: original red, trigger-removed green, fixed green, reverted red, restored green, stale-document marker rejected, and wrong expected title rejected. All 21 recorded outcomes were checked for this byte-identical port; the native runtime probe was not rerun for this PR.
  • dotnet format Microsoft.Maui.sln --no-restore --include src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs --exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet - passed.
  • git diff --check - passed.
  • Type-checked the existing native probe with xcrun --sdk iphonesimulator swiftc -typecheck -parse-as-library -target arm64-apple-ios26.0-simulator and the installed simulator SDK - passed, with two existing UIKit deprecation warnings.
  • Full candidate MAUI HostApp/Appium execution was not run. Candidate packaging was already blocked by the pinned Apple SDK's Xcode 27.0 requirement versus installed Xcode 27.1/27.2; no SDK pins or Xcode validation were bypassed. Native Android, Windows, and MacCatalyst verification were not run. The reused native WebKit evidence is not an end-to-end Appium or cross-platform pass.

Issues Fixed

Relates to #40116 and #40195. Fixes the candidate test-host's independently reproduced remote-image dependency in title readiness; does not close the release tracking PR or claim all candidate failures are fixed.

Port the shared test-host readiness repair from main PR #40195, commit 6ea507c, to candidate/11.0.1xx-sr2 as coordinated release infrastructure work. Preserve the stale-document marker, exact title comparison, and polling bounds.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

This comment has been minimized.

@kubaflo
kubaflo merged commit 08fbadc into candidate/11.0.1xx-sr2 Nov 12, 2026
6 of 8 checks passed
@kubaflo
kubaflo deleted the kubaflo-candidate-hybridwebview-readiness branch November 12, 2026 21:00
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 12, 2026 21:01 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 12, 2026 21:03 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 12, 2026 21:05 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool November 12, 2026 21:06 — with GitHub Actions Inactive
kubaflo added a commit that referenced this pull request Nov 13, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 13, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 16, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 16, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 17, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 18, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 18, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 18, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 19, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 22, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 23, 2026
…40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: #40195/#40197
repair title readiness, #39795 repairs MIME handling, and #39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from #40116, following #40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…otnet#40237)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

This gallery/test correction is explicitly assigned to
`candidate/11.0.1xx-sr2`, based on
`7e47665ecb7f68d3fb31f8d02806e2bf177f505d`. It does not change framework
behavior or release routing.

### Description of Change

<!-- Enter description of the fix in this section -->

Resetting the HybridWebView gallery properties and reloading the
document did not reset its scroll position. Different `DefaultFile`
values share the same browser URL, allowing the offset left by
`navigation.html` to be restored in `index.html`. The native WebView
frame remains `[27,90][1054,746]`, but its heading moves from Y=244 to
Y=139 after navigation and Reset. This is document history dependence,
not native control geometry.

On Reset only, disable automatic history scroll restoration before
reloading, then scroll the newly ready DOM to `(0,0)` and positively
check both coordinates before publishing `Loaded`. Preserve exact-title
matching, the old-document reload marker, DOM readiness independent of
remote images, and the existing 50-attempt/100ms polling budget. Other
gallery actions retain their existing title-readiness path.

Strengthen the existing Shadow test by visiting `navigation.html`,
resetting, and asserting that the native heading bounds return to their
original position before the existing screenshot assertion. Refresh only
the two Android API30 Shadow/FlowDirection goldens to the verified
document origin. No product changes, offsets, delays,
tolerance/mask/crop/retry changes, skips, or new harness are included.

**Native causal evidence** — all Android runs use the same exclusively
assigned API30 emulator, 1080x1920 at 420dpi:

- Exact original CI1679745 APK, SHA256
`58ed1fc29acae710be628e47a957930faff6127f0d9a9230a5c954e59fc00639`:
unchanged complete fixture has **9 passed / 2 failed**, with both
original visuals differing by **7.90%**. The strengthened isolated
Shadow test independently fails on heading bounds **Y244 -> Y139**,
before screenshot comparison.
- Trigger removed: the unchanged HybridWebView fixture with only its two
navigation predecessors excluded passes **9/9**, including both visuals
against the origin goldens. The original runner was copied for this
control; no test exclusion was committed.
- Fix applied: the complete fixture passes **11/11**, and both visual
tests pass individually. Heading bounds are `[103,244][979,349]` before
navigation and after Reset.
- Gallery source reverted byte-for-byte to the candidate source and
rebuilt with the same local toolchain: complete fixture returns to **9
passed / 2 failed**; isolated strengthened Shadow again fails **Y244 ->
Y139**. The corresponding trigger-removed control passes **9/9**.
- Fix restored and pushed as `ca6f36f39093dcc72c723c0cb01bfe7ce69f5952`:
rebuilt after push, then **three complete fixture runs pass 11/11
each**. **Two additional isolated runs of each visual test pass**. No
first-attempt failure was converted into a pass by rerunning it.

**Commands and results:**

- `dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src
--exclude-diagnostics CA1822 --include
src/Controls/tests/TestCases.HostApp/FeatureMatrix/HybridWebView/HybridWebViewControlPage.xaml.cs
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs
--verbosity quiet` — passed.
- `pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform android
-DeviceUdid emulator-5582 -TestFilter
'FullyQualifiedName~HybridWebViewFeatureTests'` — restored fix and
post-push rebuild passed **11/11**; the source-reverted control failed
**2/11** as expected.
- The isolated and repeat executions use the freshly built test assembly
through `dotnet vstest`, with the same assigned emulator and independent
TRX/log directories; existing screenshot strictness is unchanged.

**Limits:** local source builds use the available .NET SDK **11.0.100**,
runtime **11.0.0**, and GA Android workload, not the candidate-pinned
**11.0.101-servicing.26559.106** toolchain. The emulator has WebView
**91.0.4472.114**, not CI's WebView83. This is native causal validation,
not pinned-CI or cross-platform certification. iOS, Windows, MacCatalyst
and Android API36 were not run; their goldens are unchanged. Only
automatic CI is requested by publishing this PR; no extra CI waves were
queued.

Upstream ownership was refreshed before publication: dotnet#40195/dotnet#40197
repair title readiness, dotnet#39795 repairs MIME handling, and dotnet#39918 owns
broader test infrastructure. None implements this gallery reset
correction.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Addresses the remaining Android HybridWebView Shadow and FlowDirection
failures investigated from dotnet#40116, following dotnet#40197. No product issue is
closed by this gallery-only correction.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 09942b5e Deployed Nov 12, 2026 by kubaflo via conclusion #2920
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant