Changeset 218651 in webkit


Ignore:
Timestamp:
Jun 21, 2017, 2:29:21 PM (8 years ago)
Author:
Simon Fraser
Message:

Remove WILL_REVEAL_EDGE_EVENTS code
https://bugs.webkit.org/show_bug.cgi?id=173632

Reviewed by Sam Weinig, Beth Dakin.

Remove will-reveal-edge events, which never took off.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::clearScriptedAnimationController):
(WebCore::Document::sendWillRevealEdgeEventsIfNeeded): Deleted.

  • dom/Document.h:
  • dom/GlobalEventHandlers.idl:
  • html/HTMLBodyElement.idl:
  • html/HTMLFrameSetElement.idl:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollPositionChanged):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollTo):

Source/WTF:

  • wtf/FeatureDefines.h:

LayoutTests:

  • fast/events/will-reveal-edge-on-div-expected.txt: Removed.
  • fast/events/will-reveal-edge-on-div.html: Removed.
  • fast/events/will-reveal-edges-body-attributes-expected.txt: Removed.
  • fast/events/will-reveal-edges-body-attributes.html: Removed.
  • fast/events/will-reveal-edges-event-listeners-expected.txt: Removed.
  • fast/events/will-reveal-edges-event-listeners.html: Removed.
  • fast/events/will-reveal-edges-window-attributes-expected.txt: Removed.
  • fast/events/will-reveal-edges-window-attributes.html: Removed.
Location:
trunk
Files:
8 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LayoutTests/ChangeLog

    r218648 r218651  
     12017-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
    1192017-06-21  Simon Fraser  <simon.fraser@apple.com>
    220
  • TabularUnified trunk/Source/WTF/ChangeLog

    r218594 r218651  
     12017-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
    1122017-06-20  Konstantin Tokarev  <annulen@yandex.ru>
    213
  • TabularUnified trunk/Source/WTF/wtf/FeatureDefines.h

    r217580 r218651  
    733733#endif
    734734
    735 #if !defined(ENABLE_WILL_REVEAL_EDGE_EVENTS)
    736 #define ENABLE_WILL_REVEAL_EDGE_EVENTS 1
    737 #endif
    738 
    739735#if !defined(ENABLE_XSLT)
    740736#define ENABLE_XSLT 1
  • TabularUnified trunk/Source/WebCore/ChangeLog

    r218649 r218651  
     12017-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
    1222017-06-21  Daniel Bates  <dabates@apple.com>
    223
  • TabularUnified trunk/Source/WebCore/dom/Document.cpp

    r218603 r218651  
    62716271    m_scriptedAnimationController = nullptr;
    62726272}
    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 direction
    6277     // if newPosition is at or beyond the notification point, if the scroll direction is heading in the
    6278     // direction of that edge point, and if oldPosition is before the notification point (which indicates
    6279     // 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 #else
    6337     UNUSED_PARAM(oldPosition);
    6338     UNUSED_PARAM(newPosition);
    6339     UNUSED_PARAM(visibleRect);
    6340     UNUSED_PARAM(contentsSize);
    6341     UNUSED_PARAM(target);
    6342 #endif
    6343 }
    63446273
    63456274void Document::wheelEventHandlersChanged()
  • TabularUnified trunk/Source/WebCore/dom/Document.h

    r218603 r218651  
    11651165    void serviceScriptedAnimations(double timestamp);
    11661166
    1167     void sendWillRevealEdgeEventsIfNeeded(const IntPoint& oldPosition, const IntPoint& newPosition, const IntRect& visibleRect, const IntSize& contentsSize, Element* target = nullptr);
    1168 
    11691167    EventTarget* errorEventTarget() final;
    11701168    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  
    123123    [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcewillbegin;
    124124    [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;
    129125};
  • TabularUnified trunk/Source/WebCore/html/HTMLBodyElement.idl

    r215330 r218651  
    4040    [NotEnumerable, WindowEventHandler, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcewillbegin;
    4141    [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;
    4642
    4743    // Unique to Document and HTMLBodyElement
  • TabularUnified trunk/Source/WebCore/html/HTMLFrameSetElement.idl

    r218126 r218651  
    3232    [NotEnumerable, WindowEventHandler] attribute EventHandler onscroll;
    3333
    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    
    3934    // Non-standard named getter
    4035    // FIXME: This is not in the standard, can we remove this?
  • TabularUnified trunk/Source/WebCore/page/FrameView.cpp

    r218509 r218651  
    25412541void FrameView::scrollPositionChanged(const ScrollPosition& oldPosition, const ScrollPosition& newPosition)
    25422542{
     2543    UNUSED_PARAM(oldPosition);
     2544    UNUSED_PARAM(newPosition);
     2545
    25432546    Page* page = frame().page();
    25442547    Seconds throttlingDelay = page ? page->chrome().client().eventThrottlingDelay() : 0_s;
     
    25492552    } else if (!m_delayedScrollEventTimer.isActive())
    25502553        m_delayedScrollEventTimer.startOneShot(throttlingDelay);
    2551 
    2552     if (Document* document = frame().document())
    2553         document->sendWillRevealEdgeEventsIfNeeded(oldPosition, newPosition, visibleContentRect(), contentsSize());
    25542554
    25552555    if (RenderView* renderView = this->renderView()) {
  • TabularUnified trunk/Source/WebCore/rendering/RenderLayer.cpp

    r218396 r218651  
    24072407    }
    24082408   
    2409     ScrollPosition oldPosition = IntPoint(m_scrollPosition);
    24102409    m_scrollPosition = newPosition;
    24112410
     
    24582457
    24592458    // Schedule the scroll and scroll-related DOM events.
    2460     if (Element* element = renderer().element()) {
     2459    if (Element* element = renderer().element())
    24612460        element->document().eventQueue().enqueueOrDispatchScrollEvent(*element);
    2462         element->document().sendWillRevealEdgeEventsIfNeeded(oldPosition, newPosition, visibleContentRect(), contentsSize(), element);
    2463     }
    24642461
    24652462    if (scrollsOverflow())
Note: See TracChangeset for help on using the changeset viewer.