mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 12:19:37 +03:00
LibWeb: Remove some now unused deprecated functions from QualifiedName
And related callers in Element.
This commit is contained in:
parent
326b34c7c7
commit
96463e947a
Notes:
sideshowbarker
2024-07-16 23:44:30 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/96463e947a Pull-request: https://github.com/SerenityOS/serenity/pull/21815 Reviewed-by: https://github.com/awesomekling
@ -78,7 +78,6 @@ public:
|
||||
FlyString const& html_uppercased_qualified_name() const { return m_html_uppercased_qualified_name; }
|
||||
|
||||
virtual FlyString node_name() const final { return html_uppercased_qualified_name(); }
|
||||
DeprecatedFlyString deprecated_local_name() const { return m_qualified_name.local_name().to_deprecated_fly_string(); }
|
||||
FlyString const& local_name() const { return m_qualified_name.local_name(); }
|
||||
|
||||
// NOTE: This is for the JS bindings
|
||||
@ -86,7 +85,6 @@ public:
|
||||
DeprecatedString deprecated_tag_name() const { return html_uppercased_qualified_name().to_deprecated_fly_string(); }
|
||||
|
||||
Optional<FlyString> const& prefix() const { return m_qualified_name.prefix(); }
|
||||
DeprecatedFlyString deprecated_prefix() const { return m_qualified_name.deprecated_prefix(); }
|
||||
|
||||
void set_prefix(Optional<FlyString> value);
|
||||
|
||||
|
@ -54,11 +54,6 @@ QualifiedName::QualifiedName(FlyString const& local_name, Optional<FlyString> co
|
||||
{
|
||||
}
|
||||
|
||||
QualifiedName::QualifiedName(FlyString const& local_name, Optional<FlyString> const& prefix, DeprecatedFlyString const& namespace_)
|
||||
: QualifiedName(local_name, prefix, namespace_.is_null() ? Optional<FlyString> {} : MUST(FlyString::from_deprecated_fly_string(namespace_)))
|
||||
{
|
||||
}
|
||||
|
||||
QualifiedName::Impl::Impl(FlyString const& a_local_name, Optional<FlyString> const& a_prefix, Optional<FlyString> const& a_namespace)
|
||||
: local_name(a_local_name)
|
||||
, prefix(a_prefix)
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*
|
||||
* Copyright (c) 2020, the SerenityOS developers.
|
||||
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2023, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/Optional.h>
|
||||
|
||||
@ -16,26 +16,11 @@ namespace Web::DOM {
|
||||
class QualifiedName {
|
||||
public:
|
||||
QualifiedName(FlyString const& local_name, Optional<FlyString> const& prefix, Optional<FlyString> const& namespace_);
|
||||
QualifiedName(FlyString const& local_name, Optional<FlyString> const& prefix, DeprecatedFlyString const& namespace_);
|
||||
|
||||
FlyString const& local_name() const { return m_impl->local_name; }
|
||||
Optional<FlyString> const& prefix() const { return m_impl->prefix; }
|
||||
Optional<FlyString> const& namespace_() const { return m_impl->namespace_; }
|
||||
|
||||
DeprecatedFlyString deprecated_prefix() const
|
||||
{
|
||||
if (!m_impl->prefix.has_value())
|
||||
return {};
|
||||
return m_impl->prefix->to_deprecated_fly_string();
|
||||
}
|
||||
|
||||
DeprecatedFlyString deprecated_namespace_() const
|
||||
{
|
||||
if (!m_impl->namespace_.has_value())
|
||||
return {};
|
||||
return m_impl->namespace_->to_deprecated_fly_string();
|
||||
}
|
||||
|
||||
FlyString const& as_string() const { return m_impl->as_string; }
|
||||
|
||||
struct Impl : public RefCounted<Impl> {
|
||||
|
Loading…
Reference in New Issue
Block a user