WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
289862
[Cleanup] Use render and node subclasses instead of RenderObject and Node wherever possible (cont...)
https://bugs.webkit.org/show_bug.cgi?id=289862
Summary
[Cleanup] Use render and node subclasses instead of RenderObject and Node whe...
alan
Reported
2025-03-15 19:48:44 PDT
ssia
Attachments
Patch
(48.19 KB, patch)
2025-03-15 19:57 PDT
,
alan
no flags
Details
Formatted Diff
Diff
Patch
(48.19 KB, patch)
2025-03-16 05:16 PDT
,
alan
no flags
Details
Formatted Diff
Diff
Patch
(48.16 KB, patch)
2025-03-19 06:30 PDT
,
alan
no flags
Details
Formatted Diff
Diff
Patch
(48.17 KB, patch)
2025-03-19 07:57 PDT
,
alan
no flags
Details
Formatted Diff
Diff
[fast-cq]Patch
(48.15 KB, patch)
2025-03-19 08:12 PDT
,
alan
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
alan
Comment 1
2025-03-15 19:57:32 PDT
Created
attachment 474579
[details]
Patch
alan
Comment 2
2025-03-16 05:16:06 PDT
Created
attachment 474582
[details]
Patch
Tim Nguyen (:ntim)
Comment 3
2025-03-16 21:49:35 PDT
Comment on
attachment 474582
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=474582&action=review
> Source/WebCore/dom/Position.cpp:900 > + auto isHorizontal = renderer.isHorizontalWritingMode();
I think Elika wanted to get rid of `isHorizontalWritingMode()` (so essentially all the usages left are those that need to be audited). I believe `writingMode().isHorizontal()` is preferred now.
> Source/WebCore/editing/Editing.cpp:926 > + if (!textNode || !downcast<RenderText>(*position.anchorNode()->renderer()).style().preserveNewline())
`!downcast<RenderText>(textNode->renderer())` also, `renderer()` for `Text` could return `RenderText` directly but that could be a follow up.
alan
Comment 4
2025-03-19 06:30:49 PDT
Created
attachment 474630
[details]
Patch
alan
Comment 5
2025-03-19 07:57:42 PDT
Created
attachment 474631
[details]
Patch
alan
Comment 6
2025-03-19 08:12:34 PDT
Created
attachment 474632
[details]
[fast-cq]Patch
alan
Comment 7
2025-03-19 08:40:31 PDT
(In reply to Tim Nguyen (:ntim) from
comment #3
)
> Comment on
attachment 474582
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=474582&action=review
> > > Source/WebCore/dom/Position.cpp:900 > > + auto isHorizontal = renderer.isHorizontalWritingMode(); > > I think Elika wanted to get rid of `isHorizontalWritingMode()` (so > essentially all the usages left are those that need to be audited). I > believe `writingMode().isHorizontal()` is preferred now.
That's a branchy (slow) path. I am changing it to make it performant but for now that's certainly not the preferred way from pref point of view.
> > > Source/WebCore/editing/Editing.cpp:926 > > + if (!textNode || !downcast<RenderText>(*position.anchorNode()->renderer()).style().preserveNewline()) > > `!downcast<RenderText>(textNode->renderer())` > > also, `renderer()` for `Text` could return `RenderText` directly but that > could be a follow up.
? It does return RenderText (since 2013).
alan
Comment 8
2025-03-19 08:41:10 PDT
(In reply to zalan from
comment #7
)
> (In reply to Tim Nguyen (:ntim) from
comment #3
) > > Comment on
attachment 474582
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=474582&action=review
> > > > > Source/WebCore/dom/Position.cpp:900 > > > + auto isHorizontal = renderer.isHorizontalWritingMode(); > > > > I think Elika wanted to get rid of `isHorizontalWritingMode()` (so > > essentially all the usages left are those that need to be audited). I > > believe `writingMode().isHorizontal()` is preferred now. > That's a branchy (slow) path. I am changing it to make it performant but for > now that's certainly not the preferred way from pref point of view.
pref -> perf
EWS
Comment 9
2025-03-19 11:40:11 PDT
Committed
292369@main
(a0a5ee68b8d5): <
https://commits.webkit.org/292369@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 474632
[details]
.
Radar WebKit Bug Importer
Comment 10
2025-03-19 11:41:20 PDT
<
rdar://problem/147428099
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug