2012-03-16 Kentaro Hara [Performance] Optimize innerHTML and outerHTML https://bugs.webkit.org/show_bug.cgi?id=81214 Reviewed by Adam Barth. This patch makes innerHTML and outerHTML 2.4 times faster. Performance test: https://bugs.webkit.org/attachment.cgi?id=132034 The performance test measures body.innerHTML for 3000 lines of HTML, which is copied from the HTML spec. - Chromium/Mac without the patch div.innerHTML: 1658.6 ms div.outerHTML: 4859.6 ms body.innerHTML: 640.2 ms body.outerHTML: 641.8 ms - Chromium/Mac with the patch div.innerHTML: 751.0 ms div.outerHTML: 2096.0 ms body.innerHTML: 271.2 ms body.outerHTML: 271.2 ms - Chromium/Linux without the patch div.innerHTML: 950.4 ms div.outerHTML: 2257.8 ms body.innerHTML: 452.8 ms body.outerHTML: 457.6 ms - Chromium/Linux with the patch div.innerHTML: 582.4 ms div.outerHTML: 1283.0 ms body.innerHTML: 233.0 ms body.outerHTML: 233.4 ms - AppleWebKit/Mac without the patch div.innerHTML: 900.6 ms div.outerHTML: 2245.2 ms body.innerHTML: 462.6 ms body.outerHTML: 468.0 ms - AppleWebKit/Mac with the patch div.innerHTML: 529.8 ms div.outerHTML: 1090.2 ms body.innerHTML: 239.2 ms body.outerHTML: 239.2 ms This patch applies the following two optimizations: (a) Remove redundant copies between Vector and StringBuilders in MarkupAccumulator::serializeNodes(), MarkupAccumulator::appendStartTag(), and MarkupAccumulator::appendEndTag(). (Previous behavior) - Create a StringBuilder for each tag. - Append a created string in each StringBuilder to Vector, parsing the DOM tree. - After the parsing, allocate a StringBuilder whose size is the sum of all Strings in Vector. - Append all Strings in Vector to the StringBuilder. (New behavior) - Allocate a StringBuilder with a default buffer size. - Append created strings to the StringBuilder, incrementally parsing the DOM tree. (b) Optimize stringBuilder.append(). (b-1) Replace stringBuilder.append("A") with stringBuilder.append('A'). stringBuilder.append("A") requires to cast the characters to LChar*, and then call strlen("A"). stringBuilder.append('A') is faster. (b-2) Replace stringBuilder.append("AB") with stringBuilder.append('A') and stringBuilder.append('B'). In my experiment, appending characters one by one is faster than appending the characters at a breath if the number of characters is less than 3. (b-3) Hard-code a string length; i.e. replace stringBuilder.append("ABCDE") with stringBuilder.append("ABCDE", 5). While the former requires to call strlen("ABCDE"), the latter does not. (a) improves performance by 170% ~ 200%. (b) improves performance by 30 ~ 40%. Tests: fast/dom/Range/range-extract-contents.html fast/dom/serialize-nodes.xhtml fast/dom/XMLSerializer.html and all other tests that use innerHTML or outerHTML. No change in the test results. * editing/MarkupAccumulator.cpp: (WebCore::MarkupAccumulator::serializeNodes): (WebCore::MarkupAccumulator::appendString): (WebCore::MarkupAccumulator::appendStartTag): (WebCore::MarkupAccumulator::appendEndTag): (WebCore::MarkupAccumulator::concatenateMarkup): (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue): (WebCore::MarkupAccumulator::appendComment): (WebCore::MarkupAccumulator::appendDocumentType): (WebCore::MarkupAccumulator::appendProcessingInstruction): (WebCore::MarkupAccumulator::appendOpenTag): (WebCore::MarkupAccumulator::appendAttribute): (WebCore::MarkupAccumulator::appendCDATASection): * editing/MarkupAccumulator.h: (MarkupAccumulator): 2012-06-27 Kentaro Hara Performance: Optimize Dromaeo/dom-query.html by caching NodeRareData on Document https://bugs.webkit.org/show_bug.cgi?id=90059 Reviewed by Ryosuke Niwa. This patch improves performance of document.getElementsBy*(). e.g. the patch makes Dromaeo/dom-query.html 5.4% faster. Dromaeo/dom-query.html without the patch (Chromium/Linux): 784714 runs/s, 765947 runs/s, 803109 runs/s, 804450 runs/s Dromaeo/dom-query.html with the patch (Chromium/Linux): 839245 runs/s, 829867 runs/s, 811032 runs/s, 847486 runs/s Based on the assumption that document.getElementsByClassName(), document.getElementsByTagName() and document.getElementsByName() would be used frequently in the real world, this patch implements a fast path for Document methods that require to access NodeRareData. Specifically, this patch caches a pointer to NodeRareData on Document, by which Document can access NodeRareData without looking up a HashMap. The only performance concern is the overhead of the isDocumentNode() check that this patch added to Node::ensureRareData. However, I could not observe any performance regression caused by the overhead. No tests. No change in behavior. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::setCachedRareData): I didn't inline this method, since the inlining slightly regressed performance for some reason. (WebCore): * dom/Document.h: (WebCore): (WebCore::Document::cachedRareData): (Document): (~Document): Moved 'm_document = 0' to the tail of the destructor, since isDocumentNode() has to return true in clearRareData() that is called in ~Document(). * dom/Node.cpp: (WebCore::Node::ensureRareData): (~Node): Moved the assertion into clearRareData(). 2012-04-09 James Robinson Remove partially implemented per-Element visibility checks from requestAnimationFrame logic https://bugs.webkit.org/show_bug.cgi?id=74232 Reviewed by Dean Jackson. The initial requestAnimationFrame implementation had an Element parameter as the second argument to the function. This element was intended to convey the element associated with the animation so that when the element was not visible the animation callback would not be run. The checked in implementation does a very limited check - testing for display:none and being detached from the tree - but does it in a way that does not work correctly if an element's visibility is manipulated by a callback running from a different document. It also adds significant complexity to the code, making it less hackable and easy to introduce subtle security bugs or infinite loops. This patch removes the parameter. Since it has always been marked optional, there is no web compat risk. If this functionality is added back in the future it needs to be implemented in a way that considers all callbacks within a Page and not only those within a single Document. 2011-12-16 Zhenyao Mo Postpone deleteRenderbuffer/deleteTexture until all framebuffer attachment points are removed. https://bugs.webkit.org/show_bug.cgi?id=74741 Reviewed by Kenneth Russell. Use WebGLObject's attachment count mechanism to track if a renderbuffer/texture is still attached to framebuffers, and if its deletion should be delated or not. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer): (WebCore::WebGLFramebuffer::getAttachment): (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): (WebCore::WebGLFramebuffer::deleteObjectImpl): (WebCore::WebGLFramebuffer::isBound): * html/canvas/WebGLFramebuffer.h: 2012-04-10 Zhenyao Mo WebGLRenderingContext should defer caching program info https://bugs.webkit.org/show_bug.cgi?id=83513 Reviewed by Kenneth Russell. * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::WebGLProgram): (WebCore::WebGLProgram::numActiveAttribLocations): call cacheInfoIfNeeded(); (WebCore::WebGLProgram::getActiveAttribLocation): Ditto. (WebCore::WebGLProgram::isUsingVertexAttrib0): Ditto. (WebCore::WebGLProgram::getLinkStatus): Ditto. (WebCore): (WebCore::WebGLProgram::cacheActiveAttribLocations): (WebCore::WebGLProgram::cacheInfoIfNeeded): Cache link status, active attire locations, etc if needed. (WebCore::WebGLProgram::increaseLinkCount): also invalidate cached info. * html/canvas/WebGLProgram.h: (WebGLProgram): * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::linkProgram): Do not cache program info immediately. 2012-05-04 Zhenyao Mo vertexAttribPointer needs to reject large negative offsets https://bugs.webkit.org/show_bug.cgi?id=85117 Reviewed by Kenneth Russell. * html/canvas/WebGLRenderingContext.cpp: Use long long for GLsizeiptr and GLintptr (WebCore): (WebCore::WebGLRenderingContext::bufferData): (WebCore::WebGLRenderingContext::bufferSubData): (WebCore::WebGLRenderingContext::drawElements): (WebCore::WebGLRenderingContext::getVertexAttribOffset): (WebCore::WebGLRenderingContext::vertexAttribPointer): * html/canvas/WebGLRenderingContext.h: Ditto (WebGLRenderingContext): * html/canvas/WebGLRenderingContext.idl: Ditto 2011-05-11 Antoine Labour * dom/Document.cpp: (WebCore::Document::webkitRequestAnimationFrame): * dom/Document.h: * dom/RequestAnimationFrameCallback.h: * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * dom/ScriptedAnimationController.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::webkitRequestAnimationFrame): * page/DOMWindow.h: * page/DOMWindow.idl: 2011-12-12 James Robinson Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change https://bugs.webkit.org/show_bug.cgi?id=74231 Reviewed by Simon Fraser. The RequestAnimationFrame spec has renamed cancelRequestAnimationFrame to cancelAnimationFrame in response to feedback from Mozilla and Microsoft that the old name was too long and didn't parallel setTimeout/clearTimeout and setInterval/clearInterval very well. This updates our IDL to match, while preserving the old name as an alias to be compatible with current content. * dom/Document.cpp: (WebCore::Document::webkitCancelAnimationFrame): * dom/Document.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::webkitCancelAnimationFrame): * page/DOMWindow.h: (WebCore::DOMWindow::webkitCancelRequestAnimationFrame): * page/DOMWindow.idl: 2011-09-26 James Robinson [mac] Timestamp parameter to requestAnimationFrame is busted in USE(REQUEST_ANIMATION_FRAME_TIMER) path https://bugs.webkit.org/show_bug.cgi?id=68769 Reviewed by Simon Fraser. Convert the time parameter from double to DOMTimeStamp using convertSecondsToDOMTimeStamp rather than relying on implicit double->long conversion, which ignores the units of the value. Test: fast/animation/request-animation-frame-timestamps-advance.html * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::animationTimerFired): 2011-09-09 Chris Marrin requestAnimationFrame doesn't throttle on Mac https://bugs.webkit.org/show_bug.cgi?id=67171 Reviewed by Simon Fraser. Changed requestAnimationFrame to use a Timer in ScriptedAnimationController on Mac, rather than runLoopObservers. The Timer is throttled to fire no faster than every 15ms. It is behind a WTF_USE_REQUEST_ANIMATION_FRAME_TIMER flag and can be used by any implementation, but currently it is only enabled by PLATFORM(MAC). * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::resume): (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): (WebCore::ScriptedAnimationController::scheduleAnimation): (WebCore::ScriptedAnimationController::animationTimerFired): * dom/ScriptedAnimationController.h: * loader/EmptyClients.h: * page/Chrome.cpp: (WebCore::Chrome::scheduleAnimation): * page/ChromeClient.h: 2011-05-11 Antoine Labour * dom/Document.cpp: (WebCore::Document::webkitRequestAnimationFrame): * dom/Document.h: * dom/RequestAnimationFrameCallback.h: * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * dom/ScriptedAnimationController.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::webkitRequestAnimationFrame): * page/DOMWindow.h: * page/DOMWindow.idl: 2011-12-12 James Robinson Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change https://bugs.webkit.org/show_bug.cgi?id=74231 Reviewed by Simon Fraser. The RequestAnimationFrame spec has renamed cancelRequestAnimationFrame to cancelAnimationFrame in response to feedback from Mozilla and Microsoft that the old name was too long and didn't parallel setTimeout/clearTimeout and setInterval/clearInterval very well. This updates our IDL to match, while preserving the old name as an alias to be compatible with current content. * dom/Document.cpp: (WebCore::Document::webkitCancelAnimationFrame): * dom/Document.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::webkitCancelAnimationFrame): * page/DOMWindow.h: (WebCore::DOMWindow::webkitCancelRequestAnimationFrame): * page/DOMWindow.idl: 2011-09-26 James Robinson [mac] Timestamp parameter to requestAnimationFrame is busted in USE(REQUEST_ANIMATION_FRAME_TIMER) path https://bugs.webkit.org/show_bug.cgi?id=68769 Reviewed by Simon Fraser. Convert the time parameter from double to DOMTimeStamp using convertSecondsToDOMTimeStamp rather than relying on implicit double->long conversion, which ignores the units of the value. Test: fast/animation/request-animation-frame-timestamps-advance.html * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::animationTimerFired): 2011-09-09 Chris Marrin requestAnimationFrame doesn't throttle on Mac https://bugs.webkit.org/show_bug.cgi?id=67171 Reviewed by Simon Fraser. Changed requestAnimationFrame to use a Timer in ScriptedAnimationController on Mac, rather than runLoopObservers. The Timer is throttled to fire no faster than every 15ms. It is behind a WTF_USE_REQUEST_ANIMATION_FRAME_TIMER flag and can be used by any implementation, but currently it is only enabled by PLATFORM(MAC). * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::resume): (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): (WebCore::ScriptedAnimationController::scheduleAnimation): (WebCore::ScriptedAnimationController::animationTimerFired): * dom/ScriptedAnimationController.h: * loader/EmptyClients.h: * page/Chrome.cpp: (WebCore::Chrome::scheduleAnimation): * page/ChromeClient.h: 2011-05-11 Antoine Labour Reviewed by David Levin. Expose shouldBufferData to ThreadableLoaderOptions to be able to disable buffering of the loaded resource. https://bugs.webkit.org/show_bug.cgi?id=60656 * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::loadRequest): Pass the shouldBufferData to the resource load scheduler, forcing it to true for the preflight request. * loader/ResourceLoadScheduler.cpp: (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad): Pass through shouldBufferData to SubresourceLoader::create * loader/ResourceLoadScheduler.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): Set shouldBufferData on the newly created loader * loader/SubresourceLoader.h: * loader/ThreadableLoader.h: (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Add shouldBufferData to the options, defaulting to true. 2011-05-11 Jay Civelli Reviewed by Adam Barth. Adding a Content-Type parser. This is needed for MHTML support. https://bugs.webkit.org/show_bug.cgi?id=60637 (WebCore::ScriptController::disableEval): * platform/network/ContentTypeParser.cpp: Added. * platform/network/ContentTypeParser.h: Added. 2011-05-11 Jessie Berlin Reviewed by Steve Falkenburg. [Windows WebKit2] Use cookies set in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=60274 Share the default storage session between the UI and Web Processes. * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::defaultSessionCookieStorage): Keep track of the default storage session cookie storage. (WebCore::currentCookieStorage): Call defaultCookieStorage to get the default cookie storage. (WebCore::defaultCookieStorage): If there is a default storage session cookie storage, prefer that over getting the default cookie storage. In the Web Process, asking CFNetwork for the default cookie storage directly without specifying a storage session will not get the cookie storage being shared by the UI and Web Processes. * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willSendRequest): Make sure to set the current storage session on any requests used by the Web Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid doing anything with the Web Process's default storage session (which is not the one shared with the UI Process). (WebCore::makeFinalRequest): Ditto. (WebCore::ResourceHandle::willSendRequest): Ditto. (WebCore::ResourceHandle::currentStorageSession): If there is a Private Browsing storage session, return that. If not, on Windows return the default storage session that is being shared with the UI Process and on Mac return 0. (WebCore::defaultCFURLStorageSession): (WebCore::ResourceHandle::setDefaultStorageSession): (WebCore::ResourceHandle::defaultStorageSession): * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest): Make sure to set the current storage session on any requests used by the Web Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid doing anything with the Web Process's default storage session (which is not the one shared with the UI Process). 2011-05-11 Lucas De Marchi Reviewed by David Kilzer. Remove wml directory from include lists https://bugs.webkit.org/show_bug.cgi?id=60646 Remove wml dir from CMake, Autotools and qmake build systems since WML was removed in r85256. No new tests since no change in functionality. * CMakeLists.txt: * GNUmakefile.am: * WebCore.pri: 2011-05-11 Lucas De Marchi Reviewed by Antonio Gomes. [CMAKE] Move EFL-specific file to CMakeListsEfl.txt https://bugs.webkit.org/show_bug.cgi?id=60642 Move file EFL-specific file to the CMakeListsEfl.txt file. This implies having to include CMakeLists${PORT}.txt before the ADD_CUSTOM_COMMAND calls, since they depend on lists that now may change inside a port like WebCore_USER_AGENT_STYLE_SHEETS. No new tests since no change in functionality. * CMakeLists.txt: remove css file specific to EFL port. * CMakeListsEfl.txt: move file here. 2011-05-11 Tao Bai Reviewed by David Kilzer. Return empty Favicon URL instead of default one when the frame isn't top level one https://bugs.webkit.org/show_bug.cgi?id=60527 This issue was discovered by chromium browser test. * dom/Document.cpp: (WebCore::Document::setIconURL): Restored original logic which was inadvertently flipped by http://trac.webkit.org/changeset/85785. * loader/FrameLoader.cpp: (WebCore::FrameLoader::iconURLs): (WebCore::FrameLoader::fillIconURL): Restored original logic, the empty URL should be returned instead of default one. The client (at least chromium) may rely on the returned value to decided whether the favicon should be changed. 2011-05-11 Nat Duca Reviewed by Kenneth Russell. [chromium] Make throttling of WebGL based on webgl frames, not compositor frames https://bugs.webkit.org/show_bug.cgi?id=60508 When a WebGL layer is dirtied outside of a requestAnimFrame callback, we need to prevent WebGL from running too far ahead of the GPU process. The current throttling mechanism relies on prepareTexture being called for every WebGL frame. However, in a non-requestAnimFrame application, multiple frames might get created before the compositor runs and calls prepareTexture on the surface. To address this, we post a task that calls a special rate limiting GL extension on the WebGL context after every WebGL "frame." When the compositor runs, it calls prepareTexture as usual. * platform/graphics/chromium/Extensions3DChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setIsAnimating): (WebCore::LayerRendererChromium::isAnimating): * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromiumRateLimitTask::WebGLLayerChromiumRateLimitTask): (WebCore::WebGLLayerChromiumRateLimitTask::run): (WebCore::WebGLLayerChromiumRateLimitTask::cancel): (WebCore::WebGLLayerChromium::WebGLLayerChromium): (WebCore::WebGLLayerChromium::~WebGLLayerChromium): (WebCore::WebGLLayerChromium::setTextureUpdated): (WebCore::WebGLLayerChromium::setContext): * platform/graphics/chromium/WebGLLayerChromium.h: (WebCore::WebGLLayerChromium::context): 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 12/12: Enable accelerated animations in texture-mapper. The entire interpolation mechanism happens inside TextureMapper, and we interpolate right before we paint. No new tests. Tests in LayoutTests/compositing cover this. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper): (WebCore::GraphicsLayerTextureMapper::syncCompositingState): (WebCore::GraphicsLayerTextureMapper::addAnimation): (WebCore::GraphicsLayerTextureMapper::pauseAnimation): (WebCore::GraphicsLayerTextureMapper::removeAnimation): (WebCore::GraphicsLayerTextureMapper::animationStartedTimerFired): * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::descendantsOrSelfHaveRunningAnimations): (WebCore::normalizedAnimationValue): (WebCore::TextureMapperNode::applyOpacityAnimation): (WebCore::solveEpsilon): (WebCore::solveCubicBezierFunction): (WebCore::solveStepsFunction): (WebCore::applyTimingFunction): (WebCore::TextureMapperNode::applyTransformAnimation): (WebCore::TextureMapperNode::applyAnimationFrame): (WebCore::TextureMapperNode::applyAnimation): (WebCore::TextureMapperNode::hasRunningOpacityAnimation): (WebCore::TextureMapperNode::hasRunningTransformAnimation): (WebCore::TextureMapperNode::syncAnimations): (WebCore::copyTimingFunction): (WebCore::copyAnimationValue): (WebCore::TextureMapperAnimation::TextureMapperAnimation): * platform/graphics/texmap/TextureMapperNode.h: (WebCore::TextureMapperAnimation::create): 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 11/12: Patch PluginView to build with TextureMapper on Linux. No new tests. This is a build fix. * platform/qt/QWebPageClient.h: (QWebPageClient::setRootGraphicsLayer): 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 10/12: Glue the TextureMapper refactoring into Webkit(1). Pass a GraphicsLayer* instead of a PlatformLayer* to the QWebPageClient. No new tests. Tests in LayoutTests/compositing cover this. * platform/qt/QWebPageClient.h: (QWebPageClient::setRootGraphicsLayer): 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 9/12: Refactor TextureMapperNode for performance, readability and accuracy. Changes include: 1. Support the new TextureMapperPlatformLayer for media & WebGL. 2. Use a pool for intermediate surfaces, to avoid constant allocating/freeing of textures. 3. Divide computation operations to different smaller functions. 4. Get rid of scissor/clip layers, use transformed clip instead. 5. Allow tiling for big layers. No new tests. Tests in LayoutTests/compositing cover this. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper): (WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect): (WebCore::GraphicsLayerTextureMapper::setContentsToMedia): (WebCore::GraphicsLayerTextureMapper::platformLayer): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay): (WebCore::GraphicsLayerTextureMapper::setContentsToCanvas): (WebCore::GraphicsLayerTextureMapper::node): * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperSurfaceManager::getIntermediateSurface): (WebCore::TextureMapperSurfaceManager::releaseIntermediateSurface): (WebCore::toTextureMapperNode): (WebCore::TextureMapperNode::rootLayer): (WebCore::TextureMapperNode::setTransform): (WebCore::TextureMapperNode::computePerspectiveTransformIfNeeded): (WebCore::TextureMapperNode::countDescendantsWithContent): (WebCore::TextureMapperNode::computeOverlapsIfNeeded): (WebCore::TextureMapperNode::computeReplicaTransformIfNeeded): (WebCore::TextureMapperNode::computeLocalTransformIfNeeded): (WebCore::TextureMapperNode::needsToComputeBoundingRect): (WebCore::TextureMapperNode::computeAllTransforms): (WebCore::TextureMapperNode::computeBoundingRectFromRootIfNeeded): (WebCore::TextureMapperNode::computeTiles): (WebCore::TextureMapperNode::computeVisibleRectIfNeeded): (WebCore::TextureMapperNode::renderContent): (WebCore::TextureMapperNode::paint): (WebCore::TextureMapperNode::targetRectForTileRect): (WebCore::TextureMapperNode::paintSelf): (WebCore::TextureMapperNode::compareGraphicsLayersZValue): (WebCore::TextureMapperNode::sortByZOrder): (WebCore::TextureMapperNode::paintSelfAndChildren): (WebCore::TextureMapperNode::paintReflection): (WebCore::TextureMapperNode::paintRecursive): (WebCore::TextureMapperNode::~TextureMapperNode): (WebCore::TextureMapperNode::resetDescendants): (WebCore::TextureMapperNode::setContentScale): (WebCore::TextureMapperNode::setVisibleRect): (WebCore::TextureMapperNode::syncCompositingState): (WebCore::TextureMapperNode::invalidateOverlaps): (WebCore::TextureMapperNode::syncCompositingStateSelf): (WebCore::TextureMapperNode::descendantsOrSelfHaveRunningAnimations): * platform/graphics/texmap/TextureMapperNode.h: (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions): (WebCore::TextureMapperAnimation::create): (WebCore::TextureMapperNode::TextureMapperNode): (WebCore::TextureMapperNode::size): (WebCore::TextureMapperNode::setOpacity): (WebCore::TextureMapperNode::setTextureMapper): (WebCore::TextureMapperNode::media): (WebCore::TextureMapperNode::texture): (WebCore::TextureMapperNode::targetRect): (WebCore::TextureMapperNode::entireRect): (WebCore::TextureMapperNode::contentSize): (WebCore::TextureMapperNode::State::State): (WebCore::deleteOwnedPtr): 2011-05-07 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 8/12: Changes to the GL backend of TextureMapper. The code for these changes is intertwined so it was hard to separate them to different patches. This is the summary of what the changes do: 1. Use stencil for clipping instead of scissors, refactor beginClip/endClip functions to accomodate that. 2. Get rid of the "Target" program which forced an intermediate framebuffer for any content. Instead, we upload the texture with BGRA from the start. Ports other than Qt can optimize this for their needs. 3. Use glGetAttribLocation instead of glBindAttribLocation; On some platforms we might be polluting the GL context otherwise. 4. Use image UIDs (cache-key in Qt) instead of image pointers. This is important for images that change their internal content. 5. Allow packing and unpacking. This is currently a stub, for future memory optimizations. 6. Put some of the initialization code here (beginPainting/endPainting). 7. Allow painting a texture via an ID instead of a BitmapTexture data type. 8. Get rid of makeContextCurrent / obtainCurrentContext. We only use texture-mapper when the context is current. No new tests. Tests in LayoutTests/compositing test this. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::debugGLCommand): (WebCore::TextureMapperGLData::GlobalGLData::createShaderProgram): (WebCore::TextureMapperGLData::GlobalGLData::GlobalGLData): (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::findOrCreate): (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::deref): (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::~DirectlyCompositedImageRepository): (WebCore::TextureMapperGLData::TextureMapperGLData): (WebCore::BitmapTextureGL::id): (WebCore::BitmapTextureGL::isOpaque): (WebCore::BitmapTextureGL::relativeSize): (WebCore::BitmapTextureGL::setTextureMapper): (WebCore::BitmapTextureGL::pack): (WebCore::BitmapTextureGL::unpack): (WebCore::BitmapTextureGL::isPacked): (WebCore::BitmapTextureGL::BitmapTextureGL): (WebCore::TextureMapperGL::TextureMapperGL): (WebCore::TextureMapperGL::initializeShaders): (WebCore::TextureMapperGL::beginPainting): (WebCore::TextureMapperGL::endPainting): (WebCore::TextureMapperGL::drawTexture): (WebCore::BitmapTextureGL::reset): (WebCore::BitmapTextureGL::endPaint): (WebCore::BitmapTextureGL::setContentsToImage): (WebCore::createProjectionMatrix): (WebCore::BitmapTextureGL::bind): (WebCore::BitmapTextureGL::destroy): (WebCore::TextureMapperGL::~TextureMapperGL): (WebCore::TextureMapperGL::bindSurface): (WebCore::TextureMapperGL::beginClip): (WebCore::TextureMapperGL::endClip): (WebCore::TextureMapperGL::createTexture): * platform/graphics/opengl/TextureMapperGL.h: (WebCore::TextureMapperGL::allowSurfaceForRoot): (WebCore::TextureMapperGL::create): (WebCore::TextureMapperGL::setGraphicsContext): (WebCore::TextureMapperGL::graphicsContext): (WebCore::TextureMapperGL::isOpenGLBacked): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::paintToTextureMapper): (WebCore::GraphicsContext3DInternal::boundingRect): (WebCore::GraphicsContext3DInternal::paint): * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::repaint): (WebCore::MediaPlayerPrivateQt::paintToTextureMapper): * platform/graphics/qt/MediaPlayerPrivateQt.h: (WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged): (WebCore::MediaPlayerPrivateQt::platformLayer): 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 7/12: Allow a 3D-context (WebGL) to paint itself into a TextureMapper. This allows using a WebGL canvas with CSS. No new tests. Tests in LayoutTests/compositing/webgl cover this. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::paintToTextureMapper): (WebCore::GraphicsContext3DInternal::boundingRect): (WebCore::GraphicsContext3DInternal::paint): * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::repaint): (WebCore::MediaPlayerPrivateQt::paintToTextureMapper): * platform/graphics/qt/MediaPlayerPrivateQt.h: (WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged): (WebCore::MediaPlayerPrivateQt::platformLayer): 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 6/12: Allow the Qt media player implementation to paint into a TextureMapper, to allow videos to be composited. No new tests. Tests in LayoutTests/compositing cover this. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::repaint): (WebCore::MediaPlayerPrivateQt::paintToTextureMapper): * platform/graphics/qt/MediaPlayerPrivateQt.h: (WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged): (WebCore::MediaPlayerPrivateQt::platformLayer): 2011-05-11 John Bauman Reviewed by Kenneth Russell. Don't send zeros in TexImage if GL implementation handles that https://bugs.webkit.org/show_bug.cgi?id=60581 Chromium already handles zeroing textures upon creation, so don't bother zeroing them in WebKit, as that causes some unnecessary memcpys of zeros. No new tests as functionality is the same. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::texImage2DBase): * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::texImage2DResourceSafe): * platform/graphics/GraphicsContext3D.h: * platform/graphics/gtk/GraphicsContext3DGtk.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): 2011-05-11 Simon Fraser Attempt to fix Chromium Mac build. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderThumb): 2011-05-11 Daniel Bates Reviewed by Antonio Gomes. [Qt] Extract code to set mouse event modifiers into common function https://bugs.webkit.org/show_bug.cgi?id=60649 Consolidate code to set the keyboard modifiers for a mouse event into a common function that can be used by both PlatformMouseEvent(QGraphicsSceneMouseEvent*, int clickCount) and PlatformMouseEvent(QInputEvent*, int clickCount) so as to remove duplicate code. No functionality was changed. So, no new tests. * platform/qt/PlatformMouseEventQt.cpp: (WebCore::mouseEventModifiersFromQtKeyboardModifiers): Added. (WebCore::PlatformMouseEvent::PlatformMouseEvent): Modified to call mouseEventModifiersFromQtKeyboardModifiers(). 2011-05-11 Levi Weintraub Reviewed by Eric Seidel. Switch RenderBoxModelObject::paintBorder to use IntRect instead of four ints https://bugs.webkit.org/show_bug.cgi?id=60591 Switching RenderBoxModelObject::paintBorder to use IntRect instead of four ints representing a rect. No new tests since there is no functionality change. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorationsWithSize): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBorder): * rendering/RenderBoxModelObject.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): * rendering/RenderTable.cpp: (WebCore::RenderTable::paintBoxDecorations): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBoxDecorations): 2011-05-11 Sheriff Bot Unreviewed, rolling out r86255. http://trac.webkit.org/changeset/86255 https://bugs.webkit.org/show_bug.cgi?id=60660 REGRESSION (r86255): Lots of tests crashing in CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release (WebKit2 Tests) (Requested by aroben on #webkit). * platform/network/ResourceHandle.h: * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::currentCookieStorage): (WebCore::defaultCookieStorage): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willSendRequest): (WebCore::makeFinalRequest): (WebCore::ResourceHandle::willSendRequest): * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest): 2011-05-11 Sam Weinig Reviewed by Eric Seidel. Frequent crashes beneath WebCore::ScriptElement::prepareScript https://bugs.webkit.org/show_bug.cgi?id=60559 * html/parser/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::runScript): Add null check and explanation that we are keeping the ASSERT to help track down the cause and produce a test. 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 5/12: Implement the new TextureMapper functions for the Qt backend. This allow non-rectangular clipping, some stub functions, and getting a unique id for an image. No new tests. Tests in LayoutTests/compositing cover this. * platform/graphics/qt/TextureMapperQt.cpp: (WebCore::TextureMapperQt::beginClip): (WebCore::TextureMapperQt::endClip): (WebCore::TextureMapperQt::viewportSize): (WebCore::TextureMapperQt::setGraphicsContext): (WebCore::TextureMapperQt::graphicsContext): (WebCore::TextureMapperQt::drawTexture): (WebCore::TextureMapperQt::beginPainting): (WebCore::TextureMapperQt::endPainting): (WebCore::RGBA32PremultimpliedBufferQt::beginPaint): (WebCore::uidForImage): * platform/graphics/qt/TextureMapperQt.h: 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 3/12: TextureMapper shouldn't depend on OpenGL, but rather only allow the GL backend when OpenGL is present. No new tests. This is a build fix. * WebCore.pri: * WebCore.pro: 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 2/12: Add a few functions to the TextureMapper API, allowing: 1. an entry/exit point for painting (beginPaint/endPaint) 2. Clipping with a matrix, since we use stencil instead of scissors 3. Draw a texture directly with an ID 4. Remove offset, since we're using real tiling 5. numberOfBytes calculation for textures, for memory management No new tests. Tests in LayoutTests/compositing test this. * platform/graphics/texmap/TextureMapper.h: (WebCore::BitmapTexture::destroy): (WebCore::BitmapTexture::allowOfflineTextureUpload): (WebCore::BitmapTexture::bpp): (WebCore::BitmapTexture::numberOfBytes): (WebCore::TextureMapper::viewportSize): (WebCore::TextureMapper::setViewportSize): (WebCore::TextureMapper::allowPartialUpdates): (WebCore::TextureMapper::isOpenGLBacked): (WebCore::TextureMapper::setTransform): (WebCore::TextureMapper::transform): (WebCore::TextureMapper::beginPainting): (WebCore::TextureMapper::endPainting): 2011-05-11 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch https://bugs.webkit.org/show_bug.cgi?id=60439 Patch 1/12: Change the TextureMapperPlatformLayer API to allow a 3D-context or a media player to decide how to paint into the TextureMapper, rather than mandate specific types of platform layers. No new tests. Tests in LayoutTests/compositing test this. * platform/graphics/GraphicsLayer.h: * platform/graphics/texmap/TextureMapperPlatformLayer.h: 2011-05-11 Simon Fraser Reviewed by Darin Adler. Flesh out RenderLayer's ScrollableArea implementation a little more https://bugs.webkit.org/show_bug.cgi?id=60593 Override a few more ScrollableArea methods on RenderLayer as a baby-step towards animating overflow div scrolling. * platform/ScrollableArea.h: (WebCore::ScrollableArea::visibleContentRect): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollPosition): (WebCore::RenderLayer::minimumScrollPosition): (WebCore::RenderLayer::maximumScrollPosition): (WebCore::RenderLayer::visibleContentRect): (WebCore::RenderLayer::overhangAmount): (WebCore::RenderLayer::didCompleteRubberBand): * rendering/RenderLayer.h: (WebCore::RenderLayer::shouldSuspendScrollAnimations): 2011-05-11 Simon Fraser Reviewed by Dave Hyatt. Slider thumb draws upside-down in WebKit2 Slider thumb has odd appearance Fix two issues drawing the slider thumb. To fix , if we detect that we're in WebKit2 by virtual of the FrameView not having a documentView, then flip the graphics context. To fix , we call -drawInteriorWithFrame:inView: rather than -drawWithFrame:inView: so that AppKit doesn't draw a section of track behind the thumb. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintSliderThumb): 2011-05-11 Jessie Berlin Reviewed by Steve Falkenburg. [Windows WebKit2] Use cookies set in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=60274 Share the default storage session between the UI and Web Processes. * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::defaultSessionCookieStorage): Keep track of the default storage session cookie storage. (WebCore::currentCookieStorage): Call defaultCookieStorage to get the default cookie storage. (WebCore::defaultCookieStorage): If there is a default storage session cookie storage, prefer that over getting the default cookie storage. In the Web Process, asking CFNetwork for the default cookie storage directly without specifying a storage session will not get the cookie storage being shared by the UI and Web Processes. * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willSendRequest): Make sure to set the current storage session on any requests used by the Web Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid doing anything with the Web Process's default storage session (which is not the one shared with the UI Process). (WebCore::makeFinalRequest): Ditto. (WebCore::ResourceHandle::willSendRequest): Ditto. (WebCore::ResourceHandle::currentStorageSession): If there is a Private Browsing storage session, return that. If not, on Windows return the default storage session that is being shared with the UI Process and on Mac return 0. (WebCore::defaultCFURLStorageSession): (WebCore::ResourceHandle::setDefaultStorageSession): (WebCore::ResourceHandle::defaultStorageSession): * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest): Make sure to set the current storage session on any requests used by the Web Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid doing anything with the Web Process's default storage session (which is not the one shared with the UI Process). 2011-05-11 Martin Robinson Try once more to fix the WinCairo build. * platform/graphics/cairo/CairoUtilities.h: Include GraphicsTypes.h with a relative include rather than a system include. 2011-05-11 Sam Weinig Reviewed by Eric Seidel. Stop including Console.h just to get Console enum types https://bugs.webkit.org/show_bug.cgi?id=60607 Move MessageSource, MessageType and MessageLevel into its own header and cleanup surrounding classes. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCustomXPathNSResolver.cpp: * bindings/scripts/CodeGeneratorJS.pm: * bindings/v8/V8Proxy.cpp: * dom/ScriptExecutionContext.h: * html/HTMLFormElement.cpp: * html/parser/XSSFilter.cpp: * inspector/ConsoleMessage.h: * inspector/InjectedScriptHost.h: * inspector/InspectorAgent.h: * inspector/InspectorConsoleAgent.h: * inspector/InspectorFrontendHost.h: * inspector/InspectorInstrumentation.cpp: * inspector/InspectorInstrumentation.h: * loader/EmptyClients.h: * loader/FrameLoader.cpp: * loader/MainResourceLoader.cpp: * loader/appcache/ApplicationCacheGroup.cpp: * page/ChromeClient.h: * page/Console.cpp: (WebCore::Console::~Console): * page/Console.h: * page/ConsoleTypes.h: Added. * page/ContentSecurityPolicy.cpp: * page/Geolocation.h: * workers/WorkerReportingProxy.h: * xml/XMLHttpRequest.cpp: 2011-05-11 Dimitri Glazkov Unreviewed, rolling out r85650. http://trac.webkit.org/changeset/85650 https://bugs.webkit.org/show_bug.cgi?id=59983 Triggers m_numNodeListCaches > 0 assert in gc-heavy sites. * dom/ContainerNode.cpp: (WebCore::ContainerNode::childrenChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::setDocument): (WebCore::Node::setTreeScopeRecursively): (WebCore::Node::childNodes): (WebCore::Node::registerDynamicNodeList): (WebCore::Node::unregisterDynamicNodeList): (WebCore::Node::notifyLocalNodeListsAttributeChanged): (WebCore::Node::notifyLocalNodeListsChildrenChanged): (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): * dom/Node.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::labels): 2011-05-11 Eric Carlson Reviewed by Darin Adler. Video track sometimes fails to draw. https://bugs.webkit.org/show_bug.cgi?id=60635 No new tests, covered by existing pixel tests. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): Set display mode to "Unknown" to force a recalculation, and media engine notification, the next time the state machine runs. 2011-05-11 Adam Roben WinCE build fixes for strict PassOwnPtr * platform/graphics/wince/SharedBitmap.cpp: (WebCore::SharedBitmap::createHandle): (WebCore::SharedBitmap::clipBitmap): Use nullptr instead of 0. * platform/graphics/wince/SimpleFontDataWinCE.cpp: Keep LOOSE_PASS_OWN_PTR turned on for this file until SimpleFontData::scaledFontData is dealt with on all platforms. * platform/text/wince/TextCodecWinCE.cpp: (WebCore::newTextCodecWinCE): Use adoptPtr. 2011-05-11 Chang Shu Reviewed by Antonio Gomes. [Qt] Tab not working in editing/inserting/typing-tab-designmode-forms.html https://bugs.webkit.org/show_bug.cgi?id=60477 PlatformKeyboardEvent.m_text should be set to "\t" instead of leaving as null. The value is checked at EventHandler.cpp:2527 (r86166). Function keyTextForKeyEvent is partially implemented and can be enhanced in a need-base. * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::keyTextForKeyEvent): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): 2011-05-11 Adam Roben Use case-insensitive comparisons when checking plugin filenames on Windows Windows paths are nearly always case-insensitive. I couldn't think of a good way to test this. Fixes WebKit1 loads Windows Presentation Foundation plugin, but should not Reviewed by Steve Falkenburg. * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::isPluginBlacklisted): Use equalIgnoringCase instead of == when checking plugin filenames. 2011-05-11 Adam Roben Turn on strict PassOwnPtr on Windows Fixes Windows should build with strict PassOwnPtr enabled Reviewed by Adam Barth. * platform/graphics/win/SimpleFontDataWin.cpp: Keep LOOSE_PASS_OWN_PTR turned on for this file until SimpleFontData::scaledFontData is dealt with on all platforms. 2011-05-11 Julien Chaffraix Reviewed by Geoffrey Garen. XPathResult should keep its node set's JS wrappers alive https://bugs.webkit.org/show_bug.cgi?id=34231 The change added a custom mark function for JSC. V8 was already properly marking the nodes so no change were done on the V8 side. Tests: fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html fast/xpath/xpath-result-eventlistener-crash.html fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html * Android.jscbindings.mk: * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: Added the new file to our build systems. * bindings/js/JSXPathResultCustom.cpp: Added. (WebCore::JSXPathResult::markChildren): Added code to mark the XPathResult snapshot's nodes. * xml/XPathResult.h: (WebCore::XPathResult::value): Exposed this getter so that we can mark our XPathValue. * xml/XPathResult.idl: Told the IDL parser that we now need a custom mark function. 2011-05-04 Philippe Normand Reviewed by Martin Robinson. [Gtk+] deadlock in gstreamer video player when exiting fullscreen https://bugs.webkit.org/show_bug.cgi?id=58548 Block data flow towards the pipeline branch to remove to avoid potential deadlocks during the PAUSED->READY transitions of the elements to remove. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::GStreamerGWorld::exitFullscreen): 2011-05-11 Kent Tamura Reviewed by Hajime Morita. The position of validation message bubble is wrong for non text fields. https://bugs.webkit.org/show_bug.cgi?id=60341 Tests: fast/forms/validation-message-on-checkbox.html fast/forms/validation-message-on-listbox.html fast/forms/validation-message-on-menulist.html fast/forms/validation-message-on-radio.html fast/forms/validation-message-on-textarea.html * css/html.css: (::-webkit-validation-bubble-message): Add white-space:normal in order not to inherit white-space:pre for and incorrectly disallows selection and prevented the paste. Test: editing/pasteboard/paste-placeholder-input.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::insertFragmentForTestRendering): skip
elements above us as those are likely placeholder elements. 2011-05-04 Fridrich Strba Reviewed by Martin Robinson. Windows build of WebKit GTK needs to be able to find SystemInfo.h https://bugs.webkit.org/show_bug.cgi?id=60221 * GNUmakefile.am: add Source/WebCore/platform/win to the paths searched for headers, since Source/WebCore/platform/win/SystemInfo.h header is needed by Source/WebKit/gtk/webkit/webkitwebsettings.cpp on Windows. 2011-05-04 Vangelis Kokkevis Reviewed by Kenneth Russell. [chromium] Improve sorting of layers in hierarchies that preserve-3d by testing for overlapping regions between layer pairs and doing a topological sort to determine the right order. https://bugs.webkit.org/show_bug.cgi?id=59255 Test: platform/chromium/compositing/perpendicular-layer-sorting.html * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::clearRenderSurface): * platform/graphics/chromium/cc/CCLayerSorter.cpp: Added. (WebCore::perpProduct): (WebCore::innerProduct): (WebCore::pointInColinearEdge): (WebCore::edgeEdgeTest): (WebCore::CCLayerSorter::LayerIntersector::LayerIntersector): (WebCore::CCLayerSorter::LayerIntersector::go): (WebCore::CCLayerSorter::LayerIntersector::edgeTriangleTest): (WebCore::CCLayerSorter::LayerIntersector::triangleTriangleTest): (WebCore::CCLayerSorter::LayerIntersector::checkZDiff): (WebCore::CCLayerSorter::LayerIntersector::layerZFromProjectedPoint): (WebCore::CCLayerSorter::CCLayerSorter): (WebCore::CCLayerSorter::checkOverlap): (WebCore::CCLayerSorter::createGraphNodes): (WebCore::CCLayerSorter::createGraphEdges): (WebCore::CCLayerSorter::removeEdgeFromList): (WebCore::CCLayerSorter::sort): * platform/graphics/chromium/cc/CCLayerSorter.h: Added. (WebCore::CCLayerSorter::GraphNode::GraphNode): (WebCore::CCLayerSorter::GraphEdge::GraphEdge): 2011-05-03 Jer Noble Reviewed by Antti Koivisto. Safari: Video at apple.com cannot play at full screen mode with layout distortion https://bugs.webkit.org/show_bug.cgi?id=60140 Because a fullscreen element may be in a stacking context with a lower z-index than a sibling stacking context, those higher contexts would sometimes "pop" through the full screen renderer. To facilitate eliminating all the stacking contexts aside from the full screen renderer, added a new pseudo-class specific to video or audio full screen elements. Then, added a new UA rule which resets the z-index and opacities of all elements under said pseudo-class to auto and 1 respectively. To facilitate quick identity checking of HTMLMediaElements, added isMediaElement() virtual function to Element and HTMLMediaElement. Test: fullscreen/full-screen-stacking-context.html * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): Support PseudoFullScreenMediaDocument. (WebCore::nameToPseudoTypeMap): Support fullScreenMediaDocument. (WebCore::CSSSelector::extractPseudoType): Support PseudoFullScreenMediaDocument. * css/CSSSelector.h: Add PseudoFullScreenMediaDocument. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Support PseudoFullScreenMediaDocument. * css/fullscreen.css: (:root:-webkit-full-screen-document:not(:-webkit-full-screen)): Corrected these names, which were missing the -webkit prefix. (:root:-webkit-full-screen-media-document *:not(-webkit-full-screen)): Added. * dom/Element.h: (WebCore::Element::isMediaElement): Added, returns false. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::isMediaElement): Added, returns true. * rendering/style/RenderStyleConstants.h: Added FULL_SCREEN_MEDIA_DOCUMENT. 2011-05-04 Levi Weintraub Reviewed by Eric Seidel. Split findNextLineBreak into a LineBreaker class https://bugs.webkit.org/show_bug.cgi?id=60209 Breaking findNextLineBreak into a new class inside RenderBlock. Currently it's tracking nearly no state, but subsequent patches will move some of the local variables used throughout the nextLineBreak function into member variables to simplify breaking off helper functions from the bloated function. No new tests since this is just moving code around. * WebCore.xcodeproj/project.pbxproj: * rendering/RenderBlock.h: (WebCore::RenderBlock::LineBreaker::LineBreaker): (WebCore::RenderBlock::LineBreaker::lineWasHyphenated): Accessor. (WebCore::RenderBlock::LineBreaker::positionedObjects): Ditto. (WebCore::RenderBlock::LineBreaker::clear): Ditto. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloats): (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace): (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): (WebCore::RenderBlock::LineBreaker::reset): (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-05-04 Fridrich Strba Reviewed by Adam Barth. Add COMPILER(MINGW) to the compilers using the Microsoft C Runtime's vsnprintf. The vsnprintf is part of Microsoft C runtime used also by MinGW (GCC) toolchain. https://bugs.webkit.org/show_bug.cgi?id=58579 * dom/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::error): 2011-05-04 Alexis Menard Unreviewed warning fix. The variable is just used in the ASSERT macro. Let's use ASSERT_UNUSED to avoid a warning in Release build. * dom/Node.cpp: (WebCore::Node::removeEventListener): * platform/DateComponents.cpp: (WebCore::DateComponents::parseTime): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::convertToLayerCoords): * storage/StorageMap.cpp: (WebCore::StorageMap::importItem): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::buildShadowTree): (WebCore::SVGUseElement::expandUseElementsInShadowTree): 2011-05-04 Alexis Menard Unreviewed warning fix. The variable is just used in the ASSERT macro. Let's use ASSERT_UNUSED to avoid a warning in Release build. * accessibility/AccessibilityRenderObject.cpp: (WebCore::lastChildConsideringContinuation): 2011-05-04 Dimitri Glazkov Sort xcodeproj files. The WebCore.xcodeproj got out of sorts again. * WebCore.xcodeproj/project.pbxproj: Ran sort-XCode-project-file. 2011-05-04 Alexis Menard Reviewed by Adam Barth. Warning fix. * bindings/js/DOMObjectHashTableMap.h: (WebCore::DOMObjectHashTableMap::~DOMObjectHashTableMap): 2011-05-04 Rob Buis Reviewed by Darin Adler. NULL deref when SVG elements have table styles https://bugs.webkit.org/show_bug.cgi?id=45561 Restrict computed CSS values for SVG display property to block, inline or none. Tests: svg/custom/display-table-caption-foreignObject.svg svg/custom/display-table-caption-inherit-foreignObject.xhtml svg/custom/display-table-caption-inherit-text.xhtml svg/custom/display-table-caption-text.svg * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-05-04 Tao Bai Reviewed by David Kilzer. Populate touch-icon url to FrameLoaderClient https://bugs.webkit.org/show_bug.cgi?id=59143 Parsed and populated apple-touch-icon url to FrameLoaderClient. Changed favicon to be a type of icon. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::iconURL): (WebCore::Document::setIconURL): * dom/Document.h: * dom/IconURL.cpp: Added. (WebCore::toIconIndex): * dom/IconURL.h: Added. (WebCore::IconURL::IconURL): * features.pri: * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::tokenizeRelAttribute): (WebCore::HTMLLinkElement::process): (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): * html/HTMLLinkElement.h: (WebCore::HTMLLinkElement::RelAttribute::RelAttribute): (WebCore::HTMLLinkElement::isEnabledViaScript): * html/parser/HTMLPreloadScanner.cpp: (WebCore::HTMLNames::PreloadTask::relAttributeIsStyleSheet): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::iconURL): (WebCore::DocumentLoader::setIconURL): * loader/DocumentLoader.h: * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::dispatchDidChangeIcons): * loader/FrameLoader.cpp: (WebCore::FrameLoader::iconURL): (WebCore::FrameLoader::iconURLs): (WebCore::FrameLoader::fillIconURL): (WebCore::FrameLoader::getDefaultIconURL): (WebCore::FrameLoader::setIconURL): (WebCore::FrameLoader::didChangeIcons): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: 2011-05-04 Chris Marrin Reviewed by Simon Fraser. Crash in PlatformCALayer ::replaceSublayer when layer has not superlayer https://bugs.webkit.org/show_bug.cgi?id=60191 Skip replaceSublayer when there is no superlayer rather than asserting. This is probably not a problem and happens when restructuring the layer tree. Avoiding this crash will allow us to get more testing. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): 2011-05-04 Martin Robinson Reviewed by Gustavo Noronha Silva. Fix the GTK+ 2.x build for Windows. Instead of making getStockIcon a RenderTheme method, just use extern declarations to avoid having to declare it in the header. This will prevent having to include glib.h in RenderThemeGtk.h, which is included in many C++ files. No new tests. This is just a build fix. * platform/gtk/RenderThemeGtk.cpp: Update getStockIcon calls to say getStockIconForWidgetType. (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration): (WebCore::RenderThemeGtk::paintSearchFieldCancelButton): (WebCore::RenderThemeGtk::paintCapsLockIndicator): (WebCore::RenderThemeGtk::paintMediaButton): * platform/gtk/RenderThemeGtk.h: Removed getStockIcon declaration. Make gtkContainer() and gtkEntry() public because they are now accessed externally from getStockIcon(). * platform/gtk/RenderThemeGtk2.cpp: Update getStockIcon calls. (WebCore::getStockIconForWidgetType): * platform/gtk/RenderThemeGtk3.cpp: Ditto. (WebCore::getStockIconForWidgetType): 2011-05-04 Mark Pilgrim Reviewed by Tony Chang. IndexedDB open (database) should fail if name is null https://bugs.webkit.org/show_bug.cgi?id=60022 Test: storage/indexeddb/mozilla/open-database-null-name.html Combination problem: Bug in IDL didn't pass null values to .cpp layer, then .cpp layer didn't check for null value anyway. * storage/IDBFactory.cpp: (WebCore::IDBFactory::open): check for null name * storage/IDBFactory.idl: pass null name as null 2011-05-04 Jer Noble Reviewed by Darin Adler. Entering full screen fails >= second time on Vimeo.com. https://bugs.webkit.org/show_bug.cgi?id=60143 Force the RenderFullScreen's layer backing to be recreated when setAnimating() is called. Previously, the RenderLayerCompositor would fail to reparent the RenderFullScreen's layer at the end of an animation, if it determined that the RenderFullScreen would still require a layer even when not animating. * rendering/RenderFullScreen.cpp: (RenderFullScreen::setAnimating): Clear the renderer's layer. 2011-05-04 Simon Fraser Reviewed by Darin Adler. Avoid allocating a new image buffer in ~CanvasRenderingContext2D() https://bugs.webkit.org/show_bug.cgi?id=59849 When attempting to unwind the graphics state stack in the CanvasRenderingContext2D destructor, don't allow HTMLCanvasElement to create a new ImageBuffer. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::existingDrawingContext): * html/HTMLCanvasElement.h: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D): 2011-05-04 Andrey Kosyakov Reviewed by Yury Semikhatsky. Web Inspector: expose shadow DOM in the Elements panel https://bugs.webkit.org/show_bug.cgi?id=60160 Test: inspector/elements/shadow-dom.html * dom/Element.cpp: (WebCore::Element::ensureShadowRoot): (WebCore::Element::removeShadowRoot): * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): (WebCore::InspectorDOMAgent::buildObjectForNode): (WebCore::InspectorDOMAgent::didInsertDOMNode): (WebCore::InspectorDOMAgent::didRemoveDOMNode): (WebCore::InspectorDOMAgent::isContainerNode): * inspector/InspectorDOMAgent.h: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode): (WebInspector.DOMNode.prototype.inShadowTree): (WebInspector.DOMNode.prototype._setShadowRootPayload): (WebInspector.DOMNode.prototype._renumber): (WebInspector.DOMAgent.prototype._bindNodes): (WebInspector.DOMAgent.prototype.querySelectorAll): (WebInspector.DOMAgent.prototype._shadowRootUpdated): (WebInspector.DOMDispatcher.prototype.searchResults): (WebInspector.DOMDispatcher.prototype.shadowRootUpdated): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._nodeUpdated): (WebInspector.ElementsPanel.prototype._attributesUpdated): (WebInspector.ElementsPanel.prototype._nodeRemoved): (WebInspector.ElementsPanel.prototype.updateModifiedNodes): (WebInspector.ElementsPanel.prototype.updateBreadcrumb): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement): (WebInspector.ElementsTreeElement.prototype._updateChildren.updateChildrenOfNode): (WebInspector.ElementsTreeElement.prototype._updateChildren): (): * inspector/front-end/inspector.css: (#elements-content .dom-shadow-root): (.outline-disclosure li .webkit-html-tag.shadow): * inspector/front-end/utilities.js: 2011-05-03 Adam Roben Remove an unnecessary OwnPtr equality check in XSLT code Fixes Testing OwnPtrs for equality should cause a compiler error Reviewed by Anders Carlsson and Antti Koivisto. * dom/Document.cpp: (WebCore::Document::setTransformSource): No need to check for equality. If the pointers are equal, we're screwed anyway. (And the caller always passes in a newly-allocated object, so we're safe.) 2011-05-04 Leandro Gracia Gil Reviewed by Tony Gentilcore. Media Stream API: add the skeleton of the frame and page controllers and the embedder client. https://bugs.webkit.org/show_bug.cgi?id=56922 Add the basic outlines of the page controller, the per-frame controller and the embedder client interface for the Media Stream API. Provide methods to handle the situations where a frame is detached from the page or transferred between pages. Tests for the Media Stream API will be provided by the bug 56587. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::~Frame): (WebCore::Frame::pageDestroyed): (WebCore::Frame::transferChildFrameToNewDocument): * page/Frame.h: (WebCore::Frame::mediaStreamFrameController): * page/MediaStreamClient.h: Added. (WebCore::MediaStreamClient::~MediaStreamClient): * page/MediaStreamController.cpp: Added. (WebCore::MediaStreamController::Request::Request): (WebCore::MediaStreamController::Request::localId): (WebCore::MediaStreamController::Request::frameController): (WebCore::MediaStreamController::MediaStreamController): (WebCore::MediaStreamController::~MediaStreamController): (WebCore::MediaStreamController::unregisterFrameController): (WebCore::MediaStreamController::registerRequest): * page/MediaStreamController.h: Added. * page/MediaStreamFrameController.cpp: Added. (WebCore::MediaStreamFrameController::Request::Request): (WebCore::MediaStreamFrameController::Request::~Request): (WebCore::MediaStreamFrameController::Request::scriptExecutionContext): (WebCore::MediaStreamFrameController::Request::isGenerateStreamRequest): (WebCore::MediaStreamFrameController::Request::isRecordedDataRequest): (WebCore::MediaStreamFrameController::RequestMap::abort): (WebCore::MediaStreamFrameController::RequestMap::abortAll): (WebCore::MediaStreamFrameController::MediaStreamFrameController): (WebCore::MediaStreamFrameController::~MediaStreamFrameController): (WebCore::MediaStreamFrameController::securityOrigin): (WebCore::MediaStreamFrameController::scriptExecutionContext): (WebCore::MediaStreamFrameController::pageController): (WebCore::MediaStreamFrameController::enterDetachedState): (WebCore::MediaStreamFrameController::disconnectPage): (WebCore::MediaStreamFrameController::disconnectFrame): (WebCore::MediaStreamFrameController::transferToNewPage): * page/MediaStreamFrameController.h: Added. * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::PageClients::PageClients): * page/Page.h: (WebCore::Page::mediaStreamController): 2011-05-04 Alexander Pavlov Reviewed by Yury Semikhatsky. Web Inspector: Double-click in a read-only style rule results in a non-editable blank property https://bugs.webkit.org/show_bug.cgi?id=60150 * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceDoubleClick): 2011-05-04 Dominic Battre Reviewed by Tony Gentilcore. Fix missing header in case SVG is disabled https://bugs.webkit.org/show_bug.cgi?id=60153 * dom/EventDispatcher.cpp: 2011-05-04 Luke Macpherson Reviewed by Eric Seidel. Rename CSSStyleApplyProperty::propertyValue and setPropertyValue. https://bugs.webkit.org/show_bug.cgi?id=60006 No new tests as no functionality added. Simple rename only. * css/CSSStyleApplyProperty.cpp: Rename propertyValue propertyHandler and setPropertyValue setPropertyHandler. * css/CSSStyleApplyProperty.h: Rename propertyValue propertyHandler and setPropertyValue setPropertyHandler. 2011-05-04 Ryosuke Niwa Reviewed by Eric Seidel. Cleanup conditionals in findNextLineBreak https://bugs.webkit.org/show_bug.cgi?id=60117 Simplified conditional statements in findNextLineBreak. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::findNextLineBreak): 2011-05-04 Luke Macpherson Reviewed by Eric Seidel. Make CSSStyleSelector::applyProperty() CSSPropertyWebkitHyphens case use appropriate macro. https://bugs.webkit.org/show_bug.cgi?id=60114 No new tests as no functionality changes. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro to remove code duplication. 2011-05-04 Caio Marcelo de Oliveira Filho Reviewed by Andreas Kling. [Qt] Fix QNetworkReplyWrapper to not depend on QNetworkReply::isFinished() method https://bugs.webkit.org/show_bug.cgi?id=59070 Applications using our API and our autotests subclass QNetworkReply as part of providing a custom QNetworkAccessManager. But there's an API limitation in Qt 4.7, that makes QNetworkReply::isFinished() always be false for these custom replies. This was fixed in Qt 4.8, see http://bugreports.qt.nokia.com/browse/QTBUG-11737. The consequence is that QtWebKit cannot rely on this function. So now QNetworkReplyWrapper watches for the finished() signal and set a dynamic property "_q_isFinished" on the reply indicating that it is finished. When there's no finished signal (synchronous) we set the dynamic property once we get the reply. This fixes tst_QWebFrame::requestedUrl(), that was breaking because sniffer was not emitting its own finished() signal, causing QWebFrame::loadFinished() to not be emitted. * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper): Connect the finished signal to the new setFinished() slot. (WebCore::QNetworkReplyWrapper::synchronousLoad): Since we don't get the finished signal for synchronous loads, set the dynamic property before processing it. (WebCore::QNetworkReplyWrapper::resetConnections): Do not reset the connection to setFinished(). (WebCore::QNetworkReplyWrapper::setFinished): Set the dynamic property in the reply. (WebCore::QNetworkReplyWrapper::emitMetaDataChanged): (WebCore::QNetworkReplyHandler::start): Change to use wrapper's isFinished() instead of asking the reply directly. * platform/network/qt/QNetworkReplyHandler.h: (WebCore::QNetworkReplyWrapper::isFinished): Checks the dynamic property of the reply. * platform/network/qt/QtMIMETypeSniffer.cpp: (QtMIMETypeSniffer::sniff): Use the dynamic property to check if the reply is finished. 2011-05-04 Eric Seidel Reviewed by Ryosuke Niwa. Split createLineBoxesFromBidiRuns out from layoutRunsAndFloats https://bugs.webkit.org/show_bug.cgi?id=60080 No functional change, just moving code. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::createLineBoxesFromBidiRuns): (WebCore::RenderBlock::layoutRunsAndFloats): 2011-05-04 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] Remove unused function FontPlatformData::pixelSize() https://bugs.webkit.org/show_bug.cgi?id=60156 * platform/graphics/qt/FontPlatformData.h: (WebCore::FontPlatformData::pixelSize): Removed. 2011-05-04 Luke Macpherson Reviewed by Darin Adler. Remove redundant conversion from auto table layout to auto table layout in CSSStyleSelector::applyProperty() https://bugs.webkit.org/show_bug.cgi?id=60011 No new tests added as no functionality changed. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove reundant check for auto table layout. 2011-05-04 Mihai Parparita Reviewed by Darin Adler. Remove double-free checks for bug 56124 https://bugs.webkit.org/show_bug.cgi?id=60037 Antti's speculative fix for bug 56124 (r84151) appears to have worked, these CRASH() calls are not triggering anymore. * css/CSSSelector.h: (WebCore::CSSSelector::CSSSelector): (WebCore::CSSSelector::~CSSSelector): * css/CSSSelectorList.cpp: (WebCore::CSSSelectorList::deleteSelectors): 2011-05-04 Satish Sampath Reviewed by Tony Gentilcore. Layout the speech input button to the left of outer spin button properly. https://bugs.webkit.org/show_bug.cgi?id=59742 * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): 2011-05-04 Yury Semikhatsky Unreviewed. Build fix. * bindings/js/JSInjectedScriptHostCustom.cpp: fix includes declaration 2011-05-03 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: can't inspect element in an iframe when element originates from non-frame document https://bugs.webkit.org/show_bug.cgi?id=60031 Inspected object type evaluation has moved into native bindings. This way it doesn't depend on the current JS context. Test: inspector/elements/elements-inspect-iframe-from-different-domain.html * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::isHTMLAllCollection): this method helps distinguish real undefined values from HTMLAllCollection (WebCore::JSInjectedScriptHost::type): method that returns presice type of the passed value * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallback): (WebCore::V8InjectedScriptHost::typeCallback): * inspector/InjectedScriptHost.idl: * inspector/InjectedScriptSource.js: (.): 2011-05-03 Pratik Solanki Reviewed by Antti Koivisto. Part of WebCore should use CFNetwork-based loader on Mac https://bugs.webkit.org/show_bug.cgi?id=51836 Merge the conflicting definitions of WebCore::privateBrowsingCookieStorage() into one. Clean up some warnings and #if USE(CFNETWORK) around code. * platform/mac/CookieJar.mm: * platform/network/CookieStorage.h: * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::privateBrowsingCookieStorage): (WebCore::currentCookieStorage): (WebCore::setCurrentCookieStorage): (WebCore::setCookieStoragePrivateBrowsingEnabled): (WebCore::notifyCookiesChangedOnMainThread): (WebCore::notifyCookiesChanged): * platform/network/cf/CookieStorageCFNet.h: * platform/network/mac/CookieStorageMac.mm: 2011-05-03 Justin Novosad Reviewed by Kenneth Russell. [Chromium] Make accelerated 2d canvas enabled by default with skia https://bugs.webkit.org/show_bug.cgi?id=59929 No new tests. Covered by existing layout tests * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Initialized for accelerated canvas if either the accelerated2dCanvas or the legacyAccelerated2dCanvas flags are enabled * page/Page.cpp: (WebCore::Page::sharedGraphicsContext3D): This is where the code goes to implement the functionality for the legacy vs current acceleration paths for the 2D canvas. Currently, this is a no-op, and always select the legacy path. This is temporary until we are ready to sort the GPU layout tests (rebasline vs. bug) * page/Settings.cpp: Added new flage for legacyAccelerated2dCanvas (WebCore::Settings::Settings): (WebCore::Settings::setLegacyAccelerated2dCanvasEnabled): * page/Settings.h: (WebCore::Settings::legacyAccelerated2dCanvasEnabled): 2011-04-29 Jer Noble Reviewed by Eric Seidel. Implement FULLSCREEN_API on Windows, Part 4: Enable it https://bugs.webkit.org/show_bug.cgi?id=59798 * WebCore.vcproj/WebCore.vcproj: Add missing full screen related files to the project. 2011-05-03 Alpha Lam Not reviewed. Build fix. More places from 0 to nullptr. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::precompileScript): * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::create): * platform/graphics/gpu/BicubicShader.cpp: (WebCore::BicubicShader::create): * platform/graphics/gpu/ConvolutionShader.cpp: (WebCore::ConvolutionShader::create): * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp: (WebCore::LoopBlinnSolidFillShader::create): * platform/graphics/gpu/SolidFillShader.cpp: (WebCore::SolidFillShader::create): * platform/graphics/gpu/TexShader.cpp: (WebCore::TexShader::create): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::~PlatformContextSkia): * platform/leveldb/LevelDBDatabase.cpp: (WebCore::LevelDBDatabase::createIterator): * platform/text/LocalizedNumberICU.cpp: (WebCore::createFormatterForCurrentLocale): 2011-05-03 Alpha Lam Not reviewed. Build fix. Using nullptr instead of 0. This makes visual studio happy. * storage/IDBTransactionBackendInterface.h: 2011-05-03 Luke Macpherson Reviewed by Dimitri Glazkov. Add template parameter to ApplyPropertyColor to improve clarity by removing constructor parameter side effects. https://bugs.webkit.org/show_bug.cgi?id=59774 No new tests required as on new functionality. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyColor::applyValue): Added template parameter "inheritColorFromParent = false". (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Use template parameter where appropriate. 2011-05-03 Dan Bernstein Reviewed by Darin Adler. Make the fix for more robust. Added a pointer from FloatingObject to its originating line, if there is one, and made sure to dirty the line when the float is removed, instead of relying on the float always intersecting its originating line. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeFloatingObject): (WebCore::RenderBlock::removeFloatingObjectsBelow): (WebCore::RenderBlock::clearFloats): * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatingObject::FloatingObject): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::appendFloatingObjectToLastLine): (WebCore::RenderBlock::layoutRunsAndFloats): (WebCore::RenderBlock::determineStartPosition): 2011-05-02 Jer Noble Reviewed by Adam Roben. Implement FULLSCREEN_API on Windows, Part 3: WebKit2 https://bugs.webkit.org/show_bug.cgi?id=59845 Move WebFullScreenController into WebCore to facilitate code sharing between WebKit and WebKit2. WebFullScreenController now uses a Client class to request work on its behalf by WebKit and WebKit2. MediaPlayerPrivateFullscreenWindow now only creates a CALayerHost once a root layer is set, as the CALayerHost was causing child window drawing problems, and because a CALayerHost is overkill if the window is only drawing black to its client area. * WebCore.vcproj/WebCore.vcproj: * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: (WebCore::MediaPlayerPrivateFullscreenWindow::MediaPlayerPrivateFullscreenWindow): Do not create m_layerHost in the constructor. (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): NULL check m_layerHost. (WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer): Lazily instantiate m_layerHost. (WebCore::MediaPlayerPrivateFullscreenWindow::wndProc): NULL check m_layerHost; if a root layer is not present, fill the window with black in WM_PAINT. * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: * platform/graphics/win/FullScreenController.cpp: Renamed from Source/WebKit/win/WebFullScreenController.cpp. * platform/graphics/win/FullScreenController.h: Renamed from Source/WebKit/win/WebFullScreenController.h. * platform/graphics/win/FullScreenControllerClient.h: Split out from FullScreenController.h (WebCore::FullScreenControllerClient::~FullScreenControllerClient): 2011-05-03 Brady Eidson Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=60087 and WK2 Icon Database should provide access to all image representations in the icon. Add an accessor for CG platforms to get a CFArrayRef of all the CGImageRefs represented: * platform/graphics/BitmapImage.h: * platform/graphics/Image.h: (WebCore::Image::getCGImageArray): * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::getCGImageArray): 2011-05-03 Ryosuke Niwa Reviewed by Eric Seidel. findNextLineBreak splits InlineIterator into 3 pieces https://bugs.webkit.org/show_bug.cgi?id=60082 Avoid splitting InlineIterator into 3 variables with inter-dependencies. * rendering/InlineIterator.h: (WebCore::InlineIterator::fastIncrementInTextNode): Added. (WebCore::InlineIterator::previousInSameNode): Added. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::findNextLineBreak): 2011-05-03 Dean Jackson Reviewed by Simon Fraser. Interrupted transitions are not correctly removed https://bugs.webkit.org/show_bug.cgi?id=60062 CompositeAnimation was replacing any existing transition as a new one was created. However, it wasn't clearing the lists in AnimationControllerPrivate that signal when a hardware animation starts. Rather than simple removing the existing transition, we now tell AnimationControllerPrivate that is has gone. Test: transitions/3d/interrupted-transition.html * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::updateTransitions): 2011-05-03 Enrica Casucci Reviewed by Ryosuke Niwa. Crash in SpellingCorrectionController::respondToChangedSelection. https://bugs.webkit.org/show_bug.cgi?id=60071 Creating a Visible position could trigger a layout and there is no guarantee that the selection is still valid after that. Tests: editing/selection/undo-crash.html * editing/SpellingCorrectionController.cpp: (WebCore::SpellingCorrectionController::respondToChangedSelection): 2011-05-03 Levi Weintraub Reviewed by Eric Seidel. Refactor computeInlineDirectionPositionsForLine into smaller functions https://bugs.webkit.org/show_bug.cgi?id=60072 Split three functions off from computeInlineDirectionPositionsForLine to improve its readability. No new tests since this is just moving code around. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::setMarginsForRubyRun): (WebCore::setLogicalWidthForTextRun): (WebCore::computeExpansionForJustifiedText): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): 2011-05-03 David Kilzer Implement HTTP pipelining for CoreFoundation-based networking Reviewed by Antti Koivisto. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest): Set the priority on the request if HTTP pipelining is enabled. (WebCore::ResourceRequest::doUpdateResourceRequest): Read the priority from the request if HTTP pipelining is enabled. (readBooleanPreference): Enable code when compiling with USE(CFNETWORK). (WebCore::initializeMaximumHTTPConnectionCountPerHost): Ditto. Comment out setting the minimum fast lane priority on Windows since it's not currently available. 2011-05-03 Simon Fraser Reviewed by Dan Bernstein. Flicker zooming on Google Maps satellite view with accelerated compositing turned on Conditionalize compositing tiled layer size-constraining logic to older OSes. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::constrainedSize): 2011-05-03 Roland Steiner Reviewed by Dimitri Glazkov. Allow access keys to be used in shadow DOM https://bugs.webkit.org/show_bug.cgi?id=59979 Move access key methods and members back to Document from TreeScope. Also traverse into shadow trees when building the access key map. No new tests. (refactoring) * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::getElementByAccessKey): (WebCore::Document::buildAccessKeyMap): (WebCore::Document::invalidateAccessKeyMap): * dom/Document.h: * dom/TreeScope.cpp: (WebCore::TreeScope::TreeScope): (WebCore::TreeScope::destroyTreeScopeData): * dom/TreeScope.h: 2011-05-03 Dan Bernstein Reviewed by Darin Adler. -[DOMRange textRects] returns incorrect results for vertical or flipped text https://bugs.webkit.org/show_bug.cgi?id=60067 No test because this code path is only used by the Objective-C API, which is not testable from DumpRenderTree. * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRectsForRange): Use width/height instead of logicalWidth/logicalHeight here, and perform the local-to-absolute mapping on the rects rather than their origin, in order to get the right results for flipped writing modes. 2011-05-03 Anton Muhin Reviewed by Yury Semikhatsky. [v8] remove an ASSERT from grouping logic https://bugs.webkit.org/show_bug.cgi?id=60024 This ASSERT was exploratory. Alas, right now I am aware of no easy way to repro it. Removing for now for greener bots. No new tests, only an ASSERT removal. * bindings/v8/V8GCController.cpp: (WebCore::calculateGroupId): 2011-05-03 Ryosuke Niwa Reviewed by Darin Adler. WebKit allows selection that crosses the shadow boundary of a readonly input element https://bugs.webkit.org/show_bug.cgi?id=60000 The bug was caused by VisibleSelection's not validating shadow DOM boundaries. Fixed the bug by adding an extra adjustment, adjustSelectionToAvoidCrossingShadowBoundaries, in its validation process. Tests: editing/selection/select-across-readonly-input-1.html editing/selection/select-across-readonly-input-2.html editing/selection/select-across-readonly-input-3.html editing/selection/select-across-readonly-input-4.html editing/selection/select-across-readonly-input-5.html * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::validate): Calls adjustSelectionToAvoidCrossingShadowBoundaries. (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries): Added. * editing/VisibleSelection.h: 2011-05-03 Eric Seidel Reviewed by Ryosuke Niwa. Split out layoutRunsAndFloats from layoutInlineChildren https://bugs.webkit.org/show_bug.cgi?id=60052 No new tests, just moving code here. There should be no change in behavior. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloats): (WebCore::RenderBlock::layoutInlineChildren): 2011-05-03 James Robinson Reviewed by Kenneth Russell. [chromium] Resizing a 2d canvas to huge dimensions after compositing crashes with accelerated 2d canvas option enabled https://bugs.webkit.org/show_bug.cgi?id=59965 Fixes a few bugs leading to a crash if a canvas already being composited was resized to huge dimensions. Test: fast/canvas/canvas-resize-after-paint.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::reset): Mark the canvas's layer as needing a synthetic style recalculation when creating or destroying the backing DrawingBuffer so that we exit compositing mode properly if we can't handle the canvas dimensions. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::setLayerRenderer): Add a null check for m_drawingBuffer * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::clear): Avoid clearing the m_context pointer in reset() - we destroy the DrawingBuffer whenever reset() fails, so this is unnecessary. 2011-05-03 Adam Roben Fix most strict PassOwnPtr violations on Windows Fixes Windows should (almost) build with strict PassOwnPtr enabled Reviewed by Anders Carlsson. * loader/EmptyClients.h: * platform/GeolocationService.cpp: * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: * platform/mock/GeolocationServiceMock.cpp: * rendering/RenderTheme.cpp: * rendering/RenderThemeSafari.cpp: 2011-05-03 Levi Weintraub Reviewed by Eric Seidel. Extract LineInfo class https://bugs.webkit.org/show_bug.cgi?id=60044 Created a LineInfo class in RenderBlockLineLayout.cpp that brings together the relevant layout information about a line. This simplifies function signatures and clears up initialization. No new tests as this is refactoring. * rendering/RenderBlock.h: Updated internal layout function signatures to use LineInfo. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineInfo::LineInfo): (WebCore::LineInfo::isFirstLine): (WebCore::LineInfo::isLastLine): (WebCore::LineInfo::isEmpty): (WebCore::LineInfo::previousLineBrokeCleanly): (WebCore::LineInfo::setFirstLine): (WebCore::LineInfo::setLastLine): (WebCore::LineInfo::setEmpty): (WebCore::LineInfo::setPreviousLineBrokeCleanly): (WebCore::RenderBlock::createLineBoxes): (WebCore::RenderBlock::constructLine): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::determineStartPosition): (WebCore::skipNonBreakingSpace): (WebCore::shouldCollapseWhiteSpace): (WebCore::requiresLineBox): Moved from RenderBlock.h and made it locally scoped to RenderBlockLineLayout.cpp (WebCore::RenderBlock::generatesLineBoxesForInlineChild): (WebCore::RenderBlock::skipTrailingWhitespace): (WebCore::RenderBlock::skipLeadingWhitespace): (WebCore::RenderBlock::findNextLineBreak): 2011-05-03 Roland Steiner Reviewed by Dimitri Glazkov. Update node list cache count on the containing TreeScope rather than the Document https://bugs.webkit.org/show_bug.cgi?id=59983 Change code to call add/removeNodeListCache() and hasNodeListCaches() on the proper tree scope. Move updating of the node list cache count from setDocument() to setTreeScopeRecursively(). Make setDocument() and setDocumentRecursively() private. No new tests. (refactoring) * dom/ContainerNode.cpp: (WebCore::ContainerNode::childrenChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::setDocument): (WebCore::Node::setTreeScopeRecursively): (WebCore::Node::childNodes): (WebCore::Node::registerDynamicNodeList): (WebCore::Node::unregisterDynamicNodeList): (WebCore::Node::notifyLocalNodeListsAttributeChanged): (WebCore::Node::notifyLocalNodeListsChildrenChanged): (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): * dom/Node.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::labels): 2011-05-03 Ryosuke Niwa Reviewed by Eric Seidel. Bundle trailingSpaceObject and trailingPositionedBoxes in findNextLineBreak as a class https://bugs.webkit.org/show_bug.cgi?id=60046 Extracted TrailingObjects that encapsulates trailingSpaceObject and trailingPositionedBoxes. * rendering/RenderBlockLineLayout.cpp: (WebCore::TrailingObjects::TrailingObjects): (WebCore::TrailingObjects::setTrailingWhitespace): (WebCore::TrailingObjects::clear): (WebCore::TrailingObjects::appendBoxIfNeeded): (WebCore::TrailingObjects::addMidpoints): (WebCore::RenderBlock::findNextLineBreak): 2011-05-03 Igor Oliveira Reviewed by Eric Seidel. [Qt] Implement initial support to DataTransferItems https://bugs.webkit.org/show_bug.cgi?id=58448 Implement initial support to DataTransferItems. DataTransferItems are used to hold data for drag and drop operations. DataTransferItems hold a list of DataTransferItem objects each of which holds an item being dragged. * WebCore.pro: * dom/DataTransferItems.idl: * editing/qt/EditorQt.cpp: (WebCore::Editor::newGeneralClipboard): * page/qt/EventHandlerQt.cpp: (WebCore::EventHandler::createDraggingClipboard): * platform/chromium/DataTransferItemsChromium.h: * platform/qt/ClipboardQt.cpp: (WebCore::Clipboard::create): (WebCore::ClipboardQt::ClipboardQt): (WebCore::ClipboardQt::items): * platform/qt/ClipboardQt.h: (WebCore::ClipboardQt::create): * platform/qt/DataTransferItemQt.cpp: Added. (WebCore::DataTransferItem::create): (WebCore::DataTransferItemQt::createFromPasteboard): (WebCore::DataTransferItemQt::create): (WebCore::DataTransferItemQt::DataTransferItemQt): (WebCore::DataTransferItemQt::getAsString): (WebCore::DataTransferItemQt::getAsFile): * platform/qt/DataTransferItemQt.h: Added. * platform/qt/DataTransferItemsQt.cpp: Copied from Source/WebCore/editing/qt/EditorQt.cpp. (WebCore::DataTransferItemsQt::create): (WebCore::DataTransferItemsQt::DataTransferItemsQt): (WebCore::DataTransferItemsQt::addPasteboardItem): * platform/qt/DataTransferItemsQt.h: Copied from Source/WebCore/editing/qt/EditorQt.cpp. 2011-05-03 Julien Chaffraix Reviewed by Dimitri Glazkov. Element:shadowRoot & Element::ensureShadowRoot should return ShadowRoot* https://bugs.webkit.org/show_bug.cgi?id=58703 No new tests, refactoring only. * dom/Element.cpp: (WebCore::Element::copyNonAttributeProperties): (WebCore::Element::insertedIntoDocument): (WebCore::Element::removedFromDocument): (WebCore::Element::insertedIntoTree): (WebCore::Element::removedFromTree): (WebCore::Element::attach): (WebCore::Element::detach): (WebCore::Element::recalcStyle): (WebCore::Element::shadowRoot): (WebCore::Element::ensureShadowRoot): (WebCore::Element::childrenChanged): * dom/Node.cpp: (WebCore::Node::setTreeScopeRecursively): (WebCore::shadowRoot): (WebCore::Node::setDocumentRecursively): (WebCore::NodeRendererFactory::findVisualParent): Updated all the call sites for shadowRoot and ensureShadowRoot in the 2 previous classes. * dom/Element.h: Updated 2 methods' signature to return a ShadowRoot*. * dom/ShadowRoot.h: Removed toShadowRoot as it is not used anymore. * html/HTMLDetailsElement.cpp: * html/HTMLSummaryElement.cpp: Added #include for ShadowRoot.h. 2011-05-03 Gyuyoung Kim Reviewed by Kenneth Rohde Christiansen. [EFL] Implement mediaSliderTrack https://bugs.webkit.org/show_bug.cgi?id=59998 Implement paintMediaSliderTrack. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::RenderThemeEfl): (WebCore::RenderThemeEfl::paintMediaSliderTrack): * platform/efl/RenderThemeEfl.h: 2011-05-03 Mikhail Naganov Reviewed by Pavel Feldman. WebInspector: [Chromium] Fix slowness of Summary view nodes expansion in detailed heap profiles. https://bugs.webkit.org/show_bug.cgi?id=60023 * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotConstructorNode): (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype.aggregates): (WebInspector.HeapSnapshot.prototype._buildAggregates): (WebInspector.HeapSnapshot.prototype._sortAggregateIndexes): (WebInspector.HeapSnapshot.prototype.createNodesProviderForClass): (WebInspector.HeapSnapshotFilteredOrderedIterator): (WebInspector.HeapSnapshotNodesProvider): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy.prototype.aggregates): (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass): 2011-05-03 Mikhail Naganov Reviewed by Pavel Feldman. WebInspector: [Chromium] Hint user that to display retaining paths, an object entry must be clicked. https://bugs.webkit.org/show_bug.cgi?id=60029 * English.lproj/localizedStrings.js: * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotRetainingPathsList.prototype.reset): (WebInspector.DetailedHeapshotView.prototype._mouseClickInContainmentGrid): 2011-05-03 Beth Dakin Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=60045 Scrollbar thumb sometimes leaves artifacts in the track after scrolling -and corresponding- When we're using WK_SCROLLBAR_PAINTER, the AppleScrollBarVariant default should always be ignored. * platform/mac/ScrollbarThemeMac.mm: (WebCore::updateArrowPlacement): 2011-05-03 David Hyatt Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=60040 Links broken at iplanwebsites.com. Make sure that culledInlineAbsoluteQuads still does a translation of a 0,0 point to absolute coordinates so that the top left position is accurate. Added fast/inline/skipped-whitespace-client-rect.html * rendering/RenderInline.cpp: (WebCore::RenderInline::culledInlineAbsoluteQuads): 2011-05-03 Sam Weinig Fix chromium build. * page/Settings.cpp: 2011-05-02 Roland Steiner Reviewed by Dimitri Glazkov. Bug 59974 - Update image map on the containing TreeScope rather than the Document https://bugs.webkit.org/show_bug.cgi?id=59974 No new tests. (reefactoring) * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::parseMappedAttribute): (WebCore::HTMLMapElement::insertedIntoDocument): (WebCore::HTMLMapElement::removedFromDocument): * rendering/RenderImage.cpp: (WebCore::RenderImage::imageMap): 2011-05-03 Sam Weinig Fix chromium build. * loader/HistoryController.cpp: 2011-05-02 Roland Steiner Reviewed by Dimitri Glazkov. Bug 59966 - Update ID hash on the containing TreeScope rather than the Document https://bugs.webkit.org/show_bug.cgi?id=59966 No new tests. (refactoring) * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::elementsFromAttribute): (WebCore::AccessibilityRenderObject::activeDescendant): * accessibility/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::isAccessibilityRenderObject): * css/CSSCursorImageValue.cpp: (WebCore::resourceReferencedByCursorElement): (WebCore::CSSCursorImageValue::~CSSCursorImageValue): (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): (WebCore::CSSCursorImageValue::cachedImage): * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeList::itemWithName): * dom/Element.h: (WebCore::Element::updateId): * dom/Node.cpp: (WebCore::Node::querySelector): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::insertedIntoTree): (WebCore::FormAssociatedElement::resetFormOwner): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::dataList): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::control): * rendering/svg/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::layoutPath): * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::glyphElement): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::requestImageResource): (WebCore::SVGFEImageElement::build): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::collectGradientAttributes): * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::pathElement): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::collectPatternAttributes): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::collectGradientAttributes): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::getElementById): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::updateReferencedText): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::insertedIntoDocument): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::buildPendingResource): (WebCore::SVGUseElement::hasCycleUseReferencing): (WebCore::SVGUseElement::expandUseElementsInShadowTree): * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::viewTarget): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::eventBaseFor): (WebCore::SVGSMILElement::connectConditions): (WebCore::SVGSMILElement::targetElement): * xml/XPathFunctions.cpp: (WebCore::XPath::FunId::evaluate): 2011-05-03 Sam Weinig Fix chromium build. * css/StyleMedia.cpp: 2011-05-03 Sam Weinig Reviewed by Anders Carlsson. Prune #includes from FrameView.h (Part 1) https://bugs.webkit.org/show_bug.cgi?id=59957 * page/FrameView.h: Prune #includes. * accessibility/chromium/AXObjectCacheChromium.cpp: * page/win/FrameCGWin.cpp: * platform/Scrollbar.cpp: Add not necessary #includes. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: Add now necessary forward declaration. 2011-05-03 Andrey Kosyakov Reviewed by Dimitri Glazkov. [Chromium] toV8(Node*) will enter infinite recursion when called with a node of type SHADOW_ROOT_NODE https://bugs.webkit.org/show_bug.cgi?id=60026 Return a wrapper for Node in toV8(Node*) when called with a node of type SHADOW_ROOT_NODE instead of entering infinite recursion. * bindings/v8/custom/V8NodeCustom.cpp: (WebCore::toV8Slow): 2011-05-02 Adam Roben Take advantage of implicit conversion from nullptr_t to PassOwnPtr Fixes Implicit conversion from std::nullptr_t to PassOwnPtr doesn't work, but should Reviewed by Adam Barth. * bindings/js/ScheduledAction.cpp: * css/CSSStyleSelector.cpp: * css/MediaList.cpp: * css/MediaQueryMatcher.cpp: * css/SVGCSSStyleSelector.cpp: * dom/MessagePort.cpp: * html/InputType.cpp: * html/canvas/WebGLRenderingContext.cpp: * inspector/InspectorStyleSheet.cpp: * page/ContextMenuController.cpp: * page/Page.cpp: * platform/PlatformGestureRecognizer.cpp: * platform/PurgeableBuffer.h: * platform/graphics/ImageBuffer.h: * platform/leveldb/LevelDBDatabase.cpp: * platform/mac/PurgeableBufferMac.cpp: * platform/text/RegularExpression.cpp: * rendering/RenderTheme.cpp: * rendering/RenderThemeMac.mm: * rendering/style/RenderStyle.h: * rendering/style/SVGRenderStyleDefs.cpp: * rendering/style/ShadowData.cpp: * rendering/style/StyleRareInheritedData.cpp: * rendering/style/StyleRareNonInheritedData.cpp: * rendering/svg/RenderSVGResourcePattern.cpp: 2011-05-03 Pavel Feldman Not reviewed: fix inspector status bar image glyph reference in network panel. * inspector/front-end/networkPanel.css: (.network-larger-resources-status-bar-item .glyph): 2011-05-03 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: rename BrowserDebugger agent to DOMDebugger. https://bugs.webkit.org/show_bug.cgi?id=60019 * inspector/CodeGeneratorInspector.pm: * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::connectFrontend): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.XHRBreakpointsSidebarPane.prototype._setBreakpoint): (WebInspector.XHRBreakpointsSidebarPane.prototype._removeBreakpoint): (WebInspector.XHRBreakpointsSidebarPane.prototype._checkboxClicked): (WebInspector.EventListenerBreakpointsSidebarPane.prototype._setBreakpoint): (WebInspector.EventListenerBreakpointsSidebarPane.prototype._removeBreakpoint): * inspector/generate-inspector-idl: 2011-05-03 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: remove special logic for type of document.__proto__ https://bugs.webkit.org/show_bug.cgi?id=60014 Test: inspector/console/console-log-document-proto.html * inspector/InjectedScriptSource.js: removed unnecessary check nodeType === undefined 2011-05-03 Pavel Feldman Not reviewed: fixed typo in inspector style. * inspector/front-end/inspector.css: (.status-bar-item > .glyph): 2011-05-03 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: revision history storage is too slow. https://bugs.webkit.org/show_bug.cgi?id=59939 It turns out that iterating localStorage keys is very expensive (results in slow inspector start), refactor revision history in order not to rely upon that operation. * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource._resourceRevisionRegistry): (WebInspector.Resource.restoreRevisions.persist): (WebInspector.Resource.restoreRevisions): (WebInspector.Resource.persistRevision): (WebInspector.Resource.prototype._persistRevision): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._processCachedResources): (WebInspector.ResourceTreeModel.prototype._frameNavigated): 2011-05-03 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: combine toolbar icon images. https://bugs.webkit.org/show_bug.cgi?id=59931 * WebCore.gypi: * inspector/front-end/Images/auditsIcon.png: Removed. * inspector/front-end/Images/consoleIcon.png: Removed. * inspector/front-end/Images/elementsIcon.png: Removed. * inspector/front-end/Images/networkIcon.png: Removed. * inspector/front-end/Images/profilesIcon.png: Removed. * inspector/front-end/Images/resourcesIcon.png: Removed. * inspector/front-end/Images/scriptsIcon.png: Removed. * inspector/front-end/Images/timelineIcon.png: Removed. * inspector/front-end/Images/toolbarIcons.png: Added. * inspector/front-end/Images/toolbarIconsSmall.png: Added. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (.toolbar-icon): (#toolbar-dropdown .toolbar-icon): (.toolbar-item:active .toolbar-icon): (#toolbar-dropdown .toolbar-item:active .toolbar-icon): (.toolbar-item.elements .toolbar-icon): (.toolbar-item.resources .toolbar-icon): (#toolbar-dropdown .toolbar-item.resources .toolbar-icon): (.toolbar-item.network .toolbar-icon): (#toolbar-dropdown .toolbar-item.network .toolbar-icon): (.toolbar-item.scripts .toolbar-icon): (#toolbar-dropdown .toolbar-item.scripts .toolbar-icon): (.toolbar-item.timeline .toolbar-icon): (#toolbar-dropdown .toolbar-item.timeline .toolbar-icon): (.toolbar-item.profiles .toolbar-icon): (#toolbar-dropdown .toolbar-item.profiles .toolbar-icon): (.toolbar-item.audits .toolbar-icon): (#toolbar-dropdown .toolbar-item.audits .toolbar-icon): (.toolbar-item.console .toolbar-icon): (#toolbar-dropdown .toolbar-item.console .toolbar-icon): (.status-bar-item > .glyph): 2011-05-03 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: combine status bar button glyphs. https://bugs.webkit.org/show_bug.cgi?id=59885 * WebCore.gypi: * inspector/front-end/Images/breakpointsActivateButtonGlyph.png: Removed. * inspector/front-end/Images/breakpointsDeactivateButtonGlyph.png: Removed. * inspector/front-end/Images/clearConsoleButtonGlyph.png: Removed. * inspector/front-end/Images/consoleButtonGlyph.png: Removed. * inspector/front-end/Images/dockButtonGlyph.png: Removed. * inspector/front-end/Images/enableOutlineButtonGlyph.png: Removed. * inspector/front-end/Images/enableSolidButtonGlyph.png: Removed. * inspector/front-end/Images/excludeButtonGlyph.png: Removed. * inspector/front-end/Images/focusButtonGlyph.png: Removed. * inspector/front-end/Images/garbageCollectButtonGlyph.png: Removed. * inspector/front-end/Images/gearButtonGlyph.png: Removed. * inspector/front-end/Images/helpButtonGlyph.png: Removed. * inspector/front-end/Images/largerResourcesButtonGlyph.png: Removed. * inspector/front-end/Images/nodeSearchButtonGlyph.png: Removed. * inspector/front-end/Images/pauseOnExceptionButtonGlyph.png: Removed. * inspector/front-end/Images/percentButtonGlyph.png: Removed. * inspector/front-end/Images/prettyPrintButtonGlyph.png: Removed. * inspector/front-end/Images/recordButtonGlyph.png: Removed. * inspector/front-end/Images/recordToggledButtonGlyph.png: Removed. * inspector/front-end/Images/reloadButtonGlyph.png: Removed. * inspector/front-end/Images/statusBarButtonGlyphs.png: Added. * inspector/front-end/Images/undockButtonGlyph.png: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (.status-bar-item > .glyph): (#dock-status-bar-item .glyph): (body.detached #dock-status-bar-item .glyph): (#console-status-bar-item .glyph): (.clear-status-bar-item .glyph): (button.enable-toggle-status-bar-item .glyph): (button.enable-toggle-status-bar-item.toggled-on .glyph): (.scripts-pause-on-exceptions-status-bar-item .glyph): (.scripts-toggle-pretty-print-status-bar-item .glyph): (.toggle-breakpoints .glyph): (.toggle-breakpoints.toggled-on .glyph): (.resources-larger-resources-status-bar-item .glyph): (.timeline-filter-status-bar-item .glyph): (.garbage-collect-status-bar-item .glyph): (.record-profile-status-bar-item .glyph): (.record-profile-status-bar-item.toggled-on .glyph): (.heap-snapshot-status-bar-item .glyph): (.node-search-status-bar-item .glyph): (.percent-time-status-bar-item .glyph): (.focus-profile-node-status-bar-item .glyph): (.exclude-profile-node-status-bar-item .glyph): (.reset-profile-status-bar-item .glyph): (.delete-storage-status-bar-item .glyph): (.refresh-storage-status-bar-item .glyph): * inspector/front-end/inspector.js: 2011-05-02 Simon Fraser Reviewed by Dan Bernstein. Possible crash when removing elements with reflections https://bugs.webkit.org/show_bug.cgi?id=60009 RenderLayer's destructor deleted its z-order list Vector pointers before removing the reflection layer. However, the reflection cleanup code could call back into the RenderLayer to dirty z-order lists, so move reflection cleanup to before z-order vector deletion. The test crashes when run manually a few times with MallocScribble enabled, but I was not able to create a test that crashed reliably. Test: fast/reflections/remove-reflection-crash.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::~RenderLayer): 2011-05-02 Ian Henderson Reviewed by Dan Bernstein. CSS !important not respected by JavaScript https://bugs.webkit.org/show_bug.cgi?id=60007 The addParsedProperty and addParsedProperties methods were subtly different. The former did not check for !important before setting the given property. Change addParsedProperties to call addParsedProperty and move the relevant code. The one other caller of this method, in editing/markup.cpp, probably wanted this behavior anyway. Test: fast/css/important-js-override.html * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::addParsedProperties): (WebCore::CSSMutableStyleDeclaration::addParsedProperty): 2011-05-02 Ben Wells Reviewed by Simon Fraser. Cleanup variable usage in RenderObject.cpp paintOutline() https://bugs.webkit.org/show_bug.cgi?id=59911 No new tests for this, there should be no change in behaviour. * rendering/RenderObject.cpp: (WebCore::RenderObject::paintOutline): 2011-05-02 Ryosuke Niwa Reviewed by James Robinson. REGRESSION(r84672): showTree doesn't work for input/textarea elements https://bugs.webkit.org/show_bug.cgi?id=60001 When shadow is null, try retrieving the inner element of a render text control. * dom/Node.cpp: (WebCore::traverseTreeAndMark): 2011-05-02 Joseph Pecoraro Reviewed by David Kilzer. Respect fixed text-indent on ::-webkit-input-placeholder https://bugs.webkit.org/show_bug.cgi?id=59825 Test: fast/forms/input-placeholder-text-indent.html * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::paintPlaceholder): indent by a fixed text-indent size specified on the placeholder style. 2011-05-02 Eric Uhrhane Reviewed by Eric Seidel. Some FileWriter progress events should be queued https://bugs.webkit.org/show_bug.cgi?id=50846 * fileapi/FileWriter.cpp: * fileapi/FileWriter.h: Create a new asynchronous Task [FileWriterCompletionEventTask] that will set readyState to DONE and fire off the right events. 2011-05-02 Jia Pu Reviewed by Alexey Proskuryakov. [Mac] Need to truncate the string sent to "Look Up … " menu item, if it's too long. https://bugs.webkit.org/show_bug.cgi?id=59836 * platform/DefaultLocalizationStrategy.cpp: (WebCore::truncatedStringForLookupMenuItem): (WebCore::DefaultLocalizationStrategy::contextMenuItemTagLookUpInDictionary): 2011-05-02 Brady Eidson Reviewed by Anders Carlsson. and https://bugs.webkit.org/show_bug.cgi?id=59973 In Aperture, a WebView might be dealloc'ed before it finishes loading. * WebCore.exp.in: * platform/RuntimeApplicationChecks.cpp: (WebCore::applicationIsAperture): Perform a com.apple.Aperture bundle check. * platform/RuntimeApplicationChecks.h: 2011-05-02 Simon Fraser Reviewed by Dan Bernstein. Avoid wasted cycles updating paths when popping the context stack https://bugs.webkit.org/show_bug.cgi?id=59967 CanvasRenderingContext2D has to map the current path through transforms whenever the context stack is popped, which creates a lot of platform path objects. Avoid extra work here when the path is empty, or when the transform is identity. * platform/graphics/cg/PathCG.cpp: (WebCore::Path::transform): 2011-05-02 Enrica Casucci Reviewed by Dan Bernstein. Text does not split on white space when typing to the edge of window. https://bugs.webkit.org/show_bug.cgi?id=59968 Test: editing/inserting/typing-at-end-of-line.html This is a regression introduced when we converted the line box tree to floating point in r78846. In findNextLineBreak, there was still one place where the character width was treated as int and truncated and we were inconsistent in the way we treated a character that did not fit entirely in the line. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::findNextLineBreak): 2011-04-19 Adrienne Walker Reviewed by James Robinson. [chromium] Don't unnecessarily resize skia/cg canvases when painting in compositor https://bugs.webkit.org/show_bug.cgi?id=58907 Additionally, move the context save/restore logic to a place where it will reset the translation added in LayerTilerChromium. Test: compositing/repaint/same-size-invalidation.html * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::paint): * platform/graphics/chromium/PlatformCanvas.cpp: (WebCore::PlatformCanvas::resize): (WebCore::PlatformCanvas::Painter::Painter): (WebCore::PlatformCanvas::Painter::~Painter): * platform/graphics/chromium/PlatformCanvas.h: 2011-05-02 Csaba Osztrogonác Enable strict OwnPtr for Qt https://bugs.webkit.org/show_bug.cgi?id=59667 Unreviewed buildfix after r85343. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): 2011-05-02 Sheriff Bot Unreviewed, rolling out r85483. http://trac.webkit.org/changeset/85483 https://bugs.webkit.org/show_bug.cgi?id=59958 Causes media test failures. (Requested by eric_carlson on #webkit). * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::prepareForLoad): (WebCore::HTMLMediaElement::seek): (WebCore::HTMLMediaElement::updatePlayState): * html/HTMLMediaElement.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::resumeLoad): (WebCore::MediaPlayerPrivateAVFoundation::load): (WebCore::MediaPlayerPrivateAVFoundation::prepareToPlay): (WebCore::MediaPlayerPrivateAVFoundation::paint): (WebCore::MediaPlayerPrivateAVFoundation::duration): (WebCore::MediaPlayerPrivateAVFoundation::seeking): (WebCore::MediaPlayerPrivateAVFoundation::updateStates): (WebCore::MediaPlayerPrivateAVFoundation::hasAvailableVideoFrame): (WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded): (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged): (WebCore::MediaPlayerPrivateAVFoundation::timeChanged): (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): (WebCore::MediaPlayerPrivateAVFoundation::repaint): (WebCore::MediaPlayerPrivateAVFoundation::setPreload): * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::videoLayerIsReadyToDisplay): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForURL): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerForCacheResource): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged): 2011-05-02 Adam Barth Reviewed by David Levin. PLATFORM(MAC) should (almost!) build with strict PassOwnPtr https://bugs.webkit.org/show_bug.cgi?id=59924 * css/CSSGrammar.y: * platform/graphics/mac/SimpleFontDataMac.mm: - Memory management for the font cache is somewhat... complext. This will require some careful thought to sort out. 2011-05-02 Levi Weintraub Reviewed by Eric Seidel. showLineTree/showLineTreeForThis would make working with the line box tree easier https://bugs.webkit.org/show_bug.cgi?id=59662 Adding a showLineTree/showLineTreeForThis method to help visualize and debug the line tree. Also adding a missing showRenderTreeForThis method to RenderObject. No new tests since this is a debugging feature only and not compiled in release. * rendering/InlineBox.cpp: (WebCore::InlineBox::showLineTreeForThis): (WebCore::InlineBox::showLineTreeAndMark): (WebCore::InlineBox::showBox): (showLineTree): * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::showLineTreeAndMark): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::showBox): * rendering/InlineTextBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::showLineTreeAndMark): * rendering/RenderBlock.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::showRenderTreeForThis): (WebCore::RenderObject::showLineTreeForThis): (showTree): (showLineTree): * rendering/RenderObject.h: 2011-05-02 Dimitri Glazkov Reviewed by Eric Carlson. REGRESSIONS (r71934): In standalone media documents, (double-)clicking the media element doesn’t play/pause https://bugs.webkit.org/show_bug.cgi?id=59917 Since default event handlers are not retargeted, we should always attempt ancestor traversal to find out whether the event. * html/MediaDocument.cpp: (WebCore::ancestorVideoElement): Added ancestor-traversing helper. (WebCore::MediaDocument::defaultEventHandler): Changed to use ancestorVideoElement. 2011-05-02 Sam Weinig Attempt to fix the Leopard build. * platform/graphics/FontPlatformData.h: * platform/graphics/mac/ComplexTextController.h: * platform/graphics/mac/ComplexTextControllerATSUI.cpp: * platform/mac/WebCoreSystemInterface.h: 2011-05-02 Tony Chang Reviewed by Kent Tamura. convert manual-tests/bugzilla-6821.html to a layout test https://bugs.webkit.org/show_bug.cgi?id=59404 Test: fast/css/hover-update.html * manual-tests/bugzilla-6821.html: Removed. 2011-05-02 Sam Weinig Reviewed by Anders Carlsson. Prune ApplicationServices.h out of the headers https://bugs.webkit.org/show_bug.cgi?id=59952 More forward declares are better. * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/CanvasRenderingContext2D.h: * platform/graphics/GlyphBuffer.h: * platform/graphics/cg/ImageBufferCG.cpp: * platform/graphics/cg/PDFDocumentImage.cpp: * platform/graphics/cg/PDFDocumentImage.h: * platform/graphics/mac/ComplexTextController.h: * platform/graphics/mac/ComplexTextControllerCoreText.cpp: * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: * platform/mac/WebCoreNSStringExtras.h: * platform/mac/WebCoreSystemInterface.h: 2011-05-02 Dan Bernstein Reviewed by Simon Fraser. Images with percentage based height/max-height are missing when they are inside blocks inside tables https://bugs.webkit.org/show_bug.cgi?id=58006 * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Expanded the scope of the fix for from r29039 to cover not just the case of a auto-or-percent-height table cell as the immediate containing block, but any case where all containing block ancestors up to and including a table cell are auto-or-percent height. 2011-05-02 Daniel Bates Reviewed by Sam Weinig. Convert manual test onblur-remove.html to a DRT test; onblur-remove.html fails https://bugs.webkit.org/show_bug.cgi?id=59379 Move manual test onblur-remove.html to LayoutTests/fast/events. Test: fast/events/onblur-remove.html * manual-tests/onblur-remove.html: Removed. 2011-05-02 Sailesh Agrawal Reviewed by Dimitri Glazkov. Chromium Mac: Add scrollbar overlay drawing functions https://bugs.webkit.org/show_bug.cgi?id=59741 These functions are simply copied from WebCoreSystemInterface. These will be used to implement overlay scrollbars for Chromium Mac. No new tests, since this code is only enabled on future versions of Mac OS X. * WebCore.gypi: * platform/chromium/ScrollbarOverlayUtilitiesMac.h: Added. * platform/chromium/ScrollbarOverlayUtilitiesMac.mm: Added. (LookUpNSScrollerImpClass): (LookUpNSScrollerImpPairClass): (ScrollbarControlSizeToNSControlSize): (wkScrollbarPainterUsesOverlayScrollers): (wkScrollbarPainterIsHorizontal): (wkScrollbarPainterKnobAlpha): (wkScrollbarPainterSetOverlayState): (wkScrollbarPainterPaint): (wkScrollbarMinimumThumbLength): (wkScrollbarPainterSetDelegate): (wkScrollbarPainterTrackAlpha): (wkMakeScrollbarPainter): (wkScrollbarThickness): (wkScrollbarMinimumTotalLengthNeededForThumb): (wkVerticalScrollbarPainterForController): (wkHorizontalScrollbarPainterForController): (wkMakeScrollbarReplacementPainter): (wkSetPainterForPainterController): (wkSetScrollbarPainterControllerStyle): (wkScrollbarPainterKnobRect): (wkSetScrollbarPainterKnobAlpha): (wkSetScrollbarPainterTrackAlpha): (wkSetScrollbarPainterKnobStyle): (wkMakeScrollbarPainterController): (wkContentAreaScrolled): (wkContentAreaWillPaint): (wkMouseEnteredContentArea): (wkMouseExitedContentArea): (wkMouseMovedInContentArea): (wkWillStartLiveResize): (wkContentAreaResized): (wkWillEndLiveResize): (wkContentAreaDidShow): (wkContentAreaDidHide): (wkDidBeginScrollGesture): (wkDidEndScrollGesture): (wkScrollbarPainterForceFlashScrollers): (IsScrollbarOverlayAPIAvailable): 2011-05-02 Luke Macpherson Reviewed by Dimitri Glazkov. Implement Length based CSS properties in CSSStyleApplyProperty https://bugs.webkit.org/show_bug.cgi?id=59314 No new tests as no functionality changed. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyLength::ApplyPropertyLength): Added this class to handle all length types. Property specific behavior is handled through set of boolean parameters. (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Added calls to set up entries for the newly added length properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove property implementations mow implemented in CSSStyleApplyProperty. * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::rootElementStyle): Expose m_rootElementStyle via getter. 2011-05-02 Eric Carlson Reviewed by Eric Seidel. HTMLMediaElement should not seek to time 0 when readyState reaches HAVE_METADATA https://bugs.webkit.org/show_bug.cgi?id=59828 No new tests required, no functional change because seeking to time zero before playback begins has no effect. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setReadyState): Don't seek to time 0 when readyState reaches HAVE_METADATA. 2011-05-02 Sam Weinig Reviewed by Gavin Barraclough. Fix extra whitespace in license in FocusDirection.h. * page/FocusDirection.h: 2011-05-02 Sam Weinig Reviewed by Adam Barth. Prune some #includes from DOMWindow.h https://bugs.webkit.org/show_bug.cgi?id=59907 * page/DOMWindow.cpp: (WebCore::DOMWindow::setSecurityOrigin): * page/DOMWindow.h: Remove #includes of SecurityOrigin and MessagePort by forward declaring and moving the SecurityOrigin setter to the .cpp file. Also adds EventTarget #include that was getting added by MessagePort.h. * bindings/js/JSCustomVoidCallback.cpp: * bindings/js/JSCustomXPathNSResolver.cpp: * bindings/js/JSDOMWindowCustom.h: * bindings/js/JSHistoryCustom.cpp: * bindings/js/ScriptController.h: * html/HTMLAnchorElement.cpp: * html/HTMLMediaElement.cpp: * html/parser/XSSFilter.cpp: * inspector/InspectorDOMStorageResource.cpp: * loader/MainResourceLoader.cpp: * page/DragController.cpp: * page/EventSource.cpp: * page/Location.cpp: * websockets/WebSocket.cpp: * xml/XSLTProcessorLibxslt.cpp: Add now missing SecurityOrigin.h #includes. 2011-05-02 Eric Carlson Reviewed by Brady Eidson. The preload attribute of the video tag is not completely implemented https://bugs.webkit.org/show_bug.cgi?id=43673 Tested manually with manual-tests/media-elements/video-preload.html. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_havePreparedToPlay. (WebCore::HTMLMediaElement::prepareForLoad): Ditto. (WebCore::HTMLMediaElement::prepareToPlay): New, tell player to prepare to play. (WebCore::HTMLMediaElement::seek): Call prepareToPlay when preload is less than 'metadata' because we need to have media data loaded to seek. (WebCore::HTMLMediaElement::updatePlayState): Call prepareToPlay. * html/HTMLMediaElement.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Remove m_videoFrameHasDrawn and m_delayingLoad as they are no longer used. (WebCore::MediaPlayerPrivateAVFoundation::resumeLoad): Removed. (WebCore::MediaPlayerPrivateAVFoundation::load): Don't initialize m_videoFrameHasDrawn. Move all preload logic to setPreload, call it from here. (WebCore::MediaPlayerPrivateAVFoundation::prepareToPlay): Move all preload logic to setPreload, call it. (WebCore::MediaPlayerPrivateAVFoundation::duration): Don't cache duration = 0, it is unlikely to be correct and isn't worth caching. (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Update for name change AVAssetStatus to AssetStatus. Create the AVPlayer once we know an asset is playable but preload is 'metadata'. Set networkState to 'idle' when the playback buffer is full because that is a signal that AVFoundation won't do any more IO. Set readyState to 'HAVE_CURRENT_DATA' when the first frame is available. (WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded): Call tracksChanged so we cache width, height, hasVideo, etc. (WebCore::MediaPlayerPrivateAVFoundation::repaint): Don't set m_videoFrameHasDrawn, it is done in derived classes. (WebCore::MediaPlayerPrivateAVFoundation::setPreload): Centralize all logic about when to create AVAsset and AVPlayerItem here. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize m_videoFrameHasDrawn. (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): New, renamed from videoLayerIsReadyToDisplay. Return true if we have a layer with frames available or if we have painted a frame to the context. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): New, create the AVAsset if necessary. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForCacheResource): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Restructure logic. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): New, create AVPlayerItem. (WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata): Correct logging. (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus): Return "buffer full" when the buffer is full. (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Get the duration from the AVAsset when we haven't allocated the AVPlayerItem yet so that we can return duration when we only have metadata. (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus): Update for name change. (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Set m_videoFrameHasDrawn. (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Get attributes from AVAsset when when we haven't allocated the AVPlayerItem yet so that we can report attributes when we only have metadata. (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged): Guard against being called before we have allocated the AVPlayerItem. 2011-05-02 Philippe Normand Reviewed by Martin Robinson. [GTK] gdk_drawable_get_size() shouldn't be used with GTK+ >= 2.24 https://bugs.webkit.org/show_bug.cgi?id=59932 Use gdk_window_get_width() and gdk_window_get_height() if available, instead of the deprecated gdk_drawable_get_size(). No new tests, build fix only. * platform/gtk/WidgetRenderingContext.cpp: (WebCore::WidgetRenderingContext::WidgetRenderingContext): 2011-05-02 Eric Carlson Reviewed by Brady Eidson. The preload attribute of the video tag is not completely implemented https://bugs.webkit.org/show_bug.cgi?id=43673 Test manually with manual-tests/media-elements/video-preload.html. * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes): Add new "limit read-ahead" attribute when preload is not "auto". (WebCore::MediaPlayerPrivateQTKit::resumeLoad): Remove m_delayingLoad, we don't need it. (WebCore::MediaPlayerPrivateQTKit::load): Correct comment. (WebCore::MediaPlayerPrivateQTKit::prepareToPlay): Call setPreload('auto'). (WebCore::MediaPlayerPrivateQTKit::setPreload): Set new attribue if we already have a QTMovie. 2011-05-02 Eric Carlson Reviewed by Brady Eidson. The preload attribute of the video tag is not completely implemented https://bugs.webkit.org/show_bug.cgi?id=43673 Manual test manual-tests/media-elements/video-preload.html added. * manual-tests/media-elements/video-preload.html: Added. New manual test for media element 'preload' attribute because it is not possible to detect if a media engine supports "preload=metadata" in a way that lets us have per-platform layout test results. 2011-05-01 Abhishek Arya Reviewed by Eric Carlson. Regression(r74787): Media document mouse click and double-click events should be checked on target node only and not its descendants. https://bugs.webkit.org/show_bug.cgi?id=59886 * html/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): 2011-05-01 Adam Barth Reviewed by Eric Seidel. Polish CSP host and port matching https://bugs.webkit.org/show_bug.cgi?id=59899 Finish last two details of host and port matching. I don't think the default port handling is testable with our current testing infrastructure. Tests: http/tests/security/contentSecurityPolicy/image-full-host-wildcard-allowed.html http/tests/security/contentSecurityPolicy/image-host-wildcard-allowed.html * page/ContentSecurityPolicy.cpp: (WebCore::CSPSource::hostMatches): (WebCore::CSPSource::portMatches): 2011-05-01 Adam Barth Reviewed by Eric Seidel. CSP default-src is missing https://bugs.webkit.org/show_bug.cgi?id=58641 Add support for default-src. The default-src provides a default policy for every directive that sends in "-src". If the more-specific directive is present, it takes precedence. I also took this opportunity to refactor the internals of ContentSecurityPolicy a bit to reduce duplicate code. Tests: http/tests/security/contentSecurityPolicy/default-src-inline-allowed.html http/tests/security/contentSecurityPolicy/default-src-inline-blocked.html http/tests/security/contentSecurityPolicy/script-src-overrides-default-src.html * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::didReceiveHeader): (WebCore::ContentSecurityPolicy::checkEval): (WebCore::ContentSecurityPolicy::operativeDirective): (WebCore::ContentSecurityPolicy::checkInlineAndReportViolation): (WebCore::ContentSecurityPolicy::checkEvalAndReportViolation): (WebCore::ContentSecurityPolicy::checkSourceAndReportViolation): (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): (WebCore::ContentSecurityPolicy::allowInlineScript): (WebCore::ContentSecurityPolicy::allowInlineStyle): (WebCore::ContentSecurityPolicy::allowEval): (WebCore::ContentSecurityPolicy::allowScriptFromSource): (WebCore::ContentSecurityPolicy::allowObjectFromSource): (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): (WebCore::ContentSecurityPolicy::allowImageFromSource): (WebCore::ContentSecurityPolicy::allowStyleFromSource): (WebCore::ContentSecurityPolicy::allowFontFromSource): (WebCore::ContentSecurityPolicy::allowMediaFromSource): (WebCore::ContentSecurityPolicy::addDirective): * page/ContentSecurityPolicy.h: 2011-05-01 Sam Weinig Reviewed by Anders Carlsson. Prune some unnecessary #includes https://bugs.webkit.org/show_bug.cgi?id=59895 Start getting rid of unnecessary #includes and forward declares. * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMWindowBase.h: * bindings/js/JSDOMWindowShell.h: * bindings/js/ScheduledAction.cpp: * bindings/js/ScriptController.cpp: * bindings/js/ScriptController.h: * bindings/js/ScriptDebugServer.cpp: * editing/Editor.h: * inspector/InspectorClient.cpp: * loader/FrameLoader.h: * loader/NavigationScheduler.h: * page/Console.cpp: * xml/XMLTreeViewer.cpp: * xml/XMLTreeViewer.h: 2011-05-01 Patrick Gansterer [WIN] Unreviewed buildfix after r85434. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::createLayerForMovie): 2011-05-01 Patrick Gansterer [WIN] Unreviewed buildfix after r85434. * platform/graphics/win/QTMovieVisualContext.cpp: (QTMovieVisualContext::QTMovieVisualContext): Added missing header. 2011-05-01 Justin Schuh Reviewed by Adam Barth. History::stateObjectAdded should check origin via SecurityOrigin::canRequest https://bugs.webkit.org/show_bug.cgi?id=59840 Tests: fast/loader/stateobjects/pushstate-in-data-url-denied.html http/tests/navigation/replacestate-base-illegal.html http/tests/navigation/replacestate-base-legal.html * page/History.cpp: (WebCore::History::stateObjectAdded): 2011-05-01 Patrick Gansterer [WIN] Unreviewed buildfix after r85434. * platform/graphics/win/QTMovieVisualContext.cpp: (QTMovieVisualContext::QTMovieVisualContext): 2011-05-01 Patrick Gansterer Reviewed by Adam Barth. [WINCE] Fix OwnPtr strict issues https://bugs.webkit.org/show_bug.cgi?id=59898 * page/wince/FrameWinCE.cpp: (WebCore::imageFromSelection): * platform/graphics/wince/FontPlatformData.cpp: (WebCore::FixedSizeFontData::create): (WebCore::FontPlatformPrivateData::FontPlatformData::hfont): (WebCore::FontPlatformPrivateData::FontPlatformData::getScaledFontHandle): (WebCore::FontPlatformPrivateData::FontPlatformData::discardFontHandle): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::drawRoundCorner): (WebCore::GraphicsContext::drawText): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/wince/ImageWinCE.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): * platform/graphics/wince/SharedBitmap.cpp: (WebCore::SharedBitmap::SharedBitmap): 2011-05-01 Ryosuke Niwa Reviewed by Eric Seidel. Get rid of versions of sendContextMenuEvent and eventMayStartDrag that takes NSEvent https://bugs.webkit.org/show_bug.cgi?id=59837 Removed EventHandler::sendContextMenuEvent(NSEvent*) and EventHandler::eventMayStartDrag(NSEvent*) * WebCore.exp.in: * page/EventHandler.h: * page/mac/EventHandlerMac.mm: 2011-05-01 Ryosuke Niwa Reviewed by Eric Seidel. Move currentKeyboardEvent from EventHandlerMac.mm to WebHTMLView.mm https://bugs.webkit.org/show_bug.cgi?id=59835 Moved currentKeyboardEvent. * WebCore.exp.in: * page/EventHandler.h: * page/mac/EventHandlerMac.mm: 2011-05-01 ojab Reviewed by Eric Seidel. Fix build with --disable-video --enable-fullscreen-api https://bugs.webkit.org/show_bug.cgi?id=59698 * rendering/RenderTheme.h: (WebCore::RenderTheme::extraFullScreenStyleSheet): 2011-05-01 Jeff Timanus Reviewed by Eric Seidel. Add solid-color checking to BitmapImage::checkForSolidColour in the skia port. https://bugs.webkit.org/show_bug.cgi?id=59041 Test:css2.1/t140201-c533-bgimage-00-a.html * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): Removal of macro exclusion of assert for Skia path. * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::checkForSolidColor): 2011-05-01 Patrick Gansterer Reviewed by Adam Barth. Fix OwnPtr strict issues in windows build https://bugs.webkit.org/show_bug.cgi?id=59878 * platform/graphics/ca/win/CACFLayerTreeHost.cpp: (WebCore::getDirtyRects): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext): * platform/graphics/win/WKCAImageQueue.cpp: (WebCore::WKCAImageQueue::WKCAImageQueue): * platform/win/CursorWin.cpp: (WebCore::createSharedCursor): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::writeImage): 2011-05-01 Patrick Gansterer Reviewed by Eric Seidel. Use PassOwnPtr as return value of GraphicsContext::createWindowsBitmap https://bugs.webkit.org/show_bug.cgi?id=59876 Also pass the size "as reference" instead of "as value". * platform/graphics/GraphicsContext.h: * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap): (WebCore::GraphicsContext::createWindowsBitmap): * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::paint): 2011-05-01 Emil A Eklund Reviewed by Eric Seidel. getComputedStyle() returns unitless values for some properties that require units https://bugs.webkit.org/show_bug.cgi?id=55111 Change getComputedStyle to return value with unit for -webkit-column-width, -webkit-column-gap and -webkit-perspective Test: fast/css/getComputedStyle/getComputedStyle-length-unit.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-05-01 Young Han Lee Reviewed by Eric Seidel. Change TEXMAP_OPENGL_ES2 to TEXMAP_OPENGL_ES_2 https://bugs.webkit.org/show_bug.cgi?id=59608 TEXMAP_OPENGL_ES2 is a wrong name. TEXMAP_OPENGL_ES_2 is already defined in TextureMapper.h No new functionality, no new tests. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): 2011-05-01 Yael Aharon Reviewed by Eric Seidel. CSS3 nth-child(n) selector fails https://bugs.webkit.org/show_bug.cgi?id=56943 Regression from r75158. "n" is a valid parameter to nth() and should be allowed. Test: fast/css/nth-child-n.html * css/CSSParser.cpp: (WebCore::isValidNthToken): 2011-05-01 Pavel Feldman Not reviewed: address stack frame scriptName -> url rename in timeline panel. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendStackTrace): 2011-05-01 Chris Fleizach Reviewed by Maciej Stachowiak. Crash in AccessibilityRenderObject while viewing PDFs in iframes https://bugs.webkit.org/show_bug.cgi?id=59629 Could not reproduce this crash, but it's quite clear how it could happen. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityHitTest): 2011-05-01 Nikolas Zimmermann Reviewed by Dirk Schulze. LEAK: SVGElement leaks when detaching it in a pending resource state https://bugs.webkit.org/show_bug.cgi?id=59072 Make the pending resources set non-refcounted again. We made it refcounted a while ago to fix a security bug, as we had dangling pointers in the set in SVGDocumentExtensions. Fix the underlying problem, by removing all pending resources referencing to a particular SVGElement, upon its destruction or upon removing it from the document. Example: When we try to render the rect, the foo paint server can't be found and thus "foo" will be added to the pending resource set, with "rect" as client. When "foo" appears, it would remove itself from the pending resource set, and a ref count to the "rect" would be released. If "foo" never appears, SVGDocumentExtensions still holds a ref to the , thus keeping it and the associated document alive. Tests: svg/custom/pending-resource-leak-2.svg svg/custom/pending-resource-leak-3.svg svg/custom/pending-resource-leak.svg These tests cover several scenarios where we used to leak. Should fix several SVG*Element leaks on the bots. I manually tested reloading above testcases dozens of times, before the leak count was incremented by 2 nodes on every reload, that's gone now. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::registerResource): * rendering/svg/RenderSVGShadowTreeRootContainer.cpp: (WebCore::RenderSVGShadowTreeRootContainer::updateFromElement): * rendering/svg/SVGResources.cpp: (WebCore::registerPendingResource): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::addPendingResource): (WebCore::SVGDocumentExtensions::hasPendingResources): (WebCore::SVGDocumentExtensions::removeElementFromPendingResources): (WebCore::SVGDocumentExtensions::removePendingResource): * svg/SVGDocumentExtensions.h: * svg/SVGElement.cpp: * svg/SVGElement.h: * svg/SVGElementRareData.h: (WebCore::SVGElementRareData::SVGElementRareData): (WebCore::SVGElementRareData::hasPendingResources): (WebCore::SVGElementRareData::setHasPendingResources): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::~SVGStyledElement): (WebCore::SVGStyledElement::insertedIntoDocument): (WebCore::SVGStyledElement::removedFromDocument): (WebCore::SVGStyledElement::hasPendingResources): (WebCore::SVGStyledElement::setHasPendingResources): * svg/SVGStyledElement.h: (WebCore::SVGStyledElement::needsPendingResourceHandling): (WebCore::SVGStyledElement::buildPendingResource): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): (WebCore::SVGUseElement::insertedIntoDocument): (WebCore::SVGUseElement::svgAttributeChanged): (WebCore::SVGUseElement::buildPendingResource): * svg/SVGUseElement.h: 2011-05-01 Rafael Brandao Reviewed by Csaba Osztrogonác. [Qt] build-webkit warning Inspector.idl is missing https://bugs.webkit.org/show_bug.cgi?id=59047 Added variable_out to pipe output from one compiler to another, and then forced the output to be added to the sources. * CodeGenerators.pri: 2011-05-01 Dan Bernstein Reviewed by Anders Carlsson. REGRESSION (float-based line boxes): Gaps and overlaps in selection highlight https://bugs.webkit.org/show_bug.cgi?id=56658 Test: fast/text/selection-rect-rounding.html * platform/graphics/FontFastPath.cpp: (WebCore::Font::selectionRectForSimpleText): Account for non-integral anchor point coordinates. * platform/graphics/mac/FontComplexTextMac.cpp: (WebCore::Font::selectionRectForComplexText): Ditto. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionRect): Floor the horizontal sides of the clip rect. (WebCore::InlineTextBox::paintSelection): Pass the logical left location to Font::selectionRectForText(), since it affects rounding. 2011-04-30 Justin Schuh Reviewed by Dirk Schulze. Make RenderSVGResourceFilter take ownership of filter data when painting https://bugs.webkit.org/show_bug.cgi?id=51524 Test: svg/custom/filter-on-svgimage.svg * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::removeClientFromCache): (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/svg/RenderSVGResourceFilter.h: (WebCore::FilterData::FilterData): 2011-04-30 Martin Robinson Reviewed by Adam Barth. Enable strict mode for OwnPtr and PassOwnPtr https://bugs.webkit.org/show_bug.cgi?id=59428 Fix assignments and .set() calls with OwnPtr to use adoptPtr. Have GeolocationService factory methods return a PassOwnPtr. No new tests. This should not change functionality. * platform/GeolocationService.cpp: (WebCore::createGeolocationServiceNull): (WebCore::GeolocationService::create): * platform/GeolocationService.h: * platform/android/GeolocationServiceAndroid.cpp: (WebCore::GeolocationServiceAndroid::create): * platform/android/GeolocationServiceAndroid.h: * platform/efl/GeolocationServiceEfl.cpp: (WebCore::GeolocationServiceEfl::create): * platform/efl/GeolocationServiceEfl.h: * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::appendPathToCairoContext): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::drawPathShadow): (WebCore::GraphicsContext::clip): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cairo/OwnPtrCairo.h: * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::Path): (WebCore::Path::operator=): (WebCore::Path::apply): * platform/gtk/GeolocationServiceGtk.cpp: (WebCore::GeolocationServiceGtk::create): * platform/gtk/GeolocationServiceGtk.h: * platform/mock/GeolocationServiceMock.cpp: (WebCore::GeolocationServiceMock::create): * platform/mock/GeolocationServiceMock.h: 2011-04-30 Pavel Feldman Not reviewed: inspector toolbar titles were 2px off. * inspector/front-end/inspector.css: (#toolbar-dropdown .toolbar-label): 2011-04-30 Mihai Parparita Reviewed by Eric Seidel. V8Proxy.h shouldn't include SecurityOrigin.h https://bugs.webkit.org/show_bug.cgi?id=59859 Remove SecurityOrigin.h #include from V8Proxy.h. Touching SecurityOrigin.h now rebuilds 234 targets instead of 638 (when building chromium's DumpRenderTree). * bindings/v8/NPV8Object.cpp: * bindings/v8/V8Proxy.cpp: * bindings/v8/V8Proxy.h: * css/CSSStyleSelector.cpp: * dom/XMLDocumentParserLibxml2.cpp: * html/HTMLLinkElement.cpp: * loader/SubframeLoader.cpp: * page/History.cpp: * storage/IDBFactory.cpp: * storage/StorageAreaImpl.cpp: 2011-04-29 Adam Barth Reviewed by Eric Seidel. CSP script-src should block eval https://bugs.webkit.org/show_bug.cgi?id=59850 Rather than have JavaScriptCore call back into WebCore to learn whether eval is enabled, we push that bit of the policy into JavaScriptCore. Tests: http/tests/security/contentSecurityPolicy/eval-allowed.html http/tests/security/contentSecurityPolicy/eval-blocked.html * bindings/js/ScriptController.cpp: (WebCore::ScriptController::disableEval): * bindings/js/ScriptController.h: * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::didReceiveHeader): (WebCore::ContentSecurityPolicy::internalAllowEval): (WebCore::ContentSecurityPolicy::allowEval): * page/ContentSecurityPolicy.h: 2011-04-29 Joseph Pecoraro GTK build fix. Missed moving DateComponents and adding LocalizedDate files for their build file. * GNUmakefile.list.am: 2011-04-29 Adam Barth Reviewed by Eric Seidel. style-src should block @style https://bugs.webkit.org/show_bug.cgi?id=59293 This patch blocks @style when style-src doesn't have the 'unsafe-inline' token. This patch blocks the parsing of the attribute itself. That feels vaguely like too low a level to interpose the policy, but there didn't seem to be anywhere else natural to enforce the policy. Tests: http/tests/security/contentSecurityPolicy/inline-style-attribute-allowed.html http/tests/security/contentSecurityPolicy/inline-style-attribute-blocked.html http/tests/security/contentSecurityPolicy/inline-style-on-html.html * dom/StyledElement.cpp: (WebCore::StyledElement::parseMappedAttribute): 2011-04-29 Joseph Pecoraro Reviewed by Kent Tamura. Allow Localized Date Strings for Date Input Fields https://bugs.webkit.org/show_bug.cgi?id=59752 Test: fast/forms/date-input-visible-strings.html * CMakeLists.txt: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: update build files for moving DateComponents from WebCore/html to WebCore/platform and adding the LocalizedDate files. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::serialize): (WebCore::BaseDateAndTimeInputType::serializeWithComponents): (WebCore::BaseDateAndTimeInputType::serializeWithMilliseconds): InputType::serialize for a double value with date types is different for the month type because it assumes the incoming value is months instead of msecs (matching valueAsNumber in HTML5). So provide a more general serialization function, serializeWithComponents, that will always serialize a string correctly for the current type but taking in a DateComponents object. The default serialize, and new serializeWithMilliseconds, can fall back to this and allows an override point for the month type. * html/MonthInputType.cpp: (WebCore::MonthInputType::serializeWithMilliseconds): the month type is a case where the default serialize does not take msec, so provide an implementation for month which handles msec input. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::setValueAsDate): switch to serializeWithMilliseconds as the incoming date value is msec. * html/MonthInputType.cpp: (WebCore::MonthInputType::setValueAsDate): removed. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::visibleValue): allow localized formatting of a date value. (WebCore::BaseDateAndTimeInputType::convertFromVisibleValue): allow parsing for a formatted date value. * html/BaseDateAndTimeInputType.h: * platform/DateComponents.cpp: Renamed from Source/WebCore/html/DateComponents.cpp. Expose the Type enum so it can be used outside of the DateComponents class. * platform/text/LocalizedDate.h: Added. * platform/text/LocalizedDateNone.cpp: Added. (WebCore::formatLocalizedDate): Default implementation falls back to existing HTML5 date input value formatting. * html/BaseDateAndTimeInputType.h: * html/DateInputType.cpp: (WebCore::DateInputType::dateType): * html/DateInputType.h: * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::dateType): * html/DateTimeInputType.h: * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::dateType): * html/DateTimeLocalInputType.h: * html/MonthInputType.cpp: (WebCore::MonthInputType::dateType): * html/MonthInputType.h: * html/TimeInputType.cpp: (WebCore::TimeInputType::dateType): * html/TimeInputType.h: * html/WeekInputType.cpp: (WebCore::WeekInputType::dateType): * html/WeekInputType.h: Accessors for the desired date type of a date input type. This allows the base class to write a generic algorithm. 2011-04-29 Adam Barth Reviewed by Eric Seidel. style-src should block inline style from