2010-03-02 Tony Chang Reviewed by Darin Fisher. add a flag to WebURLResponse so we can identify multipart content https://bugs.webkit.org/show_bug.cgi?id=35628 * platform/network/chromium/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): (WebCore::ResourceResponse::isMultipartPayload): (WebCore::ResourceResponse::setIsMultipartPayload): 2010-03-02 Tony Chang Not reviewed, test fix. Revert r55447 because the new layout test is crashing consistently on Leopard Intel Debug (tests). https://bugs.webkit.org/show_bug.cgi?id=35261 * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::create): 2010-03-02 Adam Barth Reviewed by Darin Fisher. Google Analytics triggers "blocked plugin" UI https://bugs.webkit.org/show_bug.cgi?id=35565 Just like for running script, we need to distinguish between querying whether plug-ins are enabled and actually blocking a page from instantiating a plugin. We need to issue different callbacks to the FrameLoaderClient so that the client can inform us that plug-ins are disabled in some cases without showing the "plug-in blocked" UI. * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): * loader/FrameLoader.cpp: (WebCore::FrameLoader::requestObject): (WebCore::FrameLoader::allowPlugins): * loader/FrameLoader.h: (WebCore::): * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::didNotAllowPlugins): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::substituteMIMETypeFromPluginDatabase): * loader/PluginDocument.cpp: (WebCore::PluginTokenizer::writeRawData): * page/Page.cpp: (WebCore::Page::pluginData): * plugins/MimeType.cpp: (WebCore::MimeType::enabledPlugin): 2010-03-02 Andreas Kling Reviewed by Simon Hausmann. [Qt] Support the HTTP OPTIONS verb (needed for preflight requests) https://bugs.webkit.org/show_bug.cgi?id=34647 * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandler::QNetworkReplyHandler): (WebCore::QNetworkReplyHandler::start): 2010-03-02 Evan Stade Reviewed by David Levin. https://bugs.webkit.org/show_bug.cgi?id=35261 [skia] crash when attempting to render certain SVGs This fixes the crash, but the SVG still doesn't render properly. Test: svg/custom/tiling-regular-hexagonal-crash.svg * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::create): don't return 0 when the copy fails; instead return a blank bitmap. The caller doesn't check for 0 before dereferencing. 2010-03-02 Arno Renevier Reviewed by Gustavo Noronha Silva. [Gtk] use geoclue providers with don't provide update https://bugs.webkit.org/show_bug.cgi?id=35191 No new tests, behaviour depends on system. * platform/gtk/GeolocationServiceGtk.cpp: (WebCore::GeolocationServiceGtk::startUpdating): 2010-03-02 John Abd-El-Malek Reviewed by Darin Adler. Remove unnecessary check. https://bugs.webkit.org/show_bug.cgi?id=35513 * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): 2010-03-02 Darin Fisher Fix chromium build bustage. * page/Page.cpp: (WebCore::Page::privateBrowsingStateChanged): PluginView methods may not be called in the Chromium port. 2010-03-02 Beth Dakin Reviewed by Darin Adler and Adam Roben. Fix for WebKit crashes on systems that don't support CoreAnimation WKCACFLayerRenderer::acceleratedCompositingAvailable() now creates a dummy HWND so that it can step through the whole setHostWindow() and createRenderer() process. createRenderer() also calls a new function, hardwareCapabilitiesIndicateCoreAnimationSupport() which can only be called once we have a d3dDevice. setHostWindow() and createRenderer() now both return bools that indicate whether or not they have succeeded. * platform/graphics/win/WKCACFLayerRenderer.cpp: (WebCore::hardwareCapabilitiesIndicateCoreAnimationSupport): (WebCore::CoreAnimationTesterWindowWndProc): (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable): (WebCore::WKCACFLayerRenderer::shared): (WebCore::WKCACFLayerRenderer::createRenderer): * platform/graphics/win/WKCACFLayerRenderer.h: (WebCore::WKCACFLayerRenderer::setHostWindow): 2010-03-02 Mark Rowe Rubber-stamped by Jon Honeycutt. ScriptDebugServer shouldn't care that Mac does not use PluginView for plug-ins. * bindings/js/ScriptDebugServer.cpp: * plugins/PluginViewNone.cpp: (WebCore::PluginView::setJavaScriptPaused): Add an empty implementation of setJavaScriptPaused. 2010-03-02 Mark Rowe Rubber-stamped by Jon Honeycutt. Clean up the build fix r55437 by adding an empty implementation of privateBrowsingStateChanged in PluginViewNone.cpp * page/Page.cpp: * plugins/PluginViewNone.cpp: (WebCore::PluginView::privateBrowsingStateChanged): 2010-03-02 Mark Rowe Fix the Mac build. * page/Page.cpp: (WebCore::Page::privateBrowsingStateChanged): Mac doesn't use WebCore's PluginView class for plug-ins, so provide an empty implementation of privateBrowsingStateChanged for Mac. 2010-03-02 Andy Estes Reviewed by Maciej Stachowiak. Add the capability to create and dispatch a WheelEvent in JavaScript. Ensure the event's default handler is triggered in the same way as it is during a PlatformWheelEvent. https://bugs.webkit.org/show_bug.cgi?id=35566 Test: fast/events/wheelevent-in-scrolling-div.html * dom/Node.cpp: Ensure that the default behavior (scrolling) occurs for wheel events originating both from the platform and from JavaScript/ObjC. (WebCore::Node::dispatchWheelEvent): Instantiate new WheelEvent with the graunularity of the PlatformWheelEvent. (WebCore::Node::defaultEventHandler): Add support for mousewheel events. * dom/WheelEvent.cpp: Add three new member variables: m_deltaX, m_deltaY and m_granularity. m_deltaX and m_deltaY differ from m_wheelDeltaX and m_wheelDeltaY, which are the number of wheel ticks multiplied by 120 for IE compatibility. (WebCore::WheelEvent::WheelEvent): Initialize new member variables. (WebCore::WheelEvent::initWheelEvent): Same. (WebCore::WheelEvent::initWebKitWheelEvent): Same. * dom/WheelEvent.h: See WheelEvent.cpp. (WebCore::WheelEvent::): Add Granularity enum (Pixel, Line, Page). (WebCore::WheelEvent::create): Add new arguments. (WebCore::WheelEvent::deltaX): Amount of scroll in x direction. (WebCore::WheelEvent::deltaY): Amount of scroll in y direction. (WebCore::WheelEvent::granularity): Units of deltaX and deltaY. * dom/WheelEvent.idl: Add initWebKitWheelEvent() to JavaScript. This is the same as the initWheelEvent ObjC method. As the DOM Level 3 Events specification is still a working draft and subject to change, prefix 'WebKit' to the method signature to indicate experimental support. * page/EventHandler.cpp: Move the scroll handling from handleWheelEvent() to defaultWheelEventHandler(), which is executed on both PlatformWheelEvents and JavaScript WheelEvents. (WebCore::scrollNode): Renamed from scrollAndAcceptEvent(). Remove the PlatformWheelEvent from the argument list and instead return a boolean indicating if the scroll event was accepted. (WebCore::EventHandler::handleWheelEvent): Move scrolling code from here (WebCore::EventHandler::defaultWheelEventHandler): ...to here. * page/EventHandler.h: Add function signature. 2010-03-02 Mark Rowe Reviewed by Darin Adler. Bug 35576: WebKit should tell plug-in instances when private browsing state changes Notify plug-in instances when the private browsing state changes to match the behavior of the Mac plug-in code. * page/Page.cpp: (WebCore::Page::privateBrowsingStateChanged): Walk the frame tree and notify each PluginView that the private browsing state has changed. * page/Page.h: * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled): Notify the page that the private browsing state has changed. * plugins/PluginView.cpp: (WebCore::PluginView::privateBrowsingStateChanged): Notify the plug-in instance of the new private browsing state. * plugins/PluginView.h: 2010-03-02 Mark Rowe Reviewed by Oliver Hunt. Bug 30348: Implement private mode for plug-ins on Windows / Rework PluginView::getValue and PluginView::getValueStatic to remove the amount of code that was duplicated across platforms. getValue and getValueStatic now call in to platform-specific variants that indicate whether they handled the query. If the query is not handled by the platform-specific variants then the cross-platform handler has a chance to handle it. * plugins/PluginView.cpp: (WebCore::PluginView::getValueStatic): Give the platform-specific variant a chance to handle the variable lookup. If it does not handle it, return an error. (WebCore::PluginView::getValue): Give the platform-specific variant and platform-specific static variant a chance to handle the variable lookup. If they do not handle it, apply the cross-platform handler. At the moment the cross-platform code handles NPNVWindowNPObject, NPNVPluginElementNPObject, and NPNVprivateModeBool as they have an identical implementation across ports. * plugins/PluginView.h: * plugins/PluginViewNone.cpp: (WebCore::PluginView::platformGetValue): PluginViewNone does not handle any lookups. (WebCore::PluginView::platformGetValueStatic): Ditto. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::platformGetValueStatic): (WebCore::PluginView::platformGetValue): platform-independent implementation. * plugins/mac/PluginViewMac.cpp: (WebCore::PluginView::platformGetValueStatic): (WebCore::PluginView::platformGetValue): * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::platformGetValueStatic): (WebCore::PluginView::platformGetValue): Fix a bug noticed while updating this code. The Qt implementation of the handler for NPNVToolkit was relying on case fall-through to have some values handled by the static handler. When NPNVprivateModeBool was added it was placed before the default case, interferring with this fall-through. It now explicitly indicates in this situation that it was not handled. * plugins/symbian/PluginViewSymbian.cpp: (WebCore::PluginView::platformGetValueStatic): (WebCore::PluginView::platformGetValue): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::platformGetValueStatic): (WebCore::PluginView::platformGetValue): 2010-03-02 Anders Carlsson Reviewed by Sam Weinig. Make the default constructor available to all platforms. * platform/PlatformKeyboardEvent.h: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/mac/KeyEventMac.mm: 2010-03-02 Jeremy Orlow Reviewed by David Levin. Revert database thread changes that are no longer required https://bugs.webkit.org/show_bug.cgi?id=35519 Jochen Eisinger created 55214 and 55247 to track which database owns which thread. Dmitry suggested that this could also be done via TLS, though. After exploring the options, Jochen chose to go the TLS route, so these patches are no longer needed. * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): (WebCore::DatabaseThread::databaseThread): * storage/DatabaseThread.h: (WebCore::DatabaseThread::getThreadID): 2010-03-02 Brady Eidson Reviewed by Sam Weinig. Followup for REGRESSION(r51097) - Unable to log in to statefarm.com and https://bugs.webkit.org/show_bug.cgi?id=35556 * dom/ScriptElement.cpp: (WebCore::ScriptElementData::shouldExecuteAsJavaScript): To more perfectly match Gecko's rule, strip whitespace from the attribute values before comparing to window/onload/onload(). 2010-03-02 Chris Fleizach Reviewed by Beth Dakin. aria-label isn't respected on option elements https://bugs.webkit.org/show_bug.cgi?id=35400 When aria-label is used on an