Commit d8dda094 authored by andersca@apple.com's avatar andersca@apple.com

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:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 48c6aaee
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.
......@@ -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;
......
......@@ -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);
}
......
......@@ -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);
......
......@@ -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;
......
......@@ -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.
......
......@@ -50,7 +50,7 @@ namespace Bindings {
using JSC::UString;
JSC::UString& globalExceptionString()
static JSC::UString& globalExceptionString()
{
DEFINE_STATIC_LOCAL(JSC::UString, exceptionStr, ());
return exceptionStr;
......
......@@ -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();
......
......@@ -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;
......
......@@ -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) {
......
......@@ -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;
......
......@@ -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";
......
......@@ -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)
......
......@@ -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);
}
......
......@@ -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();
......
......@@ -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);
......
......@@ -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;
......
......@@ -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());
......
......@@ -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();
......
......@@ -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
......
......@@ -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);
......
......@@ -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));
......
......@@ -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;
......
......@@ -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];
......
......@@ -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;
......
......@@ -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]) {
......
......@@ -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);
......
......@@ -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()) {
......
......@@ -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;
......
......@@ -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();
}
......
......@@ -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);
......
......@@ -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.
......
......@@ -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