diff options
Diffstat (limited to 'webkit/glue')
58 files changed, 256 insertions, 256 deletions
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. |