2012-12-12 Eberhard Graether Web Inspector: follow up to r136974: handle visibility shortcut in keydown event of ElementsTreeOutline.element https://bugs.webkit.org/show_bug.cgi?id=104694 Reviewed by Pavel Feldman. Typing H in the StylesSidebarPane caused toggling of the selected elements visibility. This change only handles the H keydown when the ElementsPanel is focused. No new tests. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype._onkeydown): (WebInspector.ElementsTreeOutline.prototype.handleShortcut): * inspector/front-end/KeyboardShortcut.js: (WebInspector.KeyboardShortcut.hasNoModifiers): 2012-12-12 Philip Rogers Fix target element handling in SVGSMILElement. https://bugs.webkit.org/show_bug.cgi?id=104495 Reviewed by Abhishek Arya. This patch fixes two bugs that led to stale target elements in SVGSMILElement. r122449 changed the code to call removeAllElementReferencesForTarget to rebuild dependent trees. This contained a bug where element references would be incorrectly removed. removeAllElementReferencesForTarget calls svgAttributeChanged(href) on all references, which can then re-add the references back. The bug is that removeAllElementReferencesForTarget removes a newly-added reference as the last step. r136906 changed targetElement() to no longer be lazily resolved so any changes to an animation's href attribute needed to be tracked. r136906 refactored the code but did not fix a bug where animation elements not in the document would not react to svgAttributeChanged(href). The combination of these two bugs allowed stale targetElement references to exist. A target element could be removed from the document without dependent animation elements receiving a notification (bug 1) and not reacting to notifications they received (bug 2). This patch updates SVGUseElement::buildInstanceTree to only rebuild (not remove) the elements referencing the target by adding rebuildAllElementReferencesForTarget. This patch also updates SVGSMILElement to correctly react to svgAttributeChanged() notifications for href changes even when not in the document. Test: svg/animations/target-condition-crash.html * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget): (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Refactored so that we can notify element references to update without removing references. * svg/SVGDocumentExtensions.h: (SVGDocumentExtensions): * svg/SVGElement.cpp: (WebCore::SVGElement::~SVGElement): (WebCore::SVGElement::removedFrom): Similar to SVGUseElement::buildShadowAndInstanceTree, this callsite was updated to only rebuild references instead of removing them. (WebCore::SVGElement::attributeChanged): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::buildShadowAndInstanceTree): The comment indicates we just want to rebuild (not remove). This callsite has been updated to use the new rebuildAllElementReferencesForTarget function. (WebCore::SVGUseElement::buildInstanceTree): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::buildPendingResource): (WebCore::SVGSMILElement::removedFrom): Previously, if an SVGSMILElement was not in the document, only clearResourceReferences would be called when the target changed. This has been refactored to reset the targetElement if the element needs to build resources but is not in the document. I looked at moving this into clearResourceReferences (since the target element might be considered a reference) but we run into issues calling pure virtual functions in the destructor. The current implementation seemed the cleanest. SVGSMILElement::removedFrom was cleaned up to match the rest of the code. The comment in removedFrom appears to be stale since disconnectConditions does not kill the element. (WebCore::SVGSMILElement::svgAttributeChanged): Removed the bad !inDocument() checks that broke href change notifications. (WebCore::SVGSMILElement::setTargetElement): 2012-12-12 Alpha Lam [chromium] Minimize memcpy for encoded image data in ImageFrameGenerator https://bugs.webkit.org/show_bug.cgi?id=103797 Reviewed by Stephen White. Added a new class ThreadSafeDataTransport to help transporting data in SharedBuffer from one thread to another. This class is designed to minimize thread contention and memory copy. It is implemented using a data queue. New data segments are copied into this queue. The queue is then consolidated with existing data when user requests access to the final SharedBuffer. Memory is copied into and out of the queue but this approach avoid copying the entire SharedBuffer. ImageFrameGenerator is now using this class for data transport between threads. Unit tests in ThreadSafeDataTransportTest. Also existing ImageFrameGeneratorTest passes. * WebCore.gypi: * platform/graphics/chromium/ImageFrameGenerator.cpp: (WebCore::ImageFrameGenerator::ImageFrameGenerator): (WebCore::ImageFrameGenerator::setData): (WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale): Added logic to skip decoding if there's no new data. (WebCore::ImageFrameGenerator::decode): * platform/graphics/chromium/ImageFrameGenerator.h: (ImageFrameGenerator): * platform/graphics/chromium/ThreadSafeDataTransport.cpp: Added. (WebCore): (WebCore::ThreadSafeDataTransport::ThreadSafeDataTransport): (WebCore::ThreadSafeDataTransport::~ThreadSafeDataTransport): (WebCore::ThreadSafeDataTransport::setData): (WebCore::ThreadSafeDataTransport::data): (WebCore::ThreadSafeDataTransport::hasNewData): * platform/graphics/chromium/ThreadSafeDataTransport.h: Added. (WebCore): (ThreadSafeDataTransport): 2012-12-12 Roger Fong Enable VIDEO_TRACK on Windows. https://bugs.webkit.org/show_bug.cgi?id=104706. Reviewed by Timothy Horton. Enable VIDEO_TRACK on Windows and update project property files. * DerivedSources.cpp: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/copyForwardingHeaders.cmd: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * html/HTMLElementsAllInOne.cpp: * rendering/RenderingAllInOne.cpp: 2012-12-12 No'am Rosenthal REGRESSION: r137481 caused a build failure with GTK https://bugs.webkit.org/show_bug.cgi?id=104826 Unreviewed build fix. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::prepareBackingStore): Brought back #if PLATFORM(QT) to surround the dynamic_cast call. 2012-12-12 Dean Jackson Use CAFilter rather than CIFilter https://bugs.webkit.org/show_bug.cgi?id=104759 Reviewed by Tim Horton. In order to get better performance in the simple CSS filter cases, use CAFilter rather than CIFilter. This involved defining some platform-specific values inside PlatformCALayerMac to expose CAFilter. The great side-effect is that this brings our hardware output much closer to our software filters. For example, on a random location in the hue-rotate test. Software: rgb(255, 148, 16) Hardware before: rgb(255, 204, 50) Hardware after: rgb(255, 165, 33) Still some improvement needed, but better. Covered by existing tests. * platform/graphics/ca/mac/PlatformCALayerMac.mm: (CAColorMatrix): New structure to hold 5x4 matrix representing a color operation. (PlatformCALayer::setFilters): Use CAFilter objects rather than CIFilter. 2012-12-12 No'am Rosenthal [Texmap] Consolidate redundant code for ARB_RECT texture https://bugs.webkit.org/show_bug.cgi?id=104705 Reviewed by Kenneth Rohde Christiansen. Instead of having a whole different function for RECT textures, keep the existing functions and pass a flag that tells TextureMapperGL to use the non-normalized coordinates and the RECT shaders. No new tests, refactor only. Tested to not break WebGL on Qt-Mac. * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp: (WebCore::GraphicsSurface::platformPaintToTextureMapper): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawQuad): Compensate for rect textures in drawQuad. (WebCore::TextureMapperGL::drawBorder): (WebCore::TextureMapperGL::drawTexture): (WebCore::TextureMapperGL::drawSolidColor): (WebCore::TextureMapperGL::drawTextureWithAntialiasing): (WebCore::TextureMapperGL::drawTexturedQuadWithProgram): Pass flags to TextureMapperGL::drawQuad instead of a bool. * platform/graphics/texmap/TextureMapperGL.h: (TextureMapperGL): * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore::getShaderSpec): * platform/graphics/texmap/TextureMapperShaderManager.h: (TextureMapperShaderProgram): Compensate for the texture-size in the vertex shader instead of in the fragment shader. 2012-12-12 Sheriff Bot Unreviewed, rolling out r137491. http://trac.webkit.org/changeset/137491 https://bugs.webkit.org/show_bug.cgi?id=104828 broke the builtd (Requested by rfong on #webkit). * DerivedSources.cpp: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/copyForwardingHeaders.cmd: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * html/HTMLElementsAllInOne.cpp: * platform/NotImplemented.cpp: (WebCore): (WebCore::notImplementedLoggingChannel): * rendering/RenderingAllInOne.cpp: 2012-12-12 John J. Barton Web Inspector: remove protocol-externs.js temp file after compile-front-end.py https://bugs.webkit.org/show_bug.cgi?id=98799 Reviewed by Vsevolod Vlasov. Add os.system rm for protocol-externs.js to the end of the compile script * inspector/compile-front-end.py: 2012-12-12 Robert Hogan White space between inline blocks should be affected by word-spacing property https://bugs.webkit.org/show_bug.cgi?id=69072 Reviewed by Levi Weintraub. Allow word-spacing to get added to the spaces between inline blocks in placeBoxesInInlineDirection by setting needsWordSpacing to true each time an inline block is encountered. This ensures that the next space encountered in a text run will be treated as a space between two words and will get word-spacing added to it if it is present in the style. Tests: fast/css/word-spacing-between-blocks.html fast/css/word-spacing-between-inlines.html * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection): 2012-12-12 Xianzhu Wang Pre-painting should not paint out-of-view fixed position elements https://bugs.webkit.org/show_bug.cgi?id=104724 Reviewed by James Robinson. Test: ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): Don't paint out-of-view fixed position elements. 2012-12-11 Roger Fong Enable VIDEO_TRACK on Windows. https://bugs.webkit.org/show_bug.cgi?id=104706. Reviewed by Timothy Horton. Enable VIDEO_TRACK on Windows and update project property files. * DerivedSources.cpp: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/copyForwardingHeaders.cmd: * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * html/HTMLElementsAllInOne.cpp: * rendering/RenderingAllInOne.cpp: 2012-12-12 James Simonsen [Resource Timing] Failed resources shouldn't be recorded in the buffer https://bugs.webkit.org/show_bug.cgi?id=104762 Reviewed by Tony Gentilcore. Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_failures.html * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::loadDone): 2012-12-12 Martin Robinson [GTK] Add authentication support to DRT and fix exposed issues in the libsoup backend https://bugs.webkit.org/show_bug.cgi?id=104285 Reviewed by Gustavo Noronha Silva. Fix issues in the libsoup networking backend that were causing test failures. No new tests. This patch unskips authentication tests. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::isAuthenticationFailureStatusCode): Added this helper to catch authentication status codes and use it everywhere. (WebCore::applyAuthenticationToRequest): Use an early return instead of an if-statement and instead of always using manually specified credentials, apply those found in the session storage as well. Instead of applying the credentials to firstRequest always, accept the request as a parameter, so this method can be properly used with redirects. (WebCore::restartedCallback): Instead of creating the KURL directly from soup_uri_to_string use soupURIToKURL, which preserves the password from the SoupURI. soup_uri_to_string doesn't include the password. When calling applyAuthenticationToRequest update the new request. Before applyAuthenticationToRequest always updated the firstRequest. Do not call willSendRequest for instances when this method is called for authentication handling. willSendRequest should only be called for server-side redirects. (WebCore::createSoupRequestAndMessageForHandle): Use soup_requester_request_uri instead of soup_requester_request. Request::soupURI properly creates a SoupURI with non-null empty strings when either the username and password are empty. A null username or password does not trigger the URI-embedded credential override in SoupAuthenticationManager within libsoup. This is important because sometimes either the username or password might empty for a request, but the other part of the credential should still override the per-session credential storage. (WebCore::ResourceHandle::start): We don't need to clear the username and password from the internal data structure any longer. These need to be cleared in the CFNetwork backend because it prevents the same failed per-request credentials from being used over and over again. In our case we don't use these members during didReceiveAuthenticationChallenge, so this isn't an issue. (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Don't look at the per-request m_user/m_pass pair here any longer. We use these when initially creating a request, so we don't want to re-use them if they fail. * platform/network/soup/ResourceRequest.h: (ResourceRequest): Rename urlStringForSoup to soupURI. * platform/network/soup/ResourceRequestSoup.cpp: (WebCore::ResourceRequest::soupURI): Instead of returning a string for the soup-bound URL return a SoupURI that properly embeds empty usernames and passwords. 2012-12-12 Alexey Proskuryakov Make LOG() work in WebProcess and NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=104718 Reviewed by Tim Horton. Split initialization function into a new InitializeLogging.h file, because it's needed in WebKit, but cannot be included along with WebKit version of this file. We'd have a confilct between LOG_CHANNEL_PREFIX definitions if we tried. * WebCore.xcodeproj/project.pbxproj: Make Logging.h a project header, and InitializeLogging.h a private one. * GNUmakefile.list.am: * Target.pri: * platform/InitializeLogging.h: Added. * platform/Logging.h: * platform/blackberry/LoggingBlackBerry.cpp: * platform/efl/LoggingEfl.cpp: * platform/gtk/LoggingGtk.cpp: * platform/mac/LoggingMac.mm: * platform/qt/LoggingQt.cpp: * platform/win/LoggingWin.cpp: * platform/wx/LoggingWx.cpp: Include InitializeLogging.h where this function is implemented. * platform/NotImplemented.h: * platform/NotImplemented.cpp: Added. Changed to not include WebCore's Logging.h in the header, because NotImplemented.h is used in WebKits, which have incompatibe logging headers. 2012-12-12 Chris Fleizach AX: aria-busy should be exposed everywhere, not just on live regions https://bugs.webkit.org/show_bug.cgi?id=104814 Reviewed by Anders Carlsson. The aria-busy attribute should be exposed on all elements. This isn't entirely clear in the ARIA spec, but that will be fixed with ARIA1.1 (ISSUE-538). Existing tests that dump attributes cover this new behavior. * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]): 2012-12-12 Gavin Peters [chromium] Add destructor to WebPrerender https://bugs.webkit.org/show_bug.cgi?id=104820 Reviewed by James Robinson. When making WebPrerender default constructible and assignable, the destructor should have been moved out of WEBKIT_IMPLEMENTATION. Existing WebKit unit tests should test this, as do chromium browser tests. * platform/chromium/support/WebPrerender.cpp: (WebKit::WebPrerender::toPrerender): (WebKit::WebPrerender::reset): 2012-12-12 Allan Sandfeld Jensen [Qt] Animation fails on large layers https://bugs.webkit.org/show_bug.cgi?id=104538 Reviewed by Noam Rosenthal. The backing tiles had no upper limit defined for the non-GL backend, which could cause them to allocate pixmaps widier or higher than what the underlying graphics systems can handle. On top of that GraphicsLayerTextureMapper::prepareBackingStore() would allocate an intermediate pixmap the size of the dirty rect, which would at least on the first paint be the size of the entire layer, again causing allocation of pixmaps with dimensions outside of platform bounds. This patch introduces a limit to the size of image buffer tiles, and adds an alternative path for painting where the GraphicsLayer paints directly to the tile instead of over an intermediate pixmap. This alternative path can also be useful later to minimize the amount of pixel copying happening in full repaints. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::prepareBackingStore): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (GraphicsLayerTextureMapper): * platform/graphics/texmap/TextureMapper.cpp: (WebCore::BitmapTexture::updateContents): * platform/graphics/texmap/TextureMapper.h: (BitmapTexture): (TextureMapper): * platform/graphics/texmap/TextureMapperBackingStore.cpp: (WebCore::TextureMapperTile::updateContents): (WebCore::TextureMapperTiledBackingStore::updateContents): * platform/graphics/texmap/TextureMapperBackingStore.h: (TextureMapperTile): (TextureMapperTiledBackingStore): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::updateContents): (WebCore::TextureMapperImageBuffer::maxTextureSize): * platform/graphics/texmap/TextureMapperImageBuffer.h: (BitmapTextureImageBuffer): 2012-12-12 Aaron Colwell Remove MediaSource 'ended' to 'open' transition when seeking. https://bugs.webkit.org/show_bug.cgi?id=104583 Reviewed by Eric Carlson. Remove the 'ended' to 'open' transition on a seek. No new tests. The following tests were updated to reflect the new behavior. http/tests/media/media-source/video-media-source-seek.html http/tests/media/media-source/video-media-source-state-changes.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::seek): 2012-12-12 Julien Chaffraix [CSS Grid Layout] Implement CSS parsing and handling for min-content and max-content https://bugs.webkit.org/show_bug.cgi?id=104747 Reviewed by Alexis Menard. This change adds -webkit-min-content and -webkit-max-content to our parsing. The rendering is not plugged in and will probably depend on bug 103311. Tests: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html: fast/css-grid-layout/grid-columns-rows-get-set.html: * css/CSSParser.cpp: (WebCore::CSSParser::parseGridBreadth): * css/StyleResolver.cpp: (WebCore::createGridTrackBreadth): Straight-forward extension of the new code. We were already serializing back properly so no need to touch CSSComputedStyleDeclaration. 2012-12-12 Ryosuke Niwa Copying text with ruby inserts new lines around rt elements https://bugs.webkit.org/show_bug.cgi?id=104765 Reviewed by Dan Bernstein. Don't emit new lines before and after rt. Test: editing/pasteboard/copy-paste-ruby-text.html * editing/TextIterator.cpp: (WebCore::shouldEmitNewlinesBeforeAndAfterNode): 2012-12-12 Krzysztof Czech [EFL] Possibility to turn off accessibility feature for WebKit-EFL. https://bugs.webkit.org/show_bug.cgi?id=103036 Reviewed by Laszlo Gombos. Guard dependencies for accessibility (ATK), so that they can be turned off. No new tests as there is no new functionality. * PlatformEfl.cmake: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::AccessibilityObject): * accessibility/AccessibilityObject.h: (AccessibilityObject): 2012-12-12 Justin Novosad Use render box background over border draw strategy in cases with background-image https://bugs.webkit.org/show_bug.cgi?id=103409 Reviewed by Simon Fraser. The BackgroundOverBorderBleedAvoidance mode was not being used in cases where the background is an opaque image. It was also not being used in cases with multiple layers. The multiple layer case is now safe with respect to color bleeding if the top layer is opaque, thank to the recent addition of layer occlusion culling in r135629. No new tests. Testing already covered by the following tests: fast/backgrounds/background-opaque-images-over-color.html fast/backgrounds/gradient-background-leakage-2.html * rendering/RenderBox.cpp: (WebCore::RenderBox::determineBackgroundBleedAvoidance): (WebCore::RenderBox::backgroundHasOpaqueTopLayer): * rendering/RenderBox.h: (RenderBox): 2012-12-12 Ilya Tikhonovsky Web Inspector: instrument static parts of RenderBlock and RenderBox https://bugs.webkit.org/show_bug.cgi?id=104660 Reviewed by Yury Semikhatsky. Plain vanilla instrumentation. * dom/WebCoreMemoryInstrumentation.cpp: (WebCore): (WebCore::WebCoreMemoryInstrumentation::reportMemoryUsage): * dom/WebCoreMemoryInstrumentation.h: (WebCoreMemoryTypes): (WebCoreMemoryInstrumentation): (WebCore): * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::reportStaticMembersMemoryUsage): (WebCore): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::reportStaticMembersMemoryUsage): (WebCore): * rendering/RenderBox.h: (RenderBox): 2012-12-12 Ilya Tikhonovsky Web Inspector: Native Memory Instrumentation: remove fake root MemoryObjectInfo. https://bugs.webkit.org/show_bug.cgi?id=104796 Reviewed by Yury Semikhatsky. It was not a good idea to introduce a fake root MemoryObjectInfo. It makes a problem when we visit an object without its own MemoryObjectType. Example: RenderBox has a global pointer to a hash map. HashMap doesn't have its own object type because it is a generic container. It will inherit object type from the fake root memory object info. The same could happen for another container in another class with other MemoryObjectType. This fact forces me to create custom process method for root objects because they need to have their own MemoryObjectInfo with customisable memory object type. Drive by fix: InstrumentedPointer* was replaced with Wrapper* because actually it is using for instrumented and not instrumented object classes. * inspector/MemoryInstrumentationImpl.cpp: (WebCore::MemoryInstrumentationImpl::processDeferredObjects): (WebCore::MemoryInstrumentationImpl::deferObject): (WebCore::MemoryInstrumentationImpl::reportMemoryUsage): * inspector/MemoryInstrumentationImpl.h: (MemoryInstrumentationImpl): 2012-12-12 Kondapally Kalyan [EFL [WebGL] [Wk2] Resizing the canvas breaks WebGL. https://bugs.webkit.org/show_bug.cgi?id=104535. Reviewed by Kenneth Rohde Christiansen. GraphicsContext3DEfl does not re-create the surface on canvas resize, this conflicted with the logic in coordinated graphics Layer. CoordinatedGraphicsLayer checks for GraphicsSurfaceToken to decide if the surface in UI-Process should be recreated or not. With this patch we also check for size of the platform Layer. * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::createGraphicsSurfaces): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (GraphicsContext3DPrivate::didResizeCanvas): (GraphicsContext3DPrivate::platformLayerSize): * platform/graphics/efl/GraphicsContext3DPrivate.h: (GraphicsContext3DPrivate): 2012-12-12 Antoine Quint Web Inspector: Crash in InspectorDOMAgent::pushNodePathToFrontend when inspecting document with CSS generated content https://bugs.webkit.org/show_bug.cgi?id=104780 Reviewed by Pavel Feldman. The pushNodePathForRenderLayerToFrontend() method added to InspectorDOMAgent naively assumed that all RenderLayers have a Node associated to them. However, in the case of CSS generated content, that will not be the case and we would call into pushNodePathToFrontend() with a 0 parameter that would hit the first ASSERT in this method. We're now checking that we indeed have an associated node for the provided RenderLayer and return 0 in case we don't, without calling into pushNodePathToFrontend(). Test: inspector-protocol/layer-tree-generated-content.html * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushNodePathForRenderLayerToFrontend): 2012-12-12 Alexander Pavlov Web Inspector: [Crash] Clear cached stylesheet rules in InspectorStyleSheet::deleteRule() https://bugs.webkit.org/show_bug.cgi?id=104806 Reviewed by Vsevolod Vlasov. Cached rules (m_flatRules) should get cleared whenever a rule is deleted. Test: inspector/styles/undo-add-rule-crash.html * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::deleteRule): 2012-12-12 Stephen White Unreviewed, rolling out r136975. http://trac.webkit.org/changeset/136975 https://bugs.webkit.org/show_bug.cgi?id=90405 Correctness issues. * dom/Element.cpp: * dom/Element.h: (Element): * dom/ElementRareData.h: (ElementRareData): (WebCore::ElementRareData::ElementRareData): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::applyFilters): * rendering/FilterEffectRenderer.cpp: (WebCore::createCustomFilterEffect): (WebCore::FilterEffectRenderer::buildReferenceFilter): (WebCore::FilterEffectRenderer::build): * rendering/FilterEffectRenderer.h: (FilterEffectRenderer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): * rendering/RenderObject.cpp: (WebCore::RenderObject::willBeDestroyed): * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::registerResource): * rendering/svg/SVGResources.cpp: (WebCore::SVGResources::buildCachedResources): * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::addResourcesFromRenderObject): (WebCore::SVGResourcesCache::clientStyleChanged): (WebCore::SVGResourcesCache::resourceDestroyed): * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::addPendingResource): (WebCore::SVGDocumentExtensions::isElementPendingResources): (WebCore::SVGDocumentExtensions::isElementPendingResource): (WebCore::SVGDocumentExtensions::removeElementFromPendingResources): (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval): * svg/SVGDocumentExtensions.h: (WebCore): (SVGDocumentExtensions): * svg/SVGElement.cpp: (WebCore::SVGElement::hasPendingResources): (WebCore): (WebCore::SVGElement::setHasPendingResources): (WebCore::SVGElement::clearHasPendingResourcesIfPossible): * svg/SVGElement.h: (SVGElement): (WebCore::SVGElement::buildPendingResource): * svg/SVGElementRareData.h: (WebCore::SVGElementRareData::SVGElementRareData): (WebCore::SVGElementRareData::hasPendingResources): (WebCore::SVGElementRareData::setHasPendingResources): (SVGElementRareData): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded): 2012-12-12 Stephen White Unreviewed, rolling out r137022. http://trac.webkit.org/changeset/137022 Precursor to rollout of 136975. * rendering/svg/SVGResources.cpp: (WebCore::SVGResources::buildCachedResources): 2012-12-12 Stephen White Unreviewed, rolling out r137027. http://trac.webkit.org/changeset/137027 Precursor to rollout of 136975. * dom/ElementRareData.h: (ElementRareData): 2012-12-12 Alexei Filippov Web Inspector: add memory used by memory allocator itself to NMI https://bugs.webkit.org/show_bug.cgi?id=93372 Make native memory instrumentation report memory retained for the memory allocator internal purposes. Reviewed by Yury Semikhatsky. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.MemoryBlockViewProperties._initialize): * platform/chromium/MemoryUsageSupportChromium.cpp: (WebCore::MemoryUsageSupport::memoryUsageByComponents): 2012-12-12 Sheriff Bot Unreviewed, rolling out r137438. http://trac.webkit.org/changeset/137438 https://bugs.webkit.org/show_bug.cgi?id=104798 assertion reached when removing tile (Requested by tmpsantos on #webkit). * page/Frame.cpp: (WebCore::Frame::setTiledBackingStoreEnabled): * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::setTileCreationDelay): (WebCore::TiledBackingStore::coverWithTilesIfNeeded): (WebCore::TiledBackingStore::updateTileBuffers): (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended): (WebCore::TiledBackingStore::startTileBufferUpdateTimer): (WebCore::TiledBackingStore::tileBufferUpdateTimerFired): (WebCore::TiledBackingStore::startBackingStoreUpdateTimer): (WebCore::TiledBackingStore::backingStoreUpdateTimerFired): * platform/graphics/TiledBackingStore.h: (TiledBackingStore): (WebCore::TiledBackingStore::tileCreationDelay): * platform/graphics/TiledBackingStoreClient.h: (WebCore::TiledBackingStoreClient::tiledBackingStoreUpdatesAllowed): 2012-12-12 Csaba Osztrogonác [Qt] Unreviewed typo fix after r137446. * WebCore.pri: 2012-12-12 Zan Dobersek [GTK] Remove the last of unnecessary configuration options in configure.ac https://bugs.webkit.org/show_bug.cgi?id=104793 Reviewed by Martin Robinson. Remove the feature define overriding that's based on the automake variables which are not set anymore due to the corresponding configuration options being removed. No new tests - no new functionality. * GNUmakefile.am: 2012-12-12 Simon Hausmann [Qt] Fix build on Mac Reviewed by Csaba Osztrogonác. On Mac OS X we have sqlite as a system library available. * WebCore.pri: 2012-12-12 Simon Hausmann [Qt] Fix linkage against SQLite https://bugs.webkit.org/show_bug.cgi?id=104781 Reviewed by Csaba Osztrogonác. Detect SQLite either through pkg-config, from the SQLITE3SRCDIR environment variable or from qtbase via a qt5.git build. Bail out early with an error message if neither option applies. This removes the usage of $$QT.core.sources and the dependency on Qt's system-sqlite configure setting. We should always favour a system library over a copy in Qt. * Target.pri: * WebCore.pri: 2012-12-12 Allan Sandfeld Jensen [TexMap] Uninitialized m_context pointer in TextureMapper https://bugs.webkit.org/show_bug.cgi?id=104785 Reviewed by Kenneth Rohde Christiansen. * platform/graphics/texmap/TextureMapper.cpp: (WebCore::TextureMapper::TextureMapper): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::TextureMapperGL): 2012-12-12 Tommy Widenflycht MediaStream API: Change the data channel descriptor pattern to a handler pattern https://bugs.webkit.org/show_bug.cgi?id=104543 Reviewed by Kent Tamura. In short the code is refactured to use the Handler/Client pattern (see RTCPeerConnectionHandler) instead of the Descriptor pattern. This will fix lifetime/memory/code structure issues in the chromium port. Existing tests cover this patch. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::create): (WebCore::RTCDataChannel::RTCDataChannel): (WebCore::RTCDataChannel::~RTCDataChannel): (WebCore::RTCDataChannel::label): (WebCore::RTCDataChannel::reliable): (WebCore::RTCDataChannel::readyState): (WebCore::RTCDataChannel::bufferedAmount): (WebCore::RTCDataChannel::send): (WebCore::RTCDataChannel::close): (WebCore::RTCDataChannel::didChangeReadyState): (WebCore::RTCDataChannel::didReceiveStringData): (WebCore::RTCDataChannel::didReceiveRawData): (WebCore::RTCDataChannel::didDetectError): (WebCore::RTCDataChannel::stop): * Modules/mediastream/RTCDataChannel.h: (WebCore): (RTCDataChannel): * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::didAddRemoteDataChannel): * Modules/mediastream/RTCPeerConnection.h: (RTCPeerConnection): * WebCore.gypi: * platform/chromium/support/WebRTCDataChannel.cpp: Removed. * platform/mediastream/RTCDataChannelDescriptor.h: Removed. * platform/mediastream/RTCDataChannelHandler.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelDescriptor.cpp. (WebCore): (RTCDataChannelHandler): (WebCore::RTCDataChannelHandler::~RTCDataChannelHandler): * platform/mediastream/RTCDataChannelHandlerClient.h: Renamed from Source/WebCore/platform/mediastream/RTCDataChannelDescriptor.cpp. (WebCore): (RTCDataChannelHandlerClient): (WebCore::RTCDataChannelHandlerClient::~RTCDataChannelHandlerClient): * platform/mediastream/RTCPeerConnectionHandler.cpp: (WebCore): (WebCore::RTCPeerConnectionHandler::create): * platform/mediastream/RTCPeerConnectionHandler.h: (WebCore): (RTCPeerConnectionHandler): * platform/mediastream/RTCPeerConnectionHandlerClient.h: (WebCore): (RTCPeerConnectionHandlerClient): * platform/mediastream/chromium/RTCDataChannelHandlerChromium.cpp: Added. (WebCore): (WebCore::RTCDataChannelHandlerChromium::create): (WebCore::RTCDataChannelHandlerChromium::RTCDataChannelHandlerChromium): (WebCore::RTCDataChannelHandlerChromium::~RTCDataChannelHandlerChromium): (WebCore::RTCDataChannelHandlerChromium::setClient): (WebCore::RTCDataChannelHandlerChromium::label): (WebCore::RTCDataChannelHandlerChromium::isReliable): (WebCore::RTCDataChannelHandlerChromium::bufferedAmount): (WebCore::RTCDataChannelHandlerChromium::sendStringData): (WebCore::RTCDataChannelHandlerChromium::sendRawData): (WebCore::RTCDataChannelHandlerChromium::close): (WebCore::RTCDataChannelHandlerChromium::didChangeReadyState): (WebCore::RTCDataChannelHandlerChromium::didReceiveStringData): (WebCore::RTCDataChannelHandlerChromium::didReceiveRawData): (WebCore::RTCDataChannelHandlerChromium::didDetectError): * platform/mediastream/chromium/RTCDataChannelHandlerChromium.h: Added. (WebCore): (RTCDataChannelHandlerChromium): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp: (WebCore::RTCPeerConnectionHandlerChromium::createDataChannel): (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h: (WebCore): (RTCPeerConnectionHandlerChromium): 2012-12-12 Huang Dongsung Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer. https://bugs.webkit.org/show_bug.cgi?id=103959 Reviewed by Kenneth Rohde Christiansen. TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop() is used when class methods cannot be called asynchronously by client. Updates of tiles are committed as soon as all the events in event queue have been processed. After this patch Frame sets m_commitTileUpdatesOnIdleEventLoop to true. In addition, remove TiledBackingStoreClient::tiledBackingStoreUpdatesAllowed() which was introduced for Coordinated Graphics. Refactoring covered by existing tests. * page/Frame.cpp: (WebCore::Frame::setTiledBackingStoreEnabled): * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::setTrajectoryVector): Separate setting a trajectory vector from coverWithTilesIfNeeded(). (WebCore::TiledBackingStore::coverWithTilesIfNeeded): (WebCore::TiledBackingStore::updateTileBuffers): (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended): (WebCore::TiledBackingStore::startTileBufferUpdateTimer): (WebCore::TiledBackingStore::tileBufferUpdateTimerFired): (WebCore::TiledBackingStore::startBackingStoreUpdateTimer): (WebCore::TiledBackingStore::backingStoreUpdateTimerFired): * platform/graphics/TiledBackingStore.h: (TiledBackingStore): (WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop): * platform/graphics/TiledBackingStoreClient.h: (WebCore::TiledBackingStoreClient::tiledBackingStoreHasPendingTileCreation): If TiledBackingStore does not create all tiles, TiledBackingStore notifies a client of needing to create tiles more, when m_commitTileUpdatesOnIdleEventLoop is false. 2012-12-11 Jocelyn Turcotte [Qt] Fix the inspector not showing up on Windows https://bugs.webkit.org/show_bug.cgi?id=104677 Reviewed by Simon Hausmann. * Target.pri: 2012-11-29 Yury Semikhatsky Web Inspector: Heap snapshot crashes on any page in MacOS Canary https://bugs.webkit.org/show_bug.cgi?id=103076 Reviewed by Adam Barth. Provide global object name resolver to the heap profiler. The callback allows to safely retrieve document URL to be used as a label for corresponding global object in the heap snapshot. Test: inspector-protocol/take-heap-snapshot.html * bindings/v8/ScriptProfiler.cpp: (WebCore): (WebCore::ScriptProfiler::takeHeapSnapshot): 2012-12-12 Sheriff Bot Unreviewed, rolling out r137428. http://trac.webkit.org/changeset/137428 https://bugs.webkit.org/show_bug.cgi?id=104776 It broke the build everywhere (Requested by Ossy on #webkit). * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurface::platformPaintToTextureMapper): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawQuad): (WebCore::TextureMapperGL::drawBorder): (WebCore::TextureMapperGL::drawTexture): (WebCore): (WebCore::TextureMapperGL::drawTextureRectangleARB): (WebCore::TextureMapperGL::drawSolidColor): (WebCore::TextureMapperGL::drawTextureWithAntialiasing): (WebCore::TextureMapperGL::drawTexturedQuadWithProgram): * platform/graphics/texmap/TextureMapperGL.h: (TextureMapperGL): * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore::getShaderSpec): * platform/graphics/texmap/TextureMapperShaderManager.h: (TextureMapperShaderProgram): 2012-12-12 Martin Robinson Web inspector prints a warning about "Debug" not being localized https://bugs.webkit.org/show_bug.cgi?id=104679 Reviewed by Vsevolod Vlasov. Add a missing localization entry for the "Debug" string which is used in the web inspector front-end. This prevents warnings about a missing localized version of the word "Debug" and allows it to be properly localized. * English.lproj/localizedStrings.js: Add "Debug" 2012-12-12 Shinya Kawanaka [Shadow DOM] Implement HTMLShadowElement::olderShadowRoot https://bugs.webkit.org/show_bug.cgi?id=104218 Reviewed by Hajime Morita. Implements HTMLShadowElement::olderShadowRoot, which returns the ShadowRoot the HTMLShadowElement is assigned to. When such ShadowRoot does not exist, 0 is returned. Test: fast/dom/shadow/olderShadowRoot-in-shadowelement.html * dom/ElementShadow.cpp: (WebCore::ElementShadow::ensureDistributionFromDocument): Ensures distribution of this ElementShadow and all of the parent TreeScope distribution. This function will be shared for Bug 104345. (WebCore): * dom/ElementShadow.h: (ElementShadow): * html/shadow/HTMLShadowElement.cpp: (WebCore::HTMLShadowElement::olderShadowRoot): (WebCore): * html/shadow/HTMLShadowElement.h: * html/shadow/HTMLShadowElement.idl: 2012-12-12 No'am Rosenthal [Texmap] Consolidate redundant code for ARB_RECT texture https://bugs.webkit.org/show_bug.cgi?id=104705 Reviewed by Kenneth Rohde Christiansen. Instead of having a whole different function for RECT textures, keep the existing functions and pass a flag that tells TextureMapperGL to use the non-normalized coordinates and the RECT shaders. No new tests, refactor only. Tested to not break WebGL on Qt-Mac. * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurface::platformPaintToTextureMapper): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawQuad): Compensate for rect textures in drawQuad. (WebCore::TextureMapperGL::drawBorder): (WebCore::TextureMapperGL::drawTexture): (WebCore::TextureMapperGL::drawSolidColor): (WebCore::TextureMapperGL::drawTextureWithAntialiasing): (WebCore::TextureMapperGL::drawTexturedQuadWithProgram): Pass flags to TextureMapperGL::drawQuad instead of a bool. * platform/graphics/texmap/TextureMapperGL.h: (TextureMapperGL): * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore::getShaderSpec): * platform/graphics/texmap/TextureMapperShaderManager.h: (TextureMapperShaderProgram): Compensate for the texture-size in the vertex shader instead of in the fragment shader. 2012-12-11 Hayato Ito REGRESSION(r137408): breaks chromium's browser tests which use WebKitShadowRoot (Requested by hayato on #webkit). https://bugs.webkit.org/show_bug.cgi?id=104770 Unreviewed, build fix. * dom/ShadowRoot.idl: * page/DOMWindow.idl: 2012-12-11 Sheriff Bot Unreviewed, rolling out r137333, r137344, r137364, and r137377. http://trac.webkit.org/changeset/137333 http://trac.webkit.org/changeset/137344 http://trac.webkit.org/changeset/137364 http://trac.webkit.org/changeset/137377 https://bugs.webkit.org/show_bug.cgi?id=104771 Caused a raft of browser_test failures in Chromium (Requested by aklein on #webkit). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setRequest): (WebCore::DocumentLoader::subresource): (WebCore::DocumentLoader::addSubresourceLoader): (WebCore::DocumentLoader::removeSubresourceLoader): (WebCore::DocumentLoader::startLoadingMainResource): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::MainResourceLoader): (WebCore::MainResourceLoader::~MainResourceLoader): (WebCore::MainResourceLoader::receivedError): (WebCore::MainResourceLoader::willCancel): (WebCore::MainResourceLoader::didCancel): (WebCore::MainResourceLoader::continueAfterNavigationPolicy): (WebCore::MainResourceLoader::addData): (WebCore::MainResourceLoader::willSendRequest): (WebCore::MainResourceLoader::continueAfterContentPolicy): (WebCore::MainResourceLoader::didReceiveResponse): (WebCore::MainResourceLoader::didReceiveData): (WebCore::MainResourceLoader::didFinishLoading): (WebCore::MainResourceLoader::didFail): (WebCore::MainResourceLoader::reportMemoryUsage): (WebCore::MainResourceLoader::handleSubstituteDataLoadNow): (WebCore::MainResourceLoader::loadNow): (WebCore): (WebCore::MainResourceLoader::load): (WebCore::MainResourceLoader::setDefersLoading): * loader/MainResourceLoader.h: (MainResourceLoader): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): * loader/ResourceLoader.h: (ResourceLoader): (WebCore::ResourceLoader::defersLoading): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse): (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError): * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::willSendRequest): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::loadDone): * loader/mac/DocumentLoaderMac.cpp: (WebCore::DocumentLoader::schedule): (WebCore::DocumentLoader::unschedule): 2012-12-11 Kentaro Hara Unreviewed, rolling out r137398. http://trac.webkit.org/changeset/137398 https://bugs.webkit.org/show_bug.cgi?id=104188 A bunch of webaudio tests hit ASSERTs * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createOfflineContext): (WebCore): * Modules/webaudio/AudioContext.h: (AudioContext): * Modules/webaudio/DOMWindowWebAudio.idl: * Modules/webaudio/OfflineAudioContext.cpp: Removed. * Modules/webaudio/OfflineAudioContext.h: Removed. * Modules/webaudio/OfflineAudioContext.idl: Removed. * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContextConstructor::constructJSAudioContext): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallbackCustom): 2012-12-11 Shinya Kawanaka [Shadow DOM] registering InsertionPoints to ShadowRoot should work out of a document. https://bugs.webkit.org/show_bug.cgi?id=104346 Reviewed by Hajime Morita. We need to register InsertionPoints even if ShadowRoot is out of Document, since distribution should work out of Document, too. Instead of checking isInDocument(), we have to make sure InsertionPoint and an element which InsertionPoint inserted into have the same treescope. Tests: fast/dom/shadow/has-content-elements.html fast/dom/shadow/has-shadow-insertion-point.html * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::insertedInto): (WebCore::InsertionPoint::removedFrom): 2012-12-11 Takashi Sakamoto Text nodes in shadow roots don't inherit style properly https://bugs.webkit.org/show_bug.cgi?id=101116 Reviewed by Hajime Morita. Use NodeRenderingContext to resolve styles of text nodes. If text nodes are direct children of shadow roots, the text nodes should be inherited styles from their shadow hosts. But if reset-style-inheritance flag is true, the text nodes should not be inherited. And if text nodes are distributed nodes, we have to check whether their insertion point's reset-style-inheritance. c.f. shadow dom spec is: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles Test: fast/dom/shadow/text-node-in-shadow.html * css/StyleResolver.cpp: (WebCore::StyleResolver::styleForElement): Modified to use defaultStyleForElement if the given element has no parent style. (WebCore::StyleResolver::initForStyleResolve): Removed shouldResetStyleInheritance, because now NodeRenderingContext resetStyleInheritance() takes care of reset-style-inheritance of both shadow roots and insertion points. (WebCore::StyleResolver::defaultStyleForElement): Added to create a default style for elements. (WebCore): (WebCore::StyleResolver::styleForText): Use NodeRenderingContext to find the parent node for style from the given text node. If no parent node is found or reset-style-inheritance is true, returns a default style (i.e. empty render style). Otherwise, just returns the found node's style. * css/StyleResolver.h: (StyleResolver): * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseInsertionPoint): Modify to consider insertion point's resetStyleInheritance. * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::createRendererForTextIfNeeded): Since NodeRenderingContext has already found a parent node for rendering and style and a parentRenderer is just the found node's renderer, we have to only check reset-style-inheritance. If reset, use default style. Otherwise, the parentRenderer's style. * dom/Text.cpp: (WebCore::Text::recalcTextStyle): Use styleForText instead of parentRenderer's styles if the given text node is a direct child of a shadow root or a direct child of a shadow host. 2012-12-11 Takashi Sakamoto Hide HOST_RULE behind SHADOW_DOM flag. https://bugs.webkit.org/show_bug.cgi?id=102321 Reviewed by Dimitri Glazkov. @host @-rules are only available when the rules are declared in styles in shadow dom trees. So if SHADOW_DOM is disabled, we don't need @host @-rules. No new tests. Just hide HOST_RULE behind SHADOW_DOM flag. * css/StyleResolver.h: Hide "class ShadowRuleHost". * css/StyleRule.cpp: (WebCore::StyleRuleBase::reportMemoryUsage): (WebCore::StyleRuleBase::destroy): (WebCore::StyleRuleBase::copy): (WebCore::StyleRuleBase::createCSSOMWrapper): * css/StyleRule.h: (StyleRuleBase): Hide "Host" type and isHostRule. (StyleRuleHost): Hide "class StyleRuleHost". * css/StyleSheetContents.cpp: (WebCore::childRulesHaveFailedOrCanceledSubresources): 2012-12-11 Dominic Mazzoni AX: accessibilityIsIgnored should avoid computing textUnderElement https://bugs.webkit.org/show_bug.cgi?id=104688 Reviewed by Chris Fleizach. Simplify the logic in accessibilityIsIgnored without affecting the results of any tests. In particular, avoid expensive calls to textUnderElement. Covered by existing tests. * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::isGenericFocusableElement): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): 2012-12-11 Kentaro Hara [V8] Reachable event listeners on image elements can be collected in a minor DOM GC https://bugs.webkit.org/show_bug.cgi?id=104734 Reviewed by Kenneth Russell. A major DOM GC treats image elements specially. In V8GCController::opaqueRootForGC(), a major DOM GC puts image elements that have pending activities into the same object group of their document. This guarantees that image elements that have pending activities are not garbage collected in the major DOM GC. This patch adds the same special handling to a minor DOM GC to guarantee the same thing in the minor DOM GC too. In long-term, we might want to remove the special handling by making image elements active DOM nodes. Test: Manually confirmed that all characters in http://alteredqualia.com/three/examples/webgl_animation_skinning_tf2.html are rendered correctly. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::opaqueRootForGC): (WebCore::gcTree): 2012-12-11 Dominic Mazzoni AX: Make isActionSupported cross-platform. https://bugs.webkit.org/show_bug.cgi?id=104681 Reviewed by Chris Fleizach. Add UserGestureIndicator to increment() and decrement() so that all accessibility actions are treated as user actions, not scripted actions. * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::increment): (WebCore::AccessibilityNodeObject::decrement): 2012-12-11 Viatcheslav Ostapenko Remove conversion to/from float and float division from ImageFrame::setRGBA https://bugs.webkit.org/show_bug.cgi?id=103693 Reviewed by Brent Fulgham. Replace floating point operations used for alpha premultiply with fixed point arithmetic which is basically integer operations. Allows to shave extra couple percent from decoding images with transparency. Covered by existing tests. * platform/image-decoders/ImageDecoder.h: (ImageFrame): (WebCore::ImageFrame::fixPointUnsignedMultiply): (WebCore::ImageFrame::setRGBA): 2012-12-11 Kihong Kwon Vibration API: IDL type doesn't match implementation type https://bugs.webkit.org/show_bug.cgi?id=103899 Reviewed by Kentaro Hara. According to WebIDL, "unsigned long" corresponds to "unsigned" in the platform. Therefore unsigned long need to be changed to unsigned for the Vibration API. - Change a parameter type of vibrate function from unsigned long to unsigned. No new tests, it is covered by exist test. * Modules/vibration/NavigatorVibration.cpp: (WebCore::NavigatorVibration::vibrate): * Modules/vibration/NavigatorVibration.h: (NavigatorVibration): * Modules/vibration/Vibration.cpp: (WebCore::Vibration::vibrate): * Modules/vibration/Vibration.h: (Vibration): * Modules/vibration/VibrationClient.h: (VibrationClient): * bindings/js/JSDOMBinding.h: * bindings/scripts/CodeGeneratorJS.pm: Remove workaround codes for the Vibration API which is mapped from unsigned long to unsigned long. It should be mapped from unsigned long to unsigned by WebIDL spec. (GetNativeVectorInnerType): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence): 2012-12-11 Xinazhu Wang ScrollingCoordinator::hasVisibleSlowRepaintFixedObject() should exclude out-of-view fixed position elements https://bugs.webkit.org/show_bug.cgi?id=102543 Let RenderLayerCompositor manage the reasons that fixed position elements are not composited. Check the reason in ScrollingCoordinator::hasVisibleSlowRepaintFixedObjects(), don't let fixed position layer not composited with explicit reasons cause slow scrolling. Reviewed by James Robinson. Test: compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintFixedObjects): Exclude fixed position elements that are not composited for explicit reasons. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::computeCompositingRequirements): Manages m_fixedPositionLayerNotCompositedReasonMap. (WebCore::RenderLayerCompositor::needsToBeComposited): (WebCore::RenderLayerCompositor::requiresCompositingLayer): (WebCore::RenderLayerCompositor::requiresCompositingForPosition): * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::fixedPositionLayerNotCompositedReason): Now outputs fixedPositionLayerNotCompositedreason. (RenderLayerCompositor): 2012-12-11 Hayato Ito [Shadow DOM] Kill ShadowRoot constructor https://bugs.webkit.org/show_bug.cgi?id=102913 Reviewed by Dimitri Glazkov. Remove ShadowRoot constructor in favor of Element.webkitCreateShadowRoot(). No new tests. Update existing tests. * dom/ShadowRoot.idl: * page/DOMWindow.idl: * testing/Internals.cpp: (WebCore::Internals::createShadowRoot): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-12-11 Antti Koivisto Add Element-specific traversal functions https://bugs.webkit.org/show_bug.cgi?id=104685 Reviewed by Ryosuke Niwa. In many cases where we use NodeTraversal we really only want Elements. By having Element specific iteration functions we can tighten the code and make it faster too. This patch adds ElementTraversal namespace, similar to NodeTraversal. It also switches bunch of NodeTraversal call sites that obviously only care about elements to using the new interface. This should be a speedup too as we avoid number of branches by not having to look for children of non-ContainerNodes and by allowing use of ContainerNode specific accessors. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::addImageMapChildren): * css/SelectorChecker.cpp: (WebCore::linkAttribute): (WebCore::SelectorChecker::allVisitedStateChanged): (WebCore::SelectorChecker::visitedStateChanged): * css/StyleInvalidationAnalysis.cpp: (WebCore::elementMatchesSelectorScopes): (WebCore::StyleInvalidationAnalysis::invalidateStyle): * dom/ContainerNodeAlgorithms.h: (WebCore::ChildFrameDisconnector::collectDescendant): * dom/Document.cpp: (WebCore::Document::buildAccessKeyMap): (WebCore::Document::updateBaseURL): (WebCore::Document::processBaseElement): * dom/DocumentOrderedMap.cpp: (WebCore::DocumentOrderedMap::get): * dom/Element.cpp: (WebCore::Element::firstElementChild): * dom/Element.h: (WebCore): * dom/ElementShadow.cpp: (WebCore::ElementShadow::collectSelectFeatureSetFrom): * dom/NodeTraversal.h: (ElementTraversal): (WebCore): (WebCore::ElementTraversal::traverseNextElementTemplate): (WebCore::ElementTraversal::next): (WebCore::ElementTraversal::firstWithin): (WebCore::ElementTraversal::traverseNextElementSkippingChildrenTemplate): (WebCore::ElementTraversal::nextSkippingChildren): (NodeTraversal): * dom/TreeScope.cpp: (WebCore::TreeScope::labelElementForId): (WebCore::TreeScope::findAnchor): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::handleGeneralDelete): * editing/FrameSelection.cpp: (WebCore::scanForForm): * editing/markup.cpp: (WebCore::completeURLs): * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder): (WebCore::HTMLFieldSetElement::childrenChanged): (WebCore::HTMLFieldSetElement::legend): (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formElementIndex): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::control): * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::associatedControl): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::mapMouseEvent): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::virtualItemAfter): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::containsJavaApplet): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::recalcListItems): * html/shadow/ContentDistributor.cpp: (WebCore::ShadowRootContentDistributionData::ensureInsertionPointList): * page/FocusController.cpp: (WebCore::FocusController::findFocusCandidateInContainer): * rendering/RenderCounter.cpp: (WebCore::nextInPreOrder): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::title): * svg/SVGUseElement.cpp: (WebCore::removeDisallowedElementsFromSubtree): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::updateDocumentOrderIndexes): 2012-12-11 KyungTae Kim [soup] Unused parameter in ResourceHandleSoup.cpp https://bugs.webkit.org/show_bug.cgi?id=104728 Reviewed by Kentaro Hara. The soupLogPrinter has unused parameter 'logger', remove the parameter name to fix 'unused parameter' build warning. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::soupLogPrinter): 2012-12-11 Xianzhu Wang Fixed position out-of-view check is incorrect when page is scaled https://bugs.webkit.org/show_bug.cgi?id=104303 Reviewed by Kenneth Rohde Christiansen. Test: compositing/layer-creation/fixed-position-out-of-view-scaled.html compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Scale the content rect of the fixed position layer before checking out-of-view. 2012-12-11 Chris Rogers Implement OfflineAudioContext constructor https://bugs.webkit.org/show_bug.cgi?id=104188 Reviewed by Kentaro Hara. The Web Audio layout tests have relied on an undocumented way (in the specification) to render audio faster than realtime using an OfflineAudioContext. We want to expose a proper OfflineAudioContext object and constructor instead of piggybacking off of the normal AudioContext. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::isSampleRateRangeGood): * Modules/webaudio/AudioContext.h: (AudioContext): * Modules/webaudio/DOMWindowWebAudio.idl: * Modules/webaudio/OfflineAudioContext.cpp: Added. (WebCore): (WebCore::OfflineAudioContext::create): (WebCore::OfflineAudioContext::OfflineAudioContext): (WebCore::OfflineAudioContext::~OfflineAudioContext): * Modules/webaudio/OfflineAudioContext.h: Added. (WebCore): (OfflineAudioContext): * Modules/webaudio/OfflineAudioContext.idl: Added. * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitOfflineAudioContextEnabled): * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContextConstructor::constructJSAudioContext): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallbackCustom): 2012-12-11 Jun Jiang WebGL: Avoid unnecessary memory copy or conversion in texImage2D and texSubImage2D for HTMLVideoElement https://bugs.webkit.org/show_bug.cgi?id=102161 Reviewed by Kenneth Russell. There are several memory copy or conversions in the texImage2D and texSubImage2D for HTMLVideoElement which may be avoided. This patch removes the redundant BackingStore copy if the corresponding Graphics port supports the DontCopyBackingStore behavior. Moreover, it optimizes the AlphaOp if the Image source is from HTMLVideoElement to avoid unnecessary Unmultiply or Premultiply operation in unpack/pack. Already covered by current tests. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::texImage2DImpl): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::videoFrameToImage): add a parameter to choose BackingStore copy behavior. (WebCore::WebGLRenderingContext::texSubImage2DImpl): (WebCore::WebGLRenderingContext::texSubImage2D): * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::ImageExtractor::ImageExtractor): * platform/graphics/GraphicsContext3D.h: (ImageExtractor): (WebCore::GraphicsContext3D::ImageExtractor::imageSourceUnpackAlignment): (WebCore::GraphicsContext3D::ImageExtractor::imageHtmlDomSource): * platform/graphics/ImageBuffer.h: (ImageBuffer): * platform/graphics/cairo/GraphicsContext3DCairo.cpp: (WebCore::GraphicsContext3D::ImageExtractor::extractImage): optimize the AlphaOp for HTMLVideoElement input. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::fastCopyImageMode): (WebCore): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::fastCopyImageMode): (WebCore): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::fastCopyImageMode): (WebCore): * platform/graphics/skia/GraphicsContext3DSkia.cpp: (WebCore::GraphicsContext3D::ImageExtractor::extractImage): optimize the AlphaOp for HTMLVideoElement input. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::fastCopyImageMode): (WebCore): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::ImageBuffer::fastCopyImageMode): (WebCore): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::fastCopyImageMode): (WebCore): 2012-12-11 Viatcheslav Ostapenko [EFL] Missing implementation of GraphicsContext3DPrivate::platformLayerSize() https://bugs.webkit.org/show_bug.cgi?id=104726 Reviewed by Kenneth Rohde Christiansen. Add common implementation of GraphicsContext3DPrivate::platformLayerSize() similar to Qt version. There is nothing platform specific in Qt version. Covered by existing tests. * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (GraphicsContext3DPrivate::platformLayerSize): * platform/graphics/efl/GraphicsContext3DPrivate.h: (GraphicsContext3DPrivate): 2012-12-11 No'am Rosenthal [Texmap] Slightly improve readability of the antialias shader https://bugs.webkit.org/show_bug.cgi?id=104708 Reviewed by Martin Robinson. Modify the antialiasing shader to include separate function that perform discrete operations, rather than one big function that repeats the same operations. No new tests, readability fix. * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore::getShaderSpec): 2012-12-11 Tim Horton -webkit-svg-shadow radius changes don't cause children's boundaries to be recomputed https://bugs.webkit.org/show_bug.cgi?id=104722 Reviewed by Simon Fraser. Changes to -webkit-svg-shadow currently cause a relayout of the directly affected renderer and its parents, but not its children. However, children have the shadow radius baked into their cached boundaries, so these need to be invalidated. Test: svg/repaint/repaint-webkit-svg-shadow-container.html * rendering/RenderObject.h: Expose needsBoundariesUpdate(). * rendering/svg/RenderSVGContainer.h: Expose needsBoundariesUpdate(). * rendering/svg/RenderSVGImage.h: Expose needsBoundariesUpdate(). * rendering/svg/RenderSVGRoot.h: Expose needsBoundariesUpdate(). * rendering/svg/RenderSVGShape.h: Expose needsBoundariesUpdate(). * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::layoutChildren): If the renderer has a shadow and is in needs of a boundaries update, mark children as needing boundaries updates too. 2012-12-11 Xianzhu Wang Add window.internals.mainThreadScrollReasonsAsText for testing slow scrolling https://bugs.webkit.org/show_bug.cgi?id=104714 Reviewed by Eric Seidel. No new tests. Adds test api for bug 102543 and other bugs. * WebCore.exp.in: * page/Page.cpp: (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText): Extracted from ScrollingStateScrollingNode::dumpProperties for layout tests. (WebCore): * page/Page.h: (Page): * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText): (WebCore): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): * page/scrolling/ScrollingStateScrollingNode.cpp: (WebCore::ScrollingStateScrollingNode::dumpProperties): Moved code for mainThreadScrollingReasons to ScrollingCoordinator.cpp. * testing/Internals.cpp: (WebCore::Internals::mainThreadScrollingReasons): (WebCore): * testing/Internals.h: * testing/Internals.idl: 2012-12-11 Simon Fraser Enhance the TileCache to cache more tiles https://bugs.webkit.org/show_bug.cgi?id=104612 Reviewed by Tim Horton. Add smarts to the TileCache so that it keeps some tiles around for longer and can prepopulate tiles in to-be-scrolled-to regions. The new tile management is as follows: * As before, we expand the visible rect to create a "tile coverage rect" which is twice the width, and three times the height of the visible rect. * At the edges, this coverage rect is constrained by them, rather than being truncated as before (leading to larger initial tile coverage). * When tiles leave the coverage rect, we keep them around but track them in cohorts (where a cohort is a set of tiles that left the coverage rect at the same time). * If a repaint comes in for a "secondary" tile, we don't paint it, but mark the tile as being stale. It will get repainted (in full) if it moves back inside the coverage rect. * Cohorts are kept around for 2 seconds after they were created. A repeating 1-second timer clears tiles in old cohorts. * Secondary tiles are pruned if the visible rect changes, or if zooming happens. * TiledBacking exposes a way to prepopulate a rect with tiles; this is called when scrolling (e.g. via Home/End keys). Tiles created this way (if outside the coverage rect) go into a cohort. * page/FrameView.cpp: (WebCore::FrameView::requestScrollPositionUpdate): Tell the TiledBacking to prepopulate some tiles. * platform/graphics/TiledBacking.h: (TiledBacking): Add prepopulateRect(). * platform/graphics/ca/mac/TileCache.h: (TileInfo): The TileMap contains TileInfos, which contain a pointer to the layer, their cohort, and a 'stale content' flag. (WebCore::TileCache::TileInfo::TileInfo): (TileCache): (TileCohortInfo): (WebCore::TileCache::TileCohortInfo::TileCohortInfo): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): (WebCore::TileCache::~TileCache): (WebCore::TileCache::setNeedsDisplay): (WebCore::TileCache::setNeedsDisplayInRect): (WebCore::TileCache::setTileNeedsDisplayInRect): (WebCore::TileCache::setScale): (WebCore::TileCache::setAcceleratesDrawing): (WebCore::TileCache::setTilesOpaque): (WebCore::TileCache::prepopulateRect): (WebCore::TileCache::setTileDebugBorderWidth): (WebCore::TileCache::setTileDebugBorderColor): (WebCore::TileCache::computeTileCoverageRect): (WebCore::TileCache::tileSizeForCoverageRect): (WebCore::TileCache::tileRevalidationTimerFired): (WebCore::TileCache::blankPixelCount): (WebCore::queueTileForRemoval): (WebCore::TileCache::removeAllTiles): (WebCore::TileCache::removeAllSecondaryTiles): (WebCore::TileCache::removeTilesInCohort): (WebCore::TileCache::revalidateTiles): (WebCore::TileCache::nextTileCohort): (WebCore::TileCache::startedNewCohort): (WebCore::TileCache::newestTileCohort): (WebCore::TileCache::oldestTileCohort): (WebCore::TileCache::scheduleCohortRemoval): (WebCore::TileCache::cohortRemovalTimerFired): (WebCore::TileCache::ensureTilesForRect): (WebCore::TileCache::tileGridExtent): (WebCore::TileCache::tileCoverageRect): (WebCore::TileCache::tileLayerAtIndex): (WebCore::TileCache::drawTileMapContents): 2012-12-11 Simon Fraser Remove redundant AffineTransform in RenderSVGShape::fillAndStrokeShape() https://bugs.webkit.org/show_bug.cgi?id=104736 Reviewed by Dean Jackson. RenderSVGShape::fillAndStrokeShape() allocated a AffineTransform on the stack which was shadowed by another one in narrower scope. It can be removed. * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::fillAndStrokeShape): 2012-12-11 Seokju Kwon [EFL] Remove unused headers https://bugs.webkit.org/show_bug.cgi?id=104661 Reviewed by Ryosuke Niwa. Header inclusion cleanup. Remove "NotImplemented.h". No new tests, no behavior change. * platform/efl/CursorEfl.cpp: * platform/efl/FileSystemEfl.cpp: * platform/efl/ScrollViewEfl.cpp: * platform/efl/ScrollbarThemeEfl.cpp: * platform/efl/SoundEfl.cpp: 2012-12-11 Alec Flett IndexedDB: Stub out data operations on IDBDatabaseBackendInterface https://bugs.webkit.org/show_bug.cgi?id=104592 Reviewed by Dimitri Glazkov. In preparation for removing objectStore/index backend interfaces, stub out the basic data operations around get, put, cursors, etc. on IDBDatabaseBackendInterface. No new tests, this is just preparation for refactoring. * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::get): (WebCore): (WebCore::IDBDatabaseBackendImpl::put): (WebCore::IDBDatabaseBackendImpl::setIndexKeys): (WebCore::IDBDatabaseBackendImpl::setIndexesReady): (WebCore::IDBDatabaseBackendImpl::openCursor): (WebCore::IDBDatabaseBackendImpl::count): (WebCore::IDBDatabaseBackendImpl::deleteRange): (WebCore::IDBDatabaseBackendImpl::clear): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBDatabaseBackendInterface.h: (WebCore): (IDBDatabaseBackendInterface): 2012-12-11 Roger Fong Make Video Track compile on Windows in debug mode. https://bugs.webkit.org/show_bug.cgi?id=104720. Reviewed by Alexey Proskuryakov. urlForLogging method was defined in both HTMLMediaElement.cpp and HTMLTrackElement.cpp. On Windows all the HTMLElements sources are included in an AllInOne source file, so the definitions conflicted. Fixed by renaming the definition in each source file. * html/HTMLMediaElement.cpp: (WebCore::urlForLoggingMedia): (WebCore::HTMLMediaElement::loadResource): (WebCore::HTMLMediaElement::isSafeToLoadURL): (WebCore::HTMLMediaElement::didRemoveTrack): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::sourceWasAdded): (WebCore::HTMLMediaElement::sourceWasRemoved): * html/HTMLTrackElement.cpp: (WebCore::urlForLoggingTrack): (WebCore::HTMLTrackElement::canLoadUrl): 2012-12-11 Ryosuke Niwa Mail hangs when resizing the font size of a large RTL text https://bugs.webkit.org/show_bug.cgi?id=104643 Reviewed by Enrica Casucci. The bug was caused by ApplyStyleCommand::applyInlineStyleToNodeRange obtaining computed styles while removing and adding nodes. Fixed the slowness by breaking it into three phases: 1. Split the range into contiguous inline runs, and determine whether styles need to be removed or applied. 2. Remove any conflicting styles, and insert dummy elements at positions where inline styles ought to be computed as needed. 3. Remove the dummy elements and apply ilnine styles as needed. No new tests are added since there is no behavior change. This is just a performance improvement. * editing/ApplyStyleCommand.cpp: (WebCore::InlineRunToApplyStyle::InlineRunToApplyStyle): (WebCore::InlineRunToApplyStyle::startAndEndAreStillInDocument): (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): (WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun): (WebCore::ApplyStyleCommand::removeConflictingInlineStyleFromRun): (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): (WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange): (WebCore::ApplyStyleCommand::applyInlineStyleChange): * editing/ApplyStyleCommand.h: * editing/EditingStyle.h: (WebCore::StyleChange::StyleChange): 2012-12-11 Xianzhu Wang Incorrect position of layers for fixed position elements when page is scaled smaller than viewport https://bugs.webkit.org/show_bug.cgi?id=104294 Reviewed by James Robinson. Fixed issue in scrollOffsetForFixedPosition when contentRect is smaller than visibleContentRect. This happens when a page originally bigger than viewport is scaled down to smaller than the viewport. Test: compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html * page/scrolling/ScrollingCoordinator.cpp: (WebCore::fixedPositionScrollOffset): Moved common code in scrollOffsetForFixedPosition here. Fixed issue when contentsSize < visibleContentSize. (WebCore::scrollOffsetForFixedPosition): 2012-12-11 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=104725 Crash in EventHandler::selectCursor() on Mac bots running fast/events/mouse-cursor-image-set.html Reviewed by Tim Horton. https://bugs.webkit.org/show_bug.cgi?id=99493 enabled image-set for the CSS cursor property. Most of the change is guarded behind #if ENABLE(MOUSE_CURSOR_SCALE). However, image-set was still allowed to parse for the cursor property as long as image-set is enabled (which is the current state on the Mac). This would lead to an inconsistent state where style information would reflect a world where mouse cursor scaling is enabled even though nothing else on the Mac would. The parsing should also be guarded by the cursor scaling flag. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): 2012-12-11 Emil A Eklund Clamp out-of-range numbers in CSS https://bugs.webkit.org/show_bug.cgi?id=102735 Reviewed by Simon Fraser. Currently when a large number (outside of the supported range) is applied from a style rule or set from javascript using Element.style we check if it is within the supported range and set it to zero if it is not. This is incorrect and confusing. Change it to clamp values to the supported range. This matches the behavior in Gecko. Test: fast/css/large-numbers.html * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): Change to clamp out-of-range values instead of interpreting them as zero. 2012-12-11 Nate Chapin Ensure ResourceRequests for main resources include fragment indentifiers when necessary, regressed by r137333. https://bugs.webkit.org/show_bug.cgi?id=104721 Rubber-stamped by Dimitri Glazkov. No new tests. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): 2012-12-11 Huang Dongsung [GTK] REGRESSION(r135620): Accelerated Compositing does not draw some pages. https://bugs.webkit.org/show_bug.cgi?id=104640 Reviewed by Noam Rosenthal. After r135620, Accelerated Compositing does not draw some pages, because r135620 changes the tree-traversal behavior. Before r135620, we returned early if TextureMapperLayer can not get TextureMapper from the root layer. However, after r135620, we run the tree-traversal even if TextureMapperLayer can not get TextureMapper. This patch makes TextureMapperLayer return early like code before r135620. Covered by existing tests. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::flushCompositingState): 2012-12-11 Dan Bernstein Support ruby-position: {before, after} https://bugs.webkit.org/show_bug.cgi?id=103569 Reviewed by Anders Carlsson. Specified in , the ruby-position property takes four values: before, after, inter-character, and inline. This change adds support for the values before and after. Test: fast/ruby/position-after.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle ruby-position. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Accept before and after as valid values for ruby-position. (WebCore::isKeywordPropertyID): Added ruby-position to the list of properties with keyword values. (WebCore::CSSParser::parseValue): Added ruby-position to the switch statement. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added mapping from RubyPosition. (WebCore::CSSPrimitiveValue::operator RubyPosition): Added mapping from CSSPrimitiveValue. * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): Added ruby-position as an inherited property. * css/CSSPropertyNames.in: Added -webkit-ruby-position. * css/CSSValueKeywords.in: Added after and before. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): Added a handler for ruby-position. * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): Added ruby-position. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Changed to choose which of hasAnnotationsBefore and hasAnnotationsAfter to set based on ruby position. (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): Changed to adjust only for ruby positioned before the base. (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment): Added adjustment for ruby positioned after the base. * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::layout): Account for ruby-position when positioning the ruby text relative to the base. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): Made a ruby-position difference a layout difference. * rendering/style/RenderStyle.h: Added rubyPosition(), setRubyPosition(), and initialRubyPosition(). * rendering/style/RenderStyleConstants.h: Added the RubyPosition enum. * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): Added initialized for m_rubyPosition. Added copying the value of this member to the copy constructor. (WebCore::StyleRareInheritedData::operator==): Added comparison of m_rubyPosition. * rendering/style/StyleRareInheritedData.h: (StyleRareInheritedData): Added m_rubyPosition member variable. 2012-12-11 Michael Pruett [JSC] Add tests for explicit serialization values https://bugs.webkit.org/show_bug.cgi?id=104423 Reviewed by Oliver Hunt. Add tests for serialization and deserialization mechanisms of the JSC implementation of SerializedScriptValue. Similar tests already exist for the V8 implementation. Test: platform/jsc/fast/storage/serialized-script-value.html * WebCore.exp.in: * testing/Internals.cpp: (WebCore::Internals::serializeObject): (WebCore::Internals::deserializeBuffer): 2012-12-11 Alexis Menard Cleanup: Use consistent naming in CSSParser when dealing with the forward slash operator. https://bugs.webkit.org/show_bug.cgi?id=104699 Reviewed by Daniel Bates. http://trac.webkit.org/changeset/136525 added an helper function to check if a CSSParserValue is a forward slash operator. BorderImageParseContext is also dealing with the forward slash operator but its naming is inconsistent with isForwardSlashOperator(). This is fixed with this patch where BorderImageParseContext::{allowSlash, commitSlash}() is now replaced by BorderImageParseContext::{allowForwardSlashOperator, commitForwardSlashOperator}(). No new tests : just a renaming, covered by existing tests.. * css/CSSParser.cpp: (WebCore::CSSParser::parseFillPosition): A little fixup on the way, use isForwardSlashOperator() instead of the current code here. (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowForwardSlashOperator): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitForwardSlashOperator): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (BorderImageParseContext): (WebCore::CSSParser::parseBorderImage): 2012-12-11 Nate Chapin cr-linux valgrind is showing leaks due to r137333. Rubber-stamped by Antti Koivisto. MainResourceLoader's destructor should call m_resource->removeClient(this) is m_resource is still non-null. The missing removeClient() call will leak the CachedResource. No new tests, should shut valgrind up. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::~MainResourceLoader): 2012-12-11 Andreas Kling REGRESSION(r133492): Heap-use-after-free in WebCore::Element::normalizeAttributes Reviewed by Antti Koivisto. Don't cache the AttrNodeList* in a local when iterating over an Element's Attr nodes since that pointer may go stale if JS runs in response to a DOMSubtreeModified event below Node::normalize(). Test: fast/dom/normalize-attributes-mutation-event-crash.html * dom/Element.cpp: (WebCore::Element::normalizeAttributes): 2012-12-11 Jonathon Jongsma [GTK] Soup network logs are frequently interrupted by other logging messages https://bugs.webkit.org/show_bug.cgi?id=104668 Reviewed by Martin Robinson. Set an external soup log printer that uses the WebKit logging infrastructure so that log messages are properly synchronized. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::soupLogPrinter): (WebCore): (WebCore::ensureSessionIsInitialized): 2012-12-11 Elliott Sprehn Switch to new PseudoElement based :before and :after https://bugs.webkit.org/show_bug.cgi?id=104462 Reviewed by Antti Koivisto. Switch to the new PseudoElement based generated content implementation that moves :before and :after into the DOM. This also switches to using the ComposedShadowTreeWalker for determining the siblings of PseudoElement's making the new generated content implementation support adding :before and :after into elements. Tests: fast/css-generated-content/block-inside-inline.html fast/css-generated-content/box-orient.html * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::pseudoAwareNextSibling): (WebCore): (WebCore::ComposedShadowTreeWalker::pseudoAwarePreviousSibling): (WebCore::ComposedShadowTreeWalker::traverseParent): * dom/ComposedShadowTreeWalker.h: (ComposedShadowTreeWalker): * dom/Element.cpp: (WebCore::Element::attach): (WebCore::Element::recalcStyle): * dom/Node.cpp: * dom/Node.h: (Node): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): (WebCore::NodeRenderingContext::createRendererForElementIfNeeded): * dom/Position.cpp: (WebCore::Position::Position): (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight): * editing/visible_units.cpp: (WebCore::logicallyPreviousBox): (WebCore::logicallyNextBox): (WebCore::startPositionForLine): (WebCore::endPositionForLine): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::childShouldCreateRenderer): * page/DragController.cpp: (WebCore::DragController::draggableNode): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::splitBlocks): (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): (WebCore::RenderBlock::createReplacementRunIn): (WebCore::RenderBlock::isSelectionRoot): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderButton.cpp: * rendering/RenderButton.h: (RenderButton): * rendering/RenderInline.cpp: (WebCore::RenderInline::styleDidChange): (WebCore::RenderInline::addChildIgnoringContinuation): (WebCore::RenderInline::splitInlines): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::updateMarkerLocation): * rendering/RenderObject.cpp: (WebCore::RenderObject::createVisiblePosition): * rendering/RenderObject.h: (WebCore::RenderObject::nonPseudoNode): (RenderObject): (WebCore::RenderObject::clearNode): (WebCore::RenderObject::generatingNode): * rendering/RenderObjectChildList.cpp: * rendering/RenderObjectChildList.h: (RenderObjectChildList): * rendering/RenderRubyText.cpp: * rendering/RenderRubyText.h: (RenderRubyText): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::styleDidChange): * rendering/RenderTableRow.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::destroy): 2012-12-11 Jacky Jiang [BlackBerry] Clean up unused defaultViewportArguments in RenderThemeBlackBerry.cpp https://bugs.webkit.org/show_bug.cgi?id=104683 Reviewed by Rob Buis. * platform/blackberry/RenderThemeBlackBerry.cpp: (WebCore::determineFullScreenMultiplier): 2012-12-11 Nate Chapin Route main resource loads through the memory cache. https://bugs.webkit.org/show_bug.cgi?id=49246 Reviewed by Antti Koivisto. Note that this patch doesn't actually enable caching of main resources. That will be done in a later patch. The MainResourceLoader actually has an underlying SubresourceLoader (with the cache layer between them). In several places, the MainResourceLoader's SubresourceLoader is treated as special. No new tests, as this is primarily a refactor. A couple of expected results changed slightly. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setRequest): (WebCore::DocumentLoader::subresource): (WebCore::DocumentLoader::addSubresourceLoader): Because the SubresourceLoader underlying the main resource needs special handling in certain cases, track it separately from the real SubresourceLoaders. (WebCore::DocumentLoader::removeSubresourceLoader): (WebCore::DocumentLoader::startLoadingMainResource): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::MainResourceLoader): (WebCore::MainResourceLoader::receivedError): (WebCore::MainResourceLoader::cancel): (WebCore::MainResourceLoader::clearResource): (WebCore): (WebCore::MainResourceLoader::frameLoader): (WebCore::MainResourceLoader::request): (WebCore::MainResourceLoader::continueAfterNavigationPolicy): (WebCore::MainResourceLoader::resourceData): (WebCore::MainResourceLoader::redirectReceived): (WebCore::MainResourceLoader::willSendRequest): (WebCore::MainResourceLoader::continueAfterContentPolicy): (WebCore::MainResourceLoader::responseReceived): (WebCore::MainResourceLoader::dataReceived): (WebCore::MainResourceLoader::didFinishLoading): (WebCore::MainResourceLoader::notifyFinished): (WebCore::MainResourceLoader::reportMemoryUsage): (WebCore::MainResourceLoader::handleSubstituteDataLoadNow): (WebCore::MainResourceLoader::load): (WebCore::MainResourceLoader::setDefersLoading): (WebCore::MainResourceLoader::defersLoading): (WebCore::MainResourceLoader::setShouldBufferData): (WebCore::MainResourceLoader::loader): (WebCore::MainResourceLoader::identifier): * loader/MainResourceLoader.h: (MainResourceLoader): (WebCore::MainResourceLoader::documentLoader): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): * loader/ResourceLoader.h: (WebCore::ResourceLoader::defersLoading): (WebCore::ResourceLoader::cancelled): * loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse): (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError): * loader/mac/DocumentLoaderMac.cpp: (WebCore::DocumentLoader::schedule): (WebCore::DocumentLoader::unschedule): 2012-12-11 Aaron Colwell Update MediaSource to allow append() calls in "ended" state. https://bugs.webkit.org/show_bug.cgi?id=104581 Reviewed by Eric Carlson. Updated append and setTimestampOffset to allow appending in the "ended" readyState. An append() call in the "ended" state now triggers a transition to the "open" state and allows the append to succeed. Tests: http/tests/media/media-source/video-media-source-append-in-ended-state.html http/tests/media/media-source/video-media-source-append-with-offset-in-ended-state.html http/tests/media/media-source/video-media-source-zero-byte-append-in-ended-state.html * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::append): (WebCore::MediaSource::setTimestampOffset): 2012-12-11 Robert Hogan REGRESSION(r121789): Text not wrapping in presence of floating objects https://bugs.webkit.org/show_bug.cgi?id=101803 Reviewed by David Hyatt. When determining if a line needs to offset to avoid any floats use RenderBlock::lineHeight() to estimate the height of the line. If the container has floats stacked up with different widths that straddle the line, using a height of zero will make the first line think it has more width available than it actually does and it will end up extruding from its container. The logic for finding the offset of inline blocks and images needs to use a similar heuristic. So nextLineBreak() now updates the available width if it encounters a replaced element (e.g. inline block, image) at the start of a line, using the height of the element to decide which floats to avoid. RenderBlock::computeInlineDirectionPositionsForLine() does the same thing when laying out the line. Tests: fast/block/float/floats-offset-image-quirk-lineheight.html fast/block/float/floats-offset-image-quirk.html fast/block/float/floats-offset-image-strict-lineheight.html fast/block/float/floats-offset-image-strict.html fast/block/float/floats-offset-inline-block-quirk-lineheight.html fast/block/float/floats-offset-inline-block-strict-lineheight.html fast/block/float/floats-offset-linebox-contain-block.html fast/block/float/floats-offset-linebox-contain-inline.html fast/block/float/floats-wrap-inside-inline-006.html fast/block/float/floats-wrap-inside-inline-007.html * rendering/RenderBlockLineLayout.cpp: (LineWidth): (WebCore::logicalHeightForLine): This method needs to cope with the quirk where an image alone on a line will get its descent stripped away so ignore the height of the line and use the height of the image in that case. (WebCore::LineWidth::updateAvailableWidth): (WebCore::updateLogicalInlinePositions): (WebCore): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): (WebCore::RenderBlock::computeInlineDirectionPositionsForSegment): (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): 2012-12-11 Carlos Garcia Campos [GTK] Install GObject DOM bindings headers in its own directory https://bugs.webkit.org/show_bug.cgi?id=104663 Reviewed by Gustavo Noronha Silva. Move the headers from webkit to webkitdom directory. * bindings/gobject/GNUmakefile.am: * bindings/gobject/WebKitDOMBinding.h: * bindings/gobject/WebKitDOMCustom.h: * bindings/gobject/WebKitDOMEventTarget.h: * bindings/gobject/WebKitDOMEventTargetPrivate.h: * bindings/gobject/WebKitDOMObject.h: * bindings/scripts/CodeGeneratorGObject.pm: (Generate): (WriteData): * bindings/scripts/gobject-generate-headers.pl: * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h: * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h: * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h: * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h: * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h: * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestException.h: * bindings/scripts/test/GObject/WebKitDOMTestExceptionPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h: * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestNode.h: * bindings/scripts/test/GObject/WebKitDOMTestNodePrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h: * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructorsPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h: 2012-12-11 Mark Pilgrim [Chromium] Clean up unused interfaces in PlatformSupport https://bugs.webkit.org/show_bug.cgi?id=104674 Reviewed by Darin Fisher. Part of a refactoring series. See tracking bug 82948. Also, there were some function declarations that were supposed to be removed as part of bug 102699 but got left out of the final patch. * platform/chromium/PlatformSupport.h: (WebCore): (PlatformSupport): 2012-12-11 Joone Hur , Gustavo Noronha Silva [GTK] Update GraphicsLayerClutter https://bugs.webkit.org/show_bug.cgi?id=92045 Reviewed by Gustavo Noronha Silva. Add more methods to GraphicsLayerClutter in order to run CSS 3D transforms by using GraphicsLayerActor. No new tests. This will be covered by pixel tests for Qt and GTK+ accelerated compositing and 3D transforms. * platform/graphics/clutter/GraphicsLayerClutter.cpp: (WebCore): (WebCore::GraphicsLayerClutter::GraphicsLayerClutter): (WebCore::idleDestroy): (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter): (WebCore::GraphicsLayerClutter::setName): (WebCore::GraphicsLayerClutter::platformLayer): Returns the platform layer(ClutterAcotr). (WebCore::GraphicsLayerClutter::setNeedsDisplay): Update the display. (WebCore::GraphicsLayerClutter::setNeedsDisplayInRect): Update part of the Display. (WebCore::GraphicsLayerClutter::setAnchorPoint): (WebCore::GraphicsLayerClutter::setPosition): (WebCore::GraphicsLayerClutter::setSize): (WebCore::GraphicsLayerClutter::setTransform): (WebCore::GraphicsLayerClutter::setDrawsContent): (WebCore::GraphicsLayerClutter::setParent): (WebCore::GraphicsLayerClutter::setChildren): (WebCore::GraphicsLayerClutter::addChild): (WebCore::GraphicsLayerClutter::addChildAtIndex): (WebCore::GraphicsLayerClutter::addChildBelow): (WebCore::GraphicsLayerClutter::addChildAbove): (WebCore::GraphicsLayerClutter::replaceChild): (WebCore::GraphicsLayerClutter::removeFromParent): (WebCore::GraphicsLayerClutter::platformClutterLayerPaintContents): (WebCore::GraphicsLayerClutter::platformClutterLayerAnimationStarted): (WebCore::GraphicsLayerClutter::repaintLayerDirtyRects): (WebCore::GraphicsLayerClutter::computePositionRelativeToBase): (WebCore::GraphicsLayerClutter::flushCompositingState): Synchronize the corresponding Actors with the current compositing states of this GraphicsLayer and its child layers. (WebCore::GraphicsLayerClutter::recursiveCommitChanges): (WebCore::GraphicsLayerClutter::flushCompositingStateForThisLayerOnly): Commit batched changes non-recursively. (WebCore::GraphicsLayerClutter::commitLayerChangesAfterSublayers): Reset layer changes after we recurse on children. (WebCore::GraphicsLayerClutter::noteSublayersChanged): (WebCore::GraphicsLayerClutter::noteLayerPropertyChanged): (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers): Commit layer changes before we recurse on children. (WebCore::GraphicsLayerClutter::updateGeometry): Updated the position and size of the Actor. (WebCore::GraphicsLayerClutter::updateSublayerList): Updated the list of child Actors. (WebCore::GraphicsLayerClutter::updateLayerNames): (WebCore::GraphicsLayerClutter::updateTransform): (WebCore::GraphicsLayerClutter::updateLayerDrawsContent): (WebCore::GraphicsLayerClutter::layerForSuperlayer): * platform/graphics/clutter/GraphicsLayerClutter.h: (WebCore): (WebCore::GraphicsLayerClutter::primaryLayer): (GraphicsLayerClutter): 2012-12-11 Jessie Berlin Revert incorrect build fix. * WebCore.exp.in: 2012-12-11 Jessie Berlin Fix the Mac build after r137261 * WebCore.exp.in: 2012-12-11 Joone Hur , Gustavo Noronha Silva [GTK] Add GraphicsLayerActor https://bugs.webkit.org/show_bug.cgi?id=91940 Reviewed by Gustavo Noronha Silva. GraphicsLayerActor, which is a new ClutterActor, represents a node in the GPU-renderable layer tree when accelerated compositing is enabled with Clutter as acceleration backend. This patch allows to support basic features of CSS 3D Transforms. No new tests. This will be covered by pixel tests for Qt and GTK+ accelerated compositing and 3D transforms. * GNUmakefile.list.am: * platform/graphics/clutter/GraphicsLayerActor.cpp: Added. (_GraphicsLayerActorPrivate): (graphics_layer_actor_class_init): GObject configuration of a new Clutter Actor. (graphics_layer_actor_init): Initialization of the private data of this actor. (graphicsLayerActorSetProperty): GObject property setter. (graphicsLayerActorGetProperty): GObject property getter. (graphicsLayerActorDispose): Called to drop all references to other objects. (graphicsLayerActorAllocate): Called to set the coordinates of an actor. (graphicsLayerActorApplyTransform): Applying the transformation to an actor before painting it. (graphicsLayerActorPaint): Called to paint the actor. (graphicsLayerActorDraw): Called each time a ClutterCairoTexture has been invalidated. (graphicsLayerActorAdded): Called each time an actor has been added to container. (graphicsLayerActorRemoved): Called each time an actor is removed from container. (graphicsLayerActorNew): Create a specific layer type of GraphicsLayerActor object. (graphicsLayerActorNewWithClient): Create a specific layer type of GraphicsLayerActor object with its PlatformClutterClientLayer. (graphicsLayerActorSetClient): Added setter to set the PlatformClutterClientLayer. (graphicsLayerActorGetClient): Added getter to get the PlatformClutterClientLayer. (graphicsLayerActorRemoveAll): Remove all child actors. (graphicsLayerUpdateTexture): Create a ClutterCairoTexture. (graphicsLayerActorGetSurface): Added setter to set a cairo_surface_t. (graphicsLayerActorSetSurface): Added getter to get the cairo_surface_t. (graphicsLayerActorInvalidateRectangle): (graphicsLayerActorSetTransform): Set a CoglMatrix to apply matrix transform. (graphicsLayerActorSetAnchorPoint): (graphicsLayerActorGetAnchorPoint): (graphicsLayerActorSetScrollPosition): (graphicsLayerActorGetnChildren): (graphicsLayerActorReplaceSublayer): (graphicsLayerActorInsertSublayer): (graphicsLayerActorSetSublayers): (graphicsLayerActorGetLayerType): (graphicsLayerActorSetLayerType): (graphicsLayerActorSetTranslateX): (graphicsLayerActorGetTranslateX): (graphicsLayerActorSetTranslateY): (graphicsLayerActorGetTranslateY): (graphicsLayerActorSetDrawsContent): Added setter to paint content inside a layer. (graphicsLayerActorGetDrawsContent): Added getter to get the value of the drawsContent. * platform/graphics/clutter/GraphicsLayerActor.h: Added. (_GraphicsLayerActor): (_GraphicsLayerActorClass): * platform/graphics/clutter/GraphicsLayerClutter.h: (WebCore): 2012-12-11 Mike West Web Inspector: ConsoleTypes should not expose MessageType - it should be private to inspector. https://bugs.webkit.org/show_bug.cgi?id=66371 Reviewed by Pavel Feldman. We can simplify console message generation a bit, as nothing outside the Console object itself will generate messages of any type other than LogMessageType. This patch refactors the externally-facing API endpoints on ScriptExecutionContext and Console to drop the MessageType parameter, moves the MessageType enum into a new InspectorConsoleTypes.h header, and updates all the call sites (and ChromeClients) to drop the parameter from their interfaces. As a temporary bandage for ports using this interface, this patch includes aliases for the new methods that retain the old interface. I'll remove them in a future patch. Here, we only refactor an internal interface. No tests should break. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: We added a new file! OMG! * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::looping): (WebCore::AudioBufferSourceNode::setLooping): * Modules/webdatabase/AbstractDatabase.cpp: (WebCore::AbstractDatabase::logErrorMessage): * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::connect): (WebCore::WebSocket::send): (WebCore::WebSocket::close): (WebCore::WebSocket::setBinaryType): * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::fail): (WebCore::WebSocketChannel::didFailSocketStream): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): * css/MediaList.cpp: (WebCore::addResolutionWarningMessageToConsole): * dom/Document.cpp: (WebCore::Document::logExceptionToConsole): (WebCore::Document::processHttpEquiv): (WebCore::Document::addMessage): * dom/Document.h: (Document): * dom/ScriptElement.cpp: (WebCore::ScriptElement::notifyFinished): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask): (WebCore::ScriptExecutionContext::addConsoleMessage): * dom/ScriptExecutionContext.h: (ScriptExecutionContext): (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create): (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask): * dom/ViewportArguments.cpp: (WebCore::reportViewportWarning): * fileapi/WebKitBlobBuilder.cpp: (WebCore::BlobBuilder::append): * html/HTMLFormControlElement.cpp: (WebCore::shouldAutofocus): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::validateInteractively): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::parseAttribute): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::canLoadUrl): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::getImageData): * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::printWarningToConsole): * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::init): (WebCore::XSSAuditor::filterToken): * inspector/ConsoleAPITypes.h: Added. (WebCore): * inspector/ConsoleMessage.h: * inspector/InspectorConsoleAgent.h: * inspector/InspectorDebuggerAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore): * inspector/InspectorInstrumentation.h: * inspector/InspectorProfilerAgent.cpp: * loader/EmptyClients.h: (WebCore::EmptyChromeClient::addMessageToConsole): * loader/FrameLoader.cpp: (WebCore::FrameLoader::reportLocalLoadFailed): (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions): * loader/ImageLoader.cpp: (WebCore::ImageLoader::notifyFinished): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didReceiveResponse): * loader/MixedContentChecker.cpp: (WebCore::MixedContentChecker::logWarning): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::corsPolicyPreventedLoad): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::abort): (WebCore::ApplicationCacheGroup::didReceiveResponse): (WebCore::ApplicationCacheGroup::didFinishLoading): (WebCore::ApplicationCacheGroup::didFail): (WebCore::ApplicationCacheGroup::didReceiveManifestResponse): (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::printAccessDeniedMessage): * page/ChromeClient.h: (ChromeClient): Drop LogMessageType from everywhere. * page/Console.cpp: (WebCore::Console::addMessage): (WebCore::internalAddMessage): (WebCore::Console::error): (WebCore::Console::log): (WebCore::Console::warn): (WebCore::Console::dir): (WebCore::Console::dirxml): (WebCore::Console::clear): (WebCore::Console::trace): (WebCore::Console::assertCondition): * page/Console.h: (Console): Create a new internalAddMessage that's used for the various Console message types. Everything else routes through ::addMessage. * page/ConsoleTypes.h: Drop MessageTypes from this file, add it to ConsoleAPIType.h * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::logToConsole): * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck): (WebCore::DOMWindow::printErrorMessage): * page/EventSource.cpp: (WebCore::EventSource::didReceiveResponse): * svg/SVGDocumentExtensions.cpp: (WebCore::reportMessage): * workers/DefaultSharedWorkerRepository.cpp: (SharedWorkerProxy): (WebCore::postConsoleMessageTask): (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject): * workers/SharedWorkerContext.cpp: (WebCore::SharedWorkerContext::logExceptionToConsole): * workers/WorkerContext.cpp: (WebCore::WorkerContext::addMessage): (WebCore::WorkerContext::addMessageToWorkerConsole): * workers/WorkerContext.h: (WorkerContext): * workers/WorkerMessagingProxy.cpp: (WebCore::postConsoleMessageTask): (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): * workers/WorkerMessagingProxy.h: (WorkerMessagingProxy): * workers/WorkerReportingProxy.h: (WorkerReportingProxy): * xml/XMLHttpRequest.cpp: (WebCore::logConsoleError): (WebCore::XMLHttpRequest::send): * xml/XSLTProcessorLibxslt.cpp: (WebCore::XSLTProcessor::parseErrorFunc): * xml/XSLTProcessorQt.cpp: (WebCore::XSLTMessageHandler::handleMessage): Drop LogMessageType from everywhere. 2012-12-11 Simon Hausmann [Qt] Unreviewed, rolling out r137313 and r137316 because they broke the system-sqlite build. * WebCore.pri: 2012-12-11 Simon Hausmann Unreviewed Qt build fix: Don't error out if SQLITE3SRCDIR isn't set but we have a system sqlite to use. * WebCore.pri: 2012-12-11 Oswald Buddenhagen [Qt] make qtbase source requirement explicit Reviewed by Simon Hausmann. getting rid of QT..sources references, as they don't go well with real modularization. * WebCore.pri: 2012-12-11 Oswald Buddenhagen [Qt] move SQLITE3SRCDIR assignment to only use site Reviewed by Simon Hausmann. Target.pri includes WebCore.pri the almost first thing, so that is covered as well. * WebCore.pri: 2012-12-11 Eugene Klyuchnikov Web Inspector: Timeline: rename "Parse" to "Parse HTML". https://bugs.webkit.org/show_bug.cgi?id=104639 Reviewed by Yury Semikhatsky. "Parse" sounds ambiguous, it could mean JSON.parse() or Date.parse(). "Parse HTML" is a much more clear record description. * inspector/front-end/TimelinePresentationModel.js: Fix text. 2012-12-11 Oswald Buddenhagen [Qt] change setup of QMAKE_MOC Reviewed by Simon Hausmann. don't load(moc) explicitly - turns out that this breaks debug_and_release builds (the feature does not like being loaded before default_post has been loaded). so instead just do a minimal call to find the moc executable. as it's in fact only two files which need it, so de-centralize this call for the sake of saving some cpu cycles spent in qmake. * DerivedSources.pri: 2012-12-11 Alexander Pavlov REGRESSION(r136948): inspector/styles/import-pseudoclass-crash.html hits an assertion https://bugs.webkit.org/show_bug.cgi?id=104473 Reviewed by Vsevolod Vlasov. Avoid building full CSSOM wrappers up front during rule matching. Instead, move this code down to the point where these wrappers are actually needed. * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::willMatchRule): (WebCore::InspectorCSSAgent::willProcessRule): * inspector/InspectorCSSAgent.h: (WebCore): (InspectorCSSAgent): * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::willMatchRuleImpl): (WebCore::InspectorInstrumentation::willProcessRuleImpl): 2012-12-11 Jesus Sanchez-Palencia [GStreamer] Avoid linking to GStreamer video libraries if only using ENABLE_AUDIO https://bugs.webkit.org/show_bug.cgi?id=104590 Reviewed by Philippe Normand. Make getVideoSizeAndFormatFromCaps() only available when ENABLE_VIDEO is set. No new tests, no change in behavior. * platform/graphics/gstreamer/GStreamerVersioning.cpp: * platform/graphics/gstreamer/GStreamerVersioning.h: 2012-12-11 Zeno Albisser [Qt][Mac] Fix transparency for WebGL content. https://bugs.webkit.org/show_bug.cgi?id=104659 When drawing a texture to the TextureMapper the flag SupportsBlending must be passed in order to allow for transparent webgl content. We are doing this for GLX already, but the flag was still missing in GraphicsSurfaceMac. Reviewed by Kenneth Rohde Christiansen. * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: (WebCore::GraphicsSurface::platformPaintToTextureMapper): 2012-12-11 Alexander Pavlov Web Inspector: Duplicate emulated touch events in iframe https://bugs.webkit.org/show_bug.cgi?id=104653 Reviewed by Vsevolod Vlasov. Synthetic touch events should be dispatched only on the frame containing its target, not on its ancestor frames, up to the top frame. * page/EventHandler.cpp: (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): Do not dispatch a synthetic touch event on the current frame if its target is in a subframe. 2012-12-11 Kondapally Kalyan [EFL][WebGL] Regression(r137211) WebGL is broken with NVIDIA Drivers. https://bugs.webkit.org/show_bug.cgi?id=104652. Reviewed by Kenneth Rohde Christiansen. Reverting some of the changes from r137211, as it causes regressions on NVIDIA drivers. * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (GraphicsContext3DPrivate::copyToGraphicsSurface): * platform/graphics/opengl/GLPlatformSurface.cpp: (WebCore::GLPlatformSurface::updateContents): * platform/graphics/opengl/GLPlatformSurface.h: (GLPlatformSurface): 2012-12-11 Pavel Feldman Web Inspector: follow up to r136974: do not process shortcuts while editing https://bugs.webkit.org/show_bug.cgi?id=104440 Reviewed by Alexander Pavlov. Currently, typing H while editing node results in corresponding shortcut processing. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline): (WebInspector.ElementsTreeOutline.prototype.handleShortcut): (WebInspector.ElementsTreeElement.prototype.onenter): (WebInspector.ElementsTreeElement.prototype._startEditingAttribute): (WebInspector.ElementsTreeElement.prototype.dispose): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML): (WebInspector.ElementsTreeElement.prototype._editingCancelled): 2012-12-11 Ken Kania [Inspector] Add command for dispatching mouse events. https://bugs.webkit.org/show_bug.cgi?id=104074 Reviewed by Yury Semikhatsky. Platform mouse event coordinates are relative to the containing window, but the inspector command assumes they follow standard web coordinates, where the origin is at the top left of the page and y increases as you go down. We convert the coordinates to the window before constructing the event. This also fixes the fact that some platforms have flipped coordinate systems. Also, update dispatchKeyEvent test to follow simpler dispatchMouseEvent test. Test: inspector-protocol/input/dispatchMouseEvent.html * inspector/Inspector.json: * inspector/InspectorInputAgent.cpp: (WebCore::InspectorInputAgent::dispatchMouseEvent): (WebCore): * inspector/InspectorInputAgent.h: (InspectorInputAgent): 2012-12-11 Pavel Feldman Not reviewed: follow up to r137283: reduce inspector toolbar spacing 1px. * inspector/front-end/inspector.css: (body.dock-to-bottom:not(.show-toolbar-icons) .toolbar-item.toggleable): (body.dock-to-bottom:not(.show-toolbar-icons) .toolbar-item.toggleable.toggled-on): 2012-12-11 Kent Tamura Refactoring: Rename Element::shouldMatchReadOnlySelector and shouldMatchReadWriteSelector https://bugs.webkit.org/show_bug.cgi?id=104651 Reviewed by Kentaro Hara. ':read-only' and ':read-write' are pseudo classes. They are not selectors in the context of these functions. This patch rename them so that they contain 'pseudo class,' and make them match to an existing function, matchesFocusPseudoClass. No new tests. This shouldn't make behavior changes. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): * dom/Element.cpp: (WebCore::Element::recalcStyle): (WebCore::Element::matchesReadOnlyPseudoClass): (WebCore::Element::matchesReadWritePseudoClass): * dom/Element.h: (Element): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::matchesReadOnlyPseudoClass): (WebCore::HTMLInputElement::matchesReadWritePseudoClass): * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass): (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass): * html/HTMLTextAreaElement.h: (HTMLTextAreaElement): * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass): (WebCore::SliderThumbElement::matchesReadWritePseudoClass): * html/shadow/SliderThumbElement.h: (SliderThumbElement): * html/shadow/SpinButtonElement.cpp: (WebCore::SpinButtonElement::matchesReadOnlyPseudoClass): (WebCore::SpinButtonElement::matchesReadWritePseudoClass): * html/shadow/SpinButtonElement.h: (SpinButtonElement): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isReadOnlyControl): 2012-12-11 Pavel Feldman Web Inspector: add more horizontal spacing for toolbar items in docked to bottom mode https://bugs.webkit.org/show_bug.cgi?id=104655 Reviewed by Alexander Pavlov. Drive-by increase height to 26px. * inspector/front-end/inspector.css: (#toolbar): (body:not(.show-toolbar-icons) .toolbar-item): (body.dock-to-bottom:not(.show-toolbar-icons) .toolbar-item.toggleable): (body.dock-to-bottom:not(.show-toolbar-icons) .toolbar-item.toggleable.toggled-on): (body.show-toolbar-icons.dock-to-bottom .toolbar-item.toggleable): (#toolbar-dropdown-arrow): (#main): 2012-12-11 Keishi Hattori Use histogram enumeration in Calendar Picker so we can get stats on UI usage https://bugs.webkit.org/show_bug.cgi?id=104646 Reviewed by Kent Tamura. Use histogram support to get stats on the calendar picker so we can improve the UI. No new tests. * Resources/pagepopups/calendarPicker.js: (CalendarPicker): (CalendarPicker.prototype.recordAction): Records action to histogram. (CalendarPicker.prototype.handleToday): Record action. (CalendarPicker.prototype.handleClear): Ditto. (YearMonthController.prototype._showPopup): Ditto. (YearMonthController.prototype._handleYearMonthChange): Ditto. (YearMonthController.prototype._handleButtonClick): Ditto. (DaysTable.prototype._handleDayClick): Ditto. * page/PagePopupController.cpp: (WebCore::PagePopupController::histogramEnumeration): (WebCore): * page/PagePopupController.h: (PagePopupController): * page/PagePopupController.idl: Added histogramEnumeration. 2012-12-11 Hajime Morrita IsActiveFlag, IsHoverFlag, InActiveChainFlag can be unified. https://bugs.webkit.org/show_bug.cgi?id=103697 Reviewed by Ryosuke Niwa. To save two more NodeFlags bits, this patch inroduces UserActionElementSet to get IsLinkFlag, IsHoverFlag, InActiveChainFlag together. These three old flags are replaced by UserActionElementSet::ElementFlags and UserActionElementSet collection which tracks elements which are flagged with one of a ElementFlags. When marking an element as active for example, WebKit sets UserActionElementSet::IsActiveFlag to the element and store it into corresponding element set of the document. This set maintains marked elements and corresponding flags for each elements. UserActionElementSet can be seen as a yet another rare data for these flags. However, the following characteristics of these flags make adding a new data structure on Document an attractive alternative: - UserActionElementSet is maintained for each Document instead of a global collecton. This fits element lifetime better. - The number of elements which have these flags is generally small, and a group of elements for each flag is largely overlapped due to its nature. This property keeps the set small, and lets flag retrieval efficient. On majority of the elements, all these flags are false thus the check is done by just checking IsInUserActionFlag. As a bonus, isFocused flag, which was on NodeRareData, is also moved to this model. No new tests, covered by existing test. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/Document.cpp: (WebCore::Document::removedLastRef): (WebCore::Document::updateHoverActiveState): * dom/Document.h: (WebCore::Document::userActionElements): Added. (Document): * dom/Node.cpp: (WebCore::Node::detach): * dom/Node.h: (WebCore): (WebCore::Node::isUserActionElement): Added. (WebCore::Node::setUserActionElement): Added. (Node): (WebCore::Node::active): Switched to UserActionElementSet. (WebCore::Node::inActiveChain): Switched to UserActionElementSet. (WebCore::Node::hovered): Switched to UserActionElementSet. (WebCore::Node::focused): Switched to UserActionElementSet. (WebCore::Node::setFocus): Switched to UserActionElementSet. (WebCore::Node::setActive): Switched to UserActionElementSet. (WebCore::Node::setHovered): Switched to UserActionElementSet. * dom/NodeRareData.h: (WebCore::NodeRareData::NodeRareData): (NodeRareData): * dom/UserActionElementSet.cpp: Added. (WebCore): (WebCore::UserActionElementSet::instanceFor): (WebCore::UserActionElementSet::UserActionElementSet): (WebCore::UserActionElementSet::~UserActionElementSet): (WebCore::UserActionElementSet::didDetach): (WebCore::UserActionElementSet::documentDidRemoveLastRef): (WebCore::UserActionElementSet::hasFlags): (WebCore::UserActionElementSet::setFlags): (WebCore::UserActionElementSet::clearFlags): * dom/UserActionElementSet.h: Added. (WebCore): (UserActionElementSet): (WebCore::UserActionElementSet::create): (WebCore::UserActionElementSet::isFocused): (WebCore::UserActionElementSet::setFocused): (WebCore::UserActionElementSet::isActive): (WebCore::UserActionElementSet::setActive): (WebCore::UserActionElementSet::isInActiveChain): (WebCore::UserActionElementSet::setInActiveChain): (WebCore::UserActionElementSet::isHovered): (WebCore::UserActionElementSet::setHovered): (WebCore::UserActionElementSet::setFlags): 2012-12-11 Kent Tamura INPUT_MULTIPLE_FIELDS_UI: Disable focus navigation by right/left keys in RTL locales https://bugs.webkit.org/show_bug.cgi?id=104644 Reviewed by Hajime Morita. Pressing the left key should focus on the field at the left of the current focused field, and pressing the right key should focus on the field at the right of the current focused field. This works well in LTR locales. In RTL locale, the current code doesn't work. We disable this behavior for RTL locales for now. This issue will be handled in Bug 104650. No new tests. Update some *-multiple-fields tests for new behavior. * html/shadow/DateTimeFieldElement.cpp: (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): If this sub-field is in an RTL locale, we don't change focus. (WebCore::DateTimeFieldElement::localeForOwner): Moved from DateTimeNumericFieldElement. * html/shadow/DateTimeFieldElement.h: (DateTimeFieldElement): Remove isRTL, add localeForOwner. * html/shadow/DateTimeNumericFieldElement.cpp: Remove localeForOwner. * html/shadow/DateTimeNumericFieldElement.h: (DateTimeNumericFieldElement): Ditto. 2012-12-11 Pavel Podivilov Remove pango files deleted at r137263 form WebCore.gypi. Unreviewed, gardening. * WebCore.gypi: 2012-12-11 Zan Dobersek [GTK] Feature enabling/disabling should be possible through build-webkit https://bugs.webkit.org/show_bug.cgi?id=99271 Reviewed by Gustavo Noronha Silva. Move the contents of GNUmakefile.features.am into GNUmakefile.features.am.in. The former is then copied from the latter but then appropriately modified if the build-webkit script overrides any of the default feature defines. No new tests - no new testable functionality. * GNUmakefile.features.am.in: Renamed from Source/WebCore/GNUmakefile.features.am. 2012-12-11 Jinwoo Song [QT][EFL][WK2] Move the GraphicsSurfaceGLX.cpp to common place https://bugs.webkit.org/show_bug.cgi?id=104433 Reviewed by Kenneth Rohde Christiansen. QT and EFL are commonly using the GraphicsSurfaceGLX.cpp and it looks better to move this file to /glx directory. * PlatformEfl.cmake: * Target.pri: * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp. (WebCore): (OffScreenRootWindow): (WebCore::OffScreenRootWindow::OffScreenRootWindow): (WebCore::OffScreenRootWindow::getXWindow): (WebCore::OffScreenRootWindow::display): (WebCore::OffScreenRootWindow::~OffScreenRootWindow): (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate): (GraphicsSurfacePrivate): (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate): (WebCore::GraphicsSurfacePrivate::createSurface): (WebCore::GraphicsSurfacePrivate::createPixmap): (WebCore::GraphicsSurfacePrivate::textureIsYInverted): (WebCore::GraphicsSurfacePrivate::makeCurrent): (WebCore::GraphicsSurfacePrivate::doneCurrent): (WebCore::GraphicsSurfacePrivate::swapBuffers): (WebCore::GraphicsSurfacePrivate::copyFromTexture): (WebCore::GraphicsSurfacePrivate::display): (WebCore::GraphicsSurfacePrivate::glxPixmap): (WebCore::GraphicsSurfacePrivate::size): (WebCore::resolveGLMethods): (WebCore::GraphicsSurface::platformExport): (WebCore::GraphicsSurface::platformGetTextureID): (WebCore::GraphicsSurface::platformCopyToGLTexture): (WebCore::GraphicsSurface::platformCopyFromTexture): (WebCore::GraphicsSurface::platformPaintToTextureMapper): (WebCore::GraphicsSurface::platformFrontBuffer): (WebCore::GraphicsSurface::platformSwapBuffers): (WebCore::GraphicsSurface::platformSize): (WebCore::GraphicsSurface::platformCreate): (WebCore::GraphicsSurface::platformImport): (WebCore::GraphicsSurface::platformLock): (WebCore::GraphicsSurface::platformUnlock): (WebCore::GraphicsSurface::platformDestroy): (WebCore::GraphicsSurface::platformBeginPaint): (WebCore::GraphicsSurface::createReadOnlyImage): 2012-12-11 Mike West Web Inspector: Evaluate private browsing mode's effect on console messages. https://bugs.webkit.org/show_bug.cgi?id=104383 Reviewed by Pavel Feldman. Two sets of console messages are currently gated on private browsing mode being inactive. This patch centralizes the private browsing checks in order to apply them equally to all console messages, and changes the granularity at which they act. The current checks block the console messages entirely. This patch blocks only notifications to ChromeClient and ensures that messages won't be passed to printf where they might end up in system logs. Notifications to InspectorInstrumentation seem safe; so far as I can tell, there's no compelling reason to prevent console-based debugging in private browsing mode. This patch excludes those calls from the private browsing check. Test: inspector/console/clients-ignored-in-privatebrowsing.html * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::printAccessDeniedMessage): Drop the private browsing check. * page/Console.cpp: (WebCore::Console::addMessage): Add private browsing checks to the two ::addMessage variants that do real work. Ensure that calls to printf and notifications to ChromeClients are gated on these checks, but always allow notifications to InspectorInstrumentation. * page/DOMWindow.cpp: (WebCore::DOMWindow::printErrorMessage): Drop the private browsing check. 2012-12-10 Dan Winship [Soup] Fix spelling of "initiating" in API. Reviewed by Martin Robinson. No new tests (just internal renaming). * platform/network/ResourceHandle.h: (ResourceHandle): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore): (WebCore::setSoupRequestInitiatingPageIDFromNetworkingContext): (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::getSoupRequestInitiatingPageID): 2012-12-10 Martin Robinson [GTK] Remove the Pango backend https://bugs.webkit.org/show_bug.cgi?id=104569 Reviewed by Daniel Bates. Remove the Pango backend entirely. The EFL build has no support for it and it's not really maintained enough for the GTK+ port, now that HarfbuzzNG shapes complex text when Freetype is the active text rendering backend. No new tests. This does not change behavior. * GNUmakefile.am: Remove Pango backend options and move Freetype options to the common list. * GNUmakefile.list.am: Ditto. * platform/graphics/FontPlatformData.h: * platform/graphics/pango/FontCachePango.cpp: Removed. * platform/graphics/pango/FontCustomPlatformDataPango.cpp: Removed. * platform/graphics/pango/FontPango.cpp: Removed. * platform/graphics/pango/FontPlatformData.h: Removed. * platform/graphics/pango/FontPlatformDataPango.cpp: Removed. * platform/graphics/pango/GlyphPageTreeNodePango.cpp: Removed. * platform/graphics/pango/PangoUtilities.cpp: Removed. * platform/graphics/pango/PangoUtilities.h: Removed. * platform/graphics/pango/SimpleFontDataPango.cpp: Removed. 2012-12-11 Andrey Adaikin Web Inspector: [WebGL] prevent GC from collecting WebGLObject instances currently bound to the context state https://bugs.webkit.org/show_bug.cgi?id=104119 Reviewed by Pavel Feldman. This is to prevent GC from collecting resources bound to a context (WebGL or 2D). Otherwise, for example in WebGL, subsequent calls to gl.getParameter() may return a recently created instance that is no longer bound to a Resource object (thus, no history to replay it later). * inspector/InjectedScriptCanvasModuleSource.js: (.): 2012-12-11 Zan Dobersek Unreviewed build fix after r137243. * bindings/gobject/GNUmakefile.am: 2012-12-10 No'am Rosenthal REGRESSION (r137006): CSS clip on solid color composited div broken https://bugs.webkit.org/show_bug.cgi?id=104604 Reviewed by Simon Fraser. Disable direct compositing of background color for clipping layers. Test: compositing/geometry/clip-inside.html * rendering/RenderLayerBacking.cpp: (WebCore::supportsDirectBoxDecorationsComposition): Never allow direct background composition if there is a clip. 2012-12-10 Simon Fraser REGRESSION (r137215): WebKit stretches and shrinks a part of screen on scroll https://bugs.webkit.org/show_bug.cgi?id=104626 Reviewed by Beth Dakin. r137215 removed a compositing layer repaint on size changes. However, there are cases where the compositing code constrains layer size by clipping with the viewport and a clipping ancestor. When that happens, we must invalidate the layer on a size change to avoid showing stretched or shrunken content. Test: compositing/repaint/clipped-layer-size-change.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::RenderLayerBacking::updateCompositedBounds): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): * rendering/RenderLayerBacking.h: (RenderLayerBacking): 2012-12-10 Dean Jackson Remove old WebKit Animation API code https://bugs.webkit.org/show_bug.cgi?id=104611 Reviewed by Simon Fraser. Remove the existing, unused animation API code. We'll look into implementing the W3C Animation API if/when it is stable. * CMakeLists.txt: Remove WebKitAnimation and WebKitAnimationList classes. * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * UseV8.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: Remove includes. * bindings/js/JSWebKitAnimationCustom.cpp: Removed. * bindings/js/JSWebKitAnimationListCustom.cpp: Removed. * dom/Element.cpp: Remove API. * dom/Element.h: Ditto. * dom/Element.idl: Ditto. * page/DOMWindow.idl: Ditto. * page/WebKitAnimation.cpp: Removed. * page/WebKitAnimation.h: Removed. * page/WebKitAnimation.idl: Removed. * page/WebKitAnimationList.cpp: Removed. * page/WebKitAnimationList.h: Removed. * page/WebKitAnimationList.idl: Removed. * page/animation/AnimationController.cpp: Remove API. * page/animation/AnimationController.h: Ditto. * page/animation/AnimationControllerPrivate.h: Ditto. * page/animation/CompositeAnimation.cpp: Ditto. * page/animation/CompositeAnimation.h: Ditto. 2012-12-10 Jessie Berlin Fix the Mac build after r137233 * html/shadow/HTMLShadowElement.h: Remove a declaration of a member variable that was moved to the InsertionPoint superclass. 2012-12-10 KyungTae Kim Build fix after r137221 https://bugs.webkit.org/show_bug.cgi?id=104617 Unreviewed build fix * html/HTMLPropertiesCollection.cpp: (WebCore::nextNodeWithProperty): 2012-12-10 Hajime Morrita [Shadow DOM][Refactoring] HTMLContentElement,HTMLShadowElement::m_registeredWithShadowRoot should be moved to InsertionPoint https://bugs.webkit.org/show_bug.cgi?id=104516 Reviewed by Dimitri Glazkov. This change pulls duplicated code in removedFrom() and insertedInto() of both both HTMLShadowElement and HTMLContentElement to their super class InsertionPoint. This is a part of effor that encapsulate node distribution algorithm to ContentDistributor and its family. No new tests, no behavior change. * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::registerInsertionPoint): Added. (WebCore::ShadowRoot::unregisterInsertionPoint): Added. * dom/ShadowRoot.h: (ShadowRoot): * html/shadow/ContentDistributor.cpp: (WebCore::ShadowRootContentDistributionData::regiterInsertionPoint): Generalized two methods for and . (WebCore): (WebCore::ShadowRootContentDistributionData::unregisterInsertionPoint): Ditto. * html/shadow/ContentDistributor.h: (ShadowRootContentDistributionData): * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::HTMLContentElement): * html/shadow/HTMLContentElement.h: * html/shadow/HTMLShadowElement.cpp: (WebCore::HTMLShadowElement::HTMLShadowElement): * html/shadow/HTMLShadowElement.h: * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::InsertionPoint): (WebCore::InsertionPoint::insertedInto): Pulled up from subclasses (WebCore::InsertionPoint::removedFrom): Pulled up from subclasses * html/shadow/InsertionPoint.h: (InsertionPoint): 2012-12-10 Jon Lee Keep track of plug-in snapshots clicked by user https://bugs.webkit.org/show_bug.cgi?id=103206 Reviewed by Anders Carlsson. * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initially the hash is unknown. Set to 0. Move the check for whether to snapshot the plugin into the new function subframeLoaderWillLoadPlugIn. (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Rename setPendingClickEvent to userDidClickSnapshot. In addition to holding onto the click event used to activate the plug-in, the function now also tells the plug-in client to add the origin hash as an auto-start origin. (WebCore::HTMLPlugInImageElement::subframeLoaderWillLoadPlugIn): Calculate the hash based on the provided URL, which is the URL the plug-in will load. Extend the check that used to be in the constructor to see if the plug-in should not automatically load, including checking the plug-in size and whether the hash is an auto-start origin. * html/HTMLPlugInImageElement.h: Rename setPendingClickEvent to userDidClickSnapshot and add a variable for the origin hash. * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::requestPlugin): When the loader is about to load the plug-in, pass the URL to the element, so that it can calculate the hash. * page/Page.cpp: (WebCore::Page::Page): Take the plugInClient from the page clients. (WebCore::Page::~Page): If the client exists, tell it that the page is being destroyed. (WebCore::Page::PageClients::PageClients): Initialize this optional client to null. * page/Page.h: Add PlugInClient to page clients. (PageClients): Add PlugInClient variable. (WebCore::Page::plugInClient): * page/PlugInClient.h: Added. * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::handleEvent): Call the renamed function userDidClickSnapshot(). (WebCore::RenderSnapshottedPlugIn::layout): Move the check of the plug-in size to subframeLoaderWillLoadPlugIn. Add PlugInClient.h. * GNUmakefile.list.am: * Target.pri: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2012-12-10 Antti Koivisto Not reviewed. Build fix. * html/HTMLPropertiesCollection.cpp: (WebCore::nextNodeWithProperty): * page/TouchDisambiguation.cpp: (WebCore::boundingBoxForEventNodes): 2012-12-10 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=104602 DidHitRelevantRepaintedObjectsAreaThreshold LayoutMilestone fires too early on some pages with iframes Reviewed by Simon Fraser. This change makes it so that any RenderObjects inside iframes are not considered relevant. * page/Page.cpp: (WebCore::Page::addRelevantRepaintedObject): 2012-12-10 David Grogan IndexedDB: Propagate more leveldb errors to script https://bugs.webkit.org/show_bug.cgi?id=104422 Reviewed by Tony Chang. These are the last places that ignore leveldb errors that can get the usual ok/found treatment. Nothing called getBool, so it is deleted. * Modules/indexeddb/IDBBackingStore.cpp: (WebCore): (WebCore::getInt): (WebCore::isSchemaKnown): (WebCore::setUpMetadata): (WebCore::getMaxObjectStoreId): (WebCore::IDBBackingStore::open): (WebCore::IDBBackingStore::getIDBDatabaseMetaData): (WebCore::getNewDatabaseId): (WebCore::IDBBackingStore::createIDBDatabaseMetaData): (WebCore::setMaxObjectStoreId): (WebCore::getNewVersionNumber): (WebCore::IDBBackingStore::putRecord): (WebCore::setMaxIndexId): * Modules/indexeddb/IDBBackingStore.h: (IDBBackingStore): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::setIndexKeys): (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform): 2012-12-09 Antti Koivisto Factor node traversal into standalone functions https://bugs.webkit.org/show_bug.cgi?id=104507 Reviewed by Eric Seidel. Node traversal functions are currently Node and ContainerNode members. Their implementations are confusingly scattered over multiple header and source files. These functions have no particular reason to be members as they don't require non-public access. They should be made freestanding function instead and gathered together. This patch adds NodeTraversal namespace, defined in NodeTraversal.h. It contains freestanding functions for traversing Nodes. Most popular functions are inlined (as before) and there are ContainerNode specific specializations (as before). In client code node = node->traverseNextNode(); node = node->traverseNextSibling(); becomes node = NodeTraversal::next(node); node = NodeTraversal::nextSkippingChildren(node); etc. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::firstAccessibleObjectFromNode): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::addImageMapChildren): * bindings/js/JSDocumentCustom.cpp: (WebCore::toJS): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::allVisitedStateChanged): (WebCore::SelectorChecker::visitedStateChanged): * css/StyleInvalidationAnalysis.cpp: (WebCore::StyleInvalidationAnalysis::invalidateStyle): * dom/ContainerNode.cpp: (WebCore::dispatchChildInsertionEvents): (WebCore::dispatchChildRemovalEvents): * dom/ContainerNode.h: (ContainerNode): (WebCore): * dom/ContainerNodeAlgorithms.h: (WebCore::ChildFrameDisconnector::collectDescendant): * dom/Document.cpp: (WebCore::Document::buildAccessKeyMap): (WebCore::Document::removeAllEventListeners): (WebCore::Document::updateBaseURL): (WebCore::Document::processBaseElement): (WebCore::Document::nodeAbsIndex): (WebCore::Document::nodeWithAbsIndex): (WebCore::Document::getFocusableNodes): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::markersInRange): (WebCore::DocumentMarkerController::setMarkersActive): (WebCore::DocumentMarkerController::hasMarkers): (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange): * dom/DocumentOrderedMap.cpp: (WebCore::DocumentOrderedMap::get): * dom/ElementShadow.cpp: (WebCore::ElementShadow::collectSelectFeatureSetFrom): * dom/Node.cpp: (WebCore::Node::normalize): (WebCore::Node::lazyAttach): (WebCore): (WebCore::Node::detach): (WebCore::traverseTreeAndMark): * dom/Node.h: (Node): * dom/NodeIterator.cpp: (WebCore::NodeIterator::NodePointer::moveToNext): (WebCore::NodeIterator::NodePointer::moveToPrevious): (WebCore::NodeIterator::updateForNodeRemoval): * dom/NodeTraversal.h: Added. (WebCore): (NodeTraversal): (WebCore::NodeTraversal::traverseNextNodeTemplate): (WebCore::NodeTraversal::next): (WebCore::NodeTraversal::traverseNextSiblingTemplate): (WebCore::NodeTraversal::nextSibling): * dom/Range.cpp: (WebCore::Range::toString): (WebCore::Range::checkDeleteExtract): (WebCore::Range::firstNode): (WebCore::Range::pastLastNode): (WebCore::Range::textRects): (WebCore::Range::textQuads): (WebCore::Range::getBorderAndTextQuads): * dom/TreeScope.cpp: (WebCore::TreeScope::labelElementForId): (WebCore::TreeScope::findAnchor): * dom/TreeScopeAdopter.cpp: (WebCore::TreeScopeAdopter::moveTreeToNewScope): (WebCore::TreeScopeAdopter::moveTreeToNewDocument): * dom/TreeWalker.cpp: (WebCore::TreeWalker::nextNode): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): (WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle): (WebCore::containsNonEditableRegion): (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle): (WebCore::ApplyStyleCommand::removeInlineStyle): * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteInsignificantText): (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): * editing/DeleteSelectionCommand.cpp: (WebCore::firstEditablePositionInNode): (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss): (WebCore::DeleteSelectionCommand::handleGeneralDelete): * editing/EditCommand.cpp: (WebCore::SimpleEditCommand::addNodeAndDescendants): * editing/EditingStyle.cpp: (WebCore::EditingStyle::triStateOfStyle): (WebCore::EditingStyle::textDirectionForSelection): * editing/Editor.cpp: (WebCore::Editor::simplifyMarkup): * editing/FrameSelection.cpp: (WebCore::scanForForm): (WebCore::FrameSelection::setSelectionFromNone): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::removeUnrenderedNodes): (WebCore::ReplacementFragment::removeInterchangeNodes): (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren): (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode): (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): (WebCore::removeHeadContents): (WebCore::ReplaceSelectionCommand::handleStyleSpans): * editing/ReplaceSelectionCommand.h: (WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf): * editing/SimplifyMarkupCommand.cpp: (WebCore::SimplifyMarkupCommand::doApply): * editing/TextIterator.cpp: (WebCore::TextIterator::advance): (WebCore::shouldEmitNewlineAfterNode): * editing/htmlediting.cpp: (WebCore::hasARenderedDescendant): * editing/mac/EditorMac.mm: (WebCore::Editor::fontForSelection): * editing/markup.cpp: (WebCore::completeURLs): (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization): (WebCore::findNodesSurroundingContext): (WebCore::trimFragment): * editing/visible_units.cpp: (WebCore::startOfParagraph): (WebCore::endOfParagraph): * html/HTMLCollection.cpp: (WebCore::nextNode): * html/HTMLElement.cpp: (WebCore::setHasDirAutoFlagRecursively): (WebCore::HTMLElement::directionality): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): (WebCore::HTMLElement::getItemRefElements): * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder): (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formElementIndex): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::control): * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::associatedControl): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::mapMouseEvent): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::virtualItemAfter): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::collectOptionInnerText): * html/HTMLPropertiesCollection.cpp: (WebCore::nextNodeWithProperty): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::recalcListItems): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::selection): (WebCore::HTMLTextFormControlElement::innerTextValue): (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks): * html/RadioInputType.cpp: (WebCore::RadioInputType::handleKeydownEvent): * html/shadow/ContentDistributor.cpp: (WebCore::ShadowRootContentDistributionData::ensureInsertionPointList): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::performSearch): * inspector/InspectorMemoryAgent.cpp: * page/FocusController.cpp: (WebCore::FocusController::findFocusCandidateInContainer): * page/Frame.cpp: (WebCore::Frame::searchForLabelsAboveCell): (WebCore::Frame::searchForLabelsBeforeElement): * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::getRanges): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList): (WebCore::SVGSVGElement::getElementById): * svg/SVGUseElement.cpp: (WebCore::removeDisallowedElementsFromSubtree): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::updateDocumentOrderIndexes): * xml/XPathNodeSet.cpp: (WebCore::XPath::NodeSet::traversalSort): * xml/XPathStep.cpp: (WebCore::XPath::Step::nodesInAxis): * xml/XPathUtil.cpp: (WebCore::XPath::stringValue): 2012-12-10 Min Qin Sending multi-touch events to the same Iframe https://bugs.webkit.org/show_bug.cgi?id=97973 Reviewed by Dimitri Glazkov. Multi-Touch in different iframe can give both documents access to each other. This could cause cross-origin access. To solve this, all the touch events should be sent to the iframe where the first touchstart happens. Test: fast/events/touch/multi-touch-inside-iframes.html fast/events/touch/multi-touch-inside-nested-iframes.html * page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent): * page/EventHandler.h: 2012-12-10 KyungTae Kim [soup] Fix build warning in ResourceHandleSoup.cpp https://bugs.webkit.org/show_bug.cgi?id=104605 Reviewed by Martin Robinson. The nextMultipartResponsePartCallback has unused parameter 'source', comment out it to fix 'unused parameter' build warning. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::nextMultipartResponsePartCallback): 2012-12-10 Simon Fraser Fix frame border painting in tiled drawing mode https://bugs.webkit.org/show_bug.cgi?id=104453 Reviewed by Dan Bernstein. Frame borders were not correctly invalidated when in tiled drawing mode, because RenderFrameSet::layout() invalidated directly on the view, which skips the tile cache. Fix by invalidating like all other renderers, via the repaint container. Also, the layer transform should be updated before the invalidation, and we make use of RenderObject::updateLayerTransform() which has the same behavior as the old code. Attempts to make a layout test failed. Resizing composited framesets repainted via layer resizing, and an attempt to make a ref test in tiled drawing mode failed (the test passed without the patch). * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layout): 2012-12-10 Simon Fraser When converting a layer into a tiled layer, ensure that we update the visible rect https://bugs.webkit.org/show_bug.cgi?id=104467 Reviewed by Darin Adler. When a GraphicsLayerCA toggles to use a TileCache, we have to ensure that the layer's visible rect (which is used to ensure tile coverage) is updated in the same commit. Otherwise we can get blank layers until something else causes the visible rect to be updated. Test: compositing/tiling/tiled-layer-resize.html * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::dumpAdditionalProperties): With the debug flag, dump the TiledBacking address for ease of debugging. (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Set the VisibleRectChanged bit in m_uncommittedChanges if we've just switched to a tiled layer. 2012-12-10 Simon Fraser Don't unconditionally repaint compositing layers when their size changes https://bugs.webkit.org/show_bug.cgi?id=104461 Reviewed by Sam Weinig. RenderLayerBacking always repainted the entire compositing layer when its size changed. This was done to fix repaint issues when outline widths changes, but that issue is now solved by repainting in GraphicsLayer::setOffsetFromRenderer(), add in r134628. I believe this is no longer necessary. Always repainting when the size changes is terrible for the tile cache when loading large documents, as all tiles repaint every time the document gets longer. Test: compositing/repaint/resize-repaint.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2012-12-10 Ojan Vafai Unreviewed, rolling out r134150. http://trac.webkit.org/changeset/134150 https://bugs.webkit.org/show_bug.cgi?id=99940 Caused JS-based tooltips to remain during scroll on Facebook and Gmail. Rollout until I have time to experiment with less aggresive approaches. * page/EventHandler.cpp: (WebCore): (WebCore::MaximumDurationTracker::MaximumDurationTracker): (WebCore::MaximumDurationTracker::~MaximumDurationTracker): (MaximumDurationTracker): (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::clear): (WebCore::EventHandler::mouseMoved): (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): (WebCore::EventHandler::fakeMouseMoveEventTimerFired): * page/EventHandler.h: (EventHandler): * platform/Timer.h: 2012-12-10 Yi Shen Keyboard caret movement in textarea with RTL Override Character can make tab unresponsive https://bugs.webkit.org/show_bug.cgi?id=103067 Reviewed by Ryosuke Niwa. For textarea with RTL override character, the line break could be the previous leaf InlineTextBox of the InlineTextBox for the RTL override text. When overshots the left/right, make sure the leftVisuallyDistinctCandidate and rightVisuallyDistinctCandidate return the visually distinct left/right position by ignoring the line break. Test: editing/selection/move-by-character-crash-test-textarea.html * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::leftVisuallyDistinctCandidate): (WebCore::VisiblePosition::rightVisuallyDistinctCandidate): 2012-12-10 Kondapally Kalyan [EFL][WebGL] Minor Refactoring in GraphicsContext3DEfl. https://bugs.webkit.org/show_bug.cgi?id=104553. Reviewed by Kenneth Rohde Christiansen. We use different FBO for canvas and offscreen surface of our platform layer. Thus we need to manage any bound buffers while copying contents to the surface. Currently, Surface always uses double buffering but in future we should be able to configure it to use either double or single buffer. For these use cases, it would be handy to bind buffers directly to FBO used by the surface. This patch does the needed changes in GraphicsContext3DEfl and PlatformSurface. Also, removes some unused code. Covered by existing tests. Relevant changes in GraphicsContext3DEfl to obtain FBO id from PlatformSurface. * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): Renamed createGraphicsSurface to didResizeCanvas. (WebCore::GraphicsContext3D::createGraphicsSurfaces): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (GraphicsContext3DPrivate::didResizeCanvas): (GraphicsContext3DPrivate::copyToGraphicsSurface): * platform/graphics/efl/GraphicsContext3DPrivate.h: (GraphicsContext3DPrivate): Header cleanup. * platform/graphics/opengl/GLDefs.h: * platform/graphics/opengl/GLPlatformContext.cpp: (WebCore::GLPlatformContext::createContext): * platform/graphics/opengl/GLPlatformContext.h: Added initialize method to expose FBO id of the surface. Removed unused code. * platform/graphics/opengl/GLPlatformSurface.cpp: (WebCore::GLPlatformSurface::initialize): (WebCore): (WebCore::GLPlatformSurface::updateContents): * platform/graphics/opengl/GLPlatformSurface.h: (GLPlatformSurface): * platform/graphics/surfaces/glx/GLXSurface.h: 2012-12-07 Simon Fraser Tidy up the tiled scrolling indicator, fix with zooming https://bugs.webkit.org/show_bug.cgi?id=104386 Reviewed by Tim Horton. Fix the tiled scrolling indicator to not get tiny when zooming, to not poke out of the bottom of the window, and to not look so crappy. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::updateTileCoverageMap): (WebCore::TileCache::drawTileMapContents): 2012-12-10 Sheriff Bot Unreviewed, rolling out r136817. http://trac.webkit.org/changeset/136817 https://bugs.webkit.org/show_bug.cgi?id=104596 This patch was an unnecessarily complex solution to handling conversion of union types. (Requested by mpruett on #webkit). * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): * bindings/js/JSDictionary.h: (WebCore::JSDictionary::tryGetPropertyAndResult): 2012-12-10 Tab Atkins Deprecate prefixed linear-gradient and radial-gradient functions https://bugs.webkit.org/show_bug.cgi?id=104591 Reviewed by Dean Jackson. Rename the old gradient parsing functions in anticipation of functions that parse the new syntax. No new tests added - this is a rename and has no functionality change. * css/CSSParser.cpp: (WebCore::CSSParser::parseDeprecatedLinearGradient): (WebCore::CSSParser::parseDeprecatedRadialGradient): (WebCore::CSSParser::parseGeneratedImage): * css/CSSParser.h: 2012-12-10 Mark Pilgrim [Chromium][Win] Remove theme-related functions from PlatformSupport https://bugs.webkit.org/show_bug.cgi?id=102699 Reviewed by Adam Barth. Call theme engine directly instead of going through PlatformSupport. Part of a refactoring series. See tracking bug 82948. * platform/chromium/PlatformSupport.h: (PlatformSupport): * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece): (WebCore::ScrollbarThemeChromiumWin::paintButton): * rendering/RenderThemeChromiumWin.cpp: (WebCore): (WebCore::RenderThemeChromiumWin::paintButton): (WebCore::RenderThemeChromiumWin::paintSliderTrack): (WebCore::RenderThemeChromiumWin::paintSliderThumb): (WebCore::RenderThemeChromiumWin::paintMenuList): (WebCore::RenderThemeChromiumWin::paintTextFieldInternal): (WebCore::RenderThemeChromiumWin::paintInnerSpinButton): (WebCore::RenderThemeChromiumWin::paintProgressBar): 2012-12-10 Dean Jackson Support for CSS widows and orphans https://bugs.webkit.org/show_bug.cgi?id=9410 Reviewed by Darin Adler. The CSS 'widow' and 'orphan' properties were supported by the parser and style system, but were not actually doing anything in layout. Now they do! In order to not break existing content, I unfortunately had to go against the specification and change our default value from 2 to auto. A value of auto means that widows and orphans will not cause any page/column breaks. Supporting orphans was a small change. During line layout, if we realise we need to move to a new page in a situation that would create an orphan, move the entire block to the new page. There was already code to do this. Support for widows was trickier. When we finish laying out a block, count the number of hanging lines. If we've created a widow, and there are enough available lines on the previous page, then steal some and remember the line to break at. Trigger a relayout. Then notice the line that was marked for breaking and avoid the widow. This means some blocks go through layout twice, but as long as the widow value is small it shouldn't be a huge penalty. Tests: fast/multicol/widows-and-orphans.html (new test) printing/page-break-orphans.html printing/page-break-orphans-and-widows.html printing/page-break-widows.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Return CSSValueAuto for widows and orphans if necessary. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Support "auto" in widow and orphan property parsing. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): Change property handler to something that supports auto. * page/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimation::ensurePropertyMap): Add widows and orphans to the animation map. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChild): Detect if we've caused a widow-fixing break, and request relayout evaluation. (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded): Test for a widow-fixing line. (WebCore::RenderBlock::setBreakAtLineToAvoidWidow): New function to remember where we should break on next layout. (WebCore::RenderBlock::adjustLinePositionForPagination): Move the entire block to a new page if this would create an orphan. * rendering/RenderBlock.h: (WebCore::RenderBlock::shouldBreakAtLineToAvoidWidow): New function to indicate if we are remembering a widow. (WebCore::RenderBlock::clearShouldBreakAtLineToAvoidWidow): Reset the line breaks. (WebCore::RenderBlock::lineBreakToAvoidWidow): (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData): Add a flag for indicating if we are remembering a line, and the actual line itself. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloatsInRange): The code to detect and fix widows. Explained above. * rendering/style/RenderStyle.h: New methods for indicating if widows and orphans are non-default values. * rendering/style/StyleRareInheritedData.cpp: Ditto. * rendering/style/StyleRareInheritedData.h: Ditto. 2012-12-10 Zan Dobersek REGRESSION (r118735): svg/dom/complex-svgView-specification.html, svg/dom/SVGViewSpec.html, svg/dom/viewspec-parser.html failing on GTK Linux 64-bit Release https://bugs.webkit.org/show_bug.cgi?id=87734 Reviewed by Martin Robinson. Don't modify ResourceRequest's URL to have the value of the (encoded) URI of the SoupMessage. The only exception is in the case of cancelled SoupMessage - the URL of the ResourceRequest should then be null. No new tests - existing tests should show no regressions. * platform/network/soup/ResourceRequestSoup.cpp: (WebCore::ResourceRequest::updateFromSoupMessage): 2012-12-10 Gustavo Noronha Silva Unreviewed distcheck fix. * GNUmakefile.list.am: 2012-12-10 Eric Seidel Caused crashes in v8. Rolling out until abarth can fix. See cr-issue 165136 for more info https://bugs.webkit.org/show_bug.cgi?id=104575 Unreviewed, just rolling out r136559. * bindings/v8/V8GCController.cpp: * bindings/v8/V8NodeFilterCondition.cpp: (WebCore::V8NodeFilterCondition::V8NodeFilterCondition): (WebCore::V8NodeFilterCondition::acceptNode): * bindings/v8/V8NodeFilterCondition.h: (WebCore::V8NodeFilterCondition::create): (V8NodeFilterCondition): * dom/NodeFilter.h: 2012-12-10 Eric Carlson Unreviewed build fix after r137167. * WebCore.xcodeproj/project.pbxproj: Add InbandTextTrackPrivate.h to framework private headers. 2012-12-10 Martin Robinson Fix the GTK+ build after a collision of two patches. Unreviewed build fix. * bindings/gobject/GNUmakefile.am: The GObject DOM bindings library needs to include the harfbuzz cflags when compiling. 2012-12-10 Parth Patel Make hiddenPageDomTimerInterval a setting https://bugs.webkit.org/show_bug.cgi?id=104555 Reviewed by Yong Li. Make hiddenPageDomTimerInterval a setting so client can customize it. No new tests are needed. * page/Page.cpp: (WebCore): (WebCore::Page::setVisibilityState): * page/Settings.cpp: (WebCore): (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): * page/Settings.h: (Settings): 2012-12-10 peavo@outlook.com [WinCairo] Compile fix in ImageCairoWin.cpp https://bugs.webkit.org/show_bug.cgi?id=104554 Reviewed by Brent Fulgham. * platform/graphics/win/ImageCairoWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): Added parameter. (WebCore::BitmapImage::drawFrameMatchingSourceSize): Added parameter. 2012-12-10 Mike West Log to console when script is blocked by sandbox attributes. https://bugs.webkit.org/show_bug.cgi?id=104365 Reviewed by Ojan Vafai. Adds a console message to cover script execution blocked within the context of a sandboxed frame which lacks the 'allow-scripts' permission. * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::canExecuteScripts): Log a warning when sandboxing flags block script execution. 2012-12-10 Chris Fleizach AX: Crash in NSAccessibilityUnignoredDescendant https://bugs.webkit.org/show_bug.cgi?id=104468 Reviewed by Anders Carlsson. This crash occurred because AccessibilityScrollView stopped retaining it's ScrollView pointer. Unfortunately, there was still a case that didn't correctly clear that variable. That case was when a Frame had a new FrameView associated with it. The old FrameView didn't inform the accessibility object cache that it should be removed. As a result, when the FrameView deallocated and did try to remove, it used the wrong AXObjectCache because it was no longer correctly hooked into the document tree. No new tests. Existing tests will stop crashing. * page/Frame.cpp: (WebCore::Frame::setView): change the name of the method that tells the FrameView to detach * page/FrameView.cpp: (WebCore::FrameView::~FrameView): (WebCore::FrameView::removeFromAXObjectCache): add a method that can be called in multiple places (WebCore::FrameView::isFrameView): (WebCore::FrameView::prepareForDetach): detaches scrollbars and accessibility * page/FrameView.h: (FrameView): 2012-12-10 Mark Pilgrim [Chromium] Move getPluginsList out of PlatformSupport https://bugs.webkit.org/show_bug.cgi?id=96507 Reviewed by Darin Fisher. Part of a refactoring series. See tracking bug 82948. * WebCore.gypi: * platform/chromium/PlatformSupport.h: (PlatformSupport): * plugins/chromium/PluginDataChromium.cpp: (WebCore::PluginCache::plugins): * plugins/chromium/PluginListBuilder.cpp: Added. (WebKit): (WebKit::PluginListBuilder::addPlugin): (WebKit::PluginListBuilder::addMediaTypeToLastPlugin): (WebKit::PluginListBuilder::addFileExtensionToLastMediaType): * plugins/chromium/PluginListBuilder.h: Added. (WebKit): (PluginListBuilder): (WebKit::PluginListBuilder::PluginListBuilder): 2012-12-10 Carlos Garcia Campos [GTK] Build GObject DOM bindings as a separate library https://bugs.webkit.org/show_bug.cgi?id=104527 Reviewed by Xan Lopez. * bindings/gobject/GNUmakefile.am: Add libWebCoreDOM library. * bindings/gobject/WebKitDOMBinding.h: Define private macros. * bindings/gobject/WebKitDOMCustom.h: Don't include webkit/webkitdefines.h. * bindings/gobject/WebKitDOMEventTarget.h: Ditto. * bindings/gobject/WebKitDOMObject.h: Ditto. * bindings/scripts/CodeGeneratorGObject.pm: (Generate): Don't include webkitglobalsprivate.h. (WriteData): Don't include webkit/webkitdefines.h. * bindings/scripts/gobject-generate-headers.pl: Define WEBKIT_API macro in webkitdomdefines.h. * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h: * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h: * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp: * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h: * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h: * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: * bindings/scripts/test/GObject/WebKitDOMTestException.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp: * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h: * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: * bindings/scripts/test/GObject/WebKitDOMTestNode.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp: * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: 2012-12-10 Adam Klein In InbandTextTrackPrivate, return emptyAtoms instead of emptyString() by default. Unreviewed build fix. * platform/graphics/InbandTextTrackPrivate.h: (WebCore::InbandTextTrackPrivate::label): (WebCore::InbandTextTrackPrivate::language): 2012-12-10 Ilya Tikhonovsky Web Inspector: Native Memory Instrumentation: instrument RenderBox descendants. https://bugs.webkit.org/show_bug.cgi?id=104026 Reviewed by Eric Seidel. Plain vanilla instrumentation for RenderBox descendants. * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::reportMemoryUsage): (WebCore): (WebCore::RenderFrameSet::GridAxis::reportMemoryUsage): * rendering/RenderFrameSet.h: (RenderFrameSet): (GridAxis): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::reportMemoryUsage): (WebCore): * rendering/RenderListMarker.h: (RenderListMarker): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::reportMemoryUsage): (WebCore): * rendering/RenderReplaced.h: (RenderReplaced): * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::reportMemoryUsage): (WebCore): * rendering/RenderTableCol.h: (RenderTableCol): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::reportMemoryUsage): (WebCore): * rendering/RenderTableRow.h: (RenderTableRow): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::reportMemoryUsage): (WebCore): (WebCore::RenderTableSection::RowStruct::reportMemoryUsage): (WebCore::RenderTableSection::CellStruct::reportMemoryUsage): * rendering/RenderTableSection.h: (CellStruct): (RowStruct): 2012-12-10 Alejandro Piñeiro AX: wrong Enabled states on a ListBox https://bugs.webkit.org/show_bug.cgi?id=104483 Reviewed by Chris Fleizach. Test: accessibility/listbox-enabled-states.html * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::isEnabled): taking into account the DISABLED attribute and the aria-disabled attribute to decide if the item is enabled or not. 2012-12-10 Adam Klein cr-win build fix after r137161. Unreviewed. * platform/graphics/MediaPlayer.h: Replace forward-decl of InbandTextTrackPrivate with #include as the definition is required. 2012-12-10 Alexis Menard [CSS3 Backgrounds and Borders] Remove CSS3_BACKGROUND feature flag. https://bugs.webkit.org/show_bug.cgi?id=104539 Reviewed by Antonio Gomes. As discussed on webkit-dev it is not needed to keep this feature flag as support for type is a small feature that is already implemented by three other UAs. It was useful while landing this feature as partial bits were landed one after one. No new tests : the feature is covered by various tests and it is already enabled in many ports. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.features.am: * css/CSSParser.cpp: (WebCore::CSSParser::parseFillPosition): (WebCore::CSSParser::parseFillProperty): * css/CSSParser.h: * css/CSSToStyleMap.cpp: (WebCore::CSSToStyleMap::mapFillXPosition): (WebCore::CSSToStyleMap::mapFillYPosition): * rendering/style/FillLayer.cpp: (SameSizeAsFillLayer): (WebCore::FillLayer::FillLayer): (WebCore::FillLayer::operator=): (WebCore::FillLayer::operator==): (WebCore::FillLayer::fillUnsetProperties): * rendering/style/FillLayer.h: (WebCore::FillLayer::backgroundXOrigin): (WebCore::FillLayer::backgroundYOrigin): (WebCore::FillLayer::isBackgroundOriginSet): (WebCore::FillLayer::clearXPosition): (WebCore::FillLayer::clearYPosition): (FillLayer): 2012-12-10 Eric Carlson Add support for in-band text tracks to Mac port https://bugs.webkit.org/show_bug.cgi?id=103663 Reviewed by Sam Weinig. Test: media/track/track-in-band.html * GNUmakefile.list.am: Move InbandTextTrackPrivate.h to platform/graphics. Add InbandTextTrackPrivateClient.h. * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.xcodeproj/project.pbxproj: Add new files. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setReadyState): No need to call processInbandTextTracks, in-band tracks are now registered by the media engine as they are discovered. (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): New, called by the media player when a new in-band track is found. (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTrack): New, called by the media player when an in-band track goes away. * html/HTMLMediaElement.h: * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::InbandTextTrack): Use m_private instead of tracksPrivate because it is zeroed during assignment. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::addTextTrack): New MediaPlayerClient method to allow MediaPlayerPrivate subclasses to add a new in-band track. (WebCore::MediaPlayer::removeTextTrack): New MediaPlayerClient method to allow MediaPlayerPrivate subclasses to remove a new in-band track. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Added. (WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): (WebCore::InbandTextTrackPrivateAVF::~InbandTextTrackPrivateAVF): (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Convert an attribute string into WebVTT cue setting and content strings. (WebCore::InbandTextTrackPrivateAVF::processCue): Process a new cue. (WebCore::InbandTextTrackPrivateAVF::disconnect): Clear member variables. (WebCore::InbandTextTrackPrivateAVF::resetCueValues): Reset cue values to defaults. (WebCore::InbandTextTrackPrivateAVF::setMode): Set track mode and call player's trackModeChanged. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Added. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: Initialize m_inbandTrackConfigurationPending. (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Flush the currently accumulating cue so it doesn't get the wrong duration. (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Handle InbandTracksNeedConfiguration. (WebCore::MediaPlayerPrivateAVFoundation::flushCurrentCue): New, pass the current cue up to the client. (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Configure in-band tracks. (WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged): Schedule a call to configureInbandTracks. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h: Added. * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: Added. (WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): (WebCore::InbandTextTrackPrivateAVFObjC::disconnect): (WebCore::InbandTextTrackPrivateAVFObjC::kind): Return track kind. (WebCore::InbandTextTrackPrivateAVFObjC::label): Return track label. (WebCore::InbandTextTrackPrivateAVFObjC::language): Return track language. (WebCore::InbandTextTrackPrivateAVFObjC::isDefault): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: (MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItem): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize m_currentTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Clear m_legibleOutput. (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Create and initialize m_legibleOutput. (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Called when the player item's "tracks" changes, add and remove in-band text tracks as necessary. (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): Pass an attributed string to the current track to be processed. (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Tell AVFoundation to select an in-band track. (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTrack): Return the current track. (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]): Legible output delegate. 2012-12-10 Pavel Feldman Web Inspector: fix front-end compilation warnings https://bugs.webkit.org/show_bug.cgi?id=104557 Reviewed by Alexander Pavlov. Corresponding annotations added. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::highlightNode): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleDeclaration.prototype.): (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt): * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview): * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype.highlightDOMNode): * inspector/front-end/DOMPresentationUtils.js: (WebInspector.DOMPresentationUtils.linkifyNodeReference): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update): * inspector/front-end/Toolbar.js: 2012-12-10 Zeno Albisser [Qt] MediaPlayerQTKit broken after switching QPainter to raster engine. https://bugs.webkit.org/show_bug.cgi?id=104550 With Qt5 QPainter changed to using the raster engine. Therefore we no longer have an NSGraphicsContext that we can use for drawing video frames. With this patch we are rendering the video frame into an image buffer and then paint it manually using QPainter. Reviewed by Simon Hausmann. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore): (WebCore::swapBgrToRgb): Swap the color format from BGR to RGB, since BGR is not supported by QImage. (WebCore::MediaPlayerPrivateQTKit::paint): 2012-12-10 peavo@outlook.com [WinCairo] Link fix in InspectorController.cpp https://bugs.webkit.org/show_bug.cgi?id=104556 Reviewed by Pavel Feldman. * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): Added missing #if check. 2012-12-10 Pavel Feldman Web Inspector: remove the Overrides / Settings context menu from gear icon https://bugs.webkit.org/show_bug.cgi?id=104546 Reviewed by Alexander Pavlov. It sounds like too many people don't like the way it works. Bringing things back: overrides will be a tab in settings for now. Moving present behavior to under experiment. * inspector/front-end/OverridesView.js: (WebInspector.OverridesView): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SettingsScreen.js: (WebInspector.OverridesSettingsTab): (WebInspector.SettingsController): (WebInspector.SettingsController.prototype.get statusBarItem): (WebInspector.SettingsController.prototype._mouseDown.showSettings): (WebInspector.SettingsController.prototype._mouseDown): (WebInspector.SettingsController.prototype._mouseUp): * inspector/front-end/helpScreen.css: (#settings-screen .tabbed-pane-header): (#settings-screen .tabbed-pane-header-tabs): (#settings-screen .tabbed-pane-header-tab): 2012-12-10 Kent Tamura Visual order of empty value placeholder in INPUT_MULTIPLE_FIELDS_UI is wrong in RTL https://bugs.webkit.org/show_bug.cgi?id=104438 Reviewed by Hajime Morita. No new tests. This updates datetimelocal-appearance-l10n.html for he-il and ar-eg locales. * html/shadow/DateTimeNumericFieldElement.cpp: (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): We should not append Right-to-left-mark to each of placeholder strings. It makes numeric field separators such as ':' and '/' RTL, and makes a wrong visual order. We use unicode-bidi:bidi-override and direction:ltr instead. It means we force LTR only to this element * html/shadow/DateTimeNumericFieldElement.h: Makes m_placeholder const again. * html/shadow/DateTimeEditElement.cpp: (WebCore::DateTimeEditBuilder::visitLiteral): Explicitly set right-to-left-mark before S, WS, ON types according to Unicod Bidirectional Algorithm Table 4 [1]. This is needed because we don't have context like "This literal follows European/Arabic numbers" in a case of showing placeholders. [1] http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types 2012-12-09 Gustavo Noronha Silva [Soup] utilize multipart/x-mixed-replace support recently added to libsoup https://bugs.webkit.org/show_bug.cgi?id=94515 Reviewed by Martin Robinson. The multipart/x-mixed-replace content type is often used for providing "push" server support, with each part in the multipart response replacing the previous one in the rendering. Soup recently acquired support for multipart/x-mixed replace, which this change utilizes. Covered by existing multipart/x-mixed-replace tests. * platform/network/ResourceHandleInternal.h: (ResourceHandleInternal): add new member to this class, the multipart input stream * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::cleanupSoupRequestOperation): also clear the multipart input stream on cleanup (WebCore::nextPartCallback): callback that handles reporting the new response delivered with the new part, if any; uses the factored out updateFromSoupMessageHeaders method (WebCore::sendRequestCallback): handle multipart/x-mixed-replace responses by requesting the next part (WebCore::readCallback): when reading has finished, request the next part when handling a multipart/x-mixed-replace response * platform/network/soup/ResourceResponse.h: (ResourceResponse): add declaration for new method * platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::updateFromSoupMessage): call new updateFromSoupMessageHeaders method, instead of dealing with the message headers directly (WebCore::ResourceResponse::updateFromSoupMessageHeaders): new method, factored out from updateFromSoupMessage, so this same code can be reused for updating responses for multipart/x-mixed-replace responses parts 2012-12-10 Zoltan Nyul Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=103886 Reviewed by Kenneth Rohde Christiansen. Export symbol for WebCore::Page::setViewMode on Mac. No new tests, no behavior change for layout tests. * WebCore.exp.in: 2012-12-10 Martin Robinson [GTK] Bring Harfbuzz-ng support to Gtk https://bugs.webkit.org/show_bug.cgi?id=92098 Reviewed by Gustavo Noronha Silva. Enable HarfBuzz support by default. With the Freetype backend we no longer fall back to Pango for rendering complex text. No new tests. This is covered by existing tests. * GNUmakefile.am: Add HarfBuzz include directories and define. * GNUmakefile.list.am: Add HarfBuzz files to source list and remove Pango ones. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::operator==): To properly render fallback fonts via HarfBuzz , it's important that we actually ask Fontconfig whether or not two patterns are the same. This ensures that when patterns are just copies of one another they only take up one slot in the font cache and appear to be the same font to HarfBuzzShaper. 2012-12-10 Alexander Pavlov Web Inspector: [Overrides] Unable to change values in Device Metrics override setting https://bugs.webkit.org/show_bug.cgi?id=104542 Reviewed by Vsevolod Vlasov. Remove inadvertent object property assignment. * inspector/front-end/OverridesView.js: 2012-12-10 Michael Brüning [Qt] Builds for Mac are tied to the OS system instead of the SDK version. https://bugs.webkit.org/show_bug.cgi?id=104529 Reviewed by Simon Hausmann. Using work by Eike Ziller . The build system now first tries to assign the correct system libraries for the SDK being used for Mac builds. If this does not yield any result, it falls back to using the Mac OS version to determine the correct library. No new tests (not applicable). * WebCore.pri: 2012-12-10 Ilya Tikhonovsky Unreviewed: touch RenderingAllInOne.cpp to fix Apple Windows builder. * rendering/RenderingAllInOne.cpp: 2012-12-10 Eugene Klyuchnikov Web Inspector: Network: newly added items are not filtered. https://bugs.webkit.org/show_bug.cgi?id=104021 Reviewed by Vsevolod Vlasov. Extracted method to higlight/hide record according to filter. Used this method to process newly created records. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._applyFilter): Extracted. (WebInspector.NetworkLogView.prototype.performFilter): Refactored. 2012-12-09 Ilya Tikhonovsky Web Inspector: Unreviewed: move reportMemoryUsage to public section. * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.h: (RenderBox): 2012-12-08 Pavel Feldman Web Inspector: adds an option to remove toolbar icons. https://bugs.webkit.org/show_bug.cgi?id=95654 Reviewed by Vsevolod Vlasov. - removes compact mode in favor or dock-to-bottom - introduces setting for hiding toolbar icons * inspector/front-end/DockController.js: (WebInspector.DockController.prototype._toggleDockState): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar.prototype.setDockedToBottom): (WebInspector.Toolbar.prototype._toolbarDragStart): (WebInspector.Toolbar.prototype._toolbarDrag): * inspector/front-end/helpScreen.css: (body.dock-to-bottom .help-content): * inspector/front-end/inspector.css: (body.dock-to-bottom #toolbar): (body.no-toolbar-icons #toolbar): (body.dock-to-bottom.port-qt #toolbar): (body.dock-to-bottom.inactive #toolbar): (body.no-toolbar-icons .toolbar-item.toggleable): (body.dock-to-bottom .toolbar-item.toggleable): (body.dock-to-bottom .toolbar-icon): (body.no-toolbar-icons .toolbar-icon): (body.no-toolbar-icons #main): (body.dock-to-bottom .toolbar-icon.custom-toolbar-icon): (body.dock-to-bottom .toolbar-item:active .toolbar-icon): (body.dock-to-bottom .toolbar-label): (body.dock-to-bottom #search-toolbar-label): (body.no-toolbar-icons .toolbar-label): (body.no-toolbar-icons #toolbar-dropdown): (#toolbar-dropdown .scrollable-content): (#toolbar-dropdown .toolbar-item.toggleable:hover): (body.no-toolbar-icons #toolbar-dropdown .toolbar-label): (body.no-toolbar-icons #toolbar-dropdown .toolbar-item): (body.dock-to-bottom .toolbar-item.resources .toolbar-icon): (body.dock-to-bottom .toolbar-item.network .toolbar-icon): (body.dock-to-bottom .toolbar-item.scripts .toolbar-icon): (body.dock-to-bottom .toolbar-item.timeline .toolbar-icon): (body.dock-to-bottom .toolbar-item.profiles .toolbar-icon): (body.dock-to-bottom .toolbar-item.audits .toolbar-icon): (body.dock-to-bottom .toolbar-item.console .toolbar-icon): (body.dock-to-bottom.port-qt .toolbar-item.close-left, body.dock-to-bottom.port-qt .toolbar-item.close-right): (body.dock-to-bottom #main): 2012-12-10 Kent Tamura Refactoring: Remove HTMLFormControlElement::autofocus https://bugs.webkit.org/show_bug.cgi?id=104524 Reviewed by Kentaro Hara. autofocus function is used only by HTMLFormControlElement itself, no sub-classes override it, and it is not exposed via an IDL attribute, No new tests. This doesn't make any behavior changes. * html/HTMLFormControlElement.cpp: (WebCore::shouldAutofocus): Use fastHasAttribute instead of autofocus(). * html/HTMLFormControlElement.h: Remove autofocus(). 2012-12-10 Jonathan Liu Fix GC3Dintptr and GC3Dsizeiptr typedefs for Win64 https://bugs.webkit.org/show_bug.cgi?id=104426 Reviewed by Simon Hausmann. The GC3Dintptr and GC3Dsizeiptr typedefs are incorrect for Win64 as LLP64 is used there. This would result in compile error due to narrowing conversion of 64-bit pointer to signed long int which is 32-bit. * platform/graphics/GraphicsTypes3D.h: 2012-12-10 Kent Tamura Refactoring: Introduce HTMLFormControlElement::isDisabledOrReadOnly https://bugs.webkit.org/show_bug.cgi?id=104508 Reviewed by Kentaro Hara. We have a lot of code like element->disabled || element->readOnly(). isDisabledOrReadOnly makes them simpler. No new tests. This make no behaivor change. * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::isDisabledOrReadOnly): Added. Note that the implmentation of disabled() is not just "return m_disabled;". * html/BaseChooserOnlyDateAndTimeInputType.cpp: (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent): Use isDisabledOrReadOnly. * html/BaseMultipleFieldsDateAndTimeInputType.cpp: (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToMouseEvents): Ditto. (WebCore::BaseMultipleFieldsDateAndTimeInputType::isPickerIndicatorOwnerDisabledOrReadOnly): Ditto. * html/ColorInputType.cpp: (WebCore::ColorInputType::handleDOMActivateEvent): Ditto. (WebCore::ColorInputType::didChooseColor): Ditto. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::recalcWillValidate): Ditto. * html/HTMLTextAreaElement.h: (WebCore::HTMLTextAreaElement::valueMissing): Ditto. * html/RangeInputType.cpp: (WebCore::RangeInputType::handleMouseDownEvent): Ditto. (WebCore::RangeInputType::handleTouchEvent): Ditto. (WebCore::RangeInputType::handleKeydownEvent): Ditto. * html/SearchInputType.cpp: (WebCore::SearchInputType::handleKeydownEvent): Ditto. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::handleKeydownEventForSpinButton): Ditto. (WebCore::TextFieldInputType::shouldSpinButtonRespondToMouseEvents): Ditto. * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Ditto. (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents): Ditto. (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Ditto. * html/shadow/TextFieldDecorationElement.cpp: (WebCore::TextFieldDecorationElement::defaultEventHandler): Ditto. (WebCore::TextFieldDecorationElement::willRespondToMouseMoveEvents): Ditto. (WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents): Ditto. 2012-12-10 Pavel Feldman Web Inspector: console broken? - console.dirxml behaves like console.log https://bugs.webkit.org/show_bug.cgi?id=104245 Reviewed by Vsevolod Vlasov. Do not generate preview for dirxml. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray): 2012-12-10 Kent Tamura Refactoring: Remove HTMLFormControlElement::setDisabled https://bugs.webkit.org/show_bug.cgi?id=104510 Reviewed by Kentaro Hara. Remove it because the number of call sites is only one, and the setDisabled implementation is equivalent to setBooleanAttribute. No new tests. This should not make behavior changes. * html/HTMLFormControlElement.cpp: Remove setDisabled. * html/HTMLFormControlElement.h: Ditto. * html/FileInputType.cpp: (WebCore::FileInputType::disabledAttributeChanged): Replace setDisabled with setBooleanAttribute. 2012-12-10 Hajime Morrita [Shadow DOM][Refacdtoring] nextTo() and previousTo() can be part of ContentDistribution https://bugs.webkit.org/show_bug.cgi?id=104514 Reviewed by Kentaro Hara. InsertionPoint::nextTo() and InsertionPoint::previousTo() are an query to distributed nodes, which is what ContentDistribution represents. We can move them to better home. No new tests. No behavior change. * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistribution::nextTo): Moved from InsertionPoint (WebCore): (WebCore::ContentDistribution::previousTo): Moved from InsertionPoint * html/shadow/ContentDistributor.h: (ContentDistribution): * html/shadow/InsertionPoint.cpp: * html/shadow/InsertionPoint.h: (WebCore::InsertionPoint::nextTo): Delegated to ContentDistribution (WebCore::InsertionPoint::previousTo): Delegated to ContentDistribution 2012-12-10 Joanmarie Diggs [GTK] accessibility/language-attribute.html is failing https://bugs.webkit.org/show_bug.cgi?id=98369 Reviewed by Chris Fleizach. The test is failing for two reasons: Not exposing the language for accessible objects and AccessibilityUIElement::language() not being implemented. No new tests; instead, unskipped the previously-failing test. * accessibility/atk/WebKitAccessibleInterfaceText.cpp: (getAttributeSetForAccessibilityObject): Expose the language via AtkText attribute 2012-12-09 Takashi Sakamoto [Shadow DOM]: reset-style-inheritance doesn't work for insertion point https://bugs.webkit.org/show_bug.cgi?id=103711 Reviewed by Hajime Morita. reset-style-inheritance can be specified by using insertion points' attribute, e.g. . c.f. shadow dom spec: https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles No new tests. Updated an existing test, fast/dom/shadow/insertion-point-resetStyleInheritance.html to cover this feature. * html/HTMLAttributeNames.in: Added HTMLNames::reset_style_inheritanceAttr. * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::InsertionPoint): (WebCore::InsertionPoint::parseAttribute): Since both shadow and content elements have to support reset-style-inheritance, added InsertionPoint::parseAttribute. (WebCore::InsertionPoint::resetStyleInheritance): (WebCore::InsertionPoint::setResetStyleInheritance): Modified to update reset-style-inheritance attribute value. * html/shadow/InsertionPoint.h: (InsertionPoint): Removed m_shouldResetStyleInheritance. Instead, use reset-style-inheritance attribute value. 2012-12-09 Ilya Tikhonovsky Native Memory Instrumentation: instrument a part of RenderObject class tree. https://bugs.webkit.org/show_bug.cgi?id=103564 Reviewed by Eric Seidel. Many RenderObject descendants have OwnPtrs and RefPtrs members. Looks like we have to instrument all the RenderObject classes and visit all the render objects instead of counting entire render arena memory. * WebCore.exp.in: * dom/Node.cpp: (WebCore::Node::reportMemoryUsage): * dom/WebCoreMemoryInstrumentation.cpp: (WebCore): * inspector/InspectorMemoryAgent.cpp: (WebCore::reportRenderTreeInfo): (WebCore): * platform/PlatformMemoryInstrumentation.cpp: (WebCore): * platform/PlatformMemoryInstrumentation.h: (PlatformMemoryTypes): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::reportMemoryUsage): (WebCore): * platform/graphics/GraphicsLayer.h: (GraphicsLayer): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::reportMemoryUsage): (WebCore): * platform/graphics/chromium/GraphicsLayerChromium.h: (GraphicsLayerChromium): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::reportMemoryUsage): (WebCore): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::reportMemoryUsage): (WebCore): * rendering/RenderBox.h: (RenderBox): * rendering/RenderInline.cpp: (WebCore::RenderInline::reportMemoryUsage): (WebCore): * rendering/RenderInline.h: (RenderInline): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::reportMemoryUsage): (WebCore): * rendering/RenderLayer.h: (RenderLayer): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::reportMemoryUsage): (WebCore): * rendering/RenderLayerBacking.h: (RenderLayerBacking): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::reportMemoryUsage): (WebCore): * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::reportMemoryUsage): (WebCore): * rendering/RenderLayerModelObject.h: (RenderLayerModelObject): * rendering/RenderObject.cpp: (WebCore::RenderObject::reportMemoryUsage): (WebCore): * rendering/RenderObject.h: (RenderObject): * rendering/RenderText.cpp: (WebCore::RenderText::reportMemoryUsage): (WebCore): * rendering/RenderText.h: (RenderText): * rendering/RenderView.cpp: (WebCore::RenderView::reportMemoryUsage): (WebCore): * rendering/RenderView.h: (RenderView): 2012-12-09 Ryosuke Niwa REGRESSION (r137003): failures in MicroData tests on EFL, GTK https://bugs.webkit.org/show_bug.cgi?id=104469 Reviewed by Darin Adler. Fix the regression by calling propertyNodeList on HTMLPropertiesCollection in the named getter for HTMLCollection. It's a miracle that the old code prior to r137003 worked at all since the return type of namedItem was different. Existing tests cover this. * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::nameGetter): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::V8HTMLCollection::namedPropertyGetter): 2012-12-09 Joanmarie Diggs [GTK] accessibility/placeholder.html is failing https://bugs.webkit.org/show_bug.cgi?id=98373 Reviewed by Martin Robinson. The test was failing because the placeholder text was not supported and AccessibilityUIElement::stringAttributeValue() was not implemented. No new tests; instead the failing test was unskipped. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetAttributes): Add the placeholder text as an AtkAttribute of the AtkObject, as is done in Gtk+ 3. 2012-12-09 Kondapally Kalyan [EFL] [WebGL] Path is not resized correctly. https://bugs.webkit.org/show_bug.cgi?id=104458. Reviewed by Kenneth Rohde Christiansen. In GraphicsContext3D::paintToCanvas, we flip the contents and draw on the surface. The operations done to flip the image (translation and scale) are done before rectangle with correct size is added to current path. This resulted in updating pixels at wrong positions. Covered by existing tests. * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::paintToCanvas): 2012-12-09 Joone Hur [GTK][AC] build fix after r130525 and r133332 https://bugs.webkit.org/show_bug.cgi?id=104491 Reviewed by Martin Robinson. Build fix for Accelerated Compositing Clutter backend after r130525 and r133332. * platform/graphics/clutter/GraphicsLayerClutter.cpp: * platform/gtk/RedirectedXCompositeWindow.cpp: * platform/gtk/RedirectedXCompositeWindow.h: 2012-12-09 Carlos Garcia Campos [GTK] Use GObject casts instead of C++ cast for GObjects in DOM bindings https://bugs.webkit.org/show_bug.cgi?id=104492 Reviewed by Martin Robinson. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateCFile): * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp: (WebKit::kit): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (WebKit::kit): 2012-12-09 Pavel Feldman Web Inspector: do not treat object as equal to itself when logging to console https://bugs.webkit.org/show_bug.cgi?id=104487 Reviewed by Alexander Pavlov. Otherwise, mutating object in a loop results in the repeat count update instead of generation of the new preview. Test: inspector/console/console-object-preview.html * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::isEqual): 2012-12-09 Carlos Garcia Campos Remove unused code in GObject DOM bindings generator https://bugs.webkit.org/show_bug.cgi?id=104490 Reviewed by Martin Robinson. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateProperties): Remove code to install event listeners and signals. 2012-12-09 Zan Dobersek Unreviewed update for the GObject bindings after r137074 and r137078. * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: (webkit_dom_test_event_target_dispatch_event): * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (webkit_dom_test_interface_supplemental_method2): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_method_that_requires_all_args_and_throws): (webkit_dom_test_obj_method_with_exception): (webkit_dom_test_obj_with_script_state_void_exception): (webkit_dom_test_obj_with_script_state_obj_exception): (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception): (webkit_dom_test_obj_strict_function): (webkit_dom_test_obj_get_attr_with_getter_exception): (webkit_dom_test_obj_set_attr_with_setter_exception): (webkit_dom_test_obj_get_string_attr_with_getter_exception): (webkit_dom_test_obj_set_string_attr_with_setter_exception): (webkit_dom_test_obj_get_with_script_state_attribute_raises): (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises): 2012-12-09 Carlos Garcia Campos Fix the GError check in GObject DOM bindings. Reviewed by Xan Lopez. Previous commit introduced a check to make sure the passed GError is valid in all DOM methods receiving an error. * bindings/scripts/CodeGeneratorGObject.pm: (GetGReturnMacro): Check that the passed GError either is NULL or the pointer has been initialized to NULL. 2012-12-09 Leo Yang [BlackBerry] Adapt to name change of createNetworkBufferByCopyingData() https://bugs.webkit.org/show_bug.cgi?id=104449 Reviewed by Rob Buis. Name change no new tests. * platform/network/blackberry/rss/RSSFilterStream.cpp: (WebCore::RSSFilterStream::handleRSSContent): 2012-12-09 Carlos Garcia Campos [GTK] Clean up g_return macros usage in GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=101079 Reviewed by Xan Lopez. Several improvements: - Move g_return macros at the beginning of the methods. - Use them only to check parameters of public API. - Use GObject macros to check GObjects. - Check also GError parameters. - Use early returns in kit and core methods, since they should work even if g_return macros are disabled handling NULL gracefully. * bindings/scripts/CodeGeneratorGObject.pm: (GetGReturnMacro): (GenerateFunction): (GenerateCFile): (Generate): * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapFloat64Array): (webkit_dom_float64array_foo): * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestActiveDOMObject): (webkit_dom_test_active_dom_object_exciting_function): (webkit_dom_test_active_dom_object_post_message): (webkit_dom_test_active_dom_object_get_exciting_attr): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestCallback): (webkit_dom_test_callback_callback_with_no_param): (webkit_dom_test_callback_callback_with_class1param): (webkit_dom_test_callback_callback_with_class2param): (webkit_dom_test_callback_callback_with_non_bool_return_type): (webkit_dom_test_callback_callback_with_string_list): (webkit_dom_test_callback_callback_with_boolean): (webkit_dom_test_callback_callback_requires_this_to_pass): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestCustomNamedGetter): (webkit_dom_test_custom_named_getter_another_function): * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestEventConstructor): (webkit_dom_test_event_constructor_get_attr1): (webkit_dom_test_event_constructor_get_attr2): * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestEventTarget): (webkit_dom_test_event_target_item): (webkit_dom_test_event_target_dispatch_event): * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestException): (webkit_dom_test_exception_get_name): * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestInterface): (webkit_dom_test_interface_supplemental_method1): (webkit_dom_test_interface_supplemental_method2): (webkit_dom_test_interface_supplemental_method4): (webkit_dom_test_interface_get_supplemental_str1): (webkit_dom_test_interface_get_supplemental_str2): (webkit_dom_test_interface_set_supplemental_str2): (webkit_dom_test_interface_get_supplemental_node): (webkit_dom_test_interface_set_supplemental_node): * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestMediaQueryListListener): * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestNamedConstructor): * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestNode): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestObj): (webkit_dom_test_obj_void_method): (webkit_dom_test_obj_void_method_with_args): (webkit_dom_test_obj_long_method): (webkit_dom_test_obj_long_method_with_args): (webkit_dom_test_obj_obj_method): (webkit_dom_test_obj_obj_method_with_args): (webkit_dom_test_obj_method_that_requires_all_args_and_throws): (webkit_dom_test_obj_serialized_value): (webkit_dom_test_obj_idb_key): (webkit_dom_test_obj_options_object): (webkit_dom_test_obj_method_with_exception): (webkit_dom_test_obj_with_script_state_void): (webkit_dom_test_obj_with_script_state_obj): (webkit_dom_test_obj_with_script_state_void_exception): (webkit_dom_test_obj_with_script_state_obj_exception): (webkit_dom_test_obj_with_script_execution_context): (webkit_dom_test_obj_with_script_execution_context_and_script_state): (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception): (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces): (webkit_dom_test_obj_method_with_optional_arg): (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg): (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args): (webkit_dom_test_obj_method_with_optional_string): (webkit_dom_test_obj_method_with_optional_string_is_undefined): (webkit_dom_test_obj_method_with_optional_string_is_null_string): (webkit_dom_test_obj_conditional_method1): (webkit_dom_test_obj_conditional_method2): (webkit_dom_test_obj_conditional_method3): (webkit_dom_test_obj_class_method): (webkit_dom_test_obj_class_method_with_optional): (webkit_dom_test_obj_overloaded_method1): (webkit_dom_test_obj_convert1): (webkit_dom_test_obj_convert2): (webkit_dom_test_obj_convert4): (webkit_dom_test_obj_convert5): (webkit_dom_test_obj_mutable_point_function): (webkit_dom_test_obj_immutable_point_function): (webkit_dom_test_obj_orange): (webkit_dom_test_obj_strict_function): (webkit_dom_test_obj_variadic_string_method): (webkit_dom_test_obj_variadic_double_method): (webkit_dom_test_obj_variadic_node_method): (webkit_dom_test_obj_get_read_only_long_attr): (webkit_dom_test_obj_get_read_only_string_attr): (webkit_dom_test_obj_get_read_only_test_obj_attr): (webkit_dom_test_obj_get_short_attr): (webkit_dom_test_obj_set_short_attr): (webkit_dom_test_obj_get_unsigned_short_attr): (webkit_dom_test_obj_set_unsigned_short_attr): (webkit_dom_test_obj_get_long_attr): (webkit_dom_test_obj_set_long_attr): (webkit_dom_test_obj_get_long_long_attr): (webkit_dom_test_obj_set_long_long_attr): (webkit_dom_test_obj_get_unsigned_long_long_attr): (webkit_dom_test_obj_set_unsigned_long_long_attr): (webkit_dom_test_obj_get_string_attr): (webkit_dom_test_obj_set_string_attr): (webkit_dom_test_obj_get_test_obj_attr): (webkit_dom_test_obj_set_test_obj_attr): (webkit_dom_test_obj_get_xml_obj_attr): (webkit_dom_test_obj_set_xml_obj_attr): (webkit_dom_test_obj_get_create): (webkit_dom_test_obj_set_create): (webkit_dom_test_obj_get_reflected_string_attr): (webkit_dom_test_obj_set_reflected_string_attr): (webkit_dom_test_obj_get_reflected_integral_attr): (webkit_dom_test_obj_set_reflected_integral_attr): (webkit_dom_test_obj_get_reflected_unsigned_integral_attr): (webkit_dom_test_obj_set_reflected_unsigned_integral_attr): (webkit_dom_test_obj_get_reflected_boolean_attr): (webkit_dom_test_obj_set_reflected_boolean_attr): (webkit_dom_test_obj_get_reflected_url_attr): (webkit_dom_test_obj_set_reflected_url_attr): (webkit_dom_test_obj_get_reflected_custom_integral_attr): (webkit_dom_test_obj_set_reflected_custom_integral_attr): (webkit_dom_test_obj_get_reflected_custom_boolean_attr): (webkit_dom_test_obj_set_reflected_custom_boolean_attr): (webkit_dom_test_obj_get_reflected_custom_url_attr): (webkit_dom_test_obj_set_reflected_custom_url_attr): (webkit_dom_test_obj_get_attr_with_getter_exception): (webkit_dom_test_obj_set_attr_with_getter_exception): (webkit_dom_test_obj_get_attr_with_setter_exception): (webkit_dom_test_obj_set_attr_with_setter_exception): (webkit_dom_test_obj_get_string_attr_with_getter_exception): (webkit_dom_test_obj_set_string_attr_with_getter_exception): (webkit_dom_test_obj_get_string_attr_with_setter_exception): (webkit_dom_test_obj_set_string_attr_with_setter_exception): (webkit_dom_test_obj_get_with_script_state_attribute): (webkit_dom_test_obj_set_with_script_state_attribute): (webkit_dom_test_obj_get_with_script_execution_context_attribute): (webkit_dom_test_obj_set_with_script_execution_context_attribute): (webkit_dom_test_obj_get_with_script_state_attribute_raises): (webkit_dom_test_obj_set_with_script_state_attribute_raises): (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises): (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute): (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises): (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises): (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute): (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute): (webkit_dom_test_obj_get_conditional_attr1): (webkit_dom_test_obj_set_conditional_attr1): (webkit_dom_test_obj_get_conditional_attr2): (webkit_dom_test_obj_set_conditional_attr2): (webkit_dom_test_obj_get_conditional_attr3): (webkit_dom_test_obj_set_conditional_attr3): (webkit_dom_test_obj_get_any_attribute): (webkit_dom_test_obj_set_any_attribute): (webkit_dom_test_obj_get_content_document): (webkit_dom_test_obj_get_mutable_point): (webkit_dom_test_obj_set_mutable_point): (webkit_dom_test_obj_get_immutable_point): (webkit_dom_test_obj_set_immutable_point): (webkit_dom_test_obj_get_strawberry): (webkit_dom_test_obj_set_strawberry): (webkit_dom_test_obj_get_strict_float): (webkit_dom_test_obj_set_strict_float): (webkit_dom_test_obj_get_description): (webkit_dom_test_obj_get_id): (webkit_dom_test_obj_set_id): (webkit_dom_test_obj_get_hash): (webkit_dom_test_obj_get_replaceable_attribute): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestSerializedScriptValueInterface): (webkit_dom_test_serialized_script_value_interface_accept_transfer_list): (webkit_dom_test_serialized_script_value_interface_multi_transfer_list): (webkit_dom_test_serialized_script_value_interface_get_value): (webkit_dom_test_serialized_script_value_interface_set_value): (webkit_dom_test_serialized_script_value_interface_get_readonly_value): (webkit_dom_test_serialized_script_value_interface_get_cached_value): (webkit_dom_test_serialized_script_value_interface_set_cached_value): (webkit_dom_test_serialized_script_value_interface_get_ports): (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value): 2012-12-09 Carlos Garcia Campos [GTK] Use a private struct and placement new syntax in GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=101074 Reviewed by Xan Lopez. It allows to use RefPtr for the wrapped object and it simplifies the code. Only the classes deriving from WebKitDOMObject keep a reference of the wrapped object in a private struct. The wrapped object is added to the cache in GObjectClass::constructor() and removed in GObjectClass::finalize(). * bindings/gobject/WebKitDOMBinding.cpp: (WebKit::createWrapper): (WebKit::kit): (WebKit::wrapEventTarget): * bindings/scripts/CodeGeneratorGObject.pm: (GetParentImplClassName): (GenerateProperties): (GenerateCFile): (Generate): (WriteData): * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapFloat64Array): (webkit_dom_float64array_class_init): * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: (_WebKitDOMTestActiveDOMObjectPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestActiveDOMObject): (webkit_dom_test_active_dom_object_finalize): (webkit_dom_test_active_dom_object_constructor): (webkit_dom_test_active_dom_object_class_init): (webkit_dom_test_active_dom_object_init): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (_WebKitDOMTestCallbackPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestCallback): (webkit_dom_test_callback_finalize): (webkit_dom_test_callback_constructor): (webkit_dom_test_callback_class_init): (webkit_dom_test_callback_init): * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp: (_WebKitDOMTestCustomNamedGetterPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestCustomNamedGetter): (webkit_dom_test_custom_named_getter_finalize): (webkit_dom_test_custom_named_getter_constructor): (webkit_dom_test_custom_named_getter_class_init): (webkit_dom_test_custom_named_getter_init): * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp: (_WebKitDOMTestEventConstructorPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestEventConstructor): (webkit_dom_test_event_constructor_finalize): (webkit_dom_test_event_constructor_constructor): (webkit_dom_test_event_constructor_class_init): (webkit_dom_test_event_constructor_init): * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: (_WebKitDOMTestEventTargetPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestEventTarget): (webkit_dom_test_event_target_finalize): (webkit_dom_test_event_target_constructor): (webkit_dom_test_event_target_class_init): (webkit_dom_test_event_target_init): * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: (_WebKitDOMTestExceptionPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestException): (webkit_dom_test_exception_finalize): (webkit_dom_test_exception_constructor): (webkit_dom_test_exception_class_init): (webkit_dom_test_exception_init): * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: (_WebKitDOMTestInterfacePrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestInterface): (webkit_dom_test_interface_finalize): (webkit_dom_test_interface_constructor): (webkit_dom_test_interface_class_init): (webkit_dom_test_interface_init): * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: (_WebKitDOMTestMediaQueryListListenerPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestMediaQueryListListener): (webkit_dom_test_media_query_list_listener_finalize): (webkit_dom_test_media_query_list_listener_constructor): (webkit_dom_test_media_query_list_listener_class_init): (webkit_dom_test_media_query_list_listener_init): * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp: (_WebKitDOMTestNamedConstructorPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestNamedConstructor): (webkit_dom_test_named_constructor_finalize): (webkit_dom_test_named_constructor_constructor): (webkit_dom_test_named_constructor_class_init): (webkit_dom_test_named_constructor_init): * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: (WebKit::kit): (WebKit::core): (WebKit::wrapTestNode): (webkit_dom_test_node_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (_WebKitDOMTestObjPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestObj): (webkit_dom_test_obj_finalize): (webkit_dom_test_obj_constructor): (webkit_dom_test_obj_class_init): (webkit_dom_test_obj_init): * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp: (_WebKitDOMTestOverloadedConstructorsPrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestOverloadedConstructors): (webkit_dom_test_overloaded_constructors_finalize): (webkit_dom_test_overloaded_constructors_constructor): (webkit_dom_test_overloaded_constructors_class_init): (webkit_dom_test_overloaded_constructors_init): * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: (_WebKitDOMTestSerializedScriptValueInterfacePrivate): (WebKit::kit): (WebKit::core): (WebKit::wrapTestSerializedScriptValueInterface): (webkit_dom_test_serialized_script_value_interface_finalize): (webkit_dom_test_serialized_script_value_interface_constructor): (webkit_dom_test_serialized_script_value_interface_class_init): (webkit_dom_test_serialized_script_value_interface_init): 2012-12-09 Jon Lee [WK2] Move button image to injected bundle https://bugs.webkit.org/show_bug.cgi?id=104107 Reviewed by Simon Fraser. Update RenderSnapshottedPlugIn to retrieve the start button image from the ChromeClient. Expand the kinds of images available for use as the button. Try to find the best sized button to use for the plug-in, otherwise use no image at all. * rendering/RenderSnapshottedPlugIn.h: Add an enum representing the size to use. Remove the label rect variable since it is unneeded. * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::startLabelImage): Maintain a cache of the images for reuse. Index into the array using the enum. If the image has been loaded, or an attempt was made, then return the result. Otherwise ask the chrome client for the image. (WebCore::RenderSnapshottedPlugIn::paintLabel): Determine the proper label to use, and paint if the image is available. (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel): Compare the label size with the provided content box. Return a LayoutRect representing the label's placement. If it doesn't fit, return an empty rect. (WebCore::RenderSnapshottedPlugIn::layout): The rect is not needed because it is all determined at paint time. * page/ChromeClient.h: (WebCore::ChromeClient::plugInStartLabelImage): Added. * WebCore.exp.in: Expose GraphicsContext::drawNativeImage() for WKImageCG.cpp. * WebCore.xcodeproj/project.pbxproj: Remove start button assets. * Resources/startButton.png: Removed. * Resources/startButton@2x.png: Removed. 2012-12-09 Sheriff Bot Unreviewed, rolling out r137053. http://trac.webkit.org/changeset/137053 https://bugs.webkit.org/show_bug.cgi?id=104471 Broke PerformanceTests/Parser/html-parser.html (Requested by mkwst_ on #webkit). * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::canExecuteScripts): 2012-12-09 Kangil Han Fix unused parameter compile warnings https://bugs.webkit.org/show_bug.cgi?id=104463 Reviewed by Kentaro Hara. Remove compile warning messages by omitting parameter name. * platform/graphics/surfaces/GraphicsSurface.cpp: (WebCore::GraphicsSurface::GraphicsSurface): 2012-12-08 Rakesh KN Build break if SVG is disabled https://bugs.webkit.org/show_bug.cgi?id=104452 Reviewed by Darin Adler. Build breaking after r136975 if SVG is disabled. No new tests required. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::buildReferenceFilter): As document is not an argument anymore, removing UNUSED_PARAM against it. * rendering/FilterEffectRenderer.h: Added forward declaration for RenderObject. 2012-12-08 Mike West Log to console when script is blocked by sandbox attributes. https://bugs.webkit.org/show_bug.cgi?id=104365 Reviewed by Ojan Vafai. Adds a console message to cover script execution blocked within the context of a sandboxed frame which lacks the 'allow-scripts' permission. * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::canExecuteScripts): Log a warning when sandboxing flags block script execution. 2012-12-08 No'am Rosenthal Use background color for GraphicsLayers when applicable https://bugs.webkit.org/show_bug.cgi?id=103786 Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place: 1. The layer doesn't paint its own content, other than background/decoration. 2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.) 3. The image has only a background color, and no background image. 4. background-composite is set to source-over, and background-clip is anything apart from text. 5. The port supports setContentsToBackgroundColor. This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store for that layer, but instead draw that solid color directly. In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's background-clip property. Reviewed by Simon Fraser. Tests: compositing/background-color/background-color-alpha.html compositing/background-color/background-color-change-to-text.html compositing/background-color/background-color-composite.html compositing/background-color/background-color-container.html compositing/background-color/background-color-content-clip.html compositing/background-color/background-color-padding-change.html compositing/background-color/background-color-padding-clip.html compositing/background-color/background-color-simple.html compositing/background-color/background-color-text-change.html compositing/background-color/background-color-text-clip.html * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::supportsBackgroundColorContent): Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor. Currently only the MAC implementation and TextureMapper falls under that category. * rendering/RenderBox.h: (WebCore::RenderBox::paddingBoxRect): Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to background-clip: padding. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Update the background color if needed, for every configuration change. This should accomodate the old behavior for full-screen, while enabling background color changes for other layers. (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Move the contentsRect logic to updateContentsRect. (WebCore::RenderLayerBacking::updateContentsRect): Use the background box when directly compositing backgrounds. (WebCore::RenderLayerBacking::updateBackgroundColor): Set the background color if applicable, otherwise set to trasnparent and clear. This was not needed in the past because background colors were only used for the special case of full-screen. (WebCore::supportsDirectBoxDecorationsComposition): Helper function to determine whether a particular background can be directly composited. Right now only background color can be composited, and only if the GraphicsLayer implementation supports background colors. Also we don't yet support background-clip: text and any background-composite other than source-over. (WebCore::RenderLayerBacking::paintsBoxDecorations): Apply the new supportsDirectBoxDecorationsComposition logic. (WebCore::RenderLayerBacking::contentsBox): Remove unnecessary local variable. (WebCore::backgroundRectForBox): (WebCore::RenderLayerBacking::backgroundBox): Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip. The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as GraphicsLayer::contentsRect expects snapped pixels. 2012-12-08 Patrick Gansterer Build fix for WinCE after r137011. * platform/graphics/GraphicsContext.h: * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): (WebCore::GraphicsContext::drawBitmap): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::BufferedImage::draw): (WebCore::ImageBuffer::draw): * platform/graphics/wince/ImageWinCE.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): (WebCore::BitmapImage::draw): * platform/graphics/wince/SharedBitmap.cpp: (WebCore::SharedBitmap::draw): * platform/graphics/wince/SharedBitmap.h: 2012-12-08 Gavin Peters Add status events on elements. https://bugs.webkit.org/show_bug.cgi?id=96474 Reviewed by Adam Barth. The new PrerenderStatusEvent is sent to link elements when prerenders are started by the embedder, and also sent when they are stopped. Pages using this feature can now serialize launching prerenders, and track timing performance. Tested in a new WebKitUnitTest for the chromium port. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/EventNames.h: (WebCore): * html/HTMLLinkElement.cpp: (WebCore): (WebCore::HTMLLinkElement::didStartLinkPrerender): (WebCore::HTMLLinkElement::didStopLinkPrerender): (WebCore::HTMLLinkElement::didSendLoadForLinkPrerender): (WebCore::HTMLLinkElement::didSendDOMContentLoadedForLinkPrerender): * html/HTMLLinkElement.h: (HTMLLinkElement): * loader/LinkLoader.cpp: (WebCore::LinkLoader::didStartPrerender): (WebCore): (WebCore::LinkLoader::didStopPrerender): (WebCore::LinkLoader::didSendLoadForPrerender): (WebCore::LinkLoader::didSendDOMContentLoadedForPrerender): (WebCore::LinkLoader::loadLink): * loader/LinkLoader.h: (LinkLoader): * loader/LinkLoaderClient.h: (LinkLoaderClient): * loader/Prerenderer.cpp: (WebCore::Prerenderer::render): * loader/Prerenderer.h: (WebCore): (Prerenderer): * platform/PrerenderClient.h: Copied from Source/WebCore/loader/LinkLoaderClient.h. (WebCore): (PrerenderClient): (WebCore::PrerenderClient::~PrerenderClient): * platform/PrerenderHandle.h: (WebCore): (PrerenderHandle): * platform/chromium/Prerender.cpp: (WebCore::Prerender::Prerender): (WebCore::Prerender::removeClient): (WebCore): (WebCore::Prerender::add): (WebCore::Prerender::cancel): (WebCore::Prerender::abandon): (WebCore::Prerender::didStartPrerender): (WebCore::Prerender::didStopPrerender): (WebCore::Prerender::didSendLoadForPrerender): (WebCore::Prerender::didSendDOMContentLoadedForPrerender): * platform/chromium/Prerender.h: (WebKit): (WebCore): (Prerender): * platform/chromium/PrerenderHandle.cpp: (WebCore::PrerenderHandle::create): (WebCore::PrerenderHandle::PrerenderHandle): (WebCore::PrerenderHandle::~PrerenderHandle): (WebCore::PrerenderHandle::removeClient): (WebCore): * platform/chromium/support/WebPrerender.cpp: (WebKit::WebPrerender::toPrerender): (WebKit): (WebKit::WebPrerender::assign): (WebKit::WebPrerender::isNull): (WebKit::WebPrerender::didStartPrerender): (WebKit::WebPrerender::didStopPrerender): (WebKit::WebPrerender::didSendLoadForPrerender): (WebKit::WebPrerender::didSendDOMContentLoadedForPrerender): 2012-12-08 Gustavo Noronha Silva Reviewed by Martin Robinson. Update the Chromium/Chrome version we advertise in our User-Agent string to version 25, to better match our current reality. * platform/gtk/UserAgentGtk.cpp: (WebCore::standardUserAgent): 2012-12-08 Sheriff Bot Unreviewed, rolling out r137006. http://trac.webkit.org/changeset/137006 https://bugs.webkit.org/show_bug.cgi?id=104446 Broke plugin painting on Mac (youtube, etc.) (Requested by thorton_ on #webkit). * platform/graphics/GraphicsLayer.h: (GraphicsLayer): * rendering/RenderBox.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): (WebCore::clipBox): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::updateDrawsContent): (WebCore::RenderLayerBacking::updateBackgroundColor): (WebCore::RenderLayerBacking::paintsBoxDecorations): (WebCore::RenderLayerBacking::contentChanged): (WebCore::RenderLayerBacking::updateImageContents): (WebCore::RenderLayerBacking::contentsBox): * rendering/RenderLayerBacking.h: (RenderLayerBacking): 2012-12-08 Wei James Remove incorrect ASSERT for m_error in CachedResource https://bugs.webkit.org/show_bug.cgi?id=104333 Reviewed by Nate Chapin. This assertion was brought in https://bugs.webkit.org/show_bug.cgi?id=100901 When the request is canceled, m_error.isNull() should be true. run webkit_unit_tests Debug build. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::stopLoading): 2012-12-08 Ryosuke Niwa Qt Linux Minimal build fix after r136975. * dom/ElementRareData.h: (ElementRareData): 2012-12-08 Ryosuke Niwa Qt Linux Minimal build fix attempt after r136959. * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::layerTreeDidChange): (WebCore::InspectorInstrumentation::renderLayerDestroyed): 2012-12-08 Xan Lopez Build fix after r137003. Wrap Microdata only sections with ENABLE(MICRODATA). * dom/NodeRareData.h: (NodeRareData): 2012-12-08 Ryosuke Niwa Build fix after r137003. Wrap NodeMutationObserverData with ENABLE(MUTATION_OBSERVERS). * dom/NodeRareData.h: (NodeRareData): 2012-12-08 Patrick Gansterer Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r136975. * rendering/svg/SVGResources.cpp: (WebCore::SVGResources::buildCachedResources): 2012-12-08 Adam Klein HTMLTemplateElement.innerHTML should be parsed into the template contents owner document https://bugs.webkit.org/show_bug.cgi?id=104407 Reviewed by Eric Seidel. When parsing via innerHTML, ensure that all operations (including the initial fragment creation) occur in the proper document to avoid, e.g., images loading while being parsed into the template contents. This matches the parsing behavior during page load. Test: fast/dom/HTMLTemplateElement/innerHTML-inert.html * editing/markup.cpp: (WebCore::createFragmentForInnerOuterHTML): 2012-12-08 ChangSeok Oh Assertion failed at WebCore::RedirectedXCompositeWindow::context() https://bugs.webkit.org/show_bug.cgi?id=104349 Reviewed by Martin Robinson. We should return GLContext if m_needsContext is CreateGLContext. By the way CreateGLContext is a enum value and its default value is 0. So checking ASSERT(m_needsContext) causes a crash on debug build. ASSERT(m_needsContext == CreateGLContext) is better here. No new tests since we can verify this with already existing AC tests. * platform/gtk/RedirectedXCompositeWindow.cpp: (WebCore::RedirectedXCompositeWindow::context): 2012-12-07 Rik Cabanier Extend platform layer so it can pass blend modes to the compositing calls https://bugs.webkit.org/show_bug.cgi?id=104176 Reviewed by Dirk Schulze. Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context No new tests, no new functionality. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * platform/graphics/BitmapImage.h: * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::draw): * platform/graphics/CrossfadeGeneratedImage.h: (CrossfadeGeneratedImage): * platform/graphics/GeneratedImage.h: (GeneratedImage): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::draw): * platform/graphics/GeneratorGeneratedImage.h: (GeneratorGeneratedImage): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::setCompositeOperation): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContextState::GraphicsContextState): (GraphicsContextState): (GraphicsContext): * platform/graphics/Image.cpp: (WebCore::Image::draw): (WebCore::Image::drawTiled): * platform/graphics/Image.h: (Image): * platform/graphics/ImageBuffer.h: (ImageBuffer): * platform/graphics/cairo/BitmapImageCairo.cpp: (WebCore::BitmapImage::draw): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/cg/BitmapImageCG.cpp: (WebCore::BitmapImage::draw): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::draw): * platform/graphics/cg/PDFDocumentImage.h: (PDFDocumentImage): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::draw): * platform/graphics/qt/StillImageQt.cpp: (WebCore::StillImage::draw): * platform/graphics/qt/StillImageQt.h: (StillImage): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (BitmapImageSingleFrameSkia): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImageSingleFrameSkia::draw): * platform/graphics/win/ImageCGWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawSVGToImageBuffer): (WebCore::SVGImage::draw): (WebCore::SVGImage::nativeImageForCurrentFrame): * svg/graphics/SVGImage.h: (SVGImage): 2012-12-07 Alpha Lam [chromium] ImageDecodingStore should cache partially decoded images https://bugs.webkit.org/show_bug.cgi?id=103796 Reviewed by Stephen White. Implement caching for incomplete images, meaning the image is partially decoded. The image is cached together with partially decoded ImageDecoder. This allows decoding to resume in a later time. Caching logic for incomplete images is implemented in ImageDecodingStore. Logic for resuming image decoding is implemented in ImageFrameGenerator. ImageDecodingStore allows storing incomplete image with the decoder. The cache entry can be used in a later time to read and write (i.e. resume decoding.) To avoid the same entry being written and read at the same time, an incomplete entry can be used by one user only. Concurrent access to an incomplete entry should never happen and is checked by an assert. An entry can becomes complete when decoding is finished. In this case the associated decoder is deleted. Once an entry becomes complete concurrent read is allowed. ImageFrameGenerator performs the logic to resume image decoding. It performs the following operations in sequence: - Try to lookup a complete image - Try to perform scaling on a complete image - Try to lookup an incomplete image and resume decoding & scaling - Everything fails, start decoding from scratch The entire sequence of operations in under a mutex, hence there will be no more than 1 user of an incomplete cache entry at the same time. New unit tests in ImageDecodingStoreTest and ImageFrameGeneratorTest. * platform/graphics/chromium/ImageDecodingStore.cpp: (WebCore::ImageDecodingStore::lockCache): Change of method definition to return an image and ImageDecoder. (WebCore::ImageDecodingStore::unlockCache): (WebCore::ImageDecodingStore::insertAndLockCache): (WebCore::ImageDecodingStore::overwriteAndLockCache): New method to allow an incomplete cache entry be overwritten. (WebCore): * platform/graphics/chromium/ImageDecodingStore.h: (ImageDecodingStore): (WebCore::ImageDecodingStore::CacheEntry::createAndUse): (WebCore::ImageDecodingStore::CacheEntry::CacheEntry): (WebCore::ImageDecodingStore::CacheEntry::cachedImage): (WebCore::ImageDecodingStore::CacheEntry::cachedDecoder): (WebCore::ImageDecodingStore::CacheEntry::releaseCachedDecoder): (WebCore::ImageDecodingStore::CacheEntry::overwriteCachedImage): New method to allow an incomplete image be overwitten. (CacheEntry): * platform/graphics/chromium/ImageFrameGenerator.cpp: (WebCore::ImageFrameGenerator::ImageFrameGenerator): (WebCore::ImageFrameGenerator::decodeAndScale): (WebCore::ImageFrameGenerator::tryToLockCompleteCache): (WebCore::ImageFrameGenerator::tryToScale): (WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale): New method to lookup an incomplete cache entry and resume decoding. (WebCore): (WebCore::ImageFrameGenerator::tryToDecodeAndScale): (WebCore::ImageFrameGenerator::decoder): New helper method to do decoding for a full sized image. (WebCore::ImageFrameGenerator::prepareData): New helper method to prepare data safely. * platform/graphics/chromium/ImageFrameGenerator.h: (ImageFrameGenerator): * platform/graphics/chromium/LazyDecodingPixelRef.cpp: (WebCore::LazyDecodingPixelRef::onLockPixels): * platform/graphics/chromium/ScaledImageFragment.h: (WebCore::ScaledImageFragment::setIsComplete): 2012-12-07 Alexis Menard Enable CSS3 position offset for CSS Masking. https://bugs.webkit.org/show_bug.cgi?id=104252 Reviewed by Dirk Schulze. To follow CSS3 background-position, mask-position should also support the new type (http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#mask-property). Now the code is shared between background and mask I renamed the functions used to be more generic. Note that the feature flag is not meant to stay and will be removed in a following commit. No new tests : I modified LayoutTests/fast/masking/parsing-mask.html to cover the new feature. * css/CSSComputedStyleDeclaration.cpp: (WebCore::createPositionListForLayer): * css/CSSParser.cpp: (WebCore::isFillPositionKeyword): (WebCore::CSSParser::parse4ValuesFillPosition): (WebCore::CSSParser::parse3ValuesFillPosition): (WebCore::CSSParser::isPotentialPositionValue): (WebCore::CSSParser::parseFillPosition): (WebCore::CSSParser::parse2ValuesFillPosition): (WebCore::CSSParser::parseFillProperty): (WebCore::CSSParser::parseTransformOriginShorthand): (WebCore::CSSParser::parseRadialGradient): (WebCore::CSSParser::parsePerspectiveOrigin): * css/CSSParser.h: * css/CSSToStyleMap.cpp: (WebCore::CSSToStyleMap::mapFillXPosition): (WebCore::CSSToStyleMap::mapFillYPosition): 2012-12-07 No'am Rosenthal Use background color for GraphicsLayers when applicable https://bugs.webkit.org/show_bug.cgi?id=103786 Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place: 1. The layer doesn't paint its own content, other than background/decoration. 2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.) 3. The image has only a background color, and no background image. 4. background-composite is set to source-over, and background-clip is anything apart from text. 5. The port supports setContentsToBackgroundColor. This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store for that layer, but instead draw that solid color directly. In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's background-clip property. Reviewed by Simon Fraser. Tests: compositing/background-color/background-color-alpha.html compositing/background-color/background-color-change-to-text.html compositing/background-color/background-color-composite.html compositing/background-color/background-color-container.html compositing/background-color/background-color-content-clip.html compositing/background-color/background-color-padding-change.html compositing/background-color/background-color-padding-clip.html compositing/background-color/background-color-simple.html compositing/background-color/background-color-text-change.html compositing/background-color/background-color-text-clip.html * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::supportsBackgroundColorContent): Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor. Currently only the MAC implementation and TextureMapper falls under that category. * rendering/RenderBox.h: (WebCore::RenderBox::paddingBoxRect): Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to background-clip: padding. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Update the background color if needed, for every configuration change. This should accomodate the old behavior for full-screen, while enabling background color changes for other layers. (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Move the contentsRect logic to updateContentsRect. (WebCore::RenderLayerBacking::updateContentsRect): Use the background box when directly compositing backgrounds. (WebCore::RenderLayerBacking::updateBackgroundColor): Set the background color if applicable, otherwise set to trasnparent and clear. This was not needed in the past because background colors were only used for the special case of full-screen. (WebCore::supportsDirectBoxDecorationsComposition): Helper function to determine whether a particular background can be directly composited. Right now only background color can be composited, and only if the GraphicsLayer implementation supports background colors. Also we don't yet support background-clip: text and any background-composite other than source-over. (WebCore::RenderLayerBacking::paintsBoxDecorations): Apply the new supportsDirectBoxDecorationsComposition logic. (WebCore::RenderLayerBacking::contentsBox): Remove unnecessary local variable. (WebCore::backgroundRectForBox): (WebCore::RenderLayerBacking::backgroundBox): Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip. The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as GraphicsLayer::contentsRect expects snapped pixels. 2012-12-06 Ryosuke Niwa Shrink the size of NodeRareData by moving pointers into separate objects https://bugs.webkit.org/show_bug.cgi?id=104312 Reviewed by Andreas Kling. This patch does three things: 1. Move ChildNodeList back into NodeListsNodeData. 2. Move m_mutationObserverRegistry & m_transientMutationObserverRegistry into a separate object owned by NodeRareData. 3. Move m_itemProp, m_itemRef, m_itemType & into a separate object owned by NodeRareData. Moving m_childNodeList from NodeRareData to NodeListsNodeData also has a nice side-effect of making ChildNodeList behave more like other LiveNodeLists. This patch also fixes Mac build when microdata is enabled. There should be no user-visible behavior change. * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::~ChildNodeList): * dom/Node.cpp: (WebCore::Node::childNodes): Moved the code to create ChildNodeList into NodeListsNodeData to match other node lists. (WebCore::Node::invalidateNodeListCachesInAncestors): (WebCore): Removed removeCachedChildNodeList. * dom/Node.h: (Node): * dom/NodeRareData.cpp: (WebCore): Assert the size of NodeRareData at compilation time. (WebCore::NodeListsNodeData::reportMemoryUsage): (WebCore::NodeRareData::reportMemoryUsage): * dom/NodeRareData.h: (WebCore::NodeListsNodeData::clearChildNodeListCache): Moved from NodeRareData. (WebCore::NodeListsNodeData::ensureChildNodeList): Extracted from Node::childNodes. (WebCore::NodeListsNodeData::removeChildNodeList): Added. (WebCore::NodeListsNodeData::NodeListsNodeData): Initialize m_childNodeList. (WebCore::NodeRareData::NodeMutationObserverData): Extracted from NodeRareData. (WebCore::NodeRareData::NodeMutationObserverData::create): (WebCore::NodeRareData::NodeMicroDataTokenLists): Ditto. (WebCore::NodeRareData::NodeMicroDataTokenLists::create): (WebCore::NodeRareData::NodeRareData): (WebCore::NodeRareData::ensureNodeLists): Merged setNodeLists since it's not called elsewhere. (WebCore::NodeRareData::mutationObserverRegistry): (WebCore::NodeRareData::ensureMutationObserverRegistry): Added. (WebCore::NodeRareData::transientMutationObserverRegistry): (WebCore::NodeRareData::ensureTransientMutationObserverRegistry): (WebCore::NodeRareData::ensureMicroDataTokenLists): (NodeRareData): (WebCore::NodeRareData::itemProp): (WebCore::NodeRareData::setItemProp): (WebCore::NodeRareData::itemRef): (WebCore::NodeRareData::setItemRef): (WebCore::NodeRareData::itemType): (WebCore::NodeRareData::setItemType): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::propertyNodeList): Renamed from namedItem since its return type, PropertyNodeList, is different from that, Node, of LiveNodeList::namedItem. It was shadowing the function name instead of overriding. * html/HTMLPropertiesCollection.h: (HTMLPropertiesCollection): * html/HTMLPropertiesCollection.idl: 2012-12-07 Sheriff Bot Unreviewed, rolling out r136993. http://trac.webkit.org/changeset/136993 https://bugs.webkit.org/show_bug.cgi?id=104415 This patch breaks the mac build (Requested by cabanier on #webkit). * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * platform/graphics/BitmapImage.h: * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::draw): * platform/graphics/CrossfadeGeneratedImage.h: (CrossfadeGeneratedImage): * platform/graphics/GeneratedImage.h: (GeneratedImage): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::draw): * platform/graphics/GeneratorGeneratedImage.h: (GeneratorGeneratedImage): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::setCompositeOperation): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContextState::GraphicsContextState): (GraphicsContextState): (GraphicsContext): * platform/graphics/Image.cpp: (WebCore::Image::draw): (WebCore::Image::drawTiled): * platform/graphics/Image.h: (Image): * platform/graphics/ImageBuffer.h: (ImageBuffer): * platform/graphics/cairo/BitmapImageCairo.cpp: (WebCore::BitmapImage::draw): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/cg/BitmapImageCG.cpp: (WebCore::BitmapImage::draw): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::draw): * platform/graphics/cg/PDFDocumentImage.h: (PDFDocumentImage): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::draw): * platform/graphics/qt/StillImageQt.cpp: (WebCore::StillImage::draw): * platform/graphics/qt/StillImageQt.h: (StillImage): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (BitmapImageSingleFrameSkia): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImageSingleFrameSkia::draw): * platform/graphics/win/ImageCGWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawSVGToImageBuffer): (WebCore::SVGImage::draw): (WebCore::SVGImage::nativeImageForCurrentFrame): * svg/graphics/SVGImage.h: (SVGImage): 2012-12-07 Alexey Proskuryakov There is no need to change cached resource storage policy through ResourceHandleClient https://bugs.webkit.org/show_bug.cgi?id=104413 Reviewed by Brady Eidson. This code was only needed to prevent storing responses to disk in private browsing mode, but we now have a storage session to take care of that in a cleaner and more reliable way. * loader/ResourceLoader.cpp: * loader/ResourceLoader.h: (WebCore::ResourceLoader::receivedCancellation): * platform/network/ResourceHandleClient.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willCacheResponse): * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]): 2012-12-07 Adam Klein MutationRecord addedNodes/removedNodes should never be null https://bugs.webkit.org/show_bug.cgi?id=98921 Reviewed by Ryosuke Niwa. Per an update to the DOM4 spec that matches Gecko's behavior, addedNodes/removedNodes should be empty NodeLists on 'attributes' and 'characterData' records, rather than null. This is accomplished with lazy initialization of addedNodes/removedNodes attributes on 'attributes'/'characterData' records and the addition of a new StaticNodeList::createEmpty() factory method. * dom/MutationRecord.cpp: * dom/MutationRecord.h: (MutationRecord): * dom/StaticNodeList.h: (WebCore::StaticNodeList::adopt): (StaticNodeList): (WebCore::StaticNodeList::createEmpty): (WebCore::StaticNodeList::StaticNodeList): 2012-12-07 Brent Fulgham Unreviewed build correction after 136959. The initialization list should follow the same compiler macro exclusions as the class members. * inspector/InstrumentingAgents.h: Add USE(ACCELERATED_COMPOSITING) guards around m_inspectorLayerTreeAgent as this does not exist when the guard is false. 2012-12-07 Rik Cabanier Extend platform layer so it can pass blend modes to the compositing calls https://bugs.webkit.org/show_bug.cgi?id=104176 Reviewed by Dirk Schulze. Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context No new tests, no new functionality. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * platform/graphics/BitmapImage.h: * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::draw): * platform/graphics/CrossfadeGeneratedImage.h: (CrossfadeGeneratedImage): * platform/graphics/GeneratedImage.h: (GeneratedImage): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::draw): * platform/graphics/GeneratorGeneratedImage.h: (GeneratorGeneratedImage): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore): (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::setCompositeOperation): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContextState::GraphicsContextState): (GraphicsContextState): (GraphicsContext): * platform/graphics/Image.cpp: (WebCore::Image::draw): (WebCore::Image::drawTiled): * platform/graphics/Image.h: (Image): * platform/graphics/ImageBuffer.h: (ImageBuffer): * platform/graphics/cairo/BitmapImageCairo.cpp: (WebCore::BitmapImage::draw): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/cg/BitmapImageCG.cpp: (WebCore::BitmapImage::draw): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::draw): * platform/graphics/cg/PDFDocumentImage.h: (PDFDocumentImage): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::draw): * platform/graphics/qt/StillImageQt.cpp: (WebCore::StillImage::draw): * platform/graphics/qt/StillImageQt.h: (StillImage): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (BitmapImageSingleFrameSkia): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImageSingleFrameSkia::draw): * platform/graphics/win/ImageCGWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawSVGToImageBuffer): (WebCore::SVGImage::draw): (WebCore::SVGImage::nativeImageForCurrentFrame): * svg/graphics/SVGImage.h: (SVGImage): 2012-12-07 Alec Flett IndexedDB: propagate transaction_ids through open/upgradeneeded https://bugs.webkit.org/show_bug.cgi?id=103922 Reviewed by Tony Chang. Make sure front-end is always generating the transaction id, so that it can be relied upon as an alternative to the to-be-deprecated IDBTransactionBackendInterface pointer. No new tests, this is one stage in a larger refactor. * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create): (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation): (IDBDatabaseBackendImpl::VersionChangeOperation): (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create): (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::transactionId): (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall): (IDBDatabaseBackendImpl::PendingOpenCall): (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create): (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::transactionId): (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall): (IDBDatabaseBackendImpl::PendingOpenWithVersionCall): (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform): (WebCore::IDBDatabaseBackendImpl::processPendingCalls): (WebCore::IDBDatabaseBackendImpl::createTransaction): (WebCore::IDBDatabaseBackendImpl::openConnection): (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction): (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion): * Modules/indexeddb/IDBDatabaseBackendImpl.h: (IDBDatabaseBackendImpl): * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::openInternal): * Modules/indexeddb/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): 2012-12-07 Dima Gorbik Implement general ::cue pseudo element for the