1. 16 Feb, 2011 1 commit
  2. 15 Feb, 2011 1 commit
  3. 12 Nov, 2010 1 commit
    • dglazkov@chromium.org's avatar
      2010-11-05 Dimitri Glazkov <dglazkov@chromium.org> · 22000f6d
      dglazkov@chromium.org authored
              Reviewed by Darin Adler.
      
              Implement shadow DOM-aware event targeting and introduce EventContext to track the context of each event dispatch.
              https://bugs.webkit.org/show_bug.cgi?id=46015
      
              Added more test coverage around events crossing shadow DOM boundaries and tweaked existing tests.
      
              * fast/events/shadow-boundary-crossing-2-expected.txt: Added.
              * fast/events/shadow-boundary-crossing-2.html: Added.
              * fast/events/shadow-boundary-crossing.html: Tuned to better reflect its point:
                  the event should indeed fire (it used to be swallowed), but its target
                  should be a non-shadow node.
              * media/audio-delete-while-slider-thumb-clicked.html :  Tweaked to actually click on
                  the scrubber thumb (it was off by 2 pixels).
      2010-11-05  Dimitri Glazkov  <dglazkov@chromium.org>
      
              Reviewed by Darin Adler.
      
              Implement shadow DOM-aware event targeting and introduce EventContext to track the context of each event dispatch.
              https://bugs.webkit.org/show_bug.cgi?id=46015
      
              Test: fast/events/shadow-boundary-crossing-2.html
      
              This patch adds the notion of EventContext (and a very similar-acting WindowEventContext, specifically
              for DOMWindow), an abstraction that carries information around dispatching an event for any given Node.
      
              This abstraction is necessary to ensure that events, fired from shadow DOM nodes are properly retargeted to
              appear as if they are coming from their host, thus never exposing the shadow DOM nodes to the world outside.
      
              * Android.mk: Added EventContext, WindowEventContext files.
              * CMakeLists.txt: Ditto.
              * GNUmakefile.am: Ditto.
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * dom/ContainerNode.cpp:
              (WebCore::notifyChildInserted): Changed to be shadow DOM-aware.
              * dom/EventContext.cpp: Added.
              * dom/EventContext.h: Added.
              * dom/Node.cpp:
              (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Changed to be shadow DOM-aware.
              (WebCore::Node::createRendererIfNeeded): Ditto.
              (WebCore::Node::parentOrHostNode): Added new helper method.
              (WebCore::Node::enclosingLinkEventParentOrSelf): Changed to be shadow DOM-aware.
              (WebCore::eventTargetRespectingSVGTargetRules): Collapsed two helper methods into one.
              (WebCore::Node::getEventAncestors): Renamed and refactored to collect a vector of EventContexts.
              (WebCore::Node::topEventContext): Added.
              (WebCore::eventHasListeners): Changed to use EventContexts.
              (WebCore::Node::dispatchGenericEvent): Ditto.
              * dom/Node.h: Removed eventParentNode that's no longer needed, added parentOrHostNode decl,
                  and changed signature of eventAncestors to use EventContexts.
              * dom/Text.cpp:
              (WebCore::Text::createRenderer): Changed to be shadow DOM-aware.
              * dom/WindowEventContext.cpp: Added.
              * dom/WindowEventContext.h: Added.
              * inspector/InspectorDOMAgent.cpp:
              (WebCore::InspectorDOMAgent::getEventListenersForNode): Changed to use EventContexts.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::updateMouseEventTargetNode): Removed code that's no longer necessary.
              * rendering/RenderTextControlMultiLine.cpp:
              (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Removed event invocation that's
                  no longer necessary.
              * rendering/ShadowElement.h: Made m_shadowParent a RefPtr to avoid stale references when parent
              is deleted.
              * rendering/TextControlInnerElements.cpp:
              (WebCore::TextControlInnerTextElement::defaultEventHandler): Flipped the condition back
                  from where it was prior to r60418.
              * svg/SVGElement.cpp: Removed eventParentNode that's no longer needed.
              * svg/SVGElement.h: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22000f6d
  4. 03 Nov, 2010 2 commits
    • dglazkov@chromium.org's avatar
      2010-11-03 Dimitri Glazkov <dglazkov@chromium.org> · 08804846
      dglazkov@chromium.org authored
              Reverting r71244. Broke default event handling inside text fields.
              https://bugs.webkit.org/show_bug.cgi?id=46015
      
              * fast/events/shadow-boundary-crossing.html: Reverted changes.
              * media/audio-delete-while-slider-thumb-clicked.html: Reverted changes.
      2010-11-03  Dimitri Glazkov  <dglazkov@chromium.org>
      
              Reverting r71244, r71248 and r71250. Broke default event handling inside text fields.
              https://bugs.webkit.org/show_bug.cgi?id=46015
      
              * Android.mk:
              * CMakeLists.txt:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * dom/ContainerNode.cpp:
              (WebCore::notifyChildInserted):
              * dom/DOMAllInOne.cpp:
              * dom/EventContext.cpp: Removed.
              * dom/EventContext.h: Removed.
              * dom/Node.cpp:
              (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
              (WebCore::Node::createRendererIfNeeded):
              (WebCore::Node::eventParentNode):
              (WebCore::Node::enclosingLinkEventParentOrSelf):
              (WebCore::eventTargetAsSVGElementInstance):
              (WebCore::eventTargetRespectingSVGTargetRules):
              (WebCore::Node::eventAncestors):
              (WebCore::Node::dispatchGenericEvent):
              * dom/Node.h:
              * dom/Text.cpp:
              (WebCore::Text::createRenderer):
              * dom/WindowEventContext.cpp: Removed.
              * dom/WindowEventContext.h: Removed.
              * inspector/InspectorDOMAgent.cpp:
              (WebCore::InspectorDOMAgent::getEventListenersForNode):
              * inspector/InspectorInstrumentation.cpp:
              (WebCore::eventHasListeners):
              (WebCore::InspectorInstrumentation::willDispatchEventImpl):
              * inspector/InspectorInstrumentation.h:
              (WebCore::InspectorInstrumentation::willDispatchEvent):
              * page/EventHandler.cpp:
              (WebCore::EventHandler::updateMouseEventTargetNode):
              * rendering/ShadowElement.h:
              (WebCore::ShadowElement::shadowParent):
              (WebCore::ShadowElement::shadowParentNode):
              * svg/SVGElement.cpp:
              (WebCore::SVGElement::eventParentNode):
              * svg/SVGElement.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08804846
    • dglazkov@chromium.org's avatar
      2010-11-03 Dimitri Glazkov <dglazkov@chromium.org> · a6a30a39
      dglazkov@chromium.org authored
              Reviewed by Darin Adler.
      
              Implement shadow DOM-aware event targeting and introduce EventContext to track the context of each event dispatch.
              https://bugs.webkit.org/show_bug.cgi?id=46015
      
              Tuned shadow-boundary-crossing.html to better reflect its point: the event should indeed fire (it used to be swallowed),
              but its target should be a non-shadow node.
      
              Tweaked audio-delete-while-slider-thumb-clicked.html to actually click on
              the scrubber thumb (it was off by 2 pixels).
      
              * fast/events/shadow-boundary-crossing.html: Modified the test.
              * media/audio-delete-while-slider-thumb-clicked.html : Ditto.
      2010-11-03  Dimitri Glazkov  <dglazkov@chromium.org>
      
              Reviewed by Darin Adler.
      
              Implement shadow DOM-aware event targeting and introduce EventContext to track the context of each event dispatch.
              https://bugs.webkit.org/show_bug.cgi?id=46015
      
              This patch adds the notion of EventContext (and a very similar-acting WindowEventContext, specifically
              for DOMWindow), an abstraction that carries information around dispatching an event for any given Node.
      
              This abstraction is necessary to ensure that events, fired from shadow DOM nodes are properly retargeted to
              appear as if they are coming from their host, thus never exposing the shadow DOM nodes to the world outside.
      
              * Android.mk: Added EventContext, WindowEventContext files.
              * CMakeLists.txt: Ditto.
              * GNUmakefile.am: Ditto.
              * WebCore.gypi: Ditto.
              * WebCore.pro: Ditto.
              * WebCore.xcodeproj/project.pbxproj: Ditto.
              * WebCore.vcproj/WebCore.vcproj: Ditto.
              * dom/ContainerNode.cpp:
              (WebCore::notifyChildInserted): Changed to be shadow DOM-aware.
              * dom/EventContext.cpp: Added.
              * dom/EventContext.h: Added.
              * dom/Node.cpp:
              (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Changed to be shadow DOM-aware.
              (WebCore::Node::createRendererIfNeeded): Ditto.
              (WebCore::Node::parentOrHostNode): Added new helper method.
              (WebCore::Node::enclosingLinkEventParentOrSelf): Changed to be shadow DOM-aware.
              (WebCore::eventTargetRespectingSVGTargetRules): Collapsed two helper methods into one.
              (WebCore::Node::eventAncestors): Refactored to collect a vector of EventContexts.
              (WebCore::Node::topEventContext): Added.
              (WebCore::eventHasListeners): Changed to use EventContexts.
              (WebCore::Node::dispatchGenericEvent): Ditto.
              * dom/Node.h: Removed eventParentNode that's no longer needed, added parentOrHostNode decl,
                  and changed signature of eventAncestors to use EventContexts.
              * dom/Text.cpp:
              (WebCore::Text::createRenderer): Changed to be shadow DOM-aware.
              * inspector/InspectorDOMAgent.cpp:
              (WebCore::InspectorDOMAgent::getEventListenersForNode): Changed to use EventContexts.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::updateMouseEventTargetNode): Removed code that's no longer necessary.
              * rendering/ShadowElement.h: Made m_shadowParent a RefPtr to avoid stale references when parent
              is deleted.
              * svg/SVGElement.cpp: Removed eventParentNode that's no longer needed.
              * svg/SVGElement.h: Ditto.
              * dom/WindowEventContext.cpp: Added.
              * dom/WindowEventContext.h: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6a30a39
  5. 19 Jul, 2010 1 commit
    • eric.carlson@apple.com's avatar
      2010-07-19 Eric Carlson <eric.carlson@apple.com> · 65b858a9
      eric.carlson@apple.com authored
              Reviewed by Sam Weinig.
      
              Remove HTML5 media element 'load' event
              https://bugs.webkit.org/show_bug.cgi?id=30464
              <rdar://problem/5650561>
      
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_completelyLoaded.
              (WebCore::HTMLMediaElement::parseMappedAttribute): Don't deal with 'load' event.
              (WebCore::HTMLMediaElement::prepareForLoad): Set m_completelyLoaded to false.
              (WebCore::HTMLMediaElement::setNetworkState): Don't post 'load' event.
              (WebCore::HTMLMediaElement::progressEventTimerFired): Bail if m_networkState != NETWORK_LOADING.
              (WebCore::HTMLMediaElement::userCancelledLoad): No more NETWORK_LOADED state.
              * html/HTMLMediaElement.h:
              (WebCore::HTMLMediaElement::):
              * html/HTMLMediaElement.idl: Remove NETWORK_LOADING.
      
      2010-07-19  Eric Carlson  <eric.carlson@apple.com>
      
              Reviewed by Sam Weinig.
      
              Remove HTML5 media element 'load' event
              https://bugs.webkit.org/show_bug.cgi?id=30464
              <rdar://problem/5650561>
      
              * media/audio-delete-while-slider-thumb-clicked.html: Trigger test on 'canplaythrough'
              instead of 'load'.
              * media/audio-delete-while-step-button-clicked.html: Ditto.
              * media/event-attributes-expected.txt: 
              * media/event-attributes.html: Correct logic to check that 'progress' event(s) are
              fired while loading file, but not when src set to invalid file. 'abort' event is fired when
              the src is changed.
              * media/invalid-media-url-crash-expected.txt:
              * media/media-constants-expected.txt: No more NETWORK_LOADED state.
              * media/media-constants.html:  No more NETWORK_LOADED state. Clean up test.
              * media/remove-from-document-expected.txt:
              * media/remove-from-document.html: Ditto.
              * media/video-controls-visible-audio-only.html: Trigger test on 'canplaythrough'
              instead of 'load'.
              * media/video-source-none-supported-expected.txt: No more NETWORK_LOADED state.
              * media/video-src-change-expected.txt: Ditto.
              * media/video-src-none-expected.txt:
              * media/video-src-none.html: No more NETWORK_LOADED state. Fix bogus test that generated
              "FAIL" in results.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65b858a9
  6. 24 Jan, 2010 1 commit
  7. 23 Sep, 2009 1 commit
    • eric@webkit.org's avatar
      2009-09-23 Andrew Scherkus <scherkus@chromium.org> · 92e050c1
      eric@webkit.org authored
              Reviewed by Eric Carlson.
      
              Updating 17 media layout tests to provide different media files based on supported codecs.
      
              https://bugs.webkit.org/show_bug.cgi?id=29625
      
              * media/audio-constructor-autobuffer.html: Switched to findMediaFile().
              * media/audio-constructor-src.html: Ditto.
              * media/audio-constructor.html: Ditto.
              * media/audio-controls-rendering.html: Ditto.
              * media/audio-delete-while-slider-thumb-clicked.html: Ditto.
              * media/audio-delete-while-step-button-clicked.html: Ditto.
              * media/broken-video.html: Ditto.
              * media/controls-after-reload.html: Ditto, and also changed initial video to counting.mp4 since scaled-matrix.mov is QuickTime specific.
              * media/controls-right-click-on-timebar.html: Ditto.
              * media/event-attributes.html: Ditto.
              * media/media-load-event.html: Ditto.
              * media/media-startTime.html: Ditto.
              * media/progress-event-total-expected.txt: Added new total value.
              * media/progress-event-total.html: Switched to for loop and findMediaFile(), added new total value.
              * media/progress-event.html: Switched to findMediaFile().
              * media/remove-from-document-no-load.html: Ditto.
              * media/remove-from-document.html: Ditto.
              * media/unsupported-tracks.html: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      92e050c1
  8. 09 Jul, 2009 1 commit
    • eric.carlson@apple.com's avatar
      2009-07-09 Eric Carlson <eric.carlson@apple.com> · ad61dae4
      eric.carlson@apple.com authored
              Reviewed by Adele Peterson.
      
              Possible crashes when mouse clicks not dispatched because range input destroyed while 
              thumb is being dragged (e.g. scrub to end of movie)
              <rdar://problem/7037494> 
              https://bugs.webkit.org/show_bug.cgi?id=27101
      
              Some shadow nodes "capture" all mouse events from mouseDown to mouseUp so they continue to 
              get mouse events even when the mouse is moved outside of the node. This is done by putting
              EventHandler into a mode where it sends all mouse events to the node regardless of the
              actual mouse position. The mode is set on mouseDown and cleared on mouseUp but if the
              node is deleted while in this mode, the mouseUp is never sent and EventHandler continues
              to try to send events to the deleted node. This sometimes results in a crash, and sometimes
              in a page that doesn't respond to click events.
      
              Tests: fast/forms/search-delete-while-cancel-button-clicked.html
                     fast/forms/slider-delete-while-dragging-thumb.html
                     media/audio-delete-while-slider-thumb-clicked.html
                     media/audio-delete-while-step-button-clicked.html
      
              * rendering/MediaControlElements.cpp:
              (WebCore::MediaControlSeekButtonElement::detach):
                  New, call setCapturingMouseEventsNode if capturing mouse events.
              * rendering/MediaControlElements.h:
                  Declare detach().
      
              * rendering/RenderSlider.cpp:
              (WebCore::SliderThumbElement::detach):
                  New, call setCapturingMouseEventsNode if capturing mouse events.
      
              * rendering/TextControlInnerElements.cpp:
              (WebCore::SearchFieldCancelButtonElement::detach):
                  New, call setCapturingMouseEventsNode if capturing mouse events.
              * rendering/TextControlInnerElements.h:
                  Declare detach().
      
      2009-07-09  Eric Carlson  <eric.carlson@apple.com>
      
              Reviewed by Adele Peterson.
      
              Possible crashes when mouse clicks not dispatched because range input destroyed while 
              thumb is being dragged (e.g. scrub to end of movie)
              <rdar://problem/7037494> 
              https://bugs.webkit.org/show_bug.cgi?id=27101
      
              Tests deleting a control while capturing mouse events.
      
              * fast/forms/search-delete-while-cancel-button-clicked-expected.txt: Added.
              * fast/forms/search-delete-while-cancel-button-clicked.html: Added.
              * fast/forms/slider-delete-while-dragging-thumb-expected.txt: Added.
              * fast/forms/slider-delete-while-dragging-thumb.html: Added.
              * media/audio-delete-while-slider-thumb-clicked-expected.txt: Added.
              * media/audio-delete-while-slider-thumb-clicked.html: Added.
              * media/audio-delete-while-step-button-clicked-expected.txt: Added.
              * media/audio-delete-while-step-button-clicked.html: Added.
      
              * platform/mac-snowleopard/Skipped:
                  Skip the new media controller tests until <rdar://problem/6502936> is fixed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad61dae4