Changeset 247472 in webkit


Ignore:
Timestamp:
Jul 15, 2019 9:27:53 PM (5 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r247444.

Caused two scrolling tests to fail on iOS Simulator

Reverted changeset:

"Typing into a cell in a Google Sheet lags behind by one
character"
https://bugs.webkit.org/show_bug.cgi?id=199587
https://trac.webkit.org/changeset/247444

Location:
trunk
Files:
4 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r247471 r247472  
     12019-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
    1142019-07-15  Keith Miller  <keith_miller@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r247470 r247472  
     12019-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
    1142019-07-15  Zalan Bujtas  <zalan@apple.com>
    215
  • trunk/Source/WebCore/SourcesCocoa.txt

    r247444 r247472  
    132132
    133133page/ios/ContentChangeObserver.cpp
    134 page/ios/DOMTimerHoldingTank.cpp
    135134page/ios/EventHandlerIOS.mm
    136135page/ios/FrameIOS.mm
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r247452 r247472  
    41484148                CE08C3D2152B599A0021B8C2 /* AlternativeTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = CE08C3D0152B599A0021B8C2 /* AlternativeTextController.h */; settings = {ATTRIBUTES = (); }; };
    41494149                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, ); }; };
    41514150                CE2849871CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h in Headers */ = {isa = PBXBuildFile; fileRef = CE2849861CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h */; };
    41524151                CE5169E721F1B84700EA4F78 /* ColorIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = CE5169E521F1B84700EA4F78 /* ColorIOS.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    1381113810                CE1866421F72E5B400A0CAB6 /* MarkedText.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MarkedText.cpp; sourceTree = "<group>"; };
    1381213811                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>"; };
    1381513812                CE2849861CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContentSecurityPolicyDirectiveNames.h; path = csp/ContentSecurityPolicyDirectiveNames.h; sourceTree = "<group>"; };
    1381613813                CE2849881CA3614600B4A57F /* ContentSecurityPolicyDirectiveNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContentSecurityPolicyDirectiveNames.cpp; path = csp/ContentSecurityPolicyDirectiveNames.cpp; sourceTree = "<group>"; };
     
    1653216529                                6FE9F09222211035004C5082 /* ContentChangeObserver.cpp */,
    1653316530                                6FB5E212221F2447003989CF /* ContentChangeObserver.h */,
    16534                                 CE1A501E22D5350900CBC927 /* DOMTimerHoldingTank.cpp */,
    16535                                 CE1A501D22D5350900CBC927 /* DOMTimerHoldingTank.h */,
    1653616531                                FE6938B51045D67E008EABB6 /* EventHandlerIOS.mm */,
    1653716532                                FED13D3B0CEA936A00D89466 /* FrameIOS.mm */,
     
    2897828973                                BC64640A11D7F304006455B0 /* DOMStringMap.h in Headers */,
    2897928974                                188604B40F2E654A000B6443 /* DOMTimer.h in Headers */,
    28980                                 CE1A501F22D5350900CBC927 /* DOMTimerHoldingTank.h in Headers */,
    2898128975                                05FD69E012845D4300B2BEB3 /* DOMTimeStamp.h in Headers */,
    2898228976                                76FC2B0C12370DA0006A991A /* DOMTokenList.h in Headers */,
  • trunk/Source/WebCore/dom/Document.cpp

    r247444 r247472  
    263263#include "ContentChangeObserver.h"
    264264#include "CSSFontSelector.h"
    265 #include "DOMTimerHoldingTank.h"
    266265#include "DeviceMotionClientIOS.h"
    267266#include "DeviceMotionController.h"
     
    81888187
    81898188#if PLATFORM(IOS_FAMILY)
    8190 
    81918189ContentChangeObserver& Document::contentChangeObserver()
    81928190{
     
    81958193    return *m_contentChangeObserver;
    81968194}
    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 
    82068195#endif
    82078196
  • trunk/Source/WebCore/dom/Document.h

    r247444 r247472  
    107107class DOMImplementation;
    108108class DOMSelection;
    109 class DOMTimerHoldingTank;
    110109class DOMWindow;
    111110class DOMWrapperWorld;
     
    885884
    886885    WEBCORE_EXPORT ContentChangeObserver& contentChangeObserver();
    887 
    888     DOMTimerHoldingTank* domTimerHoldingTankIfExists() { return m_domTimerHoldingTank.get(); }
    889     DOMTimerHoldingTank& domTimerHoldingTank();
    890886#endif
    891887   
     
    20492045#if PLATFORM(IOS_FAMILY)
    20502046    std::unique_ptr<ContentChangeObserver> m_contentChangeObserver;
    2051     std::unique_ptr<DOMTimerHoldingTank> m_domTimerHoldingTank;
    20522047#endif
    20532048
  • trunk/Source/WebCore/page/DOMTimer.cpp

    r247444 r247472  
    4444#if PLATFORM(IOS_FAMILY)
    4545#include "ContentChangeObserver.h"
    46 #include "DOMTimerHoldingTank.h"
    4746#endif
    4847
     
    198197        nestedTimers->add(timer->m_timeoutId, *timer);
    199198#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);
    206201#endif
    207202    return timer->m_timeoutId;
     
    219214    if (is<Document>(context)) {
    220215        auto& document = downcast<Document>(context);
    221         if (auto* timer = document.findTimeout(timeoutId)) {
     216        if (auto* timer = document.findTimeout(timeoutId))
    222217            document.contentChangeObserver().didRemoveDOMTimer(*timer);
    223             if (auto* holdingTank = document.domTimerHoldingTankIfExists())
    224                 holdingTank->remove(*timer);
    225         }
    226218    }
    227219#endif
     
    292284    ASSERT(scriptExecutionContext());
    293285    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 #endif
    305286
    306287    DOMTimerFireState fireState(context, std::min(m_nestingLevel + 1, maxTimerNestingLevel));
  • trunk/Source/WebCore/page/EventHandler.cpp

    r247444 r247472  
    132132#endif
    133133
    134 #if PLATFORM(IOS_FAMILY)
    135 #include "DOMTimerHoldingTank.h"
    136 #endif
    137 
    138134namespace WebCore {
    139135
     
    33463342        keydown->stopPropagation();
    33473343
    3348 #if PLATFORM(IOS_FAMILY)
    3349     DeferDOMTimersForScope deferralScope { m_frame.document()->quirks().needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand() };
    3350 #endif
    3351 
    33523344    element->dispatchEvent(keydown);
    33533345    if (handledByInputMethod)
  • trunk/Source/WebCore/page/Quirks.cpp

    r247470 r247472  
    318318}
    319319
    320 bool Quirks::needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand() const
    321 {
    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 #else
    332     return false;
    333 #endif
    334 }
    335 
    336320// FIXME(<rdar://problem/50394969>): Remove after desmos.com adopts inputmode="none".
    337321bool Quirks::needsInputModeNoneImplicitly(const HTMLElement& element) const
  • trunk/Source/WebCore/page/Quirks.h

    r247470 r247472  
    5555    bool shouldDisablePointerEventsQuirk() const;
    5656    bool needsInputModeNoneImplicitly(const HTMLElement&) const;
    57     bool needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand() const;
    5857
    5958    WEBCORE_EXPORT bool shouldDispatchSyntheticMouseEventsWhenModifyingSelection() const;
  • trunk/Source/WebCore/page/Settings.yaml

    r247453 r247472  
    163163  initial: false
    164164
    165 # This is an iOS-specific quirk. Unlike Mac, keyboard operations are asynchronous and hence a DOM update as
    166 # a result of text insertion or deletion does not occur within the same event loop iteration as a dispatched
    167 # DOM keydown event. Some sites, notably Google Sheets, schedule timers on keypress and expect on a DOM update
    168 # to have occurred on expiration. When enabled, this quirk puts all such scheduled timers in a holding tank
    169 # until the keyboard performs the insertion or deletion. This gives Google Sheets the illusion that the DOM
    170 # update happened within the same event loop iteration that the keypress event was dispatched in.
    171 needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommandQuirk:
    172   initial: false
    173 
    174165treatsAnyTextCSSLinkAsStylesheet:
    175166  initial: false
  • trunk/Source/WebKit/ChangeLog

    r247470 r247472  
     12019-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
    1142019-07-15  Zalan Bujtas  <zalan@apple.com>
    215
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r247444 r247472  
    12611261void WebPage::executeEditingCommand(const String& commandName, const String& argument)
    12621262{
    1263     platformWillPerformEditingCommand();
    1264 
    1265     auto& frame = m_page->focusController().focusedOrMainFrame();
     1263    Frame& frame = m_page->focusController().focusedOrMainFrame();
    12661264
    12671265    if (PluginView* pluginView = focusedPluginViewForFrame(frame)) {
     
    51735171void WebPage::insertTextAsync(const String& text, const EditingRange& replacementEditingRange, InsertTextOptions&& options)
    51745172{
    5175     platformWillPerformEditingCommand();
    5176 
    5177     auto& frame = m_page->focusController().focusedOrMainFrame();
     5173    Frame& frame = m_page->focusController().focusedOrMainFrame();
    51785174
    51795175    Ref<Frame> protector(frame);
     
    52495245void WebPage::setCompositionAsync(const String& text, const Vector<CompositionUnderline>& underlines, const EditingRange& selection, const EditingRange& replacementEditingRange)
    52505246{
    5251     platformWillPerformEditingCommand();
    5252 
    5253     auto& frame = m_page->focusController().focusedOrMainFrame();
     5247    Frame& frame = m_page->focusController().focusedOrMainFrame();
    52545248
    52555249    if (frame.selection().selection().isContentEditable()) {
     
    52675261void WebPage::confirmCompositionAsync()
    52685262{
    5269     platformWillPerformEditingCommand();
    5270 
    52715263    Frame& frame = m_page->focusController().focusedOrMainFrame();
    52725264    frame.editor().confirmComposition();
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r247470 r247472  
    12261226    void platformDetach();
    12271227    void platformEditorState(WebCore::Frame&, EditorState& result, IncludePostLayoutDataHint) const;
    1228     void platformWillPerformEditingCommand();
    12291228    void sendEditorStateUpdate();
    12301229
     
    19581957};
    19591958
    1960 #if !PLATFORM(IOS_FAMILY)
    1961 inline void WebPage::platformWillPerformEditingCommand() { }
    1962 #endif
    1963 
    19641959} // namespace WebKit
    19651960
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r247470 r247472  
    6464#import <WebCore/Chrome.h>
    6565#import <WebCore/ContentChangeObserver.h>
    66 #import <WebCore/DOMTimerHoldingTank.h>
    6766#import <WebCore/DataDetection.h>
    6867#import <WebCore/DiagnosticLoggingClient.h>
     
    277276}
    278277
    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 
    288278FloatSize WebPage::screenSize() const
    289279{
Note: See TracChangeset for help on using the changeset viewer.