Bug 1602317 - Update cbindgen to 0.11.1. r=jrmuizel

This includes more bitflag operators, which means we can remove some slightly
ugly code.

Differential Revision: https://phabricator.services.mozilla.com/D56308

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-12-09 03:20:53 +00:00
Родитель e94a6fe8af
Коммит 85599f3f1b
6 изменённых файлов: 10 добавлений и 25 удалений

Просмотреть файл

@ -15,7 +15,7 @@ option(env='CBINDGEN', nargs=1, when=cbindgen_is_needed,
def check_cbindgen_version(cbindgen, fatal=False):
log.debug("trying cbindgen: %s" % cbindgen)
cbindgen_min_version = Version('0.9.1')
cbindgen_min_version = Version('0.11.1')
# cbindgen x.y.z
version = Version(check_cmd_output(cbindgen, '--version').strip().split(" ")[1])

Просмотреть файл

@ -3033,11 +3033,7 @@ nsChangeHint nsStyleDisplay::CalcDifference(
// test above handles relevant changes in the StyleWillChangeBit_TRANSFORM
// bit, which in turn handles frame reconstruction for changes in the
// containing block of fixed-positioned elements.
//
// TODO(emilio): Should add xor to the generated cbindgen type.
auto willChangeBitsChanged =
StyleWillChangeBits{static_cast<decltype(StyleWillChangeBits::bits)>(
mWillChange.bits.bits ^ aNewData.mWillChange.bits.bits)};
auto willChangeBitsChanged = mWillChange.bits ^ aNewData.mWillChange.bits;
if (willChangeBitsChanged &
(StyleWillChangeBits::STACKING_CONTEXT | StyleWillChangeBits::SCROLL |

Просмотреть файл

@ -387,8 +387,8 @@ void nsTextBoxFrame::DrawText(gfxContext& aRenderingContext,
}
const nsStyleTextReset* styleText = context->StyleTextReset();
if (decorMask &
styleText->mTextDecorationLine) { // a decoration defined here
// a decoration defined here
if (decorMask & styleText->mTextDecorationLine) {
nscolor color;
if (aOverrideColor) {
color = *aOverrideColor;
@ -401,22 +401,21 @@ void nsTextBoxFrame::DrawText(gfxContext& aRenderingContext,
styleText->mTextDecorationLine) {
underColor = color;
underStyle = style;
// TODO(emilio): Could add `operator~` or `remove()` to cbindgen.
decorMask.bits &= ~StyleTextDecorationLine::UNDERLINE.bits;
decorMask &= ~StyleTextDecorationLine::UNDERLINE;
decorations |= StyleTextDecorationLine::UNDERLINE;
}
if (StyleTextDecorationLine::OVERLINE & decorMask &
styleText->mTextDecorationLine) {
overColor = color;
overStyle = style;
decorMask.bits &= ~StyleTextDecorationLine::OVERLINE.bits;
decorMask &= ~StyleTextDecorationLine::OVERLINE;
decorations |= StyleTextDecorationLine::OVERLINE;
}
if (StyleTextDecorationLine::LINE_THROUGH & decorMask &
styleText->mTextDecorationLine) {
strikeColor = color;
strikeStyle = style;
decorMask.bits &= ~StyleTextDecorationLine::LINE_THROUGH.bits;
decorMask &= ~StyleTextDecorationLine::LINE_THROUGH;
decorations |= StyleTextDecorationLine::LINE_THROUGH;
}
}

Просмотреть файл

@ -636,16 +636,6 @@ renaming_overrides_prefixing = true
inline nsRect ToLayoutRect(nscoord aAutoSize = NS_MAXSIZE) const;
"""
"WritingMode" = """
StyleWritingMode operator^(const StyleWritingMode& other) const {
return {static_cast<decltype(bits)>(this->bits ^ other.bits)};
}
StyleWritingMode& operator^=(const StyleWritingMode& other) {
*this = (*this ^ other);
return *this;
}
"""
"VecU8" = """
StyleVecU8(): data(nullptr), length(0), capacity(0) {}
StyleVecU8(const StyleVecU8& aOther) = delete;

Просмотреть файл

@ -264,12 +264,12 @@ wine-3.0.3:
sig-url: "{url}.sign"
key-path: build/unix/build-gcc/DA23579A74D4AD9AF9D3F945CEFAC8EAAF17519D.key
cbindgen-0.9.1:
cbindgen-0.11.1:
description: cbindgen source code
fetch:
type: git
repo: https://github.com/eqrion/cbindgen
revision: 8e4db4c17fbdc0cfa9b98cfe9d47ca6263858def
revision: e050442d057e0d0a4f309672ec2863d51f1ec0b0
cctools-port:
description: cctools-port source code

Просмотреть файл

@ -14,7 +14,7 @@ job-defaults:
fetch:
# If you update this, make sure to update the minimum version in
# build/moz.configure/bindgen.configure as well.
- cbindgen-0.9.1
- cbindgen-0.11.1
linux64-cbindgen:
treeherder: