Skip to content

Commit

Permalink
Inline ShadowRoot::styleScope()
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=262314

Reviewed by Alex Christensen.

Inline ShadowRoot::styleScope() as it is very small and shows on profiles.

* Source/WebCore/dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::styleScope): Deleted.
* Source/WebCore/dom/ShadowRoot.h:

Canonical link: https://commits.webkit.org/268595@main
  • Loading branch information
cdumez committed Sep 28, 2023
1 parent c7a54f9 commit 68d0bec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions Source/WebCore/dom/ShadowRoot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@ void ShadowRoot::moveShadowRootToNewDocument(Document& oldDocument, Document& ne
RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(&m_styleScope->document() == &newDocument);
}

Style::Scope& ShadowRoot::styleScope()
{
return *m_styleScope;
}

StyleSheetList& ShadowRoot::styleSheets()
{
if (!m_styleSheetList)
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/dom/ShadowRoot.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ShadowRoot final : public DocumentFragment, public TreeScope {
using TreeScope::getElementById;
using TreeScope::rootNode;

WEBCORE_EXPORT Style::Scope& styleScope();
Style::Scope& styleScope() { return *m_styleScope; }
StyleSheetList& styleSheets();

bool delegatesFocus() const { return m_delegatesFocus; }
Expand Down

0 comments on commit 68d0bec

Please sign in to comment.