[webkit-changes] [WebKit/WebKit] 6470a2: [IFC][Partial layout] Introduce LineLayout::update...

Alan Baradlay noreply at github.com
Sat Feb 25 07:27:14 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6470a2ca1e161436b1ad5561e191c619d1b9db62
      https://github.com/WebKit/WebKit/commit/6470a2ca1e161436b1ad5561e191c619d1b9db62
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-02-25 (Sat, 25 Feb 2023)

  Changed paths:
    M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationCoverage.h
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h
    M Source/WebCore/rendering/RenderText.cpp
    M Source/WebCore/rendering/RenderText.h
    M Source/WebCore/rendering/RenderTextFragment.cpp
    M Source/WebCore/rendering/RenderTextFragment.h

  Log Message:
  -----------
  [IFC][Partial layout] Introduce LineLayout::updateTextContent
https://bugs.webkit.org/show_bug.cgi?id=252793

Reviewed by Antti Koivisto.

This is in preparation for supporting partial change on existing renderers (e.g. text insert).
1. RenderText::setText/setTextWidthOffset consult shouldInvalidateLineLayoutPathAfterContentChange to check whether the content mutation is supported
2. They call LineLayout::updateTextContent (blank at this point) to compute the damage extent.

* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::shouldInvalidateLineLayoutPathAfterContentChangeFor):
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.h:
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::blockContainer):
(WebCore::LayoutIntegration::LineLayout::shouldInvalidateLineLayoutPathAfterContentChange):
(WebCore::LayoutIntegration::LineLayout::updateTextContent):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::invalidateLineLayoutPathOnContentChangeIfNeeded):
(WebCore::RenderText::setTextInternal):
(WebCore::RenderText::setText):
(WebCore::RenderText::setTextWithOffset):
* Source/WebCore/rendering/RenderText.h:

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




More information about the webkit-changes mailing list