WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
169309
Add TextIndicator support for providing a snapshot excluding selected content
https://bugs.webkit.org/show_bug.cgi?id=169309
Summary
Add TextIndicator support for providing a snapshot excluding selected content
Wenson Hsieh
Reported
2017-03-07 14:30:14 PST
<
rdar://problem/30883525
>
Attachments
Patch
(25.96 KB, patch)
2017-03-07 15:03 PST
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Patch
(30.14 KB, patch)
2017-03-08 14:51 PST
,
Wenson Hsieh
thorton
: review+
Details
Formatted Diff
Diff
Patch for landing
(30.29 KB, patch)
2017-03-08 17:20 PST
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2017-03-07 15:03:17 PST
Created
attachment 303731
[details]
Patch
Tim Horton
Comment 2
2017-03-08 00:54:35 PST
Comment on
attachment 303731
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303731&action=review
TextIndicator parts are fine with me but we should get myles and smfr to take a peek at the other bits.
> Source/WebCore/ChangeLog:58 > + Teach RenderReplaced to respect PaintBehaviorExcludeSelection by bailing from painting if it is selected and the > + paint behavior is enabled.
What happens for <div> with background color (block /or/ inline-block)? One of the reasons I think we need smfr's input.
> Source/WebCore/page/TextIndicator.h:52 > +enum TextIndicatorOption : uint16_t {
Ahhhh this is when you know things have gotten bad.
Wenson Hsieh
Comment 3
2017-03-08 14:51:43 PST
Created
attachment 303848
[details]
Patch
Tim Horton
Comment 4
2017-03-08 16:02:12 PST
Comment on
attachment 303848
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303848&action=review
> Source/WebCore/page/TextIndicator.cpp:178 > + auto snapshotRect = enclosingIntRect(frame.view()->visualViewportRect());
Why visualViewportRect and not the snapshotRect? Does this mean that this snapshot is a different size than the others? That kind of breaks the model (e.g. you couldn't transition between the snapshots, which was the point of data.contentImageWithHighlight).
> Source/WebCore/platform/graphics/FontCascade.cpp:352 > +float FontCascade::widthOfTextRange(const TextRun& run, unsigned from, unsigned to, HashSet<const Font*>* fallbackFonts, float* outWidthBeforeRange, float* outWidthAfterRange) const
Amazed that this is something we need to implement fresh.
> Source/WebCore/rendering/InlineTextBox.cpp:567 > + if (!isHorizontal()) {
What about vertical-bt :|
Wenson Hsieh
Comment 5
2017-03-08 16:20:57 PST
Comment on
attachment 303848
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303848&action=review
>> Source/WebCore/page/TextIndicator.cpp:178 >> + auto snapshotRect = enclosingIntRect(frame.view()->visualViewportRect()); > > Why visualViewportRect and not the snapshotRect? Does this mean that this snapshot is a different size than the others? That kind of breaks the model (e.g. you couldn't transition between the snapshots, which was the point of data.contentImageWithHighlight).
We talked about this in person -- we actually do need the full visible contents in this case, so let's rename TextIndicatorOptionIncludeSnapshotWithoutSelection to something more explicit, like TextIndicatorOptionIncludeSnapshotOfAllVisibleContentWithoutSelection
>> Source/WebCore/platform/graphics/FontCascade.cpp:352 >> +float FontCascade::widthOfTextRange(const TextRun& run, unsigned from, unsigned to, HashSet<const Font*>* fallbackFonts, float* outWidthBeforeRange, float* outWidthAfterRange) const > > Amazed that this is something we need to implement fresh.
This is, indeed, the case. Previously, I took subruns of the whole text run and computed their widths which just used FontCascade::width, but Myles informed my that the Right Thing to do here is to use width iterators (either complex or simple, depending on the font) and advance to the appropriate location in the entire run.
>> Source/WebCore/rendering/InlineTextBox.cpp:567 >> + if (!isHorizontal()) { > > What about vertical-bt :|
Will add as a // FIXME
Wenson Hsieh
Comment 6
2017-03-08 17:20:23 PST
Created
attachment 303872
[details]
Patch for landing
WebKit Commit Bot
Comment 7
2017-03-08 17:44:48 PST
Comment on
attachment 303872
[details]
Patch for landing Clearing flags on attachment: 303872 Committed
r213614
: <
http://trac.webkit.org/changeset/213614
>
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