media/libogg/geckoextra/include/OggStructsForRLBox.h
author Masayuki Nakano <masayuki@d-toybox.com>
Sun, 16 Jan 2022 06:21:17 +0000
changeset 604634 9ef0614a59629916c1e182eb8eda055b0b0e8b32
parent 525198 a3117fce845de047bcf5657fa7ae4e09da45b340
permissions -rw-r--r--
Bug 1749299 - Make `HTMLEditor::HandleInsertLinefeed()` stop handling it if insertion point cannot have text nodes r=m_kato Ideally, it should not be called when the editor cannot insert new text node. However, the callers are complicated. Therefore, let's check in it for avoiding making the callers more complicated. Fortunately, this is not realistic path for normal web apps. Therefore, the compatibility of the behavior is not matter. That's the reason why this patch does not have a test comparing the result. Differential Revision: https://phabricator.services.mozilla.com/D135826

// -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vim: set ts=2 et sw=2 tw=80:
// This Source Code is subject to the terms of the Mozilla Public License
// version 2.0 (the "License"). You can obtain a copy of the License at
// http://mozilla.org/MPL/2.0/.

#ifndef OggStructsForRLBox_h__
#define OggStructsForRLBox_h__

#if defined(__clang__)
#  pragma clang diagnostic push
#  pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#elif defined(__GNUC__) || defined(__GNUG__)
// Can't turn off the variadic macro warning emitted from -pedantic
#  pragma GCC system_header
#elif defined(_MSC_VER)
// Doesn't seem to emit the warning
#else
// Don't know the compiler... just let it go through
#endif

#define sandbox_fields_reflection_ogg_class_ogg_packet(f, g, ...) \
  f(unsigned char *, packet    , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long           , bytes     , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long           , b_o_s     , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long           , e_o_s     , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long long      , granulepos, FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long long      , packetno  , FIELD_NORMAL, ##__VA_ARGS__) g()

#define sandbox_fields_reflection_ogg_class_ogg_sync_state(f, g, ...) \
  f(unsigned char *, data       , FIELD_NORMAL, ##__VA_ARGS__) g()    \
  f(int            , storage    , FIELD_NORMAL, ##__VA_ARGS__) g()    \
  f(int            , fill       , FIELD_NORMAL, ##__VA_ARGS__) g()    \
  f(int            , returned   , FIELD_NORMAL, ##__VA_ARGS__) g()    \
  f(int            , unsynced   , FIELD_NORMAL, ##__VA_ARGS__) g()    \
  f(int            , headerbytes, FIELD_NORMAL, ##__VA_ARGS__) g()    \
  f(int            , bodybytes  , FIELD_NORMAL, ##__VA_ARGS__) g()

#define sandbox_fields_reflection_ogg_class_ogg_page(f, g, ...)   \
  f(unsigned char *, header    , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long           , header_len, FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(unsigned char *, body      , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long           , body_len  , FIELD_NORMAL, ##__VA_ARGS__) g()

#define sandbox_fields_reflection_ogg_class_ogg_stream_state(f, g, ...)    \
  f(unsigned char *    , body_data      , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long               , body_storage   , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long               , body_fill      , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long               , body_returned  , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(int *              , lacing_vals    , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(ogg_int64_t *      , granule_vals   , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long               , lacing_storage , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long               , lacing_fill    , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long               , lacing_packet  , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long               , lacing_returned, FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(unsigned char [282], header         , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(int                , header_fill    , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(int                , e_o_s          , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(int                , b_o_s          , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long               , serialno       , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(long               , pageno         , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(ogg_int64_t        , packetno       , FIELD_NORMAL, ##__VA_ARGS__) g() \
  f(ogg_int64_t        , granulepos     , FIELD_NORMAL, ##__VA_ARGS__) g()

#define sandbox_fields_reflection_ogg_allClasses(f, ...) \
  f(ogg_packet      , ogg, ##__VA_ARGS__)                \
  f(ogg_sync_state  , ogg, ##__VA_ARGS__)                \
  f(ogg_page        , ogg, ##__VA_ARGS__)                \
  f(ogg_stream_state, ogg, ##__VA_ARGS__)

#if defined(__clang__)
#  pragma clang diagnostic pop
#elif defined(__GNUC__) || defined(__GNUG__)
#elif defined(_MSC_VER)
#else
#endif

#endif