Changeset 247472 in webkit
- Timestamp:
- Jul 15, 2019 9:27:53 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247471 r247472 1 2019-07-15 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r247444. 4 5 Caused two scrolling tests to fail on iOS Simulator 6 7 Reverted changeset: 8 9 "Typing into a cell in a Google Sheet lags behind by one 10 character" 11 https://bugs.webkit.org/show_bug.cgi?id=199587 12 https://trac.webkit.org/changeset/247444 13 1 14 2019-07-15 Keith Miller <keith_miller@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r247470 r247472 1 2019-07-15 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r247444. 4 5 Caused two scrolling tests to fail on iOS Simulator 6 7 Reverted changeset: 8 9 "Typing into a cell in a Google Sheet lags behind by one 10 character" 11 https://bugs.webkit.org/show_bug.cgi?id=199587 12 https://trac.webkit.org/changeset/247444 13 1 14 2019-07-15 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/Source/WebCore/SourcesCocoa.txt
r247444 r247472 132 132 133 133 page/ios/ContentChangeObserver.cpp 134 page/ios/DOMTimerHoldingTank.cpp135 134 page/ios/EventHandlerIOS.mm 136 135 page/ios/FrameIOS.mm -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r247452 r247472 4148 4148 CE08C3D2152B599A0021B8C2 /* AlternativeTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = CE08C3D0152B599A0021B8C2 /* AlternativeTextController.h */; settings = {ATTRIBUTES = (); }; }; 4149 4149 CE1866451F72E5B400A0CAB6 /* MarkedText.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1866431F72E5B400A0CAB6 /* MarkedText.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4150 CE1A501F22D5350900CBC927 /* DOMTimerHoldingTank.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1A501D22D5350900CBC927 /* DOMTimerHoldingTank.h */; settings = {ATTRIBUTES = (Private, ); }; };4151 4150 CE2849871CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h in Headers */ = {isa = PBXBuildFile; fileRef = CE2849861CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h */; }; 4152 4151 CE5169E721F1B84700EA4F78 /* ColorIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = CE5169E521F1B84700EA4F78 /* ColorIOS.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 13811 13810 CE1866421F72E5B400A0CAB6 /* MarkedText.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MarkedText.cpp; sourceTree = "<group>"; }; 13812 13811 CE1866431F72E5B400A0CAB6 /* MarkedText.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MarkedText.h; sourceTree = "<group>"; }; 13813 CE1A501D22D5350900CBC927 /* DOMTimerHoldingTank.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMTimerHoldingTank.h; sourceTree = "<group>"; };13814 CE1A501E22D5350900CBC927 /* DOMTimerHoldingTank.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DOMTimerHoldingTank.cpp; sourceTree = "<group>"; };13815 13812 CE2849861CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContentSecurityPolicyDirectiveNames.h; path = csp/ContentSecurityPolicyDirectiveNames.h; sourceTree = "<group>"; }; 13816 13813 CE2849881CA3614600B4A57F /* ContentSecurityPolicyDirectiveNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContentSecurityPolicyDirectiveNames.cpp; path = csp/ContentSecurityPolicyDirectiveNames.cpp; sourceTree = "<group>"; }; … … 16532 16529 6FE9F09222211035004C5082 /* ContentChangeObserver.cpp */, 16533 16530 6FB5E212221F2447003989CF /* ContentChangeObserver.h */, 16534 CE1A501E22D5350900CBC927 /* DOMTimerHoldingTank.cpp */,16535 CE1A501D22D5350900CBC927 /* DOMTimerHoldingTank.h */,16536 16531 FE6938B51045D67E008EABB6 /* EventHandlerIOS.mm */, 16537 16532 FED13D3B0CEA936A00D89466 /* FrameIOS.mm */, … … 28978 28973 BC64640A11D7F304006455B0 /* DOMStringMap.h in Headers */, 28979 28974 188604B40F2E654A000B6443 /* DOMTimer.h in Headers */, 28980 CE1A501F22D5350900CBC927 /* DOMTimerHoldingTank.h in Headers */,28981 28975 05FD69E012845D4300B2BEB3 /* DOMTimeStamp.h in Headers */, 28982 28976 76FC2B0C12370DA0006A991A /* DOMTokenList.h in Headers */, -
trunk/Source/WebCore/dom/Document.cpp
r247444 r247472 263 263 #include "ContentChangeObserver.h" 264 264 #include "CSSFontSelector.h" 265 #include "DOMTimerHoldingTank.h"266 265 #include "DeviceMotionClientIOS.h" 267 266 #include "DeviceMotionController.h" … … 8188 8187 8189 8188 #if PLATFORM(IOS_FAMILY) 8190 8191 8189 ContentChangeObserver& Document::contentChangeObserver() 8192 8190 { … … 8195 8193 return *m_contentChangeObserver; 8196 8194 } 8197 8198 DOMTimerHoldingTank& Document::domTimerHoldingTank()8199 {8200 if (m_domTimerHoldingTank)8201 return *m_domTimerHoldingTank;8202 m_domTimerHoldingTank = std::make_unique<DOMTimerHoldingTank>();8203 return *m_domTimerHoldingTank;8204 }8205 8206 8195 #endif 8207 8196 -
trunk/Source/WebCore/dom/Document.h
r247444 r247472 107 107 class DOMImplementation; 108 108 class DOMSelection; 109 class DOMTimerHoldingTank;110 109 class DOMWindow; 111 110 class DOMWrapperWorld; … … 885 884 886 885 WEBCORE_EXPORT ContentChangeObserver& contentChangeObserver(); 887 888 DOMTimerHoldingTank* domTimerHoldingTankIfExists() { return m_domTimerHoldingTank.get(); }889 DOMTimerHoldingTank& domTimerHoldingTank();890 886 #endif 891 887 … … 2049 2045 #if PLATFORM(IOS_FAMILY) 2050 2046 std::unique_ptr<ContentChangeObserver> m_contentChangeObserver; 2051 std::unique_ptr<DOMTimerHoldingTank> m_domTimerHoldingTank;2052 2047 #endif 2053 2048 -
trunk/Source/WebCore/page/DOMTimer.cpp
r247444 r247472 44 44 #if PLATFORM(IOS_FAMILY) 45 45 #include "ContentChangeObserver.h" 46 #include "DOMTimerHoldingTank.h"47 46 #endif 48 47 … … 198 197 nestedTimers->add(timer->m_timeoutId, *timer); 199 198 #if PLATFORM(IOS_FAMILY) 200 if (is<Document>(context)) { 201 auto& document = downcast<Document>(context); 202 document.contentChangeObserver().didInstallDOMTimer(*timer, timeout, singleShot); 203 if (DeferDOMTimersForScope::isDeferring()) 204 document.domTimerHoldingTank().add(*timer); 205 } 199 if (is<Document>(context)) 200 downcast<Document>(context).contentChangeObserver().didInstallDOMTimer(*timer, timeout, singleShot); 206 201 #endif 207 202 return timer->m_timeoutId; … … 219 214 if (is<Document>(context)) { 220 215 auto& document = downcast<Document>(context); 221 if (auto* timer = document.findTimeout(timeoutId)) {216 if (auto* timer = document.findTimeout(timeoutId)) 222 217 document.contentChangeObserver().didRemoveDOMTimer(*timer); 223 if (auto* holdingTank = document.domTimerHoldingTankIfExists())224 holdingTank->remove(*timer);225 }226 218 } 227 219 #endif … … 292 284 ASSERT(scriptExecutionContext()); 293 285 ScriptExecutionContext& context = *scriptExecutionContext(); 294 295 #if PLATFORM(IOS_FAMILY)296 if (is<Document>(context)) {297 auto& document = downcast<Document>(context);298 if (auto* holdingTank = document.domTimerHoldingTankIfExists(); holdingTank && holdingTank->contains(*this)) {299 if (!repeatInterval())300 startOneShot(0_s);301 return;302 }303 }304 #endif305 286 306 287 DOMTimerFireState fireState(context, std::min(m_nestingLevel + 1, maxTimerNestingLevel)); -
trunk/Source/WebCore/page/EventHandler.cpp
r247444 r247472 132 132 #endif 133 133 134 #if PLATFORM(IOS_FAMILY)135 #include "DOMTimerHoldingTank.h"136 #endif137 138 134 namespace WebCore { 139 135 … … 3346 3342 keydown->stopPropagation(); 3347 3343 3348 #if PLATFORM(IOS_FAMILY)3349 DeferDOMTimersForScope deferralScope { m_frame.document()->quirks().needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand() };3350 #endif3351 3352 3344 element->dispatchEvent(keydown); 3353 3345 if (handledByInputMethod) -
trunk/Source/WebCore/page/Quirks.cpp
r247470 r247472 318 318 } 319 319 320 bool Quirks::needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand() const321 {322 #if PLATFORM(IOS_FAMILY)323 if (m_document->settings().needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommandQuirk())324 return true;325 326 if (!needsQuirks())327 return false;328 329 auto& url = m_document->topDocument().url();330 return equalLettersIgnoringASCIICase(url.host(), "docs.google.com") && url.path().startsWithIgnoringASCIICase("/spreadsheets/");331 #else332 return false;333 #endif334 }335 336 320 // FIXME(<rdar://problem/50394969>): Remove after desmos.com adopts inputmode="none". 337 321 bool Quirks::needsInputModeNoneImplicitly(const HTMLElement& element) const -
trunk/Source/WebCore/page/Quirks.h
r247470 r247472 55 55 bool shouldDisablePointerEventsQuirk() const; 56 56 bool needsInputModeNoneImplicitly(const HTMLElement&) const; 57 bool needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand() const;58 57 59 58 WEBCORE_EXPORT bool shouldDispatchSyntheticMouseEventsWhenModifyingSelection() const; -
trunk/Source/WebCore/page/Settings.yaml
r247453 r247472 163 163 initial: false 164 164 165 # This is an iOS-specific quirk. Unlike Mac, keyboard operations are asynchronous and hence a DOM update as166 # a result of text insertion or deletion does not occur within the same event loop iteration as a dispatched167 # DOM keydown event. Some sites, notably Google Sheets, schedule timers on keypress and expect on a DOM update168 # to have occurred on expiration. When enabled, this quirk puts all such scheduled timers in a holding tank169 # until the keyboard performs the insertion or deletion. This gives Google Sheets the illusion that the DOM170 # update happened within the same event loop iteration that the keypress event was dispatched in.171 needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommandQuirk:172 initial: false173 174 165 treatsAnyTextCSSLinkAsStylesheet: 175 166 initial: false -
trunk/Source/WebKit/ChangeLog
r247470 r247472 1 2019-07-15 Ryan Haddad <ryanhaddad@apple.com> 2 3 Unreviewed, rolling out r247444. 4 5 Caused two scrolling tests to fail on iOS Simulator 6 7 Reverted changeset: 8 9 "Typing into a cell in a Google Sheet lags behind by one 10 character" 11 https://bugs.webkit.org/show_bug.cgi?id=199587 12 https://trac.webkit.org/changeset/247444 13 1 14 2019-07-15 Zalan Bujtas <zalan@apple.com> 2 15 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r247444 r247472 1261 1261 void WebPage::executeEditingCommand(const String& commandName, const String& argument) 1262 1262 { 1263 platformWillPerformEditingCommand(); 1264 1265 auto& frame = m_page->focusController().focusedOrMainFrame(); 1263 Frame& frame = m_page->focusController().focusedOrMainFrame(); 1266 1264 1267 1265 if (PluginView* pluginView = focusedPluginViewForFrame(frame)) { … … 5173 5171 void WebPage::insertTextAsync(const String& text, const EditingRange& replacementEditingRange, InsertTextOptions&& options) 5174 5172 { 5175 platformWillPerformEditingCommand(); 5176 5177 auto& frame = m_page->focusController().focusedOrMainFrame(); 5173 Frame& frame = m_page->focusController().focusedOrMainFrame(); 5178 5174 5179 5175 Ref<Frame> protector(frame); … … 5249 5245 void WebPage::setCompositionAsync(const String& text, const Vector<CompositionUnderline>& underlines, const EditingRange& selection, const EditingRange& replacementEditingRange) 5250 5246 { 5251 platformWillPerformEditingCommand(); 5252 5253 auto& frame = m_page->focusController().focusedOrMainFrame(); 5247 Frame& frame = m_page->focusController().focusedOrMainFrame(); 5254 5248 5255 5249 if (frame.selection().selection().isContentEditable()) { … … 5267 5261 void WebPage::confirmCompositionAsync() 5268 5262 { 5269 platformWillPerformEditingCommand();5270 5271 5263 Frame& frame = m_page->focusController().focusedOrMainFrame(); 5272 5264 frame.editor().confirmComposition(); -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r247470 r247472 1226 1226 void platformDetach(); 1227 1227 void platformEditorState(WebCore::Frame&, EditorState& result, IncludePostLayoutDataHint) const; 1228 void platformWillPerformEditingCommand();1229 1228 void sendEditorStateUpdate(); 1230 1229 … … 1958 1957 }; 1959 1958 1960 #if !PLATFORM(IOS_FAMILY)1961 inline void WebPage::platformWillPerformEditingCommand() { }1962 #endif1963 1964 1959 } // namespace WebKit 1965 1960 -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r247470 r247472 64 64 #import <WebCore/Chrome.h> 65 65 #import <WebCore/ContentChangeObserver.h> 66 #import <WebCore/DOMTimerHoldingTank.h>67 66 #import <WebCore/DataDetection.h> 68 67 #import <WebCore/DiagnosticLoggingClient.h> … … 277 276 } 278 277 279 void WebPage::platformWillPerformEditingCommand()280 {281 auto& frame = m_page->focusController().focusedOrMainFrame();282 if (auto* document = frame.document()) {283 if (auto* holdingTank = document->domTimerHoldingTankIfExists())284 holdingTank->removeAll();285 }286 }287 288 278 FloatSize WebPage::screenSize() const 289 279 {
Note: See TracChangeset
for help on using the changeset viewer.