Changeset 244141 in webkit
- Timestamp:
- Apr 10, 2019, 11:47:25 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/LayoutTests/ChangeLog ¶
r244112 r244141 1 2019-04-10 Megan Gardner <megan_gardner@apple.com> 2 3 Fix text autoscrolling when typing in modern webkit 4 https://bugs.webkit.org/show_bug.cgi?id=196718 5 6 Reviewed by Tim Horton. 7 8 * fast/events/autoscroll-when-input-is-offscreen-expected.txt: Added. 9 * fast/events/autoscroll-when-input-is-offscreen.html: Added. 10 * fast/events/autoscroll-with-software-keyboard-expected.txt: Added. 11 * fast/events/autoscroll-with-software-keyboard.html: Added. 12 1 13 2019-04-10 Youenn Fablet <youenn@apple.com> 2 14 -
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r244115 r244141 1 2019-04-10 Megan Gardner <megan_gardner@apple.com> 2 3 Fix text autoscrolling when typing in modern webkit 4 https://bugs.webkit.org/show_bug.cgi?id=196718 5 <rdar://problem/49225507> 6 7 Reviewed by Tim Horton. 8 9 Tests: fast/events/autoscroll-when-input-is-offscreen.html 10 fast/events/autoscroll-with-software-keyboard.html 11 12 We have been relying on UIKit to scroll editable text, but 13 since we cannot give them enough information for them to always 14 do the right thing, we should just do all the work in WebKit. 15 This has the added benifit of fixing some tricky autoscrolling 16 bugs that have cropped up recently. 17 18 * editing/Editor.cpp: 19 (WebCore::Editor::insertTextWithoutSendingTextEvent): 20 (WebCore::Editor::revealSelectionAfterEditingOperation): 21 We should be scrolling the main frame in WebKit. We have been relying on UIKit, 22 but we cannot give them enough information to guarantee a correct scroll, so just 23 do all the work in WebKit. 24 * page/FrameView.cpp: 25 (WebCore::FrameView::unobscuredContentRectExpandedByContentInsets const): 26 Update to use the rect that is actually visible, accounting for the software keyboard. 27 1 28 2019-04-10 Ross Kirsling <ross.kirsling@sony.com> 2 29 -
TabularUnified trunk/Source/WebCore/editing/Editor.cpp ¶
r243195 r244141 1281 1281 if (Frame* editedFrame = document->frame()) 1282 1282 if (Page* page = editedFrame->page()) { 1283 #if PLATFORM(IOS_FAMILY)1284 SelectionRevealMode revealMode = SelectionRevealMode::RevealUpToMainFrame;1285 #else1286 1283 SelectionRevealMode revealMode = SelectionRevealMode::Reveal; 1287 #endif1288 1284 page->focusController().focusedOrMainFrame().selection().revealSelection(revealMode, ScrollAlignment::alignCenterIfNeeded); 1289 1285 } … … 3056 3052 return; 3057 3053 3058 #if PLATFORM(IOS_FAMILY)3059 SelectionRevealMode revealMode = SelectionRevealMode::RevealUpToMainFrame;3060 #else3061 3054 SelectionRevealMode revealMode = SelectionRevealMode::Reveal; 3062 #endif3063 3064 3055 m_frame.selection().revealSelection(revealMode, alignment, revealExtentOption); 3065 3056 } -
TabularUnified trunk/Source/WebCore/page/FrameView.cpp ¶
r244098 r244141 1994 1994 } 1995 1995 1996 IntRect FrameView:: unobscuredContentRectExpandedByContentInsets() const1997 { 1998 FloatRect unobscuredContentRect = this-> unobscuredContentRect();1996 IntRect FrameView::visualViewportRectExpandedByContentInsets() const 1997 { 1998 FloatRect unobscuredContentRect = this->visualViewportRect(); 1999 1999 if (auto* page = frame().page()) 2000 2000 unobscuredContentRect.expand(page->contentInsets()); -
TabularUnified trunk/Source/WebCore/page/FrameView.h ¶
r244098 r244141 330 330 #endif 331 331 332 IntRect unobscuredContentRectExpandedByContentInsets() const;332 IntRect visualViewportRectExpandedByContentInsets() const; 333 333 334 334 bool fixedElementsLayoutRelativeToFrame() const; -
TabularUnified trunk/Source/WebCore/rendering/RenderLayer.cpp ¶
r244068 r244141 2569 2569 LayoutRect viewRect = frameView.visibleContentRect(); 2570 2570 #else 2571 LayoutRect viewRect = frameView. unobscuredContentRectExpandedByContentInsets();2571 LayoutRect viewRect = frameView.visualViewportRectExpandedByContentInsets(); 2572 2572 #endif 2573 2573 // Move the target rect into "scrollView contents" coordinates. -
TabularUnified trunk/Source/WebKit/ChangeLog ¶
r244140 r244141 1 2019-04-10 Megan Gardner <megan_gardner@apple.com> 2 3 Fix text autoscrolling when typing in modern webkit 4 https://bugs.webkit.org/show_bug.cgi?id=196718 5 <rdar://problem/49225507> 6 7 Reviewed by Tim Horton. 8 9 For staging only. We need to turn off UIKit's scrolling behavior to land 10 the changes we are making. To keep from the build ever breaking, 11 I am temporarily circumventing the changes in UIKit. This will be removed 12 once the next UIKit submission happens. 13 14 * UIProcess/ios/WKContentViewInteraction.mm: 15 (-[WKUIWKTextInteractionAssistant scrollSelectionToVisible]): 16 (-[WKContentView setUpTextSelectionAssistant]): 17 1 18 2019-04-10 Wenson Hsieh <wenson_hsieh@apple.com> 2 19 -
TabularUnified trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm ¶
r244096 r244141 155 155 #endif 156 156 157 // For staging with UIKit, will be removed ASAP. 158 @interface WKUIWKTextInteractionAssistant : UIWKTextInteractionAssistant 159 @end 160 161 @implementation WKUIWKTextInteractionAssistant 162 - (void)scrollSelectionToVisible 163 { 164 } 165 @end 166 157 167 namespace WebKit { 158 168 using namespace WebCore; … … 2372 2382 { 2373 2383 if (!_textSelectionAssistant) 2374 _textSelectionAssistant = adoptNS([[ UIWKTextInteractionAssistant alloc] initWithView:self]);2384 _textSelectionAssistant = adoptNS([[WKUIWKTextInteractionAssistant alloc] initWithView:self]); 2375 2385 else { 2376 2386 // Reset the gesture recognizers in case editability has changed.
Note:
See TracChangeset
for help on using the changeset viewer.