[Webkit-unassigned] [Bug 275725] New: Clean up SVGSMILElement::findInstanceTime
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 20 22:59:18 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=275725
Bug ID: 275725
Summary: Clean up SVGSMILElement::findInstanceTime
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: SVG
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ahmad.saleem792 at gmail.com
CC: sabouhallawa at apple.com, zimmermann at kde.org
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!
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240621/ed66f20a/attachment-0001.htm>
More information about the webkit-unassigned
mailing list