2009-01-23 Anders Carlsson <andersca@apple.com>
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jan 2009 19:52:19 +0000 (19:52 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jan 2009 19:52:19 +0000 (19:52 +0000)
        Reviewed by Sam Weinig.

        Turn on -Wmissing-prototypes and fix the resulting warnings.

        * Configurations/Base.xcconfig:
        * bindings/js/JSHistoryCustom.cpp:
        (WebCore::nonCachingStaticBackFunctionGetter):
        (WebCore::nonCachingStaticForwardFunctionGetter):
        (WebCore::nonCachingStaticGoFunctionGetter):
        * bindings/js/JSLocationCustom.cpp:
        (WebCore::nonCachingStaticReplaceFunctionGetter):
        (WebCore::nonCachingStaticReloadFunctionGetter):
        (WebCore::nonCachingStaticAssignFunctionGetter):
        (WebCore::JSLocation::customGetOwnPropertySlot):
        * bindings/objc/DOMRGBColor.mm:
        (WebCore::getWrapperForRGB):
        (WebCore::setWrapperForRGB):
        (WebCore::removeWrapperForRGB):
        * bindings/scripts/CodeGeneratorJS.pm:
        * bridge/c/c_instance.cpp:
        (JSC::Bindings::globalExceptionString):
        * bridge/runtime_object.cpp:
        (JSC::callRuntimeConstructor):
        * css/CSSParser.cpp:
        (WebCore::parseGradientColorStop):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::scaleFactorForConversion):
        * css/CSSStyleSelector.cpp:
        (WebCore::operator >):
        (WebCore::operator <=):
        (WebCore::getTransformOperationType):
        * dom/make_names.pl:
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::updatePositionForTextRemoval):
        * editing/EditorCommand.cpp:
        (WebCore::valueBackColor):
        (WebCore::valueFontName):
        (WebCore::valueFontSize):
        (WebCore::valueFontSizeDelta):
        (WebCore::valueForeColor):
        * editing/VisiblePosition.cpp:
        (WebCore::canonicalizeCandidate):
        * editing/htmlediting.cpp:
        * editing/markup.cpp:
        (WebCore::joinMarkups):
        * html/HTMLElement.cpp:
        (WebCore::inlineTagList):
        (WebCore::blockTagList):
        * html/HTMLMediaElement.cpp:
        (WebCore::serializeTimeOffset):
        (WebCore::parseTimeOffset):
        * page/mac/FrameMac.mm:
        (WebCore::regExpForLabels):
        * platform/Arena.cpp:
        * platform/graphics/Color.cpp:
        (WebCore::colorFloatToRGBAByte):
        * platform/graphics/cg/ImageSourceCG.cpp:
        (WebCore::imageSourceOptions):
        * platform/graphics/cg/PathCG.cpp:
        (WebCore::CGPathApplierToPathApplier):
        * platform/graphics/mac/SimpleFontDataMac.mm:
        (WebCore::initFontData):
        * platform/mac/PlatformMouseEventMac.mm:
        * platform/text/String.cpp:
        * rendering/RenderBlock.cpp:
        (WebCore::continuationOutlineTable):
        (WebCore::getHeightForLineCount):
        * rendering/RenderView.cpp:
        (WebCore::rendererAfterPosition):
        * rendering/RootInlineBox.cpp:
        (WebCore::isEditableLeaf):
        * rendering/SVGRenderTreeAsText.cpp:
        (WebCore::hasFractions):
        * rendering/style/RenderStyle.cpp:
        (WebCore::positionedObjectMoved):
        * svg/SVGFont.cpp:
        (WebCore::floatWidthUsingSVGFontCallback):
        (WebCore::floatWidthMissingGlyphCallback):
        (WebCore::drawTextUsingSVGFontCallback):
        (WebCore::drawTextMissingGlyphCallback):
        * svg/SVGTransformable.cpp:
        (WebCore::parseTransformParamList):
        * svg/graphics/SVGPaintServerGradient.cpp:
        (WebCore::operator<<):
        * xml/XPathGrammar.y:
        * xml/XSLTExtensions.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@40171 268f45cc-cd09-0410-ab3c-d52691b4dbfc

