Changeset 200341 in webkit


Ignore:
Timestamp:
May 2, 2016 3:19:23 PM (8 years ago)
Author:
Simon Fraser
Message:

Add to the Animations log channel output about which properties are being blended
https://bugs.webkit.org/show_bug.cgi?id=157271

Reviewed by Dean Jackson.

Make the Animations log channel dump information as CSS properties are being blended.
Sample output:

blending left from 0px to 400px at 0.57 -> 227.76px
blending transform from translate(0px, 0px, 0px) to translate(400px, 0px, 0px) at 0.74 -> translate(294.97px, 0px, 0px)

This makes it easier to see, for example, transitions to or from "auto" values.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::PropertyWrapperGetter::value):
(WebCore::PropertyWrapperMaybeInvalidColor::value):
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty):
(WebCore::CSSPropertyAnimation::blendProperties):

  • platform/Length.cpp:

(WebCore::operator<<):

  • platform/LengthBox.h:
  • platform/graphics/transforms/IdentityTransformOperation.h:
  • platform/graphics/transforms/Matrix3DTransformOperation.cpp:

(WebCore::Matrix3DTransformOperation::dump):

  • platform/graphics/transforms/Matrix3DTransformOperation.h:
  • platform/graphics/transforms/MatrixTransformOperation.cpp:

(WebCore::MatrixTransformOperation::dump):

  • platform/graphics/transforms/MatrixTransformOperation.h:
  • platform/graphics/transforms/PerspectiveTransformOperation.cpp:

(WebCore::PerspectiveTransformOperation::dump):

  • platform/graphics/transforms/PerspectiveTransformOperation.h:
  • platform/graphics/transforms/RotateTransformOperation.cpp:

(WebCore::RotateTransformOperation::dump):

  • platform/graphics/transforms/RotateTransformOperation.h:
  • platform/graphics/transforms/ScaleTransformOperation.cpp:

(WebCore::ScaleTransformOperation::dump):

  • platform/graphics/transforms/ScaleTransformOperation.h:
  • platform/graphics/transforms/SkewTransformOperation.cpp:

(WebCore::SkewTransformOperation::dump):

  • platform/graphics/transforms/SkewTransformOperation.h:
  • platform/graphics/transforms/TransformOperation.h:
  • platform/graphics/transforms/TransformOperations.cpp:

(WebCore::operator<<):

  • platform/graphics/transforms/TransformOperations.h:
  • platform/graphics/transforms/TranslateTransformOperation.cpp:

(WebCore::TranslateTransformOperation::dump):

  • platform/graphics/transforms/TranslateTransformOperation.h:
  • rendering/style/NinePieceImage.cpp:

(WebCore::operator<<):

  • rendering/style/NinePieceImage.h:
  • svg/SVGLength.cpp:

(WebCore::operator<<):

  • svg/SVGLength.h:
