1. block transformation infrastructure is now in place. We can go ahead and implement interesting

features like set paragraph style, set list type, indent, etc.  I'm sure there's holes in my
implementation that these high level features will make obvious.

2. I've factored a lot of utility methods from several modules into nsEditor as public static methods.
This makes them easily accessable to all, and will help Joe and I remove redundant methods.

3. I changed the HTML tags to lower case, and made all string compares case-insensitive.  No, this
isn't quite the right thing to do, but we don't have atoms from layout yet.  The Right Thing is for us
to reuse those atoms.


git-svn-id: svn://10.0.0.236/trunk@30367 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
buster%netscape.com
1999-05-05 04:05:19 +00:00
parent 79a06899b6
commit 9a004fa0f0
29 changed files with 2484 additions and 1610 deletions

View File

@@ -43,6 +43,7 @@ nsIAtom * nsIEditProperty::tt;
nsIAtom * nsIEditProperty::u;
// block tags
nsIAtom * nsIEditProperty::blockquote;
nsIAtom * nsIEditProperty::br;
nsIAtom * nsIEditProperty::h1;
nsIAtom * nsIEditProperty::h2;
// properties
@@ -56,28 +57,29 @@ void
nsEditProperty::InstanceInit()
{
// tags
nsIEditProperty::a = NS_NewAtom("A");
nsIEditProperty::b = NS_NewAtom("B");
nsIEditProperty::big = NS_NewAtom("BIG");
nsIEditProperty::font = NS_NewAtom("FONT");
nsIEditProperty::i = NS_NewAtom("I");
nsIEditProperty::span = NS_NewAtom("SPAN");
nsIEditProperty::small =NS_NewAtom("SMALL");
nsIEditProperty::strike=NS_NewAtom("STRIKE");
nsIEditProperty::sub = NS_NewAtom("SUB");
nsIEditProperty::sup = NS_NewAtom("SUP");
nsIEditProperty::tt = NS_NewAtom("TT");
nsIEditProperty::u = NS_NewAtom("U");
nsIEditProperty::a = NS_NewAtom("a");
nsIEditProperty::b = NS_NewAtom("b");
nsIEditProperty::big = NS_NewAtom("big");
nsIEditProperty::font = NS_NewAtom("font");
nsIEditProperty::i = NS_NewAtom("i");
nsIEditProperty::span = NS_NewAtom("span");
nsIEditProperty::small =NS_NewAtom("small");
nsIEditProperty::strike=NS_NewAtom("strike");
nsIEditProperty::sub = NS_NewAtom("sub");
nsIEditProperty::sup = NS_NewAtom("sup");
nsIEditProperty::tt = NS_NewAtom("tt");
nsIEditProperty::u = NS_NewAtom("u");
// tags
nsIEditProperty::blockquote = NS_NewAtom("BLOCKQUOTE");
nsIEditProperty::h1 = NS_NewAtom("H1");
nsIEditProperty::h2 = NS_NewAtom("H2");
nsIEditProperty::blockquote = NS_NewAtom("blockquote");
nsIEditProperty::br = NS_NewAtom("br");
nsIEditProperty::h1 = NS_NewAtom("h1");
nsIEditProperty::h2 = NS_NewAtom("h2");
// properties
nsIEditProperty::color= NS_NewAtom("COLOR");
nsIEditProperty::face = NS_NewAtom("FACE");
nsIEditProperty::size = NS_NewAtom("SIZE");
nsIEditProperty::color= NS_NewAtom("color");
nsIEditProperty::face = NS_NewAtom("face");
nsIEditProperty::size = NS_NewAtom("size");
// special
nsIEditProperty::allProperties = new nsString("moz_AllProperties");
nsIEditProperty::allProperties = new nsString("moz_allproperties");
}
void
@@ -98,6 +100,7 @@ nsEditProperty::InstanceShutdown()
NS_IF_RELEASE(nsIEditProperty::u);
// tags
NS_IF_RELEASE(nsIEditProperty::blockquote);
NS_IF_RELEASE(nsIEditProperty::br);
NS_IF_RELEASE(nsIEditProperty::h1);
NS_IF_RELEASE(nsIEditProperty::h2);
// properties