From 9c60888c492fc11ffff1640b4f11c3fa913ca9e1 Mon Sep 17 00:00:00 2001 From: Kent Tamura Date: Wed, 18 Nov 2020 19:10:52 +0000 Subject: [PATCH] Remove unnecessary usages of DEFINE_TYPE_CASTS() - Remove DEFINE_DOCUMENT_TYPE_CASTS() macro It's not used. - Remove DEFINE_TRACK_TYPE_CASTS() macro It's not used. - Remove DEFINE_TYPE_CASTS() for PresentationConnectionAvailableEvent The code generated by this DEFINE_TYPE_CASTS() are not used. This CL has no behavior changes. Bug: 891908 Change-Id: I8a60227c042f85c7d25184258e105b1ba2a9eebb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2546393 Commit-Queue: Daniel Cheng Auto-Submit: Kent Tamura Reviewed-by: Daniel Cheng Cr-Commit-Position: refs/heads/master@{#828826} --- third_party/blink/renderer/core/dom/document.h | 4 ---- third_party/blink/renderer/core/html/track/track_base.h | 4 ---- .../presentation_connection_available_event.h | 9 --------- 3 files changed, 17 deletions(-) diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h index 9d505e5bcd5318..c58865e9a7e84e 100644 --- a/third_party/blink/renderer/core/dom/document.h +++ b/third_party/blink/renderer/core/dom/document.h @@ -2240,10 +2240,6 @@ inline void Document::ScheduleLayoutTreeUpdateIfNeeded() { ScheduleLayoutTreeUpdate(); } -#define DEFINE_DOCUMENT_TYPE_CASTS(thisType) \ - DEFINE_TYPE_CASTS(thisType, Document, document, document->Is##thisType(), \ - document.Is##thisType()) - // This is needed to avoid ambiguous overloads with the Node and TreeScope // versions. DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Document) diff --git a/third_party/blink/renderer/core/html/track/track_base.h b/third_party/blink/renderer/core/html/track/track_base.h index 055fe6e79db9d0..70e673ed75fcd3 100644 --- a/third_party/blink/renderer/core/html/track/track_base.h +++ b/third_party/blink/renderer/core/html/track/track_base.h @@ -70,10 +70,6 @@ class CORE_EXPORT TrackBase : public Supplementable { Member media_element_; }; -#define DEFINE_TRACK_TYPE_CASTS(thisType, predicate) \ - DEFINE_TYPE_CASTS(thisType, TrackBase, track, track->GetType() == predicate, \ - track.GetType() == predicate) - } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRACK_TRACK_BASE_H_ diff --git a/third_party/blink/renderer/modules/presentation/presentation_connection_available_event.h b/third_party/blink/renderer/modules/presentation/presentation_connection_available_event.h index 1b1393d32d6faf..aff4b23e79762f 100644 --- a/third_party/blink/renderer/modules/presentation/presentation_connection_available_event.h +++ b/third_party/blink/renderer/modules/presentation/presentation_connection_available_event.h @@ -50,15 +50,6 @@ class PresentationConnectionAvailableEvent final : public Event { Member connection_; }; -DEFINE_TYPE_CASTS( - PresentationConnectionAvailableEvent, - Event, - event, - event->InterfaceName() == - event_interface_names::kPresentationConnectionAvailableEvent, - event.InterfaceName() == - event_interface_names::kPresentationConnectionAvailableEvent); - } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_MODULES_PRESENTATION_PRESENTATION_CONNECTION_AVAILABLE_EVENT_H_