37 files changed:
WebCore/ChangeLog
WebCore/Configurations/Base.xcconfig
WebCore/bindings/js/JSHistoryCustom.cpp
WebCore/bindings/js/JSLocationCustom.cpp
WebCore/bindings/objc/DOMRGBColor.mm
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bridge/c/c_instance.cpp
WebCore/bridge/runtime_object.cpp
WebCore/css/CSSParser.cpp
WebCore/css/CSSPrimitiveValue.cpp
WebCore/css/CSSStyleSelector.cpp
WebCore/dom/make_names.pl
WebCore/editing/DeleteSelectionCommand.cpp
WebCore/editing/EditorCommand.cpp
WebCore/editing/VisiblePosition.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/markup.cpp
WebCore/html/HTMLElement.cpp
WebCore/html/HTMLMediaElement.cpp
WebCore/page/mac/FrameMac.mm
WebCore/platform/Arena.cpp
WebCore/platform/graphics/Color.cpp
WebCore/platform/graphics/cg/ImageSourceCG.cpp
WebCore/platform/graphics/cg/PathCG.cpp
WebCore/platform/graphics/mac/SimpleFontDataMac.mm
WebCore/platform/mac/PlatformMouseEventMac.mm
WebCore/platform/text/String.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderView.cpp
WebCore/rendering/RootInlineBox.cpp
WebCore/rendering/SVGRenderTreeAsText.cpp
WebCore/rendering/style/RenderStyle.cpp
WebCore/svg/SVGFont.cpp
WebCore/svg/SVGTransformable.cpp
WebCore/svg/graphics/SVGPaintServerGradient.cpp
WebCore/xml/XPathGrammar.y
WebCore/xml/XSLTExtensions.cpp

index 4bc42d6..6917a8a 100644 (file)
@@ -1,3 +1,92 @@
+2009-01-23  Anders Carlsson  <andersca@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Turn on -Wmissing-prototypes and fix the resulting warnings.
+        
+        * Configurations/Base.xcconfig:
+        * bindings/js/JSHistoryCustom.cpp:
+        (WebCore::nonCachingStaticBackFunctionGetter):
+        (WebCore::nonCachingStaticForwardFunctionGetter):
+        (WebCore::nonCachingStaticGoFunctionGetter):
+        * bindings/js/JSLocationCustom.cpp:
+        (WebCore::nonCachingStaticReplaceFunctionGetter):
+        (WebCore::nonCachingStaticReloadFunctionGetter):
+        (WebCore::nonCachingStaticAssignFunctionGetter):
+        (WebCore::JSLocation::customGetOwnPropertySlot):
+        * bindings/objc/DOMRGBColor.mm:
+        (WebCore::getWrapperForRGB):
+        (WebCore::setWrapperForRGB):
+        (WebCore::removeWrapperForRGB):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * bridge/c/c_instance.cpp:
+        (JSC::Bindings::globalExceptionString):
+        * bridge/runtime_object.cpp:
+        (JSC::callRuntimeConstructor):
+        * css/CSSParser.cpp:
+        (WebCore::parseGradientColorStop):
+        * css/CSSPrimitiveValue.cpp:
+        (WebCore::scaleFactorForConversion):
+        * css/CSSStyleSelector.cpp:
+        (WebCore::operator >):
+        (WebCore::operator <=):
+        (WebCore::getTransformOperationType):
+        * dom/make_names.pl:
+        * editing/DeleteSelectionCommand.cpp:
+        (WebCore::updatePositionForTextRemoval):
+        * editing/EditorCommand.cpp:
+        (WebCore::valueBackColor):
+        (WebCore::valueFontName):
+        (WebCore::valueFontSize):
+        (WebCore::valueFontSizeDelta):
+        (WebCore::valueForeColor):
+        * editing/VisiblePosition.cpp:
+        (WebCore::canonicalizeCandidate):
+        * editing/htmlediting.cpp:
+        * editing/markup.cpp:
+        (WebCore::joinMarkups):
+        * html/HTMLElement.cpp:
+        (WebCore::inlineTagList):
+        (WebCore::blockTagList):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::serializeTimeOffset):
+        (WebCore::parseTimeOffset):
+        * page/mac/FrameMac.mm:
+        (WebCore::regExpForLabels):
+        * platform/Arena.cpp:
+        * platform/graphics/Color.cpp:
+        (WebCore::colorFloatToRGBAByte):
+        * platform/graphics/cg/ImageSourceCG.cpp:
+        (WebCore::imageSourceOptions):
+        * platform/graphics/cg/PathCG.cpp:
+        (WebCore::CGPathApplierToPathApplier):
+        * platform/graphics/mac/SimpleFontDataMac.mm:
+        (WebCore::initFontData):
+        * platform/mac/PlatformMouseEventMac.mm:
+        * platform/text/String.cpp:
+        * rendering/RenderBlock.cpp:
+        (WebCore::continuationOutlineTable):
+        (WebCore::getHeightForLineCount):
+        * rendering/RenderView.cpp:
+        (WebCore::rendererAfterPosition):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::isEditableLeaf):
+        * rendering/SVGRenderTreeAsText.cpp:
+        (WebCore::hasFractions):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::positionedObjectMoved):
+        * svg/SVGFont.cpp:
+        (WebCore::floatWidthUsingSVGFontCallback):
+        (WebCore::floatWidthMissingGlyphCallback):
+        (WebCore::drawTextUsingSVGFontCallback):
+        (WebCore::drawTextMissingGlyphCallback):
+        * svg/SVGTransformable.cpp:
+        (WebCore::parseTransformParamList):
+        * svg/graphics/SVGPaintServerGradient.cpp:
+        (WebCore::operator<<):
+        * xml/XPathGrammar.y:
+        * xml/XSLTExtensions.cpp:
+
 2009-01-23  Eric Seidel  <eric@webkit.org>
 
         No review, removing an empty file.
