WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
275725
Clean up SVGSMILElement::findInstanceTime
https://bugs.webkit.org/show_bug.cgi?id=275725
Summary
Clean up SVGSMILElement::findInstanceTime
Ahmad Saleem
Reported
2024-06-20 22:59:18 PDT
Hi Team, Came across another potential merge from Blink's commit: Commit:
https://chromium-review.googlesource.com/c/chromium/src/+/1400822
WebKit Source:
https://github.com/WebKit/WebKit/blob/b8f876b231ab91a7df950c7c0617945620d944e2/Source/WebCore/svg/animation/SVGSMILElement.cpp#L773
This compiles: SMILTime SVGSMILElement::findInstanceTime(BeginOrEnd beginOrEnd, SMILTime minimumTime, bool equalsMinimumOK) const { const Vector<SMILTimeWithOrigin>& list = beginOrEnd == Begin ? m_beginTimes : m_endTimes; if (list.isEmpty()) return beginOrEnd == Begin ? SMILTime::unresolved() : SMILTime::indefinite(); // If an equal value is not accepted, return the next bigger item in the list, if any. auto predicate = [equalsMinimumOK](const SMILTimeWithOrigin& instanceTime, const SMILTime& time) { return equalsMinimumOK ? instanceTime.time() < time : instanceTime.time() <= time; }; auto* item = std::lower_bound(list.begin(), list.end(), minimumTime, predicate); if (item == list.end()) return SMILTime::unresolved(); // The special value "indefinite" does not yield an instance time in the begin list. if (item->time().isIndefinite() && beginOrEnd == Begin) return SMILTime::unresolved(); return item->time(); } ___ Just raising to get input, whether it is good merge? Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-06-27 23:00:14 PDT
<
rdar://problem/130730896
>
Ahmad Saleem
Comment 2
2024-09-24 04:10:44 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/34162
Ahmad Saleem
Comment 3
2024-09-26 04:42:03 PDT
NOTE -
https://github.com/chromium/chromium/commit/f257770602c9d527674536f7bb2169240b4d7411
(removed - WTF binary search implementation).
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