diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h index c6b9de4fcd37..7a356c7cf3bc 100644 --- a/dom/base/nsGkAtomList.h +++ b/dom/base/nsGkAtomList.h @@ -2181,13 +2181,6 @@ GK_ATOM(TypingTxnName, "Typing") GK_ATOM(IMETxnName, "IME") GK_ATOM(DeleteTxnName, "Deleting") -// Font families -GK_ATOM(serif, "serif") -GK_ATOM(sans_serif, "sans-serif") -GK_ATOM(cursive, "cursive") -GK_ATOM(fantasy, "fantasy") -GK_ATOM(monospace, "monospace") - // IPC stuff GK_ATOM(Remote, "remote") GK_ATOM(RemoteId, "_remote_id") diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index aaf5985c164e..593bab372c62 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -139,19 +139,6 @@ Gecko_IsRootElement(RawGeckoElement* aElement) return aElement->OwnerDoc()->GetRootElement() == aElement; } -nsIAtom* -Gecko_LocalName(RawGeckoElement* aElement) -{ - return aElement->NodeInfo()->NameAtom(); -} - -nsIAtom* -Gecko_Namespace(RawGeckoElement* aElement) -{ - int32_t id = aElement->NodeInfo()->NamespaceID(); - return nsContentUtils::NameSpaceManager()->NameSpaceURIAtom(id); -} - ServoNodeData* Gecko_GetNodeData(RawGeckoNode* aNode) { @@ -164,67 +151,6 @@ Gecko_SetNodeData(RawGeckoNode* aNode, ServoNodeData* aData) aNode->SetServoNodeData(aData); } -nsIAtom* -Gecko_Atomize(const char* aString, uint32_t aLength) -{ - // XXXbholley: This isn't yet threadsafe, but will probably need to be. - MOZ_ASSERT(NS_IsMainThread()); - return NS_Atomize(nsDependentCSubstring(aString, aLength)).take(); -} - -void -Gecko_AddRefAtom(nsIAtom* aAtom) -{ - // XXXbholley: This isn't yet threadsafe, but will probably need to be. - MOZ_ASSERT(NS_IsMainThread()); - NS_ADDREF(aAtom); -} - -void -Gecko_ReleaseAtom(nsIAtom* aAtom) -{ - // XXXbholley: This isn't yet threadsafe, but will probably need to be. - MOZ_ASSERT(NS_IsMainThread()); - NS_RELEASE(aAtom); -} - -uint32_t -Gecko_HashAtom(nsIAtom* aAtom) -{ - return aAtom->hash(); -} - -const uint16_t* -Gecko_GetAtomAsUTF16(nsIAtom* aAtom, uint32_t* aLength) -{ - static_assert(sizeof(char16_t) == sizeof(uint16_t), "Servo doesn't know what a char16_t is"); - MOZ_ASSERT(aAtom); - *aLength = aAtom->GetLength(); - return reinterpret_cast(aAtom->GetUTF16String()); -} - -bool -Gecko_AtomEqualsUTF8(nsIAtom* aAtom, const char* aString, uint32_t aLength) -{ - // XXXbholley: We should be able to do this without converting, I just can't - // find the right thing to call. - nsAutoString atomStr; - aAtom->ToString(atomStr); - NS_ConvertUTF8toUTF16 inStr(nsDependentCString(aString, aLength)); - return atomStr.Equals(inStr); -} - -bool -Gecko_AtomEqualsUTF8IgnoreCase(nsIAtom* aAtom, const char* aString, uint32_t aLength) -{ - // XXXbholley: We should be able to do this without converting, I just can't - // find the right thing to call. - nsAutoString atomStr; - aAtom->ToString(atomStr); - NS_ConvertUTF8toUTF16 inStr(nsDependentCString(aString, aLength)); - return nsContentUtils::EqualsIgnoreASCIICase(atomStr, inStr); -} - void Gecko_SetListStyleType(nsStyleList* style_struct, uint32_t type) { diff --git a/layout/style/ServoBindings.h b/layout/style/ServoBindings.h index c58631f5c557..601dde52f4ad 100644 --- a/layout/style/ServoBindings.h +++ b/layout/style/ServoBindings.h @@ -56,23 +56,12 @@ bool Gecko_IsTextNode(RawGeckoNode* node); bool Gecko_IsVisitedLink(RawGeckoElement* element); bool Gecko_IsUnvisitedLink(RawGeckoElement* element); bool Gecko_IsRootElement(RawGeckoElement* element); -nsIAtom* Gecko_LocalName(RawGeckoElement* element); -nsIAtom* Gecko_Namespace(RawGeckoElement* element); // Node data. ServoNodeData* Gecko_GetNodeData(RawGeckoNode* node); void Gecko_SetNodeData(RawGeckoNode* node, ServoNodeData* data); void Servo_DropNodeData(ServoNodeData* data); -// Atoms. -nsIAtom* Gecko_Atomize(const char* aString, uint32_t aLength); -void Gecko_AddRefAtom(nsIAtom* aAtom); -void Gecko_ReleaseAtom(nsIAtom* aAtom); -uint32_t Gecko_HashAtom(nsIAtom* aAtom); -const uint16_t* Gecko_GetAtomAsUTF16(nsIAtom* aAtom, uint32_t* aLength); -bool Gecko_AtomEqualsUTF8(nsIAtom* aAtom, const char* aString, uint32_t aLength); -bool Gecko_AtomEqualsUTF8IgnoreCase(nsIAtom* aAtom, const char* aString, uint32_t aLength); - // Counter style. struct nsStyleList; void Gecko_SetListStyleType(nsStyleList* style_struct, uint32_t type);