index 5ff8dd3..6c0783b 100644 (file)
@@ -14,13 +14,12 @@ GCC_THREADSAFE_STATICS = NO;
 GCC_TREAT_WARNINGS_AS_ERRORS = YES;
 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
 GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
 GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
 LINKER_DISPLAYS_MANGLED_NAMES = YES;
 PREBINDING = NO;
 VALID_ARCHS = i386 ppc x86_64 ppc64;
 WARNING_CFLAGS = $(WARNING_CFLAGS_$(CURRENT_ARCH));
-WARNING_CFLAGS_BASE = -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wundef;
+WARNING_CFLAGS_BASE = -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wundef -Wmissing-prototypes;
 WARNING_CFLAGS_ = $(WARNING_CFLAGS_BASE) -Wshorten-64-to-32;
 WARNING_CFLAGS_i386 = $(WARNING_CFLAGS_BASE) -Wshorten-64-to-32;
 WARNING_CFLAGS_ppc = $(WARNING_CFLAGS_BASE) -Wshorten-64-to-32;
index 1baa6d4..e83ac40 100644 (file)
@@ -37,17 +37,17 @@ using namespace JSC;
 
 namespace WebCore {
 
-JSValuePtr nonCachingStaticBackFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
+static JSValuePtr nonCachingStaticBackFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
 {
     return new (exec) PrototypeFunction(exec, 0, propertyName, jsHistoryPrototypeFunctionBack);
 }
 
-JSValuePtr nonCachingStaticForwardFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
+static JSValuePtr nonCachingStaticForwardFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
 {
     return new (exec) PrototypeFunction(exec, 0, propertyName, jsHistoryPrototypeFunctionForward);
 }
 
-JSValuePtr nonCachingStaticGoFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
+static JSValuePtr nonCachingStaticGoFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
 {
     return new (exec) PrototypeFunction(exec, 1, propertyName, jsHistoryPrototypeFunctionGo);
 }
index e690989..c82dd0f 100644 (file)
@@ -37,17 +37,17 @@ using namespace JSC;
 
 namespace WebCore {
 
-JSValuePtr nonCachingStaticReplaceFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
+static JSValuePtr nonCachingStaticReplaceFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
 {
     return new (exec) PrototypeFunction(exec, 1, propertyName, jsLocationPrototypeFunctionReplace);
 }
 
-JSValuePtr nonCachingStaticReloadFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
+static JSValuePtr nonCachingStaticReloadFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
 {
     return new (exec) PrototypeFunction(exec, 0, propertyName, jsLocationPrototypeFunctionReload);
 }
 
-JSValuePtr nonCachingStaticAssignFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
+static JSValuePtr nonCachingStaticAssignFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot&)
 {
     return new (exec) PrototypeFunction(exec, 1, propertyName, jsLocationPrototypeFunctionAssign);
 }
@@ -76,7 +76,7 @@ bool JSLocation::customGetOwnPropertySlot(ExecState* exec, const Identifier& pro
             slot.setCustom(this, nonCachingStaticReplaceFunctionGetter);
             return true;
         } else if (entry->function() == jsLocationPrototypeFunctionReload) {
-            slot.setCustom(this, nonCachingStaticReplaceFunctionGetter);
+            slot.setCustom(this, nonCachingStaticReloadFunctionGetter);
             return true;
         } else if (entry->function() == jsLocationPrototypeFunctionAssign) {
             slot.setCustom(this, nonCachingStaticAssignFunctionGetter);
index e8f06ee..5921b8e 100644 (file)
@@ -40,14 +40,14 @@ namespace WebCore {
 
 static NSMapTable* RGBColorWrapperCache;
 
-id getWrapperForRGB(WebCore::RGBA32 value)
+static id getWrapperForRGB(WebCore::RGBA32 value)
 {
     if (!RGBColorWrapperCache)
         return nil;
     return static_cast<id>(NSMapGet(RGBColorWrapperCache, reinterpret_cast<const void*>(value)));
 }
 
-void setWrapperForRGB(id wrapper, WebCore::RGBA32 value)
+static void setWrapperForRGB(id wrapper, WebCore::RGBA32 value)
 {
     if (!RGBColorWrapperCache)
         // No need to retain/free either impl key, or id value.  Items will be removed
@@ -56,7 +56,7 @@ void setWrapperForRGB(id wrapper, WebCore::RGBA32 value)
     NSMapInsert(RGBColorWrapperCache, reinterpret_cast<const void*>(value), wrapper);
 }
 
-void removeWrapperForRGB(WebCore::RGBA32 value)
+static void removeWrapperForRGB(WebCore::RGBA32 value)
 {
     if (!RGBColorWrapperCache)
         return;
index 2d0eaed..4708d79 100644 (file)
@@ -650,10 +650,11 @@ sub GenerateHeader
         } else {
             push(@headerContent, "$implClassName* to${interfaceName}(JSC::JSValuePtr);\n");
         }
-        if ($interfaceName eq "Node" or $interfaceName eq "Element" or $interfaceName eq "Text") {
-            push(@headerContent, "JSC::JSValuePtr toJSNewlyCreated(JSC::ExecState*, $interfaceName*);\n");
-        }
     }
+    if ($interfaceName eq "Node" or $interfaceName eq "Element" or $interfaceName eq "Text") {
+        push(@headerContent, "JSC::JSValuePtr toJSNewlyCreated(JSC::ExecState*, $interfaceName*);\n");
+    }
+    
     push(@headerContent, "\n");
 
     # Add prototype declaration.
index 7945b14..846ac48 100644 (file)
@@ -50,7 +50,7 @@ namespace Bindings {
 
 using JSC::UString;
 
-JSC::UString& globalExceptionString()
+static JSC::UString& globalExceptionString()
 {
     DEFINE_STATIC_LOCAL(JSC::UString, exceptionStr, ());
     return exceptionStr;
index 22be453..88aa560 100644 (file)
@@ -220,7 +220,7 @@ CallType RuntimeObjectImp::getCallData(CallData& callData)
     return CallTypeHost;
 }
 
-JSObject* callRuntimeConstructor(ExecState* exec, JSObject* constructor, const ArgList& args)
+static JSObject* callRuntimeConstructor(ExecState* exec, JSObject* constructor, const ArgList& args)
 {
     RefPtr<Instance> instance(static_cast<RuntimeObjectImp*>(constructor)->getInternalInstance());
     instance->begin();
index 36b86a4..519edb5 100644 (file)
@@ -3795,7 +3795,7 @@ static PassRefPtr<CSSPrimitiveValue> parseGradientPoint(CSSParserValue* a, bool
     return result;
 }
 
-bool parseGradientColorStop(CSSParser* p, CSSParserValue* a, CSSGradientColorStop& stop)
+static bool parseGradientColorStop(CSSParser* p, CSSParserValue* a, CSSGradientColorStop& stop)
 {
     if (a->unit != CSSParserValue::Function)
         return false;
index a160454..43fb70b 100644 (file)
@@ -485,7 +485,7 @@ void CSSPrimitiveValue::setFloatValue(unsigned short unitType, double floatValue
     m_type = unitType;
 }
 
-double scaleFactorForConversion(unsigned short unitType)
+static double scaleFactorForConversion(unsigned short unitType)
 {
     double factor = 1.0;
     switch (unitType) {
index 013cd96..ac99b58 100644 (file)
@@ -701,13 +701,14 @@ void CSSStyleSelector::matchRulesForList(CSSRuleDataList* rules, int& firstRuleI
     }
 }
 
-bool operator >(CSSRuleData& r1, CSSRuleData& r2)
+static bool operator >(CSSRuleData& r1, CSSRuleData& r2)
 {
     int spec1 = r1.selector()->specificity();
     int spec2 = r2.selector()->specificity();
     return (spec1 == spec2) ? r1.position() > r2.position() : spec1 > spec2; 
 }
-bool operator <=(CSSRuleData& r1, CSSRuleData& r2)
+    
+static bool operator <=(CSSRuleData& r1, CSSRuleData& r2)
 {
     return !(r1 > r2);
 }
@@ -5750,7 +5751,7 @@ void CSSStyleSelector::SelectorChecker::visitedStateChanged(LinkHash visitedHash
     }
 }
 
-TransformOperation::OperationType getTransformOperationType(WebKitCSSTransformValue::TransformOperationType type)
+static TransformOperation::OperationType getTransformOperationType(WebKitCSSTransformValue::TransformOperationType type)
 {
     switch (type) {
         case WebKitCSSTransformValue::ScaleTransformOperation:          return TransformOperation::SCALE;
index 3b2e0c3..f9eba88 100755 (executable)
@@ -341,16 +341,23 @@ sub printNamesHeaderFile
     if (keys %tags) {
         print F "// Tags\n";
         printMacros($F, "extern const WebCore::QualifiedName", "Tag", \%tags);
-        print F "\n\nWebCore::QualifiedName** get$parameters{'namespace'}Tags(size_t* size);\n";
     }
     
     if (keys %attrs) {
         print F "// Attributes\n";
         printMacros($F, "extern const WebCore::QualifiedName", "Attr", \%attrs);
-        print F "\n\nWebCore::QualifiedName** get$parameters{'namespace'}Attr(size_t* size);\n";
     }
     print F "#endif\n\n";
-    print F "void init();\n\n";
+    
+    if (keys %tags) {
+        print F "WebCore::QualifiedName** get$parameters{'namespace'}Tags(size_t* size);\n";
+    }
+
+    if (keys %attrs) {
+        print F "WebCore::QualifiedName** get$parameters{'namespace'}Attrs(size_t* size);\n";
+    }
+    
+    print F "\nvoid init();\n\n";
     print F "} }\n\n";
     print F "#endif\n\n";
     
index 43297fc..21b597e 100644 (file)
@@ -376,8 +376,7 @@ void DeleteSelectionCommand::removeNode(PassRefPtr<Node> node)
     CompositeEditCommand::removeNode(node);
 }
 
-
-void updatePositionForTextRemoval(Node* node, int offset, int count, Position& position)
+static void updatePositionForTextRemoval(Node* node, int offset, int count, Position& position)
 {
     if (position.node() == node) {
         if (position.offset() > offset + count)
index a5d354b..cfb6597 100644 (file)
@@ -1180,27 +1180,27 @@ static String valueNull(Frame*, Event*)
     return String();
 }
 
-String valueBackColor(Frame* frame, Event*)
+static String valueBackColor(Frame* frame, Event*)
 {
     return valueStyle(frame, CSSPropertyBackgroundColor);
 }
 
-String valueFontName(Frame* frame, Event*)
+static String valueFontName(Frame* frame, Event*)
 {
     return valueStyle(frame, CSSPropertyFontFamily);
 }
 
-String valueFontSize(Frame* frame, Event*)
+static String valueFontSize(Frame* frame, Event*)
 {
     return valueStyle(frame, CSSPropertyFontSize);
 }
 
-String valueFontSizeDelta(Frame* frame, Event*)
+static String valueFontSizeDelta(Frame* frame, Event*)
 {
     return valueStyle(frame, CSSPropertyWebkitFontSizeDelta);
 }
 
-String valueForeColor(Frame* frame, Event*)
+static String valueForeColor(Frame* frame, Event*)
 {
     return valueStyle(frame, CSSPropertyColor);
 }
index 9ecc4d8..6e303af 100644 (file)
@@ -438,7 +438,7 @@ VisiblePosition VisiblePosition::honorEditableBoundaryAtOrAfter(const VisiblePos
     return firstEditablePositionAfterPositionInRoot(pos.deepEquivalent(), highestRoot);
 }
 
-Position canonicalizeCandidate(const Position& candidate)
+static Position canonicalizeCandidate(const Position& candidate)
 {
     if (candidate.isNull())
         return Position();
index fdfdf5f..ee41e69 100644 (file)
@@ -713,15 +713,6 @@ Node* enclosingEmptyListItem(const VisiblePosition& visiblePos)
     return listChildNode;
 }
 
-Node* outermostEnclosingListChild(Node* node)
-{
-    Node* listNode = 0;
-    Node* nextNode = node;
-    while ((nextNode = enclosingListChild(nextNode)))
-        listNode = nextNode;
-    return listNode;
-}
-
 HTMLElement* outermostEnclosingList(Node* node)
 {
     HTMLElement* list = enclosingList(node);
index 83445f7..4e9fac7 100644 (file)
@@ -677,7 +677,7 @@ static bool elementHasTextDecorationProperty(const Node* node)
     return !propertyMissingOrEqualToNone(style.get(), CSSPropertyTextDecoration);
 }
 
-String joinMarkups(const Vector<String> preMarkups, const Vector<String>& postMarkups)
+static String joinMarkups(const Vector<String> preMarkups, const Vector<String>& postMarkups)
 {
     size_t length = 0;
 
index 4caf336..9970bec 100644 (file)
@@ -829,7 +829,7 @@ bool HTMLElement::isRecognizedTagName(const QualifiedName& tagName)
 
 // The terms inline and block are used here loosely.  Don't make the mistake of assuming all inlines or all blocks
 // need to be in these two lists.
-HashSet<AtomicStringImpl*>* inlineTagList()
+static HashSet<AtomicStringImpl*>* inlineTagList()
 {
     DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, tagList, ());
     if (tagList.isEmpty()) {
@@ -888,7 +888,7 @@ HashSet<AtomicStringImpl*>* inlineTagList()
     return &tagList;
 }
 
-HashSet<AtomicStringImpl*>* blockTagList()
+static HashSet<AtomicStringImpl*>* blockTagList()
 {
     DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, tagList, ());
     if (tagList.isEmpty()) {
@@ -1015,6 +1015,8 @@ HTMLFormElement* HTMLElement::virtualForm() const
 } // namespace WebCore
 
 #ifndef NDEBUG
+void dumpInnerHTML(WebCore::HTMLElement*);
+
 void dumpInnerHTML(WebCore::HTMLElement* element)
 {
     printf("%s\n", element->innerHTML().ascii().data());
index 265189b..8d9cabb 100644 (file)
@@ -199,7 +199,7 @@ void HTMLMediaElement::asyncEventTimerFired(Timer<HTMLMediaElement>*)
         dispatchEventForType(asyncEventsToDispatch[n], false, true);
 }
 
-String serializeTimeOffset(float time)
+static String serializeTimeOffset(float time)
 {
     String timeString = String::number(time);
     // FIXME serialize time offset values properly (format not specified yet)
@@ -207,7 +207,7 @@ String serializeTimeOffset(float time)
     return timeString;
 }
 
-float parseTimeOffset(const String& timeString, bool* ok = 0)
+static float parseTimeOffset(const String& timeString, bool* ok = 0)
 {
     const UChar* characters = timeString.characters();
     unsigned length = timeString.length();
index b566abb..5c14f33 100644 (file)
@@ -78,7 +78,7 @@ using namespace HTMLNames;
 
 // Either get cached regexp or build one that matches any of the labels.
 // The regexp we build is of the form:  (STR1|STR2|STRN)
-RegularExpression* regExpForLabels(NSArray* labels)
+static RegularExpression* regExpForLabels(NSArray* labels)
 {
     // All the ObjC calls in this method are simple array and string
     // calls which we can assume do not raise exceptions
index 697e73f..372a565 100644 (file)
@@ -195,16 +195,6 @@ void* ArenaAllocate(ArenaPool *pool, unsigned int nb)
     }
 } /* --- end ArenaAllocate() --- */
 
-void* ArenaGrow(ArenaPool *pool, void *p, unsigned int size, unsigned int incr)
-{
-    void *newp;
-    ARENA_ALLOCATE(newp, pool, size + incr);
-    if (newp)
-        memcpy(newp, p, size);
-    return newp;
-}
-
 /*
  * Free tail arenas linked after head, which may not be the true list head.
  * Reset pool->current to point to head in case it pointed at a tail arena.
@@ -255,19 +245,6 @@ static void FreeArenaList(ArenaPool *pool, Arena *head, bool reallyFree)
     pool->current = head;
 }
 
-void ArenaRelease(ArenaPool *pool, char *mark)
-{
-    Arena *a;
-
-    for (a = pool->first.next; a; a = a->next) {
-        if (UPTRDIFF(mark, a->base) < UPTRDIFF(a->avail, a->base)) {
-            a->avail = (uword)ARENA_ALIGN(pool, mark);
-            FreeArenaList(pool, a, false);
-            return;
-        }
-    }
-}
-
 void FreeArenaPool(ArenaPool *pool)
 {
     FreeArenaList(pool, &pool->first, false);
index 2f38b11..c7e11ee 100644 (file)
@@ -60,7 +60,7 @@ RGBA32 makeRGBA(int r, int g, int b, int a)
     return max(0, min(a, 255)) << 24 | max(0, min(r, 255)) << 16 | max(0, min(g, 255)) << 8 | max(0, min(b, 255));
 }
 
-int colorFloatToRGBAByte(float f)
+static int colorFloatToRGBAByte(float f)
 {
     // We use lroundf and 255 instead of nextafterf(256, 0) to match CG's rounding
     return max(0, min(static_cast<int>(lroundf(255.0f * f)), 255));
index 35eff9a..0b276cc 100644 (file)
@@ -61,7 +61,7 @@ void ImageSource::clear(bool, size_t, SharedBuffer* data, bool allDataReceived)
       setData(data, allDataReceived);
 }
 
-CFDictionaryRef imageSourceOptions()
+static CFDictionaryRef imageSourceOptions()
 {
     static CFDictionaryRef options;
     
index 232d049..ebd0359 100644 (file)
@@ -307,7 +307,7 @@ struct PathApplierInfo {
     PathApplierFunction function;
 };
 
-void CGPathApplierToPathApplier(void *info, const CGPathElement *element)
+static void CGPathApplierToPathApplier(void *info, const CGPathElement *element)
 {
     PathApplierInfo* pinfo = (PathApplierInfo*)info;
     FloatPoint points[3];
index 27c0091..30dbf97 100644 (file)
@@ -55,7 +55,7 @@ const float smallCapsFontSizeMultiplier = 0.7f;
 const float contextDPI = 72.0f;
 static inline float scaleEmToUnits(float x, unsigned unitsPerEm) { return x * (contextDPI / (contextDPI * unitsPerEm)); }
 
-bool initFontData(SimpleFontData* fontData)
+static bool initFontData(SimpleFontData* fontData)
 {
     if (!fontData->m_font.cgFont())
         return false;
index af7415d..8979124 100644 (file)
@@ -116,25 +116,6 @@ IntPoint globalPointForEvent(NSEvent *event)
     }
 }
 
-int eventNumberForEvent(NSEvent *event)
-{
-    switch ([event type]) {
-        case NSLeftMouseDown:
-        case NSLeftMouseUp:
-        case NSLeftMouseDragged:
-        case NSRightMouseDown:
-        case NSRightMouseUp:
-        case NSRightMouseDragged:
-        case NSOtherMouseDown:
-        case NSOtherMouseUp:
-        case NSOtherMouseDragged:
-        case NSMouseMoved:
-            return [event eventNumber];
-        default:
-            return 0;
-    }
-}
-    
 static MouseEventType mouseEventForNSEvent(NSEvent* event) 
 {
     switch ([event type]) {
index 2b547b7..42fe8f9 100644 (file)
@@ -848,6 +848,9 @@ PassRefPtr<SharedBuffer> utf8Buffer(const String& string)
 
 #ifndef NDEBUG
 // For debugging only -- leaks memory
+
+WebCore::String* string(const char*);
+
 WebCore::String* string(const char* s)
 {
     return new WebCore::String(s);
index 9b61c58..14d41b1 100644 (file)
@@ -1788,7 +1788,7 @@ void RenderBlock::paintEllipsisBoxes(PaintInfo& paintInfo, int tx, int ty)
     }
 }
 
-ContinuationOutlineTableMap* continuationOutlineTable()
+static ContinuationOutlineTableMap* continuationOutlineTable()
 {
     DEFINE_STATIC_LOCAL(ContinuationOutlineTableMap, table, ());
     return &table;
@@ -4487,7 +4487,7 @@ static RootInlineBox* getLineAtIndex(RenderBlock* block, int i, int& count)
     return 0;
 }
 
-int getHeightForLineCount(RenderBlock* block, int l, bool includeBottom, int& count)
+static int getHeightForLineCount(RenderBlock* block, int l, bool includeBottom, int& count)
 {
     if (block->style()->visibility() == VISIBLE) {
         if (block->childrenInline()) {
index 5732739..5296caf 100644 (file)
@@ -260,7 +260,7 @@ void RenderView::absoluteQuads(Vector<FloatQuad>& quads, bool)
     quads.append(FloatRect(0, 0, m_layer->width(), m_layer->height()));
 }
 
-RenderObject* rendererAfterPosition(RenderObject* object, unsigned offset)
+static RenderObject* rendererAfterPosition(RenderObject* object, unsigned offset)
 {
     if (!object)
         return 0;
index b4e83a1..6d42aa7 100644 (file)
@@ -342,7 +342,7 @@ RenderBlock* RootInlineBox::block() const
     return static_cast<RenderBlock*>(m_object);
 }
 
-bool isEditableLeaf(InlineBox* leaf)
+static bool isEditableLeaf(InlineBox* leaf)
 {
     return leaf && leaf->object() && leaf->object()->element() && leaf->object()->element()->isContentEditable();
 }
index 5a977bb..e46c20e 100644 (file)
@@ -88,7 +88,7 @@ TextStream& operator<<(TextStream& ts, const IntRect& r)
     return ts << "at (" << r.x() << "," << r.y() << ") size " << r.width() << "x" << r.height();
 }
 
-bool hasFractions(double val)
+static bool hasFractions(double val)
 {
     double epsilon = 0.0001;
     int ival = static_cast<int>(val);
index cbd2fc5..09445b9 100644 (file)
@@ -233,7 +233,7 @@ bool RenderStyle::inheritedNotEqual(RenderStyle* other) const
            rareInheritedData != other->rareInheritedData;
 }
 
-bool positionedObjectMoved(const LengthBox& a, const LengthBox& b)
+static bool positionedObjectMoved(const LengthBox& a, const LengthBox& b)
 {
     // If any unit types are different, then we can't guarantee
     // that this was just a movement.
index aaa7aa8..3dae585 100644 (file)
@@ -340,7 +340,7 @@ struct SVGTextRunWalkerMeasuredLengthData {
     const Font* font;
 };
 
-bool floatWidthUsingSVGFontCallback(const SVGGlyphIdentifier& identifier, SVGTextRunWalkerMeasuredLengthData& data)
+static bool floatWidthUsingSVGFontCallback(const SVGGlyphIdentifier& identifier, SVGTextRunWalkerMeasuredLengthData& data)
 {
     if (data.at >= data.from && data.at < data.to)
         data.length += identifier.horizontalAdvanceX * data.scale;
@@ -349,7 +349,7 @@ bool floatWidthUsingSVGFontCallback(const SVGGlyphIdentifier& identifier, SVGTex
     return data.at < data.to;
 }
 
-void floatWidthMissingGlyphCallback(const TextRun& run, SVGTextRunWalkerMeasuredLengthData& data)
+static void floatWidthMissingGlyphCallback(const TextRun& run, SVGTextRunWalkerMeasuredLengthData& data)
 {
     // Handle system font fallback
     FontDescription fontDescription(data.font->fontDescription());
@@ -442,13 +442,13 @@ struct SVGTextRunWalkerDrawTextData {
     Vector<UChar> fallbackCharacters;
 };
 
-bool drawTextUsingSVGFontCallback(const SVGGlyphIdentifier& identifier, SVGTextRunWalkerDrawTextData& data)
+static bool drawTextUsingSVGFontCallback(const SVGGlyphIdentifier& identifier, SVGTextRunWalkerDrawTextData& data)
 {
     data.glyphIdentifiers.append(identifier);
     return true;
 }
 
-void drawTextMissingGlyphCallback(const TextRun& run, SVGTextRunWalkerDrawTextData& data)
+static void drawTextMissingGlyphCallback(const TextRun& run, SVGTextRunWalkerDrawTextData& data)
 {
     ASSERT(run.length() == 1);
     data.glyphIdentifiers.append(SVGGlyphIdentifier());
index a006858..6dbfc1a 100644 (file)
@@ -55,7 +55,7 @@ TransformationMatrix SVGTransformable::getScreenCTM(const SVGElement* element) c
     return animatedLocalTransform() * ctm;
 }
 
-int parseTransformParamList(const UChar*& ptr, const UChar* end, float* values, int required, int optional)
+static int parseTransformParamList(const UChar*& ptr, const UChar* end, float* values, int required, int optional)
 {
     int optionalParams = 0, requiredParams = 0;
     
index 5a55b74..b06eca1 100644 (file)
@@ -49,7 +49,7 @@ using namespace std;
 
 namespace WebCore {
 
-TextStream& operator<<(TextStream& ts, GradientSpreadMethod m)
+static TextStream& operator<<(TextStream& ts, GradientSpreadMethod m)
 {
     switch (m) {
         case SpreadMethodPad:
@@ -63,7 +63,7 @@ TextStream& operator<<(TextStream& ts, GradientSpreadMethod m)
     return ts;
 }
 
-TextStream& operator<<(TextStream& ts, const Vector<SVGGradientStop>& l)
+static TextStream& operator<<(TextStream& ts, const Vector<SVGGradientStop>& l)
 {
     ts << "[";
     for (Vector<SVGGradientStop>::const_iterator it = l.begin(); it != l.end(); ++it) {
index 7b21038..15a859b 100644 (file)
@@ -68,8 +68,8 @@ using namespace XPath;
 
 %{
 
-int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval); }
-void xpathyyerror(const char*) { }
+static int xpathyylex(YYSTYPE* yylval) { return Parser::current()->lex(yylval); }
+static void xpathyyerror(const char*) { }
     
 %}
 
index d89f08b..069ddd8 100644 (file)
@@ -27,6 +27,7 @@
 #include "config.h"
 
 #if ENABLE(XSLT)
+#include "XSLTExtensions.h"
 
 #include <libxml/xpathInternals.h>