diff options
author | eseidel@chromium.org <eseidel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 23:01:38 +0000 |
---|---|---|
committer | eseidel@chromium.org <eseidel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-09 23:01:38 +0000 |
commit | e196ef7be9c7f849fdb45da40787a1e7084c9467 (patch) | |
tree | d8551822858085ee10c6a6f20912a58d3ea7fb91 | |
parent | beffa891fab62c2654e05d64e10ac793ee08a2d2 (diff) | |
download | chromium_src-e196ef7be9c7f849fdb45da40787a1e7084c9467.zip chromium_src-e196ef7be9c7f849fdb45da40787a1e7084c9467.tar.gz chromium_src-e196ef7be9c7f849fdb45da40787a1e7084c9467.tar.bz2 |
Fix style errors in the first set of src/ files.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/371084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31497 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/api/src/AutocompletePopupMenuClient.cpp | 8 | ||||
-rw-r--r-- | webkit/api/src/ChromiumBridge.cpp | 2 | ||||
-rw-r--r-- | webkit/api/src/DOMUtilitiesPrivate.cpp | 2 | ||||
-rw-r--r-- | webkit/api/src/DragClientImpl.h | 2 | ||||
-rw-r--r-- | webkit/api/src/FrameLoaderClientImpl.h | 6 | ||||
-rw-r--r-- | webkit/api/src/SocketStreamHandle.cpp | 7 | ||||
-rw-r--r-- | webkit/api/src/WebAccessibilityCacheImpl.h | 2 | ||||
-rw-r--r-- | webkit/api/src/WebBindings.cpp | 8 | ||||
-rw-r--r-- | webkit/api/src/WebColor.cpp | 29 | ||||
-rw-r--r-- | webkit/api/src/WebFrameImpl.h | 18 | ||||
-rw-r--r-- | webkit/api/src/WebImageSkia.cpp | 9 | ||||
-rw-r--r-- | webkit/api/src/WebInputEvent.cpp | 3 | ||||
-rw-r--r-- | webkit/api/src/WebMediaPlayerClientImpl.h | 3 | ||||
-rw-r--r-- | webkit/api/src/gtk/WebFontInfo.cpp | 5 | ||||
-rw-r--r-- | webkit/api/src/gtk/WebInputEventFactory.cpp | 11 | ||||
-rw-r--r-- | webkit/api/src/gtk/WebScreenInfoFactory.cpp | 3 |
16 files changed, 55 insertions, 63 deletions
diff --git a/webkit/api/src/AutocompletePopupMenuClient.cpp b/webkit/api/src/AutocompletePopupMenuClient.cpp index e4d0ee5..62d4dff 100644 --- a/webkit/api/src/AutocompletePopupMenuClient.cpp +++ b/webkit/api/src/AutocompletePopupMenuClient.cpp @@ -106,14 +106,14 @@ PopupMenuStyle AutocompletePopupMenuClient::menuStyle() const int AutocompletePopupMenuClient::clientPaddingLeft() const { - // Bug http://crbug.com/7708 seems to indicate the style can be NULL. + // Bug http://crbug.com/7708 seems to indicate the style can be 0. RenderStyle* style = textFieldStyle(); return style ? m_webView->theme()->popupInternalPaddingLeft(style) : 0; } int AutocompletePopupMenuClient::clientPaddingRight() const { - // Bug http://crbug.com/7708 seems to indicate the style can be NULL. + // Bug http://crbug.com/7708 seems to indicate the style can be 0. RenderStyle* style = textFieldStyle(); return style ? m_webView->theme()->popupInternalPaddingRight(style) : 0; } @@ -166,8 +166,8 @@ RenderStyle* AutocompletePopupMenuClient::textFieldStyle() const { RenderStyle* style = m_textField->computedStyle(); if (!style) { - // It seems we can only have an NULL style in a TextField if the - // node is dettached, in which case we the popup shoud not be + // It seems we can only have a 0 style in a TextField if the + // node is detached, in which case we the popup shoud not be // showing. Please report this in http://crbug.com/7708 and // include the page you were visiting. ASSERT_NOT_REACHED(); diff --git a/webkit/api/src/ChromiumBridge.cpp b/webkit/api/src/ChromiumBridge.cpp index 72d37b8..8d63c5f 100644 --- a/webkit/api/src/ChromiumBridge.cpp +++ b/webkit/api/src/ChromiumBridge.cpp @@ -308,7 +308,7 @@ String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_ #if ENABLE(DATABASE) PlatformFileHandle ChromiumBridge::databaseOpenFile(const String& fileName, int desiredFlags, PlatformFileHandle* dirHandle) { - return webKitClient()->databaseOpenFile(WebString(fileName), desiredFlags, dirHandle); + return webKitClient()->databaseOpenFile(WebString(fileName), desiredFlags, dirHandle); } int ChromiumBridge::databaseDeleteFile(const String& fileName, bool syncDir) diff --git a/webkit/api/src/DOMUtilitiesPrivate.cpp b/webkit/api/src/DOMUtilitiesPrivate.cpp index 89c7425..e84d4fb 100644 --- a/webkit/api/src/DOMUtilitiesPrivate.cpp +++ b/webkit/api/src/DOMUtilitiesPrivate.cpp @@ -35,8 +35,8 @@ #include "HTMLInputElement.h" #include "HTMLLinkElement.h" #include "HTMLMetaElement.h" -#include "HTMLOptionElement.h" #include "HTMLNames.h" +#include "HTMLOptionElement.h" #include "Node.h" using namespace WebCore; diff --git a/webkit/api/src/DragClientImpl.h b/webkit/api/src/DragClientImpl.h index 7012370..fc4c608 100644 --- a/webkit/api/src/DragClientImpl.h +++ b/webkit/api/src/DragClientImpl.h @@ -31,8 +31,8 @@ #ifndef DragClientImpl_h #define DragClientImpl_h -#include "DragClient.h" #include "DragActions.h" +#include "DragClient.h" namespace WebCore { class ClipBoard; diff --git a/webkit/api/src/FrameLoaderClientImpl.h b/webkit/api/src/FrameLoaderClientImpl.h index 010b526..d5592f9 100644 --- a/webkit/api/src/FrameLoaderClientImpl.h +++ b/webkit/api/src/FrameLoaderClientImpl.h @@ -31,14 +31,16 @@ #ifndef FrameLoaderClientImpl_h #define FrameLoaderClientImpl_h -#include "FrameLoaderClient.h" -#include "KURL.h" // FIXME: remove this relative path once consumers from glue are removed. #include "../public/WebNavigationPolicy.h" +#include "FrameLoaderClient.h" +#include "KURL.h" #include <wtf/PassOwnPtr.h> #include <wtf/RefPtr.h> + namespace WebKit { + class WebFrameImpl; class WebPluginContainerImpl; class WebPluginLoadObserver; diff --git a/webkit/api/src/SocketStreamHandle.cpp b/webkit/api/src/SocketStreamHandle.cpp index effd6a2..356733c 100644 --- a/webkit/api/src/SocketStreamHandle.cpp +++ b/webkit/api/src/SocketStreamHandle.cpp @@ -77,8 +77,7 @@ private: int m_pendingAmountSent; }; -SocketStreamHandleInternal::SocketStreamHandleInternal( - SocketStreamHandle *handle) +SocketStreamHandleInternal::SocketStreamHandleInternal(SocketStreamHandle* handle) : m_handle(handle) , m_maxPendingSendAllowed(0) , m_pendingAmountSent(0) @@ -181,7 +180,7 @@ void SocketStreamHandleInternal::didClose(WebSocketStreamHandle* socketHandle) ASSERT(socketHandle == m_socket.get()); m_socket.clear(); SocketStreamHandle* h = m_handle; - m_handle = NULL; + m_handle = 0; if (h->m_client) h->m_client->didClose(h); } @@ -194,7 +193,7 @@ void SocketStreamHandleInternal::didFail(WebSocketStreamHandle* socketHandle, co ASSERT(socketHandle == m_socket.get()); m_socket.clear(); SocketStreamHandle* h = m_handle; - m_handle = NULL; + m_handle = 0; if (h->m_client) h->m_client->didClose(h); // didFail(h, err); } diff --git a/webkit/api/src/WebAccessibilityCacheImpl.h b/webkit/api/src/WebAccessibilityCacheImpl.h index 1173a41..e929ce4 100644 --- a/webkit/api/src/WebAccessibilityCacheImpl.h +++ b/webkit/api/src/WebAccessibilityCacheImpl.h @@ -33,11 +33,11 @@ // FIXME: Move wtf/RefCounted.h include to AccessibilityObjectWrapper.h // once this file is upstream. -#include <wtf/RefCounted.h> #include "AccessibilityObjectWrapper.h" #include "WebAccessibilityCache.h" #include <wtf/HashMap.h> #include <wtf/PassRefPtr.h> +#include <wtf/RefCounted.h> namespace WebKit { diff --git a/webkit/api/src/WebBindings.cpp b/webkit/api/src/WebBindings.cpp index 0bbb0ca..73993b6 100644 --- a/webkit/api/src/WebBindings.cpp +++ b/webkit/api/src/WebBindings.cpp @@ -210,7 +210,7 @@ static v8::Local<v8::Value> getEvent(const v8::Handle<v8::Context>& context) static bool getDragDataImpl(NPObject* npobj, int* eventId, WebDragData* data) { - if (npobj == NULL) + if (!npobj) return false; if (npobj->_class != npScriptObjectClass) return false; @@ -223,7 +223,7 @@ static bool getDragDataImpl(NPObject* npobj, int* eventId, WebDragData* data) // Get the current WebCore event. v8::Handle<v8::Value> currentEvent(getEvent(context)); Event* event = V8DOMWrapper::convertToNativeEvent(currentEvent); - if (event == NULL) + if (!event) return false; // Check that the given npobj is that event. @@ -273,7 +273,7 @@ static bool getDragDataImpl(NPObject* npobj, int* eventId, WebDragData* data) if (dataObject && data) *data = WebDragData(dataObject); - return dataObject != NULL; + return dataObject; } static bool getRangeImpl(NPObject* npobj, WebRange* range) @@ -306,7 +306,7 @@ bool WebBindings::getDragData(NPObject* event, int* eventId, WebDragData* data) bool WebBindings::isDragEvent(NPObject* event) { int eventId; - return getDragData(event, &eventId, NULL); + return getDragData(event, &eventId, 0); } bool WebBindings::getRange(NPObject* range, WebRange* webrange) diff --git a/webkit/api/src/WebColor.cpp b/webkit/api/src/WebColor.cpp index 9bd582ae..9323433 100644 --- a/webkit/api/src/WebColor.cpp +++ b/webkit/api/src/WebColor.cpp @@ -111,26 +111,19 @@ static int toCSSValueKeyword(WebColorName in_value) void setNamedColors(const WebColorName* colorNames, const WebColor* colors, size_t length) { - for (size_t i = 0; i < length; ++i) { - WebColorName colorName = colorNames[i]; - WebColor color = colors[i]; + for (size_t i = 0; i < length; ++i) { + WebColorName colorName = colorNames[i]; + WebColor color = colors[i]; - // Convert color to internal value identifier. - int internalColorName = toCSSValueKeyword(colorName); - - if (internalColorName == CSSValueWebkitFocusRingColor) - { - RenderTheme::setCustomFocusRingColor(color); - continue; - } - - // TODO(jeremy): Set Color in RenderTheme. - UNUSED_PARAM(internalColorName); // Suppress compiler warnings for now. - UNUSED_PARAM(colorName); - UNUSED_PARAM(color); - } + // Convert color to internal value identifier. + int internalColorName = toCSSValueKeyword(colorName); + if (internalColorName == CSSValueWebkitFocusRingColor) { + RenderTheme::setCustomFocusRingColor(color); + continue; + } + } - // TODO(jeremy): Tell RenderTheme to update colors. + // TODO(jeremy): Tell RenderTheme to update colors. } } // WebKit diff --git a/webkit/api/src/WebFrameImpl.h b/webkit/api/src/WebFrameImpl.h index f6098a7..6c07ee8 100644 --- a/webkit/api/src/WebFrameImpl.h +++ b/webkit/api/src/WebFrameImpl.h @@ -31,11 +31,11 @@ #ifndef WebFrameImpl_h #define WebFrameImpl_h +// FIXME: remove this relative path once consumers from glue are removed. +#include "../public/WebFrame.h" #include "Frame.h" #include "FrameLoaderClientImpl.h" #include "PlatformString.h" -// FIXME: remove this relative path once consumers from glue are removed. -#include "../public/WebFrame.h" #include <wtf/OwnPtr.h> #include <wtf/RefCounted.h> @@ -160,9 +160,7 @@ public: static PassRefPtr<WebFrameImpl> create(WebFrameClient* client); ~WebFrameImpl(); - static int liveObjectCount() { - return m_liveObjectCount; - } + static int liveObjectCount() { return m_liveObjectCount; } // Called by the WebViewImpl to initialize its main frame: void initializeAsMainFrame(WebViewImpl*); @@ -182,13 +180,13 @@ public: WebCore::FrameView* frameView() const { return m_frame ? m_frame->view() : 0; } // Getters for the impls corresponding to Get(Provisional)DataSource. They - // may return NULL if there is no corresponding data source. + // may return 0 if there is no corresponding data source. WebDataSourceImpl* dataSourceImpl() const; WebDataSourceImpl* provisionalDataSourceImpl() const; // Returns which frame has an active match. This function should only be // called on the main frame, as it is the only frame keeping track. Returned - // value can be NULL if no frame has an active match. + // value can be 0 if no frame has an active match. const WebFrameImpl* activeMatchFrame() const { return m_activeMatchFrame; } // When a Find operation ends, we want to set the selection to what was active @@ -207,7 +205,7 @@ public: void setAllowsScrolling(bool); // Returns the password autocomplete listener associated with the passed - // user name input element, or NULL if none available. + // user name input element, or 0 if none available. // Note that the returned listener is owner by the WebFrameImpl and should not // be kept around as it is deleted when the page goes away. WebPasswordAutocompleteListener* getPasswordListener(WebCore::HTMLInputElement*); @@ -230,7 +228,7 @@ private: return adoptRef(new ClientHandle(client)); } WebFrameClient* client() { return m_client; } - void dropClient() { m_client = NULL; } + void dropClient() { m_client = 0; } private: ClientHandle(WebFrameClient* client) : m_client(client) {} WebFrameClient* m_client; @@ -305,7 +303,7 @@ private: WebCore::Frame* m_frame; // A way for the main frame to keep track of which frame has an active - // match. Should be NULL for all other frames. + // match. Should be 0 for all other frames. WebFrameImpl* m_activeMatchFrame; // The range of the active match for the current frame. diff --git a/webkit/api/src/WebImageSkia.cpp b/webkit/api/src/WebImageSkia.cpp index a262b40..0684b58 100644 --- a/webkit/api/src/WebImageSkia.cpp +++ b/webkit/api/src/WebImageSkia.cpp @@ -31,13 +31,14 @@ #include "config.h" #include "WebImage.h" -#include "WebData.h" -#include "WebSize.h" - #include "Image.h" #include "ImageSource.h" #include "NativeImageSkia.h" #include "SharedBuffer.h" + +#include "WebData.h" +#include "WebSize.h" + #include <wtf/OwnPtr.h> #include <wtf/PassRefPtr.h> @@ -69,7 +70,7 @@ WebImage WebImage::fromData(const WebData& data, const WebSize& desiredSize) if (frameArea < (desiredSize.width * desiredSize.height)) break; // No more frames that are large enough. - if ((i == 0) || (frameArea < frameAreaAtIndex)) { + if (!i || (frameArea < frameAreaAtIndex)) { index = i; // Closer to desired area than previous best match. frameAreaAtIndex = frameArea; } diff --git a/webkit/api/src/WebInputEvent.cpp b/webkit/api/src/WebInputEvent.cpp index 9ad4e34..b5c56fa 100644 --- a/webkit/api/src/WebInputEvent.cpp +++ b/webkit/api/src/WebInputEvent.cpp @@ -31,10 +31,11 @@ #include "config.h" #include "WebInputEvent.h" +#include "KeyboardCodes.h" + #include <ctype.h> #include <stdio.h> -#include "KeyboardCodes.h" #include <wtf/Assertions.h> #include <wtf/StringExtras.h> diff --git a/webkit/api/src/WebMediaPlayerClientImpl.h b/webkit/api/src/WebMediaPlayerClientImpl.h index bdf63a9..7f087d0 100644 --- a/webkit/api/src/WebMediaPlayerClientImpl.h +++ b/webkit/api/src/WebMediaPlayerClientImpl.h @@ -33,9 +33,8 @@ #if ENABLE(VIDEO) -#include "WebMediaPlayerClient.h" - #include "MediaPlayerPrivate.h" +#include "WebMediaPlayerClient.h" #include <wtf/OwnPtr.h> namespace WebKit { diff --git a/webkit/api/src/gtk/WebFontInfo.cpp b/webkit/api/src/gtk/WebFontInfo.cpp index 4107cea..76ed618 100644 --- a/webkit/api/src/gtk/WebFontInfo.cpp +++ b/webkit/api/src/gtk/WebFontInfo.cpp @@ -31,10 +31,9 @@ #include "config.h" #include "WebFontInfo.h" +#include <fontconfig/fontconfig.h> #include <string.h> - #include <unicode/utf16.h> -#include <fontconfig/fontconfig.h> namespace WebKit { @@ -88,7 +87,7 @@ WebCString WebFontInfo::familyForChars(const WebUChar* characters, size_t numCha if (FcPatternGetString(current, FC_FILE, 0, &cFilename) != FcResultMatch) continue; - if (access(reinterpret_cast<char*>(cFilename), R_OK) != 0) + if (access(reinterpret_cast<char*>(cFilename), R_OK)) continue; FcChar8* family; diff --git a/webkit/api/src/gtk/WebInputEventFactory.cpp b/webkit/api/src/gtk/WebInputEventFactory.cpp index 1844e33..890767c 100644 --- a/webkit/api/src/gtk/WebInputEventFactory.cpp +++ b/webkit/api/src/gtk/WebInputEventFactory.cpp @@ -31,14 +31,15 @@ #include "config.h" #include "WebInputEventFactory.h" +#include "KeyboardCodes.h" +#include "KeyCodeConversion.h" + +#include "WebInputEvent.h" + #include <gdk/gdk.h> #include <gdk/gdkkeysyms.h> #include <gtk/gtkversion.h> -#include "WebInputEvent.h" - -#include "KeyboardCodes.h" -#include "KeyCodeConversion.h" #include <wtf/Assertions.h> namespace WebKit { @@ -58,7 +59,7 @@ static int gdkStateToWebEventModifiers(guint state) modifiers |= WebInputEvent::ControlKey; if (state & GDK_MOD1_MASK) modifiers |= WebInputEvent::AltKey; -#if GTK_CHECK_VERSION(2,10,0) +#if GTK_CHECK_VERSION(2, 10, 0) if (state & GDK_META_MASK) modifiers |= WebInputEvent::MetaKey; #endif diff --git a/webkit/api/src/gtk/WebScreenInfoFactory.cpp b/webkit/api/src/gtk/WebScreenInfoFactory.cpp index 6ac1a65..081daa2 100644 --- a/webkit/api/src/gtk/WebScreenInfoFactory.cpp +++ b/webkit/api/src/gtk/WebScreenInfoFactory.cpp @@ -31,9 +31,8 @@ #include "config.h" #include "WebScreenInfoFactory.h" -#include <gtk/gtk.h> - #include "WebScreenInfo.h" +#include <gtk/gtk.h> namespace WebKit { |