{"push_id":2765910473,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"8e6f62a3b8a57bbe28d36321ee2ceb8a853bb19e","before":"22222a0aaf2177ab8f7ea947f4705437cc927e41","commits":[{"sha":"8e6f62a3b8a57bbe28d36321ee2ceb8a853bb19e","author":{"name":"timothy_horton@apple.com","email":"f6a40302e70d3875826ddafd7e450bcee2d7be56@apple.com"},"message":"Using the keyboard arrow keys to scroll a webpage is very slow, not smooth, takes too long\nhttps://bugs.webkit.org/show_bug.cgi?id=188239\n<rdar://problem/22997654>\n\nReviewed by Simon Fraser.\n\nSource/WebCore/PAL:\n\n* pal/spi/cocoa/QuartzCoreSPI.h:\nAdd a piece of SPI.\n\nSource/WebKit:\n\nInstead of depending on key repeat to drive scrolling with arrow keys held down,\nrun a display link that animates the scroll. We still do a single discrete scroll\nfirst (so that you can tap the key and shift by line/page), but then on the first\nrepeat we ramp up to a constant velocity determined by the desired increment,\nstopping when the key is lifted or a different key is pressed.\n\n* UIProcess/API/Cocoa/WKWebView.mm:\n(-[WKWebView _scrollByContentOffset:animated:]):\n(-[WKWebView _scrollByContentOffset:]): Deleted.\n* UIProcess/API/Cocoa/WKWebViewInternal.h:\nAdd animated parameter to scrollByContentOffset, and plumb it through to UIScrollView.\n\n* UIProcess/ios/WKContentViewInteraction.h:\nAdd a WKKeyboardScrollingAnimator member.\nConform to WKKeyboardScrollable.\n\n* UIProcess/ios/WKContentViewInteraction.mm:\n(-[WKContentView setupInteraction]):\nInstall the WKKeyboardScrollingAnimator.\n\n(-[WKContentView cleanupInteraction]):\nUninstall the WKKeyboardScrollingAnimator.\n\n(-[WKContentView unscaledView]):\nFix a stupid style nit.\n\n(-[WKContentView handleKeyWebEvent:]):\nGive WKKeyboardScrollingAnimator the first shot at incoming keyboard events.\nIt will only consume events here if it's already performing a scrolling animation\n(because otherwise they should go straight through to the page).\n\n(-[WKContentView _interpretKeyEvent:isCharEvent:]):\nGive WKKeyboardScrollingAnimator a shot at handling keyboard events that\nthe web content did not handle. We will only start a scrolling animation\nif the page did not handle an event that would start a scroll.\n\n(-[WKContentView isKeyboardScrollable]):\nPart of WKKeyboardScrollable; only report ourselves as scrollable if\nwe would previously have allowed scrolling from keyboard events (if\nwe're not in contenteditable, and don't have a <select> focused).\n\n(-[WKContentView distanceForScrollingIncrement:]):\nPart of WKKeyboardScrollable; compute the distance for each scrolling increment.\n\n(-[WKContentView scrollByContentOffset:animated:]):\nPart of WKKeyboardScrollable; plumb scrolls up to WKWebView.\n\n(-[WKContentView _scrollOffsetForEvent:]): Moved to WKKeyboardScrollingAnimator.mm.\n\n* UIProcess/ios/WKKeyboardScrollingAnimator.h: Added.\n* UIProcess/ios/WKKeyboardScrollingAnimator.mm: Added.\n(-[WKKeyboardScrollingAnimator init]):\n(-[WKKeyboardScrollingAnimator initWithScrollable:]):\n(-[WKKeyboardScrollingAnimator invalidate]):\n(-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]):\nCompute the scroll offset given a particular event. This is moved from WKContentView;\notherwise the primary change is that it now asks the WKKeyboardScrollable\nfor the distance instead of computing it directly.\n\n(-[WKKeyboardScrollingAnimator beginWithEvent:]):\nIf we're currently in the initial state (WaitingForFirstEvent), and\na given event should start a scroll, transition into WaitingForRepeat,\nand do a single animated scroll of the appropriate distance.\n\n(-[WKKeyboardScrollingAnimator handleKeyEvent:]):\nIf this key event should terminate a scroll (because it is either a keyup\nor a non-scrolling keydown), shut down any running animations.\n\nIf this is the first key repeat after the initial scroll, start a scrolling\nanimation.\n\nEat the event if it either started or continued a scroll.\n\n(-[WKKeyboardScrollingAnimator startAnimatedScroll]):\n(-[WKKeyboardScrollingAnimator stopAnimatedScroll]):\nHelpers to start and stop the display link and do some bookkeeping.\n\n(-[WKKeyboardScrollingAnimator displayLinkFired:]):\nAsk the WKKeyboardScrollable to scroll the content based on the frame time,\nan acceleration curve, and the current animation's scrolling increment.\n\n* WebKit.xcodeproj/project.pbxproj:\n\n\ngit-svn-id: http://svn.webkit.org/repository/webkit/trunk@234488 268f45cc-cd09-0410-ab3c-d52691b4dbfc","distinct":true,"url":"https://api.github.com/repos/paul99/webkit-mips/commits/8e6f62a3b8a57bbe28d36321ee2ceb8a853bb19e"}]}
{"actor":{"display_login":"kisg"}}