diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 12:46:38 +0000 |
commit | f0a51fb571f46531025fa09240bbc3e1af925e84 (patch) | |
tree | 558b4f0e737fda4b9ab60f252c9c23b8a4ca523e /webkit | |
parent | 6390be368205705f49ead3cec40396519f13b889 (diff) | |
download | chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.zip chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.gz chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.bz2 |
Fixes CRLF and trailing white spaces.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
158 files changed, 756 insertions, 756 deletions
diff --git a/webkit/activex_shim/activex_plugin.h b/webkit/activex_shim/activex_plugin.h index 9c3d3de..2053c5d 100644 --- a/webkit/activex_shim/activex_plugin.h +++ b/webkit/activex_shim/activex_plugin.h @@ -57,7 +57,7 @@ class ActiveXPlugin : public DispatchObject { private: // Process parameters passed in from browser. void ProcessParams(int16 argc, char* argn[], char* argv[]); - // For handling wmp mime type, we need to initialize params differently + // For handling wmp mime type, we need to initialize params differently // (change src to corresponding param for wmp control), and set clsid to wmp. void ConvertForEmbeddedWmp(); diff --git a/webkit/activex_shim/activex_shared.cc b/webkit/activex_shim/activex_shared.cc index ee146b9..965429bc 100644 --- a/webkit/activex_shim/activex_shared.cc +++ b/webkit/activex_shim/activex_shared.cc @@ -23,8 +23,8 @@ struct ActiveXAttribute { // - "*" will match any sites. // - "file" matches file url starts with "file://" // - anything else matches the last part of the host. - // e.g. "95559.com;ecitic.com" allows controls running from 95559.com and - // ecitic.com. + // e.g. "95559.com;ecitic.com" allows controls running from 95559.com and + // ecitic.com. // See MatchUrlForSinglePattern for details. const char* allowed_sites; const char* allowed_codebase_sites; @@ -117,7 +117,7 @@ bool IsCodebaseAllowed(const std::string& clsid, const std::string& codebase) { return false; if (attr->allowed_codebase_sites == NULL) return false; - return MatchUrlForPatterns(url, attr->allowed_codebase_sites); + return MatchUrlForPatterns(url, attr->allowed_codebase_sites); } bool GetClsidFromClassidAttribute(const std::string& classid, @@ -137,7 +137,7 @@ std::string GetVersionFromCodebaseAttribute(const std::string& codebase) { std::string version; size_t pos = codebase.find('#'); if (pos == std::string::npos) - return version; + return version; std::string rest = codebase.substr(pos + 1); std::string version_prefix = "version="; if (!StartsWithASCII(rest, "version=", false)) @@ -188,7 +188,7 @@ bool IsActiveXInstalled(const std::string& combined_clsid) { DWORD requested_version_ms = 0; DWORD requested_version_ls = 0; if (!ParseVersionFromCodebase(version, - &requested_version_ms, + &requested_version_ms, &requested_version_ls)) return true; // Get the path to the dll. diff --git a/webkit/activex_shim/activex_util.cc b/webkit/activex_shim/activex_util.cc index 7624e88..fbb9125 100644 --- a/webkit/activex_shim/activex_util.cc +++ b/webkit/activex_shim/activex_util.cc @@ -139,7 +139,7 @@ static bool DispGetFuncDesc(IDispatch* disp, const wchar_t* name, bool DispIsMethodOrProperty(IDispatch* disp, const wchar_t* name, bool checkmethod) { FUNCDESC funcdesc; - if (DispGetFuncDesc(disp, name, &funcdesc)) { + if (DispGetFuncDesc(disp, name, &funcdesc)) { // If it has multiple params, for PROPERTYGET, we have to treat it like a // method, because the scripting engine will not handle properties with // parameters. diff --git a/webkit/activex_shim/web_activex_site.h b/webkit/activex_shim/web_activex_site.h index 149d148..74ca89b 100644 --- a/webkit/activex_shim/web_activex_site.h +++ b/webkit/activex_shim/web_activex_site.h @@ -192,7 +192,7 @@ class WebActiveXSite : public MinimumIDispatchImpl, friend ActiveXPlugin; private: - // Call IOleObject::SetExtent to change the size of the control. width and + // Call IOleObject::SetExtent to change the size of the control. width and // height should be in pixels. HRESULT SetExtent(int width, int height); diff --git a/webkit/build/JavaScriptCore/pthread.h b/webkit/build/JavaScriptCore/pthread.h index 84cb9a8..1c6b337 100644 --- a/webkit/build/JavaScriptCore/pthread.h +++ b/webkit/build/JavaScriptCore/pthread.h @@ -55,7 +55,7 @@ inline int pthread_mutex_unlock(pthread_mutex_t* mutex) { #define PTHREAD_MUTEX_INITIALIZER 0 -// +// // pthread_cond_t typedef int pthread_cond_t; diff --git a/webkit/build/precompiled_webkit.cc b/webkit/build/precompiled_webkit.cc index 6c56adf..e8b969b 100644 --- a/webkit/build/precompiled_webkit.cc +++ b/webkit/build/precompiled_webkit.cc @@ -5,4 +5,4 @@ // the PCH file here asserts that the /FI option is indeed correctly set. // // "/FI [header file]" means force include. The specified include file will be -// included before each compilation unit (.c/.cc file).
\ No newline at end of file +// included before each compilation unit (.c/.cc file). diff --git a/webkit/build/precompiled_webkit_c.c b/webkit/build/precompiled_webkit_c.c index ad33662..b20420c 100644 --- a/webkit/build/precompiled_webkit_c.c +++ b/webkit/build/precompiled_webkit_c.c @@ -10,4 +10,4 @@ // Why a second .c file (in addition to a .cc file) ? Well, PCH for C and C++ // are not intermixable and it happens that some projects have a lot of C files. // Also, the base name of the file must be different because MSVC has some -// trouble with having more than one source file with the same base name.
\ No newline at end of file +// trouble with having more than one source file with the same base name. diff --git a/webkit/build/webkit_version.py b/webkit/build/webkit_version.py index 7f64238..9f8fbab 100755 --- a/webkit/build/webkit_version.py +++ b/webkit/build/webkit_version.py @@ -59,5 +59,5 @@ def main(): if __name__ == "__main__": main() - - + + diff --git a/webkit/default_plugin/install_dialog.cc b/webkit/default_plugin/install_dialog.cc index 590742b..cd8e33a 100644 --- a/webkit/default_plugin/install_dialog.cc +++ b/webkit/default_plugin/install_dialog.cc @@ -84,7 +84,7 @@ HWND PluginInstallDialog::Create(HWND parent_window, LPARAM init_param) { dialog_template_struct = rtl_layout_dialog_template_struct; } - HWND dialog_window = + HWND dialog_window = CreateDialogIndirectParam( instance_handle, reinterpret_cast<DLGTEMPLATE*>(dialog_template_struct), diff --git a/webkit/default_plugin/plugin_database_handler.h b/webkit/default_plugin/plugin_database_handler.h index 5112d83..cc37c90 100644 --- a/webkit/default_plugin/plugin_database_handler.h +++ b/webkit/default_plugin/plugin_database_handler.h @@ -38,7 +38,7 @@ struct _xmlNode; // The format of the plugins databse file is as below:- // <plugins> // <plugin> -// <mime_types> </mime_types> (semicolon separated list of mime types +// <mime_types> </mime_types> (semicolon separated list of mime types // supported by the plugin) // <lang> </lang> (Supported language) // <url> </url> (Link to the plugin installer) diff --git a/webkit/default_plugin/plugin_impl.h b/webkit/default_plugin/plugin_impl.h index a1fe5a9..1bf9558 100644 --- a/webkit/default_plugin/plugin_impl.h +++ b/webkit/default_plugin/plugin_impl.h @@ -1,11 +1,11 @@ // Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -
-#if defined(OS_WIN)
-#include "webkit/default_plugin/plugin_impl_win.h"
-#elif defined (OS_MACOSX)
-#include "webkit/default_plugin/plugin_impl_mac.h"
-#elif defined (OS_LINUX)
-#include "webkit/default_plugin/plugin_impl_gtk.h"
-#endif
+ +#if defined(OS_WIN) +#include "webkit/default_plugin/plugin_impl_win.h" +#elif defined (OS_MACOSX) +#include "webkit/default_plugin/plugin_impl_mac.h" +#elif defined (OS_LINUX) +#include "webkit/default_plugin/plugin_impl_gtk.h" +#endif diff --git a/webkit/glue/alt_404_page_resource_fetcher.cc b/webkit/glue/alt_404_page_resource_fetcher.cc index 66f1843..89dc157 100644 --- a/webkit/glue/alt_404_page_resource_fetcher.cc +++ b/webkit/glue/alt_404_page_resource_fetcher.cc @@ -29,7 +29,7 @@ Alt404PageResourceFetcher::Alt404PageResourceFetcher( const GURL& url) : webframeloaderclient_(webframeloaderclient), doc_loader_(doc_loader) { - + fetcher_.reset(new ResourceFetcherWithTimeout(url, frame, kDownloadTimeoutSec, this)); } diff --git a/webkit/glue/cache_manager.cc b/webkit/glue/cache_manager.cc index 8f499f2..aaf9c94 100644 --- a/webkit/glue/cache_manager.cc +++ b/webkit/glue/cache_manager.cc @@ -48,7 +48,7 @@ void CacheManager::GetUsageStats(UsageStats* result) { DCHECK(result); WebCore::Cache* cache = WebCore::cache(); - + if (cache) { result->min_dead_capacity = cache->m_minDeadCapacity; result->max_dead_capacity = cache->m_maxDeadCapacity; diff --git a/webkit/glue/context_menu_client_impl.cc b/webkit/glue/context_menu_client_impl.cc index 79ee0a4..64222c2 100644 --- a/webkit/glue/context_menu_client_impl.cc +++ b/webkit/glue/context_menu_client_impl.cc @@ -46,16 +46,16 @@ bool IsASingleWord(const std::wstring& text) { return false; } } - + // Check for 0 words. if (!word_count) return false; - + // Has a single word. return true; } -// Helper function to get misspelled word on which context menu +// Helper function to get misspelled word on which context menu // is to be evolked. This function also sets the word on which context menu // has been evoked to be the selected word, as required. std::wstring GetMisspelledWord(const WebCore::ContextMenu* default_menu, @@ -68,7 +68,7 @@ std::wstring GetMisspelledWord(const WebCore::ContextMenu* default_menu, false); // Don't provide suggestions for multiple words. - if (!misspelled_word_string.empty() && + if (!misspelled_word_string.empty() && !IsASingleWord(misspelled_word_string)) return L""; @@ -83,16 +83,16 @@ std::wstring GetMisspelledWord(const WebCore::ContextMenu* default_menu, selection = WebCore::VisibleSelection(pos); selection.expandUsingGranularity(WebCore::WordGranularity); } - - if (selection.isRange()) { + + if (selection.isRange()) { selected_frame->setSelectionGranularity(WebCore::WordGranularity); } - + if (selected_frame->shouldChangeSelection(selection)) selected_frame->selection()->setSelection(selection); - + misspelled_word_string = CollapseWhitespace( - webkit_glue::StringToStdWString(selected_frame->selectedText()), + webkit_glue::StringToStdWString(selected_frame->selectedText()), false); // If misspelled word is empty, then that portion should not be selected. @@ -140,7 +140,7 @@ WebCore::PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( WebCore::ContextMenu* default_menu) { // Displaying the context menu in this function is a big hack as we don't - // have context, i.e. whether this is being invoked via a script or in + // have context, i.e. whether this is being invoked via a script or in // response to user input (Mouse event WM_RBUTTONDOWN, // Keyboard events KeyVK_APPS, Shift+F10). Check if this is being invoked // in response to the above input events before popping up the context menu. @@ -172,7 +172,7 @@ WebCore::PlatformMenuDescription GURL frame_url; GURL page_url; std::string security_info; - + std::wstring frame_encoding; // Send the frame and page URLs in any case. ContextNode frame_node = ContextNode(ContextNode::NONE); @@ -203,7 +203,7 @@ WebCore::PlatformMenuDescription selected_frame); } } - + if (node.type == ContextNode::NONE) { if (selected_frame != webview_->main_frame()->frame()) { node = frame_node; diff --git a/webkit/glue/context_menu_unittest.cc b/webkit/glue/context_menu_unittest.cc index 3508a05..7886a5a 100644 --- a/webkit/glue/context_menu_unittest.cc +++ b/webkit/glue/context_menu_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Tests for displaying context menus in corner cases (and swallowing context +// Tests for displaying context menus in corner cases (and swallowing context // menu events when appropriate) #include <vector> @@ -41,8 +41,8 @@ TEST_F(ContextMenuCapturing, ContextMenuCapturing) { std::wstring test_url = GetTestURL(iframes_data_dir_, L"testiframe.html"); test_shell_->LoadURL(test_url.c_str()); test_shell_->WaitTestFinished(); - - // Create a right click in the center of the iframe. (I'm hoping this will + + // Create a right click in the center of the iframe. (I'm hoping this will // make this a bit more robust in case of some other formatting or other bug.) WebMouseEvent mouse_event; mouse_event.type = WebInputEvent::MOUSE_DOWN; @@ -59,7 +59,7 @@ TEST_F(ContextMenuCapturing, ContextMenuCapturing) { webview->HandleInputEvent(&mouse_event); // Now simulate the corresponding up event which should display the menu - mouse_event.type = WebInputEvent::MOUSE_UP; + mouse_event.type = WebInputEvent::MOUSE_UP; webview->HandleInputEvent(&mouse_event); EXPECT_EQ(1U, test_delegate->captured_context_menu_events().size()); diff --git a/webkit/glue/cpp_binding_example.cc b/webkit/glue/cpp_binding_example.cc index 551e404..a469788 100644 --- a/webkit/glue/cpp_binding_example.cc +++ b/webkit/glue/cpp_binding_example.cc @@ -20,7 +20,7 @@ CppBindingExample::CppBindingExample() { BindMethod("echoValue", &CppBindingExample::echoValue); BindMethod("echoType", &CppBindingExample::echoType); BindMethod("plus", &CppBindingExample::plus); - + // The fallback method is called when a nonexistent method is called on an // object. If none is specified, calling a nonexistent method causes an // exception to be thrown and the JavaScript execution is stopped. @@ -39,12 +39,12 @@ void CppBindingExample::echoValue(const CppArgumentList& args, result->Set(args[0]); } -void CppBindingExample::echoType(const CppArgumentList& args, - CppVariant* result) { +void CppBindingExample::echoType(const CppArgumentList& args, + CppVariant* result) { if (args.size() < 1) { result->SetNull(); return; - } + } // Note that if args[0] is a string, the following assignment implicitly // makes a copy of that string, which may have an undesirable impact on // performance. @@ -59,7 +59,7 @@ void CppBindingExample::echoType(const CppArgumentList& args, result->Set("Success!"); } -void CppBindingExample::plus(const CppArgumentList& args, +void CppBindingExample::plus(const CppArgumentList& args, CppVariant* result) { if (args.size() < 2) { result->SetNull(); diff --git a/webkit/glue/cpp_binding_example.h b/webkit/glue/cpp_binding_example.h index a4f763b..c6ec610 100644 --- a/webkit/glue/cpp_binding_example.h +++ b/webkit/glue/cpp_binding_example.h @@ -3,12 +3,12 @@ // found in the LICENSE file. /* - CppBindingExample class: + CppBindingExample class: This provides an example of how to use the CppBoundClass to create methods and properties that can be exposed to JavaScript by an appropriately built embedding client. It is also used by the CppBoundClass unit test. - Typically, a class intended to be bound to JavaScript will define a + Typically, a class intended to be bound to JavaScript will define a constructor, any methods and properties to be exposed, and optionally a destructor. An embedding client can then bind the class to a JavaScript object in a frame's window using the CppBoundClass::BindToJavascript() method, diff --git a/webkit/glue/cpp_bound_class_unittest.cc b/webkit/glue/cpp_bound_class_unittest.cc index 1f412cc..2579d0f 100644 --- a/webkit/glue/cpp_bound_class_unittest.cc +++ b/webkit/glue/cpp_bound_class_unittest.cc @@ -63,8 +63,8 @@ class ExampleTestShell : public TestShell { // We use the layoutTestController binding for notifyDone. TestShell::BindJSObjectsToWindow(frame); } - - // This is a public interface to TestShell's protected method, so it + + // This is a public interface to TestShell's protected method, so it // can be called by our CreateEmptyWindow. bool PublicInitialize(const std::wstring& startingURL) { return Initialize(startingURL); @@ -111,7 +111,7 @@ class CppBoundClassTest : public TestShellTest { ExecuteJavaScript(javascript); EXPECT_EQ(L"SUCCESS", webkit_glue::DumpDocumentText(webframe_)); } - + // Executes the specified JavaScript and checks that the resulting document // text is empty. void CheckJavaScriptFailure(const std::string& javascript) { @@ -132,8 +132,8 @@ class CppBoundClassTest : public TestShellTest { "if (leftval == rightval) {" + " document.writeln('SUCCESS');" + "} else {" + - " document.writeln(\"" + - left + " [\" + leftval + \"] != " + + " document.writeln(\"" + + left + " [\" + leftval + \"] != " + right + " [\" + rightval + \"]\");" + "}"; } @@ -246,9 +246,9 @@ TEST_F(CppBoundClassTest, InvokeMethods) { CheckJavaScriptSuccess(js); } -// Tests that invoking a nonexistent method with no fallback method stops the +// Tests that invoking a nonexistent method with no fallback method stops the // script's execution -TEST_F(CppBoundClassTest, +TEST_F(CppBoundClassTest, InvokeNonexistentMethodNoFallback) { std::string js = "example.nonExistentMethod();document.writeln('SUCCESS');"; CheckJavaScriptFailure(js); @@ -256,7 +256,7 @@ TEST_F(CppBoundClassTest, // Ensures existent methods can be invoked successfully when the fallback method // is used -TEST_F(CppBoundClassWithFallbackMethodTest, +TEST_F(CppBoundClassWithFallbackMethodTest, InvokeExistentMethodsWithFallback) { std::string js = BuildJSCondition("example.echoValue(34)", "34"); CheckJavaScriptSuccess(js); diff --git a/webkit/glue/cpp_variant.cc b/webkit/glue/cpp_variant.cc index 076998f..c0827c6 100644 --- a/webkit/glue/cpp_variant.cc +++ b/webkit/glue/cpp_variant.cc @@ -129,7 +129,7 @@ void CppVariant::Set(const NPVariant& new_value) { } } -void CppVariant::SetNull() { +void CppVariant::SetNull() { FreeData(); type = NPVariantType_Null; } @@ -250,7 +250,7 @@ std::vector<std::wstring> CppVariant::ToStringVector() const { return wstring_vector; } -bool CppVariant::Invoke(const std::string& method, const CppVariant* args, +bool CppVariant::Invoke(const std::string& method, const CppVariant* args, uint32 arg_count, CppVariant& result) const { DCHECK(isObject()); NPIdentifier method_name = NPN_GetStringIdentifier(method.c_str()); diff --git a/webkit/glue/cpp_variant.h b/webkit/glue/cpp_variant.h index f8a4c2e..2cf9e8f 100644 --- a/webkit/glue/cpp_variant.h +++ b/webkit/glue/cpp_variant.h @@ -99,11 +99,11 @@ class CppVariant : public NPVariant { std::vector<std::wstring> ToStringVector() const; // Invoke method of the given name on an object with the supplied arguments. - // The first argument should be the object on which the method is to be + // The first argument should be the object on which the method is to be // invoked. Returns whether the method was successfully invoked. If the - // method was invoked successfully, any return value is stored in the + // method was invoked successfully, any return value is stored in the // CppVariant specified by result. - bool Invoke(const std::string& method, const CppVariant* args, + bool Invoke(const std::string& method, const CppVariant* args, uint32 arg_count, CppVariant& result) const; }; diff --git a/webkit/glue/cpp_variant_unittest.cc b/webkit/glue/cpp_variant_unittest.cc index 8933b85..f80651d 100644 --- a/webkit/glue/cpp_variant_unittest.cc +++ b/webkit/glue/cpp_variant_unittest.cc @@ -75,9 +75,9 @@ void MockNPDeallocate(NPObject* npobj) { free(npobj); } -static NPClass void_class = { NP_CLASS_STRUCT_VERSION, - MockNPAllocate, - MockNPDeallocate, +static NPClass void_class = { NP_CLASS_STRUCT_VERSION, + MockNPAllocate, + MockNPDeallocate, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; NPObject* MakeVoidObject() { @@ -118,7 +118,7 @@ TEST(CppVariantTest, CopyConstructorIncrementsRefCount) { source.Set(object); // 2 references so far. EXPECT_EQ(2U, source.value.objectValue->referenceCount); - + CppVariant dest = source; EXPECT_EQ(3U, dest.value.objectValue->referenceCount); EXPECT_EQ(1, g_allocate_call_count); @@ -153,7 +153,7 @@ TEST(CppVariantTest, AssignmentIncrementsRefCount) { dest = source; EXPECT_EQ(3U, dest.value.objectValue->referenceCount); EXPECT_EQ(1, g_allocate_call_count); - + NPN_ReleaseObject(object); source.SetNull(); CheckObject(dest); @@ -188,7 +188,7 @@ TEST(CppVariantTest, CopiesTypeAndValueToNPVariant) { EXPECT_EQ(cpp.value.boolValue, np.value.boolValue); NPN_ReleaseVariantValue(&np); - cpp.Set(17); + cpp.Set(17); cpp.CopyToNPVariant(&np); EXPECT_EQ(cpp.type, np.type); EXPECT_EQ(cpp.value.intValue, np.value.intValue); diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc index e77e375..4773812 100644 --- a/webkit/glue/dom_operations.cc +++ b/webkit/glue/dom_operations.cc @@ -283,8 +283,8 @@ bool FillFormToUploadFile(WebView* view, const FileUploadData& data) { // Internal implementation of FillForm API. static bool FillFormImpl(FormElements* fe, const FormData& data, bool submit) { if (!fe->form_element->autoComplete()) - return false; - + return false; + FormValueMap data_map; for (unsigned int i = 0; i < data.elements.size(); i++) { data_map[data.elements[i]] = data.values[i]; @@ -327,10 +327,10 @@ static bool FindFormInputElements(WebCore::HTMLFormElement* fe, FormElements* result) { Vector<RefPtr<WebCore::Node> > temp_elements; // Loop through the list of elements we need to find on the form in - // order to autofill it. If we don't find any one of them, abort + // order to autofill it. If we don't find any one of them, abort // processing this form; it can't be the right one. for (size_t j = 0; j < data.elements.size(); j++, temp_elements.clear()) { - fe->getNamedElements(StdWStringToString(data.elements[j]), + fe->getNamedElements(StdWStringToString(data.elements[j]), temp_elements); if (temp_elements.isEmpty()) { // We didn't find a required element. This is not the right form. @@ -370,7 +370,7 @@ static void FindFormElements(WebView* view, // Loop through each frame. for (WebCore::Frame* f = frame; f; f = f->tree()->traverseNext()) { WebCore::Document* doc = f->document(); - if (!doc->isHTMLDocument()) + if (!doc->isHTMLDocument()) continue; GURL full_origin(StringToStdString(doc->documentURI())); @@ -380,9 +380,9 @@ static void FindFormElements(WebView* view, WebCore::FrameLoader* loader = f->loader(); if (loader == NULL) continue; - + PassRefPtr<WebCore::HTMLCollection> forms = doc->forms(); - for (size_t i = 0; i < forms->length(); ++i) { + for (size_t i = 0; i < forms->length(); ++i) { WebCore::HTMLFormElement* fe = static_cast<WebCore::HTMLFormElement*>(forms->item(i)); @@ -409,7 +409,7 @@ bool FillForm(WebView* view, const FormData& data) { bool success = false; if (!forms.empty()) success = FillFormImpl(forms[0], data, false); - + // TODO(timsteele): Move STLDeleteElements to base/ and have FormElementsList // use that. FormElementsList::iterator iter; @@ -422,7 +422,7 @@ void FillPasswordForm(WebView* view, const PasswordFormDomManager::FillData& data) { FormElementsList forms; // We own the FormElements* in forms. - FindFormElements(view, data.basic_data, &forms); + FindFormElements(view, data.basic_data, &forms); FormElementsList::iterator iter; for (iter = forms.begin(); iter != forms.end(); ++iter) { // TODO(timsteele): Move STLDeleteElements to base/ and have diff --git a/webkit/glue/dom_serializer.cc b/webkit/glue/dom_serializer.cc index 8aa2310..c535e73 100644 --- a/webkit/glue/dom_serializer.cc +++ b/webkit/glue/dom_serializer.cc @@ -19,7 +19,7 @@ // Problem: // This way can not handle the following situation: // the base tag is written by JavaScript. -// For example. The page "www.yahoo.com" use +// For example. The page "www.yahoo.com" use // "document.write('<base href="http://www.yahoo.com/"...');" to setup base URL // of page when loading page. So when saving page as completed-HTML, we assume // that we save "www.yahoo.com" to "c:\yahoo.htm". After then we load the saved diff --git a/webkit/glue/dragclient_impl.cc b/webkit/glue/dragclient_impl.cc index d9b7896..c3e7865 100644 --- a/webkit/glue/dragclient_impl.cc +++ b/webkit/glue/dragclient_impl.cc @@ -42,7 +42,7 @@ void DragClientImpl::willPerformDragSourceAction( WebCore::DragDestinationAction DragClientImpl::actionMaskForDrag( WebCore::DragData*) { - return WebCore::DragDestinationActionAny; + return WebCore::DragDestinationActionAny; } WebCore::DragSourceAction DragClientImpl::dragSourceActionMaskForPoint( diff --git a/webkit/glue/dragclient_impl.h b/webkit/glue/dragclient_impl.h index 8673301..151a261 100644 --- a/webkit/glue/dragclient_impl.h +++ b/webkit/glue/dragclient_impl.h @@ -35,7 +35,7 @@ public: virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*); virtual WebCore::DragSourceAction dragSourceActionMaskForPoint( const WebCore::IntPoint& window_point); - + virtual void startDrag(WebCore::DragImageRef drag_image, const WebCore::IntPoint& drag_image_origin, const WebCore::IntPoint& event_pos, @@ -43,8 +43,8 @@ public: WebCore::Frame* frame, bool is_link_drag = false); virtual WebCore::DragImageRef createDragImageForLink( - WebCore::KURL&, const WebCore::String& label, WebCore::Frame*); - + WebCore::KURL&, const WebCore::String& label, WebCore::Frame*); + virtual void dragControllerDestroyed(); private: diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc index 7e60c4e..3c25b5a 100644 --- a/webkit/glue/editor_client_impl.cc +++ b/webkit/glue/editor_client_impl.cc @@ -145,7 +145,7 @@ bool EditorClientImpl::isContinuousSpellCheckingEnabled() { return false; else if (spell_check_this_field_status_ == SPELLCHECK_FORCED_ON) return true; - else + else return ShouldSpellcheckByDefault(); } @@ -213,9 +213,9 @@ bool EditorClientImpl::shouldInsertText(const WebCore::String& text, WebViewDelegate* d = web_view_->delegate(); if (d) { std::wstring wstr = webkit_glue::StringToStdWString(text); - return d->ShouldInsertText(web_view_, - wstr, - Describe(range), + return d->ShouldInsertText(web_view_, + wstr, + Describe(range), Describe(action)); } } @@ -232,23 +232,23 @@ bool EditorClientImpl::shouldDeleteRange(WebCore::Range* range) { return true; } -bool EditorClientImpl::shouldChangeSelectedRange(WebCore::Range* from_range, - WebCore::Range* to_range, - WebCore::EAffinity affinity, +bool EditorClientImpl::shouldChangeSelectedRange(WebCore::Range* from_range, + WebCore::Range* to_range, + WebCore::EAffinity affinity, bool still_selecting) { if (use_editor_delegate_) { WebViewDelegate* d = web_view_->delegate(); if (d) { - return d->ShouldChangeSelectedRange(web_view_, - Describe(from_range), - Describe(to_range), - Describe(affinity), + return d->ShouldChangeSelectedRange(web_view_, + Describe(from_range), + Describe(to_range), + Describe(affinity), still_selecting); } } return true; } - + bool EditorClientImpl::shouldApplyStyle(WebCore::CSSStyleDeclaration* style, WebCore::Range* range) { if (use_editor_delegate_) { @@ -381,7 +381,7 @@ void EditorClientImpl::redo() { * 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. */ static const unsigned CtrlKey = 1 << 0; @@ -414,7 +414,7 @@ static const KeyDownEntry keyDownEntries[] = { { WebCore::VKEY_LEFT, ShiftKey, "MoveLeftAndModifySelection" }, #if defined(OS_MACOSX) { WebCore::VKEY_LEFT, OptionKey, "MoveWordLeft" }, - { WebCore::VKEY_LEFT, OptionKey | ShiftKey, + { WebCore::VKEY_LEFT, OptionKey | ShiftKey, "MoveWordLeftAndModifySelection" }, #else { WebCore::VKEY_LEFT, CtrlKey, "MoveWordLeft" }, @@ -450,7 +450,7 @@ static const KeyDownEntry keyDownEntries[] = { #if defined(OS_MACOSX) { WebCore::VKEY_UP, CommandKey, "MoveToBeginningOfDocument" }, { WebCore::VKEY_UP, CommandKey | ShiftKey, - "MoveToBeginningOfDocumentAndModifySelection" }, + "MoveToBeginningOfDocumentAndModifySelection" }, #else { WebCore::VKEY_HOME, CtrlKey, "MoveToBeginningOfDocument" }, { WebCore::VKEY_HOME, CtrlKey | ShiftKey, @@ -552,7 +552,7 @@ const char* EditorClientImpl::interpretKeyEvent( for (unsigned i = 0; i < arraysize(keyPressEntries); i++) { keyPressCommandsMap->set( - keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, + keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name); } } @@ -780,7 +780,7 @@ void EditorClientImpl::checkSpellingOfString(const UChar* str, int length, int spell_length = 0; WebViewDelegate* d = web_view_->delegate(); if (isContinuousSpellCheckingEnabled() && d) { - std::wstring word = + std::wstring word = webkit_glue::StringToStdWString(WebCore::String(str, length)); d->SpellCheck(word, spell_location, spell_length); } else { @@ -837,7 +837,7 @@ void EditorClientImpl::setInputMethodState(bool enabled) { } -std::wstring EditorClientImpl::DescribeOrError(int number, +std::wstring EditorClientImpl::DescribeOrError(int number, WebCore::ExceptionCode ec) { if (ec) return L"ERROR"; @@ -845,7 +845,7 @@ std::wstring EditorClientImpl::DescribeOrError(int number, return IntToWString(number); } -std::wstring EditorClientImpl::DescribeOrError(WebCore::Node* node, +std::wstring EditorClientImpl::DescribeOrError(WebCore::Node* node, WebCore::ExceptionCode ec) { if (ec) return L"ERROR"; diff --git a/webkit/glue/editor_client_impl.h b/webkit/glue/editor_client_impl.h index daef0fb..be75830 100644 --- a/webkit/glue/editor_client_impl.h +++ b/webkit/glue/editor_client_impl.h @@ -50,9 +50,9 @@ class EditorClientImpl : public WebCore::EditorClient { virtual bool shouldInsertText(const WebCore::String& text, WebCore::Range* range, WebCore::EditorInsertAction action); virtual bool shouldDeleteRange(WebCore::Range* range); - virtual bool shouldChangeSelectedRange(WebCore::Range* fromRange, - WebCore::Range* toRange, - WebCore::EAffinity affinity, + virtual bool shouldChangeSelectedRange(WebCore::Range* fromRange, + WebCore::Range* toRange, + WebCore::EAffinity affinity, bool stillSelecting); virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration* style, WebCore::Range* range); @@ -109,9 +109,9 @@ class EditorClientImpl : public WebCore::EditorClient { // It would be better to add these methods to the objects they describe, but // those are in WebCore and therefore inaccessible. - virtual std::wstring DescribeOrError(int number, + virtual std::wstring DescribeOrError(int number, WebCore::ExceptionCode ec); - virtual std::wstring DescribeOrError(WebCore::Node* node, + virtual std::wstring DescribeOrError(WebCore::Node* node, WebCore::ExceptionCode ec); virtual std::wstring Describe(WebCore::Range* range); virtual std::wstring Describe(WebCore::Node* node); @@ -157,14 +157,14 @@ class EditorClientImpl : public WebCore::EditorClient { // whether or not it is a <textarea> element or an element whose // contenteditable attribute is true. // TODO(hbono): Bug 740540: This code just implements the default behavior - // proposed in this issue. We should also retrieve "spellcheck" attributes + // proposed in this issue. We should also retrieve "spellcheck" attributes // for text fields and create a flag to over-write the default behavior. bool ShouldSpellcheckByDefault(); // Whether the last entered key was a backspace. bool backspace_pressed_; - // This flag is set to false if spell check for this editor is manually + // This flag is set to false if spell check for this editor is manually // turned off. The default setting is SPELLCHECK_AUTOMATIC. enum { SPELLCHECK_AUTOMATIC, diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc index 548bfa5..21259ff 100644 --- a/webkit/glue/event_conversion.cc +++ b/webkit/glue/event_conversion.cc @@ -189,7 +189,7 @@ void MakePlatformKeyboardEvent::SetKeyType(Type type) { // Please refer to bug http://b/issue?id=961192, which talks about Webkit // keyboard event handling changes. It also mentions the list of keys -// which don't have associated character events. +// which don't have associated character events. bool MakePlatformKeyboardEvent::IsCharacterKey() const { switch (windowsVirtualKeyCode()) { case VKEY_BACK: diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc index ba2d9a9..ceac8ef 100644 --- a/webkit/glue/glue_serialize.cc +++ b/webkit/glue/glue_serialize.cc @@ -158,7 +158,7 @@ inline String ReadString(const SerializeObject* obj) { // In version 2, the length field was the length in UChars. // In version 1 and 3 it is the length in bytes. int bytes = ((obj->version == 2) ? length * sizeof(UChar) : length); - + const void* data; if (!ReadBytes(obj, &data, bytes)) return String(); diff --git a/webkit/glue/localized_strings.cc b/webkit/glue/localized_strings.cc index 9a508b7..2df1b8c 100644 --- a/webkit/glue/localized_strings.cc +++ b/webkit/glue/localized_strings.cc @@ -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/webkit/glue/media_player_private_impl.cc b/webkit/glue/media_player_private_impl.cc index 5435ebb..19dc2da 100644 --- a/webkit/glue/media_player_private_impl.cc +++ b/webkit/glue/media_player_private_impl.cc @@ -34,8 +34,8 @@ static inline webkit_glue::WebMediaPlayerDelegate* AsDelegate(void* data) { } // We can't create the delegate here because m_player->frameView is null at -// this moment. Although we can static_cast the MediaPlayerClient to -// HTMLElement and get the frame from there, but creating the delegate from +// this moment. Although we can static_cast the MediaPlayerClient to +// HTMLElement and get the frame from there, but creating the delegate from // load() seems to be a better idea. MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player) : m_player(player), @@ -57,7 +57,7 @@ void MediaPlayerPrivate::load(const String& url) { delete AsDelegate(m_data); m_data = NULL; - webkit_glue::WebMediaPlayer* media_player = + webkit_glue::WebMediaPlayer* media_player = new webkit_glue::WebMediaPlayerImpl(this); WebViewDelegate* d = media_player->GetWebFrame()->GetView()->GetDelegate(); @@ -158,7 +158,7 @@ float MediaPlayerPrivate::currentTime() const { } void MediaPlayerPrivate::seek(float time) { - if (m_data) { + if (m_data) { AsDelegate(m_data)->Seek(time); } } @@ -202,7 +202,7 @@ MediaPlayer::NetworkState MediaPlayerPrivate::networkState() const { return MediaPlayer::LoadFailed; case webkit_glue::WebMediaPlayer::LOADED_META_DATA: return MediaPlayer::LoadedMetaData; - case webkit_glue::WebMediaPlayer::LOADED_FIRST_FRAME: + case webkit_glue::WebMediaPlayer::LOADED_FIRST_FRAME: return MediaPlayer::LoadedFirstFrame; default: return MediaPlayer::Empty; diff --git a/webkit/glue/multipart_response_delegate.cc b/webkit/glue/multipart_response_delegate.cc index 58e8152..9e8e67d 100644 --- a/webkit/glue/multipart_response_delegate.cc +++ b/webkit/glue/multipart_response_delegate.cc @@ -42,7 +42,7 @@ MultipartResponseDelegate::MultipartResponseDelegate( } void MultipartResponseDelegate::OnReceivedData(const char* data, int data_len) { - // stop_sending_ means that we've already received the final boundary token. + // stop_sending_ means that we've already received the final boundary token. // The server should stop sending us data at this point, but if it does, we // just throw it away. if (stop_sending_) @@ -63,7 +63,7 @@ void MultipartResponseDelegate::OnReceivedData(const char* data, int data_len) { int pos = PushOverLine(data_, 0); if (pos) data_ = data_.substr(pos); - + if (data_.length() < boundary_.length() + 2) { // We don't have enough data yet to make a boundary token. Just wait // until the next chunk of data arrives. @@ -216,7 +216,7 @@ bool MultipartResponseDelegate::ParseHeaders() { } // Send the response! client_->didReceiveResponse(job_, response); - + return true; } @@ -256,11 +256,11 @@ bool MultipartResponseDelegate::ReadMultipartBoundary( content_type_as_string.find(';', boundary_start_offset); if (boundary_end_offset == std::string::npos) - boundary_end_offset = content_type_as_string.length(); + boundary_end_offset = content_type_as_string.length(); size_t boundary_length = boundary_end_offset - boundary_start_offset; - *multipart_boundary = + *multipart_boundary = content_type_as_string.substr(boundary_start_offset, boundary_length); // The byte range response can have quoted boundary strings. This is legal // as per MIME specifications. Individual data fragements however don't @@ -274,7 +274,7 @@ bool MultipartResponseDelegate::ReadContentRanges( int* content_range_lower_bound, int* content_range_upper_bound) { - std::string content_range = + std::string content_range = webkit_glue::StringToStdString( response.httpHeaderField("Content-Range")); @@ -293,7 +293,7 @@ bool MultipartResponseDelegate::ReadContentRanges( return false; } - size_t byte_range_lower_bound_characters = + size_t byte_range_lower_bound_characters = byte_range_lower_bound_end_offset - byte_range_lower_bound_start_offset; std::string byte_range_lower_bound = content_range.substr(byte_range_lower_bound_start_offset, diff --git a/webkit/glue/multipart_response_delegate_unittest.cc b/webkit/glue/multipart_response_delegate_unittest.cc index c70f55a..6a02c75 100644 --- a/webkit/glue/multipart_response_delegate_unittest.cc +++ b/webkit/glue/multipart_response_delegate_unittest.cc @@ -44,7 +44,7 @@ class MockResourceHandleClient : public ResourceHandleClient { ++received_data_; data_.append(data, data_length); } - + void Reset() { received_response_ = received_data_ = 0; data_.clear(); @@ -139,7 +139,7 @@ TEST(MultipartResponseTest, Functions) { EXPECT_EQ(webkit_glue::StringToStdWString( client.resource_response_.httpHeaderField(String("foo"))), wstring(L"Bar")); - + // FindBoundary tests struct { const char* boundary; @@ -276,7 +276,7 @@ void VariousChunkSizesTest(const TestChunk chunks[], int chunks_size, int respon String()); MockResourceHandleClient client; MultipartResponseDelegate delegate(&client, NULL, response, "bound"); - + for (int i = 0; i < chunks_size; ++i) { ASSERT(chunks[i].start_pos < chunks[i].end_pos); string chunk = data.substr(chunks[i].start_pos, @@ -373,7 +373,7 @@ TEST(MultipartResponseTest, BreakInData) { }; VariousChunkSizesTest(data2, arraysize(data2), 2, 2, "foofoofoofoofoo"); - + // Incomplete send const TestChunk data3[] = { { 0, 35, 1, 0, "" }, @@ -389,7 +389,7 @@ TEST(MultipartResponseTest, MultipleBoundaries) { String()); MockResourceHandleClient client; MultipartResponseDelegate delegate(&client, NULL, response, "bound"); - + string data("--bound\r\n\r\n--bound\r\n\r\nfoofoo--bound--"); delegate.OnReceivedData(data.c_str(), static_cast<int>(data.length())); EXPECT_EQ(2, @@ -488,7 +488,7 @@ TEST(MultipartResponseTest, MultipartContentRangesTest) { response1.setHTTPHeaderField( String("Content-Range"), String("bytes 1000-1050/5000")); - + int content_range_lower_bound = 0; int content_range_upper_bound = 0; @@ -506,7 +506,7 @@ TEST(MultipartResponseTest, MultipartContentRangesTest) { response2.setHTTPHeaderField( String("Content-Range"), String("bytes 1000/1050")); - + content_range_lower_bound = 0; content_range_upper_bound = 0; diff --git a/webkit/glue/password_autocomplete_listener.cc b/webkit/glue/password_autocomplete_listener.cc index 2a96ae4..3c5351a 100644 --- a/webkit/glue/password_autocomplete_listener.cc +++ b/webkit/glue/password_autocomplete_listener.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// This file provides the implementaiton of the password manager's autocomplete +// This file provides the implementaiton of the password manager's autocomplete // component. #include "webkit/glue/password_autocomplete_listener.h" diff --git a/webkit/glue/password_autocomplete_listener_unittest.cc b/webkit/glue/password_autocomplete_listener_unittest.cc index 8e58c11..ef5a4b1 100644 --- a/webkit/glue/password_autocomplete_listener_unittest.cc +++ b/webkit/glue/password_autocomplete_listener_unittest.cc @@ -204,7 +204,7 @@ TEST_F(PasswordManagerAutocompleteTests, OnInlineAutocompleteNeeded) { TEST_F(PasswordManagerAutocompleteTests, TestWaitUsername) { TestHTMLInputDelegate* username_delegate = new TestHTMLInputDelegate(); TestHTMLInputDelegate* password_delegate = new TestHTMLInputDelegate(); - + // If we had an action authority mismatch (for example), we don't want to // automatically autofill anything without some user interaction first. // We require an explicit blur on the username field, and that a valid @@ -228,14 +228,14 @@ TEST_F(PasswordManagerAutocompleteTests, TestWaitUsername) { listener->OnInlineAutocompleteNeeded(NULL, L"alice"); EXPECT_EQ(empty, username_delegate->value()); EXPECT_EQ(empty, password_delegate->value()); - + listener->OnBlur(NULL, L"a"); EXPECT_EQ(empty, username_delegate->value()); EXPECT_EQ(empty, password_delegate->value()); listener->OnBlur(NULL, L"ali"); EXPECT_EQ(empty, username_delegate->value()); EXPECT_EQ(empty, password_delegate->value()); - + // Blur with 'alice' should allow password autofill. listener->OnBlur(NULL, L"alice"); EXPECT_EQ(empty, username_delegate->value()); diff --git a/webkit/glue/password_form.h b/webkit/glue/password_form.h index aa577e3..4629189 100644 --- a/webkit/glue/password_form.h +++ b/webkit/glue/password_form.h @@ -53,7 +53,7 @@ struct PasswordForm { // The URL (minus query parameters) containing the form. This is the primary // data used by the PasswordManager to decide (in longest matching prefix // fashion) whether or not a given PasswordForm result from the database is a - // good fit for a particular form on a page, so it must not be empty. + // good fit for a particular form on a page, so it must not be empty. GURL origin; // The action target of the form. This is the primary data used by the @@ -76,7 +76,7 @@ struct PasswordForm { std::wstring submit_element; // The name of the username input element. Optional (improves scoring). - // + // // When parsing an HTML form, this must always be set. std::wstring username_element; @@ -133,9 +133,9 @@ struct PasswordForm { bool blacklisted_by_user; PasswordForm() - : scheme(SCHEME_HTML), - ssl_valid(false), - preferred(false), + : scheme(SCHEME_HTML), + ssl_valid(false), + preferred(false), blacklisted_by_user(false) { } }; diff --git a/webkit/glue/password_form_dom_manager.cc b/webkit/glue/password_form_dom_manager.cc index 4a372e8..c680c41 100644 --- a/webkit/glue/password_form_dom_manager.cc +++ b/webkit/glue/password_form_dom_manager.cc @@ -56,15 +56,15 @@ PasswordForm* PasswordFormDomManager::CreatePasswordForm( if (!LocateSpecificPasswords(&fields, &password, &old_password)) return NULL; - return AssemblePasswordFormResult(full_origin, full_action, + return AssemblePasswordFormResult(full_origin, full_action, fields.submit, fields.username, old_password, password); } // static void PasswordFormDomManager::InitFillData( - const PasswordForm& form_on_page, - const PasswordFormMap& matches, + const PasswordForm& form_on_page, + const PasswordFormMap& matches, const PasswordForm* const preferred_match, bool wait_for_username_before_autofill, PasswordFormDomManager::FillData* result) { @@ -82,7 +82,7 @@ void PasswordFormDomManager::InitFillData( // Copy additional username/value pairs. PasswordFormMap::const_iterator iter; for (iter = matches.begin(); iter != matches.end(); iter++) { - if (iter->second != preferred_match) + if (iter->second != preferred_match) result->additional_logins[iter->first] = iter->second->password_value; } } @@ -113,12 +113,12 @@ bool PasswordFormDomManager::LocateSpecificPasswords( fields->passwords[0]->value() == fields->passwords[2]->value()) { // All three passwords the same? Just treat as one and hope. *password = fields->passwords[0]; - } else if (fields->passwords[0]->value() == + } else if (fields->passwords[0]->value() == fields->passwords[1]->value()) { - // Two the same and one different -> old password is duplicated one. + // Two the same and one different -> old password is duplicated one. *old_password = fields->passwords[0]; *password = fields->passwords[2]; - } else if (fields->passwords[1]->value() == + } else if (fields->passwords[1]->value() == fields->passwords[2]->value()) { *old_password = fields->passwords[0]; *password = fields->passwords[1]; @@ -171,9 +171,9 @@ bool PasswordFormDomManager::LocateSpecificPasswords( * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. - * + * * ***** END LICENSE BLOCK ***** */ -// static +// static void PasswordFormDomManager::FindPasswordFormFields( WebCore::HTMLFormElement* form, PasswordFormFields* fields) { @@ -213,7 +213,7 @@ void PasswordFormDomManager::FindPasswordFormFields( WebCore::HTMLInputElement* input_element = static_cast<WebCore::HTMLInputElement*>(form_element); - if (!input_element->isEnabled()) + if (!input_element->isEnabled()) continue; if ((input_element->inputType() == WebCore::HTMLInputElement::TEXT) && @@ -227,7 +227,7 @@ void PasswordFormDomManager::FindPasswordFormFields( // static PasswordForm* PasswordFormDomManager::AssemblePasswordFormResult( - const GURL& full_origin, + const GURL& full_origin, const GURL& full_action, WebCore::HTMLFormControlElement* submit, WebCore::HTMLInputElement* username, @@ -246,7 +246,7 @@ PasswordForm* PasswordFormDomManager::AssemblePasswordFormResult( result->action = full_action.ReplaceComponents(rep); result->origin = full_origin.ReplaceComponents(rep); - // Naming is confusing here because we have both the HTML form origin URL + // Naming is confusing here because we have both the HTML form origin URL // the page where the form was seen), and the "origin" components of the url // (scheme, host, and port). result->signon_realm = full_origin.GetOrigin().spec(); @@ -254,22 +254,22 @@ PasswordForm* PasswordFormDomManager::AssemblePasswordFormResult( result->submit_element = submit == NULL ? empty : webkit_glue::StringToStdWString(submit->name()); result->username_element = - username == NULL ? empty + username == NULL ? empty : webkit_glue::StringToStdWString(username->name()); result->username_value = - username == NULL ? empty + username == NULL ? empty : webkit_glue::StringToStdWString(username->value()); result->password_element = - password == NULL ? empty + password == NULL ? empty : webkit_glue::StringToStdWString(password->name()); result->password_value = - password == NULL ? empty + password == NULL ? empty : webkit_glue::StringToStdWString(password->value()); result->old_password_element = - old_password == NULL ? empty + old_password == NULL ? empty : webkit_glue::StringToStdWString(old_password->name()); result->old_password_value = - old_password == NULL ? empty + old_password == NULL ? empty : webkit_glue::StringToStdWString(old_password->value()); return result; } diff --git a/webkit/glue/password_form_dom_manager.h b/webkit/glue/password_form_dom_manager.h index 6beb0ab..3591c19 100644 --- a/webkit/glue/password_form_dom_manager.h +++ b/webkit/glue/password_form_dom_manager.h @@ -20,7 +20,7 @@ class PasswordFormDomManager { public: typedef std::map<std::wstring, std::wstring> LoginCollection; - // Structure used for autofilling password forms. + // Structure used for autofilling password forms. // basic_data identifies the HTML form on the page and preferred username/ // password for login, while // additional_logins is a list of other matching user/pass pairs for the form. @@ -40,16 +40,16 @@ class PasswordFormDomManager { // Create a PasswordForm from DOM form. Webkit doesn't allow storing // custom metadata to DOM nodes, so we have to do this every time an event // happens with a given form and compare against previously Create'd forms - // to identify..which sucks. + // to identify..which sucks. static PasswordForm* CreatePasswordForm(WebCore::HTMLFormElement* form); - // Create a FillData structure in preparation for autofilling a form, + // Create a FillData structure in preparation for autofilling a form, // from basic_data identifying which form to fill, and a collection of // matching stored logins to use as username/password values. // preferred_match should equal (address) one of matches. // wait_for_username_before_autofill is true if we should not autofill // anything until the user typed in a valid username and blurred the field. - static void InitFillData(const PasswordForm& form_on_page, + static void InitFillData(const PasswordForm& form_on_page, const PasswordFormMap& matches, const PasswordForm* const preferred_match, bool wait_for_username_before_autofill, @@ -60,11 +60,11 @@ class PasswordFormDomManager { WebCore::HTMLInputElement* username; std::vector<WebCore::HTMLInputElement*> passwords; WebCore::HTMLFormControlElement* submit; - PasswordFormFields() : username(NULL), submit(NULL) { + PasswordFormFields() : username(NULL), submit(NULL) { } }; - - // Helper to CreatePasswordForm to do the locating of username/password + + // Helper to CreatePasswordForm to do the locating of username/password // fields. // This method based on Firefox2 code in // toolkit/components/passwordmgr/base/nsPasswordManager.cpp @@ -105,25 +105,25 @@ class PasswordFormDomManager { * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * - * ***** END LICENSE BLOCK ***** */ - static void FindPasswordFormFields(WebCore::HTMLFormElement* form, + * ***** END LICENSE BLOCK ***** */ + static void FindPasswordFormFields(WebCore::HTMLFormElement* form, PasswordFormFields* fields); // Helper to determine which password is the main one, and which is // an old password (e.g on a "make new password" form), if any. static bool LocateSpecificPasswords( - PasswordFormFields* fields, + PasswordFormFields* fields, WebCore::HTMLInputElement** password, WebCore::HTMLInputElement** old_password_index); // Helper to gather up the final form data and create a PasswordForm. static PasswordForm* AssemblePasswordFormResult( - const GURL& full_origin, + const GURL& full_origin, const GURL& full_action, WebCore::HTMLFormControlElement* submit, WebCore::HTMLInputElement* username, WebCore::HTMLInputElement* old_password, WebCore::HTMLInputElement* password); - + // This class can't be instantiated. DISALLOW_IMPLICIT_CONSTRUCTORS(PasswordFormDomManager); }; diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index 2cc2933..450e319 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -878,7 +878,7 @@ NPError NPN_SetValue(NPP id, NPPVariable variable, void *value) { // we only support the CoreGraphics drawing model if (reinterpret_cast<int>(value) == NPDrawingModelCoreGraphics) return NPERR_NO_ERROR; - return NPERR_GENERIC_ERROR; + return NPERR_GENERIC_ERROR; #endif default: // TODO: implement me diff --git a/webkit/glue/regular_expression_unittest.cc b/webkit/glue/regular_expression_unittest.cc index eaab8ce..e238636 100644 --- a/webkit/glue/regular_expression_unittest.cc +++ b/webkit/glue/regular_expression_unittest.cc @@ -64,7 +64,7 @@ TEST(RegexTest, Unicode) { wstr_pattern = L":[ \x2000]+:"; pattern = StdWStringToString(wstr_pattern); regex = RegularExpression(pattern, WebCore::TextCaseInsensitive); - + const Match matches[] = { { L": :", 0, 4 }, { L" : : ", 2, 6 }, @@ -83,7 +83,7 @@ TEST(RegexTest, Unicode) { wstr_pattern = L"|x"; pattern = StdWStringToString(wstr_pattern); regex = RegularExpression(pattern, WebCore::TextCaseInsensitive); - + const Match matches2[] = { { L"", 0, 0 }, }; diff --git a/webkit/glue/resource_fetcher.cc b/webkit/glue/resource_fetcher.cc index 89fc48a..074563d 100644 --- a/webkit/glue/resource_fetcher.cc +++ b/webkit/glue/resource_fetcher.cc @@ -93,11 +93,11 @@ void ResourceFetcher::didFinishLoading(ResourceHandle* resource_handle) { delegate_->OnURLFetchComplete(response_, data_); } -void ResourceFetcher::didFail(ResourceHandle* resource_handle, +void ResourceFetcher::didFail(ResourceHandle* resource_handle, const ResourceError& error) { ASSERT(!completed_); completed_ = true; - + // Go ahead and tell our delegate that we're done. Send an empty // ResourceResponse and string. if (delegate_) diff --git a/webkit/glue/resource_fetcher_unittest.cc b/webkit/glue/resource_fetcher_unittest.cc index 81d9646..c742cee 100644 --- a/webkit/glue/resource_fetcher_unittest.cc +++ b/webkit/glue/resource_fetcher_unittest.cc @@ -83,9 +83,9 @@ class FetcherDelegate : public ResourceFetcher::Delegate { // CFAbsoluteTime is in seconds and |interval| is in ms, so make sure we // keep the units correct. CFTimeInterval interval_in_seconds = static_cast<double>(interval) / 1000.0; - CFAbsoluteTime fire_date = + CFAbsoluteTime fire_date = CFAbsoluteTimeGetCurrent() + interval_in_seconds; - timer_id_ = CFRunLoopTimerCreate(NULL, fire_date, interval_in_seconds, 0, + timer_id_ = CFRunLoopTimerCreate(NULL, fire_date, interval_in_seconds, 0, 0, FetcherDelegate::TimerCallback, NULL); CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer_id_, kCFRunLoopCommonModes); #endif @@ -97,7 +97,7 @@ class FetcherDelegate : public ResourceFetcher::Delegate { #elif defined(OS_LINUX) g_source_remove(timer_id_); #elif defined(OS_MACOSX) - CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), timer_id_, + CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), timer_id_, kCFRunLoopCommonModes); CFRelease(timer_id_); #endif diff --git a/webkit/glue/searchable_form_data.cc b/webkit/glue/searchable_form_data.cc index bdc5abd..71453cf 100644 --- a/webkit/glue/searchable_form_data.cc +++ b/webkit/glue/searchable_form_data.cc @@ -47,7 +47,7 @@ static void appendString(Vector<char>& buffer, const char* string) buffer.append(string, strlen(string)); } -// TODO (sky): This comes straight out of HTMLFormElement, will work with +// TODO (sky): This comes straight out of HTMLFormElement, will work with // WebKit folks to make public. static void appendEncodedString(Vector<char>& buffer, const WebCore::CString& string) { @@ -76,28 +76,28 @@ static void appendEncodedString(Vector<char>& buffer, const WebCore::CString& st // Returns true if the form element has an 'onsubmit' attribute. bool FormHasOnSubmit(WebCore::HTMLFormElement* form) { - const WebCore::AtomicString& attribute_value = + const WebCore::AtomicString& attribute_value = form->getAttribute(WebCore::HTMLNames::onsubmitAttr); return (!attribute_value.isNull() && !attribute_value.isEmpty()); } // Returns true if the form element will submit the data using a GET. bool IsFormMethodGet(WebCore::HTMLFormElement* form) { - const WebCore::AtomicString& attribute_value = + const WebCore::AtomicString& attribute_value = form->getAttribute(WebCore::HTMLNames::methodAttr); return !equalIgnoringCase(attribute_value, "post"); } // Gets the encoding for the form. -void GetFormEncoding(WebCore::HTMLFormElement* form, +void GetFormEncoding(WebCore::HTMLFormElement* form, WebCore::TextEncoding* encoding) { - WebCore::String str = + WebCore::String str = form->getAttribute(WebCore::HTMLNames::accept_charsetAttr); str.replace(',', ' '); Vector<WebCore::String> charsets; str.split(' ', charsets); Vector<WebCore::String>::const_iterator end = charsets.end(); - for (Vector<WebCore::String>::const_iterator it = charsets.begin(); it != end; + for (Vector<WebCore::String>::const_iterator it = charsets.begin(); it != end; ++it) { *encoding = WebCore::TextEncoding(*it); if (encoding->isValid()) @@ -125,7 +125,7 @@ bool IsHTTPFormSubmit(WebCore::HTMLFormElement* form) { // button is returned. WebCore::HTMLFormControlElement* GetButtonToActivate( WebCore::HTMLFormElement* form) { - WTF::Vector<WebCore::HTMLFormControlElement*> form_elements = + WTF::Vector<WebCore::HTMLFormControlElement*> form_elements = form->formElements; WebCore::HTMLFormControlElement* first_submit_button = NULL; @@ -134,7 +134,7 @@ WebCore::HTMLFormControlElement* GetButtonToActivate( if (current->isActivatedSubmit()) { // There's a button that is already activated for submit, return NULL. return NULL; - } else if (first_submit_button == NULL && + } else if (first_submit_button == NULL && current->isSuccessfulSubmitButton()) { first_submit_button = current; } @@ -206,7 +206,7 @@ bool IsInDefaultState(WebCore::HTMLFormControlElement* form_element) { } // If form has only one text input element, it is returned. If a valid input -// element is not found, NULL is returned. Additionally, the form data for all +// element is not found, NULL is returned. Additionally, the form data for all // elements is added to enc_string and the encoding used is set in // encoding_name. WebCore::HTMLInputElement* GetTextElement( @@ -223,7 +223,7 @@ WebCore::HTMLInputElement* GetTextElement( } *encoding_name = encoding.name(); WebCore::HTMLInputElement* text_element = NULL; - WTF::Vector<WebCore::HTMLFormControlElement*> form_elements = + WTF::Vector<WebCore::HTMLFormControlElement*> form_elements = form->formElements; for (unsigned i = 0; i < form_elements.size(); ++i) { WebCore::HTMLFormControlElement* form_element = form_elements[i]; @@ -233,7 +233,7 @@ WebCore::HTMLInputElement* GetTextElement( return NULL; } if (form_element->hasTagName(WebCore::HTMLNames::inputTag)) { - WebCore::HTMLInputElement* input_element = + WebCore::HTMLInputElement* input_element = static_cast<WebCore::HTMLInputElement*>(form_element); switch (input_element->inputType()) { case WebCore::HTMLInputElement::TEXT: @@ -304,7 +304,7 @@ SearchableFormData* SearchableFormData::Create(WebCore::Element* element) { if (frame == NULL) return NULL; - WebCore::HTMLFormControlElement* input_element = + WebCore::HTMLFormControlElement* input_element = static_cast<WebCore::HTMLFormControlElement*>(element); WebCore::HTMLFormElement* form = input_element->form(); @@ -326,7 +326,7 @@ SearchableFormData* SearchableFormData::Create(WebCore::HTMLFormElement* form) { return NULL; Vector<char> enc_string; - WebCore::HTMLFormControlElement* first_submit_button = + WebCore::HTMLFormControlElement* first_submit_button = GetButtonToActivate(form); if (first_submit_button) { @@ -357,14 +357,14 @@ SearchableFormData* SearchableFormData::Create(WebCore::HTMLFormElement* form) { url.setQuery(form_data->flattenToString()); std::wstring current_value = webkit_glue::StringToStdWString( static_cast<WebCore::HTMLInputElement*>(text_element)->value()); - std::wstring text_name = + std::wstring text_name = webkit_glue::StringToStdWString(text_element->name()); GURL gurl(webkit_glue::KURLToGURL(url)); return new SearchableFormData(gurl, text_name, current_value, encoding); } -// static -bool SearchableFormData::Equals(const SearchableFormData* a, +// static +bool SearchableFormData::Equals(const SearchableFormData* a, const SearchableFormData* b) { return ((a == b) || (a != NULL && b != NULL && @@ -374,7 +374,7 @@ bool SearchableFormData::Equals(const SearchableFormData* a, a->encoding() == b->encoding())); } -SearchableFormData::SearchableFormData(const GURL& url, +SearchableFormData::SearchableFormData(const GURL& url, const std::wstring& element_name, const std::wstring& element_value, const std::string& encoding) diff --git a/webkit/glue/webcursor_mac.mm b/webkit/glue/webcursor_mac.mm index dfbe5df..90ff096 100644 --- a/webkit/glue/webcursor_mac.mm +++ b/webkit/glue/webcursor_mac.mm @@ -146,14 +146,14 @@ void WebCursor::SetCustomData(WebCore::Image* image) { WebCore::NativeImagePtr image_ptr = image->nativeImageForCurrentFrame(); if (!image_ptr) return; - + RetainPtr<CGColorSpace> cg_color(AdoptCF, CGColorSpaceCreateDeviceRGB()); - + size_t size = CGImageGetHeight(image_ptr)*CGImageGetWidth(image_ptr)*4; custom_data_.resize(size); custom_size_.set_width(CGImageGetWidth(image_ptr)); custom_size_.set_height(CGImageGetHeight(image_ptr)); - + // These settings match up with the code in CreateCustomCursor() above; keep // them in sync. // TODO(avi): test to ensure that the flags here are correct for RGBA diff --git a/webkit/glue/webcursor_win.cc b/webkit/glue/webcursor_win.cc index 2c6e275..5ed5d67 100644 --- a/webkit/glue/webcursor_win.cc +++ b/webkit/glue/webcursor_win.cc @@ -182,8 +182,8 @@ HCURSOR WebCursor::GetCursor(HINSTANCE module_handle){ custom_cursor_ = CreateIconIndirect(&ii); - DeleteObject(mask); - DeleteObject(bitmap_handle); + DeleteObject(mask); + DeleteObject(bitmap_handle); DeleteDC(workingDC); ReleaseDC(0, dc); return custom_cursor_; @@ -211,7 +211,7 @@ bool WebCursor::SerializePlatformData(Pickle* pickle) const { } bool WebCursor::DeserializePlatformData(const Pickle* pickle, void** iter) { - return pickle->ReadIntPtr(iter, + return pickle->ReadIntPtr(iter, reinterpret_cast<intptr_t*>(&external_cursor_)); } diff --git a/webkit/glue/webdatasource.h b/webkit/glue/webdatasource.h index 3f3eb0d..b90a079 100644 --- a/webkit/glue/webdatasource.h +++ b/webkit/glue/webdatasource.h @@ -54,7 +54,7 @@ class WebDataSource { // // @method unreachableURL - // @discussion This will be non-nil only for dataSources created by calls to the + // @discussion This will be non-nil only for dataSources created by calls to the // WebFrame method loadAlternateHTMLString:baseURL:forUnreachableURL:. // @result returns the unreachableURL for which this dataSource is showing alternate content, or nil // - (NSURL *)unreachableURL; @@ -90,12 +90,12 @@ class WebDataSource { /* These functions are not implemented yet, and we are not yet sure whether or not - we need them, so we have commented them out both here and in the + we need them, so we have commented them out both here and in the webdatasource_impl.cc file. // // @method data - // @discussion The data will be incomplete until the datasource has completely loaded. + // @discussion The data will be incomplete until the datasource has completely loaded. // @result Returns the raw data associated with the datasource. Returns nil // if the datasource hasn't loaded any data. // - (NSData *)data; @@ -120,7 +120,7 @@ class WebDataSource { // // @method textEncodingName - // @result Returns either the override encoding, as set on the WebView for this + // @result Returns either the override encoding, as set on the WebView for this // dataSource or the encoding from the response. // - (NSString *)textEncodingName; virtual void GetTextEncodingName(std::wstring* name) = 0; @@ -155,7 +155,7 @@ class WebDataSource { // @description The returned array only contains subresources that have fully downloaded. // - (NSArray *)subresources; virtual void GetSubresources(int* count, IWebResource*** resources); - + // // method subresourceForURL: // @abstract Returns a subresource for a given URL. diff --git a/webkit/glue/webdatasource_impl.cc b/webkit/glue/webdatasource_impl.cc index b8043b1..70ba01c 100644 --- a/webkit/glue/webdatasource_impl.cc +++ b/webkit/glue/webdatasource_impl.cc @@ -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/webkit/glue/webdatasource_impl.h b/webkit/glue/webdatasource_impl.h index d5daa22..0b364c4 100644 --- a/webkit/glue/webdatasource_impl.h +++ b/webkit/glue/webdatasource_impl.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 WEBKIT_GLUE_WEBDATASOURCE_IMPL_H_ @@ -56,7 +56,7 @@ class WebDataSourceImpl : public WebDataSource { virtual const std::vector<GURL>& GetRedirectChain() const; // WebDataSourceImpl - + // Called after creating a new data source if there is request info // available. Since we store copies of the WebRequests, the original // WebRequest that the embedder created was lost, and the exra data would diff --git a/webkit/glue/webdocumentloader_impl.cc b/webkit/glue/webdocumentloader_impl.cc index 3d89633..81c91be 100644 --- a/webkit/glue/webdocumentloader_impl.cc +++ b/webkit/glue/webdocumentloader_impl.cc @@ -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/webkit/glue/webdocumentloader_impl.h b/webkit/glue/webdocumentloader_impl.h index 8a739bf..8a5b320 100644 --- a/webkit/glue/webdocumentloader_impl.h +++ b/webkit/glue/webdocumentloader_impl.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 @@ -66,7 +66,7 @@ class WebDocumentLoaderImpl : public WebCore::DocumentLoader { // Returns the SearchableFormData for this DocumentLoader. // WebDocumentLoaderImpl owns the returned SearchableFormData. const SearchableFormData* searchable_form_data() const { - return searchable_form_data_.get(); + return searchable_form_data_.get(); } // Sets the PasswordFormData for this DocumentLoader. @@ -95,7 +95,7 @@ class WebDocumentLoaderImpl : public WebCore::DocumentLoader { scoped_ptr<WebDataSource> detached_datasource_; scoped_ptr<const SearchableFormData> searchable_form_data_; scoped_ptr<const PasswordForm> password_form_data_; - + bool lock_history_; bool form_submit_; diff --git a/webkit/glue/webdropdata.h b/webkit/glue/webdropdata.h index 7c9fe19..f74dcaf 100644 --- a/webkit/glue/webdropdata.h +++ b/webkit/glue/webdropdata.h @@ -37,7 +37,7 @@ struct WebDropData { // User is dragging plain text into the webview. std::wstring plain_text; - // User is dragging text/html into the webview (e.g., out of Firefox). + // User is dragging text/html into the webview (e.g., out of Firefox). // |html_base_url| is the URL that the html fragment is taken from (used to // resolve relative links). It's ok for |html_base_url| to be empty. std::wstring text_html; diff --git a/webkit/glue/weberror_impl.h b/webkit/glue/weberror_impl.h index 1ce453a..35e515c 100644 --- a/webkit/glue/weberror_impl.h +++ b/webkit/glue/weberror_impl.h @@ -22,7 +22,7 @@ class WebErrorImpl : public WebError { // WebError implementation: virtual int GetErrorCode() const; virtual const GURL& GetFailedURL() const; - + private: int error_code_; GURL failed_url_; diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc index f8acc50..2207fca 100644 --- a/webkit/glue/webframeloaderclient_impl.cc +++ b/webkit/glue/webframeloaderclient_impl.cc @@ -227,7 +227,7 @@ bool WebFrameLoaderClient::shouldUseCredentialStorage(DocumentLoader*, // This returns true for backward compatibility: the ability to override the // system credential store is new. (Actually, not yet fully implemented in // WebKit, as of this writing.) - return true; + return true; } void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge( diff --git a/webkit/glue/webframeloaderclient_impl.h b/webkit/glue/webframeloaderclient_impl.h index a84b937..2dbd805 100644 --- a/webkit/glue/webframeloaderclient_impl.h +++ b/webkit/glue/webframeloaderclient_impl.h @@ -39,7 +39,7 @@ class WebFrameLoaderClient : public WebCore::FrameLoaderClient { virtual void frameLoaderDestroyed(); - // Notifies the WebView delegate that the JS window object has been cleared, + // Notifies the WebView delegate that the JS window object has been cleared, // giving it a chance to bind native objects to the window before script // parsing begins. virtual void windowObjectCleared(); @@ -62,7 +62,7 @@ class WebFrameLoaderClient : public WebCore::FrameLoaderClient { virtual void dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse); virtual bool shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long identifier); virtual void dispatchDidReceiveAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); - virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); + virtual void dispatchDidCancelAuthenticationChallenge(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::AuthenticationChallenge&); virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&); virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived); virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier); @@ -148,7 +148,7 @@ class WebFrameLoaderClient : public WebCore::FrameLoaderClient { virtual void prepareForDataSourceReplacement(); virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader( - const WebCore::ResourceRequest&, + const WebCore::ResourceRequest&, const WebCore::SubstituteData&); virtual void setTitle(const WebCore::String& title, const WebCore::KURL&); @@ -165,28 +165,28 @@ class WebFrameLoaderClient : public WebCore::FrameLoaderClient { const WebCore::ResourceResponse& response); virtual PassRefPtr<WebCore::Frame> createFrame( const WebCore::KURL& url, - const WebCore::String& name, + const WebCore::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, - const WebCore::String& referrer, + const WebCore::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); virtual WebCore::Widget* createPlugin(const WebCore::IntSize&, - WebCore::HTMLPlugInElement*, - const WebCore::KURL&, - const WTF::Vector<WebCore::String>&, - const WTF::Vector<WebCore::String>&, - const WebCore::String&, + WebCore::HTMLPlugInElement*, + const WebCore::KURL&, + const WTF::Vector<WebCore::String>&, + const WTF::Vector<WebCore::String>&, + const WebCore::String&, bool loadManually); virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget); virtual WebCore::Widget* createJavaAppletWidget( - const WebCore::IntSize&, + const WebCore::IntSize&, WebCore::HTMLAppletElement*, - const WebCore::KURL& baseURL, - const WTF::Vector<WebCore::String>& paramNames, + const WebCore::KURL& baseURL, + const WTF::Vector<WebCore::String>& paramNames, const WTF::Vector<WebCore::String>& paramValues); - virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, + virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WebCore::String& mimeType); virtual WebCore::String overrideMediaType() const; diff --git a/webkit/glue/webhistoryitem_impl.cc b/webkit/glue/webhistoryitem_impl.cc index 20bd956..c381eed 100644 --- a/webkit/glue/webhistoryitem_impl.cc +++ b/webkit/glue/webhistoryitem_impl.cc @@ -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/webkit/glue/webinputevent_mac.mm b/webkit/glue/webinputevent_mac.mm index cdef792..f713683 100644 --- a/webkit/glue/webinputevent_mac.mm +++ b/webkit/glue/webinputevent_mac.mm @@ -98,7 +98,7 @@ WebMouseEvent::WebMouseEvent(NSEvent *event, NSView* view) { location = [view convertPoint:windowLocal fromView:nil]; y = [view frame].size.height - location.y; // flip y x = location.x; - + // set modifiers: if ([event modifierFlags] & NSControlKeyMask) @@ -178,22 +178,22 @@ static inline bool isKeyUpEvent(NSEvent *event) case 54: // Right Command case 55: // Left Command return ([event modifierFlags] & NSCommandKeyMask) == 0; - + case 57: // Capslock return ([event modifierFlags] & NSAlphaShiftKeyMask) == 0; - + case 56: // Left Shift case 60: // Right Shift return ([event modifierFlags] & NSShiftKeyMask) == 0; - + case 58: // Left Alt case 61: // Right Alt return ([event modifierFlags] & NSAlternateKeyMask) == 0; - + case 59: // Left Ctrl case 62: // Right Ctrl return ([event modifierFlags] & NSControlKeyMask) == 0; - + case 63: // Function return ([event modifierFlags] & NSFunctionKeyMask) == 0; } @@ -233,7 +233,7 @@ static bool isKeypadEvent(NSEvent* event) case 92: // 9 return true; } - + return false; } @@ -246,30 +246,30 @@ static int windowsKeyCodeForKeyEvent(NSEvent* event) // VK_APPS (5D) Right windows/meta key case 54: // Right Command return 0x5D; - + // VK_LWIN (5B) Left windows/meta key case 55: // Left Command return 0x5B; - + // VK_CAPITAL (14) caps locks key case 57: // Capslock return 0x14; - + // VK_SHIFT (10) either shift key case 56: // Left Shift case 60: // Right Shift return 0x10; - + // VK_MENU (12) either alt key case 58: // Left Alt case 61: // Right Alt return 0x12; - + // VK_CONTROL (11) either ctrl key case 59: // Left Ctrl case 62: // Right Ctrl return 0x11; - + // VK_CLEAR (0C) CLEAR key case 71: return 0x0C; @@ -611,8 +611,8 @@ static inline NSString* textFromEvent(NSEvent* event) return @""; return [event characters]; } - - + + static inline NSString* unmodifiedTextFromEvent(NSEvent* event) { if ([event type] == NSFlagsChanged) @@ -622,32 +622,32 @@ static inline NSString* unmodifiedTextFromEvent(NSEvent* event) static NSString* keyIdentifierForKeyEvent(NSEvent* event) { - if ([event type] == NSFlagsChanged) + if ([event type] == NSFlagsChanged) switch ([event keyCode]) { case 54: // Right Command case 55: // Left Command return @"Meta"; - + case 57: // Capslock return @"CapsLock"; - + case 56: // Left Shift case 60: // Right Shift return @"Shift"; - + case 58: // Left Alt case 61: // Right Alt return @"Alt"; - + case 59: // Left Ctrl case 62: // Right Ctrl return @"Control"; - + default: ASSERT_NOT_REACHED(); return @""; } - + NSString *s = [event charactersIgnoringModifiers]; if ([s length] != 1) { return @"Unidentified"; @@ -914,7 +914,7 @@ static NSString* keyIdentifierForKeyEvent(NSEvent* event) // Standard says that DEL becomes U+007F. case NSDeleteFunctionKey: return @"U+007F"; - + // Always use 0x09 for tab instead of AppKit's backtab character. case NSBackTabCharacter: return @"U+0009"; @@ -958,10 +958,10 @@ WebKeyboardEvent::WebKeyboardEvent(NSEvent *event) { modifiers |= ALT_KEY; if ([event modifierFlags] & NSCommandKeyMask) modifiers |= META_KEY; - + if (WebCore::isKeypadEvent(event)) modifiers |= IS_KEYPAD; - + if (([event type] != NSFlagsChanged) && [event isARepeat]) modifiers |= IS_AUTO_REPEAT; diff --git a/webkit/glue/webinputevent_win.cc b/webkit/glue/webinputevent_win.cc index 9202672..455ecfc 100644 --- a/webkit/glue/webinputevent_win.cc +++ b/webkit/glue/webinputevent_win.cc @@ -93,7 +93,7 @@ WebMouseEvent::WebMouseEvent(HWND hwnd, UINT message, WPARAM wparam, global_x = global_point.x; global_y = global_point.y; - + // set modifiers: if (wparam & MK_CONTROL) diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index 3ba885a..30c1ed0 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -184,7 +184,7 @@ static void DumpHistoryItem(WebCore::HistoryItem* item, int indent, if (item->hasChildren()) { WebCore::HistoryItemVector children = item->children(); - // Must sort to eliminate arbitrary result ordering which defeats + // Must sort to eliminate arbitrary result ordering which defeats // reproducible testing. std::sort(children.begin(), children.end(), HistoryItemCompareLess); for (unsigned i = 0; i < children.size(); i++) { @@ -419,7 +419,7 @@ const std::string& GetUserAgent(const GURL& url) { if (!g_user_agent->user_agent_is_overridden) { // For hotmail, we need to spoof as Safari (bug 4111). if (MatchPattern(url.host(), "*.mail.live.com")) { - if (g_user_agent->mimic_safari_user_agent.empty()) + if (g_user_agent->mimic_safari_user_agent.empty()) BuildUserAgent(true, &g_user_agent->mimic_safari_user_agent); return g_user_agent->mimic_safari_user_agent; } diff --git a/webkit/glue/webkit_glue_mac.mm b/webkit/glue/webkit_glue_mac.mm index 856e662..484b6f1 100644 --- a/webkit/glue/webkit_glue_mac.mm +++ b/webkit/glue/webkit_glue_mac.mm @@ -54,7 +54,7 @@ ScreenInfo GetScreenInfoHelper(gfx::NativeView view) { NSBitsPerPixelFromDepth([[NSScreen deepestScreen] depth]); results.depth_per_component = NSBitsPerSampleFromDepth([[NSScreen deepestScreen] depth]); - results.is_monochrome = + results.is_monochrome = color_space == NSCalibratedWhiteColorSpace || color_space == NSCalibratedBlackColorSpace || color_space == NSDeviceWhiteColorSpace || diff --git a/webkit/glue/webkit_glue_win.cc b/webkit/glue/webkit_glue_win.cc index f41feb5..82242f7 100644 --- a/webkit/glue/webkit_glue_win.cc +++ b/webkit/glue/webkit_glue_win.cc @@ -25,7 +25,7 @@ ScreenInfo GetScreenInfoHelper(gfx::NativeView window) { results.depth_per_component = dev_mode.dmBitsPerPel / 3; // Assumes RGB results.is_monochrome = dev_mode.dmColor == DMCOLOR_MONOCHROME; results.rect = gfx::Rect(monitor_info.rcMonitor); - results.available_rect = gfx::Rect(monitor_info.rcWork); + results.available_rect = gfx::Rect(monitor_info.rcWork); return results; } diff --git a/webkit/glue/webmediaplayer.h b/webkit/glue/webmediaplayer.h index b786c7e..102eb5e 100644 --- a/webkit/glue/webmediaplayer.h +++ b/webkit/glue/webmediaplayer.h @@ -38,7 +38,7 @@ public: // Get the web frame associated with the media player virtual WebFrame* GetWebFrame() = 0; - + // Notify the media player about network state change. virtual void NotifyNetworkStateChange() = 0; diff --git a/webkit/glue/webmediaplayer_delegate.h b/webkit/glue/webmediaplayer_delegate.h index 1f4d695..69df7e7 100644 --- a/webkit/glue/webmediaplayer_delegate.h +++ b/webkit/glue/webmediaplayer_delegate.h @@ -45,7 +45,7 @@ class WebMediaPlayerDelegate { // Methods for painting. virtual void SetRect(const gfx::Rect& rect) = 0; - // TODO(hclam): Using paint at the moment, maybe we just need to return a + // TODO(hclam): Using paint at the moment, maybe we just need to return a // SkiaBitmap? virtual void Paint(skia::PlatformCanvas *canvas, const gfx::Rect& rect) = 0; diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h index 0f9e53e..fce28bc 100644 --- a/webkit/glue/webmediaplayer_impl.h +++ b/webkit/glue/webmediaplayer_impl.h @@ -2,7 +2,7 @@ // source code is governed by a BSD-style license that can be found in the // LICENSE file. // -// Wrapper over WebCore::MediaPlayerPrivate. It also would handle resource +// Wrapper over WebCore::MediaPlayerPrivate. It also would handle resource // loading for the internal media player. #ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ @@ -32,7 +32,7 @@ class WebMediaPlayerImpl : public WebMediaPlayer { // Get the web frame associated with the media player virtual WebFrame* GetWebFrame(); - + // Notify the media player about network state change. virtual void NotifyNetworkStateChange(); diff --git a/webkit/glue/webresponse.h b/webkit/glue/webresponse.h index 34abd935..9d087c05 100644 --- a/webkit/glue/webresponse.h +++ b/webkit/glue/webresponse.h @@ -15,7 +15,7 @@ class WebResponse { public: // Get the URL. virtual GURL GetURL() const = 0; - + // Get the http status code. virtual int GetHttpStatusCode() const = 0; diff --git a/webkit/glue/webresponse_impl.h b/webkit/glue/webresponse_impl.h index e9dfddf..494848b 100644 --- a/webkit/glue/webresponse_impl.h +++ b/webkit/glue/webresponse_impl.h @@ -15,7 +15,7 @@ class WebResponseImpl : public WebResponse { WebResponseImpl() { } explicit WebResponseImpl(const WebCore::ResourceResponse& response) : response_(response) { } - + virtual ~WebResponseImpl() { } // Get the URL. diff --git a/webkit/glue/weburlrequest_impl.h b/webkit/glue/weburlrequest_impl.h index 0548c26..3ce55b0 100644 --- a/webkit/glue/weburlrequest_impl.h +++ b/webkit/glue/weburlrequest_impl.h @@ -16,7 +16,7 @@ MSVC_POP_WARNING(); class WebRequestImpl : public WebRequest { public: WebRequestImpl(); - + explicit WebRequestImpl(const GURL& url); explicit WebRequestImpl(const WebCore::ResourceRequest& request); explicit WebRequestImpl(const WebCore::FrameLoadRequest& request); diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h index d8ef94d..85f11a7 100644 --- a/webkit/glue/webview.h +++ b/webkit/glue/webview.h @@ -168,7 +168,7 @@ class WebView : public WebWidget { virtual void DragSourceEndedAt( int client_x, int client_y, int screen_x, int screen_y) = 0; - // Notifies the webview that a drag and drop operation is in progress, with + // Notifies the webview that a drag and drop operation is in progress, with // dropable items over the view. virtual void DragSourceMovedTo( int client_x, int client_y, int screen_x, int screen_y) = 0; diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index b81f0cd..4b62711 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -161,12 +161,12 @@ class AutocompletePopupMenuClient : public WebCore::PopupMenuClient { // WebCore::PopupMenuClient implementation. virtual void valueChanged(unsigned listIndex, bool fireEvents = true) { text_field_->setValue(suggestions_[listIndex]); - } + } virtual WebCore::String itemText(unsigned list_index) const { return suggestions_[list_index]; } - + virtual bool itemIsEnabled(unsigned listIndex) const { return true; } @@ -246,7 +246,7 @@ class AutocompletePopupMenuClient : public WebCore::PopupMenuClient { ScrollbarClient* client, ScrollbarOrientation orientation, ScrollbarControlSize size) { - RefPtr<Scrollbar> widget = Scrollbar::createNativeScrollbar(client, + RefPtr<Scrollbar> widget = Scrollbar::createNativeScrollbar(client, orientation, size); return widget.release(); @@ -267,7 +267,7 @@ class AutocompletePopupMenuClient : public WebCore::PopupMenuClient { WebCore::HTMLInputElement* text_field() const { return text_field_.get(); } - + WebCore::RenderStyle* GetTextFieldStyle() const { WebCore::RenderStyle* style = text_field_->computedStyle(); if (!style) { @@ -553,7 +553,7 @@ bool WebViewImpl::AutocompleteHandleKeyEvent(const WebKeyboardEvent& event) { return false; } - + bool WebViewImpl::CharEvent(const WebKeyboardEvent& event) { DCHECK(event.type == WebInputEvent::CHAR); @@ -600,7 +600,7 @@ bool WebViewImpl::CharEvent(const WebKeyboardEvent& event) { * webkit\webkit\win\WebView.cpp. The only significant change in this * function is the code to convert from a Keyboard event to the Right * Mouse button up event. -* +* * This function is an ugly copy/paste and should be cleaned up when the * WebKitWin version is cleaned: https://bugs.webkit.org/show_bug.cgi?id=20438 */ diff --git a/webkit/glue/webwidget_delegate.h b/webkit/glue/webwidget_delegate.h index 81caeb31..010a7d0 100644 --- a/webkit/glue/webwidget_delegate.h +++ b/webkit/glue/webwidget_delegate.h @@ -50,7 +50,7 @@ class WebWidgetDelegate { // it no longer receives keyboard events. virtual void Blur(WebWidget* webwidget) = 0; - virtual void SetCursor(WebWidget* webwidget, + virtual void SetCursor(WebWidget* webwidget, const WebCursor& cursor) = 0; // Returns the rectangle of the WebWidget in screen coordinates. virtual void GetWindowRect(WebWidget* webwidget, gfx::Rect* rect) = 0; @@ -70,7 +70,7 @@ class WebWidgetDelegate { // is used on Mac to determine if a scrollbar is over the in-window resize // area at the bottom right corner. virtual void GetRootWindowResizerRect(WebWidget* webwidget, gfx::Rect* rect) = 0; - + // Keeps track of the necessary window move for a plugin window that resulted // from a scroll operation. That way, all plugin windows can be moved at the // same time as each other and the page. diff --git a/webkit/pending/AccessibleBase.cpp b/webkit/pending/AccessibleBase.cpp index c211bbb..d512ab6 100644 --- a/webkit/pending/AccessibleBase.cpp +++ b/webkit/pending/AccessibleBase.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" @@ -250,7 +250,7 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::get_accRole(VARIANT vChild, VARIANT* p { if (!pvRole) return E_POINTER; - + if (vChild.vt != VT_I4) { pvRole->vt = VT_EMPTY; return E_INVALIDARG; diff --git a/webkit/pending/AccessibleBase.h b/webkit/pending/AccessibleBase.h index fdecd35..c0df93f 100644 --- a/webkit/pending/AccessibleBase.h +++ b/webkit/pending/AccessibleBase.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 AccessibleBase_h diff --git a/webkit/pending/AccessibleDocument.cpp b/webkit/pending/AccessibleDocument.cpp index d9bbe13..368b851 100644 --- a/webkit/pending/AccessibleDocument.cpp +++ b/webkit/pending/AccessibleDocument.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/webkit/pending/AccessibleDocument.h b/webkit/pending/AccessibleDocument.h index f231bf1..2fce1d5 100644 --- a/webkit/pending/AccessibleDocument.h +++ b/webkit/pending/AccessibleDocument.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 AccessibleDocument_h diff --git a/webkit/port/bindings/v8/JSDOMBinding.cpp b/webkit/port/bindings/v8/JSDOMBinding.cpp index 7796fc5..c72a92b 100644 --- a/webkit/port/bindings/v8/JSDOMBinding.cpp +++ b/webkit/port/bindings/v8/JSDOMBinding.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/port/bindings/v8/JSDOMBinding.h b/webkit/port/bindings/v8/JSDOMBinding.h index 6d52e3f..8ed5602 100644 --- a/webkit/port/bindings/v8/JSDOMBinding.h +++ b/webkit/port/bindings/v8/JSDOMBinding.h @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/port/bindings/v8/JSXPathNSResolver.cpp b/webkit/port/bindings/v8/JSXPathNSResolver.cpp index ed6ed3c..2fb2849 100644 --- a/webkit/port/bindings/v8/JSXPathNSResolver.cpp +++ b/webkit/port/bindings/v8/JSXPathNSResolver.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/port/bindings/v8/RGBColor.cpp b/webkit/port/bindings/v8/RGBColor.cpp index 601b5c1..4a37ea6 100644 --- a/webkit/port/bindings/v8/RGBColor.cpp +++ b/webkit/port/bindings/v8/RGBColor.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/port/bindings/v8/RGBColor.h b/webkit/port/bindings/v8/RGBColor.h index c1e7f4a..afc0500 100644 --- a/webkit/port/bindings/v8/RGBColor.h +++ b/webkit/port/bindings/v8/RGBColor.h @@ -18,7 +18,7 @@ class RGBColor : public RefCounted<RGBColor> { PassRefPtr<CSSPrimitiveValue> red(); PassRefPtr<CSSPrimitiveValue> green(); PassRefPtr<CSSPrimitiveValue> blue(); - + private: unsigned m_rgbcolor; }; diff --git a/webkit/port/bindings/v8/ScriptController.cpp b/webkit/port/bindings/v8/ScriptController.cpp index a0b0969..9f2a5be 100644 --- a/webkit/port/bindings/v8/ScriptController.cpp +++ b/webkit/port/bindings/v8/ScriptController.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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 @@ -224,7 +224,7 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode) // HTMLTokenizer used to use base zero line numbers for scripts, now it // uses base 1. This confuses v8, which uses line offsets from the // first line. - v8::Local<v8::Value> obj = m_proxy->Evaluate(sourceCode.url(), + v8::Local<v8::Value> obj = m_proxy->Evaluate(sourceCode.url(), sourceCode.startLine() - 1, sourceCode.source(), NULL); @@ -328,21 +328,21 @@ PassScriptInstance ScriptController::createScriptInstanceForWidget(Widget* widge // NPObjects can be created either by the browser (e.g. the main // window object) or by the plugin (the main plugin object // for a HTMLEmbedElement). Further, - // unlike most DOM Objects, the frame is especially careful to ensure - // NPObjects terminate at frame teardown because if a plugin leaks a + // unlike most DOM Objects, the frame is especially careful to ensure + // NPObjects terminate at frame teardown because if a plugin leaks a // reference, it could leak its objects (or the browser's objects). - // + // // The Frame maintains a list of plugin objects (m_pluginObjects) // which it can use to quickly find the wrapped embed object. - // - // Inside the NPRuntime, we've added a few methods for registering - // wrapped NPObjects. The purpose of the registration is because + // + // Inside the NPRuntime, we've added a few methods for registering + // wrapped NPObjects. The purpose of the registration is because // javascript garbage collection is non-deterministic, yet we need to // be able to tear down the plugin objects immediately. When an object // is registered, javascript can use it. When the object is destroyed, // or when the object's "owning" object is destroyed, the object will // be un-registered, and the javascript engine must not use it. - // + // // Inside the javascript engine, the engine can keep a reference to the // NPObject as part of its wrapper. However, before accessing the object // it must consult the NPN_Registry. @@ -363,7 +363,7 @@ void ScriptController::cleanupScriptObjectsForPlugin(void* nativeHandle) _NPN_UnregisterObject(it->second); NPN_ReleaseObject(it->second); m_pluginObjects.remove(it); -} +} static NPObject* createNoScriptObject() { diff --git a/webkit/port/bindings/v8/ScriptController.h b/webkit/port/bindings/v8/ScriptController.h index 7af3fd8..be4c6b4 100644 --- a/webkit/port/bindings/v8/ScriptController.h +++ b/webkit/port/bindings/v8/ScriptController.h @@ -156,7 +156,7 @@ public: bool haveWindowShell() const { return true; } // Masquerade 'this' as the windowShell. - // This is a bit of a hack, but provides reasonable compatibility + // This is a bit of a hack, but provides reasonable compatibility // with what JSC does as well. ScriptController* windowShell() { return this; } @@ -224,7 +224,7 @@ public: // Some WebKit layout test need window.GCController.collect() to // trigger GC, this flag lets the binding code expose // window.GCController.collect() to the JavaScript code. - // + // // GCController.collect() needs V8 engine expose gc() function by passing // '--expose-gc' flag to the engine. static bool shouldExposeGCController() { diff --git a/webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp b/webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp index f4421d5..b1a659c 100644 --- a/webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp +++ b/webkit/port/bindings/v8/V8CanvasPixelArrayCustom.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 @@ -67,7 +67,7 @@ INDEXED_PROPERTY_SETTER(CanvasPixelArray) { V8Proxy::ToNativeObject<CanvasPixelArray>( V8ClassIndex::CANVASPIXELARRAY, info.Holder()); - + if ((index >= 0) && (index < pixelBuffer->length())) { pixelBuffer->set(index, value->NumberValue()); } diff --git a/webkit/port/bindings/v8/V8MessagePortCustom.cpp b/webkit/port/bindings/v8/V8MessagePortCustom.cpp index 81948f8..63a1ee2 100644 --- a/webkit/port/bindings/v8/V8MessagePortCustom.cpp +++ b/webkit/port/bindings/v8/V8MessagePortCustom.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 @@ -185,7 +185,7 @@ CALLBACK_FUNC_DECL(MessagePortStartConversation) RefPtr<MessagePort> port = messagePort->startConversation(messagePort->scriptExecutionContext(), ToWebCoreString(args[0])); - v8::Handle<v8::Value> wrapper = + v8::Handle<v8::Value> wrapper = V8Proxy::ToV8Object(V8ClassIndex::MESSAGEPORT, port.get()); return wrapper; } diff --git a/webkit/port/bindings/v8/V8SVGPODTypeWrapper.h b/webkit/port/bindings/v8/V8SVGPODTypeWrapper.h index 60c34d5..9c83a4b 100644 --- a/webkit/port/bindings/v8/V8SVGPODTypeWrapper.h +++ b/webkit/port/bindings/v8/V8SVGPODTypeWrapper.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 V8SVGPODTypeWrapper_h @@ -52,7 +52,7 @@ template<typename PODType> class V8SVGPODTypeWrapperCreatorForList : public V8SVGPODTypeWrapper<PODType> { public: - typedef PODType (SVGPODListItem<PODType>::*GetterMethod)() const; + typedef PODType (SVGPODListItem<PODType>::*GetterMethod)() const; typedef void (SVGPODListItem<PODType>::*SetterMethod)(PODType); V8SVGPODTypeWrapperCreatorForList(SVGPODListItem<PODType>* creator, const QualifiedName& attributeName) @@ -114,65 +114,65 @@ private: PODType m_podType; }; -template<typename PODType, typename ParentTypeArg> -class V8SVGStaticPODTypeWrapperWithPODTypeParent : public V8SVGStaticPODTypeWrapper<PODType> { -public: - typedef V8SVGPODTypeWrapper<ParentTypeArg> ParentType; - - V8SVGStaticPODTypeWrapperWithPODTypeParent(PODType type, ParentType* parent) - : V8SVGStaticPODTypeWrapper<PODType>(type) - , m_parentType(parent) - { - } - - virtual void commitChange(PODType type, SVGElement* context) - { - V8SVGStaticPODTypeWrapper<PODType>::commitChange(type, context); - m_parentType->commitChange(ParentTypeArg(type), context); - } - -private: - RefPtr<ParentType> m_parentType; -}; - -template<typename PODType, typename ParentType> -class V8SVGStaticPODTypeWrapperWithParent : public V8SVGPODTypeWrapper<PODType> { -public: - typedef PODType (ParentType::*GetterMethod)() const; - typedef void (ParentType::*SetterMethod)(const PODType&); - - V8SVGStaticPODTypeWrapperWithParent(ParentType* parent, GetterMethod getter, SetterMethod setter) - : m_parent(parent) - , m_getter(getter) - , m_setter(setter) - { - ASSERT(m_parent); - ASSERT(m_getter); - ASSERT(m_setter); - } - - virtual operator PODType() - { - return (m_parent.get()->*m_getter)(); - } - - virtual void commitChange(PODType type, SVGElement* context) - { - (m_parent.get()->*m_setter)(type); - } - -private: - // Update callbacks - RefPtr<ParentType> m_parent; - GetterMethod m_getter; - SetterMethod m_setter; -}; +template<typename PODType, typename ParentTypeArg> +class V8SVGStaticPODTypeWrapperWithPODTypeParent : public V8SVGStaticPODTypeWrapper<PODType> { +public: + typedef V8SVGPODTypeWrapper<ParentTypeArg> ParentType; + + V8SVGStaticPODTypeWrapperWithPODTypeParent(PODType type, ParentType* parent) + : V8SVGStaticPODTypeWrapper<PODType>(type) + , m_parentType(parent) + { + } + + virtual void commitChange(PODType type, SVGElement* context) + { + V8SVGStaticPODTypeWrapper<PODType>::commitChange(type, context); + m_parentType->commitChange(ParentTypeArg(type), context); + } + +private: + RefPtr<ParentType> m_parentType; +}; + +template<typename PODType, typename ParentType> +class V8SVGStaticPODTypeWrapperWithParent : public V8SVGPODTypeWrapper<PODType> { +public: + typedef PODType (ParentType::*GetterMethod)() const; + typedef void (ParentType::*SetterMethod)(const PODType&); + + V8SVGStaticPODTypeWrapperWithParent(ParentType* parent, GetterMethod getter, SetterMethod setter) + : m_parent(parent) + , m_getter(getter) + , m_setter(setter) + { + ASSERT(m_parent); + ASSERT(m_getter); + ASSERT(m_setter); + } + + virtual operator PODType() + { + return (m_parent.get()->*m_getter)(); + } + + virtual void commitChange(PODType type, SVGElement* context) + { + (m_parent.get()->*m_setter)(type); + } + +private: + // Update callbacks + RefPtr<ParentType> m_parent; + GetterMethod m_getter; + SetterMethod m_setter; +}; template<typename PODType, typename PODTypeCreator> class V8SVGDynamicPODTypeWrapper : public V8SVGPODTypeWrapper<PODType> { public: - typedef PODType (PODTypeCreator::*GetterMethod)() const; + typedef PODType (PODTypeCreator::*GetterMethod)() const; typedef void (PODTypeCreator::*SetterMethod)(PODType); typedef void (*CacheRemovalCallback)(V8SVGPODTypeWrapper<PODType>*); @@ -188,7 +188,7 @@ public: ASSERT(cacheRemovalCallback); } - virtual ~V8SVGDynamicPODTypeWrapper() { + virtual ~V8SVGDynamicPODTypeWrapper() { ASSERT(m_cacheRemovalCallback); (*m_cacheRemovalCallback)(this); @@ -217,7 +217,7 @@ private: // Caching facilities template<typename PODType, typename PODTypeCreator> struct PODTypeWrapperCacheInfo { - typedef PODType (PODTypeCreator::*GetterMethod)() const; + typedef PODType (PODTypeCreator::*GetterMethod)() const; typedef void (PODTypeCreator::*SetterMethod)(PODType); // Empty value @@ -301,15 +301,15 @@ template<typename PODType, typename PODTypeCreator> class V8SVGDynamicPODTypeWrapperCache { public: - typedef PODType (PODTypeCreator::*GetterMethod)() const; + typedef PODType (PODTypeCreator::*GetterMethod)() const; typedef void (PODTypeCreator::*SetterMethod)(PODType); typedef PODTypeWrapperCacheInfo<PODType, PODTypeCreator> CacheInfo; typedef PODTypeWrapperCacheInfoHash<PODType, PODTypeCreator> CacheInfoHash; typedef PODTypeWrapperCacheInfoTraits<PODType, PODTypeCreator> CacheInfoTraits; - typedef V8SVGPODTypeWrapper<PODType> WrapperBase; - typedef V8SVGDynamicPODTypeWrapper<PODType, PODTypeCreator> DynamicWrapper; + typedef V8SVGPODTypeWrapper<PODType> WrapperBase; + typedef V8SVGDynamicPODTypeWrapper<PODType, PODTypeCreator> DynamicWrapper; typedef HashMap<CacheInfo, DynamicWrapper*, CacheInfoHash, CacheInfoTraits> DynamicWrapperHashMap; typedef typename DynamicWrapperHashMap::const_iterator DynamicWrapperHashMapIterator; diff --git a/webkit/port/bindings/v8/V8WorkerContextCustom.cpp b/webkit/port/bindings/v8/V8WorkerContextCustom.cpp index d3c1c3a..27f6c8b 100644 --- a/webkit/port/bindings/v8/V8WorkerContextCustom.cpp +++ b/webkit/port/bindings/v8/V8WorkerContextCustom.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/webkit/port/bindings/v8/V8WorkerCustom.cpp b/webkit/port/bindings/v8/V8WorkerCustom.cpp index bdcb803..e1a1d23 100644 --- a/webkit/port/bindings/v8/V8WorkerCustom.cpp +++ b/webkit/port/bindings/v8/V8WorkerCustom.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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 @@ -81,7 +81,7 @@ CALLBACK_FUNC_DECL(WorkerConstructor) { ExceptionCode ec = 0; RefPtr<Worker> obj = Worker::create( ToWebCoreString(script_url), document, ec); - + // Setup the standard wrapper object internal fields. v8::Handle<v8::Object> wrapper_object = args.Holder(); V8Proxy::SetDOMWrapper( @@ -89,7 +89,7 @@ CALLBACK_FUNC_DECL(WorkerConstructor) { obj->ref(); V8Proxy::SetJSWrapperForActiveDOMObject( - obj.get(), v8::Persistent<v8::Object>::New(wrapper_object)); + obj.get(), v8::Persistent<v8::Object>::New(wrapper_object)); return wrapper_object; } @@ -201,7 +201,7 @@ ACCESSOR_SETTER(WorkerOnerror) { static_cast<V8ObjectEventListener*>(imp->onerror()); if (value->IsNull()) { if (old_listener) { - v8::Local<v8::Object> old_v8_listener = + v8::Local<v8::Object> old_v8_listener = old_listener->GetListenerObject(); RemoveHiddenDependency(info.Holder(), old_v8_listener); } diff --git a/webkit/port/bindings/v8/V8XMLHttpRequestCustom.cpp b/webkit/port/bindings/v8/V8XMLHttpRequestCustom.cpp index 6044cb9..c39d037 100644 --- a/webkit/port/bindings/v8/V8XMLHttpRequestCustom.cpp +++ b/webkit/port/bindings/v8/V8XMLHttpRequestCustom.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/port/bindings/v8/WorkerContextExecutionProxy.cpp b/webkit/port/bindings/v8/WorkerContextExecutionProxy.cpp index 496dce3..02a6579 100644 --- a/webkit/port/bindings/v8/WorkerContextExecutionProxy.cpp +++ b/webkit/port/bindings/v8/WorkerContextExecutionProxy.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/webkit/port/bindings/v8/WorkerContextExecutionProxy.h b/webkit/port/bindings/v8/WorkerContextExecutionProxy.h index b64029e..2aaa160 100644 --- a/webkit/port/bindings/v8/WorkerContextExecutionProxy.h +++ b/webkit/port/bindings/v8/WorkerContextExecutionProxy.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/webkit/port/bindings/v8/WorkerScriptController.cpp b/webkit/port/bindings/v8/WorkerScriptController.cpp index 0f1d8b9e8..9d73437 100644 --- a/webkit/port/bindings/v8/WorkerScriptController.cpp +++ b/webkit/port/bindings/v8/WorkerScriptController.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/port/bindings/v8/WorkerScriptController.h b/webkit/port/bindings/v8/WorkerScriptController.h index efc71d3..73cf799 100644 --- a/webkit/port/bindings/v8/WorkerScriptController.h +++ b/webkit/port/bindings/v8/WorkerScriptController.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/webkit/port/bindings/v8/extensions/Gears.cpp b/webkit/port/bindings/v8/extensions/Gears.cpp index 54787a8..9d36707 100755 --- a/webkit/port/bindings/v8/extensions/Gears.cpp +++ b/webkit/port/bindings/v8/extensions/Gears.cpp @@ -34,7 +34,7 @@ const char* kGearsExtensionScript = class GearsExtensionWrapper : public v8::Extension { public: - GearsExtensionWrapper() : + GearsExtensionWrapper() : v8::Extension(kGearsExtensionName, kGearsExtensionScript) {} }; diff --git a/webkit/port/bindings/v8/extensions/Interval.cpp b/webkit/port/bindings/v8/extensions/Interval.cpp index 4a5c13d..b09847c 100644 --- a/webkit/port/bindings/v8/extensions/Interval.cpp +++ b/webkit/port/bindings/v8/extensions/Interval.cpp @@ -12,7 +12,7 @@ const char* kIntervalExtensionName = "v8/Interval"; class IntervalExtensionWrapper : public v8::Extension { public: - IntervalExtensionWrapper() : + IntervalExtensionWrapper() : v8::Extension(kIntervalExtensionName, "var chromium;" "if (!chromium)" diff --git a/webkit/port/bindings/v8/npruntime.cpp b/webkit/port/bindings/v8/npruntime.cpp index 78c5323..9b21c36 100644 --- a/webkit/port/bindings/v8/npruntime.cpp +++ b/webkit/port/bindings/v8/npruntime.cpp @@ -67,7 +67,7 @@ inline bool operator<(const StringKey& x, const StringKey& y) { else if (x.length > y.length) return false; else - return memcmp(x.string, y.string, y.length) < 0; + return memcmp(x.string, y.string, y.length) < 0; } } // namespace diff --git a/webkit/port/bindings/v8/npruntime_impl.h b/webkit/port/bindings/v8/npruntime_impl.h index 3224565..9a9b612 100644 --- a/webkit/port/bindings/v8/npruntime_impl.h +++ b/webkit/port/bindings/v8/npruntime_impl.h @@ -1,10 +1,10 @@ /* * 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 @@ -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/webkit/port/bindings/v8/npruntime_priv.h b/webkit/port/bindings/v8/npruntime_priv.h index 88a3ac3..0aa952c 100644 --- a/webkit/port/bindings/v8/npruntime_priv.h +++ b/webkit/port/bindings/v8/npruntime_priv.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 NP_RUNTIME_PRIV_H_ @@ -45,7 +45,7 @@ void _NPN_DeallocateObject(NPObject *obj); // be "registered" while they are alive. After an object has been // deleted, it is possible for Javascript to have a reference to that object // which has not yet been garbage collected. Javascript access to NPObjects -// will reference this registry to determine if the object is accessible or +// will reference this registry to determine if the object is accessible or // not. // Windows introduces an additional complication for objects created by the @@ -59,7 +59,7 @@ void _NPN_DeallocateObject(NPObject *obj); // We generally associate NPObjects with an owner. The owner of an NPObject // is an NPObject which, when destroyed, also destroys all objects it owns. // For example, if an NPAPI plugin creates 10 sub-NPObjects, all 11 objects -// (the NPAPI plugin + its 10 sub-objects) should become inaccessible +// (the NPAPI plugin + its 10 sub-objects) should become inaccessible // simultaneously. // The ownership hierarchy is flat, and not a tree. Imagine the following diff --git a/webkit/port/bindings/v8/v8_binding.h b/webkit/port/bindings/v8/v8_binding.h index 5f83e51..34c598f 100644 --- a/webkit/port/bindings/v8/v8_binding.h +++ b/webkit/port/bindings/v8/v8_binding.h @@ -44,7 +44,7 @@ class WebCoreStringResource: public v8::String::ExternalStringResource { // Keeps the string buffer alive until the V8 engine garbage collects it. String external_string_; }; - + // Convert a v8::String to a WebCore::String. If the V8 string is not already // an external string then it is transformed into an external string at this // point to avoid repeated conversions. diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp index 7b4ccdd..32a5f14 100644 --- a/webkit/port/bindings/v8/v8_custom.cpp +++ b/webkit/port/bindings/v8/v8_custom.cpp @@ -615,7 +615,7 @@ CALLBACK_FUNC_DECL(CanvasRenderingContext2DStrokeText) { CALLBACK_FUNC_DECL(CanvasRenderingContext2DPutImageData) { INC_STATS("DOM.CanvasRenderingContext2D.putImageData()"); - + // Two froms: // * putImageData(ImageData, x, y) // * putImageData(ImageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight) @@ -853,7 +853,7 @@ v8::Handle<v8::Value> V8Custom::WindowSetTimeoutImpl(const v8::Arguments& args, if (!V8Proxy::CanAccessFrame(imp->frame(), true)) return v8::Undefined(); - ScriptExecutionContext* script_context = + ScriptExecutionContext* script_context = static_cast<ScriptExecutionContext*>(imp->frame()->document()); v8::Handle<v8::Value> function = args[0]; @@ -1064,7 +1064,7 @@ CALLBACK_FUNC_DECL(DOMWindowNOP) CALLBACK_FUNC_DECL(HTMLFormElementSubmit) { INC_STATS("DOM.HTMLFormElement.submit()"); - + HTMLFormElement* form = V8Proxy::DOMWrapperToNative<HTMLFormElement>(args.Holder()); @@ -1086,9 +1086,9 @@ static String EventNameFromAttributeName(const String& name) { break; case 'd': ASSERT(event_type.length() > 7); - if (event_type[7] == 'a') + if (event_type[7] == 'a') event_type = "webkitAnimationEnd"; - else + else event_type = "webkitTransitionEnd"; break; } @@ -1115,7 +1115,7 @@ ACCESSOR_SETTER(DOMWindowEventHandler) { String key = ToWebCoreString(name); String event_type = EventNameFromAttributeName(key); - + if (value->IsNull()) { // Clear the event listener doc->removeWindowInlineEventListenerForType(event_type); diff --git a/webkit/port/bindings/v8/v8_custom.h b/webkit/port/bindings/v8/v8_custom.h index 16e9359..c88fed4 100644 --- a/webkit/port/bindings/v8/v8_custom.h +++ b/webkit/port/bindings/v8/v8_custom.h @@ -95,9 +95,9 @@ class V8Custom { static const int kXMLHttpRequestInternalFieldCount = kDefaultWrapperInternalFieldCount + 1; - static const int kMessageChannelPort1Index = + static const int kMessageChannelPort1Index = kDefaultWrapperInternalFieldCount + 0; - static const int kMessageChannelPort2Index = + static const int kMessageChannelPort2Index = kDefaultWrapperInternalFieldCount + 1; static const int kMessageChannelInternalFieldCount = kDefaultWrapperInternalFieldCount + 2; diff --git a/webkit/port/bindings/v8/v8_events.cpp b/webkit/port/bindings/v8/v8_events.cpp index 06de1c6..265561f 100644 --- a/webkit/port/bindings/v8/v8_events.cpp +++ b/webkit/port/bindings/v8/v8_events.cpp @@ -548,7 +548,7 @@ v8::Local<v8::Value> V8WorkerContextEventListener::CallListenerFunction( v8::Handle<v8::Value> parameters[1] = {jsevent}; v8::Local<v8::Value> result; - { + { //ConsoleMessageScope scope; result = handler_func->Call(receiver, 1, parameters); diff --git a/webkit/port/bindings/v8/v8_events.h b/webkit/port/bindings/v8/v8_events.h index e01f972..c352f1f 100644 --- a/webkit/port/bindings/v8/v8_events.h +++ b/webkit/port/bindings/v8/v8_events.h @@ -92,7 +92,7 @@ class V8AbstractEventListener : public EventListener { // that can handle the event. class V8EventListener : public V8AbstractEventListener { public: - static PassRefPtr<V8EventListener> create(Frame* frame, + static PassRefPtr<V8EventListener> create(Frame* frame, v8::Local<v8::Object> listener, bool isInline) { return adoptRef(new V8EventListener(frame, listener, isInline)); } @@ -118,7 +118,7 @@ class V8EventListener : public V8AbstractEventListener { // in the DOM. It keeps the JS listener as a weak pointer. class V8ObjectEventListener : public V8EventListener { public: - static PassRefPtr<V8ObjectEventListener> create(Frame* frame, + static PassRefPtr<V8ObjectEventListener> create(Frame* frame, v8::Local<v8::Object> listener, bool isInline) { return adoptRef(new V8ObjectEventListener(frame, listener, isInline)); } @@ -133,7 +133,7 @@ class V8ObjectEventListener : public V8EventListener { // A V8LazyEventListener is always a HTML event handler. class V8LazyEventListener : public V8AbstractEventListener { public: - static PassRefPtr<V8LazyEventListener> create(Frame* frame, + static PassRefPtr<V8LazyEventListener> create(Frame* frame, const String& code, const String& func_name) { return adoptRef(new V8LazyEventListener(frame, code, func_name)); } diff --git a/webkit/port/bindings/v8/v8_helpers.cpp b/webkit/port/bindings/v8/v8_helpers.cpp index 089aedd..f09c2e0 100644 --- a/webkit/port/bindings/v8/v8_helpers.cpp +++ b/webkit/port/bindings/v8/v8_helpers.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/port/bindings/v8/v8_index.cpp b/webkit/port/bindings/v8/v8_index.cpp index bf6225c..c3838ef 100644 --- a/webkit/port/bindings/v8/v8_index.cpp +++ b/webkit/port/bindings/v8/v8_index.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/port/bindings/v8/v8_index.h b/webkit/port/bindings/v8/v8_index.h index 9e6584f..fff021a 100644 --- a/webkit/port/bindings/v8/v8_index.h +++ b/webkit/port/bindings/v8/v8_index.h @@ -239,8 +239,8 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); V(XMLHTTPREQUEST, XMLHttpRequest) \ WORKER_ACTIVE_OBJECT_WRAPPER_TYPES(V) -// NOTE: DOM_OBJECT_TYPES is split into two halves because -// Visual Studio's Intellinonsense crashes when macros get +// NOTE: DOM_OBJECT_TYPES is split into two halves because +// Visual Studio's Intellinonsense crashes when macros get // too large. 10-29-08 // DOM_OBJECT_TYPES are non-node DOM types. #define DOM_OBJECT_TYPES_1(V) \ @@ -418,7 +418,7 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)(); V(SVGURIREFERENCE, SVGURIReference) \ V(SVGANIMATEDPOINTS, SVGAnimatedPoints) -// SVG_NONNODE_TYPES are SVG non-node object types, pod typs and +// SVG_NONNODE_TYPES are SVG non-node object types, pod typs and // numerical types. #define SVG_NONNODE_TYPES(V) \ SVG_OBJECT_TYPES(V) \ diff --git a/webkit/port/bindings/v8/v8_nodefilter.cpp b/webkit/port/bindings/v8/v8_nodefilter.cpp index 7a01f5b..34d17c1 100644 --- a/webkit/port/bindings/v8/v8_nodefilter.cpp +++ b/webkit/port/bindings/v8/v8_nodefilter.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/port/bindings/v8/v8_np_utils.cpp b/webkit/port/bindings/v8/v8_np_utils.cpp index 957aa6f..f7bb20a 100644 --- a/webkit/port/bindings/v8/v8_np_utils.cpp +++ b/webkit/port/bindings/v8/v8_np_utils.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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 @@ -54,7 +54,7 @@ void ConvertV8ObjectToNPVariant(v8::Local<v8::Value> object, NPObject *owner, NP return; if (object->IsInt32()) - INT32_TO_NPVARIANT(object->NumberValue(), *result); + INT32_TO_NPVARIANT(object->NumberValue(), *result); else if (object->IsNumber()) DOUBLE_TO_NPVARIANT(object->NumberValue(), *result); else if (object->IsBoolean()) diff --git a/webkit/port/bindings/v8/v8_npobject.cpp b/webkit/port/bindings/v8/v8_npobject.cpp index b39078e2..cdb9bee 100644 --- a/webkit/port/bindings/v8/v8_npobject.cpp +++ b/webkit/port/bindings/v8/v8_npobject.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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 @@ -337,10 +337,10 @@ v8::Local<v8::Object> CreateV8ObjectForNPObject(NPObject* object, NPObject* root v8::Handle<v8::Function> func = npObjectDesc->GetFunction(); v8::Local<v8::Object> value = SafeAllocation::NewInstance(func); - - // If we were unable to allocate the instance we avoid wrapping - // and registering the NP object. - if (value.IsEmpty()) + + // If we were unable to allocate the instance we avoid wrapping + // and registering the NP object. + if (value.IsEmpty()) return value; WrapNPObject(value, object); diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index 3ef9c9e..c303a08 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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 @@ -480,7 +480,7 @@ static HashMap<void*, SVGElement*>& svg_object_to_context_map() } v8::Handle<v8::Value> V8Proxy::SVGObjectWithContextToV8Object( - V8ClassIndex::V8WrapperType type, void* object) + V8ClassIndex::V8WrapperType type, void* object) { if (!object) return v8::Null(); @@ -1186,10 +1186,10 @@ static V8EventListener* FindEventListenerInList(V8EventListenerList& list, V8EventListener* el = *p; v8::Local<v8::Object> wrapper = el->GetListenerObject(); ASSERT(!wrapper.IsEmpty()); - // Since the listener is an object, it is safe to compare for + // Since the listener is an object, it is safe to compare for // strict equality (in the JS sense) by doing a simple equality // check using the == operator on the handles. This is much, - // much faster than calling StrictEquals through the API in + // much faster than calling StrictEquals through the API in // the negative case. if (el->isInline() == isInline && listener == wrapper) return el; @@ -1235,7 +1235,7 @@ PassRefPtr<V8EventListener> V8Proxy::FindOrCreateV8EventListener(v8::Local<v8::V // wrapper. So we can create a hidden reference from the JS wrapper to // to its JS function. // -// (map) +// (map) // XHR <---------- JS_wrapper // | (hidden) : ^ // V V : (may reachable by closure) @@ -1455,7 +1455,7 @@ v8::Local<v8::Value> V8Proxy::CallFunction(v8::Handle<v8::Function> function, // of recursion that stems from calling functions. This is in // contrast to the script evaluations. v8::Local<v8::Value> result; - { + { ConsoleMessageScope scope; // Evaluating the JavaScript could cause the frame to be deallocated, @@ -1565,7 +1565,7 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( SetCollectionStringOrNullIndexedGetter<CSSStyleDeclaration>(desc); break; case V8ClassIndex::CSSRULELIST: - SetCollectionIndexedGetter<CSSRuleList, CSSRule>(desc, + SetCollectionIndexedGetter<CSSRuleList, CSSRule>(desc, V8ClassIndex::CSSRULE); break; case V8ClassIndex::CSSVALUELIST: @@ -1588,12 +1588,12 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( USE_NAMED_PROPERTY_GETTER(HTMLCollection)); desc->InstanceTemplate()->SetCallAsFunctionHandler( USE_CALLBACK(HTMLCollectionCallAsFunction)); - SetCollectionIndexedGetter<HTMLCollection, Node>(desc, + SetCollectionIndexedGetter<HTMLCollection, Node>(desc, V8ClassIndex::NODE); break; case V8ClassIndex::HTMLOPTIONSCOLLECTION: SetCollectionNamedGetter<HTMLOptionsCollection, Node>( - desc, + desc, V8ClassIndex::NODE); desc->InstanceTemplate()->SetIndexedPropertyHandler( USE_INDEXED_PROPERTY_GETTER(HTMLOptionsCollection), @@ -1693,7 +1693,7 @@ v8::Persistent<v8::FunctionTemplate> V8Proxy::GetTemplate( case V8ClassIndex::STYLESHEET: // fall through case V8ClassIndex::CSSSTYLESHEET: { // We add an extra internal field to hold a reference to - // the owner node. + // the owner node. v8::Local<v8::ObjectTemplate> instance_template = desc->InstanceTemplate(); ASSERT(instance_template->InternalFieldCount() == @@ -1931,7 +1931,7 @@ Frame* V8Proxy::retrieveFrame(v8::Handle<v8::Context> context) Frame* V8Proxy::retrieveActiveFrame() { v8::Handle<v8::Context> context = v8::Context::GetEntered(); - if (context.IsEmpty()) + if (context.IsEmpty()) return 0; return retrieveFrame(context); } @@ -1985,8 +1985,8 @@ bool V8Proxy::isEnabled() return true; // If JavaScript has been disabled, we need to look at the frame to tell - // whether this script came from the web or the embedder. Scripts from the - // embedder are safe to run, but scripts from the other sources are + // whether this script came from the web or the embedder. Scripts from the + // embedder are safe to run, but scripts from the other sources are // disallowed. Document* document = m_frame->document(); if (!document) @@ -2301,7 +2301,7 @@ bool V8Proxy::CheckNodeSecurity(Node* node) // the outer window, and the outer window identify is preserved for // the frame. However, a new inner window is created for the new page. // If there are JS code holds a closure to the old inner window, -// it won't be able to reach the outer window via its global object. +// it won't be able to reach the outer window via its global object. void V8Proxy::InitContextIfNeeded() { // Bail out if the context has already been initialized. @@ -3074,11 +3074,11 @@ v8::Handle<v8::Value> V8Proxy::EventToV8Object(Event* event) else if (event->isMessageEvent()) type = V8ClassIndex::MESSAGEEVENT; else if (event->isProgressEvent()) { - if (event->isXMLHttpRequestProgressEvent()) + if (event->isXMLHttpRequestProgressEvent()) type = V8ClassIndex::XMLHTTPREQUESTPROGRESSEVENT; - else + else type = V8ClassIndex::PROGRESSEVENT; - } else if (event->isWebKitAnimationEvent()) + } else if (event->isWebKitAnimationEvent()) type = V8ClassIndex::WEBKITANIMATIONEVENT; else if (event->isWebKitTransitionEvent()) type = V8ClassIndex::WEBKITTRANSITIONEVENT; @@ -3346,7 +3346,7 @@ v8::Handle<v8::Value> V8Proxy::CSSValueToV8Object(CSSValue* value) V8ClassIndex::V8WrapperType type; - if (value->isWebKitCSSTransformValue()) + if (value->isWebKitCSSTransformValue()) type = V8ClassIndex::WEBKITCSSTRANSFORMVALUE; else if (value->isValueList()) type = V8ClassIndex::CSSVALUELIST; diff --git a/webkit/port/bindings/v8/v8_proxy.h b/webkit/port/bindings/v8/v8_proxy.h index 56ef4c9..bb9cc52 100644 --- a/webkit/port/bindings/v8/v8_proxy.h +++ b/webkit/port/bindings/v8/v8_proxy.h @@ -87,7 +87,7 @@ void log_info(Frame* frame, const String& msg, const String& url); V(EVENT_LISTENER) \ V(NODE_FILTER) \ V(SCRIPTINSTANCE) \ - V(SCRIPTVALUE) + V(SCRIPTVALUE) // Host information of persistent handles. @@ -404,7 +404,7 @@ class V8Proxy { static v8::Handle<v8::Value> ConstructDOMObject(const v8::Arguments& args); // Checks whether a DOM object has a JS wrapper. - static bool DOMObjectHasJSWrapper(void* obj); + static bool DOMObjectHasJSWrapper(void* obj); // Set JS wrapper of a DOM object, the caller in charge of increase ref. static void SetJSWrapperForDOMObject(void* obj, v8::Persistent<v8::Object> wrapper); @@ -434,7 +434,7 @@ class V8Proxy { static int GetSourceLineNumber(); static String GetSourceName(); - + // Returns a local handle of the context. v8::Local<v8::Context> GetContext() { return v8::Local<v8::Context>::New(m_context); @@ -544,7 +544,7 @@ class V8Proxy { // it can keep all objects alive. v8::Persistent<v8::Array> m_dom_constructor_cache; v8::Persistent<v8::Value> m_object_prototype; - + v8::Persistent<v8::Object> m_global; v8::Persistent<v8::Value> m_document; diff --git a/webkit/tools/layout_tests/layout_package/compare_failures.py b/webkit/tools/layout_tests/layout_package/compare_failures.py index 5850fda..70745d7 100644 --- a/webkit/tools/layout_tests/layout_package/compare_failures.py +++ b/webkit/tools/layout_tests/layout_package/compare_failures.py @@ -16,7 +16,7 @@ import test_expectations def PrintFilesFromSet(filenames, header_text, output, opt_expectations=None): """A helper method to print a list of files to output. - + Args: filenames: a list of absolute filenames header_text: a string to display before the list of filenames @@ -25,7 +25,7 @@ def PrintFilesFromSet(filenames, header_text, output, opt_expectations=None): """ if not len(filenames): return - + filenames = list(filenames) filenames.sort() output.write("\n") @@ -36,7 +36,7 @@ def PrintFilesFromSet(filenames, header_text, output, opt_expectations=None): output_string += "\n" for filename in filenames: output.write(output_string % path_utils.RelativeTestFilename(filename)) - + class CompareFailures: @@ -70,7 +70,7 @@ class CompareFailures: # Print unexpected passes by category. passes = self._regressed_passes - PrintFilesFromSet(passes & self._expectations.GetFixableFailures(), + PrintFilesFromSet(passes & self._expectations.GetFixableFailures(), "Expected to fail, but passed", output) PrintFilesFromSet(passes & self._expectations.GetFixableTimeouts(), @@ -79,18 +79,18 @@ class CompareFailures: PrintFilesFromSet(passes & self._expectations.GetFixableCrashes(), "Expected to crash, but passed", output) - - PrintFilesFromSet(passes & self._expectations.GetIgnoredFailures(), + + PrintFilesFromSet(passes & self._expectations.GetIgnoredFailures(), "Expected to fail (ignored), but passed", output) PrintFilesFromSet(passes & self._expectations.GetIgnoredTimeouts(), "Expected to timeout (ignored), but passed", output) # Crashes should never be deferred. - PrintFilesFromSet(passes & self._expectations.GetFixableDeferredFailures(), + PrintFilesFromSet(passes & self._expectations.GetFixableDeferredFailures(), "Expected to fail (deferred), but passed", - output) - PrintFilesFromSet(passes & self._expectations.GetFixableDeferredTimeouts(), + output) + PrintFilesFromSet(passes & self._expectations.GetFixableDeferredTimeouts(), "Expected to timeout (deferred), but passed", output) # Print real regressions. @@ -113,7 +113,7 @@ class CompareFailures: def _CalculateRegressions(self): """Calculate regressions from this run through the layout tests.""" worklist = self._test_files.copy() - + passes = set() crashes = set() hangs = set() @@ -146,7 +146,7 @@ class CompareFailures: # Check that all passing tests are expected to pass. expectations = self._expectations.GetExpectations(test) if not test_expectations.PASS in expectations: passes.add(test) - + self._regressed_passes = passes self._regressed_crashes = crashes self._regressed_hangs = hangs diff --git a/webkit/tools/layout_tests/layout_package/compare_failures_unittest.py b/webkit/tools/layout_tests/layout_package/compare_failures_unittest.py index b5d286c..21022f4 100644 --- a/webkit/tools/layout_tests/layout_package/compare_failures_unittest.py +++ b/webkit/tools/layout_tests/layout_package/compare_failures_unittest.py @@ -28,7 +28,7 @@ class CompareFailuresUnittest(unittest.TestCase): # copyfile doesn't copy file permissions so we can delete the files later shutil.copyfile(os.path.join(testdatadir, filename), os.path.join(self._tempdir, filename)) - + def tearDown(self): """Remove temp directory.""" shutil.rmtree(self._tempdir) @@ -62,7 +62,7 @@ class CompareFailuresUnittest(unittest.TestCase): def testPassingToFailure(self): """When there's a new failure, we don't add it to the baseline.""" failures = self.GetTestFailures() - + # Test case where we don't update new baseline. We have a new failure, # but it shouldn't be added to the expected-failures.txt file. pass_file = os.path.join(path_utils.LayoutDataDir(), 'fast', 'pass1.html') @@ -72,12 +72,12 @@ class CompareFailuresUnittest(unittest.TestCase): # Same thing as before: pass -> crash failures[pass_file] = [test_failures.FailureCrash()] self.CheckNoChanges(failures) - + def testFailureToCrash(self): """When there's a new crash, we don't add it to the baseline or remove it from the failure list.""" failures = self.GetTestFailures() - + # Test case where we don't update new baseline. A failure moving to a # crash shouldn't be added to the expected-crashes.txt file. failure_file = os.path.join(path_utils.LayoutDataDir(), @@ -106,7 +106,7 @@ class CompareFailuresUnittest(unittest.TestCase): def testCrashToPassing(self): """This is better than before, so we update the crashes file.""" failures = self.GetTestFailures() - + crash_file = os.path.join(path_utils.LayoutDataDir(), 'fast', 'bar', 'betz', 'crash3.html') del failures[crash_file] @@ -121,7 +121,7 @@ class CompareFailuresUnittest(unittest.TestCase): def testCrashToFailure(self): """This is better than before, so we should update both lists.""" failures = self.GetTestFailures() - + crash_file = os.path.join(path_utils.LayoutDataDir(), 'fast', 'bar', 'betz', 'crash3.html') failures[crash_file] = [test_failures.FailureTextMismatch(None)] @@ -163,7 +163,7 @@ class CompareFailuresUnittest(unittest.TestCase): self.CheckOutputWithExpectedFiles('expected-passing.txt', 'expected-failures-new-test.txt', 'expected-crashes.txt') - + def testNewTestCrash(self): """After a merge, we need to update new crashing tests properly.""" files = self.GetTestFiles() @@ -195,7 +195,7 @@ class CompareFailuresUnittest(unittest.TestCase): cf = compare_failures.CompareFailures(files, failures, set(), set(), self.GetTmpDir(), False) self.failUnless(cf.HasNewFailures()) - + # Failing to passing failures = self.GetTestFailures() failure_file = os.path.join(path_utils.LayoutDataDir(), @@ -204,7 +204,7 @@ class CompareFailuresUnittest(unittest.TestCase): cf = compare_failures.CompareFailures(files, failures, set(), set(), self.GetTmpDir(), False) self.failUnless(not cf.HasNewFailures()) - + # A new test that fails, this doesn't count as a new failure. new_test_file = os.path.join(path_utils.LayoutDataDir(), "new-test.html") files.add(new_test_file) @@ -261,7 +261,7 @@ class CompareFailuresUnittest(unittest.TestCase): 'fast\\bar\\fail2.html', 'fast\\bar\\betz\\fail3.html', ] - + return set([os.path.join(layout_dir, f) for f in files]) def GetTestFailures(self): @@ -275,7 +275,7 @@ class CompareFailuresUnittest(unittest.TestCase): failures[filename] = [test_failures.FailureTextMismatch(None)] return failures - + if '__main__' == __name__: unittest.main() diff --git a/webkit/tools/layout_tests/layout_package/path_utils.py b/webkit/tools/layout_tests/layout_package/path_utils.py index e2f0dcb..cdb6554 100644 --- a/webkit/tools/layout_tests/layout_package/path_utils.py +++ b/webkit/tools/layout_tests/layout_package/path_utils.py @@ -165,7 +165,7 @@ def TestShellBinaryPath(target): """Gets the full path to the test_shell binary for the target build configuration. Raises PathNotFound if the file doesn't exist""" platform_util = platform_utils.PlatformUtility('') - full_path = os.path.join(WebKitRoot(), target, + full_path = os.path.join(WebKitRoot(), target, platform_util.TestShellBinary()) if not os.path.exists(full_path): # try output directory from either Xcode or chrome.sln diff --git a/webkit/tools/layout_tests/layout_package/platform_utils_mac.py b/webkit/tools/layout_tests/layout_package/platform_utils_mac.py index dbc6963..fd0e725 100644 --- a/webkit/tools/layout_tests/layout_package/platform_utils_mac.py +++ b/webkit/tools/layout_tests/layout_package/platform_utils_mac.py @@ -96,13 +96,13 @@ class PlatformUtility(object): port += 443 use_ssl = True return PlatformUtility._FilenameToUri(self, - relative_path, + relative_path, use_http=True, use_ssl=use_ssl, port=port) # Run off file:// - return PlatformUtility._FilenameToUri(self, full_path, use_http=False, + return PlatformUtility._FilenameToUri(self, full_path, use_http=False, use_ssl=False, port=0) def LigHTTPdExecutablePath(self): @@ -119,7 +119,7 @@ class PlatformUtility(object): def ShutDownHTTPServer(self, server_process): """Shut down the lighttpd web server. Blocks until it's fully shut down. - + Args: server_process: The subprocess object representing the running server """ @@ -139,10 +139,10 @@ class PlatformUtility(object): def TestShellBinary(self): """The name of the binary for TestShell.""" return 'TestShell' - + def TestShellBinaryPath(self, target): """Return the platform-specific binary path for our TestShell. - + Args: target: Build target mode (debug or release) """ diff --git a/webkit/tools/layout_tests/layout_package/platform_utils_win.py b/webkit/tools/layout_tests/layout_package/platform_utils_win.py index c6bd525..5695a28 100644 --- a/webkit/tools/layout_tests/layout_package/platform_utils_win.py +++ b/webkit/tools/layout_tests/layout_package/platform_utils_win.py @@ -100,9 +100,9 @@ class PlatformUtility(google.platform_utils_win.PlatformUtility): """Prepares the config file and output directory to start an httpd server. Returns a list of strings containing the server's command line+args. - Creates the test output directory and generates an httpd.conf (or - httpd2.conf for Apache 2 if apache2 is True) file in it that contains - the necessary <VirtualHost> directives for running all the http tests. + Creates the test output directory and generates an httpd.conf (or + httpd2.conf for Apache 2 if apache2 is True) file in it that contains + the necessary <VirtualHost> directives for running all the http tests. WebKit http tests expect the DocumentRoot to be in LayoutTests/http/tests/, but that prevents us from running http tests in chrome/ or pending/. So we @@ -126,7 +126,7 @@ class PlatformUtility(google.platform_utils_win.PlatformUtility): chrome_document_root = layout_dir apache_config_dir = google.httpd_utils.ApacheConfigDir(self._base_dir) mime_types_path = os.path.join(apache_config_dir, "mime.types") - + conf_file_name = "httpd.conf" if apache2: conf_file_name = "httpd2.conf" diff --git a/webkit/tools/layout_tests/layout_package/test_expectations.py b/webkit/tools/layout_tests/layout_package/test_expectations.py index 28dade7..0d343ca 100644 --- a/webkit/tools/layout_tests/layout_package/test_expectations.py +++ b/webkit/tools/layout_tests/layout_package/test_expectations.py @@ -35,13 +35,13 @@ class TestExpectations: def GetFixable(self): return (self._fixable.GetTests() - - self._fixable.GetNonSkippedDeferred() - + self._fixable.GetNonSkippedDeferred() - self._fixable.GetSkippedDeferred()) def GetFixableSkipped(self): return self._fixable.GetSkipped() - def GetFixableSkippedDeferred(self): + def GetFixableSkippedDeferred(self): return self._fixable.GetSkippedDeferred() def GetFixableFailures(self): @@ -58,15 +58,15 @@ class TestExpectations: def GetFixableCrashes(self): return self._fixable.GetTestsExpectedTo(CRASH) - def GetFixableDeferred(self): - return self._fixable.GetNonSkippedDeferred() + def GetFixableDeferred(self): + return self._fixable.GetNonSkippedDeferred() - def GetFixableDeferredFailures(self): - return (self._fixable.GetNonSkippedDeferred() & - self._fixable.GetTestsExpectedTo(FAIL)) + def GetFixableDeferredFailures(self): + return (self._fixable.GetNonSkippedDeferred() & + self._fixable.GetTestsExpectedTo(FAIL)) - def GetFixableDeferredTimeouts(self): - return (self._fixable.GetNonSkippedDeferred() & + def GetFixableDeferredTimeouts(self): + return (self._fixable.GetNonSkippedDeferred() & self._fixable.GetTestsExpectedTo(TIMEOUT)) def GetIgnored(self): @@ -112,7 +112,7 @@ class TestExpectations: """Read the expectation files for the given filename and return a single expectations file with the merged results. """ - + path = os.path.join(self._directory, filename) return TestExpectationsFile(path, self._tests, self._platform, self._is_debug_mode) @@ -131,11 +131,11 @@ def StripComments(line): """Strips comments from a line and return None if the line is empty or else the contents of line with leading and trailing spaces removed and all other whitespace collapsed""" - + commentIndex = line.find('//') if commentIndex is -1: commentIndex = len(line) - + line = re.sub(r'\s+', ' ', line[:commentIndex].strip()) if line == '': return None else: return line @@ -146,7 +146,7 @@ class TestExpectationsFile: in which case the expectations apply to all test cases in that directory and any subdirectory. The format of the file is along the lines of: - + LayoutTests/fast/js/fixme.js = FAIL LayoutTests/fast/js/flaky.js = FAIL PASS LayoutTests/fast/js/crash.js = CRASH TIMEOUT FAIL PASS @@ -173,22 +173,22 @@ class TestExpectationsFile: 'fail': FAIL, 'timeout': TIMEOUT, 'crash': CRASH } - + PLATFORMS = [ 'mac', 'linux', 'win' ] def __init__(self, path, full_test_list, platform, is_debug_mode): """ path: The path to the expectation file. An error is thrown if a test is - listed more than once. + listed more than once. full_test_list: The list of all tests to be run pending processing of the expections for those tests. platform: Which platform from self.PLATFORMS to filter tests for. is_debug_mode: Whether we testing a test_shell built debug mode. """ - + self._full_test_list = full_test_list self._skipped = set() - self._skipped_deferred = set() + self._skipped_deferred = set() self._non_skipped_deferred = set() self._expectations = {} self._test_list_paths = {} @@ -203,10 +203,10 @@ class TestExpectationsFile: def GetSkipped(self): return self._skipped - def GetNonSkippedDeferred(self): - return self._non_skipped_deferred - - def GetSkippedDeferred(self): + def GetNonSkippedDeferred(self): + return self._non_skipped_deferred + + def GetSkippedDeferred(self): return self._skipped_deferred def GetExpectations(self, test): @@ -233,7 +233,7 @@ class TestExpectationsFile: platforms are listed. """ has_any_platforms = False - + for platform in self.PLATFORMS: if platform in options: has_any_platforms = True @@ -300,7 +300,7 @@ class TestExpectationsFile: else: tests = self._ExpandTests(test_list_path) - if is_skipped: + if is_skipped: self._AddSkippedTests(tests, is_deferred) else: self._AddTests(tests, expectations, test_list_path, lineno, @@ -308,7 +308,7 @@ class TestExpectationsFile: if len(self._errors) is not 0: print "\nFAILURES FOR PLATFORM: %s, IS_DEBUG_MODE: %s" \ - % (self._platform.upper(), self._is_debug_mode) + % (self._platform.upper(), self._is_debug_mode) raise SyntaxError('\n'.join(map(str, self._errors))) def _GetOptionsList(self, listString): @@ -329,8 +329,8 @@ class TestExpectationsFile: path = os.path.join(path_utils.LayoutDataDir(), test_list_path) path = os.path.normpath(path) if os.path.isdir(path): path = os.path.join(path, '') - # This is kind of slow - O(n*m) - since this is called for all - # entries in the test lists. It has not been a performance + # This is kind of slow - O(n*m) - since this is called for all + # entries in the test lists. It has not been a performance # issue so far. Maybe we should re-measure the time spent reading # in the test lists? result = [] @@ -360,19 +360,19 @@ class TestExpectationsFile: self._expectations[test] = expectations self._test_list_paths[test] = os.path.normpath(test_list_path) - if is_deferred: + if is_deferred: self._non_skipped_deferred.add(test) for expectation in expectations: if expectation == CRASH and is_deferred: self._AddError(lineno, 'Crashes cannot be deferred.', test) self._tests[expectation].add(test) - + def _AddSkippedTests(self, tests, is_deferred): for test in tests: - if is_deferred: + if is_deferred: self._skipped_deferred.add(test) self._skipped.add(test) def _AddError(self, lineno, msg, path): - self._errors.append('\nLine:%s %s\n%s' % (lineno, msg, path))
\ No newline at end of file + self._errors.append('\nLine:%s %s\n%s' % (lineno, msg, path)) diff --git a/webkit/tools/layout_tests/layout_package/test_types_unittest.py b/webkit/tools/layout_tests/layout_package/test_types_unittest.py index 24e1e75..a7b9bb6 100644 --- a/webkit/tools/layout_tests/layout_package/test_types_unittest.py +++ b/webkit/tools/layout_tests/layout_package/test_types_unittest.py @@ -29,7 +29,7 @@ class SimplifiedDiffUnittest(unittest.TestCase): prefix + "-expected.txt") output = differ._SimplifyText(open(output_filename).read()) expected = differ._SimplifyText(open(expected_filename).read()) - + if output != expected: lst = difflib.unified_diff(expected.splitlines(True), output.splitlines(True), diff --git a/webkit/tools/layout_tests/run_webkit_tests.py b/webkit/tools/layout_tests/run_webkit_tests.py index 1494f64..a11f1c2 100755 --- a/webkit/tools/layout_tests/run_webkit_tests.py +++ b/webkit/tools/layout_tests/run_webkit_tests.py @@ -237,7 +237,7 @@ class TestRunner: else: logging.info('Run: %d tests' % len(self._test_files)) - logging.info('Deferred: %d tests' % + logging.info('Deferred: %d tests' % len(self._expectations.GetFixableDeferred())) logging.info('Expected passes: %d tests' % len(self._test_files - @@ -480,10 +480,10 @@ class TestRunner: skipped, output) - self._PrintResultSummary("=> Tests to be fixed for a future release", - self._expectations.GetFixableDeferred(), - deferred_failures, - deferred_counts, + self._PrintResultSummary("=> Tests to be fixed for a future release", + self._expectations.GetFixableDeferred(), + deferred_failures, + deferred_counts, self._expectations.GetFixableSkippedDeferred(), output) diff --git a/webkit/tools/layout_tests/test_types/simplified_text_diff.py b/webkit/tools/layout_tests/test_types/simplified_text_diff.py index 00af6c1..3767a43 100644 --- a/webkit/tools/layout_tests/test_types/simplified_text_diff.py +++ b/webkit/tools/layout_tests/test_types/simplified_text_diff.py @@ -21,12 +21,12 @@ class SimplifiedTextDiff(text_diff.TestTextDiff): """Removes position and size information from a render tree dump. This also combines contiguous lines of text together so lines that wrap between different words match. Returns the simplified text.""" - + # SVG render paths are a little complicated: we want to strip digits after # a decimal point only for strings that begin with "RenderPath.*data". def simplify_svg_path(match): return match.group(1) + re.sub(r"([0-9]*)\.[0-9]{2}", "\\1", match.group(2)) - + # Regular expressions to remove or substitue text. simplifications = ( # Ignore TypeError and ReferenceError, V8 has different error text. @@ -67,13 +67,13 @@ class SimplifiedTextDiff(text_diff.TestTextDiff): # Handle RTL "...Browse" text. The space gets inserted when text lines # are merged together in the step above. (re.compile(r"... Browse"), "Browse..."), - + # Some SVG tests inexplicably emit -0.00 rather than 0.00 in the expected results (re.compile(r"-0\.00"), '0.00'), - + # Remove size information from SVG text (re.compile(r"(chunk.*width )([0-9]+\.[0-9]{2})"), '\\1'), - + # Remove decimals from SVG paths (re.compile(r"(RenderPath.*data)(.*)"), simplify_svg_path), ) diff --git a/webkit/tools/layout_tests/test_types/test_type_base.py b/webkit/tools/layout_tests/test_types/test_type_base.py index 4d6fdb7..9fab50e 100644 --- a/webkit/tools/layout_tests/test_types/test_type_base.py +++ b/webkit/tools/layout_tests/test_types/test_type_base.py @@ -58,7 +58,7 @@ class TestTypeBase(object): """ self._root_output_dir = root_output_dir self._platform = platform - + def _MakeOutputDirectory(self, filename): """Creates the output directory (if needed) for a given test filename.""" output_filename = os.path.join(self._root_output_dir, @@ -88,11 +88,11 @@ class TestTypeBase(object): def OutputFilename(self, filename, modifier): """Returns a filename inside the output dir that contains modifier. - + For example, if filename is c:/.../fast/dom/foo.html and modifier is "-expected.txt", the return value is c:/cygwin/tmp/layout-test-results/fast/dom/foo-expected.txt - + Args: filename: absolute filename to test file modifier: a string to replace the extension of filename with @@ -105,12 +105,12 @@ class TestTypeBase(object): return os.path.splitext(output_filename)[0] + modifier def RelativeOutputFilename(self, filename, modifier): - """Returns a relative filename inside the output dir that contains + """Returns a relative filename inside the output dir that contains modifier. - + For example, if filename is fast\dom\foo.html and modifier is "-expected.txt", the return value is fast\dom\foo-expected.txt - + Args: filename: relative filename to test file modifier: a string to replace the extension of filename with @@ -122,16 +122,16 @@ class TestTypeBase(object): def CompareOutput(self, filename, proc, output, test_args, target): """Method that compares the output from the test with the expected value. - + This is an abstract method to be implemented by all sub classes. - + Args: filename: absolute filename to test file proc: a reference to the test_shell process output: a string containing the output of the test test_args: a TestArguments object holding optional additional arguments target: Debug or Release - + Return: a list of TestFailure objects, empty if the test passes """ diff --git a/webkit/tools/merge/diff3-wrapper.py b/webkit/tools/merge/diff3-wrapper.py index 4e31ebd..2d0f0e2 100755 --- a/webkit/tools/merge/diff3-wrapper.py +++ b/webkit/tools/merge/diff3-wrapper.py @@ -29,7 +29,7 @@ def EnsureWindowsPath(path): path = path[CYGLEN:CYGLEN + 1] + ':' + path[CYGLEN + 1:] path = path.replace('/', '\\') return path - + def GetPathToBinary(exe): """ Try to find a copy of the binary that exists. Search for the full path and then the basename. @@ -44,9 +44,9 @@ def main(args): args: The arguments passed by svn merge to its diff3 tool. """ - # Grab the arguments from the end of the list since svn will add any other + # Grab the arguments from the end of the list since svn will add any other # arguments provided before these. - + # The titles of the files being diffed. title_mine = EnsureWindowsPath(args[-8]) title_older = EnsureWindowsPath(args[-6]) @@ -56,15 +56,15 @@ def main(args): mine = EnsureWindowsPath(args[-3]) older = EnsureWindowsPath(args[-2]) yours = EnsureWindowsPath(args[-1]) - + # The command for which diff3 tool to use. diff_tool = args[1] - + if diff_tool == "--use-beyondcompare": exe = GetPathToBinary("c:/Progra~1/Beyond~1/BComp.exe") if not os.path.exists(exe): exe = GetPathToBinary("c:/Progra~2/Beyond~1/BComp.exe") - cmd = [exe, + cmd = [exe, mine, yours, older, @@ -74,9 +74,9 @@ def main(args): '/leftreadonly', '/rightreadonly', '/ignoreunimportant', - '/lefttitle', title_mine, - '/righttitle', title_yours, - '/centertitle', title_older, + '/lefttitle', title_mine, + '/righttitle', title_yours, + '/centertitle', title_older, '/outputtitle', 'merged'] elif diff_tool == "--use-kdiff3": exe = GetPathToBinary("c:/Progra~1/KDiff3/kdiff3.exe") @@ -106,7 +106,7 @@ def main(args): traceback.print_exc(file=sys.stdout) # After performing the merge, this script needs to print the contents - # of the merged file to stdout. + # of the merged file to stdout. # Return an errorcode of 0 on successful merge, 1 if unresolved conflicts # remain in the result. Any other errorcode will be treated as fatal. merged_file_contents = open(mine).read() diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp index 2afda67..afcb60f 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/PluginObject.cpp @@ -413,19 +413,19 @@ static bool destroyStream(PluginObject* obj, const NPVariant* args, uint32_t arg static bool testEnumerate(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result) { if (argCount == 2 && NPVARIANT_IS_OBJECT(args[0]) && NPVARIANT_IS_OBJECT(args[1])) { - uint32_t count; + uint32_t count; NPIdentifier* identifiers; if (browser->enumerate(obj->npp, NPVARIANT_TO_OBJECT(args[0]), &identifiers, &count)) { NPObject* outArray = NPVARIANT_TO_OBJECT(args[1]); NPIdentifier pushIdentifier = browser->getstringidentifier("push"); - + for (uint32_t i = 0; i < count; i++) { NPUTF8* string = browser->utf8fromidentifier(identifiers[i]); - + if (!string) continue; - + NPVariant args[1]; STRINGZ_TO_NPVARIANT(string, args[0]); NPVariant browserResult; @@ -433,12 +433,12 @@ static bool testEnumerate(PluginObject* obj, const NPVariant* args, uint32_t arg browser->releasevariantvalue(&browserResult); browser->memfree(string); } - + browser->memfree(identifiers); } - + VOID_TO_NPVARIANT(*result); - return true; + return true; } return false; } @@ -639,7 +639,7 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a // object before returning it and the calling JS gets a garbage // value. Firefox handles it fine. OBJECT_TO_NPVARIANT(NPVARIANT_TO_OBJECT(browserResult), *result); - } else { + } else { browser->releasevariantvalue(&browserResult); VOID_TO_NPVARIANT(*result); } @@ -682,21 +682,21 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a // NPObject. // Arguments: // arg1: Callback that returns a script object. - // arg2: Name of the method to call on the script object returned + // arg2: Name of the method to call on the script object returned // from the callback NPObject *windowScriptObject; - browser->getvalue(plugin->npp, NPNVWindowNPObject, + browser->getvalue(plugin->npp, NPNVWindowNPObject, &windowScriptObject); // Arg1 is the name of the callback NPUTF8* callbackString = createCStringFromNPVariant(&args[0]); - NPIdentifier callbackIdentifier = + NPIdentifier callbackIdentifier = browser->getstringidentifier(callbackString); free(callbackString); // Invoke a callback that returns a script object NPVariant object_result; - browser->invoke(plugin->npp, windowScriptObject, callbackIdentifier, + browser->invoke(plugin->npp, windowScriptObject, callbackIdentifier, &args[1], 1, &object_result); // Script object returned @@ -704,7 +704,7 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a // Arg2 is the name of the method to be called on the script object NPUTF8* object_mehod_string = createCStringFromNPVariant(&args[1]); - NPIdentifier object_method = + NPIdentifier object_method = browser->getstringidentifier(object_mehod_string); free(object_mehod_string); @@ -729,7 +729,7 @@ static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* a // value. Firefox handles it fine. OBJECT_TO_NPVARIANT(NPVARIANT_TO_OBJECT(object_method_result), *result); - } else { + } else { browser->releasevariantvalue(&object_method_result); VOID_TO_NPVARIANT(*result); } diff --git a/webkit/tools/npapi_layout_test_plugin/PluginObject.h b/webkit/tools/npapi_layout_test_plugin/PluginObject.h index f344a36..5027f22 100644 --- a/webkit/tools/npapi_layout_test_plugin/PluginObject.h +++ b/webkit/tools/npapi_layout_test_plugin/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. */ #include "webkit/glue/plugins/nphostapi.h" diff --git a/webkit/tools/npapi_layout_test_plugin/TestObject.cpp b/webkit/tools/npapi_layout_test_plugin/TestObject.cpp index e82ba13..659da76 100644 --- a/webkit/tools/npapi_layout_test_plugin/TestObject.cpp +++ b/webkit/tools/npapi_layout_test_plugin/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" @@ -35,10 +35,10 @@ static bool testGetProperty(NPObject *obj, NPIdentifier name, NPVariant *variant static NPObject *testAllocate(NPP npp, NPClass *theClass); static void testDeallocate(NPObject *obj); -static NPClass testClass = { +static NPClass testClass = { NP_CLASS_STRUCT_VERSION, - testAllocate, - testDeallocate, + testAllocate, + testDeallocate, 0, 0, 0, @@ -88,16 +88,16 @@ static NPObject *testAllocate(NPP npp, NPClass *theClass) static_cast<TestObject*>(malloc(sizeof(TestObject))); newInstance->testObject = NULL; ++testObjectCount; - + if (!identifiersInitialized) { identifiersInitialized = true; initializeIdentifiers(); } - + return reinterpret_cast<NPObject*>(newInstance); } -static void testDeallocate(NPObject *obj) +static void testDeallocate(NPObject *obj) { TestObject *testObject = reinterpret_cast<TestObject*>(obj); if (testObject->testObject) @@ -119,11 +119,11 @@ static bool testHasProperty(NPObject *obj, NPIdentifier name) if (testIdentifiers[i] == name) return true; } - + return false; } -static bool testGetProperty(NPObject *obj, NPIdentifier name, +static bool testGetProperty(NPObject *obj, NPIdentifier name, NPVariant *variant) { if (name == testIdentifiers[ID_PROPERTY_FOO]) { @@ -151,10 +151,10 @@ static bool testGetProperty(NPObject *obj, NPIdentifier name, static bool testEnumerate(NPObject *npobj, NPIdentifier **value, uint32_t *count) { *count = NUM_TEST_IDENTIFIERS; - + *value = (NPIdentifier*)browser->memalloc(NUM_TEST_IDENTIFIERS * sizeof(NPIdentifier)); memcpy(*value, testIdentifiers, sizeof(NPIdentifier) * NUM_TEST_IDENTIFIERS); - + return true; } diff --git a/webkit/tools/npapi_layout_test_plugin/TestObject.h b/webkit/tools/npapi_layout_test_plugin/TestObject.h index 2babaaf..812603c 100644 --- a/webkit/tools/npapi_layout_test_plugin/TestObject.h +++ b/webkit/tools/npapi_layout_test_plugin/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 "third_party/npapi/bindings/npapi.h" diff --git a/webkit/tools/npapi_layout_test_plugin/main.cpp b/webkit/tools/npapi_layout_test_plugin/main.cpp index dce0e3d..65426c0 100644 --- a/webkit/tools/npapi_layout_test_plugin/main.cpp +++ b/webkit/tools/npapi_layout_test_plugin/main.cpp @@ -1,33 +1,33 @@ /* IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in - consideration of your agreement to the following terms, and your use, installation, - modification or redistribution of this Apple software constitutes acceptance of these - terms. If you do not agree with these terms, please do not use, install, modify or + consideration of your agreement to the following terms, and your use, installation, + modification or redistribution of this Apple software constitutes acceptance of these + terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject to these - terms, Apple grants you a personal, non-exclusive license, under Apple’s copyrights in - this original Apple software (the "Apple Software"), to use, reproduce, modify and - redistribute the Apple Software, with or without modifications, in source and/or binary - forms; provided that if you redistribute the Apple Software in its entirety and without - modifications, you must retain this notice and the following text and disclaimers in all - such redistributions of the Apple Software. Neither the name, trademarks, service marks - or logos of Apple Computer, Inc. may be used to endorse or promote products derived from + + In consideration of your agreement to abide by the following terms, and subject to these + terms, Apple grants you a personal, non-exclusive license, under Apple’s copyrights in + this original Apple software (the "Apple Software"), to use, reproduce, modify and + redistribute the Apple Software, with or without modifications, in source and/or binary + forms; provided that if you redistribute the Apple Software in its entirety and without + modifications, you must retain this notice and the following text and disclaimers in all + such redistributions of the Apple Software. Neither the name, trademarks, service marks + or logos of Apple Computer, Inc. may be used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple - herein, including but not limited to any patent rights that may be infringed by your + herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, - EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, + EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, - REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND - WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, + REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND + WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -81,7 +81,7 @@ NPError NPAPI NP_GetEntryPoints(NPPluginFuncs *pluginFuncs) pluginFuncs->urlnotify = NPP_URLNotify; pluginFuncs->getvalue = NPP_GetValue; pluginFuncs->setvalue = NPP_SetValue; - + return NPERR_NO_ERROR; } @@ -93,7 +93,7 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ch { if (browser->version >= 14) { PluginObject* obj = (PluginObject*)browser->createobject(instance, getPluginClass()); - + for (int i = 0; i < argc; i++) { if (strcasecmp(argn[i], "onstreamload") == 0 && !obj->onStreamLoad) obj->onStreamLoad = strdup(argv[i]); @@ -104,10 +104,10 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ch else if (strcasecmp(argn[i], "logfirstsetwindow") == 0) obj->logSetWindow = TRUE; } - + instance->pdata = obj; } - + // On Windows and Unix, plugins only get events if they are windowless. return browser->setvalue(instance, NPPVpluginWindowBool, NULL); } @@ -141,7 +141,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow *window) if (window->window == NULL) { return NPERR_NO_ERROR; } - + PluginObject* obj = static_cast<PluginObject*>(instance->pdata); if (obj) { @@ -150,7 +150,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow *window) obj->logSetWindow = false; } } - + return NPERR_NO_ERROR; } @@ -220,7 +220,7 @@ int16 NPP_HandleEvent(NPP instance, void *event) PluginObject* obj = static_cast<PluginObject*>(instance->pdata); if (!obj->eventLogging) return 0; - + #ifdef WIN32 // Below is the event handling code. Per the NPAPI spec, the events don't // map directly between operating systems: @@ -268,7 +268,7 @@ int16 NPP_HandleEvent(NPP instance, void *event) printf("PLUGIN: loseFocusEvent\n"); break; default: - printf("PLUGIN: event %d\n", evt->event); + printf("PLUGIN: event %d\n", evt->event); } fflush(stdout); @@ -378,7 +378,7 @@ int16 NPP_HandleEvent(NPP instance, void *event) printf("PLUGIN: event %d\n", evt->what); } #endif - + return 0; } diff --git a/webkit/tools/npapi_layout_test_plugin/resource.h b/webkit/tools/npapi_layout_test_plugin/resource.h index c2bcf92..fe773d32 100644 --- a/webkit/tools/npapi_layout_test_plugin/resource.h +++ b/webkit/tools/npapi_layout_test_plugin/resource.h @@ -3,7 +3,7 @@ // Used by npapi_layout_test_plugin.rc // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 diff --git a/webkit/tools/test_shell/event_sending_controller.h b/webkit/tools/test_shell/event_sending_controller.h index aaa7a74..38715dd 100644 --- a/webkit/tools/test_shell/event_sending_controller.h +++ b/webkit/tools/test_shell/event_sending_controller.h @@ -8,7 +8,7 @@ Bound to a JavaScript window.eventSender object using CppBoundClass::BindToJavascript(), this allows layout tests that are run in the test_shell to fire DOM events. - + The OSX reference file is in WebKit/WebKitTools/DumpRenderTree/EventSendingController.m */ diff --git a/webkit/tools/test_shell/foreground_helper.h b/webkit/tools/test_shell/foreground_helper.h index 4829832..aeccef8 100644 --- a/webkit/tools/test_shell/foreground_helper.h +++ b/webkit/tools/test_shell/foreground_helper.h @@ -12,7 +12,7 @@ // move to the foreground, unless requested by the current window in the // foreground. For automated testing, we really want some of our windows // to be capable of moving to the foreground. -// +// // This is probably leveraging a windows bug. class ForegroundHelper : public CWindowImpl<ForegroundHelper> { public: @@ -21,7 +21,7 @@ BEGIN_MSG_MAP(ForegroundHelper) END_MSG_MAP() // Brings a window into the foreground. - // Can be called from any window, even if the caller is not the + // Can be called from any window, even if the caller is not the // foreground window. static HRESULT SetForeground(HWND window) { DCHECK(::IsWindow(window)); @@ -32,7 +32,7 @@ END_MSG_MAP() private: HRESULT ForegroundHotKey(HWND window) { - // This implementation registers a hot key (F22) and then + // This implementation registers a hot key (F22) and then // triggers the hot key. When receiving the hot key, we'll // be in the foreground and allowed to move the target window // into the foreground too. @@ -60,7 +60,7 @@ END_MSG_MAP() return E_FAIL; // Loop until we get the key. - // TODO: It may be possible to get stuck here if the + // TODO: It may be possible to get stuck here if the // message gets lost? while(GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); @@ -77,7 +77,7 @@ END_MSG_MAP() } // Handle the registered Hotkey being pressed. - LRESULT OnHotKey(UINT /*uMsg*/, WPARAM /*wParam*/, + LRESULT OnHotKey(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled) { HWND window = reinterpret_cast<HWND>(GetWindowLongPtr(GWLP_USERDATA)); SetForegroundWindow(window); diff --git a/webkit/tools/test_shell/image_decoder_unittest.cc b/webkit/tools/test_shell/image_decoder_unittest.cc index 89ed594..7a55eea 100644 --- a/webkit/tools/test_shell/image_decoder_unittest.cc +++ b/webkit/tools/test_shell/image_decoder_unittest.cc @@ -37,7 +37,7 @@ void SaveMD5Sum(const std::wstring& path, WebCore::RGBA32Buffer* buffer) { // Calculate MD5 sum. MD5Digest digest; - SkAutoLockPixels bmp_lock(buffer->bitmap()); + SkAutoLockPixels bmp_lock(buffer->bitmap()); MD5Sum(buffer->bitmap().getPixels(), buffer->rect().width() * buffer->rect().height() * sizeof(unsigned), &digest); @@ -60,7 +60,7 @@ void VerifyImage(WebCore::ImageDecoder* decoder, // Calculate MD5 sum. MD5Digest actual_digest; - SkAutoLockPixels bmp_lock(image_buffer->bitmap()); + SkAutoLockPixels bmp_lock(image_buffer->bitmap()); MD5Sum(image_buffer->bitmap().getPixels(), image_buffer->rect().width() * image_buffer->rect().height() * sizeof(unsigned), &actual_digest); diff --git a/webkit/tools/test_shell/mac/DumpRenderTreePasteboard.h b/webkit/tools/test_shell/mac/DumpRenderTreePasteboard.h index 60e2ab5..f2c1953 100644 --- a/webkit/tools/test_shell/mac/DumpRenderTreePasteboard.h +++ b/webkit/tools/test_shell/mac/DumpRenderTreePasteboard.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/webkit/tools/test_shell/mac/DumpRenderTreePasteboard.m b/webkit/tools/test_shell/mac/DumpRenderTreePasteboard.m index e8fa4ee..0e6731a 100644 --- a/webkit/tools/test_shell/mac/DumpRenderTreePasteboard.m +++ b/webkit/tools/test_shell/mac/DumpRenderTreePasteboard.m @@ -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/webkit/tools/test_shell/mac/test_shell_webview.mm b/webkit/tools/test_shell/mac/test_shell_webview.mm index 17d6b79..4767e63 100644 --- a/webkit/tools/test_shell/mac/test_shell_webview.mm +++ b/webkit/tools/test_shell/mac/test_shell_webview.mm @@ -35,7 +35,7 @@ - (void) dealloc { [self removeTrackingArea:trackingArea_]; [trackingArea_ release]; - + [super dealloc]; } @@ -43,7 +43,7 @@ CGContextRef context = reinterpret_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); - + // start by filling the rect with magenta, so that we can see what's drawn CGContextSetRGBFillColor (context, 1, 0, 1, 1); CGContextFillRect(context, NSRectToCGRect(rect)); @@ -53,7 +53,7 @@ // flip from cocoa coordinates client_rect.set_y([self frame].size.height - client_rect.height() - client_rect.y()); - + shell_->webViewHost()->UpdatePaintRect(client_rect); shell_->webViewHost()->Paint(); } @@ -81,8 +81,8 @@ - (IBAction)takeURLStringValueFrom:(NSTextField *)sender { NSString *url = [sender stringValue]; - - // if it doesn't already have a prefix, add http. If we can't parse it, + + // if it doesn't already have a prefix, add http. If we can't parse it, // just don't bother rather than making things worse. NSURL* tempUrl = [NSURL URLWithString:url]; if (tempUrl && ![tempUrl scheme]) @@ -182,7 +182,7 @@ shell_->webViewHost()->SetFocus(YES); return YES; } - + return NO; } @@ -191,7 +191,7 @@ shell_->webViewHost()->SetFocus(NO); return YES; } - + return NO; } diff --git a/webkit/tools/test_shell/mac/test_webview_delegate.mm b/webkit/tools/test_shell/mac/test_webview_delegate.mm index 48e2c3f..e80f75a 100755 --- a/webkit/tools/test_shell/mac/test_webview_delegate.mm +++ b/webkit/tools/test_shell/mac/test_webview_delegate.mm @@ -74,7 +74,7 @@ void TestWebViewDelegate::CloseWidgetSoon(WebWidget* webwidget) { } } -void TestWebViewDelegate::SetCursor(WebWidget* webwidget, +void TestWebViewDelegate::SetCursor(WebWidget* webwidget, const WebCursor& cursor) { NSCursor* ns_cursor = cursor.GetCursor(); [ns_cursor set]; @@ -114,7 +114,7 @@ void TestWebViewDelegate::GetRootWindowRect(WebWidget* webwidget, - (NSRect)_growBoxRect; @end -void TestWebViewDelegate::GetRootWindowResizerRect(WebWidget* webwidget, +void TestWebViewDelegate::GetRootWindowResizerRect(WebWidget* webwidget, gfx::Rect* out_rect) { NSRect resize_rect = NSMakeRect(0, 0, 0, 0); WebWidgetHost* host = GetHostForWidget(webwidget); @@ -131,8 +131,8 @@ void TestWebViewDelegate::GetRootWindowResizerRect(WebWidget* webwidget, // Convert to view coordinates from window coordinates. resize_rect = [view convertRect:resize_rect fromView:nil]; // Flip the rect in view coordinates - resize_rect.origin.y = - [view frame].size.height - resize_rect.origin.y - + resize_rect.origin.y = + [view frame].size.height - resize_rect.origin.y - resize_rect.size.height; } *out_rect = gfx::Rect(NSRectToCGRect(resize_rect)); diff --git a/webkit/tools/test_shell/mac/webwidget_host.mm b/webkit/tools/test_shell/mac/webwidget_host.mm index b99aca7..fd95535 100644 --- a/webkit/tools/test_shell/mac/webwidget_host.mm +++ b/webkit/tools/test_shell/mac/webwidget_host.mm @@ -23,7 +23,7 @@ WebWidgetHost* WebWidgetHost::Create(NSView* parent_view, content_rect.size.height -= 64; host->view_ = [[NSView alloc] initWithFrame:content_rect]; [parent_view addSubview:host->view_]; - + // win_util::SetWindowUserData(host->hwnd_, host); host->webwidget_ = WebWidget::Create(delegate); @@ -162,10 +162,10 @@ void WebWidgetHost::Paint() { [NSGraphicsContext setCurrentContext: [NSGraphicsContext graphicsContextWithGraphicsPort:bitmap_context flipped:NO]]; - + // This may result in more invalidation webwidget_->Layout(); - + // Scroll the canvas if necessary scroll_rect_ = client_rect.Intersect(scroll_rect_); if (!scroll_rect_.IsEmpty()) { @@ -188,7 +188,7 @@ void WebWidgetHost::Paint() { } } DCHECK(paint_rect_.IsEmpty()); - + // set the context back to our window [NSGraphicsContext setCurrentContext: view_context]; @@ -201,7 +201,7 @@ void WebWidgetHost::Paint() { { bitmap_width, bitmap_height } }; canvas_->getTopPlatformDevice().DrawToContext( context, 0, client_rect.height() - bitmap_height, &bitmap_rect); - + [view_ unlockFocus]; } } diff --git a/webkit/tools/test_shell/plugin_tests.cc b/webkit/tools/test_shell/plugin_tests.cc index 36737e4..5da7cf2 100644 --- a/webkit/tools/test_shell/plugin_tests.cc +++ b/webkit/tools/test_shell/plugin_tests.cc @@ -52,7 +52,7 @@ class PluginTest : public TestShellTest { void WaitForFinish(const std::string &name, const std::string &id) { test_shell_->WaitTestFinished(); - std::string cookies = + std::string cookies = request_context_->cookie_store()->GetCookies(test_url_); EXPECT_FALSE(cookies.empty()); @@ -115,7 +115,7 @@ class PluginTest : public TestShellTest { }; TEST_F(PluginTest, DISABLED_VerifyPluginWindowRect) { - std::wstring test_url = GetTestURL(plugin_data_dir_, + std::wstring test_url = GetTestURL(plugin_data_dir_, L"verify_plugin_window_rect.html"); NavigateToURL(test_url); WaitForFinish("checkwindowrect", "1"); diff --git a/webkit/tools/test_shell/resource.h b/webkit/tools/test_shell/resource.h index 7deb4b9..f2deaaf 100644 --- a/webkit/tools/test_shell/resource.h +++ b/webkit/tools/test_shell/resource.h @@ -4,7 +4,7 @@ // #define IDS_APP_TITLE 103 - + #define IDR_MAINFRAME 128 #define IDD_TESTSHELL_DIALOG 102 #define IDD_ABOUTBOX 103 @@ -26,7 +26,7 @@ #define IDC_STATIC -1 #endif // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS diff --git a/webkit/tools/test_shell/run_all_tests.cc b/webkit/tools/test_shell/run_all_tests.cc index 5cc12a2..ba37d68 100644 --- a/webkit/tools/test_shell/run_all_tests.cc +++ b/webkit/tools/test_shell/run_all_tests.cc @@ -30,7 +30,7 @@ #include "webkit/tools/test_shell/test_shell_webkit_init.h" #include "testing/gtest/include/gtest/gtest.h" -const char* TestShellTest::kJavascriptDelayExitScript = +const char* TestShellTest::kJavascriptDelayExitScript = "<script>" "window.layoutTestController.waitUntilDone();" "window.addEventListener('load', function() {" diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc index 79ffee0..696502b 100644 --- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc +++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc @@ -498,7 +498,7 @@ ResourceLoaderBridge* ResourceLoaderBridge::Create( headers, load_flags); } -// Issue the proxy resolve request on the io thread, and wait +// Issue the proxy resolve request on the io thread, and wait // for the result. bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { DCHECK(request_context); diff --git a/webkit/tools/test_shell/test_navigation_controller.cc b/webkit/tools/test_shell/test_navigation_controller.cc index cf9bff5..ff4a753 100644 --- a/webkit/tools/test_shell/test_navigation_controller.cc +++ b/webkit/tools/test_shell/test_navigation_controller.cc @@ -226,7 +226,7 @@ int TestNavigationController::GetEntryIndexWithPageID(int32 page_id) const { void TestNavigationController::NavigateToPendingEntry(bool reload) { // For session history navigations only the pending_entry_index_ is set. if (!pending_entry_) { - DCHECK(pending_entry_index_ != -1); + DCHECK(pending_entry_index_ != -1); pending_entry_ = entries_[pending_entry_index_].get(); } diff --git a/webkit/tools/test_shell/test_navigation_controller.h b/webkit/tools/test_shell/test_navigation_controller.h index f65c85a..aeec2bf 100644 --- a/webkit/tools/test_shell/test_navigation_controller.h +++ b/webkit/tools/test_shell/test_navigation_controller.h @@ -80,7 +80,7 @@ class TestNavigationEntry { std::string state_; mutable scoped_refptr<WebHistoryItem> cached_history_item_; - + std::wstring target_frame_; DISALLOW_COPY_AND_ASSIGN(TestNavigationEntry); diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc index 5cde156..fb56328 100644 --- a/webkit/tools/test_shell/test_shell_gtk.cc +++ b/webkit/tools/test_shell/test_shell_gtk.cc @@ -495,7 +495,7 @@ void TestShell::ResizeSubViews() { static_cast<TestShell*>(g_object_get_data(G_OBJECT(window), "test-shell")); shell->ResetTestController(); - // ResetTestController may have closed the window we were holding on to. + // ResetTestController may have closed the window we were holding on to. // Grab the first window again. window = *(TestShell::windowList()->begin()); shell = static_cast<TestShell*>(g_object_get_data(G_OBJECT(window), "test-shell")); diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm index dea940a..54c2859 100644 --- a/webkit/tools/test_shell/test_shell_mac.mm +++ b/webkit/tools/test_shell/test_shell_mac.mm @@ -109,8 +109,8 @@ FilePath GetResourcesFilePath() { // clean ourselves up and do the work after clearing the stack of anything // that might have the shell on it. - [self performSelectorOnMainThread:@selector(cleanup:) - withObject:window + [self performSelectorOnMainThread:@selector(cleanup:) + withObject:window waitUntilDone:NO]; return YES; @@ -161,7 +161,7 @@ void TestShell::PlatformShutdown() { } // assert if we have anything left over, that would be bad. DCHECK(window_map_.Get().size() == 0); - + // Dump the pasteboards we built up. [DumpRenderTreePasteboard releaseLocalPasteboards]; } @@ -173,9 +173,9 @@ void TestShell::InitializeTestShell(bool layout_test_mode) { window_list_ = new WindowList; layout_test_mode_ = layout_test_mode; - + web_prefs_ = new WebPreferences; - + ResetWebPreferences(); // Load the Ahem font, which is used by layout tests. @@ -214,7 +214,7 @@ NSButton* MakeTestButton(NSRect* rect, NSString* title, NSView* parent) { bool TestShell::Initialize(const std::wstring& startingURL) { // Perform application initialization: // send message to app controller? need to work this out - + // TODO(awalker): this is a straight recreation of windows test_shell.cc's // window creation code--we should really pull this from the nib and grab // references to the already-created subviews that way. @@ -230,30 +230,30 @@ bool TestShell::Initialize(const std::wstring& startingURL) { backing:NSBackingStoreBuffered defer:NO]; [m_mainWnd setTitle:@"TestShell"]; - + // Add to our map window_map_.Get()[m_mainWnd] = this; - + // Create a window delegate to watch for when it's asked to go away. It will // clean itself up so we don't need to hold a reference. [m_mainWnd setDelegate:[[WindowCloseDelegate alloc] init]]; - - // Rely on the window delegate to clean us up rather than immediately - // releasing when the window gets closed. We use the delegate to do + + // Rely on the window delegate to clean us up rather than immediately + // releasing when the window gets closed. We use the delegate to do // everything from the autorelease pool so the shell isn't on the stack // during cleanup (ie, a window close from javascript). [m_mainWnd setReleasedWhenClosed:NO]; - + // Create a webview. Note that |web_view| takes ownership of this shell so we // will get cleaned up when it gets destroyed. m_webViewHost.reset( WebViewHost::Create([m_mainWnd contentView], delegate_.get(), *TestShell::web_prefs_)); webView()->SetUseEditorDelegate(true); delegate_->RegisterDragDrop(); - TestShellWebView* web_view = + TestShellWebView* web_view = static_cast<TestShellWebView*>(m_webViewHost->view_handle()); [web_view setShell:this]; - + // create buttons NSRect button_rect = [[m_mainWnd contentView] bounds]; button_rect.origin.y = window_rect.size.height - URLBAR_HEIGHT + @@ -261,27 +261,27 @@ bool TestShell::Initialize(const std::wstring& startingURL) { button_rect.size.height = BUTTON_HEIGHT; button_rect.origin.x += BUTTON_MARGIN; button_rect.size.width = BUTTON_WIDTH; - + NSView* content = [m_mainWnd contentView]; - + NSButton* button = MakeTestButton(&button_rect, @"Back", content); [button setTarget:web_view]; [button setAction:@selector(goBack:)]; - + button = MakeTestButton(&button_rect, @"Forward", content); [button setTarget:web_view]; [button setAction:@selector(goForward:)]; - + // reload button button = MakeTestButton(&button_rect, @"Reload", content); [button setTarget:web_view]; [button setAction:@selector(reload:)]; - + // stop button button = MakeTestButton(&button_rect, @"Stop", content); [button setTarget:web_view]; [button setAction:@selector(stopLoading:)]; - + // text field for URL button_rect.origin.x += BUTTON_MARGIN; button_rect.size.width = [[m_mainWnd contentView] bounds].size.width - @@ -296,7 +296,7 @@ bool TestShell::Initialize(const std::wstring& startingURL) { // show the window [m_mainWnd makeKeyAndOrderFront: nil]; - + // Load our initial content. if (!startingURL.empty()) LoadURL(startingURL.c_str()); @@ -315,7 +315,7 @@ bool TestShell::Initialize(const std::wstring& startingURL) { void TestShell::TestFinished() { if (!test_is_pending_) return; // reached when running under test_shell_tests - + test_is_pending_ = false; NSWindow* window = *(TestShell::windowList()->begin()); WindowMap::iterator it = window_map_.Get().find(window); @@ -347,14 +347,14 @@ void TestShell::TestFinished() { - (void)run:(id)ignore { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - + // check for debugger, just bail if so. We don't want the timeouts hitting // when we're trying to track down an issue. if (DebugUtil::BeingDebugged()) return; - + NSThread* currentThread = [NSThread currentThread]; - + // Wait to be cancelled. If we are that means the test finished. If it hasn't, // then we need to tell the layout script we timed out and start again. NSDate* limitDate = [NSDate dateWithTimeIntervalSinceNow:timeout_]; @@ -381,26 +381,26 @@ void TestShell::TestFinished() { void TestShell::WaitTestFinished() { DCHECK(!test_is_pending_) << "cannot be used recursively"; - + test_is_pending_ = true; - + // Create a watchdog thread which just sets a timer and // kills the process if it times out. This catches really - // bad hangs where the shell isn't coming back to the - // message loop. If the watchdog is what catches a + // bad hangs where the shell isn't coming back to the + // message loop. If the watchdog is what catches a // timeout, it can't do anything except terminate the test // shell, which is unfortunate. // Windows multiplies by 2.5, but that causes us to run for far, far too // long. We use the passed value and let the scripts flag override // the value as needed. NSTimeInterval timeout_seconds = GetLayoutTestTimeoutInSeconds(); - WatchDogTarget* watchdog = [[[WatchDogTarget alloc] + WatchDogTarget* watchdog = [[[WatchDogTarget alloc] initWithTimeout:timeout_seconds] autorelease]; NSThread* thread = [[NSThread alloc] initWithTarget:watchdog - selector:@selector(run:) + selector:@selector(run:) object:nil]; [thread start]; - + // TestFinished() will post a quit message to break this loop when the page // finishes loading. while (test_is_pending_) @@ -444,7 +444,7 @@ WebWidget* TestShell::CreatePopupWidget(WebView* webview) { DCHECK(!m_popupHost); m_popupHost = WebWidgetHost::Create(NULL, delegate_.get()); // ShowWindow(popupWnd(), SW_SHOW); - + return m_popupHost->webwidget(); } @@ -492,7 +492,7 @@ void TestShell::ResizeSubViews() { DCHECK(shell); shell->ResetTestController(); - // ResetTestController may have closed the window we were holding on to. + // ResetTestController may have closed the window we were holding on to. // Grab the first window again. window = *(TestShell::windowList()->begin()); shell = window_map_.Get()[window]; @@ -536,7 +536,7 @@ void TestShell::LoadURLForFrame(const wchar_t* url, const wchar_t* frame_name) { if (!url) return; - + std::string url8 = WideToUTF8(url); bool bIsSVGTest = strstr(url8.c_str(), "W3C-SVG-1.1") > 0; @@ -567,12 +567,12 @@ bool TestShell::PromptForSaveFile(const wchar_t* prompt_title, std::wstring* result) { NSSavePanel* save_panel = [NSSavePanel savePanel]; - + /* set up new attributes */ [save_panel setRequiredFileType:@"txt"]; [save_panel setMessage: [NSString stringWithUTF8String:WideToUTF8(prompt_title).c_str()]]; - + /* display the NSSavePanel */ if ([save_panel runModalForDirectory:NSHomeDirectory() file:@""] == NSOKButton) { diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index 01afc6d..859fd5f 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -52,15 +52,15 @@ static int kStatsFileCounters = 200; int main(int argc, char* argv[]) { base::EnableTerminationOnHeapCorruption(); - + // Some tests may use base::Singleton<>, thus we need to instanciate // the AtExitManager or else we will leak objects. - base::AtExitManager at_exit_manager; + base::AtExitManager at_exit_manager; TestShellPlatformDelegate::PreflightArgs(&argc, &argv); CommandLine::Init(argc, argv); const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); - + TestShellPlatformDelegate platform(parsed_command_line); if (parsed_command_line.HasSwitch(test_shell::kStartupDialog)) @@ -100,9 +100,9 @@ int main(int argc, char* argv[]) { base::TraceLog::StartTracing(); net::HttpCache::Mode cache_mode = net::HttpCache::NORMAL; - bool playback_mode = + bool playback_mode = parsed_command_line.HasSwitch(test_shell::kPlaybackMode); - bool record_mode = + bool record_mode = parsed_command_line.HasSwitch(test_shell::kRecordMode); if (playback_mode) diff --git a/webkit/tools/test_shell/test_shell_platform_delegate.h b/webkit/tools/test_shell/test_shell_platform_delegate.h index 5be147a..19ffbd7 100644 --- a/webkit/tools/test_shell/test_shell_platform_delegate.h +++ b/webkit/tools/test_shell/test_shell_platform_delegate.h @@ -48,7 +48,7 @@ class TestShellPlatformDelegate { // settings. Normally called by the destructor, but also called before // abort() (example: test timeouts). void AboutToExit(); - + // SetWindowPositionForRecording: if the platform's implementation of // EventRecorder requires the window to be in a particular absolute position, // make it so. This is called by TestShell after it creates the window. diff --git a/webkit/tools/test_shell/test_shell_platform_delegate_gtk.cc b/webkit/tools/test_shell/test_shell_platform_delegate_gtk.cc index 52b1d49..78dd552 100644 --- a/webkit/tools/test_shell/test_shell_platform_delegate_gtk.cc +++ b/webkit/tools/test_shell/test_shell_platform_delegate_gtk.cc @@ -10,7 +10,7 @@ #include "webkit/tools/test_shell/test_shell_platform_delegate.h" void TestShellPlatformDelegate::PreflightArgs(int *argc, char ***argv) { - gtk_init(argc, argv); + gtk_init(argc, argv); } void TestShellPlatformDelegate::SelectUnifiedTheme() { diff --git a/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm b/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm index 76e0757..0583f72 100644 --- a/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm +++ b/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm @@ -28,9 +28,9 @@ static void SetDefaultsToLayoutTestValues(void) { // preferences that control appearance to match. // (We want to do this as early as possible in application startup so // the settings are in before any higher layers could cache values.) - + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - + const NSInteger kMinFontSizeCGSmoothes = 4; const NSInteger kNoFontSmoothing = 0; const NSInteger kBlueTintedAppearance = 1; @@ -46,7 +46,7 @@ static void SetDefaultsToLayoutTestValues(void) { forKey:@"AppleOtherHighlightColor"]; [defaults setObject:[NSArray arrayWithObject:@"en"] forKey:@"AppleLanguages"]; - + // AppKit pulls scrollbar style from NSUserDefaults. HIToolbox uses // CFPreferences, but AnyApplication, so we set it, force it to load, and // then reset the pref to what it was (HIToolbox will cache what it loaded). @@ -78,9 +78,9 @@ static void SetDefaultsToLayoutTestValues(void) { static void ClearAnyDefaultsForLayoutTests(void) { // Not running a test, clear the keys so the TestShell looks right to the // running user. - + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - + [defaults removeObjectForKey:@"AppleAntiAliasingThreshold"]; [defaults removeObjectForKey:@"AppleFontSmoothing"]; [defaults removeObjectForKey:@"AppleAquaColorVariant"]; @@ -96,7 +96,7 @@ static void RestoreUsersColorProfile(void) { // This is called from the unsafe signal handers, so doing just about anything // isn't really safe. But since we're already gonna crash, we give it a try // anyways... (and WebKit uses this strategy...) - + if (gUsersColorProfile) { CGDirectDisplayID displayID = CGMainDisplayID(); CMError error = CMSetProfileByAVID((UInt32)displayID, gUsersColorProfile); @@ -127,7 +127,7 @@ static void InstallLayoutTestColorProfile(void) { // we force the generic rgb color profile. This cases a change the user can // see. We use the same basic method as WebKit for trying to make sure we // get the profile back if we go down in flames. - + // Save off the current CGDirectDisplayID displayID = CGMainDisplayID(); CMProfileRef previousProfile; @@ -137,7 +137,7 @@ static void InstallLayoutTestColorProfile(void) { "pixmaps won't match. Error: " << (int)error; return; } - + // Install the generic one NSColorSpace *genericSpace = [NSColorSpace genericRGBColorSpace]; CMProfileRef genericProfile = (CMProfileRef)[genericSpace colorSyncProfile]; @@ -146,7 +146,7 @@ static void InstallLayoutTestColorProfile(void) { "pixmaps won't match. Error: " << (int)error; return; } - + // Save the starting profile, and hook in as best we can to make sure when // we exit, it's restored (use atexit() so direct calls to exit() call us). gUsersColorProfile = previousProfile; @@ -173,13 +173,13 @@ static void InstallLayoutTestColorProfile(void) { static void SwizzleAllMethods(Class imposter, Class original) { unsigned int imposterMethodCount = 0; Method* imposterMethods = class_copyMethodList(imposter, &imposterMethodCount); - + unsigned int originalMethodCount = 0; Method* originalMethods = class_copyMethodList(original, &originalMethodCount); - + for (unsigned int i = 0; i < imposterMethodCount; i++) { SEL imposterMethodName = method_getName(imposterMethods[i]); - + // Attempt to add the method to the original class. If it fails, the method // already exists and we should instead exchange the implementations. if (class_addMethod(original, @@ -188,7 +188,7 @@ static void SwizzleAllMethods(Class imposter, Class original) { method_getTypeEncoding(originalMethods[i]))) { continue; } - + unsigned int j = 0; for (; j < originalMethodCount; j++) { SEL originalMethodName = method_getName(originalMethods[j]); @@ -196,13 +196,13 @@ static void SwizzleAllMethods(Class imposter, Class original) { break; } } - + // If class_addMethod failed above then the method must exist on the // original class. DCHECK(j < originalMethodCount) << "method wasn't found?"; method_exchangeImplementations(imposterMethods[i], originalMethods[j]); } - + if (imposterMethods) { free(imposterMethods); } @@ -215,7 +215,7 @@ static void SwizzleAllMethods(Class imposter, Class original) { static void SwizzleNSPasteboard(void) { // We replace NSPaseboard w/ the shim (from WebKit) that avoids having // sideeffects w/ whatever the user does at the same time. - + Class imposterClass = objc_getClass("DumpRenderTreePasteboard"); Class originalClass = objc_getClass("NSPasteboard"); #if OBJC_API_VERSION == 0 @@ -270,7 +270,7 @@ void TestShellPlatformDelegate::SetWindowPositionForRecording(TestShell *) { void TestShellPlatformDelegate::SelectUnifiedTheme() { SetDefaultsToLayoutTestValues(); SwizzleNSPasteboard(); - + if (command_line_.HasSwitch(test_shell::kDumpPixels)) { InstallLayoutTestColorProfile(); } @@ -280,6 +280,6 @@ void TestShellPlatformDelegate::SuppressErrorReporting() { // If we die during tests, we don't want to be spamming the user's crash // reporter. Set our exception port to null. task_set_exception_ports(mach_task_self(), EXC_MASK_ALL, MACH_PORT_NULL, - EXCEPTION_DEFAULT, THREAD_STATE_NONE); + EXCEPTION_DEFAULT, THREAD_STATE_NONE); } diff --git a/webkit/tools/test_shell/test_shell_test.cc b/webkit/tools/test_shell/test_shell_test.cc index 4b5a37e..1ce279a 100644 --- a/webkit/tools/test_shell/test_shell_test.cc +++ b/webkit/tools/test_shell/test_shell_test.cc @@ -10,7 +10,7 @@ #include "base/path_service.h" #include "base/string_util.h" -std::wstring TestShellTest::GetTestURL(std::wstring test_case_path, +std::wstring TestShellTest::GetTestURL(std::wstring test_case_path, const std::wstring& test_case) { file_util::AppendToPath(&test_case_path, test_case); return test_case_path; @@ -33,7 +33,7 @@ void TestShellTest::TearDown() { test_shell_->LoadURL(L"about:blank"); test_shell_->DestroyWindow(test_shell_->mainWnd()); LayoutTestController::ClearShell(); - + // Flush the MessageLoop of any residual tasks. MessageLoop::current()->RunAllPending(); } diff --git a/webkit/tools/test_shell/test_shell_test.h b/webkit/tools/test_shell/test_shell_test.h index 6cff03b..137fc71 100644 --- a/webkit/tools/test_shell/test_shell_test.h +++ b/webkit/tools/test_shell/test_shell_test.h @@ -17,7 +17,7 @@ class TestShellTest : public testing::Test { protected: // Returns the path "test_case_path/test_case". - std::wstring GetTestURL(std::wstring test_case_path, + std::wstring GetTestURL(std::wstring test_case_path, const std::wstring& test_case); virtual void SetUp(); @@ -27,7 +27,7 @@ class TestShellTest : public testing::Test { virtual void CreateEmptyWindow(); static const char* kJavascriptDelayExitScript; - + protected: // Location of SOURCE_ROOT/webkit/data/ std::wstring data_dir_; diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h index 75f7c4c..dd98b33 100644 --- a/webkit/tools/test_shell/test_shell_webkit_init.h +++ b/webkit/tools/test_shell/test_shell_webkit_init.h @@ -19,7 +19,7 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { public: TestShellWebKitInit(bool layout_test_mode) { WebKit::initialize(this); - WebKit::setLayoutTestMode(layout_test_mode); + WebKit::setLayoutTestMode(layout_test_mode); WebKit::registerURLSchemeAsLocal( ASCIIToUTF16(webkit_glue::GetUIResourceProtocol())); } diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc index 045c8b8..c1d3ff1 100644 --- a/webkit/tools/test_shell/test_shell_win.cc +++ b/webkit/tools/test_shell/test_shell_win.cc @@ -244,7 +244,7 @@ bool TestShell::RunFileTest(const TestParams& params) { // after we invoke StopLoading. shell->ResetTestController(); - // ResetTestController may have closed the window we were holding on to. + // ResetTestController may have closed the window we were holding on to. // Grab the first window again. hwnd = *(TestShell::windowList()->begin()); shell = static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc index c74b64f..8c9399c 100755 --- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc +++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc @@ -122,7 +122,7 @@ void TestWebViewDelegate::CloseWidgetSoon(WebWidget* webwidget) { } } -void TestWebViewDelegate::SetCursor(WebWidget* webwidget, +void TestWebViewDelegate::SetCursor(WebWidget* webwidget, const WebCursor& cursor) { current_cursor_ = cursor; GdkCursorType cursor_type = current_cursor_.GetCursorType(); @@ -194,7 +194,7 @@ void TestWebViewDelegate::GetRootWindowRect(WebWidget* webwidget, } } -void TestWebViewDelegate::GetRootWindowResizerRect(WebWidget* webwidget, +void TestWebViewDelegate::GetRootWindowResizerRect(WebWidget* webwidget, gfx::Rect* out_rect) { // Not necessary on Linux. *out_rect = gfx::Rect(); diff --git a/webkit/tools/test_shell/test_webview_delegate_win.cc b/webkit/tools/test_shell/test_webview_delegate_win.cc index e9fff70..b6935e8 100755 --- a/webkit/tools/test_shell/test_webview_delegate_win.cc +++ b/webkit/tools/test_shell/test_webview_delegate_win.cc @@ -124,7 +124,7 @@ void TestWebViewDelegate::GetRootWindowRect(WebWidget* webwidget, } } -void TestWebViewDelegate::GetRootWindowResizerRect(WebWidget* webwidget, +void TestWebViewDelegate::GetRootWindowResizerRect(WebWidget* webwidget, gfx::Rect* out_rect) { // Not necessary on Windows. *out_rect = gfx::Rect(); diff --git a/webkit/tools/test_shell/webwidget_host_win.cc b/webkit/tools/test_shell/webwidget_host_win.cc index b8430af..fc4be75 100644 --- a/webkit/tools/test_shell/webwidget_host_win.cc +++ b/webkit/tools/test_shell/webwidget_host_win.cc @@ -213,7 +213,7 @@ void WebWidgetHost::Paint() { RECT r; GetClientRect(view_, &r); gfx::Rect client_rect(r); - + // Allocate a canvas if necessary if (!canvas_.get()) { ResetScrollRect(); diff --git a/webkit/tools/webcore_unit_tests/BMPImageDecoder_unittest.cpp b/webkit/tools/webcore_unit_tests/BMPImageDecoder_unittest.cpp index 763cf00..4d8b55a 100644 --- a/webkit/tools/webcore_unit_tests/BMPImageDecoder_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/BMPImageDecoder_unittest.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/tools/webcore_unit_tests/GKURL_unittest.cpp b/webkit/tools/webcore_unit_tests/GKURL_unittest.cpp index 683b6a2..3f84e8d 100644 --- a/webkit/tools/webcore_unit_tests/GKURL_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/GKURL_unittest.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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 @@ -358,7 +358,7 @@ TEST(GKURL, ReplaceInvalid) { EXPECT_FALSE(gurl.isValid()); EXPECT_TRUE(gurl.isEmpty()); EXPECT_STREQ("", gurl.string().utf8().data()); - + gurl.setProtocol("http"); // GKURL will say that a URL with just a scheme is invalid, KURL will not. #if USE(GOOGLEURL) @@ -451,7 +451,7 @@ TEST(GKURL, Ref) { cur = gurl; cur.setRef("asdf"); EXPECT_STREQ("http://foo/bar#asdf", cur.string().utf8().data()); - + // Setting a ref to the empty string will set it to "#". cur = WebCore::KURL("http://foo/bar"); cur.setRef(""); diff --git a/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp b/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp index d49706a..3d6b0f9 100644 --- a/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp b/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp index 46b955f..07366c8 100644 --- a/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/TransparencyWin_unittest.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 @@ -117,7 +117,7 @@ TEST(TransparencyWin, NoLayer) EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize); EXPECT_TRUE(IntRect(1, 1, 14, 12) == helper.drawRect()); } - + // Untransform is not allowed for NoLayer. // ScaleTransform @@ -168,7 +168,7 @@ TEST(TransparencyWin, WhiteLayer) EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize); EXPECT_TRUE(IntRect(0, 0, 14, 12) == helper.drawRect()); } - + // ScaleTransform src->context()->save(); src->context()->scale(FloatSize(2.0, 0.5)); @@ -251,7 +251,7 @@ TEST(TransparencyWin, OpaqueCompositeLayer) EXPECT_TRUE(IntSize(14, 12) == helper.m_layerSize); EXPECT_TRUE(IntRect(0, 0, 14, 12) == helper.drawRect()); } - + // ScaleTransform src->context()->save(); src->context()->scale(FloatSize(2.0, 0.5)); @@ -676,4 +676,4 @@ TEST(TransparencyWin, Text) EXPECT_EQ(Color::transparent, getPixelAt(src->context(), 7, 0)); } -} // namespace WebCore
\ No newline at end of file +} // namespace WebCore diff --git a/webkit/tools/webcore_unit_tests/UniscribeHelper_unittest.cpp b/webkit/tools/webcore_unit_tests/UniscribeHelper_unittest.cpp index 6410828..d61f90f 100644 --- a/webkit/tools/webcore_unit_tests/UniscribeHelper_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/UniscribeHelper_unittest.cpp @@ -136,4 +136,4 @@ TEST_F(UniscribeTest, TooBig) EXPECT_EQ(0, uniscribe.xToCharacter(0)); EXPECT_EQ(0, uniscribe.xToCharacter(1000)); } -}
\ No newline at end of file +} diff --git a/webkit/tools/webcore_unit_tests/XBMImageDecoder_unittest.cpp b/webkit/tools/webcore_unit_tests/XBMImageDecoder_unittest.cpp index 1140813..0f34238 100644 --- a/webkit/tools/webcore_unit_tests/XBMImageDecoder_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/XBMImageDecoder_unittest.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2008, 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 |