Bug 1287383 - Support style="" attributes longer than 255 characters when using the Servo style backend. r?emilio draft
authorCameron McCormack <cam@mcc.id.au>
Mon, 18 Jul 2016 16:36:59 +0800
changeset 388927 fa5158212bf473e8db17e8a3bd21b9cbfaf9329c
parent 388925 c8ba6a6eec22033228aad26f08db5ac4ff129461
child 525621 6d8a7b5417d4b13fb4d50dbe6c137f93fb658561
push id23261
push userbmo:cam@mcc.id.au
push dateMon, 18 Jul 2016 08:40:19 +0000
reviewersemilio
bugs1287383
milestone50.0a1
Bug 1287383 - Support style="" attributes longer than 255 characters when using the Servo style backend. r?emilio MozReview-Commit-ID: 9o5Go7lnAhG
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -679,17 +679,17 @@ Servo_InitStyleSet()
 void
 Servo_DropStyleSet(RawServoStyleSet* set)
 {
   MOZ_CRASH("stylo: shouldn't be calling Servo_DropStyleSet in a "
             "non-MOZ_STYLO build");
 }
 
 ServoDeclarationBlock*
-Servo_ParseStyleAttribute(const uint8_t* bytes, uint8_t length,
+Servo_ParseStyleAttribute(const uint8_t* bytes, uint32_t length,
                           nsHTMLCSSStyleSheet* cache)
 {
   MOZ_CRASH("stylo: shouldn't be calling Servo_ParseStyleAttribute in a "
             "non-MOZ_STYLO build");
 }
 
 void
 Servo_DropDeclarationBlock(ServoDeclarationBlock* declarations)
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -212,17 +212,17 @@ void Servo_InsertStyleSheetBefore(RawSer
                                   RawServoStyleSheet* reference,
                                   RawServoStyleSet* set);
 bool Servo_StyleSheetHasRules(RawServoStyleSheet* sheet);
 RawServoStyleSet* Servo_InitStyleSet();
 void Servo_DropStyleSet(RawServoStyleSet* set);
 
 // Style attributes.
 ServoDeclarationBlock* Servo_ParseStyleAttribute(const uint8_t* bytes,
-                                                 uint8_t length,
+                                                 uint32_t length,
                                                  nsHTMLCSSStyleSheet* cache);
 void Servo_DropDeclarationBlock(ServoDeclarationBlock* declarations);
 nsHTMLCSSStyleSheet* Servo_GetDeclarationBlockCache(
     ServoDeclarationBlock* declarations);
 void Servo_SetDeclarationBlockImmutable(ServoDeclarationBlock* declarations);
 void Servo_ClearDeclarationBlockCachePointer(ServoDeclarationBlock* declarations);
 
 // Computed style data.