зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1390691 - Fix up Servo_StyleSet_MediumFeaturesChanged for Linux 32-bit ABI. r=manishearth
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at the moment because they wrap the value in a struct. This causes the Rust side to believe the caller will pass along space for the struct return value, while C++ believes it's just an integer value. MozReview-Commit-ID: LY6z7lEKgOp --HG-- extra : rebase_source : deb9739bd100e2162e7c93d6d45d7029d7793355
This commit is contained in:
Родитель
f68386ce04
Коммит
418161625f
|
@ -63,7 +63,10 @@ SERVO_BINDING_FUNC(Servo_StyleSet_Clear, void,
|
|||
RawServoStyleSetBorrowed set)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_RebuildCachedData, void,
|
||||
RawServoStyleSetBorrowed set)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_MediumFeaturesChanged, mozilla::OriginFlags,
|
||||
// We'd like to return `OriginFlags` here, but bindgen bitfield enums don't
|
||||
// work as return values with the Linux 32-bit ABI at the moment because
|
||||
// they wrap the value in a struct.
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_MediumFeaturesChanged, uint8_t,
|
||||
RawServoStyleSetBorrowed set, bool* viewport_units_used)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_Drop, void, RawServoStyleSetOwned set)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_CompatModeChanged, void,
|
||||
|
|
|
@ -167,8 +167,8 @@ nsRestyleHint
|
|||
ServoStyleSet::MediumFeaturesChanged(bool aViewportChanged)
|
||||
{
|
||||
bool viewportUnitsUsed = false;
|
||||
const OriginFlags rulesChanged =
|
||||
Servo_StyleSet_MediumFeaturesChanged(mRawSet.get(), &viewportUnitsUsed);
|
||||
const OriginFlags rulesChanged = static_cast<OriginFlags>(
|
||||
Servo_StyleSet_MediumFeaturesChanged(mRawSet.get(), &viewportUnitsUsed));
|
||||
|
||||
if (rulesChanged != OriginFlags(0)) {
|
||||
MarkOriginsDirty(rulesChanged);
|
||||
|
|
Загрузка…
Ссылка в новой задаче