diff options
Diffstat (limited to 'webkit/port/platform')
8 files changed, 57 insertions, 39 deletions
diff --git a/webkit/port/platform/chromium/CursorChromium.cpp b/webkit/port/platform/chromium/CursorChromium.cpp index 90485fe..fe9a893 100644 --- a/webkit/port/platform/chromium/CursorChromium.cpp +++ b/webkit/port/platform/chromium/CursorChromium.cpp @@ -300,4 +300,14 @@ const Cursor& zoomOutCursor() return c; } +const Cursor& grabCursor() +{ + return pointerCursor(); +} + +const Cursor& grabbingCursor() +{ + return pointerCursor(); +} + } diff --git a/webkit/port/platform/chromium/FileChooserChromium.cpp b/webkit/port/platform/chromium/FileChooserChromium.cpp index c70ff69..37a075e 100644 --- a/webkit/port/platform/chromium/FileChooserChromium.cpp +++ b/webkit/port/platform/chromium/FileChooserChromium.cpp @@ -39,29 +39,16 @@ namespace WebCore { -void FileChooser::openFileChooser(Document* document) -{ - Frame* frame = document->frame(); - if (!frame) - return; - - ChromeClientChromium* client = - static_cast<ChromeClientChromium*>(frame->page()->chrome()->client()); - - String result; - client->runFileChooser(m_filename, &*this); -} - String FileChooser::basenameForWidth(const Font& font, int width) const { if (width <= 0) return String(); String string; - if (m_filename.isEmpty()) + if (!m_filenames.size()) string = fileButtonNoFileSelectedLabel(); else - string = pathGetFileName(m_filename); + string = pathGetFileName(m_filenames[0]); return StringTruncator::centerTruncate(string, static_cast<float>(width), font, false); } diff --git a/webkit/port/platform/chromium/IconLinux.cpp b/webkit/port/platform/chromium/IconLinux.cpp index 963373b..9c38d84 100644 --- a/webkit/port/platform/chromium/IconLinux.cpp +++ b/webkit/port/platform/chromium/IconLinux.cpp @@ -38,7 +38,13 @@ Icon::~Icon() { } -PassRefPtr<Icon> Icon::newIconForFile(const String& filename) +PassRefPtr<Icon> Icon::createIconForFile(const String& filename) +{ + notImplemented(); + return NULL; +} + +PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames) { notImplemented(); return NULL; diff --git a/webkit/port/platform/chromium/RenderThemeGtk.cpp b/webkit/port/platform/chromium/RenderThemeGtk.cpp index 59d5361..54b3254 100644 --- a/webkit/port/platform/chromium/RenderThemeGtk.cpp +++ b/webkit/port/platform/chromium/RenderThemeGtk.cpp @@ -54,17 +54,17 @@ RenderThemeGtk::RenderThemeGtk() { } -static bool supportsFocus(EAppearance appearance) +static bool supportsFocus(ControlPart appearance) { switch (appearance) { - case PushButtonAppearance: - case ButtonAppearance: - case TextFieldAppearance: - case TextAreaAppearance: - case SearchFieldAppearance: - case MenulistAppearance: - case RadioAppearance: - case CheckboxAppearance: + case PushButtonPart: + case ButtonPart: + case TextFieldPart: + case TextAreaPart: + case SearchFieldPart: + case MenulistPart: + case RadioPart: + case CheckboxPart: return true; default: return false; @@ -84,8 +84,8 @@ bool RenderThemeGtk::controlSupportsTints(const RenderObject* o) const int RenderThemeGtk::baselinePosition(const RenderObject* o) const { // FIXME: This strategy is possibly incorrect for the GTK+ port. - if (o->style()->appearance() == CheckboxAppearance || - o->style()->appearance() == RadioAppearance) + if (o->style()->appearance() == CheckboxPart|| + o->style()->appearance() == RadioPart) return o->marginTop() + o->height() - 2; return RenderTheme::baselinePosition(o); } @@ -203,7 +203,7 @@ static void setButtonPadding(RenderStyle* style) style->setPaddingBottom(Length(padding / 2, Fixed)); } -static void setToggleSize(RenderStyle* style, EAppearance appearance) +static void setToggleSize(RenderStyle* style, ControlPart appearance) { // The width and height are both specified, so we shouldn't change them. if (!style->width().isIntrinsicOrAuto() && !style->height().isAuto()) @@ -213,11 +213,11 @@ static void setToggleSize(RenderStyle* style, EAppearance appearance) gint indicator_size, indicator_spacing; switch (appearance) { - case CheckboxAppearance: + case CheckboxPart: if (moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing) != MOZ_GTK_SUCCESS) return; break; - case RadioAppearance: + case RadioPart: if (moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing) != MOZ_GTK_SUCCESS) return; break; @@ -237,7 +237,7 @@ static void setToggleSize(RenderStyle* style, EAppearance appearance) void RenderThemeGtk::setCheckboxSize(RenderStyle* style) const { - setToggleSize(style, RadioAppearance); + setToggleSize(style, RadioPart); } bool RenderThemeGtk::paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect) @@ -247,7 +247,7 @@ bool RenderThemeGtk::paintCheckbox(RenderObject* o, const RenderObject::PaintInf void RenderThemeGtk::setRadioSize(RenderStyle* style) const { - setToggleSize(style, RadioAppearance); + setToggleSize(style, RadioPart); } bool RenderThemeGtk::paintRadio(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect) @@ -258,7 +258,7 @@ bool RenderThemeGtk::paintRadio(RenderObject* o, const RenderObject::PaintInfo& void RenderThemeGtk::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, WebCore::Element* e) const { // FIXME: Is this condition necessary? - if (style->appearance() == PushButtonAppearance) { + if (style->appearance() == PushButtonPart) { style->resetBorder(); style->setHeight(Length(Auto)); style->setWhiteSpace(PRE); diff --git a/webkit/port/platform/graphics/BitmapImageSingleFrameSkia.h b/webkit/port/platform/graphics/BitmapImageSingleFrameSkia.h index 1739a59..2ec3fbd 100644 --- a/webkit/port/platform/graphics/BitmapImageSingleFrameSkia.h +++ b/webkit/port/platform/graphics/BitmapImageSingleFrameSkia.h @@ -33,7 +33,7 @@ public: } // Do nothing, as we only have the one representation of data (decoded). - virtual void destroyDecodedData(bool) { } + virtual void destroyDecodedData(bool, bool preserveNearbyFrames = false) { } virtual unsigned decodedSize() const { diff --git a/webkit/port/platform/graphics/IconWin.cpp b/webkit/port/platform/graphics/IconWin.cpp index b1a8d70..cd16ef2 100644 --- a/webkit/port/platform/graphics/IconWin.cpp +++ b/webkit/port/platform/graphics/IconWin.cpp @@ -42,7 +42,7 @@ Icon::~Icon() DestroyIcon(m_icon); } -PassRefPtr<Icon> Icon::newIconForFile(const String& filename) +PassRefPtr<Icon> Icon::createIconForFile(const String& filename) { SHFILEINFO sfi; memset(&sfi, 0, sizeof(sfi)); @@ -54,6 +54,16 @@ PassRefPtr<Icon> Icon::newIconForFile(const String& filename) return adoptRef(new Icon(sfi.hIcon)); } +PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames) +{ + // TODO: support multiple files. + // http://code.google.com/p/chromium/issues/detail?id=4092 + if (!filenames.size()) + return 0; + + return createIconForFile(filenames[0]); +} + void Icon::paint(GraphicsContext* context, const IntRect& rect) { if (context->paintingDisabled()) diff --git a/webkit/port/platform/graphics/mac/IconMac.cpp b/webkit/port/platform/graphics/mac/IconMac.cpp index 67f7ca4..6514d71 100644 --- a/webkit/port/platform/graphics/mac/IconMac.cpp +++ b/webkit/port/platform/graphics/mac/IconMac.cpp @@ -38,7 +38,12 @@ namespace WebCore { -PassRefPtr<Icon> Icon::newIconForFile(const String& filename) +PassRefPtr<Icon> Icon::createIconForFile(const String& filename) +{ + return NULL; +} + +PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>& filenames) { return NULL; } diff --git a/webkit/port/platform/graphics/svg/SVGPaintServerGradientSkia.cpp b/webkit/port/platform/graphics/svg/SVGPaintServerGradientSkia.cpp index 122e337..3771d99 100644 --- a/webkit/port/platform/graphics/svg/SVGPaintServerGradientSkia.cpp +++ b/webkit/port/platform/graphics/svg/SVGPaintServerGradientSkia.cpp @@ -144,11 +144,11 @@ bool SVGPaintServerGradient::setup(GraphicsContext*& context, switch(spreadMethod()) { default: - case SPREADMETHOD_PAD: + case SpreadMethodPad: tile_mode = SkShader::kClamp_TileMode; break; - case SPREADMETHOD_REFLECT: + case SpreadMethodReflect: tile_mode = SkShader::kMirror_TileMode; break; - case SPREADMETHOD_REPEAT: + case SpreadMethodRepeat: tile_mode = SkShader::kRepeat_TileMode; break; } |