Bug 1328319 part 8 - Make stylo use counter-style for list-style-type and counter functions. r?heycam,SimonSapin draft
authorXidorn Quan <me@upsuper.org>
Mon, 15 May 2017 14:36:43 +1000
changeset 578532 fbc85b7008e16074448166cf7f65781273b6ebb5
parent 578531 0beb9585409e38858e555688ae1b586f3cee13fc
child 578533 13bc6f650a6dfbd4f4fb9ea3db469f5a8cdeea71
push id58946
push userxquan@mozilla.com
push dateTue, 16 May 2017 04:45:08 +0000
reviewersheycam, SimonSapin
bugs1328319
milestone55.0a1
Bug 1328319 part 8 - Make stylo use counter-style for list-style-type and counter functions. r?heycam,SimonSapin MozReview-Commit-ID: AUU3AbwOpPs
dom/base/nsGkAtomList.h
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -1207,16 +1207,17 @@ GK_ATOM(source, "source")
 GK_ATOM(space, "space")
 GK_ATOM(spacer, "spacer")
 GK_ATOM(span, "span")
 GK_ATOM(spellcheck, "spellcheck")
 GK_ATOM(spinner, "spinner")
 GK_ATOM(split, "split")
 GK_ATOM(splitter, "splitter")
 GK_ATOM(spring, "spring")
+GK_ATOM(square, "square")
 GK_ATOM(src, "src")
 GK_ATOM(srcdoc, "srcdoc")
 GK_ATOM(srclang, "srclang")
 GK_ATOM(srcset, "srcset")
 GK_ATOM(stack, "stack")
 GK_ATOM(standalone, "standalone")
 GK_ATOM(standby, "standby")
 GK_ATOM(start, "start")
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -1108,25 +1108,25 @@ Gecko_SetImageOrientationAsFromImage(nsS
 void
 Gecko_CopyImageOrientationFrom(nsStyleVisibility* aDst,
                                const nsStyleVisibility* aSrc)
 {
   aDst->mImageOrientation = aSrc->mImageOrientation;
 }
 
 void
-Gecko_SetListStyleType(nsStyleList* aList, uint32_t aType)
+Gecko_SetListStyleType(nsStyleList* aList, nsIAtom* aName)
 {
-  aList->mCounterStyle = CounterStyleManager::GetBuiltinStyle(aType);
+  aList->SetListStyleType(aName);
 }
 
 void
 Gecko_CopyListStyleTypeFrom(nsStyleList* aDst, const nsStyleList* aSrc)
 {
-  aDst->mCounterStyle = aSrc->mCounterStyle;
+  aDst->CopyListStyleTypeFrom(*aSrc);
 }
 
 already_AddRefed<css::URLValue>
 ServoBundledURI::IntoCssUrl()
 {
   if (!mURLString) {
     return nullptr;
   }
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -265,17 +265,17 @@ void Gecko_nsFont_Destroy(nsFont* dst);
 void Gecko_SetImageOrientation(nsStyleVisibility* aVisibility,
                                double aRadians,
                                bool aFlip);
 void Gecko_SetImageOrientationAsFromImage(nsStyleVisibility* aVisibility);
 void Gecko_CopyImageOrientationFrom(nsStyleVisibility* aDst,
                                     const nsStyleVisibility* aSrc);
 
 // Counter style.
-void Gecko_SetListStyleType(nsStyleList* style_struct, uint32_t type);
+void Gecko_SetListStyleType(nsStyleList* style_struct, nsIAtom* name);
 void Gecko_CopyListStyleTypeFrom(nsStyleList* dst, const nsStyleList* src);
 
 // background-image style.
 void Gecko_SetNullImageValue(nsStyleImage* image);
 void Gecko_SetGradientImageValue(nsStyleImage* image, nsStyleGradient* gradient);
 NS_DECL_THREADSAFE_FFI_REFCOUNTING(mozilla::css::ImageValue, ImageValue);
 mozilla::css::ImageValue* Gecko_ImageValue_Create(ServoBundledURI aURI);
 void Gecko_SetLayerImageImageValue(nsStyleImage* image,