-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dynamicDowncast<T> even more in the DOM
https://bugs.webkit.org/show_bug.cgi?id=264792 Reviewed by Darin Adler. Use dynamicDowncast<T> even more in the DOM instead of is<T>() + downcast<T>(). It is less error-prone and often results in more concise code. I am also hoping to have downcast<>() do a type check on release builds in the future. It is currently too expensive to do so but it may become affordable if we use dynamicDowncast<T>() instead when possible. * Source/WebCore/dom/ElementTraversal.h: (WebCore::Traversal<Element>::nextTemplate): (WebCore::Traversal<ElementType>::firstChildTemplate): (WebCore::Traversal<ElementType>::lastChildTemplate): (WebCore::Traversal<ElementType>::firstWithinTemplate): (WebCore::Traversal<ElementType>::lastWithinTemplate): (WebCore::Traversal<ElementType>::nextTemplate): (WebCore::Traversal<ElementType>::previous): (WebCore::Traversal<ElementType>::nextSibling): (WebCore::Traversal<ElementType>::previousSibling): (WebCore::Traversal<ElementType>::nextSkippingChildren): (WebCore::Traversal<ElementType>::inclusiveFirstWithin): (WebCore::Traversal<ElementType>::inclusiveLastWithin): (WebCore::ElementTraversal::previousIncludingPseudo): (WebCore::ElementTraversal::nextIncludingPseudo): (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren): (WebCore::ElementTraversal::pseudoAwarePreviousSibling): * Source/WebCore/dom/Event.cpp: (WebCore::Event::setCurrentTarget): (WebCore::Event::timeStampForBindings const): * Source/WebCore/dom/EventContext.cpp: (WebCore::EventContext::handleLocalEvents const): (WebCore::EventContext::isUnreachableNode const): * Source/WebCore/dom/EventNames.h: (WebCore::EventNames::isTouchRelatedEventType const): * Source/WebCore/dom/EventPath.cpp: (WebCore::shouldEventCrossShadowBoundary): (WebCore::nodeOrHostIfPseudoElement): (WebCore::EventPath::EventPath): (WebCore::EventPath::buildPath): (WebCore::EventPath::retargetTouch): * Source/WebCore/dom/EventPath.h: (WebCore::EventPath::eventTargetRespectingTargetRules): * Source/WebCore/dom/EventTarget.cpp: (WebCore::EventTarget::addEventListener): (WebCore::EventTarget::innerInvokeEventListeners): (WebCore::EventTarget::invalidateEventListenerRegions): * Source/WebCore/dom/FragmentDirectiveRangeFinder.cpp: (WebCore::FragmentDirectiveRangeFinder::boundaryPointAtIndexInNodes): (WebCore::FragmentDirectiveRangeFinder::isVisibleTextNode): (WebCore::FragmentDirectiveRangeFinder::findRangeFromNodeList): (WebCore::FragmentDirectiveRangeFinder::rangeOfStringInRange): * Source/WebCore/dom/FullscreenManager.cpp: (WebCore::markRendererDirtyAfterTopLayerChange): (WebCore::FullscreenManager::dispatchFullscreenChangeOrErrorEvent): * Source/WebCore/dom/ImageOverlay.cpp: (WebCore::ImageOverlay::containerRect): * Source/WebCore/dom/KeyboardEvent.cpp: (WebCore::viewIsCompositing): (WebCore::KeyboardEvent::charCode const): * Source/WebCore/dom/MessagePort.cpp: (WebCore::MessagePort::dispatchMessages): (WebCore::MessagePort::dispatchEvent): * Source/WebCore/dom/MouseEvent.cpp: (WebCore::MouseEvent::canTriggerActivationBehavior): * Source/WebCore/dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::frameViewFromWindowProxy): Canonical link: https://commits.webkit.org/270710@main
- Loading branch information
Showing
14 changed files
with
205 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.