void IDBFactoryBackendProxy::deleteDatabase(const String& name, PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<SecurityOrigin> securityOrigin, ScriptExecutionContext* context, const String& dataDir) { RefPtr<IDBCallbacks> callbacks(prpCallbacks); WebSecurityOrigin origin(securityOrigin); if (!allowIndexedDB(context, name, origin, callbacks)) return; WebFrameImpl* webFrame = getWebFrame(context); m_webIDBFactory->deleteDatabase(name, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir); }
bool RenderThemeAndroid::paintButton(RenderObject* obj, const PaintInfo& info, const IntRect& rect) { // If it is a disabled button, simply paint it to the master picture. Node* node = obj->node(); Element* formControlElement = static_cast<Element*>(node); if (formControlElement) { android::WebFrame* webFrame = getWebFrame(node); if (webFrame) { GraphicsContext *context = info.context; IntRect innerrect = IntRect(rect.x() + paddingButton, rect.y() + paddingButton, rect.width() - 2 * paddingButton, rect.height() - 2 * paddingButton); IntSize cornerrect = IntSize(cornerButton, cornerButton); Color bg, bright, dark, medium; if (formControlElement->isEnabledFormControl()) { bg = Color(defaultBgColor); bright = Color(defaultBgBright); dark = Color(defaultBgDark); medium = Color(defaultBgMedium); } else { bg = Color(disabledBgColor); bright = Color(disabledBgBright); dark = Color(disabledBgDark); medium = Color(disabledBgMedium); } context->save(); context->clip( IntRect(innerrect.x(), innerrect.y(), innerrect.width(), 1)); context->fillRoundedRect(innerrect, cornerrect, cornerrect, cornerrect, cornerrect, bright, context->fillColorSpace()); context->restore(); context->save(); context->clip(IntRect(innerrect.x(), innerrect.y() + innerrect.height() - 1, innerrect.width(), 1)); context->fillRoundedRect(innerrect, cornerrect, cornerrect, cornerrect, cornerrect, dark, context->fillColorSpace()); context->restore(); context->save(); context->clip(IntRect(innerrect.x(), innerrect.y() + 1, innerrect.width(), innerrect.height() - 2)); context->fillRoundedRect(innerrect, cornerrect, cornerrect, cornerrect, cornerrect, bg, context->fillColorSpace()); context->restore(); context->setStrokeColor(medium, context->strokeColorSpace()); context->setStrokeThickness(1.0f); context->drawLine(IntPoint(innerrect.x(), innerrect.y() + cornerButton), IntPoint(innerrect.x(), innerrect.y() + innerrect.height() - cornerButton)); context->drawLine(IntPoint(innerrect.x() + innerrect.width(), innerrect.y() + cornerButton), IntPoint(innerrect.x() + innerrect.width(), innerrect.y() + innerrect.height() - cornerButton)); } } // We always return false so we do not request to be redrawn. return false; }