2009-10-08 Dirk Schulze Reviewed by Darin Adler. SVG feComposite: operator over mixes up inputs [https://bugs.webkit.org/show_bug.cgi?id=30205] SVG feComposite operator over mixed up the inputs. The pixel-test svg/filters/feComposite.svg can already test this. No new test result is needed as long as filters are disabled. * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::apply): 2009-10-08 Nikolas Zimmermann Reviewed by George Staikos. Move SVGURIReference ANIMATED_* macros in classes that inherit from it https://bugs.webkit.org/show_bug.cgi?id=30184 The long term goal is to kill the need for the virtual contextElement() function in SVG code. No change in functionality, thus no new tests. * svg/SVGAElement.cpp: (WebCore::SVGAElement::SVGAElement): * svg/SVGAElement.h: * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::SVGAltGlyphElement): * svg/SVGAltGlyphElement.h: * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::SVGCursorElement): * svg/SVGCursorElement.h: * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::SVGFEImageElement): * svg/SVGFEImageElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::SVGFilterElement): * svg/SVGFilterElement.h: * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::SVGForeignObjectElement): * svg/SVGForeignObjectElement.h: * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::SVGGradientElement): * svg/SVGGradientElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::SVGImageElement): * svg/SVGImageElement.h: * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::SVGMPathElement): (WebCore::SVGMPathElement::pathElement): * svg/SVGMPathElement.h: * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::SVGMaskElement): * svg/SVGMaskElement.h: * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::SVGPatternElement): * svg/SVGPatternElement.h: * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::SVGScriptElement): * svg/SVGScriptElement.h: * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::SVGTRefElement): * svg/SVGTRefElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::SVGTextPathElement): * svg/SVGTextPathElement.h: * svg/SVGURIReference.cpp: (WebCore::SVGURIReference::SVGURIReference): * svg/SVGURIReference.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): * svg/SVGUseElement.h: 2009-10-08 Jocelyn Turcotte Reviewed by Simon Hausmann. [Qt] Re-add the QApplication::syncX() line for plugin windows removed by r49169. Also changed the location of the sync just after the creation instead of just before sending it to the plugin. https://bugs.webkit.org/show_bug.cgi?id=25053 * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::platformStart): 2009-10-08 Joseph Pecoraro Reviewed by Timothy Hatcher. Inspector: NodeLists Don't Display Well in the Console https://bugs.webkit.org/show_bug.cgi?id=28061 * inspector/front-end/InjectedScript.js: (Object.type): 2009-10-08 Girish Ramakrishnan Reviewed by Simon Hausmann. [Qt] Windowless plugins: Remove unnecessary XSync for opaque mode. The reason for the XSync was that the plugin would not know about the Drawable. It turns out that the real reason behind this is that even though XCreatePixmap returns a handle, this id is unknown to the server until we flush the connection. So, move the XSync to right after we create the Pixmap. https://bugs.webkit.org/show_bug.cgi?id=30207 * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::updatePluginWidget): (WebCore::PluginView::paint): 2009-10-07 Daniel Bates Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=30188 Fixes an issue where performing a non DHTML drag-and-drop operation does not work as expected. For instance, dragging some selected text to an external application, such as TextEdit. This issue was a regression that arose from patching bug #30107. This change is covered by the manual test: drag-out-of-background-window.html * page/DragController.cpp: (WebCore::DragController::startDrag): When performing a non-DHTML drag operation then default to drag operations DragOperationGeneric and DragOperationCopy according to similar functionality removed when fixing bug #30107, see: http://trac.webkit.org/browser/trunk/WebKit/mac/WebView/WebHTMLView.mm?rev=48526#L3430 2009-10-07 Xan Lopez Fix more breakage in the GTK+ build. * GNUmakefile.am: 2009-10-07 Adam Barth Reviewed by Eric Seidel. Move PolicyChecker to it's own file https://bugs.webkit.org/show_bug.cgi?id=30193 This is just moving code around and re-naming things. * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/FrameLoader.cpp: * loader/FrameLoader.h: * loader/PolicyCallback.cpp: Added. (WebCore::PolicyCallback::PolicyCallback): (WebCore::PolicyCallback::~PolicyCallback): (WebCore::PolicyCallback::clear): (WebCore::PolicyCallback::set): (WebCore::PolicyCallback::call): (WebCore::PolicyCallback::clearRequest): (WebCore::PolicyCallback::cancel): * loader/PolicyCallback.h: Added. (WebCore::PolicyCallback::request): * loader/PolicyCheck.cpp: Removed. * loader/PolicyCheck.h: Removed. 2009-10-07 Joel Stanley Reviewed by Mark Rowe. Include for std::numeric_limits. Required by gcc-4.4 https://bugs.webkit.org/show_bug.cgi?id=30197 * html/canvas/CanvasByteArray.h: * html/canvas/CanvasIntArray.h: * html/canvas/CanvasShortArray.h: * html/canvas/CanvasUnsignedByteArray.h: * html/canvas/CanvasUnsignedIntArray.h: * html/canvas/CanvasUnsignedShortArray.h: 2009-10-07 Adam Barth Reviewed by Darin Adler. Factor PolicyChecker out of FrameLoader https://bugs.webkit.org/show_bug.cgi?id=30155 This patch separates PolicyChecker from FrameLoader. Loader policy is in change of managing the FrameLoaderClient callbacks. Ideally, it shouldn't know anything about FrameLoader, but I couldn't quite remove all knowledge (although we might be able to do more later). In a future patch, I'll move PolicyChecker into a separate file. * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::load): (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::PolicyChecker::handleUnimplementablePolicy): (WebCore::PolicyChecker::cannotShowMIMEType): (WebCore::PolicyChecker::PolicyChecker): (WebCore::PolicyChecker::checkNavigationPolicy): (WebCore::PolicyChecker::checkContentPolicy): (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL): (WebCore::FrameLoader::stopAllLoaders): (WebCore::PolicyChecker::cancelCheck): (WebCore::PolicyChecker::stopCheck): (WebCore::PolicyChecker::continueAfterContentPolicy): (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm): (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): (WebCore::PolicyChecker::checkNewWindowPolicy): (WebCore::PolicyChecker::continueAfterNewWindowPolicy): (WebCore::PolicyChecker::continueAfterNavigationPolicy): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): * loader/FrameLoader.h: (WebCore::PolicyChecker::loadType): (WebCore::PolicyChecker::setLoadType): (WebCore::PolicyChecker::delegateIsDecidingNavigationPolicy): (WebCore::PolicyChecker::delegateIsHandlingUnimplementablePolicy): (WebCore::FrameLoader::policy): * loader/FrameLoaderClient.h: * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didCancel): (WebCore::MainResourceLoader::willSendRequest): (WebCore::MainResourceLoader::continueAfterContentPolicy): (WebCore::MainResourceLoader::didReceiveResponse): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): 2009-10-07 Geoffrey Garen Reviewed by Oliver Hunt. Fixed Database code takes JSLock on secondary thread, permanently slowing down JavaScript Changed callback objects to use a standard helper object. The helper object ASSERTs that it is deleted on the main thread, so no lock is required when unprotecting its members. It also centralizes some previously duplicated code. Callback objects that might be deleted on a secondary thread use callOnMainThread to delete their helper objects on the main thread. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCallbackData.cpp: Copied from bindings/js/JSCustomSQLTransactionCallback.cpp. (WebCore::JSCallbackData::deleteData): (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSCallbackData.h: Copied from bindings/js/JSCustomSQLTransactionCallback.cpp. (WebCore::JSCallbackData::JSCallbackData): (WebCore::JSCallbackData::~JSCallbackData): (WebCore::JSCallbackData::callback): * bindings/js/JSCustomPositionCallback.cpp: (WebCore::JSCustomPositionCallback::JSCustomPositionCallback): (WebCore::JSCustomPositionCallback::handleEvent): * bindings/js/JSCustomPositionCallback.h: * bindings/js/JSCustomPositionErrorCallback.cpp: (WebCore::JSCustomPositionErrorCallback::JSCustomPositionErrorCallback): (WebCore::JSCustomPositionErrorCallback::handleEvent): * bindings/js/JSCustomPositionErrorCallback.h: * bindings/js/JSCustomSQLStatementCallback.cpp: (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback): (WebCore::JSCustomSQLStatementCallback::~JSCustomSQLStatementCallback): (WebCore::JSCustomSQLStatementCallback::handleEvent): * bindings/js/JSCustomSQLStatementCallback.h: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback): (WebCore::JSCustomSQLStatementErrorCallback::~JSCustomSQLStatementErrorCallback): (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): * bindings/js/JSCustomSQLStatementErrorCallback.h: * bindings/js/JSCustomSQLTransactionCallback.cpp: (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback): (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback): (WebCore::JSCustomSQLTransactionCallback::handleEvent): * bindings/js/JSCustomSQLTransactionCallback.h: * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback): (WebCore::JSCustomSQLTransactionErrorCallback::~JSCustomSQLTransactionErrorCallback): (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): * bindings/js/JSCustomSQLTransactionErrorCallback.h: * bindings/js/JSCustomVoidCallback.cpp: (WebCore::JSCustomVoidCallback::JSCustomVoidCallback): (WebCore::JSCustomVoidCallback::~JSCustomVoidCallback): (WebCore::JSCustomVoidCallback::handleEvent): * bindings/js/JSCustomVoidCallback.h: * storage/Database.cpp: (WebCore::Database::Database): 2009-10-07 Jens Alfke Reviewed by Dave Levin. Fix StringImpl::m_buffer https://bugs.webkit.org/show_bug.cgi?id=30189 Fix my previous StringImpl patch to avoid using an indefinite-length array member, since MSVC doesn't like it. Instead, go back to offsetting by sizeof(StringImpl). * platform/text/StringImpl.cpp: (WebCore::StringImpl::StringImpl): (WebCore::StringImpl::createUninitialized): * platform/text/StringImpl.h: (WebCore::StringImpl::bufferIsInternal): 2009-10-07 Aaron Boodman Reviewed by Adam Barth. Update isolated worlds under v8 to support world reuse. https://bugs.webkit.org/show_bug.cgi?id=30145 * bindings/v8/ScriptController.cpp: Replace evaluateInNewIsolatedWorld() withe evaluateInIsolatedWorld(id). (WebCore::ScriptController::evaluateInIsolatedWorld): * bindings/v8/ScriptController.h: Ditto. * bindings/v8/V8Proxy.cpp: Ditto. (WebCore::V8Proxy::~V8Proxy): Dittio. (WebCore::V8Proxy::evaluateInIsolatedWorld): Ditto. * bindings/v8/V8Proxy.h: Ditto. * bindings/v8/V8IsolatedWorld.cpp: Add support for controlling lifetime of a world, rather than relying on GC. (WebCore::V8IsolatedWorld::contextWeakReferenceCallback): Ditto. (WebCore::V8IsolatedWorld::V8IsolatedWorld): Ditto. (WebCore::V8IsolatedWorld::destroy): Ditto. * bindings/v8/V8IsolatedWorld.h: Ditto. 2009-10-07 Jeremy Orlow Build fix for http://trac.webkit.org/changeset/49272 on Windows * platform/text/StringImpl.h: 2009-10-07 Jens Alfke Reviewed by Darin Adler. Optimization of StringImpl: - Remove unnecessary m_bufferIsInternal member (saves 4 bytes). Instead, check whether m_data points to just past the end of the object's members. - copy() and createWithTerminatingNullCharacter() create the string in a single malloc block instead of 2 (saves ~20 bytes and considerable CPU cycles, increases locality). - Move m_length next to m_hash to save 4 bytes of padding in 64-bit builds. https://bugs.webkit.org/show_bug.cgi?id=29500 * platform/text/StringImpl.cpp: (WebCore::StringImpl::StringImpl): Re-ordered members. (WebCore::StringImpl::~StringImpl): Change to is-buffer-internal check. (WebCore::StringImpl::createUninitialized): Use new m_buffer member instead of sizeof() to ensure chars are copied to correct location. (WebCore::StringImpl::createWithTerminatingNullCharacter): Make sure copy is created in a single malloc block. (WebCore::StringImpl::threadsafeCopy): Make sure copy is created in a single malloc block. (WebCore::StringImpl::crossThreadString): Make sure copy is created in a single malloc block. (WebCore::StringImpl::sharedBuffer): Change to is-buffer-internal check. * platform/text/StringImpl.h: (WebCore::StringImpl::startsWith): Just fixed a confusing param name. (WebCore::StringImpl::bufferIsInternal): Changed member var into accessor method. (WebCore::StringImpl::m_data): Repositioned for optimal member packing in 64-bit. (WebCore::StringImpl::m_buffer): Added to provide an explicit location for where internal buffer goes. 2009-10-07 Daniel Bates Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=30102 And Manual test to confirm that the not-allowed cursor is shown for an invalid drag-and-drop operation. We cannot test this using DRT because of a discrepancy between the Windows API-based drop effect and the WebKit drop effect. See bug #24731 for more details. * manual-tests/drag-cursor-notallowed.html: Added. 2009-10-07 Mark Rowe Fix the build. * WebCore.xcodeproj/project.pbxproj: 2009-10-07 Brian Weinstein Reviewed by Timothy Hatcher. Fixes . Inspector should show cookies of sub-resources on the page. This function implements showing cookies for all sub-resources of a page. When the page is loaded, it populates the Storage Panel with a list of all domains that were loaded as part of the full page load (iframes, ads, etc). When the user selects one of the domains, the inspector calls back into the controller, and the controller combines all of the cookies from that domain into a list, and sends that list is sent back to the controller to render. A domain now needs to be passed into CookieItemsView, and CookieSidebarTreeElement. As a result of a previous patch, we now have detailed cookie information for both Windows on CFNetwork and Mac. Additionally, this patch provides deleteCookie support on Windows. * bindings/js/ScriptObject.cpp: (WebCore::ScriptObject::set): * bindings/js/ScriptObject.h: * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::getCookies): (WebCore::InspectorBackend::deleteCookie): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::populateScriptObjects): (WebCore::InspectorController::didFinishLoading): (WebCore::InspectorController::getCookies): (WebCore::InspectorController::buildArrayForCookies): (WebCore::InspectorController::buildObjectForCookie): (WebCore::InspectorController::deleteCookie): * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: * inspector/InspectorDOMAgent.h: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::addCookieDomainForDocument): * inspector/InspectorFrontend.h: * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView): (WebInspector.CookieItemsView.prototype.update): (WebInspector.CookieItemsView.prototype._deleteButtonClicked): * inspector/front-end/DOMAgent.js: (WebInspector.Cookies.getCookiesAsync): * inspector/front-end/StoragePanel.js: (WebInspector.StoragePanel): (WebInspector.StoragePanel.prototype.reset): (WebInspector.StoragePanel.prototype.addCookieDomain): (WebInspector.StoragePanel.prototype.showCookies): (WebInspector.CookieSidebarTreeElement): (WebInspector.CookieSidebarTreeElement.prototype.onselect): * inspector/front-end/inspector.js: (WebInspector.addCookieDomain): * platform/Cookie.h: (WebCore::CookieHash::hash): (WebCore::CookieHash::equal): (WTF::): * platform/network/win/CookieJarCFNetWin.cpp: (WebCore::deleteCookie): 2009-10-07 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Add ScriptObject::set(const char*, unsigned). https://bugs.webkit.org/show_bug.cgi?id=30104 * bindings/v8/ScriptObject.cpp: (WebCore::ScriptObject::set): * bindings/v8/ScriptObject.h: 2009-10-07 Brent Fulgham Unreviewed build fix for Windows (Cairo). Provide implementation of new BitmapImage::create that was added in @r49060. * platform/graphics/win/ImageCairoWin.cpp: 2009-10-07 Andrew Scherkus Reviewed by Eric Carlson. Refactor RenderThemeChromiumMac and RenderThemeChromiumSkia to render media controls using GraphicsContext. Design was based on existing RenderMediaControls.cpp used by RenderThemeSafari/Win. https://bugs.webkit.org/show_bug.cgi?id=29987 Covered by existing layout tests as no new functionality was introduced. * WebCore.gypi: Added RenderMediaControlsChromium.cpp/h. * css/mediaControlsChromium.css: Tweaked media slider position and border style. * rendering/MediaControlElements.cpp: (WebCore::toParentMediaElement): Taken from RenderMediaControls. (WebCore::MediaControlElement::rendererIsNeeded): Don't call shouldRenderMediaControlPart() if element has no appearance. (WebCore::MediaControlInputElement::rendererIsNeeded): Ditto. * rendering/RenderMediaControls.cpp: Moved parentMediaElement() to MediaControlElements. * rendering/RenderMediaControlsChromium.cpp: Added. (WebCore::platformResource): Helper to load and cache media control image resources. (WebCore::mediaSliderThumbImage): Implementation refactored from RenderThemeChromiumMac/Skia. (WebCore::mediaVolumeSliderThumbImage): Ditto. (WebCore::paintMediaButton): Ditto. (WebCore::paintMediaMuteButton): Ditto. (WebCore::paintMediaPlayButton): Ditto. (WebCore::paintMediaSlider): Ditto. (WebCore::paintMediaSliderThumb): Ditto. (WebCore::paintMediaVolumeSlider): Ditto. (WebCore::paintMediaVolumeSliderThumb): Ditto. (WebCore::paintMediaTimelineContainer): Ditto. (WebCore::RenderMediaControlsChromium::shouldRenderMediaControlPart): Ditto. (WebCore::RenderMediaControlsChromium::paintMediaControlsPart): Same (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize): * rendering/RenderMediaControlsChromium.h: Added. * rendering/RenderThemeChromiumMac.h: * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::adjustSliderThumbSize): Implementation delegated to RenderMediaControlsChromium. (WebCore::RenderThemeChromiumMac::shouldRenderMediaControlPart): Ditto. (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): Ditto. (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): Ditto. (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): Ditto. (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack): Ditto. (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): Ditto. (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb): Ditto. (WebCore::RenderThemeChromiumMac::paintMediaControlsBackground): Ditto. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintMediaControlsBackground): Implementation delegated to RenderMediaControlsChromium. (WebCore::RenderThemeChromiumSkia::paintMediaSliderTrack): Ditto. (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderTrack): Ditto. (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize): Ditto. (WebCore::RenderThemeChromiumSkia::paintMediaSliderThumb): Ditto. (WebCore::RenderThemeChromiumSkia::paintMediaVolumeSliderThumb): Ditto. (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton): Ditto. (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton): Ditto. (WebCore::RenderThemeChromiumSkia::shouldRenderMediaControlPart): Ditto. 2009-10-07 Dave Hyatt Reviewed by Adam Roben. Make plugins work with beforeload. Added fast/dom/beforeload/flash-before-load.html * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * rendering/RenderPartObject.cpp: (WebCore::RenderPartObject::updateWidget): 2009-10-07 Vitaly Repeshko Reviewed by Adam Barth. [V8] Protect JS listener object from GC while clearing a property on it. See http://crbug.com/23780. https://bugs.webkit.org/show_bug.cgi?id=30137 * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::~V8AbstractEventListener): 2009-10-07 Zoltan Horvath Rubber-stamped by Eric Seidel. Allow custom memory allocation control for WebCore's CachedResourceClient class https://bugs.webkit.org/show_bug.cgi?id=30165 Inherits CachedResourceClient class from FastAllocBase because (its child class) CSSFontFaceSource has been instantiated by 'new' in WebCore/css/CSSFontFaceSource.h:46. * loader/CachedResourceClient.h: 2009-10-07 Zoltan Horvath Reviewed by Darin Adler. Allow custom memory allocation control for WebCore's IdentifierRep https://bugs.webkit.org/show_bug.cgi?id=30159 Inherits IdentifierRep class from FastAllocBase because it has been instantiated by 'new' in WebCore/bridge/IdentifierRep.cpp:61. * bridge/IdentifierRep.h: 2009-10-07 Anton Muhin Reviewed by Adam Barth. Fetch pointers to C++ DOM window immediately from holder object (do not search prototype chain for proper JS wrapper). https://bugs.webkit.org/show_bug.cgi?id=29031 * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::getTemplate): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::createNewContext): (WebCore::V8Proxy::installDOMWindow): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::ACCESSOR_GETTER): (WebCore::ACCESSOR_SETTER): (WebCore::INDEXED_PROPERTY_GETTER): (WebCore::NAMED_PROPERTY_GETTER): (WebCore::NAMED_ACCESS_CHECK): (WebCore::INDEXED_ACCESS_CHECK): 2009-10-07 Adam Roben Fix typo in PluginView::load that was causing cross-origin loads to be allowed This typo was introduced in the build fix in r49213. Fixes REGRESSION (r49213): http/tests/plugins/local-geturl-from-remote.html is failing on Windows Reviewed by Sam Weinig. * plugins/PluginView.cpp: (WebCore::PluginView::load): Removed a comma operator that was making a condition always evaluate to true. 2009-10-07 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Do not create valid QColor's for invalid WebCore::Color's. * platform/graphics/qt/ColorQt.cpp: (WebCore::Color::operator QColor): 2009-10-07 Janne Koskinen Reviewed by Simon Hausmann. [Qt] Symbian SBSv2 .data segment adress fix https://bugs.webkit.org/show_bug.cgi?id=30157 RO-section in qtwebkit.dll exceeds allocated space in SBSv2. Move RW-section base address to start from 0x800000 instead of the toolchain default 0x400000 * WebCore.pro: 2009-10-07 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Migrate database inspection to the injected script-based schema. https://bugs.webkit.org/show_bug.cgi?id=29788 * bindings/js/JSInspectorBackendCustom.cpp: (WebCore::JSInspectorBackend::databaseForId): * bindings/v8/custom/V8CustomBinding.h: * bindings/v8/custom/V8InspectorBackendCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::dispatchOnInjectedScript): (WebCore::InspectorBackend::databaseForId): (WebCore::InspectorBackend::selectDatabase): (WebCore::InspectorBackend::getDatabaseTableNames): (WebCore::InspectorBackend::reportDidDispatchOnInjectedScript): * inspector/InspectorBackend.h: * inspector/InspectorBackend.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::populateScriptObjects): (WebCore::InspectorController::resetScriptObjects): (WebCore::InspectorController::selectDatabase): (WebCore::InspectorController::databaseForId): (WebCore::InspectorController::didOpenDatabase): (WebCore::InspectorController::didUseDOMStorage): (WebCore::InspectorController::selectDOMStorage): (WebCore::InspectorController::getDOMStorageResourceForId): * inspector/InspectorController.h: * inspector/InspectorDatabaseResource.cpp: (WebCore::InspectorDatabaseResource::InspectorDatabaseResource): (WebCore::InspectorDatabaseResource::bind): * inspector/InspectorDatabaseResource.h: (WebCore::InspectorDatabaseResource::database): (WebCore::InspectorDatabaseResource::id): * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::addDatabase): (WebCore::InspectorFrontend::selectDatabase): (WebCore::InspectorFrontend::didGetDatabaseTableNames): (WebCore::InspectorFrontend::addDOMStorage): * inspector/InspectorFrontend.h: * inspector/front-end/Database.js: (WebInspector.Database): (WebInspector.Database.prototype.get id): (WebInspector.Database.prototype.set name): (WebInspector.Database.prototype.set version): (WebInspector.Database.prototype.set domain): (WebInspector.Database.prototype.getTableNames): (WebInspector.Database.prototype.executeSql): * inspector/front-end/InjectedScript.js: (InjectedScript.dispatch): (InjectedScript.executeSql): (InjectedScript.executeSql.errorCallback): (InjectedScript.executeSql.queryTransaction): * inspector/front-end/InjectedScriptAccess.js: (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName): (InjectedScriptAccess._installHandler): * inspector/front-end/StoragePanel.js: (WebInspector.StoragePanel.prototype.selectDatabase): (WebInspector.StoragePanel.prototype.dataGridForResult): * inspector/front-end/inspector.js: (WebInspector.addDatabase): 2009-10-07 Girish Ramakrishnan Reviewed by Simon Hausmann. [Qt] Windowless Plugins: Disable content propagation for QGraphicsView items We cannot support content propagation for items in QGraphicsView because the contents of the backing store might be transformed. So turn it off if we are not painting on QWidget. Note that this check will not work for a QWebView in a QGraphicsProxyWidget, but I guess it's fine. Alternative is to do an even uglier cast: static_cast painter's paintDevice() to QWidget and check if it is the viewport() of QGraphicsView. https://bugs.webkit.org/show_bug.cgi?id=30149 * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::paint): 2009-10-07 Simon Hausmann Fix the Qt build by adding the missing files to the build. * WebCore.pro: 2009-10-07 Gustavo Noronha Silva Reviewed by Xan Lopez. Fix incorrect convertion of double into int while assigning it to a float. * platform/graphics/gtk/SimpleFontDataGtk.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/gtk/SimpleFontDataPango.cpp: (WebCore::SimpleFontData::platformInit): 2009-10-07 Gustavo Noronha Silva Reviewed by Xan Lopez. Fix rounding error issues in height calculation in 64 bits. Already covered by existing tests. * platform/graphics/gtk/SimpleFontDataGtk.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/gtk/SimpleFontDataPango.cpp: (WebCore::SimpleFontData::platformInit): 2009-10-07 Shinichiro Hamaji Reviewed by Eric Seidel. Dual lines in css2.1 layout tests do not match: https://bugs.webkit.org/show_bug.cgi?id=23262 Now we can put a counter node as the next sibling of a reset node. Re-layout the counter content when the count is updated. Tests: fast/css/counters/t1204-increment-00-c-o.html fast/css/counters/t1204-increment-01-c-o.html * rendering/CounterNode.cpp: (WebCore::CounterNode::recount): * rendering/RenderCounter.cpp: (WebCore::findPlaceForCounter): 2009-10-06 Xan Lopez Try to fix the GTK+ build. * GNUmakefile.am: 2009-10-06 Adam Barth Reviewed by Adam Barth. Removed unused member variable from FrameLoader https://bugs.webkit.org/show_bug.cgi?id=30146 * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): * loader/FrameLoader.h: 2009-10-06 David Levin Reviewed by NOBODY (build fix). A few small/trivial tweaks to the last build fix. * bindings/scripts/CodeGeneratorV8.pm: 2009-10-06 David Levin Reviewed by Dimitri Glazkov. [Chromium] Need to adjust MessagePort, etc. code for the post clone work done. https://bugs.webkit.org/show_bug.cgi?id=30147 No change in functionality so no new tests. * WebCore.gypi: * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/SerializedScriptValue.h: Added. A very simple implementation of SerializedScriptValue that only works for strings. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-10-06 Sam Weinig Reviewed by Brady Eidson. Fix for Dispatch resource load delegate functions for the media element. Since we don't get the required callbacks from the media engine, just fake the parameters to the delegate functions as best as possible. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): (WebCore::HTMLMediaElement::isSafeToLoadURL): * loader/FrameLoader.cpp: (WebCore::FrameLoader::willLoadMediaElementURL): * loader/FrameLoader.h: 2009-10-06 Oliver Hunt Reviewed by NOBODY (Build fix). More build fixes. * bindings/js/SerializedScriptValue.cpp: (WebCore::DeserializingTreeWalker::getProperty): (WebCore::TeardownTreeWalker::getProperty): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValue::SerializedScriptValue): 2009-10-06 Oliver Hunt Reviewed by NOBODY (Build fix). Build and formatting fix. * ForwardingHeaders/runtime/ExceptionHelpers.h: Added. * bindings/js/SerializedScriptValue.cpp: * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValueData::operator bool): (WebCore::SerializedScriptValueData::release): (WebCore::SerializedScriptValue::release): (WebCore::SerializedScriptValue::toString): (WebCore::SerializedScriptValue::~SerializedScriptValue): (WebCore::SerializedScriptValue::SerializedScriptValue): 2009-10-05 Oliver Hunt Reviewed by Gavin Barraclough. It should be possible to post (clone) built-in JS objects to Workers https://bugs.webkit.org/show_bug.cgi?id=22878 Implement object cloning semantics for postMessage. Currently only a partial implementation of the spec -- cloning of File, FileList, ImageData, and RegExp were left out as they would have significantly increased patch size. Cloning requires multiple tree walks so we use a templated tree walk function, allowing us to share a single implementation for serialization, deserialization, and eventual destruction of the serialized object tree. Test: fast/dom/Window/window-postmessage-clone.html * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::postMessage): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::initMessageEvent): * bindings/js/JSMessagePortCustom.h: (WebCore::handlePostMessage): * bindings/js/SerializedScriptValue.cpp: Added. (WebCore::SerializedObject::set): (WebCore::SerializedObject::names): (WebCore::SerializedObject::values): (WebCore::SerializedObject::create): (WebCore::SerializedObject::clear): (WebCore::SerializedObject::SerializedObject): (WebCore::SerializedArray::setIndex): (WebCore::SerializedArray::canDoFastRead): (WebCore::SerializedArray::getIndex): (WebCore::SerializedArray::getSparseIndex): (WebCore::SerializedArray::length): (WebCore::SerializedArray::create): (WebCore::SerializedArray::clear): (WebCore::SerializedArray::SerializedArray): (WebCore::SerializedScriptValueData::SerializedScriptValueData): (WebCore::SharedSerializedData::asArray): (WebCore::SharedSerializedData::asObject): (WebCore::): (WebCore::walk): (WebCore::BaseWalker::BaseWalker): (WebCore::BaseWalker::shouldTerminate): (WebCore::BaseWalker::ticksUntilNextCheck): (WebCore::BaseWalker::didTimeOut): (WebCore::BaseWalker::throwStackOverflow): (WebCore::BaseWalker::throwInterruptedException): (WebCore::SerializingTreeWalker::SerializingTreeWalker): (WebCore::SerializingTreeWalker::null): (WebCore::SerializingTreeWalker::isArray): (WebCore::SerializingTreeWalker::isObject): (WebCore::SerializingTreeWalker::asInputArray): (WebCore::SerializingTreeWalker::asInputObject): (WebCore::SerializingTreeWalker::createOutputArray): (WebCore::SerializingTreeWalker::createOutputObject): (WebCore::SerializingTreeWalker::length): (WebCore::SerializingTreeWalker::canDoFastRead): (WebCore::SerializingTreeWalker::getIndex): (WebCore::SerializingTreeWalker::getSparseIndex): (WebCore::SerializingTreeWalker::getProperty): (WebCore::SerializingTreeWalker::convertIfTerminal): (WebCore::SerializingTreeWalker::getPropertyNames): (WebCore::SerializingTreeWalker::putIndex): (WebCore::SerializingTreeWalker::putProperty): (WebCore::SerializingTreeWalker::startArray): (WebCore::SerializingTreeWalker::endArray): (WebCore::SerializingTreeWalker::startObject): (WebCore::SerializingTreeWalker::endObject): (WebCore::SerializedScriptValueData::serialize): (WebCore::DeserializingTreeWalker::DeserializingTreeWalker): (WebCore::DeserializingTreeWalker::null): (WebCore::DeserializingTreeWalker::isArray): (WebCore::DeserializingTreeWalker::isObject): (WebCore::DeserializingTreeWalker::asInputArray): (WebCore::DeserializingTreeWalker::asInputObject): (WebCore::DeserializingTreeWalker::createOutputArray): (WebCore::DeserializingTreeWalker::createOutputObject): (WebCore::DeserializingTreeWalker::length): (WebCore::DeserializingTreeWalker::canDoFastRead): (WebCore::DeserializingTreeWalker::getIndex): (WebCore::DeserializingTreeWalker::getSparseIndex): (WebCore::DeserializingTreeWalker::getProperty): (WebCore::DeserializingTreeWalker::convertIfTerminal): (WebCore::DeserializingTreeWalker::getPropertyNames): (WebCore::DeserializingTreeWalker::putIndex): (WebCore::DeserializingTreeWalker::putProperty): (WebCore::DeserializingTreeWalker::startArray): (WebCore::DeserializingTreeWalker::endArray): (WebCore::DeserializingTreeWalker::startObject): (WebCore::DeserializingTreeWalker::endObject): (WebCore::SerializedScriptValueData::deserialize): (WebCore::TeardownTreeWalker::shouldTerminate): (WebCore::TeardownTreeWalker::ticksUntilNextCheck): (WebCore::TeardownTreeWalker::didTimeOut): (WebCore::TeardownTreeWalker::throwStackOverflow): (WebCore::TeardownTreeWalker::throwInterruptedException): (WebCore::TeardownTreeWalker::null): (WebCore::TeardownTreeWalker::isArray): (WebCore::TeardownTreeWalker::isObject): (WebCore::TeardownTreeWalker::asInputArray): (WebCore::TeardownTreeWalker::asInputObject): (WebCore::TeardownTreeWalker::createOutputArray): (WebCore::TeardownTreeWalker::createOutputObject): (WebCore::TeardownTreeWalker::length): (WebCore::TeardownTreeWalker::canDoFastRead): (WebCore::TeardownTreeWalker::getIndex): (WebCore::TeardownTreeWalker::getSparseIndex): (WebCore::TeardownTreeWalker::getProperty): (WebCore::TeardownTreeWalker::convertIfTerminal): (WebCore::TeardownTreeWalker::getPropertyNames): (WebCore::TeardownTreeWalker::putIndex): (WebCore::TeardownTreeWalker::putProperty): (WebCore::TeardownTreeWalker::startArray): (WebCore::TeardownTreeWalker::endArray): (WebCore::TeardownTreeWalker::startObject): (WebCore::TeardownTreeWalker::endObject): (WebCore::SerializedScriptValueData::tearDownSerializedData): * bindings/js/SerializedScriptValue.h: Added. (WebCore::SharedSerializedData::~SharedSerializedData): (WebCore::SerializedScriptValueData::): (WebCore::SerializedScriptValueData::type): (WebCore::SerializedScriptValueData::~SerializedScriptValueData): (WebCore::SerializedScriptValueData::SerializedScriptValueData): (WebCore::SerializedScriptValueData::asImmediate): (WebCore::SerializedScriptValueData::asDouble): (WebCore::SerializedScriptValueData::asString): (WebCore::SerializedScriptValueData::asObject): (WebCore::SerializedScriptValueData::asArray): (WebCore::SerializedScriptValueData::operator bool ): (WebCore::SerializedScriptValueData::release): (WebCore::SerializedScriptValue::create): (WebCore::SerializedScriptValue::release): (WebCore::SerializedScriptValue::toString): (WebCore::SerializedScriptValue::deserialize): (WebCore::SerializedScriptValue::~SerializedScriptValue): (WebCore::SerializedScriptValue::SerializedScriptValue): * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorObjC.pm: * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): * dom/MessageEvent.h: (WebCore::MessageEvent::create): (WebCore::MessageEvent::data): * dom/MessageEvent.idl: * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): * dom/MessagePort.h: * dom/MessagePortChannel.cpp: (WebCore::MessagePortChannel::EventData::create): (WebCore::MessagePortChannel::EventData::EventData): * dom/MessagePortChannel.h: (WebCore::MessagePortChannel::EventData::message): * page/DOMWindow.cpp: (WebCore::PostMessageTimer::PostMessageTimer): (WebCore::DOMWindow::postMessage): * page/DOMWindow.h: * page/DOMWindow.idl: * page/EventSource.cpp: (WebCore::EventSource::createMessageEvent): * websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveMessage): * workers/DedicatedWorkerContext.cpp: (WebCore::DedicatedWorkerContext::postMessage): * workers/DedicatedWorkerContext.h: * workers/DedicatedWorkerContext.idl: * workers/Worker.cpp: (WebCore::Worker::postMessage): * workers/Worker.h: * workers/Worker.idl: * workers/WorkerContextProxy.h: * workers/WorkerMessagingProxy.cpp: (WebCore::MessageWorkerContextTask::create): (WebCore::MessageWorkerContextTask::MessageWorkerContextTask): (WebCore::MessageWorkerTask::create): (WebCore::MessageWorkerTask::MessageWorkerTask): (WebCore::WorkerMessagingProxy::postMessageToWorkerObject): (WebCore::WorkerMessagingProxy::postMessageToWorkerContext): * workers/WorkerMessagingProxy.h: * workers/WorkerObjectProxy.h: 2009-10-06 Adam Barth Unreviewed build fix for Windows. * plugins/PluginView.cpp: (WebCore::PluginView::load): 2009-10-06 Adam Barth Reviewed by Eric Seidel. Move FrameLoader::canLoad to SecurityOrigin https://bugs.webkit.org/show_bug.cgi?id=30111 * WebCore.base.exp: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::isSafeToLoadURL): * loader/Cache.cpp: (WebCore::Cache::requestResource): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadSubframe): (WebCore::FrameLoader::loadPlugin): (WebCore::FrameLoader::loadFrameRequest): (WebCore::FrameLoader::loadResourceSynchronously): (WebCore::FrameLoader::createJavaAppletWidget): * loader/FrameLoader.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::canLoad): (WebCore::SecurityOrigin::shouldHideReferrer): * page/SecurityOrigin.h: 2009-10-06 Adam Barth Reviewed by Eric Seidel. Move setLocalLoadPolicy and friends to SecurityOrigin https://bugs.webkit.org/show_bug.cgi?id=30110 These have more to do with security policies than with loading frames. * WebCore.base.exp: * dom/Document.cpp: (WebCore::Document::initSecurityContext): * loader/Cache.cpp: (WebCore::Cache::requestResource): * loader/FrameLoader.cpp: * loader/FrameLoader.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::setLocalLoadPolicy): (WebCore::SecurityOrigin::restrictAccessToLocal): (WebCore::SecurityOrigin::allowSubstituteDataAccessToLocal): * page/SecurityOrigin.h: (WebCore::SecurityOrigin::): 2009-10-06 Brian Weinstein Reviewed by Brady Eidson. Preparation for . Inspector should show cookies of sub-resources on the page. Implement getRawCookies for CFNetwork for Windows, so we can see more than just a key/value pair for Cookies when we are on Windows. * platform/network/win/CookieJarCFNetWin.cpp: (WebCore::getRawCookies): 2009-10-06 Dave Hyatt Reviewed by Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=30132, make beforeload work with elements and XML processing instructions. Fix up ProcessingInstruction's setData call so that it actually updates a stylesheet when the data gets changed. Move dispatchBeforeLoadedEvent to ContainerNode so all Elements (and ProcessingInstruction) can access it. Added fast/dom/beforeload/link-before-load.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::dispatchBeforeLoadEvent): * dom/ContainerNode.h: * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::checkStyleSheet): (WebCore::ProcessingInstruction::setData): * dom/ScriptElement.cpp: (WebCore::ScriptElementData::requestScript): * dom/ScriptElement.h: * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::endElementNs): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseMappedAttribute): (WebCore::HTMLLinkElement::process): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::forAttributeValue): * html/HTMLScriptElement.h: * svg/SVGScriptElement.cpp: * svg/SVGScriptElement.h: 2009-10-06 Simon Fraser Reviewed by Mark Rowe. accessibility/media-element.html crashes (and has incorrect result) https://bugs.webkit.org/show_bug.cgi?id=30108 Fix up the accessibilty label for the newly added fullscreen button, and update the test result accordingly. * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControl::controlTypeName): 2009-10-06 Kelly Norton Reviewed by Timothy Hatcher. Fixes Multiple calls to SetFrontendProxyObject can leave an InspectorTimelineAgent with an invalid InspectorFrontend. * inspector/InspectorController.cpp: (WebCore::InspectorController::setFrontendProxyObject): Adds a check for an existing timeline agent. 2009-10-06 Antti Koivisto Reviewed by Dave Kilzer. Move textRects to the right category in DOM.mm. Include DOMPrivate.h to ensure that the interfaces match. * bindings/objc/DOM.mm: (-[DOMNode textRects]): 2009-10-06 Benjamin C Meyer Reviewed by Ariya Hidayat. Match the behavior of other WebKit browser and have the first url of the drag data be the url passed in declareAndWriteDragImage and set the text of the drag data to be the title argument. Manual test: Drag the readability js link from http://lab.arc90.com/experiments/readability/ * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::declareAndWriteDragImage): 2009-10-06 Kent Tamura Reviewed by Darin Adler. Implement min/max attributes, ValidityState.rangeUnderflow and ValidityState.rangeOverflow for and https://bugs.webkit.org/show_bug.cgi?id=29069 HTMLInputElement::max and min are not defined for COM because they conflict with the standard min() and max() macros. Tests: fast/forms/ValidityState-rangeOverflow-number.html fast/forms/ValidityState-rangeOverflow-range.html fast/forms/ValidityState-rangeUnderflow-number.html fast/forms/ValidityState-rangeUnderflow-range.html fast/forms/input-minmax.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::rangeUnderflow): (WebCore::HTMLInputElement::rangeOverflow): (WebCore::HTMLInputElement::rangeMinimum): (WebCore::HTMLInputElement::rangeMaximum): * html/HTMLInputElement.h: * html/HTMLInputElement.idl: * html/ValidityState.cpp: (WebCore::ValidityState::rangeUnderflow): (WebCore::ValidityState::rangeOverflow): * html/ValidityState.h: * rendering/RenderSlider.cpp: (WebCore::SliderRange::SliderRange): (WebCore::SliderRange::valueFromElement): 2009-10-06 Adam Barth Reviewed by Eric Seidel. Move m_openedByDOM to Page https://bugs.webkit.org/show_bug.cgi?id=30109 We only need one instance of m_openedByDOM per page, we should move it to a page-scoped object. Notice that it's only ever touched for the main frame. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::createWindow): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::createWindow): * loader/FrameLoader.cpp: * loader/FrameLoader.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::close): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::openedByDOM): (WebCore::Page::setOpenedByDOM): * page/Page.h: 2009-10-06 Carol Szabo Reviewed by Ariya Hidayat. [Qt] Some functions in GraphicsContext do not work as expected if the associated painter has no clipping. https://bugs.webkit.org/show_bug.cgi?id=29691 No new tests are associated with this because DumpRenderTree always sets clipping on the painter, thus it would never hit the test case, but fast/box-shadow/basic-shadows.html is a good example of what happens if the clipping is not set by the user of QtWebKit. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipOutEllipseInRect): Fixed to handle the case that there is no clipping before the call. 2009-10-06 Dave Hyatt Reviewed by Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=30131, make beforeload fire on script elements. Added tests in fast/dom/beforeload/. * dom/ScriptElement.cpp: (WebCore::ScriptElementData::requestScript): * dom/ScriptElement.h: * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::endElementNs): * html/HTMLAttributeNames.in: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseMappedAttribute): (WebCore::HTMLScriptElement::dispatchBeforeLoadEvent): * html/HTMLScriptElement.h: * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::scriptHandler): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::dispatchBeforeLoadEvent): * svg/SVGScriptElement.h: 2009-10-06 Xan Lopez Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25526 [Gtk] Additional support is needed for caret browsing Enable caret movement commands also when caret browsing setting is enabled. * editing/EditorCommand.cpp: (WebCore::caretBrowsingEnabled): (WebCore::enabledVisibleSelectionOrCaretBrowsing): (WebCore::enabledInEditableTextOrCaretBrowsing): (WebCore::CommandEntry::): * manual-tests/gtk/caret-browsing.html: Added. 2009-10-06 Anton Muhin Reviewed by Dimitri Glazkov. Non standard, but popular exetension allows automagically turn a function into a namespace resolver. Support that in Chromium as well. Adjust CodeGeneratorV8 to treat XPathNSResolver in a special way. https://bugs.webkit.org/show_bug.cgi?id=30128 * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/V8DOMWrapper.h: (WebCore::V8DOMWrapper::getXPathNSResolver): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-10-06 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: close inspector client view on InspectorController::close API call. In order to run batch web inspector layout tests (and not affect subsequent tests) we should close inspector client's view upon InspectorController::close API call. https://bugs.webkit.org/show_bug.cgi?id=30009 * inspector/InspectorController.cpp: (WebCore::InspectorController::inspectedPageDestroyed): (WebCore::InspectorController::close): 2009-10-06 Simon Hausmann Reviewed by Tor Arne Vestbø. Fix the Qt/Windows build by stubbing out the still image support for halted plugins for the Qt build. Bugzilla entry https://bugs.webkit.org/show_bug.cgi?id=30130 tracks removing this by implementing Frame::nodeImage(). * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::halt): 2009-10-05 Holger Hans Peter Freyther Reviewed by Simon Hausmann. [Qt] Change QImageReader usage in ImageDecoderQt https://bugs.webkit.org/show_bug.cgi?id=27538 Replace the ReadContext with another appoach to reading the image. Attempt to only read meta information like the image size and number of frames (for animations) first and then when the page is getting drawn decode the image with the QImageReader. This is a huge benefit on pages with many images and saves ~2GB of memory on the szeged image test page. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::ImageDecoderQt): (WebCore::ImageDecoderQt::setData): (WebCore::ImageDecoderQt::isSizeAvailable): (WebCore::ImageDecoderQt::frameCount): (WebCore::ImageDecoderQt::repetitionCount): (WebCore::ImageDecoderQt::filenameExtension): (WebCore::ImageDecoderQt::frameBufferAtIndex): (WebCore::ImageDecoderQt::clearFrameBufferCache): (WebCore::ImageDecoderQt::internalDecodeSize): (WebCore::ImageDecoderQt::internalReadImage): (WebCore::ImageDecoderQt::internalHandleCurrentImage): (WebCore::ImageDecoderQt::forceLoadEverything): (WebCore::ImageDecoderQt::failRead): * platform/graphics/qt/ImageDecoderQt.h: 2009-10-05 Holger Hans Peter Freyther Reviewed by Simon Hausmann. [Qt] Make use of RGBA32Buffer in ImageDecoderQt https://bugs.webkit.org/show_bug.cgi?id=27538 Use the RGBA32Buffer instead of the internal ImageData to be able to use support of the base class, optionally support WebCore decoders for Qt and most importantly separate metadata and image data for better cache control. Remove ImageSourceQt as everything is now shared with the normal ImageSource. Change the ownership of the NativeImagePtr/QPixmap in ImageQt.cpp to delete the m_frame to be subject to cache control. * WebCore.pro: * platform/graphics/ImageSource.cpp: * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::ReadContext::ReadContext): (WebCore::ImageDecoderQt::ReadContext::read): (WebCore::ImageDecoderQt::ReadContext::readImageLines): (WebCore::ImageDecoderQt::ImageDecoderQt): (WebCore::ImageDecoderQt::setData): (WebCore::ImageDecoderQt::frameCount): (WebCore::ImageDecoderQt::frameBufferAtIndex): (WebCore::ImageDecoderQt::clearFrameBufferCache): * platform/graphics/qt/ImageDecoderQt.h: * platform/graphics/qt/ImageSourceQt.cpp: Removed. * platform/image-decoders/ImageDecoder.h: (WebCore::RGBA32Buffer::decodedImage): (WebCore::RGBA32Buffer::getAddr): * platform/image-decoders/qt/RGBA32BufferQt.cpp: Added. (WebCore::RGBA32Buffer::RGBA32Buffer): (WebCore::RGBA32Buffer::setDecodedImage): (WebCore::RGBA32Buffer::clear): (WebCore::RGBA32Buffer::zeroFill): (WebCore::RGBA32Buffer::copyBitmapData): (WebCore::RGBA32Buffer::setSize): (WebCore::RGBA32Buffer::asNewNativeImage): (WebCore::RGBA32Buffer::hasAlpha): (WebCore::RGBA32Buffer::setHasAlpha): (WebCore::RGBA32Buffer::setStatus): (WebCore::RGBA32Buffer::operator=): (WebCore::RGBA32Buffer::width): (WebCore::RGBA32Buffer::height): 2009-10-05 Holger Hans Peter Freyther Reviewed by Simon Hausmann. [Qt] ImageDecoderQt avoid QString creation. https://bugs.webkit.org/show_bug.cgi?id=27538 Avoid going from CString to QString to String and go directly from CString to String. Also avoid going to lower case to avoid an extra memory allocation. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoder::create): (WebCore::ImageDecoderQt::ImageDecoderQt): * platform/graphics/qt/ImageDecoderQt.h: 2009-10-05 Holger Hans Peter Freyther Reviewed by Simon Hausmann. [Qt] Cleanup the ImageDecoder of Qt. https://bugs.webkit.org/show_bug.cgi?id=27538 Remove the various enums for partial load. The fact is that this image decoder will decode everything that is in the file at once. Make it look like it behaves to ease fixing this core problem. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::ImageData::ImageData): (WebCore::ImageDecoderQt::ReadContext::ReadContext): (WebCore::ImageDecoderQt::ReadContext::read): (WebCore::ImageDecoderQt::ReadContext::readImageLines): (WebCore::ImageDecoderQt::hasFirstImageHeader): (WebCore::ImageDecoderQt::setData): * platform/graphics/qt/ImageDecoderQt.h: 2009-10-04 Holger Hans Peter Freyther Reviewed by Simon Hausmann. [Qt] Reimplement instead of overload frameCount in ImageDecoderQt.cpp https://bugs.webkit.org/show_bug.cgi?id=27538 Reimplement frameCount instead of overloading it. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::frameCount): * platform/graphics/qt/ImageDecoderQt.h: 2009-10-04 Holger Hans Peter Freyther Reviewed by Simon Hausmann. [Qt] QImageReader does not support progressive reading https://bugs.webkit.org/show_bug.cgi?id=27538 Change the ImageDecoderQt::setData to store the encoded data in ImageDecoder. Only call ReadContext when the whole Resource has been loaded to avoid needless calls to reset and the ReadContext as progressive loading is not supported. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::setData): * platform/graphics/qt/ImageDecoderQt.h: 2009-10-04 Holger Hans Peter Freyther Reviewed by Simon Hausmann. [Qt] Remove dead code from ImageDecoderQt https://bugs.webkit.org/show_bug.cgi?id=27538 Remove unused variables and debugging code. The debug code has never been used and does not provide anything useful. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::ReadContext::read): (WebCore::ImageDecoderQt::ReadContext::readImageLines): (WebCore::ImageDecoderQt::setData): (WebCore::ImageDecoderQt::isSizeAvailable): (WebCore::ImageDecoderQt::frameCount): (WebCore::ImageDecoderQt::repetitionCount): (WebCore::ImageDecoderQt::filenameExtension): (WebCore::ImageDecoderQt::imageAtIndex): 2009-10-06 Philippe Normand Reviewed by Xan Lopez. [GTK] segfault when calling gst_video_format_parse_caps in the video sink https://bugs.webkit.org/show_bug.cgi?id=30120 Fix use of gst_video_format_parse_caps() * platform/graphics/gtk/VideoSinkGStreamer.cpp: (webkit_video_sink_idle_func): 2009-10-06 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Update mediaControls CSS * css/mediaControlsQt.css: 2009-10-06 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Get rid of Preferences.ignoreWhitespace. https://bugs.webkit.org/show_bug.cgi?id=30092 * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent): (WebInspector.DOMAgent.prototype._childNodeCountUpdated): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.update): (WebInspector.ElementsTreeElement): (WebInspector.ElementsTreeElement.prototype.onpopulate): (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode): (WebInspector.ElementsTreeElement.prototype._updateChildren): * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.isCaretAtEndOfPrompt): * inspector/front-end/inspector.js: * inspector/front-end/utilities.js: (Node.prototype.rangeOfWord): (traverseNextNode): (traversePreviousNode): (onlyTextChild): 2009-10-06 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Do not call nodeTitleInfo twice + followup fixes for r49101. https://bugs.webkit.org/show_bug.cgi?id=30087 * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement): 2009-10-06 Girish Ramakrishnan Reviewed by Simon Hausmann. [Qt] Windowless plugins: Enable painting on printer. The print preview dialog crashed because the depth of the drawable changed owing to a bug in Qt - if you draw onto a 32-bit pixmap, and set a 24-bit pixmap as source, it will convert the source to 32-bit. 1210fa5b2d65895ad2be1f9ca7cae586e3b29dc1 is the bug fix in Qt. https://bugs.webkit.org/show_bug.cgi?id=20081 * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::paint): 2009-10-06 Girish Ramakrishnan Reviewed by Simon Hausmann. [Qt] Windowless plugins: Make painting and events work when page is zoomed. The element gets resized when zoomed. So, we have to make sure that we resize the drawable and do a setwindow call. Multiple calls to setwindow do not crash plugin in windowless mode (unlike in windowed mode). For mouse events we have to convert the pos to post-zoom position. https://bugs.webkit.org/show_bug.cgi?id=20081 * plugins/qt/PluginViewQt.cpp: (WebCore::setXButtonEventSpecificFields): (WebCore::setXMotionEventSpecificFields): (WebCore::setXCrossingEventSpecificFields): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::setNPWindowIfNeeded): 2009-10-06 Girish Ramakrishnan Reviewed by Simon Hausmann. [Qt] Windowless plugins: Add PluginQuirkRequiresDefaultScreenDepth quirk for Flash. Flash does not use the visual provided by us to draw into the drawable. It instead uses the system default visual (as returned by XDefaultVisual). This means that if the screen default visual is 24-bit, Flash won't be able to draw on 32-bit drawable created by us. This is a bug in Flash and for the moment, the above quirk is only set for Flash. Our strategy to create the drawable: 1. Create a 32-bit drawable if the default screen depth is 32 or the quirk is not set (i.e not flash) 2. If we didn't create a 32-bit drawable (maybe the Display has no such visual), we create a drawable with default screen depth. As a result of the above changes, content propagation behavior changes as: 1. Content propagation is possible only if the drawable we create and Qt's backing store are of the same depth. 2. If we created a 32-bit drawable, there is no need for content propagation (Qt will take care of it). https://bugs.webkit.org/show_bug.cgi?id=20081 * plugins/PluginPackage.cpp: (WebCore::PluginPackage::determineQuirks): * plugins/PluginQuirkSet.h: (WebCore::): * plugins/PluginView.cpp: (WebCore::PluginView::PluginView): * plugins/PluginView.h: * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::updatePluginWidget): (WebCore::PluginView::paint): (WebCore::getVisualAndColormap): (WebCore::PluginView::platformStart): (WebCore::PluginView::platformDestroy): 2009-10-06 Fumitoshi Ukai Reviewed by Ariya Hidayat. Qt build fix. https://bugs.webkit.org/show_bug.cgi?id=29362. In Qt 4.5, a new function QPainter::fillRect(QRect, QColor) is introduced to avoid the expensive construction of QBrush. By casting WebCore::Color to QColor, we can compile on Qt 4.4 and use optimization for solid color fill in Qt 4.5. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::drawLine): (WebCore::drawBorderlessRectShadow): 2009-10-05 Andrei Popescu Reviewed by Eric Carlson. Allow the platform media player to know the