Merge cedar into mozilla-central

This commit is contained in:
Ehsan Akhgari 2011-04-08 02:27:03 -07:00
commit b1b54b2a27
661 changed files with 11977 additions and 347 deletions

View File

@ -15,7 +15,7 @@
*
* The Original Code is sanitize dialog test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is sanitize dialog test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -13,7 +13,7 @@
#
# The Original Code is Places test code.
#
# The Initial Developer of the Original Code is Mozilla Corp.
# The Initial Developer of the Original Code is the Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2008
# the Initial Developer. All Rights Reserved.
#

View File

@ -15,7 +15,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -14,7 +14,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*

View File

@ -14,7 +14,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*

View File

@ -14,7 +14,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*

View File

@ -13,7 +13,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -14,7 +14,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -13,7 +13,7 @@
#
# The Original Code is Places test code.
#
# The Initial Developer of the Original Code is Mozilla Corp.
# The Initial Developer of the Original Code is the Mozilla Foundation.
# Portions created by the Initial Developer are Copyright (C) 2009
# the Initial Developer. All Rights Reserved.
#

View File

@ -15,7 +15,7 @@
-
- The Original Code is the Places test code.
-
- The Initial Developer of the Original Code is Mozilla Corp.
- The Initial Developer of the Original Code is the Mozilla Foundation.
- Portions created by the Initial Developer are Copyright (C) 2009
- the Initial Developer. All Rights Reserved.
-

View File

@ -15,7 +15,7 @@
-
- The Original Code is the Places test code.
-
- The Initial Developer of the Original Code is Mozilla Corp.
- The Initial Developer of the Original Code is the Mozilla Foundation.
- Portions created by the Initial Developer are Copyright (C) 2009
- the Initial Developer. All Rights Reserved.
-

View File

@ -15,7 +15,7 @@
-
- The Original Code is the Places test code.
-
- The Initial Developer of the Original Code is Mozilla Corp.
- The Initial Developer of the Original Code is the Mozilla Foundation.
- Portions created by the Initial Developer are Copyright (C) 2009
- the Initial Developer. All Rights Reserved.
-

View File

@ -15,7 +15,7 @@
-
- The Original Code is the Places test code.
-
- The Initial Developer of the Original Code is Mozilla Corp.
- The Initial Developer of the Original Code is the Mozilla Foundation.
- Portions created by the Initial Developer are Copyright (C) 2009
- the Initial Developer. All Rights Reserved.
-

View File

@ -15,7 +15,7 @@
*
* The Original Code is Bug 384370 code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is mozilla.com code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is Places Unit Test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is Bug 457441 code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -15,7 +15,7 @@
*
* The Original Code is mozilla.com code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*

View File

@ -13,7 +13,7 @@
*
* The Original Code is Privacy PrefPane Test.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*

View File

