diff options
Diffstat (limited to 'third_party/WebKit')
415 files changed, 1656 insertions, 1656 deletions
diff --git a/third_party/WebKit/Source/bindings/tests/idls/TestCustomAccessors.idl b/third_party/WebKit/Source/bindings/tests/idls/TestCustomAccessors.idl index f7aa6f1..28f2bd6 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/TestCustomAccessors.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/TestCustomAccessors.idl @@ -6,13 +6,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/bindings/tests/idls/TestObject.idl b/third_party/WebKit/Source/bindings/tests/idls/TestObject.idl index 61d4dfa..8152b66 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/TestObject.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/TestObject.idl @@ -108,11 +108,11 @@ callback TestCallbackFunction = void (TestEnumType formal1, TestObject formal2); [Custom, MeasureAs=CustomTestFeature] void customMethod(); [Custom] void customMethodWithArgs(long longArg, DOMString strArg, TestObject objArg); - void addEventListener(DOMString type, - EventListener listener, + void addEventListener(DOMString type, + EventListener listener, optional boolean useCapture); - void removeEventListener(DOMString type, - EventListener listener, + void removeEventListener(DOMString type, + EventListener listener, optional boolean useCapture); // 'CallWith' extended attribute @@ -184,7 +184,7 @@ callback TestCallbackFunction = void (TestEnumType formal1, TestObject formal2); readonly attribute any cachedAttribute1; readonly attribute any cachedAttribute2; - + attribute any anyAttribute; attribute TestCallbackFunction callbackFunctionAttribute; diff --git a/third_party/WebKit/Source/bindings/tests/idls/TestTypedefs.idl b/third_party/WebKit/Source/bindings/tests/idls/TestTypedefs.idl index 2f32c4d..ae3e58c 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/TestTypedefs.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/TestTypedefs.idl @@ -37,7 +37,7 @@ attribute ULONGLONG unsignedLongLongAttr; [Immutable] attribute SCRIPT_VALUE immutableSerializedScriptValue; - + static readonly attribute T TestSubObj; [StrictTypeChecking] void func(optional ARRAY_OF_LONGS x); diff --git a/third_party/WebKit/Source/bindings/v8/BindingSecurity.cpp b/third_party/WebKit/Source/bindings/v8/BindingSecurity.cpp index 92f0f10..0c7c0d1 100644 --- a/third_party/WebKit/Source/bindings/v8/BindingSecurity.cpp +++ b/third_party/WebKit/Source/bindings/v8/BindingSecurity.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/BindingSecurity.h b/third_party/WebKit/Source/bindings/v8/BindingSecurity.h index c8cb741..dedd2f1 100644 --- a/third_party/WebKit/Source/bindings/v8/BindingSecurity.h +++ b/third_party/WebKit/Source/bindings/v8/BindingSecurity.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.cpp b/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.cpp index 9127964..bb77bf1 100644 --- a/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.cpp +++ b/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.cpp @@ -223,7 +223,7 @@ void DOMWrapperWorld::clearIsolatedWorldContentSecurityPolicy(int worldID) isolatedWorldContentSecurityPolicies().remove(worldID); } -typedef HashMap<int, OwnPtr<V8DOMActivityLogger>, WTF::IntHash<int>, WTF::UnsignedWithZeroKeyHashTraits<int> > DOMActivityLoggerMap; +typedef HashMap<int, OwnPtr<V8DOMActivityLogger>, WTF::IntHash<int>, WTF::UnsignedWithZeroKeyHashTraits<int> > DOMActivityLoggerMap; static DOMActivityLoggerMap& domActivityLoggers() { ASSERT(isMainThread()); @@ -234,13 +234,13 @@ static DOMActivityLoggerMap& domActivityLoggers() void DOMWrapperWorld::setActivityLogger(int worldId, PassOwnPtr<V8DOMActivityLogger> logger) { domActivityLoggers().set(worldId, logger); -} +} V8DOMActivityLogger* DOMWrapperWorld::activityLogger(int worldId) { DOMActivityLoggerMap& loggers = domActivityLoggers(); - DOMActivityLoggerMap::iterator it = loggers.find(worldId); + DOMActivityLoggerMap::iterator it = loggers.find(worldId); return it == loggers.end() ? 0 : it->value.get(); -} +} } // namespace WebCore diff --git a/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.h b/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.h index 22128c6..849b865 100644 --- a/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.h +++ b/third_party/WebKit/Source/bindings/v8/DOMWrapperWorld.h @@ -88,7 +88,7 @@ public: bool isolatedWorldHasContentSecurityPolicy(); // Associate a logger with the world identified by worldId (worlId may be 0 - // identifying the main world). + // identifying the main world). static void setActivityLogger(int worldId, PassOwnPtr<V8DOMActivityLogger>); static V8DOMActivityLogger* activityLogger(int worldId); diff --git a/third_party/WebKit/Source/bindings/v8/DateExtension.cpp b/third_party/WebKit/Source/bindings/v8/DateExtension.cpp index 58d9e1d..d06983b 100644 --- a/third_party/WebKit/Source/bindings/v8/DateExtension.cpp +++ b/third_party/WebKit/Source/bindings/v8/DateExtension.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/DateExtension.h b/third_party/WebKit/Source/bindings/v8/DateExtension.h index 647f32a..daa98b2 100644 --- a/third_party/WebKit/Source/bindings/v8/DateExtension.h +++ b/third_party/WebKit/Source/bindings/v8/DateExtension.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/NPV8Object.cpp b/third_party/WebKit/Source/bindings/v8/NPV8Object.cpp index 621a99c..80f29f6 100644 --- a/third_party/WebKit/Source/bindings/v8/NPV8Object.cpp +++ b/third_party/WebKit/Source/bindings/v8/NPV8Object.cpp @@ -111,7 +111,7 @@ static v8::Local<v8::String> npIdentifierToV8Identifier(NPIdentifier name) NPObject* v8ObjectToNPObject(v8::Handle<v8::Object> object) { - return reinterpret_cast<NPObject*>(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)); + return reinterpret_cast<NPObject*>(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)); } NPObject* npCreateV8ScriptObject(NPP npp, v8::Handle<v8::Object> object, DOMWindow* root) @@ -382,7 +382,7 @@ bool _NPN_GetProperty(NPP npp, NPObject* npObject, NPIdentifier propertyName, NP v8::Handle<v8::Object> obj = v8::Local<v8::Object>::New(isolate, object->v8Object); v8::Local<v8::Value> v8result = obj->Get(npIdentifierToV8Identifier(propertyName)); - + if (v8result.IsEmpty()) return false; diff --git a/third_party/WebKit/Source/bindings/v8/PageScriptDebugServer.h b/third_party/WebKit/Source/bindings/v8/PageScriptDebugServer.h index 96a98a1..4ffbb76 100644 --- a/third_party/WebKit/Source/bindings/v8/PageScriptDebugServer.h +++ b/third_party/WebKit/Source/bindings/v8/PageScriptDebugServer.h @@ -62,7 +62,7 @@ public: private: PageScriptDebugServer(); virtual ~PageScriptDebugServer() { } - + virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Context>); virtual void runMessageLoopOnPause(v8::Handle<v8::Context>); virtual void quitMessageLoopOnPause(); diff --git a/third_party/WebKit/Source/bindings/v8/RetainedDOMInfo.cpp b/third_party/WebKit/Source/bindings/v8/RetainedDOMInfo.cpp index 01b3448..15a83f2 100644 --- a/third_party/WebKit/Source/bindings/v8/RetainedDOMInfo.cpp +++ b/third_party/WebKit/Source/bindings/v8/RetainedDOMInfo.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2011 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -65,7 +65,7 @@ intptr_t RetainedDOMInfo::GetHash() { return PtrHash<void*>::hash(m_root); } - + const char* RetainedDOMInfo::GetGroupLabel() { return m_root->inDocument() ? "(Document DOM trees)" : "(Detached DOM trees)"; diff --git a/third_party/WebKit/Source/bindings/v8/RetainedDOMInfo.h b/third_party/WebKit/Source/bindings/v8/RetainedDOMInfo.h index 6cdae5d..5270999 100644 --- a/third_party/WebKit/Source/bindings/v8/RetainedDOMInfo.h +++ b/third_party/WebKit/Source/bindings/v8/RetainedDOMInfo.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2011 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -49,7 +49,7 @@ public: virtual const char* GetLabel(); virtual intptr_t GetElementCount(); virtual intptr_t GetEquivalenceClass(); - + private: // V8 guarantees to keep RetainedObjectInfos alive only during a GC or heap snapshotting round, when renderer // doesn't get control. This allows us to use raw pointers. diff --git a/third_party/WebKit/Source/bindings/v8/RetainedObjectInfo.h b/third_party/WebKit/Source/bindings/v8/RetainedObjectInfo.h index 0368fb1..6593bfd 100644 --- a/third_party/WebKit/Source/bindings/v8/RetainedObjectInfo.h +++ b/third_party/WebKit/Source/bindings/v8/RetainedObjectInfo.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2011 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.cpp b/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.cpp index d6c9d62..22de5f8 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.cpp +++ b/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.cpp @@ -1,10 +1,10 @@ /* * Copyright (c) 2010 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.h b/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.h index c729cc2..54ae6fa 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.h +++ b/third_party/WebKit/Source/bindings/v8/ScriptCallStackFactory.h @@ -1,10 +1,10 @@ /* * Copyright (c) 2010 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/v8/ScriptController.cpp index 18e21cc..396b022 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptController.cpp +++ b/third_party/WebKit/Source/bindings/v8/ScriptController.cpp @@ -649,7 +649,7 @@ bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url) if (!locationChangeBefore && m_frame->navigationScheduler()->locationChangePending()) return true; - + // DocumentWriter::replaceDocument can cause the DocumentLoader to get deref'ed and possible destroyed, // so protect it with a RefPtr. if (RefPtr<DocumentLoader> loader = m_frame->document()->loader()) diff --git a/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.cpp b/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.cpp index 7ed6fcc..b78118b 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.cpp +++ b/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.cpp @@ -416,7 +416,7 @@ static ScriptDebugServer* toScriptDebugServer(v8::Handle<v8::Value> data) void ScriptDebugServer::breakProgramCallback(const v8::FunctionCallbackInfo<v8::Value>& args) { ASSERT(2 == args.Length()); - + ScriptDebugServer* thisPtr = toScriptDebugServer(args.Data()); v8::Handle<v8::Value> exception; v8::Handle<v8::Array> hitBreakpoints; diff --git a/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.h b/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.h index dd8189e..0b188da 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.h +++ b/third_party/WebKit/Source/bindings/v8/ScriptDebugServer.h @@ -103,7 +103,7 @@ public: protected: explicit ScriptDebugServer(v8::Isolate*); virtual ~ScriptDebugServer(); - + ScriptValue currentCallFrame(); virtual ScriptDebugListener* getDebugListenerForContext(v8::Handle<v8::Context>) = 0; @@ -133,7 +133,7 @@ protected: ScopedPersistent<v8::FunctionTemplate> m_breakProgramCallbackTemplate; HashMap<String, OwnPtr<ScopedPersistent<v8::Script> > > m_compiledScripts; v8::Isolate* m_isolate; - + private: PassRefPtr<JavaScriptCallFrame> wrapCallFrames(v8::Handle<v8::Object> executionState, int maximumLimit); diff --git a/third_party/WebKit/Source/bindings/v8/ScriptGCEvent.cpp b/third_party/WebKit/Source/bindings/v8/ScriptGCEvent.cpp index 189a074..50b2d8f 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptGCEvent.cpp +++ b/third_party/WebKit/Source/bindings/v8/ScriptGCEvent.cpp @@ -106,6 +106,6 @@ void ScriptGCEvent::gcEpilogueCallback(v8::GCType type, v8::GCCallbackFlags flag (*i)->didGC(gcEventData->startTime(), endTime, collectedBytes); gcEventData->clear(); } - + } // namespace WebCore diff --git a/third_party/WebKit/Source/bindings/v8/ScriptInstance.cpp b/third_party/WebKit/Source/bindings/v8/ScriptInstance.cpp index 8248fa4..961e4a9 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptInstance.cpp +++ b/third_party/WebKit/Source/bindings/v8/ScriptInstance.cpp @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/ScriptInstance.h b/third_party/WebKit/Source/bindings/v8/ScriptInstance.h index 2fee44c..0b8fc98 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptInstance.h +++ b/third_party/WebKit/Source/bindings/v8/ScriptInstance.h @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h b/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h index cff6050..4e69421 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h +++ b/third_party/WebKit/Source/bindings/v8/ScriptSourceCode.h @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/ScriptState.h b/third_party/WebKit/Source/bindings/v8/ScriptState.h index a48122e..16a4a4a 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptState.h +++ b/third_party/WebKit/Source/bindings/v8/ScriptState.h @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/ScriptValue.cpp b/third_party/WebKit/Source/bindings/v8/ScriptValue.cpp index 6ac72a1..dd41b0d 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptValue.cpp +++ b/third_party/WebKit/Source/bindings/v8/ScriptValue.cpp @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/ScriptValue.h b/third_party/WebKit/Source/bindings/v8/ScriptValue.h index 7fc2a09..bfbc636 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptValue.h +++ b/third_party/WebKit/Source/bindings/v8/ScriptValue.h @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -39,8 +39,8 @@ #include "wtf/Vector.h" #include "wtf/text/WTFString.h" -#ifndef NDEBUG -#include "bindings/v8/V8GCController.h" +#ifndef NDEBUG +#include "bindings/v8/V8GCController.h" #endif namespace WTF { @@ -72,7 +72,7 @@ public: static ScriptValue createNull() { return ScriptValue(v8::Null()); } - ScriptValue& operator=(const ScriptValue& value) + ScriptValue& operator=(const ScriptValue& value) { if (this != &value) m_value = value.m_value; diff --git a/third_party/WebKit/Source/bindings/v8/ScriptWrappable.h b/third_party/WebKit/Source/bindings/v8/ScriptWrappable.h index 2a77062..6832a61 100644 --- a/third_party/WebKit/Source/bindings/v8/ScriptWrappable.h +++ b/third_party/WebKit/Source/bindings/v8/ScriptWrappable.h @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/v8/V8Binding.cpp index 59dde88..fcbc7de 100644 --- a/third_party/WebKit/Source/bindings/v8/V8Binding.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8Binding.cpp @@ -373,7 +373,7 @@ v8::Handle<v8::FunctionTemplate> createRawTemplate(v8::Isolate* isolate) v8::HandleScope scope(isolate); v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(V8ObjectConstructor::isValidConstructorMode); return scope.Close(result); -} +} PassRefPtr<DOMStringList> toDOMStringList(v8::Handle<v8::Value> value, v8::Isolate* isolate) { diff --git a/third_party/WebKit/Source/bindings/v8/V8DOMActivityLogger.h b/third_party/WebKit/Source/bindings/v8/V8DOMActivityLogger.h index bfb7e75..93915a6 100644 --- a/third_party/WebKit/Source/bindings/v8/V8DOMActivityLogger.h +++ b/third_party/WebKit/Source/bindings/v8/V8DOMActivityLogger.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/V8DOMWrapper.h b/third_party/WebKit/Source/bindings/v8/V8DOMWrapper.h index 8fbfe9c..035524e 100644 --- a/third_party/WebKit/Source/bindings/v8/V8DOMWrapper.h +++ b/third_party/WebKit/Source/bindings/v8/V8DOMWrapper.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/V8GCController.cpp b/third_party/WebKit/Source/bindings/v8/V8GCController.cpp index 568ebdb..95a5751 100644 --- a/third_party/WebKit/Source/bindings/v8/V8GCController.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8GCController.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/V8GCController.h b/third_party/WebKit/Source/bindings/v8/V8GCController.h index e53258b..b0aa802 100644 --- a/third_party/WebKit/Source/bindings/v8/V8GCController.h +++ b/third_party/WebKit/Source/bindings/v8/V8GCController.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.cpp b/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.cpp index 1ad8aba..a4c58fd 100644 --- a/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2010 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.h b/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.h index 2bf8fb2..ae338a6 100644 --- a/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.h +++ b/third_party/WebKit/Source/bindings/v8/V8GCForContextDispose.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2010 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/V8HiddenPropertyName.cpp b/third_party/WebKit/Source/bindings/v8/V8HiddenPropertyName.cpp index dd53f10..2da72d3 100644 --- a/third_party/WebKit/Source/bindings/v8/V8HiddenPropertyName.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8HiddenPropertyName.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/V8Initializer.h b/third_party/WebKit/Source/bindings/v8/V8Initializer.h index a73cb7d..5ff4ecd 100644 --- a/third_party/WebKit/Source/bindings/v8/V8Initializer.h +++ b/third_party/WebKit/Source/bindings/v8/V8Initializer.h @@ -35,7 +35,7 @@ public: static void initializeMainThreadIfNeeded(v8::Isolate*); static void initializeWorker(v8::Isolate*); }; - + } // namespace WebCore #endif // V8Initializer_h diff --git a/third_party/WebKit/Source/bindings/v8/V8ObjectConstructor.cpp b/third_party/WebKit/Source/bindings/v8/V8ObjectConstructor.cpp index 9b20421..be00a832 100644 --- a/third_party/WebKit/Source/bindings/v8/V8ObjectConstructor.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8ObjectConstructor.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2012 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -9,7 +9,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/third_party/WebKit/Source/bindings/v8/V8PerContextData.cpp b/third_party/WebKit/Source/bindings/v8/V8PerContextData.cpp index c2edd8d..9edbdbc 100644 --- a/third_party/WebKit/Source/bindings/v8/V8PerContextData.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8PerContextData.cpp @@ -152,13 +152,13 @@ CustomElementBinding* V8PerContextData::customElementBinding(CustomElementDefini } -static v8::Handle<v8::Value> createDebugData(const char* worldName, int debugId) +static v8::Handle<v8::Value> createDebugData(const char* worldName, int debugId) { char buffer[32]; unsigned wanted; if (debugId == -1) wanted = snprintf(buffer, sizeof(buffer), "%s", worldName); - else + else wanted = snprintf(buffer, sizeof(buffer), "%s,%d", worldName, debugId); if (wanted < sizeof(buffer)) @@ -179,7 +179,7 @@ static void setDebugData(v8::Handle<v8::Context> context, v8::Handle<v8::Value> context->SetEmbedderData(v8ContextDebugIdIndex, value); } -bool V8PerContextDebugData::setContextDebugData(v8::Handle<v8::Context> context, const char* worldName, int debugId) +bool V8PerContextDebugData::setContextDebugData(v8::Handle<v8::Context> context, const char* worldName, int debugId) { if (!debugData(context)->IsUndefined()) return false; @@ -189,7 +189,7 @@ bool V8PerContextDebugData::setContextDebugData(v8::Handle<v8::Context> context, return true; } -int V8PerContextDebugData::contextDebugId(v8::Handle<v8::Context> context) +int V8PerContextDebugData::contextDebugId(v8::Handle<v8::Context> context) { v8::HandleScope scope; v8::Handle<v8::Value> data = debugData(context); diff --git a/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.cpp b/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.cpp index c563200..11bb709 100644 --- a/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.cpp @@ -64,10 +64,10 @@ V8PerIsolateData* V8PerIsolateData::create(v8::Isolate* isolate) return data; } -void V8PerIsolateData::ensureInitialized(v8::Isolate* isolate) +void V8PerIsolateData::ensureInitialized(v8::Isolate* isolate) { ASSERT(isolate); - if (!isolate->GetData()) + if (!isolate->GetData()) create(isolate); } diff --git a/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.h b/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.h index 5423e7d..830ae6e 100644 --- a/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.h +++ b/third_party/WebKit/Source/bindings/v8/V8PerIsolateData.h @@ -59,7 +59,7 @@ public: { ASSERT(isolate); ASSERT(isolate->GetData()); - return static_cast<V8PerIsolateData*>(isolate->GetData()); + return static_cast<V8PerIsolateData*>(isolate->GetData()); } static void dispose(v8::Isolate*); @@ -94,7 +94,7 @@ public: V8HiddenPropertyName* hiddenPropertyName() { return m_hiddenPropertyName.get(); } - void registerDOMDataStore(DOMDataStore* domDataStore) + void registerDOMDataStore(DOMDataStore* domDataStore) { ASSERT(m_domDataList.find(domDataStore) == notFound); m_domDataList.append(domDataStore); diff --git a/third_party/WebKit/Source/bindings/v8/V8StringResource.h b/third_party/WebKit/Source/bindings/v8/V8StringResource.h index a54b86d..31f1781 100644 --- a/third_party/WebKit/Source/bindings/v8/V8StringResource.h +++ b/third_party/WebKit/Source/bindings/v8/V8StringResource.h @@ -251,7 +251,7 @@ template<> inline bool V8StringResource<WithUndefinedOrNullCheck>::prepare() } return prepareBase(); } - + } // namespace WebCore #endif // V8StringResource_h diff --git a/third_party/WebKit/Source/bindings/v8/V8ThrowException.cpp b/third_party/WebKit/Source/bindings/v8/V8ThrowException.cpp index 507507b..5533108 100644 --- a/third_party/WebKit/Source/bindings/v8/V8ThrowException.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8ThrowException.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -9,7 +9,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/third_party/WebKit/Source/bindings/v8/V8ThrowException.h b/third_party/WebKit/Source/bindings/v8/V8ThrowException.h index ea12306..6f3ed2d 100644 --- a/third_party/WebKit/Source/bindings/v8/V8ThrowException.h +++ b/third_party/WebKit/Source/bindings/v8/V8ThrowException.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -9,7 +9,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE diff --git a/third_party/WebKit/Source/bindings/v8/V8Utilities.cpp b/third_party/WebKit/Source/bindings/v8/V8Utilities.cpp index 33c07f1..9978fc5 100644 --- a/third_party/WebKit/Source/bindings/v8/V8Utilities.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8Utilities.cpp @@ -138,7 +138,7 @@ void removeHiddenDependency(v8::Handle<v8::Object> object, v8::Local<v8::Value> } } } - + void transferHiddenDependency(v8::Handle<v8::Object> object, EventListener* oldValue, v8::Local<v8::Value> newValue, int cacheIndex, v8::Isolate* isolate) { if (oldValue) { diff --git a/third_party/WebKit/Source/bindings/v8/V8Utilities.h b/third_party/WebKit/Source/bindings/v8/V8Utilities.h index b7f272e..425df2d 100644 --- a/third_party/WebKit/Source/bindings/v8/V8Utilities.h +++ b/third_party/WebKit/Source/bindings/v8/V8Utilities.h @@ -57,10 +57,10 @@ namespace WebCore { typedef WTF::Vector<RefPtr<ArrayBuffer>, 1> ArrayBufferArray; // Helper function which pulls the values out of a JS sequence and into a MessagePortArray. - // Also validates the elements per sections 4.1.13 and 4.1.15 of the WebIDL spec and section 8.3.3 + // Also validates the elements per sections 4.1.13 and 4.1.15 of the WebIDL spec and section 8.3.3 // of the HTML5 spec and generates exceptions as appropriate. // Returns true if the array was filled, or false if the passed value was not of an appropriate type. - bool extractTransferables(v8::Local<v8::Value>, MessagePortArray&, ArrayBufferArray&, v8::Isolate*); + bool extractTransferables(v8::Local<v8::Value>, MessagePortArray&, ArrayBufferArray&, v8::Isolate*); bool getMessagePortArray(v8::Local<v8::Value>, MessagePortArray&, v8::Isolate*); } // namespace WebCore diff --git a/third_party/WebKit/Source/bindings/v8/V8ValueCache.cpp b/third_party/WebKit/Source/bindings/v8/V8ValueCache.cpp index 7e20131..8c2be0f 100644 --- a/third_party/WebKit/Source/bindings/v8/V8ValueCache.cpp +++ b/third_party/WebKit/Source/bindings/v8/V8ValueCache.cpp @@ -56,7 +56,7 @@ void StringCache::makeWeakCallback(v8::Isolate* isolate, v8::Persistent<v8::Stri stringImpl->deref(); } -void StringCache::remove(StringImpl* stringImpl) +void StringCache::remove(StringImpl* stringImpl) { ASSERT(m_stringCache.contains(stringImpl)); m_stringCache.remove(stringImpl); diff --git a/third_party/WebKit/Source/bindings/v8/V8ValueCache.h b/third_party/WebKit/Source/bindings/v8/V8ValueCache.h index e7eb52d..69123a6 100644 --- a/third_party/WebKit/Source/bindings/v8/V8ValueCache.h +++ b/third_party/WebKit/Source/bindings/v8/V8ValueCache.h @@ -56,7 +56,7 @@ public: setReturnValueFromStringSlow(info, stringImpl, isolate); } - void clearOnGC() + void clearOnGC() { m_lastStringImpl = 0; m_lastV8String.clear(); diff --git a/third_party/WebKit/Source/bindings/v8/WorkerScriptDebugServer.cpp b/third_party/WebKit/Source/bindings/v8/WorkerScriptDebugServer.cpp index c2aaa0d..73a085f 100644 --- a/third_party/WebKit/Source/bindings/v8/WorkerScriptDebugServer.cpp +++ b/third_party/WebKit/Source/bindings/v8/WorkerScriptDebugServer.cpp @@ -64,7 +64,7 @@ void WorkerScriptDebugServer::addListener(ScriptDebugListener* listener) v8::Local<v8::Object> debuggerScript = m_debuggerScript.newLocal(m_isolate); ASSERT(!debuggerScript->IsUndefined()); v8::Debug::SetDebugEventListener2(&WorkerScriptDebugServer::v8DebugEventCallback, v8::External::New(this)); - + v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(debuggerScript->Get(v8::String::NewSymbol("getWorkerScripts"))); v8::Handle<v8::Value> value = V8ScriptRunner::callInternalFunction(getScriptsFunction, debuggerScript, 0, 0, m_isolate); if (value.IsEmpty()) @@ -101,7 +101,7 @@ void WorkerScriptDebugServer::runMessageLoopOnPause(v8::Handle<v8::Context>) result = m_workerGlobalScope->thread()->runLoop().runInMode(m_workerGlobalScope, m_debuggerTaskMode); // Keep waiting until execution is resumed. } while (result == MessageQueueMessageReceived && isPaused()); - + // The listener may have been removed in the nested loop. if (m_listener) m_listener->didContinue(); diff --git a/third_party/WebKit/Source/bindings/v8/WrapperTypeInfo.h b/third_party/WebKit/Source/bindings/v8/WrapperTypeInfo.h index 3999eca..5d7fd15 100644 --- a/third_party/WebKit/Source/bindings/v8/WrapperTypeInfo.h +++ b/third_party/WebKit/Source/bindings/v8/WrapperTypeInfo.h @@ -34,7 +34,7 @@ #include <v8.h> namespace WebCore { - + class ActiveDOMObject; class DOMDataStore; class EventTarget; @@ -76,8 +76,8 @@ namespace WebCore { { return reinterpret_cast<WrapperTypeInfo*>(v8::External::Cast(*typeInfoWrapper)->Value()); } - - + + bool equals(const WrapperTypeInfo* that) const { return this == that; @@ -92,15 +92,15 @@ namespace WebCore { return false; } - + v8::Handle<v8::FunctionTemplate> getTemplate(v8::Isolate* isolate, WrapperWorldType worldType) { return getTemplateFunction(isolate, worldType); } - + void derefObject(void* object) { - if (derefObjectFunction) + if (derefObjectFunction) derefObjectFunction(object); } - + void installPerContextPrototypeProperties(v8::Handle<v8::Object> proto, v8::Isolate* isolate) { if (installPerContextPrototypePropertiesFunction) diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp index d15ab4d..b5ede7c 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp @@ -48,7 +48,7 @@ void V8AudioBufferSourceNode::bufferAttrSetterCustom(v8::Local<v8::String> name, return; } } - + if (!buffer) { throwTypeError("Value is not of type AudioBuffer", info.GetIsolate()); return; diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8AudioContextCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8AudioContextCustom.cpp index b9c84ff..99c8174 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8AudioContextCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8AudioContextCustom.cpp @@ -46,7 +46,7 @@ void V8AudioContext::constructorCustom(const v8::FunctionCallbackInfo<v8::Value> Document* document = currentDocument(); RefPtr<AudioContext> audioContext; - + if (!args.Length()) { // Constructor for default AudioContext which talks to audio hardware. audioContext = AudioContext::create(document); @@ -68,7 +68,7 @@ void V8AudioContext::constructorCustom(const v8::FunctionCallbackInfo<v8::Value> throwError(v8SyntaxError, "Error creating AudioContext", args.GetIsolate()); return; } - + // Transform the holder into a wrapper object for the audio context. v8::Handle<v8::Object> wrapper = args.Holder(); V8DOMWrapper::associateObjectWithWrapper<V8AudioContext>(audioContext.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8BiquadFilterNodeCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8BiquadFilterNodeCustom.cpp index ccd5c35..a72e5a2 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8BiquadFilterNodeCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8BiquadFilterNodeCustom.cpp @@ -53,7 +53,7 @@ void V8BiquadFilterNode::typeAttrSetterCustom(v8::Local<v8::String> name, v8::Lo return; } } - + throwTypeError("Illegal BiquadFilterNode type", info.GetIsolate()); } diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp index a079037..8166350 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp index 2d9fa2e..78f8e99 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp @@ -1,10 +1,10 @@ /* * Copyright (c) 2009, 2012 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8CustomXPathNSResolver.h b/third_party/WebKit/Source/bindings/v8/custom/V8CustomXPathNSResolver.h index 21531d82..3ddceae 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8CustomXPathNSResolver.h +++ b/third_party/WebKit/Source/bindings/v8/custom/V8CustomXPathNSResolver.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp index 71d75c5..0327c01 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLCollectionCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLCollectionCustom.cpp index b03ed2b..33fd4ca 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLCollectionCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLCollectionCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp index f2e5af5..4710333 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFrameElementCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFrameElementCustom.cpp index 689d6a0..f589ef9 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFrameElementCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLFrameElementCustom.cpp @@ -38,7 +38,7 @@ namespace WebCore { -using namespace HTMLNames; +using namespace HTMLNames; void V8HTMLFrameElement::locationAttrSetterCustom(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info) { diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLLinkElementCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLLinkElementCustom.cpp index b305380..c3b1f4e 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLLinkElementCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLLinkElementCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2011 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLMediaElementCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLMediaElementCustom.cpp index eb2c91e..089253d 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLMediaElementCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLMediaElementCustom.cpp @@ -43,7 +43,7 @@ void V8HTMLMediaElement::controllerAttrSetterCustom(v8::Local<v8::String>, v8::L } // 4.8.10.11.2 Media controllers: controller attribute. - // On setting, it must first remove the element's mediagroup attribute, if any, + // On setting, it must first remove the element's mediagroup attribute, if any, HTMLMediaElement* imp = V8HTMLMediaElement::toNative(info.Holder()); imp->setMediaGroup(String()); // and then set the current media controller to the given value. diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp index 7392172..90607e6 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp index 44db801..2eb0188 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. -* +* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: -* +* * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. -* +* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp index aee1ff5a..7a1b3d9 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLSelectElementCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLSelectElementCustom.h b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLSelectElementCustom.h index daaf224..9f29386 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8HTMLSelectElementCustom.h +++ b/third_party/WebKit/Source/bindings/v8/custom/V8HTMLSelectElementCustom.h @@ -1,11 +1,11 @@ /* * Copyright (c) 2008, 2009 Google Inc. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -15,7 +15,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8MessageChannelCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8MessageChannelCustom.cpp index e865215..3d2364a 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8MessageChannelCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8MessageChannelCustom.cpp @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp index c80d847..efb9208 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8NodeListCustom.cpp @@ -29,7 +29,7 @@ */ #include "config.h" -#include "V8NodeList.h" +#include "V8NodeList.h" #include "V8Node.h" #include "bindings/v8/V8Binding.h" diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp index c1e892b..f98ddab 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp @@ -53,7 +53,7 @@ void V8OscillatorNode::typeAttrSetterCustom(v8::Local<v8::String> name, v8::Loca return; } } - + throwTypeError("Illegal OscillatorNode type", info.GetIsolate()); } diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp index 00b9c62..66f89a9 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8PannerNodeCustom.cpp @@ -53,7 +53,7 @@ void V8PannerNode::panningModelAttrSetterCustom(v8::Local<v8::String> name, v8:: return; } } - + throwTypeError("Illegal panningModel", info.GetIsolate()); } @@ -77,7 +77,7 @@ void V8PannerNode::distanceModelAttrSetterCustom(v8::Local<v8::String> name, v8: return; } } - + throwTypeError("Illegal distanceModel", info.GetIsolate()); } diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp index 821948c..01c452c 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8SQLResultSetRowListCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8SVGLengthCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8SVGLengthCustom.cpp index 24f7524..ec2f771 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8SVGLengthCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8SVGLengthCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "config.h" #include "V8SVGLength.h" diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp index 8cd482f..b853ddd 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8TrackEventCustom.cpp @@ -42,7 +42,7 @@ void V8TrackEvent::trackAttrGetterCustom(v8::Local<v8::String> name, const v8::P { TrackEvent* trackEvent = V8TrackEvent::toNative(info.Holder()); TrackBase* track = trackEvent->track(); - + if (!track) { v8SetReturnValueNull(info); return; @@ -53,7 +53,7 @@ void V8TrackEvent::trackAttrGetterCustom(v8::Local<v8::String> name, const v8::P // This should never happen. ASSERT_NOT_REACHED(); break; - + case TrackBase::TextTrack: v8SetReturnValue(info, toV8Fast(static_cast<TextTrack*>(track), info, trackEvent)); return; diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp index fa3532e..8b0783e 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -729,7 +729,7 @@ static void uniformMatrixHelper(const v8::FunctionCallbackInfo<v8::Value>& args, } bool ok = false; WebGLUniformLocation* location = toWebGLUniformLocation(args[0], ok, args.GetIsolate()); - + bool transpose = args[1]->BooleanValue(); if (V8Float32Array::HasInstance(args[2], args.GetIsolate(), worldType(args.GetIsolate()))) { Float32Array* array = V8Float32Array::toNative(args[2]->ToObject()); diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp index a5196e7..4302221 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp @@ -154,7 +154,7 @@ void V8XMLHttpRequest::openMethodCustom(const v8::FunctionCallbackInfo<v8::Value if (args.Length() >= 4 && !args[3]->IsUndefined()) { String user = toWebCoreStringWithNullCheck(args[3]); - + if (args.Length() >= 5 && !args[4]->IsUndefined()) { String passwd = toWebCoreStringWithNullCheck(args[4]); xmlHttpRequest->open(method, url, async, user, passwd, es); diff --git a/third_party/WebKit/Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp b/third_party/WebKit/Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp index 509c504..46b40ff 100644 --- a/third_party/WebKit/Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp +++ b/third_party/WebKit/Source/bindings/v8/custom/V8XSLTProcessorCustom.cpp @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/config.h b/third_party/WebKit/Source/config.h index ea83ceb..1e70840 100644 --- a/third_party/WebKit/Source/config.h +++ b/third_party/WebKit/Source/config.h @@ -17,7 +17,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - */ + */ #include <wtf/Platform.h> diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.idl b/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.idl index d291769..bfb130d 100644 --- a/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.idl +++ b/third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.idl @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ @@ -30,11 +30,11 @@ readonly attribute DeviceAcceleration accelerationIncludingGravity; readonly attribute DeviceRotationRate rotationRate; readonly attribute double? interval; - [Custom] void initDeviceMotionEvent([Default=Undefined] optional DOMString type, - [Default=Undefined] optional boolean bubbles, - [Default=Undefined] optional boolean cancelable, - [Default=Undefined] optional Acceleration acceleration, - [Default=Undefined] optional Acceleration accelerationIncludingGravity, - [Default=Undefined] optional RotationRate rotationRate, + [Custom] void initDeviceMotionEvent([Default=Undefined] optional DOMString type, + [Default=Undefined] optional boolean bubbles, + [Default=Undefined] optional boolean cancelable, + [Default=Undefined] optional Acceleration acceleration, + [Default=Undefined] optional Acceleration accelerationIncludingGravity, + [Default=Undefined] optional RotationRate rotationRate, [Default=Undefined] optional double interval); }; diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.idl b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.idl index 286f2bb..00e9d04 100644 --- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.idl +++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.idl @@ -28,11 +28,11 @@ interface DeviceOrientationEvent : Event { readonly attribute double? beta; readonly attribute double? gamma; readonly attribute boolean? absolute; - [Custom] void initDeviceOrientationEvent([Default=Undefined] optional DOMString type, - [Default=Undefined] optional boolean bubbles, - [Default=Undefined] optional boolean cancelable, - [Default=Undefined] optional double alpha, - [Default=Undefined] optional double beta, + [Custom] void initDeviceOrientationEvent([Default=Undefined] optional DOMString type, + [Default=Undefined] optional boolean bubbles, + [Default=Undefined] optional boolean cancelable, + [Default=Undefined] optional double alpha, + [Default=Undefined] optional double beta, [Default=Undefined] optional double gamma, [Default=Undefined] optional boolean absolute); }; diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.cpp index 8839d21..a6924d5 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.cpp +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.h b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.h index 5ddbd14..20f769a 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.h +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef MediaKeyMessageEvent_h diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.idl b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.idl index 513b910..4b12d9b 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.idl +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyMessageEvent.idl @@ -20,13 +20,13 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ Conditional=ENCRYPTED_MEDIA_V2, EnabledAtRuntime=encryptedMedia, - ConstructorTemplate=Event + ConstructorTemplate=Event ] interface MediaKeyMessageEvent : Event { readonly attribute Uint8Array message; [InitializedByEventConstructor] readonly attribute DOMString destinationURL; diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.cpp index c426ca0..07561fa 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.cpp +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.h b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.h index 6adea69..8eb372d 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.h +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef MediaKeyNeededEvent_h diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.idl b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.idl index 0c1b42b..82f72f8 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.idl +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyNeededEvent.idl @@ -20,13 +20,13 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ Conditional=ENCRYPTED_MEDIA_V2, EnabledAtRuntime=encryptedMedia, - ConstructorTemplate=Event + ConstructorTemplate=Event ] interface MediaKeyNeededEvent : Event { readonly attribute Uint8Array initData; }; diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.idl b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.idl index 3afc689..a353455 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.idl +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.idl @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ @@ -37,7 +37,7 @@ // session operations [RaisesException] void update(Uint8Array key); void close(); - + // EventListeners [EnabledAtRuntime=encryptedMedia] attribute EventListener onwebkitkeyadded; [EnabledAtRuntime=encryptedMedia] attribute EventListener onwebkitkeyerror; diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.idl b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.idl index e3f0d2c..63cfe05 100644 --- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.idl +++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.idl @@ -20,9 +20,9 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ Conditional=ENCRYPTED_MEDIA_V2, EnabledAtRuntime=encryptedMedia, diff --git a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h index 28b7cef..9c73548 100644 --- a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h +++ b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ diff --git a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.idl b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.idl index d98cfdc..f4a25bc 100644 --- a/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.idl +++ b/third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.idl @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ diff --git a/third_party/WebKit/Source/modules/geolocation/Coordinates.cpp b/third_party/WebKit/Source/modules/geolocation/Coordinates.cpp index 190a6ee..04dfe09 100644 --- a/third_party/WebKit/Source/modules/geolocation/Coordinates.cpp +++ b/third_party/WebKit/Source/modules/geolocation/Coordinates.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -63,5 +63,5 @@ double Coordinates::speed(bool& isNull) const isNull = true; return 0; } - + } // namespace WebCore diff --git a/third_party/WebKit/Source/modules/geolocation/Coordinates.h b/third_party/WebKit/Source/modules/geolocation/Coordinates.h index a620649..50587db 100644 --- a/third_party/WebKit/Source/modules/geolocation/Coordinates.h +++ b/third_party/WebKit/Source/modules/geolocation/Coordinates.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Coordinates_h @@ -73,13 +73,13 @@ private: double m_altitudeAccuracy; double m_heading; double m_speed; - + bool m_canProvideAltitude; bool m_canProvideAltitudeAccuracy; bool m_canProvideHeading; bool m_canProvideSpeed; }; - + } // namespace WebCore #endif // Coordinates_h diff --git a/third_party/WebKit/Source/modules/geolocation/Coordinates.idl b/third_party/WebKit/Source/modules/geolocation/Coordinates.idl index b5a07d7..ed2b8bf 100644 --- a/third_party/WebKit/Source/modules/geolocation/Coordinates.idl +++ b/third_party/WebKit/Source/modules/geolocation/Coordinates.idl @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp index d482e55..17a7b27 100644 --- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp +++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp @@ -22,7 +22,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -50,8 +50,8 @@ static PassRefPtr<Geoposition> createGeoposition(GeolocationPosition* position) { if (!position) return 0; - - RefPtr<Coordinates> coordinates = Coordinates::create(position->latitude(), position->longitude(), position->canProvideAltitude(), position->altitude(), + + RefPtr<Coordinates> coordinates = Coordinates::create(position->latitude(), position->longitude(), position->canProvideAltitude(), position->altitude(), position->accuracy(), position->canProvideAltitudeAccuracy(), position->altitudeAccuracy(), position->canProvideHeading(), position->heading(), position->canProvideSpeed(), position->speed()); return Geoposition::create(coordinates.release(), convertSecondsToDOMTimeStamp(position->timestamp())); @@ -424,7 +424,7 @@ void Geolocation::clearWatch(int watchID) if (GeoNotifier* notifier = m_watchers.find(watchID)) m_pendingForPermissionNotifiers.remove(notifier); m_watchers.remove(watchID); - + if (!hasListeners()) stopUpdating(); } @@ -437,7 +437,7 @@ void Geolocation::setIsAllowed(bool allowed) // This may be due to either a new position from the service, or a cached // position. m_allowGeolocation = allowed ? Yes : No; - + // Permission request was made during the startRequest process if (!m_pendingForPermissionNotifiers.isEmpty()) { handlePendingPermissionNotifiers(); @@ -467,7 +467,7 @@ void Geolocation::sendError(GeoNotifierVector& notifiers, PositionError* error) GeoNotifierVector::const_iterator end = notifiers.end(); for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it) { RefPtr<GeoNotifier> notifier = *it; - + notifier->runErrorCallback(error); } } @@ -490,7 +490,7 @@ void Geolocation::stopTimersForOneShots() { GeoNotifierVector copy; copyToVector(m_oneShots, copy); - + stopTimer(copy); } @@ -498,7 +498,7 @@ void Geolocation::stopTimersForWatchers() { GeoNotifierVector copy; m_watchers.getNotifiersVector(copy); - + stopTimer(copy); } @@ -551,7 +551,7 @@ void Geolocation::copyToSet(const GeoNotifierVector& src, GeoNotifierSet& dest) void Geolocation::handleError(PositionError* error) { ASSERT(error); - + GeoNotifierVector oneShotsCopy; copyToVector(m_oneShots, oneShotsCopy); @@ -603,13 +603,13 @@ void Geolocation::makeSuccessCallbacks() { ASSERT(lastPosition()); ASSERT(isAllowed()); - + GeoNotifierVector oneShotsCopy; copyToVector(m_oneShots, oneShotsCopy); - + GeoNotifierVector watchersCopy; m_watchers.getNotifiersVector(watchersCopy); - + // Clear the lists before we make the callbacks, to avoid clearing notifiers // added by calls to Geolocation methods from the callbacks, and to prevent // further callbacks to these notifiers. @@ -659,7 +659,7 @@ void Geolocation::stopUpdating() void Geolocation::handlePendingPermissionNotifiers() { - // While we iterate through the list, we need not worry about list being modified as the permission + // While we iterate through the list, we need not worry about list being modified as the permission // is already set to Yes/No and no new listeners will be added to the pending list GeoNotifierSet::const_iterator end = m_pendingForPermissionNotifiers.end(); for (GeoNotifierSet::const_iterator iter = m_pendingForPermissionNotifiers.begin(); iter != end; ++iter) { diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.h b/third_party/WebKit/Source/modules/geolocation/Geolocation.h index 90709ec..e7f6975 100644 --- a/third_party/WebKit/Source/modules/geolocation/Geolocation.h +++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Geolocation_h @@ -173,7 +173,7 @@ private: GeoNotifierSet m_requestsAwaitingCachedPosition; }; - + } // namespace WebCore #endif // Geolocation_h diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.idl b/third_party/WebKit/Source/modules/geolocation/Geolocation.idl index 03f478a..9c2ead1 100644 --- a/third_party/WebKit/Source/modules/geolocation/Geolocation.idl +++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.idl @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // http://www.w3.org/TR/geolocation-API/#geolocation_interface diff --git a/third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp b/third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp index da65c2a..80bac78 100644 --- a/third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp +++ b/third_party/WebKit/Source/modules/geolocation/GeolocationController.cpp @@ -61,7 +61,7 @@ void GeolocationController::addObserver(Geolocation* observer, bool enableHighAc if (enableHighAccuracy) m_highAccuracyObservers.add(observer); - if (m_client) { + if (m_client) { if (enableHighAccuracy) m_client->setEnableHighAccuracy(true); if (wasEmpty) @@ -139,5 +139,5 @@ void provideGeolocationTo(Page* page, GeolocationClient* client) { Supplement<Page>::provideTo(page, GeolocationController::supplementName(), GeolocationController::create(page, client)); } - + } // namespace WebCore diff --git a/third_party/WebKit/Source/modules/geolocation/GeolocationError.h b/third_party/WebKit/Source/modules/geolocation/GeolocationError.h index 1bf97b6..23ecb71 100644 --- a/third_party/WebKit/Source/modules/geolocation/GeolocationError.h +++ b/third_party/WebKit/Source/modules/geolocation/GeolocationError.h @@ -53,7 +53,7 @@ private: } ErrorCode m_code; - String m_message; + String m_message; }; } // namespace WebCore diff --git a/third_party/WebKit/Source/modules/geolocation/Geoposition.h b/third_party/WebKit/Source/modules/geolocation/Geoposition.h index a0d0114..ae4e819 100644 --- a/third_party/WebKit/Source/modules/geolocation/Geoposition.h +++ b/third_party/WebKit/Source/modules/geolocation/Geoposition.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Geoposition_h diff --git a/third_party/WebKit/Source/modules/geolocation/Geoposition.idl b/third_party/WebKit/Source/modules/geolocation/Geoposition.idl index 34ef94e..1b5e347 100644 --- a/third_party/WebKit/Source/modules/geolocation/Geoposition.idl +++ b/third_party/WebKit/Source/modules/geolocation/Geoposition.idl @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ diff --git a/third_party/WebKit/Source/modules/geolocation/PositionCallback.h b/third_party/WebKit/Source/modules/geolocation/PositionCallback.h index b7ef111..7a79539 100644 --- a/third_party/WebKit/Source/modules/geolocation/PositionCallback.h +++ b/third_party/WebKit/Source/modules/geolocation/PositionCallback.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef PositionCallback_h diff --git a/third_party/WebKit/Source/modules/geolocation/PositionError.idl b/third_party/WebKit/Source/modules/geolocation/PositionError.idl index 56b4d41..2a673c0 100644 --- a/third_party/WebKit/Source/modules/geolocation/PositionError.idl +++ b/third_party/WebKit/Source/modules/geolocation/PositionError.idl @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ diff --git a/third_party/WebKit/Source/modules/geolocation/PositionErrorCallback.h b/third_party/WebKit/Source/modules/geolocation/PositionErrorCallback.h index 90d3fec..a5d7773 100644 --- a/third_party/WebKit/Source/modules/geolocation/PositionErrorCallback.h +++ b/third_party/WebKit/Source/modules/geolocation/PositionErrorCallback.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef PositionErrorCallback_h diff --git a/third_party/WebKit/Source/modules/geolocation/PositionOptions.h b/third_party/WebKit/Source/modules/geolocation/PositionOptions.h index 71d9118..1b1e48e 100644 --- a/third_party/WebKit/Source/modules/geolocation/PositionOptions.h +++ b/third_party/WebKit/Source/modules/geolocation/PositionOptions.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef PositionOptions_h @@ -30,7 +30,7 @@ #include "wtf/RefCounted.h" namespace WebCore { - + class PositionOptions : public RefCounted<PositionOptions> { public: static PassRefPtr<PositionOptions> create() { return adoptRef(new PositionOptions()); } @@ -62,7 +62,7 @@ public: m_hasMaximumAge = true; m_maximumAge = age; } - + private: PositionOptions() : m_highAccuracy(false) @@ -70,14 +70,14 @@ private: { setMaximumAge(0); } - + bool m_highAccuracy; bool m_hasTimeout; int m_timeout; bool m_hasMaximumAge; int m_maximumAge; }; - + } // namespace WebCore #endif // PositionOptions_h diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp index 6396eaa..c057639 100644 --- a/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp +++ b/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.cpp @@ -72,9 +72,9 @@ bool IDBEventDispatcher::dispatch(Event* event, Vector<RefPtr<EventTarget> >& ev // prevent the transaction from being aborted. It's purely there for // error reporting and distinctly different from the event propagating to // the window. - // + // // This is similar to how "error" events are handled in workers. - // + // // (I think that so far webkit hasn't implemented the window.onerror // feature yet, so you probably don't want to fire the separate error // event on the window until that has been implemented)." -- Jonas Sicking diff --git a/third_party/WebKit/Source/modules/mediasource/MediaSource.idl b/third_party/WebKit/Source/modules/mediasource/MediaSource.idl index 49d0fd3..8286967 100644 --- a/third_party/WebKit/Source/modules/mediasource/MediaSource.idl +++ b/third_party/WebKit/Source/modules/mediasource/MediaSource.idl @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ EnabledAtRuntime=mediaSource, ActiveDOMObject, @@ -46,7 +46,7 @@ [RaisesException] void removeSourceBuffer(SourceBuffer buffer); readonly attribute DOMString readyState; - + [RaisesException] void endOfStream([Default=NullString] optional DOMString error); static boolean isTypeSupported (DOMString type); diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.idl b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.idl index 7f368c7..5099e0d6c 100644 --- a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.idl +++ b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.idl @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ NoInterfaceObject, ActiveDOMObject, @@ -35,7 +35,7 @@ ] interface SourceBuffer : EventTarget { readonly attribute boolean updating; - + // Returns the time ranges buffered. [GetterRaisesException] readonly attribute TimeRanges buffered; diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBufferList.idl b/third_party/WebKit/Source/modules/mediasource/SourceBufferList.idl index 80f231d..1e2f5ed 100644 --- a/third_party/WebKit/Source/modules/mediasource/SourceBufferList.idl +++ b/third_party/WebKit/Source/modules/mediasource/SourceBufferList.idl @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ NoInterfaceObject, EnabledAtRuntime=mediaSource, diff --git a/third_party/WebKit/Source/modules/mediasource/WebKitMediaSource.idl b/third_party/WebKit/Source/modules/mediasource/WebKitMediaSource.idl index 61eaa1c..388e5d8 100644 --- a/third_party/WebKit/Source/modules/mediasource/WebKitMediaSource.idl +++ b/third_party/WebKit/Source/modules/mediasource/WebKitMediaSource.idl @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ NoInterfaceObject, EnabledAtRuntime=webKitMediaSource, @@ -47,7 +47,7 @@ [RaisesException] void removeSourceBuffer(WebKitSourceBuffer buffer); readonly attribute DOMString readyState; - + [RaisesException] void endOfStream([Default=NullString] optional DOMString error); static boolean isTypeSupported (DOMString type); diff --git a/third_party/WebKit/Source/modules/mediasource/WebKitSourceBuffer.idl b/third_party/WebKit/Source/modules/mediasource/WebKitSourceBuffer.idl index 4995de8..c682730 100644 --- a/third_party/WebKit/Source/modules/mediasource/WebKitSourceBuffer.idl +++ b/third_party/WebKit/Source/modules/mediasource/WebKitSourceBuffer.idl @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ NoInterfaceObject, EnabledAtRuntime=webKitMediaSource diff --git a/third_party/WebKit/Source/modules/mediasource/WebKitSourceBufferList.idl b/third_party/WebKit/Source/modules/mediasource/WebKitSourceBufferList.idl index 5acd8ca..f33a369 100644 --- a/third_party/WebKit/Source/modules/mediasource/WebKitSourceBufferList.idl +++ b/third_party/WebKit/Source/modules/mediasource/WebKitSourceBufferList.idl @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ NoInterfaceObject, EnabledAtRuntime=webKitMediaSource diff --git a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h index 26fa088..c592978 100644 --- a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h +++ b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef NavigatorContentUtilsClient_h diff --git a/third_party/WebKit/Source/modules/notifications/DOMWindowNotifications.cpp b/third_party/WebKit/Source/modules/notifications/DOMWindowNotifications.cpp index 9a64fb4..4d2f569 100644 --- a/third_party/WebKit/Source/modules/notifications/DOMWindowNotifications.cpp +++ b/third_party/WebKit/Source/modules/notifications/DOMWindowNotifications.cpp @@ -90,14 +90,14 @@ NotificationCenter* DOMWindowNotifications::webkitNotifications() Document* document = m_window->document(); if (!document) return 0; - + Page* page = document->page(); if (!page) return 0; NotificationClient* provider = NotificationController::clientFrom(page); - if (provider) - m_notificationCenter = NotificationCenter::create(document, provider); + if (provider) + m_notificationCenter = NotificationCenter::create(document, provider); return m_notificationCenter.get(); } diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp index 2fa9a0e..68c009a 100644 --- a/third_party/WebKit/Source/modules/notifications/Notification.cpp +++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp @@ -115,26 +115,26 @@ Notification::Notification(ScriptExecutionContext* context, const String& title) { ScriptWrappable::init(this); m_notificationCenter = DOMWindowNotifications::webkitNotifications(toDocument(context)->domWindow()); - + ASSERT(m_notificationCenter->client()); m_taskTimer->startOneShot(0); } #endif -Notification::~Notification() +Notification::~Notification() { } #if ENABLE(LEGACY_NOTIFICATIONS) PassRefPtr<Notification> Notification::create(const KURL& url, ScriptExecutionContext* context, ExceptionState& es, PassRefPtr<NotificationCenter> provider) -{ +{ RefPtr<Notification> notification(adoptRef(new Notification(url, context, es, provider))); notification->suspendIfNeeded(); return notification.release(); } PassRefPtr<Notification> Notification::create(const String& title, const String& body, const String& iconURI, ScriptExecutionContext* context, ExceptionState& es, PassRefPtr<NotificationCenter> provider) -{ +{ RefPtr<Notification> notification(adoptRef(new Notification(title, body, iconURI, context, es, provider))); notification->suspendIfNeeded(); return notification.release(); @@ -170,7 +170,7 @@ const AtomicString& Notification::interfaceName() const return eventNames().interfaceForNotification; } -void Notification::show() +void Notification::show() { // prevent double-showing if (m_state == Idle && m_notificationCenter->client()) { @@ -281,7 +281,7 @@ const String& Notification::permissionString(NotificationClient::Permission perm case NotificationClient::PermissionNotAllowed: return defaultPermission; } - + ASSERT_NOT_REACHED(); return deniedPermission; } diff --git a/third_party/WebKit/Source/modules/notifications/NotificationClient.h b/third_party/WebKit/Source/modules/notifications/NotificationClient.h index 3fd2dca..8e21247 100644 --- a/third_party/WebKit/Source/modules/notifications/NotificationClient.h +++ b/third_party/WebKit/Source/modules/notifications/NotificationClient.h @@ -62,7 +62,7 @@ public: // When the user closes a page, or quits the client application, all of the page's // associated notifications are cleared. virtual void clearNotifications(ScriptExecutionContext*) { } - + // Informs the presenter that a Notification object has been destroyed // (such as by a page transition). The presenter may continue showing // the notification, but must not attempt to call the event handlers. diff --git a/third_party/WebKit/Source/modules/notifications/NotificationController.cpp b/third_party/WebKit/Source/modules/notifications/NotificationController.cpp index fb53b30..87bae74 100644 --- a/third_party/WebKit/Source/modules/notifications/NotificationController.cpp +++ b/third_party/WebKit/Source/modules/notifications/NotificationController.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/modules/notifications/NotificationController.h b/third_party/WebKit/Source/modules/notifications/NotificationController.h index a7bf28f..a0abd63 100644 --- a/third_party/WebKit/Source/modules/notifications/NotificationController.h +++ b/third_party/WebKit/Source/modules/notifications/NotificationController.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef NotificationController_h @@ -47,7 +47,7 @@ public: static NotificationClient* clientFrom(Page*); NotificationClient* client() { return m_client; } - + private: explicit NotificationController(NotificationClient*); diff --git a/third_party/WebKit/Source/modules/notifications/WorkerGlobalScopeNotifications.cpp b/third_party/WebKit/Source/modules/notifications/WorkerGlobalScopeNotifications.cpp index 074fde5..f181c28 100644 --- a/third_party/WebKit/Source/modules/notifications/WorkerGlobalScopeNotifications.cpp +++ b/third_party/WebKit/Source/modules/notifications/WorkerGlobalScopeNotifications.cpp @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ diff --git a/third_party/WebKit/Source/modules/quota/StorageInfo.idl b/third_party/WebKit/Source/modules/quota/StorageInfo.idl index 87caad2..f21070e 100644 --- a/third_party/WebKit/Source/modules/quota/StorageInfo.idl +++ b/third_party/WebKit/Source/modules/quota/StorageInfo.idl @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ diff --git a/third_party/WebKit/Source/modules/quota/StorageQuota.idl b/third_party/WebKit/Source/modules/quota/StorageQuota.idl index bc008dd..1c8243e 100644 --- a/third_party/WebKit/Source/modules/quota/StorageQuota.idl +++ b/third_party/WebKit/Source/modules/quota/StorageQuota.idl @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ [ diff --git a/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.cpp b/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.cpp index 5bee66f..b018a81 100644 --- a/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.cpp +++ b/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.cpp @@ -35,7 +35,7 @@ #include "wtf/PassRefPtr.h" namespace WebCore { - + DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis(DOMWindow* window) : DOMWindowProperty(window->frame()) { @@ -73,5 +73,5 @@ SpeechSynthesis* DOMWindowSpeechSynthesis::speechSynthesis() m_speechSynthesis = SpeechSynthesis::create(); return m_speechSynthesis.get(); } - + } // namespace WebCore diff --git a/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.h b/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.h index d4a95ac..4f2b075 100644 --- a/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.h +++ b/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.h @@ -31,22 +31,22 @@ #include "modules/speech/SpeechSynthesis.h" namespace WebCore { - + class DOMWindow; class DOMWindowSpeechSynthesis : public Supplement<DOMWindow>, public DOMWindowProperty { public: virtual ~DOMWindowSpeechSynthesis(); - + static SpeechSynthesis* speechSynthesis(DOMWindow*); static DOMWindowSpeechSynthesis* from(DOMWindow*); - + private: explicit DOMWindowSpeechSynthesis(DOMWindow*); - + SpeechSynthesis* speechSynthesis(); static const char* supplementName(); - + RefPtr<SpeechSynthesis> m_speechSynthesis; }; diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp b/third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp index 3ba24471..925133e 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp @@ -61,7 +61,7 @@ const Vector<RefPtr<SpeechSynthesisVoice> >& SpeechSynthesis::getVoices() { if (m_voiceList.size()) return m_voiceList; - + // If the voiceList is empty, that's the cue to get the voices from the platform again. const Vector<RefPtr<PlatformSpeechSynthesisVoice> >& platformVoices = m_platformSpeechSynthesizer->voiceList(); size_t voiceCount = platformVoices.size(); @@ -102,7 +102,7 @@ void SpeechSynthesis::startSpeakingImmediately(SpeechSynthesisUtterance* utteran void SpeechSynthesis::speak(SpeechSynthesisUtterance* utterance) { m_utteranceQueue.append(utterance); - + // If the queue was empty, speak this immediately and add it to the queue. if (m_utteranceQueue.size() == 1) startSpeakingImmediately(utterance); @@ -116,7 +116,7 @@ void SpeechSynthesis::cancel() m_utteranceQueue.clear(); m_platformSpeechSynthesizer->cancel(); current = 0; - + // The platform should have called back immediately and cleared the current utterance. ASSERT(!m_currentSpeechUtterance); } @@ -138,7 +138,7 @@ void SpeechSynthesis::fireEvent(const AtomicString& type, SpeechSynthesisUtteran { utterance->dispatchEvent(SpeechSynthesisEvent::create(type, charIndex, (currentTime() - utterance->startTime()), name)); } - + void SpeechSynthesis::handleSpeakingCompleted(SpeechSynthesisUtterance* utterance, bool errorOccurred) { ASSERT(utterance); @@ -152,13 +152,13 @@ void SpeechSynthesis::handleSpeakingCompleted(SpeechSynthesisUtterance* utteranc ASSERT(firstUtterance == utterance); if (firstUtterance == utterance) m_utteranceQueue.removeFirst(); - + // Start the next job if there is one pending. if (!m_utteranceQueue.isEmpty()) startSpeakingImmediately(m_utteranceQueue.first().get()); } } - + void SpeechSynthesis::boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance, SpeechBoundary boundary, unsigned charIndex) { DEFINE_STATIC_LOCAL(const String, wordBoundaryString, (ASCIILiteral("word"))); @@ -181,7 +181,7 @@ void SpeechSynthesis::didStartSpeaking(PassRefPtr<PlatformSpeechSynthesisUtteran if (utterance->client()) fireEvent(eventNames().startEvent, static_cast<SpeechSynthesisUtterance*>(utterance->client()), 0, String()); } - + void SpeechSynthesis::didPauseSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance) { m_isPaused = true; @@ -201,7 +201,7 @@ void SpeechSynthesis::didFinishSpeaking(PassRefPtr<PlatformSpeechSynthesisUttera if (utterance->client()) handleSpeakingCompleted(static_cast<SpeechSynthesisUtterance*>(utterance->client()), false); } - + void SpeechSynthesis::speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance> utterance) { if (utterance->client()) diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesis.h b/third_party/WebKit/Source/modules/speech/SpeechSynthesis.h index 3110d73..f1fba77 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesis.h +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesis.h @@ -37,31 +37,31 @@ #include "wtf/RefPtr.h" namespace WebCore { - + class PlatformSpeechSynthesizerClient; class SpeechSynthesisVoice; - + class SpeechSynthesis : public PlatformSpeechSynthesizerClient, public ScriptWrappable, public RefCounted<SpeechSynthesis> { public: static PassRefPtr<SpeechSynthesis> create(); - + bool pending() const; bool speaking() const; bool paused() const; - + void speak(SpeechSynthesisUtterance*); void cancel(); void pause(); void resume(); - + const Vector<RefPtr<SpeechSynthesisVoice> >& getVoices(); - + // Used in testing to use a mock platform synthesizer void setPlatformSynthesizer(PassOwnPtr<PlatformSpeechSynthesizer>); - + private: SpeechSynthesis(); - + // PlatformSpeechSynthesizerClient override methods. virtual void voicesDidChange() OVERRIDE; virtual void didStartSpeaking(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE; @@ -74,14 +74,14 @@ private: void startSpeakingImmediately(SpeechSynthesisUtterance*); void handleSpeakingCompleted(SpeechSynthesisUtterance*, bool errorOccurred); void fireEvent(const AtomicString& type, SpeechSynthesisUtterance*, unsigned long charIndex, const String& name); - + OwnPtr<PlatformSpeechSynthesizer> m_platformSpeechSynthesizer; Vector<RefPtr<SpeechSynthesisVoice> > m_voiceList; SpeechSynthesisUtterance* m_currentSpeechUtterance; Deque<RefPtr<SpeechSynthesisUtterance> > m_utteranceQueue; bool m_isPaused; }; - + } // namespace WebCore #endif // SpeechSynthesisEvent_h diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesis.idl b/third_party/WebKit/Source/modules/speech/SpeechSynthesis.idl index 4078c88..8cc867f 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesis.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesis.idl @@ -20,9 +20,9 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ NoInterfaceObject, EnabledAtRuntime=speechSynthesis diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.cpp b/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.cpp index f4a3807..10a58a2 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.cpp +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.cpp @@ -27,7 +27,7 @@ #include "modules/speech/SpeechSynthesisEvent.h" namespace WebCore { - + PassRefPtr<SpeechSynthesisEvent> SpeechSynthesisEvent::create() { return adoptRef(new SpeechSynthesisEvent()); @@ -51,5 +51,5 @@ SpeechSynthesisEvent::SpeechSynthesisEvent(const AtomicString& type, unsigned lo { ScriptWrappable::init(this); } - + } // namespace WebCore diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.h b/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.h index 51b43d6..fe69a39 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.h +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.h @@ -30,18 +30,18 @@ #include "wtf/PassRefPtr.h" namespace WebCore { - + class SpeechSynthesisEvent : public Event { public: static PassRefPtr<SpeechSynthesisEvent> create(); static PassRefPtr<SpeechSynthesisEvent> create(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name); - + unsigned long charIndex() const { return m_charIndex; } float elapsedTime() const { return m_elapsedTime; } const String& name() const { return m_name; } - + virtual const AtomicString& interfaceName() const { return eventNames().interfaceForSpeechSynthesisEvent; } - + private: SpeechSynthesisEvent(); SpeechSynthesisEvent(const AtomicString& type, unsigned long charIndex, float elapsedTime, const String& name); @@ -50,7 +50,7 @@ private: float m_elapsedTime; String m_name; }; - + } // namespace WebCore #endif // SpeechSynthesisEvent_h diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.idl b/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.idl index a0f896e..a36ef2b 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisEvent.idl @@ -20,9 +20,9 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ EnabledAtRuntime=speechSynthesis ] interface SpeechSynthesisEvent : Event { diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.cpp b/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.cpp index c394a3c..b11d046 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.cpp +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.cpp @@ -27,7 +27,7 @@ #include "modules/speech/SpeechSynthesisUtterance.h" namespace WebCore { - + PassRefPtr<SpeechSynthesisUtterance> SpeechSynthesisUtterance::create(ScriptExecutionContext* context, const String& text) { return adoptRef(new SpeechSynthesisUtterance(context, text)); @@ -45,12 +45,12 @@ SpeechSynthesisUtterance::~SpeechSynthesisUtterance() { m_platformUtterance->setClient(0); } - + ScriptExecutionContext* SpeechSynthesisUtterance::scriptExecutionContext() const { return ContextLifecycleObserver::scriptExecutionContext(); -} - +} + const AtomicString& SpeechSynthesisUtterance::interfaceName() const { return eventNames().interfaceForSpeechSynthesisUtterance; @@ -66,7 +66,7 @@ void SpeechSynthesisUtterance::setVoice(SpeechSynthesisVoice* voice) // Cache our own version of the SpeechSynthesisVoice so that we don't have to do some lookup // to go from the platform voice back to the speech synthesis voice in the read property. m_voice = voice; - + if (voice) m_platformUtterance->setVoice(voice->platformVoice()); } diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl b/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl index 61a2a7c..916d51d 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisUtterance.idl @@ -20,9 +20,9 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ EnabledAtRuntime=speechSynthesis, ConstructorCallWith=ScriptExecutionContext, diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h b/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h index 1664c1d..6d83d74 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h @@ -38,18 +38,18 @@ class SpeechSynthesisVoice : public ScriptWrappable, public RefCounted<SpeechSyn public: virtual ~SpeechSynthesisVoice() { } static PassRefPtr<SpeechSynthesisVoice> create(PassRefPtr<PlatformSpeechSynthesisVoice>); - + const String& voiceURI() const { return m_platformVoice->voiceURI(); } const String& name() const { return m_platformVoice->name(); } const String& lang() const { return m_platformVoice->lang(); } bool localService() const { return m_platformVoice->localService(); } bool isDefault() const { return m_platformVoice->isDefault(); } - + PlatformSpeechSynthesisVoice* platformVoice() const { return m_platformVoice.get(); } private: explicit SpeechSynthesisVoice(PassRefPtr<PlatformSpeechSynthesisVoice>); - + RefPtr<PlatformSpeechSynthesisVoice> m_platformVoice; }; diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.idl b/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.idl index a377631..0a634e5 100644 --- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.idl +++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.idl @@ -20,9 +20,9 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + [ NoInterfaceObject, EnabledAtRuntime=speechSynthesis diff --git a/third_party/WebKit/Source/modules/webaudio/AnalyserNode.cpp b/third_party/WebKit/Source/modules/webaudio/AnalyserNode.cpp index 1a831b2..d844634 100644 --- a/third_party/WebKit/Source/modules/webaudio/AnalyserNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AnalyserNode.cpp @@ -58,7 +58,7 @@ void AnalyserNode::process(size_t framesToProcess) } AudioBus* inputBus = input(0)->bus(); - + // Give the analyser the audio which is passing through this AudioNode. m_analyser.writeInput(inputBus, framesToProcess); diff --git a/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h b/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h index a4b5346..95f993f 100644 --- a/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h +++ b/third_party/WebKit/Source/modules/webaudio/AnalyserNode.h @@ -37,11 +37,11 @@ class AnalyserNode : public AudioBasicInspectorNode { public: static PassRefPtr<AnalyserNode> create(AudioContext* context, float sampleRate) { - return adoptRef(new AnalyserNode(context, sampleRate)); + return adoptRef(new AnalyserNode(context, sampleRate)); } virtual ~AnalyserNode(); - + // AudioNode virtual void process(size_t framesToProcess); virtual void reset(); diff --git a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp index 765d704..ee8219e 100644 --- a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp @@ -47,7 +47,7 @@ AsyncAudioDecoder::AsyncAudioDecoder() AsyncAudioDecoder::~AsyncAudioDecoder() { m_queue.kill(); - + // Stop thread. waitForThreadCompletion(m_threadID); m_threadID = 0; @@ -110,7 +110,7 @@ void AsyncAudioDecoder::DecodingTask::decode() // Do the actual decoding and invoke the callback. m_audioBuffer = AudioBuffer::createFromAudioFileData(m_audioData->data(), m_audioData->byteLength(), false, sampleRate()); - + // Decoding is finished, but we need to do the callbacks on the main thread. callOnMainThread(notifyCompleteDispatch, this); } diff --git a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h index fedb105..ca663ea 100644 --- a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h +++ b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h @@ -56,7 +56,7 @@ private: static PassOwnPtr<DecodingTask> create(ArrayBuffer* audioData, float sampleRate, PassRefPtr<AudioBufferCallback> successCallback, PassRefPtr<AudioBufferCallback> errorCallback); void decode(); - + private: DecodingTask(ArrayBuffer* audioData, float sampleRate, PassRefPtr<AudioBufferCallback> successCallback, PassRefPtr<AudioBufferCallback> errorCallback); @@ -75,7 +75,7 @@ private: RefPtr<AudioBufferCallback> m_errorCallback; RefPtr<AudioBuffer> m_audioBuffer; }; - + static void threadEntry(void* threadData); void runLoop(); diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.cpp index 8a6dec1..a11f46b 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.cpp @@ -70,7 +70,7 @@ void AudioBasicProcessorNode::uninitialize() void AudioBasicProcessorNode::process(size_t framesToProcess) { AudioBus* destinationBus = output(0)->bus(); - + if (!isInitialized() || !processor() || processor()->numberOfChannels() != numberOfChannels()) destinationBus->zero(); else { @@ -80,7 +80,7 @@ void AudioBasicProcessorNode::process(size_t framesToProcess) if (!input(0)->isConnected()) sourceBus->zero(); - processor()->process(sourceBus, destinationBus, framesToProcess); + processor()->process(sourceBus, destinationBus, framesToProcess); } } @@ -103,7 +103,7 @@ void AudioBasicProcessorNode::reset() void AudioBasicProcessorNode::checkNumberOfChannelsForInput(AudioNodeInput* input) { ASSERT(context()->isAudioThread() && context()->isGraphOwner()); - + ASSERT(input == this->input(0)); if (input != this->input(0)) return; @@ -113,12 +113,12 @@ void AudioBasicProcessorNode::checkNumberOfChannelsForInput(AudioNodeInput* inpu return; unsigned numberOfChannels = input->numberOfChannels(); - + if (isInitialized() && numberOfChannels != output(0)->numberOfChannels()) { // We're already initialized but the channel count has changed. uninitialize(); } - + if (!isInitialized()) { // This will propagate the channel count to any nodes connected further down the chain... output(0)->setNumberOfChannels(numberOfChannels); diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.h b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.h index 89297c3..eb94cac 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.h +++ b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorNode.h @@ -35,7 +35,7 @@ namespace WebCore { class AudioBus; class AudioNodeInput; class AudioProcessor; - + // AudioBasicProcessorNode is an AudioNode with one input and one output where the input and output have the same number of channels. class AudioBasicProcessorNode : public AudioNode { public: diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp index d01c8c6..1efd04e 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp @@ -44,7 +44,7 @@ PassRefPtr<AudioBuffer> AudioBuffer::create(unsigned numberOfChannels, size_t nu { if (sampleRate < 22050 || sampleRate > 96000 || numberOfChannels > AudioContext::maxNumberOfChannels() || !numberOfFrames) return 0; - + return adoptRef(new AudioBuffer(numberOfChannels, numberOfFrames, sampleRate)); } diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h index 793cfb8..fa8cd29 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h +++ b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h @@ -67,7 +67,7 @@ public: // releaseMemory() can be called when the AudioContext goes away, so we can release the memory earlier than when the garbage collection happens. // Careful! Only call this when the page unloads, after the AudioContext is no longer processing. void releaseMemory(); - + protected: AudioBuffer(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); explicit AudioBuffer(AudioBus*); diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp index 7519331..ae13166 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp @@ -116,7 +116,7 @@ void AudioBufferSourceNode::process(size_t framesToProcess) outputBus, quantumFrameOffset, bufferFramesToProcess); - + if (!bufferFramesToProcess) { outputBus->zero(); return; @@ -150,7 +150,7 @@ bool AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping(AudioBus*, unsign if (framesToProcess > 0) { // We're not looping and we've reached the end of the sample data, but we still need to provide more output, // so generate silence for the remaining. - for (unsigned i = 0; i < numberOfChannels(); ++i) + for (unsigned i = 0; i < numberOfChannels(); ++i) memset(m_destinationChannels[i] + index, 0, sizeof(float) * framesToProcess); } @@ -193,7 +193,7 @@ bool AudioBufferSourceNode::renderFromBuffer(AudioBus* bus, unsigned destination // Potentially zero out initial frames leading up to the offset. if (destinationFrameOffset) { - for (unsigned i = 0; i < numberOfChannels; ++i) + for (unsigned i = 0; i < numberOfChannels; ++i) memset(m_destinationChannels[i], 0, sizeof(float) * destinationFrameOffset); } @@ -206,7 +206,7 @@ bool AudioBufferSourceNode::renderFromBuffer(AudioBus* bus, unsigned destination // Avoid converting from time to sample-frames twice by computing // the grain end time first before computing the sample frame. unsigned endFrame = m_isGrain ? AudioUtilities::timeToSampleFrame(m_grainOffset + m_grainDuration, bufferSampleRate) : bufferLength; - + // This is a HACK to allow for HRTF tail-time - avoids glitch at end. // FIXME: implement tailTime for each AudioNode for a more general solution to this problem. // https://bugs.webkit.org/show_bug.cgi?id=77224 @@ -262,7 +262,7 @@ bool AudioBufferSourceNode::renderFromBuffer(AudioBus* bus, unsigned destination int framesThisTime = min(framesToProcess, framesToEnd); framesThisTime = max(0, framesThisTime); - for (unsigned i = 0; i < numberOfChannels; ++i) + for (unsigned i = 0; i < numberOfChannels; ++i) memcpy(destinationChannels[i] + writeIndex, sourceChannels[i] + readIndex, sizeof(float) * framesThisTime); writeIndex += framesThisTime; @@ -338,13 +338,13 @@ void AudioBufferSourceNode::reset() bool AudioBufferSourceNode::setBuffer(AudioBuffer* buffer) { ASSERT(isMainThread()); - + // The context must be locked since changing the buffer can re-configure the number of channels that are output. AudioContext::AutoLocker contextLocker(context()); - + // This synchronizes with process(). MutexLocker processLocker(m_processLock); - + if (buffer) { // Do any necesssary re-configuration to the buffer's number of channels. unsigned numberOfChannels = buffer->numberOfChannels(); @@ -357,13 +357,13 @@ bool AudioBufferSourceNode::setBuffer(AudioBuffer* buffer) m_sourceChannels = adoptArrayPtr(new const float* [numberOfChannels]); m_destinationChannels = adoptArrayPtr(new float* [numberOfChannels]); - for (unsigned i = 0; i < numberOfChannels; ++i) + for (unsigned i = 0; i < numberOfChannels; ++i) m_sourceChannels[i] = buffer->getChannelData(i)->data(); } m_virtualReadIndex = 0; m_buffer = buffer; - + return true; } @@ -387,7 +387,7 @@ void AudioBufferSourceNode::startGrain(double when, double grainOffset, double g if (!buffer()) return; - + // Do sanity checking of grain parameters versus buffer size. double bufferDuration = buffer()->duration(); @@ -406,13 +406,13 @@ void AudioBufferSourceNode::startGrain(double when, double grainOffset, double g m_isGrain = true; m_startTime = when; - + // We call timeToSampleFrame here since at playbackRate == 1 we don't want to go through linear interpolation // at a sub-sample position since it will degrade the quality. // When aligned to the sample-frame the playback will be identical to the PCM data stored in the buffer. // Since playbackRate == 1 is very common, it's worth considering quality. m_virtualReadIndex = AudioUtilities::timeToSampleFrame(m_grainOffset, buffer()->sampleRate()); - + m_playbackState = SCHEDULED_STATE; } @@ -426,13 +426,13 @@ double AudioBufferSourceNode::totalPitchRate() double dopplerRate = 1.0; if (m_pannerNode) dopplerRate = m_pannerNode->dopplerRate(); - + // Incorporate buffer's sample-rate versus AudioContext's sample-rate. // Normally it's not an issue because buffers are loaded at the AudioContext's sample-rate, but we can handle it in any case. double sampleRateFactor = 1.0; if (buffer()) sampleRateFactor = buffer()->sampleRate() / sampleRate(); - + double basePitchRate = playbackRate()->value(); double totalRate = dopplerRate * sampleRateFactor * basePitchRate; @@ -442,7 +442,7 @@ double AudioBufferSourceNode::totalPitchRate() if (!totalRate) totalRate = 1; // zero rate is considered illegal totalRate = min(MaxRate, totalRate); - + bool isTotalRateValid = !std::isnan(totalRate) && !std::isinf(totalRate); ASSERT(isTotalRateValid); if (!isTotalRateValid) diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp index 699a378..fde4c4b 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp @@ -82,7 +82,7 @@ const int UndefinedThreadIdentifier = 0xffffffff; const unsigned MaxNodesToDeletePerQuantum = 10; namespace WebCore { - + bool AudioContext::isSampleRateRangeGood(float sampleRate) { // FIXME: It would be nice if the minimum sample-rate could be less than 44.1KHz, @@ -93,7 +93,7 @@ bool AudioContext::isSampleRateRangeGood(float sampleRate) // Don't allow more than this number of simultaneous AudioContexts talking to hardware. const unsigned MaxHardwareContexts = 4; unsigned AudioContext::s_hardwareContextCount = 0; - + PassRefPtr<AudioContext> AudioContext::create(Document* document) { ASSERT(document); @@ -199,7 +199,7 @@ void AudioContext::lazyInitialize() // Each time provideInput() is called, a portion of the audio stream is rendered. Let's call this time period a "render quantum". // NOTE: for now default AudioContext does not need an explicit startRendering() call from JavaScript. // We may want to consider requiring it for symmetry with OfflineAudioContext. - m_destinationNode->startRendering(); + m_destinationNode->startRendering(); ++s_hardwareContextCount; } @@ -259,7 +259,7 @@ bool AudioContext::isRunnable() const { if (!isInitialized()) return false; - + // Check with the HRTF spatialization system to see if it's finished loading. return m_hrtfDatabaseLoader->isLoaded(); } @@ -346,16 +346,16 @@ PassRefPtr<MediaElementAudioSourceNode> AudioContext::createMediaElementSource(H es.throwDOMException(InvalidStateError); return 0; } - + ASSERT(isMainThread()); lazyInitialize(); - + // First check if this media element already has a source node. if (mediaElement->audioSourceNode()) { es.throwDOMException(InvalidStateError); return 0; } - + RefPtr<MediaElementAudioSourceNode> node = MediaElementAudioSourceNode::create(this, mediaElement); mediaElement->setAudioSourceNode(node.get()); @@ -557,12 +557,12 @@ PassRefPtr<OscillatorNode> AudioContext::createOscillator() PassRefPtr<PeriodicWave> AudioContext::createPeriodicWave(Float32Array* real, Float32Array* imag, ExceptionState& es) { ASSERT(isMainThread()); - + if (!real || !imag || (real->length() != imag->length())) { es.throwDOMException(SyntaxError); return 0; } - + lazyInitialize(); return PeriodicWave::create(sampleRate(), real, imag); } @@ -587,7 +587,7 @@ void AudioContext::refNode(AudioNode* node) { ASSERT(isMainThread()); AutoLocker locker(this); - + node->ref(AudioNode::RefTypeConnection); m_referencedNodes.append(node); } @@ -595,7 +595,7 @@ void AudioContext::refNode(AudioNode* node) void AudioContext::derefNode(AudioNode* node) { ASSERT(isGraphOwner()); - + node->deref(AudioNode::RefTypeConnection); for (unsigned i = 0; i < m_referencedNodes.size(); ++i) { @@ -640,15 +640,15 @@ bool AudioContext::tryLock(bool& mustReleaseLock) // Try to catch cases of using try lock on main thread - it should use regular lock. ASSERT(isAudioThread || isAudioThreadFinished()); - + if (!isAudioThread) { // In release build treat tryLock() as lock() (since above ASSERT(isAudioThread) never fires) - this is the best we can do. lock(mustReleaseLock); return true; } - + bool hasLock; - + if (thisThread == m_graphOwnerThread) { // Thread already has the lock. hasLock = true; @@ -656,13 +656,13 @@ bool AudioContext::tryLock(bool& mustReleaseLock) } else { // Don't already have the lock - try to acquire it. hasLock = m_contextGraphMutex.tryLock(); - + if (hasLock) m_graphOwnerThread = thisThread; mustReleaseLock = hasLock; } - + return hasLock; } @@ -693,7 +693,7 @@ void AudioContext::addDeferredFinishDeref(AudioNode* node) void AudioContext::handlePreRenderTasks() { ASSERT(isAudioThread()); - + // At the beginning of every render quantum, try to update the internal rendering graph state (from main thread changes). // It's OK if the tryLock() fails, we'll just take slightly longer to pick up the changes. bool mustReleaseLock; @@ -712,7 +712,7 @@ void AudioContext::handlePreRenderTasks() void AudioContext::handlePostRenderTasks() { ASSERT(isAudioThread()); - + // Must use a tryLock() here too. Don't worry, the lock will very rarely be contended and this method is called frequently. // The worst that can happen is that there will be some nodes which will take slightly longer than usual to be deleted or removed // from the render graph (in which case they'll render silence). @@ -746,7 +746,7 @@ void AudioContext::handleDeferredFinishDerefs() AudioNode* node = m_deferredFinishDerefList[i]; node->finishDeref(AudioNode::RefTypeConnection); } - + m_deferredFinishDerefList.clear(); } @@ -773,7 +773,7 @@ void AudioContext::scheduleNodeDeletion() if (!isGood) return; - // Make sure to call deleteMarkedNodes() on main thread. + // Make sure to call deleteMarkedNodes() on main thread. if (m_nodesMarkedForDeletion.size() && !m_isDeletionScheduled) { m_nodesToDelete.append(m_nodesMarkedForDeletion); m_nodesMarkedForDeletion.clear(); @@ -830,7 +830,7 @@ void AudioContext::deleteMarkedNodes() void AudioContext::markSummingJunctionDirty(AudioSummingJunction* summingJunction) { - ASSERT(isGraphOwner()); + ASSERT(isGraphOwner()); m_dirtySummingJunctions.add(summingJunction); } @@ -843,13 +843,13 @@ void AudioContext::removeMarkedSummingJunction(AudioSummingJunction* summingJunc void AudioContext::markAudioNodeOutputDirty(AudioNodeOutput* output) { - ASSERT(isGraphOwner()); + ASSERT(isGraphOwner()); m_dirtyAudioNodeOutputs.add(output); } void AudioContext::handleDirtyAudioSummingJunctions() { - ASSERT(isGraphOwner()); + ASSERT(isGraphOwner()); for (HashSet<AudioSummingJunction*>::iterator i = m_dirtySummingJunctions.begin(); i != m_dirtySummingJunctions.end(); ++i) (*i)->updateRenderingState(); @@ -859,7 +859,7 @@ void AudioContext::handleDirtyAudioSummingJunctions() void AudioContext::handleDirtyAudioNodeOutputs() { - ASSERT(isGraphOwner()); + ASSERT(isGraphOwner()); for (HashSet<AudioNodeOutput*>::iterator i = m_dirtyAudioNodeOutputs.begin(); i != m_dirtyAudioNodeOutputs.end(); ++i) (*i)->updateRenderingState(); @@ -933,7 +933,7 @@ void AudioContext::fireCompletionEvent() ASSERT(isMainThread()); if (!isMainThread()) return; - + AudioBuffer* renderedBuffer = m_renderTarget.get(); ASSERT(renderedBuffer); diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.h b/third_party/WebKit/Source/modules/webaudio/AudioContext.h index 2b61727..09890ba 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioContext.h +++ b/third_party/WebKit/Source/modules/webaudio/AudioContext.h @@ -128,7 +128,7 @@ public: PassRefPtr<DelayNode> createDelay(double maxDelayTime, ExceptionState&); PassRefPtr<PannerNode> createPanner(); PassRefPtr<ConvolverNode> createConvolver(); - PassRefPtr<DynamicsCompressorNode> createDynamicsCompressor(); + PassRefPtr<DynamicsCompressorNode> createDynamicsCompressor(); PassRefPtr<AnalyserNode> createAnalyser(); PassRefPtr<ScriptProcessorNode> createScriptProcessor(size_t bufferSize, ExceptionState&); PassRefPtr<ScriptProcessorNode> createScriptProcessor(size_t bufferSize, size_t numberOfInputChannels, ExceptionState&); @@ -176,14 +176,14 @@ public: // // Thread Safety and Graph Locking: // - + void setAudioThread(ThreadIdentifier thread) { m_audioThread = thread; } // FIXME: check either not initialized or the same ThreadIdentifier audioThread() const { return m_audioThread; } bool isAudioThread() const; // Returns true only after the audio thread has been started and then shutdown. bool isAudioThreadFinished() { return m_isAudioThreadFinished; } - + // mustReleaseLock is set to true if we acquired the lock in this method call and caller must unlock(), false if it was previously acquired. void lock(bool& mustReleaseLock); @@ -207,7 +207,7 @@ public: ASSERT(context); context->lock(m_mustReleaseLock); } - + ~AutoLocker() { if (m_mustReleaseLock) @@ -217,7 +217,7 @@ public: AudioContext* m_context; bool m_mustReleaseLock; }; - + // In AudioNode::deref() a tryLock() is used for calling finishDeref(), but if it fails keep track here. void addDeferredFinishDeref(AudioNode*); @@ -245,15 +245,15 @@ public: void startRendering(); void fireCompletionEvent(); - + static unsigned s_hardwareContextCount; protected: explicit AudioContext(Document*); AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); - + static bool isSampleRateRangeGood(float sampleRate); - + private: void constructCommon(); @@ -268,7 +268,7 @@ private: void scheduleNodeDeletion(); static void deleteMarkedNodesDispatch(void* userData); - + bool m_isInitialized; bool m_isAudioThreadFinished; @@ -324,10 +324,10 @@ private: Mutex m_contextGraphMutex; volatile ThreadIdentifier m_audioThread; volatile ThreadIdentifier m_graphOwnerThread; // if the lock is held then this is the thread which owns it, otherwise == UndefinedThreadIdentifier - + // Only accessed in the audio thread. Vector<AudioNode*> m_deferredFinishDerefList; - + // HRTF Database loader RefPtr<HRTFDatabaseLoader> m_hrtfDatabaseLoader; @@ -337,12 +337,12 @@ private: EventTargetData m_eventTargetData; RefPtr<AudioBuffer> m_renderTarget; - + bool m_isOfflineContext; AsyncAudioDecoder m_audioDecoder; - // This is considering 32 is large enough for multiple channels audio. + // This is considering 32 is large enough for multiple channels audio. // It is somewhat arbitrary and could be increased if necessary. enum { MaxNumberOfChannels = 32 }; diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.idl b/third_party/WebKit/Source/modules/webaudio/AudioContext.idl index 940e0d5..c1d63ec 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioContext.idl +++ b/third_party/WebKit/Source/modules/webaudio/AudioContext.idl @@ -43,7 +43,7 @@ // Number of AudioBufferSourceNodes that are currently playing. readonly attribute unsigned long activeSourceCount; - + [RaisesException] AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long numberOfFrames, float sampleRate); [RaisesException] AudioBuffer createBuffer(ArrayBuffer? buffer, boolean mixToMono); diff --git a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp index b989c33..6c7984f 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp @@ -35,7 +35,7 @@ #include "modules/webaudio/AudioNodeOutput.h" namespace WebCore { - + AudioDestinationNode::AudioDestinationNode(AudioContext* context, float sampleRate) : AudioNode(context, sampleRate) , m_currentSampleFrame(0) @@ -57,9 +57,9 @@ void AudioDestinationNode::render(AudioBus* sourceBus, AudioBus* destinationBus, // since they can very seriously hurt performance. // This will take care of all AudioNodes because they all process within this scope. DenormalDisabler denormalDisabler; - + context()->setAudioThread(currentThread()); - + if (!context()->isRunnable()) { destinationBus->zero(); return; @@ -75,7 +75,7 @@ void AudioDestinationNode::render(AudioBus* sourceBus, AudioBus* destinationBus, // This will cause the node(s) connected to us to process, which in turn will pull on their input(s), // all the way backwards through the rendering graph. AudioBus* renderedBus = input(0)->pull(destinationBus, numberOfFrames); - + if (!renderedBus) destinationBus->zero(); else if (renderedBus != destinationBus) { @@ -88,7 +88,7 @@ void AudioDestinationNode::render(AudioBus* sourceBus, AudioBus* destinationBus, // Let the context take care of any business at the end of each render quantum. context()->handlePostRenderTasks(); - + // Advance current sample-frame. m_currentSampleFrame += numberOfFrames; } diff --git a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h index 5334210..7a3dd36 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h +++ b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.h @@ -35,16 +35,16 @@ namespace WebCore { class AudioBus; class AudioContext; - + class AudioDestinationNode : public AudioNode, public AudioIOCallback { public: AudioDestinationNode(AudioContext*, float sampleRate); virtual ~AudioDestinationNode(); - - // AudioNode + + // AudioNode virtual void process(size_t) { }; // we're pulled by hardware so this is never called virtual void reset() { m_currentSampleFrame = 0; }; - + // The audio hardware calls render() to get the next render quantum of audio into destinationBus. // It will optionally give us local/live audio input in sourceBus (if it's not 0). virtual void render(AudioBus* sourceBus, AudioBus* destinationBus, size_t numberOfFrames); @@ -60,7 +60,7 @@ public: virtual void startRendering() = 0; AudioSourceProvider* localAudioInputProvider() { return &m_localAudioInputProvider; } - + protected: // LocalAudioInputProvider allows us to expose an AudioSourceProvider for local/live audio input. // If there is local/live audio input, we call set() with the audio input data every render quantum. diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp index c1cd449..cc88387 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp @@ -126,7 +126,7 @@ AudioNodeOutput* AudioNode::output(unsigned i) void AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned inputIndex, ExceptionState& es) { - ASSERT(isMainThread()); + ASSERT(isMainThread()); AudioContext::AutoLocker locker(context()); if (!destination) { @@ -342,7 +342,7 @@ bool AudioNode::propagatesSilence() const void AudioNode::pullInputs(size_t framesToProcess) { ASSERT(context()->isAudioThread()); - + // Process all of the AudioNodes connected to our inputs. for (unsigned i = 0; i < m_inputs.size(); ++i) input(i)->pull(0, framesToProcess); @@ -437,7 +437,7 @@ void AudioNode::deref(RefType refType) // In the case of the audio thread, we must use a tryLock to avoid glitches. bool hasLock = false; bool mustReleaseLock = false; - + if (context()->isAudioThread()) { // Real-time audio thread must not contend lock (to avoid glitches). hasLock = context()->tryLock(mustReleaseLock); @@ -445,7 +445,7 @@ void AudioNode::deref(RefType refType) context()->lock(mustReleaseLock); hasLock = true; } - + if (hasLock) { // This is where the real deref work happens. finishDeref(refType); @@ -469,7 +469,7 @@ void AudioNode::deref(RefType refType) void AudioNode::finishDeref(RefType refType) { ASSERT(context()->isGraphOwner()); - + switch (refType) { case RefTypeNormal: ASSERT(m_normalRefCount > 0); @@ -482,7 +482,7 @@ void AudioNode::finishDeref(RefType refType) default: ASSERT_NOT_REACHED(); } - + #if DEBUG_AUDIONODE_REFERENCES fprintf(stderr, "%p: %d: AudioNode::deref(%d) %d %d\n", this, nodeType(), refType, m_normalRefCount, m_connectionRefCount); #endif diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp index 12ecea4..6a31554 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp @@ -34,7 +34,7 @@ #include <algorithm> using namespace std; - + namespace WebCore { AudioNodeInput::AudioNodeInput(AudioNode* node) @@ -48,7 +48,7 @@ AudioNodeInput::AudioNodeInput(AudioNode* node) void AudioNodeInput::connect(AudioNodeOutput* output) { ASSERT(context()->isGraphOwner()); - + ASSERT(output && node()); if (!output || !node()) return; @@ -56,7 +56,7 @@ void AudioNodeInput::connect(AudioNodeOutput* output) // Check if we're already connected to this output. if (m_outputs.contains(output)) return; - + output->addInput(this); m_outputs.add(output); changedOutputs(); @@ -81,7 +81,7 @@ void AudioNodeInput::disconnect(AudioNodeOutput* output) node()->deref(AudioNode::RefTypeConnection); // Note: it's important to return immediately after all deref() calls since the node may be deleted. return; } - + // Otherwise, try to disconnect from disabled connections. if (m_disabledOutputs.contains(output)) { m_disabledOutputs.remove(output); @@ -102,7 +102,7 @@ void AudioNodeInput::disable(AudioNodeOutput* output) return; ASSERT(m_outputs.contains(output)); - + m_disabledOutputs.add(output); m_outputs.remove(output); changedOutputs(); @@ -198,7 +198,7 @@ void AudioNodeInput::sumAllConnections(AudioBus* summingBus, size_t framesToProc ASSERT(summingBus); if (!summingBus) return; - + summingBus->zero(); AudioBus::ChannelInterpretation interpretation = node()->internalChannelInterpretation(); @@ -237,7 +237,7 @@ AudioBus* AudioNodeInput::pull(AudioBus* inPlaceBus, size_t framesToProcess) // Handle multiple connections case. sumAllConnections(internalSummingBus, framesToProcess); - + return internalSummingBus; } diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.h b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.h index 8986ae2..0d9ed8c 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.h +++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.h @@ -71,14 +71,14 @@ public: // bus() contains the rendered audio after pull() has been called for each time quantum. // Called from context's audio thread. AudioBus* bus(); - + // updateInternalBus() updates m_internalSummingBus appropriately for the number of channels. // This must be called when we own the context's graph lock in the audio thread at the very start or end of the render quantum. void updateInternalBus(); // The number of channels of the connection with the largest number of channels. - unsigned numberOfChannels() const; - + unsigned numberOfChannels() const; + private: AudioNode* m_node; diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp index 1eb9678..01625dd 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp @@ -95,7 +95,7 @@ void AudioNodeOutput::updateNumberOfChannels() void AudioNodeOutput::propagateChannelCount() { ASSERT(context()->isAudioThread() && context()->isGraphOwner()); - + if (isChannelCountKnown()) { // Announce to any nodes we're connected to that we changed our channel count for its input. for (InputsIterator i = m_inputs.begin(); i != m_inputs.end(); ++i) { @@ -110,13 +110,13 @@ AudioBus* AudioNodeOutput::pull(AudioBus* inPlaceBus, size_t framesToProcess) { ASSERT(context()->isAudioThread()); ASSERT(m_renderingFanOutCount > 0 || m_renderingParamFanOutCount > 0); - + // Causes our AudioNode to process if it hasn't already for this render quantum. // We try to do in-place processing (using inPlaceBus) if at all possible, // but we can't process in-place if we're connected to more than one input (fan-out > 1). // In this case pull() is called multiple times per rendering quantum, and the processIfNecessary() call below will - // cause our node to process() only the first time, caching the output in m_internalOutputBus for subsequent calls. - + // cause our node to process() only the first time, caching the output in m_internalOutputBus for subsequent calls. + m_isInPlace = inPlaceBus && inPlaceBus->numberOfChannels() == numberOfChannels() && (m_renderingFanOutCount + m_renderingParamFanOutCount) == 1; m_inPlaceBus = m_isInPlace ? inPlaceBus : 0; @@ -178,7 +178,7 @@ void AudioNodeOutput::removeInput(AudioNodeInput* input) void AudioNodeOutput::disconnectAllInputs() { ASSERT(context()->isGraphOwner()); - + // AudioNodeInput::disconnect() changes m_inputs by calling removeInput(). while (!m_inputs.isEmpty()) { AudioNodeInput* input = *m_inputs.begin(); diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.h b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.h index 5d0f973..e0f82c6 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.h +++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.h @@ -48,7 +48,7 @@ public: // Can be called from any thread. AudioNode* node() const { return m_node; } AudioContext* context() { return m_node->context(); } - + // Causes our AudioNode to process if it hasn't already for this render quantum. // It returns the bus containing the processed audio for this output, returning inPlaceBus if in-place processing was possible. // Called from context's audio thread. @@ -84,13 +84,13 @@ public: // updateRenderingState() is called in the audio thread at the start or end of the render quantum to handle any recent changes to the graph state. // It must be called with the context's graph lock. void updateRenderingState(); - + private: AudioNode* m_node; friend class AudioNodeInput; friend class AudioParam; - + // These are called from AudioNodeInput. // They must be called with the context's graph lock. void addInput(AudioNodeInput*); @@ -128,7 +128,7 @@ private: // The main thread sets m_desiredNumberOfChannels which will later get picked up in the audio thread in updateNumberOfChannels(). unsigned m_numberOfChannels; unsigned m_desiredNumberOfChannels; - + // m_internalBus and m_inPlaceBus must only be changed in the audio thread with the context's graph lock (or constructor). RefPtr<AudioBus> m_internalBus; RefPtr<AudioBus> m_inPlaceBus; diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp index 52013f7..6555e8e 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp @@ -74,12 +74,12 @@ bool AudioParam::smooth() bool useTimelineValue = false; if (context()) m_value = m_timeline.valueForContextTime(context(), narrowPrecisionToFloat(m_value), useTimelineValue); - + if (m_smoothedValue == m_value) { // Smoothed value has already approached and snapped to value. return true; } - + if (useTimelineValue) m_smoothedValue = m_value; else { diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.h b/third_party/WebKit/Source/modules/webaudio/AudioParam.h index 7a673e4..b6c30cb 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioParam.h +++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.h @@ -85,7 +85,7 @@ public: void resetSmoothedValue() { m_smoothedValue = m_value; } void setSmoothingConstant(double k) { m_smoothingConstant = k; } - // Parameter automation. + // Parameter automation. void setValueAtTime(float value, double time) { m_timeline.setValueAtTime(value, time); } void linearRampToValueAtTime(float value, double time) { m_timeline.linearRampToValueAtTime(value, time); } void exponentialRampToValueAtTime(float value, double time) { m_timeline.exponentialRampToValueAtTime(value, time); } @@ -94,7 +94,7 @@ public: void cancelScheduledValues(double startTime) { m_timeline.cancelScheduledValues(startTime); } bool hasSampleAccurateValues() { return m_timeline.hasValues() || numberOfRenderingConnections(); } - + // Calculates numberOfValues parameter values starting at the context's current time. // Must be called in the context's render thread. void calculateSampleAccurateValues(float* values, unsigned numberOfValues); @@ -133,7 +133,7 @@ private: // Smoothing (de-zippering) double m_smoothedValue; double m_smoothingConstant; - + AudioParamTimeline m_timeline; }; diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp index 610a7d3..e2c14c4 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp @@ -81,9 +81,9 @@ void AudioParamTimeline::insertEvent(const ParamEvent& event) ASSERT(isValid); if (!isValid) return; - + MutexLocker locker(m_eventsLock); - + unsigned i = 0; double insertTime = event.time(); for (i = 0; i < m_events.size(); ++i) { diff --git a/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h b/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h index db7ed74..d844c79 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h +++ b/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h @@ -33,12 +33,12 @@ namespace WebCore { class AudioBuffer; - + class AudioProcessingEvent : public Event { public: static PassRefPtr<AudioProcessingEvent> create(); static PassRefPtr<AudioProcessingEvent> create(PassRefPtr<AudioBuffer> inputBuffer, PassRefPtr<AudioBuffer> outputBuffer); - + virtual ~AudioProcessingEvent(); AudioBuffer* inputBuffer() { return m_inputBuffer.get(); } diff --git a/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.idl b/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.idl index 297ec00..ed8f90a 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.idl +++ b/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.idl @@ -26,5 +26,5 @@ Conditional=WEB_AUDIO ] interface AudioProcessingEvent : Event { readonly attribute AudioBuffer inputBuffer; - readonly attribute AudioBuffer outputBuffer; + readonly attribute AudioBuffer outputBuffer; }; diff --git a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp index e048b2b..db216bc 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp @@ -149,7 +149,7 @@ void AudioScheduledSourceNode::stop(double when) ASSERT(isMainThread()); if (!(m_playbackState == SCHEDULED_STATE || m_playbackState == PLAYING_STATE)) return; - + when = max(0.0, when); m_endTime = when; } diff --git a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.h b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.h index d6ccb2c..552fa0e 100644 --- a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.h +++ b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.h @@ -53,7 +53,7 @@ public: PLAYING_STATE = 2, FINISHED_STATE = 3 }; - + AudioScheduledSourceNode(AudioContext*, float sampleRate); // Scheduling. diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp index c9d52f4..1d4668b 100644 --- a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp +++ b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp @@ -36,7 +36,7 @@ namespace WebCore { // FIXME: As a recursive linear filter, depending on its parameters, a biquad filter can have -// an infinite tailTime. In practice, Biquad filters do not usually (except for very high resonance values) +// an infinite tailTime. In practice, Biquad filters do not usually (except for very high resonance values) // have a tailTime of longer than approx. 200ms. This value could possibly be calculated based on the // settings of the Biquad. static const double MaxBiquadDelayTime = 0.2; @@ -114,7 +114,7 @@ void BiquadDSPKernel::updateCoefficientsIfNecessary(bool useSmoothing, bool forc void BiquadDSPKernel::process(const float* source, float* destination, size_t framesToProcess) { ASSERT(source && destination && biquadProcessor()); - + // Recompute filter coefficients if any of the parameters have changed. // FIXME: as an optimization, implement a way that a Biquad object can simply copy its internal filter coefficients from another Biquad object. // Then re-factor this code to only run for the first BiquadDSPKernel of each BiquadProcessor. diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h index 7ce741a..74a8d07 100644 --- a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h +++ b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.h @@ -36,12 +36,12 @@ class BiquadProcessor; // BiquadDSPKernel is an AudioDSPKernel and is responsible for filtering one channel of a BiquadProcessor using a Biquad object. class BiquadDSPKernel : public AudioDSPKernel { -public: +public: explicit BiquadDSPKernel(BiquadProcessor* processor) : AudioDSPKernel(processor) { } - + // AudioDSPKernel virtual void process(const float* source, float* dest, size_t framesToProcess); virtual void reset() { m_biquad.reset(); } diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp index e45638a..1aa8f4a 100644 --- a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp @@ -90,7 +90,7 @@ bool BiquadFilterNode::setType(unsigned type) { if (type > BiquadProcessor::Allpass) return false; - + biquadProcessor()->setType(static_cast<BiquadProcessor::FilterType>(type)); return true; } @@ -101,7 +101,7 @@ void BiquadFilterNode::getFrequencyResponse(const Float32Array* frequencyHz, { if (!frequencyHz || !magResponse || !phaseResponse) return; - + int n = std::min(frequencyHz->length(), std::min(magResponse->length(), phaseResponse->length())); diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.h b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.h index 0777c3a..0ba4681 100644 --- a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.h +++ b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.h @@ -31,7 +31,7 @@ namespace WebCore { class AudioParam; - + class BiquadFilterNode : public AudioBasicProcessorNode { public: // These must be defined as in the .idl file and must match those in the BiquadProcessor class. @@ -48,7 +48,7 @@ public: static PassRefPtr<BiquadFilterNode> create(AudioContext* context, float sampleRate) { - return adoptRef(new BiquadFilterNode(context, sampleRate)); + return adoptRef(new BiquadFilterNode(context, sampleRate)); } String type() const; diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.idl b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.idl index d65a901..3101652 100644 --- a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.idl +++ b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.idl @@ -36,7 +36,7 @@ const unsigned short ALLPASS = 7; [CustomSetter] attribute DOMString type; - + readonly attribute AudioParam frequency; // in Hertz readonly attribute AudioParam detune; // in Cents readonly attribute AudioParam Q; // Quality factor diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp index 8b3ae8f..2655abe 100644 --- a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp +++ b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp @@ -31,7 +31,7 @@ #include "modules/webaudio/BiquadDSPKernel.h" namespace WebCore { - + BiquadProcessor::BiquadProcessor(AudioContext* context, float sampleRate, size_t numberOfChannels, bool autoInitialize) : AudioDSPKernelProcessor(sampleRate, numberOfChannels) , m_type(LowPass) @@ -72,7 +72,7 @@ void BiquadProcessor::checkForDirtyCoefficients() // The BiquadDSPKernel objects rely on this value to see if they need to re-compute their internal filter coefficients. m_filterCoefficientsDirty = false; m_hasSampleAccurateValues = false; - + if (m_parameter1->hasSampleAccurateValues() || m_parameter2->hasSampleAccurateValues() || m_parameter3->hasSampleAccurateValues() || m_parameter4->hasSampleAccurateValues()) { m_filterCoefficientsDirty = true; m_hasSampleAccurateValues = true; @@ -103,9 +103,9 @@ void BiquadProcessor::process(const AudioBus* source, AudioBus* destination, siz destination->zero(); return; } - + checkForDirtyCoefficients(); - + // For each channel of our input, process using the corresponding BiquadDSPKernel into the output channel. for (unsigned i = 0; i < m_kernels.size(); ++i) m_kernels[i]->process(source->channel(i)->data(), destination->channel(i)->mutableData(), framesToProcess); @@ -127,7 +127,7 @@ void BiquadProcessor::getFrequencyResponse(int nFrequencies, // Compute the frequency response on a separate temporary kernel // to avoid interfering with the processing running in the audio // thread on the main kernels. - + OwnPtr<BiquadDSPKernel> responseKernel = adoptPtr(new BiquadDSPKernel(this)); responseKernel->getFrequencyResponse(nFrequencies, frequencyHz, magResponse, phaseResponse); diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.h b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.h index d0f5622..15b2d1a 100644 --- a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.h +++ b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.h @@ -52,9 +52,9 @@ public: BiquadProcessor(AudioContext*, float sampleRate, size_t numberOfChannels, bool autoInitialize); virtual ~BiquadProcessor(); - + virtual PassOwnPtr<AudioDSPKernel> createKernel(); - + virtual void process(const AudioBus* source, AudioBus* destination, size_t framesToProcess); // Get the magnitude and phase response of the filter at the given @@ -65,7 +65,7 @@ public: float* phaseResponse); void checkForDirtyCoefficients(); - + bool filterCoefficientsDirty() const { return m_filterCoefficientsDirty; } bool hasSampleAccurateValues() const { return m_hasSampleAccurateValues; } diff --git a/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp b/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp index b57c729..43b86b4 100644 --- a/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.cpp @@ -44,8 +44,8 @@ PassRefPtr<ChannelMergerNode> ChannelMergerNode::create(AudioContext* context, f { if (!numberOfInputs || numberOfInputs > AudioContext::maxNumberOfChannels()) return 0; - - return adoptRef(new ChannelMergerNode(context, sampleRate, numberOfInputs)); + + return adoptRef(new ChannelMergerNode(context, sampleRate, numberOfInputs)); } ChannelMergerNode::ChannelMergerNode(AudioContext* context, float sampleRate, unsigned numberOfInputs) @@ -73,25 +73,25 @@ void ChannelMergerNode::process(size_t framesToProcess) output->bus()->zero(); return; } - + // Merge all the channels from all the inputs into one output. unsigned outputChannelIndex = 0; for (unsigned i = 0; i < numberOfInputs(); ++i) { AudioNodeInput* input = this->input(i); if (input->isConnected()) { unsigned numberOfInputChannels = input->bus()->numberOfChannels(); - + // Merge channels from this particular input. for (unsigned j = 0; j < numberOfInputChannels; ++j) { AudioChannel* inputChannel = input->bus()->channel(j); AudioChannel* outputChannel = output->bus()->channel(outputChannelIndex); outputChannel->copyFrom(inputChannel); - + ++outputChannelIndex; } } } - + ASSERT(outputChannelIndex == output->numberOfChannels()); } diff --git a/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h b/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h index db5a702..a15b6fa 100644 --- a/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h +++ b/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h @@ -35,7 +35,7 @@ namespace WebCore { class AudioContext; - + class ChannelMergerNode : public AudioNode { public: static PassRefPtr<ChannelMergerNode> create(AudioContext*, float sampleRate, unsigned numberOfInputs); diff --git a/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp b/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp index 7d0b267..4009ba4 100644 --- a/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.cpp @@ -33,13 +33,13 @@ #include "modules/webaudio/AudioNodeOutput.h" namespace WebCore { - + PassRefPtr<ChannelSplitterNode> ChannelSplitterNode::create(AudioContext* context, float sampleRate, unsigned numberOfOutputs) { if (!numberOfOutputs || numberOfOutputs > AudioContext::maxNumberOfChannels()) return 0; - return adoptRef(new ChannelSplitterNode(context, sampleRate, numberOfOutputs)); + return adoptRef(new ChannelSplitterNode(context, sampleRate, numberOfOutputs)); } ChannelSplitterNode::ChannelSplitterNode(AudioContext* context, float sampleRate, unsigned numberOfOutputs) @@ -61,13 +61,13 @@ void ChannelSplitterNode::process(size_t framesToProcess) AudioBus* source = input(0)->bus(); ASSERT(source); ASSERT_UNUSED(framesToProcess, framesToProcess == source->length()); - + unsigned numberOfSourceChannels = source->numberOfChannels(); - + for (unsigned i = 0; i < numberOfOutputs(); ++i) { AudioBus* destination = output(i)->bus(); ASSERT(destination); - + if (i < numberOfSourceChannels) { // Split the channel out if it exists in the source. // It would be nice to avoid the copy and simply pass along pointers, but this becomes extremely difficult with fanout and fanin. diff --git a/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h b/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h index 8345650..c3c4a66 100644 --- a/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h +++ b/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h @@ -31,7 +31,7 @@ namespace WebCore { class AudioContext; - + class ChannelSplitterNode : public AudioNode { public: static PassRefPtr<ChannelSplitterNode> create(AudioContext*, float sampleRate, unsigned numberOfOutputs); diff --git a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp index 9359a03..36a473f 100644 --- a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp @@ -101,7 +101,7 @@ void ConvolverNode::initialize() { if (isInitialized()) return; - + AudioNode::initialize(); } @@ -117,7 +117,7 @@ void ConvolverNode::uninitialize() void ConvolverNode::setBuffer(AudioBuffer* buffer) { ASSERT(isMainThread()); - + if (!buffer) return; diff --git a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h index b1c123b..6431853 100644 --- a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h +++ b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h @@ -34,16 +34,16 @@ namespace WebCore { class AudioBuffer; class Reverb; - + class ConvolverNode : public AudioNode { public: static PassRefPtr<ConvolverNode> create(AudioContext* context, float sampleRate) { - return adoptRef(new ConvolverNode(context, sampleRate)); + return adoptRef(new ConvolverNode(context, sampleRate)); } - + virtual ~ConvolverNode(); - + // AudioNode virtual void process(size_t framesToProcess); virtual void reset(); diff --git a/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp index 615d100..ce6a45d 100644 --- a/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp @@ -36,7 +36,7 @@ const unsigned EnabledInputChannels = 2; namespace WebCore { - + DefaultAudioDestinationNode::DefaultAudioDestinationNode(AudioContext* context) : AudioDestinationNode(context, AudioDestination::hardwareSampleRate()) , m_numberOfInputChannels(0) @@ -54,7 +54,7 @@ DefaultAudioDestinationNode::~DefaultAudioDestinationNode() void DefaultAudioDestinationNode::initialize() { - ASSERT(isMainThread()); + ASSERT(isMainThread()); if (isInitialized()) return; @@ -64,7 +64,7 @@ void DefaultAudioDestinationNode::initialize() void DefaultAudioDestinationNode::uninitialize() { - ASSERT(isMainThread()); + ASSERT(isMainThread()); if (!isInitialized()) return; @@ -78,7 +78,7 @@ void DefaultAudioDestinationNode::createDestination() { float hardwareSampleRate = AudioDestination::hardwareSampleRate(); LOG(WebAudio, ">>>> hardwareSampleRate = %f\n", hardwareSampleRate); - + m_destination = AudioDestination::create(*this, m_inputDeviceId, m_numberOfInputChannels, channelCount(), hardwareSampleRate); } diff --git a/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h b/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h index 0f19597..08f9c88 100644 --- a/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h +++ b/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.h @@ -38,12 +38,12 @@ class DefaultAudioDestinationNode : public AudioDestinationNode { public: static PassRefPtr<DefaultAudioDestinationNode> create(AudioContext* context) { - return adoptRef(new DefaultAudioDestinationNode(context)); + return adoptRef(new DefaultAudioDestinationNode(context)); } virtual ~DefaultAudioDestinationNode(); - - // AudioNode + + // AudioNode virtual void initialize() OVERRIDE; virtual void uninitialize() OVERRIDE; virtual void setChannelCount(unsigned long, ExceptionState&) OVERRIDE; @@ -52,7 +52,7 @@ public: virtual void enableInput(const String& inputDeviceId) OVERRIDE; virtual void startRendering() OVERRIDE; virtual unsigned long maxChannelCount() const OVERRIDE; - + private: explicit DefaultAudioDestinationNode(AudioContext*); void createDestination(); diff --git a/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.h b/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.h index 374642c..ca23f0e 100644 --- a/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.h +++ b/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.h @@ -32,17 +32,17 @@ namespace WebCore { class DelayProcessor; - + class DelayDSPKernel : public AudioDSPKernel { -public: +public: explicit DelayDSPKernel(DelayProcessor*); DelayDSPKernel(double maxDelayTime, float sampleRate); - + virtual void process(const float* source, float* destination, size_t framesToProcess); virtual void reset(); - + double maxDelayTime() const { return m_maxDelayTime; } - + void setDelayFrames(double numberOfFrames) { m_desiredDelayFrames = numberOfFrames; } virtual double tailTime() const OVERRIDE; diff --git a/third_party/WebKit/Source/modules/webaudio/DelayProcessor.cpp b/third_party/WebKit/Source/modules/webaudio/DelayProcessor.cpp index 442e0b5..0788a87 100644 --- a/third_party/WebKit/Source/modules/webaudio/DelayProcessor.cpp +++ b/third_party/WebKit/Source/modules/webaudio/DelayProcessor.cpp @@ -27,7 +27,7 @@ #if ENABLE(WEB_AUDIO) #include "modules/webaudio/DelayProcessor.h" - + #include "modules/webaudio/DelayDSPKernel.h" namespace WebCore { diff --git a/third_party/WebKit/Source/modules/webaudio/DelayProcessor.h b/third_party/WebKit/Source/modules/webaudio/DelayProcessor.h index 9d94670..9e62a4c 100644 --- a/third_party/WebKit/Source/modules/webaudio/DelayProcessor.h +++ b/third_party/WebKit/Source/modules/webaudio/DelayProcessor.h @@ -34,14 +34,14 @@ namespace WebCore { class AudioDSPKernel; - + class DelayProcessor : public AudioDSPKernelProcessor { public: DelayProcessor(AudioContext*, float sampleRate, unsigned numberOfChannels, double maxDelayTime); virtual ~DelayProcessor(); - + virtual PassOwnPtr<AudioDSPKernel> createKernel(); - + AudioParam* delayTime() const { return m_delayTime.get(); } double maxDelayTime() { return m_maxDelayTime; } diff --git a/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp b/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp index 57ef964..b04c44b 100644 --- a/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp @@ -95,7 +95,7 @@ void DynamicsCompressorNode::initialize() if (isInitialized()) return; - AudioNode::initialize(); + AudioNode::initialize(); m_dynamicsCompressor = adoptPtr(new DynamicsCompressor(sampleRate(), defaultNumberOfOutputChannels)); } diff --git a/third_party/WebKit/Source/modules/webaudio/GainNode.cpp b/third_party/WebKit/Source/modules/webaudio/GainNode.cpp index 8959f595..10f0caf 100644 --- a/third_party/WebKit/Source/modules/webaudio/GainNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/GainNode.cpp @@ -97,8 +97,8 @@ void GainNode::checkNumberOfChannelsForInput(AudioNodeInput* input) ASSERT(input && input == this->input(0)); if (input != this->input(0)) return; - - unsigned numberOfChannels = input->numberOfChannels(); + + unsigned numberOfChannels = input->numberOfChannels(); if (isInitialized() && numberOfChannels != output(0)->numberOfChannels()) { // We're already initialized but the channel count has changed. diff --git a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h index 30c247b..9848511 100644 --- a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h +++ b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h @@ -38,22 +38,22 @@ namespace WebCore { class AudioContext; - + class MediaElementAudioSourceNode : public AudioSourceNode, public AudioSourceProviderClient { public: static PassRefPtr<MediaElementAudioSourceNode> create(AudioContext*, HTMLMediaElement*); virtual ~MediaElementAudioSourceNode(); - HTMLMediaElement* mediaElement() { return m_mediaElement.get(); } + HTMLMediaElement* mediaElement() { return m_mediaElement.get(); } // AudioNode virtual void process(size_t framesToProcess); virtual void reset(); - + // AudioSourceProviderClient virtual void setFormat(size_t numberOfChannels, float sampleRate); - + void lock(); void unlock(); diff --git a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h index 8d006fb..f98e04a 100644 --- a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h +++ b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h @@ -48,7 +48,7 @@ public: // AudioNode. virtual void process(size_t framesToProcess); virtual void reset(); - + MediaStreamSource* mediaStreamSource(); private: diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.h b/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.h index f0a2852..639744e 100644 --- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.h +++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.h @@ -33,12 +33,12 @@ namespace WebCore { class AudioBuffer; - + class OfflineAudioCompletionEvent : public Event { public: static PassRefPtr<OfflineAudioCompletionEvent> create(); static PassRefPtr<OfflineAudioCompletionEvent> create(PassRefPtr<AudioBuffer> renderedBuffer); - + virtual ~OfflineAudioCompletionEvent(); AudioBuffer* renderedBuffer() { return m_renderedBuffer.get(); } diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp index 4cc77ff..f5b5745 100644 --- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp @@ -35,10 +35,10 @@ #include "wtf/MainThread.h" using namespace std; - + namespace WebCore { - -const size_t renderQuantumSize = 128; + +const size_t renderQuantumSize = 128; OfflineAudioDestinationNode::OfflineAudioDestinationNode(AudioContext* context, AudioBuffer* renderTarget) : AudioDestinationNode(context, renderTarget->sampleRate()) @@ -81,7 +81,7 @@ void OfflineAudioDestinationNode::startRendering() ASSERT(m_renderTarget.get()); if (!m_renderTarget.get()) return; - + if (!m_startedRendering) { m_startedRendering = true; ref(); // See corresponding deref() call in notifyCompleteDispatch(). @@ -103,26 +103,26 @@ void OfflineAudioDestinationNode::offlineRender() ASSERT(m_renderBus.get()); if (!m_renderBus.get()) return; - + bool channelsMatch = m_renderBus->numberOfChannels() == m_renderTarget->numberOfChannels(); ASSERT(channelsMatch); if (!channelsMatch) return; - + bool isRenderBusAllocated = m_renderBus->length() >= renderQuantumSize; ASSERT(isRenderBusAllocated); if (!isRenderBusAllocated) return; - + // Synchronize with HRTFDatabaseLoader. // The database must be loaded before we can proceed. HRTFDatabaseLoader* loader = context()->hrtfDatabaseLoader(); ASSERT(loader); if (!loader) return; - + loader->waitForLoaderThreadCompletion(); - + // Break up the render target into smaller "render quantize" sized pieces. // Render until we're finished. size_t framesToProcess = m_renderTarget->length(); @@ -132,19 +132,19 @@ void OfflineAudioDestinationNode::offlineRender() while (framesToProcess > 0) { // Render one render quantum. render(0, m_renderBus.get(), renderQuantumSize); - + size_t framesAvailableToCopy = min(framesToProcess, renderQuantumSize); - + for (unsigned channelIndex = 0; channelIndex < numberOfChannels; ++channelIndex) { const float* source = m_renderBus->channel(channelIndex)->data(); float* destination = m_renderTarget->getChannelData(channelIndex)->data(); memcpy(destination + n, source, sizeof(float) * framesAvailableToCopy); } - + n += framesAvailableToCopy; framesToProcess -= framesAvailableToCopy; } - + // Our work is done. Let the AudioContext know. callOnMainThread(notifyCompleteDispatch, this); } diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h index 5cfa2a8..d69c9ce 100644 --- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h +++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h @@ -35,17 +35,17 @@ namespace WebCore { class AudioBus; class AudioContext; - + class OfflineAudioDestinationNode : public AudioDestinationNode { public: static PassRefPtr<OfflineAudioDestinationNode> create(AudioContext* context, AudioBuffer* renderTarget) { - return adoptRef(new OfflineAudioDestinationNode(context, renderTarget)); + return adoptRef(new OfflineAudioDestinationNode(context, renderTarget)); } virtual ~OfflineAudioDestinationNode(); - - // AudioNode + + // AudioNode virtual void initialize() OVERRIDE; virtual void uninitialize() OVERRIDE; @@ -60,16 +60,16 @@ private: // This AudioNode renders into this AudioBuffer. RefPtr<AudioBuffer> m_renderTarget; - + // Temporary AudioBus for each render quantum. RefPtr<AudioBus> m_renderBus; - + // Rendering thread. volatile ThreadIdentifier m_renderThread; bool m_startedRendering; static void offlineRenderEntry(void* threadData); void offlineRender(); - + // For completion callback on main thread. static void notifyCompleteDispatch(void* userData); void notifyComplete(); diff --git a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h index 51701eb..f8ea1e7 100644 --- a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h +++ b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h @@ -55,7 +55,7 @@ public: static PassRefPtr<OscillatorNode> create(AudioContext*, float sampleRate); virtual ~OscillatorNode(); - + // AudioNode virtual void process(size_t framesToProcess); virtual void reset(); @@ -80,7 +80,7 @@ private: // One of the waveform types defined in the enum. unsigned short m_type; - + // Frequency value in Hertz. RefPtr<AudioParam> m_frequency; @@ -99,7 +99,7 @@ private: // Stores sample-accurate values calculated according to frequency and detune. AudioFloatArray m_phaseIncrements; AudioFloatArray m_detuneValues; - + RefPtr<PeriodicWave> m_periodicWave; // Cache the wave tables for different waveform types, except CUSTOM. diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp index b40b806..6e52b4a 100644 --- a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp @@ -89,7 +89,7 @@ void PannerNode::pullInputs(size_t framesToProcess) // Recursively go through all nodes connected to us. notifyAudioSourcesConnectedToNode(this); } - + AudioNode::pullInputs(framesToProcess); } @@ -124,7 +124,7 @@ void PannerNode::process(size_t framesToProcess) // Snap to desired gain at the beginning. if (m_lastGain == -1.0) m_lastGain = totalGain; - + // Apply gain in-place with de-zippering. destination->copyWithGainFrom(*destination, &m_lastGain, totalGain); } else { @@ -154,7 +154,7 @@ void PannerNode::uninitialize() { if (!isInitialized()) return; - + m_panner.clear(); AudioNode::uninitialize(); } @@ -212,7 +212,7 @@ bool PannerNode::setPanningModel(unsigned model) default: return false; } - + return true; } @@ -363,7 +363,7 @@ float PannerNode::dopplerRate() if (dopplerShift > 16.0) dopplerShift = 16.0; else if (dopplerShift < 0.125) - dopplerShift = 0.125; + dopplerShift = 0.125; } } @@ -376,12 +376,12 @@ float PannerNode::distanceConeGain() double listenerDistance = m_position.distanceTo(listenerPosition); double distanceGain = m_distanceEffect.gain(listenerDistance); - + m_distanceGain->setValue(static_cast<float>(distanceGain)); // FIXME: could optimize by caching coneGain double coneGain = m_coneEffect.gain(m_position, m_orientation, listenerPosition); - + m_coneGain->setValue(static_cast<float>(coneGain)); return float(distanceGain * coneGain); @@ -392,12 +392,12 @@ void PannerNode::notifyAudioSourcesConnectedToNode(AudioNode* node) ASSERT(node); if (!node) return; - + // First check if this node is an AudioBufferSourceNode. If so, let it know about us so that doppler shift pitch can be taken into account. if (node->nodeType() == NodeTypeAudioBufferSource) { AudioBufferSourceNode* bufferSourceNode = static_cast<AudioBufferSourceNode*>(node); bufferSourceNode->setPannerNode(this); - } else { + } else { // Go through all inputs to this node. for (unsigned i = 0; i < node->numberOfInputs(); ++i) { AudioNodeInput* input = node->input(i); diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.idl b/third_party/WebKit/Source/modules/webaudio/PannerNode.idl index d20a2e6..899b8a9 100644 --- a/third_party/WebKit/Source/modules/webaudio/PannerNode.idl +++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.idl @@ -36,10 +36,10 @@ const unsigned short INVERSE_DISTANCE = 1; const unsigned short EXPONENTIAL_DISTANCE = 2; - // Default model for stereo is HRTF + // Default model for stereo is HRTF [CustomSetter] attribute DOMString panningModel; - // Uses a 3D cartesian coordinate system + // Uses a 3D cartesian coordinate system void setPosition(float x, float y, float z); void setOrientation(float x, float y, float z); void setVelocity(float x, float y, float z); diff --git a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp index c8a700e..8ec3243 100644 --- a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp +++ b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp @@ -105,13 +105,13 @@ void RealtimeAnalyser::writeInput(AudioBus* bus, size_t framesToProcess) ASSERT(isBusGood); if (!isBusGood) return; - + // FIXME : allow to work with non-FFTSize divisible chunking bool isDestinationGood = m_writeIndex < m_inputBuffer.size() && m_writeIndex + framesToProcess <= m_inputBuffer.size(); ASSERT(isDestinationGood); if (!isDestinationGood) - return; - + return; + // Perform real-time analysis const float* source = bus->channel(0)->data(); float* dest = m_inputBuffer.data() + m_writeIndex; @@ -140,13 +140,13 @@ namespace { void applyWindow(float* p, size_t n) { ASSERT(isMainThread()); - + // Blackman window double alpha = 0.16; double a0 = 0.5 * (1 - alpha); double a1 = 0.5; double a2 = 0.5 * alpha; - + for (unsigned i = 0; i < n; ++i) { double x = static_cast<double>(i) / static_cast<double>(n); double window = a0 - a1 * cos(2 * piDouble * x) + a2 * cos(4 * piDouble * x); @@ -157,12 +157,12 @@ void applyWindow(float* p, size_t n) } // namespace void RealtimeAnalyser::doFFTAnalysis() -{ +{ ASSERT(isMainThread()); // Unroll the input buffer into a temporary buffer, where we'll apply an analysis window followed by an FFT. size_t fftSize = this->fftSize(); - + AudioFloatArray temporaryBuffer(fftSize); float* inputBuffer = m_inputBuffer.data(); float* tempP = temporaryBuffer.data(); @@ -172,13 +172,13 @@ void RealtimeAnalyser::doFFTAnalysis() if (writeIndex < fftSize) { memcpy(tempP, inputBuffer + writeIndex - fftSize + InputBufferSize, sizeof(*tempP) * (fftSize - writeIndex)); memcpy(tempP + fftSize - writeIndex, inputBuffer, sizeof(*tempP) * writeIndex); - } else + } else memcpy(tempP, inputBuffer + writeIndex - fftSize, sizeof(*tempP) * fftSize); - + // Window the input samples. applyWindow(tempP, fftSize); - + // Do the analysis. m_analysisFrame->doFFT(tempP); @@ -187,21 +187,21 @@ void RealtimeAnalyser::doFFTAnalysis() // Blow away the packed nyquist component. imagP[0] = 0; - + // Normalize so than an input sine wave at 0dBfs registers as 0dBfs (undo FFT scaling factor). const double magnitudeScale = 1.0 / DefaultFFTSize; // A value of 0 does no averaging with the previous result. Larger values produce slower, but smoother changes. double k = m_smoothingTimeConstant; k = max(0.0, k); - k = min(1.0, k); - + k = min(1.0, k); + // Convert the analysis data from complex to magnitude and average with the previous result. float* destination = magnitudeBuffer().data(); size_t n = magnitudeBuffer().size(); for (size_t i = 0; i < n; ++i) { Complex c(realP[i], imagP[i]); - double scalarMagnitude = abs(c) * magnitudeScale; + double scalarMagnitude = abs(c) * magnitudeScale; destination[i] = float(k * destination[i] + (1 - k) * scalarMagnitude); } } @@ -212,9 +212,9 @@ void RealtimeAnalyser::getFloatFrequencyData(Float32Array* destinationArray) if (!destinationArray) return; - + doFFTAnalysis(); - + // Convert from linear magnitude to floating-point decibels. const double minDecibels = m_minDecibels; unsigned sourceLength = magnitudeBuffer().size(); @@ -222,7 +222,7 @@ void RealtimeAnalyser::getFloatFrequencyData(Float32Array* destinationArray) if (len > 0) { const float* source = magnitudeBuffer().data(); float* destination = destinationArray->data(); - + for (unsigned i = 0; i < len; ++i) { float linearValue = source[i]; double dbMag = !linearValue ? minDecibels : AudioUtilities::linearToDecibels(linearValue); @@ -237,9 +237,9 @@ void RealtimeAnalyser::getByteFrequencyData(Uint8Array* destinationArray) if (!destinationArray) return; - + doFFTAnalysis(); - + // Convert from linear magnitude to unsigned-byte decibels. unsigned sourceLength = magnitudeBuffer().size(); size_t len = min(sourceLength, destinationArray->length()); @@ -248,12 +248,12 @@ void RealtimeAnalyser::getByteFrequencyData(Uint8Array* destinationArray) const double minDecibels = m_minDecibels; const float* source = magnitudeBuffer().data(); - unsigned char* destination = destinationArray->data(); - + unsigned char* destination = destinationArray->data(); + for (unsigned i = 0; i < len; ++i) { float linearValue = source[i]; double dbMag = !linearValue ? minDecibels : AudioUtilities::linearToDecibels(linearValue); - + // The range m_minDecibels to m_maxDecibels will be scaled to byte values from 0 to UCHAR_MAX. double scaledValue = UCHAR_MAX * (dbMag - minDecibels) * rangeScaleFactor; @@ -262,7 +262,7 @@ void RealtimeAnalyser::getByteFrequencyData(Uint8Array* destinationArray) scaledValue = 0; if (scaledValue > UCHAR_MAX) scaledValue = UCHAR_MAX; - + destination[i] = static_cast<unsigned char>(scaledValue); } } @@ -274,7 +274,7 @@ void RealtimeAnalyser::getByteTimeDomainData(Uint8Array* destinationArray) if (!destinationArray) return; - + unsigned fftSize = this->fftSize(); size_t len = min(fftSize, destinationArray->length()); if (len > 0) { @@ -283,9 +283,9 @@ void RealtimeAnalyser::getByteTimeDomainData(Uint8Array* destinationArray) if (!isInputBufferGood) return; - float* inputBuffer = m_inputBuffer.data(); + float* inputBuffer = m_inputBuffer.data(); unsigned char* destination = destinationArray->data(); - + unsigned writeIndex = m_writeIndex; for (unsigned i = 0; i < len; ++i) { @@ -300,7 +300,7 @@ void RealtimeAnalyser::getByteTimeDomainData(Uint8Array* destinationArray) scaledValue = 0; if (scaledValue > UCHAR_MAX) scaledValue = UCHAR_MAX; - + destination[i] = static_cast<unsigned char>(scaledValue); } } diff --git a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.h b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.h index 49c1df8..363d74e 100644 --- a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.h +++ b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.h @@ -40,7 +40,7 @@ class RealtimeAnalyser { public: RealtimeAnalyser(); virtual ~RealtimeAnalyser(); - + void reset(); size_t fftSize() const { return m_fftSize; } @@ -77,19 +77,19 @@ private: // The audio thread writes the input audio here. AudioFloatArray m_inputBuffer; unsigned m_writeIndex; - + size_t m_fftSize; OwnPtr<FFTFrame> m_analysisFrame; void doFFTAnalysis(); - + // doFFTAnalysis() stores the floating-point magnitude analysis data here. AudioFloatArray m_magnitudeBuffer; AudioFloatArray& magnitudeBuffer() { return m_magnitudeBuffer; } // A value between 0 and 1 which averages the previous version of m_magnitudeBuffer with the current analysis magnitude data. - double m_smoothingTimeConstant; + double m_smoothingTimeConstant; - // The range used when converting when using getByteFrequencyData(). + // The range used when converting when using getByteFrequencyData(). double m_minDecibels; double m_maxDecibels; }; diff --git a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp index d47ce54..316c39d 100644 --- a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp +++ b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.cpp @@ -139,7 +139,7 @@ void ScriptProcessorNode::process(size_t framesToProcess) // Additionally, there is a double-buffering for input and output which is exposed directly to JavaScript (see inputBuffer and outputBuffer below). // This node is the producer for inputBuffer and the consumer for outputBuffer. // The JavaScript code is the consumer of inputBuffer and the producer for outputBuffer. - + // Get input and output busses. AudioBus* inputBus = this->input(0)->bus(); AudioBus* outputBus = this->output(0)->bus(); @@ -150,7 +150,7 @@ void ScriptProcessorNode::process(size_t framesToProcess) ASSERT(isDoubleBufferIndexGood); if (!isDoubleBufferIndexGood) return; - + AudioBuffer* inputBuffer = m_inputBuffers[doubleBufferIndex].get(); AudioBuffer* outputBuffer = m_outputBuffers[doubleBufferIndex].get(); @@ -185,7 +185,7 @@ void ScriptProcessorNode::process(size_t framesToProcess) if (numberOfInputChannels) m_internalInputBus->copyFrom(*inputBus); - // Copy from the output buffer to the output. + // Copy from the output buffer to the output. for (unsigned i = 0; i < numberOfOutputChannels; ++i) memcpy(outputBus->channel(i)->mutableData(), outputBuffer->getChannelData(i)->data() + m_bufferReadWriteIndex, sizeof(float) * framesToProcess); @@ -200,11 +200,11 @@ void ScriptProcessorNode::process(size_t framesToProcess) if (m_isRequestOutstanding) { // We're late in handling the previous request. The main thread must be very busy. // The best we can do is clear out the buffer ourself here. - outputBuffer->zero(); + outputBuffer->zero(); } else { // Reference ourself so we don't accidentally get deleted before fireProcessEvent() gets called. ref(); - + // Fire the event on the main thread, not this one (which is the realtime audio thread). m_doubleBufferIndexForEvent = m_doubleBufferIndex; m_isRequestOutstanding = true; @@ -231,12 +231,12 @@ void ScriptProcessorNode::fireProcessEventDispatch(void* userData) void ScriptProcessorNode::fireProcessEvent() { ASSERT(isMainThread() && m_isRequestOutstanding); - + bool isIndexGood = m_doubleBufferIndexForEvent < 2; ASSERT(isIndexGood); if (!isIndexGood) return; - + AudioBuffer* inputBuffer = m_inputBuffers[m_doubleBufferIndexForEvent].get(); AudioBuffer* outputBuffer = m_outputBuffers[m_doubleBufferIndexForEvent].get(); ASSERT(outputBuffer); @@ -247,7 +247,7 @@ void ScriptProcessorNode::fireProcessEvent() if (context()->scriptExecutionContext()) { // Let the audio thread know we've gotten to the point where it's OK for it to make another request. m_isRequestOutstanding = false; - + // Call the JavaScript event handler which will do the audio processing. dispatchEvent(AudioProcessingEvent::create(inputBuffer, outputBuffer)); } diff --git a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h index 7fc4245..05c1434 100644 --- a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h +++ b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h @@ -64,7 +64,7 @@ public: DEFINE_ATTRIBUTE_EVENT_LISTENER(audioprocess); - + private: virtual double tailTime() const OVERRIDE; virtual double latencyTime() const OVERRIDE; diff --git a/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.h b/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.h index 5564c38..8855630 100644 --- a/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.h +++ b/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.h @@ -50,8 +50,8 @@ public: double latency() const { return latencyTime(); } -private: - explicit WaveShaperNode(AudioContext*); +private: + explicit WaveShaperNode(AudioContext*); WaveShaperProcessor* waveShaperProcessor() { return static_cast<WaveShaperProcessor*>(processor()); } }; diff --git a/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp b/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp index f4b5efa..2f5c1e6 100644 --- a/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp +++ b/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp @@ -53,7 +53,7 @@ void WaveShaperProcessor::setCurve(Float32Array* curve) { // This synchronizes with process(). MutexLocker processLocker(m_processLock); - + m_curve = curve; } @@ -86,7 +86,7 @@ void WaveShaperProcessor::process(const AudioBus* source, AudioBus* destination, // The audio thread can't block on this lock, so we call tryLock() instead. MutexTryLocker tryLocker(m_processLock); - if (tryLocker.locked()) { + if (tryLocker.locked()) { // For each channel of our input, process using the corresponding WaveShaperDSPKernel into the output channel. for (unsigned i = 0; i < m_kernels.size(); ++i) m_kernels[i]->process(source->channel(i)->data(), destination->channel(i)->mutableData(), framesToProcess); diff --git a/third_party/WebKit/Source/modules/webdatabase/AbstractDatabaseServer.h b/third_party/WebKit/Source/modules/webdatabase/AbstractDatabaseServer.h index e81821e..15d9f8f 100644 --- a/third_party/WebKit/Source/modules/webdatabase/AbstractDatabaseServer.h +++ b/third_party/WebKit/Source/modules/webdatabase/AbstractDatabaseServer.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef AbstractDatabaseServer_h diff --git a/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatement.h b/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatement.h index 1ec326f..1fb9912 100644 --- a/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatement.h +++ b/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatement.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef AbstractSQLStatement_h diff --git a/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatementBackend.h b/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatementBackend.h index e547ccf..11a8c53 100644 --- a/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatementBackend.h +++ b/third_party/WebKit/Source/modules/webdatabase/AbstractSQLStatementBackend.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef AbstractSQLStatementBackend_h diff --git a/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransaction.h b/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransaction.h index 444879c..ba8e999 100644 --- a/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransaction.h +++ b/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransaction.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef AbstractSQLTransaction_h diff --git a/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransactionBackend.h b/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransactionBackend.h index cc69842..fe9d361 100644 --- a/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransactionBackend.h +++ b/third_party/WebKit/Source/modules/webdatabase/AbstractSQLTransactionBackend.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef AbstractSQLTransactionBackend_h diff --git a/third_party/WebKit/Source/modules/webdatabase/ChangeVersionData.h b/third_party/WebKit/Source/modules/webdatabase/ChangeVersionData.h index 1a48113..0c44958f 100644 --- a/third_party/WebKit/Source/modules/webdatabase/ChangeVersionData.h +++ b/third_party/WebKit/Source/modules/webdatabase/ChangeVersionData.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ChangeVersionData_h diff --git a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h index 0253c51..348851f 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h +++ b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DOMWindowWebDatabase_h diff --git a/third_party/WebKit/Source/modules/webdatabase/Database.cpp b/third_party/WebKit/Source/modules/webdatabase/Database.cpp index b6676d6..e0a9edc 100644 --- a/third_party/WebKit/Source/modules/webdatabase/Database.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/Database.cpp @@ -102,7 +102,7 @@ private: : m_context(context) { } - + RefPtr<ScriptExecutionContext> m_context; }; @@ -113,7 +113,7 @@ Database::~Database() // Grab a pointer to the script execution here because we're releasing it when we pass it to // DerefContextTask::create. ScriptExecutionContext* scriptExecutionContext = m_scriptExecutionContext.get(); - + scriptExecutionContext->postTask(DerefContextTask::create(m_scriptExecutionContext.release())); } } diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp index 6d38e88..f64bbd8 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp @@ -344,7 +344,7 @@ int DatabaseAuthorizer::allowRead(const String& tableName, const String&) { if (m_permissions & NoAccessMask && m_securityEnabled) return SQLAuthDeny; - + return denyBasedOnTableName(tableName); } @@ -400,7 +400,7 @@ void DatabaseAuthorizer::setReadOnly() { m_permissions |= ReadOnlyMask; } - + void DatabaseAuthorizer::setPermissions(int permissions) { m_permissions = permissions; diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.cpp index ada3063..45aba60 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.h index 24fcaf5..60c1c01 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.h +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackend.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DatabaseBackend_h diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendContext.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendContext.cpp index 59cf759..5424f65 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendContext.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendContext.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendContext.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendContext.h index ee53b15..975d6d27 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendContext.h +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendContext.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DatabaseBackendContext_h diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.cpp index 5ee0b12..4c10fe0 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.h index c515dec..5868159 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.h +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseBackendSync.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DatabaseBackendSync_h diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.cpp index 2fb2ed4..58d8803 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.h index 0df4303..eba45eb 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.h +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseBase.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DatabaseBase_h diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseBasicTypes.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseBasicTypes.h index 4a91e87..0445ca3 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseBasicTypes.h +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseBasicTypes.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DatabaseBasicTypes_h diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseError.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseError.h index 3d07146..ea350a7 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseError.h +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseError.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DatabaseError_h diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.cpp index f447887..23e4a02 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.h index 50f8695..9385e92 100644 --- a/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.h +++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseServer.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DatabaseServer_h diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp index 8262b0b..93e8923 100644 --- a/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp @@ -38,7 +38,7 @@ #include "wtf/text/CString.h" -// The Life-Cycle of a SQLStatement i.e. Who's keeping the SQLStatement alive? +// The Life-Cycle of a SQLStatement i.e. Who's keeping the SQLStatement alive? // ========================================================================== // The RefPtr chain goes something like this: // diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.cpp index 35c5820..505e6bf 100644 --- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.cpp @@ -227,7 +227,7 @@ // to wait for further action. -// The Life-Cycle of a SQLTransaction i.e. Who's keeping the SQLTransaction alive? +// The Life-Cycle of a SQLTransaction i.e. Who's keeping the SQLTransaction alive? // ============================================================================== // The RefPtr chain goes something like this: // @@ -304,7 +304,7 @@ // - DatabaseBackend::close() will iterate // DatabaseBackend::m_transactionQueue and call // notifyDatabaseThreadIsShuttingDown() on each transaction there. -// +// // Phase 2. After scheduling, before state AcquireLock // // - If the interruption occures before the DatabaseTransactionTask is diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionState.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionState.h index 1b3dcf0..8260099 100644 --- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionState.h +++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionState.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SQLTransactionState_h diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.cpp index 593ac08..f371d3d 100644 --- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.cpp +++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.h index 2420662..d14238e 100644 --- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.h +++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef SQLTransactionStateMachine_h diff --git a/third_party/WebKit/Source/web/ApplicationCacheHostInternal.h b/third_party/WebKit/Source/web/ApplicationCacheHostInternal.h index 5225ded..81ce9819 100644 --- a/third_party/WebKit/Source/web/ApplicationCacheHostInternal.h +++ b/third_party/WebKit/Source/web/ApplicationCacheHostInternal.h @@ -59,7 +59,7 @@ public: m_innerHost->notifyDOMApplicationCache(static_cast<ApplicationCacheHost::EventID>(eventID), 0, 0); } - virtual void notifyProgressEventListener(const WebKit::WebURL&, int progressTotal, int progressDone) + virtual void notifyProgressEventListener(const WebKit::WebURL&, int progressTotal, int progressDone) { m_innerHost->notifyDOMApplicationCache(ApplicationCacheHost::PROGRESS_EVENT, progressTotal, progressDone); } diff --git a/third_party/WebKit/Source/web/AssociatedURLLoader.cpp b/third_party/WebKit/Source/web/AssociatedURLLoader.cpp index 56a1f2f..ccf03cb 100644 --- a/third_party/WebKit/Source/web/AssociatedURLLoader.cpp +++ b/third_party/WebKit/Source/web/AssociatedURLLoader.cpp @@ -151,7 +151,7 @@ public: void enableErrorNotifications(); // Stops loading and releases the DocumentThreadableLoader as early as possible. - void clearClient() { m_client = 0; } + void clearClient() { m_client = 0; } private: ClientAdapter(AssociatedURLLoader*, WebURLLoaderClient*, const WebURLLoaderOptions&); diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp index 82a1b0d..d2509cb 100644 --- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp +++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp @@ -1002,9 +1002,9 @@ NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we } void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title) -{ +{ m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); -} +} #endif } // namespace WebKit diff --git a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp index cf87198..aeca1fc 100644 --- a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp +++ b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp @@ -316,7 +316,7 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM m_webView->spellCheckClient()->spellCheck(data.misspelledWord, misspelledOffset, misspelledLength, &data.dictionarySuggestions); } } else { - data.isSpellCheckingEnabled = + data.isSpellCheckingEnabled = m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled(); // Spellchecking might be enabled for the field, but could be disabled on the node. if (m_webView->focusedWebCoreFrame()->editor()->isSpellCheckingEnabledInFocusedNode()) { diff --git a/third_party/WebKit/Source/web/WebAccessibilityObject.cpp b/third_party/WebKit/Source/web/WebAccessibilityObject.cpp index 2f64d05..02d7181 100644 --- a/third_party/WebKit/Source/web/WebAccessibilityObject.cpp +++ b/third_party/WebKit/Source/web/WebAccessibilityObject.cpp @@ -684,7 +684,7 @@ WebURL WebAccessibilityObject::url() const { if (isDetached()) return WebURL(); - + return m_private->url(); } diff --git a/third_party/WebKit/Source/web/WebDOMActivityLogger.cpp b/third_party/WebKit/Source/web/WebDOMActivityLogger.cpp index 7d7fbac..d69d7a0 100644 --- a/third_party/WebKit/Source/web/WebDOMActivityLogger.cpp +++ b/third_party/WebKit/Source/web/WebDOMActivityLogger.cpp @@ -48,8 +48,8 @@ public: } virtual void log(const String& apiName, int argc, const v8::Handle<v8::Value>* argv, const String& extraInfo) - { - m_domActivityLogger->log(WebString(apiName), argc, argv, WebString(extraInfo)); + { + m_domActivityLogger->log(WebString(apiName), argc, argv, WebString(extraInfo)); } private: diff --git a/third_party/WebKit/Source/web/WebFontImpl.cpp b/third_party/WebKit/Source/web/WebFontImpl.cpp index c8ec94b..59f06ff 100644 --- a/third_party/WebKit/Source/web/WebFontImpl.cpp +++ b/third_party/WebKit/Source/web/WebFontImpl.cpp @@ -153,7 +153,7 @@ WebRect WebFontImpl::estimateTextBounds(const WebTextRun& run, const WebFloatPoi return WebRect(leftBaseline.x - (fontMetrics.ascent() + fontMetrics.descent()) / 2, leftBaseline.y - fontMetrics.ascent() - fontMetrics.lineGap(), totalWidth + fontMetrics.ascent() + fontMetrics.descent(), - fontMetrics.lineSpacing()); + fontMetrics.lineSpacing()); } } // namespace WebKit diff --git a/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp b/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp index 8eb199a..5a05929 100644 --- a/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp +++ b/third_party/WebKit/Source/web/WebHelperPluginImpl.cpp @@ -92,7 +92,7 @@ private: { // This should never be called since the only way to close the // invisible page is via closeHelperPlugin(). - ASSERT_NOT_REACHED(); + ASSERT_NOT_REACHED(); m_widget->closeHelperPlugin(); } diff --git a/third_party/WebKit/Source/web/WebInputEvent.cpp b/third_party/WebKit/Source/web/WebInputEvent.cpp index ee43091..5b81024 100644 --- a/third_party/WebKit/Source/web/WebInputEvent.cpp +++ b/third_party/WebKit/Source/web/WebInputEvent.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp index 6e21fb8..b61f9ad 100644 --- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp +++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp @@ -124,7 +124,7 @@ PlatformWheelEventBuilder::PlatformWheelEventBuilder(Widget* widget, const WebMo m_wheelTicksY = e.wheelTicksY; m_granularity = e.scrollByPage ? ScrollByPageWheelEvent : ScrollByPixelWheelEvent; - + m_type = PlatformEvent::Wheel; m_modifiers = 0; diff --git a/third_party/WebKit/Source/web/WebPageSerializer.cpp b/third_party/WebKit/Source/web/WebPageSerializer.cpp index 0a9e592..7ca6d8a 100644 --- a/third_party/WebKit/Source/web/WebPageSerializer.cpp +++ b/third_party/WebKit/Source/web/WebPageSerializer.cpp @@ -99,7 +99,7 @@ KURL getSubResourceURLFromElement(Element* element) // Ignore javascript content. if (value.isEmpty() || value.stripWhiteSpace().startsWith("javascript:", false)) return KURL(); - + return element->document()->completeURL(value); } @@ -164,7 +164,7 @@ void retrieveResourcesForFrame(Frame* frame, visitedFrames->append(frame); if (!frameURLs->contains(frameURL)) frameURLs->append(frameURL); - + // Now get the resources associated with each node of the document. RefPtr<HTMLCollection> allNodes = frame->document()->all(); for (unsigned i = 0; i < allNodes->length(); ++i) { @@ -198,7 +198,7 @@ void WebPageSerializer::serialize(WebView* view, WebVector<WebPageSerializer::Re result.append(resource); } - *resourcesParam = result; + *resourcesParam = result; } static PassRefPtr<SharedBuffer> serializePageToMHTML(Page* page, MHTMLArchive::EncodingPolicy encodingPolicy) @@ -248,7 +248,7 @@ bool WebPageSerializer::retrieveAllResources(WebView* view, Vector<Frame*> visitedFrames; Vector<KURL> frameKURLs; Vector<KURL> resourceKURLs; - + // Let's retrieve the resources from every frame in this page. framesToVisit.append(mainFrame->frame()); while (!framesToVisit.isEmpty()) { @@ -274,7 +274,7 @@ bool WebPageSerializer::retrieveAllResources(WebView* view, for (size_t i = 0; i < frameKURLs.size(); ++i) resultFrameURLs[i] = frameKURLs[i]; *frameURLs = resultFrameURLs; - + return true; } diff --git a/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp b/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp index 38e8a1f..41aa2ba 100644 --- a/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp +++ b/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp @@ -327,7 +327,7 @@ void WebPageSerializerImpl::openTagToString(Element* element, else { // Get the absolute link WebFrameImpl* subFrame = WebFrameImpl::fromFrameOwnerElement(element); - String completeURL = subFrame ? subFrame->frame()->document()->url() : + String completeURL = subFrame ? subFrame->frame()->document()->url() : param->document->completeURL(attrValue); // Check whether we have local files for those link. if (m_localLinks.contains(completeURL)) { diff --git a/third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp b/third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp index 53844ce..f4773a78 100644 --- a/third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp +++ b/third_party/WebKit/Source/web/WebScopedMicrotaskSuppression.cpp @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/web/WebSearchableFormData.cpp b/third_party/WebKit/Source/web/WebSearchableFormData.cpp index 31bd3ca..08a51d4 100644 --- a/third_party/WebKit/Source/web/WebSearchableFormData.cpp +++ b/third_party/WebKit/Source/web/WebSearchableFormData.cpp @@ -149,10 +149,10 @@ bool IsInDefaultState(HTMLFormControlElement* formElement) return true; } -// Look for a suitable search text field in a given HTMLFormElement +// Look for a suitable search text field in a given HTMLFormElement // Return nothing if one of those items are found: // - A text area field -// - A file upload field +// - A file upload field // - A Password field // - More than one text field HTMLInputElement* findSuitableSearchInputElement(const HTMLFormElement* form) @@ -192,14 +192,14 @@ HTMLInputElement* findSuitableSearchInputElement(const HTMLFormElement* form) } // Build a search string based on a given HTMLFormElement and HTMLInputElement -// +// // Search string output example from www.google.com: // "hl=en&source=hp&biw=1085&bih=854&q={searchTerms}&btnG=Google+Search&aq=f&aqi=&aql=&oq=" -// +// // Return false if the provided HTMLInputElement is not found in the form bool buildSearchString(const HTMLFormElement* form, Vector<char>* encodedString, WTF::TextEncoding* encoding, const HTMLInputElement* textElement) { - bool isElementFound = false; + bool isElementFound = false; // FIXME: Consider refactoring this code so that we don't call form->associatedElements() twice. for (Vector<FormAssociatedElement*>::const_iterator i(form->associatedElements().begin()); i != form->associatedElements().end(); ++i) { @@ -246,8 +246,8 @@ WebSearchableFormData::WebSearchableFormData(const WebFormElement& form, const W HTMLInputElement* inputElement = selectedInputElement.operator PassRefPtr<HTMLInputElement>().get(); // Only consider forms that GET data. - // Allow HTTPS only when an input element is provided. - if (equalIgnoringCase(formElement->getAttribute(methodAttr), "post") + // Allow HTTPS only when an input element is provided. + if (equalIgnoringCase(formElement->getAttribute(methodAttr), "post") || (!IsHTTPFormSubmit(formElement.get()) && !inputElement)) return; @@ -260,9 +260,9 @@ WebSearchableFormData::WebSearchableFormData(const WebFormElement& form, const W // If the encoding isn't found webkit ends up replacing the params with // empty strings. So, we don't try to do anything here. return; - } + } - // Look for a suitable search text field in the form when a + // Look for a suitable search text field in the form when a // selectedInputElement is not provided. if (!inputElement) { inputElement = findSuitableSearchInputElement(formElement.get()); @@ -285,7 +285,7 @@ WebSearchableFormData::WebSearchableFormData(const WebFormElement& form, const W if (firstSubmitButton) firstSubmitButton->setActivatedSubmit(false); - // Return if the search string is not valid. + // Return if the search string is not valid. if (!isValidSearchString) return; @@ -294,7 +294,7 @@ WebSearchableFormData::WebSearchableFormData(const WebFormElement& form, const W RefPtr<FormData> formData = FormData::create(encodedString); url.setQuery(formData->flattenToString()); m_url = url; - m_encoding = String(encoding.name()); + m_encoding = String(encoding.name()); } } // namespace WebKit diff --git a/third_party/WebKit/Source/web/WebTestingSupport.cpp b/third_party/WebKit/Source/web/WebTestingSupport.cpp index 78455ff..f74f9f0 100644 --- a/third_party/WebKit/Source/web/WebTestingSupport.cpp +++ b/third_party/WebKit/Source/web/WebTestingSupport.cpp @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + #include "config.h" #include "WebTestingSupport.h" diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp index b809f05..5b90681 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.cpp +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp @@ -1834,7 +1834,7 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect, PaintOptions opt FrameView* view = page()->mainFrame()->view(); PaintBehavior oldPaintBehavior = view->paintBehavior(); if (isAcceleratedCompositingActive()) { - ASSERT(option == ForceSoftwareRenderingAndIgnoreGPUResidentContent); + ASSERT(option == ForceSoftwareRenderingAndIgnoreGPUResidentContent); view->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLayers); } @@ -1846,7 +1846,7 @@ void WebViewImpl::paint(WebCanvas* canvas, const WebRect& rect, PaintOptions opt WebKit::Platform::current()->histogramCustomCounts("Renderer4.SoftwarePaintMegapixPerSecond", pixelsPerSec / 1000000, 10, 210, 30); if (isAcceleratedCompositingActive()) { - ASSERT(option == ForceSoftwareRenderingAndIgnoreGPUResidentContent); + ASSERT(option == ForceSoftwareRenderingAndIgnoreGPUResidentContent); view->setPaintBehavior(oldPaintBehavior); } } diff --git a/third_party/WebKit/Source/web/WebWorkerInfo.cpp b/third_party/WebKit/Source/web/WebWorkerInfo.cpp index 3ad0f4a3..896ea67 100644 --- a/third_party/WebKit/Source/web/WebWorkerInfo.cpp +++ b/third_party/WebKit/Source/web/WebWorkerInfo.cpp @@ -35,7 +35,7 @@ namespace WebKit { -unsigned WebWorkerInfo::dedicatedWorkerCount() +unsigned WebWorkerInfo::dedicatedWorkerCount() { return WebCore::WorkerThread::workerThreadCount(); } diff --git a/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.h b/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.h index b52d18e..96ebd35 100644 --- a/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.h +++ b/third_party/WebKit/Source/web/WorkerAsyncFileWriterChromium.h @@ -65,7 +65,7 @@ public: return adoptPtr(new WorkerAsyncFileWriterChromium(webFileSystem, path, workerGlobalScope, client, type)); } ~WorkerAsyncFileWriterChromium(); - + bool waitForOperationToComplete(); // FileWriter diff --git a/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.cpp b/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.cpp index 159cbc6..96aaa33 100644 --- a/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.cpp +++ b/third_party/WebKit/Source/web/WorkerFileWriterCallbacksBridge.cpp @@ -62,7 +62,7 @@ void WorkerFileWriterCallbacksBridge::postWriteToMainThread(long long position, { ASSERT(!m_operationInProgress); m_operationInProgress = true; - dispatchTaskToMainThread(createCallbackTask(&writeOnMainThread, + dispatchTaskToMainThread(createCallbackTask(&writeOnMainThread, this, position, data)); } @@ -70,7 +70,7 @@ void WorkerFileWriterCallbacksBridge::postTruncateToMainThread(long long length) { ASSERT(!m_operationInProgress); m_operationInProgress = true; - dispatchTaskToMainThread(createCallbackTask(&truncateOnMainThread, + dispatchTaskToMainThread(createCallbackTask(&truncateOnMainThread, this, length)); } diff --git a/third_party/WebKit/Source/web/tests/IDBBindingUtilitiesTest.cpp b/third_party/WebKit/Source/web/tests/IDBBindingUtilitiesTest.cpp index 41dc1ab..d033c93 100644 --- a/third_party/WebKit/Source/web/tests/IDBBindingUtilitiesTest.cpp +++ b/third_party/WebKit/Source/web/tests/IDBBindingUtilitiesTest.cpp @@ -50,7 +50,7 @@ PassRefPtr<IDBKey> checkKeyFromValueAndKeyPathInternal(const ScriptValue& value, { IDBKeyPath idbKeyPath(keyPath); EXPECT_TRUE(idbKeyPath.isValid()); - + return createIDBKeyFromScriptValueAndKeyPath(0, value, idbKeyPath); } diff --git a/third_party/WebKit/Source/web/tests/PrerenderingTest.cpp b/third_party/WebKit/Source/web/tests/PrerenderingTest.cpp index 07eb47d..39001c1 100644 --- a/third_party/WebKit/Source/web/tests/PrerenderingTest.cpp +++ b/third_party/WebKit/Source/web/tests/PrerenderingTest.cpp @@ -81,7 +81,7 @@ public: m_webPrerenders.pop_front(); return retval; } - + bool empty() const { return m_webPrerenders.empty(); @@ -129,7 +129,7 @@ public: { return m_addedPrerenders.size() + m_canceledPrerenders.size() + m_abandonedPrerenders.size(); } - + size_t addCount(const WebPrerender& prerender) const { return std::count_if(m_addedPrerenders.begin(), m_addedPrerenders.end(), std::bind1st(WebPrerenderEqual(), prerender)); @@ -187,7 +187,7 @@ public: if (m_webView) close(); } - + void initialize(const char* baseURL, const char* fileName) { ASSERT(!m_webView); @@ -239,7 +239,7 @@ public: WebNode textNode = consoleListItem.firstChild(); ASSERT(textNode.nodeName() == "#text"); - + return textNode.nodeValue().utf8().data(); } @@ -304,7 +304,7 @@ TEST_F(PrerenderingTest, CancelPrerender) EXPECT_EQ(1u, prerenderingSupport()->totalCount()); executeScript("removePrerender()"); - + EXPECT_EQ(1u, prerenderingSupport()->cancelCount(webPrerender)); EXPECT_EQ(2u, prerenderingSupport()->totalCount()); } @@ -320,7 +320,7 @@ TEST_F(PrerenderingTest, AbandonPrerender) EXPECT_EQ(1u, prerenderingSupport()->totalCount()); navigateAway(); - + EXPECT_EQ(1u, prerenderingSupport()->abandonCount(webPrerender)); EXPECT_EQ(2u, prerenderingSupport()->totalCount()); } @@ -358,7 +358,7 @@ TEST_F(PrerenderingTest, ExtraData) TEST_F(PrerenderingTest, TwoPrerenders) { initialize("http://www.foo.com/", "prerender/multiple_prerenders.html"); - + WebPrerender firstPrerender = prerendererClient()->releaseWebPrerender(); EXPECT_FALSE(firstPrerender.isNull()); EXPECT_EQ(toWebURL("http://first-prerender.com/"), firstPrerender.url()); @@ -383,7 +383,7 @@ TEST_F(PrerenderingTest, TwoPrerenders) TEST_F(PrerenderingTest, TwoPrerendersRemovingFirstThenNavigating) { initialize("http://www.foo.com/", "prerender/multiple_prerenders.html"); - + WebPrerender firstPrerender = prerendererClient()->releaseWebPrerender(); WebPrerender secondPrerender = prerendererClient()->releaseWebPrerender(); @@ -406,7 +406,7 @@ TEST_F(PrerenderingTest, TwoPrerendersRemovingFirstThenNavigating) TEST_F(PrerenderingTest, TwoPrerendersAddingThird) { initialize("http://www.foo.com/", "prerender/multiple_prerenders.html"); - + WebPrerender firstPrerender = prerendererClient()->releaseWebPrerender(); WebPrerender secondPrerender = prerendererClient()->releaseWebPrerender(); diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp index 1bcee0f..96601bb 100644 --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp @@ -238,7 +238,7 @@ TEST_F(WebFrameTest, FormWithNullFrame) TEST_F(WebFrameTest, ChromePageJavascript) { registerMockedChromeURLLoad("history.html"); - + // Pass true to enable JavaScript. m_webView = FrameTestHelpers::createWebViewAndLoad(m_chromeURL + "history.html", true); @@ -278,7 +278,7 @@ TEST_F(WebFrameTest, DispatchMessageEventWithOriginCheck) // Pass true to enable JavaScript. m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "postmessage_test.html", true); - + // Send a message with the correct origin. WebSecurityOrigin correctOrigin(WebSecurityOrigin::create(toKURL(m_baseURL))); WebDOMEvent event = m_webView->mainFrame()->document().createEvent("MessageEvent"); @@ -1955,13 +1955,13 @@ public: { } - virtual void didCreateFrame(WebFrame* parent, WebFrame* child) + virtual void didCreateFrame(WebFrame* parent, WebFrame* child) { m_frameCount++; if (!m_parent) m_parent = parent; } - + int m_frameCount; WebFrame* m_parent; }; @@ -1976,7 +1976,7 @@ TEST_F(WebFrameTest, DidCreateFrame) TestDidCreateFrameWebFrameClient webFrameClient; m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "iframes_test.html", false, &webFrameClient); - EXPECT_EQ(webFrameClient.m_frameCount, 3); + EXPECT_EQ(webFrameClient.m_frameCount, 3); EXPECT_EQ(webFrameClient.m_parent, m_webView->mainFrame()); m_webView->close(); @@ -3176,7 +3176,7 @@ public: EXPECT_TRUE(!m_didAccessInitialDocument); m_didAccessInitialDocument = true; } - + bool m_didAccessInitialDocument; }; diff --git a/third_party/WebKit/Source/weborigin/KURL.h b/third_party/WebKit/Source/weborigin/KURL.h index 5515aff..491849a 100644 --- a/third_party/WebKit/Source/weborigin/KURL.h +++ b/third_party/WebKit/Source/weborigin/KURL.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef KURL_h diff --git a/third_party/WebKit/Source/weborigin/KURLHash.h b/third_party/WebKit/Source/weborigin/KURLHash.h index 0cca6c6..0906282 100644 --- a/third_party/WebKit/Source/weborigin/KURLHash.h +++ b/third_party/WebKit/Source/weborigin/KURLHash.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef KURLHash_h diff --git a/third_party/WebKit/Source/wtf/ASCIICType.h b/third_party/WebKit/Source/wtf/ASCIICType.h index 0e69f38..9e19d3c 100644 --- a/third_party/WebKit/Source/wtf/ASCIICType.h +++ b/third_party/WebKit/Source/wtf/ASCIICType.h @@ -6,13 +6,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/Alignment.h b/third_party/WebKit/Source/wtf/Alignment.h index 1fd01ef..6678728 100644 --- a/third_party/WebKit/Source/wtf/Alignment.h +++ b/third_party/WebKit/Source/wtf/Alignment.h @@ -39,9 +39,9 @@ namespace WTF { #endif #if COMPILER(GCC) - typedef char __attribute__((__may_alias__)) AlignedBufferChar; + typedef char __attribute__((__may_alias__)) AlignedBufferChar; #else - typedef char AlignedBufferChar; + typedef char AlignedBufferChar; #endif template<size_t size, size_t alignment> struct AlignedBuffer; diff --git a/third_party/WebKit/Source/wtf/ArrayBuffer.cpp b/third_party/WebKit/Source/wtf/ArrayBuffer.cpp index 78616e1..d5b0a24 100644 --- a/third_party/WebKit/Source/wtf/ArrayBuffer.cpp +++ b/third_party/WebKit/Source/wtf/ArrayBuffer.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/wtf/ArrayBuffer.h b/third_party/WebKit/Source/wtf/ArrayBuffer.h index 0306f12..1c5910f 100644 --- a/third_party/WebKit/Source/wtf/ArrayBuffer.h +++ b/third_party/WebKit/Source/wtf/ArrayBuffer.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ArrayBuffer_h diff --git a/third_party/WebKit/Source/wtf/ArrayBufferView.cpp b/third_party/WebKit/Source/wtf/ArrayBufferView.cpp index 66759de..6c2c9bc 100644 --- a/third_party/WebKit/Source/wtf/ArrayBufferView.cpp +++ b/third_party/WebKit/Source/wtf/ArrayBufferView.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -38,7 +38,7 @@ ArrayBufferView::ArrayBufferView(PassRefPtr<ArrayBuffer> buffer, , m_nextView(0) { m_baseAddress = m_buffer ? (static_cast<char*>(m_buffer->data()) + m_byteOffset) : 0; - if (m_buffer) + if (m_buffer) m_buffer->addView(this); } diff --git a/third_party/WebKit/Source/wtf/ArrayBufferView.h b/third_party/WebKit/Source/wtf/ArrayBufferView.h index 769f5b6..21698b3 100644 --- a/third_party/WebKit/Source/wtf/ArrayBufferView.h +++ b/third_party/WebKit/Source/wtf/ArrayBufferView.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ArrayBufferView_h @@ -145,7 +145,7 @@ bool ArrayBufferView::setImpl(ArrayBufferView* array, unsigned byteOffset) // Out of range offset or overflow return false; } - + char* base = static_cast<char*>(baseAddress()); memmove(base + byteOffset, array->baseAddress(), array->byteLength()); return true; @@ -159,7 +159,7 @@ bool ArrayBufferView::setRangeImpl(const char* data, size_t dataByteLength, unsi // Out of range offset or overflow return false; } - + char* base = static_cast<char*>(baseAddress()); memmove(base + byteOffset, data, dataByteLength); return true; @@ -173,7 +173,7 @@ bool ArrayBufferView::zeroRangeImpl(unsigned byteOffset, size_t rangeByteLength) // Out of range offset or overflow return false; } - + char* base = static_cast<char*>(baseAddress()); memset(base + byteOffset, 0, rangeByteLength); return true; diff --git a/third_party/WebKit/Source/wtf/Assertions.h b/third_party/WebKit/Source/wtf/Assertions.h index 5508bfd..2382c08 100644 --- a/third_party/WebKit/Source/wtf/Assertions.h +++ b/third_party/WebKit/Source/wtf/Assertions.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_Assertions_h @@ -97,7 +97,7 @@ #if COMPILER(GCC) && !defined(__OBJC__) #define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(printf, formatStringArgument, extraArguments))) #else -#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) +#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) #endif /* These helper functions are always declared, but not necessarily always defined if the corresponding function is disabled. */ diff --git a/third_party/WebKit/Source/wtf/Atomics.h b/third_party/WebKit/Source/wtf/Atomics.h index a26c972..81df4e3 100644 --- a/third_party/WebKit/Source/wtf/Atomics.h +++ b/third_party/WebKit/Source/wtf/Atomics.h @@ -7,13 +7,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/AutodrainedPool.h b/third_party/WebKit/Source/wtf/AutodrainedPool.h index 2f84cff..1addbb2 100644 --- a/third_party/WebKit/Source/wtf/AutodrainedPool.h +++ b/third_party/WebKit/Source/wtf/AutodrainedPool.h @@ -6,13 +6,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -42,14 +42,14 @@ public: #if OS(DARWIN) WTF_EXPORT explicit AutodrainedPool(int iterationLimit = 1); WTF_EXPORT ~AutodrainedPool(); - + WTF_EXPORT void cycle(); #else AutodrainedPool() { } ~AutodrainedPool() { } void cycle() { } #endif - + private: #if OS(DARWIN) int m_iterationLimit; diff --git a/third_party/WebKit/Source/wtf/BitArray.h b/third_party/WebKit/Source/wtf/BitArray.h index 05f0845..f109515 100644 --- a/third_party/WebKit/Source/wtf/BitArray.h +++ b/third_party/WebKit/Source/wtf/BitArray.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef BitArray_h diff --git a/third_party/WebKit/Source/wtf/BitVector.cpp b/third_party/WebKit/Source/wtf/BitVector.cpp index 43fad98..92299d9 100644 --- a/third_party/WebKit/Source/wtf/BitVector.cpp +++ b/third_party/WebKit/Source/wtf/BitVector.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -54,13 +54,13 @@ void BitVector::resize(size_t numBits) if (numBits <= maxInlineBits()) { if (isInline()) return; - + OutOfLineBits* myOutOfLineBits = outOfLineBits(); m_bitsOrPointer = makeInlineBits(*myOutOfLineBits->bits()); OutOfLineBits::destroy(myOutOfLineBits); return; } - + resizeOutOfLine(numBits); } diff --git a/third_party/WebKit/Source/wtf/BitVector.h b/third_party/WebKit/Source/wtf/BitVector.h index 6d386b0..556dff0 100644 --- a/third_party/WebKit/Source/wtf/BitVector.h +++ b/third_party/WebKit/Source/wtf/BitVector.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef BitVector_h @@ -56,32 +56,32 @@ namespace WTF { // space. class WTF_EXPORT BitVector { -public: +public: BitVector() : m_bitsOrPointer(makeInlineBits(0)) { } - + explicit BitVector(size_t numBits) : m_bitsOrPointer(makeInlineBits(0)) { ensureSize(numBits); } - + BitVector(const BitVector& other) : m_bitsOrPointer(makeInlineBits(0)) { (*this) = other; } - + ~BitVector() { if (isInline()) return; OutOfLineBits::destroy(outOfLineBits()); } - + BitVector& operator=(const BitVector& other) { if (isInline() && other.isInline()) @@ -104,10 +104,10 @@ public: return; resizeOutOfLine(numBits); } - + // Like ensureSize(), but supports reducing the size of the bitvector. void resize(size_t numBits); - + void clearAll(); bool quickGet(size_t bit) const @@ -115,19 +115,19 @@ public: ASSERT_WITH_SECURITY_IMPLICATION(bit < size()); return !!(bits()[bit / bitsInPointer()] & (static_cast<uintptr_t>(1) << (bit & (bitsInPointer() - 1)))); } - + void quickSet(size_t bit) { ASSERT_WITH_SECURITY_IMPLICATION(bit < size()); bits()[bit / bitsInPointer()] |= (static_cast<uintptr_t>(1) << (bit & (bitsInPointer() - 1))); } - + void quickClear(size_t bit) { ASSERT_WITH_SECURITY_IMPLICATION(bit < size()); bits()[bit / bitsInPointer()] &= ~(static_cast<uintptr_t>(1) << (bit & (bitsInPointer() - 1))); } - + void quickSet(size_t bit, bool value) { if (value) @@ -135,14 +135,14 @@ public: else quickClear(bit); } - + bool get(size_t bit) const { if (bit >= size()) return false; return quickGet(bit); } - + void set(size_t bit) { ensureSize(bit + 1); @@ -161,7 +161,7 @@ public: return; quickClear(bit); } - + void set(size_t bit, bool value) { if (value) @@ -169,9 +169,9 @@ public: else clear(bit); } - + void dump(PrintStream& out); - + private: static unsigned bitsInPointer() { @@ -193,16 +193,16 @@ private: ASSERT(!(bits & (static_cast<uintptr_t>(1) << maxInlineBits()))); return bits | (static_cast<uintptr_t>(1) << maxInlineBits()); } - + class OutOfLineBits { public: size_t numBits() const { return m_numBits; } size_t numWords() const { return (m_numBits + bitsInPointer() - 1) / bitsInPointer(); } uintptr_t* bits() { return bitwise_cast<uintptr_t*>(this + 1); } const uintptr_t* bits() const { return bitwise_cast<const uintptr_t*>(this + 1); } - + static OutOfLineBits* create(size_t numBits); - + static void destroy(OutOfLineBits*); private: @@ -210,32 +210,32 @@ private: : m_numBits(numBits) { } - + size_t m_numBits; }; - + bool isInline() const { return m_bitsOrPointer >> maxInlineBits(); } - + const OutOfLineBits* outOfLineBits() const { return bitwise_cast<const OutOfLineBits*>(m_bitsOrPointer << 1); } OutOfLineBits* outOfLineBits() { return bitwise_cast<OutOfLineBits*>(m_bitsOrPointer << 1); } - + void resizeOutOfLine(size_t numBits); void setSlow(const BitVector& other); - + uintptr_t* bits() { if (isInline()) return &m_bitsOrPointer; return outOfLineBits()->bits(); } - + const uintptr_t* bits() const { if (isInline()) return &m_bitsOrPointer; return outOfLineBits()->bits(); } - + uintptr_t m_bitsOrPointer; }; diff --git a/third_party/WebKit/Source/wtf/BloomFilter.h b/third_party/WebKit/Source/wtf/BloomFilter.h index 333687d..72f4d66 100644 --- a/third_party/WebKit/Source/wtf/BloomFilter.h +++ b/third_party/WebKit/Source/wtf/BloomFilter.h @@ -32,7 +32,7 @@ namespace WTF { // Counting bloom filter with k=2 and 8 bit counters. Uses 2^keyBits bytes of memory. -// False positive rate is approximately (1-e^(-2n/m))^2, where n is the number of unique +// False positive rate is approximately (1-e^(-2n/m))^2, where n is the number of unique // keys and m is the table size (==2^keyBits). template <unsigned keyBits> class BloomFilter { @@ -42,7 +42,7 @@ public: static const size_t tableSize = 1 << keyBits; static const unsigned keyMask = (1 << keyBits) - 1; static uint8_t maximumCount() { return std::numeric_limits<uint8_t>::max(); } - + BloomFilter() { clear(); } void add(unsigned hash); @@ -51,7 +51,7 @@ public: // The filter may give false positives (claim it may contain a key it doesn't) // but never false negatives (claim it doesn't contain a key it does). bool mayContain(unsigned hash) const { return firstSlot(hash) && secondSlot(hash); } - + // The filter must be cleared before reuse even if all keys are removed. // Otherwise overflowed keys will stick around. void clear(); @@ -78,7 +78,7 @@ private: uint8_t m_table[tableSize]; }; - + template <unsigned keyBits> inline void BloomFilter<keyBits>::add(unsigned hash) { @@ -103,7 +103,7 @@ inline void BloomFilter<keyBits>::remove(unsigned hash) if (LIKELY(second < maximumCount())) --second; } - + template <unsigned keyBits> inline void BloomFilter<keyBits>::clear() { diff --git a/third_party/WebKit/Source/wtf/CheckedArithmetic.h b/third_party/WebKit/Source/wtf/CheckedArithmetic.h index e16abb7..e2e1ba0 100644 --- a/third_party/WebKit/Source/wtf/CheckedArithmetic.h +++ b/third_party/WebKit/Source/wtf/CheckedArithmetic.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CheckedArithmetic_h @@ -72,7 +72,7 @@ ENUM_CLASS(CheckedState) DidOverflow, DidNotOverflow } ENUM_CLASS_END(CheckedState); - + class CrashOnOverflow { protected: NO_RETURN_DUE_TO_CRASH void overflowed() @@ -141,7 +141,7 @@ template <typename Target, typename Source> struct BoundsChecker<Target, Source, return false; // If our (unsigned) Target is the same or greater width we can // convert value to type Target without losing precision - if (sizeof(Target) >= sizeof(Source)) + if (sizeof(Target) >= sizeof(Source)) return static_cast<Target>(value) <= std::numeric_limits<Target>::max(); // The signed Source type has greater precision than the target so // max(Target) -> Source will widen. @@ -153,7 +153,7 @@ template <typename Target, typename Source> struct BoundsChecker<Target, Source, static bool inBounds(Source value) { // Signed target with an unsigned source - if (sizeof(Target) <= sizeof(Source)) + if (sizeof(Target) <= sizeof(Source)) return value <= static_cast<Source>(std::numeric_limits<Target>::max()); // Target is Wider than Source so we're guaranteed to fit any value in // unsigned Source @@ -175,7 +175,7 @@ template <typename Target, typename Source> static inline bool isInBounds(Source template <typename T> struct RemoveChecked { typedef T CleanType; - static const CleanType DefaultValue = 0; + static const CleanType DefaultValue = 0; }; template <typename T> struct RemoveChecked<Checked<T, CrashOnOverflow> > { @@ -227,7 +227,7 @@ template <typename U, typename V> struct ResultBase<U, V, false, true> { template <typename U, typename V> struct Result : ResultBase<typename RemoveChecked<U>::CleanType, typename RemoveChecked<V>::CleanType> { }; -template <typename LHS, typename RHS, typename ResultType = typename Result<LHS, RHS>::ResultType, +template <typename LHS, typename RHS, typename ResultType = typename Result<LHS, RHS>::ResultType, bool lhsSigned = std::numeric_limits<LHS>::is_signed, bool rhsSigned = std::numeric_limits<RHS>::is_signed> struct ArithmeticOperations; template <typename LHS, typename RHS, typename ResultType> struct ArithmeticOperations<LHS, RHS, ResultType, true, true> { @@ -346,7 +346,7 @@ template <typename ResultType> struct ArithmeticOperations<int, unsigned, Result result = static_cast<ResultType>(temp); return true; } - + static inline bool sub(int64_t lhs, int64_t rhs, ResultType& result) { int64_t temp = lhs - rhs; @@ -380,7 +380,7 @@ template <typename ResultType> struct ArithmeticOperations<unsigned, int, Result { return ArithmeticOperations<int, unsigned, ResultType>::add(rhs, lhs, result); } - + static inline bool sub(int64_t lhs, int64_t rhs, ResultType& result) { return ArithmeticOperations<int, unsigned, ResultType>::sub(lhs, rhs, result); @@ -418,7 +418,7 @@ template <typename U, typename V> static inline bool safeEquals(U lhs, V rhs) } enum ResultOverflowedTag { ResultOverflowed }; - + // FIXME: Needed to workaround http://llvm.org/bugs/show_bug.cgi?id=10801 static inline bool workAroundClangBug() { return true; } @@ -444,14 +444,14 @@ public: this->overflowed(); m_value = static_cast<T>(value); } - + template <typename V> Checked(const Checked<T, V>& rhs) : m_value(rhs.m_value) { if (rhs.hasOverflowed()) this->overflowed(); } - + template <typename U> Checked(const Checked<U, OverflowHandler>& rhs) : OverflowHandler(rhs) { @@ -459,7 +459,7 @@ public: this->overflowed(); m_value = static_cast<T>(rhs.m_value); } - + template <typename U, typename V> Checked(const Checked<U, V>& rhs) { if (rhs.hasOverflowed()) @@ -468,7 +468,7 @@ public: this->overflowed(); m_value = static_cast<T>(rhs.m_value); } - + const Checked& operator=(Checked rhs) { this->clearOverflow(); @@ -477,17 +477,17 @@ public: m_value = static_cast<T>(rhs.m_value); return *this; } - + template <typename U> const Checked& operator=(U value) { return *this = Checked(value); } - + template <typename U, typename V> const Checked& operator=(const Checked<U, V>& rhs) { return *this = Checked(rhs); } - + // prefix const Checked& operator++() { @@ -496,7 +496,7 @@ public: m_value++; return *this; } - + const Checked& operator--() { if (m_value == std::numeric_limits<T>::min()) @@ -504,7 +504,7 @@ public: m_value--; return *this; } - + // postfix operators const Checked operator++(int) { @@ -512,14 +512,14 @@ public: this->overflowed(); return Checked(m_value++); } - + const Checked operator--(int) { if (m_value == std::numeric_limits<T>::min()) this->overflowed(); return Checked(m_value--); } - + // Boolean operators bool operator!() const { @@ -543,7 +543,7 @@ public: CRASH(); return m_value; } - + inline CheckedState safeGet(T& value) const WARN_UNUSED_RETURN { value = m_value; @@ -588,7 +588,7 @@ public: { return *this *= (double)rhs; } - + template <typename U, typename V> const Checked operator+=(Checked<U, V> rhs) { if (rhs.hasOverflowed()) @@ -622,7 +622,7 @@ public: this->overflowed(); return safeEquals(m_value, rhs); } - + template <typename U, typename V> const Checked operator==(Checked<U, V> rhs) { return unsafeGet() == Checked(rhs.unsafeGet()); diff --git a/third_party/WebKit/Source/wtf/Compiler.h b/third_party/WebKit/Source/wtf/Compiler.h index 6c52da8..231cbd2 100644 --- a/third_party/WebKit/Source/wtf/Compiler.h +++ b/third_party/WebKit/Source/wtf/Compiler.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_Compiler_h diff --git a/third_party/WebKit/Source/wtf/DataLog.cpp b/third_party/WebKit/Source/wtf/DataLog.cpp index e36204e..cba3567 100644 --- a/third_party/WebKit/Source/wtf/DataLog.cpp +++ b/third_party/WebKit/Source/wtf/DataLog.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -70,7 +70,7 @@ static void initializeLogFileOnce() #endif // DATA_LOG_TO_FILE if (!file) file = new FilePrintStream(stderr, FilePrintStream::Borrow); - + setvbuf(file->file(), 0, _IONBF, 0); // Prefer unbuffered output, so that we get a full log upon crash or deadlock. } diff --git a/third_party/WebKit/Source/wtf/DataLog.h b/third_party/WebKit/Source/wtf/DataLog.h index 2550e2f..d0682e9 100644 --- a/third_party/WebKit/Source/wtf/DataLog.h +++ b/third_party/WebKit/Source/wtf/DataLog.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DataLog_h diff --git a/third_party/WebKit/Source/wtf/DateMath.cpp b/third_party/WebKit/Source/wtf/DateMath.cpp index 9eb23c7..b632763 100644 --- a/third_party/WebKit/Source/wtf/DateMath.cpp +++ b/third_party/WebKit/Source/wtf/DateMath.cpp @@ -575,7 +575,7 @@ static char* parseES5DatePortion(const char* currentPosition, int& year, long& m if (*postParsePosition != '-') return postParsePosition; currentPosition = postParsePosition + 1; - + if (!isASCIIDigit(*currentPosition)) return 0; if (!parseLong(currentPosition, &postParsePosition, 10, &month)) @@ -587,7 +587,7 @@ static char* parseES5DatePortion(const char* currentPosition, int& year, long& m if (*postParsePosition != '-') return postParsePosition; currentPosition = postParsePosition + 1; - + if (!isASCIIDigit(*currentPosition)) return 0; if (!parseLong(currentPosition, &postParsePosition, 10, &day)) @@ -610,7 +610,7 @@ static char* parseES5TimePortion(char* currentPosition, long& hours, long& minut if (*postParsePosition != ':' || (postParsePosition - currentPosition) != 2) return 0; currentPosition = postParsePosition + 1; - + if (!isASCIIDigit(*currentPosition)) return 0; if (!parseLong(currentPosition, &postParsePosition, 10, &minutes)) @@ -622,7 +622,7 @@ static char* parseES5TimePortion(char* currentPosition, long& hours, long& minut // Seconds are optional. if (*currentPosition == ':') { ++currentPosition; - + long intSeconds; if (!isASCIIDigit(*currentPosition)) return 0; @@ -633,18 +633,18 @@ static char* parseES5TimePortion(char* currentPosition, long& hours, long& minut seconds = intSeconds; if (*postParsePosition == '.') { currentPosition = postParsePosition + 1; - + // In ECMA-262-5 it's a bit unclear if '.' can be present without milliseconds, but // a reasonable interpretation guided by the given examples and RFC 3339 says "no". // We check the next character to avoid reading +/- timezone hours after an invalid decimal. if (!isASCIIDigit(*currentPosition)) return 0; - + // We are more lenient than ES5 by accepting more or less than 3 fraction digits. long fracSeconds; if (!parseLong(currentPosition, &postParsePosition, 10, &fracSeconds)) return 0; - + long numFracDigits = postParsePosition - currentPosition; seconds += fracSeconds * pow(10.0, static_cast<double>(-numFracDigits)); } @@ -662,11 +662,11 @@ static char* parseES5TimePortion(char* currentPosition, long& hours, long& minut else return currentPosition; // no timezone ++currentPosition; - + long tzHours; long tzHoursAbs; long tzMinutes; - + if (!isASCIIDigit(*currentPosition)) return 0; if (!parseLong(currentPosition, &postParsePosition, 10, &tzHours)) @@ -675,7 +675,7 @@ static char* parseES5TimePortion(char* currentPosition, long& hours, long& minut return 0; tzHoursAbs = labs(tzHours); currentPosition = postParsePosition + 1; - + if (!isASCIIDigit(*currentPosition)) return 0; if (!parseLong(currentPosition, &postParsePosition, 10, &tzMinutes)) @@ -683,12 +683,12 @@ static char* parseES5TimePortion(char* currentPosition, long& hours, long& minut if ((postParsePosition - currentPosition) != 2) return 0; currentPosition = postParsePosition; - + if (tzHoursAbs > 24) return 0; if (tzMinutes < 0 || tzMinutes > 59) return 0; - + timeZoneSeconds = 60 * (tzMinutes + (60 * tzHoursAbs)); if (tzNegative) timeZoneSeconds = -timeZoneSeconds; @@ -701,9 +701,9 @@ double parseES5DateFromNullTerminatedCharacters(const char* dateString) // This parses a date of the form defined in ECMA-262-5, section 15.9.1.15 // (similar to RFC 3339 / ISO 8601: YYYY-MM-DDTHH:mm:ss[.sss]Z). // In most cases it is intentionally strict (e.g. correct field widths, no stray whitespace). - + static const long daysPerMonth[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; - + // The year must be present, but the other fields may be omitted - see ES5.1 15.9.1.15. int year = 0; long month = 1; @@ -748,7 +748,7 @@ double parseES5DateFromNullTerminatedCharacters(const char* dateString) // Discard leap seconds by clamping to the end of a minute. seconds = 60; } - + double dateSeconds = ymdhmsToSeconds(year, month, day, hours, minutes, seconds) - timeZoneSeconds; return dateSeconds * msPerSecond; } @@ -772,7 +772,7 @@ double parseDateFromNullTerminatedCharacters(const char* dateString, bool& haveT // [Wednesday] January 09 23:12:40 GMT 1999 // // We ignore the weekday. - + // Skip leading space skipSpacesAndComments(dateString); @@ -960,7 +960,7 @@ double parseDateFromNullTerminatedCharacters(const char* dateString, bool& haveT } } } - + // The year may be after the time but before the time zone. if (isASCIIDigit(*dateString) && year == -1) { if (!parseInt(dateString, &newPosStr, 10, &year)) @@ -969,7 +969,7 @@ double parseDateFromNullTerminatedCharacters(const char* dateString, bool& haveT skipSpacesAndComments(dateString); } - // Don't fail if the time zone is missing. + // Don't fail if the time zone is missing. // Some websites omit the time zone (4275206). if (*dateString) { if (strncasecmp(dateString, "GMT", 3) == 0 || strncasecmp(dateString, "UTC", 3) == 0) { @@ -1034,7 +1034,7 @@ double parseDateFromNullTerminatedCharacters(const char* dateString, bool& haveT else year += 1900; } - + return ymdhmsToSeconds(year, month + 1, day, hour, minute, second) * msPerSecond; } diff --git a/third_party/WebKit/Source/wtf/DateMath.h b/third_party/WebKit/Source/wtf/DateMath.h index 30d60ae..08fd3cb 100644 --- a/third_party/WebKit/Source/wtf/DateMath.h +++ b/third_party/WebKit/Source/wtf/DateMath.h @@ -65,7 +65,7 @@ WTF_EXPORT double parseES5DateFromNullTerminatedCharacters(const char* dateStrin WTF_EXPORT double parseDateFromNullTerminatedCharacters(const char* dateString); WTF_EXPORT double parseDateFromNullTerminatedCharacters(const char* dateString, bool& haveTZ, int& offset); WTF_EXPORT double timeClip(double); -// dayOfWeek: [0, 6] 0 being Monday, day: [1, 31], month: [0, 11], year: ex: 2011, hours: [0, 23], minutes: [0, 59], seconds: [0, 59], utcOffset: [-720,720]. +// dayOfWeek: [0, 6] 0 being Monday, day: [1, 31], month: [0, 11], year: ex: 2011, hours: [0, 23], minutes: [0, 59], seconds: [0, 59], utcOffset: [-720,720]. WTF_EXPORT String makeRFC2822DateString(unsigned dayOfWeek, unsigned day, unsigned month, unsigned year, unsigned hours, unsigned minutes, unsigned seconds, int utcOffset); inline double jsCurrentTime() diff --git a/third_party/WebKit/Source/wtf/DecimalNumber.cpp b/third_party/WebKit/Source/wtf/DecimalNumber.cpp index 03e2fde1..75525a7 100644 --- a/third_party/WebKit/Source/wtf/DecimalNumber.cpp +++ b/third_party/WebKit/Source/wtf/DecimalNumber.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/wtf/DecimalNumber.h b/third_party/WebKit/Source/wtf/DecimalNumber.h index dd68d67..2008dad5 100644 --- a/third_party/WebKit/Source/wtf/DecimalNumber.h +++ b/third_party/WebKit/Source/wtf/DecimalNumber.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef DecimalNumber_h diff --git a/third_party/WebKit/Source/wtf/DoublyLinkedList.h b/third_party/WebKit/Source/wtf/DoublyLinkedList.h index cd067ef..1c82226 100644 --- a/third_party/WebKit/Source/wtf/DoublyLinkedList.h +++ b/third_party/WebKit/Source/wtf/DoublyLinkedList.h @@ -32,10 +32,10 @@ namespace WTF { template<typename T> class DoublyLinkedListNode { public: DoublyLinkedListNode(); - + void setPrev(T*); void setNext(T*); - + T* prev() const; T* next() const; }; @@ -69,7 +69,7 @@ template<typename T> inline T* DoublyLinkedListNode<T>::next() const template<typename T> class DoublyLinkedList { public: DoublyLinkedList(); - + bool isEmpty() const; size_t size() const; // This is O(n). void clear(); diff --git a/third_party/WebKit/Source/wtf/EnumClass.h b/third_party/WebKit/Source/wtf/EnumClass.h index b268f1b..33e3884 100644 --- a/third_party/WebKit/Source/wtf/EnumClass.h +++ b/third_party/WebKit/Source/wtf/EnumClass.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_EnumClass_h diff --git a/third_party/WebKit/Source/wtf/FastMalloc.cpp b/third_party/WebKit/Source/wtf/FastMalloc.cpp index 6754d93..f2b882d 100644 --- a/third_party/WebKit/Source/wtf/FastMalloc.cpp +++ b/third_party/WebKit/Source/wtf/FastMalloc.cpp @@ -1,11 +1,11 @@ // Copyright (c) 2005, 2007, Google Inc. // All rights reserved. // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: -// +// // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above @@ -15,7 +15,7 @@ // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -201,7 +201,7 @@ NO_RETURN_DUE_TO_CRASH void fastMallocMatchFailed(void*) } // namespace Internal -void* fastZeroedMalloc(size_t n) +void* fastZeroedMalloc(size_t n) { void* result = fastMalloc(n); memset(result, 0, n); @@ -216,7 +216,7 @@ char* fastStrDup(const char* src) return dup; } -TryMallocReturnValue tryFastZeroedMalloc(size_t n) +TryMallocReturnValue tryFastZeroedMalloc(size_t n) { void* result; if (!tryFastMalloc(n).getValue(result)) @@ -246,7 +246,7 @@ size_t fastMallocGoodSize(size_t bytes) #endif } -TryMallocReturnValue tryFastMalloc(size_t n) +TryMallocReturnValue tryFastMalloc(size_t n) { ASSERT(!isForbidden()); @@ -270,7 +270,7 @@ TryMallocReturnValue tryFastMalloc(size_t n) #endif } -void* fastMalloc(size_t n) +void* fastMalloc(size_t n) { ASSERT(!isForbidden()); @@ -334,7 +334,7 @@ void fastFree(void* p) #if ENABLE(WTF_MALLOC_VALIDATION) if (!p) return; - + fastMallocMatchValidateFree(p, Internal::AllocTypeMalloc); Internal::ValidationHeader* header = Internal::fastMallocValidationHeader(p); memset(p, 0xCC, header->m_size); @@ -388,7 +388,7 @@ void* fastRealloc(void* p, size_t n) } void releaseFastMallocFreeMemory() { } - + FastMallocStatistics fastMallocStatistics() { FastMallocStatistics statistics = { 0, 0, 0 }; @@ -471,10 +471,10 @@ static void* (*pthread_getspecific_function_pointer)(pthread_key_t) = pthread_ge char FLAGS_no##name; \ } \ using FLAG__namespace_do_not_use_directly_use_DECLARE_##type##_instead::FLAGS_##name - + #define DEFINE_int64(name, value, meaning) \ DEFINE_VARIABLE(int64_t, name, value, meaning) - + #define DEFINE_double(name, value, meaning) \ DEFINE_VARIABLE(double, name, value, meaning) @@ -520,7 +520,7 @@ enum { MaskKeyShift = 13 }; -static ALWAYS_INLINE uintptr_t internalEntropyValue() +static ALWAYS_INLINE uintptr_t internalEntropyValue() { static uintptr_t value = EntropySource<sizeof(uintptr_t)>::value() | 1; ASSERT(value); @@ -1517,7 +1517,7 @@ template <int BITS> class MapSelector { }; #if CPU(X86_64) -// On all known X86-64 platforms, the upper 16 bits are always unused and therefore +// On all known X86-64 platforms, the upper 16 bits are always unused and therefore // can be excluded from the PageMap key. // See http://en.wikipedia.org/wiki/X86-64#Virtual_address_space_details @@ -1619,7 +1619,7 @@ class TCMalloc_PageHeap { pagemap_.Ensure(p, 1); return GetDescriptor(p); } - + size_t ReturnedBytes() const; // Return number of bytes allocated from system @@ -1703,7 +1703,7 @@ class TCMalloc_PageHeap { pagemap_.set(span->start + span->length - 1, span); } } - + // Allocate a large span of length == n. If successful, returns a // span of exactly the specified length. Else, returns NULL. Span* AllocLarge(Length n); @@ -1719,7 +1719,7 @@ class TCMalloc_PageHeap { // Index of last free list we scavenged size_t scavenge_index_; - + #if OS(DARWIN) friend class FastMallocZone; #endif @@ -1745,7 +1745,7 @@ class TCMalloc_PageHeap { #elif OS(WINDOWS) static void CALLBACK scavengerTimerFired(void*, BOOLEAN); HANDLE m_scavengeQueueTimer; -#else +#else static NO_RETURN_WITH_VALUE void* runScavengerThread(void*); NO_RETURN void scavengerThread(); @@ -1904,7 +1904,7 @@ void* TCMalloc_PageHeap::runScavengerThread(void* context) ALWAYS_INLINE void TCMalloc_PageHeap::signalScavenger() { - // shouldScavenge() should be called only when the pageheap_lock spinlock is held, additionally, + // shouldScavenge() should be called only when the pageheap_lock spinlock is held, additionally, // m_scavengeThreadActive is only set to false whilst pageheap_lock is held. The caller must ensure this is // taken prior to calling this method. If the scavenger thread is sleeping and shouldScavenge() indicates there // is memory to free the scavenger thread is signalled to start. @@ -1925,7 +1925,7 @@ void TCMalloc_PageHeap::scavenge() ASSERT(Check()); for (int i = kMaxPages; i > 0 && free_committed_pages_ >= targetPageCount; i--) { SpanList* slist = (static_cast<size_t>(i) == kMaxPages) ? &large_ : &free_[i]; - // If the span size is bigger than kMinSpanListsWithSpans pages return all the spans in the list, else return all but 1 span. + // If the span size is bigger than kMinSpanListsWithSpans pages return all the spans in the list, else return all but 1 span. // Return only 50% of a spanlist at a time so spans of size 1 are not the only ones left. size_t length = DLL_Length(&slist->normal, entropy_); size_t numSpansToReturn = (i > kMinSpanListsWithSpans) ? length : length / 2; @@ -1952,9 +1952,9 @@ void TCMalloc_PageHeap::scavenge() min_free_committed_pages_since_last_scavenge_ = free_committed_pages_; } -ALWAYS_INLINE bool TCMalloc_PageHeap::shouldScavenge() const +ALWAYS_INLINE bool TCMalloc_PageHeap::shouldScavenge() const { - return free_committed_pages_ > kMinimumFreeCommittedPageCount; + return free_committed_pages_ > kMinimumFreeCommittedPageCount; } #endif // USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY @@ -1986,7 +1986,7 @@ inline Span* TCMalloc_PageHeap::New(Length n) { // free committed pages count. ASSERT(free_committed_pages_ >= n); free_committed_pages_ -= n; - if (free_committed_pages_ < min_free_committed_pages_since_last_scavenge_) + if (free_committed_pages_ < min_free_committed_pages_since_last_scavenge_) min_free_committed_pages_since_last_scavenge_ = free_committed_pages_; #endif // USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY ASSERT(Check()); @@ -2092,7 +2092,7 @@ inline void TCMalloc_PageHeap::Carve(Span* span, Length n, bool released) { free_committed_pages_ += span->length; #endif } - + const int extra = static_cast<int>(span->length - n); ASSERT(extra >= 0); if (extra > 0) { @@ -2267,7 +2267,7 @@ void TCMalloc_PageHeap::RegisterSizeClass(Span* span, size_t sc) { pagemap_.set(span->start+i, span); } } - + size_t TCMalloc_PageHeap::ReturnedBytes() const { size_t result = 0; for (unsigned s = 0; s < kMaxPages; s++) { @@ -2275,7 +2275,7 @@ size_t TCMalloc_PageHeap::ReturnedBytes() const { unsigned r_pages = s * r_length; result += r_pages << kPageShift; } - + for (Span* s = large_.returned.next(entropy_); s != &large_.returned; s = s->next(entropy_)) result += s->length << kPageShift; return result; @@ -2399,7 +2399,7 @@ void TCMalloc_PageHeap::ReleaseFreeList(Span* list, Span* returned) { #if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY free_committed_pages_ -= freePageReduction; - if (free_committed_pages_ < min_free_committed_pages_since_last_scavenge_) + if (free_committed_pages_ < min_free_committed_pages_since_last_scavenge_) min_free_committed_pages_since_last_scavenge_ = free_committed_pages_; #endif } @@ -3287,7 +3287,7 @@ void TCMalloc_ThreadCache::InitTSD() { tlsIndex = TlsAlloc(); #endif tsd_inited = true; - + #if !OS(WINDOWS) // We may have used a fake pthread_t for the main thread. Fix it. pthread_t zero; @@ -3679,7 +3679,7 @@ template <bool crashOnFailure> ALWAYS_INLINE void* calloc(size_t n, size_t elem_size) { size_t totalBytes = n * elem_size; - + // Protect against overflow if (n > 1 && elem_size && (totalBytes / elem_size) != n) return 0; diff --git a/third_party/WebKit/Source/wtf/FastMalloc.h b/third_party/WebKit/Source/wtf/FastMalloc.h index 7bdeebe..c03e05e 100644 --- a/third_party/WebKit/Source/wtf/FastMalloc.h +++ b/third_party/WebKit/Source/wtf/FastMalloc.h @@ -51,15 +51,15 @@ namespace WTF { ~TryMallocReturnValue() { ASSERT(!m_data); } template <typename T> bool getValue(T& data) WARN_UNUSED_RETURN; template <typename T> operator PossiblyNull<T>() - { - T value; - getValue(value); + { + T value; + getValue(value); return PossiblyNull<T>(value); - } + } private: mutable void* m_data; }; - + template <typename T> bool TryMallocReturnValue::getValue(T& data) { union u { void* data; T target; } res; @@ -77,13 +77,13 @@ namespace WTF { WTF_EXPORT void fastFree(void*); -#ifndef NDEBUG +#ifndef NDEBUG WTF_EXPORT void fastMallocForbid(); WTF_EXPORT void fastMallocAllow(); #endif WTF_EXPORT void releaseFastMallocFreeMemory(); - + struct FastMallocStatistics { size_t reservedVMBytes; size_t committedVMBytes; @@ -138,7 +138,7 @@ namespace WTF { // is implemented. namespace Internal { - + // Handle a detected alloc/free mismatch. By default this calls CRASH(). void fastMallocMatchFailed(void* p); @@ -152,7 +152,7 @@ namespace WTF { ValidationHeader* header = fastMallocValidationHeader(p); if (header->m_prefix != static_cast<unsigned>(ValidationPrefix)) fastMallocMatchFailed(p); - + return reinterpret_cast<ValidationTag*>(static_cast<char*>(p) + header->m_size); } @@ -184,7 +184,7 @@ namespace WTF { { if (!p) return; - + Internal::ValidationHeader* header = Internal::fastMallocValidationHeader(p); if (header->m_prefix != static_cast<unsigned>(Internal::ValidationPrefix)) Internal::fastMallocMatchFailed(p); @@ -199,11 +199,11 @@ namespace WTF { { if (!p) return; - + Internal::ValidationHeader* header = Internal::fastMallocValidationHeader(p); if (header->m_prefix != static_cast<unsigned>(Internal::ValidationPrefix)) Internal::fastMallocMatchFailed(p); - + if (*Internal::fastMallocValidationSuffix(p) != Internal::ValidationSuffix) Internal::fastMallocMatchFailed(p); } @@ -234,7 +234,7 @@ using WTF::tryFastMalloc; using WTF::tryFastRealloc; using WTF::tryFastZeroedMalloc; -#ifndef NDEBUG +#ifndef NDEBUG using WTF::fastMallocForbid; using WTF::fastMallocAllow; #endif diff --git a/third_party/WebKit/Source/wtf/FilePrintStream.cpp b/third_party/WebKit/Source/wtf/FilePrintStream.cpp index b5ab25e..b2b29679 100644 --- a/third_party/WebKit/Source/wtf/FilePrintStream.cpp +++ b/third_party/WebKit/Source/wtf/FilePrintStream.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -46,7 +46,7 @@ PassOwnPtr<FilePrintStream> FilePrintStream::open(const char* filename, const ch FILE* file = fopen(filename, mode); if (!file) return PassOwnPtr<FilePrintStream>(); - + return adoptPtr(new FilePrintStream(file)); } diff --git a/third_party/WebKit/Source/wtf/FilePrintStream.h b/third_party/WebKit/Source/wtf/FilePrintStream.h index 0482d0f..eae458a 100644 --- a/third_party/WebKit/Source/wtf/FilePrintStream.h +++ b/third_party/WebKit/Source/wtf/FilePrintStream.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef FilePrintStream_h @@ -38,14 +38,14 @@ public: Adopt, Borrow }; - + FilePrintStream(FILE*, AdoptionMode = Adopt); virtual ~FilePrintStream(); - + static PassOwnPtr<FilePrintStream> open(const char* filename, const char* mode); - + FILE* file() { return m_file; } - + void vprintf(const char* format, va_list) WTF_ATTRIBUTE_PRINTF(2, 0); void flush(); diff --git a/third_party/WebKit/Source/wtf/Float32Array.h b/third_party/WebKit/Source/wtf/Float32Array.h index 3054ffb..df5176b 100644 --- a/third_party/WebKit/Source/wtf/Float32Array.h +++ b/third_party/WebKit/Source/wtf/Float32Array.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Float32Array_h diff --git a/third_party/WebKit/Source/wtf/Forward.h b/third_party/WebKit/Source/wtf/Forward.h index 4766265..f1ab5e2 100644 --- a/third_party/WebKit/Source/wtf/Forward.h +++ b/third_party/WebKit/Source/wtf/Forward.h @@ -32,7 +32,7 @@ namespace WTF { template<typename T> class PassRefPtr; template<typename T> class RefPtr; template<typename T, size_t inlineCapacity> class Vector; - + class ArrayBuffer; class ArrayBufferView; class AtomicString; diff --git a/third_party/WebKit/Source/wtf/Functional.h b/third_party/WebKit/Source/wtf/Functional.h index e0adb5f..74c004d 100644 --- a/third_party/WebKit/Source/wtf/Functional.h +++ b/third_party/WebKit/Source/wtf/Functional.h @@ -414,7 +414,7 @@ public: , m_p2(ParamStorageTraits<P2>::wrap(p2)) { } - + virtual typename FunctionWrapper::ResultType operator()() { return m_functionWrapper(ParamStorageTraits<P1>::unwrap(m_p1), ParamStorageTraits<P2>::unwrap(m_p2)); @@ -460,7 +460,7 @@ public: , m_p4(ParamStorageTraits<P4>::wrap(p4)) { } - + virtual typename FunctionWrapper::ResultType operator()() { return m_functionWrapper(ParamStorageTraits<P1>::unwrap(m_p1), ParamStorageTraits<P2>::unwrap(m_p2), ParamStorageTraits<P3>::unwrap(m_p3), ParamStorageTraits<P4>::unwrap(m_p4)); @@ -548,7 +548,7 @@ protected: } template<typename FunctionType> FunctionImpl<FunctionType>* impl() const - { + { return static_cast<FunctionImpl<FunctionType>*>(m_impl.get()); } diff --git a/third_party/WebKit/Source/wtf/HashCountedSet.h b/third_party/WebKit/Source/wtf/HashCountedSet.h index 7757316..36d944c 100644 --- a/third_party/WebKit/Source/wtf/HashCountedSet.h +++ b/third_party/WebKit/Source/wtf/HashCountedSet.h @@ -37,36 +37,36 @@ namespace WTF { typedef typename ImplType::iterator iterator; typedef typename ImplType::const_iterator const_iterator; typedef typename ImplType::AddResult AddResult; - + HashCountedSet() {} void swap(HashCountedSet&); - + int size() const; int capacity() const; bool isEmpty() const; - + // Iterators iterate over pairs of values and counts. iterator begin(); iterator end(); const_iterator begin() const; const_iterator end() const; - + iterator find(const ValueType&); const_iterator find(const ValueType&) const; bool contains(const ValueType&) const; unsigned count(const ValueType&) const; // Increases the count if an equal value is already present - // the return value is a pair of an interator to the new value's + // the return value is a pair of an interator to the new value's // location, and a bool that is true if an new entry was added. AddResult add(const ValueType&); - + // Reduces the count of the value, and removes it if count // goes down to zero, returns true if the value is removed. bool remove(const ValueType&); bool remove(iterator); - + // Removes the value, regardless of its count. void removeAll(iterator); void removeAll(const ValueType&); @@ -83,65 +83,65 @@ namespace WTF { { m_impl.swap(other.m_impl); } - + template<typename Value, typename HashFunctions, typename Traits> inline int HashCountedSet<Value, HashFunctions, Traits>::size() const { - return m_impl.size(); + return m_impl.size(); } - + template<typename Value, typename HashFunctions, typename Traits> inline int HashCountedSet<Value, HashFunctions, Traits>::capacity() const { - return m_impl.capacity(); + return m_impl.capacity(); } - + template<typename Value, typename HashFunctions, typename Traits> inline bool HashCountedSet<Value, HashFunctions, Traits>::isEmpty() const { - return size() == 0; + return size() == 0; } - + template<typename Value, typename HashFunctions, typename Traits> inline typename HashCountedSet<Value, HashFunctions, Traits>::iterator HashCountedSet<Value, HashFunctions, Traits>::begin() { - return m_impl.begin(); + return m_impl.begin(); } template<typename Value, typename HashFunctions, typename Traits> inline typename HashCountedSet<Value, HashFunctions, Traits>::iterator HashCountedSet<Value, HashFunctions, Traits>::end() { - return m_impl.end(); + return m_impl.end(); } - + template<typename Value, typename HashFunctions, typename Traits> inline typename HashCountedSet<Value, HashFunctions, Traits>::const_iterator HashCountedSet<Value, HashFunctions, Traits>::begin() const { - return m_impl.begin(); + return m_impl.begin(); } - + template<typename Value, typename HashFunctions, typename Traits> inline typename HashCountedSet<Value, HashFunctions, Traits>::const_iterator HashCountedSet<Value, HashFunctions, Traits>::end() const { - return m_impl.end(); + return m_impl.end(); } - + template<typename Value, typename HashFunctions, typename Traits> inline typename HashCountedSet<Value, HashFunctions, Traits>::iterator HashCountedSet<Value, HashFunctions, Traits>::find(const ValueType& value) { - return m_impl.find(value); + return m_impl.find(value); } - + template<typename Value, typename HashFunctions, typename Traits> inline typename HashCountedSet<Value, HashFunctions, Traits>::const_iterator HashCountedSet<Value, HashFunctions, Traits>::find(const ValueType& value) const { - return m_impl.find(value); + return m_impl.find(value); } - + template<typename Value, typename HashFunctions, typename Traits> inline bool HashCountedSet<Value, HashFunctions, Traits>::contains(const ValueType& value) const { - return m_impl.contains(value); + return m_impl.contains(value); } template<typename Value, typename HashFunctions, typename Traits> @@ -149,7 +149,7 @@ namespace WTF { { return m_impl.get(value); } - + template<typename Value, typename HashFunctions, typename Traits> inline typename HashCountedSet<Value, HashFunctions, Traits>::AddResult HashCountedSet<Value, HashFunctions, Traits>::add(const ValueType &value) { @@ -157,13 +157,13 @@ namespace WTF { ++result.iterator->value; return result; } - + template<typename Value, typename HashFunctions, typename Traits> inline bool HashCountedSet<Value, HashFunctions, Traits>::remove(const ValueType& value) { return remove(find(value)); } - + template<typename Value, typename HashFunctions, typename Traits> inline bool HashCountedSet<Value, HashFunctions, Traits>::remove(iterator it) { @@ -181,13 +181,13 @@ namespace WTF { m_impl.remove(it); return true; } - + template<typename Value, typename HashFunctions, typename Traits> inline void HashCountedSet<Value, HashFunctions, Traits>::removeAll(const ValueType& value) { removeAll(find(value)); } - + template<typename Value, typename HashFunctions, typename Traits> inline void HashCountedSet<Value, HashFunctions, Traits>::removeAll(iterator it) { @@ -196,20 +196,20 @@ namespace WTF { m_impl.remove(it); } - + template<typename Value, typename HashFunctions, typename Traits> inline void HashCountedSet<Value, HashFunctions, Traits>::clear() { - m_impl.clear(); + m_impl.clear(); } - + template<typename Value, typename HashFunctions, typename Traits, typename VectorType> inline void copyToVector(const HashCountedSet<Value, HashFunctions, Traits>& collection, VectorType& vector) { typedef typename HashCountedSet<Value, HashFunctions, Traits>::const_iterator iterator; - + vector.resize(collection.size()); - + iterator it = collection.begin(); iterator end = collection.end(); for (unsigned i = 0; it != end; ++it, ++i) @@ -220,9 +220,9 @@ namespace WTF { inline void copyToVector(const HashCountedSet<Value, HashFunctions, Traits>& collection, Vector<Value>& vector) { typedef typename HashCountedSet<Value, HashFunctions, Traits>::const_iterator iterator; - + vector.resize(collection.size()); - + iterator it = collection.begin(); iterator end = collection.end(); for (unsigned i = 0; it != end; ++it, ++i) diff --git a/third_party/WebKit/Source/wtf/HashFunctions.h b/third_party/WebKit/Source/wtf/HashFunctions.h index 1768f67..4f2671e 100644 --- a/third_party/WebKit/Source/wtf/HashFunctions.h +++ b/third_party/WebKit/Source/wtf/HashFunctions.h @@ -61,7 +61,7 @@ namespace WTF { } // Thomas Wang's 32 Bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm - inline unsigned intHash(uint32_t key) + inline unsigned intHash(uint32_t key) { key += ~(key << 15); key ^= (key >> 10); @@ -71,7 +71,7 @@ namespace WTF { key ^= (key >> 16); return key; } - + // Thomas Wang's 64 bit Mix Function: http://www.cris.com/~Ttwang/tech/inthash.htm inline unsigned intHash(uint64_t key) { @@ -156,7 +156,7 @@ namespace WTF { { return DefaultHash<T>::Hash::equal(a.first, b.first) && DefaultHash<U>::Hash::equal(a.second, b.second); } - static const bool safeToCompareToEmptyOrDeleted = DefaultHash<T>::Hash::safeToCompareToEmptyOrDeleted + static const bool safeToCompareToEmptyOrDeleted = DefaultHash<T>::Hash::safeToCompareToEmptyOrDeleted && DefaultHash<U>::Hash::safeToCompareToEmptyOrDeleted; }; diff --git a/third_party/WebKit/Source/wtf/HashIterators.h b/third_party/WebKit/Source/wtf/HashIterators.h index 9be4de3..ea7a468 100644 --- a/third_party/WebKit/Source/wtf/HashIterators.h +++ b/third_party/WebKit/Source/wtf/HashIterators.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_HashIterators_h @@ -90,7 +90,7 @@ namespace WTF { public: HashTableConstKeysIterator(const ConstIterator& impl) : m_impl(impl) {} - + const KeyType* get() const { return &(m_impl.get()->key); } const KeyType& operator*() const { return *get(); } const KeyType* operator->() const { return get(); } @@ -107,7 +107,7 @@ namespace WTF { public: HashTableConstValuesIterator(const ConstIterator& impl) : m_impl(impl) {} - + const MappedType* get() const { return &(m_impl.get()->value); } const MappedType& operator*() const { return *get(); } const MappedType* operator->() const { return get(); } @@ -125,7 +125,7 @@ namespace WTF { public: HashTableKeysIterator(const Iterator& impl) : m_impl(impl) {} - + KeyType* get() const { return &(m_impl.get()->key); } KeyType& operator*() const { return *get(); } KeyType* operator->() const { return get(); } @@ -148,7 +148,7 @@ namespace WTF { public: HashTableValuesIterator(const Iterator& impl) : m_impl(impl) {} - + MappedType* get() const { return &(m_impl.get()->value); } MappedType& operator*() const { return *get(); } MappedType* operator->() const { return get(); } diff --git a/third_party/WebKit/Source/wtf/HashMap.h b/third_party/WebKit/Source/wtf/HashMap.h index 1ef4e3d..1925e6b 100644 --- a/third_party/WebKit/Source/wtf/HashMap.h +++ b/third_party/WebKit/Source/wtf/HashMap.h @@ -97,12 +97,12 @@ namespace WTF { MappedPeekType get(const KeyType&) const; // replaces value but not key if key is already present - // return value is a pair of the iterator to the key location, + // return value is a pair of the iterator to the key location, // and a boolean that's true if a new value was actually added AddResult set(const KeyType&, MappedPassInType); // does nothing if key is already present - // return value is a pair of the iterator to the key location, + // return value is a pair of the iterator to the key location, // and a boolean that's true if a new value was actually added AddResult add(const KeyType&, MappedPassInType); @@ -140,7 +140,7 @@ namespace WTF { }; template<typename KeyArg, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg> - class HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>::HashMapKeysProxy : + class HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>::HashMapKeysProxy : private HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> { public: typedef HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> HashMapType; @@ -178,7 +178,7 @@ namespace WTF { }; template<typename KeyArg, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg> - class HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>::HashMapValuesProxy : + class HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>::HashMapValuesProxy : private HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> { public: typedef HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> HashMapType; @@ -248,19 +248,19 @@ namespace WTF { template<typename T, typename U, typename V, typename W, typename X> inline void HashMap<T, U, V, W, X>::swap(HashMap& other) { - m_impl.swap(other.m_impl); + m_impl.swap(other.m_impl); } template<typename T, typename U, typename V, typename W, typename X> inline int HashMap<T, U, V, W, X>::size() const { - return m_impl.size(); + return m_impl.size(); } template<typename T, typename U, typename V, typename W, typename X> inline int HashMap<T, U, V, W, X>::capacity() const - { - return m_impl.capacity(); + { + return m_impl.capacity(); } template<typename T, typename U, typename V, typename W, typename X> @@ -321,7 +321,7 @@ namespace WTF { template<typename T, typename U, typename V, typename W, typename X> template<typename HashTranslator, typename TYPE> - inline typename HashMap<T, U, V, W, X>::const_iterator + inline typename HashMap<T, U, V, W, X>::const_iterator HashMap<T, U, V, W, X>::find(const TYPE& value) const { return m_impl.template find<HashMapTranslatorAdapter<ValueTraits, HashTranslator> >(value); @@ -337,14 +337,14 @@ namespace WTF { template<typename T, typename U, typename V, typename W, typename X> typename HashMap<T, U, V, W, X>::AddResult - HashMap<T, U, V, W, X>::inlineAdd(const KeyType& key, MappedPassInReferenceType mapped) + HashMap<T, U, V, W, X>::inlineAdd(const KeyType& key, MappedPassInReferenceType mapped) { return m_impl.template add<HashMapTranslator<ValueTraits, HashFunctions> >(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> typename HashMap<T, U, V, W, X>::AddResult - HashMap<T, U, V, W, X>::set(const KeyType& key, MappedPassInType mapped) + HashMap<T, U, V, W, X>::set(const KeyType& key, MappedPassInType mapped) { AddResult result = inlineAdd(key, mapped); if (!result.isNewEntry) { @@ -477,32 +477,32 @@ namespace WTF { for (iterator it = collection.begin(); it != end; ++it) delete it->key; } - + template<typename T, typename U, typename V, typename W, typename X, typename Y> inline void copyKeysToVector(const HashMap<T, U, V, W, X>& collection, Y& vector) { typedef typename HashMap<T, U, V, W, X>::const_iterator::Keys iterator; - + vector.resize(collection.size()); - + iterator it = collection.begin().keys(); iterator end = collection.end().keys(); for (unsigned i = 0; it != end; ++it, ++i) vector[i] = *it; - } + } template<typename T, typename U, typename V, typename W, typename X, typename Y> inline void copyValuesToVector(const HashMap<T, U, V, W, X>& collection, Y& vector) { typedef typename HashMap<T, U, V, W, X>::const_iterator::Values iterator; - + vector.resize(collection.size()); - + iterator it = collection.begin().values(); iterator end = collection.end().values(); for (unsigned i = 0; it != end; ++it, ++i) vector[i] = *it; - } + } } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/HashSet.h b/third_party/WebKit/Source/wtf/HashSet.h index 7ba2803..0953ec1 100644 --- a/third_party/WebKit/Source/wtf/HashSet.h +++ b/third_party/WebKit/Source/wtf/HashSet.h @@ -27,7 +27,7 @@ namespace WTF { struct IdentityExtractor; - + template<typename Value, typename HashFunctions, typename Traits> class HashSet; template<typename Value, typename HashFunctions, typename Traits> void deleteAllValues(const HashSet<Value, HashFunctions, Traits>&); @@ -71,7 +71,7 @@ namespace WTF { template<typename HashTranslator, typename T> iterator find(const T&) const; template<typename HashTranslator, typename T> bool contains(const T&) const; - // The return value is a pair of an interator to the new value's location, + // The return value is a pair of an interator to the new value's location, // and a bool that is true if an new entry was added. AddResult add(const ValueType&); @@ -112,49 +112,49 @@ namespace WTF { template<typename T, typename U, typename V> inline void HashSet<T, U, V>::swap(HashSet& other) { - m_impl.swap(other.m_impl); + m_impl.swap(other.m_impl); } template<typename T, typename U, typename V> inline int HashSet<T, U, V>::size() const { - return m_impl.size(); + return m_impl.size(); } template<typename T, typename U, typename V> inline int HashSet<T, U, V>::capacity() const { - return m_impl.capacity(); + return m_impl.capacity(); } template<typename T, typename U, typename V> inline bool HashSet<T, U, V>::isEmpty() const { - return m_impl.isEmpty(); + return m_impl.isEmpty(); } template<typename T, typename U, typename V> inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::begin() const { - return m_impl.begin(); + return m_impl.begin(); } template<typename T, typename U, typename V> inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::end() const { - return m_impl.end(); + return m_impl.end(); } template<typename T, typename U, typename V> inline typename HashSet<T, U, V>::iterator HashSet<T, U, V>::find(const ValueType& value) const { - return m_impl.find(value); + return m_impl.find(value); } template<typename T, typename U, typename V> inline bool HashSet<T, U, V>::contains(const ValueType& value) const { - return m_impl.contains(value); + return m_impl.contains(value); } template<typename Value, typename HashFunctions, typename Traits> @@ -204,7 +204,7 @@ namespace WTF { template<typename T, typename U, typename V> inline void HashSet<T, U, V>::clear() { - m_impl.clear(); + m_impl.clear(); } template<typename T, typename U, typename V> @@ -243,14 +243,14 @@ namespace WTF { inline void copyToVector(const C& collection, W& vector) { typedef typename C::const_iterator iterator; - + vector.resize(collection.size()); - + iterator it = collection.begin(); iterator end = collection.end(); for (unsigned i = 0; it != end; ++it, ++i) vector[i] = *it; - } + } } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/HashTable.h b/third_party/WebKit/Source/wtf/HashTable.h index 59843a3..5bdfc78 100644 --- a/third_party/WebKit/Source/wtf/HashTable.h +++ b/third_party/WebKit/Source/wtf/HashTable.h @@ -367,9 +367,9 @@ namespace WTF { #endif HashTable(); - ~HashTable() + ~HashTable() { - invalidateIterators(); + invalidateIterators(); if (m_table) deallocateTable(m_table, m_tableSize); #if CHECK_HASHTABLE_USE_AFTER_DESTRUCTION @@ -625,18 +625,18 @@ namespace WTF { while (1) { ValueType* entry = table + i; - + // we count on the compiler to optimize out this branch if (HashFunctions::safeToCompareToEmptyOrDeleted) { if (HashTranslator::equal(Extractor::extract(*entry), key)) return entry; - + if (isEmptyBucket(*entry)) return 0; } else { if (isEmptyBucket(*entry)) return 0; - + if (!isDeletedBucket(*entry) && HashTranslator::equal(Extractor::extract(*entry), key)) return entry; } @@ -683,21 +683,21 @@ namespace WTF { while (1) { ValueType* entry = table + i; - + // we count on the compiler to optimize out this branch if (HashFunctions::safeToCompareToEmptyOrDeleted) { if (isEmptyBucket(*entry)) return LookupType(deletedEntry ? deletedEntry : entry, false); - + if (HashTranslator::equal(Extractor::extract(*entry), key)) return LookupType(entry, true); - + if (isDeletedBucket(*entry)) deletedEntry = entry; } else { if (isEmptyBucket(*entry)) return LookupType(deletedEntry ? deletedEntry : entry, false); - + if (isDeletedBucket(*entry)) deletedEntry = entry; else if (HashTranslator::equal(Extractor::extract(*entry), key)) @@ -746,21 +746,21 @@ namespace WTF { while (1) { ValueType* entry = table + i; - + // we count on the compiler to optimize out this branch if (HashFunctions::safeToCompareToEmptyOrDeleted) { if (isEmptyBucket(*entry)) return makeLookupResult(deletedEntry ? deletedEntry : entry, false, h); - + if (HashTranslator::equal(Extractor::extract(*entry), key)) return makeLookupResult(entry, true, h); - + if (isDeletedBucket(*entry)) deletedEntry = entry; } else { if (isEmptyBucket(*entry)) return makeLookupResult(deletedEntry ? deletedEntry : entry, false, h); - + if (isDeletedBucket(*entry)) deletedEntry = entry; else if (HashTranslator::equal(Extractor::extract(*entry), key)) @@ -800,7 +800,7 @@ namespace WTF { memset(&bucket, 0, sizeof(bucket)); } }; - + template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits> inline void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::initializeBucket(ValueType& bucket) { @@ -842,21 +842,21 @@ namespace WTF { ValueType* entry; while (1) { entry = table + i; - + // we count on the compiler to optimize out this branch if (HashFunctions::safeToCompareToEmptyOrDeleted) { if (isEmptyBucket(*entry)) break; - + if (HashTranslator::equal(Extractor::extract(*entry), key)) return AddResult(makeKnownGoodIterator(entry), false); - + if (isDeletedBucket(*entry)) deletedEntry = entry; } else { if (isEmptyBucket(*entry)) break; - + if (isDeletedBucket(*entry)) deletedEntry = entry; else if (HashTranslator::equal(Extractor::extract(*entry), key)) @@ -880,13 +880,13 @@ namespace WTF { if (deletedEntry) { initializeBucket(*deletedEntry); entry = deletedEntry; - --m_deletedCount; + --m_deletedCount; } HashTranslator::translate(*entry, key, extra); ++m_keyCount; - + if (shouldExpand()) { // FIXME: This makes an extra copy on expand. Probably not that bad since // expand is rare, but would be better to have a version of expand that can @@ -897,9 +897,9 @@ namespace WTF { ASSERT(result.iterator != end()); return result; } - + internalCheckTableConsistency(); - + return AddResult(makeKnownGoodIterator(entry), true); } @@ -921,15 +921,15 @@ namespace WTF { ValueType* entry = lookupResult.first.first; bool found = lookupResult.first.second; unsigned h = lookupResult.second; - + if (found) return AddResult(makeKnownGoodIterator(entry), false); - + if (isDeletedBucket(*entry)) { initializeBucket(*entry); --m_deletedCount; } - + HashTranslator::translate(*entry, key, extra, h); ++m_keyCount; if (shouldExpand()) { @@ -965,7 +965,7 @@ namespace WTF { } template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits> - template <typename HashTranslator, typename T> + template <typename HashTranslator, typename T> typename HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::iterator HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::find(const T& key) { if (!m_table) @@ -979,7 +979,7 @@ namespace WTF { } template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits> - template <typename HashTranslator, typename T> + template <typename HashTranslator, typename T> typename HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::const_iterator HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::find(const T& key) const { if (!m_table) @@ -993,7 +993,7 @@ namespace WTF { } template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits> - template <typename HashTranslator, typename T> + template <typename HashTranslator, typename T> bool HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>::contains(const T& key) const { if (!m_table) diff --git a/third_party/WebKit/Source/wtf/HashTraits.h b/third_party/WebKit/Source/wtf/HashTraits.h index 7d2b70e..3f01786 100644 --- a/third_party/WebKit/Source/wtf/HashTraits.h +++ b/third_party/WebKit/Source/wtf/HashTraits.h @@ -42,7 +42,7 @@ namespace WTF { template<typename T> struct GenericHashTraitsBase<false, T> { // The emptyValueIsZero flag is used to optimize allocation of empty hash tables with zeroed memory. static const bool emptyValueIsZero = false; - + // The hasIsEmptyValueFunction flag allows the hash table to automatically generate code to check // for the empty value when it can be done with the equality operator, but allows custom functions // for cases like String that need them. @@ -76,7 +76,7 @@ namespace WTF { typedef const T& PassInType; static void store(const T& value, T& storage) { storage = value; } - // Type for return value of functions that transfer ownership, such as take. + // Type for return value of functions that transfer ownership, such as take. typedef T PassOutType; static PassOutType passOut(const T& value) { return value; } static T& passOut(T& value) { return value; } // Overloaded to avoid copying of non-temporary values. diff --git a/third_party/WebKit/Source/wtf/Int16Array.h b/third_party/WebKit/Source/wtf/Int16Array.h index c218a5f..d3289b7 100644 --- a/third_party/WebKit/Source/wtf/Int16Array.h +++ b/third_party/WebKit/Source/wtf/Int16Array.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Int16Array_h diff --git a/third_party/WebKit/Source/wtf/Int32Array.h b/third_party/WebKit/Source/wtf/Int32Array.h index 54879aa..0a5091f 100644 --- a/third_party/WebKit/Source/wtf/Int32Array.h +++ b/third_party/WebKit/Source/wtf/Int32Array.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Int32Array_h diff --git a/third_party/WebKit/Source/wtf/Int8Array.h b/third_party/WebKit/Source/wtf/Int8Array.h index fea4936..c4aaa21 100644 --- a/third_party/WebKit/Source/wtf/Int8Array.h +++ b/third_party/WebKit/Source/wtf/Int8Array.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Int8Array_h diff --git a/third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h b/third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h index e464a92..2d635d8 100644 --- a/third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h +++ b/third_party/WebKit/Source/wtf/IntegralTypedArrayBase.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef IntegralTypedArrayBase_h diff --git a/third_party/WebKit/Source/wtf/ListHashSet.h b/third_party/WebKit/Source/wtf/ListHashSet.h index 96366a2..48d1f3b 100644 --- a/third_party/WebKit/Source/wtf/ListHashSet.h +++ b/third_party/WebKit/Source/wtf/ListHashSet.h @@ -127,7 +127,7 @@ namespace WTF { template<typename T, typename HashTranslator> const_iterator find(const T&) const; template<typename T, typename HashTranslator> bool contains(const T&) const; - // The return value of add is a pair of an iterator to the new value's location, + // The return value of add is a pair of an iterator to the new value's location, // and a bool that is true if an new entry was added. AddResult add(const ValueType&); @@ -153,7 +153,7 @@ namespace WTF { void prependNode(Node*); void insertNodeBefore(Node* beforeNode, Node* newNode); void deleteAllNodes(); - + iterator makeIterator(Node*); const_iterator makeConstIterator(Node*) const; reverse_iterator makeReverseIterator(Node*); @@ -171,15 +171,15 @@ namespace WTF { typedef ListHashSetNode<ValueArg, inlineCapacity> Node; typedef ListHashSetNodeAllocator<ValueArg, inlineCapacity> NodeAllocator; - ListHashSetNodeAllocator() + ListHashSetNodeAllocator() : m_freeList(pool()) , m_isDoneWithInitialFreeList(false) - { + { memset(m_pool.pool, 0, sizeof(m_pool.pool)); } Node* allocate() - { + { Node* result = m_freeList; if (!result) @@ -204,7 +204,7 @@ namespace WTF { return result; } - void deallocate(Node* node) + void deallocate(Node* node) { if (inPool(node)) { #ifndef NDEBUG @@ -553,19 +553,19 @@ namespace WTF { template<typename T, size_t inlineCapacity, typename U> inline int ListHashSet<T, inlineCapacity, U>::size() const { - return m_impl.size(); + return m_impl.size(); } template<typename T, size_t inlineCapacity, typename U> inline int ListHashSet<T, inlineCapacity, U>::capacity() const { - return m_impl.capacity(); + return m_impl.capacity(); } template<typename T, size_t inlineCapacity, typename U> inline bool ListHashSet<T, inlineCapacity, U>::isEmpty() const { - return m_impl.isEmpty(); + return m_impl.isEmpty(); } template<typename T, size_t inlineCapacity, typename U> @@ -583,7 +583,7 @@ namespace WTF { template<typename T, size_t inlineCapacity, typename U> inline typename ListHashSet<T, inlineCapacity, U>::iterator ListHashSet<T, inlineCapacity, U>::begin() { - return makeIterator(m_head); + return makeIterator(m_head); } template<typename T, size_t inlineCapacity, typename U> @@ -595,19 +595,19 @@ namespace WTF { template<typename T, size_t inlineCapacity, typename U> inline typename ListHashSet<T, inlineCapacity, U>::const_iterator ListHashSet<T, inlineCapacity, U>::begin() const { - return makeConstIterator(m_head); + return makeConstIterator(m_head); } template<typename T, size_t inlineCapacity, typename U> inline typename ListHashSet<T, inlineCapacity, U>::const_iterator ListHashSet<T, inlineCapacity, U>::end() const { - return makeConstIterator(0); + return makeConstIterator(0); } template<typename T, size_t inlineCapacity, typename U> inline typename ListHashSet<T, inlineCapacity, U>::reverse_iterator ListHashSet<T, inlineCapacity, U>::rbegin() { - return makeReverseIterator(m_tail); + return makeReverseIterator(m_tail); } template<typename T, size_t inlineCapacity, typename U> @@ -619,13 +619,13 @@ namespace WTF { template<typename T, size_t inlineCapacity, typename U> inline typename ListHashSet<T, inlineCapacity, U>::const_reverse_iterator ListHashSet<T, inlineCapacity, U>::rbegin() const { - return makeConstReverseIterator(m_tail); + return makeConstReverseIterator(m_tail); } template<typename T, size_t inlineCapacity, typename U> inline typename ListHashSet<T, inlineCapacity, U>::const_reverse_iterator ListHashSet<T, inlineCapacity, U>::rend() const { - return makeConstReverseIterator(0); + return makeConstReverseIterator(0); } template<typename T, size_t inlineCapacity, typename U> @@ -678,7 +678,7 @@ namespace WTF { ImplTypeIterator it = m_impl.template find<BaseTranslator>(value); if (it == m_impl.end()) return end(); - return makeIterator(*it); + return makeIterator(*it); } template<typename T, size_t inlineCapacity, typename U> @@ -772,7 +772,7 @@ namespace WTF { template<typename T, size_t inlineCapacity, typename U> typename ListHashSet<T, inlineCapacity, U>::AddResult ListHashSet<T, inlineCapacity, U>::insertBefore(const ValueType& beforeValue, const ValueType& newValue) { - return insertBefore(find(beforeValue), newValue); + return insertBefore(find(beforeValue), newValue); } template<typename T, size_t inlineCapacity, typename U> @@ -794,7 +794,7 @@ namespace WTF { inline void ListHashSet<T, inlineCapacity, U>::clear() { deleteAllNodes(); - m_impl.clear(); + m_impl.clear(); m_head = 0; m_tail = 0; } @@ -862,7 +862,7 @@ namespace WTF { { if (!beforeNode) return appendNode(newNode); - + newNode->m_next = beforeNode; newNode->m_prev = beforeNode->m_prev; if (beforeNode->m_prev) @@ -884,27 +884,27 @@ namespace WTF { } template<typename T, size_t inlineCapacity, typename U> - inline ListHashSetReverseIterator<T, inlineCapacity, U> ListHashSet<T, inlineCapacity, U>::makeReverseIterator(Node* position) + inline ListHashSetReverseIterator<T, inlineCapacity, U> ListHashSet<T, inlineCapacity, U>::makeReverseIterator(Node* position) { - return ListHashSetReverseIterator<T, inlineCapacity, U>(this, position); + return ListHashSetReverseIterator<T, inlineCapacity, U>(this, position); } template<typename T, size_t inlineCapacity, typename U> inline ListHashSetConstReverseIterator<T, inlineCapacity, U> ListHashSet<T, inlineCapacity, U>::makeConstReverseIterator(Node* position) const - { - return ListHashSetConstReverseIterator<T, inlineCapacity, U>(this, position); + { + return ListHashSetConstReverseIterator<T, inlineCapacity, U>(this, position); } - + template<typename T, size_t inlineCapacity, typename U> - inline ListHashSetIterator<T, inlineCapacity, U> ListHashSet<T, inlineCapacity, U>::makeIterator(Node* position) + inline ListHashSetIterator<T, inlineCapacity, U> ListHashSet<T, inlineCapacity, U>::makeIterator(Node* position) { - return ListHashSetIterator<T, inlineCapacity, U>(this, position); + return ListHashSetIterator<T, inlineCapacity, U>(this, position); } template<typename T, size_t inlineCapacity, typename U> inline ListHashSetConstIterator<T, inlineCapacity, U> ListHashSet<T, inlineCapacity, U>::makeConstIterator(Node* position) const - { - return ListHashSetConstIterator<T, inlineCapacity, U>(this, position); + { + return ListHashSetConstIterator<T, inlineCapacity, U>(this, position); } template<bool, typename ValueType, typename HashTableType> void deleteAllValues(HashTableType& collection) diff --git a/third_party/WebKit/Source/wtf/MainThread.h b/third_party/WebKit/Source/wtf/MainThread.h index f9db1e2..7e1aaa8 100644 --- a/third_party/WebKit/Source/wtf/MainThread.h +++ b/third_party/WebKit/Source/wtf/MainThread.h @@ -7,13 +7,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -46,7 +46,7 @@ WTF_EXPORT void callOnMainThread(MainThreadFunction*, void* context); template<typename> class Function; WTF_EXPORT void callOnMainThread(const Function<void ()>&); - + WTF_EXPORT bool isMainThread(); } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/MallocZoneSupport.h b/third_party/WebKit/Source/wtf/MallocZoneSupport.h index ee809c5..09ceecc 100644 --- a/third_party/WebKit/Source/wtf/MallocZoneSupport.h +++ b/third_party/WebKit/Source/wtf/MallocZoneSupport.h @@ -6,13 +6,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/MathExtras.h b/third_party/WebKit/Source/wtf/MathExtras.h index 06aae32..7896326 100644 --- a/third_party/WebKit/Source/wtf/MathExtras.h +++ b/third_party/WebKit/Source/wtf/MathExtras.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_MathExtras_h diff --git a/third_party/WebKit/Source/wtf/MessageQueue.h b/third_party/WebKit/Source/wtf/MessageQueue.h index 4e27ddb..2f0330d 100644 --- a/third_party/WebKit/Source/wtf/MessageQueue.h +++ b/third_party/WebKit/Source/wtf/MessageQueue.h @@ -132,7 +132,7 @@ namespace WTF { template<typename DataType> inline PassOwnPtr<DataType> MessageQueue<DataType>::waitForMessage() { - MessageQueueWaitResult exitReason; + MessageQueueWaitResult exitReason; OwnPtr<DataType> result = waitForMessageFilteredWithTimeout(exitReason, MessageQueue<DataType>::alwaysTruePredicate, infiniteTime()); ASSERT(exitReason == MessageQueueTerminated || exitReason == MessageQueueMessageReceived); return result.release(); diff --git a/third_party/WebKit/Source/wtf/NonCopyingSort.h b/third_party/WebKit/Source/wtf/NonCopyingSort.h index fd611bd..ec5c6ec 100644 --- a/third_party/WebKit/Source/wtf/NonCopyingSort.h +++ b/third_party/WebKit/Source/wtf/NonCopyingSort.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ @@ -32,7 +32,7 @@ namespace WTF { using std::swap; template<typename RandomAccessIterator, typename Predicate> -inline void siftDown(RandomAccessIterator array, ptrdiff_t start, ptrdiff_t end, Predicate compareLess) +inline void siftDown(RandomAccessIterator array, ptrdiff_t start, ptrdiff_t end, Predicate compareLess) { ptrdiff_t root = start; @@ -40,7 +40,7 @@ inline void siftDown(RandomAccessIterator array, ptrdiff_t start, ptrdiff_t end, ptrdiff_t child = root * 2 + 1; if (child < end && compareLess(array[child], array[child + 1])) child++; - + if (compareLess(array[root], array[child])) { swap(array[root], array[child]); root = child; @@ -50,10 +50,10 @@ inline void siftDown(RandomAccessIterator array, ptrdiff_t start, ptrdiff_t end, } template<typename RandomAccessIterator, typename Predicate> -inline void heapify(RandomAccessIterator array, ptrdiff_t count, Predicate compareLess) +inline void heapify(RandomAccessIterator array, ptrdiff_t count, Predicate compareLess) { ptrdiff_t start = (count - 2) / 2; - + while (start >= 0) { siftDown(array, start, count - 1, compareLess); start--; diff --git a/third_party/WebKit/Source/wtf/OwnArrayPtr.h b/third_party/WebKit/Source/wtf/OwnArrayPtr.h index cd02972..c039fbe 100644 --- a/third_party/WebKit/Source/wtf/OwnArrayPtr.h +++ b/third_party/WebKit/Source/wtf/OwnArrayPtr.h @@ -127,22 +127,22 @@ template <typename T> inline void swap(OwnArrayPtr<T>& a, OwnArrayPtr<T>& b) template<typename T, typename U> inline bool operator==(const OwnArrayPtr<T>& a, U* b) { - return a.get() == b; + return a.get() == b; } -template<typename T, typename U> inline bool operator==(T* a, const OwnArrayPtr<U>& b) +template<typename T, typename U> inline bool operator==(T* a, const OwnArrayPtr<U>& b) { - return a == b.get(); + return a == b.get(); } template<typename T, typename U> inline bool operator!=(const OwnArrayPtr<T>& a, U* b) { - return a.get() != b; + return a.get() != b; } template<typename T, typename U> inline bool operator!=(T* a, const OwnArrayPtr<U>& b) { - return a != b.get(); + return a != b.get(); } template <typename T> inline T* getPtr(const OwnArrayPtr<T>& p) diff --git a/third_party/WebKit/Source/wtf/OwnPtr.h b/third_party/WebKit/Source/wtf/OwnPtr.h index 98daa40..73ede43 100644 --- a/third_party/WebKit/Source/wtf/OwnPtr.h +++ b/third_party/WebKit/Source/wtf/OwnPtr.h @@ -191,22 +191,22 @@ namespace WTF { template<typename T, typename U> inline bool operator==(const OwnPtr<T>& a, U* b) { - return a.get() == b; + return a.get() == b; } - template<typename T, typename U> inline bool operator==(T* a, const OwnPtr<U>& b) + template<typename T, typename U> inline bool operator==(T* a, const OwnPtr<U>& b) { - return a == b.get(); + return a == b.get(); } template<typename T, typename U> inline bool operator!=(const OwnPtr<T>& a, U* b) { - return a.get() != b; + return a.get() != b; } template<typename T, typename U> inline bool operator!=(T* a, const OwnPtr<U>& b) { - return a != b.get(); + return a != b.get(); } template<typename T> inline typename OwnPtr<T>::PtrType getPtr(const OwnPtr<T>& p) diff --git a/third_party/WebKit/Source/wtf/OwnPtrCommon.h b/third_party/WebKit/Source/wtf/OwnPtrCommon.h index 1b7d45d..6aada1f 100644 --- a/third_party/WebKit/Source/wtf/OwnPtrCommon.h +++ b/third_party/WebKit/Source/wtf/OwnPtrCommon.h @@ -22,7 +22,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_OwnPtrCommon_h diff --git a/third_party/WebKit/Source/wtf/PassOwnArrayPtr.h b/third_party/WebKit/Source/wtf/PassOwnArrayPtr.h index 8718f65..724dba3 100644 --- a/third_party/WebKit/Source/wtf/PassOwnArrayPtr.h +++ b/third_party/WebKit/Source/wtf/PassOwnArrayPtr.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_PassOwnArrayPtr_h @@ -83,54 +83,54 @@ template<typename T> inline typename PassOwnArrayPtr<T>::PtrType PassOwnArrayPtr return ptr; } -template<typename T, typename U> inline bool operator==(const PassOwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b) +template<typename T, typename U> inline bool operator==(const PassOwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b) { - return a.get() == b.get(); + return a.get() == b.get(); } -template<typename T, typename U> inline bool operator==(const PassOwnArrayPtr<T>& a, const OwnArrayPtr<U>& b) +template<typename T, typename U> inline bool operator==(const PassOwnArrayPtr<T>& a, const OwnArrayPtr<U>& b) { - return a.get() == b.get(); + return a.get() == b.get(); } -template<typename T, typename U> inline bool operator==(const OwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b) +template<typename T, typename U> inline bool operator==(const OwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b) { - return a.get() == b.get(); + return a.get() == b.get(); } -template<typename T, typename U> inline bool operator==(const PassOwnArrayPtr<T>& a, U* b) +template<typename T, typename U> inline bool operator==(const PassOwnArrayPtr<T>& a, U* b) { - return a.get() == b; + return a.get() == b; } -template<typename T, typename U> inline bool operator==(T* a, const PassOwnArrayPtr<U>& b) +template<typename T, typename U> inline bool operator==(T* a, const PassOwnArrayPtr<U>& b) { - return a == b.get(); + return a == b.get(); } -template<typename T, typename U> inline bool operator!=(const PassOwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b) +template<typename T, typename U> inline bool operator!=(const PassOwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b) { - return a.get() != b.get(); + return a.get() != b.get(); } -template<typename T, typename U> inline bool operator!=(const PassOwnArrayPtr<T>& a, const OwnArrayPtr<U>& b) +template<typename T, typename U> inline bool operator!=(const PassOwnArrayPtr<T>& a, const OwnArrayPtr<U>& b) { - return a.get() != b.get(); + return a.get() != b.get(); } -template<typename T, typename U> inline bool operator!=(const OwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b) +template<typename T, typename U> inline bool operator!=(const OwnArrayPtr<T>& a, const PassOwnArrayPtr<U>& b) { - return a.get() != b.get(); + return a.get() != b.get(); } template<typename T, typename U> inline bool operator!=(const PassOwnArrayPtr<T>& a, U* b) { - return a.get() != b; + return a.get() != b; } -template<typename T, typename U> inline bool operator!=(T* a, const PassOwnArrayPtr<U>& b) +template<typename T, typename U> inline bool operator!=(T* a, const PassOwnArrayPtr<U>& b) { - return a != b.get(); + return a != b.get(); } template<typename T> inline PassOwnArrayPtr<T> adoptArrayPtr(T* ptr) @@ -145,12 +145,12 @@ template<typename T> inline void deleteOwnedArrayPtr(T* ptr) delete [] ptr; } -template<typename T, typename U> inline PassOwnArrayPtr<T> static_pointer_cast(const PassOwnArrayPtr<U>& p) +template<typename T, typename U> inline PassOwnArrayPtr<T> static_pointer_cast(const PassOwnArrayPtr<U>& p) { return adoptArrayPtr(static_cast<T*>(p.leakPtr())); } -template<typename T, typename U> inline PassOwnArrayPtr<T> const_pointer_cast(const PassOwnArrayPtr<U>& p) +template<typename T, typename U> inline PassOwnArrayPtr<T> const_pointer_cast(const PassOwnArrayPtr<U>& p) { return adoptArrayPtr(const_cast<T*>(p.leakPtr())); } diff --git a/third_party/WebKit/Source/wtf/PassOwnPtr.h b/third_party/WebKit/Source/wtf/PassOwnPtr.h index 4afb0e4..c379f2f 100644 --- a/third_party/WebKit/Source/wtf/PassOwnPtr.h +++ b/third_party/WebKit/Source/wtf/PassOwnPtr.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_PassOwnPtr_h @@ -93,54 +93,54 @@ namespace WTF { return ptr; } - template<typename T, typename U> inline bool operator==(const PassOwnPtr<T>& a, const PassOwnPtr<U>& b) + template<typename T, typename U> inline bool operator==(const PassOwnPtr<T>& a, const PassOwnPtr<U>& b) { - return a.get() == b.get(); + return a.get() == b.get(); } - template<typename T, typename U> inline bool operator==(const PassOwnPtr<T>& a, const OwnPtr<U>& b) + template<typename T, typename U> inline bool operator==(const PassOwnPtr<T>& a, const OwnPtr<U>& b) { - return a.get() == b.get(); + return a.get() == b.get(); } - - template<typename T, typename U> inline bool operator==(const OwnPtr<T>& a, const PassOwnPtr<U>& b) + + template<typename T, typename U> inline bool operator==(const OwnPtr<T>& a, const PassOwnPtr<U>& b) { - return a.get() == b.get(); + return a.get() == b.get(); } - - template<typename T, typename U> inline bool operator==(const PassOwnPtr<T>& a, U* b) + + template<typename T, typename U> inline bool operator==(const PassOwnPtr<T>& a, U* b) { - return a.get() == b; + return a.get() == b; } - - template<typename T, typename U> inline bool operator==(T* a, const PassOwnPtr<U>& b) + + template<typename T, typename U> inline bool operator==(T* a, const PassOwnPtr<U>& b) { - return a == b.get(); + return a == b.get(); } - - template<typename T, typename U> inline bool operator!=(const PassOwnPtr<T>& a, const PassOwnPtr<U>& b) + + template<typename T, typename U> inline bool operator!=(const PassOwnPtr<T>& a, const PassOwnPtr<U>& b) { - return a.get() != b.get(); + return a.get() != b.get(); } - - template<typename T, typename U> inline bool operator!=(const PassOwnPtr<T>& a, const OwnPtr<U>& b) + + template<typename T, typename U> inline bool operator!=(const PassOwnPtr<T>& a, const OwnPtr<U>& b) { - return a.get() != b.get(); + return a.get() != b.get(); } - - template<typename T, typename U> inline bool operator!=(const OwnPtr<T>& a, const PassOwnPtr<U>& b) + + template<typename T, typename U> inline bool operator!=(const OwnPtr<T>& a, const PassOwnPtr<U>& b) { - return a.get() != b.get(); + return a.get() != b.get(); } - + template<typename T, typename U> inline bool operator!=(const PassOwnPtr<T>& a, U* b) { - return a.get() != b; + return a.get() != b; } - - template<typename T, typename U> inline bool operator!=(T* a, const PassOwnPtr<U>& b) + + template<typename T, typename U> inline bool operator!=(T* a, const PassOwnPtr<U>& b) { - return a != b.get(); + return a != b.get(); } template<typename T> inline PassOwnPtr<T> adoptPtr(T* ptr) @@ -148,12 +148,12 @@ namespace WTF { return PassOwnPtr<T>(ptr); } - template<typename T, typename U> inline PassOwnPtr<T> static_pointer_cast(const PassOwnPtr<U>& p) + template<typename T, typename U> inline PassOwnPtr<T> static_pointer_cast(const PassOwnPtr<U>& p) { return adoptPtr(static_cast<T*>(p.leakPtr())); } - template<typename T, typename U> inline PassOwnPtr<T> const_pointer_cast(const PassOwnPtr<U>& p) + template<typename T, typename U> inline PassOwnPtr<T> const_pointer_cast(const PassOwnPtr<U>& p) { return adoptPtr(const_cast<T*>(p.leakPtr())); } diff --git a/third_party/WebKit/Source/wtf/PassRefPtr.h b/third_party/WebKit/Source/wtf/PassRefPtr.h index 511d8ba..d04ad81 100644 --- a/third_party/WebKit/Source/wtf/PassRefPtr.h +++ b/third_party/WebKit/Source/wtf/PassRefPtr.h @@ -57,7 +57,7 @@ namespace WTF { ALWAYS_INLINE ~PassRefPtr() { derefIfNotNull(m_ptr); } template<typename U> PassRefPtr(const RefPtr<U>&); - + T* get() const { return m_ptr; } T* leakRef() const WARN_UNUSED_RETURN; @@ -81,7 +81,7 @@ namespace WTF { mutable T* m_ptr; }; - + template<typename T> template<typename U> inline PassRefPtr<T>::PassRefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { @@ -96,70 +96,70 @@ namespace WTF { return ptr; } - template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, const PassRefPtr<U>& b) - { - return a.get() == b.get(); + template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, const PassRefPtr<U>& b) + { + return a.get() == b.get(); } - template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, const RefPtr<U>& b) - { - return a.get() == b.get(); + template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, const RefPtr<U>& b) + { + return a.get() == b.get(); } - template<typename T, typename U> inline bool operator==(const RefPtr<T>& a, const PassRefPtr<U>& b) - { - return a.get() == b.get(); + template<typename T, typename U> inline bool operator==(const RefPtr<T>& a, const PassRefPtr<U>& b) + { + return a.get() == b.get(); } - template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, U* b) - { - return a.get() == b; + template<typename T, typename U> inline bool operator==(const PassRefPtr<T>& a, U* b) + { + return a.get() == b; } - - template<typename T, typename U> inline bool operator==(T* a, const PassRefPtr<U>& b) + + template<typename T, typename U> inline bool operator==(T* a, const PassRefPtr<U>& b) { - return a == b.get(); + return a == b.get(); } - - template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, const PassRefPtr<U>& b) - { - return a.get() != b.get(); + + template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, const PassRefPtr<U>& b) + { + return a.get() != b.get(); } - template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, const RefPtr<U>& b) - { - return a.get() != b.get(); + template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, const RefPtr<U>& b) + { + return a.get() != b.get(); } - template<typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const PassRefPtr<U>& b) - { - return a.get() != b.get(); + template<typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const PassRefPtr<U>& b) + { + return a.get() != b.get(); } template<typename T, typename U> inline bool operator!=(const PassRefPtr<T>& a, U* b) { - return a.get() != b; + return a.get() != b; } - template<typename T, typename U> inline bool operator!=(T* a, const PassRefPtr<U>& b) - { - return a != b.get(); + template<typename T, typename U> inline bool operator!=(T* a, const PassRefPtr<U>& b) + { + return a != b.get(); } - + template<typename T> inline PassRefPtr<T> adoptRef(T* p) { adopted(p); return PassRefPtr<T>(p, true); } - template<typename T, typename U> inline PassRefPtr<T> static_pointer_cast(const PassRefPtr<U>& p) - { - return adoptRef(static_cast<T*>(p.leakRef())); + template<typename T, typename U> inline PassRefPtr<T> static_pointer_cast(const PassRefPtr<U>& p) + { + return adoptRef(static_cast<T*>(p.leakRef())); } - template<typename T, typename U> inline PassRefPtr<T> const_pointer_cast(const PassRefPtr<U>& p) - { - return adoptRef(const_cast<T*>(p.leakRef())); + template<typename T, typename U> inline PassRefPtr<T> const_pointer_cast(const PassRefPtr<U>& p) + { + return adoptRef(const_cast<T*>(p.leakRef())); } template<typename T> inline T* getPtr(const PassRefPtr<T>& p) diff --git a/third_party/WebKit/Source/wtf/Platform.h b/third_party/WebKit/Source/wtf/Platform.h index 1d118f2..1fe86d3 100644 --- a/third_party/WebKit/Source/wtf/Platform.h +++ b/third_party/WebKit/Source/wtf/Platform.h @@ -35,7 +35,7 @@ /* HAVE() - specific system features (headers, functions or similar) that are present or not */ #define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE) -/* OS() - underlying operating system; only to be used for mandated low-level services like +/* OS() - underlying operating system; only to be used for mandated low-level services like virtual memory, not to choose a GUI toolkit */ #define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE) @@ -46,7 +46,7 @@ /* ENABLE() - turn on a specific feature of WebKit */ #define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE) -/* ==== OS() - underlying operating system; only to be used for mandated low-level services like +/* ==== OS() - underlying operating system; only to be used for mandated low-level services like virtual memory, not to choose a GUI toolkit ==== */ /* OS(ANDROID) - Android */ @@ -137,10 +137,10 @@ #if OS(UNIX) #define HAVE_ERRNO_H 1 -#define HAVE_MMAP 1 +#define HAVE_MMAP 1 #define HAVE_SIGNAL_H 1 #define HAVE_STRINGS_H 1 -#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TIME_H 1 #define WTF_USE_PTHREADS 1 #endif /* OS(UNIX) */ diff --git a/third_party/WebKit/Source/wtf/PrintStream.cpp b/third_party/WebKit/Source/wtf/PrintStream.cpp index 019ed77..09cdf38 100644 --- a/third_party/WebKit/Source/wtf/PrintStream.cpp +++ b/third_party/WebKit/Source/wtf/PrintStream.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/wtf/PrintStream.h b/third_party/WebKit/Source/wtf/PrintStream.h index 5bc7863..f1b2db2 100644 --- a/third_party/WebKit/Source/wtf/PrintStream.h +++ b/third_party/WebKit/Source/wtf/PrintStream.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef PrintStream_h @@ -49,20 +49,20 @@ public: // Typically a no-op for many subclasses of PrintStream, this is a hint that // the implementation should flush its buffers if it had not done so already. virtual void flush(); - + template<typename T> void print(const T& value) { printInternal(*this, value); } - + template<typename T1, typename T2> void print(const T1& value1, const T2& value2) { print(value1); print(value2); } - + template<typename T1, typename T2, typename T3> void print(const T1& value1, const T2& value2, const T3& value3) { @@ -70,7 +70,7 @@ public: print(value2); print(value3); } - + template<typename T1, typename T2, typename T3, typename T4> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4) { @@ -79,7 +79,7 @@ public: print(value3); print(value4); } - + template<typename T1, typename T2, typename T3, typename T4, typename T5> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4, const T5& value5) { @@ -89,7 +89,7 @@ public: print(value4); print(value5); } - + template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4, const T5& value5, const T6& value6) { @@ -100,7 +100,7 @@ public: print(value5); print(value6); } - + template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4, const T5& value5, const T6& value6, const T7& value7) { @@ -112,7 +112,7 @@ public: print(value6); print(value7); } - + template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4, const T5& value5, const T6& value6, const T7& value7, const T8& value8) { @@ -125,7 +125,7 @@ public: print(value7); print(value8); } - + template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4, const T5& value5, const T6& value6, const T7& value7, const T8& value8, const T9& value9) { @@ -139,7 +139,7 @@ public: print(value8); print(value9); } - + template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4, const T5& value5, const T6& value6, const T7& value7, const T8& value8, const T9& value9, const T10& value10) { @@ -154,7 +154,7 @@ public: print(value9); print(value10); } - + template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4, const T5& value5, const T6& value6, const T7& value7, const T8& value8, const T9& value9, const T10& value10, const T11& value11) { @@ -170,7 +170,7 @@ public: print(value10); print(value11); } - + template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4, const T5& value5, const T6& value6, const T7& value7, const T8& value8, const T9& value9, const T10& value10, const T11& value11, const T12& value12) { @@ -187,7 +187,7 @@ public: print(value11); print(value12); } - + template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12, typename T13> void print(const T1& value1, const T2& value2, const T3& value3, const T4& value4, const T5& value5, const T6& value6, const T7& value7, const T8& value8, const T9& value9, const T10& value10, const T11& value11, const T12& value12, const T13& value13) { @@ -276,7 +276,7 @@ public: : m_ptr(ptr) { } - + void dump(PrintStream& out) const { if (m_ptr) diff --git a/third_party/WebKit/Source/wtf/ProcessID.h b/third_party/WebKit/Source/wtf/ProcessID.h index be2a696..332f530 100644 --- a/third_party/WebKit/Source/wtf/ProcessID.h +++ b/third_party/WebKit/Source/wtf/ProcessID.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ProcessID_h diff --git a/third_party/WebKit/Source/wtf/RandomNumber.cpp b/third_party/WebKit/Source/wtf/RandomNumber.cpp index 7c764d3..059195d 100644 --- a/third_party/WebKit/Source/wtf/RandomNumber.cpp +++ b/third_party/WebKit/Source/wtf/RandomNumber.cpp @@ -22,7 +22,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/wtf/RandomNumber.h b/third_party/WebKit/Source/wtf/RandomNumber.h index 1ffed42..3259a32 100644 --- a/third_party/WebKit/Source/wtf/RandomNumber.h +++ b/third_party/WebKit/Source/wtf/RandomNumber.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_RandomNumber_h diff --git a/third_party/WebKit/Source/wtf/RandomNumberSeed.h b/third_party/WebKit/Source/wtf/RandomNumberSeed.h index 1cdd5f3..2764b6d 100644 --- a/third_party/WebKit/Source/wtf/RandomNumberSeed.h +++ b/third_party/WebKit/Source/wtf/RandomNumberSeed.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_RandomNumberSeed_h diff --git a/third_party/WebKit/Source/wtf/RefCountedLeakCounter.cpp b/third_party/WebKit/Source/wtf/RefCountedLeakCounter.cpp index 3d49e9f..b1aebf5 100644 --- a/third_party/WebKit/Source/wtf/RefCountedLeakCounter.cpp +++ b/third_party/WebKit/Source/wtf/RefCountedLeakCounter.cpp @@ -61,7 +61,7 @@ void RefCountedLeakCounter::cancelMessageSuppression(const char* reason) RefCountedLeakCounter::RefCountedLeakCounter(const char* description) : m_description(description) { -} +} RefCountedLeakCounter::~RefCountedLeakCounter() { diff --git a/third_party/WebKit/Source/wtf/RefCountedLeakCounter.h b/third_party/WebKit/Source/wtf/RefCountedLeakCounter.h index 31778c4..ba273bc 100644 --- a/third_party/WebKit/Source/wtf/RefCountedLeakCounter.h +++ b/third_party/WebKit/Source/wtf/RefCountedLeakCounter.h @@ -17,20 +17,20 @@ * Boston, MA 02110-1301, USA. * */ - + #ifndef RefCountedLeakCounter_h #define RefCountedLeakCounter_h - + #include "wtf/Assertions.h" #include "wtf/Threading.h" #include "wtf/WTFExport.h" namespace WTF { - + struct WTF_EXPORT RefCountedLeakCounter { static void suppressMessages(const char*); static void cancelMessageSuppression(const char*); - + explicit RefCountedLeakCounter(const char* description); ~RefCountedLeakCounter(); diff --git a/third_party/WebKit/Source/wtf/RefPtr.h b/third_party/WebKit/Source/wtf/RefPtr.h index e8b6667..fb901ac 100644 --- a/third_party/WebKit/Source/wtf/RefPtr.h +++ b/third_party/WebKit/Source/wtf/RefPtr.h @@ -50,19 +50,19 @@ namespace WTF { ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); } T* get() const { return m_ptr; } - + void clear(); PassRefPtr<T> release() { PassRefPtr<T> tmp = adoptRef(m_ptr); m_ptr = 0; return tmp; } T& operator*() const { return *m_ptr; } ALWAYS_INLINE T* operator->() const { return m_ptr; } - + bool operator!() const { return !m_ptr; } - + // This conversion operator allows implicit conversion to bool but not to other integer types. typedef T* (RefPtr::*UnspecifiedBoolType); operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : 0; } - + RefPtr& operator=(const RefPtr&); RefPtr& operator=(T*); RefPtr& operator=(const PassRefPtr<T>&); @@ -79,7 +79,7 @@ namespace WTF { private: T* m_ptr; }; - + template<typename T> template<typename U> inline RefPtr<T>::RefPtr(const PassRefPtr<U>& o) : m_ptr(o.leakRef()) { @@ -101,7 +101,7 @@ namespace WTF { derefIfNotNull(ptr); return *this; } - + template<typename T> template<typename U> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<U>& o) { T* optr = o.get(); @@ -111,7 +111,7 @@ namespace WTF { derefIfNotNull(ptr); return *this; } - + template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(T* optr) { refIfNotNull(optr); @@ -148,43 +148,43 @@ namespace WTF { } template<typename T, typename U> inline bool operator==(const RefPtr<T>& a, const RefPtr<U>& b) - { - return a.get() == b.get(); + { + return a.get() == b.get(); } template<typename T, typename U> inline bool operator==(const RefPtr<T>& a, U* b) - { - return a.get() == b; + { + return a.get() == b; } - - template<typename T, typename U> inline bool operator==(T* a, const RefPtr<U>& b) + + template<typename T, typename U> inline bool operator==(T* a, const RefPtr<U>& b) { - return a == b.get(); + return a == b.get(); } - + template<typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const RefPtr<U>& b) - { - return a.get() != b.get(); + { + return a.get() != b.get(); } template<typename T, typename U> inline bool operator!=(const RefPtr<T>& a, U* b) { - return a.get() != b; + return a.get() != b; } template<typename T, typename U> inline bool operator!=(T* a, const RefPtr<U>& b) - { - return a != b.get(); + { + return a != b.get(); } - + template<typename T, typename U> inline RefPtr<T> static_pointer_cast(const RefPtr<U>& p) - { - return RefPtr<T>(static_cast<T*>(p.get())); + { + return RefPtr<T>(static_cast<T*>(p.get())); } template<typename T, typename U> inline RefPtr<T> const_pointer_cast(const RefPtr<U>& p) - { - return RefPtr<T>(const_cast<T*>(p.get())); + { + return RefPtr<T>(const_cast<T*>(p.get())); } template<typename T> inline T* getPtr(const RefPtr<T>& p) diff --git a/third_party/WebKit/Source/wtf/RefPtrHashMap.h b/third_party/WebKit/Source/wtf/RefPtrHashMap.h index 9541837..76a5610 100644 --- a/third_party/WebKit/Source/wtf/RefPtrHashMap.h +++ b/third_party/WebKit/Source/wtf/RefPtrHashMap.h @@ -25,9 +25,9 @@ namespace WTF { // This specialization is a copy of HashMap for use with RefPtr keys, with overloaded functions // to allow for lookup by pointer instead of RefPtr, avoiding ref-count churn. - + // FIXME: Find a way to do this with traits that doesn't require a copy of the HashMap template. - + template<typename T, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg> class HashMap<RefPtr<T>, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> { WTF_MAKE_FAST_ALLOCATED; @@ -48,7 +48,7 @@ namespace WTF { typedef typename MappedTraits::PeekType MappedPeekType; typedef typename ReferenceTypeMaker<MappedPassInType>::ReferenceType MappedPassInReferenceType; - + typedef HashArg HashFunctions; typedef HashTable<KeyType, ValueType, KeyValuePairKeyExtractor<ValueType>, @@ -85,13 +85,13 @@ namespace WTF { MappedPeekType inlineGet(RawKeyType) const; // replaces value but not key if key is already present - // return value is a pair of the iterator to the key location, + // return value is a pair of the iterator to the key location, // and a boolean that's true if a new value was actually added AddResult set(const KeyType&, MappedPassInType); AddResult set(RawKeyType, MappedPassInType); // does nothing if key is already present - // return value is a pair of the iterator to the key location, + // return value is a pair of the iterator to the key location, // and a boolean that's true if a new value was actually added AddResult add(const KeyType&, MappedPassInType); AddResult add(RawKeyType, MappedPassInType); @@ -110,23 +110,23 @@ namespace WTF { HashTableType m_impl; }; - + template<typename T, typename U, typename V, typename W, typename X> inline void HashMap<RefPtr<T>, U, V, W, X>::swap(HashMap& other) { - m_impl.swap(other.m_impl); + m_impl.swap(other.m_impl); } template<typename T, typename U, typename V, typename W, typename X> inline int HashMap<RefPtr<T>, U, V, W, X>::size() const { - return m_impl.size(); + return m_impl.size(); } template<typename T, typename U, typename V, typename W, typename X> inline int HashMap<RefPtr<T>, U, V, W, X>::capacity() const - { - return m_impl.capacity(); + { + return m_impl.capacity(); } template<typename T, typename U, typename V, typename W, typename X> @@ -197,21 +197,21 @@ namespace WTF { template<typename T, typename U, typename V, typename W, typename X> inline typename HashMap<RefPtr<T>, U, V, W, X>::AddResult - HashMap<RefPtr<T>, U, V, W, X>::inlineAdd(const KeyType& key, MappedPassInReferenceType mapped) + HashMap<RefPtr<T>, U, V, W, X>::inlineAdd(const KeyType& key, MappedPassInReferenceType mapped) { return m_impl.template add<Translator>(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> inline typename HashMap<RefPtr<T>, U, V, W, X>::AddResult - HashMap<RefPtr<T>, U, V, W, X>::inlineAdd(RawKeyType key, MappedPassInReferenceType mapped) + HashMap<RefPtr<T>, U, V, W, X>::inlineAdd(RawKeyType key, MappedPassInReferenceType mapped) { return m_impl.template add<Translator>(key, mapped); } template<typename T, typename U, typename V, typename W, typename X> typename HashMap<RefPtr<T>, U, V, W, X>::AddResult - HashMap<RefPtr<T>, U, V, W, X>::set(const KeyType& key, MappedPassInType mapped) + HashMap<RefPtr<T>, U, V, W, X>::set(const KeyType& key, MappedPassInType mapped) { AddResult result = inlineAdd(key, mapped); if (!result.isNewEntry) { @@ -223,7 +223,7 @@ namespace WTF { template<typename T, typename U, typename V, typename W, typename X> typename HashMap<RefPtr<T>, U, V, W, X>::AddResult - HashMap<RefPtr<T>, U, V, W, X>::set(RawKeyType key, MappedPassInType mapped) + HashMap<RefPtr<T>, U, V, W, X>::set(RawKeyType key, MappedPassInType mapped) { AddResult result = inlineAdd(key, mapped); if (!result.isNewEntry) { diff --git a/third_party/WebKit/Source/wtf/RetainPtr.h b/third_party/WebKit/Source/wtf/RetainPtr.h index ec7403b..9e5bbc6 100644 --- a/third_party/WebKit/Source/wtf/RetainPtr.h +++ b/third_party/WebKit/Source/wtf/RetainPtr.h @@ -50,7 +50,7 @@ namespace WTF { enum AdoptCFTag { AdoptCF }; enum AdoptNSTag { AdoptNS }; - + #ifdef __OBJC__ inline void adoptNSReference(id ptr) { @@ -71,7 +71,7 @@ namespace WTF { RetainPtr(AdoptCFTag, PtrType ptr) : m_ptr(ptr) { } RetainPtr(AdoptNSTag, PtrType ptr) : m_ptr(ptr) { adoptNSReference(ptr); } - + RetainPtr(const RetainPtr& o) : m_ptr(o.m_ptr) { if (PtrType ptr = m_ptr) CFRetain(ptr); } #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) @@ -81,9 +81,9 @@ namespace WTF { // Hash table deleted values, which are only constructed and never copied or destroyed. RetainPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { } bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); } - + ~RetainPtr() { if (PtrType ptr = m_ptr) CFRelease(ptr); } - + template<typename U> RetainPtr(const RetainPtr<U>&); void clear(); @@ -96,11 +96,11 @@ namespace WTF { #endif bool operator!() const { return !m_ptr; } - + // This conversion operator allows implicit conversion to bool but not to other integer types. typedef PtrType RetainPtr::*UnspecifiedBoolType; operator UnspecifiedBoolType() const { return m_ptr ? &RetainPtr::m_ptr : 0; } - + RetainPtr& operator=(const RetainPtr&); template<typename U> RetainPtr& operator=(const RetainPtr<U>&); RetainPtr& operator=(PtrType); @@ -117,7 +117,7 @@ namespace WTF { void adoptCF(PtrType); void adoptNS(PtrType); - + void swap(RetainPtr&); private: @@ -125,7 +125,7 @@ namespace WTF { PtrType m_ptr; }; - + template<typename T> template<typename U> inline RetainPtr<T>::RetainPtr(const RetainPtr<U>& o) : m_ptr(o.get()) { @@ -159,7 +159,7 @@ namespace WTF { CFRelease(ptr); return *this; } - + template<typename T> template<typename U> inline RetainPtr<T>& RetainPtr<T>::operator=(const RetainPtr<U>& o) { PtrType optr = o.get(); @@ -200,7 +200,7 @@ namespace WTF { adoptCF(o.leakRef()); return *this; } - + template<typename T> template<typename U> inline RetainPtr<T>& RetainPtr<T>::operator=(RetainPtr<U>&& o) { adoptCF(o.leakRef()); @@ -219,7 +219,7 @@ namespace WTF { template<typename T> inline void RetainPtr<T>::adoptNS(PtrType optr) { adoptNSReference(optr); - + PtrType ptr = m_ptr; m_ptr = optr; if (ptr) @@ -237,33 +237,33 @@ namespace WTF { } template<typename T, typename U> inline bool operator==(const RetainPtr<T>& a, const RetainPtr<U>& b) - { - return a.get() == b.get(); + { + return a.get() == b.get(); } template<typename T, typename U> inline bool operator==(const RetainPtr<T>& a, U* b) - { - return a.get() == b; + { + return a.get() == b; } - - template<typename T, typename U> inline bool operator==(T* a, const RetainPtr<U>& b) + + template<typename T, typename U> inline bool operator==(T* a, const RetainPtr<U>& b) { - return a == b.get(); + return a == b.get(); } - + template<typename T, typename U> inline bool operator!=(const RetainPtr<T>& a, const RetainPtr<U>& b) - { - return a.get() != b.get(); + { + return a.get() != b.get(); } template<typename T, typename U> inline bool operator!=(const RetainPtr<T>& a, U* b) { - return a.get() != b; + return a.get() != b; } template<typename T, typename U> inline bool operator!=(T* a, const RetainPtr<U>& b) - { - return a != b.get(); + { + return a != b.get(); } template<typename T> inline RetainPtr<T> adoptCF(T CF_RELEASES_ARGUMENT) WARN_UNUSED_RETURN; @@ -286,7 +286,7 @@ namespace WTF { } template<typename P> struct HashTraits<RetainPtr<P> > : SimpleClassHashTraits<RetainPtr<P> > { }; - + template<typename P> struct PtrHash<RetainPtr<P> > : PtrHash<typename RetainPtr<P>::PtrType> { using PtrHash<typename RetainPtr<P>::PtrType>::hash; static unsigned hash(const RetainPtr<P>& key) { return hash(key.get()); } diff --git a/third_party/WebKit/Source/wtf/SHA1.h b/third_party/WebKit/Source/wtf/SHA1.h index fc73727..1cf357c 100644 --- a/third_party/WebKit/Source/wtf/SHA1.h +++ b/third_party/WebKit/Source/wtf/SHA1.h @@ -59,13 +59,13 @@ public: // computeHash has a side effect of resetting the state of the object. void computeHash(Vector<uint8_t, 20>&); - + // Get a hex hash from the digest. Pass a limit less than 40 if you want a shorter digest. static CString hexDigest(const Vector<uint8_t, 20>&); - + // Compute the hex digest directly. Pass a limit less than 40 if you want a shorter digest. CString computeHexDigest(); - + private: void finalize(); void processBlock(); diff --git a/third_party/WebKit/Source/wtf/StackStats.cpp b/third_party/WebKit/Source/wtf/StackStats.cpp index 3df0c22..ecfe120 100644 --- a/third_party/WebKit/Source/wtf/StackStats.cpp +++ b/third_party/WebKit/Source/wtf/StackStats.cpp @@ -20,13 +20,13 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" #include "StackStats.h" -#if ENABLE(STACK_STATS) +#if ENABLE(STACK_STATS) #include "Assertions.h" #include "DataLog.h" @@ -226,7 +226,7 @@ StackStats::LayoutCheckPoint::LayoutCheckPoint() } StackStats::s_topLayoutCheckPoint = this; - // + // char* current = reinterpret_cast<char*>(this); char* last = reinterpret_cast<char*>(m_prev); char* root = reinterpret_cast<char*>(StackStats::s_firstLayoutCheckPoint); diff --git a/third_party/WebKit/Source/wtf/StackStats.h b/third_party/WebKit/Source/wtf/StackStats.h index ce8749c..c0c424c 100644 --- a/third_party/WebKit/Source/wtf/StackStats.h +++ b/third_party/WebKit/Source/wtf/StackStats.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef StackStats_h @@ -44,7 +44,7 @@ namespace WTF { -#if !ENABLE(STACK_STATS) +#if !ENABLE(STACK_STATS) class StackStats { public: @@ -141,7 +141,7 @@ private: friend class LayoutCheckPoint; }; -#endif // ENABLE(STACK_STATS) +#endif // ENABLE(STACK_STATS) } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/StdLibExtras.h b/third_party/WebKit/Source/wtf/StdLibExtras.h index afa5fd9..293211c 100644 --- a/third_party/WebKit/Source/wtf/StdLibExtras.h +++ b/third_party/WebKit/Source/wtf/StdLibExtras.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_StdLibExtras_h @@ -190,7 +190,7 @@ inline ArrayElementType* binarySearchImpl(ArrayType& array, size_t size, KeyType while (size > 1) { size_t pos = (size - 1) >> 1; KeyType val = extractKey(&array[offset + pos]); - + if (val == key) return &array[offset + pos]; // The item we are looking for is smaller than the item being check; reduce the value of 'size', @@ -205,10 +205,10 @@ inline ArrayElementType* binarySearchImpl(ArrayType& array, size_t size, KeyType ASSERT(mode != KeyMustBePresentInArray || size); } - + if (mode == KeyMightNotBePresentInArray && !size) return 0; - + ArrayElementType* result = &array[offset]; if (mode == KeyMightNotBePresentInArray && key != extractKey(result)) diff --git a/third_party/WebKit/Source/wtf/StringExtras.h b/third_party/WebKit/Source/wtf/StringExtras.h index 766080b..4166f0f 100644 --- a/third_party/WebKit/Source/wtf/StringExtras.h +++ b/third_party/WebKit/Source/wtf/StringExtras.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_StringExtras_h @@ -30,14 +30,14 @@ #include <stdio.h> #include <string.h> -#if HAVE(STRINGS_H) -#include <strings.h> -#endif +#if HAVE(STRINGS_H) +#include <strings.h> +#endif #if COMPILER(MSVC) // FIXME: why a COMPILER check instead of OS? also, these should be HAVE checks -inline int snprintf(char* buffer, size_t count, const char* format, ...) +inline int snprintf(char* buffer, size_t count, const char* format, ...) { int result; va_list args; @@ -65,7 +65,7 @@ inline double wtf_vsnprintf(char* buffer, size_t count, const char* format, va_l return result; } -// Work around a difference in Microsoft's implementation of vsnprintf, where +// Work around a difference in Microsoft's implementation of vsnprintf, where // vsnprintf does not null terminate the buffer. WebKit can rely on the null termination. #define vsnprintf(buffer, count, format, args) wtf_vsnprintf(buffer, count, format, args) diff --git a/third_party/WebKit/Source/wtf/TCPageMap.h b/third_party/WebKit/Source/wtf/TCPageMap.h index 6b226a9..9f48ea3 100644 --- a/third_party/WebKit/Source/wtf/TCPageMap.h +++ b/third_party/WebKit/Source/wtf/TCPageMap.h @@ -1,10 +1,10 @@ // Copyright (c) 2005, Google Inc. // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: -// +// // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/wtf/TCSpinLock.h b/third_party/WebKit/Source/wtf/TCSpinLock.h index ae98ee4..2c1cd7c 100644 --- a/third_party/WebKit/Source/wtf/TCSpinLock.h +++ b/third_party/WebKit/Source/wtf/TCSpinLock.h @@ -1,11 +1,11 @@ // Copyright (c) 2005, 2006, Google Inc. // Copyright (c) 2010, Patrick Gansterer <paroga@paroga.com> // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: -// +// // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above @@ -15,7 +15,7 @@ // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/wtf/TCSystemAlloc.cpp b/third_party/WebKit/Source/wtf/TCSystemAlloc.cpp index 166644f..15ea93a 100644 --- a/third_party/WebKit/Source/wtf/TCSystemAlloc.cpp +++ b/third_party/WebKit/Source/wtf/TCSystemAlloc.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2005, 2007, Google Inc. // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: -// +// // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -72,7 +72,7 @@ static size_t pagesize = 0; #if HAVE(MMAP) static bool use_mmap = true; -#endif +#endif #if HAVE(VIRTUALALLOC) static bool use_VirtualAlloc = true; @@ -94,12 +94,12 @@ static void* TryMmap(size_t size, size_t *actual_size, size_t alignment) { if (pagesize == 0) pagesize = getpagesize(); if (alignment < pagesize) alignment = pagesize; size = ((size + alignment - 1) / alignment) * alignment; - + // could theoretically return the "extra" bytes here, but this // is simple and correct. - if (actual_size) + if (actual_size) *actual_size = size; - + // Ask for extra memory if alignment > pagesize size_t extra = 0; if (alignment > pagesize) { @@ -153,16 +153,16 @@ static void* TryVirtualAlloc(size_t size, size_t *actual_size, size_t alignment) // could theoretically return the "extra" bytes here, but this // is simple and correct. - if (actual_size) + if (actual_size) *actual_size = size; - + // Ask for extra memory if alignment > pagesize size_t extra = 0; if (alignment > pagesize) { extra = alignment - pagesize; } void* result = VirtualAlloc(NULL, size + extra, - MEM_RESERVE | MEM_COMMIT | MEM_TOP_DOWN, + MEM_RESERVE | MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE); if (result == NULL) { @@ -195,7 +195,7 @@ static void* TryVirtualAlloc(size_t size, size_t *actual_size, size_t alignment) void* TCMalloc_SystemAlloc(size_t size, size_t *actual_size, size_t alignment) { // Discard requests that overflow if (size + alignment < size) return NULL; - + SpinLockHolder lock_holder(&spinlock); // Enforce minimum alignment @@ -205,7 +205,7 @@ void* TCMalloc_SystemAlloc(size_t size, size_t *actual_size, size_t alignment) { // more trying all allocators even if they failed before. for (int i = 0; i < 2; i++) { -#if HAVE(MMAP) +#if HAVE(MMAP) if (use_mmap && !mmap_failure) { void* result = TryMmap(size, actual_size, alignment); if (result != NULL) return result; diff --git a/third_party/WebKit/Source/wtf/TCSystemAlloc.h b/third_party/WebKit/Source/wtf/TCSystemAlloc.h index 1c67788..247ea7c 100644 --- a/third_party/WebKit/Source/wtf/TCSystemAlloc.h +++ b/third_party/WebKit/Source/wtf/TCSystemAlloc.h @@ -1,10 +1,10 @@ // Copyright (c) 2005, 2007, Google Inc. // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: -// +// // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/third_party/WebKit/Source/wtf/ThreadFunctionInvocation.h b/third_party/WebKit/Source/wtf/ThreadFunctionInvocation.h index 2d8599e..b9ca701 100644 --- a/third_party/WebKit/Source/wtf/ThreadFunctionInvocation.h +++ b/third_party/WebKit/Source/wtf/ThreadFunctionInvocation.h @@ -6,13 +6,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/ThreadSafeRefCounted.h b/third_party/WebKit/Source/wtf/ThreadSafeRefCounted.h index 0e599e2..809af5a 100644 --- a/third_party/WebKit/Source/wtf/ThreadSafeRefCounted.h +++ b/third_party/WebKit/Source/wtf/ThreadSafeRefCounted.h @@ -7,13 +7,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/ThreadSpecific.h b/third_party/WebKit/Source/wtf/ThreadSpecific.h index fb2749a..516d6f7 100644 --- a/third_party/WebKit/Source/wtf/ThreadSpecific.h +++ b/third_party/WebKit/Source/wtf/ThreadSpecific.h @@ -8,13 +8,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/Threading.cpp b/third_party/WebKit/Source/wtf/Threading.cpp index 2637997..23e7df1 100644 --- a/third_party/WebKit/Source/wtf/Threading.cpp +++ b/third_party/WebKit/Source/wtf/Threading.cpp @@ -6,10 +6,10 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/Threading.h b/third_party/WebKit/Source/wtf/Threading.h index 5e35490..62285d2 100644 --- a/third_party/WebKit/Source/wtf/Threading.h +++ b/third_party/WebKit/Source/wtf/Threading.h @@ -7,13 +7,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/ThreadingPrimitives.h b/third_party/WebKit/Source/wtf/ThreadingPrimitives.h index 95233dc..ad16429 100644 --- a/third_party/WebKit/Source/wtf/ThreadingPrimitives.h +++ b/third_party/WebKit/Source/wtf/ThreadingPrimitives.h @@ -7,13 +7,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -60,7 +60,7 @@ struct PlatformMutex { struct PlatformCondition { size_t m_waitersGone; size_t m_waitersBlocked; - size_t m_waitersToUnblock; + size_t m_waitersToUnblock; HANDLE m_blockLock; HANDLE m_blockQueue; HANDLE m_unblockLock; @@ -72,7 +72,7 @@ struct PlatformCondition { typedef void* PlatformMutex; typedef void* PlatformCondition; #endif - + class WTF_EXPORT Mutex { WTF_MAKE_NONCOPYABLE(Mutex); WTF_MAKE_FAST_ALLOCATED; public: @@ -113,14 +113,14 @@ class WTF_EXPORT ThreadCondition { public: ThreadCondition(); ~ThreadCondition(); - + void wait(Mutex&); // Returns true if the condition was signaled before absoluteTime, false if the absoluteTime was reached or is in the past. // The absoluteTime is in seconds, starting on January 1, 1970. The time is assumed to use the same time zone as WTF::currentTime(). bool timedWait(Mutex&, double absoluteTime); void signal(); void broadcast(); - + private: PlatformCondition m_condition; }; diff --git a/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp b/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp index 2288bc1..aa0c186 100644 --- a/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp +++ b/third_party/WebKit/Source/wtf/ThreadingPthreads.cpp @@ -8,13 +8,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -67,15 +67,15 @@ public: enum JoinableState { Joinable, // The default thread state. The thread can be joined on. - Joined, // Somebody waited on this thread to exit and this thread finally exited. This state is here because there can be a - // period of time between when the thread exits (which causes pthread_join to return and the remainder of waitOnThreadCompletion to run) - // and when threadDidExit is called. We need threadDidExit to take charge and delete the thread data since there's + Joined, // Somebody waited on this thread to exit and this thread finally exited. This state is here because there can be a + // period of time between when the thread exits (which causes pthread_join to return and the remainder of waitOnThreadCompletion to run) + // and when threadDidExit is called. We need threadDidExit to take charge and delete the thread data since there's // nobody else to pick up the slack in this case (since waitOnThreadCompletion has already returned). Detached // The thread has been detached and can no longer be joined on. At this point, the thread must take care of cleaning up after itself. }; - // Currently all threads created by WTF start out as joinable. + // Currently all threads created by WTF start out as joinable. PthreadState(pthread_t handle) : m_joinableState(Joinable) , m_didExit(false) @@ -275,7 +275,7 @@ void threadDidExit(ThreadIdentifier threadID) MutexLocker locker(threadMapMutex()); PthreadState* state = threadMap().get(threadID); ASSERT(state); - + state->didExit(); if (state->joinableState() != PthreadState::Joinable) @@ -343,7 +343,7 @@ void Mutex::unlock() } ThreadCondition::ThreadCondition() -{ +{ pthread_cond_init(&m_condition, NULL); } @@ -351,7 +351,7 @@ ThreadCondition::~ThreadCondition() { pthread_cond_destroy(&m_condition); } - + void ThreadCondition::wait(Mutex& mutex) { int result = pthread_cond_wait(&m_condition, &mutex.impl()); diff --git a/third_party/WebKit/Source/wtf/ThreadingWin.cpp b/third_party/WebKit/Source/wtf/ThreadingWin.cpp index 3df40a6..f12679f 100644 --- a/third_party/WebKit/Source/wtf/ThreadingWin.cpp +++ b/third_party/WebKit/Source/wtf/ThreadingWin.cpp @@ -8,13 +8,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -244,11 +244,11 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con int waitForThreadCompletion(ThreadIdentifier threadID) { ASSERT(threadID); - + HANDLE threadHandle = threadHandleForIdentifier(threadID); if (!threadHandle) LOG_ERROR("ThreadIdentifier %u did not correspond to an active thread when trying to quit", threadID); - + DWORD joinResult = WaitForSingleObject(threadHandle, INFINITE); if (joinResult == WAIT_FAILED) LOG_ERROR("ThreadIdentifier %u was found to be deadlocked trying to quit", threadID); @@ -295,7 +295,7 @@ void Mutex::lock() EnterCriticalSection(&m_mutex.m_internalMutex); ++m_mutex.m_recursionCount; } - + bool Mutex::tryLock() { // This method is modeled after the behavior of pthread_mutex_trylock, @@ -305,7 +305,7 @@ bool Mutex::tryLock() // tests in WebKit that check to see if the current thread already // owned this mutex (see e.g., IconDatabase::getOrCreateIconRecord) DWORD result = TryEnterCriticalSection(&m_mutex.m_internalMutex); - + if (result != 0) { // We got the lock // If this thread already had the lock, we must unlock and // return false so that we mimic the behavior of POSIX's diff --git a/third_party/WebKit/Source/wtf/TriState.h b/third_party/WebKit/Source/wtf/TriState.h index f613a7b..abac5f7 100644 --- a/third_party/WebKit/Source/wtf/TriState.h +++ b/third_party/WebKit/Source/wtf/TriState.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TriState_h diff --git a/third_party/WebKit/Source/wtf/TypeTraits.h b/third_party/WebKit/Source/wtf/TypeTraits.h index 30616c6..265e9e5 100644 --- a/third_party/WebKit/Source/wtf/TypeTraits.h +++ b/third_party/WebKit/Source/wtf/TypeTraits.h @@ -230,7 +230,7 @@ namespace WTF { #if COMPILER(CLANG) || GCC_VERSION_AT_LEAST(4, 6, 0) || (defined(_MSC_VER) && (_MSC_VER >= 1400) && (_MSC_VER < 1600) && !defined(__INTEL_COMPILER)) // VC8 (VS2005) and later has __has_trivial_constructor and __has_trivial_destructor, - // but the implementation returns false for built-in types. We add the extra IsPod condition to + // but the implementation returns false for built-in types. We add the extra IsPod condition to // work around this. template <typename T> struct HasTrivialConstructor { static const bool value = __has_trivial_constructor(T) || IsPod<RemoveConstVolatile<T> >::value; @@ -244,9 +244,9 @@ namespace WTF { template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { }; template<typename T> struct HasTrivialDestructor : public std::tr1::has_trivial_destructor<T> { }; #else - // For compilers that don't support detection of trivial constructors and destructors in classes, - // we use a template that returns true for any POD type that IsPod can detect (see IsPod caveats above), - // but false for all other types (which includes all classes). This will give false negatives, which can hurt + // For compilers that don't support detection of trivial constructors and destructors in classes, + // we use a template that returns true for any POD type that IsPod can detect (see IsPod caveats above), + // but false for all other types (which includes all classes). This will give false negatives, which can hurt // performance, but avoids false positives, which would result in incorrect behavior. template <typename T> struct HasTrivialConstructor { static const bool value = IsPod<RemoveConstVolatile<T> >::value; diff --git a/third_party/WebKit/Source/wtf/TypedArrayBase.h b/third_party/WebKit/Source/wtf/TypedArrayBase.h index 8ead408..b537188 100644 --- a/third_party/WebKit/Source/wtf/TypedArrayBase.h +++ b/third_party/WebKit/Source/wtf/TypedArrayBase.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TypedArrayBase_h diff --git a/third_party/WebKit/Source/wtf/Uint16Array.h b/third_party/WebKit/Source/wtf/Uint16Array.h index 9c59f19..0f41c62 100644 --- a/third_party/WebKit/Source/wtf/Uint16Array.h +++ b/third_party/WebKit/Source/wtf/Uint16Array.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Uint16Array_h diff --git a/third_party/WebKit/Source/wtf/Uint32Array.h b/third_party/WebKit/Source/wtf/Uint32Array.h index 6fd8080..5f48985 100644 --- a/third_party/WebKit/Source/wtf/Uint32Array.h +++ b/third_party/WebKit/Source/wtf/Uint32Array.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Uint32Array_h diff --git a/third_party/WebKit/Source/wtf/Uint8Array.h b/third_party/WebKit/Source/wtf/Uint8Array.h index fc07a9e..dc97550 100644 --- a/third_party/WebKit/Source/wtf/Uint8Array.h +++ b/third_party/WebKit/Source/wtf/Uint8Array.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Uint8Array_h diff --git a/third_party/WebKit/Source/wtf/VMTags.h b/third_party/WebKit/Source/wtf/VMTags.h index dbb8751..37a4bb7 100644 --- a/third_party/WebKit/Source/wtf/VMTags.h +++ b/third_party/WebKit/Source/wtf/VMTags.h @@ -20,14 +20,14 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef VMTags_h #define VMTags_h // On Mac OS X, the VM subsystem allows tagging memory requested from mmap and vm_map -// in order to aid tools that inspect system memory use. +// in order to aid tools that inspect system memory use. #if OS(DARWIN) #include <mach/vm_statistics.h> diff --git a/third_party/WebKit/Source/wtf/Vector.h b/third_party/WebKit/Source/wtf/Vector.h index c98c0b4..e62f797 100644 --- a/third_party/WebKit/Source/wtf/Vector.h +++ b/third_party/WebKit/Source/wtf/Vector.h @@ -46,7 +46,7 @@ namespace WTF { template<typename T> struct VectorDestructor<true, T> { - static void destruct(T* begin, T* end) + static void destruct(T* begin, T* end) { for (T* cur = begin; cur != end; ++cur) cur->~T(); @@ -65,7 +65,7 @@ namespace WTF { template<typename T> struct VectorInitializer<true, false, T> { - static void initialize(T* begin, T* end) + static void initialize(T* begin, T* end) { for (T* cur = begin; cur != end; ++cur) new (NotNull, cur) T; @@ -75,7 +75,7 @@ namespace WTF { template<typename T> struct VectorInitializer<true, true, T> { - static void initialize(T* begin, T* end) + static void initialize(T* begin, T* end) { memset(begin, 0, reinterpret_cast<char*>(end) - reinterpret_cast<char*>(begin)); } @@ -115,11 +115,11 @@ namespace WTF { template<typename T> struct VectorMover<true, T> { - static void move(const T* src, const T* srcEnd, T* dst) + static void move(const T* src, const T* srcEnd, T* dst) { memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src)); } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(const T* src, const T* srcEnd, T* dst) { memmove(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src)); } @@ -131,7 +131,7 @@ namespace WTF { template<typename T> struct VectorCopier<false, T> { - static void uninitializedCopy(const T* src, const T* srcEnd, T* dst) + static void uninitializedCopy(const T* src, const T* srcEnd, T* dst) { while (src != srcEnd) { new (NotNull, dst) T(*src); @@ -144,7 +144,7 @@ namespace WTF { template<typename T> struct VectorCopier<true, T> { - static void uninitializedCopy(const T* src, const T* srcEnd, T* dst) + static void uninitializedCopy(const T* src, const T* srcEnd, T* dst) { memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src)); } @@ -156,7 +156,7 @@ namespace WTF { template<typename T> struct VectorFiller<false, T> { - static void uninitializedFill(T* dst, T* dstEnd, const T& val) + static void uninitializedFill(T* dst, T* dstEnd, const T& val) { while (dst != dstEnd) { new (NotNull, dst) T(val); @@ -168,7 +168,7 @@ namespace WTF { template<typename T> struct VectorFiller<true, T> { - static void uninitializedFill(T* dst, T* dstEnd, const T& val) + static void uninitializedFill(T* dst, T* dstEnd, const T& val) { ASSERT(sizeof(T) == sizeof(char)); #if COMPILER(GCC) && defined(_FORTIFY_SOURCE) @@ -177,10 +177,10 @@ namespace WTF { memset(dst, val, dstEnd - dst); } }; - + template<bool canCompareWithMemcmp, typename T> struct VectorComparer; - + template<typename T> struct VectorComparer<false, T> { @@ -201,7 +201,7 @@ namespace WTF { return memcmp(a, b, sizeof(T) * size) == 0; } }; - + template<typename T> struct VectorTypeOperations { @@ -234,7 +234,7 @@ namespace WTF { { VectorFiller<VectorTraits<T>::canFillWithMemset, T>::uninitializedFill(dst, dstEnd, val); } - + static bool compare(const T* a, const T* b, size_t size) { return VectorComparer<VectorTraits<T>::canCompareWithMemcmp, T>::compare(a, b, size); @@ -291,7 +291,7 @@ namespace WTF { { if (!bufferToDeallocate) return; - + if (m_buffer == bufferToDeallocate) { m_buffer = 0; m_capacity = 0; @@ -358,13 +358,13 @@ namespace WTF { { deallocateBuffer(buffer()); } - + void swap(VectorBuffer<T, 0>& other) { std::swap(m_buffer, other.m_buffer); std::swap(m_capacity, other.m_capacity); } - + void restoreInlineBufferIfNeeded() { } using Base::allocateBuffer; @@ -509,12 +509,12 @@ namespace WTF { typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; - Vector() + Vector() : m_size(0) { } - - explicit Vector(size_t size) + + explicit Vector(size_t size) : Base(size) , m_size(size) { @@ -529,11 +529,11 @@ namespace WTF { } Vector(const Vector&); - template<size_t otherCapacity> + template<size_t otherCapacity> Vector(const Vector<T, otherCapacity>&); Vector& operator=(const Vector&); - template<size_t otherCapacity> + template<size_t otherCapacity> Vector& operator=(const Vector<T, otherCapacity>&); #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) @@ -545,12 +545,12 @@ namespace WTF { size_t capacity() const { return Base::capacity(); } bool isEmpty() const { return !size(); } - T& at(size_t i) - { + T& at(size_t i) + { RELEASE_ASSERT(i < size()); return Base::buffer()[i]; } - const T& at(size_t i) const + const T& at(size_t i) const { RELEASE_ASSERT(i < size()); return Base::buffer()[i]; @@ -610,10 +610,10 @@ namespace WTF { void remove(size_t position); void remove(size_t position, size_t length); - void removeLast() + void removeLast() { ASSERT(!isEmpty()); - shrink(size() - 1); + shrink(size() - 1); } Vector(size_t size, const T& val) @@ -646,7 +646,7 @@ namespace WTF { const T* expandCapacity(size_t newMinCapacity, const T*); bool tryExpandCapacity(size_t newMinCapacity); const T* tryExpandCapacity(size_t newMinCapacity, const T*); - template<typename U> U* expandCapacity(size_t newMinCapacity, U*); + template<typename U> U* expandCapacity(size_t newMinCapacity, U*); template<typename U> void appendSlowCase(const U&); unsigned m_size; @@ -673,7 +673,7 @@ namespace WTF { } template<typename T, size_t inlineCapacity> - template<size_t otherCapacity> + template<size_t otherCapacity> Vector<T, inlineCapacity>::Vector(const Vector<T, otherCapacity>& other) : Base(other.capacity()) , m_size(other.size()) @@ -687,7 +687,7 @@ namespace WTF { { if (&other == this) return *this; - + if (size() > other.size()) shrink(other.size()); else if (other.size() > capacity()) { @@ -696,7 +696,7 @@ namespace WTF { if (!begin()) return *this; } - + // Works around an assert in VS2010. See https://connect.microsoft.com/VisualStudio/feedback/details/558044/std-copy-should-not-check-dest-when-first-last #if COMPILER(MSVC) && defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL if (!begin()) @@ -713,7 +713,7 @@ namespace WTF { inline bool typelessPointersAreEqual(const void* a, const void* b) { return a == b; } template<typename T, size_t inlineCapacity> - template<size_t otherCapacity> + template<size_t otherCapacity> Vector<T, inlineCapacity>& Vector<T, inlineCapacity>::operator=(const Vector<T, otherCapacity>& other) { // If the inline capacities match, we should call the more specific @@ -729,7 +729,7 @@ namespace WTF { if (!begin()) return *this; } - + // Works around an assert in VS2010. See https://connect.microsoft.com/VisualStudio/feedback/details/558044/std-copy-should-not-check-dest-when-first-last #if COMPILER(MSVC) && defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL if (!begin()) @@ -767,7 +767,7 @@ namespace WTF { { return find(value) != notFound; } - + template<typename T, size_t inlineCapacity> template<typename U> size_t Vector<T, inlineCapacity>::find(const U& value) const @@ -806,7 +806,7 @@ namespace WTF { if (!begin()) return; } - + std::fill(begin(), end(), val); TypeOperations::uninitializedFill(end(), begin() + newSize, val); m_size = newSize; @@ -825,7 +825,7 @@ namespace WTF { { reserveCapacity(std::max(newMinCapacity, std::max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1))); } - + template<typename T, size_t inlineCapacity> const T* Vector<T, inlineCapacity>::expandCapacity(size_t newMinCapacity, const T* ptr) { @@ -843,7 +843,7 @@ namespace WTF { { return tryReserveCapacity(std::max(newMinCapacity, std::max(static_cast<size_t>(16), capacity() + capacity() / 4 + 1))); } - + template<typename T, size_t inlineCapacity> const T* Vector<T, inlineCapacity>::tryExpandCapacity(size_t newMinCapacity, const T* ptr) { @@ -876,7 +876,7 @@ namespace WTF { if (begin()) TypeOperations::initialize(end(), begin() + size); } - + m_size = size; } @@ -911,7 +911,7 @@ namespace WTF { TypeOperations::move(oldBuffer, oldEnd, begin()); Base::deallocateBuffer(oldBuffer); } - + template<typename T, size_t inlineCapacity> bool Vector<T, inlineCapacity>::tryReserveCapacity(size_t newCapacity) { @@ -926,7 +926,7 @@ namespace WTF { Base::deallocateBuffer(oldBuffer); return true; } - + template<typename T, size_t inlineCapacity> inline void Vector<T, inlineCapacity>::reserveInitialCapacity(size_t initialCapacity) { @@ -935,14 +935,14 @@ namespace WTF { if (initialCapacity > inlineCapacity) Base::allocateBuffer(initialCapacity); } - + template<typename T, size_t inlineCapacity> void Vector<T, inlineCapacity>::shrinkCapacity(size_t newCapacity) { if (newCapacity >= capacity()) return; - if (newCapacity < size()) + if (newCapacity < size()) shrink(newCapacity); T* oldBuffer = begin(); @@ -1071,7 +1071,7 @@ namespace WTF { new (NotNull, &spot[i]) T(data[i]); m_size = newSize; } - + template<typename T, size_t inlineCapacity> template<typename U> inline void Vector<T, inlineCapacity>::insert(size_t position, const U& val) { @@ -1087,7 +1087,7 @@ namespace WTF { new (NotNull, spot) T(*data); ++m_size; } - + template<typename T, size_t inlineCapacity> template<typename U, size_t c> inline void Vector<T, inlineCapacity>::insert(size_t position, const Vector<U, c>& val) { @@ -1105,13 +1105,13 @@ namespace WTF { { insert(0, val); } - + template<typename T, size_t inlineCapacity> template<typename U, size_t c> inline void Vector<T, inlineCapacity>::prepend(const Vector<U, c>& val) { insert(0, val.begin(), val.size()); } - + template<typename T, size_t inlineCapacity> inline void Vector<T, inlineCapacity>::remove(size_t position) { @@ -1129,7 +1129,7 @@ namespace WTF { RELEASE_ASSERT(position + length <= size()); T* beginSpot = begin() + position; T* endSpot = beginSpot + length; - TypeOperations::destruct(beginSpot, endSpot); + TypeOperations::destruct(beginSpot, endSpot); TypeOperations::moveOverlapping(endSpot, end(), beginSpot); m_size -= length; } diff --git a/third_party/WebKit/Source/wtf/WTFThreadData.cpp b/third_party/WebKit/Source/wtf/WTFThreadData.cpp index 738c40c..a9ab5f0 100644 --- a/third_party/WebKit/Source/wtf/WTFThreadData.cpp +++ b/third_party/WebKit/Source/wtf/WTFThreadData.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ diff --git a/third_party/WebKit/Source/wtf/WTFThreadData.h b/third_party/WebKit/Source/wtf/WTFThreadData.h index 8fef5076..82ff94b 100644 --- a/third_party/WebKit/Source/wtf/WTFThreadData.h +++ b/third_party/WebKit/Source/wtf/WTFThreadData.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ diff --git a/third_party/WebKit/Source/wtf/dtoa.cpp b/third_party/WebKit/Source/wtf/dtoa.cpp index 2949961..1d601bd 100644 --- a/third_party/WebKit/Source/wtf/dtoa.cpp +++ b/third_party/WebKit/Source/wtf/dtoa.cpp @@ -1292,7 +1292,7 @@ const char* numberToFixedWidthString(double d, unsigned decimalPlaces, NumberToS // the number of digits after the decimal point depends on the requested precision. // "precision": The precision value specifies the number of digits after the decimal point. // If a decimal point appears, at least one digit appears before it. - // The value is rounded to the appropriate number of digits. + // The value is rounded to the appropriate number of digits. double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength); const double_conversion::DoubleToStringConverter& converter = double_conversion::DoubleToStringConverter::EcmaScriptConverter(); converter.ToFixed(d, decimalPlaces, &builder); diff --git a/third_party/WebKit/Source/wtf/dtoa.h b/third_party/WebKit/Source/wtf/dtoa.h index aca4631..d0127d5 100644 --- a/third_party/WebKit/Source/wtf/dtoa.h +++ b/third_party/WebKit/Source/wtf/dtoa.h @@ -69,7 +69,7 @@ inline double parseDouble(const UChar* string, size_t length, size_t& parsedLeng conversionBuffer[i] = isASCII(string[i]) ? string[i] : 0; return parseDouble(conversionBuffer, length, parsedLength); } - + } // namespace WTF using WTF::NumberToStringBuffer; diff --git a/third_party/WebKit/Source/wtf/dtoa/bignum-dtoa.h b/third_party/WebKit/Source/wtf/dtoa/bignum-dtoa.h index 0761687..05a7524 100644 --- a/third_party/WebKit/Source/wtf/dtoa/bignum-dtoa.h +++ b/third_party/WebKit/Source/wtf/dtoa/bignum-dtoa.h @@ -33,7 +33,7 @@ namespace WTF { namespace double_conversion { - + enum BignumDtoaMode { // Return the shortest correct representation. // For example the output of 0.299999999999999988897 is (the less accurate but @@ -46,7 +46,7 @@ namespace double_conversion { // Return a fixed number of digits, no matter what the exponent is. BIGNUM_DTOA_PRECISION }; - + // Converts the given double 'v' to ascii. // The result should be interpreted as buffer * 10^(point-length). // The buffer will be null-terminated. @@ -78,7 +78,7 @@ namespace double_conversion { // and a terminating null-character. void BignumDtoa(double v, BignumDtoaMode mode, int requested_digits, Vector<char> buffer, int* length, int* point); - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/dtoa/bignum.h b/third_party/WebKit/Source/wtf/dtoa/bignum.h index 1a75058..b290cb1 100644 --- a/third_party/WebKit/Source/wtf/dtoa/bignum.h +++ b/third_party/WebKit/Source/wtf/dtoa/bignum.h @@ -33,30 +33,30 @@ namespace WTF { namespace double_conversion { - + class Bignum { public: // 3584 = 128 * 28. We can represent 2^3584 > 10^1000 accurately. // This bignum can encode much bigger numbers, since it contains an // exponent. static const int kMaxSignificantBits = 3584; - + Bignum(); void AssignUInt16(uint16_t value); void AssignUInt64(uint64_t value); void AssignBignum(const Bignum& other); - + void AssignDecimalString(Vector<const char> value); void AssignHexString(Vector<const char> value); - + void AssignPowerUInt16(uint16_t base, int exponent); - + void AddUInt16(uint16_t operand); void AddUInt64(uint64_t operand); void AddBignum(const Bignum& other); // Precondition: this >= other. void SubtractBignum(const Bignum& other); - + void Square(); void ShiftLeft(int shift_amount); void MultiplyByUInt32(uint32_t factor); @@ -68,9 +68,9 @@ namespace double_conversion { // this = this % other; // In the worst case this function is in O(this/other). uint16_t DivideModuloIntBignum(const Bignum& other); - + bool ToHexString(char* buffer, int buffer_size) const; - + static int Compare(const Bignum& a, const Bignum& b); static bool Equal(const Bignum& a, const Bignum& b) { return Compare(a, b) == 0; @@ -98,7 +98,7 @@ namespace double_conversion { private: typedef uint32_t Chunk; typedef uint64_t DoubleChunk; - + static const int kChunkSize = sizeof(Chunk) * 8; static const int kDoubleChunkSize = sizeof(DoubleChunk) * 8; // With bigit size of 28 we loose some bits, but a double still fits easily @@ -108,7 +108,7 @@ namespace double_conversion { // Every instance allocates kBigitLength chunks on the stack. Bignums cannot // grow. There are no checks if the stack-allocated space is sufficient. static const int kBigitCapacity = kMaxSignificantBits / kBigitSize; - + void EnsureCapacity(int size) { if (size > kBigitCapacity) { UNREACHABLE(); @@ -126,7 +126,7 @@ namespace double_conversion { int BigitLength() const { return used_digits_ + exponent_; } Chunk BigitAt(int index) const; void SubtractTimes(const Bignum& other, int factor); - + Chunk bigits_buffer_[kBigitCapacity]; // A vector backed by bigits_buffer_. This way accesses to the array are // checked for out-of-bounds errors. @@ -134,10 +134,10 @@ namespace double_conversion { int used_digits_; // The Bignum's value equals value(bigits_) * 2^(exponent_ * kBigitSize). int exponent_; - + DISALLOW_COPY_AND_ASSIGN(Bignum); }; - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/dtoa/cached-powers.h b/third_party/WebKit/Source/wtf/dtoa/cached-powers.h index cbc04d4..fd01d73 100644 --- a/third_party/WebKit/Source/wtf/dtoa/cached-powers.h +++ b/third_party/WebKit/Source/wtf/dtoa/cached-powers.h @@ -33,24 +33,24 @@ namespace WTF { namespace double_conversion { - + class PowersOfTenCache { public: - + // Not all powers of ten are cached. The decimal exponent of two neighboring // cached numbers will differ by kDecimalExponentDistance. static int kDecimalExponentDistance; - + static int kMinDecimalExponent; static int kMaxDecimalExponent; - + // Returns a cached power-of-ten with a binary exponent in the range // [min_exponent; max_exponent] (boundaries included). static void GetCachedPowerForBinaryExponentRange(int min_exponent, int max_exponent, DiyFp* power, int* decimal_exponent); - + // Returns a cached power of ten x ~= 10^k such that // k <= decimal_exponent < k + kCachedPowersDecimalDistance. // The given decimal_exponent must satisfy @@ -60,11 +60,11 @@ namespace double_conversion { DiyFp* power, int* found_exponent); }; - + // Initializes the table of cached powers used by the dtoa algorithm. // This needs to be called when JSC is being initialized. void initialize(); - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/dtoa/diy-fp.h b/third_party/WebKit/Source/wtf/dtoa/diy-fp.h index e843100..f641542 100644 --- a/third_party/WebKit/Source/wtf/dtoa/diy-fp.h +++ b/third_party/WebKit/Source/wtf/dtoa/diy-fp.h @@ -33,7 +33,7 @@ namespace WTF { namespace double_conversion { - + // This "Do It Yourself Floating Point" class implements a floating-point number // with a uint64 significand and an int exponent. Normalized DiyFp numbers will // have the most significant bit of the significand set. @@ -42,10 +42,10 @@ namespace double_conversion { class DiyFp { public: static const int kSignificandSize = 64; - + DiyFp() : f_(0), e_(0) {} DiyFp(uint64_t f, int e) : f_(f), e_(e) {} - + // this = this - other. // The exponents of both numbers must be the same and the significand of this // must be bigger than the significand of other. @@ -55,7 +55,7 @@ namespace double_conversion { ASSERT(f_ >= other.f_); f_ -= other.f_; } - + // Returns a - b. // The exponents of both numbers must be the same and this must be bigger // than other. The result will not be normalized. @@ -64,23 +64,23 @@ namespace double_conversion { result.Subtract(b); return result; } - - + + // this = this * other. void Multiply(const DiyFp& other); - + // returns a * b; static DiyFp Times(const DiyFp& a, const DiyFp& b) { DiyFp result = a; result.Multiply(b); return result; } - + void Normalize() { ASSERT(f_ != 0); uint64_t f = f_; int e = e_; - + // This method is mainly called for normalizing boundaries. In general // boundaries need to be shifted by 10 bits. We thus optimize for this case. const uint64_t k10MSBits = UINT64_2PART_C(0xFFC00000, 00000000); @@ -95,26 +95,26 @@ namespace double_conversion { f_ = f; e_ = e; } - + static DiyFp Normalize(const DiyFp& a) { DiyFp result = a; result.Normalize(); return result; } - + uint64_t f() const { return f_; } int e() const { return e_; } - + void set_f(uint64_t new_value) { f_ = new_value; } void set_e(int new_value) { e_ = new_value; } - + private: static const uint64_t kUint64MSB = UINT64_2PART_C(0x80000000, 00000000); - + uint64_t f_; int e_; }; - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/dtoa/double-conversion.h b/third_party/WebKit/Source/wtf/dtoa/double-conversion.h index eb246e2..3cf58f923 100644 --- a/third_party/WebKit/Source/wtf/dtoa/double-conversion.h +++ b/third_party/WebKit/Source/wtf/dtoa/double-conversion.h @@ -33,7 +33,7 @@ namespace WTF { namespace double_conversion { - + class DoubleToStringConverter { public: // When calling ToFixed with a double > 10^kMaxFixedDigitsBeforePoint @@ -41,17 +41,17 @@ namespace double_conversion { // function returns false. static const int kMaxFixedDigitsBeforePoint = 60; static const int kMaxFixedDigitsAfterPoint = 60; - + // When calling ToExponential with a requested_digits // parameter > kMaxExponentialDigits then the function returns false. static const int kMaxExponentialDigits = 120; - + // When calling ToPrecision with a requested_digits // parameter < kMinPrecisionDigits or requested_digits > kMaxPrecisionDigits // then the function returns false. static const int kMinPrecisionDigits = 1; static const int kMaxPrecisionDigits = 120; - + enum Flags { NO_FLAGS = 0, EMIT_POSITIVE_EXPONENT_SIGN = 1, @@ -59,7 +59,7 @@ namespace double_conversion { EMIT_TRAILING_ZERO_AFTER_POINT = 4, UNIQUE_ZERO = 8 }; - + // Flags should be a bit-or combination of the possible Flags-enum. // - NO_FLAGS: no special flags. // - EMIT_POSITIVE_EXPONENT_SIGN: when the number is converted into exponent @@ -129,10 +129,10 @@ namespace double_conversion { ASSERT(((flags & EMIT_TRAILING_DECIMAL_POINT) != 0) || !((flags & EMIT_TRAILING_ZERO_AFTER_POINT) != 0)); } - + // Returns a converter following the EcmaScript specification. static const DoubleToStringConverter& EcmaScriptConverter(); - + // Computes the shortest string of digits that correctly represent the input // number. Depending on decimal_in_shortest_low and decimal_in_shortest_high // (see constructor) it then either returns a decimal representation, or an @@ -157,8 +157,8 @@ namespace double_conversion { // except when the input value is special and no infinity_symbol or // nan_symbol has been given to the constructor. bool ToShortest(double value, StringBuilder* result_builder) const; - - + + // Computes a decimal representation with a fixed number of digits after the // decimal point. The last emitted digit is rounded. // @@ -195,7 +195,7 @@ namespace double_conversion { bool ToFixed(double value, int requested_digits, StringBuilder* result_builder) const; - + // Computes a representation in exponential format with requested_digits // after the decimal point. The last emitted digit is rounded. // If requested_digits equals -1, then the shortest exponential representation @@ -227,7 +227,7 @@ namespace double_conversion { bool ToExponential(double value, int requested_digits, StringBuilder* result_builder) const; - + // Computes 'precision' leading digits of the given 'value' and returns them // either in exponential or decimal format, depending on // max_{leading|trailing}_padding_zeroes_in_precision_mode (given to the @@ -265,7 +265,7 @@ namespace double_conversion { bool ToPrecision(double value, int precision, StringBuilder* result_builder) const; - + enum DtoaMode { // Produce the shortest correct representation. // For example the output of 0.299999999999999988897 is (the less accurate @@ -278,7 +278,7 @@ namespace double_conversion { // Fixed number of digits (independent of the decimal point). PRECISION }; - + // The maximal number of digits that are needed to emit a double in base 10. // A higher precision can be achieved by using more digits, but the shortest // accurate representation of any double will never use more digits than @@ -286,7 +286,7 @@ namespace double_conversion { // Note that DoubleToAscii null-terminates its input. So the given buffer // should be at least kBase10MaximalLength + 1 characters long. static const int kBase10MaximalLength = 17; - + // Converts the given double 'v' to ascii. // The result should be interpreted as buffer * 10^(point-length). // @@ -326,7 +326,7 @@ namespace double_conversion { bool* sign, int* length, int* point); - + private: // If the value is a special value (NaN or Infinity) constructs the // corresponding string using the configured infinity/nan-symbol. @@ -345,7 +345,7 @@ namespace double_conversion { int decimal_point, int digits_after_point, StringBuilder* result_builder) const; - + const int flags_; const char* const infinity_symbol_; const char* const nan_symbol_; @@ -354,22 +354,22 @@ namespace double_conversion { const int decimal_in_shortest_high_; const int max_leading_padding_zeroes_in_precision_mode_; const int max_trailing_padding_zeroes_in_precision_mode_; - + DISALLOW_IMPLICIT_CONSTRUCTORS(DoubleToStringConverter); }; - - + + class StringToDoubleConverter { public: // Performs the conversion. // The output parameter 'processed_characters_count' is set to the number // of characters that have been processed to read the number. static double StringToDouble(const char* buffer, size_t length, size_t* processed_characters_count); - + private: DISALLOW_IMPLICIT_CONSTRUCTORS(StringToDoubleConverter); }; - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/dtoa/double.h b/third_party/WebKit/Source/wtf/dtoa/double.h index 0544fdb..d0f449d 100644 --- a/third_party/WebKit/Source/wtf/dtoa/double.h +++ b/third_party/WebKit/Source/wtf/dtoa/double.h @@ -33,11 +33,11 @@ namespace WTF { namespace double_conversion { - + // We assume that doubles and uint64_t have the same endianness. static uint64_t double_to_uint64(double d) { return BitCast<uint64_t>(d); } static double uint64_to_double(uint64_t d64) { return BitCast<double>(d64); } - + // Helper functions for doubles. class Double { public: @@ -47,13 +47,13 @@ namespace double_conversion { static const uint64_t kHiddenBit = UINT64_2PART_C(0x00100000, 00000000); static const int kPhysicalSignificandSize = 52; // Excludes the hidden bit. static const int kSignificandSize = 53; - + Double() : d64_(0) {} explicit Double(double d) : d64_(double_to_uint64(d)) {} explicit Double(uint64_t d64) : d64_(d64) {} explicit Double(DiyFp diy_fp) : d64_(DiyFpToUint64(diy_fp)) {} - + // The value encoded by this Double must be greater or equal to +0.0. // It must not be special (infinity, or NaN). DiyFp AsDiyFp() const { @@ -61,13 +61,13 @@ namespace double_conversion { ASSERT(!IsSpecial()); return DiyFp(Significand(), Exponent()); } - + // The value encoded by this Double must be strictly greater than 0. DiyFp AsNormalizedDiyFp() const { ASSERT(value() > 0.0); uint64_t f = Significand(); int e = Exponent(); - + // The current double could be a denormal. while ((f & kHiddenBit) == 0) { f <<= 1; @@ -78,12 +78,12 @@ namespace double_conversion { e -= DiyFp::kSignificandSize - kSignificandSize; return DiyFp(f, e); } - + // Returns the double's bit as uint64. uint64_t AsUint64() const { return d64_; } - + // Returns the next greater double. Returns +infinity on input +infinity. double NextDouble() const { if (d64_ == kInfinity) return Double(kInfinity).value(); @@ -97,16 +97,16 @@ namespace double_conversion { return Double(d64_ + 1).value(); } } - + int Exponent() const { if (IsDenormal()) return kDenormalExponent; - + uint64_t d64 = AsUint64(); int biased_e = static_cast<int>((d64 & kExponentMask) >> kPhysicalSignificandSize); return biased_e - kExponentBias; } - + uint64_t Significand() const { uint64_t d64 = AsUint64(); uint64_t significand = d64 & kSignificandMask; @@ -116,44 +116,44 @@ namespace double_conversion { return significand; } } - + // Returns true if the double is a denormal. bool IsDenormal() const { uint64_t d64 = AsUint64(); return (d64 & kExponentMask) == 0; } - + // We consider denormals not to be special. // Hence only Infinity and NaN are special. bool IsSpecial() const { uint64_t d64 = AsUint64(); return (d64 & kExponentMask) == kExponentMask; } - + bool IsNan() const { uint64_t d64 = AsUint64(); return ((d64 & kExponentMask) == kExponentMask) && ((d64 & kSignificandMask) != 0); } - + bool IsInfinite() const { uint64_t d64 = AsUint64(); return ((d64 & kExponentMask) == kExponentMask) && ((d64 & kSignificandMask) == 0); } - + int Sign() const { uint64_t d64 = AsUint64(); return (d64 & kSignMask) == 0? 1: -1; } - + // Precondition: the value encoded by this Double must be greater or equal // than +0.0. DiyFp UpperBoundary() const { ASSERT(Sign() > 0); return DiyFp(Significand() * 2 + 1, Exponent() - 1); } - + // Computes the two boundaries of this. // The bigger boundary (m_plus) is normalized. The lower boundary has the same // exponent as m_plus. @@ -180,9 +180,9 @@ namespace double_conversion { *out_m_plus = m_plus; *out_m_minus = m_minus; } - + double value() const { return uint64_to_double(d64_); } - + // Returns the significand size for a given order of magnitude. // If v = f*2^e with 2^p-1 <= f <= 2^p then p+e is v's order of magnitude. // This function returns the number of significant binary digits v will have @@ -196,24 +196,24 @@ namespace double_conversion { if (order <= kDenormalExponent) return 0; return order - kDenormalExponent; } - + static double Infinity() { return Double(kInfinity).value(); } - + static double NaN() { return Double(kNaN).value(); } - + private: static const int kExponentBias = 0x3FF + kPhysicalSignificandSize; static const int kDenormalExponent = -kExponentBias + 1; static const int kMaxExponent = 0x7FF - kExponentBias; static const uint64_t kInfinity = UINT64_2PART_C(0x7FF00000, 00000000); static const uint64_t kNaN = UINT64_2PART_C(0x7FF80000, 00000000); - + const uint64_t d64_; - + static uint64_t DiyFpToUint64(DiyFp diy_fp) { uint64_t significand = diy_fp.f(); int exponent = diy_fp.e(); @@ -241,7 +241,7 @@ namespace double_conversion { (biased_exponent << kPhysicalSignificandSize); } }; - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/dtoa/fast-dtoa.h b/third_party/WebKit/Source/wtf/dtoa/fast-dtoa.h index 876a9f3..fc8d1455 100644 --- a/third_party/WebKit/Source/wtf/dtoa/fast-dtoa.h +++ b/third_party/WebKit/Source/wtf/dtoa/fast-dtoa.h @@ -33,7 +33,7 @@ namespace WTF { namespace double_conversion { - + enum FastDtoaMode { // Computes the shortest representation of the given input. The returned // result will be the most accurate number of this length. Longer @@ -43,11 +43,11 @@ namespace double_conversion { // given as input. The precision is independent of the decimal point. FAST_DTOA_PRECISION }; - + // FastDtoa will produce at most kFastDtoaMaximalLength digits. This does not // include the terminating '\0' character. static const int kFastDtoaMaximalLength = 17; - + // Provides a decimal representation of v. // The result should be interpreted as buffer * 10^(point - length). // @@ -80,7 +80,7 @@ namespace double_conversion { Vector<char> buffer, int* length, int* decimal_point); - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/dtoa/fixed-dtoa.h b/third_party/WebKit/Source/wtf/dtoa/fixed-dtoa.h index 8c0adb7..ab23a66e 100644 --- a/third_party/WebKit/Source/wtf/dtoa/fixed-dtoa.h +++ b/third_party/WebKit/Source/wtf/dtoa/fixed-dtoa.h @@ -33,7 +33,7 @@ namespace WTF { namespace double_conversion { - + // Produces digits necessary to print a given number with // 'fractional_count' digits after the decimal point. // The buffer must be big enough to hold the result plus one terminating null @@ -52,7 +52,7 @@ namespace double_conversion { // returns false. The output is null-terminated when the function succeeds. bool FastFixedDtoa(double v, int fractional_count, Vector<char> buffer, int* length, int* decimal_point); - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/dtoa/strtod.h b/third_party/WebKit/Source/wtf/dtoa/strtod.h index 8ed350a..d02f76a 100644 --- a/third_party/WebKit/Source/wtf/dtoa/strtod.h +++ b/third_party/WebKit/Source/wtf/dtoa/strtod.h @@ -33,11 +33,11 @@ namespace WTF { namespace double_conversion { - + // The buffer must only contain digits in the range [0-9]. It must not // contain a dot or a sign. It must not start with '0', and must not be empty. double Strtod(Vector<const char> buffer, int exponent); - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/dtoa/utils.h b/third_party/WebKit/Source/wtf/dtoa/utils.h index 7f6a695..f6fe024 100644 --- a/third_party/WebKit/Source/wtf/dtoa/utils.h +++ b/third_party/WebKit/Source/wtf/dtoa/utils.h @@ -115,29 +115,29 @@ DISALLOW_COPY_AND_ASSIGN(TypeName) namespace WTF { namespace double_conversion { - + static const int kCharSize = sizeof(char); - + // Returns the maximum of the two parameters. template <typename T> static T Max(T a, T b) { return a < b ? b : a; } - - + + // Returns the minimum of the two parameters. template <typename T> static T Min(T a, T b) { return a < b ? a : b; } - - + + inline int StrLength(const char* string) { size_t length = strlen(string); ASSERT(length == static_cast<size_t>(static_cast<int>(length))); return static_cast<int>(length); } - + // This is a simplified version of V8's Vector class. template <typename T> class Vector { @@ -146,7 +146,7 @@ namespace double_conversion { Vector(T* data, int length) : start_(data), length_(length) { ASSERT(length == 0 || (length > 0 && data != NULL)); } - + // Returns a vector using the same backing storage as this one, // spanning from and including 'from', to but not including 'to'. Vector<T> SubVector(int from, int to) { @@ -155,32 +155,32 @@ namespace double_conversion { ASSERT(0 <= from); return Vector<T>(start() + from, to - from); } - + // Returns the length of the vector. int length() const { return length_; } - + // Returns whether or not the vector is empty. bool is_empty() const { return length_ == 0; } - + // Returns the pointer to the start of the data in the vector. T* start() const { return start_; } - + // Access individual vector elements - checks bounds in debug mode. T& operator[](int index) const { ASSERT(0 <= index && index < length_); return start_[index]; } - + T& first() { return start_[0]; } - + T& last() { return start_[length_ - 1]; } - + private: T* start_; int length_; }; - - + + // Helper class for building result strings in a character buffer. The // purpose of the class is to use safe operations that checks the // buffer bounds on all operations in debug mode. @@ -188,17 +188,17 @@ namespace double_conversion { public: StringBuilder(char* buffer, int size) : buffer_(buffer, size), position_(0) { } - + ~StringBuilder() { if (!is_finalized()) Finalize(); } - + int size() const { return buffer_.length(); } - + // Get the current position in the builder. int position() const { ASSERT(!is_finalized()); return position_; } - + // Set the current position in the builder. void SetPosition(int position) { @@ -206,10 +206,10 @@ namespace double_conversion { ASSERT_WITH_SECURITY_IMPLICATION(position < size()); position_ = position; } - + // Reset the position. void Reset() { position_ = 0; } - + // Add a single character to the builder. It is not allowed to add // 0-characters; use the Finalize() method to terminate the string // instead. @@ -218,13 +218,13 @@ namespace double_conversion { ASSERT(!is_finalized() && position_ < buffer_.length()); buffer_[position_++] = c; } - + // Add an entire string to the builder. Uses strlen() internally to // compute the length of the input string. void AddString(const char* s) { AddSubstring(s, StrLength(s)); } - + // Add the first 'n' characters of the given string 's' to the // builder. The input string must have enough characters. void AddSubstring(const char* s, int n) { @@ -233,8 +233,8 @@ namespace double_conversion { memcpy(&buffer_[position_], s, n * kCharSize); position_ += n; } - - + + // Add character padding to the builder. If count is non-positive, // nothing is added to the builder. void AddPadding(char c, int count) { @@ -242,7 +242,7 @@ namespace double_conversion { AddCharacter(c); } } - + // Finalize the string by 0-terminating it and returning the buffer. char* Finalize() { ASSERT(!is_finalized() && position_ < buffer_.length()); @@ -254,16 +254,16 @@ namespace double_conversion { ASSERT(is_finalized()); return buffer_.start(); } - + private: Vector<char> buffer_; int position_; - + bool is_finalized() const { return position_ < 0; } - + DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); }; - + // The type-based aliasing rule allows the compiler to assume that pointers of // different types (for some definition of different) never alias each other. // Thus the following code does not work: @@ -293,17 +293,17 @@ namespace double_conversion { // Compile time assertion: sizeof(Dest) == sizeof(Source) // A compile error here means your Dest and Source have different sizes. typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1]; - + Dest dest; memcpy(&dest, &source, sizeof(dest)); return dest; } - + template <class Dest, class Source> inline Dest BitCast(Source* source) { return BitCast<Dest>(reinterpret_cast<uintptr_t>(source)); } - + } // namespace double_conversion } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/text/AtomicString.cpp b/third_party/WebKit/Source/wtf/text/AtomicString.cpp index a949c00..22cfbc9 100644 --- a/third_party/WebKit/Source/wtf/text/AtomicString.cpp +++ b/third_party/WebKit/Source/wtf/text/AtomicString.cpp @@ -243,7 +243,7 @@ PassRefPtr<StringImpl> AtomicString::add(const UChar* s, unsigned length) if (!length) return StringImpl::empty(); - + UCharBuffer buffer = { s, length }; return addToStringTable<UCharBuffer, UCharBufferTranslator>(buffer); } @@ -323,7 +323,7 @@ PassRefPtr<StringImpl> AtomicString::add(StringImpl* baseString, unsigned start, SubstringLocation buffer = { baseString, start, length }; return addToStringTable<SubstringLocation, SubstringTranslator>(buffer); } - + typedef HashTranslatorCharBuffer<LChar> LCharBuffer; struct LCharBufferTranslator { static unsigned hash(const LCharBuffer& buf) diff --git a/third_party/WebKit/Source/wtf/text/AtomicString.h b/third_party/WebKit/Source/wtf/text/AtomicString.h index 5ddc9ae..c43eaad 100644 --- a/third_party/WebKit/Source/wtf/text/AtomicString.h +++ b/third_party/WebKit/Source/wtf/text/AtomicString.h @@ -99,9 +99,9 @@ public: const LChar* characters8() const { return m_string.characters8(); } const UChar* characters16() const { return m_string.characters16(); } unsigned length() const { return m_string.length(); } - + UChar operator[](unsigned int i) const { return m_string[i]; } - + bool contains(UChar c) const { return m_string.contains(c); } bool contains(const LChar* s, bool caseSensitive = true) const { return m_string.contains(s, caseSensitive); } @@ -113,7 +113,7 @@ public: { return m_string.find(s, start, caseSentitive); } size_t find(const String& s, size_t start = 0, bool caseSentitive = true) const { return m_string.find(s, start, caseSentitive); } - + bool startsWith(const String& s, bool caseSensitive = true) const { return m_string.startsWith(s, caseSensitive); } bool startsWith(UChar character) const @@ -129,10 +129,10 @@ public: template<unsigned matchLength> bool endsWith(const char (&prefix)[matchLength], bool caseSensitive = true) const { return m_string.endsWith<matchLength>(prefix, caseSensitive); } - + AtomicString lower() const; AtomicString upper() const { return AtomicString(impl()->upper()); } - + int toInt(bool* ok = 0) const { return m_string.toInt(ok); } double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); } float toFloat(bool* ok = 0) const { return m_string.toFloat(ok); } @@ -142,10 +142,10 @@ public: bool isEmpty() const { return m_string.isEmpty(); } static void remove(StringImpl*); - + #if USE(CF) AtomicString(CFStringRef s) : m_string(add(s)) { } -#endif +#endif #ifdef __OBJC__ AtomicString(NSString* s) : m_string(add((CFStringRef)s)) { } operator NSString*() const { return m_string; } @@ -164,7 +164,7 @@ private: AtomicString(ASCIILiteral); String m_string; - + static PassRefPtr<StringImpl> add(const LChar*); ALWAYS_INLINE static PassRefPtr<StringImpl> add(const char* s) { return add(reinterpret_cast<const LChar*>(s)); }; static PassRefPtr<StringImpl> add(const LChar*, unsigned length); @@ -191,7 +191,7 @@ private: inline bool operator==(const AtomicString& a, const AtomicString& b) { return a.impl() == b.impl(); } WTF_EXPORT bool operator==(const AtomicString&, const LChar*); inline bool operator==(const AtomicString& a, const char* b) { return WTF::equal(a.impl(), reinterpret_cast<const LChar*>(b)); } -inline bool operator==(const AtomicString& a, const Vector<UChar>& b) { return a.impl() && equal(a.impl(), b.data(), b.size()); } +inline bool operator==(const AtomicString& a, const Vector<UChar>& b) { return a.impl() && equal(a.impl(), b.data(), b.size()); } inline bool operator==(const AtomicString& a, const String& b) { return equal(a.impl(), b.impl()); } inline bool operator==(const LChar* a, const AtomicString& b) { return b == a; } inline bool operator==(const String& a, const AtomicString& b) { return equal(a.impl(), b.impl()); } diff --git a/third_party/WebKit/Source/wtf/text/AtomicStringHash.h b/third_party/WebKit/Source/wtf/text/AtomicStringHash.h index 58a986a..9669206 100644 --- a/third_party/WebKit/Source/wtf/text/AtomicStringHash.h +++ b/third_party/WebKit/Source/wtf/text/AtomicStringHash.h @@ -6,13 +6,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/text/Base64.cpp b/third_party/WebKit/Source/wtf/text/Base64.cpp index d7e6e916..9a31527 100644 --- a/third_party/WebKit/Source/wtf/text/Base64.cpp +++ b/third_party/WebKit/Source/wtf/text/Base64.cpp @@ -182,7 +182,7 @@ static inline bool base64DecodeInternal(const T* data, unsigned length, Vector<c // Valid data is (n * 4 + [0,2,3]) characters long. if ((outLength % 4) == 1) return false; - + // 4-byte to 3-byte conversion outLength -= (outLength + 3) / 4; if (!outLength) diff --git a/third_party/WebKit/Source/wtf/text/Base64.h b/third_party/WebKit/Source/wtf/text/Base64.h index 7b14fea..7ccd8d1 100644 --- a/third_party/WebKit/Source/wtf/text/Base64.h +++ b/third_party/WebKit/Source/wtf/text/Base64.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef Base64_h diff --git a/third_party/WebKit/Source/wtf/text/CString.cpp b/third_party/WebKit/Source/wtf/text/CString.cpp index 78962cf..9b3f65e 100644 --- a/third_party/WebKit/Source/wtf/text/CString.cpp +++ b/third_party/WebKit/Source/wtf/text/CString.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -65,7 +65,7 @@ void CString::init(const char* str, size_t length) ASSERT(str); m_buffer = CStringBuffer::createUninitialized(length); - memcpy(m_buffer->mutableData(), str, length); + memcpy(m_buffer->mutableData(), str, length); m_buffer->mutableData()[length] = '\0'; } @@ -76,7 +76,7 @@ char* CString::mutableData() return 0; return m_buffer->mutableData(); } - + CString CString::newUninitialized(size_t length, char*& characterBuffer) { CString result; diff --git a/third_party/WebKit/Source/wtf/text/StringBuffer.h b/third_party/WebKit/Source/wtf/text/StringBuffer.h index 74ad12f..3e3315d 100644 --- a/third_party/WebKit/Source/wtf/text/StringBuffer.h +++ b/third_party/WebKit/Source/wtf/text/StringBuffer.h @@ -6,13 +6,13 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Inc. ("Apple") nor the names of its * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED diff --git a/third_party/WebKit/Source/wtf/text/StringBuilder.h b/third_party/WebKit/Source/wtf/text/StringBuilder.h index e87cee9..3d3f1e7 100644 --- a/third_party/WebKit/Source/wtf/text/StringBuilder.h +++ b/third_party/WebKit/Source/wtf/text/StringBuilder.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef StringBuilder_h @@ -196,7 +196,7 @@ public: if (canShrink()) { if (is8Bit()) return AtomicString(characters8(), length()); - return AtomicString(characters16(), length()); + return AtomicString(characters16(), length()); } if (!m_string.isNull()) @@ -255,7 +255,7 @@ public: ASSERT(m_buffer); return m_buffer->characters16(); } - + bool is8Bit() const { return m_is8Bit; } void clear() @@ -313,7 +313,7 @@ ALWAYS_INLINE UChar* StringBuilder::getBufferCharacters<UChar>() { ASSERT(!m_is8Bit); return m_bufferCharacters16; -} +} template <typename CharType> bool equal(const StringBuilder& s, const CharType* buffer, unsigned length) diff --git a/third_party/WebKit/Source/wtf/text/StringConcatenate.h b/third_party/WebKit/Source/wtf/text/StringConcatenate.h index 5691766..54088e9 100644 --- a/third_party/WebKit/Source/wtf/text/StringConcatenate.h +++ b/third_party/WebKit/Source/wtf/text/StringConcatenate.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef StringConcatenate_h @@ -371,7 +371,7 @@ public: const LChar* data = m_buffer.characters8(); for (unsigned i = 0; i < length; ++i) destination[i] = data[i]; - + WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING(); } @@ -388,7 +388,7 @@ public: for (unsigned i = 0; i < length; ++i) destination[i] = data[i]; } - + WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING(); } diff --git a/third_party/WebKit/Source/wtf/text/StringHash.h b/third_party/WebKit/Source/wtf/text/StringHash.h index e609e4b..c517fd4 100644 --- a/third_party/WebKit/Source/wtf/text/StringHash.h +++ b/third_party/WebKit/Source/wtf/text/StringHash.h @@ -91,13 +91,13 @@ namespace WTF { { return CaseFoldingHash::hash(reinterpret_cast<const LChar*>(data), length); } - + static inline bool equal(const StringImpl* a, const StringImpl* b) { return equalIgnoringCaseNonNull(a, b); } - static unsigned hash(const RefPtr<StringImpl>& key) + static unsigned hash(const RefPtr<StringImpl>& key) { return hash(key.get()); } diff --git a/third_party/WebKit/Source/wtf/text/StringOperators.h b/third_party/WebKit/Source/wtf/text/StringOperators.h index 403f2368..ac48041 100644 --- a/third_party/WebKit/Source/wtf/text/StringOperators.h +++ b/third_party/WebKit/Source/wtf/text/StringOperators.h @@ -74,7 +74,7 @@ public: StringTypeAdapter<StringType1> adapter1(m_string1); StringTypeAdapter<StringType2> adapter2(m_string2); return adapter1.length() + adapter2.length(); - } + } private: StringType1 m_string1; diff --git a/third_party/WebKit/Source/wtf/text/TextCodec.cpp b/third_party/WebKit/Source/wtf/text/TextCodec.cpp index 3dedd35..2bb94d7 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodec.cpp +++ b/third_party/WebKit/Source/wtf/text/TextCodec.cpp @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/wtf/text/TextCodec.h b/third_party/WebKit/Source/wtf/text/TextCodec.h index 0190757..4797ee5 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodec.h +++ b/third_party/WebKit/Source/wtf/text/TextCodec.h @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TextCodec_h @@ -68,13 +68,13 @@ public: bool ignored; return decode(str, length, flush, false, ignored); } - + virtual String decode(const char*, size_t length, bool flush, bool stopOnError, bool& sawError) = 0; virtual CString encode(const UChar*, size_t length, UnencodableHandling) = 0; virtual CString encode(const LChar*, size_t length, UnencodableHandling) = 0; // Fills a null-terminated string representation of the given - // unencodable character into the given replacement buffer. + // unencodable character into the given replacement buffer. // The length of the string (not including the null) will be returned. static int getUnencodableReplacement(unsigned codePoint, UnencodableHandling, UnencodableReplacementArray); }; diff --git a/third_party/WebKit/Source/wtf/text/TextCodecASCIIFastPath.h b/third_party/WebKit/Source/wtf/text/TextCodecASCIIFastPath.h index d27f164..f7a7d6a 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecASCIIFastPath.h +++ b/third_party/WebKit/Source/wtf/text/TextCodecASCIIFastPath.h @@ -37,7 +37,7 @@ template<> struct UCharByteFiller<4> { { memcpy(destination, source, 4); } - + static void copy(UChar* destination, const uint8_t* source) { destination[0] = source[0]; diff --git a/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp b/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp index 8bafdf5..2ede9bf 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp +++ b/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -72,13 +72,13 @@ void TextCodecICU::registerEncodingNames(EncodingNameRegistrar registrar) const char* name = ucnv_getAvailableName(i); UErrorCode error = U_ZERO_ERROR; // Try MIME before trying IANA to pick up commonly used names like - // 'EUC-JP' instead of horrendously long names like - // 'Extended_UNIX_Code_Packed_Format_for_Japanese'. + // 'EUC-JP' instead of horrendously long names like + // 'Extended_UNIX_Code_Packed_Format_for_Japanese'. const char* standardName = ucnv_getStandardName(name, "MIME", &error); if (!U_SUCCESS(error) || !standardName) { error = U_ZERO_ERROR; // Try IANA to pick up 'windows-12xx' and other names - // which are not preferred MIME names but are widely used. + // which are not preferred MIME names but are widely used. standardName = ucnv_getStandardName(name, "IANA", &error); if (!U_SUCCESS(error) || !standardName) continue; @@ -304,7 +304,7 @@ String TextCodecICU::decode(const char* bytes, size_t length, bool flush, bool s return String(); } } - + ErrorCallbackSetter callbackSetter(m_converterICU, stopOnError); StringBuilder result; @@ -373,7 +373,7 @@ static void urlEscapedEntityCallback(const void* context, UConverterFromUnicodeA // Substitutes special GBK characters, escaping all other unassigned entities. static void gbkCallbackEscape(const void* context, UConverterFromUnicodeArgs* fromUArgs, const UChar* codeUnits, int32_t length, - UChar32 codePoint, UConverterCallbackReason reason, UErrorCode* err) + UChar32 codePoint, UConverterCallbackReason reason, UErrorCode* err) { UChar outChar; if (reason == UCNV_UNASSIGNED && (outChar = fallbackForGBK(codePoint))) { @@ -387,7 +387,7 @@ static void gbkCallbackEscape(const void* context, UConverterFromUnicodeArgs* fr // Combines both gbkUrlEscapedEntityCallback and GBK character substitution. static void gbkUrlEscapedEntityCallack(const void* context, UConverterFromUnicodeArgs* fromUArgs, const UChar* codeUnits, int32_t length, - UChar32 codePoint, UConverterCallbackReason reason, UErrorCode* err) + UChar32 codePoint, UConverterCallbackReason reason, UErrorCode* err) { if (reason == UCNV_UNASSIGNED) { if (UChar outChar = fallbackForGBK(codePoint)) { @@ -403,7 +403,7 @@ static void gbkUrlEscapedEntityCallack(const void* context, UConverterFromUnicod } static void gbkCallbackSubstitute(const void* context, UConverterFromUnicodeArgs* fromUArgs, const UChar* codeUnits, int32_t length, - UChar32 codePoint, UConverterCallbackReason reason, UErrorCode* err) + UChar32 codePoint, UConverterCallbackReason reason, UErrorCode* err) { UChar outChar; if (reason == UCNV_UNASSIGNED && (outChar = fallbackForGBK(codePoint))) { diff --git a/third_party/WebKit/Source/wtf/text/TextCodecLatin1.cpp b/third_party/WebKit/Source/wtf/text/TextCodecLatin1.cpp index 247ee36..ae0b14b 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecLatin1.cpp +++ b/third_party/WebKit/Source/wtf/text/TextCodecLatin1.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -162,7 +162,7 @@ useLookupTable: } return result; - + upConvertTo16Bit: UChar* characters16; String result16 = String::createUninitialized(length, characters16); @@ -187,15 +187,15 @@ upConvertTo16Bit: if (isAlignedToMachineWord(source)) { while (source < alignedEnd) { MachineWord chunk = *reinterpret_cast_ptr<const MachineWord*>(source); - + if (!isAllASCII<LChar>(chunk)) goto useLookupTable16; - + copyASCIIMachineWord(destination16, source); source += sizeof(MachineWord); destination16 += sizeof(MachineWord); } - + if (source == end) break; } @@ -204,11 +204,11 @@ upConvertTo16Bit: useLookupTable16: *destination16 = table[*source]; } - + ++source; ++destination16; } - + return result16; } diff --git a/third_party/WebKit/Source/wtf/text/TextCodecLatin1.h b/third_party/WebKit/Source/wtf/text/TextCodecLatin1.h index 683f3ce..46946d5 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecLatin1.h +++ b/third_party/WebKit/Source/wtf/text/TextCodecLatin1.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TextCodecLatin1_h diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp b/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp index d89bc88..354c09f 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp +++ b/third_party/WebKit/Source/wtf/text/TextCodecUTF16.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUTF16.h b/third_party/WebKit/Source/wtf/text/TextCodecUTF16.h index 222d872..59393d5 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecUTF16.h +++ b/third_party/WebKit/Source/wtf/text/TextCodecUTF16.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TextCodecUTF16_h diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp b/third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp index 6a4c835..ce595b3 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp +++ b/third_party/WebKit/Source/wtf/text/TextCodecUTF8.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -260,7 +260,7 @@ bool TextCodecUTF8::handlePartialSequence<UChar>(UChar*& destination, const uint return false; } - + String TextCodecUTF8::decode(const char* bytes, size_t length, bool flush, bool stopOnError, bool& sawError) { // Each input byte might turn into a character. @@ -329,7 +329,7 @@ String TextCodecUTF8::decode(const char* bytes, size_t length, bool flush, bool sawError = true; if (stopOnError) break; - + goto upConvertTo16Bit; } if (character > 0xff) @@ -366,7 +366,7 @@ upConvertTo16Bit: if (m_partialSequenceSize) break; } - + while (source < end) { if (isASCII(*source)) { // Fast path for ASCII. Most UTF-8 text will be ASCII. @@ -415,9 +415,9 @@ upConvertTo16Bit: destination16 = appendCharacter(destination16, character); } } while (flush && m_partialSequenceSize); - + buffer16.shrink(destination16 - buffer16.characters()); - + return String::adopt(buffer16); } diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUTF8.h b/third_party/WebKit/Source/wtf/text/TextCodecUTF8.h index dcceddf..c9bb7cb 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecUTF8.h +++ b/third_party/WebKit/Source/wtf/text/TextCodecUTF8.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TextCodecUTF8_h @@ -53,7 +53,7 @@ private: int m_partialSequenceSize; uint8_t m_partialSequence[U8_MAX_LENGTH]; - + }; } // namespace WTF diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp b/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp index 06e98ce..263d240 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp +++ b/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" diff --git a/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.h b/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.h index 9704f6a..1fff329 100644 --- a/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.h +++ b/third_party/WebKit/Source/wtf/text/TextCodecUserDefined.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TextCodecUserDefined_h diff --git a/third_party/WebKit/Source/wtf/text/TextEncoding.cpp b/third_party/WebKit/Source/wtf/text/TextEncoding.cpp index eb5ded6..6ee67c7 100644 --- a/third_party/WebKit/Source/wtf/text/TextEncoding.cpp +++ b/third_party/WebKit/Source/wtf/text/TextEncoding.cpp @@ -22,7 +22,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -125,10 +125,10 @@ const char* TextEncoding::domName() const if (noExtendedTextEncodingNameUsed()) return m_name; - // We treat EUC-KR as windows-949 (its superset), but need to expose + // We treat EUC-KR as windows-949 (its superset), but need to expose // the name 'EUC-KR' because the name 'windows-949' is not recognized by // most Korean web servers even though they do use the encoding - // 'windows-949' with the name 'EUC-KR'. + // 'windows-949' with the name 'EUC-KR'. // FIXME: This is not thread-safe. At the moment, this function is // only accessed in a single thread, but eventually has to be made // thread-safe along with usesVisualOrdering(). @@ -182,11 +182,11 @@ const TextEncoding& TextEncoding::closestByteBasedEquivalent() const { if (isNonByteBasedEncoding()) return UTF8Encoding(); - return *this; + return *this; } -// HTML5 specifies that UTF-8 be used in form submission when a form is -// is a part of a document in UTF-16 probably because UTF-16 is not a +// HTML5 specifies that UTF-8 be used in form submission when a form is +// is a part of a document in UTF-16 probably because UTF-16 is not a // byte-based encoding and can contain 0x00. By extension, the same // should be done for UTF-32. In case of UTF-7, it is a byte-based encoding, // but it's fraught with problems and we'd rather steer clear of it. diff --git a/third_party/WebKit/Source/wtf/text/TextEncoding.h b/third_party/WebKit/Source/wtf/text/TextEncoding.h index a3a7d88..2830ac7 100644 --- a/third_party/WebKit/Source/wtf/text/TextEncoding.h +++ b/third_party/WebKit/Source/wtf/text/TextEncoding.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TextEncoding_h diff --git a/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp b/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp index 6260710..5fb3561 100644 --- a/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp +++ b/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -85,8 +85,8 @@ struct TextEncodingNameHash { return h; } h += toASCIILower(c); - h += (h << 10); - h ^= (h >> 6); + h += (h << 10); + h ^= (h >> 6); } } diff --git a/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.h b/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.h index 7b7227d..c0ea255 100644 --- a/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.h +++ b/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef TextEncodingRegistry_h diff --git a/third_party/WebKit/Source/wtf/text/WTFString.h b/third_party/WebKit/Source/wtf/text/WTFString.h index cecae95..1ef9f87 100644 --- a/third_party/WebKit/Source/wtf/text/WTFString.h +++ b/third_party/WebKit/Source/wtf/text/WTFString.h @@ -278,7 +278,7 @@ public: void prependTo(Vector<UChar, inlineCapacity>&, unsigned pos = 0, unsigned len = UINT_MAX) const; UChar32 characterStartingAt(unsigned) const; - + bool contains(UChar c) const { return find(c) != notFound; } bool contains(const LChar* str, bool caseSensitive = true) const { return find(str, 0, caseSensitive) != notFound; } bool contains(const String& str, bool caseSensitive = true) const { return find(str, 0, caseSensitive) != notFound; } @@ -410,8 +410,8 @@ public: #ifdef __OBJC__ String(NSString*); - - // This conversion maps NULL to "", which loses the meaning of NULL, but we + + // This conversion maps NULL to "", which loses the meaning of NULL, but we // need this mapping because AppKit crashes when passed nil NSStrings. operator NSString*() const { if (!m_impl) return @""; return *m_impl; } #endif @@ -436,7 +436,7 @@ public: // Tries to convert the passed in string to UTF-8, but will fall back to Latin-1 if the string is not valid UTF-8. static String fromUTF8WithLatin1Fallback(const LChar*, size_t); static String fromUTF8WithLatin1Fallback(const char* s, size_t length) { return fromUTF8WithLatin1Fallback(reinterpret_cast<const LChar*>(s), length); }; - + // Determines the writing direction using the Unicode Bidi Algorithm rules P2 and P3. WTF::Unicode::Direction defaultWritingDirection(bool* hasStrongDirectionality = 0) const { @@ -504,7 +504,7 @@ inline bool equalIgnoringCase(const String& a, const char* b) { return equalIgno inline bool equalIgnoringCase(const LChar* a, const String& b) { return equalIgnoringCase(a, b.impl()); } inline bool equalIgnoringCase(const char* a, const String& b) { return equalIgnoringCase(reinterpret_cast<const LChar*>(a), b.impl()); } -inline bool equalPossiblyIgnoringCase(const String& a, const String& b, bool ignoreCase) +inline bool equalPossiblyIgnoringCase(const String& a, const String& b, bool ignoreCase) { return ignoreCase ? equalIgnoringCase(a, b) : (a == b); } diff --git a/third_party/WebKit/Source/wtf/unicode/CharacterNames.h b/third_party/WebKit/Source/wtf/unicode/CharacterNames.h index 90426a1..16d1deb 100644 --- a/third_party/WebKit/Source/wtf/unicode/CharacterNames.h +++ b/third_party/WebKit/Source/wtf/unicode/CharacterNames.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CharacterNames_h diff --git a/third_party/WebKit/Source/wtf/unicode/UTF8.cpp b/third_party/WebKit/Source/wtf/unicode/UTF8.cpp index 2776c566..72f054c 100644 --- a/third_party/WebKit/Source/wtf/unicode/UTF8.cpp +++ b/third_party/WebKit/Source/wtf/unicode/UTF8.cpp @@ -21,7 +21,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" @@ -126,7 +126,7 @@ int decodeUTF8Sequence(const char* sequence) static const unsigned char firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; ConversionResult convertLatin1ToUTF8( - const LChar** sourceStart, const LChar* sourceEnd, + const LChar** sourceStart, const LChar* sourceEnd, char** targetStart, char* targetEnd) { ConversionResult result = conversionOK; @@ -136,7 +136,7 @@ ConversionResult convertLatin1ToUTF8( UChar32 ch; unsigned short bytesToWrite = 0; const UChar32 byteMask = 0xBF; - const UChar32 byteMark = 0x80; + const UChar32 byteMark = 0x80; const LChar* oldSource = source; // In case we have to back up because of target overflow. ch = static_cast<unsigned short>(*source++); @@ -168,7 +168,7 @@ ConversionResult convertLatin1ToUTF8( } ConversionResult convertUTF16ToUTF8( - const UChar** sourceStart, const UChar* sourceEnd, + const UChar** sourceStart, const UChar* sourceEnd, char** targetStart, char* targetEnd, bool strict) { ConversionResult result = conversionOK; @@ -178,7 +178,7 @@ ConversionResult convertUTF16ToUTF8( UChar32 ch; unsigned short bytesToWrite = 0; const UChar32 byteMask = 0xBF; - const UChar32 byteMark = 0x80; + const UChar32 byteMark = 0x80; const UChar* oldSource = source; // In case we have to back up because of target overflow. ch = static_cast<unsigned short>(*source++); // If we have a surrogate pair, convert to UChar32 first. @@ -295,7 +295,7 @@ static inline UChar32 readUTF8Sequence(const char*& sequence, unsigned length) } ConversionResult convertUTF8ToUTF16( - const char** sourceStart, const char* sourceEnd, + const char** sourceStart, const char* sourceEnd, UChar** targetStart, UChar* targetEnd, bool* sourceAllASCII, bool strict) { ConversionResult result = conversionOK; diff --git a/third_party/WebKit/Source/wtf/unicode/UTF8.h b/third_party/WebKit/Source/wtf/unicode/UTF8.h index b014fa6..8b04cb9 100644 --- a/third_party/WebKit/Source/wtf/unicode/UTF8.h +++ b/third_party/WebKit/Source/wtf/unicode/UTF8.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef WTF_UTF8_h @@ -53,26 +53,26 @@ namespace Unicode { // flag is set to strict, both irregular sequences and isolated surrogates // will cause an error. When the flag is set to lenient, both irregular // sequences and isolated surrogates are converted. - // + // // Whether the flag is strict or lenient, all illegal sequences will cause // an error return. This includes sequences such as: <F4 90 80 80>, <C0 80>, // or <A0> in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code // must check for illegal sequences. - // + // // When the flag is set to lenient, characters over 0x10FFFF are converted // to the replacement character; otherwise (when the flag is set to strict) // they constitute an error. WTF_EXPORT ConversionResult convertUTF8ToUTF16( - const char** sourceStart, const char* sourceEnd, + const char** sourceStart, const char* sourceEnd, UChar** targetStart, UChar* targetEnd, bool* isSourceAllASCII = 0, bool strict = true); WTF_EXPORT ConversionResult convertLatin1ToUTF8( - const LChar** sourceStart, const LChar* sourceEnd, + const LChar** sourceStart, const LChar* sourceEnd, char** targetStart, char* targetEnd); WTF_EXPORT ConversionResult convertUTF16ToUTF8( - const UChar** sourceStart, const UChar* sourceEnd, + const UChar** sourceStart, const UChar* sourceEnd, char** targetStart, char* targetEnd, bool strict = true); WTF_EXPORT unsigned calculateStringHashAndLengthFromUTF8MaskingTop8Bits(const char* data, const char* dataEnd, unsigned& dataLength, unsigned& utf16Length); diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp index 9ef6ca2..c8247a9 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp @@ -524,7 +524,7 @@ static bool testCallback(PluginObject* obj, const NPVariant* args, uint32_t argC browser->releasevariantvalue(&browserResult); browser->releaseobject(windowScriptObject); - + VOID_TO_NPVARIANT(*result); return true; } @@ -823,7 +823,7 @@ static bool testConstruct(PluginObject* obj, const NPVariant* args, uint32_t arg { if (!argCount || !NPVARIANT_IS_OBJECT(args[0])) return false; - + return browser->construct(obj->npp, NPVARIANT_TO_OBJECT(args[0]), args + 1, argCount - 1, result); } @@ -978,7 +978,7 @@ static bool testSetStatus(PluginObject* obj, const NPVariant* args, uint32_t arg NPString statusString = NPVARIANT_TO_STRING(args[0]); message = toCString(statusString); } - + browser->status(obj->npp, message); free(message); @@ -1293,7 +1293,7 @@ void testNPRuntime(NPP npp) // Invoke NPIdentifier testNPInvoke = browser->getstringidentifier("testNPInvoke"); NPVariant args[7]; - + VOID_TO_NPVARIANT(args[0]); NULL_TO_NPVARIANT(args[1]); BOOLEAN_TO_NPVARIANT(true, args[2]); @@ -1301,10 +1301,10 @@ void testNPRuntime(NPP npp) DOUBLE_TO_NPVARIANT(242.242, args[4]); STRINGZ_TO_NPVARIANT("Hello, World", args[5]); OBJECT_TO_NPVARIANT(windowScriptObject, args[6]); - + NPVariant result; if (browser->invoke(npp, windowScriptObject, testNPInvoke, args, 7, &result)) browser->releasevariantvalue(&result); - + browser->releaseobject(windowScriptObject); } diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h index bcdc927..aa41fd3 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef PluginObject_h diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp index c3ada14..321045a9 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp @@ -42,7 +42,7 @@ PluginTest* PluginTest::create(NPP npp, const string& identifier) { if (identifier.empty()) return new PluginTest(npp, identifier); - + CreateTestFunction createTestFunction = createTestFunctions()[identifier]; if (createTestFunction) return createTestFunction(npp, identifier); @@ -206,7 +206,7 @@ int32_t PluginTest::NPN_IntFromIdentifier(NPIdentifier npIdentifier) NPObject* PluginTest::NPN_CreateObject(NPClass* npClass) { return browser->createobject(m_npp, npClass); -} +} NPObject* PluginTest::NPN_RetainObject(NPObject* npObject) { @@ -285,13 +285,13 @@ void PluginTest::notifyDone() void PluginTest::registerCreateTestFunction(const string& identifier, CreateTestFunction createTestFunction) { assert(!createTestFunctions().count(identifier)); - + createTestFunctions()[identifier] = createTestFunction; } std::map<std::string, PluginTest::CreateTestFunction>& PluginTest::createTestFunctions() { static std::map<std::string, CreateTestFunction> testFunctions; - + return testFunctions; } diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h index e719772..a2258195 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h @@ -110,9 +110,9 @@ public: { registerCreateTestFunction(identifier, Register::create); } - + private: - static PluginTest* create(NPP npp, const std::string& identifier) + static PluginTest* create(NPP npp, const std::string& identifier) { return new TestClassTy(npp, identifier); } @@ -141,7 +141,7 @@ protected: object->m_pluginTest = pluginTest; return object; } - + // These should never be called. bool hasMethod(NPIdentifier methodName) { @@ -154,7 +154,7 @@ protected: assert(false); return false; } - + bool invokeDefault(const NPVariant*, uint32_t, NPVariant* result) { assert(false); @@ -190,9 +190,9 @@ protected: : m_pluginTest(0) { } - - virtual ~Object() - { + + virtual ~Object() + { } PluginTest* pluginTest() const { return m_pluginTest; } @@ -241,7 +241,7 @@ protected: static NPClass* npClass() { static NPClass npClass = { - NP_CLASS_STRUCT_VERSION, + NP_CLASS_STRUCT_VERSION, NP_Allocate, NP_Deallocate, 0, // NPClass::invalidate @@ -255,19 +255,19 @@ protected: 0, // NPClass::enumerate 0 // NPClass::construct }; - + return &npClass; }; PluginTest* m_pluginTest; }; - + private: typedef PluginTest* (*CreateTestFunction)(NPP, const std::string&); - + static void registerCreateTestFunction(const std::string&, CreateTestFunction); static std::map<std::string, CreateTestFunction>& createTestFunctions(); - + std::string m_identifier; }; diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp index c731494..f2faa05 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "TestObject.h" @@ -38,10 +38,10 @@ static NPObject *testAllocate(NPP npp, NPClass *theClass); static void testDeallocate(NPObject *obj); static bool testConstruct(NPObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result); -static NPClass testClass = { +static NPClass testClass = { NP_CLASS_STRUCT_VERSION, - testAllocate, - testDeallocate, + testAllocate, + testDeallocate, 0, testHasMethod, testInvoke, @@ -121,7 +121,7 @@ static NPObject* testAllocate(NPP npp, NPClass* /*theClass*/) return reinterpret_cast<NPObject*>(newInstance); } -static void testDeallocate(NPObject *obj) +static void testDeallocate(NPObject *obj) { TestObject* testObject = reinterpret_cast<TestObject*>(obj); if (testObject->testObject) @@ -155,7 +155,7 @@ static bool testHasProperty(NPObject*, NPIdentifier name) if (testIdentifiers[i] == name) return true; } - + return false; } @@ -185,24 +185,24 @@ static bool testGetProperty(NPObject* npobj, NPIdentifier name, NPVariant* resul INT32_TO_NPVARIANT(npobj->referenceCount, *result); return true; } - + return false; } static bool testEnumerate(NPObject* /*npobj*/, NPIdentifier **value, uint32_t *count) { *count = NUM_ENUMERATABLE_TEST_IDENTIFIERS; - + *value = (NPIdentifier*)browser->memalloc(NUM_ENUMERATABLE_TEST_IDENTIFIERS * sizeof(NPIdentifier)); memcpy(*value, testIdentifiers, sizeof(NPIdentifier) * NUM_ENUMERATABLE_TEST_IDENTIFIERS); - + return true; } static bool testConstruct(NPObject* npobj, const NPVariant* /*args*/, uint32_t /*argCount*/, NPVariant* result) { browser->retainobject(npobj); - + // Just return the same object. OBJECT_TO_NPVARIANT(npobj, *result); return true; diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h index 73748e0..eb66a0e 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/TestObject.h @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <WebKit/npapi.h> diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp index 69e706ea..36fb4b9b 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp @@ -46,9 +46,9 @@ private: testDocumentOpen(m_npp); m_shouldOpen = false; } - + return NPERR_NO_ERROR; - } + } bool m_shouldOpen; }; diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp index b3a72b0..64a69a3 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp @@ -100,7 +100,7 @@ private: { if (stream->pdata != this) m_didFail = true; - + m_data.insert(m_data.end(), static_cast<char*>(buffer), static_cast<char*>(buffer) + len); return len; } diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp index 9d63198..aa1fc11 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp @@ -42,7 +42,7 @@ private: { NPN_GetURL("javascript:removePlugin()", 0); return NPERR_NO_ERROR; - } + } }; static PluginTest::Register<GetURLWithJavaScriptURLDestroyingPlugin> getURLWithJavaScriptURLDestroyingPlugin("get-url-with-javascript-url-destroying-plugin"); diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp index 0e2dbdc..a9a9b8f 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp @@ -49,14 +49,14 @@ NPError InvokeDestroysPluginWithinNPP_New::NPP_New(NPMIMEType pluginType, uint16 { // Give the WebProcess enough time to be deadlocked waiting for the PluginProcess if things aren't working correctly. usleep(15000); - + NPObject* windowObject = 0; if (NPN_GetValue(NPNVWindowNPObject, &windowObject) != NPERR_NO_ERROR) return NPERR_GENERIC_ERROR; - + if (!windowObject) return NPERR_GENERIC_ERROR; - + NPVariant result; if (!NPN_Invoke(windowObject, NPN_GetStringIdentifier("removePluginElement"), 0, 0, &result)) return NPERR_GENERIC_ERROR; diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/LogNPPSetWindow.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/LogNPPSetWindow.cpp index d282fc0..90481e2 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/LogNPPSetWindow.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/LogNPPSetWindow.cpp @@ -49,7 +49,7 @@ NPError LogNPPSetWindow::NPP_SetWindow(NPWindow* window) window->window ? "non-NULL" : "NULL", window->x, window->y, window->width, window->height, window->clipRect.left, window->clipRect.top, window->clipRect.right, window->clipRect.bottom, window->type); - + char script[1536]; snprintf(script, 1536, "window.setTimeout('windowWasSet(\"%s\");', 0);", message); diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp index 91f47af..fb0f2c4 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp @@ -38,9 +38,9 @@ public: private: // This is the test object. - class TestObject : public Object<TestObject> { + class TestObject : public Object<TestObject> { public: - ~TestObject() + ~TestObject() { if (wasShutdownCalled) indicateTestFailure(); @@ -48,7 +48,7 @@ private: }; // This is the scriptable object. It has a single "testObject" property. - class ScriptableObject : public Object<ScriptableObject> { + class ScriptableObject : public Object<ScriptableObject> { public: bool hasProperty(NPIdentifier propertyName) { @@ -77,9 +77,9 @@ private: { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; - + *(NPObject**)value = ScriptableObject::create(this); - + return NPERR_NO_ERROR; } diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPNewFails.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPNewFails.cpp index e3b11d6..afe344a 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPNewFails.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPNewFails.cpp @@ -35,9 +35,9 @@ public: : PluginTest(npp, identifier) { } - + private: - + virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData *saved) { return NPERR_GENERIC_ERROR; diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp index 0e238e6..96e9d83 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp @@ -39,7 +39,7 @@ private: class TestObject : public Object<TestObject> { }; // This is the scriptable object. It has a single "testObject" property and an "evaluate" function. - class ScriptableObject : public Object<ScriptableObject> { + class ScriptableObject : public Object<ScriptableObject> { public: bool hasMethod(NPIdentifier methodName) { @@ -77,9 +77,9 @@ private: { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; - + *(NPObject**)value = ScriptableObject::create(this); - + return NPERR_NO_ERROR; } }; diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp index 8a923dc..f817dcb 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp @@ -35,7 +35,7 @@ public: : PluginTest(npp, identifier) { } - + private: struct TestObject : Object<TestObject> { public: @@ -48,7 +48,7 @@ private: { if (identifierIs(propertyName, "lastRemovedProperty")) return true; - + return false; } @@ -61,7 +61,7 @@ private: if (pluginTest()->NPN_IdentifierIsString(m_lastRemovedProperty)) { char* lastRemovedPropertyName = pluginTest()->NPN_UTF8FromIdentifier(m_lastRemovedProperty); - + STRINGZ_TO_NPVARIANT(lastRemovedPropertyName, *result); return true; } @@ -111,21 +111,21 @@ private: if (!NPVARIANT_IS_OBJECT(arguments[0])) return false; - + if (!NPVARIANT_IS_STRING(arguments[1]) && !NPVARIANT_IS_DOUBLE(arguments[1])) return false; - + NPIdentifier propertyName; if (NPVARIANT_IS_STRING(arguments[1])) { string propertyNameString(arguments[1].value.stringValue.UTF8Characters, arguments[1].value.stringValue.UTF8Length); - + propertyName = pluginTest()->NPN_GetStringIdentifier(propertyNameString.c_str()); } else { int32_t number = static_cast<int32_t>(arguments[1].value.doubleValue); propertyName = pluginTest()->NPN_GetIntIdentifier(number); } - + pluginTest()->NPN_RemoveProperty(NPVARIANT_TO_OBJECT(arguments[0]), propertyName); VOID_TO_NPVARIANT(*result); @@ -154,17 +154,17 @@ private: private: NPObject* m_testObject; }; - + virtual NPError NPP_GetValue(NPPVariable variable, void *value) { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; - + *(NPObject**)value = PluginObject::create(this); - + return NPERR_NO_ERROR; } - + }; static PluginTest::Register<NPRuntimeRemoveProperty> npRuntimeRemoveProperty("npruntime-remove-property"); diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp index 959e182..34d209b 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp @@ -38,7 +38,7 @@ public: private: struct NPObjectWithoutInvokeDefault : Object<NPObjectWithoutInvokeDefault> { }; - struct NPObjectWithInvokeDefault : Object<NPObjectWithInvokeDefault> { + struct NPObjectWithInvokeDefault : Object<NPObjectWithInvokeDefault> { public: bool invokeDefault(const NPVariant*, uint32_t, NPVariant* result) { @@ -57,9 +57,9 @@ private: object = NPObjectWithInvokeDefault::create(this); else object = NPObjectWithoutInvokeDefault::create(this); - + *(NPObject**)value = object; - + return NPERR_NO_ERROR; } }; diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableObjectOverridesAllProperties.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableObjectOverridesAllProperties.cpp index ddeb8e9..a70d47b 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableObjectOverridesAllProperties.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableObjectOverridesAllProperties.cpp @@ -36,7 +36,7 @@ public: : PluginTest(npp, identifier) { } - + private: class PluginObject : public Object<PluginObject> { public: @@ -57,27 +57,27 @@ private: { static const char* message = "My name is "; char* propertyString = pluginTest()->NPN_UTF8FromIdentifier(propertyName); - + int bufferLength = strlen(propertyString) + strlen(message) + 1; char* resultBuffer = static_cast<char*>(pluginTest()->NPN_MemAlloc(bufferLength)); snprintf(resultBuffer, bufferLength, "%s%s", message, propertyString); - + STRINGZ_TO_NPVARIANT(resultBuffer, *result); return true; } }; - + virtual NPError NPP_GetValue(NPPVariable variable, void *value) { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; - + *(NPObject**)value = PluginObject::create(this); - + return NPERR_NO_ERROR; } - + }; static PluginTest::Register<PluginScriptableObjectOverridesAllProperties> pluginScriptableObjectOverridesAllProperties("plugin-scriptable-object-overrides-all-properties"); diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp index 8c80d55..8638c78 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp @@ -35,7 +35,7 @@ public: : PluginTest(npp, identifier) { } - + private: class PluginObject : public Object<PluginObject> { public: @@ -56,24 +56,24 @@ private: { static const char* message = "My name is "; char* propertyString = pluginTest()->NPN_UTF8FromIdentifier(propertyName); - + int bufferLength = strlen(propertyString) + strlen(message) + 1; char* resultBuffer = static_cast<char*>(pluginTest()->NPN_MemAlloc(bufferLength)); snprintf(resultBuffer, bufferLength, "%s%s", message, propertyString); - + STRINGZ_TO_NPVARIANT(resultBuffer, *result); return true; } }; - + virtual NPError NPP_GetValue(NPPVariable variable, void *value) { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; - + *(NPObject**)value = PluginObject::create(this); - + return NPERR_NO_ERROR; } diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ContentsScaleFactor.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ContentsScaleFactor.cpp index 5353d833..62b9fe7 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ContentsScaleFactor.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ContentsScaleFactor.cpp @@ -48,7 +48,7 @@ private: return m_cachedContentsScaleFactor; } - class ScriptableObject : public Object<ScriptableObject> { + class ScriptableObject : public Object<ScriptableObject> { public: bool hasProperty(NPIdentifier propertyName) { @@ -85,9 +85,9 @@ private: { if (variable != NPPVpluginScriptableNPObject) return NPERR_GENERIC_ERROR; - + *(NPObject**)value = ScriptableObject::create(this); - + return NPERR_NO_ERROR; } diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp index 51cbce2..c5c65e9 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/SupportsCarbonEventModel.cpp @@ -56,7 +56,7 @@ private: executeScript("document.getElementById('result').innerHTML = 'SUCCESS!'"); return NPERR_NO_ERROR; - } + } }; static PluginTest::Register<SupportsCarbonEventModel> supportsCarbonEventModel("supports-carbon-event-model"); diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp index 8b9e5bf..942500a 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp @@ -20,7 +20,7 @@ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "PluginObject.h" @@ -122,7 +122,7 @@ NPError STDCALL NP_GetEntryPoints(NPPluginFuncs *pluginFuncs) pluginFuncs->urlnotify = NPP_URLNotify; pluginFuncs->getvalue = NPP_GetValue; pluginFuncs->setvalue = NPP_SetValue; - + return NPERR_NO_ERROR; } @@ -145,12 +145,12 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc { #ifdef XP_MACOSX NPEventModel eventModel; - + // Always turn on the CG model NPBool supportsCoreGraphics; if (browser->getvalue(instance, NPNVsupportsCoreGraphicsBool, &supportsCoreGraphics) != NPERR_NO_ERROR) supportsCoreGraphics = false; - + if (!supportsCoreGraphics) return NPERR_INCOMPATIBLE_VERSION_ERROR; @@ -197,7 +197,7 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc string testIdentifier; const char* onNewScript = 0; - + for (int i = 0; i < argc; i++) { if (strcasecmp(argn[i], "test") == 0) testIdentifier = argv[i]; @@ -336,7 +336,7 @@ NPError NPP_Destroy(NPP instance, NPSavedData **save) if (obj->onPaintEvent) free(obj->onPaintEvent); - + if (obj->logDestroy) pluginLog(instance, "NPP_Destroy"); @@ -379,7 +379,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow *window) executeScript(obj, "eventSender.keyDown('A');"); } } - + return obj->pluginTest->NPP_SetWindow(window); } @@ -405,7 +405,7 @@ NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream, NPBool se if (obj->returnErrorFromNewStream) return NPERR_GENERIC_ERROR; - + if (browser->version >= NPVERS_HAS_RESPONSE_HEADERS) notifyStream(obj, stream->url, stream->headers); @@ -422,7 +422,7 @@ NPError NPP_DestroyStream(NPP instance, NPStream *stream, NPReason reason) if (obj->onStreamDestroy) { NPObject* windowObject = 0; NPError error = browser->getvalue(instance, NPNVWindowNPObject, &windowObject); - + if (error == NPERR_NO_ERROR) { NPVariant onStreamDestroyVariant; if (browser->getproperty(instance, windowObject, browser->getstringidentifier(obj->onStreamDestroy), &onStreamDestroyVariant)) { @@ -574,7 +574,7 @@ static int16_t handleEventCarbon(NPP instance, PluginObject* obj, EventRecord* e if (obj->eventLogging) pluginLog(instance, "event %d", event->what); } - + return 0; } #endif @@ -583,7 +583,7 @@ static int16_t handleEventCocoa(NPP instance, PluginObject* obj, NPCocoaEvent* e { switch (event->type) { case NPCocoaEventWindowFocusChanged: - + case NPCocoaEventFocusChanged: if (obj->eventLogging) { if (event->data.focus.hasFocus) @@ -622,7 +622,7 @@ static int16_t handleEventCocoa(NPP instance, PluginObject* obj, NPCocoaEvent* e case NPCocoaEventMouseDown: if (obj->eventLogging) { - pluginLog(instance, "mouseDown at (%d, %d)", + pluginLog(instance, "mouseDown at (%d, %d)", (int)event->data.mouse.pluginX, (int)event->data.mouse.pluginY); } @@ -631,12 +631,12 @@ static int16_t handleEventCocoa(NPP instance, PluginObject* obj, NPCocoaEvent* e return 1; case NPCocoaEventMouseUp: if (obj->eventLogging) { - pluginLog(instance, "mouseUp at (%d, %d)", + pluginLog(instance, "mouseUp at (%d, %d)", (int)event->data.mouse.pluginX, (int)event->data.mouse.pluginY); } return 1; - + case NPCocoaEventMouseMoved: case NPCocoaEventMouseEntered: case NPCocoaEventMouseExited: @@ -645,7 +645,7 @@ static int16_t handleEventCocoa(NPP instance, PluginObject* obj, NPCocoaEvent* e case NPCocoaEventTextInput: return 1; } - + return 0; } @@ -840,12 +840,12 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) *v = obj; return NPERR_NO_ERROR; } - + #ifdef XP_MACOSX if (variable == NPPVpluginCoreAnimationLayer) { if (!obj->coreAnimationLayer) return NPERR_GENERIC_ERROR; - + void **v = (void **)value; *v = (void*)CFRetain(obj->coreAnimationLayer); return NPERR_NO_ERROR; diff --git a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win/resource.h b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win/resource.h index b0ce340..7aa780f 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win/resource.h +++ b/third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win/resource.h @@ -3,7 +3,7 @@ // Used by TestNetscapePlugin.rc // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 diff --git a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp index 4100457d..3ea7fd6 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp @@ -101,7 +101,7 @@ AccessibilityUIElement* AccessibilityController::findAccessibleElementByIdRecurs if (!node.isNull() && node.isElementNode()) { WebElement element = node.to<WebElement>(); element.getAttribute("id"); - if (element.getAttribute("id") == id) + if (element.getAttribute("id") == id) return m_elements.getOrCreate(obj); } diff --git a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp index ff1897e..b56a6e1 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp @@ -830,7 +830,7 @@ void EventSender::replaySavedEvents() replayingSavedEvents = false; } -// Because actual context menu is implemented by the browser side, +// Because actual context menu is implemented by the browser side, // this function does only what LayoutTests are expecting: // - Many test checks the count of items. So returning non-zero value makes sense. // - Some test compares the count before and after some action. So changing the count based on flags @@ -850,14 +850,14 @@ static vector<WebString> makeMenuItemStringsFor(WebContextMenuData* contextMenu, vector<WebString> strings; if (contextMenu->isEditable) { - for (const char** item = editableMenuStrings; *item; ++item) + for (const char** item = editableMenuStrings; *item; ++item) strings.push_back(WebString::fromUTF8(*item)); WebVector<WebString> suggestions; MockSpellCheck::fillSuggestionList(contextMenu->misspelledWord, &suggestions); - for (size_t i = 0; i < suggestions.size(); ++i) + for (size_t i = 0; i < suggestions.size(); ++i) strings.push_back(suggestions[i]); } else { - for (const char** item = nonEditableMenuStrings; *item; ++item) + for (const char** item = nonEditableMenuStrings; *item; ++item) strings.push_back(WebString::fromUTF8(*item)); } @@ -871,7 +871,7 @@ void EventSender::contextClick(const CppArgumentList& arguments, CppVariant* res updateClickCountForButton(WebMouseEvent::ButtonRight); - // Clears last context menu data because we need to know if the context menu be requested + // Clears last context menu data because we need to know if the context menu be requested // after following mouse events. m_lastContextMenuData.reset(); diff --git a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp index e16edfd..c5e7419 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp @@ -512,7 +512,7 @@ bool TestPlugin::handleInputEvent(const WebInputEvent& event, WebCursorInfo& inf case WebInputEvent::GestureScrollBegin: eventName = "GestureScrollBegin"; break; case WebInputEvent::GestureScrollEnd: eventName = "GestureScrollEnd"; break; - case WebInputEvent::GestureScrollUpdateWithoutPropagation: + case WebInputEvent::GestureScrollUpdateWithoutPropagation: case WebInputEvent::GestureScrollUpdate: eventName = "GestureScrollUpdate"; break; case WebInputEvent::GestureFlingStart: eventName = "GestureFlingStart"; break; case WebInputEvent::GestureFlingCancel: eventName = "GestureFlingCancel"; break; diff --git a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h index 84f1eb8..578134c 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h +++ b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h @@ -632,7 +632,7 @@ private: // request callback. bool m_dumpResourceRequestCallbacks; - // If true, the test_shell will output the MIME type for each resource that + // If true, the test_shell will output the MIME type for each resource that // was loaded. bool m_dumpResourceResponseMIMETypes; diff --git a/third_party/WebKit/public/platform/WebAudioBus.h b/third_party/WebKit/public/platform/WebAudioBus.h index 608deca..7c42fc5 100644 --- a/third_party/WebKit/public/platform/WebAudioBus.h +++ b/third_party/WebKit/public/platform/WebAudioBus.h @@ -45,7 +45,7 @@ class WebAudioBus { public: WebAudioBus() : m_private(0) { } ~WebAudioBus() { reset(); } - + // initialize() allocates memory of the given length for the given number of channels. WEBKIT_EXPORT void initialize(unsigned numberOfChannels, size_t length, double sampleRate); @@ -55,11 +55,11 @@ public: // reset() releases the memory allocated from initialize(). WEBKIT_EXPORT void reset(); - + WEBKIT_EXPORT unsigned numberOfChannels() const; WEBKIT_EXPORT size_t length() const; WEBKIT_EXPORT double sampleRate() const; - + WEBKIT_EXPORT float* channelData(unsigned channelIndex); #if WEBKIT_IMPLEMENTATION diff --git a/third_party/WebKit/public/platform/WebAudioDevice.h b/third_party/WebKit/public/platform/WebAudioDevice.h index ebdf804..8021979 100644 --- a/third_party/WebKit/public/platform/WebAudioDevice.h +++ b/third_party/WebKit/public/platform/WebAudioDevice.h @@ -44,7 +44,7 @@ public: protected: virtual ~RenderCallback() { } }; - + virtual ~WebAudioDevice() { } virtual void start() = 0; diff --git a/third_party/WebKit/public/platform/WebGraphicsMemoryStats.h b/third_party/WebKit/public/platform/WebGraphicsMemoryStats.h index c932f39..b66a464 100644 --- a/third_party/WebKit/public/platform/WebGraphicsMemoryStats.h +++ b/third_party/WebKit/public/platform/WebGraphicsMemoryStats.h @@ -45,7 +45,7 @@ struct WebGraphicsManagedMemoryStats { // of the buffer is known by the GPU process). bool backbufferRequested; - WebGraphicsManagedMemoryStats() + WebGraphicsManagedMemoryStats() : bytesVisible(0) , bytesVisibleAndNearby(0) , bytesAllocated(0) diff --git a/third_party/WebKit/public/platform/WebHTTPLoadInfo.h b/third_party/WebKit/public/platform/WebHTTPLoadInfo.h index 09bf169..8966e3c 100644 --- a/third_party/WebKit/public/platform/WebHTTPLoadInfo.h +++ b/third_party/WebKit/public/platform/WebHTTPLoadInfo.h @@ -47,7 +47,7 @@ public: ~WebHTTPLoadInfo() { reset(); } WebHTTPLoadInfo(const WebHTTPLoadInfo& r) { assign(r); } WebHTTPLoadInfo& operator =(const WebHTTPLoadInfo& r) - { + { assign(r); return *this; } diff --git a/third_party/WebKit/public/platform/WebLayer.h b/third_party/WebKit/public/platform/WebLayer.h index a21ffed..8c6a92d 100644 --- a/third_party/WebKit/public/platform/WebLayer.h +++ b/third_party/WebKit/public/platform/WebLayer.h @@ -122,7 +122,7 @@ public: // WebFilterOperations object. virtual void setFilters(const WebFilterOperations&) = 0; - // Set the root of the image filter graph for this layer. The + // Set the root of the image filter graph for this layer. The // implementation should grab a ref on the passed-in filter in order // to retain ownership. The passed-in graph will be unref'ed by the // caller after this call. diff --git a/third_party/WebKit/public/platform/WebRTCStatsRequest.h b/third_party/WebKit/public/platform/WebRTCStatsRequest.h index 0980502..8f9ad30 100644 --- a/third_party/WebKit/public/platform/WebRTCStatsRequest.h +++ b/third_party/WebKit/public/platform/WebRTCStatsRequest.h @@ -61,7 +61,7 @@ class WebRTCStatsResponse; // size_t elementIndex = response.addElement(reportIndex, true, dateNow()); // For each statistic being reported on: // response.addStatistic(reportIndex, true, elementIndex, -// "name of statistic", "statistic value"); +// "name of statistic", "statistic value"); // Remote information (typically RTCP-derived) is added in the same way. // When finished adding information: // request.requestSucceeded(response); diff --git a/third_party/WebKit/public/platform/WebVector.h b/third_party/WebKit/public/platform/WebVector.h index f704fd2..b190043 100644 --- a/third_party/WebKit/public/platform/WebVector.h +++ b/third_party/WebKit/public/platform/WebVector.h @@ -131,7 +131,7 @@ public: WEBKIT_ASSERT(i < m_size); return m_ptr[i]; } - + bool contains(const T& value) const { for (size_t i = 0; i < m_size; i++) { diff --git a/third_party/WebKit/public/web/WebAccessibilityRole.h b/third_party/WebKit/public/web/WebAccessibilityRole.h index 196ef22..c2c0598 100644 --- a/third_party/WebKit/public/web/WebAccessibilityRole.h +++ b/third_party/WebKit/public/web/WebAccessibilityRole.h @@ -45,12 +45,12 @@ enum WebAccessibilityRole { WebAccessibilityRoleApplicationLog, WebAccessibilityRoleApplicationMarquee, WebAccessibilityRoleApplicationStatus, - WebAccessibilityRoleApplicationTimer, + WebAccessibilityRoleApplicationTimer, WebAccessibilityRoleBrowser, WebAccessibilityRoleBusyIndicator, WebAccessibilityRoleButton, WebAccessibilityRoleCanvas, - WebAccessibilityRoleCell, + WebAccessibilityRoleCell, WebAccessibilityRoleCheckBox, WebAccessibilityRoleColorWell, WebAccessibilityRoleColumn, diff --git a/third_party/WebKit/public/web/WebAudioSourceProvider.h b/third_party/WebKit/public/web/WebAudioSourceProvider.h index c23d3c1..122cfa5 100644 --- a/third_party/WebKit/public/web/WebAudioSourceProvider.h +++ b/third_party/WebKit/public/web/WebAudioSourceProvider.h @@ -28,7 +28,7 @@ #include "../platform/WebVector.h" namespace WebKit { - + class WebAudioSourceProviderClient; // Abstract interface for a pull-model client. diff --git a/third_party/WebKit/public/web/WebFileWriter.h b/third_party/WebKit/public/web/WebFileWriter.h index e2a534b..fa5b0ff 100644 --- a/third_party/WebKit/public/web/WebFileWriter.h +++ b/third_party/WebKit/public/web/WebFileWriter.h @@ -51,7 +51,7 @@ public: // Do not call cancel when there is no write or truncate in progress. virtual void cancel() = 0; }; - + } // namespace WebKit #endif diff --git a/third_party/WebKit/public/web/WebFontDescription.h b/third_party/WebKit/public/web/WebFontDescription.h index 145fd59..4ef5b7f 100644 --- a/third_party/WebKit/public/web/WebFontDescription.h +++ b/third_party/WebKit/public/web/WebFontDescription.h @@ -57,7 +57,7 @@ struct WebFontDescription { SmoothingSubpixel }; - enum Weight { + enum Weight { Weight100, Weight200, Weight300, diff --git a/third_party/WebKit/public/web/WebImageDecoder.h b/third_party/WebKit/public/web/WebImageDecoder.h index da8f46b..309220e 100644 --- a/third_party/WebKit/public/web/WebImageDecoder.h +++ b/third_party/WebKit/public/web/WebImageDecoder.h @@ -62,7 +62,7 @@ public: // Returns true if image decoding failed. WEBKIT_EXPORT bool isFailed() const; - + // Returns true if size information is available for the decoder. WEBKIT_EXPORT bool isSizeAvailable() const; diff --git a/third_party/WebKit/public/web/WebMenuItemInfo.h b/third_party/WebKit/public/web/WebMenuItemInfo.h index eef2528..f15caac 100644 --- a/third_party/WebKit/public/web/WebMenuItemInfo.h +++ b/third_party/WebKit/public/web/WebMenuItemInfo.h @@ -47,7 +47,7 @@ struct WebMenuItemInfo { SubMenu }; - WebMenuItemInfo() + WebMenuItemInfo() : type(Option) , action(0) , textDirection(WebTextDirectionDefault) diff --git a/third_party/WebKit/public/web/WebSecurityOrigin.h b/third_party/WebKit/public/web/WebSecurityOrigin.h index b511c8b..41d0257 100644 --- a/third_party/WebKit/public/web/WebSecurityOrigin.h +++ b/third_party/WebKit/public/web/WebSecurityOrigin.h @@ -92,7 +92,7 @@ public: // be used as a file. Should be used in storage APIs only. WEBKIT_EXPORT WebString databaseIdentifier() const; - // Returns true if this WebSecurityOrigin can access usernames and + // Returns true if this WebSecurityOrigin can access usernames and // passwords stored in password manager. WEBKIT_EXPORT bool canAccessPasswordManager() const; |
