tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

fix-comma-end-enum-list.patch (14313B)


      1 diff --git a/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h b/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h
      2 --- a/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h
      3 +++ b/gfx/skia/include/core/SkAdvancedTypefaceMetrics.h
      4 @@ -29,17 +29,17 @@ public:
      5     SkString fFontName;
      6 
      7     enum FontType {
      8         kType1_Font,
      9         kType1CID_Font,
     10         kCFF_Font,
     11         kTrueType_Font,
     12         kOther_Font,
     13 -        kNotEmbeddable_Font,
     14 +        kNotEmbeddable_Font
     15     };
     16     // The type of the underlying font program.  This field determines which
     17     // of the following fields are valid.  If it is kOther_Font or
     18     // kNotEmbeddable_Font, the per glyph information will never be populated.
     19     FontType fType;
     20 
     21     // fMultiMaster may be true for Type1_Font or CFF_Font.
     22     bool fMultiMaster;
     23 @@ -51,17 +51,17 @@ public:
     24         kFixedPitch_Style  = 0x00001,
     25         kSerif_Style       = 0x00002,
     26         kSymbolic_Style    = 0x00004,
     27         kScript_Style      = 0x00008,
     28         kNonsymbolic_Style = 0x00020,
     29         kItalic_Style      = 0x00040,
     30         kAllCaps_Style     = 0x10000,
     31         kSmallCaps_Style   = 0x20000,
     32 -        kForceBold_Style   = 0x40000,
     33 +        kForceBold_Style   = 0x40000
     34     };
     35     uint16_t fStyle;        // Font style characteristics.
     36     int16_t fItalicAngle;   // Counterclockwise degrees from vertical of the
     37                             // dominant vertical stroke for an Italic face.
     38     // The following fields are all in font units.
     39     int16_t fAscent;       // Max height above baseline, not including accents.
     40     int16_t fDescent;      // Max depth below baseline (negative).
     41     int16_t fStemV;        // Thickness of dominant vertical stem.
     42 @@ -70,26 +70,26 @@ public:
     43     SkIRect fBBox;  // The bounding box of all glyphs (in font units).
     44 
     45     // The type of advance data wanted.
     46     enum PerGlyphInfo {
     47       kNo_PerGlyphInfo         = 0x0, // Don't populate any per glyph info.
     48       kHAdvance_PerGlyphInfo   = 0x1, // Populate horizontal advance data.
     49       kVAdvance_PerGlyphInfo   = 0x2, // Populate vertical advance data.
     50       kGlyphNames_PerGlyphInfo = 0x4, // Populate glyph names (Type 1 only).
     51 -      kToUnicode_PerGlyphInfo  = 0x8, // Populate ToUnicode table, ignored
     52 +      kToUnicode_PerGlyphInfo  = 0x8  // Populate ToUnicode table, ignored
     53                                       // for Type 1 fonts
     54     };
     55 
     56     template <typename Data>
     57     struct AdvanceMetric {
     58         enum MetricType {
     59             kDefault,  // Default advance: fAdvance.count = 1
     60             kRange,    // Advances for a range: fAdvance.count = fEndID-fStartID
     61 -            kRun,      // fStartID-fEndID have same advance: fAdvance.count = 1
     62 +            kRun       // fStartID-fEndID have same advance: fAdvance.count = 1
     63         };
     64         MetricType fType;
     65         uint16_t fStartId;
     66         uint16_t fEndId;
     67         SkTDArray<Data> fAdvance;
     68         SkTScopedPtr<AdvanceMetric<Data> > fNext;
     69     };
     70 
     71 diff --git a/gfx/skia/include/core/SkBlitRow.h b/gfx/skia/include/core/SkBlitRow.h
     72 --- a/gfx/skia/include/core/SkBlitRow.h
     73 +++ b/gfx/skia/include/core/SkBlitRow.h
     74 @@ -44,17 +44,17 @@ public:
     75 
     76     //! Public entry-point to return a blit function ptr
     77     static Proc Factory(unsigned flags, SkBitmap::Config);
     78 
     79     ///////////// D32 version
     80 
     81     enum Flags32 {
     82         kGlobalAlpha_Flag32     = 1 << 0,
     83 -        kSrcPixelAlpha_Flag32   = 1 << 1,
     84 +        kSrcPixelAlpha_Flag32   = 1 << 1
     85     };
     86 
     87     /** Function pointer that blends 32bit colors onto a 32bit destination.
     88         @param dst  array of dst 32bit colors
     89         @param src  array of src 32bit colors (w/ or w/o alpha)
     90         @param count number of colors to blend
     91         @param alpha global alpha to be applied to all src colors
     92      */
     93 diff --git a/gfx/skia/include/core/SkCanvas.h b/gfx/skia/include/core/SkCanvas.h
     94 --- a/gfx/skia/include/core/SkCanvas.h
     95 +++ b/gfx/skia/include/core/SkCanvas.h
     96 @@ -132,17 +132,17 @@ public:
     97          * low byte to high byte: B, G, R, A.
     98          */
     99         kBGRA_Premul_Config8888,
    100         kBGRA_Unpremul_Config8888,
    101         /**
    102          * low byte to high byte: R, G, B, A.
    103          */
    104         kRGBA_Premul_Config8888,
    105 -        kRGBA_Unpremul_Config8888,
    106 +        kRGBA_Unpremul_Config8888
    107     };
    108 
    109     /**
    110      *  On success (returns true), copy the canvas pixels into the bitmap.
    111      *  On failure, the bitmap parameter is left unchanged and false is
    112      *  returned.
    113      *
    114      *  The canvas' pixels are converted to the bitmap's config. The only
    115 diff --git a/gfx/skia/include/core/SkDevice.h b/gfx/skia/include/core/SkDevice.h
    116 --- a/gfx/skia/include/core/SkDevice.h
    117 +++ b/gfx/skia/include/core/SkDevice.h
    118 @@ -134,17 +134,17 @@ public:
    119      *  Return the device's origin: its offset in device coordinates from
    120      *  the default origin in its canvas' matrix/clip
    121      */
    122     const SkIPoint& getOrigin() const { return fOrigin; }
    123 
    124 protected:
    125     enum Usage {
    126        kGeneral_Usage,
    127 -       kSaveLayer_Usage, // <! internal use only
    128 +       kSaveLayer_Usage // <! internal use only
    129     };
    130 
    131     struct TextFlags {
    132         uint32_t            fFlags;     // SkPaint::getFlags()
    133         SkPaint::Hinting    fHinting;
    134     };
    135 
    136     /**
    137 diff --git a/gfx/skia/include/core/SkFlattenable.h b/gfx/skia/include/core/SkFlattenable.h
    138 --- a/gfx/skia/include/core/SkFlattenable.h
    139 +++ b/gfx/skia/include/core/SkFlattenable.h
    140 @@ -216,17 +216,17 @@ public:
    141     SkFactorySet* setFactoryRecorder(SkFactorySet*);
    142 
    143     enum Flags {
    144         kCrossProcess_Flag       = 0x01,
    145         /**
    146          *  Instructs the writer to inline Factory names as there are seen the
    147          *  first time (after that we store an index). The pipe code uses this.
    148          */
    149 -        kInlineFactoryNames_Flag = 0x02,
    150 +        kInlineFactoryNames_Flag = 0x02
    151     };
    152     Flags getFlags() const { return (Flags)fFlags; }
    153     void setFlags(Flags flags) { fFlags = flags; }
    154     
    155     bool isCrossProcess() const {
    156         return SkToBool(fFlags & kCrossProcess_Flag);
    157     }
    158     bool inlineFactoryNames() const {
    159 diff --git a/gfx/skia/include/core/SkFontHost.h b/gfx/skia/include/core/SkFontHost.h
    160 --- a/gfx/skia/include/core/SkFontHost.h
    161 +++ b/gfx/skia/include/core/SkFontHost.h
    162 @@ -245,17 +245,17 @@ public:
    163         vertically. When rendering subpixel glyphs we need to know which way
    164         round they are.
    165 
    166         Note, if you change this after startup, you'll need to flush the glyph
    167         cache because it'll have the wrong type of masks cached.
    168     */
    169     enum LCDOrientation {
    170         kHorizontal_LCDOrientation = 0,    //!< this is the default
    171 -        kVertical_LCDOrientation   = 1,
    172 +        kVertical_LCDOrientation   = 1
    173     };
    174 
    175     static void SetSubpixelOrientation(LCDOrientation orientation);
    176     static LCDOrientation GetSubpixelOrientation();
    177 
    178     /** LCD color elements can vary in order. For subpixel text we need to know
    179         the order which the LCDs uses so that the color fringes are in the
    180         correct place.
    181 @@ -264,17 +264,17 @@ public:
    182         cache because it'll have the wrong type of masks cached.
    183 
    184         kNONE_LCDOrder means that the subpixel elements are not spatially
    185         separated in any usable fashion.
    186      */
    187     enum LCDOrder {
    188         kRGB_LCDOrder = 0,    //!< this is the default
    189         kBGR_LCDOrder = 1,
    190 -        kNONE_LCDOrder = 2,
    191 +        kNONE_LCDOrder = 2
    192     };
    193 
    194     static void SetSubpixelOrder(LCDOrder order);
    195     static LCDOrder GetSubpixelOrder();
    196 
    197 #ifdef SK_BUILD_FOR_ANDROID
    198     ///////////////////////////////////////////////////////////////////////////
    199 
    200 diff --git a/gfx/skia/include/core/SkMaskFilter.h b/gfx/skia/include/core/SkMaskFilter.h
    201 --- a/gfx/skia/include/core/SkMaskFilter.h
    202 +++ b/gfx/skia/include/core/SkMaskFilter.h
    203 @@ -57,17 +57,17 @@ public:
    204 
    205     virtual void flatten(SkFlattenableWriteBuffer& ) {}
    206 
    207     enum BlurType {
    208         kNone_BlurType,    //!< this maskfilter is not a blur
    209         kNormal_BlurType,  //!< fuzzy inside and outside
    210         kSolid_BlurType,   //!< solid inside, fuzzy outside
    211         kOuter_BlurType,   //!< nothing inside, fuzzy outside
    212 -        kInner_BlurType,   //!< fuzzy inside, nothing outside
    213 +        kInner_BlurType    //!< fuzzy inside, nothing outside
    214     };
    215 
    216     struct BlurInfo {
    217         SkScalar fRadius;
    218         bool     fIgnoreTransform;
    219         bool     fHighQuality;
    220     };
    221 
    222 diff --git a/gfx/skia/include/core/SkPaint.h b/gfx/skia/include/core/SkPaint.h
    223 --- a/gfx/skia/include/core/SkPaint.h
    224 +++ b/gfx/skia/include/core/SkPaint.h
    225 @@ -70,17 +70,17 @@ public:
    226            kFull_Hinting   -> <same as kNormalHinting, unless we are rendering
    227                               subpixel glyphs, in which case TARGET_LCD or
    228                               TARGET_LCD_V is used>
    229     */
    230     enum Hinting {
    231         kNo_Hinting            = 0,
    232         kSlight_Hinting        = 1,
    233         kNormal_Hinting        = 2,     //!< this is the default
    234 -        kFull_Hinting          = 3,
    235 +        kFull_Hinting          = 3
    236     };
    237 
    238     Hinting getHinting() const {
    239         return static_cast<Hinting>(fHinting);
    240     }
    241 
    242     void setHinting(Hinting hintingLevel);
    243 
    244 @@ -282,17 +282,17 @@ public:
    245         results may not appear the same as if it was drawn twice, filled and
    246         then stroked.
    247     */
    248     enum Style {
    249         kFill_Style,            //!< fill the geometry
    250         kStroke_Style,          //!< stroke the geometry
    251         kStrokeAndFill_Style,   //!< fill and stroke the geometry
    252 
    253 -        kStyleCount,
    254 +        kStyleCount
    255     };
    256 
    257     /** Return the paint's style, used for controlling how primitives'
    258         geometries are interpreted (except for drawBitmap, which always assumes
    259         kFill_Style).
    260         @return the paint's Style
    261     */
    262     Style getStyle() const { return (Style)fStyle; }
    263 diff --git a/gfx/skia/include/core/SkScalerContext.h b/gfx/skia/include/core/SkScalerContext.h
    264 --- a/gfx/skia/include/core/SkScalerContext.h
    265 +++ b/gfx/skia/include/core/SkScalerContext.h
    266 @@ -172,24 +172,24 @@ public:
    267         kHintingBit2_Flag         = 0x0100,
    268 
    269         // these should only ever be set if fMaskFormat is LCD16 or LCD32
    270         kLCD_Vertical_Flag        = 0x0200,    // else Horizontal
    271         kLCD_BGROrder_Flag        = 0x0400,    // else RGB order
    272 
    273         // luminance : 0 for black text, kLuminance_Max for white text
    274         kLuminance_Shift          = 11, // to shift into the other flags above
    275 -        kLuminance_Bits           = 3,  // ensure Flags doesn't exceed 16bits
    276 +        kLuminance_Bits           = 3  // ensure Flags doesn't exceed 16bits
    277     };
    278     
    279     // computed values
    280     enum {
    281         kHinting_Mask   = kHintingBit1_Flag | kHintingBit2_Flag,
    282         kLuminance_Max  = (1 << kLuminance_Bits) - 1,
    283 -        kLuminance_Mask = kLuminance_Max << kLuminance_Shift,
    284 +        kLuminance_Mask = kLuminance_Max << kLuminance_Shift
    285     };
    286 
    287     struct Rec {
    288         uint32_t    fOrigFontID;
    289         uint32_t    fFontID;
    290         SkScalar    fTextSize, fPreScaleX, fPreSkewX;
    291         SkScalar    fPost2x2[2][2];
    292         SkScalar    fFrameWidth, fMiterLimit;
    293 diff --git a/gfx/skia/include/core/SkTypes.h b/gfx/skia/include/core/SkTypes.h
    294 --- a/gfx/skia/include/core/SkTypes.h
    295 +++ b/gfx/skia/include/core/SkTypes.h
    296 @@ -433,17 +433,17 @@ public:
    297          */
    298         kAlloc_OnShrink,
    299         
    300         /**
    301          *  If the requested size is smaller than the current size, and the
    302          *  current block is dynamically allocated, just return the old
    303          *  block.
    304          */
    305 -        kReuse_OnShrink,
    306 +        kReuse_OnShrink
    307     };
    308 
    309     /**
    310      *  Reallocates the block to a new size. The ptr may or may not change.
    311      */
    312     void* reset(size_t size, OnShrink shrink = kAlloc_OnShrink) {
    313         if (size == fSize || (kReuse_OnShrink == shrink && size < fSize)) {
    314             return fPtr;
    315 diff --git a/gfx/skia/include/effects/SkLayerDrawLooper.h b/gfx/skia/include/effects/SkLayerDrawLooper.h
    316 --- a/gfx/skia/include/effects/SkLayerDrawLooper.h
    317 +++ b/gfx/skia/include/effects/SkLayerDrawLooper.h
    318 @@ -36,17 +36,17 @@ public:
    319         
    320         /**
    321          *  Use the layer's paint entirely, with these exceptions:
    322          *  - We never override the draw's paint's text_encoding, since that is
    323          *    used to interpret the text/len parameters in draw[Pos]Text.
    324          *  - Flags and Color are always computed using the LayerInfo's
    325          *    fFlagsMask and fColorMode.
    326          */
    327 -        kEntirePaint_Bits = -1,
    328 +        kEntirePaint_Bits = -1
    329         
    330     };
    331     typedef int32_t BitFlags;
    332 
    333     /**
    334      *  Info for how to apply the layer's paint and offset.
    335      *
    336      *  fFlagsMask selects which flags in the layer's paint should be applied.
    337 diff --git a/gfx/skia/src/core/SkBitmap.cpp b/gfx/skia/src/core/SkBitmap.cpp
    338 --- a/gfx/skia/src/core/SkBitmap.cpp
    339 +++ b/gfx/skia/src/core/SkBitmap.cpp
    340 @@ -1357,17 +1357,17 @@ bool SkBitmap::extractAlpha(SkBitmap* ds
    341 
    342 ///////////////////////////////////////////////////////////////////////////////
    343 
    344 enum {
    345     SERIALIZE_PIXELTYPE_NONE,
    346     SERIALIZE_PIXELTYPE_RAW_WITH_CTABLE,
    347     SERIALIZE_PIXELTYPE_RAW_NO_CTABLE,
    348     SERIALIZE_PIXELTYPE_REF_DATA,
    349 -    SERIALIZE_PIXELTYPE_REF_PTR,
    350 +    SERIALIZE_PIXELTYPE_REF_PTR
    351 };
    352 
    353 static void writeString(SkFlattenableWriteBuffer& buffer, const char str[]) {
    354     size_t len = strlen(str);
    355     buffer.write32(len);
    356     buffer.writePad(str, len);
    357 }
    358 
    359 diff --git a/gfx/skia/src/core/SkMatrix.cpp b/gfx/skia/src/core/SkMatrix.cpp
    360 --- a/gfx/skia/src/core/SkMatrix.cpp
    361 +++ b/gfx/skia/src/core/SkMatrix.cpp
    362 @@ -1715,17 +1715,17 @@ SkScalar SkMatrix::getMaxStretch() const
    363 const SkMatrix& SkMatrix::I() {
    364     static SkMatrix gIdentity;
    365     static bool gOnce;
    366     if (!gOnce) {
    367         gIdentity.reset();
    368         gOnce = true;
    369     }
    370     return gIdentity;
    371 -};
    372 +}
    373 
    374 const SkMatrix& SkMatrix::InvalidMatrix() {
    375     static SkMatrix gInvalid;
    376     static bool gOnce;
    377     if (!gOnce) {
    378         gInvalid.setAll(SK_ScalarMax, SK_ScalarMax, SK_ScalarMax,
    379                         SK_ScalarMax, SK_ScalarMax, SK_ScalarMax,
    380                         SK_ScalarMax, SK_ScalarMax, SK_ScalarMax);