@ -76,8 +76,8 @@ enum nsLinkState {
// IID for the nsIContent interface
#define NS_ICONTENT_IID \
{ 0x5788c9eb, 0x646a, 0x4285, \
{ 0xa2, 0x8c, 0xde, 0x0d, 0x43, 0x6b, 0x47, 0x72 } }
{ 0x32b94ba0, 0x1ebc, 0x4dfc, \
{ 0xba, 0x8c, 0x5f, 0x24, 0x2b, 0xcb, 0xaf, 0xce } }
/**
* A node of content in a document's content model. This interface
@ -800,7 +800,7 @@ public:
* GetIDAttributeName(). This may be null if there is no ID.
*/
nsIAtom* GetID() const {
if (HasFlag(NODE_HAS_ID)) {
if (HasID()) {
return DoGetID();
}
return nsnull;
@ -960,7 +960,7 @@ public:
protected:
/**
* Hook for implementing GetID. This is guaranteed to only be
* called if the NODE_HAS_ID flag is set.
* called if HasID() is true.
*/
virtual nsIAtom* DoGetID() const = 0;

View File

@ -166,7 +166,7 @@ public:
mIsBeingUsedAsImage(PR_FALSE),
mPartID(0)
{
mParentPtrBits |= PARENT_BIT_INDOCUMENT;
SetInDocument();
}
#endif

View File

@ -78,22 +78,19 @@ class Element;
} // namespace mozilla
enum {
// This bit will be set if the node doesn't have nsSlots
NODE_DOESNT_HAVE_SLOTS = 0x00000001U,
// This bit will be set if the node has a listener manager in the listener
// manager hash
NODE_HAS_LISTENERMANAGER = 0x00000002U,
NODE_HAS_LISTENERMANAGER = 0x00000001U,
// Whether this node has had any properties set on it
NODE_HAS_PROPERTIES = 0x00000004U,
NODE_HAS_PROPERTIES = 0x00000002U,
// Whether this node is the root of an anonymous subtree. Note that this
// need not be a native anonymous subtree. Any anonymous subtree, including
// XBL-generated ones, will do. This flag is set-once: once a node has it,
// it must not be removed.
// NOTE: Should only be used on nsIContent nodes
NODE_IS_ANONYMOUS = 0x00000008U,
NODE_IS_ANONYMOUS = 0x00000004U,
// Whether the node has some ancestor, possibly itself, that is native
// anonymous. This includes ancestors crossing XBL scopes, in cases when an
@ -101,44 +98,39 @@ enum {
// ancestor. This flag is set-once: once a node has it, it must not be
// removed.
// NOTE: Should only be used on nsIContent nodes
NODE_IS_IN_ANONYMOUS_SUBTREE = 0x00000010U,
NODE_IS_IN_ANONYMOUS_SUBTREE = 0x00000008U,
// Whether this node is the root of a native anonymous (from the perspective
// of its parent) subtree. This flag is set-once: once a node has it, it
// must not be removed.
// NOTE: Should only be used on nsIContent nodes
NODE_IS_NATIVE_ANONYMOUS_ROOT = 0x00000020U,
NODE_IS_NATIVE_ANONYMOUS_ROOT = 0x00000010U,
// Forces the XBL code to treat this node as if it were
// in the document and therefore should get bindings attached.
NODE_FORCE_XBL_BINDINGS = 0x00000040U,
NODE_FORCE_XBL_BINDINGS = 0x00000020U,
// Whether a binding manager may have a pointer to this
NODE_MAY_BE_IN_BINDING_MNGR = 0x00000080U,
NODE_MAY_BE_IN_BINDING_MNGR = 0x00000040U,
NODE_IS_EDITABLE = 0x00000100U,
NODE_IS_EDITABLE = 0x00000080U,
// Set to true if the element has a non-empty id attribute. This can in rare
// cases lie for nsXMLElement, such as when the node has been moved between
// documents with different id mappings.
NODE_HAS_ID = 0x00000200U,
// For all Element nodes, NODE_MAY_HAVE_CLASS is guaranteed to be set if the
// node in fact has a class, but may be set even if it doesn't.
NODE_MAY_HAVE_CLASS = 0x00000400U,
NODE_MAY_HAVE_STYLE = 0x00000800U,
NODE_MAY_HAVE_CLASS = 0x00000100U,
NODE_IS_INSERTION_PARENT = 0x00001000U,
NODE_IS_INSERTION_PARENT = 0x00000200U,
// Node has an :empty or :-moz-only-whitespace selector
NODE_HAS_EMPTY_SELECTOR = 0x00002000U,
NODE_HAS_EMPTY_SELECTOR = 0x00000400U,
// A child of the node has a selector such that any insertion,
// removal, or appending of children requires restyling the parent.
NODE_HAS_SLOW_SELECTOR = 0x00004000U,
NODE_HAS_SLOW_SELECTOR = 0x00000800U,
// A child of the node has a :first-child, :-moz-first-node,
// :only-child, :last-child or :-moz-last-node selector.
NODE_HAS_EDGE_CHILD_SELECTOR = 0x00008000U,
NODE_HAS_EDGE_CHILD_SELECTOR = 0x00001000U,
// A child of the node has a selector such that any insertion or
// removal of children requires restyling later siblings of that
@ -148,42 +140,33 @@ enum {
// matching :empty due to a grandchild insertion or removal), the
// child's later siblings must also be restyled.
NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS
= 0x00010000U,
= 0x00002000U,
NODE_ALL_SELECTOR_FLAGS = NODE_HAS_EMPTY_SELECTOR |
NODE_HAS_SLOW_SELECTOR |
NODE_HAS_EDGE_CHILD_SELECTOR |
NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS,
NODE_MAY_HAVE_CONTENT_EDITABLE_ATTR
= 0x00020000U,
NODE_ATTACH_BINDING_ON_POSTCREATE
= 0x00040000U,
= 0x00004000U,
// This node needs to go through frame construction to get a frame (or
// undisplayed entry).
NODE_NEEDS_FRAME = 0x00080000U,
NODE_NEEDS_FRAME = 0x00008000U,
// At least one descendant in the flattened tree has NODE_NEEDS_FRAME set.
// This should be set on every node on the flattened tree path between the
// node(s) with NODE_NEEDS_FRAME and the root content.
NODE_DESCENDANTS_NEED_FRAMES = 0x00100000U,
// Set if the node is an element.
NODE_HANDLING_CLICK = 0x00200000U,
NODE_DESCENDANTS_NEED_FRAMES = 0x00010000U,
// Set if the node has the accesskey attribute set.
NODE_HAS_ACCESSKEY = 0x00400000U,
// Set if the node has the accesskey attribute set.
NODE_HAS_NAME = 0x00800000U,
NODE_HAS_ACCESSKEY = 0x00020000U,
// Two bits for the script-type ID. Not enough to represent all
// nsIProgrammingLanguage values, but we don't care. In practice,
// we can represent the ones we want, and we can fail the others at
// runtime.
NODE_SCRIPT_TYPE_OFFSET = 24,
NODE_SCRIPT_TYPE_OFFSET = 18,
NODE_SCRIPT_TYPE_SIZE = 2,
@ -294,8 +277,8 @@ private:
// IID for the nsINode interface
#define NS_INODE_IID \
{ 0x2a8dc794, 0x9178, 0x400e, \
{ 0x81, 0xff, 0x55, 0x30, 0x30, 0xb6, 0x74, 0x3b } }
{ 0x4776aa9a, 0xa886, 0x40c9, \
{ 0xae, 0x4c, 0x4d, 0x92, 0xe2, 0xf0, 0xd9, 0x61 } }
/**
* An internal interface that abstracts some DOMNode-related parts that both
@ -316,13 +299,13 @@ public:
#ifdef MOZILLA_INTERNAL_API
nsINode(already_AddRefed<nsINodeInfo> aNodeInfo)
: mNodeInfo(aNodeInfo),
mParentPtrBits(0),
mFlagsOrSlots(NODE_DOESNT_HAVE_SLOTS),
mParent(nsnull),
mFlags(0),
mBoolFlags(0),
mNextSibling(nsnull),
mPreviousSibling(nsnull),
mFirstChild(nsnull),
mNodeHasRenderingObservers(false),
mIsElement(false)
mSlots(nsnull)
{
}
@ -374,8 +357,8 @@ public:
/**
* Return whether the node is an Element node
*/
PRBool IsElement() const {
return mIsElement;
bool IsElement() const {
return GetBoolFlag(NodeIsElement);
}
/**
@ -434,9 +417,9 @@ public:
*
* @return whether this content is in a document tree
*/
PRBool IsInDoc() const
bool IsInDoc() const
{
return mParentPtrBits & PARENT_BIT_INDOCUMENT;
return GetBoolFlag(IsInDocument);
}
/**
@ -706,12 +689,9 @@ public:
* Get the parent nsIContent for this node.
* @return the parent, or null if no parent or the parent is not an nsIContent
*/
nsIContent* GetParent() const
{
return NS_LIKELY(mParentPtrBits & PARENT_BIT_PARENT_IS_CONTENT) ?
reinterpret_cast<nsIContent*>
(mParentPtrBits & ~kParentBitMask) :
nsnull;
nsIContent* GetParent() const {
return NS_LIKELY(GetBoolFlag(ParentIsContent)) ?
reinterpret_cast<nsIContent*>(mParent) : nsnull;
}
/**
@ -721,7 +701,7 @@ public:
*/
nsINode* GetNodeParent() const
{
return reinterpret_cast<nsINode*>(mParentPtrBits & ~kParentBitMask);
return mParent;
}
/**
@ -801,9 +781,8 @@ public:
class nsSlots
{
public:
nsSlots(PtrBits aFlags)
: mFlags(aFlags),
mChildNodes(nsnull),
nsSlots()
: mChildNodes(nsnull),
mWeakReference(nsnull)
{
}
@ -812,13 +791,6 @@ public:
// putting a DestroySlots function on nsINode
virtual ~nsSlots();
/**
* Storage for flags for this node. These are the same flags as the
* mFlagsOrSlots member, but these are used when the slots class
* is allocated.
*/
PtrBits mFlags;
/**
* A list of mutation observers
*/
@ -854,12 +826,12 @@ public:
return !!(GetFlags() & aFlag);
}
PtrBits GetFlags() const
PRUint32 GetFlags() const
{
return NS_UNLIKELY(HasSlots()) ? FlagsAsSlots()->mFlags : mFlagsOrSlots;
return mFlags;
}
void SetFlags(PtrBits aFlagsToSet)
void SetFlags(PRUint32 aFlagsToSet)
{
NS_ASSERTION(!(aFlagsToSet & (NODE_IS_ANONYMOUS |
NODE_IS_NATIVE_ANONYMOUS_ROOT |
@ -869,21 +841,17 @@ public:
NODE_NEEDS_FRAME)) ||
IsNodeOfType(eCONTENT),
"Flag only permitted on nsIContent nodes");
PtrBits* flags = HasSlots() ? &FlagsAsSlots()->mFlags :
&mFlagsOrSlots;
*flags |= aFlagsToSet;
mFlags |= aFlagsToSet;
}
void UnsetFlags(PtrBits aFlagsToUnset)
void UnsetFlags(PRUint32 aFlagsToUnset)
{
NS_ASSERTION(!(aFlagsToUnset &
(NODE_IS_ANONYMOUS |
NODE_IS_IN_ANONYMOUS_SUBTREE |
NODE_IS_NATIVE_ANONYMOUS_ROOT)),
"Trying to unset write-only flags");
PtrBits* flags = HasSlots() ? &FlagsAsSlots()->mFlags :
&mFlagsOrSlots;
*flags &= ~aFlagsToUnset;
mFlags &= ~aFlagsToUnset;
}
void SetEditableFlag(PRBool aEditable)
@ -1149,10 +1117,80 @@ public:
NS_NOTREACHED("How did we get here?");
}
bool HasRenderingObservers() { return mNodeHasRenderingObservers; }
void SetHasRenderingObservers(bool aValue)
{ mNodeHasRenderingObservers = aValue; }
/**
* Boolean flags
*/
private:
enum BooleanFlag {
// Set if we're being used from -moz-element
NodeHasRenderingObservers,
// Set if our parent chain (including this node itself) terminates
// in a document
IsInDocument,
// Set if mParent is an nsIContent
ParentIsContent,
// Set if this node is an Element
NodeIsElement,
// Set if the element has a non-empty id attribute. This can in rare
// cases lie for nsXMLElement, such as when the node has been moved between
// documents with different id mappings.
ElementHasID,
// Set if the element might have inline style.
ElementMayHaveStyle,
// Set if the element has a name attribute set.
ElementHasName,
// Set if the element might have a contenteditable attribute set.
ElementMayHaveContentEditableAttr,
// Guard value
BooleanFlagCount
};
void SetBoolFlag(BooleanFlag name, bool value) {
PR_STATIC_ASSERT(BooleanFlagCount <= 8*sizeof(mBoolFlags));
mBoolFlags = (mBoolFlags & ~(1 << name)) | (value << name);
}
void SetBoolFlag(BooleanFlag name) {
PR_STATIC_ASSERT(BooleanFlagCount <= 8*sizeof(mBoolFlags));
mBoolFlags |= (1 << name);
}
void ClearBoolFlag(BooleanFlag name) {
PR_STATIC_ASSERT(BooleanFlagCount <= 8*sizeof(mBoolFlags));
mBoolFlags &= ~(1 << name);
}
bool GetBoolFlag(BooleanFlag name) const {
PR_STATIC_ASSERT(BooleanFlagCount <= 8*sizeof(mBoolFlags));
return mBoolFlags & (1 << name);
}
public:
bool HasRenderingObservers() const
{ return GetBoolFlag(NodeHasRenderingObservers); }
void SetHasRenderingObservers(bool aValue)
{ SetBoolFlag(NodeHasRenderingObservers, aValue); }
bool HasID() const { return GetBoolFlag(ElementHasID); }
bool MayHaveStyle() const { return GetBoolFlag(ElementMayHaveStyle); }
bool HasName() const { return GetBoolFlag(ElementHasName); }
bool MayHaveContentEditableAttr() const
{ return GetBoolFlag(ElementMayHaveContentEditableAttr); }
protected:
void SetParentIsContent(bool aValue) { SetBoolFlag(ParentIsContent, aValue); }
void SetInDocument() { SetBoolFlag(IsInDocument); }
void ClearInDocument() { ClearBoolFlag(IsInDocument); }
void SetIsElement() { SetBoolFlag(NodeIsElement); }
void ClearIsElement() { ClearBoolFlag(NodeIsElement); }
void SetHasID() { SetBoolFlag(ElementHasID); }
void ClearHasID() { ClearBoolFlag(ElementHasID); }
void SetMayHaveStyle() { SetBoolFlag(ElementMayHaveStyle); }
void SetHasName() { SetBoolFlag(ElementHasName); }
void ClearHasName() { ClearBoolFlag(ElementHasName); }
void SetMayHaveContentEditableAttr()
{ SetBoolFlag(ElementMayHaveContentEditableAttr); }
public:
// Optimized way to get classinfo.
virtual nsXPCClassInfo* GetClassInfo() = 0;
protected:
@ -1162,37 +1200,25 @@ protected:
PRBool HasSlots() const
{
return !(mFlagsOrSlots & NODE_DOESNT_HAVE_SLOTS);
}
nsSlots* FlagsAsSlots() const
{
NS_ASSERTION(HasSlots(), "check HasSlots first");
return reinterpret_cast<nsSlots*>(mFlagsOrSlots);
return mSlots != nsnull;
}
nsSlots* GetExistingSlots() const
{
return HasSlots() ? FlagsAsSlots() : nsnull;
return mSlots;
}
nsSlots* GetSlots()
{
if (HasSlots()) {
return FlagsAsSlots();
if (!HasSlots()) {
mSlots = CreateSlots();
}
nsSlots* newSlots = CreateSlots();
if (newSlots) {
mFlagsOrSlots = reinterpret_cast<PtrBits>(newSlots);
}
return newSlots;
return GetExistingSlots();
}
nsTObserverArray<nsIMutationObserver*> *GetMutationObservers()
{
return HasSlots() ? &FlagsAsSlots()->mMutationObservers : nsnull;
return HasSlots() ? &GetExistingSlots()->mMutationObservers : nsnull;
}
PRBool IsEditableInternal() const;
@ -1269,26 +1295,21 @@ protected:
nsCOMPtr<nsINodeInfo> mNodeInfo;
enum { PARENT_BIT_INDOCUMENT = 1 << 0, PARENT_BIT_PARENT_IS_CONTENT = 1 << 1 };
enum { kParentBitMask = 0x3 };
nsINode* mParent;
PtrBits mParentPtrBits;
PRUint32 mFlags;
/**
* Used for either storing flags for this node or a pointer to
* this contents nsContentSlots. See the definition of the
* NODE_* macros for the layout of the bits in this
* member.
*/
PtrBits mFlagsOrSlots;
private:
// Boolean flags.
PRUint32 mBoolFlags;
protected:
nsIContent* mNextSibling;
nsIContent* mPreviousSibling;
nsIContent* mFirstChild;
// More flags
bool mNodeHasRenderingObservers : 1;
bool mIsElement : 1;
// Storage for more members that are usually not needed; allocated lazily.
nsSlots* mSlots;
};

View File

@ -187,7 +187,7 @@ NS_NewDocumentFragment(nsIDOMDocumentFragment** aInstancePtrResult,
nsDocumentFragment::nsDocumentFragment(already_AddRefed<nsINodeInfo> aNodeInfo)
: nsGenericElement(aNodeInfo)
{
mIsElement = false;
ClearIsElement();
}
nsDocumentFragment::~nsDocumentFragment()

View File

@ -648,20 +648,13 @@ nsFrameScriptExecutor::LoadFrameScriptInternal(const nsAString& aURL)
nsCOMPtr<nsIInputStream> input;
channel->Open(getter_AddRefs(input));
nsString dataString;
if (input) {
const PRUint32 bufferSize = 8192;
char buffer[bufferSize];
nsCString data;
PRUint32 avail = 0;
input->Available(&avail);
PRUint32 read = 0;
if (avail) {
while (NS_SUCCEEDED(input->Read(buffer, bufferSize, &read)) && read) {
data.Append(buffer, read);
read = 0;
if (input && NS_SUCCEEDED(input->Available(&avail)) && avail) {
nsCString buffer;
if (NS_FAILED(NS_ReadInputStreamToString(input, buffer, avail))) {
return;
}
}
nsScriptLoader::ConvertToUTF16(channel, (PRUint8*)data.get(), data.Length(),
nsScriptLoader::ConvertToUTF16(channel, (PRUint8*)buffer.get(), avail,
EmptyString(), nsnull, dataString);
}

View File

@ -523,19 +523,19 @@ nsGenericDOMDataNode::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
// Set parent
if (aParent) {
mParentPtrBits =
reinterpret_cast<PtrBits>(aParent) | PARENT_BIT_PARENT_IS_CONTENT;
mParent = aParent;
}
else {
mParentPtrBits = reinterpret_cast<PtrBits>(aDocument);
mParent = aDocument;
}
SetParentIsContent(aParent);
// XXXbz sXBL/XBL2 issue!
// Set document
if (aDocument) {
// XXX See the comment in nsGenericElement::BindToTree
mParentPtrBits |= PARENT_BIT_INDOCUMENT;
SetInDocument();
if (mText.IsBidi()) {
aDocument->SetBidiEnabled();
}
@ -570,7 +570,11 @@ nsGenericDOMDataNode::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
document->BindingManager()->RemovedFromDocument(this, document);
}
mParentPtrBits = aNullParent ? 0 : mParentPtrBits & ~PARENT_BIT_INDOCUMENT;
if (aNullParent) {
mParent = nsnull;
SetParentIsContent(false);
}
ClearInDocument();
nsDataSlots *slots = GetExistingDataSlots();
if (slots) {
@ -783,7 +787,7 @@ nsGenericDOMDataNode::IsLink(nsIURI** aURI) const
nsINode::nsSlots*
nsGenericDOMDataNode::CreateSlots()
{
return new nsDataSlots(mFlagsOrSlots);
return new nsDataSlots();
}
//----------------------------------------------------------------------

View File

@ -301,8 +301,8 @@ protected:
class nsDataSlots : public nsINode::nsSlots
{
public:
nsDataSlots(PtrBits aFlags)
: nsINode::nsSlots(aFlags),
nsDataSlots()
: nsINode::nsSlots(),
mBindingParent(nsnull)
{
}

View File

@ -273,7 +273,7 @@ nsGenericElement::GetSystemEventGroup(nsIDOMEventGroup** aGroup)
nsINode::nsSlots*
nsINode::CreateSlots()
{
return new nsSlots(mFlagsOrSlots);
return new nsSlots();
}
PRBool
@ -2138,8 +2138,8 @@ nsNodeSelectorTearoff::QuerySelectorAll(const nsAString& aSelector,
}
//----------------------------------------------------------------------
nsGenericElement::nsDOMSlots::nsDOMSlots(PtrBits aFlags)
: nsINode::nsSlots(aFlags),
nsGenericElement::nsDOMSlots::nsDOMSlots()
: nsINode::nsSlots(),
mBindingParent(nsnull)
{
}
@ -2160,8 +2160,8 @@ nsGenericElement::nsGenericElement(already_AddRefed<nsINodeInfo> aNodeInfo)
{
// Set the default scriptID to JS - but skip SetScriptTypeID as it
// does extra work we know isn't necessary here...
SetFlags(nsIProgrammingLanguage::JAVASCRIPT << NODE_SCRIPT_TYPE_OFFSET);
mIsElement = true;
SetFlags((nsIProgrammingLanguage::JAVASCRIPT << NODE_SCRIPT_TYPE_OFFSET));
SetIsElement();
}
nsGenericElement::~nsGenericElement()
@ -2943,15 +2943,16 @@ nsGenericElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
// Now set the parent and set the "Force attach xbl" flag if needed.
if (aParent) {
mParentPtrBits = reinterpret_cast<PtrBits>(aParent) | PARENT_BIT_PARENT_IS_CONTENT;
mParent = aParent;
if (aParent->HasFlag(NODE_FORCE_XBL_BINDINGS)) {
SetFlags(NODE_FORCE_XBL_BINDINGS);
}
}
else {
mParentPtrBits = reinterpret_cast<PtrBits>(aDocument);
mParent = aDocument;
}
SetParentIsContent(aParent);
// XXXbz sXBL/XBL2 issue!
@ -2967,7 +2968,7 @@ nsGenericElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
// aDocument);
// Being added to a document.
mParentPtrBits |= PARENT_BIT_INDOCUMENT;
SetInDocument();
// Unset this flag since we now really are in a document.
UnsetFlags(NODE_FORCE_XBL_BINDINGS |
@ -3049,7 +3050,11 @@ nsGenericElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
nsIDocument *document =
HasFlag(NODE_FORCE_XBL_BINDINGS) ? GetOwnerDoc() : GetCurrentDoc();
mParentPtrBits = aNullParent ? 0 : mParentPtrBits & ~PARENT_BIT_INDOCUMENT;
if (aNullParent) {
mParent = nsnull;
SetParentIsContent(false);
}
ClearInDocument();
if (document) {
// Notify XBL- & nsIAnonymousContentCreator-generated
@ -5287,7 +5292,7 @@ nsGenericElement::IndexOf(nsINode* aPossibleChild) const
nsINode::nsSlots*
nsGenericElement::CreateSlots()
{
return new nsDOMSlots(mFlagsOrSlots);
return new nsDOMSlots();
}
PRBool

View File

@ -943,7 +943,7 @@ public:
class nsDOMSlots : public nsINode::nsSlots
{
public:
nsDOMSlots(PtrBits aFlags);
nsDOMSlots();
virtual ~nsDOMSlots();
/**
@ -1024,14 +1024,14 @@ protected:
* Add/remove this element to the documents id cache
*/
void AddToIdTable(nsIAtom* aId) {
NS_ASSERTION(HasFlag(NODE_HAS_ID), "Node lacking NODE_HAS_ID flag");
NS_ASSERTION(HasID(), "Node doesn't have an ID?");
nsIDocument* doc = GetCurrentDoc();
if (doc && (!IsInAnonymousSubtree() || doc->IsXUL())) {
doc->AddToIdTable(this, aId);
}
}
void RemoveFromIdTable() {
if (HasFlag(NODE_HAS_ID)) {
if (HasID()) {
nsIDocument* doc = GetCurrentDoc();
if (doc) {
nsIAtom* id = DoGetID();

View File

@ -252,9 +252,8 @@ nsNodeUtils::LastRelease(nsINode* aNode)
NodeWillBeDestroyed, (aNode));
}
PtrBits flags = slots->mFlags | NODE_DOESNT_HAVE_SLOTS;
delete slots;
aNode->mFlagsOrSlots = flags;
aNode->mSlots = nsnull;
}
// Kill properties first since that may run external code, so we want to

View File

@ -77,11 +77,11 @@ nsStyledElementNotElementCSSInlineStyle::GetIDAttributeName() const
nsIAtom*
nsStyledElementNotElementCSSInlineStyle::DoGetID() const
{
NS_ASSERTION(HasFlag(NODE_HAS_ID), "Unexpected call");
NS_ASSERTION(HasID(), "Unexpected call");
// The nullcheck here is needed because nsGenericElement::UnsetAttr calls
// out to various code between removing the attribute and we get a chance to
// clear the NODE_HAS_ID flag.
// ClearHasID().
const nsAttrValue* attr = mAttrsAndChildren.GetAttr(nsGkAtoms::id);
@ -103,7 +103,7 @@ nsStyledElementNotElementCSSInlineStyle::ParseAttribute(PRInt32 aNamespaceID,
{
if (aNamespaceID == kNameSpaceID_None) {
if (aAttribute == nsGkAtoms::style) {
SetFlags(NODE_MAY_HAVE_STYLE);
SetMayHaveStyle();
ParseStyleAttribute(aValue, aResult, PR_FALSE);
return PR_TRUE;
}
@ -117,11 +117,11 @@ nsStyledElementNotElementCSSInlineStyle::ParseAttribute(PRInt32 aNamespaceID,
// not that it has an emptystring as the id.
RemoveFromIdTable();
if (aValue.IsEmpty()) {
UnsetFlags(NODE_HAS_ID);
ClearHasID();
return PR_FALSE;
}
aResult.ParseAtom(aValue);
SetFlags(NODE_HAS_ID);
SetHasID();
AddToIdTable(aResult.GetAtomValue());
return PR_TRUE;
}
@ -156,7 +156,7 @@ nsStyledElementNotElementCSSInlineStyle::AfterSetAttr(PRInt32 aNamespaceID,
// The id has been removed when calling UnsetAttr but we kept it because
// the id is used for some layout stuff between UnsetAttr and AfterSetAttr.
// Now. the id is really removed so it would not be safe to keep this flag.
UnsetFlags(NODE_HAS_ID);
ClearHasID();
}
return nsGenericElement::AfterSetAttr(aNamespaceID, aAttribute, aValue,
@ -167,7 +167,7 @@ NS_IMETHODIMP
nsStyledElementNotElementCSSInlineStyle::SetInlineStyleRule(css::StyleRule* aStyleRule,
PRBool aNotify)
{
SetFlags(NODE_MAY_HAVE_STYLE);
SetMayHaveStyle();
PRBool modification = PR_FALSE;
nsAutoString oldValueStr;
@ -206,7 +206,7 @@ nsStyledElementNotElementCSSInlineStyle::SetInlineStyleRule(css::StyleRule* aSty
css::StyleRule*
nsStyledElementNotElementCSSInlineStyle::GetInlineStyleRule()
{
if (!HasFlag(NODE_MAY_HAVE_STYLE)) {
if (!MayHaveStyle()) {
return nsnull;
}
const nsAttrValue* attrVal = mAttrsAndChildren.GetAttr(nsGkAtoms::style);
@ -229,7 +229,7 @@ nsStyledElementNotElementCSSInlineStyle::BindToTree(nsIDocument* aDocument,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
if (aDocument && HasFlag(NODE_HAS_ID) && !GetBindingParent()) {
if (aDocument && HasID() && !GetBindingParent()) {
aDocument->AddToIdTable(this, DoGetID());
}
@ -278,7 +278,7 @@ nsStyledElementNotElementCSSInlineStyle::GetStyle(nsresult* retval)
, PR_FALSE
#endif // MOZ_SMIL
);
SetFlags(NODE_MAY_HAVE_STYLE);
SetMayHaveStyle();
}
*retval = NS_OK;
@ -288,7 +288,7 @@ nsStyledElementNotElementCSSInlineStyle::GetStyle(nsresult* retval)
nsresult
nsStyledElementNotElementCSSInlineStyle::ReparseStyleAttribute(PRBool aForceInDataDoc)
{
if (!HasFlag(NODE_MAY_HAVE_STYLE)) {
if (!MayHaveStyle()) {
return NS_OK;
}
const nsAttrValue* oldVal = mAttrsAndChildren.GetAttr(nsGkAtoms::style);

View File

@ -215,7 +215,9 @@ nsTextNode::BindToAttribute(nsIAttribute* aAttr)
NS_ASSERTION(!GetNodeParent(), "Unbind before binding!");
NS_ASSERTION(HasSameOwnerDoc(aAttr), "Wrong owner document!");
mParentPtrBits = reinterpret_cast<PtrBits>(aAttr);
mParent = aAttr;
SetParentIsContent(false);
ClearInDocument();
return NS_OK;
}
@ -226,7 +228,7 @@ nsTextNode::UnbindFromAttribute()
NS_ASSERTION(GetNodeParent() &&
GetNodeParent()->IsNodeOfType(nsINode::eATTRIBUTE),
"Use this method only to unbind from an attribute!");
mParentPtrBits = 0;
mParent = nsnull;
return NS_OK;
}

View File

@ -950,8 +950,7 @@ nsGenericHTMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
NS_ENSURE_SUCCESS(rv, rv);
if (aDocument) {
RegAccessKey();
if (HasFlag(NODE_HAS_NAME)) {
if (HasName()) {
aDocument->
AddToNameTable(this, GetParsedAttr(nsGkAtoms::name)->GetAtomValue());
}
@ -1198,7 +1197,7 @@ nsGenericHTMLElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
PRInt32 change;
if (contentEditable) {
change = GetContentEditableValue() == eTrue ? -1 : 0;
SetFlags(NODE_MAY_HAVE_CONTENT_EDITABLE_ATTR);
SetMayHaveContentEditableAttr();
}
if (accessKey) {
@ -1237,7 +1236,7 @@ nsGenericHTMLElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
if (aAttribute == nsGkAtoms::name) {
// Have to do this before clearing flag. See RemoveFromNameTable
RemoveFromNameTable();
UnsetFlags(NODE_HAS_NAME);
ClearHasName();
}
else if (aAttribute == nsGkAtoms::contenteditable) {
contentEditable = PR_TRUE;
@ -1311,14 +1310,14 @@ nsGenericHTMLElement::ParseAttribute(PRInt32 aNamespaceID,
// not that it has an emptystring as the name.
RemoveFromNameTable();
if (aValue.IsEmpty()) {
UnsetFlags(NODE_HAS_NAME);
ClearHasName();
return PR_FALSE;
}
aResult.ParseAtom(aValue);
if (CanHaveName(Tag())) {
SetFlags(NODE_HAS_NAME);
SetHasName();
AddToNameTable(aResult.GetAtomValue());
}

View File

@ -530,14 +530,14 @@ protected:
* Add/remove this element to the documents name cache
*/
void AddToNameTable(nsIAtom* aName) {
NS_ASSERTION(HasFlag(NODE_HAS_NAME), "Node lacking NODE_HAS_NAME flag");
NS_ASSERTION(HasName(), "Node doesn't have name?");
nsIDocument* doc = GetCurrentDoc();
if (doc && !IsInAnonymousSubtree()) {
doc->AddToNameTable(this, aName);
}
}
void RemoveFromNameTable() {
if (HasFlag(NODE_HAS_NAME)) {
if (HasName()) {
nsIDocument* doc = GetCurrentDoc();
if (doc) {
doc->RemoveFromNameTable(this, GetParsedAttr(nsGkAtoms::name)->
@ -794,7 +794,7 @@ protected:
static const nsIContent::AttrValuesArray values[] =
{ &nsGkAtoms::_false, &nsGkAtoms::_true, &nsGkAtoms::_empty, nsnull };
if (!HasFlag(NODE_MAY_HAVE_CONTENT_EDITABLE_ATTR))
if (!MayHaveContentEditableAttr())
return eInherit;
PRInt32 value = FindAttrValueIn(kNameSpaceID_None,

View File

@ -2613,7 +2613,7 @@ FindNamedItems(nsIAtom* aName, nsIContent *aContent,
NS_ASSERTION(!aEntry->IsInvalidName(),
"Entry that should never have a list passed to FindNamedItems()!");
if (aContent->HasFlag(NODE_HAS_NAME)) {
if (aContent->HasName()) {
NS_ASSERTION(nsGenericHTMLElement::FromContent(aContent),
"Only HTML Elements should have a name");

View File

@ -239,7 +239,7 @@ nsSVGElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
if (!HasFlag(NODE_MAY_HAVE_STYLE)) {
if (!MayHaveStyle()) {
return NS_OK;
}
const nsAttrValue* oldVal = mAttrsAndChildren.GetAttr(nsGkAtoms::style);

View File

@ -89,7 +89,7 @@ nsXMLElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute,
(!guard.Mutated(0) ||
!mNodeInfo->GetIDAttributeAtom() ||
!HasAttr(kNameSpaceID_None, GetIDAttributeName()))) {
UnsetFlags(NODE_HAS_ID);
ClearHasID();
}
return rv;
@ -104,7 +104,7 @@ nsXMLElement::GetIDAttributeName() const
nsIAtom*
nsXMLElement::DoGetID() const
{
NS_ASSERTION(HasFlag(NODE_HAS_ID), "Unexpected call");
NS_ASSERTION(HasID(), "Unexpected call");
const nsAttrValue* attrVal = mAttrsAndChildren.GetAttr(GetIDAttributeName());
return attrVal ? attrVal->GetAtomValue() : nsnull;
@ -118,7 +118,7 @@ nsXMLElement::NodeInfoChanged(nsINodeInfo* aOldNodeInfo)
"Can only change document if we're not inside one");
nsIDocument* doc = GetCurrentDoc();
if (HasFlag(NODE_HAS_ID) && doc) {
if (HasID() && doc) {
const nsAttrValue* attrVal =
mAttrsAndChildren.GetAttr(aOldNodeInfo->GetIDAttributeAtom());
if (attrVal) {
@ -126,13 +126,13 @@ nsXMLElement::NodeInfoChanged(nsINodeInfo* aOldNodeInfo)
}
}
UnsetFlags(NODE_HAS_ID);
ClearHasID();
nsIAtom* IDName = GetIDAttributeName();
if (IDName) {
const nsAttrValue* attrVal = mAttrsAndChildren.GetAttr(IDName);
if (attrVal) {
SetFlags(NODE_HAS_ID);
SetHasID();
if (attrVal->Type() == nsAttrValue::eString) {
nsString idVal(attrVal->GetStringValue());
@ -160,11 +160,11 @@ nsXMLElement::ParseAttribute(PRInt32 aNamespaceID,
// not that it has an emptystring as the id.
RemoveFromIdTable();
if (aValue.IsEmpty()) {
UnsetFlags(NODE_HAS_ID);
ClearHasID();
return PR_FALSE;
}
aResult.ParseAtom(aValue);
SetFlags(NODE_HAS_ID);
SetHasID();
AddToIdTable(aResult.GetAtomValue());
return PR_TRUE;
}
@ -182,7 +182,7 @@ nsXMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
if (aDocument && HasFlag(NODE_HAS_ID) && !GetBindingParent()) {
if (aDocument && HasID() && !GetBindingParent()) {
aDocument->AddToIdTable(this, DoGetID());
}

View File

@ -248,8 +248,8 @@ nsXULElement::nsXULElement(already_AddRefed<nsINodeInfo> aNodeInfo)
XUL_PROTOTYPE_ATTRIBUTE_METER(gNumElements);
}
nsXULElement::nsXULSlots::nsXULSlots(PtrBits aFlags)
: nsXULElement::nsDOMSlots(aFlags)
nsXULElement::nsXULSlots::nsXULSlots()
: nsXULElement::nsDOMSlots()
{
}
@ -264,7 +264,7 @@ nsXULElement::nsXULSlots::~nsXULSlots()
nsINode::nsSlots*
nsXULElement::CreateSlots()
{
return new nsXULSlots(mFlagsOrSlots);
return new nsXULSlots();
}
/* static */
@ -279,13 +279,13 @@ nsXULElement::Create(nsXULPrototypeElement* aPrototype, nsINodeInfo *aNodeInfo,
element->mPrototype = aPrototype;
if (aPrototype->mHasIdAttribute) {
element->SetFlags(NODE_HAS_ID);
element->SetHasID();
}
if (aPrototype->mHasClassAttribute) {
element->SetFlags(NODE_MAY_HAVE_CLASS);
}
if (aPrototype->mHasStyleAttribute) {
element->SetFlags(NODE_MAY_HAVE_STYLE);
element->SetMayHaveStyle();
}
NS_ASSERTION(aPrototype->mScriptTypeID != nsIProgrammingLanguage::UNKNOWN,
@ -1408,7 +1408,7 @@ nsXULElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNotify)
// XXX Know how to remove POPUP event listeners when an attribute is unset?
if (isId) {
UnsetFlags(NODE_HAS_ID);
ClearHasID();
}
if (aNameSpaceID == kNameSpaceID_None) {
@ -1778,15 +1778,15 @@ nsXULElement::GetBuilder(nsIXULTemplateBuilder** aBuilder)
nsIAtom*
nsXULElement::DoGetID() const
{
NS_ASSERTION(HasFlag(NODE_HAS_ID), "Unexpected call");
NS_ASSERTION(HasID(), "Unexpected call");
const nsAttrValue* attr =
FindLocalOrProtoAttr(kNameSpaceID_None, nsGkAtoms::id);
// We need the nullcheck here because during unlink the prototype looses
// We need the nullcheck here because during unlink the prototype loses
// all of its attributes. We might want to change that.
// The nullcheck would also be needed if we make UnsetAttr use
// nsGenericElement::UnsetAttr as that calls out to various code between
// removing the attribute and clearing the NODE_HAS_ID flag.
// removing the attribute and calling ClearHasID().
return attr ? attr->GetAtomValue() : nsnull;
}
@ -1807,7 +1807,7 @@ nsXULElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
css::StyleRule*
nsXULElement::GetInlineStyleRule()
{
if (!HasFlag(NODE_MAY_HAVE_STYLE)) {
if (!MayHaveStyle()) {
return nsnull;
}
// Fetch the cached style rule from the attributes.

View File

@ -621,7 +621,7 @@ protected:
class nsXULSlots : public nsGenericElement::nsDOMSlots
{
public:
nsXULSlots(PtrBits aFlags);
nsXULSlots();
virtual ~nsXULSlots();
nsRefPtr<nsFrameLoader> mFrameLoader;

View File

@ -37,11 +37,22 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = extensions/spellcheck/hunspell
include $(DEPTH)/config/autoconf.mk
MODULE = hunspell
DIRS = src
XPCSHELL_TESTS = tests/unit
ABS_topsrcdir = $(call core_abspath,$(topsrcdir))
libs::
$(NSINSTALL) -D $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/tests/unit/data
cd $(srcdir)/tests; $(PYTHON) $(ABS_topsrcdir)/config/nsinstall.py \
./ \
$(call core_abspath,$(DEPTH)/_tests/xpcshell/$(relativesrcdir)/tests/unit/data/)
include $(topsrcdir)/config/rules.mk

View File

@ -361,7 +361,7 @@ mozHunspell::LoadDictionaryList()
}
}
void
NS_IMETHODIMP
mozHunspell::LoadDictionariesFromDir(nsIFile* aDir)
{
nsresult rv;
@ -369,20 +369,20 @@ mozHunspell::LoadDictionariesFromDir(nsIFile* aDir)
PRBool check = PR_FALSE;
rv = aDir->Exists(&check);
if (NS_FAILED(rv) || !check)
return;
return NS_ERROR_UNEXPECTED;
rv = aDir->IsDirectory(&check);
if (NS_FAILED(rv) || !check)
return;
return NS_ERROR_UNEXPECTED;
nsCOMPtr<nsISimpleEnumerator> e;
rv = aDir->GetDirectoryEntries(getter_AddRefs(e));
if (NS_FAILED(rv))
return;
return NS_ERROR_UNEXPECTED;
nsCOMPtr<nsIDirectoryEnumerator> files(do_QueryInterface(e));
if (!files)
return;
return NS_ERROR_UNEXPECTED;
nsCOMPtr<nsIFile> file;
while (NS_SUCCEEDED(files->GetNextFile(getter_AddRefs(file))) && file) {
@ -408,6 +408,8 @@ mozHunspell::LoadDictionariesFromDir(nsIFile* aDir)
mDictionaries.Put(dict, file);
}
return NS_OK;
}
nsresult mozHunspell::ConvertCharset(const PRUnichar* aStr, char ** aDst)

View File

@ -93,7 +93,6 @@ public:
nsresult Init();
void LoadDictionaryList();
void LoadDictionariesFromDir(nsIFile* aDir);
// helper method for converting a word to the charset of the dictionary
nsresult ConvertCharset(const PRUnichar* aStr, char ** aDst);

View File

@ -0,0 +1,3 @@
# capitalized ngram suggestion test data for
# Sf.net Bug ID 1463589, reported by Frederik Fouvry.
MAXNGRAMSUGS 1

View File

@ -0,0 +1,2 @@
1
Kühlschrank

View File

@ -0,0 +1,5 @@
Kühlschrank
Kühlschrank
Kühlschrank
Kühlschrank
Kühlschrank

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME -i ISO8859-1

View File

@ -0,0 +1,5 @@
kuhlschrank
kuehlschrank
kühlschrank
Kuhlschrank
Kuehlschrank

View File

@ -0,0 +1,4 @@
# capitalized ngram suggestion test data (Unicode version) for
# Sf.net Bug ID 1463589, reported by Frederik Fouvry.
SET UTF-8
MAXNGRAMSUGS 1

View File

@ -0,0 +1,2 @@
1
Kühlschrank

View File

@ -0,0 +1,5 @@
Kühlschrank
Kühlschrank
Kühlschrank
Kühlschrank
Kühlschrank

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME -i utf-8

View File

@ -0,0 +1,5 @@
kuhlschrank
kuehlschrank
kühlschrank
Kuhlschrank
Kuehlschrank

View File

@ -0,0 +1,20 @@
# fix homonym handling for German dictionary project,
# reported by Björn Jacke (sf.net Bug ID 1592880).
SET ISO8859-1
SFX N Y 1
SFX N 0 n .
SFX S Y 1
SFX S 0 s .
SFX P Y 1
SFX P 0 en .
SFX Q Y 2
SFX Q 0 e .
SFX Q 0 en .
COMPOUNDEND z
COMPOUNDPERMITFLAG c
ONLYINCOMPOUND o

View File

@ -0,0 +1,4 @@
3
weg/Qoz
weg/P
wege

View File

@ -0,0 +1,3 @@
weg
wege
wegen

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME

View File

@ -0,0 +1,10 @@
# fix NEEDAFFIX homonym suggestion.
# Sf.net Bug ID 1695964, reported by Björn Jacke.
TRY esianrtolcdugmphbyfvkwESIANRTOLCDUGMPHBYFVKW
MAXNGRAMSUGS 0
NEEDAFFIX h
SFX S Y 1
SFX S 0 s .
SFX e Y 1
SFX e 0 e .

View File

@ -0,0 +1,3 @@
2
Mull/he
Mull/S

View File

@ -0,0 +1,3 @@
Mull
Mulle
Mulls

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME

View File

@ -0,0 +1,3 @@
Mall
Malle
Malls

View File

@ -0,0 +1,13 @@
# test COMPOUNDRULE bug reported by Björn Jacke
SET ISO8859-1
TRY esijanrtolcdugmphbyfvkwqxz
SFX A Y 5
SFX A 0 e .
SFX A 0 er .
SFX A 0 en .
SFX A 0 em .
SFX A 0 es .
COMPOUNDRULE 1
COMPOUNDRULE vw

View File

@ -0,0 +1,4 @@
3
arbeits/v
scheu/Aw
farbig/A

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME

View File

@ -0,0 +1,3 @@
arbeitsfarbig
arbeitsfarbige
arbeitsfarbiger

View File

@ -0,0 +1,6 @@
SET UTF-8
IGNORE ٌٍَُِّْـ
PFX x N 1
PFX x أ ت أ[^ي]

View File

@ -0,0 +1,3 @@
2
أرى/x
أيار/x

View File

@ -0,0 +1,3 @@
أرى
أيار
ترى

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME -i UTF-8

View File

@ -0,0 +1 @@
تيار

View File

@ -0,0 +1,5 @@
# test words with three parts
CHECKCOMPOUNDPATTERN 1
CHECKCOMPOUNDPATTERN le fi
COMPOUNDFLAG c

View File

@ -0,0 +1,4 @@
3
first/c
middle/c
last/c

View File

@ -0,0 +1 @@
firstmiddlelast

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME

View File

@ -0,0 +1 @@
lastmiddlefirst

View File

@ -0,0 +1,4 @@
CHECKCOMPOUNDPATTERN 1
CHECKCOMPOUNDPATTERN /a /b
COMPOUNDFLAG c

View File

@ -0,0 +1,4 @@
3
foo/ac
bar/c
baz/bc

View File

@ -0,0 +1,5 @@
foobar
barfoo
bazfoo
barbaz
bazbar

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME

View File

@ -0,0 +1 @@
foobaz

View File

@ -0,0 +1,6 @@
COMPOUNDRULE 1
COMPOUNDRULE ab
COMPOUNDBEGIN A
COMPOUNDEND B

View File

@ -0,0 +1,4 @@
3
foo/aA
bar/b
baz/B

View File

@ -0,0 +1,2 @@
foobar
foobaz

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME

View File

@ -0,0 +1,8 @@
# check bad capitalisation of Dutch letter IJ.
TRY i
FORBIDDENWORD *
PFX i N 1
PFX i ij IJ ij
REP 1
REP ij IJ

View File

@ -0,0 +1,3 @@
1
ijs/i
Ijs/*

View File

@ -0,0 +1,2 @@
ijs
IJs

View File

@ -0,0 +1 @@
IJs, ijs

View File

@ -0,0 +1,4 @@
#!/bin/sh
DIR="`dirname $0`"
NAME="`basename $0 .test`"
$DIR/test.sh $NAME

View File

@ -0,0 +1 @@
Ijs

View File

@ -0,0 +1,693 @@
## Process this file with automake to create Makefile.in
SUBDIRS = suggestiontest
XFAIL_TESTS = @XFAILED@
TESTS = \
affixes.test \
condition.test \
condition_utf.test \
base.test \
base_utf.test \
allcaps.test \
allcaps_utf.test \
allcaps2.test \
allcaps3.test \
keepcase.test \
i58202.test \
map.test \
rep.test \
sug.test \
sugutf.test \
phone.test \
flag.test \
flaglong.test \
flagnum.test \
flagutf8.test \
slash.test \
forbiddenword.test \
nosuggest.test \
alias.test \
alias2.test \
alias3.test \
breakdefault.test \
break.test \
needaffix.test \
needaffix2.test \
needaffix3.test \
needaffix4.test \
needaffix5.test \
circumfix.test \
fogemorpheme.test \
onlyincompound.test \
complexprefixes.test \
complexprefixes2.test \
complexprefixesutf.test \
conditionalprefix.test \
zeroaffix.test \
utf8.test \
utf8_bom.test \
utf8_bom2.test \
utf8_nonbmp.test \
compoundflag.test \
compoundrule.test \
compoundrule2.test \
compoundrule3.test \
compoundrule4.test \
compoundrule5.test \
compoundrule6.test \
compoundrule7.test \
compoundrule8.test \
compoundaffix.test \
compoundaffix2.test \
compoundaffix3.test \
checkcompounddup.test \
checkcompoundtriple.test \
simplifiedtriple.test \
checkcompoundrep.test \
checkcompoundcase2.test \
checkcompoundcaseutf.test \
checkcompoundpattern.test \
checkcompoundpattern2.test \
checkcompoundpattern3.test \
checkcompoundpattern4.test \
utfcompound.test \
checksharps.test \
checksharpsutf.test \
germancompounding.test \
germancompoundingold.test \
i35725.test \
i53643.test \
i54633.test \
i54980.test \
maputf.test \
reputf.test \
ignore.test \
ignoreutf.test \
1592880.test \
1695964.test \
1463589.test \
1463589_utf.test \
IJ.test \
i68568.test \
i68568utf.test \
1706659.test \
digits_in_words.test \
colons_in_words.test \
ngram_utf_fix.test \
morph.test \
1975530.test \
fullstrip.test \
iconv.test \
oconv.test \
encoding.test \
korean.test \
opentaal_forbiddenword1.test \
opentaal_forbiddenword2.test \
opentaal_keepcase.test \
arabic.test \
2970240.test \
2970242.test \
breakoff.test \
opentaal_cpdpat.test \
opentaal_cpdpat2.test \
2999225.test \
onlyincompound2.test \
forceucase.test \
warn.test
# infixes.test
distclean-local:
-rm -rf testSubDir
EXTRA_DIST = \
test.sh \
affixes.aff \
affixes.dic \
affixes.good \
affixes.test \
condition.aff \
condition.dic \
condition.good \
condition.test \
condition.wrong \
condition_utf.aff \
condition_utf.dic \
condition_utf.good \
condition_utf.test \
condition_utf.wrong \
base.aff \
base.dic \
base.good \
base.sug \
base.test \
base.wrong \
base_utf.aff \
base_utf.dic \
base_utf.good \
base_utf.sug \
base_utf.test \
base_utf.wrong \
allcaps.aff \
allcaps.dic \
allcaps.good \
allcaps.sug \
allcaps.test \
allcaps.wrong \
allcaps2.aff \
allcaps2.dic \
allcaps2.good \
allcaps2.sug \
allcaps2.test \
allcaps2.wrong \
allcaps3.aff \
allcaps3.dic \
allcaps3.good \
allcaps3.test \
allcaps3.wrong \
allcaps_utf.aff \
allcaps_utf.dic \
allcaps_utf.good \
allcaps_utf.sug \
allcaps_utf.test \
allcaps_utf.wrong \
keepcase.aff \
keepcase.dic \
keepcase.good \
keepcase.sug \
keepcase.test \
keepcase.wrong \
map.aff \
map.dic \
map.sug \
map.test \
map.wrong \
rep.aff \
rep.dic \
rep.sug \
rep.test \
rep.wrong \
sug.aff \
sug.dic \
sug.sug \
sug.test \
sug.wrong \
sugutf.aff \
sugutf.dic \
sugutf.sug \
sugutf.test \
sugutf.wrong \
phone.aff \
phone.dic \
phone.sug \
phone.test \
phone.wrong \
alias.aff \
alias.dic \
alias.good \
alias.test \
alias2.aff \
alias2.dic \
alias2.good \
alias2.morph \
alias2.test \
alias3.aff \
alias3.dic \
alias3.good \
alias3.morph \
alias3.test \
break.aff \
break.dic \
break.good \
break.test \
break.wrong \
breakdefault.aff \
breakdefault.dic \
breakdefault.good \
breakdefault.sug \
breakdefault.test \
breakdefault.wrong \
circumfix.aff \
circumfix.dic \
circumfix.good \
circumfix.morph \
circumfix.test \
circumfix.wrong \
fogemorpheme.aff \
fogemorpheme.dic \
fogemorpheme.good \
fogemorpheme.test \
fogemorpheme.wrong \
onlyincompound.aff \
onlyincompound.dic \
onlyincompound.good \
onlyincompound.sug \
onlyincompound.test \
onlyincompound.wrong \
forbiddenword.aff \
forbiddenword.dic \
forbiddenword.good \
forbiddenword.test \
forbiddenword.wrong \
nosuggest.aff \
nosuggest.dic \
nosuggest.good \
nosuggest.sug \
nosuggest.test \
nosuggest.wrong \
germancompounding.aff \
germancompounding.dic \
germancompounding.good \
germancompounding.test \
germancompounding.wrong \
germancompoundingold.aff \
germancompoundingold.dic \
germancompoundingold.good \
germancompoundingold.test \
germancompoundingold.wrong \
needaffix2.aff \
needaffix2.dic \
needaffix2.good \
needaffix2.morph \
needaffix2.test \
needaffix3.aff \
needaffix3.dic \
needaffix3.good \
needaffix3.test \
needaffix3.wrong \
needaffix4.aff \
needaffix4.dic \
needaffix4.good \
needaffix4.test \
needaffix5.aff \
needaffix5.dic \
needaffix5.good \
needaffix5.test \
needaffix5.wrong \
needaffix.aff \
needaffix.dic \
needaffix.good \
needaffix.test \
needaffix.wrong \
zeroaffix.aff \
zeroaffix.dic \
zeroaffix.good \
zeroaffix.morph \
zeroaffix.test \
utf8.aff \
utf8.dic \
utf8.good \
utf8.test \
utf8_bom.aff \
utf8_bom.dic \
utf8_bom.good \
utf8_bom.test \
utf8_bom2.aff \
utf8_bom2.dic \
utf8_bom2.good \
utf8_bom2.test \
utf8_nonbmp.aff \
utf8_nonbmp.dic \
utf8_nonbmp.good \
utf8_nonbmp.sug \
utf8_nonbmp.test \
utf8_nonbmp.wrong \
utfcompound.aff \
utfcompound.dic \
utfcompound.good \
utfcompound.test \
utfcompound.wrong \
compoundflag.aff \
compoundflag.dic \
compoundflag.good \
compoundflag.test \
compoundflag.wrong \
compoundrule.aff \
compoundrule.dic \
compoundrule.good \
compoundrule.test \
compoundrule.wrong \
compoundrule2.aff \
compoundrule2.dic \
compoundrule2.good \
compoundrule2.test \
compoundrule2.wrong \
compoundrule3.aff \
compoundrule3.dic \
compoundrule3.good \
compoundrule3.test \
compoundrule3.wrong \
compoundrule4.aff \
compoundrule4.dic \
compoundrule4.good \
compoundrule4.test \
compoundrule4.wrong \
compoundrule5.aff \
compoundrule5.dic \
compoundrule5.good \
compoundrule5.morph \
compoundrule5.test \
compoundrule5.wrong \
compoundrule6.aff \
compoundrule6.dic \
compoundrule6.good \
compoundrule6.test \
compoundrule6.wrong \
compoundrule7.aff \
compoundrule7.dic \
compoundrule7.good \
compoundrule7.test \
compoundrule7.wrong \
compoundrule8.aff \
compoundrule8.dic \
compoundrule8.good \
compoundrule8.test \
compoundrule8.wrong \
compoundaffix.aff \
compoundaffix.dic \
compoundaffix.good \
compoundaffix.test \
compoundaffix.wrong \
compoundaffix2.aff \
compoundaffix2.dic \
compoundaffix2.good \
compoundaffix2.test \
compoundaffix3.aff \
compoundaffix3.dic \
compoundaffix3.good \
compoundaffix3.test \
compoundaffix3.wrong \
checkcompounddup.aff \
checkcompounddup.dic \
checkcompounddup.good \
checkcompounddup.test \
checkcompounddup.wrong \
checkcompoundcase.aff \
checkcompoundcase.dic \
checkcompoundcase.good \
checkcompoundcase.test \
checkcompoundcase.wrong \
checkcompoundcase2.aff \
checkcompoundcase2.dic \
checkcompoundcase2.good \
checkcompoundcase2.test \
checkcompoundcase2.wrong \
checkcompoundcaseutf.aff \
checkcompoundcaseutf.dic \
checkcompoundcaseutf.good \
checkcompoundcaseutf.test \
checkcompoundcaseutf.wrong \
checkcompoundrep.aff \
checkcompoundrep.dic \
checkcompoundrep.good \
checkcompoundrep.test \
checkcompoundrep.wrong \
checkcompoundtriple.aff \
checkcompoundtriple.dic \
checkcompoundtriple.good \
checkcompoundtriple.test \
checkcompoundtriple.wrong \
simplifiedtriple.aff \
simplifiedtriple.dic \
simplifiedtriple.good \
simplifiedtriple.test \
simplifiedtriple.wrong \
checkcompoundpattern.aff \
checkcompoundpattern.dic \
checkcompoundpattern.good \
checkcompoundpattern.test \
checkcompoundpattern.wrong \
checkcompoundpattern2.aff \
checkcompoundpattern2.dic \
checkcompoundpattern2.good \
checkcompoundpattern2.test \
checkcompoundpattern2.wrong \
checkcompoundpattern3.aff \
checkcompoundpattern3.dic \
checkcompoundpattern3.good \
checkcompoundpattern3.test \
checkcompoundpattern3.wrong \
checkcompoundpattern4.aff \
checkcompoundpattern4.dic \
checkcompoundpattern4.good \
checkcompoundpattern4.test \
checkcompoundpattern4.wrong \
checksharps.aff \
checksharps.dic \
checksharps.good \
checksharps.sug \
checksharps.test \
checksharps.wrong \
checksharpsutf.aff \
checksharpsutf.dic \
checksharpsutf.good \
checksharpsutf.sug \
checksharpsutf.test \
checksharpsutf.wrong \
conditionalprefix.aff \
conditionalprefix.dic \
conditionalprefix.good \
conditionalprefix.morph \
conditionalprefix.test \
conditionalprefix.wrong \
flaglong.aff \
flaglong.dic \
flaglong.good \
flaglong.test \
flagnum.aff \
flagnum.dic \
flagnum.good \
flagnum.test \
flag.aff \
flag.dic \
flag.good \
flag.test \
flagutf8.aff \
flagutf8.dic \
flagutf8.good \
flagutf8.test \
complexprefixes.aff \
complexprefixes.dic \
complexprefixes.good \
complexprefixes.wrong \
complexprefixes.test \
complexprefixes2.aff \
complexprefixes2.dic \
complexprefixes2.good \
complexprefixes2.test \
complexprefixesutf.aff \
complexprefixesutf.dic \
complexprefixesutf.good \
complexprefixesutf.wrong \
complexprefixesutf.test \
i35725.aff \
i35725.dic \
i35725.good \
i35725.sug \
i35725.test \
i35725.wrong \
i53643.aff \
i53643.dic \
i53643.good \
i53643.test \
i53643.wrong \
i54633.aff \
i54633.dic \
i54633.good \
i54633.sug \
i54633.test \
i54633.wrong \
i54980.aff \
i54980.dic \
i54980.good \
i54980.test \
i58202.aff \
i58202.dic \
i58202.good \
i58202.sug \
i58202.test \
i58202.wrong \
maputf.aff \
maputf.dic \
maputf.sug \
maputf.wrong \
maputf.test \
reputf.aff \
reputf.dic \
reputf.sug \
reputf.wrong \
reputf.test \
slash.aff \
slash.dic \
slash.good \
slash.test \
ignore.aff \
ignore.dic \
ignore.good \
ignore.test \
ignoreutf.aff \
ignoreutf.dic \
ignoreutf.good \
ignoreutf.test \
1592880.aff \
1592880.dic \
1592880.good \
1592880.test \
1695964.aff \
1695964.dic \
1695964.sug \
1695964.test \
1695964.wrong \
1463589.aff \
1463589.dic \
1463589.sug \
1463589.test \
1463589.wrong \
1463589_utf.aff \
1463589_utf.dic \
1463589_utf.sug \
1463589_utf.test \
1463589_utf.wrong \
IJ.aff \
IJ.dic \
IJ.good \
IJ.sug \
IJ.test \
IJ.wrong \
i68568.aff \
i68568.dic \
i68568.test \
i68568.wrong \
i68568utf.aff \
i68568utf.dic \
i68568utf.test \
i68568utf.wrong \
1706659.aff \
1706659.dic \
1706659.test \
1706659.wrong \
digits_in_words.aff \
digits_in_words.dic \
digits_in_words.test \
digits_in_words.wrong \
colons_in_words.aff \
colons_in_words.dic \
colons_in_words.test \
ngram_utf_fix.aff \
ngram_utf_fix.dic \
ngram_utf_fix.good \
ngram_utf_fix.sug \
ngram_utf_fix.test \
ngram_utf_fix.wrong \
morph.aff \
morph.dic \
morph.good \
morph.morph \
morph.test \
1975530.aff \
1975530.dic \
1975530.good \
1975530.test \
1975530.wrong \
fullstrip.aff \
fullstrip.dic \
fullstrip.good \
fullstrip.test \
iconv.aff \
iconv.dic \
iconv.good \
iconv.test \
oconv.aff \
oconv.dic \
oconv.good \
oconv.sug \
oconv.test \
oconv.wrong \
encoding.aff \
encoding.dic \
encoding.good \
encoding.test \
opentaal_forbiddenword1.aff \
opentaal_forbiddenword1.dic \
opentaal_forbiddenword1.good \
opentaal_forbiddenword1.sug \
opentaal_forbiddenword1.test \
opentaal_forbiddenword1.wrong \
opentaal_forbiddenword2.aff \
opentaal_forbiddenword2.dic \
opentaal_forbiddenword2.good \
opentaal_forbiddenword2.sug \
opentaal_forbiddenword2.test \
opentaal_forbiddenword2.wrong \
opentaal_forbiddenword2.aff \
opentaal_forbiddenword2.dic \
opentaal_forbiddenword2.good \
opentaal_forbiddenword2.sug \
opentaal_forbiddenword2.test \
opentaal_forbiddenword2.wrong \
opentaal_keepcase.aff \
opentaal_keepcase.dic \
opentaal_keepcase.good \
opentaal_keepcase.sug \
opentaal_keepcase.test \
opentaal_keepcase.wrong \
arabic.aff \
arabic.dic \
arabic.wrong \
arabic.test \
2970240.aff \
2970240.dic \
2970240.good \
2970240.wrong \
2970240.test \
2970242.aff \
2970242.dic \
2970242.good \
2970242.wrong \
2970242.test \
breakoff.aff \
breakoff.dic \
breakoff.good \
breakoff.wrong \
breakoff.test \
opentaal_cpdpat.aff \
opentaal_cpdpat.dic \
opentaal_cpdpat.good \
opentaal_cpdpat.wrong \
opentaal_cpdpat.test \
opentaal_cpdpat2.aff \
opentaal_cpdpat2.dic \
opentaal_cpdpat2.good \
opentaal_cpdpat2.wrong \
opentaal_cpdpat2.test \
2999225.aff \
2999225.dic \
2999225.good \
2999225.test \
korean.aff \
korean.dic \
korean.good \
korean.wrong \
korean.test \
onlyincompound2.aff \
onlyincompound2.dic \
onlyincompound2.good \
onlyincompound2.test \
onlyincompound2.wrong \
forceucase.aff \
forceucase.dic \
forceucase.good \
forceucase.sug \
forceucase.wrong \
forceucase.test \
warn.aff \
warn.dic \
warn.good \
warn.test
# infixes.aff
# infixes.dic
# infixes.good
# infixes.test

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
# simple example for affix compression (see Hunspell(4))
PFX A Y 1
PFX A 0 re .
SFX B Y 2
SFX B 0 ed [^y]
SFX B y ied y

Some files were not shown because too many files have changed in this diff Show More