Changeset 238519 in webkit
- Timestamp:
- Nov 26, 2018, 1:50:17 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/fast/repaint/placeholder-after-caps-lock-hidden-expected.txt (added)
-
LayoutTests/fast/repaint/placeholder-after-caps-lock-hidden.html (added)
-
LayoutTests/platform/mac-wk2/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderTextControlSingleLine.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r238513 r238519 1 2018-11-26 Daniel Bates <dabates@apple.com> 2 3 Placeholder text is not repainted after caps lock indicator is hidden 4 https://bugs.webkit.org/show_bug.cgi?id=191968 5 <rdar://problem/46247234> 6 7 Reviewed by Zalan Bujtas. 8 9 Add a test to ensure to that the placeholder text is repainted when the caps lock indicator is hidden. 10 11 * TestExpectations: Skip the test on all platforms as we only support toggling Caps Lock in 12 WebKit2 on Mac at the moment. 13 * fast/repaint/placeholder-after-caps-lock-hidden.html: Added. 14 * platform/mac-wk2/TestExpectations: Mark the test as PASS so that we run it. 15 1 16 2018-11-26 Daniel Bates <dabates@apple.com> 2 17 -
trunk/LayoutTests/TestExpectations
r238513 r238519 402 402 fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button.html [ Skip ] 403 403 fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html [ Skip ] 404 fast/repaint/placeholder-after-caps-lock-hidden.html [ Skip ] 404 405 405 406 # This test currently only works for mac-wk2 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r238513 r238519 71 71 [ Mojave+ ] fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button.html [ Pass ] 72 72 [ Mojave+ ] fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html [ Pass ] 73 [ Mojave+ ] fast/repaint/placeholder-after-caps-lock-hidden.html [ Pass ] 73 74 74 75 fast/events/inactive-window-no-mouse-event.html [ Pass ] -
trunk/Source/WebCore/ChangeLog
r238516 r238519 1 2018-11-26 Daniel Bates <dabates@apple.com> 2 3 Placeholder text is not repainted after caps lock indicator is hidden 4 https://bugs.webkit.org/show_bug.cgi?id=191968 5 <rdar://problem/46247234> 6 7 Reviewed by Zalan Bujtas. 8 9 Fixes an issue where the placeholder text in a password field is not repainted when the 10 caps lock indicator is hidden. 11 12 The placeholder renderer is special. It is an excluded child renderer and does not take 13 part in normal flow layout. It is also created and destroyed as needed. The caps lock 14 indicator is also special in that it is implemented as a RenderImage and we do not know 15 its dimensions before it is loaded and the load happens asynchronously. As a result we 16 detect when the inner text size changes and mark the placeholder as dirty as a way to 17 keep the dimensions of the placeholder in sync with the dimensions of the inner text. 18 19 Test: fast/repaint/placeholder-after-caps-lock-hidden.html 20 21 * rendering/RenderTextControlSingleLine.cpp: 22 (WebCore::RenderTextControlSingleLine::layout): Mark the placeholder as needing layout 23 the size of the inner text changes. 24 1 25 2018-11-26 Jeremy Jones <jeremyj@apple.com> 2 26 -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
r237266 r238519 111 111 resetOverriddenHeight(containerRenderer, this); 112 112 113 // Save the old size of the inner text (if we have one) as we will need to layout the placeholder if 114 // it changes to keep the size of the placeholder proportional to the size of the inner text. 115 LayoutSize oldInnerTextSize; 116 if (innerTextRenderer) 117 oldInnerTextSize = innerTextRenderer->size(); 118 113 119 RenderBlockFlow::layoutBlock(false); 114 120 … … 174 180 bool neededLayout = placeholderBox->needsLayout(); 175 181 bool placeholderBoxHadLayout = placeholderBox->everHadLayout(); 182 if (innerTextSize != oldInnerTextSize) { 183 // The caps lock indicator was hidden. Layout the placeholder. Its layout does not affect its parent. 184 placeholderBox->setChildNeedsLayout(MarkOnlyThis); 185 } 176 186 placeholderBox->layoutIfNeeded(); 177 187 LayoutPoint textOffset;
Note:
See TracChangeset
for help on using the changeset viewer.