зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1418076 part 7. Get rid of nsIDOMHTMLDocument's color attributes. r=mystor
MozReview-Commit-ID: 4jgoGqWyymA
This commit is contained in:
Родитель
aa98a6d46b
Коммит
7fdae0afd0
|
@ -1917,7 +1917,7 @@ nsHTMLDocument::GetNumFormsSynchronous()
|
|||
return mNumForms;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::GetAlinkColor(nsAString& aAlinkColor)
|
||||
{
|
||||
aAlinkColor.Truncate();
|
||||
|
@ -1926,22 +1926,18 @@ nsHTMLDocument::GetAlinkColor(nsAString& aAlinkColor)
|
|||
if (body) {
|
||||
body->GetALink(aAlinkColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::SetAlinkColor(const nsAString& aAlinkColor)
|
||||
{
|
||||
HTMLBodyElement* body = GetBodyElement();
|
||||
if (body) {
|
||||
body->SetALink(aAlinkColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::GetLinkColor(nsAString& aLinkColor)
|
||||
{
|
||||
aLinkColor.Truncate();
|
||||
|
@ -1950,22 +1946,18 @@ nsHTMLDocument::GetLinkColor(nsAString& aLinkColor)
|
|||
if (body) {
|
||||
body->GetLink(aLinkColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::SetLinkColor(const nsAString& aLinkColor)
|
||||
{
|
||||
HTMLBodyElement* body = GetBodyElement();
|
||||
if (body) {
|
||||
body->SetLink(aLinkColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::GetVlinkColor(nsAString& aVlinkColor)
|
||||
{
|
||||
aVlinkColor.Truncate();
|
||||
|
@ -1974,22 +1966,18 @@ nsHTMLDocument::GetVlinkColor(nsAString& aVlinkColor)
|
|||
if (body) {
|
||||
body->GetVLink(aVlinkColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::SetVlinkColor(const nsAString& aVlinkColor)
|
||||
{
|
||||
HTMLBodyElement* body = GetBodyElement();
|
||||
if (body) {
|
||||
body->SetVLink(aVlinkColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::GetBgColor(nsAString& aBgColor)
|
||||
{
|
||||
aBgColor.Truncate();
|
||||
|
@ -1998,22 +1986,18 @@ nsHTMLDocument::GetBgColor(nsAString& aBgColor)
|
|||
if (body) {
|
||||
body->GetBgColor(aBgColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::SetBgColor(const nsAString& aBgColor)
|
||||
{
|
||||
HTMLBodyElement* body = GetBodyElement();
|
||||
if (body) {
|
||||
body->SetBgColor(aBgColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::GetFgColor(nsAString& aFgColor)
|
||||
{
|
||||
aFgColor.Truncate();
|
||||
|
@ -2022,19 +2006,15 @@ nsHTMLDocument::GetFgColor(nsAString& aFgColor)
|
|||
if (body) {
|
||||
body->GetText(aFgColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsHTMLDocument::SetFgColor(const nsAString& aFgColor)
|
||||
{
|
||||
HTMLBodyElement* body = GetBodyElement();
|
||||
if (body) {
|
||||
body->SetText(aFgColor);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -222,11 +222,16 @@ public:
|
|||
mozilla::dom::CallerType aCallerType);
|
||||
void QueryCommandValue(const nsAString& aCommandID, nsAString& aValue,
|
||||
mozilla::ErrorResult& rv);
|
||||
// The XPCOM Get/SetFgColor work OK for us, since they never throw.
|
||||
// The XPCOM Get/SetLinkColor work OK for us, since they never throw.
|
||||
// The XPCOM Get/SetVLinkColor work OK for us, since they never throw.
|
||||
// The XPCOM Get/SetALinkColor work OK for us, since they never throw.
|
||||
// The XPCOM Get/SetBgColor work OK for us, since they never throw.
|
||||
void GetFgColor(nsAString& aFgColor);
|
||||
void SetFgColor(const nsAString& aFgColor);
|
||||
void GetLinkColor(nsAString& aLinkColor);
|
||||
void SetLinkColor(const nsAString& aLinkColor);
|
||||
void GetVlinkColor(nsAString& aAvlinkColor);
|
||||
void SetVlinkColor(const nsAString& aVlinkColor);
|
||||
void GetAlinkColor(nsAString& aAlinkColor);
|
||||
void SetAlinkColor(const nsAString& aAlinkColor);
|
||||
void GetBgColor(nsAString& aBgColor);
|
||||
void SetBgColor(const nsAString& aBgColor);
|
||||
nsIHTMLCollection* Anchors();
|
||||
nsIHTMLCollection* Applets();
|
||||
void Clear() const
|
||||
|
|
|
@ -16,13 +16,6 @@ interface nsISelection;
|
|||
[uuid(cd31e61f-cfc2-4b91-9385-17b6a2d0633d)]
|
||||
interface nsIDOMHTMLDocument : nsIDOMDocument
|
||||
{
|
||||
// Obsolete APIs
|
||||
attribute DOMString fgColor;
|
||||
attribute DOMString bgColor;
|
||||
attribute DOMString linkColor;
|
||||
attribute DOMString vlinkColor;
|
||||
attribute DOMString alinkColor;
|
||||
|
||||
void clear();
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче