Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions debug-symbols/0.24.26/android-debug-symbols.7z
Git LFS file not shown
3 changes: 3 additions & 0 deletions debug-symbols/0.24.26/ios-debug-symbols.7z
Git LFS file not shown
3 changes: 3 additions & 0 deletions debug-symbols/0.24.26/linux-debug-symbols.7z
Git LFS file not shown
3 changes: 3 additions & 0 deletions debug-symbols/0.24.26/macos-debug-symbols.7z
Git LFS file not shown
3 changes: 3 additions & 0 deletions debug-symbols/0.24.26/windows-debug-symbols.7z
Git LFS file not shown
13 changes: 13 additions & 0 deletions webf/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 0.24.26

### Bug Fixes

- **Accessibility/Semantics**: avoid Flutter semantics assertions when transparent
proxy wrappers are dirtied mid-frame by tracking runtime layout dirtiness and
skipping dirty proxy children during semantics traversal instead of relying on
debug-only layout checks.
- **Rendering/Widget/Inline**: restore detached portal widget width fallback so
portal-mounted widget subtrees use their active child constraints instead of
unrelated DOM ancestors, and allow block/flex atomic placeholders in widget-hosted
inline formatting contexts without tripping inline-item assertions.

## 0.24.25+2

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions webf/ios/webf.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Pod::Spec.new do |s|
'LLVM_LTO' => 'YES', # Enable Link Time Optimization for release builds
'GCC_OPTIMIZATION_LEVEL' => 's', # Enable optimization for size
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) ' +
'APP_REV=\\"218bfc723\\" ' +
'APP_VERSION=\\"0.24.25+2\\" ' +
'APP_REV=\\"70cfcf728\\" ' +
'APP_VERSION=\\"0.24.26\\" ' +
'CONFIG_VERSION=\\"2025-04-26\\" ' +
'WEBF_QUICK_JS_ENGINE=1 ' +
'FLUTTER_BACKEND=1 ' +
Expand Down
32 changes: 31 additions & 1 deletion webf/lib/src/dom/element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ abstract class Element extends ContainerNode
// Default to unknown, assign by [createElement], used by inspector.
String tagName = unknown;

// ---------------------------------------------------------------------------
// Display rebuild deferred-connect gate
//
// When a CSS display transition from none → visible fires while the parent
// element is temporarily disconnected (e.g., during tab switch or page
// refresh), the widget rebuild notification is silently dropped by the guard
// in _updateHostingWidgetWithDisplay(). This flag records the missed rebuild
// so that connectedCallback() can re-issue it once the element re-attaches.
bool _pendingDisplayRebuildOnConnect = false;

// ---------------------------------------------------------------------------
// Blink style-sync first-paint gate
//
Expand Down Expand Up @@ -1546,6 +1556,15 @@ abstract class Element extends ContainerNode
if (_connectedCompleter != null) {
_connectedCompleter!.complete();
}
// Replay any none → visible display rebuild that was dropped while the
// parent was disconnected (see _pendingDisplayRebuildOnConnect).
if (_pendingDisplayRebuildOnConnect) {
_pendingDisplayRebuildOnConnect = false;
if (renderStyle.display != CSSDisplay.none) {
final Element? targetElement = holderAttachedContainingBlockElement ?? parentElement;
targetElement?.renderStyle.requestWidgetToRebuild(UpdateDisplayReason());
}
}
super.connectedCallback();
_updateNameMap(getAttribute(_nameAttr));
_updateIDMap(_id);
Expand All @@ -1562,6 +1581,9 @@ abstract class Element extends ContainerNode
@override
void disconnectedCallback() {
super.disconnectedCallback();
// Cancel any pending display rebuild — the element is leaving the DOM again,
// so the deferred none→visible rebuild is no longer meaningful.
_pendingDisplayRebuildOnConnect = false;
_updateIDMap(null, oldID: _id);
_updateNameMap(null, oldName: getAttribute(_nameAttr));
// Remove from class index
Expand Down Expand Up @@ -1841,7 +1863,15 @@ abstract class Element extends ContainerNode
void _updateHostingWidgetWithDisplay(CSSDisplay oldDisplay) {
CSSDisplay presentDisplay = renderStyle.display;

if (parentElement == null || !parentElement!.isConnected) return;
if (parentElement == null || !parentElement!.isConnected) {
// If this is a none → visible transition and the parent is temporarily
// disconnected, defer the rebuild notification to connectedCallback().
// Without this, the widget stays stuck as SizedBox.shrink().
if (oldDisplay == CSSDisplay.none && presentDisplay != CSSDisplay.none) {
_pendingDisplayRebuildOnConnect = true;
}
return;
}
// Destroy renderer of element when display is changed to none.
if (presentDisplay == CSSDisplay.none) {
renderStyle.requestWidgetToRebuild(UpdateDisplayReason());
Expand Down
10 changes: 8 additions & 2 deletions webf/lib/src/rendering/box_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,18 @@ bool _hasReusableStableLayoutChain(RenderBox child) {
if (child.renderStyle.width.isAuto || child.renderStyle.height.isAuto) {
return false;
}
// hasPendingLayoutUpdate is set by markNeedsLayout() and cleared only
// after doLayout() runs. If it is still true the child was not laid out
// in a previous pass and must not be skipped — skipping would leave it
// rendering stale content (blank elements after DOM mutations).
return !child.needsRelayout &&
!child.hasPendingSubtreeIntrinsicMeasurementInvalidation;
!child.hasPendingSubtreeIntrinsicMeasurementInvalidation &&
!child.hasPendingLayoutUpdate;
}
if (child is RenderBoxModel) {
return !child.needsRelayout &&
!child.hasPendingSubtreeIntrinsicMeasurementInvalidation;
!child.hasPendingSubtreeIntrinsicMeasurementInvalidation &&
!child.hasPendingLayoutUpdate;
}
if (child is RenderProxyBox) {
final RenderBox? proxyChild = child.child;
Expand Down
4 changes: 3 additions & 1 deletion webf/lib/src/rendering/flex.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3918,6 +3918,7 @@ class RenderFlexLayout extends RenderLayoutBox {
) {
if (child.constraints != childConstraints ||
effectiveChild.needsRelayout ||
effectiveChild.hasPendingLayoutUpdate ||
(_childrenRequirePostMeasureLayout[child] == true) ||
_subtreeHasPendingIntrinsicMeasureInvalidation(child)) {
return false;
Expand Down Expand Up @@ -6058,7 +6059,7 @@ class RenderFlexLayout extends RenderLayoutBox {
Map<String, Object?>? relayoutDetails;

bool needsLayout = false;
if (effectiveChild.needsRelayout) {
if (effectiveChild.needsRelayout || effectiveChild.hasPendingLayoutUpdate) {
needsLayout = true;
relayoutReason =
_FlexAdjustFastPathRelayoutReason.effectiveChildNeedsRelayout;
Expand Down Expand Up @@ -6251,6 +6252,7 @@ class RenderFlexLayout extends RenderLayoutBox {

bool needsLayout = isFlexibleChild ||
effectiveChild.needsRelayout ||
effectiveChild.hasPendingLayoutUpdate ||
(_childrenRequirePostMeasureLayout[child] == true) ||
_subtreeHasPendingIntrinsicMeasureInvalidation(child);

Expand Down
2 changes: 1 addition & 1 deletion webf/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: webf
description: W3C standards-compliant web rendering engine based on Flutter, allowing web applications to run natively on Flutter.
version: 0.24.25+2
version: 0.24.26
homepage: https://openwebf.com
license: GPL-3.0-only
environment:
Expand Down
Loading