Skip to content

Commit 638f071

Browse files
committed
REGRESSION(294019@main): input field does not show user input while user is actively typing
https://bugs.webkit.org/show_bug.cgi?id=304001 <rdar://163613957> Reviewed by Antti Koivisto. Let's loosen up isContentConsideredStale a bit so that we still paint inline content even when an out-of-flow box is dirty. Normally we would bail out on needsLayout (see FIXME), but it is reasonable to exclude non-inflow (and by definition non-inline) content here. Test: fast/inline/missing-content-on-autofill-with-out-of-flow-input-descendant.html * LayoutTests/TestExpectations: * LayoutTests/fast/inline/missing-content-on-autofill-with-out-of-flow-input-descendant-expected.html: Added. * LayoutTests/fast/inline/missing-content-on-autofill-with-out-of-flow-input-descendant.html: Added. * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::isContentConsideredStale const): Canonical link: https://commits.webkit.org/304311@main
1 parent eaf67dd commit 638f071

File tree

4 files changed

+56
-1
lines changed

4 files changed

+56
-1
lines changed

LayoutTests/TestExpectations

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8155,6 +8155,8 @@ imported/w3c/web-platform-tests/css/css-viewport/zoom/border-spacing.html [ Imag
81558155
imported/w3c/web-platform-tests/css/css-viewport/zoom/border-width.html [ ImageOnlyFailure ]
81568156
imported/w3c/web-platform-tests/css/css-viewport/zoom/border.html [ ImageOnlyFailure ]
81578157

8158+
# RenderTreeNeedsLayoutChecker hits.
8159+
webkit.org/b/304002 [ Debug ] fast/inline/missing-content-on-autofill-with-out-of-flow-input-descendant.html [ Skip ]
81588160

81598161
# Hits assert in debug, tracked by https://bugs.webkit.org/show_bug.cgi?id=303414
81608162
[ Debug ] fullscreen/fullscreen-grid-item-container-type-crash.html [ Skip ]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<style>
3+
.form-element {
4+
position: relative;
5+
}
6+
7+
.form-textbox {
8+
height: 200px;
9+
}
10+
</style>
11+
<div class=form-element>
12+
<input class=form-textbox type="text" value="Text">
13+
</div>
14+
<script>
15+
if (window.testRunner) {
16+
testRunner.waitUntilDone();
17+
eventSender.mouseMoveTo(10, 10);
18+
eventSender.mouseDown();
19+
eventSender.mouseUp();
20+
testRunner.notifyDone();
21+
}
22+
</script>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<style>
3+
.form-element {
4+
position: relative;
5+
}
6+
7+
.form-textbox::-webkit-contacts-auto-fill-button {
8+
position: absolute;
9+
left: 110px;
10+
visibility: hidden;
11+
}
12+
13+
.form-textbox {
14+
height: 200px;
15+
}
16+
</style>
17+
<div class=form-element>
18+
<input id=auto_fill_this class=form-textbox type="text" value="Text">
19+
</div>
20+
<script>
21+
if (window.testRunner) {
22+
window.internals.setAutofillButtonType(document.getElementById("auto_fill_this"), "Contacts");
23+
testRunner.waitUntilDone();
24+
eventSender.mouseMoveTo(10, 10);
25+
eventSender.mouseDown();
26+
eventSender.mouseUp();
27+
testRunner.notifyDone();
28+
}
29+
</script>

Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,8 +1158,10 @@ bool LineLayout::isContentConsideredStale() const
11581158
auto* rootRenderer = m_rootLayoutBox->rendererForIntegration();
11591159
if (!rootRenderer)
11601160
return true;
1161-
if (rootRenderer->needsLayout())
1161+
if (rootRenderer->normalChildNeedsLayout()) {
1162+
// FIXME: Let's bail out on needsLayout() -see webkit.org/b/304002
11621163
return true;
1164+
}
11631165
if (rootRenderer->style().isSkippedRootOrSkippedContent())
11641166
return true;
11651167
if (m_lineDamage && m_lineDamage->hasDetachedContent())

0 commit comments

Comments
 (0)