Changeset 251003 in webkit


Ignore:
Timestamp:
Oct 11, 2019 1:21:02 AM (5 years ago)
Author:
calvaris@igalia.com
Message:

MediaTime pretty printer can print if time is invalid
https://bugs.webkit.org/show_bug.cgi?id=202735

Reviewed by Eric Carlson.

  • wtf/MediaTime.cpp:

(WTF::MediaTime::toString const): Append ", invalid" if isInvalid().
(WTF::MediaTime::toJSONObject const): Set boolean invalid to true
when invalid.

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r250953 r251003  
     12019-10-11  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        MediaTime pretty printer can print if time is invalid
     4        https://bugs.webkit.org/show_bug.cgi?id=202735
     5
     6        Reviewed by Eric Carlson.
     7
     8        * wtf/MediaTime.cpp:
     9        (WTF::MediaTime::toString const): Append ", invalid" if isInvalid().
     10        (WTF::MediaTime::toJSONObject const): Set boolean invalid to true
     11        when invalid.
     12
    1132019-10-09  Keith Rollin  <krollin@apple.com>
    214
  • trunk/Source/WTF/wtf/MediaTime.cpp

    r242713 r251003  
    595595    }
    596596    builder.appendFixedPrecisionNumber(toDouble());
     597    if (isInvalid())
     598        builder.appendLiteral(", invalid");
    597599    builder.append('}');
    598600    return builder.toString();
     
    608610    }
    609611
    610     if (isInvalid() || isIndefinite())
     612    if (isInvalid())
     613        object->setBoolean("invalid"_s, true);
     614    else if (isIndefinite())
    611615        object->setString("value"_s, "NaN"_s);
    612616    else if (isPositiveInfinite())
Note: See TracChangeset for help on using the changeset viewer.