[webkit-changes] [WebKit/WebKit] 1468af: Avoid allocating ElementRareData for IntersectionO...

Ryosuke Niwa noreply at github.com
Mon Mar 11 20:44:55 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1468afa8cc99b3f901a70075e6a5d5848efc5d81
      https://github.com/WebKit/WebKit/commit/1468afa8cc99b3f901a70075e6a5d5848efc5d81
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/dom/Element.h
    M Source/WebCore/html/HTMLImageElement.cpp
    M Source/WebCore/html/HTMLImageElement.h

  Log Message:
  -----------
  Avoid allocating ElementRareData for IntersectionObserverData with HTMLImageElement
https://bugs.webkit.org/show_bug.cgi?id=270724

Reviewed by Yusuke Suzuki.

Inline IntersectionObserverData in HTMLImageElement to avoid creating ElementRareData
whenever loading=lazy is used.

* Source/WebCore/dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::ensureIntersectionObserverData):
* Source/WebCore/dom/Element.h:
* Source/WebCore/html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::~HTMLImageElement):
(WebCore::HTMLImageElement::ensureIntersectionObserverData):
(WebCore::HTMLImageElement::intersectionObserverDataIfExists):
* Source/WebCore/html/HTMLImageElement.h:

Canonical link: https://commits.webkit.org/275954@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list