[webkit-changes] [WebKit/WebKit] 84ae35: Quirk news.ycombinator to skip TextAutoSizing

Vitor Roriz noreply at github.com
Thu Jun 6 18:45:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 84ae355619354ee1bfa7daaa1fc95565a6726be3
      https://github.com/WebKit/WebKit/commit/84ae355619354ee1bfa7daaa1fc95565a6726be3
  Author: Vitor Roriz <vitor.roriz at apple.com>
  Date:   2024-06-06 (Thu, 06 Jun 2024)

  Changed paths:
    M Source/WebCore/page/LocalFrameViewLayoutContext.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h

  Log Message:
  -----------
  Quirk news.ycombinator to skip TextAutoSizing
rdar://127246368
https://bugs.webkit.org/show_bug.cgi?id=275221

Reviewed by Sammy Gill.

We won't try to adjust computed font sizes if (visibleWidth >= width())
at RenderBlockFlow::adjustComputedFontSizes.

On the first load, RenderBlockFlow::width is calculated to a value that
allows TextAutoSizing to set new computed font sizes for the text nodes
on the page. Width is much larger than visibleWidth, ultimately coming from
WebPageProxy::textAutosizingWidth which returns WebCore::screenSize().width().

At refresh,RenderBlockFlow::width returns a value that is actually equal
to visibleWidth (and screenSize().width()). There seems to depend on
timing. I wasn't able to reproduce that when simulator CPU load was too
high.

Since the page where the bug manifests itself already has responsive CSS
styling, we can quirk TextAutoSizing to skip adjusting for it, at least
until we figure out why we are calculating RenderBlockFlow width inconsistently:
https://bugs.webkit.org/show_bug.cgi?id=275223

* Source/WebCore/page/LocalFrameViewLayoutContext.cpp:
(WebCore::LocalFrameViewLayoutContext::applyTextSizingIfNeeded):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::skipTextAutoSizing const):
* Source/WebCore/page/Quirks.h:

Canonical link: https://commits.webkit.org/279788@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