Bug 277057 - Make writing-mode/direction/TextFlow conditional checks consistent, efficient, and correct
Summary: Make writing-mode/direction/TextFlow conditional checks consistent, efficient...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: fantasai
URL:
Keywords: InRadar
: 276028 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-07-24 17:54 PDT by fantasai
Modified: 2024-10-22 09:27 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fantasai 2024-07-24 17:54:20 PDT
We currently have a ton of ad-hoc checks for writing-mode and direction in our codebase, each following their own pattern of boolean operators, temporary variables, and conditional statements. This makes the code harder to read, and more likely to contain errors.


We should instead have RenderStyle return a WritingMode object (similar to Gecko's) that encapsulates all of the relevant CSS style information and that has convenience methods to easily, efficiently, and correctly return the specific resolved information that layout code tends to query.
Comment 1 Radar WebKit Bug Importer 2024-07-24 17:54:40 PDT
<rdar://problem/132446895>
Comment 2 fantasai 2024-08-11 22:49:12 PDT
Pull request: https://github.com/WebKit/WebKit/pull/32026
Comment 3 EWS 2024-10-22 09:27:02 PDT
Committed 285555@main (72e07604aff9): <https://commits.webkit.org/285555@main>

Reviewed commits have been landed. Closing PR #32026 and removing active labels.
Comment 4 Tim Nguyen (:ntim) 2024-10-22 09:27:52 PDT
*** Bug 276028 has been marked as a duplicate of this bug. ***