зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1006982 - Refactor anchor tag utility functions in nsHTMLEditor.cpp. r=ehsan
This commit is contained in:
Родитель
d293903419
Коммит
3afa325a27
|
@ -80,13 +80,18 @@ using namespace mozilla;
|
|||
using namespace mozilla::dom;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
// Some utilities to handle annoying overloading of "A" tag for link and named anchor
|
||||
static char hrefText[] = "href";
|
||||
static char anchorTxt[] = "anchor";
|
||||
static char namedanchorText[] = "namedanchor";
|
||||
// Some utilities to handle overloading of "A" tag for link and named anchor.
|
||||
static bool
|
||||
IsLinkTag(const nsString& s)
|
||||
{
|
||||
return s.EqualsIgnoreCase("href");
|
||||
}
|
||||
|
||||
#define IsLinkTag(s) (s.EqualsIgnoreCase(hrefText))
|
||||
#define IsNamedAnchorTag(s) (s.EqualsIgnoreCase(anchorTxt) || s.EqualsIgnoreCase(namedanchorText))
|
||||
static bool
|
||||
IsNamedAnchorTag(const nsString& s)
|
||||
{
|
||||
return s.EqualsIgnoreCase("anchor") || s.EqualsIgnoreCase("namedanchor");
|
||||
}
|
||||
|
||||
nsHTMLEditor::nsHTMLEditor()
|
||||
: nsPlaintextEditor()
|
||||
|
|
Загрузка…
Ссылка в новой задаче