diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/qt')
21 files changed, 138 insertions, 134 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.cpp index fddda0146..82b12a8cd 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.cpp @@ -61,9 +61,9 @@ ClipboardQt::ClipboardQt(ClipboardAccessPolicy policy, const QMimeData* readable : Clipboard(policy, true) , m_readableData(readableClipboard) , m_writableData(0) -{ +{ Q_ASSERT(policy == ClipboardReadable || policy == ClipboardTypesReadable); -} +} ClipboardQt::ClipboardQt(ClipboardAccessPolicy policy, bool forDragging) : Clipboard(policy, forDragging) @@ -76,7 +76,7 @@ ClipboardQt::ClipboardQt(ClipboardAccessPolicy policy, bool forDragging) if (policy != ClipboardWritable) { Q_ASSERT(!forDragging); m_readableData = QApplication::clipboard()->mimeData(); - } + } #endif } @@ -104,7 +104,7 @@ void ClipboardQt::clearData(const String& type) if (format != toClearType) formats[format] = m_writableData->data(format); } - + m_writableData->clear(); QMap<QString, QByteArray>::const_iterator it, end = formats.constEnd(); for (it = formats.begin(); it != end; ++it) @@ -122,11 +122,11 @@ void ClipboardQt::clearData(const String& type) #endif } -void ClipboardQt::clearAllData() +void ClipboardQt::clearAllData() { if (policy() != ClipboardWritable) return; - + #ifndef QT_NO_CLIPBOARD if (!isForDragging()) QApplication::clipboard()->setMimeData(0); @@ -136,21 +136,21 @@ void ClipboardQt::clearAllData() m_writableData = 0; } -String ClipboardQt::getData(const String& type, bool& success) const +String ClipboardQt::getData(const String& type, bool& success) const { if (policy() != ClipboardReadable) { success = false; return String(); } - + ASSERT(m_readableData); QByteArray data = m_readableData->data(QString(type)); success = !data.isEmpty(); return String(data.data(), data.size()); } -bool ClipboardQt::setData(const String& type, const String& data) +bool ClipboardQt::setData(const String& type, const String& data) { if (policy() != ClipboardWritable) return false; @@ -187,7 +187,7 @@ PassRefPtr<FileList> ClipboardQt::files() const return 0; } -void ClipboardQt::setDragImage(CachedImage* image, const IntPoint& point) +void ClipboardQt::setDragImage(CachedImage* image, const IntPoint& point) { setDragImage(image, 0, point); } @@ -207,7 +207,7 @@ void ClipboardQt::setDragImage(CachedImage* image, Node *node, const IntPoint &l m_dragImage = image; if (m_dragImage) m_dragImage->addClient(this); - + m_dragLoc = loc; m_dragImageElement = node; } @@ -226,9 +226,9 @@ static CachedImage* getCachedImage(Element* element) // Attempt to pull CachedImage from element ASSERT(element); RenderObject* renderer = element->renderer(); - if (!renderer || !renderer->isImage()) + if (!renderer || !renderer->isImage()) return 0; - + RenderImage* image = static_cast<RenderImage*>(renderer); if (image->cachedImage() && !image->cachedImage()->errorOccurred()) return image->cachedImage(); @@ -236,7 +236,7 @@ static CachedImage* getCachedImage(Element* element) return 0; } -void ClipboardQt::declareAndWriteDragImage(Element* element, const KURL& url, const String& title, Frame* frame) +void ClipboardQt::declareAndWriteDragImage(Element* element, const KURL& url, const String& title, Frame* frame) { ASSERT(frame); Q_UNUSED(url); @@ -254,11 +254,11 @@ void ClipboardQt::declareAndWriteDragImage(Element* element, const KURL& url, co m_writableData->setImageData(*pixmap); AtomicString imageURL = element->getAttribute(HTMLNames::srcAttr); - if (imageURL.isEmpty()) + if (imageURL.isEmpty()) return; - KURL fullURL = frame->document()->completeURL(parseURL(imageURL)); - if (fullURL.isEmpty()) + KURL fullURL = frame->document()->completeURL(deprecatedParseURL(imageURL)); + if (fullURL.isEmpty()) return; QList<QUrl> urls; @@ -274,7 +274,7 @@ void ClipboardQt::declareAndWriteDragImage(Element* element, const KURL& url, co void ClipboardQt::writeURL(const KURL& url, const String& title, Frame* frame) { ASSERT(frame); - + QList<QUrl> urls; urls.append(frame->document()->completeURL(url.string())); if (!m_writableData) @@ -287,11 +287,11 @@ void ClipboardQt::writeURL(const KURL& url, const String& title, Frame* frame) #endif } -void ClipboardQt::writeRange(Range* range, Frame* frame) +void ClipboardQt::writeRange(Range* range, Frame* frame) { ASSERT(range); ASSERT(frame); - + if (!m_writableData) m_writableData = new QMimeData; QString text = frame->selectedText(); @@ -304,7 +304,7 @@ void ClipboardQt::writeRange(Range* range, Frame* frame) #endif } -bool ClipboardQt::hasData() +bool ClipboardQt::hasData() { const QMimeData *data = m_readableData ? m_readableData : m_writableData; if (!data) diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.h b/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.h index 44324f2f8..9a918ed96 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/ClipboardQt.h @@ -49,12 +49,12 @@ namespace WebCore { return adoptRef(new ClipboardQt(policy, forDragging)); } virtual ~ClipboardQt(); - + void clearData(const String& type); void clearAllData(); String getData(const String& type, bool& success) const; bool setData(const String& type, const String& data); - + // extensions beyond IE's API virtual HashSet<String> types() const; virtual PassRefPtr<FileList> files() const; @@ -68,10 +68,10 @@ namespace WebCore { virtual void writeRange(Range*, Frame*); virtual bool hasData(); - + QMimeData* clipboardData() const { return m_writableData; } void invalidateWritableData() { m_writableData = 0; } - + private: ClipboardQt(ClipboardAccessPolicy, const QMimeData* readableClipboard); @@ -79,10 +79,10 @@ namespace WebCore { ClipboardQt(ClipboardAccessPolicy, bool forDragging); void setDragImage(CachedImage*, Node*, const IntPoint& loc); - + const QMimeData* m_readableData; QMimeData* m_writableData; }; -} +} #endif // ClipboardQt_h diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuItemQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuItemQt.cpp index c71eacd85..cf2358736 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuItemQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ContextMenuItemQt.cpp @@ -68,7 +68,7 @@ void ContextMenuItem::setType(ContextMenuItemType type) } ContextMenuAction ContextMenuItem::action() const -{ +{ return m_platformDescription.action; } @@ -77,7 +77,7 @@ void ContextMenuItem::setAction(ContextMenuAction action) m_platformDescription.action = action; } -String ContextMenuItem::title() const +String ContextMenuItem::title() const { return m_platformDescription.title; } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/CursorQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/CursorQt.cpp index 0d7e10098..aad84be12 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/CursorQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/CursorQt.cpp @@ -254,7 +254,7 @@ const Cursor& rowResizeCursor() { return Cursors::self()->SplitVCursor; } - + const Cursor& middlePanningCursor() { return moveCursor(); @@ -298,7 +298,7 @@ const Cursor& southWestPanningCursor() const Cursor& westPanningCursor() { return westResizeCursor(); -} +} const Cursor& verticalTextCursor() { @@ -342,7 +342,7 @@ const Cursor& noneCursor() const Cursor& notAllowedCursor() { - return Cursors::self()->NoDropCursor; + return Cursors::self()->NoDropCursor; } const Cursor& zoomInCursor() diff --git a/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp index bc5cce12f..7b1eff8ce 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/DragDataQt.cpp @@ -42,7 +42,7 @@ bool DragData::canSmartReplace() const { return false; } - + bool DragData::containsColor() const { if (!m_platformDragData) @@ -55,11 +55,11 @@ bool DragData::containsFiles() const if (!m_platformDragData) return false; QList<QUrl> urls = m_platformDragData->urls(); - foreach(const QUrl &url, urls) { + foreach (const QUrl &url, urls) { if (!url.toLocalFile().isEmpty()) return true; } - return false; + return false; } void DragData::asFilenames(Vector<String>& result) const @@ -67,7 +67,7 @@ void DragData::asFilenames(Vector<String>& result) const if (!m_platformDragData) return; QList<QUrl> urls = m_platformDragData->urls(); - foreach(const QUrl &url, urls) { + foreach (const QUrl &url, urls) { QString file = url.toLocalFile(); if (!file.isEmpty()) result.append(file); @@ -88,12 +88,11 @@ String DragData::asPlainText() const String text = m_platformDragData->text(); if (!text.isEmpty()) return text; - + // FIXME: Should handle rich text here - return asURL(0); } - + Color DragData::asColor() const { if (!m_platformDragData) @@ -105,21 +104,21 @@ PassRefPtr<Clipboard> DragData::createClipboard(ClipboardAccessPolicy policy) co { return ClipboardQt::create(policy, m_platformDragData); } - + bool DragData::containsCompatibleContent() const { if (!m_platformDragData) return false; return containsColor() || containsURL() || m_platformDragData->hasHtml() || m_platformDragData->hasText(); } - + bool DragData::containsURL() const { if (!m_platformDragData) return false; return m_platformDragData->hasUrls(); } - + String DragData::asURL(String* title) const { if (!m_platformDragData) @@ -131,15 +130,14 @@ String DragData::asURL(String* title) const return urls.first().toString(); } - - + PassRefPtr<DocumentFragment> DragData::asFragment(Document* doc) const { if (m_platformDragData && m_platformDragData->hasHtml()) return createFragmentFromMarkup(doc, m_platformDragData->html(), ""); - + return 0; } - + } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/DragImageQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/DragImageQt.cpp index c9cdd8dd8..3a077e1c0 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/DragImageQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/DragImageQt.cpp @@ -44,20 +44,20 @@ DragImageRef scaleDragImage(DragImageRef image, FloatSize) { return image; } - + DragImageRef dissolveDragImageToFraction(DragImageRef image, float) { return image; } - + DragImageRef createDragImageFromImage(Image*) { return 0; } - + DragImageRef createDragImageIconForCachedImage(CachedImage*) { - return 0; + return 0; } - + } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp index bc9d2f4f3..28d3ca7b4 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp @@ -64,7 +64,7 @@ bool getFileSize(const String& path, long long& result) { QFileInfo info(path); result = info.size(); - return info.exists(); + return info.exists(); } bool getFileModificationTime(const String& path, time_t& result) @@ -156,7 +156,7 @@ bool unloadModule(PlatformModule module) delete module; return true; } - + return false; #endif } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp b/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp index 57a5e99db..d1853fc5e 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp @@ -60,7 +60,7 @@ String searchableIndexIntroduction() { return QCoreApplication::translate("QWebPage", "This is a searchable index. Enter search keywords: ", "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'"); } - + String fileButtonChooseFileLabel() { return QCoreApplication::translate("QWebPage", "Choose File", "title for file button used in HTML forms"); @@ -183,7 +183,7 @@ String contextMenuItemTagSpellingMenu() String contextMenuItemTagShowSpellingPanel(bool show) { - return show ? QCoreApplication::translate("QWebPage", "Show Spelling and Grammar", "menu item title") : + return show ? QCoreApplication::translate("QWebPage", "Show Spelling and Grammar", "menu item title") : QCoreApplication::translate("QWebPage", "Hide Spelling and Grammar", "menu item title"); } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp index 2b5968a3d..22cee6f76 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/MIMETypeRegistryQt.cpp @@ -36,7 +36,7 @@ struct ExtensionMap { const char* mimeType; }; -static const ExtensionMap extensionMap [] = { +static const ExtensionMap extensionMap[] = { { "bmp", "image/bmp" }, { "css", "text/css" }, { "gif", "image/gif" }, diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp index b535a74e3..8a377ad70 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp @@ -44,8 +44,8 @@ #define methodDebug() qDebug() << "PasteboardQt: " << __FUNCTION__; namespace WebCore { - -Pasteboard::Pasteboard() + +Pasteboard::Pasteboard() : m_selectionMode(false) { } @@ -71,7 +71,7 @@ void Pasteboard::writeSelection(Range* selectedRange, bool, Frame* frame) md->setHtml(html); #ifndef QT_NO_CLIPBOARD - QApplication::clipboard()->setMimeData(md, m_selectionMode ? + QApplication::clipboard()->setMimeData(md, m_selectionMode ? QClipboard::Selection : QClipboard::Clipboard); #endif } @@ -84,7 +84,7 @@ bool Pasteboard::canSmartReplace() String Pasteboard::plainText(Frame*) { #ifndef QT_NO_CLIPBOARD - return QApplication::clipboard()->text(m_selectionMode ? + return QApplication::clipboard()->text(m_selectionMode ? QClipboard::Selection : QClipboard::Clipboard); #else return String(); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp index 955da9bd5..43a294ba1 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp @@ -493,7 +493,7 @@ PlatformKeyboardEvent::PlatformKeyboardEvent(QKeyEvent* event) m_autoRepeat = event->isAutoRepeat(); m_ctrlKey = (state & Qt::ControlModifier) != 0; m_altKey = (state & Qt::AltModifier) != 0; - m_metaKey = (state & Qt::MetaModifier) != 0; + m_metaKey = (state & Qt::MetaModifier) != 0; m_windowsVirtualKeyCode = windowsKeyCodeForKeyEvent(event->key()); m_nativeVirtualKeyCode = event->nativeVirtualKey(); m_isKeypad = (state & Qt::KeypadModifier) != 0; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PlatformMouseEventQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PlatformMouseEventQt.cpp index ba7a4ad80..6c1d82d45 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PlatformMouseEventQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PlatformMouseEventQt.cpp @@ -38,9 +38,9 @@ PlatformMouseEvent::PlatformMouseEvent(QInputEvent* event, int clickCount) { m_timestamp = WTF::currentTime(); - QMouseEvent *me = 0; + QMouseEvent* me = 0; - switch(event->type()) { + switch (event->type()) { case QEvent::MouseMove: m_eventType = MouseEventMoved; me = static_cast<QMouseEvent *>(event); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp index a7d664342..867e4ea4b 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PopupMenuQt.cpp @@ -68,8 +68,7 @@ void PopupMenu::populate(const IntRect& r) if (client()->itemIsSeparator(i)) { //FIXME: better seperator item m_popup->insertItem(i, QString::fromLatin1("---")); - } - else { + } else { //PopupMenuStyle style = client()->itemStyle(i); m_popup->insertItem(i, client()->itemText(i)); #if 0 diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp index 0b42e5c62..5f64219c5 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp @@ -143,10 +143,10 @@ RenderThemeQt::~RenderThemeQt() // for some widget painting, we need to fallback to Windows style QStyle* RenderThemeQt::fallbackStyle() { - if(!m_fallbackStyle) + if (!m_fallbackStyle) m_fallbackStyle = QStyleFactory::create(QLatin1String("windows")); - if(!m_fallbackStyle) + if (!m_fallbackStyle) m_fallbackStyle = QApplication::style(); return m_fallbackStyle; @@ -227,9 +227,8 @@ static QRect inflateButtonRect(const QRect& originalRect, QStyle* style) int paddingBottom = originalRect.bottom() - layoutRect.bottom(); return originalRect.adjusted(-paddingLeft, -paddingTop, paddingRight, paddingBottom); - } else { + } else return originalRect; - } } void RenderThemeQt::adjustRepaintRect(const RenderObject* o, IntRect& rect) @@ -252,18 +251,6 @@ void RenderThemeQt::adjustRepaintRect(const RenderObject* o, IntRect& rect) } } -bool RenderThemeQt::isControlStyled(const RenderStyle* style, const BorderData& border, - const FillLayer& background, const Color& backgroundColor) const -{ - if (style->appearance() == TextFieldPart - || style->appearance() == TextAreaPart - || style->appearance() == ListboxPart) { - return style->border() != border; - } - - return RenderTheme::isControlStyled(style, border, background, backgroundColor); -} - Color RenderThemeQt::platformActiveSelectionBackgroundColor() const { QPalette pal = QApplication::palette(); @@ -337,11 +324,10 @@ void RenderThemeQt::computeSizeBasedOnStyle(RenderStyle* renderStyle) const // If the style supports layout rects we use that, and compensate accordingly // in paintButton() below. - if (!layoutRect.isNull()) { + if (!layoutRect.isNull()) size.setHeight(layoutRect.height()); - } else { + else size.setHeight(pushButtonSize.height()); - } break; } @@ -492,14 +478,13 @@ bool RenderThemeQt::paintButton(RenderObject* o, const RenderObject::PaintInfo& option.state |= QStyle::State_Small; ControlPart appearance = applyTheme(option, o); - if(appearance == PushButtonPart || appearance == ButtonPart) { + if (appearance == PushButtonPart || appearance == ButtonPart) { option.rect = inflateButtonRect(option.rect, qStyle()); p.drawControl(QStyle::CE_PushButton, option); - } else if(appearance == RadioPart) { + } else if (appearance == RadioPart) p.drawControl(QStyle::CE_RadioButton, option); - } else if(appearance == CheckboxPart) { + else if (appearance == CheckboxPart) p.drawControl(QStyle::CE_CheckBox, option); - } return false; } @@ -597,7 +582,7 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo const QPoint topLeft = r.topLeft(); p.painter->translate(topLeft); - opt.rect.moveTo(QPoint(0,0)); + opt.rect.moveTo(QPoint(0, 0)); opt.rect.setSize(r.size()); p.drawComplexControl(QStyle::CC_ComboBox, opt); @@ -777,7 +762,7 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con } } - if(result == RadioPart || result == CheckboxPart) + if (result == RadioPart || result == CheckboxPart) option.state |= (isChecked(o) ? QStyle::State_On : QStyle::State_Off); // If the webview has a custom palette, use it @@ -805,10 +790,10 @@ String RenderThemeQt::extraMediaControlsStyleSheet() } // Helper class to transform the painter's world matrix to the object's content area, scaled to 0,0,100,100 -class WorldMatrixTransformer -{ +class WorldMatrixTransformer { public: - WorldMatrixTransformer(QPainter* painter, RenderObject* renderObject, const IntRect& r) : m_painter(painter) { + WorldMatrixTransformer(QPainter* painter, RenderObject* renderObject, const IntRect& r) : m_painter(painter) + { RenderStyle* style = renderObject->style(); m_originalTransform = m_painter->transform(); m_painter->translate(r.x() + style->paddingLeft().value(), r.y() + style->paddingTop().value()); @@ -836,7 +821,7 @@ HTMLMediaElement* RenderThemeQt::getMediaElementFromRenderObject(RenderObject* o void RenderThemeQt::paintMediaBackground(QPainter* painter, const IntRect& r) const { painter->setPen(Qt::NoPen); - static QColor transparentBlack(0,0,0,100); + static QColor transparentBlack(0, 0, 0, 100); painter->setBrush(transparentBlack); painter->drawRoundedRect(r.x(), r.y(), r.width(), r.height(), 5.0, 5.0); } @@ -851,7 +836,7 @@ QColor RenderThemeQt::getMediaControlForegroundColor(RenderObject* o) const bool RenderThemeQt::paintMediaFullscreenButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) { - return RenderTheme::paintMediaFullscreenButton(o, paintInfo, r); + return RenderTheme::paintMediaFullscreenButton(o, paintInfo, r); } bool RenderThemeQt::paintMediaMuteButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r) diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h index 19d2d3343..617c87594 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h @@ -36,8 +36,7 @@ namespace WebCore { class RenderStyle; class HTMLMediaElement; -class RenderThemeQt : public RenderTheme -{ +class RenderThemeQt : public RenderTheme { private: RenderThemeQt(Page* page); virtual ~RenderThemeQt(); @@ -58,9 +57,6 @@ public: virtual void adjustRepaintRect(const RenderObject* o, IntRect& r); - virtual bool isControlStyled(const RenderStyle*, const BorderData&, - const FillLayer&, const Color&) const; - // The platform selection color. virtual Color platformActiveSelectionBackgroundColor() const; virtual Color platformInactiveSelectionBackgroundColor() const; @@ -154,8 +150,7 @@ private: QStyle* m_fallbackStyle; }; -class StylePainter -{ +class StylePainter { public: explicit StylePainter(const RenderObject::PaintInfo& paintInfo); explicit StylePainter(GraphicsContext* context); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScreenQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScreenQt.cpp index eda14463c..def199512 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScreenQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScreenQt.cpp @@ -51,14 +51,14 @@ static QWidget* qwidgetForPage(const Page* page) return frameView->qwidget(); } - + FloatRect screenRect(const Page* page) { QWidget* qw = qwidgetForPage(page); if (!qw) return FloatRect(); - // Taken from KGlobalSettings::desktopGeometry + // Taken from KGlobalSettings::desktopGeometry QDesktopWidget* dw = QApplication::desktop(); if (!dw) return FloatRect(); @@ -81,7 +81,7 @@ FloatRect usableScreenRect(const Page* page) if (!qw) return FloatRect(); - // Taken from KGlobalSettings::desktopGeometry + // Taken from KGlobalSettings::desktopGeometry QDesktopWidget* dw = QApplication::desktop(); if (!dw) return FloatRect(); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp index 29a999784..8eac15f9f 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp @@ -72,8 +72,8 @@ bool Scrollbar::contextMenu(const PlatformMouseEvent& event) const QPoint globalPos = QPoint(event.globalX(), event.globalY()); QAction* actionSelected = menu.exec(globalPos); - if (actionSelected == 0) - /* Do nothing */ ; + if (!actionSelected) + { /* Do nothing */ } else if (actionSelected == actScrollHere) { const QPoint pos = convertFromContainingWindow(event.pos()); moveThumb(horizontal ? pos.x() : pos.y()); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp index 3851dfe31..561e55f81 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp @@ -71,29 +71,29 @@ static QStyle::SubControl scPart(const ScrollbarPart& part) case ForwardButtonEndPart: return QStyle::SC_ScrollBarAddLine; } - + return QStyle::SC_None; } -static ScrollbarPart scrollbarPart(const QStyle::SubControl& sc) -{ - switch (sc) { - case QStyle::SC_None: - return NoPart; - case QStyle::SC_ScrollBarSubLine: - return BackButtonStartPart; - case QStyle::SC_ScrollBarSubPage: - return BackTrackPart; - case QStyle::SC_ScrollBarSlider: - return ThumbPart; - case QStyle::SC_ScrollBarAddPage: - return ForwardTrackPart; - case QStyle::SC_ScrollBarAddLine: - return ForwardButtonStartPart; +static ScrollbarPart scrollbarPart(const QStyle::SubControl& sc) +{ + switch (sc) { + case QStyle::SC_None: + return NoPart; + case QStyle::SC_ScrollBarSubLine: + return BackButtonStartPart; + case QStyle::SC_ScrollBarSubPage: + return BackTrackPart; + case QStyle::SC_ScrollBarSlider: + return ThumbPart; + case QStyle::SC_ScrollBarAddPage: + return ForwardTrackPart; + case QStyle::SC_ScrollBarAddLine: + return ForwardButtonStartPart; } - return NoPart; + return NoPart; } - + static QStyleOptionSlider* styleOptionSlider(Scrollbar* scrollbar, QWidget* widget = 0) { static QStyleOptionSlider opt; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h index 787b15add..6ca44eada 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.h @@ -40,7 +40,7 @@ public: virtual ScrollbarPart hitTest(Scrollbar*, const PlatformMouseEvent&); virtual bool shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent&); - + virtual void invalidatePart(Scrollbar*, ScrollbarPart); virtual int thumbPosition(Scrollbar*); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/SharedBufferQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/SharedBufferQt.cpp index 38ba6d10e..8d62226fd 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/SharedBufferQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/SharedBufferQt.cpp @@ -31,7 +31,7 @@ namespace WebCore { PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String& fileName) -{ +{ if (fileName.isEmpty()) return 0; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp index f76eb43dd..8ef598fa2 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp @@ -75,22 +75,49 @@ using namespace WebCore; #if defined(Q_OS_WINCE) -Vector<String> PluginDatabase::defaultPluginDirectories() { notImplemented(); return Vector<String>(); } -void PluginDatabase::getPluginPathsInDirectories(HashSet<String>& paths) const { notImplemented(); } -bool PluginDatabase::isPreferredPluginDirectory(const String& directory) { notImplemented(); return false; } +Vector<String> PluginDatabase::defaultPluginDirectories() +{ + notImplemented(); + return Vector<String>(); +} + +void PluginDatabase::getPluginPathsInDirectories(HashSet<String>& paths) const +{ + notImplemented(); +} + +bool PluginDatabase::isPreferredPluginDirectory(const String& directory) +{ + notImplemented(); + return false; +} #endif namespace WebCore { -void getSupportedKeySizes(Vector<String>&) { notImplemented(); } -String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String &challengeString, const KURL &url) { return String(); } +void getSupportedKeySizes(Vector<String>&) +{ + notImplemented(); +} + +String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String &challengeString, const KURL &url) +{ + return String(); +} #if !defined(Q_OS_WIN) // defined in win/SystemTimeWin.cpp, which is compiled for the Qt/Windows port -float userIdleTime() { notImplemented(); return FLT_MAX; } // return an arbitrarily high userIdleTime so that releasing pages from the page cache isn't postponed +float userIdleTime() +{ + notImplemented(); + return FLT_MAX; // return an arbitrarily high userIdleTime so that releasing pages from the page cache isn't postponed +} #endif -void prefetchDNS(const String& hostname) { notImplemented(); } +void prefetchDNS(const String& hostname) +{ + notImplemented(); +} } |