diff --git a/layout/style/ServoBindingList.h b/layout/style/ServoBindingList.h index e3d082724595..1c3f84b3e86c 100644 --- a/layout/style/ServoBindingList.h +++ b/layout/style/ServoBindingList.h @@ -30,7 +30,8 @@ SERVO_BINDING_FUNC(Servo_StyleSheet_FromUTF8Bytes, RawServoStyleSheetStrong, const nsACString* data, mozilla::css::SheetParsingMode parsing_mode, const RawServoMediaList* media_list, - RawGeckoURLExtraData* extra_data) + RawGeckoURLExtraData* extra_data, + uint32_t line_number_offset) SERVO_BINDING_FUNC(Servo_ImportRule_GetSheet, RawServoStyleSheetStrong, const RawServoImportRuleBorrowed import_rule) @@ -40,7 +41,8 @@ SERVO_BINDING_FUNC(Servo_StyleSheet_ClearAndUpdate, mozilla::css::Loader* loader, mozilla::ServoStyleSheet* gecko_stylesheet, const nsACString* data, - RawGeckoURLExtraData* extra_data) + RawGeckoURLExtraData* extra_data, + uint32_t line_number_offset) SERVO_BINDING_FUNC(Servo_StyleSheet_HasRules, bool, RawServoStyleSheetBorrowed sheet) SERVO_BINDING_FUNC(Servo_StyleSheet_GetRules, ServoCssRulesStrong, diff --git a/layout/style/ServoStyleSheet.cpp b/layout/style/ServoStyleSheet.cpp index 624f02981fbb..8e76ddbd4b59 100644 --- a/layout/style/ServoStyleSheet.cpp +++ b/layout/style/ServoStyleSheet.cpp @@ -110,13 +110,14 @@ ServoStyleSheet::ParseSheet(css::Loader* aLoader, Inner()->mSheet = Servo_StyleSheet_FromUTF8Bytes( - aLoader, this, &input, mParsingMode, media, extraData).Consume(); + aLoader, this, &input, mParsingMode, media, extraData, aLineNumber + ).Consume(); } else { // TODO(emilio): Once we have proper inner cloning (which we don't right // now) we should update the mediaList here too, though it's slightly // tricky. Servo_StyleSheet_ClearAndUpdate(Inner()->mSheet, aLoader, - this, &input, extraData); + this, &input, extraData, aLineNumber); } Inner()->mURLData = extraData.forget(); diff --git a/layout/style/test/gtest/StyloParsingBench.cpp b/layout/style/test/gtest/StyloParsingBench.cpp index 3e93ebb6207b..985b7dbffeff 100644 --- a/layout/style/test/gtest/StyloParsingBench.cpp +++ b/layout/style/test/gtest/StyloParsingBench.cpp @@ -28,7 +28,7 @@ static void ServoParsingBench() { NullPrincipalURI::Create(), nullptr, NullPrincipal::Create()); for (int i = 0; i < PARSING_REPETITIONS; i++) { RefPtr stylesheet = Servo_StyleSheet_FromUTF8Bytes( - nullptr, nullptr, &css, eAuthorSheetFeatures, nullptr, data + nullptr, nullptr, &css, eAuthorSheetFeatures, nullptr, data, 0 ).Consume(); } }