⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287761 in webkit


Ignore:
Timestamp:
Jan 7, 2022, 10:46:00 AM (5 years ago)
Author:
graouts@webkit.org
Message:

Values in WebAnimation::instances should not be null-checked
https://bugs.webkit.org/show_bug.cgi?id=234948

Reviewed by Darin Adler.

The HashSet<WebAnimation*> returned by WebAnimation::instances() cannnot hold nullptr
values so we should not have any check for a null value when iterating over its values.

  • dom/Document.cpp:

(WebCore::Document::matchingAnimations):
(WebCore::Document::keyframesRuleDidChange):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r287760 r287761  
     12022-01-07  Antoine Quint  <graouts@webkit.org>
     2
     3        Values in WebAnimation::instances should not be null-checked
     4        https://bugs.webkit.org/show_bug.cgi?id=234948
     5
     6        Reviewed by Darin Adler.
     7
     8        The HashSet<WebAnimation*> returned by WebAnimation::instances() cannnot hold nullptr
     9        values so we should not have any check for a null value when iterating over its values.
     10
     11        * dom/Document.cpp:
     12        (WebCore::Document::matchingAnimations):
     13        (WebCore::Document::keyframesRuleDidChange):
     14
    1152022-01-07  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebCore/dom/Document.cpp

    r287731 r287761  
    85568556    Vector<RefPtr<WebAnimation>> animations;
    85578557    for (auto* animation : WebAnimation::instances()) {
    8558         if (!animation || !animation->isRelevant() || !is<KeyframeEffect>(animation->effect()))
     8558        if (!animation->isRelevant() || !is<KeyframeEffect>(animation->effect()))
    85598559            continue;
    85608560
     
    85748574{
    85758575    for (auto* animation : WebAnimation::instances()) {
    8576         if (!is<CSSAnimation>(animation) || !animation->isRelevant())
     8576        if (!is<CSSAnimation>(*animation) || !animation->isRelevant())
    85778577            continue;
    85788578
Note: See TracChangeset for help on using the changeset viewer.