2012-01-29 Sheriff Bot Unreviewed, rolling out r106109. http://trac.webkit.org/changeset/106109 https://bugs.webkit.org/show_bug.cgi?id=77302 It made tests crash (Requested by Ossy_weekend on #webkit). * platform/graphics/qt/TextureMapperQt.cpp: (WebCore::TextureMapperQt::setGraphicsContext): * platform/graphics/qt/TextureMapperQt.h: (WebCore::TextureMapperQt::initialize): 2012-01-28 Alexander Færøy [Qt] Remove references to CSSBorderImageValue.h in Target.pri https://bugs.webkit.org/show_bug.cgi?id=77277 Reviewed by Antonio Gomes. CSSBorderImageValue.h was removed in r105502. * Target.pri: 2012-01-28 Julien Chaffraix REGRESSION (r94016): Element with visibility:hidden but visible descendant may not be properly repainted https://bugs.webkit.org/show_bug.cgi?id=76126 Reviewed by Simon Fraser. Tests: fast/layers/scroll-no-visible-content-but-visible-descendant-expected.html fast/layers/scroll-no-visible-content-but-visible-descendant.html The optimization missed out that if the current layer does not have some visible content (m_hasVisibleContent is false), a descendant could totally be visible and would need to have its repaint rectangles recomputed. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Bail out only if the layer doesn't have visible content AND no visible descendants. 2012-01-27 Chris Marrin Get rid of TransformOperationList https://bugs.webkit.org/show_bug.cgi?id=77249 Reviewed by Dan Bernstein. Changed fetchTransformOperationList to validateTransformOperations and got rid of separately generated list of transform operations. These are not needed, they are already available in the keyframe lists and they make it more difficult to add support for hardware animated filters. No behavior changes. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::validateTransformOperations): * platform/graphics/GraphicsLayer.h: (GraphicsLayer): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): * platform/graphics/ca/GraphicsLayerCA.h: (): * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::addAnimation): * platform/graphics/texmap/TextureMapperAnimation.cpp: (WebCore::applyTransformAnimation): (WebCore::TextureMapperAnimation::TextureMapperAnimation): (WebCore::TextureMapperAnimation::applyInternal): * platform/graphics/texmap/TextureMapperAnimation.h: (TextureMapperAnimation): 2012-01-27 Raymond Toy AudioPannerNode::setPanningModel() does not update m_panningModel properly https://bugs.webkit.org/show_bug.cgi?id=66830 Reviewed by Kenneth Russell. Test: webaudio/panner-set-model.html * webaudio/AudioPannerNode.cpp: (WebCore::AudioPannerNode::setPanningModel): Update m_panningModel appropriately. Also silently do nothing if the model is invalid. 2012-01-27 Chris Rogers HRTFPanner could have high-quality mode for smoother transitions https://bugs.webkit.org/show_bug.cgi?id=76470 Reviewed by Kenneth Russell. * platform/audio/HRTFPanner.cpp: (WebCore): (WebCore::HRTFPanner::HRTFPanner): (WebCore::HRTFPanner::reset): (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend): (WebCore::HRTFPanner::pan): * platform/audio/HRTFPanner.h: (HRTFPanner): (): 2012-01-27 Mike Lawther CSS calc parsing stage https://bugs.webkit.org/show_bug.cgi?id=57082 This is the parsing stage of calc. The expressions are evaluated and expression trees are generated. CSS values are not created yet - that will happen in a subsequent commit. Reviewed by David Hyatt. No functional change - covered by existing tests in LayoutTests/css3/calc. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSCalculationValue.cpp: Added. (WebCore): (WebCore::unitCategory): (WebCore::CSSCalcValue::customCssText): (WebCore::CSSCalcExpressionNode::~CSSCalcExpressionNode): (CSSCalcPrimitiveValue): (WebCore::CSSCalcPrimitiveValue::create): (WebCore::CSSCalcPrimitiveValue::cssText): (WebCore::CSSCalcPrimitiveValue::CSSCalcPrimitiveValue): (): (CSSCalcBinaryOperation): (WebCore::CSSCalcBinaryOperation::create): (WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation): (WebCore::checkDepthAndIndex): (CSSCalcExpressionNodeParser): (WebCore::CSSCalcExpressionNodeParser::parseCalc): (Value): (WebCore::CSSCalcExpressionNodeParser::operatorValue): (WebCore::CSSCalcExpressionNodeParser::parseValue): (WebCore::CSSCalcExpressionNodeParser::parseValueTerm): (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression): (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression): (WebCore::CSSCalcExpressionNodeParser::parseValueExpression): (WebCore::CSSCalcValue::create): * css/CSSCalculationValue.h: Added. (WebCore): (): (CSSCalcExpressionNode): (WebCore::CSSCalcExpressionNode::category): (WebCore::CSSCalcExpressionNode::isInt): (WebCore::CSSCalcExpressionNode::isZero): (WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode): (CSSCalcValue): (WebCore::CSSCalcValue::category): (WebCore::CSSCalcValue::isInt): (WebCore::CSSCalcValue::CSSCalcValue): * css/CSSParser.cpp: (WebCore::CSSParser::validCalculationUnit): (WebCore): (WebCore::CSSParser::validUnit): (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore::CSSParser::parseValidPrimitive): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFillPositionComponent): (WebCore::CSSParser::parsedDouble): (WebCore::CSSParser::isCalculation): (WebCore::CSSParser::colorIntFromValue): (WebCore::CSSParser::parseColorParameters): (WebCore::CSSParser::parseHSLParameters): (WebCore::ShadowParseContext::ShadowParseContext): (WebCore::ShadowParseContext::commitLength): (WebCore::ShadowParseContext::commitStyle): (ShadowParseContext): (WebCore::CSSParser::parseShadow): (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext): (WebCore::BorderImageSliceParseContext::commitNumber): (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): (BorderImageSliceParseContext): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext): (WebCore::BorderImageQuadParseContext::commitNumber): (WebCore::BorderImageQuadParseContext::commitBorderImageQuad): (BorderImageQuadParseContext): (WebCore::CSSParser::parseBorderImageQuad): (WebCore::CSSParser::parseCalculation): * css/CSSParser.h: (): (CSSParser): * css/CSSValue.cpp: (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): * css/CSSValue.h: (WebCore::CSSValue::isCalculationValue): (): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * platform/CalculationValue.cpp: Added. (WebCore): * platform/CalculationValue.h: Added. (WebCore): (): 2012-01-27 Anders Carlsson WebTileLayers should honor the acceleratesDrawing flag https://bugs.webkit.org/show_bug.cgi?id=77242 Reviewed by Dan Bernstein. * platform/graphics/ca/mac/TileCache.h: (WebCore::TileCache::acceleratesDrawing): Add getter. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): Initialize m_acceleratesDrawing. (WebCore::TileCache::setAcceleratesDrawing): Set m_acceleratesDrawing and go through all tile layers and update the flag. (WebCore::TileCache::createTileLayer): Call -[CALayer setAcceleratesDrawing:] on the newly created layer. * platform/graphics/ca/mac/WebTileCacheLayer.mm: (-[WebTileCacheLayer setAcceleratesDrawing:]): (-[WebTileCacheLayer acceleratesDrawing]): Call through to the TileCache object. 2012-01-27 Raymond Toy Round time to sample frame https://bugs.webkit.org/show_bug.cgi?id=76659 Three major changes: 1. Modify timeToSampleFrame to round the time to the sample frame and add support for Visual Studio to round the time in the same way as on gcc. (The issue is that Visual Studio uses x87 instructions with 80-bit floats.) This makes Visual Studio more consistent with the results with gcc. 2. Change the current time variable from keeping time in seconds to keeping time in sample frames. This minimizes rounding except when needed for the Javascript API. 3. Update AudioBufferSourceNode::process to use samples (instead of time) as much as possible to reduce round-off effects. Reviewed by Kenneth Russell. Tests: Added note-grain-on test to exercise precise timing. Existing tests (gain and audiobuffersource-playbackrate) also cover some of these changes, and the equalpower panner test is modified to enable the tests for the offset of the impulses. * platform/audio/AudioUtilities.cpp: (WebCore::AudioUtilities::timeToSampleFrame): Moved from AudioParamTimeLine and slightly modified, and updated to round operations consistently. Add special flags for Visual Studio to generate code with rounding that is consistent with gcc. * platform/audio/AudioUtilities.h: Declare new function. * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::process): Use new functions to convert time to sample frame. Update code to use integer arithmetic as much as possible. (WebCore::AudioBufferSourceNode::renderFromBuffer): Use timeToSampleFrame to convert time to sample frame. * webaudio/AudioContext.h: Define new currentSample method to get the current sample. * webaudio/AudioDestinationNode.cpp: (WebCore::AudioDestinationNode::provideInput): Use new function to convert sample frame to time. Update * webaudio/AudioDestiationNode.h: Rename m_currentTime to m_currentSample, add method to return current Sample. Update currentTime() method to compute time from the current sample. * webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): Remove timeToSampleFrame and use new function in AudioUtilities to convert time to sample frame. 2012-01-27 Adrienne Walker [chromium] Don't ever skip drawing the non-composited content layer https://bugs.webkit.org/show_bug.cgi?id=77236 Reviewed by James Robinson. Since the root layer has its textures potentially reserved last in a front-to-back iteration, don't ever skip drawing it if we can't reserve its textures. Instead, checkerboard and draw background color quads instead to fill the viewport. This behavior is tied to the backgroundFillsViewport setting. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdateTiles): * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::reset): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): 2012-01-27 Martin Robinson Fix a warning in the GTK+ build. Reviewed by Gustavo Noronha Silva. No new tests. This should not change behavior. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::platformStart): Use reinterpet_cast to convert X11 Windows into void pointers. 2012-01-27 Tien-Ren Chen [chromium] CCLayerTreeHostImpl minor code cleanup https://bugs.webkit.org/show_bug.cgi?id=77181 Fix a typo in comments and group functions properly. Replace duplicated content size code with function. Reviewed by James Robinson. No new tests. No change in behavior. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation): (WebCore::CCLayerTreeHostImpl::contentSize): (WebCore): (WebCore::CCLayerTreeHostImpl::updateMaxScrollPosition): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): 2012-01-27 Kevin Ollivier [wx] Unreviewed. Build fix, add missing header. * rendering/svg/SVGImageBufferTools.h: 2012-01-27 Victor Carbune Added the GenericEventQueue class in order to generalize asynchronous event dispatching in HTMLMediaElement. In order to support asynchronous events dispatched by HTMLTrackElement there is a need for a generalized implementation of an event queue to be used for both HTMLMediaElement and Text Tracks. https://bugs.webkit.org/show_bug.cgi?id=76110 Reviewed by Eric Carlson. No new tests. No new functionality, only refactoring. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/GenericEventQueue.cpp: Added. Implements the abstract class EventQueue. (WebCore::GenericEventQueue::GenericEventQueue): (WebCore::GenericEventQueue::~GenericEventQueue): (WebCore::GenericEventQueue::enqueueEvent): Append an event to the current pending event list. (WebCore::GenericEventQueue::cancelEvent): Removes an event from the current pending event list. (WebCore::GenericEventQueue::timerFired): Callback method when the timer fires. Dispatches all events that are currently pending. (WebCore::GenericEventQueue::close): Closes the event queue such that it cannot be used anymore. (WebCore::GenericEventQueue::cancelAllEvents): Removes all pending events. (WebCore::GenericEventQueue::hasPendingEvents): True if there are pending events. * dom/GenericEventQueue.h: Added. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::scheduleEvent): Refactored method to enqueue the scheduled event on the GenericEventQueue instance. (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): Ditto. (WebCore::HTMLMediaElement::hasPendingActivity): Ditto. (WebCore::HTMLMediaElement::dispatchEvent): This method is overriden to keep an evidence when a canPlay event is fired. * html/HTMLMediaElement.h: 2012-01-27 Martin Robinson Fix a warning in the GTK+ build. Reviewed by Gustavo Noronha Silva. No new tests. This should not change behavior. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::platformStart): Use reinterpet_cast to convert X11 Windows into void pointers. 2012-01-27 Benjamin Poulain Speed up the prefix matching of cssPropertyName() https://bugs.webkit.org/show_bug.cgi?id=77158 Reviewed by Geoffrey Garen. This patch improves the performance by: -not checking the PropertyName with all 7 prefix (now, in the worse case, 2 prefixes are checked) -avoiding the conversion 8bits->16bits by using String::operator[] instead of ::characters() To avoid checking every prefix, the code branch based on the first characters of the propertyName. The remaining of the prefix is checked character by characters like before. When accessing CSS property, this gives a 13% improvement when there is no prefix. There is no performance regression for the matching of prefix, including for the first one of the previous matching code ("css"). * bindings/js/JSCSSStyleDeclarationCustom.cpp: (): (WebCore::matchesCSSPropertyNamePrefix): (WebCore): (WebCore::getCSSPropertyNamePrefix): (WebCore::cssPropertyName): 2012-01-27 Ken Buchanan Crash in updateFirstLetter() from unnecessary anonymous block https://bugs.webkit.org/show_bug.cgi?id=72675 Reviewed by David Hyatt. There was a problem with anonymous blocks not getting removed when their only block flow siblings are removed if they also have non-block flow first-letter siblings (i.e. floats). This patch modifies RenderBlock::removeChild() to look for this situation and strip out unnecessary anonymous container blocks if it occurs. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): (WebCore::RenderBlock::collapseAnonymousBoxChild): Added * rendering/RenderBlock.h: (WebCore::RenderBlock::collapseAnonymousBoxChild): Added 2012-01-27 Fady Samuel Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting https://bugs.webkit.org/show_bug.cgi?id=76459 Reviewed by Darin Fisher. This should be a setting because it is independent of a particular frame and should be preserved even if the mainframe changes. Renamed (set)ShouldLayoutFixedElementsRelativeToFrame to (set)FixedElementsLayoutRelativeToFrame due to the connotation the word "should" may have in this context: If set, position:fixed elements will ALWAYS be laid out relative to the frame. * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::reset): (WebCore::FrameView::scrollXForFixedPosition): (WebCore::FrameView::scrollYForFixedPosition): (WebCore::FrameView::fixedElementsLayoutRelativeToFrame): (WebCore): * page/FrameView.h: (FrameView): * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setFixedElementsLayoutRelativeToFrame): (WebCore): * page/Settings.h: (Settings): (WebCore::Settings::fixedElementsLayoutRelativeToFrame): * rendering/RenderBox.cpp: (WebCore::RenderBox::fixedElementLaysOutRelativeToFrame): (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): * rendering/RenderBox.h: (RenderBox): * testing/InternalSettings.cpp: (WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: 2012-01-27 Kentaro Hara Support the [Supplemental] IDL for constants https://bugs.webkit.org/show_bug.cgi?id=77228 Reviewed by Adam Barth. We have supported the [Supplemental] IDL for attributes and methods. This patch supports it for constants. Test: bindings/scripts/test/TestSupplemental.idl * bindings/scripts/generate-bindings.pl: Supported [Supplemental] constants. Updated some comments. * bindings/scripts/test/TestSupplemental.idl: Added test cases for [Supplemental] constants. * bindings/scripts/test/CPP/WebDOMTestInterface.h: Updated the test results. * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto. (WebCore::JSTestInterfacePrototype::getOwnPropertySlot): (WebCore::JSTestInterfacePrototype::getOwnPropertyDescriptor): (WebCore): (WebCore::jsTestInterfaceSUPPLEMENTAL_CONSTANT1): (WebCore::jsTestInterfaceSUPPLEMENTAL_CONSTANT2): * bindings/scripts/test/JS/JSTestInterface.h: Ditto. (WebCore): * bindings/scripts/test/ObjC/DOMTestInterface.h: Ditto. * bindings/scripts/test/V8/V8TestInterface.cpp: Ditto. (WebCore::ConfigureV8TestInterfaceTemplate): 2012-01-27 Anders Carlsson When threaded scrolling is enabled for a FrameView, always put scrollbars in layers https://bugs.webkit.org/show_bug.cgi?id=77232 Reviewed by Beth Dakin. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView): * page/ScrollingCoordinator.h: Add a new helper function. * rendering/RenderLayerCompositor.cpp: (WebCore::shouldCompositeOverflowControls): Make this take a FrameView, check with the scrolling coordinator if the overflow controls should be composited. (WebCore::RenderLayerCompositor::requiresHorizontalScrollbarLayer): (WebCore::RenderLayerCompositor::requiresVerticalScrollbarLayer): (WebCore::RenderLayerCompositor::requiresScrollCornerLayer): Update for the change to make shouldCompositeOverflowControls take a FrameView. 2012-01-24 Vincent Scheib Pointer Lock: Implement pointer interface https://bugs.webkit.org/show_bug.cgi?id=75762 Reviewed by Julien Chaffraix. Implement the navigator.pointer interface via a new PointerLockController class, as per http://dvcs.w3.org/hg/webevents/raw-file/default/mouse-lock.html. The implementation is being made in steps, the feature is still behind compile-time and run-time flags, 'webkit' prefixed, and not yet enabled in any browser. (Chromium has a developer flag required.) Follow-up work will include handling DOM elements being removed, making all callbacks asynchronous, iframe permissions (similar to Full Screen), etc. PointerLockController maintains state of which Element is the current lock target and the success and failure callbacks. ChromeClient has methods added to expose the required state change requests. Tests: pointer-lock/lock-already-locked.html pointer-lock/lock-fail-responses.html pointer-lock/mouse-event-delivery.html pointer-lock/pointerlocklost-event.html * WebCore.gypi: * dom/EventNames.h: * page/ChromeClient.h: (WebCore::ChromeClient::requestPointerLock): (WebCore::ChromeClient::requestPointerUnlock): (WebCore::ChromeClient::isPointerLocked): * page/Navigator.cpp: (WebCore::Navigator::webkitPointer): * page/Page.cpp: (WebCore::Page::Page): * page/Page.h: (WebCore::Page::pointerLockController): * page/PointerLock.cpp: (WebCore::PointerLock::PointerLock): (WebCore::PointerLock::create): (WebCore::PointerLock::lock): (WebCore::PointerLock::unlock): (WebCore::PointerLock::isLocked): * page/PointerLock.h: (WebCore::PointerLock::create): * page/PointerLockController.cpp: Added. (WebCore::PointerLockController::PointerLockController): (WebCore::PointerLockController::requestPointerLock): (WebCore::PointerLockController::requestPointerUnlock): (WebCore::PointerLockController::isLocked): (WebCore::PointerLockController::didAcquirePointerLock): (WebCore::PointerLockController::didNotAcquirePointerLock): (WebCore::PointerLockController::didLosePointerLock): (WebCore::PointerLockController::dispatchLockedMouseEvent): * page/PointerLockController.h: Copied from Source/WebCore/page/PointerLock.h. 2012-01-27 Abhishek Arya Crash in DocumentLoader::detachFromFrame. https://bugs.webkit.org/show_bug.cgi?id=62764 Reviewed by Brady Eidson. r105556 didn't fix the crash because canceling the main resource loader blows away both the current document loader and frame underneath. Both protectors are also used in stopLoading() when m_mainResourceLoader->cancel() is called. Also, tested the fix under ASAN. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::detachFromFrame): 2012-01-27 Tony Chang flexbox scrollbars don't take flex-direction into account https://bugs.webkit.org/show_bug.cgi?id=70772 Reviewed by Darin Adler. This fixes a bug where we always used the logicalScrollbarHeight. For column flow, this was incorrect. Also fix a bug where we didn't include the trailing border+padding+scrollbar when computing the height of a column flow. Tests: css3/flexbox/cross-axis-scrollbar-expected.html css3/flexbox/cross-axis-scrollbar.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::crossAxisScrollbarExtent): Add a direction aware method for getting the scrollbar size. (WebCore): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Use crossAxisScrollbarExtent. * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): 2012-01-27 Kentaro Hara Unreviewed. Rebasedlined run-bindings-tests results. * bindings/scripts/test/CPP/WebDOMTestInterface.cpp: (WebDOMTestInterface::supplementalMethod1): (WebDOMTestInterface::supplementalMethod2): 2012-01-27 No'am Rosenthal [Qt][WK2] Child layers appear in wrong position when scrolling https://bugs.webkit.org/show_bug.cgi?id=77063 Reviewed by Simon Fraser. When using the delegatesScrolling mode in FrameView, the compositor doesn't need to control the special clip/scroll layers. Also, when we change that mode, we need to let the compositor reset its backing-stores and rebuild them without scrolling/clipping. This is tested by compositing tests, when run with Qt in touch mode. * page/FrameView.cpp: (WebCore::FrameView::delegatesScrollingDidChange): (WebCore): * page/FrameView.h: (FrameView): * platform/ScrollView.cpp: (WebCore::ScrollView::setDelegatesScrolling): * platform/ScrollView.h: (WebCore::ScrollView::delegatesScrollingDidChange): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::requiresScrollLayer): 2012-01-27 Thiago Marcos P. Santos Removed unused method from CSSStyleSelector https://bugs.webkit.org/show_bug.cgi?id=77190 Reviewed by Andreas Kling. * css/CSSStyleSelector.h: (CSSStyleSelector): 2012-01-27 Zeno Albisser [Qt][Mac] Build fails after adding ICU support (r105997). https://bugs.webkit.org/show_bug.cgi?id=77118 Use SmareReplaceCF.cpp code path if platform Mac. Reviewed by Tor Arne Vestbø. * Target.pri: 2012-01-27 Ilya Tikhonovsky Web Inspector: detailed heap snapshot: Replace (Native objects) root element with '(Detached DOM trees)' and '(Document DOM trees)' https://bugs.webkit.org/show_bug.cgi?id=77201 I think it'd be nice to replace one group containing all native objects with separate groups for different types of native objects. Reviewed by Yury Semikhatsky. * bindings/v8/RetainedDOMInfo.cpp: (WebCore::RetainedDOMInfo::GetGroupLabel): (WebCore): * bindings/v8/RetainedDOMInfo.h: (RetainedDOMInfo): 2012-01-27 Nikolas Zimmermann doesn't work with local references when using primitiveUnits="objectBoundingBox" https://bugs.webkit.org/show_bug.cgi?id=77205 Reviewed by Antti Koivisto. Consider following testcase: The has a viewport of 1000x50. The in the element is resolved as , as the context for this element (looking at it isolated!) is the viewport of the . We then setup a 0x0 - 100x100 rect in user space, which gets filtered, by a filter, also defined in user space (for simplicity), but with primitiveUnits="objectBoundingBox". That means that the default subregion of the filter effect which has no inputs, is defined in the SVG 1.1 spec to be equal to the filter region, which is 0x0-100x100 in user space. This is supposed to produce a 100x100 image, containing a circle in the middle (aka. ), but it doesn't, as the it's trying to paint, is laid out at 500x250, and thus outside the 100x100 sized image buffer. So how to resolve this? The RenderSVGShape thats owned by the generates its Path value by calling cx().value(lengthContext) and the SVGLengthContext here resolves to the . That happens on _layout_. If we would want to change the SVGLengthContext in this case (what I originally planned!) to carry a custom 100x100 viewport, we'd need to relayout. Unfortunately this is not an option, as this would mean that SVGImageBufferTools::renderSubtreeToImageBuffer, would need to relayout its children first, but we produce the filter images when painting. This is very dangerous and has just recently been fixed so that SVGImageBufferTools can ASSERT(!item->needsLayout()) when painting the subtree to an image buffer. The only sane solution I see, that does not require relayouts, is to make a map between the bounding box in user space (500x250 center point) to the filter primitive subregion space (here: 100x100 center point), and concat that transformation before painting the subtree to the image buffer. Of course this approach only works if all values of the are relative. If someone uses the transformation that I'm looking for is undefined. We'd really need to create a new Path here, to resolve only cx against the new viewport, and not cy. Though in practice it turns out this is not a problem. All use cases of feImage + primitiveUnits="objectBoundingBox" link to elements that are completely defined in percentual values, as this is really the only thing which makes sense - otherwise you can always switch back to primtiveUnits="userSpaceOnUse". Anyhow, I'm going to fix all known wild-life test cases by my approach, and say we don't support using mixed length units when referencing those elements from feImages with primitiveUnits="objectBoundingBox". Adding lots of new testcases, trying all the different feImage modes. Tests: svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg svg/filters/feImage-position.svg svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg svg/filters/feImage-subregions-preseveAspectRatio-none.svg svg/filters/feImage-subregions.svg * rendering/svg/RenderSVGResourceFilterPrimitive.cpp: (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion): Reverse logic, simplifying the code a bit. Remove FEImage special cases (absoluteSubregion). * svg/SVGLengthContext.h: Make determineViewport() public, for use in FEImage. * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::determineAbsolutePaintRect): Don't apply preserveAspectRatio transformation for local elements, it's not defined and breaks content. (WebCore::FEImage::platformApplySoftware): Figure out the absolute subregion by utilizing filterPrimitiveSubregion() as FETurbulence does. Map between filter primitive subregion and target object space for primitiveUnits="objectBoundingBox" support on SVG element references. * svg/graphics/filters/SVGFEImage.h: Remove absoluteSubregion member & setter, it's no longer needed. 2012-01-26 Vsevolod Vlasov Web Inspector: Scripts panel: fix event dispatching between FileSelector and EditorContainer. https://bugs.webkit.org/show_bug.cgi?id=77126 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype._showSourceLine): (WebInspector.ScriptsPanel.prototype._updateExecutionLine): (WebInspector.ScriptsPanel.prototype._editorClosed): (WebInspector.ScriptsPanel.prototype._editorSelected): (WebInspector.ScriptsPanel.FileSelector.prototype.revealUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.revealUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._innerRevealUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype._tabClosed): (WebInspector.TabbedEditorContainer.prototype._tabSelected): (WebInspector.TabbedEditorContainer.prototype.reset): 2012-01-27 Nikolas Zimmermann DOM mutation problems https://bugs.webkit.org/show_bug.cgi?id=77198 Reviewed by Antti Koivisto. Consider , where gets dynamically added to the tree. Currently doesn't notice this, as it doesn't register itself pending on "#rect". Integrate properly within the pending resources concept, fixing the bug. Tests: svg/filters/feImage-target-add-to-document.svg svg/filters/feImage-target-changes-id.svg svg/filters/feImage-target-id-change.svg svg/filters/feImage-target-reappend-to-document.svg svg/filters/feImage-target-remove-from-document.svg * svg/SVGFEImageElement.cpp: Rename invalidateImageResource to clearResourceReferences. (WebCore::SVGFEImageElement::~SVGFEImageElement): Call clearResourceReferences. (WebCore::SVGFEImageElement::clearResourceReferences): Remove any occurence of m_targetImage, it's no longer used. (WebCore::SVGFEImageElement::requestImageResource): requestImageResource is now called by buildPendingResource. (WebCore::SVGFEImageElement::buildPendingResource): Called whenever any element that we depend on gets resolved - now invalidates the . (WebCore::SVGFEImageElement::parseMappedAttribute): Don't start loading from parseMappedAttribute. (WebCore::SVGFEImageElement::svgAttributeChanged): Start loading from here, for consistency with SVGImageElement. (WebCore::SVGFEImageElement::insertedIntoDocument): Invoke buildPendingResource(), if we enter the tree. (WebCore::SVGFEImageElement::removedFromDocument): Clear m_cachedImage as soon as we get removed from the tree. (WebCore::SVGFEImageElement::build): Clean up this function, m_targetImage is no longer exist. * svg/SVGFEImageElement.h: Remove OwnPtr m_targetImage, which is no longer used. 2012-01-26 Jocelyn Turcotte [Qt] WKTR: Use a software rendering pipiline when running tests. https://bugs.webkit.org/show_bug.cgi?id=76708 Reviewed by Kenneth Rohde Christiansen. * platform/graphics/qt/TextureMapperQt.cpp: Allow setting the context to null. (WebCore::TextureMapperQt::setGraphicsContext): * platform/graphics/qt/TextureMapperQt.h: (WebCore::TextureMapperQt::initialize): 2012-01-27 Branimir Lambov SVG filters incorrectly move elements https://bugs.webkit.org/show_bug.cgi?id=73643 Reviewed by Nikolas Zimmermann. Fixes SVG image buffer creation to use the enclosing integer rect instead of unstable rounded coordinates with scaling which was causing animated images to jump around under filters. The image buffer was not aligned on a pixel boundary, and thus the positions and sizes of anything drawn under that filter changed by 1-2 pixels compared to the same elements drawn without an intermediate buffer, or drawn with a buffer with a different target rectangle. The change improves the positioning of clip paths, masks and filters. Tests: svg/clip-path/clip-in-clip.svg svg/clip-path/clipper-placement-issue.svg svg/filters/filter-placement-issue.svg * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::createTileImage): * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::createImageBuffer): (WebCore::SVGImageBufferTools::createImageBufferForPattern): (WebCore::SVGImageBufferTools::clipToImageBuffer): (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRect): (WebCore::SVGImageBufferTools::clampedAbsoluteSize): * rendering/svg/SVGImageBufferTools.h: (WebCore::SVGImageBufferTools::calcImageBufferRect): 2012-01-25 Yury Semikhatsky Web Inspector: should be possible to open function declaration from script popover https://bugs.webkit.org/show_bug.cgi?id=76913 Added inferred/display function name and source location to the popover in scripts panel. Now when a function is hovered user can navigate to its definition. Reviewed by Pavel Feldman. Test: inspector/debugger/function-details.html * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::functionDetails): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::functionDetailsCallback): * inspector/InjectedScript.cpp: (WebCore::InjectedScript::getFunctionDetails): * inspector/InjectedScript.h: (InjectedScript): * inspector/InjectedScriptHost.idl: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::getFunctionDetails): * inspector/InspectorDebuggerAgent.h: (InspectorDebuggerAgent): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyFunctionLocation): * inspector/front-end/ObjectPopoverHelper.js: (WebInspector.ObjectPopoverHelper): (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.): (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover): (WebInspector.ObjectPopoverHelper.prototype._onHideObjectPopover): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired): (WebInspector.ObjectPropertyTreeElement.prototype._functionContextMenuEventFired.revealFunction): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject): (WebInspector.RemoteObject.fromPayload): (WebInspector.RemoteObject.prototype.get functionName): * inspector/front-end/scriptsPanel.css: (.function-location-link): (.function-popover-title): (.function-popover-title .function-name): 2012-01-26 Noel Gordon Remove FIXME: ColorProfile encapsulation as a Vector works well https://bugs.webkit.org/show_bug.cgi?id=77176 Reviewed by Adam Barth. No new tests. No change in behavior. * platform/image-decoders/ImageDecoder.h: 2012-01-26 Matthew Delaney ImageBuffer::draw should deep copy if drawing to an accelerated context https://bugs.webkit.org/show_bug.cgi?id=77185 Reviewed by Simon Fraser. No new tests since any test for this issue would be flaky at best. * platform/graphics/cg/ImageBufferCG.cpp: Deep copy when drawing ourself into an accelerated context for both draw and drawPattern. (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): 2012-01-26 Kevin Ollivier [wx] Unreviewed. Build fixes. - Remove some constructors not generated by CPP bindings from being added to CPP binding headers - Keyboard event fixes after modifier changes - Add stubs for Language and RunLoop platform methods * bindings/scripts/CodeGeneratorCPP.pm: (GetNamespaceForClass): (GenerateImplementation): * platform/mac/WebCoreSystemInterface.h: * platform/wx/KeyboardEventWx.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/wx/LanguageWx.cpp: Added. (WebCore): (WebCore::platformLanguage): (WebCore::platformUserPreferredLanguages): * platform/wx/RunLoopWx.cpp: Added. (WebCore): (WebCore::RunLoop::run): (WebCore::RunLoop::stop): (WebCore::RunLoop::RunLoop): (WebCore::RunLoop::~RunLoop): (WebCore::RunLoop::wakeUp): * storage/DOMWindowSQLDatabase.idl: * webaudio/DOMWindowWebAudio.idl: * websockets/DOMWindowWebSocket.idl: 2012-01-26 Sheriff Bot Unreviewed, rolling out r105486. http://trac.webkit.org/changeset/105486 https://bugs.webkit.org/show_bug.cgi?id=77182 This patch doesn't take web workers into account. (Requested by dave_levin on #webkit). * html/DOMURL.cpp: (WebCore::DOMURL::DOMURL): (WebCore::DOMURL::~DOMURL): (WebCore::DOMURL::contextDestroyed): (WebCore): (WebCore::DOMURL::createObjectURL): (WebCore::DOMURL::revokeObjectURL): * html/DOMURL.h: (WebCore::DOMURL::create): (DOMURL): * html/DOMURL.idl: * page/DOMWindow.cpp: (WebCore): (WebCore::DOMWindow::webkitURL): * page/DOMWindow.h: (DOMWindow): (): * page/DOMWindow.idl: * workers/WorkerContext.cpp: (WebCore): (WebCore::WorkerContext::webkitURL): (WebCore::WorkerContext::webkitRequestFileSystem): * workers/WorkerContext.h: (WorkerContext): (): * workers/WorkerContext.idl: 2012-01-26 Noel Gordon Cleanup JPEGImageDecoder includes https://bugs.webkit.org/show_bug.cgi?id=77171 Reviewed by Adam Barth. No new tests. Refactoring cleanup only. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: 2012-01-26 Tim Horton 3D transformed elements hide when showing the print dialog https://bugs.webkit.org/show_bug.cgi?id=45894 Reviewed by Andy Estes. Suspend updates of the compositing layer tree while printing is taking place, preventing on-screen layers from moving to their print-mode positions. No new tests, as WebKitTestRunner doesn't support putting the document into printing mode. * page/FrameView.cpp: (WebCore::FrameView::syncCompositingStateForThisFrame): (WebCore::FrameView::paintContents): * platform/graphics/ca/LayerFlushScheduler.h: (WebCore::LayerFlushScheduler::isSuspended): Added. 2012-01-26 Pablo Flouret Fix bad code generated by the JSC idl code generator for [CachedAttribute] attributes https://bugs.webkit.org/show_bug.cgi?id=77165 Reviewed by Oliver Hunt. Missing parameter in a call to deserialize() and using 'this' in the attribute accessor functions (which are static). * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): (NativeToJSValue): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjCachedAttribute1): (WebCore::jsTestObjCachedAttribute2): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::jsTestSerializedScriptValueInterfaceValue): 2012-01-26 W. James MacLean [chromium] Allow modification of size of partially occluded quads during culling to reduce pixel overdraw. https://bugs.webkit.org/show_bug.cgi?id=76349 Reviewed by James Robinson. Prior to this patch, draw culling either rejects a DrawQuad because it is completely occluded, or draws the entire quad (even if it is largely occluded). This patch attempts to reduce the number of pixels drawn by determining if a partially occluded DrawQuad can be resized to a smaller quad, based on what portion of the DrawQuad is actually visible, and performing that resizing where possible. Added cases to existing unit tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCDrawQuad.cpp: (WebCore::CCDrawQuad::CCDrawQuad): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore::CCDrawQuad::setQuadVisibleRect): (WebCore::CCDrawQuad::quadVisibleRect): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::rectSubtractRegion): (WebCore::CCQuadCuller::cullOccludedQuads): 2012-01-26 Anders Carlsson Scrollbars disappear when switching from legacy to overlay scrollbars https://bugs.webkit.org/show_bug.cgi?id=77166 Reviewed by Dan Bernstein. * platform/ScrollView.cpp: (WebCore::ScrollView::scrollbarStyleChanged): Call positionScrollbarLayers to make sure that the new scrollbar layers are positioned correctly. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::updateScrollerStyle): Call ScrollbarThemeMac::setNewPainterForScrollbar after making the call to the scrollbar painter controller to set the horizontal or vertical imp, since setting the imp will reset the knob style. 2012-01-26 Adam Barth NULL ptr in WebCore::ContainerNode::parserAddChild https://bugs.webkit.org/show_bug.cgi?id=76258 Reviewed by Eric Seidel. Test: fast/parser/nested-fragment-parser-crash.html We always need a parent element to attach to. In crazy cases, we can have elements in the stack of open elements that are already detached from the DOM. In those cases, they don't have a parent, so we aren't able to enforce the maximum DOM depth. (Fortunately, they're not attached to the DOM anymore so we don't need to enforce the maximum DOM depth!) * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attachLater): (WebCore::HTMLConstructionSite::fosterParent): 2012-01-26 Cris Neckar The registration of schemes is currently racey as they are not registered from the main thread. Getting rid of the assert that ensures that we are registering from the main thread until we can fix this. Thank you ap@webkit for helping us identify this. https://bugs.webkit.org/show_bug.cgi?id=77160 Reviewed by Adam Barth. * platform/SchemeRegistry.cpp: (WebCore::CORSEnabledSchemes): 2012-01-26 Anders Carlsson We don't need to always repaint overlay scrollbars if they're in layers https://bugs.webkit.org/show_bug.cgi?id=77159 Reviewed by Beth Dakin. If a scrollable area has overlay scrollbars we'll always invalidate both scrollbars, regardless of whether both scroll offsets actually change since they're translucent and we want to draw the new page contents underneath. However, if the scrollbars are painted into GraphicsLayers they'll be composited by the GPU, and so we don't need to repaint them unless the corresponding scroll offset actually changes (which is handled in Scrollbar::updateThumb). * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::setScrollOffsetFromAnimation): 2012-01-26 Joshua Bell IndexedDB: WebCore::IDBKey objects are leaked https://bugs.webkit.org/show_bug.cgi?id=77114 Reviewed by Tony Chang. Fixing memory leaks, no new tests. * storage/IDBKey.h: (WebCore::IDBKey::createInvalid): (WebCore::IDBKey::createNumber): (WebCore::IDBKey::createString): (WebCore::IDBKey::createDate): (WebCore::IDBKey::createArray): 2012-01-25 Cris Neckar Add a scheme registry for CORS requests. Allow simple CORS requests to be made to registered schemes. https://bugs.webkit.org/show_bug.cgi?id=77041 Reviewed by Alexey Proskuryakov. * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): * platform/SchemeRegistry.cpp: (WebCore::CORSEnabledSchemes): (WebCore): (WebCore::SchemeRegistry::registerCORSEnabledScheme): (WebCore::SchemeRegistry::isCORSEnabledScheme): * platform/SchemeRegistry.h: (SchemeRegistry): 2012-01-26 Noel Gordon File extension for webp files is .webp https://bugs.webkit.org/show_bug.cgi?id=76982 Reviewed by Adam Barth. No new tests. No change in behavior. * platform/image-decoders/webp/WEBPImageDecoder.h: (WebCore::WEBPImageDecoder::filenameExtension): 2012-01-26 Alok Priyadarshi [chromium] Remove dead and unnecessary code related to LayerChromium::cleanupResources https://bugs.webkit.org/show_bug.cgi?id=77137 Reviewed by James Robinson. No new test needed. Only removing dead code. * platform/graphics/chromium/LayerChromium.cpp: * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::layerTreeHost): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): 2012-01-26 Anders Carlsson Move horizontal rubber-band checks to ScrollElasticityController::handleWheelEvent https://bugs.webkit.org/show_bug.cgi?id=77147 Reviewed by Adam Roben. * platform/mac/ScrollAnimatorMac.h: (ScrollAnimatorMac): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): Always call ScrollElasticityController::handleWheelEvent, and only call didBeginScrollGesture and didEndScrollGesture if the event was actually handled. (WebCore::ScrollAnimatorMac::shouldRubberBandInDirection): Implement this. * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::handleWheelEvent): Check if we should rubber-band and return false if we shouldn't. (WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection): Ask the client if we should rubber-band. 2012-01-19 James Robinson [chromium] Remove setLayerTreeHost nonsense on lost context https://bugs.webkit.org/show_bug.cgi?id=76675 Reviewed by Kenneth Russell. This code isn't needed any more. On a lost context event, we drop all TextureManager-managed textures through the proxy and no layer types need special lost context handling. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): 2012-01-26 Anders Carlsson Simplify checking of whether we should rubberband horizontally https://bugs.webkit.org/show_bug.cgi?id=77141 Reviewed by Adam Roben. Have a single check for horizontal rubber-banding in both directions. This is in preparation for moving this code into ScrollElasticityController. * platform/mac/ScrollAnimatorMac.mm: (WebCore::shouldRubberBandInHorizontalDirection): (WebCore::ScrollAnimatorMac::handleWheelEvent): 2012-01-26 Scott Graham Fix include path in gyp file for V8InternalSettings.h https://bugs.webkit.org/show_bug.cgi?id=77128 Reviewed by Kent Tamura. * WebCore.gyp/WebCore.gyp: 2012-01-26 James Robinson We shouldn't synchronously update styles on all documents after running script https://bugs.webkit.org/show_bug.cgi?id=46761 Reviewed by Simon Fraser. Currently we call Document::updateStyleForAllDocuments() after invoking any event or timeout handler. This is slow since it iterates over the entire document tree and defeats our recalcStyle timer batching. It is unnecessary as any code that depends on styles or the render tree being up to date must call updateStyleIfNeeded() on the document it is accessing. The first reference I can find to this code is in r798 in the file WebCore/khtml/xml/domnode_impl.cpp. It's been cargo culted forward ever since. * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::executeScriptInWorld): * bindings/js/ScriptController.h: * bindings/v8/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): * bindings/v8/ScriptController.h: * dom/ScriptElement.cpp: (WebCore::ScriptElement::executeScript): * inspector/InspectorClient.cpp: (WebCore::InspectorClient::doDispatchMessageOnFrontendPage): 2012-01-26 Anders Carlsson Get rid of ScrollElasticityController::beginScrollGesture() https://bugs.webkit.org/show_bug.cgi?id=77138 Reviewed by Adam Roben. ScrollElasticityController::handleWheelEvent now checks if the wheel event phase is PlatformWheelEventPhaseBegan and sets up the gesture state if it is. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): * platform/mac/ScrollElasticityController.h: (ScrollElasticityController): * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::handleWheelEvent): 2012-01-26 Anders Carlsson Get rid of ScrollElasticityController::endScrollGesture() https://bugs.webkit.org/show_bug.cgi?id=77134 Reviewed by Adam Roben. Just make ScrollElasticityController::handleWheelEvent call snapRubberBand if the wheel event phase is PlatformWheelEventPhaseEnded. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): * platform/mac/ScrollElasticityController.h: (ScrollElasticityController): * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::handleWheelEvent): 2012-01-26 Abhishek Arya Crash in SVGSVGElement::currentViewBoxRect. https://bugs.webkit.org/show_bug.cgi?id=77121 Reviewed by Nikolas Zimmermann. Symbols shouldn't be rendered. Revert the ASSERT from r105513 into a hard check. Test: svg/custom/symbol-viewport-element-crash.svg * svg/SVGLengthContext.cpp: (WebCore::SVGLengthContext::determineViewport): 2012-01-26 Anders Carlsson Inline beginScrollGesture/endScrollGesture in handleWheelEvent https://bugs.webkit.org/show_bug.cgi?id=77133 Reviewed by Andreas Kling. * platform/mac/ScrollAnimatorMac.h: (ScrollAnimatorMac): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): 2012-01-26 Anders Carlsson No need to set m_haveScrolledSincePageLoad in beginScrollGesture https://bugs.webkit.org/show_bug.cgi?id=77132 Reviewed by Andreas Kling. m_haveScrolledSincePageLoad is already set to true in handleWheelEvent so we don't need to set it to true again. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::beginScrollGesture): 2012-01-26 Anders Carlsson Simplify checking for whether we should rubberband or not when at the edge https://bugs.webkit.org/show_bug.cgi?id=77131 Reviewed by Beth Dakin. We only need to check once if we're pinned at either edge whether we should rubber-band or not. Do this when the wheel event phase is PlatformWheelEventPhaseBegan. This lets us remove a bunch of code that would keep track of the current horizontal scroll direction. * platform/mac/ScrollAnimatorMac.h: (ScrollAnimatorMac): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::beginScrollGesture): 2012-01-26 Eli Fidler [JSC] Inspector instrumentation for JavaScript calls. https://bugs.webkit.org/show_bug.cgi?id=40119 Reviewed by Geoffrey Garen. Covered by existing Chromium inspector tests * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::instrumentedCall): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willCallFunctionImpl): 2012-01-26 Mike Reed Signal to skia to force A8 text from LCD output, but only when we have to disable LCD because we're in a layer https://bugs.webkit.org/show_bug.cgi?id=76547 Reviewed by Stephen White. Existing tests should confirm nothing is broken. Antialiased text is disabled in layouttests, so they should be unaffected by the difference in antialiasing quality. * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::setupPaintForFont): 2012-01-26 Anders Carlsson Use PlatformWheelEvent::phase() to determine if a scroll gesture begins or ends https://bugs.webkit.org/show_bug.cgi?id=77127 Reviewed by Beth Dakin. * platform/mac/ScrollAnimatorMac.h: (ScrollAnimatorMac): Remove handleGestureEvent. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::handleWheelEvent): Look at the event phase to determine when to call didBeginGesture and didEndGesture. 2012-01-26 Benjamin Poulain Using strncmp() for comparing scheme and port numbers is inefficient https://bugs.webkit.org/show_bug.cgi?id=75821 Reviewed by Darin Adler. Replace the equal() function comparing 2 arbitrary strings by a template comparing the string to an array, character by character. This is only used for small strings: the schemes and the ports. * platform/KURL.cpp: (WebCore::equal): (WebCore::isDefaultPortForScheme): (WebCore::isNonFileHierarchicalScheme): (WebCore::isCanonicalHostnameLowercaseForScheme): 2012-01-26 Anders Carlsson WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit https://bugs.webkit.org/show_bug.cgi?id=77123 Reviewed by Beth Dakin. * platform/PlatformWheelEvent.h: (): * platform/mac/PlatformEventFactoryMac.mm: (WebCore::phaseForEvent): 2012-01-26 Daniel Cheng Revert code changes from r105800 https://bugs.webkit.org/show_bug.cgi?id=77071 The strings are already lowercased in EventHandler.cpp:findDropZone() so there's no need to call lower() again. Reviewed by Tony Chang. Covered by existing tests. * dom/Clipboard.cpp: (WebCore::Clipboard::hasDropZoneType): 2012-01-26 Stephen Chenney REGRESSION (r91125): Polyline tool in google docs is broken https://bugs.webkit.org/show_bug.cgi?id=65796 Reviewed by Nikolas Zimmermann. It turns out that the CG problem is a design decision. The bounding code returns CGRectNull for cases where a bound is ill-defined, rather than the empty bound as expected. I'm also removing the workaround for isEmpty to get correct zero length paths. It is no longer necessary. Tested by existing layout tests. * platform/graphics/cg/PathCG.cpp: Removed path empty and path bound testing classes. (WebCore::Path::boundingRect): Added check for CGRectNull (WebCore::Path::fastBoundingRect): Added check for CGRectNull (WebCore::Path::strokeBoundingRect): Added check for CGRectNull (WebCore::Path::isEmpty): Reverted to former behavior, just using CGPathIsEmpty. (WebCore::Path::hasCurrentPoint): Reverted to former behavior, using isEmpty. (WebCore::Path::transform): Reverted to former behavior, using isEmpty. 2012-01-26 Andreas Kling Refactor application of additional style attributes for table elements. Reviewed by Darin Adler. The primary purpose of this change is to reduce usage of CSSMappedAttributeDeclaration. Instead of using the mapped attribute decl table for additional table style, just use regular CSSMutableStyleDeclarations. We cache them all globally, except for the style that's shared between a table's cells. That one is cached per-table since it depends on the table's border and padding. * dom/CSSMappedAttributeDeclaration.cpp: (WebCore::CSSMappedAttributeDeclaration::~CSSMappedAttributeDeclaration): * dom/MappedAttributeEntry.h: Remove the concept of persistent CSSMappedAttributeDeclarations. The hunk in ~CSSMappedAttributeDeclaration was wildly wrong since it would leave stale pointers in the decl table, but unreachable since we always leaked one ref to those decls. * dom/StyledElement.h: (WebCore::StyledElement::additionalAttributeStyle): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::additionalAttributeStyle): * html/HTMLTableCellElement.h: (HTMLTableCellElement): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::additionalAttributeStyle): * html/HTMLTableColElement.h: (HTMLTableColElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::parseMappedAttribute): (WebCore::leakBorderStyle): (WebCore::HTMLTableElement::additionalAttributeStyle): (WebCore::HTMLTableElement::createSharedCellStyle): (WebCore::HTMLTableElement::additionalCellStyle): (WebCore::leakGroupBorderStyle): (WebCore::HTMLTableElement::additionalGroupStyle): * html/HTMLTableElement.h: (HTMLTableElement): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::additionalAttributeStyle): * html/HTMLTableSectionElement.h: (HTMLTableSectionElement): Instead of collecting additional style decls into a vector, switch over to a "PassRefPtr additionalAttributeStyle()". All style declarations that can be reused for all elements are cached at the return sites, leaving only the shared table cell style which we cache on HTMLTableElement. Also removed the canHaveAdditionalAttributeStyleDecls() virtual since the default additionalAttributeStyle() will just return 0. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchAllRules): Updated for the new additional style conventions. 2012-01-26 Vsevolod Vlasov Web Inspector: Scripts panel editor container should be based on UISourceCode objects, not SourceFrames. https://bugs.webkit.org/show_bug.cgi?id=77098 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsNavigator.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.ScriptsPanel.prototype.get visibleView): (WebInspector.ScriptsPanel.prototype.viewForFile): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.EditorContainer): (WebInspector.EditorContainer.prototype.get visibleView): (WebInspector.EditorContainer.prototype.showFile): (WebInspector.EditorContainer.prototype.setFileIsDirty): (WebInspector.EditorContainer.prototype.replaceFiles): (WebInspector.EditorContainer.prototype.reset): (WebInspector.EditorContainerDelegate): (WebInspector.EditorContainerDelegate.prototype.viewForFile): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.replaceUISourceCodes): (WebInspector.ScriptsPanel.SingleFileEditorContainer): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.get visibleView): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showFile): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.setFileIsDirty): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceFiles): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.reset): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype.get visibleView): (WebInspector.TabbedEditorContainer.prototype._titleForFile): (WebInspector.TabbedEditorContainer.prototype._tooltipForFile): (WebInspector.TabbedEditorContainer.prototype._appendFileTab): (WebInspector.TabbedEditorContainer.prototype._tabClosed): (WebInspector.TabbedEditorContainer.prototype._tabSelected): (WebInspector.TabbedEditorContainer.prototype.replaceFiles.get if): (WebInspector.TabbedEditorContainer.prototype.replaceFiles): (WebInspector.TabbedEditorContainer.prototype.setFileIsDirty.get if): (WebInspector.TabbedEditorContainer.prototype.setFileIsDirty): (WebInspector.TabbedEditorContainer.prototype.reset): 2012-01-26 Nikolas Zimmermann SVG + tests are flakey https://bugs.webkit.org/show_bug.cgi?id=77099 Reviewed by Andreas Kling. Bug 76447 changed the way RenderSVGRoot figures out its size. Previously RenderSVGRoot directly called out to the ownerRenderer (RenderEmbeddedObject) to compute its replaced size when embedded through eg. element, which was quite hacky. It now relies on the ownerRenderers availableLogicalWidth/Height to be correctly set, which requires that the ownerRenderer is always laid out before the RenderSVGRoot and not the other way round. This is the source of current flakiness bugs. In trunk FrameView contains several special hacks, to layout the ownerRenderers view, after the RenderSVGRoots view finished layout. This worked without flakiness as RenderSVGRoot used to directly call computeReplacedLogicalWidth/Height on the ownerRenderer, which is now gone. Fortunately we can keep the new design, and can remove all hacks out of RenderSVGRoot/FrameView, if we can guarantee that the ownerRenderer FrameView is laid out before the RenderSVGRoot FrameView. This is a much less error-prone approach as the previous one. This lets us run nrwt --tolerance 0 -p svg -g again, without 100% reproducable failing svg/wicd tests. (There's still one unrelated error, before guard malloc mode passes fully). Test: svg/wicd/sizing-flakiness.html (Adjusted version of the rightsizing test, made to fail with trunk w/o this patch.) * page/FrameView.cpp: Remove m_inLayoutParentView. (WebCore::FrameView::FrameView): Remove no longer needed m_inLayoutParentView. (WebCore::FrameView::forceLayoutParentViewIfNeeded): Simplify, no need to call updateWidgetPositions anymore, nor to clear/query flags in RenderSVGRoot. (WebCore::FrameView::layout): Call forceLayoutParentViewIfNeeded() before laying out the embedded document, to guarantee the correct order. * page/FrameView.h: (FrameView): Remove m_inLayoutParentView. * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::RenderSVGRoot): Remove m_needsSizeNegotiationWithHostDocument. (WebCore::resolveLengthAttributeForSVG): Remove outcommented code, that went in by accident. (WebCore::RenderSVGRoot::layout): Remove m_needsSizeNegotiationWithHostDocument handling which is now incorrect and no longer needed. * rendering/svg/RenderSVGRoot.h: (RenderSVGRoot): Remove m_needsSizeNegotiationWithHostDocument + accessors. 2012-01-23 Andreas Kling Make elements that don't have attributes smaller. Reviewed by Antti Koivisto. Move the inline style declaration from StyledElement to NamedNodeMap, since having an inline style declaration also implies having a style attribute on the element. This saves one CPU word per element that has no attributes. This reduces memory consumption by 412 kB (on 64-bit) when viewing the full HTML5 spec at . * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::ensureInlineStyleDecl): (WebCore::NamedNodeMap::destroyInlineStyleDecl): (WebCore::NamedNodeMap::createInlineStyleDecl): * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::inlineStyleDecl): * dom/StyledElement.cpp: (WebCore::StyledElement::updateStyleAttribute): (WebCore::StyledElement::addSubresourceAttributeURLs): * dom/StyledElement.h: (WebCore::StyledElement::inlineStyleDecl): (WebCore::StyledElement::ensureInlineStyleDecl): (WebCore::StyledElement::destroyInlineStyleDecl): 2012-01-26 Jesus Sanchez-Palencia [Qt] Use ICU if available https://bugs.webkit.org/show_bug.cgi?id=76821 Reviewed by Simon Hausmann. Adding correct sources to a Qt 5 based build. No new tests, it's just a build dependency change. * Target.pri: 2012-01-26 Nikolas Zimmermann Not reviewed. Fix mac build after r105988. * WebCore.exp.in: 2012-01-26 Nándor Huszka [WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission https://bugs.webkit.org/show_bug.cgi?id=42545 Reviewed by Zoltan Herczeg. No need for new tests, there is no behavior change. Added a line to file which copies the forwarding headers. * WebCore.vcproj/copyForwardingHeaders.cmd: 2012-01-26 Nikolas Zimmermann Not reviewed. Fix Qt build after r105978. * rendering/svg/RenderSVGResourceClipper.cpp: Add missing Frame/FrameView includes. * rendering/svg/RenderSVGResourceSolidColor.cpp: Ditto. * rendering/svg/SVGInlineTextBox.cpp: Ditto. * rendering/svg/SVGRenderSupport.cpp: Ditto. 2012-01-26 Nikolas Zimmermann Not reviewed. Fix non-AllInOne builds after r105978. * rendering/svg/RenderSVGResource.cpp: 2012-01-26 Vsevolod Vlasov Unreviewed inspector closure compilation fix. * inspector/front-end/externs.js: (WebInspector.closeDrawerView): 2012-01-26 Nikolas Zimmermann Not reviewed. Fix release builds after r105978. * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paintSelectionBackground): Remove unused variable. 2012-01-26 Kent Tamura Unreviewed, rolling out r105968. http://trac.webkit.org/changeset/105968 https://bugs.webkit.org/show_bug.cgi?id=76995 Incorrect behavior change * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setIndeterminate): 2012-01-26 Nikolas Zimmermann crash in WebCore::RenderSVGContainer::paint https://bugs.webkit.org/show_bug.cgi?id=69714 Reviewed by Dirk Schulze. When RenderSVGResourceClipper draws its children to a mask, it requires some special constraints: - fill-opacity/stroke-opacity/opacity forced to 1 - masker/filter resources shouldn't be applied to the children - fill must be set to the initial fill paint server for all children (solid black) - stroke must be set to the initial stroke paint server for all children (none) This was achieved before by mutating the style of the children, which made them need a relayout. SVGImageBufferTools:renderSubtreeToImageBuffer thus needed to layout the children, if needed, before painting. This can be completly avoided, when changing RenderSVGResourceClipper to avoid style mutations. Introduce a new "PaintBehaviorRenderingSVGMask", and set the current FrameViews paintBehaviour to this state, before painting the subtree. This way we can detect that we're rendering a clip mask, without having to mutate the style of the children and without having to relayout. We can now ASSERT(!item->needsLayout()) in renderSubtreeToImageBuffer. Tests: svg/clip-path/clip-path-tspan-and-stroke.svg svg/custom/layout-loop.svg * rendering/PaintPhase.h: * rendering/svg/RenderSVGResource.cpp: (WebCore::requestPaintingResource): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper): (WebCore::RenderSVGResourceClipper::removeAllClientsFromCache): (WebCore::RenderSVGResourceClipper::removeClientFromCache): (WebCore::RenderSVGResourceClipper::applyClippingToContext): (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourceClipper.h: * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourceMasker.h: * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::createTileImage): * rendering/svg/RenderSVGResourceSolidColor.cpp: (WebCore::RenderSVGResourceSolidColor::applyResource): * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::renderSubtreeToImageBuffer): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paintSelectionBackground): (WebCore::SVGInlineTextBox::paint): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::prepareToRenderSVGContent): 2012-01-26 Nikolas Zimmermann Not reviewed. Try to fix Gtk build - JSShadowRoot.cpp can't be found, fix by looking for it in the derived sources. * GNUmakefile.list.am: 2012-01-24 Vsevolod Vlasov Web Inspector: Improve user experience of advanced search panel closing. https://bugs.webkit.org/show_bug.cgi?id=76983 Reviewed by Pavel Feldman. Added close button to search panel. Esc now closes the panel even when search filed has focus. * English.lproj/localizedStrings.js: * inspector/front-end/AdvancedSearchController.js: (WebInspector.AdvancedSearchController.prototype.close): (WebInspector.SearchView): (WebInspector.SearchView.prototype._onKeyDown): (WebInspector.SearchView.prototype._closeButtonPressed): * inspector/front-end/inspector.css: (.search-view .search-panel): (.search-view .search-panel button.search-close-button): * inspector/front-end/inspector.js: (WebInspector._escPressed): (WebInspector.closeDrawerView): 2012-01-26 Joe Thomas https://bugs.webkit.org/show_bug.cgi?id=76995. WebKit fails IETC :indeterminate and input type=radio test. As per the HTML spec http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#dom-input-indeterminate, only checkbox input type should respect the indeterminate state. Removed the support for indeterminate state for radio input types. Reviewed by Eric Seidel. Modified the existing test cases. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setIndeterminate): Indeterminate state is supported only for checkbox input type. 2012-01-25 Daniel Cheng [chromium] Fix ClipboardChromium::validateFilename to actually operate on extensions https://bugs.webkit.org/show_bug.cgi?id=76996 As it turns out, we were always calling validateFilename on a data object with an empty extension. Now we call it on an actual extension so that it's sanitized. Reviewed by Tony Chang. Unit test: webkit_unit_tests --gtest_filter=ClipboardChromium.* * WebCore.gypi: * platform/chromium/ClipboardChromium.cpp: (WebCore::writeImageToDataObject): * platform/chromium/ClipboardChromium.h: (ClipboardChromium): * platform/chromium/ClipboardChromiumLinux.cpp: Removed. * platform/chromium/ClipboardChromiumPosix.cpp: Renamed from Source/WebCore/platform/chromium/ClipboardChromiumMac.cpp. (WebCore): (WebCore::isInvalidFileCharacter): (WebCore::ClipboardChromium::validateFilename): * platform/chromium/ClipboardChromiumWin.cpp: (WebCore): (WebCore::ClipboardChromium::validateFilename): 2012-01-25 James Robinson [chromium] Rollout r100751, this mechanism does not work and is very slow https://bugs.webkit.org/show_bug.cgi?id=77055 Unreviewed rollout of http://trac.webkit.org/changeset/100751. The refresh rate mechanism is not implemented, but it still triggers a very slow codepath and triggers races on some platforms. * platform/PlatformScreen.h: (WebCore): * platform/chromium/PlatformScreenChromium.cpp: * platform/chromium/PlatformSupport.h: (PlatformSupport): (): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (CCSettings): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeImplOnImplThread): 2012-01-25 Mark Rowe Reapply Daniel Bates's build fix from r105847 after the exact same issue was reintroduced in r105930. Attempt to fix Mac build after changeset . (https://bugs.webkit.org/show_bug.cgi?id=75049) Don't include NotImplemented.h in KURL.h since NotImplemented.h includes Logging.h, which defines LOG_CHANNEL_PREFIX to be "Log". And this conflicts with the inclusion of WebKitLogging.h in WebHTMLView.mm (which would have defined LOG_CHANNEL_PREFIX to be "WebKitLog"). * platform/KURL.h: (WebCore::KURL::innerURL): 2012-01-25 Eric Seidel Unreviewed, rolling out r105940. http://trac.webkit.org/changeset/105940 https://bugs.webkit.org/show_bug.cgi?id=76095 Only half this change landed * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: 2012-01-25 Mark Rowe Build in to an alternate location when USE_STAGING_INSTALL_PATH is set. Adopt USE_STAGING_INSTALL_PATH Reviewed by David Kilzer. * Configurations/WebCore.xcconfig: Define NORMAL_WEBCORE_FRAMEWORKS_DIR, which contains the path where WebCore is normally installed. Update WEBCORE_FRAMEWORKS_DIR to point to the staged frameworks directory when USE_STAGING_INSTALL_PATH is set. Define NORMAL_PRODUCTION_FRAMEWORKS_DIR, which contains the path where our public frameworks are normally installed. Update PRODUCTION_FRAMEWORKS_DIR to point to the staged frameworks directory when USE_STAGING_INSTALL_PATH is set. Always set the framework's install name based on the normal framework location. This prevents an incorrect install name from being used when installing in to the staged frameworks directory. Look for our other frameworks in the staged frameworks directory when USE_STAGING_INSTALL_PATH is set. 2012-01-25 Eric Seidel "text" and "URL" legacy clipboard types should not be case sensitive https://bugs.webkit.org/show_bug.cgi?id=76947 Reviewed by Adam Barth. This matches the HTML5 spec which says the first thing to do is to lowercase the type before comparing. I also removed the stripping of whitespace since that is not part of the modern spec (and no tests failed as a result of removal). Turns out we already had a test for case sensitivity, but it was disabled on Mac so I just re-enabled it and have added failing expectations for the parts of the test we still fail. * platform/mac/ClipboardMac.mm: (WebCore::cocoaTypeFromHTMLClipboardType): (WebCore::ClipboardMac::getData): 2012-01-25 Eric Seidel HTMLIsIndexElement should not expose HTMLInputElement properties https://bugs.webkit.org/show_bug.cgi?id=76095 Reviewed by Adam Barth. document.createElement("isindex") should produce an HTMLUnknownElement per the HTML5 spec. The parser automagically translates into a whole dom tree roughly representing what used to do 15 years ago. :) This patch just removes our support for HTMLIsIndexElement. The parser support was already in. Having support for HTMLIsIndexElement was causing one of the IE TestCenter tests to fail. Test: fast/dom/HTMLIsIndexElement/prototype-chain.html * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: (WebKit::createHTMLElementWrapper): * bindings/objc/DOM.mm: (WebCore::createElementClassMap): * bindings/objc/DOMHTML.h: * bindings/objc/PublicDOMInterfaces.h: * html/HTMLElementsAllInOne.cpp: * html/HTMLIsIndexElement.cpp: Removed. * html/HTMLIsIndexElement.h: Removed. * html/HTMLIsIndexElement.idl: Removed. * html/HTMLTagNames.in: * page/DOMWindow.idl: 2012-01-25 Eric Seidel HTMLEmbedObject should match HTMLObjectElement by stopping any load when it is removed from beforeload https://bugs.webkit.org/show_bug.cgi?id=74360 Reviewed by Adam Barth. Neither of these !renderer() checks is strictly necessary since requestObject() makes the same check. However requestObject() asserts before it makes that check, so it makes sense to add the check to HTMLEmebedObject instead of removing the check from HTMLObjectElement. I also moved the protect RefPtr to before the beforeload dispatch since beforeload can remove the whole DOM element (as this test does) and thus I beleive the renderer() check could be checking free'd memory. Updated fast/dom/beforeload/remove-flash-in-beforeload-listener.html to test as well as . * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): 2012-01-25 Kent Tamura Move focus/blur handling code of HTMLInputElement to InputType https://bugs.webkit.org/show_bug.cgi?id=76984 Reviewed by Dimitri Glazkov. No new tests. Just a refactoring. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::handleFocusEvent): Move the code to PasswordInputType::handleFocusEvent(). (WebCore::HTMLInputElement::handleBlurEvent): Move the code to TextFieldInputType::handleBlurEvent() and PasswordInputType::handleBlurEvent(). * html/InputType.cpp: (WebCore::InputType::handleFocusEvent): * html/InputType.h: (InputType): Add handleFocusEvent(). * html/PasswordInputType.cpp: (WebCore::PasswordInputType::handleFocusEvent): Move the code for type=password from HTMLInputElement::handleFocusEvent(). (WebCore::PasswordInputType::handleBlurEvent): Move the code for tyep=password from HTMLInputElement::handleBlurEvent(). * html/PasswordInputType.h: (PasswordInputType): Add handleFocusEvent() and handleBlurEvent(). * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::handleBlurEvent): Move the code for text field types from HTMLInputElement::handleBlurEvent(). * html/TextFieldInputType.h: (TextFieldInputType): Add handleBlurEvent(). 2012-01-25 Adam Barth Node.cpp shouldn't duplicate QualifiedName parsing logic https://bugs.webkit.org/show_bug.cgi?id=76672 Reviewed by Eric Seidel. I added this code out of ignorance that this logic already existed in Document.cpp. In a future patch, we should consider moving it to QualifiedName.cpp. * dom/Node.cpp: (WebCore): (WebCore::Node::checkSetPrefix): 2012-01-25 Eric Seidel Share more code between updateWidget implementations in HTMLEmbedElement and HTMLObjectElement https://bugs.webkit.org/show_bug.cgi?id=74340 Reviewed by Adam Barth. I'm preparing to unify these two methods, and starting by sharing more code between them. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::guardedDispatchBeforeLoadEvent): * html/HTMLPlugInElement.h: 2012-01-25 Eric Uhrhane Add full support for filesystem URLs. https://bugs.webkit.org/show_bug.cgi?id=75049 Reviewed by Adam Barth. No new tests; existing layout tests cover the basic functionality, and the new functionality won't be there until Chromium adds it. This patch merely enables that, without changing behavior. * fileapi/EntryBase.cpp: (WebCore::EntryBase::toURL): Add missing escaping of URL path. * page/SecurityOrigin.cpp: (WebCore::extractInnerURL): Use innerURL member, if it's populated. * platform/KURL.h: (WebCore::KURL::innerURL): Add innerURL member. * platform/KURLGoogle.cpp: (WebCore::KURLGooglePrivate::KURLGooglePrivate): (WebCore::KURLGooglePrivate::operator=): Add copy constructor and operator=, which are now needed since m_innerURL needs special handling. (WebCore::KURLGooglePrivate::setUtf8): (WebCore::KURLGooglePrivate::setAscii): Add calls to initInnerURL. (WebCore::KURLGooglePrivate::initInnerURL): Add method to init/copy m_innerURL. (WebCore::KURLGooglePrivate::copyTo): Handle m_innerURL during copies. (WebCore::encodeWithURLEscapeSequences): Unescape %2F ['/'] in paths; it's much more readable, and it's safe. * platform/KURLGooglePrivate.h: (WebCore::KURLGooglePrivate::innerURL): Add accessor for new m_innerURL. 2012-01-25 Daniel Cheng [chromium] Refactor Clipboard invalidate for DataTransferItem/DataTransferItemList into a wrapper https://bugs.webkit.org/show_bug.cgi?id=76993 We want to unify the backing data store for ClipboardChromium and DataTransferItems. For that, we want use a similar representation to DataTransferItem list inside ChromiumDataObject. However, since ChromiumDataObject should be valid in scopes where Clipboard is not (e.g. default drag processing), we need to separate the clipboard invalidation logic into a wrapper class. Reviewed by Tony Chang. Covered by existing tests. * platform/chromium/ClipboardChromium.cpp: (): (WebCore::ClipboardChromium::items): * platform/chromium/DataTransferItemChromium.cpp: (WebCore::DataTransferItemChromium::getAsString): * platform/chromium/DataTransferItemListChromium.cpp: (WebCore::DataTransferItemListChromium::length): (WebCore::DataTransferItemListChromium::item): (WebCore::DataTransferItemListChromium::deleteItem): (WebCore::DataTransferItemListChromium::clear): (WebCore::DataTransferItemListChromium::add): 2012-01-25 No'am Rosenthal [Texmap] Divide TextureMapperNode.cpp to 3 files. https://bugs.webkit.org/show_bug.cgi?id=76660 Reviewed by Kenneth Rohde Christiansen. Split the animation part of TextureMapperNode out to a separate file, called TextureMapperAnimation. Provide a clean interface for that class, that allows separating the internals of the scene painting from the internals of the animation interpolation. No new tests. Existing animation tests cover this. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::addAnimation): (WebCore::GraphicsLayerTextureMapper::pauseAnimation): (WebCore::GraphicsLayerTextureMapper::removeAnimation): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (GraphicsLayerTextureMapper): * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::syncCompositingStateSelf): (WebCore::TextureMapperNode::descendantsOrSelfHaveRunningAnimations): (WebCore::TextureMapperNode::syncAnimations): (WebCore::TextureMapperNode::syncAnimationsRecursively): (WebCore::TextureMapperNode::syncCompositingState): * platform/graphics/texmap/TextureMapperNode.h: (TextureMapperNode): 2012-01-25 Hajime Morita ENABLE_SHADOW_DOM should be available via build-webkit --shadow-dom https://bugs.webkit.org/show_bug.cgi?id=76863 Reviewed by Dimitri Glazkov. Added a feature flag. No tests, it's a behid flag configuration change. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2012-01-25 Sheriff Bot Unreviewed, rolling out r105906. http://trac.webkit.org/changeset/105906 https://bugs.webkit.org/show_bug.cgi?id=77038 Breaks compositing/visibility/layer-visible-content.html and compositing/visibility/visibility-image-layers-dynamic.html (Requested by leviw|gardening on #webkit). * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2012-01-25 Mike Fenton Page Up and Page Down mappings are backwards on BlackBerry port. https://bugs.webkit.org/show_bug.cgi?id=77021 Fix Page Up and Page Down mappings as they are reversed. Reviewed by Antonio Gomes. * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp: (WebCore::keyIdentifierForBlackBerryCharacter): (WebCore::windowsKeyCodeForBlackBerryCharacter): 2012-01-25 Hajime Morita should create HTMLContentElement object https://bugs.webkit.org/show_bug.cgi?id=76439 Reviewed by Dimitri Glazkov. - Added HTMLContentElement.idl which has @select attribute. - Added "content" element. Both are behind ENABLE_SHADOW_DOM. Tests: fast/dom/shadow/content-element-api.html fast/dom/shadow/content-element-outside-shadow.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLTagNames.in: * html/shadow/HTMLContentElement.cpp: (WebCore::contentTagName): (WebCore): (WebCore::HTMLContentElement::create): * html/shadow/HTMLContentElement.h: (HTMLContentElement): * html/shadow/HTMLContentElement.idl: Added. 2012-01-25 Sheriff Bot Unreviewed, rolling out r105828. http://trac.webkit.org/changeset/105828 https://bugs.webkit.org/show_bug.cgi?id=77036 Caused many crashes in ClusterFuzz and PerformanceTests (Requested by inferno-sec on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): * rendering/RenderBlock.h: (RenderBlock): 2012-01-25 Shawn Singh Fix the semantics of passing contentsVisible flag to GraphicsLayers https://bugs.webkit.org/show_bug.cgi?id=76975 Reviewed by Simon Fraser. This patch is covered by existing tests, in particular compositing/visibility/layer-visible-content.html; its expectations are rebaselined. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): 2012-01-25 Tony Chang support overflow:auto and overflow:scroll in new flexbox https://bugs.webkit.org/show_bug.cgi?id=76953 Reviewed by David Hyatt. Tests: css3/flexbox/flexbox-overflow-auto-expected.html css3/flexbox/flexbox-overflow-auto.html * rendering/RenderBox.cpp: (WebCore::RenderBox::addLayoutOverflow): In the case of reverse flexboxen, we can overflow up or to the left (like horizontal-bt or rtl content). * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): Call updateScrollInfoAfterLayout() to add overflow scrollbars. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): In row-reverse, offset the start of the content by the scrollbar. (WebCore::RenderFlexibleBox::layoutColumnReverse): In column-reverse, offset the start of the content by the scrollbar. * rendering/RenderFlexibleBox.h: (RenderFlexibleBox): Make isHorizontalFlow public. * rendering/style/RenderStyle.h: (WebCore::RenderStyleBitfields::isReverseFlexDirection): Convenience method. 2012-01-25 Sheriff Bot Unreviewed, rolling out r105885. http://trac.webkit.org/changeset/105885 https://bugs.webkit.org/show_bug.cgi?id=77027 Causes assertions in Position. (Requested by leviw|gardening on #webkit). * dom/Position.cpp: (WebCore::Position::upstream): (WebCore::Position::downstream): * dom/PositionIterator.cpp: * dom/PositionIterator.h: (PositionIterator): * editing/htmlediting.cpp: (WebCore::nextCandidate): (WebCore::nextVisuallyDistinctCandidate): (WebCore::previousCandidate): (WebCore::previousVisuallyDistinctCandidate): 2012-01-25 Alexis Menard border-image should be implemented like a shorthand. https://bugs.webkit.org/show_bug.cgi?id=76697 Reviewed by Tony Chang. Make sure that border-image is implemented like a shorthand : when we parse it we set the correct value to its longhands. The code was not doing it previously as we inherited the old implementation of -webkit-border-image which is not a shorthand but a regular property. It will then increase style.length for a given element as we now expand the longhands. The behavior stays the same for -webkit-border-image. Test: fast/css/border-image-style-length.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::commitWebKitBorderImage): (WebCore::BorderImageParseContext::commitBorderImage): (BorderImageParseContext): (WebCore::BorderImageParseContext::commitBorderImageProperty): (WebCore::CSSParser::parseBorderImage): * css/CSSParser.h: (): * css/CSSPropertyLonghand.cpp: (WebCore::initShorthandMap): * css/CSSStyleApplyProperty.cpp: (): (WebCore::ApplyPropertyExpanding::applyInheritValue): (WebCore::ApplyPropertyExpanding::applyInitialValue): (WebCore::ApplyPropertyExpanding::applyValue): (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapNinePieceImage): * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::ensurePropertyMap): (WebCore::addShorthandProperties): * rendering/style/RenderStyle.h: (WebCore::RenderStyleBitfields::borderImageSlices): (WebCore::RenderStyleBitfields::borderImageWidth): (WebCore::RenderStyleBitfields::borderImageOutset): (RenderStyleBitfields): (WebCore::RenderStyleBitfields::setBorderImageSlices): (WebCore::RenderStyleBitfields::setBorderImageWidth): (WebCore::RenderStyleBitfields::setBorderImageOutset): 2012-01-23 MORITA Hajime [Refactoring][Internals] Should have InternalSettings https://bugs.webkit.org/show_bug.cgi?id=76424 Reviewed by Kent Tamura. This change extracted setting related method from window.internals to window.internals.settings object. - Invoked Internals::reset() in the constructor to employ Document object. - Moved setting and configuration related Internals methods to newly introduced InternalSettings object. No new tests, covered by existing tests. * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * GNUmakefile.list.am: * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.vcproj/WebCoreTestSupport.vcproj: * WebCore.xcodeproj/project.pbxproj: * testing/InternalSettings.cpp: Added. (WebCore::InternalSettings::create): (WebCore::InternalSettings::~InternalSettings): (WebCore::InternalSettings::InternalSettings): (WebCore::InternalSettings::settings): (WebCore::InternalSettings::document): (WebCore::InternalSettings::page): (WebCore::InternalSettings::setInspectorResourcesDataSizeLimits): (WebCore::InternalSettings::setForceCompositingMode): (WebCore::InternalSettings::setAcceleratedFiltersEnabled): (WebCore::InternalSettings::setEnableCompositingForFixedPosition): (WebCore::InternalSettings::setEnableCompositingForScrollableFrames): (WebCore::InternalSettings::setAcceleratedDrawingEnabled): (WebCore::InternalSettings::setEnableScrollAnimator): (WebCore::InternalSettings::setZoomAnimatorTransform): (WebCore::InternalSettings::setZoomParameters): (WebCore::InternalSettings::setMockScrollbarsEnabled): (WebCore::InternalSettings::setPasswordEchoEnabled): (WebCore::InternalSettings::setPasswordEchoDurationInSeconds): (WebCore::InternalSettings::setShouldLayoutFixedElementsRelativeToFrame): (WebCore::InternalSettings::setUnifiedTextCheckingEnabled): (WebCore::InternalSettings::unifiedTextCheckingEnabled): (WebCore::InternalSettings::pageScaleFactor): (WebCore::InternalSettings::setPageScaleFactor): (WebCore::InternalSettings::setPerTileDrawingEnabled): * testing/InternalSettings.h: Added. * testing/InternalSettings.idl: Added. * testing/Internals.cpp: (WebCore::Internals::create): (WebCore::Internals::Internals): (WebCore::Internals::reset): * testing/Internals.h: (WebCore::Internals::settings): * testing/Internals.idl: * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): * testing/v8/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): 2012-01-25 Alexis Menard border-image should not crash when the source is not specified. https://bugs.webkit.org/show_bug.cgi?id=77001 Reviewed by Andreas Kling. This bug was introduced by r105502 but was exposed by r105738. The image-source of a border-image is not mandatory therefore it may happen that you have no value set for it. WebCore::createBorderImageValue was wrongly assuming that the image is always set. This problem also required a bit of refactoring in CSSStyleSelector::mapNinePieceImage to take into account that the image could be optional (just like other properties). Test: fast/css/border-image-null-image-crash.html * css/CSSBorderImage.cpp: (WebCore::createBorderImageValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapNinePieceImage): 2012-01-25 Kenneth Rohde Christiansen [Qt] Implement tap feedback respecting -webkit-tap-highlight-color https://bugs.webkit.org/show_bug.cgi?id=76914 Reviewed by Simon Hausmann. Implement highlighting of dom nodes with a rounded rect, respecting the color of -webkit-tap-highlight-color and any transform applied to the element. Tested with manual test. * Target.pri: * page/GestureTapHighlighter.cpp: Added. (WebCore::GestureTapHighlighter::pathForNodeHighlight): * page/GestureTapHighlighter.h: Added. 2012-01-25 Joshua Bell IndexedDB: Need to distinguish key paths that don't yield value vs. yield invalid key https://bugs.webkit.org/show_bug.cgi?id=76487 Implement the precondition checks for IDBObjectStore.add/put operations: raise an error if there is a key generator (autoIncrement) and the path yields a value and the value is not a valid key; raise an error if any of the index key paths yield a value which is not a valid key. Reviewed by Tony Chang. Tests: storage/indexeddb/keypath-edges.html storage/indexeddb/objectstore-basics.html * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::put): 2012-01-25 Yong Li https://bugs.webkit.org/show_bug.cgi?id=65377 Skip the entire node when it is right to do so, instead of stepping through every character, so we save CPU time on checking every position unnecessarily. Reviewed by Darin Adler. Test: perf/selection-skip-hidden-node.html * dom/Position.cpp: (WebCore::Position::upstream): (WebCore::Position::downstream): * dom/PositionIterator.cpp: (WebCore::PositionIterator::moveToLeafNodeStart): (WebCore::PositionIterator::moveToLeafNodeEnd): * dom/PositionIterator.h: * editing/htmlediting.cpp: (WebCore::nextCandidate): (WebCore::nextVisuallyDistinctCandidate): (WebCore::previousCandidate): (WebCore::previousVisuallyDistinctCandidate): 2012-01-25 Kaustubh Atrawalkar Remove unnecessary member variable from PluginView. https://bugs.webkit.org/show_bug.cgi?id=76909 Reviewed by Adam Roben. No new tests needed. * plugins/PluginView.cpp: (WebCore::PluginView::getURLNotify): (WebCore::PluginView::getURL): (WebCore::PluginView::PluginView): (WebCore::PluginView::handlePost): (WebCore::PluginView::getValueForURL): (WebCore::PluginView::setValueForURL): * plugins/PluginView.h: 2012-01-25 Yael Aharon [Qt] Build fix when using force_static_libs_as_shared https://bugs.webkit.org/show_bug.cgi?id=76832 Reviewed by Simon Hausmann. Add a dependency on QtWidgets, when compiling against Qt5. No new tests. This is a build fix. * Target.pri: 2012-01-25 Sami Kyostila Clipping of render layer boundaries does not take page scale into account https://bugs.webkit.org/show_bug.cgi?id=76850 Reviewed by Simon Fraser. When inserting render layers into the compositor's overlap map, the layer boundaries are clipped against any potential parent clip rects. The clip rects are given in CSS coordinates, while the render layer boundaries are in scaled CSS coordinates, so the result is incorrect. This patch scales the clip rects before calculating the intersection. Test: compositing/overflow/overflow-scaled-descendant-overlapping.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): 2012-01-25 Stephen Chenney Linecaps wrong for zero length lines https://bugs.webkit.org/show_bug.cgi?id=71820 Reviewed by Nikolas Zimmermann. Total reworking of the method used to draw zero-length linecaps for SVG. This patch works for all zero length sub-paths. Tests: svg/stroke/zero-length-path-linecap-rendering.svg svg/stroke/zero-length-subpaths-linecap-rendering.svg * rendering/svg/RenderSVGShape.cpp: Significant refactoring to enable new implementation and clarify code. (WebCore::RenderSVGShape::createShape): (WebCore::RenderSVGShape::strokeContains): (WebCore::RenderSVGShape::shouldStrokeZeroLengthSubpath): (WebCore::RenderSVGShape::zeroLengthSubpathRect): (WebCore::RenderSVGShape::zeroLengthLinecapPath): (WebCore::RenderSVGShape::nonScalingStrokePath): (WebCore::RenderSVGShape::setupNonScalingStrokeTransform): (WebCore::RenderSVGShape::fillShape): (WebCore::RenderSVGShape::strokePath): (WebCore::RenderSVGShape::fillAndStrokePath): (WebCore::RenderSVGShape::updateCachedBoundaries): (WebCore::RenderSVGShape::processZeroLengthSubpaths): * rendering/svg/RenderSVGShape.h: Declarations for new methods. * rendering/svg/SVGSubpathData.h: Class for finding zero length subpaths. * svg/SVGPathBuilder.h: Fix typos * svg/SVGPathConsumer.h: Fix typos * svg/SVGPathSegListBuilder.h: Fix typos * svg/SVGPathTraversalStateBuilder.h: Fix typos 2012-01-23 Yury Semikhatsky Web Inspector: show memory counter graphs in timeline panel https://bugs.webkit.org/show_bug.cgi?id=76843 Timeline panel is extended with several graphs depicting total node count, number of DOM groups and event listeners. This feature is hidden behind experimental setting. Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::setDomCountersEnabled): (WebCore::InspectorTimelineAgent::didCallFunction): (WebCore::InspectorTimelineAgent::didDispatchEvent): (WebCore::InspectorTimelineAgent::didWriteHTML): (WebCore::InspectorTimelineAgent::didFireTimer): (WebCore::InspectorTimelineAgent::didEvaluateScript): (WebCore::InspectorTimelineAgent::setHeapSizeStatistic): (WebCore::InspectorTimelineAgent::collectDomCounters): (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): * inspector/InspectorTimelineAgent.h: (WebCore::InspectorTimelineAgent::create): * inspector/TimelineRecordFactory.cpp: * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.MemoryStatistics): (WebInspector.MemoryStatistics.prototype.setTopPosition): (WebInspector.MemoryStatistics.prototype.setSidebarWidth): (WebInspector.MemoryStatistics.prototype._sidebarResized): (WebInspector.MemoryStatistics.prototype._updateSize): (WebInspector.MemoryStatistics.prototype._updateSidebarSize): (WebInspector.MemoryStatistics.prototype._createCounterSidebarElement): (WebInspector.MemoryStatistics.prototype.addTimlineEvent): (WebInspector.MemoryStatistics.prototype._draw.getGroupCount): (WebInspector.MemoryStatistics.prototype._draw.getNodeCount): (WebInspector.MemoryStatistics.prototype._draw.getListenerCount): (WebInspector.MemoryStatistics.prototype._draw): (WebInspector.MemoryStatistics.prototype._calculateVisibleIndexes): (WebInspector.MemoryStatistics.prototype._onMouseOver): (WebInspector.MemoryStatistics.prototype._refreshCurrentValues): (WebInspector.MemoryStatistics.prototype.visible): (WebInspector.MemoryStatistics.prototype.show): (WebInspector.MemoryStatistics.prototype.refresh): (WebInspector.MemoryStatistics.prototype.hide): (WebInspector.MemoryStatistics.prototype._setVerticalClip): (WebInspector.MemoryStatistics.prototype._calculateXValues): (WebInspector.MemoryStatistics.prototype._drawPolyline): (WebInspector.MemoryStatistics.prototype._drawBottomBound): (WebInspector.MemoryStatistics.prototype._clear): (WebInspector.TimelinePanel.prototype._startSplitterDragging): (WebInspector.TimelinePanel.prototype._splitterDragging): (WebInspector.TimelinePanel.prototype._endSplitterDragging): (WebInspector.TimelinePanel.prototype._setSplitterPosition): (WebInspector.TimelinePanel.prototype.get statusBarItems): (WebInspector.TimelinePanel.prototype._createStatusbarButtons): (WebInspector.TimelinePanel.prototype._toggleMemoryStatistics): (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded): (WebInspector.TimelinePanel.prototype.sidebarResized): (WebInspector.TimelinePanel.prototype._refresh): * inspector/front-end/timelinePanel.css: (#timeline-memory-splitter): (#memory-counters-graph): (#memory-graphs-container): (#memory-graphs-container .split-view-contents): (.timeline-marker): (.memory-counter-sidebar-info): (.memory-counter-sidebar-info.bottom-border-visible): 2012-01-25 Joseph Pecoraro Web Inspector: Remove Unused InspectorFrontendHost.search Stub Reviewed by Pavel Feldman. * inspector/front-end/InspectorFrontendHostStub.js: 2012-01-25 Vsevolod Vlasov Unreviewed inspector style fix. * inspector/front-end/tabbedPane.css: (.tabbed-pane-header-tab-close-button): (select.tabbed-pane-header-tabs-drop-down-select): 2012-01-25 Pablo Flouret Fix incorrect behavior in HTMLCollection.prototype.item(). https://bugs.webkit.org/show_bug.cgi?id=74468 Reviewed by Adam Barth. HTMLCollection.prototype.item("someString") was falling back to .namedItem("someString"), which is wrong per spec. Also align the handling of various other types of objects passed as the argument with the spec and the rest of the browsers. Test: fast/dom/collection-item.html * bindings/js/JSHTMLCollectionCustom.cpp: Remove custom implementation of item(). * bindings/v8/custom/V8HTMLCollectionCustom.cpp: Ditto. * html/HTMLCollection.idl: Remove [Custom] in item(), it's not needed. 2012-01-25 Sheriff Bot Unreviewed, rolling out r105858. http://trac.webkit.org/changeset/105858 https://bugs.webkit.org/show_bug.cgi?id=77004 It made many tests crash on Qt (Requested by Ossy on #webkit). * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::addAnimation): (WebCore::GraphicsLayerTextureMapper::pauseAnimation): (WebCore::GraphicsLayerTextureMapper::removeAnimation): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (GraphicsLayerTextureMapper): * platform/graphics/texmap/TextureMapperAnimation.cpp: Removed. * platform/graphics/texmap/TextureMapperAnimation.h: Removed. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::syncCompositingStateSelf): (WebCore::TextureMapperNode::descendantsOrSelfHaveRunningAnimations): (WebCore::normalizedAnimationValue): (WebCore): (WebCore::TextureMapperNode::applyOpacityAnimation): (WebCore::solveEpsilon): (WebCore::solveCubicBezierFunction): (WebCore::solveStepsFunction): (WebCore::applyTimingFunction): (WebCore::TextureMapperNode::applyTransformAnimation): (WebCore::TextureMapperNode::applyAnimationFrame): (WebCore::TextureMapperNode::applyAnimation): (WebCore::TextureMapperNode::hasOpacityAnimation): (WebCore::TextureMapperNode::hasTransformAnimation): (WebCore::TextureMapperNode::syncAnimations): (WebCore::TextureMapperNode::syncAnimationsRecursively): (WebCore::TextureMapperNode::syncCompositingState): (WebCore::TextureMapperAnimation::TextureMapperAnimation): * platform/graphics/texmap/TextureMapperNode.h: (TextureMapperAnimation): (WebCore::TextureMapperAnimation::create): (WebCore): (TextureMapperNode): 2012-01-25 Kenichi Ishibashi fast/text/unicode-variation-selector.html doesn't pass on Lion https://bugs.webkit.org/show_bug.cgi?id=76041 Reviewed by Dan Bernstein. Consumes non-BMP marks in advanceByCombiningCharacterSequence() to take into account Ideographic variation selectors (these are non-BMP marks). No new tests. fast/text/unicode-variation-selector.html should pass on Lion. * platform/graphics/mac/ComplexTextController.cpp: (WebCore::advanceByCombiningCharacterSequence): Use Unicode code point to iterate the loop which consumes marks. 2012-01-25 Ilya Tikhonovsky Web Inspector: DetailedHeapSnapshot: adjust node name cell format for the retainers tree. https://bugs.webkit.org/show_bug.cgi?id=76989 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/DetailedHeapshotGridNodes.js: (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell): (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data): (WebInspector.HeapSnapshotObjectNode): (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell): (WebInspector.HeapSnapshotObjectNode.prototype._postfixObjectCell): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotEdgesProvider.prototype._serialize): 2012-01-25 Vsevolod Vlasov Web Inspector: [InspectorIndexedDB] Pass Database, object stores and indexes meta information to frontend. https://bugs.webkit.org/show_bug.cgi?id=76711 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorIndexedDBAgent.cpp: (WebCore): (WebCore::assertDocument): (WebCore::assertIDBFactory): (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame): (WebCore::InspectorIndexedDBAgent::requestDatabase): * inspector/InspectorIndexedDBAgent.h: (InspectorIndexedDBAgent): * inspector/front-end/IndexedDBModel.js: (WebInspector.IndexedDBModel): (WebInspector.IndexedDBModel.prototype._frameDetached): (WebInspector.IndexedDBModel.prototype._reset): (WebInspector.IndexedDBModel.prototype._originAddedToFrame): (WebInspector.IndexedDBModel.prototype._originRemovedFromFrame): (WebInspector.IndexedDBModel.prototype._originRemoved): (WebInspector.IndexedDBModel.prototype._updateOriginDatabaseNames): (WebInspector.IndexedDBModel.prototype._databaseRemoved): (WebInspector.IndexedDBModel.prototype._loadDatabaseNamesForFrame): (WebInspector.IndexedDBModel.prototype._loadDatabase): (WebInspector.IndexedDBModel.Frame): (WebInspector.IndexedDBModel.Database): (WebInspector.IndexedDBModel.ObjectStore): (WebInspector.IndexedDBModel.ObjectStoreIndex): (WebInspector.IndexedDBRequestManager.prototype._databaseNamesLoaded): (WebInspector.IndexedDBRequestManager.prototype.requestDatabase.innerCallback): (WebInspector.IndexedDBRequestManager.prototype.requestDatabase): (WebInspector.IndexedDBRequestManager.prototype._databaseLoaded): (WebInspector.IndexedDBRequestManager.prototype._frameDetached): (WebInspector.IndexedDBRequestManager.prototype._databaseRemoved): (WebInspector.IndexedDBRequestManager.prototype._reset): (WebInspector.IndexedDBRequestManager.DatabaseRequest): (WebInspector.IndexedDBDispatcher.prototype.databaseNamesLoaded): (WebInspector.IndexedDBDispatcher.prototype.databaseLoaded): 2012-01-25 Peter Rybin Web Inspector: CodeGeneratorInspector.py: add optional runtime validator https://bugs.webkit.org/show_bug.cgi?id=76676 Reviewed by Yury Semikhatsky. Generator algorithm is redone significantly. * inspector/CodeGeneratorInspector.py: (RawTypes.BaseType): (RawTypes.BaseType.request_raw_internal_runtime_cast): (RawTypes.BaseType.generate_validate_method_impl): (RawTypes): (RawTypes.generate_validate_methods): (RawTypes.String): (RawTypes.String.generate_validate_method): (RawTypes.String.get_raw_validator_call_text): (RawTypes.Int): (RawTypes.Int.generate_validate_method): (RawTypes.Int.get_raw_validator_call_text): (RawTypes.Number): (RawTypes.Number.generate_validate_method): (RawTypes.Number.get_raw_validator_call_text): (RawTypes.Bool): (RawTypes.Bool.generate_validate_method): (RawTypes.Bool.get_raw_validator_call_text): (RawTypes.Object): (RawTypes.Object.generate_validate_method): (RawTypes.Object.get_raw_validator_call_text): (RawTypes.Any): (RawTypes.Any.generate_validate_method): (RawTypes.Any.get_raw_validator_call_text): (RawTypes.Array): (RawTypes.Array.generate_validate_method): (RawTypes.Array.get_raw_validator_call_text): (TypeBindings.create_named_type_declaration.Helper): (TypeBindings.create_ad_hoc_type_declaration.Helper): (TypeBindings.create_type_declaration_.EnumBinding): (TypeBindings.create_type_declaration_.EnumBinding.resolve_inner): (TypeBindings.create_type_declaration_.EnumBinding.request_user_runtime_cast): (TypeBindings.create_type_declaration_.EnumBinding.request_internal_runtime_cast): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.EnumBinding.get_validator_call_text): (TypeBindings.create_type_declaration_.EnumBinding.get_in_c_type_text): (TypeBindings.create_type_declaration_.PlainString): (TypeBindings.create_type_declaration_.PlainString.resolve_inner): (TypeBindings.create_type_declaration_.PlainString.request_user_runtime_cast): (TypeBindings.create_type_declaration_.PlainString.request_internal_runtime_cast): (TypeBindings.create_type_declaration_.PlainString.get_validator_call_text): (TypeBindings.create_type_declaration_.TypedefString): (TypeBindings.create_type_declaration_.TypedefString.resolve_inner): (TypeBindings.create_type_declaration_.TypedefString.request_user_runtime_cast): (TypeBindings.create_type_declaration_.TypedefString.request_internal_runtime_cast): (TypeBindings.create_type_declaration_.TypedefString.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.TypedefString.get_validator_call_text): (TypeBindings.create_type_declaration_.TypedefString.get_in_c_type_text): (TypeBindings.create_type_declaration_.ClassBinding): (TypeBindings.create_type_declaration_.ClassBinding.resolve_inner): (TypeBindings.create_type_declaration_.ClassBinding.resolve_inner.PropertyData): (TypeBindings.create_type_declaration_.ClassBinding.resolve_inner.ResolveData): (TypeBindings.create_type_declaration_.ClassBinding.request_user_runtime_cast): (TypeBindings.create_type_declaration_.ClassBinding.request_internal_runtime_cast): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder): (get_validator_call_text): (get_in_c_type_text): (AdHocTypeContextImpl): (AdHocTypeContextImpl.__init__): (AdHocTypeContextImpl.get_type_name_fix): (AdHocTypeContextImpl.get_type_name_fix.NameFix): (AdHocTypeContextImpl.get_type_name_fix.NameFix.output_comment): (AdHocTypeContextImpl.add_type): (PlainObjectBinding): (PlainObjectBinding.resolve_inner): (PlainObjectBinding.request_user_runtime_cast): (PlainObjectBinding.request_internal_runtime_cast): (PlainObjectBinding.get_validator_call_text): (ArrayBinding): (ArrayBinding.resolve_inner): (ArrayBinding.resolve_inner.AdHocTypeContext): (ArrayBinding.resolve_inner.AdHocTypeContext.get_type_name_fix): (ArrayBinding.resolve_inner.AdHocTypeContext.get_type_name_fix.NameFix): (ArrayBinding.resolve_inner.AdHocTypeContext.get_type_name_fix.NameFix.output_comment): (ArrayBinding.resolve_inner.AdHocTypeContext.add_type): (ArrayBinding.resolve_inner.ResolveData): (ArrayBinding.request_user_runtime_cast): (ArrayBinding.request_internal_runtime_cast): (ArrayBinding.get_code_generator): (ArrayBinding.get_code_generator.CodeGenerator.generate_type_builder): (ArrayBinding.get_validator_call_text): (ArrayBinding.get_in_c_type_text): (RawTypeBinding.resolve_inner): (RawTypeBinding): (RawTypeBinding.request_user_runtime_cast): (RawTypeBinding.request_internal_runtime_cast): (RawTypeBinding.get_validator_call_text): (TypeData.get_name): (TypeData): (TypeData.get_domain_name): (resolve_param_type): (NeedRuntimeCastRequest): (NeedRuntimeCastRequest.__init__): (NeedRuntimeCastRequest.acknowledge): (NeedRuntimeCastRequest.is_acknowledged): (resolve_all_types): (resolve_all_types.ForwardListener): (resolve_all_types.ForwardListener.add_type_data): (resolve_all_types.ResolveContext): (Generator): (Generator.go): (Generator.process_event): (Generator.process_event.AdHocTypeContext): (Generator.process_event.AdHocTypeContext.add_type): (Generator.process_event.EventForwardListener): (Generator.process_event.EventForwardListener.add_type_data): (Generator.process_event.EventResolveContext): (Generator.process_event.EventGenerateContext): (Generator.process_types.GenerateContext): (Generator.process_types.create_type_builder_caller.call_type_builder): (Generator.process_types.generate_forward_callback): * inspector/InspectorValues.h: (WebCore::InspectorObject::size): 2012-01-25 Anton Muhin Unreview manual revert of r105843. * fileapi/EntryBase.cpp: (WebCore::EntryBase::toURL): * page/SecurityOrigin.cpp: (WebCore::extractInnerURL): * platform/KURL.h: (KURL): * platform/KURLGoogle.cpp: (WebCore): (WebCore::KURLGooglePrivate::setUtf8): (WebCore::KURLGooglePrivate::setAscii): (WebCore::KURLGooglePrivate::initProtocolIsInHTTPFamily): (WebCore::KURLGooglePrivate::copyTo): (WebCore::encodeWithURLEscapeSequences): * platform/KURLGooglePrivate.h: (KURLGooglePrivate): 2012-01-25 Noel Gordon Use maximum image dimension definition from libwebp https://bugs.webkit.org/show_bug.cgi?id=76980 Reviewed by Kent Tamura. No new tests, no change in behavior. * platform/image-encoders/skia/WEBPImageEncoder.cpp: (WebCore::encodePixels): s/WEBP_MAX_DIMENSION/WEBPImageEncoder::MaximumImageDimension/ * platform/image-encoders/skia/WEBPImageEncoder.h: (): Remove local definition of the maximum webp image dimension 2012-01-25 Noel Gordon JPEGDecoder should use imageDecoder colorProfile helpers https://bugs.webkit.org/show_bug.cgi?id=76968 Reviewed by Adam Barth. No new tests. Cover by existing tests, in particular: fast/images/ycbcr-with-cmyk-color-profile.html fast/images/gray-scale-jpeg-with-color-profile.html fast/images/cmyk-jpeg-with-color-profile.html fast/images/color-jpeg-with-color-profile.html * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: white-space removals via Xcode. (WebCore::readColorProfile): Use ImageDecoder.h color profile helper routines. (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::decode): 2012-01-25 No'am Rosenthal [Texmap] Divide TextureMapperNode.cpp to 3 files. https://bugs.webkit.org/show_bug.cgi?id=76660 Reviewed by Kenneth Rohde Christiansen. Split the animation part of TextureMapperNode out to a separate file, called TextureMapperAnimation. Provide a clean interface for that class, that allows separating the internals of the scene painting from the internals of the animation interpolation. No new tests. Existing animation tests cover this. * GNUmakefile.list.am: Added new TextureMapper-related files. * Target.pri: Added new TextureMapper-related files. * WebCore.gypi: Added new TextureMapper-related files. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::addAnimation): (WebCore::GraphicsLayerTextureMapper::pauseAnimation): (WebCore::GraphicsLayerTextureMapper::removeAnimation): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: * platform/graphics/texmap/TextureMapperAnimation.cpp: Added. * platform/graphics/texmap/TextureMapperAnimation.h: Added. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::syncCompositingStateSelf): (WebCore::TextureMapperNode::descendantsOrSelfHaveRunningAnimations): (WebCore::TextureMapperNode::syncAnimations): (WebCore::TextureMapperNode::syncAnimationsRecursively): (WebCore::TextureMapperNode::syncCompositingState): * platform/graphics/texmap/TextureMapperNode.h: 2012-01-25 Roland Steiner When this pattern is used it is also common that the rules only apply to elements that come after the style element. When the set of active stylesheets changes we invalidate and recompute the entire document style. This is very expensive. We can detect the case above and avoid the style recalc. On engadget.com, this patch cuts the time spent in style recalcs to roughly half. There are further savings from reduced relayouts. In total the engine CPU time used over the page load is reduced by ~10%. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::collectFeatures): Refactor feature collection from constructor to a separate function. (WebCore::CSSStyleSelector::appendAuthorStylesheets): New function for non-destructively updating the style selector. (WebCore::CSSStyleSelector::Features::clear): Clear the features for another collection. (WebCore::CSSStyleSelector::determineStylesheetSelectorScopes): Find if all rules on a stylesheetare scoped to some set of ids and classes. (WebCore::CSSStyleSelector::styleForDocument): Add optional font selector argument. We updated the correct base style font on style selector construction but that is no longer sufficient as font selector may be updated without reconstructing the style selector. (WebCore::RuleSet::addRulesFromSheet): Invalidate the matched declaration cache in case of new font-face rules. * css/CSSStyleSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::determineSelectorScopes): Find if all rules on a selector list are scoped to some set of ids and classes. * css/SelectorChecker.h: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::recalcStyle): Pass the font selector, if exists, to styleForDocument so we always have the base font up to date. (WebCore::Document::combineCSSFeatureFlags): (WebCore::Document::resetCSSFeatureFlags): (WebCore::Document::createStyleSelector): Refactor css feature flag resetting to functions. (WebCore::Document::removePendingSheet): Use new PendingStylesheetCompleted flag when new stylesheets arrive. (WebCore::Document::styleSelectorChanged): Skip style recalc if it is not needed. (WebCore::Document::collectActiveStylesheets): Refactor collecting stylesheets to a separate function. (WebCore::Document::testAddedStylesheetRequiresStyleRecalc): Determine the scopes and use hasElementWithId/getElementsByClassName to figure out if any scoped elements currently exist in the tree. (WebCore::Document::analyzeStylesheetChange): Figure out if we can update the style selector incrementally and if we can skip the style recalc. (WebCore::Document::updateActiveStylesheets): Renamed from recalcStyleSelector. Invoke the new analysis functions. * dom/Document.h: 2012-01-04 Igor Oliveira Share fractional time code between AnimationBase and KeyframeAnimation https://bugs.webkit.org/show_bug.cgi?id=75549 Remove left over from changeset 104045. Unreviewed trivial fix. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::fractionalTime): 2012-01-04 Igor Oliveira Share fractional time code between AnimationBase and KeyframeAnimation https://bugs.webkit.org/show_bug.cgi?id=75549 Share fractional time calculation between AnimationBase and KeyframeAnimation. Reviewed by Simon Fraser. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::fractionalTime): (WebCore::AnimationBase::progress): * page/animation/AnimationBase.h: * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): 2012-01-03 Vangelis Kokkevis [chromium] Bypass the shadow texture copy for accelerated canvas when running the compositor in single threaded mode. https://bugs.webkit.org/show_bug.cgi?id=75146 The texture copy fails on Windows as glCopyTexImage2D() doesn't support BGRA source textures. This change also modifies Canvas2DLayerChromium::updateCompositorResources to call glCopyTexSubImage2D() instead of glCopyTexImage2D() so that the copy can work with texture allocated via the glTexStorage2D extension. Reviewed by James Robinson. Tests: Canvas2DLayerChromiumTest.cpp * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: 2012-01-04 Adam Roben Use one big printf command instead of many chained echo commands to generate idl_files.tmp This works around a bug in Cygwin where sh.exe will crash if given a too-long sequence of &&-chained commands. Fixes REGRESSION (r103519): WebCore's DerivedSources.make crashes sh.exe if path to WebKit source tree is long enough Reviewed by Antti Koivisto. * DerivedSources.make: Change the '(echo foo && echo bar && echo baz && echo -n) > ./idl_files.tmp' command to 'printf "foo\nbar\nbaz\n" > ./idl_files.tmp'. We use the patsubst function to append "\n" to each IDL filename, then use the subst function to remove the spaces between the filenames. 2012-01-04 Mihnea Ovidenie [CSSRegions]Rollout support for background-color region styling https://bugs.webkit.org/show_bug.cgi?id=75007 Reviewed by Tony Chang. Removed functionality, therefore no new tests. Since this is a temporary rollout, the tests for region-style with background-color are not removed in this patch, just skipped. * WebCore.exp.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::addMatchedDeclaration): (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::matchAllRules): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::RuleData::RuleData): (WebCore::RuleSet::RuleSet): (WebCore::RuleSet::addToRuleSet): (WebCore::CSSStyleSelector::applyDeclarations): (WebCore::CSSStyleSelector::applyProperty): * css/CSSStyleSelector.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::setRegionRangeForBox): * rendering/RenderFlowThread.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paint): (WebCore::RenderLayer::hitTest): * rendering/RenderObject.cpp: * rendering/RenderObject.h: * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): * rendering/RenderRegion.cpp: * rendering/RenderRegion.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: 2012-01-04 Tor Arne Vestbø [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies The custom qmake variable 'WEBKIT' is used for signaling that a target depends in some way on other subproject of the WebKit project. For now this is limited to the set of intermediate libraries: wtf, javascriptcore, webcore, and webkit2. This replaces the previous convension of using load(foo) for just include paths, and CONFIG += foo to also link against foo. Adding a dependency results in additional include paths being available, and potentially linking to the library. This is decided by the build system based on conditions such as what kind of target is being built and the general build config. An advantage to his approach is that it simplifies the individual foo.prf files, for example by allowing us to use INCLUDEPATH += and LIBS += as normal instead of prepending. Reviewed by Simon Hausmann. * Target.pri: 2012-01-03 Adam Barth HTMLConstructionSite::attach shouldn't return a value https://bugs.webkit.org/show_bug.cgi?id=75520 Reviewed by Eric Seidel. We used to return a value to avoid some refchurn, but now that we're using tasks, we always need to take that reference. Removing the return value lets us remove the template parameter, which is a boon. This patch has no impact on the html-parser.html benchmark. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attachLater): (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody): (WebCore::HTMLConstructionSite::insertDoctype): (WebCore::HTMLConstructionSite::insertComment): (WebCore::HTMLConstructionSite::insertCommentOnDocument): (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement): (WebCore::HTMLConstructionSite::insertHTMLHeadElement): (WebCore::HTMLConstructionSite::insertHTMLBodyElement): (WebCore::HTMLConstructionSite::insertHTMLFormElement): (WebCore::HTMLConstructionSite::insertHTMLElement): (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::insertForeignElement): (WebCore::HTMLConstructionSite::insertTextNode): (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements): (WebCore::HTMLConstructionSite::fosterParent): * html/parser/HTMLConstructionSite.h: 2012-01-03 Adam Barth Fix assert when foster parenting self-closing elements https://bugs.webkit.org/show_bug.cgi?id=75527 Unreviewed. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::fosterParent): - We can't execute this task immediately because the code for self-closing elements wants to set the self-closing flag. Instead, we queue the task. 2012-01-03 Charles Wei [BlackBerry] Need to support credentials in the URL https://bugs.webkit.org/show_bug.cgi?id=75341 Reviewed by George Staikos. No new tests required. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendRequestWithCredentials): 2012-01-03 Noel Gordon [chromium] Use data decoding swizzle for turbo JPEG grayscale images https://bugs.webkit.org/show_bug.cgi?id=75189 Reviewed by Adam Barth. No new tests. Covered by exiting tests, in particular for grayscale images that were corrupted by earlier versions on libjpeg-turbo: tables/mozilla/bugs/bug29314.html tables/mozilla/bugs/bug13169.html tables/mozilla/bugs/bug10565.html tables/mozilla/bugs/bug11026.html fast/repaint/backgroundSizeRepaint.html fast/repaint/block-layout-inline-children-replaced.html fast/repaint/clipped-relative.html fast/repaint/selected-replaced.html tables/mozilla/bugs/bug12908-1.html * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageReader::decode): Use a data decoding swizzle for JCS_GRAYSCALE images. 2012-01-03 Adam Barth Minor speed improvement in HTML parser https://bugs.webkit.org/show_bug.cgi?id=75517 Reviewed by Eric Seidel. This improves the html-parser.html benchmark by 0.3%. I don't think that's actually anything to write home about, but this patch makes me feel better about my life. * html/parser/HTMLFormattingElementList.cpp: (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly): 2012-01-03 Kentaro Hara Remove temporary code that we've inserted to implement the [Supplemental] IDL incrementally https://bugs.webkit.org/show_bug.cgi?id=75510 Reviewed by Adam Barth. Now all build systems support the [Supplemental] IDL. This patch removes all temporary code that we've inserted to implement the [Supplemental] IDL. No tests. No change in behavior. Confirm that all builds pass. * bindings/js/JSDOMWindowCustom.cpp: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bindings/scripts/generate-bindings.pl: * page/DOMWindow.idl: Removed all attributes with a temporal [Supplemented] IDL. 2012-01-03 Karl Koscher Give embedders a chance to handle postMessage calls https://bugs.webkit.org/show_bug.cgi?id=73883 To support cross-process postMessage calls in Chromium (bug 73337), we need to intercept postMessage calls to proxy windows. Originally we were just going to add a native event listener on the Chromium side, but that required more changes to WebKit and was a bit of a hack. See bug 73359 for a discuss about moving to this approach. Reviewed by Adam Barth. Test: platform/chromium/fast/events/intercept-postmessage.html * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::willCheckAndDispatchPostMessage): new method to allow the embedder to intercept postMessage calls * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): add a call to FrameLoaderClient::willCheckAndDispatchPostMessage 2012-01-03 Eric Penner [chromium] Prevent crashing due to NULL texture updater. https://bugs.webkit.org/show_bug.cgi?id=75288 Reviewed by James Robinson. * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: * platform/graphics/chromium/ImageLayerChromium.h: 2012-01-03 Shawn Singh [chromium] CCLayerSorter accidentally reverses order of some layers. https://bugs.webkit.org/show_bug.cgi?id=75046 Reviewed by James Robinson. Unit test added to CCLayerSorterTest.cpp Fixes two related bugs that were causing z-ordering problems in layers when preserves3D triggers the need for layer sorting. The first problem was that CCLayerSorter accidentally reversed the order of layers when there was no sorting dependency between them. The second problem was that zDiff had numerical precision problems that forced sorting dependencies that were sometimes incorrect, when the dependencies should not have existed. * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::checkOverlap): (WebCore::CCLayerSorter::sort): 2012-01-03 Leo Yang [BlackBerry] Add support of blob form data to the BlackBerry port https://bugs.webkit.org/show_bug.cgi?id=75218 Pass FormDataElement::encodedBlob type of form data to the BlackBerry platform request to support blob data and blob file range. Reviewed by George Staikos. The port can't be built now, no new tests so far. * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::ResourceRequest::initializePlatformRequest): 2012-01-03 Adam Barth Two null crashes in Treebuilder https://bugs.webkit.org/show_bug.cgi?id=66101 Reviewed by Eric Seidel. The underly issue with causing the crash is that we're re-entering the tree builder. We've done a bunch of point fixes around tree builder re-entrancy, but neither the implementation nor the specification are really designed to handle re-entrancy. Firefox avoids this problem by putting the parser on its own thread. I don't think we're quite ready to do that yet (although we will eventually, presumably, as computers become ever more parallel). The approach in this patch is to queue up the DOM mutations and actually perform them on a shallower stack. That's essentially the approach we've used for executing . This patch queues up DOM modifications and executes them from a clean call stack, stopping us from re-entering the tree builder. We might need to experiment with exactly where to kick off the queue, but this location seems reasonable and fixes the crash. Test: fast/parser/re-enter-and-crash.html * html/parser/HTMLConstructionSite.cpp: (WebCore::executeTask): - Add a helper function for actually executing a queue DOM mutation. (WebCore::HTMLConstructionSite::attach): - Instead of actually attaching the element to the DOM, this function now queues the element for attachment. In a follow-up patch, I plan to change this function to return void (and I'll probably rename it to something that makes it clear that it only queues the attachment). (WebCore::HTMLConstructionSite::executeQueuedTasks): (WebCore::HTMLConstructionSite::insertDoctype): - Setting the compatmode from the Doctype requires the doctype to actually be in the DOM, so we need to execute our queued tasks synchronously. We can likely improve this function by passing the Doctype element explicitly in a follow-up patch. (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): (WebCore::HTMLConstructionSite::insertTextNode): (WebCore::HTMLConstructionSite::findFosterSite): (WebCore::HTMLConstructionSite::fosterParent): * html/parser/HTMLConstructionSite.h: (WebCore::HTMLConstructionSiteTask::HTMLConstructionSiteTask): - Add a task object that holds on to the relevant elements. We define some vector traits for this object to match the traits on RefPtr (which make Vector operations faster by explaining that this type is moveable without having to churn reference counts). * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::pushCommon): - We delay the "begin parsing" call until we actually attach the element to the DOM. That splits the responsibility for calling begin/finished, which is less than ideal, but I didn't see another solution. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken): - Kick off the queued mutations. 2012-01-03 Adam Barth view-source doesn't colorize correctly https://bugs.webkit.org/show_bug.cgi?id=62971 Reviewed by Eric Seidel. The reason these tags weren't colorized correctly was because the characters for the end tags where consumed by the tokenizer at the same time as it consumed the text of the script tag. These characters are buffered internally by the tokenizer because the tokenizer is searching for "an appropriate end tag", which is "" in this case. I tried a number of different approaches to fixing this bug. The approach in this patch adds an accessor to the tokenizer to read out the buffered characters. This approach makes it easier for the HTMLSourceTracker to get exactly the right value for these buffered characters without having to do a complicated simulation of the buffering itself. Tests: fast/frames/viewsource-plain-text-tags.html: * html/parser/HTMLViewSourceParser.cpp: (WebCore::HTMLViewSourceParser::pumpTokenizer): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): - Give the HTMLSourceTracker a pointer to the tokenizer so it can ask for the buffered characters. * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::start): - The idea here is to treat characters buffered internally by the tokenizer the same way we treat characters that were contained in a previous segment of source. We copy them into our accumulation buffer and adjust the token base offset to account for the extra characters. (WebCore::HTMLSourceTracker::end): - Don't consier the character buffered by the tokenizer to be part of the token we've just finished. (WebCore::HTMLSourceTracker::sourceForToken): - Remove the assumption that all of the m_previousSource is contained in the source for the current token. Because we now understand that the tokenizer can buffer some characters internally, we might not exhaust the m_previousSource. * html/parser/HTMLSourceTracker.h: - Rename m_sourceFromPreviousSegments to m_previousSource and changed to a SegementedString to avoid extra mallocs we keep appending tiny segments. - Rename m_source to m_currentSource to contrast nicely with m_previousSource. * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::flushBufferedEndTag): (WebCore::HTMLTokenizer::nextToken): - Previously, we cleared the temporary buffer lazily when we needed to add new characters to it. Now we clear it eagerly so that it's length tells us whether we're currently using it to store characters. - Previously, we weren't storing the character that we used to terminate the appropriate end tag (e.g., the > in ) because we didn't need to "unbuffer" that character into the HTMLToken::appendToCharacter. Now, we do store that character in the temporary buffer so that the HTMLSourceTracker can see that character. (WebCore::HTMLTokenizer::bufferedCharacters): * html/parser/HTMLTokenizer.h: (WebCore::HTMLTokenizer::numberOfBufferedCharacters): - Add accessor methods to copy out the buffered characters. - Also, unrelated to the rest of this patch, I made the constructor for HTMLTokenizer explicit because it takes only a single paramater, per the style guide. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::clear): - SegmentedString::clear wasn't clearing all of its state. I don't think this issue was actually observable, but I noticed it when working on this patch, so I fixed it. 2012-01-03 Benjamin Poulain Exclude Mac's PlatformEventFactory from iOS https://bugs.webkit.org/show_bug.cgi?id=75493 Reviewed by Sam Weinig. Move PlatformEventFactory.(h|cpp) to PlatformEventFactoryMac(h|cpp) and exclude the file from iOS build. * Configurations/WebCore.xcconfig: Also exclude EventHandlerMac for consistency. * WebCore.xcodeproj/project.pbxproj: * page/mac/EventHandlerMac.mm: * platform/mac/PlatformEventFactoryMac.h: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.h. * platform/mac/PlatformEventFactoryMac.mm: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.mm. (WebCore::globalPoint): (WebCore::globalPointForEvent): (WebCore::pointForEvent): (WebCore::mouseButtonForEvent): (WebCore::mouseEventTypeForEvent): (WebCore::clickCountForEvent): (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): (WebCore::gestureEventTypeForEvent): (WebCore::textFromEvent): (WebCore::unmodifiedTextFromEvent): (WebCore::keyIdentifierForKeyEvent): (WebCore::isKeypadEvent): (WebCore::windowsKeyCodeForKeyEvent): (WebCore::isKeyUpEvent): (WebCore::modifiersForEvent): (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): (WebCore::PlatformEventFactory::createPlatformMouseEvent): (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): (WebCore::PlatformEventFactory::createPlatformWheelEvent): (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): (WebCore::PlatformEventFactory::createPlatformKeyboardEvent): (WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder): (WebCore::PlatformEventFactory::createPlatformGestureEvent): 2012-01-03 Wei James Optimize AudioBufferSourceNode process by avoiding interpolation when pitchRate==1 https://bugs.webkit.org/show_bug.cgi?id=74592 Reviewed by Kenneth Russell. Covered by existing webaudio layout tests, especially webaudio/audiobuffersource-playbackrate.html * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping): (WebCore::AudioBufferSourceNode::renderFromBuffer): * webaudio/AudioBufferSourceNode.h: 2012-01-03 Joseph Pecoraro Web Inspector: Access to Node Highlighting info without drawing https://bugs.webkit.org/show_bug.cgi?id=75504 Provide a "getHighlight" method alongside "drawHighlight" that gets most of the important node highlighting information. This can be used by a port to do its own node highlighting or provide extra content without interfering with the highlight rects. Reviewed by Timothy Hatcher. * WebCore.xcodeproj/project.pbxproj: Privately expose the Highlight struct in DOMNodeHighlighter.h. * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawHighlight): (WebCore::DOMNodeHighlighter::getHighlight): * inspector/DOMNodeHighlighter.h: Reuse the existing draw code to instead populate the Highlight struct with the information it is about to draw, and only draw if there is a context. * inspector/InspectorController.cpp: (WebCore::InspectorController::getHighlight): * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getHighlight): * inspector/InspectorDOMAgent.h: Get highlight information by going through getHighlight in InspectorController. This is alongside drawHighlight. 2012-01-03 Shawn Singh [chromium] Push drawsContent and contentsVisible into accelerated compositor https://bugs.webkit.org/show_bug.cgi?id=71209 Reviewed by James Robinson. Tests: compositing/visibility/visibility-simple-canvas2d-layer.html compositing/visibility/visibility-simple-video-layer.html compositing/visibility/visibility-simple-webgl-layer.html Rebaselined compositing/visibility/visibility-image-layers.html The CSS visibility property was not being properly obeyed by many specialized layer types in the accelerated compositor. The root of the problem was that drawsContent and contentsVisible flags were not properly propagated into the compositor. This patch removes the drawsContent() callback, and instead makes sure that drawsContent and contentsVisible are "pushed" through the accelerated compositor. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::drawsContent): * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setDrawsContent): (WebCore::GraphicsLayerChromium::setContentsVisible): (WebCore::GraphicsLayerChromium::setContentsToImage): (WebCore::GraphicsLayerChromium::setContentsToCanvas): (WebCore::GraphicsLayerChromium::setContentsToMedia): (WebCore::GraphicsLayerChromium::updateLayerIsDrawable): (WebCore::GraphicsLayerChromium::setupContentsLayer): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::setIsDrawable): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::drawsContent): * platform/graphics/chromium/PluginLayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::drawsContent): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::drawsContent): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::dumpLayerProperties): 2012-01-03 Shawn Singh [chromium] Make sure root damage rect gets passed to renderer https://bugs.webkit.org/show_bug.cgi?id=74893 Reviewed by James Robinson. Unit test added to CCLayerTreeHostImplTest.cpp * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::swapBuffers): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::swapBuffers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: 2012-01-03 Yuzhu Shen v8 binding: npCreateV8ScriptObject() should not returned an existing V8NPObject if the rootObject doesn't match https://bugs.webkit.org/show_bug.cgi?id=74515 Reviewed by Nate Chapin. Test: http/tests/plugins/create-v8-script-objects.html * bindings/v8/NPV8Object.cpp: (WebCore::freeV8NPObject): (WebCore::npCreateV8ScriptObject): 2012-01-03 Jon Lee Leak of WebNotificationClient when page is destroyed https://bugs.webkit.org/show_bug.cgi?id=74980 Reviewed by Mark Rowe. * notifications/NotificationController.cpp: (WebCore::NotificationController::~NotificationController): Notify the client that the controller has been destroyed. * notifications/NotificationPresenter.h: Add notificationControllerDestroyed() callback to the client interface. 2012-01-03 Alexis Menard getComputedStyle for list-style is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75443 Reviewed by Tony Chang. Implement getComputedStyle for list-style. Test: fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-01-03 Adrienne Walker [chromium] Remove unneeded content vs. layer space distinction in tiled layers https://bugs.webkit.org/show_bug.cgi?id=75498 Reviewed by James Robinson. Long ago, before scrollbars became their own layers, tiled layers had a distinction between content space (what's mostly called layer space elsewhere) and layer space (the transformed content space). It seemed like this transform could get reused for supporting RTL pages, but as that's not the case, it should be eradicated. Tiled layers now deal with everything in "layer space", which is a 2d rectangle starting at (0, 0) in the top left of the layer and extending to contentBounds() in the bottom right. As no code actually set the tiler position, this change should be a no-op. Test: LayoutTests/compositing/ * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::isDirty): (WebCore::UpdatableTile::clearDirty): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::createTile): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::protectTileTextures): (WebCore::TiledLayerChromium::prepareToUpdateTiles): (WebCore::TiledLayerChromium::prepareToUpdate): (WebCore::TiledLayerChromium::prepareToUpdateIdle): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::operator=): (WebCore::CCLayerTilingData::layerRectToTileIndices): (WebCore::CCLayerTilingData::tileRect): * platform/graphics/chromium/cc/CCLayerTilingData.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): 2011-12-22 Joseph Pecoraro Implement Date and Time Input Value Sanitization https://bugs.webkit.org/show_bug.cgi?id=59951 Sanitize non-parsable incoming strings to the empty string. Reviewed by Kent Tamura. Covered by existing tests. * html/BaseDateAndTimeInputType.h: * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::sanitizeValue): check if the incoming string is valid. If not just return the empty string. 2012-01-03 Julien Chaffraix RenderLayer::backgroundClipRect should not check parent() https://bugs.webkit.org/show_bug.cgi?id=73731 Reviewed by Simon Fraser. Clean-up only, no expected change in behavior. * rendering/RenderLayer.cpp: (WebCore::backgroundClipRectForPosition): Changed RenderObject::isPositioned() to a check for AbsolutePosition for consistency but also as this is equivalent due to: - the previous check for FixedPosition. - RenderView, which is positioned, will never goes to this code as it has no parent(). (WebCore::RenderLayer::backgroundClipRect): Removed the parent() check. While at it, also moved the inline initialization of |backgroundClipRect| to its own function and removed a |view| check as the associated ASSERT seems to never have been reached. 2012-01-03 Alexey Proskuryakov REGRESSION (r102247): Focus ring is not drawn around a button Rubber-stamped by Dan Bernstein. * platform/mac/ThemeMac.mm: (WebCore::updateStates): Flip an incorrect conditional, this code should run on Snow Leopard and Lion. 2012-01-03 Alexis Menard getComputedStyle should return shorthands property with the minimum number of sides possible. https://bugs.webkit.org/show_bug.cgi?id=75434 Reviewed by Tony Chang. As stated in http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties we should return shorthands properties with the minimum number of sides possible. Existing tests have been updated accordingly. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand): * css/CSSComputedStyleDeclaration.h: 2012-01-03 Martin Robinson [GTK] GTK+ 3 theming code does not use the GtkOrientable style class https://bugs.webkit.org/show_bug.cgi?id=72789 Reviewed by Philippe Normand. No new tests. Testing GTK+ theming is quite difficult because no two distributions have the same set of themes. Current tests prevent regressions. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::applySliderStyleContextClasses): Added this helper that properly handles the orientable style class. (WebCore::RenderThemeGtk::paintSliderTrack): Use the new helper. (WebCore::RenderThemeGtk::paintSliderThumb): Ditto. * platform/gtk/ScrollbarThemeGtk3.cpp: (WebCore::applyScrollbarStyleContextClasses): Added this helper that properly handles the orientable style class. (WebCore::ScrollbarThemeGtk::paintTrackBackground): Use the new helper. (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto. (WebCore::ScrollbarThemeGtk::paintThumb): Ditto. (WebCore::ScrollbarThemeGtk::paintButton): Ditto. 2012-01-03 Florin Malita NULL ptr in WebCore::SVGStyledTransformableElement::animatedLocalTransform https://bugs.webkit.org/show_bug.cgi?id=75227 Reviewed by Dirk Schulze. Test: svg/custom/webkit-transform-crash.html * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::animatedLocalTransform): Add a null-renderer check. 2012-01-03 Alexis Menard getComputedStyle for border is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75319 Reviewed by Tony Chang. Implement getComputedStyle for border. fast/css/getComputedStyle/getComputedStyle-border-shorthand.html was extented. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-01-03 Alexis Menard Sort the WebCore Xcode project file Reviewed by Dimitri Glazkov. * WebCore.xcodeproj/project.pbxproj: 2012-01-03 Adrienne Walker [chromium] Set tiler bounds explicitly rather than growing them https://bugs.webkit.org/show_bug.cgi?id=75331 Reviewed by James Robinson. Rather than only growing bounds, make the bounds on the tiler be set explicitly by TiledLayerChromium. This patch now properly invalidates regions when the bounds change. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateBounds): (WebCore::TiledLayerChromium::prepareToUpdate): (WebCore::TiledLayerChromium::prepareToUpdateIdle): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::setBounds): (WebCore::CCLayerTilingData::bounds): * platform/graphics/chromium/cc/CCLayerTilingData.h: 2012-01-03 Martin Robinson [GTK] Slider thumb is not centered on the track with the unico theme https://bugs.webkit.org/show_bug.cgi?id=72802 Reviewed by Philippe Normand. No new tests. This only applies to certain GTK+ themes. Existing tests cover the default GTK+ theme. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::RenderThemeGtk::paintSliderThumb): Do not resize the slider thumb by the trough border. 2012-01-03 Adrienne Walker [chromium] Make tiled layer's tiler always exist https://bugs.webkit.org/show_bug.cgi?id=75329 Reviewed by James Robinson. TiledLayerChromium has some awkward code to handle lazily creating the tiler, including lots of null checks and shadowing the tile size. Instead, always create the tiler up front. As values change that invalidate all tiles, reset it rather than clear the pointer. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setIsNonCompositedContent): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::cleanupResources): (WebCore::TiledLayerChromium::setTileSize): (WebCore::TiledLayerChromium::setBorderTexelOption): (WebCore::TiledLayerChromium::drawsContent): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::setTilingOption): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::setIsNonCompositedContent): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::protectTileTextures): (WebCore::TiledLayerChromium::prepareToUpdate): (WebCore::TiledLayerChromium::prepareToUpdateIdle): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::setBorderTexelOption): * platform/graphics/chromium/cc/CCLayerTilingData.h: * platform/graphics/gpu/TilingData.cpp: (WebCore::TilingData::setHasBorderTexels): * platform/graphics/gpu/TilingData.h: 2012-01-03 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::JSTestEventConstructor::destroy): * bindings/scripts/test/JS/JSTestEventConstructor.h: (WebCore::JSTestEventConstructor::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::destroy): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::destroy): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructor::destroy): * bindings/scripts/test/JS/JSTestNamedConstructor.h: (WebCore::JSTestNamedConstructor::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::destroy): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::destroy): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull): 2012-01-03 Carlos Garcia Campos [GTK] Fix scrollbars size with GTK+ 3.x https://bugs.webkit.org/show_bug.cgi?id=75467 Reviewed by Xan Lopez. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::getStyleContext): Add the style class for the given widget type to the GtkWidgetPath when creating GtkStyleContext objects. 2012-01-03 Alexis Menard getComputedStyle for outline is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75441 Reviewed by Antonio Gomes. Implement getComputedStyle for outline. Test: fast/css/getComputedStyle/getComputedStyle-outline-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-01-03 Carlos Garcia Campos [GTK] Use gdk_screen_get_monitor_workarea() when available for screenAvailableRect() https://bugs.webkit.org/show_bug.cgi?id=75435 Reviewed by Martin Robinson. * platform/gtk/GtkVersioning.c: (getScreenCurrentDesktop): (getScreenWorkArea): (gdk_screen_get_monitor_workarea): Implement it when GTK+ < 3.3.6. * platform/gtk/GtkVersioning.h: * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenAvailableRect): Use gdk_screen_get_monitor_workarea() instead of our own implementation. 2012-01-02 Kentaro Hara REGRESSION(r103919): Remove resolve-supplemental.pl from the WebCore target in Xcode https://bugs.webkit.org/show_bug.cgi?id=75458 Reviewed by Adam Barth. At r103919, we added resolve-supplemental.pl to WebCore.framework/Resources, but we should have added it to the project without adding it to any target. This patch fixes it. No tests. No change in behavior. * WebCore.xcodeproj/project.pbxproj: 2012-01-02 Kentaro Hara Enable the [Supplemental] IDL on GTK/GObject https://bugs.webkit.org/show_bug.cgi?id=75411 Reviewed by Adam Barth. This patch enables the [Supplemental] IDL on GObject bindings of GTK by changing the build flow of bindings/gobject/GNUmakefile.am as follows. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * GNUmakefile.am: * bindings/gobject/GNUmakefile.am: 2012-01-02 Kentaro Hara Add resolve-supplemental.pl to project.pbxproj https://bugs.webkit.org/show_bug.cgi?id=75426 Reviewed by Adam Barth. We should have added "resolve-supplemental.pl" to build scripts of AppleWebKit when we enabled the [Supplemental] IDL on AppleWebKit at r103519. This is a follow-up patch for it. No tests. Just confirm that the AppleWebKit build passes. * WebCore.xcodeproj/project.pbxproj: 2012-01-02 Kentaro Hara Add resolve-supplemental.pl to build scripts of AppleWin https://bugs.webkit.org/show_bug.cgi?id=75412 Reviewed by Adam Barth. We should have added "resolve-supplemental.pl" to build scripts of AppleWin when we enabled the [Supplemental] IDL on AppleWin at r103519. This is a follow-up patch for it. No tests. Just confirm that the AppleWin build passes. * WebCore.vcproj/MigrateScripts: * WebCore.vcproj/WebCore.vcproj: 2012-01-02 Sam Weinig Fix the build. * bindings/scripts/CodeGeneratorJS.pm: 2012-01-02 Andy Estes Fix the Windows build after r103888. * WebCore.vcproj/WebCore.vcproj: Remove CollectionCache.{cpp, h} from the WebCore vcproj. 2012-01-02 Sam Weinig REGRESSION(r100517): We're leaking many, many DOM objects! https://bugs.webkit.org/show_bug.cgi?id=75451 Reviewed by Mark Rowe. * bindings/scripts/CodeGeneratorJS.pm: Add a temporary workaround to the problem of handle finalizers not getting called by adding back the destructors (or rather their replacement, destroy() functions). 2012-01-02 Caio Marcelo de Oliveira Filho Fix chromium mac build after r103905 https://bugs.webkit.org/show_bug.cgi?id=75436 Reviewed by Csaba Osztrogonác. Adding parenthesis to disambiguate because clang gives error "expression is not assignable". * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): 2011-12-29 Caio Marcelo de Oliveira Filho Use HashMap in RenderSVGResourceGradient https://bugs.webkit.org/show_bug.cgi?id=75364 Reviewed by Daniel Bates. * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::removeAllClientsFromCache): (WebCore::RenderSVGResourceGradient::removeClientFromCache): (WebCore::RenderSVGResourceGradient::applyResource): avoid looking up the hash twice by using HashMap::add(). * rendering/svg/RenderSVGResourceGradient.h: rename m_gradient to m_gradientMap. 2012-01-02 Tor Arne Vestbø [Qt] Fix qmake warning about unescaped backslashes Reviewed by Ossy. * DerivedSources.pri: 2012-01-02 Carlos Garcia Campos Unreviewed. Fix make distcheck issue. * GNUmakefile.am: Add resolve-supplemental.pl script to EXTRA_DIST. 2012-01-01 Andreas Kling Clear HTMLCollection's internal cache on construction. Reviewed by Antti Koivisto. * html/HTMLCollection.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::invalidateCacheIfNeeded): 2012-01-01 Eunmi Lee [EFL] Move function to get dpi to the WebCore/platform/efl/EflScreenUtilities.cpp. https://bugs.webkit.org/show_bug.cgi?id=75292 Reviewed by Andreas Kling. Move ewk_util_dpi_get() function in the ewk_util.cpp to the WebCore/platform/efl/EflScreenUtilities.cpp in order to use it in the WebKit2. The function's name is changed to getDPI(). * PlatformEfl.cmake: * platform/efl/EflScreenUtilities.cpp: Added. (WebCore::getDPI): * platform/efl/EflScreenUtilities.h: Added. 2012-01-01 Andreas Kling Merge CollectionCache into HTMLCollection. Reviewed by Anders Carlsson. - Move the members of CollectionCache into HTMLCollection. - Renamed resetCollectionInfo() to invalidateCacheIfNeeded(). - Removed a bunch of overkill HashMap::checkConsistency() calls. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * html/CollectionCache.cpp: Removed. * html/CollectionCache.h: Removed. Remove CollectionCache. * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::HTMLCollection::invalidateCacheIfNeeded): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::nextItem): (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): (WebCore::HTMLCollection::append): * html/HTMLCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::item): (WebCore::HTMLFormCollection::getNamedItem): (WebCore::HTMLFormCollection::nextItem): (WebCore::HTMLFormCollection::namedItem): (WebCore::HTMLFormCollection::updateNameCache): HTMLCollection's m_info and info() become "struct m_cache" (protected.) * html/HTMLOptionsCollection.cpp: * html/HTMLOptionsCollection.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setRecalcListItems): Expose HTMLCollection::invalidateCacheIfNeeded() so we can call it from HTMLSelectElement::setRecalcListItems(). * html/HTMLFormCollection.h: Remove stale declaration of formCollectionInfo() which no longer exists. 2012-01-01 Andreas Kling Move the remaining collections to caching on their respective base nodes. Reviewed by Anders Carlsson. Add a (lazily-allocated) array of HTMLCollections to ElementRareData and cache the various collections on their base node rather than recreating them every time. Test: fast/dom/collection-idempotence.html fast/dom/gc-9.html * html/CollectionType.h: * dom/ElementRareData.h: (WebCore::ElementRareData::hasCachedHTMLCollections): (WebCore::ElementRareData::cachedHTMLCollection): (WebCore::ElementRareData::ensureCachedHTMLCollection): * dom/Element.h: * dom/Element.cpp: (WebCore::Element::ensureCachedHTMLCollection): Plumbing to cache HTMLCollections on ElementRareData. (WebCore::Element::~Element): Detach any cached collections from an element when it's destroyed. * html/HTMLCollection.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::create): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::HTMLCollection::detachFromNode): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): * dom/Document.cpp: (WebCore::Document::cachedCollection): Consolidate the HTMLCollection constructors and get rid of the hacks to optionally retain the base node. * html/HTMLDataListElement.cpp: (WebCore::HTMLDataListElement::options): * html/HTMLElement.cpp: (WebCore::HTMLElement::children): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::areas): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::tBodies): * html/HTMLTableRowElement.cpp: (WebCore::HTMLTableRowElement::cells): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::rows): Cached collections! 2012-01-01 Raymond Liu Use overload methods to implement [Optional] parameters in AudioNode.idl https://bugs.webkit.org/show_bug.cgi?id=75402 Reviewed by Adam Barth. No new tests required. * GNUmakefile.list.am: * UseV8.cmake: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSAudioNodeCustom.cpp: Removed. * bindings/v8/custom/V8AudioNodeCustom.cpp: Removed. * webaudio/AudioNode.cpp: (WebCore::AudioNode::connect): (WebCore::AudioNode::disconnect): * webaudio/AudioNode.h: * webaudio/AudioNode.idl: 2011-12-20 Robert Hogan CSS 2.1 failure: border-collapse-offset-002.htm fails https://bugs.webkit.org/show_bug.cgi?id=71705 Reviewed by Julien Chaffraix. Tests: css2.1/20110323/border-collapse-offset-002-expected.html fast/css/caption-width-absolute-position-offset-top.htm fast/css/caption-width-absolute-position.htm fast/css/caption-width-fixed-position-offset-top.htm fast/css/caption-width-fixed-position.htm fast/css/caption-width-relative-position-offset-top.htm fast/css/caption-width-relative-position.htm Table captions are implemented as children of the table but have a special requirement to expand to the full width of the table rather than just the 'available' width, i.e. the full width minus padding and borders. To accomodate this create a RenderTableCaption object that reimplements containingBlockLogicalWidthForContent() to return the full width of the containing block (i.e. the table) rather than the available width. * CMakeLists.txt: Add RenderTableCaption.[cpp|h] * GNUmakefile.list.am: Add RenderTableCaption.[cpp|h] * Target.pri: Add RenderTableCaption.[cpp|h] * WebCore.gypi: Add RenderTableCaption.[cpp|h] * WebCore.vcproj/WebCore.vcproj: Add RenderTableCaption.[cpp|h] * WebCore.xcodeproj/project.pbxproj: Add RenderTableCaption.[cpp|h] * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use RenderTableCaption * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): Add RenderTableCaption.[cpp|h] (WebCore::RenderObject::addChild): ditto * rendering/RenderObject.h: (WebCore::RenderObject::isTableCaption): * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): * rendering/RenderTable.h: * rendering/RenderTableCaption.cpp: Added. (WebCore::RenderTableCaption::RenderTableCaption): Implement RenderTableCaption (WebCore::RenderTableCaption::~RenderTableCaption): (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Return the containing block's full width rather than it's available width. * rendering/RenderTableCaption.h: Added. (WebCore::RenderTableCaption::isTableCaption): (WebCore::toRenderTableCaption): * rendering/RenderingAllInOne.cpp: 2012-01-01 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/CPP/WebDOMTestSupplemental.cpp: Added. * bindings/scripts/test/CPP/WebDOMTestSupplemental.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.cpp: Added. * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.h: Added. * bindings/scripts/test/ObjC/DOMTestSupplemental.cpp: Added. * bindings/scripts/test/ObjC/DOMTestSupplemental.h: Added. 2012-01-01 Andreas Kling Make HTMLCollections play nice after their base node is gone. Reviewed by Anders Carlsson. Added HTMLCollection::detachFromNode() and call that from destructors of nodes with cached collections. Sprinkled checks/assertions where applicable to make sure HTMLCollections are empty after their associated node has been destroyed. This is a slight change in behavior, as collections would previously keep their nodes alive indefinitely. Added a test to document this. Test: fast/dom/htmlcollection-zombies.html * dom/Document.cpp: (WebCore::Document::~Document): * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::detachFromNode): (WebCore::HTMLCollection::resetCollectionInfo): (WebCore::HTMLCollection::itemAfter): (WebCore::HTMLCollection::calcLength): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::nextItem): (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): (WebCore::HTMLCollection::tags): * html/HTMLCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::calcLength): (WebCore::HTMLFormCollection::item): (WebCore::HTMLFormCollection::getNamedItem): (WebCore::HTMLFormCollection::getNamedFormItem): (WebCore::HTMLFormCollection::namedItem): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::~HTMLFormElement): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::add): (WebCore::HTMLOptionsCollection::remove): (WebCore::HTMLOptionsCollection::selectedIndex): (WebCore::HTMLOptionsCollection::setSelectedIndex): (WebCore::HTMLOptionsCollection::setLength): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::length): (WebCore::HTMLPropertiesCollection::item): (WebCore::HTMLPropertiesCollection::names): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::~HTMLSelectElement): * html/HTMLSelectElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::~HTMLTableElement): * html/HTMLTableElement.h: * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::itemAfter): 2012-01-01 Andreas Kling HTMLCollection: Remove the constructor's custom CollectionCache* argument. Reviewed by Anders Carlsson. We no longer need to initialize HTMLCollections with a custom CollectionCache, so remove the argument from the constructor. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): * html/HTMLCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): 2011-12-31 Dan Bernstein WebCore changes for: REGRESSION (WebKit2): Cursor, hover states not updated when page scrolls under stationary mouse pointer https://bugs.webkit.org/show_bug.cgi?id=75405 Reviewed by Anders Carlsson. Test: fast/events/frame-scroll-fake-mouse-move.html * page/FrameView.cpp: (WebCore::FrameView::scrollPositionChanged): Added a call to EventHandler::dispatchFakeMouseMoveEventSoon(). 2012-01-01 Andreas Kling Cache named item collections on Document, not just their caches. Reviewed by Anders Carlsson. Keep two maps of name -> RefPtr on Document. We already had maps for the CollectionCaches and were creating the HTMLNameCollections every time they were accessed. We now let the collections create and manage the CollectionCaches instead of Document. No new tests since these collections are not exposed to the web. * dom/Document.h: * dom/Document.cpp: (WebCore::Document::windowNamedItems): (WebCore::Document::documentNamedItems): Replace the name/CollectionCache maps by name/HTMLNameCollection maps. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::namedItemGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): Pass names as AtomicStrings to Document's collection getters. * html/HTMLNameCollection.h: (WebCore::HTMLNameCollection::create): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): Store the name in an AtomicString instead of a String, incidentally making traversal of HTMLNameCollections more efficient. * html/CollectionType.h: Remove two now-unneeded constants. 2012-01-01 Andreas Kling Remove Document::collectionInfo() and let collections manage their caches. Reviewed by Anders Carlsson. Remove the CollectionCaches from Document and have the document's collections create and manage the caches on-demand instead. This is a step towards merging CollectionCache into HTMLCollection. * dom/Document.h: * dom/Document.cpp: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): * html/HTMLOptionsCollection.cpp: 2012-01-01 Andreas Kling RenderThemeMac: Avoid double hash lookup in systemColor(). Reviewed by Anders Carlsson. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::systemColor): 2012-01-01 Andreas Kling CSSStyleSelector: Avoid double hash lookup in keyframeStylesForAnimation(). Reviewed by Anders Carlsson. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::keyframeStylesForAnimation): 2012-01-01 Andreas Kling KeyframeAnimation: Use hash lookups to determine if property is animated. Reviewed by Anders Carlsson. Clean out an old FIXME about using hash lookups instead of iterating over the properties. * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::hasAnimationForProperty): (WebCore::KeyframeAnimation::affectsProperty): 2011-12-31 Dan Bernstein WebCore change for Cannot print USPS shipping labels http://webkit.org/b/72801 Reviewed by Anders Carlsson and Alexey Proskuryakov. * WebCore.exp.in: Exported Chrome::print(). 2011-12-31 Dan Bernstein WebCore changes for REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document Reviewed by Alexey Proskuryakov. * WebCore.exp.in: Exported PluginDocument::pluginWidget(). * WebCore.xcodeproj/project.pbxproj: Promoted PluginDocument.h to private. * html/PluginDocument.h: Fixed a typo in a comment. 2011-12-30 Andreas Kling Cache and reuse the HTMLTableElement.rows collection. Reviewed by Anders Carlsson. Let HTMLTableElement::rows() cache the returned collection and tie it to the lifetime of the form. Test: fast/dom/table-rows-collection-idempotence.html fast/dom/gc-9.html * html/HTMLTableElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rows): Cache the HTMLTableRowsCollection returned by rows() on the HTMLTableElement. Remove the per-table CollectionCache and let the collection manage that. * html/HTMLTableRowsCollection.h: * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): (WebCore::HTMLTableRowsCollection::create): Tell the base class constructor to not retain the back-pointer to the table. 2011-12-30 Andreas Kling Cache and reuse the HTMLSelectElement.options collection. Reviewed by Anders Carlsson. Let HTMLSelectElement::options() cache the returned collection and tie it to the lifetime of the form. This shrinks HTMLSelectElement by sizeof(CollectionCache) minus one pointer. Test: fast/dom/select-options-collection-idempotence.html fast/gc-9.html * html/HTMLSelectElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::options): Cache the HTMLOptionsCollection returned by options() on the HTMLSelectElement. Remove the per-select CollectionCache and let the collection manage that. * html/HTMLOptionsCollection.h: * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::create): (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Tell the base class constructor to not retain the back-pointer to the element. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setRecalcListItems): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::invalidateCache): Added so HTMLSelectElement can invalidate the collection without triggering unnecessary instantiation of a CollectionCache. 2011-12-30 Kentaro Hara Enable the [Supplemental] IDL on CMake https://bugs.webkit.org/show_bug.cgi?id=75345 Reviewed by Daniel Bates. This patch enables the [Supplemental] IDL on CMake by changing the build flow of CMake as follows. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * CMakeLists.txt: * UseJSC.cmake: Modified to reflect the new build flow as described above. * UseV8.cmake: Ditto. 2011-12-30 Robert Hogan REGRESSION (r94492): Text is shifted to the right in some buttons in the Mac App Store https://bugs.webkit.org/show_bug.cgi?id=74723 Reviewed by Dan Bernstein. Tests: fast/css/absolute-inline-alignment-2.html fast/css/absolute-inline-alignment.html Inline positioned elements in the leading spaces of an inline run need to align to adjacent text, so add them to the run as they're encountered. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineInfo::LineInfo): Keep a count of positioned objects encountered when skipping leading whitespace. (WebCore::LineInfo::runsFromLeadingWhitespace): (WebCore::LineInfo::resetRunsFromLeadingWhitespace): (WebCore::LineInfo::incrementRunsFromLeadingWhitespace): (WebCore::RenderBlock::constructLine): Leading positioned objects should not be considered when deciding the number of runs in a line. Otherwise they would contribute towards line height themselves and prevent a free-standing BR following the positioned object from providing a full 20px of height. (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Since a run containing line-breaks will enter skipLeadingWhitespace for each new line we reset the count every time so that the count of positioned objects we encounter only affects the line they appear on. This case is covered by fast/inline/styledEmptyInlinesWithBRs.html (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): Add a run for each inline positioned object encountered in leading white space. Keep a count of them so that they can be excluded from the total number of runs in constructLine. 2011-12-30 Raymond Liu Remove unnecessary [Custom] attribute in CanvasRenderingContext2D.idl https://bugs.webkit.org/show_bug.cgi?id=75376 Reviewed by Adam Barth. No new tests required. * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-12-30 Andreas Kling Cache and reuse the HTMLFormElement.elements collection. Reviewed by Anders Carlsson. Let HTMLFormElement::elements() cache the returned collection and tie it to the lifetime of the form. This reduces memory consumption by ~70 kB (on 64-bit) when viewing your average popular post on reddit.com. Test: fast/dom/form-elements-collection-idempotence.html fast/dom/gc-9.html * html/HTMLFormElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::elements): Cache the HTMLFormCollection returned by elements() on the HTMLFormElement. Remove the per-form CollectionCache and let the collection manage that. * html/HTMLCollection.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::create): Have the HTMLCollection constructor take a bool argument that decides whether we retain the base node pointer or not. This mechanism is a temporary measure until all collection types are owned by their respective base nodes. * html/HTMLFormCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::create): Tell the base class constructor to not retain the back-pointer to the form. 2011-12-30 Andreas Kling Unreviewed buildfix after r103841. * inspector/InspectorMemoryAgent.cpp: 2011-12-30 Andreas Kling CSSStyleDeclaration: Only allow setting parent rule at construction. Reviewed by Dan Bernstein. A CSSStyleDeclaration should only ever belong to one CSSRule. Enforce this at compile-time by replacing setParentRule(CSSRule*) with clearParentRule(). * css/CSSFontFaceRule.cpp: (WebCore::CSSFontFaceRule::~CSSFontFaceRule): * css/CSSStyleDeclaration.h: (WebCore::CSSStyleDeclaration::clearParentRule): * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::~CSSStyleRule): * css/WebKitCSSKeyframeRule.cpp: (WebCore::WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule): 2011-12-30 Andreas Kling WebKitCSSKeyframeRule.style.parentRule should point to the keyframe rule. Reviewed by Antti Koivisto. Let CSS animation keyframe rules .style.parentRule point back to the keyframe board, rather than the keyframes rule containing it. Test: fast/css/css-keyframe-style-parentRule.html * css/CSSParser.cpp: (WebCore::CSSParser::createKeyframeRule): * css/WebKitCSSKeyframeRule.cpp: (WebCore::WebKitCSSKeyframeRule::setDeclaration): Set the CSSMutableStyleDeclaration's parent rule when creating it instead of in WebKitCSSKeyframeRule::setDeclaration(). Add assertion to make sure it's only called with declarations already parented to the keyframe rule. * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule): (WebCore::WebKitCSSKeyframesRule::append): (WebCore::WebKitCSSKeyframesRule::deleteRule): Stop reparenting keyframe rules' style declarations to the keyframes rule. 2011-12-30 Yury Semikhatsky Web Inspector: use typed front-end API in the memory agent https://bugs.webkit.org/show_bug.cgi?id=75382 Memory agent now uses generate C++ API for communicating to the front-end. Reviewed by Pavel Feldman. * inspector/InspectorMemoryAgent.cpp: (WebCore::DOMTreeStatistics::CounterVisitor::CounterVisitor): (WebCore::DOMTreeStatistics::CounterVisitor::counters): (WebCore::DOMTreeStatistics::CounterVisitor::visitNode): 2011-12-30 Pavel Feldman Web Inspector: migrate from "attached" to "compact" styles. https://bugs.webkit.org/show_bug.cgi?id=75381 When front-end is docked to right, it should look like "detached", but is still "attached". Use "compact" mode instead of "attached" mode in the styles to mitigate it. Reviewed by Yury Semikhatsky. * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype.updateSearchLabel): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar.prototype.set compact): (WebInspector.Toolbar.prototype._toolbarDragStart): (WebInspector.Toolbar.prototype._toolbarDrag): * inspector/front-end/helpScreen.css: (body.compact .help-window-outer): (body.compact .help-window-main): (body.compact .help-window-caption): (body.compact .help-close-button): (body.compact .help-content): * inspector/front-end/inspector.css: (body.compact #toolbar): (body.compact.port-qt #toolbar): (body.compact.inactive #toolbar): (body.compact #search-toolbar-label): (body.compact #toolbar-dropdown-arrow): (body.compact #search): (body.compact.port-qt .toolbar-item.close-left, body.compact.port-qt .toolbar-item.close-right): (body.compact #main): * inspector/front-end/inspector.js: (WebInspector.set attached): (WebInspector.get isCompactMode): (WebInspector.get _setCompactMode): (WebInspector._installDockToRight.listener.get if): (WebInspector._installDockToRight.listener): * inspector/front-end/inspectorCommon.css: (body.dock-to-right): (body.dock-to-right.inactive): 2011-12-30 Sheriff Bot Unreviewed, rolling out r103794. http://trac.webkit.org/changeset/103794 https://bugs.webkit.org/show_bug.cgi?id=75379 the ASSERT is triggered by several tests (Requested by jchaffraix on #webkit). * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): (WebCore::RenderTable::addChild): (WebCore::RenderTable::layout): (WebCore::RenderTable::recalcSections): (WebCore::RenderTable::outerBorderAfter): (WebCore::RenderTable::sectionAbove): (WebCore::RenderTable::sectionBelow): * rendering/RenderTable.h: (WebCore::RenderTable::header): (WebCore::RenderTable::footer): (WebCore::RenderTable::firstBody): (WebCore::RenderTable::hasSections): (WebCore::RenderTable::topSection): 2011-12-29 Pavel Feldman Web Inspector: enable dock-to-right view (still need embedders to support it). https://bugs.webkit.org/show_bug.cgi?id=75360 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/inspector.js: (WebInspector.set attached): (WebInspector._renderAsAttached.get return): (WebInspector._renderAsAttached): (WebInspector._installDockToRight.updateToolbar): 2011-12-29 Raymond Liu Use IDL overloads in AudioContext.idl for createBuffer https://bugs.webkit.org/show_bug.cgi?id=75293 Reviewed by Adam Barth. No new tests required. * bindings/js/JSAudioContextCustom.cpp: * bindings/v8/custom/V8AudioContextCustom.cpp: * webaudio/AudioContext.cpp: (WebCore::AudioContext::createBuffer): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: 2011-12-29 Andreas Kling HTMLDivElement: Remove unnecessary variable in parseMappedAttribute(). Reviewed by Daniel Bates. * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::parseMappedAttribute): 2011-12-29 Andreas Kling HTMLParagraphElement: Remove unnecessary variable in parseMappedAttribute(). Reviewed by Daniel Bates. * html/HTMLParagraphElement.cpp: (WebCore::HTMLParagraphElement::parseMappedAttribute): 2011-12-29 Andreas Kling Use HashMap for Document's named item collection caches. Reviewed by Daniel Bates. * dom/Document.cpp: (WebCore::Document::~Document): Remove now-unneeded deleteAllValues() loop. (WebCore::Document::nameCollectionInfo): Use add() instead of find()/add() to avoid one extra hash lookup. * dom/Document.h: Switch the value type of m_nameCollectionInfo to use OwnPtr. 2011-12-29 David Barton mfenced skips the first separator if the separators attribute contains multiple separators https://bugs.webkit.org/show_bug.cgi?id=57697 Reviewed by Dan Bernstein. Added 2 test cases. * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::addChild): - Thanks to Xun Sun for the off-by-one error fix. 2011-12-29 Alexis Menard Enable the [Supplemental] IDL on Qt. https://bugs.webkit.org/show_bug.cgi?id=75274 Reviewed by Andreas Kling. http://trac.webkit.org/changeset/103783 broke the Qt SL bot. This patch fixes the problem by using 'tr' rather than 'sed' which seems to be more consistent between Mac and Linux. * DerivedSources.pri: 2011-12-29 Vsevolod Vlasov Web Inspector: Scripts navigator should support incremental search by typing. https://bugs.webkit.org/show_bug.cgi?id=75349 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement): (WebInspector.ScriptsNavigator.prototype.show): (WebInspector.ScriptsNavigator.prototype._reset): (WebInspector.NavigatorTreeOutline): (WebInspector.NavigatorTreeOutline.prototype.scriptTreeElements): (WebInspector.NavigatorTreeOutline.prototype.searchStarted): (WebInspector.NavigatorTreeOutline.prototype.searchFinished): (WebInspector.BaseNavigatorTreeElement.prototype.onreveal): (WebInspector.BaseNavigatorTreeElement.prototype.set titleText): (WebInspector.BaseNavigatorTreeElement.prototype.matchesSearchText): * inspector/front-end/inspector.css: (.outline-disclosure ol.search-match-not-found li.selected .selection): (.outline-disclosure ol.search-match-found li.selected): (.outline-disclosure ol.search-match-found li.selected *): (.outline-disclosure ol.search-match-found li.parent.selected::before): (.outline-disclosure ol.search-match-found li.parent.expanded.selected::before): * inspector/front-end/scriptsPanel.css: (#scripts-navigator-tree-search-box): (#scripts-navigator-tree-search-box.visible): (#scripts-navigator-tree-search-box > input): (.scripts.panel .navigator .search-match-found li.selected .selection): (.scripts.panel .navigator .search-match-not-found li.selected .selection): (.scripts.panel .navigator .searching li.selected .selection): * inspector/front-end/treeoutline.js: (TreeOutline): (TreeOutline.prototype._treeKeyPress): (TreeOutline.prototype._startSearch.focusSearchInput): (TreeOutline.prototype._startSearch): (TreeOutline.prototype._searchTextChanged): (TreeOutline.prototype._showSearchMatchElement): (TreeOutline.prototype._searchInputKeyDown): (TreeOutline.prototype._nextSearchMatch): (TreeOutline.prototype._previousSearchMatch): (TreeOutline.prototype._searchInputBlur): (TreeOutline.prototype._searchFinished): (TreeOutline.prototype.stopSearch): 2011-12-29 Vsevolod Vlasov Web Inspector: Scripts navigator should trim long file names and show full url in tooltip. https://bugs.webkit.org/show_bug.cgi?id=75343 Reviewed by Pavel Feldman. Test: inspector/debugger/ui-source-code-display-name.html * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype.setScriptSourceIsDirty): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.EditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.EditorContainer.prototype.replaceSourceFrames): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype._appendSourceFrameTab): (WebInspector.TabbedEditorContainer.prototype._tabClosed): (WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab.get if): (WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab): (WebInspector.TabbedEditorContainer.prototype.get replaceSourceFrames): (WebInspector.TabbedEditorContainer.prototype.reset): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.appendTab): (WebInspector.TabbedPane.prototype.changeTabTooltip): (WebInspector.TabbedPaneTab): (WebInspector.TabbedPaneTab.prototype.get tooltip): (WebInspector.TabbedPaneTab.prototype.set tooltip): (WebInspector.TabbedPaneTab.prototype._createTabElement): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype._parseURL): * inspector/front-end/utilities.js: (): 2011-12-29 Alexis Menard getComputedStyle for margin is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75358 Reviewed by Andreas Kling. Implement getComputedStyle for margin. Test: fast/css/getComputedStyle/getComputedStyle-margin-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-29 Caio Marcelo de Oliveira Filho Use HashMap in RenderSVGResourcePattern https://bugs.webkit.org/show_bug.cgi?id=75361 Reviewed by Andreas Kling. * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::removeAllClientsFromCache): (WebCore::RenderSVGResourcePattern::removeClientFromCache): (WebCore::RenderSVGResourcePattern::applyResource): use HashMap::add() to avoid looking up the hash twice. * rendering/svg/RenderSVGResourcePattern.h: rename m_pattern to m_patternMap to improve readability a little bit. 2011-12-29 Alexis Menard getComputedStyle for padding is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75352 Reviewed by Andreas Kling. Implement getComputedStyle for padding shorthand property. Test: fast/css/getComputedStyle/getComputedStyle-padding-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-29 Caio Marcelo de Oliveira Filho Use HashMap in OriginAccessMap https://bugs.webkit.org/show_bug.cgi?id=75327 Reviewed by Andreas Kling. * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 2011-12-29 Pavel Podivilov Web Inspector: support sourceMappingURL magic comment. https://bugs.webkit.org/show_bug.cgi?id=75356 Reviewed by Pavel Feldman. * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::findSourceMapURL): * inspector/ContentSearchUtils.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::sourceMapURLForScript): 2011-12-29 Alexander Pavlov Web Inspector: Suggest pop-over doesn't hide on tab switch https://bugs.webkit.org/show_bug.cgi?id=73611 Reviewed by Pavel Feldman. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.willHide): * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.complete): (WebInspector.TextPrompt.prototype._completionsReady): (WebInspector.TextPrompt.prototype.acceptSuggestion): (WebInspector.TextPrompt.prototype.hideSuggestBox): (WebInspector.TextPrompt.SuggestBox.prototype._completionsReady): 2011-12-28 Alexander Pavlov Web Inspector: Implement CSS selector profiler https://bugs.webkit.org/show_bug.cgi?id=74004 Reviewed by Pavel Feldman. This implementation of CSS selector profiler measures the total time required to match a certain selector against DOM nodes and apply the style declaration properties to the particular element, as well as the number of selector matches (i.e. the number of nodes that matched the selector.) The results are approximate due to internal matching algorithm optimizations (shared styles et al.) Multiple selectors with the same selectorText are coalesced into a single record. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/CSSSelectorProfileView.js: Added. (WebInspector.CSSSelectorDataGridNode): (WebInspector.CSSSelectorDataGridNode.prototype.get rawData): (WebInspector.CSSSelectorProfileView): (WebInspector.CSSSelectorProfileView.prototype.get statusBarItems): (WebInspector.CSSSelectorProfileView.prototype.get profile): (WebInspector.CSSSelectorProfileView.prototype.set profile): (WebInspector.CSSSelectorProfileView.prototype._createProfileNodes): (WebInspector.CSSSelectorProfileView.prototype.rebuildGridItems): (WebInspector.CSSSelectorProfileView.prototype.refreshData): (WebInspector.CSSSelectorProfileView.prototype.refreshShowAsPercents): (WebInspector.CSSSelectorProfileView.prototype._sortProfile.get selectorComparator): (WebInspector.CSSSelectorProfileView.prototype._sortProfile.timeComparator): (WebInspector.CSSSelectorProfileView.prototype._sortProfile.matchesComparator): (WebInspector.CSSSelectorProfileView.prototype._sortProfile): (WebInspector.CSSSelectorProfileType): (WebInspector.CSSSelectorProfileType.prototype.get buttonTooltip): (WebInspector.CSSSelectorProfileType.prototype.buttonClicked): (WebInspector.CSSSelectorProfileType.prototype.get treeItemTitle): (WebInspector.CSSSelectorProfileType.prototype.get description): (WebInspector.CSSSelectorProfileType.prototype.reset): (WebInspector.CSSSelectorProfileType.prototype.isRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.setRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.startRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.stopRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.createSidebarTreeElementForProfile): (WebInspector.CSSSelectorProfileType.prototype.createView): * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/ProfileView.js: * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileType.prototype.reset): (WebInspector.ProfilesPanel.prototype._reset): (WebInspector.ProfilesPanel.prototype.addProfileHeader): (WebInspector.ProfilesPanel.prototype._removeTemporaryProfile): (WebInspector.ProfilesPanel.prototype.setRecordingProfile): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress): (WebInspector.ProfilerDispatcher.prototype.addProfileHeader): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/profilesPanel.css: 2011-12-29 Sheriff Bot Unreviewed, rolling out r103798. http://trac.webkit.org/changeset/103798 https://bugs.webkit.org/show_bug.cgi?id=75353 some small scrollbar differences are making the tests fail on several platforms (Requested by jchaffraix on #webkit). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterScroll): 2011-12-29 Alexander Pavlov Web Inspector: Focus of the DOM tree is not restored when switching to the Elements panel https://bugs.webkit.org/show_bug.cgi?id=75351 Reviewed by Yury Semikhatsky. * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.wasShown): 2011-12-29 Julien Chaffraix REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling https://bugs.webkit.org/show_bug.cgi?id=67100 Reviewed by Dan Bernstein. Tests: fast/layers/scroll-with-transform-composited-layer-expected.html fast/layers/scroll-with-transform-composited-layer.html fast/layers/scroll-with-transform-layer-expected.html fast/layers/scroll-with-transform-layer.html The regression came from a previous optimization that was wrongly kept after r93614. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Remove the early return for transformed layer. This change worked as we used to call updateLayerPositions from scrollTo which would call updateLayerPosition on all our descendants. After r93614, this is no longer the case and we explicitely need to call updateLayerPosition on our descendants from updateLayerPositionsAfterScroll. 2011-12-29 Alexander Pavlov Web Inspector: Tree views can be collapsed/hidden using the keyboard arrows https://bugs.webkit.org/show_bug.cgi?id=46272 Reviewed by Yury Semikhatsky. WebInspector.SidebarSectionTreeElement which is not selectable has also been made non-collapsible and expanded by default. * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._registerProfileType): * inspector/front-end/SidebarTreeElement.js: (WebInspector.SidebarSectionTreeElement): (WebInspector.SidebarSectionTreeElement.prototype.selectable.false.collapse): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): 2011-12-29 Pavel Feldman Web Inspector: [chromium] pass dock to side request to the embedder. https://bugs.webkit.org/show_bug.cgi?id=75344 Reviewed by Yury Semikhatsky. I'd like to enable dock-to-right for the front-end window. This is a background work to pass control flow from the front-end to the front-end host. * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: (WebCore::InspectorFrontendClientLocal::requestSetDockSide): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::requestSetDockSide): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow): (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow): (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide): 2011-12-28 Pavel Podivilov Web Inspector: add "enable source maps" checkbox setting. https://bugs.webkit.org/show_bug.cgi?id=75311 Reviewed by Pavel Feldman. When "enable source maps" is on, all auto detected source maps are silently applied. * English.lproj/localizedStrings.js: * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createUISourceCode): * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): * inspector/front-end/inspector.js: (WebInspector._toolbarItemClicked): 2011-12-29 Julien Chaffraix Tighten our checks for needsSectionRecalc in RenderTable https://bugs.webkit.org/show_bug.cgi?id=73972 Reviewed by Adam Barth. Refactoring covered under the new tests. Now most of the functions use the header, first body and footer's getters that checks if we need a section recalculation. The only exceptions are addChild and recalcSections as they can be called with the bit set. * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): (WebCore::RenderTable::outerBorderAfter): (WebCore::RenderTable::sectionAbove): (WebCore::RenderTable::sectionBelow): Updated the previous functions to use the sections' getters. (WebCore::RenderTable::RenderTable): (WebCore::RenderTable::addChild): (WebCore::RenderTable::recalcSections): Update the previous functions after the 2 renames (see below). * rendering/RenderTable.h: (WebCore::RenderTable::header): (WebCore::RenderTable::footer): (WebCore::RenderTable::firstBody): Added some ASSERT here. Also renamed m_head to m_header and m_foot to m_footer to match the getter and to avoid unneeded abbreviation. (WebCore::RenderTable::hasSections): (WebCore::RenderTable::topSection): Updated the previous functions to use the section getters. 2011-12-28 Caio Marcelo de Oliveira Filho Use HashMap for UserScriptMap and UserStyleSheetMap https://bugs.webkit.org/show_bug.cgi?id=75323 Reviewed by Darin Adler. * dom/Document.cpp: (WebCore::Document::pageGroupUserSheets): * page/PageGroup.cpp: (WebCore::PageGroup::addUserScriptToWorld): (WebCore::PageGroup::addUserStyleSheetToWorld): (WebCore::PageGroup::removeUserScriptFromWorld): (WebCore::PageGroup::removeUserStyleSheetFromWorld): fix a small mistake in previous code. Now the entry for world is removed (and deleted) only if its stylesheet vector is empty. (WebCore::PageGroup::removeUserScriptsFromWorld): (WebCore::PageGroup::removeUserStyleSheetsFromWorld): (WebCore::PageGroup::removeAllUserContent): * page/UserScriptTypes.h: * page/UserStyleSheetTypes.h: 2011-12-28 Andreas Kling Reduce memory used by NamedNodeMap. Reviewed by Sam Weinig. Give NamedNodeMap's attribute vector an inline capacity of 4. The vast majority of elements have <= 4 attributes, and if they don't have any we normally don't allocate an attribute map at all. This reduces memory consumption by 1.2MB (on 64-bit) when loading the full HTML5 spec at . * dom/NamedNodeMap.h: 2011-12-28 Andreas Kling Reduce memory used by SpaceSplitString. Reviewed by Sam Weinig. Split the string upon creation instead of waiting until it's accessed. This allows us to get rid of all data members except the substring vector. Since we're storing AtomicStrings, this is way more memory-efficient than the previous implementation in the majority of cases. Also reduced the inline capcity of the vector to 2 (from 8), after testing showed this to cover 90% of the cases on the Alexa top sites. All in all this reduces memory consumption by 1.1MB (on 64-bit) when loading the full HTML5 spec at . On that same page, less than 2ms is spent (on my MBP) splitting the ~20000 strings. * dom/SpaceSplitString.cpp: (WebCore::SpaceSplitStringData::createVector): (WebCore::SpaceSplitStringData::containsAll): (WebCore::SpaceSplitStringData::remove): * dom/SpaceSplitString.h: (WebCore::SpaceSplitStringData::SpaceSplitStringData): (WebCore::SpaceSplitStringData::contains): (WebCore::SpaceSplitStringData::size): (WebCore::SpaceSplitStringData::operator[]): 2011-12-28 ChangSeok Oh [GTK] Fix compilation issue when selecting opengl for Accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=75309 Reviewed by Martin Robinson. Add TextureMapperGL and TextureMapperGLCairo files. They define new classes required to implement TextureMapperGL for GTK port. No new tests required. * GNUmakefile.list.am: * platform/graphics/cairo/TextureMapperGLCairo.cpp: Added. (WebCore::BGRA32PremultimpliedBufferCairo::BGRA32PremultimpliedBufferCairo): (WebCore::BGRA32PremultimpliedBufferCairo::~BGRA32PremultimpliedBufferCairo): (WebCore::BGRA32PremultimpliedBufferCairo::beginPaint): (WebCore::BGRA32PremultimpliedBufferCairo::data): (WebCore::BGRA32PremultimpliedBufferCairo::endPaint): (WebCore::uidForImage): (WebCore::BGRA32PremultimpliedBuffer::create): * platform/graphics/cairo/TextureMapperGLCairo.h: Added. 2011-12-28 Sheriff Bot Unreviewed, rolling out r103782. http://trac.webkit.org/changeset/103782 https://bugs.webkit.org/show_bug.cgi?id=75328 broke origin-whitelisting-removal.html (Requested by kling on #webkit). * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 2011-12-28 Kentaro Hara Enable the [Supplemental] IDL on Qt https://bugs.webkit.org/show_bug.cgi?id=75274 Reviewed by Adam Barth. This patch enables the [Supplemental] IDL on Qt by changing the build flow of Qt as follows. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * DerivedSources.pri: Described the above build flow. 2011-12-28 Caio Marcelo de Oliveira Filho Use HashMap in OriginAccessMap https://bugs.webkit.org/show_bug.cgi?id=75327 Reviewed by Andreas Kling. * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 2011-12-28 Caio Marcelo de Oliveira Filho Use HashMap for ProgressTracker's items https://bugs.webkit.org/show_bug.cgi?id=75326 Reviewed by Andreas Kling. * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::~ProgressTracker): although is empty, the destructor was kept so in the header file we can forward declare ProgressItem and use in an OwnPtr. (WebCore::ProgressTracker::reset): (WebCore::ProgressTracker::incrementProgress): (WebCore::ProgressTracker::completeProgress): removed a useless assignment to item member just before it is deleted. * loader/ProgressTracker.h: 2011-12-28 Alexis Menard getComputedStyle for border-color is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75324 Reviewed by Andreas Kling. Implement getComputedStyle for border-color. Test: fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-28 Darin Adler Use OwnPtr to handle lifetime and deletion of FontFace objects https://bugs.webkit.org/show_bug.cgi?id=75221 Reviewed by Daniel Bates. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): Use add instead of get/set to read and then later fill a cache. Use new version of registerCustomFont that takes PassOwnPtr. * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::getFontData): Ditto. * dom/Document.cpp: (WebCore::Document::registerCustomFont): Take a PassOwnPtr instead of raw pointer. * dom/Document.h: Ditto. 2011-12-28 Adam Barth "Fake" insertion mode in HTMLTreeBuilder doesn't do anything https://bugs.webkit.org/show_bug.cgi?id=75322 Reviewed by Darin Adler. This machinery isn't needed anymore now that we're using the new foreign content hotness. * html/parser/HTMLTreeBuilder.cpp: * html/parser/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::setInsertionMode): 2011-12-28 Alexis Menard getComputedStyle for border-style is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75312 Reviewed by Andreas Kling. Implement getComputedStyle for border-style. Test: fast/css/getComputedStyle/getComputedStyle-border-style-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-28 Alexis Menard getComputedStyle for border-bottom, border-top, border-left, border-right is not implemented. https://bugs.webkit.org/show_bug.cgi?id=74743 Reviewed by Tony Chang. Implement getComputedStyle for border-top, border-bottom, border-right, border-left. Test: fast/css/getComputedStyle/getComputedStyle-border-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties): * css/CSSComputedStyleDeclaration.h: 2011-12-28 Robert Hogan Inline flow not learning height of all text descendants https://bugs.webkit.org/show_bug.cgi?id=75305 Reviewed by Dan Bernstein. Tests: fast/inline/nested-text-descendants-expected.html fast/inline/nested-text-descendants.html The root inline box would only learn it had text descendants if its first grandchild was text. It wasn't informed of subsequent text grandchildren so could not factor them into its calculation of the line height. To fix this, propagate the existence of a text descendant to the root inline box by walking up through the text child's ancestors. * rendering/InlineFlowBox.cpp: (WebCore::setHasTextDescendantsOnAncestors): (WebCore::InlineFlowBox::addToLine): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::setHasTextDescendants): 2011-12-28 Sheriff Bot Unreviewed, rolling out r103620. http://trac.webkit.org/changeset/103620 https://bugs.webkit.org/show_bug.cgi?id=75316 Causes many crashes (Requested by abarth on #webkit). * loader/FrameLoaderClient.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): 2011-12-28 Alexander Pavlov [V8][Chromium] 'randomString' in document.body.style always returns true https://bugs.webkit.org/show_bug.cgi?id=75313 Reviewed by Adam Barth. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyQuery): 2011-12-28 Vsevolod Vlasov Web Inspector: Add domain.png to WebCore.gypi / WebKit.qrc. https://bugs.webkit.org/show_bug.cgi?id=75310 Reviewed by Pavel Feldman. * WebCore.gypi: * inspector/front-end/WebKit.qrc: 2011-12-28 Vsevolod Vlasov Web Inspector: ExperimentsSettings causes warning on chromium when reading localizedStrings. https://bugs.webkit.org/show_bug.cgi?id=75299 Reviewed by Pavel Feldman. * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype._createExperimentCheckbox): 2011-12-28 Vsevolod Vlasov Web Inspector: Scripts panel: add debug sidebar resizer to TabbedEditorContainer. https://bugs.webkit.org/show_bug.cgi?id=75300 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: * inspector/front-end/scriptsPanel.css: (#scripts-debug-sidebar-resizer-widget): 2011-12-28 Alexander Pavlov Web Inspector: Introduce a Profiler launcher view similar to that in the Audits panel https://bugs.webkit.org/show_bug.cgi?id=75228 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/AuditLauncherView.js: (WebInspector.AuditLauncherView): * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotProfileType): (WebInspector.DetailedHeapshotProfileType.prototype.get treeItemTitle): (WebInspector.DetailedHeapshotProfileType.prototype.get description): * inspector/front-end/ProfileLauncherView.js: Added. (WebInspector.ProfileLauncherView): (WebInspector.ProfileLauncherView.prototype.setUpEventListeners): (WebInspector.ProfileLauncherView.prototype.addProfileType): (WebInspector.ProfileLauncherView.prototype._controlButtonClicked): (WebInspector.ProfileLauncherView.prototype._updateControls): (WebInspector.ProfileLauncherView.prototype._profileTypeChanged): (WebInspector.ProfileLauncherView.prototype._onProfileStarted): (WebInspector.ProfileLauncherView.prototype._onProfileFinished): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileType): (WebInspector.CPUProfileType.prototype.get treeItemTitle): (WebInspector.CPUProfileType.prototype.get description): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileType.prototype.get treeItemTitle): (WebInspector.ProfileType.prototype.get description): (WebInspector.ProfilesPanel.prototype.get statusBarItems): (WebInspector.ProfilesPanel.prototype.toggleRecordButton): (WebInspector.ProfilesPanel.prototype._onProfileTypeSelected): (WebInspector.ProfilesPanel.prototype._reset): (WebInspector.ProfilesPanel.prototype._showLauncherView): (WebInspector.ProfilesPanel.prototype._registerProfileType): (WebInspector.ProfilesPanel.prototype._addProfileHeader): (WebInspector.ProfilesPanel.prototype._updateInterface): (WebInspector.ProfileTypeTreeElement): (WebInspector.ProfileTypeTreeElement.prototype.collapse): (WebInspector.ProfilesSidebarTreeElement): (WebInspector.ProfilesSidebarTreeElement.prototype.onattach): (WebInspector.ProfilesSidebarTreeElement.prototype.onselect): (WebInspector.ProfilesSidebarTreeElement.prototype.get selectable): (WebInspector.ProfilesSidebarTreeElement.prototype.refresh): * inspector/front-end/WebKit.qrc: * inspector/front-end/WelcomeView.js: Removed. * inspector/front-end/auditsPanel.css: (.audit-launcher-view .audit-launcher-view-content): (.audit-launcher-view div.button-container): (.panel-enabler-view.audit-launcher-view label): (.panel-enabler-view.audit-launcher-view label.disabled): * inspector/front-end/inspector.html: * inspector/front-end/panelEnablerView.css: (.panel-enabler-view img): (.panel-enabler-view .flexible-space): (.panel-enabler-view button:not(.status-bar-item)): (body.inactive .panel-enabler-view button, .panel-enabler-view button:disabled): (.panel-enabler-view input[type="radio"]): (.panel-enabler-view input[type="radio"]:active:not(:disabled)): (.panel-enabler-view input[type="radio"]:checked): (.panel-enabler-view input[type="radio"]:checked:active): * inspector/front-end/profilesPanel.css: (.profile-launcher-view-tree-item > .icon): (.profile-launcher-view-content): (.profile-launcher-view-content h1): (.panel-enabler-view.profile-launcher-view form): (.panel-enabler-view.profile-launcher-view label): (.profile-launcher-view-content p): (.panel-enabler-view.profile-launcher-view button:not(.status-bar-item)): (.profile-launcher-view-content button.running:not(.status-bar-item)): (body.inactive .profile-launcher-view-content button.running:not(.status-bar-item)): 2011-12-28 Sheriff Bot Unreviewed, rolling out r103763. http://trac.webkit.org/changeset/103763 https://bugs.webkit.org/show_bug.cgi?id=75307 "Compilation fails on Snow Leopard" (Requested by yurys on #webkit). * inspector/CodeGeneratorInspector.py: (Helper): (create_ad_hoc_type_declaration.Helper): (CodeGenerator.generate_type_builder): (get_in_c_type_text): 2011-12-28 Peter Rybin Web Inspector: CodeGeneratorInspector.py: generate enum types. https://bugs.webkit.org/show_bug.cgi?id=74954 Reviewed by Yury Semikhatsky. Internal map of string contants is created. C enums are created for each JSON enum. * inspector/CodeGeneratorInspector.py: (EnumConstants.add_constant): (EnumConstants): (EnumConstants.get_enum_constant_code): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.EnumBinding.get_in_c_type_text): (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern): (TypeBindings.create_type_declaration_.PlainString.reduce_to_raw_type): (TypeBindings.create_type_declaration_.PlainString.get_setter_value_expression_pattern): (get_in_c_type_text): (get_setter_value_expression_pattern): (PlainObjectBinding.get_in_c_type_text): (PlainObjectBinding.get_setter_value_expression_pattern): (RawTypesBinding.get_in_c_type_text): (RawTypesBinding.get_setter_value_expression_pattern): (get_annotated_type_text): (MethodGenerateModes.get_modes): (MethodGenerateModes.StrictParameterMode.get_c_param_type_text): (MethodGenerateModes.StrictParameterMode): (MethodGenerateModes.StrictParameterMode.get_setter_value_expression): (MethodGenerateModes.RawParameterMode.get_c_param_type_text): (MethodGenerateModes.RawParameterMode): (MethodGenerateModes.RawParameterMode.get_setter_value_expression): (MethodGenerateModes.CombinedMode.get_c_param_type_text): (MethodGenerateModes): (MethodGenerateModes.CombinedMode): (MethodGenerateModes.CombinedMode.get_setter_value_expression): 2011-12-28 Hans Wennborg IndexedDB: IDBKeyRange constructor should throw when lower > upper https://bugs.webkit.org/show_bug.cgi?id=74705 Reviewed by Tony Chang. Make IDBKeyRange throw an exception when lower > upper, or lower == upper and one or both of the bounds is open. Tested in storage/indexeddb/keyrange.html. * storage/IDBKeyRange.cpp: (WebCore::IDBKeyRange::bound): 2011-12-28 Alexander Pavlov Web Inspector: [protocol] empty enum constant should be replaced with identifier https://bugs.webkit.org/show_bug.cgi?id=75273 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::buildObjectForRule): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSRule.prototype.get isRegular): 2011-12-27 Pavel Feldman Web Inspector: complete annotating SDK component. https://bugs.webkit.org/show_bug.cgi?id=75259 Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype._cacheDisabledSettingChanged): (WebInspector.NetworkDispatcher.prototype._isNull): (WebInspector.NetworkDispatcher.prototype.webSocketCreated): * inspector/front-end/Resource.js: (WebInspector.Resource.displayName): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._onResourceUpdated): (WebInspector.ResourceTreeModel.prototype._consoleMessageAdded): (WebInspector.ResourceTreeFrame.prototype.get name): * inspector/front-end/TabbedEditorContainer.js: 2011-12-27 Anantanarayanan G Iyengar Crash in the WebKit accessibility code while attempting to retrieve the title UI element. https://bugs.webkit.org/show_bug.cgi?id=75279 Reviewed by Ryosuke Niwa. Fix a crash in the the WebKit accessibility code which occurs while retrieving the title UI clement. The fix is to NULL check the RenderObject::node return value. No test added as there is no reduction. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::titleUIElement): 2011-12-27 Dominic Cooney Remove initWebKitAnimationEvent method https://bugs.webkit.org/show_bug.cgi?id=71698 Reviewed by Ojan Vafai. Now that WebKitAnimationEvent has a constructor, we don't need this method. is tracking the change to the CSS Animations spec. * dom/WebKitAnimationEvent.cpp: * dom/WebKitAnimationEvent.h: * dom/WebKitAnimationEvent.idl: 2011-12-27 Dominic Cooney Remove initWebKitTransitionEvent method https://bugs.webkit.org/show_bug.cgi?id=71701 Reviewed by Ojan Vafai. Now that WebKitTransitionEvent has a constructor, we don't need this method. is tracking the change to the CSS Transitions spec. * dom/WebKitTransitionEvent.cpp: * dom/WebKitTransitionEvent.h: * dom/WebKitTransitionEvent.idl: 2011-12-27 Tony Chang Move HarfBuzz files into their own directory https://bugs.webkit.org/show_bug.cgi?id=72780 Reviewed by Daniel Bates. FontCacheLinux.cpp got moved to platform/graphics/skia/FontCacheSkia.cpp since it wasn't HarfBuzz specific. I used HarfBuzz in filenames since that seems to be how the name is capitalized on the project home page. Fixed some style errors caught by the style checker. * PlatformBlackBerry.cmake: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/graphics/chromium/FontPlatformData.h: * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp. * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h: Renamed from Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.h. * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontLinux.cpp. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Renamed from Source/WebCore/platform/graphics/chromium/FontPlatformDataLinux.h. * platform/graphics/harfbuzz/HarfBuzzSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp. * platform/graphics/harfbuzz/HarfBuzzSkia.h: Renamed from Source/WebCore/platform/graphics/chromium/HarfbuzzSkia.h. * platform/graphics/harfbuzz/SimpleFontDataSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/SimpleFontDataLinux.cpp. * platform/graphics/skia/FontCacheSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontCacheLinux.cpp. * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: 2011-12-27 Huang Dongsung [TexMap][QT] The fragment shader in OpenGL ES2 requires the default precision qualifier. https://bugs.webkit.org/show_bug.cgi?id=75168 Reviewed by Noam Rosenthal. No new functionality so no new tests. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::TextureMapperGL::initializeShaders): 2011-12-27 Ryosuke Niwa [Chromium] uninitialized variable in fakeMouseMoveEventTimerFired https://bugs.webkit.org/show_bug.cgi?id=75263 Reviewed by Tony Chang. The failure was caused by PlatformKeyboardEvent::getCurrentModifierState in PlatformKeyboardEventChromium.cpp not initializing arguments on Linux. Fixed the failure by always assigning false to the arguments. But we should really fix this function for Linux. Not recognizing any modifier isn't great. * platform/chromium/PlatformKeyboardEventChromium.cpp: (WebCore::PlatformKeyboardEvent::getCurrentModifierState): 2011-12-27 Kentaro Hara WIP: Enable the [Supplemental] IDL on Gtk https://bugs.webkit.org/show_bug.cgi?id=74972 Reviewed by Adam Barth. This patch enables the [Supplemental] IDL on Gtk by changing the build flow of Gtk as follows. - Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } - New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * GNUmakefile.am: Described the above build flow. * GNUmakefile.list.am: Added a list of IDL files. Instead, removed a list of JS*.h and JS*.cpp that are generated by the IDL files. 2011-12-27 Tony Chang [chromium] When building with clang, enable -Wglobal-constructors https://bugs.webkit.org/show_bug.cgi?id=74365 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: 2011-12-27 Tony Chang [chromium] really enable wpo for WebCore libs and for WTF https://bugs.webkit.org/show_bug.cgi?id=75264 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: The variable was getting clobbered by the value set in common.gypi. Use a target_defaults instead to set the variable. I tested manually on my Windows machine and WholeProgramOptimization is getting set when buildtype is Official. 2011-12-27 Tony Chang [chromium] remove references to files no longer in the tree https://bugs.webkit.org/show_bug.cgi?id=75262 Reviewed by Adam Barth. * WebCore.gypi: platform/mac/PlatformMouseEventMac.mm and platform/mac/WheelEventMac.mm were removed in r103652. 2011-12-27 Vsevolod Vlasov Unreviewed web inspector localizedStrings.js fix. * English.lproj/localizedStrings.js: 2011-12-27 Vsevolod Vlasov Web Inspector: Introduce support for experimental settings. https://bugs.webkit.org/show_bug.cgi?id=75250 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/ScriptsPanel.js: * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): (WebInspector.ExperimentsSettings.prototype.get experiments): (WebInspector.ExperimentsSettings.prototype.get experimentsEnabled): (WebInspector.ExperimentsSettings.prototype._createExperiment): (WebInspector.ExperimentsSettings.prototype.set _cleanUpSetting.get var): (WebInspector.ExperimentsSettings.prototype.set _cleanUpSetting): (set WebInspector.Experiment): (WebInspector.Experiment.prototype.get name): (WebInspector.Experiment.prototype.get title): (WebInspector.Experiment.prototype.isEnabled): (WebInspector.Experiment.prototype.setEnabled): (set WebInspector): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): (WebInspector.SettingsScreen.prototype._createExperimentsWarningSubsection): (WebInspector.SettingsScreen.prototype._createExperimentCheckbox.listener): (WebInspector.SettingsScreen.prototype._createExperimentCheckbox): * inspector/front-end/helpScreen.css: (.settings-experiments-warning-subsection-warning): (.settings-experiments-warning-subsection-message): 2011-12-27 Alexander Pavlov Web Inspector: exception when scrolling in JavaScriptOutline dialog with empty query https://bugs.webkit.org/show_bug.cgi?id=75255 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptOutlineDialog.js: (WebInspector.JavaScriptOutlineDialog.prototype._onScroll): 2011-12-27 Pavel Feldman Web Inspector: add more annotations on SDK classes. https://bugs.webkit.org/show_bug.cgi?id=75247 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/compile-front-end.sh: * inspector/front-end/ApplicationCacheModel.js: (WebInspector.ApplicationCacheDispatcher.prototype.networkStateUpdated): * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._breakpoint): * inspector/front-end/Color.js: (WebInspector.Color.prototype.get shorthex): (WebInspector.Color.prototype.get hex): (WebInspector.Color.prototype.get rgb): (WebInspector.Color.prototype.get hsl): (WebInspector.Color.prototype.get nickname): (WebInspector.Color.prototype.hasShortHex): (WebInspector.Color.prototype._individualRGBValueToFloatValue): (WebInspector.Color.prototype._rgbStringsToHex): (WebInspector.Color.prototype._parse.this.nickname.set 2): (WebInspector.Color.prototype._parse.this.hsla.set 1): (WebInspector.Color.prototype._parse.this.rgba.set 0): (WebInspector.Color.prototype._parse.set WebInspector): (WebInspector.Color.prototype._parse): * inspector/front-end/CompilerSourceMapping.js: * inspector/front-end/ConsoleModel.js: * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider): (WebInspector.ConcatenatedScriptsContentProvider): (WebInspector.CompilerSourceMappingContentProvider): (WebInspector.StaticContentProvider): * inspector/front-end/CookieParser.js: (WebInspector.CookieParser.KeyValue): (WebInspector.CookieParser.prototype.parseCookie): (WebInspector.CookieParser.prototype.parseSetCookie): (WebInspector.CookieParser.prototype._extractKeyValue): * inspector/front-end/DOMStorage.js: * inspector/front-end/Database.js: (WebInspector.DatabaseDispatcher.prototype.sqlTransactionSucceeded): (WebInspector.DatabaseDispatcher.prototype.sqlTransactionFailed): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.Location): (WebInspector.DebuggerModel.prototype._failedToParseScriptSource): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/ElementsTreeOutline.js: * inspector/front-end/HAREntry.js: * inspector/front-end/NetworkLog.js: (WebInspector.NetworkLog.prototype._mainFrameNavigated): * inspector/front-end/Placard.js: * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.prototype.setPropertyValue.propertySetCallback): (WebInspector.RemoteObject.prototype.setPropertyValue): (WebInspector.LocalJSONObject.prototype.get hasChildren): (WebInspector.LocalJSONObject.prototype._children): * inspector/front-end/Resource.js: (WebInspector.Resource.restoreRevisions): (WebInspector.Resource.prototype.get queryParameters): (WebInspector.Resource.prototype.get formParameters): (WebInspector.Resource.prototype.isHttpFamily): * inspector/front-end/ResourceCategory.js: * inspector/front-end/ResourceUtils.js: * inspector/front-end/ScopeChainSidebarPane.js: (WebInspector.ScopeChainSidebarPane.prototype.update): * inspector/front-end/Script.js: (WebInspector.Script.prototype.isInlineScript): * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.positionToLocation): * inspector/front-end/WelcomeView.js: (WebInspector.WelcomeView.prototype.addMessage): * inspector/front-end/externs.js: (Array.prototype.upperBound): 2011-12-27 Vsevolod Vlasov Web Inspector: Scripts panel tabbed editor does not reopen closed tabs. https://bugs.webkit.org/show_bug.cgi?id=75245 Reviewed by Pavel Feldman. * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype._tabClosed): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.closeTab): (WebInspector.TabbedPane.prototype.selectTab): 2011-12-27 Yury Semikhatsky Web Inspector: report per document JS event listener count https://bugs.webkit.org/show_bug.cgi?id=74298 This patch adds JS event listener count to the memory agent report. Reviewed by Pavel Feldman. Test: inspector/dom-statistics.html * inspector/Inspector.json: * inspector/InspectorMemoryAgent.cpp: 2011-12-27 Alexander Pavlov Web Inspector: [REGRESSION] Go to Function dialog always has a minimal height https://bugs.webkit.org/show_bug.cgi?id=75254 Reviewed by Yury Semikhatsky. * inspector/front-end/scriptsPanel.css: (.script-view): 2011-12-26 Vsevolod Vlasov Web Inspector: Create tabbed editor for scripts panel. https://bugs.webkit.org/show_bug.cgi?id=75230 Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes.get if): (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes): (WebInspector.NavigatorScriptTreeElement.prototype.ondblclick): (WebInspector.NavigatorScriptTreeElement.prototype.onenter): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/TabbedEditorContainer.js: Added. * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.get visibleView): (WebInspector.TabbedPane.prototype.get selectedTabId): (WebInspector.TabbedPane.prototype.closeAllTabs): (WebInspector.TabbedPane.prototype.changeTabTitle): (WebInspector.TabbedPane.prototype.changeTabView): (WebInspector.TabbedPaneTab): (WebInspector.TabbedPaneTab.prototype.get title): (WebInspector.TabbedPaneTab.prototype.set title): (WebInspector.TabbedPaneTab.prototype.get view): (WebInspector.TabbedPaneTab.prototype.set view): (WebInspector.TabbedPaneTab.prototype._createTabElement): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/scriptsPanel.css: (.scripts-views-container): (.script-view): (#scripts-editor-container-tabbed-pane .tabbed-pane-header): (#scripts-editor-container-tabbed-pane .tabbed-pane-header-contents): (#scripts-editor-container-tabbed-pane .tabbed-pane-content): 2011-12-27 Pavel Feldman Not reviewed: Rolling out r103703 for breaking Canvas2DLayerChromiumTest.testFullLifecycle. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: 2011-12-22 Vangelis Kokkevis [chromium] Bypass the shadow texture copy for accelerated canvas when running the compositor in single threaded mode. https://bugs.webkit.org/show_bug.cgi?id=75146 The texture copy fails on Windows as glCopyTexImage2D() doesn't support BGRA source textures. This change also modified Canvas2DLayerChromium::updateCompositorResources to call glCopyTexSubImage2D() instead of glCopyTexImage2D() so that the copy can work with texture allocated via the glTexStorage2D extension. Reviewed by James Robinson. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: 2011-12-26 Gyuyoung Kim [EFL][WK2] Implement context menu for EFL port. https://bugs.webkit.org/show_bug.cgi?id=74995 Reviewed by Anders Carlsson. Implement missing ContextMenuEfl class in order to support WK2's context menu. Because WK2's context menu still needs WebCore's context menu implementation. And of course, this patch also can be used for WK1 without CROSS_PLATFORM_CONTEXT_MENU option. * platform/ContextMenu.h: * platform/ContextMenuItem.h: * platform/PlatformMenuDescription.h: * platform/efl/ContextMenuEfl.cpp: (WebCore::ContextMenu::~ContextMenu): (WebCore::ContextMenu::appendItem): (WebCore::ContextMenu::insertItem): (WebCore::ContextMenu::itemCount): (WebCore::ContextMenu::setPlatformDescription): (WebCore::ContextMenu::platformDescription): (WebCore::ContextMenu::releasePlatformDescription): (WebCore::platformMenuDescription): (WebCore::contextMenuItemVector): * platform/efl/ContextMenuItemEfl.cpp: (WebCore::ContextMenuItem::ContextMenuItem): (WebCore::ContextMenuItem::~ContextMenuItem): (WebCore::ContextMenuItem::setType): (WebCore::ContextMenuItem::type): (WebCore::ContextMenuItem::setAction): (WebCore::ContextMenuItem::action): (WebCore::ContextMenuItem::setTitle): (WebCore::ContextMenuItem::title): (WebCore::ContextMenuItem::setChecked): (WebCore::ContextMenuItem::checked): (WebCore::ContextMenuItem::setEnabled): (WebCore::ContextMenuItem::enabled): 2011-12-26 Hajime Morrita [Refactoring] Node::setTreeScopeRecursively() doesn't need includeRoot parameter https://bugs.webkit.org/show_bug.cgi?id=75240 Reviewed by Anders Carlsson. No new tests. No behavior change. * dom/Node.cpp: (WebCore::Node::setTreeScopeRecursively): * dom/Node.h: 2011-12-26 Darin Adler Use OwnPtr and OwnArrayPtr in a couple more places https://bugs.webkit.org/show_bug.cgi?id=75211 Reviewed by Andreas Kling. I had a patch with some changes from a while back from going through all sorts of classes and changing code to use adoptPtr. Most were landed long ago, these are the ones that still apply. There are six pieces here that could each be landed separately. The big one is CSSParser. * css/CSSGrammar.y: Update for members and functions that now return PassOwnPtr instead of raw pointers. * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): Remove explicit construction for m_valueList and m_data since OwnPtr and OwnArrayPtr initialize to zero without it. (WebCore::CSSParser::~CSSParser): Removed delete m_valueList and fastFree(m_data) since OwnPtr and OwnArrayPtr handle that. (WebCore::CSSParser::setupParser): Use adoptArrayPtr and new for the character array instead of fastFree/fastMalloc. Added get function calls as needed. (WebCore::CSSParser::parseValue): Added get function calls as needed. (WebCore::CSSParser::parseContent): Ditto. (WebCore::CSSParser::parseFillProperty): Ditto. (WebCore::CSSParser::parseTransformOriginShorthand): Ditto. (WebCore::CSSParser::parseBorderImage): Ditto. (WebCore::CSSParser::parseTransformOrigin): Ditto. (WebCore::CSSParser::parsePerspectiveOrigin): Ditto. (WebCore::CSSParser::sinkFloatingValueList): Changed to return PassOwnPtr. The adoptPtr call is here. (WebCore::CSSParser::sinkFloatingFunction): Ditto. (WebCore::CSSParser::markSelectorListStart): Added get function calls as needed. (WebCore::CSSParser::markSelectorListEnd): Ditto. (WebCore::CSSParser::markRuleBodyStart): Ditto. (WebCore::CSSParser::markRuleBodyEnd): Ditto. (WebCore::CSSParser::markPropertyStart): Ditto. (WebCore::CSSParser::markPropertyEnd): Ditto. * css/CSSParser.h: Moved conditional includes to their own paragraph. Made sinkFloatingValueList and sinkFloatingFunction return PassOwnPtr. Made m_valueList an OwnPtr and m_data an OwnArrayPtr. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): Added a call to the get function. * html/PluginDocument.h: Made isPluginDocument private. Also marked all the functions that are overriding here as OVERRIDE since I was touching the header. * html/parser/HTMLToken.h: (WebCore::HTMLTokenTypes::DoctypeData::DoctypeData): Removed an unneeded line explicitly initializing the base class. * page/animation/AnimationBase.cpp: (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper): Fixed indent. * rendering/style/RenderStyle.h: Moved conditional includes to their own paragraph. * xml/parser/MarkupTokenBase.h: (WebCore::MarkupTokenBase::beginDOCTYPE): Removed unneeded parentheses. 2011-12-26 Vsevolod Vlasov Web Inspector: Extract FileEditor from ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=75229 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName): * inspector/front-end/ScriptsNavigator.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.get visibleView): (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced.get if): (WebInspector.ScriptsPanel.EditorContainer): (WebInspector.ScriptsPanel.EditorContainer.prototype.get currentSourceFrame): (WebInspector.ScriptsPanel.EditorContainer.prototype.show): (WebInspector.ScriptsPanel.EditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.EditorContainer.prototype.isSourceFrameOpen): (WebInspector.ScriptsPanel.EditorContainer.prototype.replaceSourceFrames): (WebInspector.ScriptsPanel.EditorContainer.prototype.setSourceFrameIsDirty): (WebInspector.ScriptsPanel.EditorContainer.prototype.reset): (WebInspector.ScriptsPanel.SingleFileEditorContainer): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.get currentSourceFrame): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.show): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.isSourceFrameOpen): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.setSourceFrameIsDirty): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.reset): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.get domain): (WebInspector.UISourceCode.prototype.get folderName): (WebInspector.UISourceCode.prototype.get fileName): (WebInspector.UISourceCode.prototype.get displayName): (WebInspector.UISourceCode.prototype._parseURL): 2011-12-26 Darin Adler Fix mutation observer build after didMoveToNewDocument change https://bugs.webkit.org/show_bug.cgi?id=75224 Reviewed by Hajime Morita. * dom/Node.cpp: (WebCore::willCallDidMoveToNewDocument): Added. (WebCore::didMoveToNewDocumentWasCalled): Added. (WebCore::Node::setDocument): Call new debugging function. (WebCore::Node::didMoveToNewDocument): Ditto. Also use ASSERT_UNUSED unconditionally rather than UNUSED_PARAM inside and #if. Also added a new assertion that checks that hte old document was passed through properly. 2011-12-26 Alexander Pavlov Web Inspector: [Scripts] Implement iterative match highlighting in the "Go to Function" dialog item list https://bugs.webkit.org/show_bug.cgi?id=75226 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptOutlineDialog.js: (WebInspector.JavaScriptOutlineDialog): (WebInspector.JavaScriptOutlineDialog.prototype._createSearchRegExp): (WebInspector.JavaScriptOutlineDialog.prototype._filterFunctions): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.previousItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.nextItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown): (WebInspector.JavaScriptOutlineDialog.prototype._updateSelection): (WebInspector.JavaScriptOutlineDialog.prototype._onScroll): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype.highlightViewportItems): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype.clearHighlight): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype._highlightItem): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype._viewportRowRange): * inspector/front-end/javaScriptOutlineDialog.css: (.js-outline-dialog > .container > div.item > span.highlight): 2011-12-26 Vsevolod Vlasov Web Inspector: Extract FileSelector from ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=75173 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement): (WebInspector.ScriptsNavigator.prototype.show): (WebInspector.ScriptsNavigator.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes): (WebInspector.ScriptsNavigator.prototype.scriptSelected): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if): (WebInspector.ScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype._showSourceLine): (WebInspector.ScriptsPanel.prototype._showAndRevealInFileSelector): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._updateExecutionLine): (WebInspector.ScriptsPanel.prototype._scriptSelected): (WebInspector.ScriptsPanel.FileSelector): (WebInspector.ScriptsPanel.FileSelector.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.FileSelector.prototype.show): (WebInspector.ScriptsPanel.FileSelector.prototype.addUISourceCode): (WebInspector.ScriptsPanel.FileSelector.prototype.isScriptSourceAdded): (WebInspector.ScriptsPanel.FileSelector.prototype.revealUISourceCode): (WebInspector.ScriptsPanel.FileSelector.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsPanel.FileSelector.prototype.replaceUISourceCodes): (WebInspector.ScriptsPanel.ComboBoxFileSelector): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.show): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.showDebugSidebarResizeWidget): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.addUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.isScriptSourceAdded): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.revealUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._innerRevealUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addToHistory): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.replaceUISourceCodes): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._showScriptFoldersSettingChanged): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._reset): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._createEditorToolbar): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.get var): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered.optionCompare): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._resetFilesSelect): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._updateBackAndForwardButtons): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged): * inspector/front-end/inspector.html: * inspector/front-end/utilities.js: (): 2011-12-26 Alexander Pavlov Web Inspector: Implement "Go to Function" dialog for JavaScript https://bugs.webkit.org/show_bug.cgi?id=75092 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/JavaScriptOutlineDialog.js: Added. (WebInspector.JavaScriptOutlineDialog.onMouseDown): (WebInspector.JavaScriptOutlineDialog): (WebInspector.JavaScriptOutlineDialog.didAddChunk): (WebInspector.JavaScriptOutlineDialog.install): (WebInspector.JavaScriptOutlineDialog._show): (WebInspector.JavaScriptOutlineDialog.createShortcut): (WebInspector.JavaScriptOutlineDialog.prototype._resizeWindow): (WebInspector.JavaScriptOutlineDialog.prototype._appendItemElements): (WebInspector.JavaScriptOutlineDialog.prototype._createSearchRegExp): (WebInspector.JavaScriptOutlineDialog.prototype._filterFunctions): (WebInspector.JavaScriptOutlineDialog.prototype._selectFirstItem): (WebInspector.JavaScriptOutlineDialog.prototype._hide): (WebInspector.JavaScriptOutlineDialog.prototype._onBlur): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.previousItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.nextItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown): (WebInspector.JavaScriptOutlineDialog.prototype._scheduleFilter): (WebInspector.JavaScriptOutlineDialog.prototype._updateSelection): (WebInspector.JavaScriptOutlineDialog.prototype._onClick): (WebInspector.JavaScriptOutlineDialog.prototype._onMouseMove): (WebInspector.JavaScriptOutlineDialog.prototype._highlightFunctionLine): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.get uiSourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._didBuildOutlineChunk): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.requestVisibleScriptOutline): (WebInspector.ScriptsPanel.prototype._createEditorToolbar): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/javaScriptOutlineDialog.css: Added. (.js-outline-dialog): (.js-outline-dialog > input): (.js-outline-dialog > div.progress): (.js-outline-dialog > div.container): (.js-outline-dialog > .container > div.item): (.js-outline-dialog > .container > div.item.selected): 2011-12-26 Pavel Feldman Web Inspector: make SDK compilation component self-contained. https://bugs.webkit.org/show_bug.cgi?id=75172 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl): (WebInspector.ConsoleMessageImpl.prototype.get stackTrace): (WebInspector.ConsoleMessageImpl.prototype.clone): * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated): (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.prototype.isErrorOrWarning): (WebInspector.ConsoleMessage.prototype.updateRepeatCount): (WebInspector.ConsoleMessage.prototype.clone): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): * inspector/front-end/ResourceUtils.js: * inspector/front-end/UIUtils.js: (WebInspector.resetToolbarColors): (WebInspector.populateHrefContextMenu): 2011-12-26 Hajime Morrita Unreviewed bad merge fix. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::didMoveToNewDocument): 2011-12-25 Hajime Morrita https://bugs.webkit.org/show_bug.cgi?id=74067 Refactoring: Unitfy willMoveToNewDocument() and didMoveToNewDocument() Reviewed by Darin Adler. No new tests. No behavior change. This change combines two method Node::willMoveToNewOwnerDocument() and Node::didMoveToNewOwnerDocument() into Node::didMoveToNewDocument(Document* oldDocument). The intention of this change is: - Making upcoming refactoring (Bug 59816) possible. The refactoring will turn Node::m_document into Node::m_treeScope, and we will no longer have Node::setDocument() where we can invoke both willMoveToNewDocument() and didMoveToNewDocument() at once. - Killing one extra virtual method call. - Making the concept of "move" clearer by keeping such an operation into the single method. * dom/Node.cpp: (WebCore::setWillMoveToNewDocumentWasCalled): (WebCore::setDidMoveToNewDocumentWasCalled): (WebCore::Node::setDocument): (WebCore::Node::didMoveToNewDocument): * dom/Node.h: * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::didMoveToNewDocument): * html/FormAssociatedElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::didMoveToNewDocument): (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument): * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::didMoveToNewDocument): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::didMoveToNewDocument): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::didMoveToNewDocument): * html/HTMLInputElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didMoveToNewDocument): * html/HTMLMediaElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::didMoveToNewDocument): * html/HTMLObjectElement.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): * html/HTMLPlugInImageElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::didMoveToNewDocument): * html/HTMLVideoElement.h: * html/ImageDocument.cpp: (WebCore::ImageDocumentElement::didMoveToNewDocument): * html/ImageInputType.cpp: (WebCore::ImageInputType::willMoveToNewDocument): * loader/ImageLoader.cpp: (WebCore::ImageLoader::elementDidMoveToNewDocument): * loader/ImageLoader.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::didMoveToNewDocument): * svg/SVGImageElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::didMoveToNewDocument): * svg/SVGSVGElement.h: 2011-12-25 Kentaro Hara REGRESSION(r102987): Fix the filename prefix of the generated empty .h and .cpp files for [Supplemental] IDLs https://bugs.webkit.org/show_bug.cgi?id=75082 Reviewed by Darin Adler. In bug 74481, we changed generate-bindings.pl so that it generates empty .h and .cpp files for the [Supplemental] IDLs. However, the filename prefixes of those .h and .cpp files are wrong. This patch fixes the prefixes as follows: generator=JS => JS*.h, JS*.cpp generator=V8 => V8*.h, V8*.cpp generator=ObjC => DOM*.h, DOM*.cpp generator=GObject => WebKitDOM*.h, WebKitDOM*.cpp generator=CPP => WebDOM*.h, WebDOM*.cpp No new tests. No change in behavior. I confirmed that the names of generated .h and .cpp files are correct. * bindings/scripts/CodeGenerator.pm: (FileNamePrefix): Returns the prefix of file names. * bindings/scripts/CodeGeneratorCPP.pm: (GenerateInterface): Uses CodeGenerator::FileNamePrefix. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateInterface): Ditto. * bindings/scripts/CodeGeneratorJS.pm: (GenerateInterface): Ditto. * bindings/scripts/CodeGeneratorObjC.pm: (GenerateInterface): Ditto. * bindings/scripts/CodeGeneratorV8.pm: (GenerateInterface): Ditto. * bindings/scripts/generate-bindings.pl: (generateEmptyHeaderAndCpp): Ditto. 2011-12-25 Dan Bernstein WebCore changes for: Find indicators overlap when a match spans multiple text boxes https://bugs.webkit.org/show_bug.cgi?id=75220 Reviewed by Darin Adler. * WebCore.exp.in: Exported new unionRect(const Vector&) and existing FloatRect::intersects(). * platform/graphics/FloatRect.cpp: (WebCore::unionRect): Added. * platform/graphics/FloatRect.h: 2011-12-25 Darin Adler Use OwnPtr for CSSFontFace::m_sources https://bugs.webkit.org/show_bug.cgi?id=75219 Reviewed by Dan Bernstein. * css/CSSFontFace.cpp: (WebCore::CSSFontFace::isLoaded): Use the same size_t idiom here as in the rest of the functions. (WebCore::CSSFontFace::isValid): Ditto. Also removed unneeded empty special casing. (WebCore::CSSFontFace::addSource): Changed to take a PassOwnPtr. Reordered so the PassOwnPtr zeroing does not cause trouble. (WebCore::CSSFontFace::getFontData): Added call to get. (WebCore::CSSFontFace::hasSVGFontFaceSource): Use the same size_t idiom here as in the rest of the functions. * css/CSSFontFace.h: Use PassOwnPtr for addSource argument, and Vector for the m_sources vector. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Use OwnPtr and PassOwnPtr for font face sources that are passed to addSource. * css/CSSSegmentedFontFace.cpp: Added a now-needed include. 2011-12-24 Jarred Nicholls Allow XMLHttpRequest responseType to be set at any state up to and including HEADERS_RECEIVED https://bugs.webkit.org/show_bug.cgi?id=75190 XMLHttpRequest.responseType should be modifiable at any state up to and including the HEADERS_RECEIVED state. Therefore, subsequent calls to open() should not reset responseType to its default value, and calls to open() must follow the same spec mandate set forth in setResponseType() for synchronous HTTP(S) requests made from the window context. Reviewed by Alexey Proskuryakov. Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request.html fast/xmlhttprequest/xmlhttprequest-responsetype-before-open.html fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setResponseType): Prevent setting the value only when in LOADING and DONE states. No longer check if m_loader is present, which is instantiated on a call to send(), because responseType can be safely changed after a request is sent. (WebCore::XMLHttpRequest::open): Do not reset m_responseTypeCode to the default value, and prevent calls to open() for synchronous HTTP(S) requests made from the window context when m_responseTypeCode is not the default value. 2011-12-25 Sam Weinig Fix tests failing as a result of r103643 https://bugs.webkit.org/show_bug.cgi?id=75209 Reviewed by Dan Bernstein. Switch accidental switch of default scroll granularity from ScrollByPageWheelEvent back to ScrollByPixelWheelEvent. * platform/mac/PlatformEventFactory.mm: (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): 2011-12-25 Darin Adler Change CSS canvas code that does HashMap get/set to use the more efficient add idiom https://bugs.webkit.org/show_bug.cgi?id=75204 Reviewed by Dan Bernstein. * dom/Document.cpp: (WebCore::Document::getCSSCanvasContext): Change local variable name of element to element; it's not the function result, so not good to name it result. (WebCore::Document::getCSSCanvasElement): Use add instead of get/set so we only do one hash table lookup. 2011-12-24 Andreas Kling CSSElementStyleDeclarations should never move between elements. Reviewed by Anders Carlsson. Have the CSSElementStyleDeclaration subclasses take a StyledElement* in the constructor and replace setElement(StyledElement*) by clearElement(). No behavior change, just enforcing the current behavior at compile-time. * css/CSSElementStyleDeclaration.h: (WebCore::CSSElementStyleDeclaration::clearElement): (WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration): * css/CSSInlineStyleDeclaration.h: (WebCore::CSSInlineStyleDeclaration::create): (WebCore::CSSInlineStyleDeclaration::CSSInlineStyleDeclaration): * dom/StyledElement.cpp: (WebCore::StyledElement::createInlineStyleDecl): (WebCore::StyledElement::destroyInlineStyleDecl): * svg/SVGFontFaceElement.cpp: (WebCore::FontFaceStyleDeclaration::FontFaceStyleDeclaration): 2011-12-23 Andreas Kling Decouple CSSMappedAttributeDeclaration from element completely. Reviewed by Darin Adler. Let CSSMappedAttributeDeclaration inherit from CSSMutableDeclaration instead of CSSElementStyleDeclaration. Add methods to CSSMappedAttributeDeclaration for setting properties that also take a StyledElement* and use that mechanism instead of temporarily associating an element with the declaration. This reduces the size of mapped attributes by 4/8 bytes, but more importantly opens a number of ways to simplify style declarations in future patches. * css/CSSMutableStyleDeclaration.h: * dom/CSSMappedAttributeDeclaration.cpp: (WebCore::CSSMappedAttributeDeclaration::setNeedsStyleRecalc): (WebCore::CSSMappedAttributeDeclaration::setMappedImageProperty): (WebCore::CSSMappedAttributeDeclaration::setMappedLengthProperty): (WebCore::CSSMappedAttributeDeclaration::setMappedProperty): (WebCore::CSSMappedAttributeDeclaration::removeMappedProperty): * dom/CSSMappedAttributeDeclaration.h: (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration): Add/move methods to CSSMappedAttributeDeclaration for setting/removing properties that also take a StyledElement*. That element is used for scheduling style recalc and passing the right document to CSSParser. * css/CSSParser.h: * css/CSSParser.cpp: (WebCore::parseColorValue): (WebCore::parseSimpleLengthValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseMappedAttributeValue): Added a parsedMappedAttributeValue() alternative to parseValue() that takes a StyledElement*. * dom/StyledElement.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::setContentEditable): Add (and use) a StyledElement::removeCSSProperty() complement to the addCSS*() functions. * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): (WebCore::StyledElement::removeCSSProperty): (WebCore::StyledElement::addCSSProperty): (WebCore::StyledElement::addCSSImageProperty): (WebCore::StyledElement::addCSSLength): (WebCore::StyledElement::addCSSColor): (WebCore::StyledElement::createMappedDecl): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::additionalAttributeStyleDecls): (WebCore::HTMLTableElement::addSharedCellBordersDecl): (WebCore::HTMLTableElement::addSharedCellPaddingDecl): (WebCore::HTMLTableElement::addSharedGroupDecls): Use the setMapped*Property() functions to plumb the element through. * css/CSSElementStyleDeclaration.h: Update comment about CSSElementStyleDeclaration's subclasses. 2011-12-24 Jarred Nicholls Allow XMLHttpRequest withCredentials to be set prior to a call to open() https://bugs.webkit.org/show_bug.cgi?id=75194 XMLHttpRequest.withCredentials attribute should be modifiable prior to the OPENED state per the W3C spec. See http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-withcredentials-attribute Reviewed by Alexey Proskuryakov. Test: fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setWithCredentials): Prevent setting the value only after the OPENED state. 2011-12-24 Andreas Kling Remove empty inline RenderStyle destructor. Rubber-stamped by Anders "Ordvits" Carlsson. * rendering/style/RenderStyle.h: 2011-12-24 Andreas Kling RenderStyle: Inline the destructor. Reviewed by Kenneth Rohde Christiansen. The (empty) RenderStyle destructor gets a little hot sometimes, reaching up to 0.4% when loading the full HTML5 spec. Inline it to remove the pointless function call. * rendering/style/RenderStyle.cpp: * rendering/style/RenderStyle.h: (WebCore::RenderStyleBitfields::~RenderStyle): 2011-12-23 Noel Gordon JPEG decoders should only save color profile markers if color management is enabled https://bugs.webkit.org/show_bug.cgi?id=75182 Reviewed by Adam Barth. No new tests. Covered by existing tests. fast/images/ycbcr-with-cmyk-color-profile.html fast/images/gray-scale-jpeg-with-color-profile.html fast/images/cmyk-jpeg-with-color-profile.html fast/images/color-jpeg-with-color-profile.html * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageReader::JPEGImageReader): Store color profile (JPEG_APP0 + 2) markers using the iccjpeg helper setup_read_icc_profile() if color management is enabled. 2011-12-23 Alice Boxhall Fix crash when adding paragraph in contenteditable with role=textbox. https://bugs.webkit.org/show_bug.cgi?id=75159 Reviewed by Ryosuke Niwa. Test: accessibility/textbox-role-on-contenteditable-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::childrenChanged): Use rendererIsEditable() rather than isContentEditable() as this method is called during render layouts, and isContentEditable() triggers a layout update, which crashes. 2011-12-23 Noel Gordon [chromium] JPEG image with CMYK ICC color profile renders color-inverted and squashed https://bugs.webkit.org/show_bug.cgi?id=74400 Reviewed by Adam Barth. Use color profiles for GRAYSCALE, RGB, YCbCr, CMYK and YCCK jpeg images only if their embedded color profile is from an RGB color space input device. Test: fast/images/ycbcr-with-cmyk-color-profile.html - YCbCr image, with CMYK output device color profile. Existing Tests: fast/images/gray-scale-jpeg-with-color-profile.html - YCbCr image, with GRAY input device color profile. fast/images/cmyk-jpeg-with-color-profile.html - YCCK image, with CMYK output device color profile. fast/images/color-jpeg-with-color-profile.html - YCbCr image, with RGB input device color profile. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::rgbColorProfile): Return true if the profile has an RGB color space. (WebCore::inputDeviceColorProfile): Return true if the profile is from an input device. (WebCore::readColorProfile): Ignore the embedded color profile unless if it is from an RGB color space input device. (WebCore::JPEGImageReader::decode): 2011-12-23 Dan Bernstein Print dlerror() when dyld functions fail unexpectedly https://bugs.webkit.org/show_bug.cgi?id=75185 Reviewed by Sam Weinig. * platform/mac/SoftLinking.h: 2011-12-23 Sam Weinig Start extracting platform specific bits out of PlatformEvents https://bugs.webkit.org/show_bug.cgi?id=75063 Reviewed by Anders Carlsson. * WebCore.exp.in: Update exports. * WebCore.xcodeproj/project.pbxproj: Add factory, remove implementation files for mac PlatformWheelEvent and PlatformMouseEvent. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): (WebCore::EventHandler::keyEvent): (WebCore::EventHandler::currentPlatformMouseEvent): Switch to use the factory. * platform/PlatformEvent.h: (WebCore::PlatformEvent::shiftKey): (WebCore::PlatformEvent::ctrlKey): (WebCore::PlatformEvent::altKey): (WebCore::PlatformEvent::metaKey): (WebCore::PlatformEvent::modifiers): (WebCore::PlatformEvent::PlatformEvent): Switch to storing the modifiers as bits on an unsigned instead of as individual bools. * platform/PlatformGestureEvent.h: Remove unused timestamp member. * platform/PlatformKeyboardEvent.h: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): (WebCore::PlatformKeyboardEvent::keyIdentifier): (WebCore::PlatformKeyboardEvent::macCharCode): (WebCore::PlatformKeyboardEvent::isSystemKey): Give this class a more consistent interface across platforms, and remove constructor that took an NSEvent. * platform/PlatformMouseEvent.h: Remove constructor that took an NSEvent (and an unused constructor that took many arguments) as well as some free functions for point conversion. * platform/PlatformWheelEvent.h: Remove constructor that took an NSEvent and an unnecessary override of the timestamp() function. * platform/mac/KeyEventMac.mm: Removed constructor and moved helpers to PlatformEventFactory. * platform/mac/PlatformEventFactory.h: Added. * platform/mac/PlatformEventFactory.mm: Added. (WebCore::globalPoint): (WebCore::globalPointForEvent): (WebCore::pointForEvent): (WebCore::mouseButtonForEvent): (WebCore::mouseEventTypeForEvent): (WebCore::clickCountForEvent): (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): (WebCore::gestureEventTypeForEvent): (WebCore::textFromEvent): (WebCore::unmodifiedTextFromEvent): (WebCore::keyIdentifierForKeyEvent): (WebCore::isKeypadEvent): (WebCore::windowsKeyCodeForKeyEvent): (WebCore::isKeyUpEvent): (WebCore::modifiersForEvent): (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): (WebCore::PlatformEventFactory::createPlatformMouseEvent): (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): (WebCore::PlatformEventFactory::createPlatformWheelEvent): (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): (WebCore::PlatformEventFactory::createPlatformKeyboardEvent): (WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder): (WebCore::PlatformEventFactory::createPlatformGestureEvent): Consolidate platform event creation logic and add factory functions. * platform/mac/PlatformMouseEventMac.mm: Removed. * platform/mac/WheelEventMac.mm: Removed. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: Expose wkGetNSEventKeyChar in WebCore. * platform/gtk/PlatformKeyboardEventGtk.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/gtk/PlatformMouseEventGtk.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/gtk/PlatformWheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/qt/PlatformMouseEventQt.cpp: (WebCore::mouseEventModifiersFromQtKeyboardModifiers): (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/qt/PlatformTouchEventQt.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/win/KeyEventWin.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/win/WheelEventWin.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): Update for new variables/names. 2011-12-22 Andreas Kling CSSParser: Avoid creating dummy declaration in parseColor() slow path. Reviewed by Darin Adler. We only needed the dummy declaration to trigger the instantiation of a CSSValuePool. Added an ensureCSSValuePool() method and have parseColor() call that instead. Also renamed the fast-path parseColor() to fastParseColor() and reordered the arguments for consistency with the slow-path parseColor(). * css/CSSParser.cpp: (WebCore::parseColorValue): (WebCore::CSSParser::parseColor): (WebCore::CSSParser::ensureCSSValuePool): (WebCore::CSSParser::fastParseColor): (WebCore::CSSParser::parseColorFromValue): * css/CSSParser.h: 2011-12-21 Andreas Kling Automate elements' registration as document namedItem/extraNamedItem. Reviewed by Antti Koivisto. Remove caching of the "id" and "name" attributes on applet, embed, form, image and object elements. We were caching them to keep the document's map of named and "extra named" (named by id) item counts in sync. Instead, add a hook to Element::willModifyAttribute() that detects when the attributes are being changed and handle the registration/unregistration automatically if the element returns true for shouldRegisterAsNamedItem() or shouldRegisterAsExtraNamedItem() respectively. This shrinks the elements by two AtomicStrings (8 or 16 bytes) each. IFrame elements retain the old mechanism for now, as there are some subtle differences to how that's handled. * dom/Node.h: (WebCore::Node::hasName): (WebCore::Node::setHasName): Cache whether we have a "name" attribute or not (1 bit on Node.) This is done in order to minimize the overhead added to Element's insertedIntoDocument() and removeFromDocument(). * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): Update the Node's has-name flag as appropriate. * dom/Element.cpp: (WebCore::Element::updateNamedItemRegistration): (WebCore::Element::updateExtraNamedItemRegistration): Added. Called when the "name" and "id" attributes are changed. Updates the document's named item maps accordingly. (WebCore::Element::insertedIntoDocument): (WebCore::Element::removedFromDocument): Make sure updateName() is called in addition to updateId() when applicable. * dom/Element.h: (WebCore::Element::shouldRegisterAsNamedItem): (WebCore::Element::shouldRegisterAsExtraNamedItem): Added. If an element returns true for these, it will be automatically registered with the document when the name/id attribute changes. (WebCore::Element::updateId): (WebCore::Element::updateName): Register/unregister from the document's named item maps as appropriate. (WebCore::Element::willModifyAttribute): Add updateName() hook in addition to the existing updateId() hook. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setAttributes): Make sure updateName() is called when we're cloning the attributes from another element. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): * html/HTMLAppletElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): (WebCore::HTMLEmbedElement::insertedIntoDocument): * html/HTMLEmbedElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedIntoDocument): (WebCore::HTMLFormElement::removedFromDocument): (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): (WebCore::HTMLImageElement::insertedIntoDocument): * html/HTMLImageElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): (WebCore::HTMLObjectElement::insertedIntoDocument): (WebCore::HTMLObjectElement::removedFromDocument): * html/HTMLObjectElement.h: * html/HTMLPlugInElement.h: Remove duplicated code that is now handled by Element. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateDocNamedItem): (WebCore::HTMLObjectElement::formControlName): Use fastGetAttribute() since we no longer cache the name. 2011-12-23 Anders Carlsson Add two (currently unused) new member functions to ScrollElasticityControllerClient https://bugs.webkit.org/show_bug.cgi?id=75179 Reviewed by Dan Bernstein. This is so we'll be able to move more code to ScrollElasticityController. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::pinnedInDirection): (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints): * platform/mac/ScrollElasticityController.h: 2011-12-23 Simon Fraser Blur filter doesn't invalidate enough https://bugs.webkit.org/show_bug.cgi?id=74891 Reviewed by Darin Adler. Take the effects of filters into account for repainting; we need to inflate the repaint rect by the outsets provided by the filter. Test: css3/filters/filter-repaint.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeRectForRepaint): * rendering/RenderInline.cpp: (WebCore::RenderInline::computeRectForRepaint): 2011-12-23 Simon Fraser Filters should apply to inline elements https://bugs.webkit.org/show_bug.cgi?id=75152 Reviewed by Darin Adler. Filters need to cause creation of RenderLayers for inlines, just like opacity and masks do. Test: css3/filters/filtered-inline.html * rendering/RenderInline.h: (WebCore::RenderInline::requiresLayer): * rendering/RenderTableRow.h: Remove an obviously incorrect comment. 2011-12-23 Jarred Nicholls Synchronous XHR in window context should not support new XHR responseTypes for HTTP(S) requests https://bugs.webkit.org/show_bug.cgi?id=72154 Per the latest W3C editor draft: http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html This is a spec-mandated attempt to thwart and otherwise discourage the use of synchronous XHR