Changeset 218651 in webkit
- Timestamp:
- Jun 21, 2017, 2:29:21 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 8 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/LayoutTests/ChangeLog ¶
r218648 r218651 1 2017-06-20 Simon Fraser <simon.fraser@apple.com> 2 3 Remove WILL_REVEAL_EDGE_EVENTS code 4 https://bugs.webkit.org/show_bug.cgi?id=173632 5 6 Reviewed by Sam Weinig, Beth Dakin. 7 8 Remove will-reveal-edge events, which never took off. 9 10 * fast/events/will-reveal-edge-on-div-expected.txt: Removed. 11 * fast/events/will-reveal-edge-on-div.html: Removed. 12 * fast/events/will-reveal-edges-body-attributes-expected.txt: Removed. 13 * fast/events/will-reveal-edges-body-attributes.html: Removed. 14 * fast/events/will-reveal-edges-event-listeners-expected.txt: Removed. 15 * fast/events/will-reveal-edges-event-listeners.html: Removed. 16 * fast/events/will-reveal-edges-window-attributes-expected.txt: Removed. 17 * fast/events/will-reveal-edges-window-attributes.html: Removed. 18 1 19 2017-06-21 Simon Fraser <simon.fraser@apple.com> 2 20 -
TabularUnified trunk/Source/WTF/ChangeLog ¶
r218594 r218651 1 2017-06-20 Simon Fraser <simon.fraser@apple.com> 2 3 Remove WILL_REVEAL_EDGE_EVENTS code 4 https://bugs.webkit.org/show_bug.cgi?id=173632 5 6 Reviewed by Sam Weinig, Beth Dakin. 7 8 Remove will-reveal-edge events, which never took off. 9 10 * wtf/FeatureDefines.h: 11 1 12 2017-06-20 Konstantin Tokarev <annulen@yandex.ru> 2 13 -
TabularUnified trunk/Source/WTF/wtf/FeatureDefines.h ¶
r217580 r218651 733 733 #endif 734 734 735 #if !defined(ENABLE_WILL_REVEAL_EDGE_EVENTS)736 #define ENABLE_WILL_REVEAL_EDGE_EVENTS 1737 #endif738 739 735 #if !defined(ENABLE_XSLT) 740 736 #define ENABLE_XSLT 1 -
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r218649 r218651 1 2017-06-20 Simon Fraser <simon.fraser@apple.com> 2 3 Remove WILL_REVEAL_EDGE_EVENTS code 4 https://bugs.webkit.org/show_bug.cgi?id=173632 5 6 Reviewed by Sam Weinig, Beth Dakin. 7 8 Remove will-reveal-edge events, which never took off. 9 10 * dom/Document.cpp: 11 (WebCore::Document::clearScriptedAnimationController): 12 (WebCore::Document::sendWillRevealEdgeEventsIfNeeded): Deleted. 13 * dom/Document.h: 14 * dom/GlobalEventHandlers.idl: 15 * html/HTMLBodyElement.idl: 16 * html/HTMLFrameSetElement.idl: 17 * page/FrameView.cpp: 18 (WebCore::FrameView::scrollPositionChanged): 19 * rendering/RenderLayer.cpp: 20 (WebCore::RenderLayer::scrollTo): 21 1 22 2017-06-21 Daniel Bates <dabates@apple.com> 2 23 -
TabularUnified trunk/Source/WebCore/dom/Document.cpp ¶
r218603 r218651 6271 6271 m_scriptedAnimationController = nullptr; 6272 6272 } 6273 6274 void Document::sendWillRevealEdgeEventsIfNeeded(const IntPoint& oldPosition, const IntPoint& newPosition, const IntRect& visibleRect, const IntSize& contentsSize, Element* target)6275 {6276 // For each edge (top, bottom, left and right), send the will reveal edge event for that direction6277 // if newPosition is at or beyond the notification point, if the scroll direction is heading in the6278 // direction of that edge point, and if oldPosition is before the notification point (which indicates6279 // that this is the first moment that we know we crossed the magic line).6280 6281 #if ENABLE(WILL_REVEAL_EDGE_EVENTS)6282 // FIXME: broken in RTL documents.6283 int willRevealBottomNotificationPoint = std::max(0, contentsSize.height() - 2 * visibleRect.height());6284 int willRevealTopNotificationPoint = visibleRect.height();6285 6286 // Bottom edge.6287 if (newPosition.y() >= willRevealBottomNotificationPoint && newPosition.y() > oldPosition.y()6288 && willRevealBottomNotificationPoint >= oldPosition.y()) {6289 Ref<Event> willRevealEvent = Event::create(eventNames().webkitwillrevealbottomEvent, false, false);6290 if (!target)6291 enqueueWindowEvent(WTFMove(willRevealEvent));6292 else {6293 willRevealEvent->setTarget(target);6294 m_eventQueue.enqueueEvent(WTFMove(willRevealEvent));6295 }6296 }6297 6298 // Top edge.6299 if (newPosition.y() <= willRevealTopNotificationPoint && newPosition.y() < oldPosition.y()6300 && willRevealTopNotificationPoint <= oldPosition.y()) {6301 Ref<Event> willRevealEvent = Event::create(eventNames().webkitwillrevealtopEvent, false, false);6302 if (!target)6303 enqueueWindowEvent(WTFMove(willRevealEvent));6304 else {6305 willRevealEvent->setTarget(target);6306 m_eventQueue.enqueueEvent(WTFMove(willRevealEvent));6307 }6308 }6309 6310 int willRevealRightNotificationPoint = std::max(0, contentsSize.width() - 2 * visibleRect.width());6311 int willRevealLeftNotificationPoint = visibleRect.width();6312 6313 // Right edge.6314 if (newPosition.x() >= willRevealRightNotificationPoint && newPosition.x() > oldPosition.x()6315 && willRevealRightNotificationPoint >= oldPosition.x()) {6316 Ref<Event> willRevealEvent = Event::create(eventNames().webkitwillrevealrightEvent, false, false);6317 if (!target)6318 enqueueWindowEvent(WTFMove(willRevealEvent));6319 else {6320 willRevealEvent->setTarget(target);6321 m_eventQueue.enqueueEvent(WTFMove(willRevealEvent));6322 }6323 }6324 6325 // Left edge.6326 if (newPosition.x() <= willRevealLeftNotificationPoint && newPosition.x() < oldPosition.x()6327 && willRevealLeftNotificationPoint <= oldPosition.x()) {6328 Ref<Event> willRevealEvent = Event::create(eventNames().webkitwillrevealleftEvent, false, false);6329 if (!target)6330 enqueueWindowEvent(WTFMove(willRevealEvent));6331 else {6332 willRevealEvent->setTarget(target);6333 m_eventQueue.enqueueEvent(WTFMove(willRevealEvent));6334 }6335 }6336 #else6337 UNUSED_PARAM(oldPosition);6338 UNUSED_PARAM(newPosition);6339 UNUSED_PARAM(visibleRect);6340 UNUSED_PARAM(contentsSize);6341 UNUSED_PARAM(target);6342 #endif6343 }6344 6273 6345 6274 void Document::wheelEventHandlersChanged() -
TabularUnified trunk/Source/WebCore/dom/Document.h ¶
r218603 r218651 1165 1165 void serviceScriptedAnimations(double timestamp); 1166 1166 1167 void sendWillRevealEdgeEventsIfNeeded(const IntPoint& oldPosition, const IntPoint& newPosition, const IntRect& visibleRect, const IntSize& contentsSize, Element* target = nullptr);1168 1169 1167 EventTarget* errorEventTarget() final; 1170 1168 void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, RefPtr<Inspector::ScriptCallStack>&&) final; -
TabularUnified trunk/Source/WebCore/dom/GlobalEventHandlers.idl ¶
r216540 r218651 123 123 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcewillbegin; 124 124 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforceup; 125 [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealbottom;126 [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealleft;127 [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealright;128 [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealtop;129 125 }; -
TabularUnified trunk/Source/WebCore/html/HTMLBodyElement.idl ¶
r215330 r218651 40 40 [NotEnumerable, WindowEventHandler, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcewillbegin; 41 41 [NotEnumerable, WindowEventHandler, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforceup; 42 [NotEnumerable, WindowEventHandler, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealbottom;43 [NotEnumerable, WindowEventHandler, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealleft;44 [NotEnumerable, WindowEventHandler, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealright;45 [NotEnumerable, WindowEventHandler, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealtop;46 42 47 43 // Unique to Document and HTMLBodyElement -
TabularUnified trunk/Source/WebCore/html/HTMLFrameSetElement.idl ¶
r218126 r218651 32 32 [NotEnumerable, WindowEventHandler] attribute EventHandler onscroll; 33 33 34 [NotEnumerable, WindowEventHandler, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealbottom;35 [NotEnumerable, WindowEventHandler, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealleft;36 [NotEnumerable, WindowEventHandler, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealright;37 [NotEnumerable, WindowEventHandler, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealtop;38 39 34 // Non-standard named getter 40 35 // FIXME: This is not in the standard, can we remove this? -
TabularUnified trunk/Source/WebCore/page/FrameView.cpp ¶
r218509 r218651 2541 2541 void FrameView::scrollPositionChanged(const ScrollPosition& oldPosition, const ScrollPosition& newPosition) 2542 2542 { 2543 UNUSED_PARAM(oldPosition); 2544 UNUSED_PARAM(newPosition); 2545 2543 2546 Page* page = frame().page(); 2544 2547 Seconds throttlingDelay = page ? page->chrome().client().eventThrottlingDelay() : 0_s; … … 2549 2552 } else if (!m_delayedScrollEventTimer.isActive()) 2550 2553 m_delayedScrollEventTimer.startOneShot(throttlingDelay); 2551 2552 if (Document* document = frame().document())2553 document->sendWillRevealEdgeEventsIfNeeded(oldPosition, newPosition, visibleContentRect(), contentsSize());2554 2554 2555 2555 if (RenderView* renderView = this->renderView()) { -
TabularUnified trunk/Source/WebCore/rendering/RenderLayer.cpp ¶
r218396 r218651 2407 2407 } 2408 2408 2409 ScrollPosition oldPosition = IntPoint(m_scrollPosition);2410 2409 m_scrollPosition = newPosition; 2411 2410 … … 2458 2457 2459 2458 // Schedule the scroll and scroll-related DOM events. 2460 if (Element* element = renderer().element()) {2459 if (Element* element = renderer().element()) 2461 2460 element->document().eventQueue().enqueueOrDispatchScrollEvent(*element); 2462 element->document().sendWillRevealEdgeEventsIfNeeded(oldPosition, newPosition, visibleContentRect(), contentsSize(), element);2463 }2464 2461 2465 2462 if (scrollsOverflow())
Note:
See TracChangeset
for help on using the changeset viewer.