8000 Ignore spaces when determining the length of text to treat as a first-letter pseudo-element by Ahmad-S792 · Pull Request #10685 · WebKit/WebKit · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Ahmad-S792
Copy link
Contributor
@Ahmad-S792 Ahmad-S792 commented Feb 25, 2023
Ignore spaces when determining the length of text to treat as a first-letter pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=251693
rdar://problem/105278168

Reviewed by NOBODY (OOPS!).

This patch is to align WebKit with Gecko / Firefox and Blink / Chromium.

Merge - https://chromium.googlesource.com/chromium/blink/+/278a1f2cc8465a1a57307ad95d02f124bac4bde1

Spaces are are neither in the Ps, Pe, Pi, Pf and Po sections of
UNICODE, so they should not be considered when determining the
length of the first-letter pseudo-element. It will make WebKit
consistent with other engines.

* Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(RenderTreeBuilder::FirstLetter:createRenderers):
(1) Rename function 'shouldSkipForFirstLetter' to 'isSpaceForFirstLetter'
(2) Introduce variable 'textLength' and use everywhere
(3) Introduce separate function to account for 'leading punctuation'
(4) Introduce bailout function
(5) Remove 'isPunctuationForFirstLetter' condition from end
* LayoutTests/TestExpectations: Remove 'ImageOnlyFailure' line for 'first-letter-punctuation-dynamic.html'
* LayoutTests/fast/css/first-letter-punctuations.html: Update Testcase
* LayoutTests/fast/css/first-letter-punctuations-expected.html: Update Testcase Expectations
* LayoutTests/fast/css/first-letter-punctuations.html: Update Testcase
* LayoutTests/fast/css/first-letter-punctuations-expected.html: Update Testcase Expectations
* LayoutTests/fast/css-generated-content/quote-first-letter.html: Add 'fuzzy' header
* LayoutTests/platform/gtk/editing/selection/extend-by-word-002-expected.png: Rebaselined
* LayoutTests/platform/gtk/editing/selection/extend-by-word-002-expected.txt: Rebaselined
* LayoutTests/platform/ios/editing/selection/extend-by-word-002-expected.txt: Rebaselined
* LayoutTests/platform/mac/editing/selection/extend-by-word-002-expected.png: Rebaselined
* LayoutTests/platform/mac/editing/selection/extend-by-word-002-expected.txt: Rebaselined

df4b0b9

Misc iOS, tvOS & watchOS macOS Linux Windows
❌ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🛠 gtk
✅ 🧪 webkitperl ❌ 🧪 ios-wk2 ✅ 🧪 api-mac ❌ 🧪 gtk-wk2
✅ 🧪 api-ios ❌ 🧪 mac-wk1 ✅ 🧪 api-gtk
✅ 🛠 tv ❌ 🧪 mac-wk2
✅ 🛠 tv-sim ❌ 🧪 mac-AS-debug-wk2
✅ 🛠 watch ✅ 🧪 mac-wk2-stress
✅ 🛠 watch-sim

@Ahmad-S792 Ahmad-S792 added the Layout and Rendering For bugs with layout and rendering of Web pages. label Feb 25, 2023
@Ahmad-S792 Ahmad-S792 self-assigned this Feb 25, 2023
@Ahmad-S792 Ahmad-S792 force-pushed the fix251693-first-letter-dynamic-fix branch from 4fbfbf2 to d9b86ba Compare February 25, 2023 22:30
@Ahmad-S792 Ahmad-S792 force-pushed the fix251693-first-letter-dynamic-fix branch from d9b86ba to 555d866 Compare February 28, 2023 00:04
…-letter pseudo-element

https://bugs.webkit.org/show_bug.cgi?id=251693
rdar://problem/105278168

Reviewed by NOBODY (OOPS!).

This patch is to align WebKit with Gecko / Firefox and Blink / Chromium.

Merge - https://chromium.googlesource.com/chromium/blink/+/278a1f2cc8465a1a57307ad95d02f124bac4bde1

Spaces are are neither in the Ps, Pe, Pi, Pf and Po sections of UNICODE, so they should not be
considered when determining the length of the first-letter pseudo-element.
It will make WebKit consistent with other engines.

* Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(RenderTreeBuilder::FirstLetter:createRenderers):
(1) Rename function 'shouldSkipForFirstLetter' to 'isSpaceForFirstLetter'
(2) Introduce variable 'textLength' and use everywhere
(3) Introduce separate function to account for 'leading punctuation'
(4) Introduce bailout function
(5) Remove 'isPunctuationForFirstLetter' condition from end
* LayoutTests/TestExpectations: Remove 'ImageOnlyFailure' line for 'first-letter-punctuation-dynamic.html'
* LayoutTests/fast/css/first-letter-punctuations.html: Update Testcase
* LayoutTests/fast/css/first-letter-punctuations-expected.html: Update Testcase Expectations
* LayoutTests/fast/css-generated-content/quote-first-letter.html: Add 'fuzzy' header
* LayoutTests/platform/gtk/editing/selection/extend-by-word-002-expected.png: Rebaselined
* LayoutTests/platform/gtk/editing/selection/extend-by-word-002-expected.txt: Rebaselined
* LayoutTests/platform/ios/editing/selection/extend-by-word-002-expected.txt: Rebaselined
* LayoutTests/platform/mac/editing/selection/extend-by-word-002-expected.png: Rebaselined
* LayoutTests/platform/mac/editing/selection/extend-by-word-002-expected.txt: Rebaselined
@Ahmad-S792 Ahmad-S792 force-pushed the fix251693-first-letter-dynamic-fix branch from 555d866 to df4b0b9 Compare February 28, 2023 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Layout and Rendering For bugs with layout and rendering of Web pages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0