Changeset 249012 in webkit
- Timestamp:
- Aug 22, 2019, 9:20:34 AM (7 years ago)
- Location:
- branches/safari-608-branch
- Files:
-
- 2 added
- 16 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt (added)
-
LayoutTests/editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayer.cpp (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Platform/spi/ios/UIKitSPI.h (modified) (1 diff)
-
Source/WebKit/UIProcess/PageClient.h (modified) (1 diff)
-
Source/WebKit/UIProcess/WebPageProxy.h (modified) (1 diff)
-
Source/WebKit/UIProcess/WebPageProxy.messages.in (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/PageClientImplIOS.h (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (modified) (1 diff)
-
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (modified) (1 diff)
-
Source/WebKit/WebProcess/WebPage/WebPage.cpp (modified) (4 diffs)
-
Source/WebKit/WebProcess/WebPage/WebPage.h (modified) (2 diffs)
-
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608-branch/LayoutTests/ChangeLog
r249011 r249012 1 2019-08-22 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r249006. rdar://problem/54600921 4 5 Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com 6 https://bugs.webkit.org/show_bug.cgi?id=201023 7 <rdar://problem/54294794> 8 9 Reviewed by Ryosuke Niwa. 10 11 Source/WebCore: 12 13 Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places 14 focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the 15 WebKit ChangeLog for more details. 16 17 Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html 18 19 * rendering/RenderLayer.cpp: 20 (WebCore::RenderLayer::calculateClipRects const): 21 22 Source/WebKit: 23 24 After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element 25 was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due 26 to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on 27 Microsoft Word online. 28 29 However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform 30 input context changes when moving between the title and body fields, or when tapping to change selection. This 31 is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more 32 detail here). While text is never directly inserted into this hidden contenteditable, the events are observed 33 and used to "play back" editing in the main visible content area. 34 35 Thus, when moving between the title and body fields (or when changing selection within either), the only hint we 36 get is that the hidden editable element is blurred and immediately refocused. Since we no longer send 37 ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively 38 changed input contexts. 39 40 Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text 41 that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters 42 into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected 43 text in the title field. 44 45 To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately 46 refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input 47 context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious 48 for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden 49 editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused 50 element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a 51 single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus 52 messages we would've sent in previous releases). 53 54 * Platform/spi/ios/UIKitSPI.h: 55 * UIProcess/PageClient.h: 56 * UIProcess/WebPageProxy.h: 57 * UIProcess/WebPageProxy.messages.in: 58 59 Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus 60 moves away from and immediately returns to a hidden editable element. 61 62 * UIProcess/ios/PageClientImplIOS.h: 63 * UIProcess/ios/PageClientImplIOS.mm: 64 (WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement): 65 * UIProcess/ios/WKContentViewInteraction.h: 66 * UIProcess/ios/WKContentViewInteraction.mm: 67 (-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]): 68 69 Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new 70 autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request 71 would've still happened anyways in the case where we would previously have sent an ElementDidFocus message. 72 73 * UIProcess/ios/WebPageProxyIOS.mm: 74 (WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement): 75 * WebProcess/WebPage/WebPage.cpp: 76 (WebKit::WebPage::elementDidFocus): 77 78 In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same 79 element, we should still notify the UI process so that it can synchronize state between the application process 80 and kbd. See above for more details. 81 82 (WebKit::WebPage::elementDidBlur): 83 (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded): 84 * WebProcess/WebPage/WebPage.h: 85 * WebProcess/WebPage/ios/WebPageIOS.mm: 86 (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded): 87 88 LayoutTests: 89 90 Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an 91 empty, borderless subframe. 92 93 * editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added. 94 * editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added. 95 96 97 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249006 268f45cc-cd09-0410-ab3c-d52691b4dbfc 98 99 2019-08-22 Wenson Hsieh <wenson_hsieh@apple.com> 100 101 Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com 102 https://bugs.webkit.org/show_bug.cgi?id=201023 103 <rdar://problem/54294794> 104 105 Reviewed by Ryosuke Niwa. 106 107 Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an 108 empty, borderless subframe. 109 110 * editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added. 111 * editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added. 112 1 113 2019-08-22 Kocsen Chung <kocsen_chung@apple.com> 2 114 -
branches/safari-608-branch/Source/WebCore/ChangeLog
r249011 r249012 1 2019-08-22 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r249006. rdar://problem/54600921 4 5 Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com 6 https://bugs.webkit.org/show_bug.cgi?id=201023 7 <rdar://problem/54294794> 8 9 Reviewed by Ryosuke Niwa. 10 11 Source/WebCore: 12 13 Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places 14 focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the 15 WebKit ChangeLog for more details. 16 17 Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html 18 19 * rendering/RenderLayer.cpp: 20 (WebCore::RenderLayer::calculateClipRects const): 21 22 Source/WebKit: 23 24 After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element 25 was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due 26 to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on 27 Microsoft Word online. 28 29 However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform 30 input context changes when moving between the title and body fields, or when tapping to change selection. This 31 is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more 32 detail here). While text is never directly inserted into this hidden contenteditable, the events are observed 33 and used to "play back" editing in the main visible content area. 34 35 Thus, when moving between the title and body fields (or when changing selection within either), the only hint we 36 get is that the hidden editable element is blurred and immediately refocused. Since we no longer send 37 ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively 38 changed input contexts. 39 40 Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text 41 that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters 42 into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected 43 text in the title field. 44 45 To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately 46 refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input 47 context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious 48 for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden 49 editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused 50 element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a 51 single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus 52 messages we would've sent in previous releases). 53 54 * Platform/spi/ios/UIKitSPI.h: 55 * UIProcess/PageClient.h: 56 * UIProcess/WebPageProxy.h: 57 * UIProcess/WebPageProxy.messages.in: 58 59 Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus 60 moves away from and immediately returns to a hidden editable element. 61 62 * UIProcess/ios/PageClientImplIOS.h: 63 * UIProcess/ios/PageClientImplIOS.mm: 64 (WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement): 65 * UIProcess/ios/WKContentViewInteraction.h: 66 * UIProcess/ios/WKContentViewInteraction.mm: 67 (-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]): 68 69 Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new 70 autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request 71 would've still happened anyways in the case where we would previously have sent an ElementDidFocus message. 72 73 * UIProcess/ios/WebPageProxyIOS.mm: 74 (WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement): 75 * WebProcess/WebPage/WebPage.cpp: 76 (WebKit::WebPage::elementDidFocus): 77 78 In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same 79 element, we should still notify the UI process so that it can synchronize state between the application process 80 and kbd. See above for more details. 81 82 (WebKit::WebPage::elementDidBlur): 83 (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded): 84 * WebProcess/WebPage/WebPage.h: 85 * WebProcess/WebPage/ios/WebPageIOS.mm: 86 (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded): 87 88 LayoutTests: 89 90 Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an 91 empty, borderless subframe. 92 93 * editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added. 94 * editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added. 95 96 97 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249006 268f45cc-cd09-0410-ab3c-d52691b4dbfc 98 99 2019-08-22 Wenson Hsieh <wenson_hsieh@apple.com> 100 101 Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com 102 https://bugs.webkit.org/show_bug.cgi?id=201023 103 <rdar://problem/54294794> 104 105 Reviewed by Ryosuke Niwa. 106 107 Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places 108 focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the 109 WebKit ChangeLog for more details. 110 111 Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html 112 113 * rendering/RenderLayer.cpp: 114 (WebCore::RenderLayer::calculateClipRects const): 115 1 116 2019-08-22 Kocsen Chung <kocsen_chung@apple.com> 2 117 -
branches/safari-608-branch/Source/WebCore/rendering/RenderLayer.cpp
r249011 r249012 6819 6819 return false; 6820 6820 6821 if (is<HTMLFrameOwnerElement>(layer.renderer().element()) && layer.visibleSize().isEmpty()) 6822 return true; 6823 6821 6824 LayoutRect layerBounds; 6822 6825 ClipRect backgroundRect; -
branches/safari-608-branch/Source/WebKit/ChangeLog
r248988 r249012 1 2019-08-22 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r249006. rdar://problem/54600921 4 5 Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com 6 https://bugs.webkit.org/show_bug.cgi?id=201023 7 <rdar://problem/54294794> 8 9 Reviewed by Ryosuke Niwa. 10 11 Source/WebCore: 12 13 Ensures that we recognize the blog editor on blog.naver.com to be a hidden editable area. This website places 14 focus inside an editable body element of a subframe that is completely empty (width: 0 and border: 0). See the 15 WebKit ChangeLog for more details. 16 17 Test: editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html 18 19 * rendering/RenderLayer.cpp: 20 (WebCore::RenderLayer::calculateClipRects const): 21 22 Source/WebKit: 23 24 After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element 25 was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due 26 to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on 27 Microsoft Word online. 28 29 However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform 30 input context changes when moving between the title and body fields, or when tapping to change selection. This 31 is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more 32 detail here). While text is never directly inserted into this hidden contenteditable, the events are observed 33 and used to "play back" editing in the main visible content area. 34 35 Thus, when moving between the title and body fields (or when changing selection within either), the only hint we 36 get is that the hidden editable element is blurred and immediately refocused. Since we no longer send 37 ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively 38 changed input contexts. 39 40 Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text 41 that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters 42 into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected 43 text in the title field. 44 45 To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately 46 refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input 47 context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious 48 for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden 49 editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused 50 element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a 51 single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus 52 messages we would've sent in previous releases). 53 54 * Platform/spi/ios/UIKitSPI.h: 55 * UIProcess/PageClient.h: 56 * UIProcess/WebPageProxy.h: 57 * UIProcess/WebPageProxy.messages.in: 58 59 Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus 60 moves away from and immediately returns to a hidden editable element. 61 62 * UIProcess/ios/PageClientImplIOS.h: 63 * UIProcess/ios/PageClientImplIOS.mm: 64 (WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement): 65 * UIProcess/ios/WKContentViewInteraction.h: 66 * UIProcess/ios/WKContentViewInteraction.mm: 67 (-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]): 68 69 Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new 70 autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request 71 would've still happened anyways in the case where we would previously have sent an ElementDidFocus message. 72 73 * UIProcess/ios/WebPageProxyIOS.mm: 74 (WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement): 75 * WebProcess/WebPage/WebPage.cpp: 76 (WebKit::WebPage::elementDidFocus): 77 78 In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same 79 element, we should still notify the UI process so that it can synchronize state between the application process 80 and kbd. See above for more details. 81 82 (WebKit::WebPage::elementDidBlur): 83 (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded): 84 * WebProcess/WebPage/WebPage.h: 85 * WebProcess/WebPage/ios/WebPageIOS.mm: 86 (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded): 87 88 LayoutTests: 89 90 Add a new layout test to verify that we suppress text interactions when focusing an editable element inside an 91 empty, borderless subframe. 92 93 * editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe-expected.txt: Added. 94 * editing/selection/ios/do-not-show-selection-in-empty-borderless-subframe.html: Added. 95 96 97 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249006 268f45cc-cd09-0410-ab3c-d52691b4dbfc 98 99 2019-08-22 Wenson Hsieh <wenson_hsieh@apple.com> 100 101 Typing Korean in title field after typing in the body inserts extraneous characters on blog.naver.com 102 https://bugs.webkit.org/show_bug.cgi?id=201023 103 <rdar://problem/54294794> 104 105 Reviewed by Ryosuke Niwa. 106 107 After r242833, we began to avoid sending redundant ElementDidFocus updates in the case where a focused element 108 was blurred and refocused within the same runloop. This was done to prevent the input view from flickering due 109 to input view reloading, as well as scrolling to reveal the focused element, when tapping to change selection on 110 Microsoft Word online. 111 112 However, on blog.naver.com, these ElementDidFocus messages were necessary in order to ensure that the platform 113 input context changes when moving between the title and body fields, or when tapping to change selection. This 114 is because blog.naver.com uses a hidden contenteditable area under a subframe (see WebCore ChangeLog for more 115 detail here). While text is never directly inserted into this hidden contenteditable, the events are observed 116 and used to "play back" editing in the main visible content area. 117 118 Thus, when moving between the title and body fields (or when changing selection within either), the only hint we 119 get is that the hidden editable element is blurred and immediately refocused. Since we no longer send 120 ElementDidFocus updates in this scenario, UIKeyboardImpl and kbd are not aware that the page has effectively 121 changed input contexts. 122 123 Combined with the fact that Korean IME on iOS may insert additional text given the document context (i.e. text 124 that the input manager, kbd, thinks we've previously inserted), this means that when typing several characters 125 into the body field on naver and then switching to edit the title, initial keystrokes may insert unexpected 126 text in the title field. 127 128 To fix this, we add some hooks to notify the UI process when an element that was blurred has been immediately 129 refocused. Upon receiving this message, the UI process then tells UIKeyboardImpl to re-retrieve its input 130 context, which calls into -requestAutocorrectionContextWithCompletionHandler: in WKContentView. While notorious 131 for being synchronous IPC, this is mitigated by (1) being limiting to only instances where we have a hidden 132 editable area, and (2) being limited by a batching mechanism in the web process, such that if the focused 133 element is blurred, refocused, re-blurred, and refocused many times in the same runloop, we'll only send a 134 single UpdateInputContextAfterBlurringAndRefocusingElement message (as opposed to the many ElementDidFocus 135 messages we would've sent in previous releases). 136 137 * Platform/spi/ios/UIKitSPI.h: 138 * UIProcess/PageClient.h: 139 * UIProcess/WebPageProxy.h: 140 * UIProcess/WebPageProxy.messages.in: 141 142 Add a new mechanism to update the platform input context (on iOS, UIKeyboardImpl's document state) when focus 143 moves away from and immediately returns to a hidden editable element. 144 145 * UIProcess/ios/PageClientImplIOS.h: 146 * UIProcess/ios/PageClientImplIOS.mm: 147 (WebKit::PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement): 148 * UIProcess/ios/WKContentViewInteraction.h: 149 * UIProcess/ios/WKContentViewInteraction.mm: 150 (-[WKContentView _updateInputContextAfterBlurringAndRefocusingElement]): 151 152 Tell the active UIKeyboardImpl to refetch document state from the WKContentView. While this does result in a new 153 autocorrection context request (which, unfortunately, triggers synchronous IPC to the web process), this request 154 would've still happened anyways in the case where we would previously have sent an ElementDidFocus message. 155 156 * UIProcess/ios/WebPageProxyIOS.mm: 157 (WebKit::WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement): 158 * WebProcess/WebPage/WebPage.cpp: 159 (WebKit::WebPage::elementDidFocus): 160 161 In the case where we avoid sending a full ElementDidFocus message to the UI process due to refocusing the same 162 element, we should still notify the UI process so that it can synchronize state between the application process 163 and kbd. See above for more details. 164 165 (WebKit::WebPage::elementDidBlur): 166 (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded): 167 * WebProcess/WebPage/WebPage.h: 168 * WebProcess/WebPage/ios/WebPageIOS.mm: 169 (WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded): 170 1 171 2019-08-21 Kocsen Chung <kocsen_chung@apple.com> 2 172 -
branches/safari-608-branch/Source/WebKit/Platform/spi/ios/UIKitSPI.h
r248573 r249012 271 271 @interface UIKeyboardImpl : UIView <UIKeyboardCandidateListDelegate> 272 272 - (BOOL)smartInsertDeleteIsEnabled; 273 - (void)updateForChangedSelection; 273 274 @end 274 275 -
branches/safari-608-branch/Source/WebKit/UIProcess/PageClient.h
r247981 r249012 386 386 387 387 virtual void elementDidFocus(const FocusedElementInformation&, bool userIsInteracting, bool blurPreviousNode, OptionSet<WebCore::ActivityState::Flag> activityStateChanges, API::Object* userData) = 0; 388 virtual void updateInputContextAfterBlurringAndRefocusingElement() = 0; 388 389 virtual void elementDidBlur() = 0; 389 390 virtual void focusedElementDidChangeInputMode(WebCore::InputMode) = 0; -
branches/safari-608-branch/Source/WebKit/UIProcess/WebPageProxy.h
r248617 r249012 1944 1944 void elementDidFocus(const FocusedElementInformation&, bool userIsInteracting, bool blurPreviousNode, OptionSet<WebCore::ActivityState::Flag> activityStateChanges, const UserData&); 1945 1945 void elementDidBlur(); 1946 void updateInputContextAfterBlurringAndRefocusingElement(); 1946 1947 void focusedElementDidChangeInputMode(WebCore::InputMode); 1947 1948 void didReleaseAllTouchPoints(); -
branches/safari-608-branch/Source/WebKit/UIProcess/WebPageProxy.messages.in
r247970 r249012 409 409 ElementDidFocus(struct WebKit::FocusedElementInformation information, bool userIsInteracting, bool blurPreviousNode, OptionSet<WebCore::ActivityState::Flag> activityStateChanges, WebKit::UserData userData) 410 410 ElementDidBlur() 411 UpdateInputContextAfterBlurringAndRefocusingElement() 411 412 FocusedElementDidChangeInputMode(enum:uint8_t WebCore::InputMode mode) 412 413 ScrollingNodeScrollWillStartScroll() -
branches/safari-608-branch/Source/WebKit/UIProcess/ios/PageClientImplIOS.h
r247981 r249012 150 150 151 151 void elementDidFocus(const FocusedElementInformation&, bool userIsInteracting, bool blurPreviousNode, OptionSet<WebCore::ActivityState::Flag> activityStateChanges, API::Object* userData) override; 152 void updateInputContextAfterBlurringAndRefocusingElement() final; 152 153 void elementDidBlur() override; 153 154 void focusedElementDidChangeInputMode(WebCore::InputMode) override; -
branches/safari-608-branch/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
r247981 r249012 561 561 } 562 562 563 void PageClientImpl::updateInputContextAfterBlurringAndRefocusingElement() 564 { 565 [m_contentView _updateInputContextAfterBlurringAndRefocusingElement]; 566 } 567 563 568 bool PageClientImpl::isFocusingElement() 564 569 { -
branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r248837 r249012 458 458 - (void)_handleSmartMagnificationInformationForPotentialTap:(uint64_t)requestID renderRect:(const WebCore::FloatRect&)renderRect fitEntireRect:(BOOL)fitEntireRect viewportMinimumScale:(double)viewportMinimumScale viewportMaximumScale:(double)viewportMaximumScale; 459 459 - (void)_elementDidFocus:(const WebKit::FocusedElementInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode activityStateChanges:(OptionSet<WebCore::ActivityState::Flag>)activityStateChanges userObject:(NSObject <NSSecureCoding> *)userObject; 460 - (void)_updateInputContextAfterBlurringAndRefocusingElement; 460 461 - (void)_elementDidBlur; 461 462 - (void)_hideContextMenuHintContainer; -
branches/safari-608-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r248840 r249012 5495 5495 } 5496 5496 5497 - (void)_updateInputContextAfterBlurringAndRefocusingElement 5498 { 5499 if (!hasFocusedElement(_focusedElementInformation) || !_suppressSelectionAssistantReasons) 5500 return; 5501 5502 [UIKeyboardImpl.activeInstance updateForChangedSelection]; 5503 } 5504 5497 5505 - (BOOL)shouldIgnoreKeyboardWillHideNotification 5498 5506 { -
branches/safari-608-branch/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r248622 r249012 905 905 } 906 906 907 void WebPageProxy::updateInputContextAfterBlurringAndRefocusingElement() 908 { 909 pageClient().updateInputContextAfterBlurringAndRefocusingElement(); 910 } 911 907 912 void WebPageProxy::elementDidFocus(const FocusedElementInformation& information, bool userIsInteracting, bool blurPreviousNode, OptionSet<WebCore::ActivityState::Flag> activityStateChanges, const UserData& userData) 908 913 { -
branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r248617 r249012 5470 5470 { 5471 5471 if (!shouldDispatchUpdateAfterFocusingElement(element)) { 5472 updateInputContextAfterBlurringAndRefocusingElementIfNeeded(element); 5472 5473 m_focusedElement = &element; 5473 5474 m_recentlyBlurredElement = nullptr; … … 5477 5478 if (is<HTMLSelectElement>(element) || isTextFormControlOrEditableContent(element)) { 5478 5479 m_focusedElement = &element; 5480 m_hasPendingInputContextUpdateAfterBlurringAndRefocusingElement = false; 5479 5481 5480 5482 #if PLATFORM(IOS_FAMILY) … … 5518 5520 protectedThis->m_recentlyBlurredElement = nullptr; 5519 5521 }); 5522 m_hasPendingInputContextUpdateAfterBlurringAndRefocusingElement = false; 5520 5523 } 5521 5524 } … … 6696 6699 } 6697 6700 6701 void WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded(Element&) 6702 { 6703 } 6704 6698 6705 #endif // !PLATFORM(IOS_FAMILY) 6699 6706 -
branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/WebPage.h
r248988 r249012 604 604 void focusedElementDidChangeInputMode(WebCore::Element&, WebCore::InputMode); 605 605 void resetFocusedElementForFrame(WebFrame*); 606 void updateInputContextAfterBlurringAndRefocusingElementIfNeeded(WebCore::Element&); 606 607 607 608 void disabledAdaptationsDidChange(const OptionSet<WebCore::DisabledAdaptations>&); … … 1825 1826 RefPtr<WebCore::Element> m_focusedElement; 1826 1827 RefPtr<WebCore::Element> m_recentlyBlurredElement; 1828 bool m_hasPendingInputContextUpdateAfterBlurringAndRefocusingElement { false }; 1827 1829 bool m_hasPendingEditorStateUpdate { false }; 1828 1830 -
branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r248937 r249012 1171 1171 } 1172 1172 1173 void WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded(Element& element) 1174 { 1175 if (m_recentlyBlurredElement != &element || !m_isShowingInputViewForFocusedElement) 1176 return; 1177 1178 m_hasPendingInputContextUpdateAfterBlurringAndRefocusingElement = true; 1179 callOnMainThread([this, protectedThis = makeRefPtr(this)] { 1180 if (m_hasPendingInputContextUpdateAfterBlurringAndRefocusingElement) 1181 send(Messages::WebPageProxy::UpdateInputContextAfterBlurringAndRefocusingElement()); 1182 m_hasPendingInputContextUpdateAfterBlurringAndRefocusingElement = false; 1183 }); 1184 } 1185 1173 1186 void WebPage::blurFocusedElement() 1174 1187 {
Note:
See TracChangeset
for help on using the changeset viewer.