Bug 244227 - [IFC][Integration] Implement selectionState for ellipsis box
Summary: [IFC][Integration] Implement selectionState for ellipsis box
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: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-08-22 16:26 PDT by zalan
Modified: 2022-08-23 19:24 PDT (History)
12 users (show)

See Also:


Attachments
Patch (13.30 KB, patch)
2022-08-22 16:33 PDT, zalan
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (13.46 KB, patch)
2022-08-23 07:47 PDT, zalan
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (14.76 KB, patch)
2022-08-23 11:05 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2022-08-22 16:26:34 PDT
ssia
Comment 1 zalan 2022-08-22 16:33:35 PDT
Created attachment 461810 [details]
Patch
Comment 2 zalan 2022-08-23 07:47:47 PDT
Created attachment 461821 [details]
Patch
Comment 3 Antti Koivisto 2022-08-23 07:52:55 PDT
Comment on attachment 461821 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=461821&action=review

> Source/WebCore/rendering/EllipsisBoxPainter.cpp:140
> +    auto pathCopy = m_ellipsisBox;
> +    return InlineIterator::LeafBoxIterator { WTFMove(pathCopy) }->selectionState();

Why this dance?
Comment 4 Antti Koivisto 2022-08-23 07:58:18 PDT
Comment on attachment 461821 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=461821&action=review

> Source/WebCore/rendering/EllipsisBoxPainter.cpp:48
> +EllipsisBoxPainter<EllipsisBoxPath>::EllipsisBoxPainter(EllipsisBoxPath&& ellipsisBox, PaintInfo& paintInfo, const LayoutPoint& paintOffset, Color selectionForegroundColor, Color selectionBackgroundColor)

We can probably undo the templating at some point and just use the iterator, I think it is an over-optimization.
Comment 5 zalan 2022-08-23 11:05:06 PDT
Created attachment 461823 [details]
Patch
Comment 6 zalan 2022-08-23 11:05:43 PDT
(In reply to Antti Koivisto from comment #4)
> Comment on attachment 461821 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=461821&action=review
> 
> > Source/WebCore/rendering/EllipsisBoxPainter.cpp:48
> > +EllipsisBoxPainter<EllipsisBoxPath>::EllipsisBoxPainter(EllipsisBoxPath&& ellipsisBox, PaintInfo& paintInfo, const LayoutPoint& paintOffset, Color selectionForegroundColor, Color selectionBackgroundColor)
> 
> We can probably undo the templating at some point and just use the iterator,
> I think it is an over-optimization.
Agree!
Comment 7 EWS 2022-08-23 19:23:15 PDT
Committed 253714@main (a3119d12cba0): <https://commits.webkit.org/253714@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 461823 [details].
Comment 8 Radar WebKit Bug Importer 2022-08-23 19:24:48 PDT
<rdar://problem/99062682>