Let is<T>() accept RefPtrs
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Nov 2017 05:43:02 +0000 (05:43 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Nov 2017 05:43:02 +0000 (05:43 +0000)
commit83158cb13dbc27a8d4c2abb09859473dddfefdc5
tree73d39fb8e449f86ac361fd9815618e75a7ba111b
parent2ccefb3794c200433e514ccb4f0b5088611a0276
Let is<T>() accept RefPtrs
https://bugs.webkit.org/show_bug.cgi?id=178612
<rdar://problem/35102004>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Get rid of .get() for all is<T>() calls.

No changes in behaviors.

* bindings/js/JSElementCustom.cpp:
(WebCore::createNewElementWrapper):
* bindings/js/JSMediaStreamTrackCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSNodeCustom.cpp:
(WebCore::createWrapperInline):
* bindings/js/JSTextCustom.cpp:
(WebCore::toJSNewlyCreated):
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::loadSubimages):
* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::matchingFaces):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapNinePieceImage):
* css/FontFace.cpp:
(WebCore::FontFace::create):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::createGridTrackList):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueCursor):
(WebCore::StyleBuilderCustom::applyValueContent):
(WebCore::StyleBuilderCustom::applyValueWillChange):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::propertyAsColor const):
(WebCore::StyleProperties::propertyAsValueID const):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations):
* css/TransformFunctions.cpp:
(WebCore::transformsForValue):
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue const):
* dom/Document.cpp:
(WebCore::Document::setBodyOrFrameset):
(WebCore::Document::setFocusedElement):
(WebCore::Document::updateHoverActiveState):
* dom/Element.cpp:
(WebCore::Element::setOuterHTML):
* dom/Range.cpp:
(WebCore::Range::insertNode):
* editing/ApplyStyleCommand.cpp:
(WebCore::toIdentifier):
(WebCore::ApplyStyleCommand::applyBlockStyle):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty):
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle const):
(WebCore::EditingStyle::extractFontSizeDelta):
(WebCore::EditingStyle::textDirection const):
(WebCore::textDecorationValueList):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::legacyFontSize const):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::StyleChange::StyleChange):
(WebCore::StyleChange::extractTextStyles):
(WebCore::diffTextDecorations):
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
(WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::findAssociatedForm):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::imageElement const):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setOuterText):
(WebCore::HTMLElement::dirAttributeChanged):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor const):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::dataList const):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::setText):
(WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel const):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::isKeyboardFocusable const):
(WebCore::HTMLPlugInElement::isUserObservable const):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectOption):
* html/HTMLSummaryElement.cpp:
(WebCore::isClickableControl):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::isKeyboardFocusable const):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::attachLater):
(WebCore::HTMLConstructionSite::insertTextNode):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
* html/track/TextTrackList.cpp:
(TextTrackList::append):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setNodeName):
* inspector/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* page/FocusController.cpp:
(WebCore::shouldClearSelectionWhenChangingFocusedElement):
* page/FrameView.cpp:
(WebCore::FrameView::hasCustomScrollbars const):
* page/Page.cpp:
(WebCore::Page::pluginViews):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* testing/Internals.cpp:
(WebCore::deferredStyleRulesCountForList):
(WebCore::deferredGroupRulesCountForList):
(WebCore::deferredKeyframesRulesCountForList):

Source/WTF:

Add support for is<T>() for RefPtrs.

* wtf/RefPtr.h:
(WTF::is):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
47 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/RefPtr.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSElementCustom.cpp
Source/WebCore/bindings/js/JSMediaStreamTrackCustom.cpp
Source/WebCore/bindings/js/JSNodeCustom.cpp
Source/WebCore/bindings/js/JSTextCustom.cpp
Source/WebCore/css/CSSFilterImageValue.cpp
Source/WebCore/css/CSSFontFaceSet.cpp
Source/WebCore/css/CSSFontSelector.cpp
Source/WebCore/css/CSSToStyleMap.cpp
Source/WebCore/css/FontFace.cpp
Source/WebCore/css/StyleBuilderConverter.h
Source/WebCore/css/StyleBuilderCustom.h
Source/WebCore/css/StyleProperties.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/TransformFunctions.cpp
Source/WebCore/css/ViewportStyleResolver.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Range.cpp
Source/WebCore/editing/ApplyStyleCommand.cpp
Source/WebCore/editing/EditingStyle.cpp
Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp
Source/WebCore/html/FormAssociatedElement.cpp
Source/WebCore/html/HTMLAreaElement.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLPlugInElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSummaryElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/RadioInputType.cpp
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/track/TextTrackList.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/inspector/PageScriptDebugServer.cpp
Source/WebCore/page/FocusController.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/page/mac/EventHandlerMac.mm
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/testing/Internals.cpp