Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e7cd6160302e56f9c2bb8a0f976e495f9768dd1a
      
https://github.com/WebKit/WebKit/commit/e7cd6160302e56f9c2bb8a0f976e495f9768dd1a
  Author: Alan Baradlay <[email protected]>
  Date:   2025-10-28 (Tue, 28 Oct 2025)

  Changed paths:
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac/TestExpectations
    M Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp

  Log Message:
  -----------
  TextBreakIterator used for 'word-break: auto-phrase' leaks over to 
non-auto-phrase values
https://bugs.webkit.org/show_bug.cgi?id=301580

Reviewed by Antti Koivisto.

1. 'contentAnalysis' can have the value of either Linguistic or Mechanical 
depending the 'word-break' value.
2. Linguistic/Mechanical TextBreakIterators behave differently.
3. TextBreakIterators are cached and reused throughout subsequent layouts.

A linguistic based TextBreakIterator (constructed and cached for 'word-break: 
auto-phrase' content) should not get
reused for other word-break values. However the missing 
m_contentAnalysis(contentAnalysis) initialization confuses
our caching and we end up reusing cached TextBreakIterator for non-auto-phrase 
content (see TextBreakIteratorCache::take)

* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp:
(WTF::TextBreakIterator::TextBreakIterator):

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



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

Reply via email to