WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
203398
Add exclusion rules to text manipulation SPI
https://bugs.webkit.org/show_bug.cgi?id=203398
Summary
Add exclusion rules to text manipulation SPI
Ryosuke Niwa
Reported
2019-10-24 22:01:32 PDT
We need a way to exclude certain set of elements from being manipulated.
Attachments
Patch
(58.74 KB, patch)
2019-10-24 22:21 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Yet another unified build fixes
(59.83 KB, patch)
2019-10-24 23:58 PDT
,
Ryosuke Niwa
wenson_hsieh
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2019-10-24 22:01:49 PDT
<
rdar://problem/56567256
>
Ryosuke Niwa
Comment 2
2019-10-24 22:21:44 PDT
Created
attachment 381879
[details]
Patch
Ryosuke Niwa
Comment 3
2019-10-24 23:58:23 PDT
Created
attachment 381889
[details]
Yet another unified build fixes
Ryosuke Niwa
Comment 4
2019-10-25 11:47:01 PDT
ping reviewers. wincairo & mac-wk-1 failures are unrelated to this patch.
Wenson Hsieh
Comment 5
2019-10-25 12:08:14 PDT
Comment on
attachment 381889
[details]
Yet another unified build fixes View in context:
https://bugs.webkit.org/attachment.cgi?id=381889&action=review
> Source/WebKit/UIProcess/API/Cocoa/_WKTextManipulationToken.h:35 > +@property (nonatomic) BOOL isExcluded;
Nit - in ObjC API, boolean properties like this are usually written with an “is”-prefixed getter and a property name without the ”is”. E.g.: @property (nonatomic, getter=isExcluded) BOOL excluded;
> Tools/TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:184 > + [[_WKTextManipulationExclusionRule alloc] initExclusion:(BOOL)YES forElement:@"code"],
Nit - these _WKTextManipulationExclusionRules will all leak (but maybe that’s fine for an API test since the process is recreated every time?)
> Tools/TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:221 > + [[_WKTextManipulationExclusionRule alloc] initExclusion:(BOOL)YES forAttribute:@"data-exclude" value:@"yes"], > + [[_WKTextManipulationExclusionRule alloc] initExclusion:(BOOL)NO forAttribute:@"data-exclude" value:@"no"],
(Ditto)
Ryosuke Niwa
Comment 6
2019-10-25 12:10:41 PDT
(In reply to Wenson Hsieh from
comment #5
)
> Comment on
attachment 381889
[details]
> Yet another unified build fixes > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=381889&action=review
> > > Source/WebKit/UIProcess/API/Cocoa/_WKTextManipulationToken.h:35 > > +@property (nonatomic) BOOL isExcluded; > > Nit - in ObjC API, boolean properties like this are usually written with an > “is”-prefixed getter and a property name without the ”is”. E.g.: > > @property (nonatomic, getter=isExcluded) BOOL excluded;
Was wondering about that. Will fix.
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:184 > > + [[_WKTextManipulationExclusionRule alloc] initExclusion:(BOOL)YES forElement:@"code"], > > Nit - these _WKTextManipulationExclusionRules will all leak (but maybe > that’s fine for an API test since the process is recreated every time?)
Oh oops, I meant to autorelease these.
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:221 > > + [[_WKTextManipulationExclusionRule alloc] initExclusion:(BOOL)YES forAttribute:@"data-exclude" value:@"yes"], > > + [[_WKTextManipulationExclusionRule alloc] initExclusion:(BOOL)NO forAttribute:@"data-exclude" value:@"no"], > > (Ditto)
Will do.
Ryosuke Niwa
Comment 7
2019-10-25 13:41:18 PDT
Committed
r251600
: <
https://trac.webkit.org/changeset/251600
>
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