Skip to content

Commit

Permalink
fix: fix text layout error.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Dec 2, 2024
1 parent 71dad02 commit b3db105
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webf/lib/src/rendering/text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class RenderTextBox extends RenderBox with RenderObjectWithChildMixin<RenderBox>
// Refs:
// https://github.com/WebKit/WebKit/blob/6a970b217d59f36e64606ed03f5238d572c23c48/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp#L295
RenderObject? previousSibling;
if (parent is RenderBoxModel) {
if (parent is RenderLayoutBox) {
previousSibling = (parentData as RenderLayoutParentData).previousSibling;
}

Expand All @@ -99,7 +99,7 @@ class RenderTextBox extends RenderBox with RenderObjectWithChildMixin<RenderBox>
}

RenderObject? nextSibling;
if (parent is RenderBoxModel) {
if (parent is RenderLayoutBox) {
nextSibling = (parentData as RenderLayoutParentData).nextSibling;
}

Expand Down

0 comments on commit b3db105

Please sign in to comment.