Location:
trunk/Source/WebCore
Files:
1 added
28 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r200250 r200341  
    21102110    platform/Language.cpp
    21112111    platform/Length.cpp
     2112    platform/LengthBox.cpp
    21122113    platform/LengthPoint.cpp
    21132114    platform/LengthSize.cpp
     
    22832284    platform/graphics/transforms/ScaleTransformOperation.cpp
    22842285    platform/graphics/transforms/SkewTransformOperation.cpp
     2286    platform/graphics/transforms/TransformOperation.cpp
    22852287    platform/graphics/transforms/TransformOperations.cpp
    22862288    platform/graphics/transforms/TransformState.cpp
  • trunk/Source/WebCore/ChangeLog

    r200340 r200341  
     12016-05-02  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add to the Animations log channel output about which properties are being blended
     4        https://bugs.webkit.org/show_bug.cgi?id=157271
     5
     6        Reviewed by Dean Jackson.
     7
     8        Make the Animations log channel dump information as CSS properties are being blended.
     9        Sample output:
     10
     11          blending left from 0px to 400px at 0.57 -> 227.76px
     12          blending transform from translate(0px, 0px, 0px) to translate(400px, 0px, 0px) at 0.74 -> translate(294.97px, 0px, 0px)
     13
     14        This makes it easier to see, for example, transitions to or from "auto" values.
     15
     16        * CMakeLists.txt:
     17        * WebCore.xcodeproj/project.pbxproj:
     18        * page/animation/CSSPropertyAnimation.cpp:
     19        (WebCore::PropertyWrapperGetter::value):
     20        (WebCore::PropertyWrapperMaybeInvalidColor::value):
     21        (WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty):
     22        (WebCore::CSSPropertyAnimation::blendProperties):
     23        * platform/Length.cpp:
     24        (WebCore::operator<<):
     25        * platform/LengthBox.h:
     26        * platform/graphics/transforms/IdentityTransformOperation.h:
     27        * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
     28        (WebCore::Matrix3DTransformOperation::dump):
     29        * platform/graphics/transforms/Matrix3DTransformOperation.h:
     30        * platform/graphics/transforms/MatrixTransformOperation.cpp:
     31        (WebCore::MatrixTransformOperation::dump):
     32        * platform/graphics/transforms/MatrixTransformOperation.h:
     33        * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
     34        (WebCore::PerspectiveTransformOperation::dump):
     35        * platform/graphics/transforms/PerspectiveTransformOperation.h:
     36        * platform/graphics/transforms/RotateTransformOperation.cpp:
     37        (WebCore::RotateTransformOperation::dump):
     38        * platform/graphics/transforms/RotateTransformOperation.h:
     39        * platform/graphics/transforms/ScaleTransformOperation.cpp:
     40        (WebCore::ScaleTransformOperation::dump):
     41        * platform/graphics/transforms/ScaleTransformOperation.h:
     42        * platform/graphics/transforms/SkewTransformOperation.cpp:
     43        (WebCore::SkewTransformOperation::dump):
     44        * platform/graphics/transforms/SkewTransformOperation.h:
     45        * platform/graphics/transforms/TransformOperation.h:
     46        * platform/graphics/transforms/TransformOperations.cpp:
     47        (WebCore::operator<<):
     48        * platform/graphics/transforms/TransformOperations.h:
     49        * platform/graphics/transforms/TranslateTransformOperation.cpp:
     50        (WebCore::TranslateTransformOperation::dump):
     51        * platform/graphics/transforms/TranslateTransformOperation.h:
     52        * rendering/style/NinePieceImage.cpp:
     53        (WebCore::operator<<):
     54        * rendering/style/NinePieceImage.h:
     55        * svg/SVGLength.cpp:
     56        (WebCore::operator<<):
     57        * svg/SVGLength.h:
     58
    1592016-05-02  Chris Dumez  <cdumez@apple.com>
    260
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r200320 r200341  
    560560                0FE71405142170B800DB33BA /* ScrollbarThemeMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FE71403142170B800DB33BA /* ScrollbarThemeMock.cpp */; };
    561561                0FE71406142170B800DB33BA /* ScrollbarThemeMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FE71404142170B800DB33BA /* ScrollbarThemeMock.h */; };
     562                0FE95F1B1CD540D000D2F45A /* LengthBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FE95F1A1CD540D000D2F45A /* LengthBox.cpp */; };
     563                0FE95F1D1CD543DF00D2F45A /* TransformOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FE95F1C1CD543DF00D2F45A /* TransformOperation.cpp */; };
    562564                0FEA3E7B191B2FC5000F1B55 /* ScrollingStateFrameScrollingNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA3E79191B2FC5000F1B55 /* ScrollingStateFrameScrollingNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
    563565                0FEA3E7C191B2FC5000F1B55 /* ScrollingStateFrameScrollingNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEA3E7A191B2FC5000F1B55 /* ScrollingStateFrameScrollingNode.cpp */; };
     
    79757977                0FE71404142170B800DB33BA /* ScrollbarThemeMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollbarThemeMock.h; sourceTree = "<group>"; };
    79767978                0FE71415142189FC00DB33BA /* ScrollbarTheme.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollbarTheme.cpp; sourceTree = "<group>"; };
     7979                0FE95F1A1CD540D000D2F45A /* LengthBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthBox.cpp; sourceTree = "<group>"; };
     7980                0FE95F1C1CD543DF00D2F45A /* TransformOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformOperation.cpp; sourceTree = "<group>"; };
    79777981                0FEA3E79191B2FC5000F1B55 /* ScrollingStateFrameScrollingNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingStateFrameScrollingNode.h; sourceTree = "<group>"; };
    79787982                0FEA3E7A191B2FC5000F1B55 /* ScrollingStateFrameScrollingNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingStateFrameScrollingNode.cpp; sourceTree = "<group>"; };
     
    1721517219                                49E911B30EF86D47009D0CAF /* TransformationMatrix.cpp */,
    1721617220                                49E911B40EF86D47009D0CAF /* TransformationMatrix.h */,
     17221                                0FE95F1C1CD543DF00D2F45A /* TransformOperation.cpp */,
    1721717222                                49E911BE0EF86D47009D0CAF /* TransformOperation.h */,
    1721817223                                49E911BF0EF86D47009D0CAF /* TransformOperations.cpp */,
     
    2294622951                                BCE65BE80EACDF16007E4533 /* Length.cpp */,
    2294722952                                BCE65BE90EACDF16007E4533 /* Length.h */,
     22953                                0FE95F1A1CD540D000D2F45A /* LengthBox.cpp */,
    2294822954                                BCFF648F0EAD15C200C1D6F7 /* LengthBox.h */,
    2294922955                                0F87166D1C869D83004FF0DE /* LengthPoint.cpp */,
     
    3092530931                                7633A72713D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp in Sources */,
    3092630932                                A516E8B8136E04DB0076C3C0 /* LocalizedDateCache.mm in Sources */,
     30933                                0FE95F1B1CD540D000D2F45A /* LengthBox.cpp in Sources */,
    3092730934                                C046E1AC1208A9FE00BA2CF7 /* LocalizedStrings.cpp in Sources */,
    3092830935                                1A4832B31A953BA6008B4DFE /* LocalizedStringsCocoa.mm in Sources */,
     
    3128331290                                0F580CFE0F12DE9B0051D689 /* RenderLayerCompositor.cpp in Sources */,
    3128431291                                50D10D991545F5760096D288 /* RenderLayerFilterInfo.cpp in Sources */,
     31292                                0FE95F1D1CD543DF00D2F45A /* TransformOperation.cpp in Sources */,
    3128531293                                3C244FEBA375AC633F88BE6F /* RenderLayerModelObject.cpp in Sources */,
    3128631294                                BC33FB1B0F30EE85002CDD7C /* RenderLineBoxList.cpp in Sources */,
  • trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp

    r199561 r200341  
    4343#include "FloatConversion.h"
    4444#include "IdentityTransformOperation.h"
     45#include "Logging.h"
    4546#include "Matrix3DTransformOperation.h"
    4647#include "MatrixTransformOperation.h"
     
    5152#include "StylePropertyShorthand.h"
    5253#include "StyleResolver.h"
     54#include "TextStream.h"
    5355#include <algorithm>
    5456#include <memory>
     
    385387    virtual bool equals(const RenderStyle* a, const RenderStyle* b) const = 0;
    386388    virtual void blend(const AnimationBase*, RenderStyle*, const RenderStyle*, const RenderStyle*, double) const = 0;
     389   
     390#if !LOG_DISABLED
     391    virtual void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* result, double) const = 0;
     392#endif
    387393
    388394    CSSPropertyID property() const { return m_prop; }
     
    412418        return (a->*m_getter)() == (b->*m_getter)();
    413419    }
     420
     421    T value(const RenderStyle* a) const
     422    {
     423        return (a->*m_getter)();
     424    }
     425
     426#if !LOG_DISABLED
     427    void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* result, double progress) const final
     428    {
     429        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
     430    }
     431#endif
    414432
    415433protected:
     
    718736    }
    719737
     738#if !LOG_DISABLED
     739    void logBlend(const RenderStyle*, const RenderStyle*, const RenderStyle*, double progress) const final
     740    {
     741        // FIXME: better logging.
     742        LOG_WITH_STREAM(Animations, stream << "  blending ShadowData at " << TextStream::FormatNumberRespectingIntegers(progress));
     743    }
     744#endif
     745
    720746private:
    721747    std::unique_ptr<ShadowData> blendSimpleOrMatchedShadowLists(const AnimationBase* anim, double progress, const ShadowData* shadowA, const ShadowData* shadowB) const
     
    801827            return false;
    802828
    803         Color fromColor = (a->*m_getter)();
    804         Color toColor = (b->*m_getter)();
     829        Color fromColor = value(a);
     830        Color toColor = value(b);
    805831
    806832        if (!fromColor.isValid() && !toColor.isValid())
     
    817843    void blend(const AnimationBase* anim, RenderStyle* dst, const RenderStyle* a, const RenderStyle* b, double progress) const override
    818844    {
    819         Color fromColor = (a->*m_getter)();
    820         Color toColor = (b->*m_getter)();
     845        Color fromColor = value(a);
     846        Color toColor = value(b);
    821847
    822848        if (!fromColor.isValid() && !toColor.isValid())
     
    830856    }
    831857
     858    Color value(const RenderStyle* a) const
     859    {
     860        return (a->*m_getter)();
     861    }
     862
     863#if !LOG_DISABLED
     864    void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* result, double progress) const final
     865    {
     866        // FIXME: better logging.
     867        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
     868    }
     869#endif
     870
    832871private:
    833872    Color (RenderStyle::*m_getter)() const;
     
    863902        m_visitedWrapper->blend(anim, dst, a, b, progress);
    864903    }
     904
     905#if !LOG_DISABLED
     906    void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* result, double progress) const final
     907    {
     908        m_wrapper->logBlend(a, b, result, progress);
     909        m_visitedWrapper->logBlend(a, b, result, progress);
     910    }
     911#endif
    865912
    866913private:
     
    10331080    }
    10341081
     1082#if !LOG_DISABLED
     1083    void logBlend(const RenderStyle*, const RenderStyle*, const RenderStyle*, double progress) const final
     1084    {
     1085        // FIXME: better logging.
     1086        LOG_WITH_STREAM(Animations, stream << "  blending FillLayers at " << TextStream::FormatNumberRespectingIntegers(progress));
     1087    }
     1088#endif
     1089
    10351090private:
    10361091    std::unique_ptr<FillLayerAnimationPropertyWrapperBase> m_fillLayerPropertyWrapper;
     
    10711126    }
    10721127
     1128#if !LOG_DISABLED
     1129    void logBlend(const RenderStyle*, const RenderStyle*, const RenderStyle*, double progress) const final
     1130    {
     1131        // FIXME: better logging.
     1132        LOG_WITH_STREAM(Animations, stream << "  blending shorthand property " << getPropertyName(property()) << " at " << TextStream::FormatNumberRespectingIntegers(progress));
     1133    }
     1134#endif
     1135
    10731136    const Vector<AnimationPropertyWrapperBase*>& propertyWrappers() const { return m_propertyWrappers; }
    10741137
     
    11011164        dst->setFlexShrink(blendFunc(anim, a->flexShrink(), b->flexShrink(), progress));
    11021165    }
     1166
     1167#if !LOG_DISABLED
     1168    void logBlend(const RenderStyle*, const RenderStyle*, const RenderStyle*, double progress) const final
     1169    {
     1170        // FIXME: better logging.
     1171        LOG_WITH_STREAM(Animations, stream << "  blending flex at " << TextStream::FormatNumberRespectingIntegers(progress));
     1172    }
     1173#endif
    11031174};
    11041175
     
    11631234    }
    11641235
     1236#if !LOG_DISABLED
     1237    void logBlend(const RenderStyle*, const RenderStyle*, const RenderStyle*, double progress) const final
     1238    {
     1239        // FIXME: better logging.
     1240        LOG_WITH_STREAM(Animations, stream << "  blending SVGPaint at " << TextStream::FormatNumberRespectingIntegers(progress));
     1241    }
     1242#endif
     1243
    11651244private:
    11661245    const SVGPaint::SVGPaintType& (RenderStyle::*m_paintTypeGetter)() const;
     
    11821261    {
    11831262        if (propertyID < firstCSSProperty || propertyID > lastCSSProperty)
    1184             return 0;
     1263            return nullptr;
    11851264
    11861265        unsigned wrapperIndex = indexFromPropertyID(propertyID);
    11871266        if (wrapperIndex == cInvalidPropertyWrapperIndex)
    1188             return 0;
     1267            return nullptr;
    11891268
    11901269        return m_propertyWrappers[wrapperIndex].get();
     
    14711550    if (wrapper) {
    14721551        wrapper->blend(anim, dst, a, b, progress);
     1552#if !LOG_DISABLED
     1553        wrapper->logBlend(a, b, dst, progress);
     1554#endif
    14731555        return !wrapper->animationIsAccelerated() || !anim->isAccelerated();
    14741556    }
  • trunk/Source/WebCore/platform/Length.cpp

    r194496 r200341  
    329329        ts << length.type();
    330330        break;
     331    case Fixed:
     332        ts << TextStream::FormatNumberRespectingIntegers(length.value()) << "px";
     333        break;
    331334    case Relative:
    332     case Fixed:
    333335    case Intrinsic:
    334336    case MinIntrinsic:
     
    344346    case Calculated:
    345347        // FIXME: dump CalculationValue.
     348        ts << "calc(...)";
    346349        break;
    347350    }
  • trunk/Source/WebCore/platform/LengthBox.cpp

    r200340 r200341  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2525
    2626#include "config.h"
    27 #include "Matrix3DTransformOperation.h"
     27#include "LengthBox.h"
    2828
    29 #include <algorithm>
     29#include "TextStream.h"
    3030
    3131namespace WebCore {
    3232
    33 bool Matrix3DTransformOperation::operator==(const TransformOperation& other) const
     33TextStream& operator<<(TextStream& ts, const LengthBox& box)
    3434{
    35     return isSameType(other) && m_matrix == downcast<Matrix3DTransformOperation>(other).m_matrix;
    36 }
    37 
    38 static Ref<TransformOperation> createOperation(TransformationMatrix& to, TransformationMatrix& from, double progress)
    39 {
    40     to.blend(from, progress);
    41     return Matrix3DTransformOperation::create(to);
    42 }
    43 
    44 Ref<TransformOperation> Matrix3DTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
    45 {
    46     if (from && !from->isSameType(*this))
    47         return *this;
    48 
    49     // Convert the TransformOperations into matrices
    50     FloatSize size;
    51     TransformationMatrix fromT;
    52     TransformationMatrix toT;
    53     if (from)
    54         from->apply(fromT, size);
    55 
    56     apply(toT, size);
    57 
    58     if (blendToIdentity)
    59         return createOperation(fromT, toT, progress);
    60     return createOperation(toT, fromT, progress);
     35    ts << "top: " << box.top() << " right: " << box.right() << " bottom: " << box.bottom() << " left: " << box.left();
     36    return ts;
    6137}
    6238
  • trunk/Source/WebCore/platform/LengthBox.h

    r184962 r200341  
    154154typedef BoxExtent<float> FloatBoxExtent;
    155155
     156TextStream& operator<<(TextStream&, const LengthBox&);
     157
    156158} // namespace WebCore
    157159
  • trunk/Source/WebCore/platform/graphics/transforms/IdentityTransformOperation.h

    r197563 r200341  
    6363    }
    6464
     65    void dump(TextStream&) const final;
     66
    6567    IdentityTransformOperation()
    6668    {
  • trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp

    r184274 r200341  
    2727#include "Matrix3DTransformOperation.h"
    2828
     29#include "TextStream.h"
    2930#include <algorithm>
    3031
     
    6162}
    6263
     64void Matrix3DTransformOperation::dump(TextStream& ts) const
     65{
     66    ts << type() << "(" << m_matrix << ")";
     67}
     68
    6369} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.h

    r197563 r200341  
    6363    Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
    6464   
     65    void dump(TextStream&) const final;
     66
    6567    Matrix3DTransformOperation(const TransformationMatrix& mat)
    6668    {
  • trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp

    r184274 r200341  
    2323#include "MatrixTransformOperation.h"
    2424
     25#include "TextStream.h"
    2526#include <algorithm>
    2627
     
    5960}
    6061
     62void MatrixTransformOperation::dump(TextStream& ts) const
     63{
     64    ts << "("
     65        << TextStream::FormatNumberRespectingIntegers(m_a) << ", "
     66        << TextStream::FormatNumberRespectingIntegers(m_b) << ", "
     67        << TextStream::FormatNumberRespectingIntegers(m_c) << ", "
     68        << TextStream::FormatNumberRespectingIntegers(m_d) << ", "
     69        << TextStream::FormatNumberRespectingIntegers(m_e) << ", "
     70        << TextStream::FormatNumberRespectingIntegers(m_f) << ")";
     71}
     72
    6173} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.h

    r197563 r200341  
    6868
    6969    Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
    70    
     70
     71    void dump(TextStream&) const final;
     72
    7173    MatrixTransformOperation(double a, double b, double c, double d, double e, double f)
    7274        : m_a(a)
  • trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.cpp

    r184193 r200341  
    2828
    2929#include "AnimationUtilities.h"
     30#include "TextStream.h"
    3031#include <wtf/MathExtras.h>
    3132
     
    6970}
    7071
     72void PerspectiveTransformOperation::dump(TextStream& ts) const
     73{
     74    ts << type() << "(" << m_p << ")";
     75}
     76
    7177} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/transforms/PerspectiveTransformOperation.h

    r197563 r200341  
    6565    Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
    6666
     67    void dump(TextStream&) const final;
     68
    6769    PerspectiveTransformOperation(const Length& p)
    6870        : m_p(p)
  • trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp

    r184193 r200341  
    2424
    2525#include "AnimationUtilities.h"
     26#include "TextStream.h"
    2627#include <algorithm>
    2728#include <wtf/MathExtras.h>
     
    100101}
    101102
     103void RotateTransformOperation::dump(TextStream& ts) const
     104{
     105    ts << type() << "(" << TextStream::FormatNumberRespectingIntegers(m_x) << ", " << TextStream::FormatNumberRespectingIntegers(m_y) << ", " << TextStream::FormatNumberRespectingIntegers(m_z) << ", " << TextStream::FormatNumberRespectingIntegers(m_angle) << "deg)";
     106}
     107
    102108} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.h

    r197563 r200341  
    7070    Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
    7171
     72    void dump(TextStream&) const final;
     73
    7274    RotateTransformOperation(double x, double y, double z, double angle, OperationType type)
    7375        : m_x(x)
  • trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.cpp

    r184193 r200341  
    2424
    2525#include "AnimationUtilities.h"
     26#include "TextStream.h"
    2627
    2728namespace WebCore {
     
    5455}
    5556
     57void ScaleTransformOperation::dump(TextStream& ts) const
     58{
     59    ts << type() << "(" << TextStream::FormatNumberRespectingIntegers(m_x) << ", " << TextStream::FormatNumberRespectingIntegers(m_y) << ", " << TextStream::FormatNumberRespectingIntegers(m_z) << ")";
     60}
     61
    5662} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/transforms/ScaleTransformOperation.h

    r197563 r200341  
    6969    Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
    7070
     71    void dump(TextStream&) const final;
     72
    7173    ScaleTransformOperation(double sx, double sy, double sz, OperationType type)
    7274        : m_x(sx)
  • trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.cpp

    r184193 r200341  
    2424
    2525#include "AnimationUtilities.h"
     26#include "TextStream.h"
    2627
    2728namespace WebCore {
     
    4950}
    5051
     52void SkewTransformOperation::dump(TextStream& ts) const
     53{
     54    ts << type() << "(" << TextStream::FormatNumberRespectingIntegers(m_angleX) << "deg, " << TextStream::FormatNumberRespectingIntegers(m_angleY) << "deg)";
     55}
     56
    5157} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/transforms/SkewTransformOperation.h

    r197563 r200341  
    6262
    6363    Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
     64
     65    void dump(TextStream&) const final;
    6466   
    6567    SkewTransformOperation(double angleX, double angleY, OperationType type)
  • trunk/Source/WebCore/platform/graphics/transforms/TransformOperation.h

    r184193 r200341  
    105105        return type() == TRANSLATE_X || type() == TRANSLATE_Y || type() == TRANSLATE_Z || type() == TRANSLATE || type() == TRANSLATE_3D;
    106106    }
     107   
     108    virtual void dump(TextStream&) const = 0;
    107109};
     110
     111TextStream& operator<<(TextStream&, TransformOperation::OperationType);
     112TextStream& operator<<(TextStream&, const TransformOperation&);
    108113
    109114} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp

    r184193 r200341  
    2525#include "IdentityTransformOperation.h"
    2626#include "Matrix3DTransformOperation.h"
     27#include "TextStream.h"
    2728#include <algorithm>
    2829
     
    127128}
    128129
     130TextStream& operator<<(TextStream& ts, const TransformOperations& ops)
     131{
     132    for (const auto& operation : ops.operations())
     133        ts << *operation;
     134    return ts;
     135}
     136
    129137} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h

    r181515 r200341  
    8383};
    8484
     85TextStream& operator<<(TextStream&, const TransformOperations&);
     86
    8587} // namespace WebCore
    8688
  • trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.cpp

    r184193 r200341  
    2222#include "config.h"
    2323#include "TranslateTransformOperation.h"
     24
    2425#include "FloatConversion.h"
     26#include "TextStream.h"
    2527
    2628namespace WebCore {
     
    5052}
    5153
     54void TranslateTransformOperation::dump(TextStream& ts) const
     55{
     56    ts << type() << "(" << m_x << ", " << m_y << ", " << m_z << ")";
     57}
     58
    5259} // namespace WebCore
  • trunk/Source/WebCore/platform/graphics/transforms/TranslateTransformOperation.h

    r197563 r200341  
    7474    Ref<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
    7575
     76    void dump(TextStream&) const final;
     77
    7678    TranslateTransformOperation(const Length& tx, const Length& ty, const Length& tz, OperationType type)
    7779        : m_x(tx)
  • trunk/Source/WebCore/rendering/style/NinePieceImage.cpp

    r194496 r200341  
    2828#include "LengthFunctions.h"
    2929#include "RenderStyle.h"
     30#include "TextStream.h"
    3031#include <wtf/NeverDestroyed.h>
    3132#include <wtf/PointerComparison.h>
     
    264265}
    265266
    266 }
     267TextStream& operator<<(TextStream& ts, const NinePieceImage& image)
     268{
     269    ts << "style-image " << image.image() << " slices " << image.imageSlices();
     270    return ts;
     271}
     272
     273}
  • trunk/Source/WebCore/rendering/style/NinePieceImage.h

    r194496 r200341  
    211211};
    212212
     213TextStream& operator<<(TextStream&, const NinePieceImage&);
     214
    213215} // namespace WebCore
    214216
  • trunk/Source/WebCore/svg/SVGLength.cpp

    r196991 r200341  
    3030#include "SVGNames.h"
    3131#include "SVGParserUtilities.h"
     32#include "TextStream.h"
    3233#include <wtf/MathExtras.h>
    3334#include <wtf/NeverDestroyed.h>
     
    410411}
    411412
    412 }
     413TextStream& operator<<(TextStream& ts, const SVGLength& length)
     414{
     415    ts << length.valueAsString();
     416    return ts;
     417}
     418
     419}
  • trunk/Source/WebCore/svg/SVGLength.h

    r196991 r200341  
    170170};
    171171
     172TextStream& operator<<(TextStream&, const SVGLength&);
    172173
    173174} // namespace WebCore
Note: See TracChangeset for help on using the changeset viewer.