2012-04-10 Patrick Gansterer Build fix for WinCE after r113730. * platform/FractionalLayoutUnit.h: (WebCore::FractionalLayoutUnit::isInBounds): 2012-04-10 Greg Billock Add transfer map argument to Intent constructor http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html This adds the ability to pass transferables (i.e. MessagePorts) through web intents, and puts the calling convention in line with the Web Messaging spec: http://dev.w3.org/html5/postmsg/ Implementation in chromium API follows the port-passing method of PlatformMessagePortChannel. https://bugs.webkit.org/show_bug.cgi?id=80200 Reviewed by Adam Barth. * Modules/intents/Intent.cpp: (WebCore::Intent::create): * Modules/intents/Intent.idl: * WebCore.gypi: * bindings/v8/custom/V8IntentCustom.cpp: Added. (WebCore): (WebCore::V8Intent::constructorCallback): 2012-04-10 Patrick Gansterer Cleanup wtf/Platform.h and config.h files https://bugs.webkit.org/show_bug.cgi?id=83431 Reviewed by Eric Seidel. The ENABLE() and USE() macros take care about the case when the flag isn't defined. So there is no need to define anything with 0. Also move duplicated code from the config.h files to Platform.h and merge a few preprocessor commands to make the file more readable. * config.h: 2012-04-10 Adam Barth Limit -apple- and -khtml- to ENABLE(DASHBOARD_SUPPORT) https://bugs.webkit.org/show_bug.cgi?id=83256 Reviewed by Eric Seidel. As recommended by David Hyatt in , we should phase out support for -khtml- and -apple- vendor prefixes in CSS (in favor of -webkit-). As noted in , Dave's proposal is a bit too agressive. These prefixes appear to be needed for a number of dashboard widgets. For that reason, this patch limits the prefixes to ENABLE(LEGACY_CSS_VENDOR_PREFIXES). This patch enables ENABLE(LEGACY_CSS_VENDOR_PREFIXES) on apple-mac and apple-win, which will let us learn whether removing these prefixes causes a compatibility problem on the broader web. * Configurations/FeatureDefines.xcconfig: * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::getCSSPropertyNamePrefix): (WebCore::cssPropertyIDForJSCSSPropertyName): * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::cssPropertyInfo): * css/CSSParser.cpp: (WebCore::cssPropertyID): 2012-04-10 Levi Weintraub Clean up multiple RenderedPosition::absoluteRect definitions and correct LayoutUnit usage https://bugs.webkit.org/show_bug.cgi?id=83604 Reviewed by Julien Chaffraix. Removing unnecessary definitions of absoluteRect and replacing them with a single public version that's more explicit about its contract. Also correcting a LayoutUnit misuse, as rects in absolute coordinates should be returned using integers, not LayoutUnits. See https://trac.webkit.org/wiki/LayoutUnit for details. No new tests. No change in behavior. * editing/Editor.cpp: (WebCore::Editor::firstRectForRange): * editing/RenderedPosition.cpp: (WebCore::RenderedPosition::absoluteRect): Pixel snapping the local rect before converting to absolute coordinates. * editing/RenderedPosition.h: (RenderedPosition): 2012-04-10 Yael Aharon Initial support for fixed position elements in Qt WebKit2 https://bugs.webkit.org/show_bug.cgi?id=81786 Reviewed by Noam Rosenthal. When the setting acceleratedCompositingForFixedPositionEnabled is true, we update the position of fixed layers, and send updates to the UI process as we scroll. Before painting, TextureMapperLayer receives a delta of the scroll positions between the UI and the web processes, and adjusts its transform position accordingly. * page/FrameView.cpp: (WebCore::FrameView::setFixedVisibleContentRect): * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::setScrollPositionDelta): (WebCore): * platform/graphics/texmap/TextureMapperLayer.h: (TextureMapperLayer): 2012-04-10 Peter Rybin Web Inspector: CodeGeneratorInspector.py: do not expose raw methods from generated types https://bugs.webkit.org/show_bug.cgi?id=83390 Reviewed by Yury Semikhatsky. Intermediate classes InspectorObjectBase and InspectorArrayBase are created. They have all raw methos protected. InspectorObject and InspectorArray now inherit the corresponding base classes with exposing all their protected methods. "Open types" are left inheriting from InspectorObject, plus field name constants are generated for an easy random access to all properties. All the client code is fixed to use type-safe API rather than raw access methods in function parameter and return types and bodies. * inspector/CodeGeneratorInspector.py: (RawTypes.Object): (RawTypes.Object.get_setter_name): (RawTypes.Array): (RawTypes.Array.get_setter_name): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder): (Array): (Generator): (Generator.resolve_type_and_generate_ad_hoc.InterfaceGenerateContext): (Generator.process_types.GenerateContext): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::querySelectorAll): (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::buildObjectForEventListener): * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::didPause): * inspector/InspectorPageAgent.cpp: (WebCore::buildObjectForSearchResult): (WebCore::InspectorPageAgent::searchInResources): (WebCore::InspectorPageAgent::buildObjectForFrameTree): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveResponse): * inspector/InspectorStyleSheet.cpp: (WebCore::fillMediaListChain): (WebCore::InspectorStyle::styleWithProperties): * inspector/InspectorValues.cpp: (WebCore::InspectorObjectBase::~InspectorObjectBase): (WebCore::InspectorObjectBase::asObject): (WebCore::InspectorObjectBase::openAccessors): (WebCore): (WebCore::InspectorObjectBase::getBoolean): (WebCore::InspectorObjectBase::getString): (WebCore::InspectorObjectBase::getObject): (WebCore::InspectorObjectBase::getArray): (WebCore::InspectorObjectBase::get): (WebCore::InspectorObjectBase::remove): (WebCore::InspectorObjectBase::writeJSON): (WebCore::InspectorObjectBase::InspectorObjectBase): (WebCore::InspectorArrayBase::~InspectorArrayBase): (WebCore::InspectorArrayBase::asArray): (WebCore::InspectorArrayBase::writeJSON): (WebCore::InspectorArrayBase::InspectorArrayBase): (WebCore::InspectorArrayBase::get): * inspector/InspectorValues.h: (InspectorObjectBase): (InspectorObject): (WebCore::InspectorObject::create): (WebCore): (InspectorArrayBase): (WebCore::InspectorArrayBase::length): (InspectorArray): (WebCore::InspectorArray::create): (WebCore::InspectorObjectBase::find): (WebCore::InspectorObjectBase::setBoolean): (WebCore::InspectorObjectBase::setNumber): (WebCore::InspectorObjectBase::setString): (WebCore::InspectorObjectBase::setValue): (WebCore::InspectorObjectBase::setObject): (WebCore::InspectorObjectBase::setArray): (WebCore::InspectorArrayBase::pushBoolean): (WebCore::InspectorArrayBase::pushInt): (WebCore::InspectorArrayBase::pushNumber): (WebCore::InspectorArrayBase::pushString): (WebCore::InspectorArrayBase::pushValue): (WebCore::InspectorArrayBase::pushObject): (WebCore::InspectorArrayBase::pushArray): * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createGenericRecord): 2012-04-10 Philip Rogers Remove unnecessary calls to RenderSVGShape::createShape() https://bugs.webkit.org/show_bug.cgi?id=83598 Reviewed by Rob Buis. RenderSVGShape::strokeContains contains calls to fall back to path stroke hit detection in several cases (dashed strokes, for example). One of these cases, a check for isStyled, is not needed and is always true for Ellipses, Circles, and Rects (all styled elements). This change removes the check for isStyled. No new tests as this only affects performance, not test results. * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::strokeContains): 2012-04-10 Dan Bernstein CanvasRenderingContext2D does not expose its backing store resolution https://bugs.webkit.org/show_bug.cgi?id=83619 Reviewed by Simon Fraser. Test: fast/canvas/2d.backingStorePixelRatio.html Added a backingStorePixelRatio attribute to CanvasRenderingContext2D, as proposed in . The attribute is prefixed with “webkit” for now. * html/HTMLCanvasElement.h: (WebCore::HTMLCanvasElement::deviceScaleFactor): Added this getter. * html/canvas/CanvasRenderingContext2D.h: (WebCore::CanvasRenderingContext2D::webkitBackingStorePixelRatio): Added. Returns the canvas element’s device scale factor. (CanvasRenderingContext2D): * html/canvas/CanvasRenderingContext2D.idl: Added webkitBackingStorePixelRatio as a read-only attribute. 2012-04-10 Mario Sanchez Prada Segmentation fault in JS drop-down menus in facebook.com https://bugs.webkit.org/show_bug.cgi?id=82896 Reviewed by Chris Fleizach. Make sure changes introduced with r110819 affect to the Mac platform only, since they depend on platform specific behaviour, as not all the platforms treat attachments in the same way. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::updateChildrenIfNecessary): * accessibility/AccessibilityObject.h: (AccessibilityObject): (WebCore::AccessibilityObject::detachFromParent): * accessibility/AccessibilityRenderObject.cpp: (WebCore): (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/mac/AccessibilityObjectMac.mm: (WebCore::AccessibilityObject::detachFromParent): (WebCore): 2012-04-10 Andreas Kling REGRESSION(r113588): 15-30% perf. regression on CSS/CSSPropertySetterGetter. Reviewed by Antti Koivisto. Changed the behavior of getPropertyCSSValueInternal() to actually return the internal value rather than a cloned one. There is an assertion in the CSSValue bindings that will catch anyone trying to expose these values to the web. This avoids constructing "safe" CSSValue objects in the bindings layer, for the cases where we only want to extract the cssText or numeric value. These cloned objects are only needed when exposing fully-fledged CSSValues to the web, which must be tied to a single document. * css/CSSStyleDeclaration.h: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): 2012-04-10 No'am Rosenthal [Qt][WK2] Manage graphics buffers in the web process https://bugs.webkit.org/show_bug.cgi?id=78675 Added WebCore::GraphicsSurface, a wrapper class to a platform-dependant surface that can be accessed efficiently by both the CPU and the GPU. This will allow fast texture uploads for WebKit2, and in the future fast copies for 2D canvas and WebGL. The first implementation is for Mac using IOSurfaces. TextureMapperGL had to be modified to use GL_UNSIGNED_INT_8_8_8_8_REV for textures on Mac, since that's the native pixel format of BGRA IOSurfaces. Though this feature is not written in a Qt-specific way, it's currently only enabled for Qt and is protected by USE(GRAPHICS_SURFACE). Reviewed by Kenneth Rohde Christiansen. Covered by existing API tests. * Target.pri: * WebCore.pri: * platform/graphics/surfaces/GraphicsSurface.cpp: Added. * platform/graphics/surfaces/GraphicsSurface.h: Added. * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp: Added. * platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp: Added. (WebCore::GraphicsSurface::didReleaseImage): (WebCore): (WebCore::GraphicsSurface::platformBeginPaint): (WebCore::GraphicsSurface::createReadOnlyImage): * platform/graphics/texmap/TextureMapper.h: (WebCore::BitmapTexture::isOpenGLBacked): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::toBitmapTextureGL): (WebCore): (WebCore::BitmapTextureGL::didReset): (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/TextureMapperGL.h: (WebCore::BitmapTextureGL::isOpenGLBacked): (WebCore): 2012-04-10 Alexei Filippov Web Inspector: split nodes and edges array in heap profiler serialization. https://bugs.webkit.org/show_bug.cgi?id=83465 Frontend is now able to read format when nodes and edges arrive in two separate arrays. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotLoader.prototype._parseIntArray): (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk): (WebInspector.HeapSnapshot): (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects): 2012-04-10 Dave Tharp CSS box-shadow default color should be something other than transparent https://bugs.webkit.org/show_bug.cgi?id=58511 Reviewed by Simon Fraser. If box-shadow or text-shadow color is not specified, color defaults to the value specified in the 'color' property of the element (as specified in W3C spec). Test: fast/text/text-shadow-no-default-color.html. Also existing tests ietestcenter/css3/box-shadow-002 and ietestcenter/css3/box-shadow-003 * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-04-10 Chris Rogers AudioParam must support connections from audio-rate signals https://bugs.webkit.org/show_bug.cgi?id=83524 Reviewed by Eric Carlson. In the Web Audio API, it's possible to connect one AudioNode to another AudioNode. Similary we should allow an AudioNode to connect to an AudioParam, thus controlling a parameter with an audio-rate signal. This is important in many audio processing applications. Test: webaudio/audioparam-connect-audioratesignal.html Simple method name change of AudioParam::hasTimelineValues() to AudioParam::hasSampleAccurateValues(). * Modules/webaudio/AudioGainNode.cpp: (WebCore::AudioGainNode::process): * Modules/webaudio/AudioNode.cpp: (WebCore::AudioNode::connect): Add connect() method from AudioNode -> AudioParam. (WebCore): (WebCore::AudioNode::disconnect): (WebCore::AudioNode::finishDeref): Use AudioNodeOutput::disconnectAll() instead of AudioNodeOutput::disconnectAllInputs(). * Modules/webaudio/AudioNode.h: Add connect() method from AudioNode -> AudioParam. (WebCore): (AudioNode): * Modules/webaudio/AudioNode.idl: Add connect() method from AudioNode -> AudioParam. Implement support for an AudioNodeOutput to fanout to multiple AudioParams. * Modules/webaudio/AudioNodeOutput.cpp: (WebCore::AudioNodeOutput::AudioNodeOutput): (WebCore::AudioNodeOutput::updateRenderingState): Update rendering state related to AudioParams. (WebCore::AudioNodeOutput::pull): pull() must now take into account fanout to AudioParams for in-place processing. (WebCore::AudioNodeOutput::fanOutCount): (WebCore): (WebCore::AudioNodeOutput::paramFanOutCount): New method keeping track of number of connections to AudioParams. (WebCore::AudioNodeOutput::renderingParamFanOutCount): New method keeping track of number of connections to AudioParams for rendering. (WebCore::AudioNodeOutput::addParam): Add a connection to an AudioParam. (WebCore::AudioNodeOutput::removeParam): Remove a connection to an AudioParam. (WebCore::AudioNodeOutput::disconnectAllParams): Remove all connections to AudioParams. (WebCore::AudioNodeOutput::disconnectAll): New method to disconnect all AudioNodeInputs and AudioParams. * Modules/webaudio/AudioNodeOutput.h: (AudioNodeOutput): Allow an AudioParam to accept a connection from an AudioNodeOutput, thus being controlled by an audio-rate signal. * Modules/webaudio/AudioParam.cpp: (WebCore::AudioParam::calculateSampleAccurateValues): Calculates sample-accurate values from timeline or an AudioNode. (WebCore): (WebCore::AudioParam::calculateAudioRateSignalValues): Calculates sample-accurate values from an AudioNode. (WebCore::AudioParam::calculateTimelineValues): Calculates sample-accurate values scheduled on the timeline. (WebCore::AudioParam::connect): Connect from an AudioNodeOutput for control from an audio-rate signal. (WebCore::AudioParam::disconnect): Disconnect from an AudioNodeOutput. * Modules/webaudio/AudioParam.h: (WebCore): (WebCore::AudioParam::AudioParam): (WebCore::AudioParam::hasSampleAccurateValues): Change name from hasTimelineValues() and return true either if we have timeline values or if we've been connected from an AudioNode. (AudioParam): Simple method name change of AudioParam::hasTimelineValues() to AudioParam::hasSampleAccurateValues(). * Modules/webaudio/Oscillator.cpp: (WebCore::Oscillator::calculateSampleAccuratePhaseIncrements): (WebCore::Oscillator::process): 2012-04-10 Patrick Gansterer [CMake] Enable USE_FOLDERS property https://bugs.webkit.org/show_bug.cgi?id=83571 Reviewed by Daniel Bates. Setting the FOLDER property on targets gives more structure to the generated Visual Studio solutions. This does not affect other CMake generators. * CMakeLists.txt: 2012-04-10 Dominik Röttsches [CMake] CMake SVG Code Generation fails to generate code for extra defines https://bugs.webkit.org/show_bug.cgi?id=83562 Reviewed by Rob Buis. Fixing CMakeLists.txt to generate correct extra defines for SVG code generator. * CMakeLists.txt: 2012-04-10 Abhishek Arya Crash due to captions list not updated after section recalc. https://bugs.webkit.org/show_bug.cgi?id=83552 Reviewed by Julien Chaffraix. Test: fast/table/table-caption-not-removed-crash.html * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): no need to set the need for section recalc. It was needed in old code when we had more than one caption and we need to call section recalc to destroy the other captions. (WebCore::RenderTable::recalcSections): need to rebuild captions list. This is how the old code worked before r100177. Basically, children can moved without calling RenderTable::removeChild, so we should depend on recalcSections to update our captions list. Also, fix a style nit of aligning case labels with the switch statement. 2012-04-10 Anders Carlsson Unreviewed, rolling out r113611. http://trac.webkit.org/changeset/113611 https://bugs.webkit.org/show_bug.cgi?id=71541 Broke fast/forms/basic-textareas.html * rendering/RenderBox.h: (RenderBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hasHorizontalOverflow): (WebCore::RenderLayer::hasVerticalOverflow): 2012-04-10 Sheriff Bot Unreviewed, rolling out r113734. http://trac.webkit.org/changeset/113734 https://bugs.webkit.org/show_bug.cgi?id=83606 causing a bunch of unrelated test failures (Requested by simonjam on #webkit). * Modules/battery/BatteryController.cpp: * Modules/battery/BatteryController.h: (BatteryController): * Modules/battery/BatteryManager.cpp: (WebCore::BatteryManager::charging): (WebCore::BatteryManager::chargingTime): (WebCore::BatteryManager::dischargingTime): (WebCore::BatteryManager::level): * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2012-04-10 Adam Klein Add setJSWrapperForActiveDOMNode and use it for Nodes that are also ActiveDOMObjects https://bugs.webkit.org/show_bug.cgi?id=83528 Reviewed by Kentaro Hara. Instead of using a run-time call to isActiveNode to determine which map to put a Node wrapper in, generate the proper call in the CodeGenerator. This was originally part of r112318, which got rolled out due to OOM concerns. I'm splitting it into smaller pieces so that each can be landed and watched for issues seperately. No new tests, no change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorCallback): Use new GetDomMapName function to figure out which setJSWrapper to call. (GenerateNamedConstructorCallback): ditto. (GetDomMapFunction): Delegate to GetDomMapName for logic. (GetDomMapName): New helper factored out of GetDomMapFunction. * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Assert !isActiveNode instead of branching on it. (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): New method split ouf of the above. Assert isActiveNode instead of branching on it. * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): 2012-04-10 Luke Macpherson Pass PropertyHandler by reference in CSSStyleApplyProperty.h. https://bugs.webkit.org/show_bug.cgi?id=83551 Reviewed by Kentaro Hara. No new tests / cleanup only. * css/CSSStyleApplyProperty.h: (WebCore::CSSStyleApplyProperty::setPropertyHandler): 2012-04-10 Luke Macpherson Pass FontDescription as const reference instead of by value in CSSStyleSelector.h. https://bugs.webkit.org/show_bug.cgi?id=83548 Reviewed by Kentaro Hara. FontDescription is relatively large, so pass-by-reference is preferred. No new tests / code cleanup only. * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::fontDescription): (WebCore::CSSStyleSelector::parentFontDescription): (WebCore::CSSStyleSelector::setFontDescription): 2012-04-10 Adam Klein Add TestNode.idl to run-binding-tests https://bugs.webkit.org/show_bug.cgi?id=83599 Reviewed by Adam Barth. TestNode.idl is a minimized version of Node.idl with enough attributes to exercise CodeGenerator.pm's handling of Node subtypes. * bindings/scripts/test/CPP/WebDOMTestNode.cpp: Added. * bindings/scripts/test/CPP/WebDOMTestNode.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: Added. * bindings/scripts/test/GObject/WebKitDOMTestNode.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestNodePrivate.h: Added. * bindings/scripts/test/JS/JSTestNode.cpp: Added. * bindings/scripts/test/JS/JSTestNode.h: Added. * bindings/scripts/test/ObjC/DOMTestNode.h: Added. * bindings/scripts/test/ObjC/DOMTestNode.mm: Added. * bindings/scripts/test/ObjC/DOMTestNodeInternal.h: Added. * bindings/scripts/test/TestNode.idl: Added. * bindings/scripts/test/V8/V8TestNode.cpp: Added. * bindings/scripts/test/V8/V8TestNode.h: Added. 2012-04-10 David Barton msqrt's implied mrow should do operator stretching https://bugs.webkit.org/show_bug.cgi?id=82353 Reviewed by Julien Chaffraix. An with more than one child is supposed to surround them with an implied . This patch does this, and thus includes vertical operator stretching. We also fix some problems with the old RenderMathMLSquareRoot.cpp: possibly shared RenderStyles were being modified, and layout() was using heights of children without checking whether they needed layout themselves first. To leave room for the radical sign, we use intrinsic padding. This is simpler and more efficient than using anonymous RenderStyles. Added tests to mo-stretch.html and style.xhtml. Regression tests are in roots.xhtml. * css/mathml.css: (msqrt): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::RenderMathMLBlock): (WebCore::RenderMathMLBlock::paddingTop): (WebCore::RenderMathMLBlock::paddingBottom): (WebCore::RenderMathMLBlock::paddingLeft): (WebCore::RenderMathMLBlock::paddingRight): (WebCore::RenderMathMLBlock::paddingBefore): (WebCore::RenderMathMLBlock::paddingAfter): (WebCore::RenderMathMLBlock::paddingStart): (WebCore::RenderMathMLBlock::paddingEnd): * rendering/mathml/RenderMathMLBlock.h: (RenderMathMLBlock): * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::RenderMathMLRow): (WebCore::RenderMathMLRow::createAnonymousWithParentRenderer): * rendering/mathml/RenderMathMLRow.h: (RenderMathMLRow): * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore): (WebCore::RenderMathMLSquareRoot::addChild): (WebCore::RenderMathMLSquareRoot::computePreferredLogicalWidths): (WebCore::RenderMathMLSquareRoot::computeLogicalHeight): (WebCore::RenderMathMLSquareRoot::layout): (WebCore::RenderMathMLSquareRoot::paint): * rendering/mathml/RenderMathMLSquareRoot.h: (RenderMathMLSquareRoot): 2012-04-10 Luke Macpherson Don't allow fallthrough for CSSPropertyBaselineShift in CSSComputedStyleDeclaration::getSVGPropertyCSSValue(). https://bugs.webkit.org/show_bug.cgi?id=83536 Reviewed by Daniel Bates. Add a return statement to the case CSSPropertyBaselineShift so that we don't fall through to the next case statement. No new tests / code cleanup from coverity static analysis. * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): 2012-04-10 Alejandro G. Castro [GTK] Build fix TextureMapper compilation and solve warning. Reviewed by Martin Robinson. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/TextureMapperShaderManager.h: (WebCore::TextureMapperShaderManager::getShaderProgram): 2012-04-10 Noel Gordon [GTK] Separate image encoding from dataURL construction https://bugs.webkit.org/show_bug.cgi?id=83152 Reviewed by Martin Robinson. Remove the implicit assumption that a dataURL is the only desired output format of the image encoding phase. No new tests, refactoring only, covered by existing canvas tests. * platform/graphics/gtk/ImageBufferGtk.cpp: (WebCore::encodeImage): Output the encoded image to the provided GOwnPtr& buffer. Update GTK document reference to a valid URL. Round the quality argument to an int like the toDataURL() implementations of other ports. Ditch the success variable; instead test the GError* error return to indicate success. (WebCore): (WebCore::ImageBuffer::toDataURL): Format the dataURL encoding of the mimeType encoded image data buffer herein. 2012-04-09 James Robinson [chromium] Defer texture id allocation for copies until the actual copy executes https://bugs.webkit.org/show_bug.cgi?id=83514 Reviewed by Adrienne Walker. This allows for queuing a texture copy operation into a ManagedTexture whose texture ID has not yet been allocated. The ManagedTexture* serves as a promise that an ID will be available when the copy is executed. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doCommit): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::CCTextureUpdater): (WebCore::CCTextureUpdater::appendManagedCopy): (WebCore): (WebCore::CCTextureUpdater::hasMoreUpdates): (WebCore::CCTextureUpdater::update): (WebCore::CCTextureUpdater::clear): * platform/graphics/chromium/cc/CCTextureUpdater.h: (CCTextureUpdater): (ManagedCopyEntry): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread): (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources): 2012-04-10 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=83595 Overlapping text in table cell across column break If a cell's height changes such that it is taller than the overall row height because of pagination, then grow the entire row height to enclose the cell instead of shrinking the cell. Reviewed by Dan Bernstein. Added fast/multicol/cell-shrinkback.html * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): 2012-04-10 Luke Macpherson Remove unnecessary null check in void SimplifyMarkupCommand::doApply(). https://bugs.webkit.org/show_bug.cgi?id=83535 Reviewed by Kentaro Hara. No new tests / code cleanup only. currentNode cannot be null within the loop body. It is dereferenced before and after the removed line without checking. Additionally I have added an assertion to express this loop invariant. * editing/SimplifyMarkupCommand.cpp: (WebCore::SimplifyMarkupCommand::doApply): 2012-04-10 David Dorwin Add Encrypted Media Extensions methods to HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=82971 Reviewed by Adam Barth. The extensions are behind the ENABLE(ENCRYPTED_MEDIA) feature define. Implementation is based on v0.1 of the draft proposal at http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html. Tests: media/encrypted-media/encrypted-media-not-loaded.html media/encrypted-media/encrypted-media-syntax.html * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): * bindings/generic/RuntimeEnabledFeatures.h: (RuntimeEnabledFeatures): (WebCore::RuntimeEnabledFeatures::webkitEncryptedMediaEnabled): (WebCore::RuntimeEnabledFeatures::setWebkitEncryptedMediaEnabled): * html/HTMLMediaElement.cpp: (WebCore): (WebCore::exceptionCodeForMediaKeyException): (WebCore::HTMLMediaElement::webkitGenerateKeyRequest): (WebCore::HTMLMediaElement::webkitAddKey): (WebCore::HTMLMediaElement::webkitCancelKeyRequest): (WebCore::HTMLMediaElement::setVolume): (WebCore::HTMLMediaElement::togglePlayState): (WebCore::HTMLMediaElement::beginScrubbing): (WebCore::HTMLMediaElement::addTextTrack): (WebCore::HTMLMediaElement::textTracks): (WebCore::HTMLMediaElement::showingTrackWithSameKind): (WebCore::HTMLMediaElement::didAddTrack): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * platform/graphics/MediaPlayer.cpp: (NullMediaPlayerPrivate): (WebCore): (WebCore::MediaPlayer::generateKeyRequest): (WebCore::MediaPlayer::addKey): (WebCore::MediaPlayer::cancelKeyRequest): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (MediaPlayerPrivateInterface): (WebCore::MediaPlayerPrivateInterface::addKey): (WebCore::MediaPlayerPrivateInterface::generateKeyRequest): (WebCore::MediaPlayerPrivateInterface::cancelKeyRequest): 2012-04-10 Sadrul Habib Chowdhury [chromium] Add Battery Status API support. Add Battery Status API support to chromium. https://bugs.webkit.org/show_bug.cgi?id=83284 Reviewed by Adam Barth. This change is covered by tests in batterystatus/. * Modules/battery/BatteryController.cpp: (WebCore::BatteryController::updateBatteryStatus): (WebCore): * Modules/battery/BatteryController.h: (BatteryController): * Modules/battery/BatteryManager.cpp: (WebCore::BatteryManager::charging): (WebCore::BatteryManager::chargingTime): (WebCore::BatteryManager::dischargingTime): (WebCore::BatteryManager::level): * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2012-04-09 Zhenyao Mo getShaderFormatPrecision should return sensible values https://bugs.webkit.org/show_bug.cgi?id=83520 Reviewed by Kenneth Russell. * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Fix getShaderPrecisionFormat values. (WebCore::GraphicsContext3D::getShaderPrecisionFormat): * platform/graphics/qt/GraphicsContext3DQt.cpp: Ditto. (WebCore::GraphicsContext3D::getShaderPrecisionFormat): 2012-04-10 Alexander Pavlov Web Inspector: Add Galaxy Nexus to the list of emulated user agents https://bugs.webkit.org/show_bug.cgi?id=83589 The new record contains the device display metrics and the User Agent string. Reviewed by Pavel Feldman. * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const): 2012-04-10 Emil A Eklund Add missing methods and operators to FractionalLayoutUnit https://bugs.webkit.org/show_bug.cgi?id=82403 Reviewed by Eric Seidel. Add missing methods and operators and from branch version of FractionalLayoutUnit. Also fix overflow assertion and add const keyword to a couple of methods. No new tests. * platform/FractionalLayoutUnit.h: (WebCore::FractionalLayoutUnit::abs): (FractionalLayoutUnit): (WebCore::FractionalLayoutUnit::ceil): (WebCore::FractionalLayoutUnit::round): (WebCore::FractionalLayoutUnit::floor): (WebCore::FractionalLayoutUnit::isInBounds): (WebCore::operator<): (WebCore): (WebCore::operator-): 2011-12-14 Jer Noble WebAudio: propagate a silence hint through the AudioNode graph. https://bugs.webkit.org/show_bug.cgi?id=74553 Reviewed by Chris Rogers. No new tests; optimization of existing code path, so covered by existing tests. Introduce the concept of a "silent" channel: * platform/audio/AudioChannel.h: (WebCore::AudioChannel::AudioChannel): (WebCore::AudioChannel::set): Clear silent bit. (WebCore::AudioChannel::zero): Set silent bit. (WebCore::AudioChannel::clearSilentFlag): Clear silent bit. (WebCore::AudioChannel::isSilent): Accessor. Optimize a few channel operations when the source or destination channels are silent. * platform/audio/AudioChannel.cpp: (WebCore::AudioChannel::scale): No-op on a silent channel. (WebCore::AudioChannel::copyFrom): zero() when source is silent. (WebCore::AudioChannel::copyFromRange): possibly zero() when source is silent. (WebCore::AudioChannel::sumFrom): No-op when source is silent. (WebCore::AudioChannel::maxAbsValue): 0 on a silent channel. Optimize a few bus operations when the source or destination channels are silent. * platform/audio/AudioBus.cpp: (WebCore::AudioBus::processWithGainFromMonoStereo): No-op if source is silent and either the destination bus is silent, or the output is not summed to the destination. (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom): zero() if the source is silent and the lengths of the gain values, source, and destination match. (WebCore::AudioBus::createBySampleRateConverting): Return an empty bus if the source is silent. (WebCore::AudioBus::createByMixingToMono): Ditto; clear the destination's silent bit otherwise. (WebCore::AudioBus::isSilent): Return whether all channels are silent. (WebCore::AudioBus::clearSilentFlag): Clear silent bit of constituent channels. * platform/audio/AudioBus.h: Make sure that classes which generate audio clear their busses' silent bit. * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::process): Ditto. (WebCore::AudioBufferSourceNode::renderFromBuffer): Ditto. (WebCore::AudioBufferSourceNode::propagatesSilence): Propagate silence only when the source node has nothing left to render. * webaudio/AudioBufferSourceNode.h: (WebCore::AudioBufferSourceNode::playbackState): Made const correct. (WebCore::AudioBufferSourceNode::isPlaying): Added simple accessor. (WebCore::AudioBufferSourceNode::hasFinished): Ditto. * webaudio/AudioDestinationNode.h: (WebCore::AudioDestinationNode::currentSampleFrame): Made const correct. (WebCore::AudioDestinationNode::currentTime): Ditto. Audio nodes should not process audio data when the input is silent and the nodes will propagate silences. * webaudio/AudioNode.cpp: (WebCore::AudioNode::processIfNecessary): (WebCore::AudioNode::inputsAreSilent): Convenience function which walk over the node's inputs. (WebCore::AudioNode::silenceOutputs): Ditto. (WebCore::AudioNode::unsilenceOutputs): Ditto. * webaudio/AudioNode.h: (WebCore::AudioNode::propagatesSilence): These Nodes can generate audio when given silent input, so return false from propagatesSilence. * Modules/webaudio/Oscillator.h: (WebCore::Oscillator::propagatesSilence): Added. 2012-04-10 Yi Shen Pressing enter on blank line after bullet deletes entire bulleted line. https://bugs.webkit.org/show_bug.cgi?id=82690 Reviewed by Enrica Casucci. In CompositeEditCommand::breakOutOfEmptyListItem(), it checks the empty list item's renderer's siblings to decide which empty part of the list should be removed. However, if the empty list item's renderer is wrapped by an anonymous block, e.g.
  • hello

  • ^
, the check may fail. So, we use isListItem on the empty list node's siblings instead. No new tests : added new test case in the existing test (break-out-of-empty-list-item.html) * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): 2012-04-10 Alexander Pavlov Web Inspector: Inspect Element - Edit as HTML - scrolling bug https://bugs.webkit.org/show_bug.cgi?id=83563 mousedown in the scrollbar focuses the Elements tree outline container DIV element, so the corresponding mousedown event should be consumed in the AT_TARGET phase. Reviewed by Yury Semikhatsky. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.consume): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML.dispose): (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML): 2012-04-10 Dinu Jacob Remove the unused function WebCore::toIconIndex https://bugs.webkit.org/show_bug.cgi?id=83037 Reviewed by Kentaro Hara. * WebCore.order: * dom/IconURL.cpp: * dom/IconURL.h: (WebCore): 2012-04-10 Pavel Feldman Web Inspector: make error a string on the front-end side, not an object. https://bugs.webkit.org/show_bug.cgi?id=83570 Reviewed by Yury Semikhatsky. We already expect it to be a string in all the code, we never use the error code in it. * inspector/front-end/InspectorBackend.js: (InspectorBackendClass.prototype.dispatch): 2012-04-10 Rob Buis getElementsByTagName unable to find SVG camelCase elements imported into HTML https://bugs.webkit.org/show_bug.cgi?id=46800 Reviewed by Nikolas Zimmermann. Implement getElementsByTagName according to the algorithm in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagname. If the owner document of the element is html, the new class HTMLTagNodeList deals with finding the match(es) based on this algorithm. If the owner document is non HTML, the existing TagNodeList is used. Implement getElementsByTagNameNS according to the algorithm in http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-getelementsbytagnamens. The existing TagNodeList implements this algorithm. Cached results may have less hits after this change. Tag names that are equal when case insensitive but different when case sensitive can't share the result due to above algorithms, i.e. they would match differently in the non html part of the document. Tests: fast/dom/getElementsByTagName-localName-matching.html fast/dom/getElementsByTagName-localName-matching2.xhtml svg/dom/getElementsByTagName-localName-matching.html * dom/Node.cpp: (WebCore::Node::getElementsByTagName): create TagNodeList depending on owner document type. (WebCore::Node::getElementsByTagNameNS): do not lowercase localName for html. * dom/TagNodeList.cpp: (WebCore::HTMLTagNodeList::HTMLTagNodeList): add specialized TagNodeList for html matching rules. (WebCore): (WebCore::HTMLTagNodeList::nodeMatches): * dom/TagNodeList.h: (TagNodeList): (HTMLTagNodeList): (WebCore::HTMLTagNodeList::create): 2012-04-09 Alexander Pavlov Web Inspector: [Device Metrics] Introduce the "Fit window" option https://bugs.webkit.org/show_bug.cgi?id=83280 This change adds the "Fit window" option to the Settings pane of Web Inspector, which lets users resize the FrameView to fit the WebViewImpl size. When the user resizes the browser window in the device metrics override mode with the option enabled, the FrameView follows to match WebViewImpl by at least one dimension. Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/Inspector.json: * inspector/InspectorClient.h: (WebCore::InspectorClient::overrideDeviceMetrics): (WebCore::InspectorClient::autoZoomPageToFitWidth): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::shouldApplyScreenWidthOverrideImpl): (WebCore): (WebCore::InspectorInstrumentation::shouldApplyScreenHeightOverrideImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): (WebCore::InspectorInstrumentation::shouldApplyScreenWidthOverride): (WebCore): (WebCore::InspectorInstrumentation::shouldApplyScreenHeightOverride): * inspector/InspectorPageAgent.cpp: (PageAgentState): (WebCore::InspectorPageAgent::restore): (WebCore::InspectorPageAgent::disable): (WebCore::InspectorPageAgent::setDeviceMetricsOverride): (WebCore::InspectorPageAgent::updateViewMetrics): * inspector/InspectorPageAgent.h: * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype._createDeviceMetricsElement): * inspector/front-end/UserAgentSupport.js: * inspector/front-end/helpScreen.css: (.help-content input[type=checkbox]): * page/DOMWindow.cpp: (WebCore::DOMWindow::innerHeight): (WebCore::DOMWindow::innerWidth): 2012-04-10 Ilya Tikhonovsky Web Inspector: use maxJSObjectId that is provided by back-end. https://bugs.webkit.org/show_bug.cgi?id=82451 Summary view can filter objects in snapshot. It uses maxJSObjectId for this. There was no such field in the profile header at the moment but I've landed a patch in downstream. Reviewed by Yury Semikhatsky. * bindings/js/ScriptHeapSnapshot.h: (WebCore): (WebCore::ScriptHeapSnapshot::maxSnapshotJSObjectId): * bindings/v8/ScriptHeapSnapshot.cpp: (WebCore::ScriptHeapSnapshot::maxSnapshotJSObjectId): (WebCore): * bindings/v8/ScriptHeapSnapshot.h: (WebCore): (ScriptHeapSnapshot): * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::createSnapshotHeader): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotConstructorsDataGrid): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged): (WebInspector.DetailedHeapshotView.prototype._changeFilter): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype.updateStaticData): * inspector/front-end/HeapSnapshotProxy.js: 2012-04-09 Pavel Feldman Web Inspector: annotate front-end for newer closure compiler. https://bugs.webkit.org/show_bug.cgi?id=83478 Reviewed by Yury Semikhatsky. This change mostly adds annotations to bound functions and !!bool expressions. As a result, it makes closure compiler v20120305 happy. * inspector/Inspector.json: * inspector/front-end/BreakpointManager.js: * inspector/front-end/CSSStyleModel.js: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.evalInInspectedWindow.evalCallback): (WebInspector.ConsoleView.prototype.evalInInspectedWindow): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.removeAttribute): (WebInspector.DOMAgent.prototype.pushNodeToFrontend): * inspector/front-end/DebuggerModel.js: * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): * inspector/front-end/ElementsPanel.js: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage): * inspector/front-end/ObjectPropertiesSection.js: * inspector/front-end/RemoteObject.js: * inspector/front-end/Resource.js: (WebInspector.ResourceDomainModelBinding.prototype.canSetContent): * inspector/front-end/ResourceUtils.js: * inspector/front-end/ScopeChainSidebarPane.js: * inspector/front-end/Script.js: (WebInspector.Script.prototype.editSource): * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.prototype.get _worker): * inspector/front-end/WorkerManager.js: 2012-04-09 Pavel Feldman Web Inspector: searching document with no documentElement results in 0x0 access. https://bugs.webkit.org/show_bug.cgi?id=83483 Reviewed by Yury Semikhatsky. Added the null check. Test: inspector/elements/dom-search-crash.html * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::performSearch): 2012-04-10 Patrick Gansterer [CMake] Add missing source files to build system * CMakeLists.txt: 2012-04-10 Kentaro Hara Unreviewed. Fixed AppleWin and Chromium-win build failure. Renamed 'exceptionNameDescription' to per-file variable name to avoid name conflict. * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore::IDBDatabaseException::initializeDescription): * Modules/webdatabase/SQLException.cpp: (WebCore::SQLException::initializeDescription): * dom/EventException.cpp: (WebCore::EventException::initializeDescription): * dom/RangeException.cpp: (WebCore::RangeException::initializeDescription): * fileapi/FileException.cpp: (WebCore::FileException::initializeDescription): * fileapi/OperationNotAllowedException.cpp: (WebCore::OperationNotAllowedException::initializeDescription): * svg/SVGException.cpp: (WebCore::SVGException::initializeDescription): * xml/XPathException.cpp: (WebCore::XPathException::initializeDescription): 2012-04-10 Kentaro Hara Unreviewed. Fixed AppleWin and Chromium-win build failure. Renamed 'exceptions' to 'exceptionNameDescription' to avoid variable name conflict. * Modules/indexeddb/IDBDatabaseException.cpp: (WebCore::IDBDatabaseException::initializeDescription): * Modules/webdatabase/SQLException.cpp: (WebCore::SQLException::initializeDescription): * dom/EventException.cpp: (WebCore::EventException::initializeDescription): * dom/RangeException.cpp: (WebCore::RangeException::initializeDescription): * fileapi/FileException.cpp: (WebCore::FileException::initializeDescription): * fileapi/OperationNotAllowedException.cpp: (WebCore::OperationNotAllowedException::initializeDescription): * svg/SVGException.cpp: (WebCore::SVGException::initializeDescription): * xml/XPathException.cpp: (WebCore::XPathException::initializeDescription): 2012-04-09 Lu Guanqun combine two arrays in XPathException into one https://bugs.webkit.org/show_bug.cgi?id=83442 Reviewed by Kentaro Hara. No new tests required. * xml/XPathException.cpp: (XPathExceptionNameDescription): (WebCore): (WebCore::XPathException::initializeDescription): 2012-04-09 Lu Guanqun combine exceptionNames and exceptionDescriptions in IDBDatabaseException.cpp into one array https://bugs.webkit.org/show_bug.cgi?id=83433 Reviewed by Kentaro Hara. No new tests required. * Modules/indexeddb/IDBDatabaseException.cpp: (IDBDatabaseExceptionNameDescription): (WebCore): (WebCore::IDBDatabaseException::initializeDescription): 2012-04-09 Lu Guanqun combine two arrays in SQLException.cpp into one https://bugs.webkit.org/show_bug.cgi?id=83452 Reviewed by Kentaro Hara. No new tests required. * Modules/webdatabase/SQLException.cpp: (SQLExceptionNameDescription): (WebCore): (WebCore::SQLException::initializeDescription): 2012-04-09 Lu Guanqun combine two arrays in EventException.cpp into one https://bugs.webkit.org/show_bug.cgi?id=83451 Reviewed by Kentaro Hara. No new tests required. * dom/EventException.cpp: (EventExceptionNameDescription): (WebCore): (WebCore::EventException::initializeDescription): 2012-04-09 Lu Guanqun combine two arrays in RangeException.cpp into one https://bugs.webkit.org/show_bug.cgi?id=83450 Reviewed by Kentaro Hara. No new tests required. * dom/RangeException.cpp: (RangeExceptionNameDescription): (WebCore): (WebCore::RangeException::initializeDescription): 2012-04-09 No'am Rosenthal [Texmap] Improve TextureMapperGL readability https://bugs.webkit.org/show_bug.cgi?id=83477 Change the debugging macros for TextureMapperGL, so that the GL_CMD call can include a semicolon. Modify some if blocks to have an early return. Reviewed by Martin Robinson. No new functionality. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGLData::SharedGLData::scissorClip): (WebCore::TextureMapperGLData::SharedGLData::applyCurrentClip): (WebCore::TextureMapperGLData::SharedGLData::~SharedGLData): (WebCore::TextureMapperGLData::initializeStencil): (WebCore::TextureMapperGL::beginPainting): (WebCore::TextureMapperGL::endPainting): (WebCore::TextureMapperGL::drawTexture): (WebCore::BitmapTextureGL::didReset): (WebCore::BitmapTextureGL::updateContents): (WebCore::BitmapTextureGL::initializeStencil): (WebCore::BitmapTextureGL::bind): (WebCore::BitmapTextureGL::~BitmapTextureGL): (WebCore::TextureMapperGL::bindSurface): (WebCore::TextureMapperGL::beginClip): 2012-04-09 Lu Guanqun combine two arrays in FileException.cpp into one https://bugs.webkit.org/show_bug.cgi?id=83449 Reviewed by Kentaro Hara. No new tests required. * fileapi/FileException.cpp: (FileExceptionNameDescription): (WebCore): (WebCore::FileException::initializeDescription): 2012-04-09 Lu Guanqun combine two arrays in OperationNotAllowedException.cpp into one https://bugs.webkit.org/show_bug.cgi?id=83445 Reviewed by Kentaro Hara. No new tests required. * fileapi/OperationNotAllowedException.cpp: (OperationNotAllowedExceptionNameDescription): (WebCore): (WebCore::OperationNotAllowedException::initializeDescription): 2012-04-09 Shinya Kawanaka Assert triggers VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries. https://bugs.webkit.org/show_bug.cgi?id=83118 Reviewed by Hajime Morita. VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries did not work correctly. There was a case that selection crosses shadow boundaries. This patch introduces a class TreeScopeAdjuster, which enables us to adjust Node or Position into a specified tree scope. Test: fast/dom/shadow/selections-in-shadow.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.ext.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/TreeScope.h: (TreeScope): * dom/TreeScopeAdjuster.cpp: Added. (WebCore): (WebCore::TreeScopeAdjuster::TreeScopeAdjuster): (WebCore::TreeScopeAdjuster::ancestorInThisScope): Returns the node itself if it's in the same tree scope. Otherwise, this method checks the shadow ancestor of the node recursively. If no corresponding node is found, 0 will be returned. (WebCore::TreeScopeAdjuster::adjustPositionBefore): (WebCore::TreeScopeAdjuster::adjustPositionAfter): * dom/TreeScopeAdjuster.h: Added. (WebCore): (TreeScopeAdjuster): (WebCore::TreeScopeAdjuster::treeScope): * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingShadowBoundaries): 2012-04-09 Lu Guanqun combine two arrays in SVGException.cpp into one https://bugs.webkit.org/show_bug.cgi?id=83444 Reviewed by Kentaro Hara. No new tests required. * svg/SVGException.cpp: (SVGExceptionNameDescription): (WebCore): (WebCore::SVGException::initializeDescription): 2012-04-09 Lu Guanqun combine two arrays in XMLHttpRequestException.cpp into one https://bugs.webkit.org/show_bug.cgi?id=83443 Reviewed by Kentaro Hara. No new tests requied. * xml/XMLHttpRequestException.cpp: (XMLHttpRequestExceptionNameDescription): (WebCore): (WebCore::XMLHttpRequestException::initializeDescription): 2012-04-09 No'am Rosenthal [WK2] Enable using a single ShareableBitmap for multiple updates https://bugs.webkit.org/show_bug.cgi?id=83424 Modify BitmapTexture::updateContents to include a source offset. This allows us to update a texture from a sub-image. Reviewed by Kenneth Rohde Christiansen. Tested by existing API tests. * platform/graphics/texmap/TextureMapper.h: (BitmapTexture): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::didReset): (WebCore::driverSupportsBGRASwizzling): (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/TextureMapperGL.h: (WebCore::BitmapTextureGL::textureTarget): (BitmapTextureGL): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::updateContents): * platform/graphics/texmap/TextureMapperImageBuffer.h: (BitmapTextureImageBuffer): 2012-04-09 Dana Jansens [chromium] Viewport is not filled when out of texture memory on mac https://bugs.webkit.org/show_bug.cgi?id=83351 Reviewed by Adrienne Walker. Currently we add gutter quads on the NonCompositedContentHost layer, which lies above another visible layer - the rubberband layer on mac. For this reason, on mac, gutter quads were disabled, as well as forcing the NCCH layer to draw, in order to make the rubberband layer appear. We move the logic for adding gutter quads into CCRenderPass, and add gutter quads for all pixels that are visible through the viewport. This allows us to stop special-casing the NCCH layer, and allows us to skip drawing the layer equally with other layers. We remove the backgroundCoversViewport() flag entirely. In order to do this, we fix a bug in the occlusion tracker, that allowed opaque() layers with skipsDraw to occlude, by making the visibleContentOpaqueRegion() method on the layer classes also return the opaque region for non-tiled layers, always use its value in the occlusion tracker. Unit test: CCLayerTreeHostImplTest.viewportCovered * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::pushPropertiesTo): (WebCore::LayerChromium::visibleContentOpaqueRegion): (WebCore): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdateTiles): (WebCore::TiledLayerChromium::visibleContentOpaqueRegion): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::visibleContentOpaqueRegion): (WebCore): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::appendQuads): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::finishCommitOnImplThread): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::setBackgroundColor): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::backgroundColor): (WebCore::CCLayerTreeHostImpl::setBackgroundColor): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::computeOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): * platform/graphics/chromium/cc/CCOcclusionTracker.h: (CCOcclusionTrackerBase): (WebCore::CCOcclusionTrackerBase::computeVisibleRegionInScreen): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsToFillScreen): (WebCore): * platform/graphics/chromium/cc/CCRenderPass.h: (WebCore): (CCRenderPass): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): (WebCore::CCTiledLayerImpl::visibleContentOpaqueRegion): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (WebCore::CCTiledLayerImpl::skipsDraw): (CCTiledLayerImpl): 2012-04-09 Luke Macpherson Don't let CSSPropertyWebkitPerspective dereference primitiveValue without null check. https://bugs.webkit.org/show_bug.cgi?id=83538 Reviewed by Daniel Bates. No new tests / code cleanup only. Coverity pointed out that we potentially dereference primitiveValue here without checking for null. I've added an early out for that case to make sure it can't ever happen. I don't know if it's actually possible to exercise that code path or not - probably the parser prevents it from being hit in practice. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-04-09 Joseph Pecoraro Web Inspector: ASSERT attempting to unbind null contentDocument Avoid calling unbind with a null object. The HTMLFrameOwnerElement's contentDocument can be null. Reviewed by Timothy Hatcher. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::unbind): 2012-04-09 Jason Liu [BlackBerry] Parsed Cookie's m_isMaxAgeSet is not needed. https://bugs.webkit.org/show_bug.cgi?id=83457 Reviewed by Rob Buis. When m_expiry is not -1, it must be set by setExpiry or setMaxAge. setExpiry will return when m_expiry has been set. This ensures Max-Age's precedence. And m_isMaxAgeSet is always false when the cookie is from database. This is not right. So we use m_expiry instead of m_isMaxAgeSet. No new tests. Refactor. * platform/blackberry/ParsedCookie.cpp: (WebCore::ParsedCookie::ParsedCookie): (WebCore::ParsedCookie::setExpiry): (WebCore::ParsedCookie::setMaxAge): * platform/blackberry/ParsedCookie.h: (ParsedCookie): 2012-04-09 Min Qin Fixed ordering of deleting CCInputHandler and CCLayerTreeHostImpl in layerTreeHostClosedOnImplThread https://bugs.webkit.org/show_bug.cgi?id=83488 Reviewed by James Robinson. CCInputHandler(WebCompositorInputHandlerImpl) has a pointer to CCLayerTreeHostImpl. So we should delete CCInputHandler earlier as otherwise that pointer could get misused after LayerTreeHostImpl is deleted. Just fixing a potential NPE error, no behavior change. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread): 2012-04-09 Sheriff Bot Unreviewed, rolling out r113656. http://trac.webkit.org/changeset/113656 https://bugs.webkit.org/show_bug.cgi?id=83542 test is broken on chromium-win (Requested by simonjam on #webkit). * Modules/intents/Intent.cpp: (WebCore::Intent::Intent): * Modules/intents/Intent.h: (Intent): * Modules/intents/Intent.idl: * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: 2012-04-09 Abhishek Arya ASSERTION FAILED: !attached() in Node::attach. https://bugs.webkit.org/show_bug.cgi?id=80726 Reviewed by Adam Barth. While parsing XML document, prevent attaching the leaf text node back to document, if its parent is not attached. Test: fast/dom/text-node-attach-crash.xhtml * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::exitText): 2012-04-09 Dana Jansens [chromium] Replica layers are not drawn, so should not be painted https://bugs.webkit.org/show_bug.cgi?id=83504 Reviewed by James Robinson. We attempt to paint replica layers when we are painting the mask layers in CCLayerTreeHost.cpp. This is useless code, replica layers have drawsContent() == false, and have an empty visibleLayerRect, so the paint functions end up early- outting. But it is a waste of time to try, and confusing to have this attempted in the code at all, since the replica layers are never drawn. They exist only for their transforms. Also the dimensions used for the replica mask are different from the surface mask, which is confusing and unnecessary as well. The mask is applied to the same surface contents as the surface mask would be, so only the surface's contentBounds need to be painted in the replica mask. Covered by existing tests. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::paintMasksForRenderSurface): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2012-04-09 Shinya Kawanaka ShadowRoot should have selection attribute. https://bugs.webkit.org/show_bug.cgi?id=82429 Reviewed by Hajime Morita. This patch makes ShadowRoot have selection attribute. Currently the selection returns the same object as what window.getSelection() returns. We will extend DOMSelection to have TreeScope. It will adjust Node into TreeScope. This will be tracked in Bug 82698. Test: fast/dom/shadow/selection-in-shadow.html * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::selection): (WebCore): * dom/ShadowRoot.h: (WebCore): (ShadowRoot): * dom/ShadowRoot.idl: 2012-04-09 Emil A Eklund Replace numeric_limits::min/max with constants https://bugs.webkit.org/show_bug.cgi?id=83497 Reviewed by Eric Seidel. Replace all uses of numeric_limits::min/max with MIN_LAYOUT_UNIT and MAX_LAYOUT_UNIT respectively in preparation for the switch to subpixel layout. Also rename zeroLayoutUnit to ZERO_LAYOUT_UNIT to be consistent and change it to be a define as to avoid global initializer warnings once we change the definition of LayoutUnit from int to FractionalLayoutUnit. No new tests, no change in functionality. * dom/ElementRareData.h: (WebCore::defaultMinimumSizeForResizing): * editing/FrameSelection.cpp: (WebCore::NoXPosForVerticalArrowNavigation): * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::clampEdgeValue): (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad): * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::computePreferredLogicalWidths): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow): (WebCore::InlineFlowBox::paintFillLayer): (WebCore::InlineFlowBox::paintBoxDecorations): (WebCore::InlineFlowBox::paintMask): (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): * rendering/LayoutTypes.h: (WebCore): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::MarginInfo::MarginInfo): (WebCore::RenderBlock::computeInitialRegionRangeForBlock): (WebCore::RenderBlock::adjustFloatingBlock): (WebCore::RenderBlock::paintColumnRules): (WebCore::RenderBlock::removeFloatingObject): (WebCore::RenderBlock::nextFloatLogicalBottomBelow): (WebCore::RenderBlock::markLinesDirtyInBlockRange): (WebCore::RenderBlock::clearFloats): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::getClearDelta): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): (WebCore::getHeightForLineCount): (WebCore::RenderBlock::borderFitAdjust): (WebCore::RenderBlock::adjustForUnsplittableChild): * rendering/RenderBlock.h: (WebCore::RenderBlock::paginationStrut): (WebCore::RenderBlock::pageLogicalOffset): * rendering/RenderBlockLineLayout.cpp: (WebCore::LineLayoutState::updateRepaintRangeFromBox): (WebCore::RenderBlock::checkFloatsInCleanLine): (WebCore::RenderBlock::addOverflowFromInlineChildren): * rendering/RenderBox.cpp: (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats): (WebCore::RenderBox::positionForPoint): * rendering/RenderBox.h: (WebCore::RenderBox::minYVisualOverflow): (WebCore::RenderBox::minXVisualOverflow): (RenderBox): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::offsetLeft): (WebCore::RenderBoxModelObject::offsetTop): (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): (WebCore::RenderFieldset::paintMask): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): (WebCore::RenderFlexibleBox::lineBreakLength): (WebCore::RenderFlexibleBox::alignChildren): (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::computeLogicalWidth): * rendering/RenderInline.cpp: (WebCore::RenderInline::linesVisualOverflowBoundingBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::updateMargins): * rendering/RenderMarquee.cpp: (WebCore::RenderMarquee::computePosition): * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintAfterLayoutIfNeeded): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computePreferredLogicalWidths): * rendering/RenderTable.cpp: (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth): (WebCore::RenderTable::layout): * rendering/RenderTable.h: (WebCore::RenderTable::bordersPaddingAndSpacingInRowDirection): * rendering/RenderText.cpp: (WebCore::RenderText::linesVisualOverflowBoundingBox): 2012-04-09 Levi Weintraub Clean up LayoutUnit usage in DOMNodeHighlighter https://bugs.webkit.org/show_bug.cgi?id=83507 Reviewed by Eric Seidel. Ensuring DOMNodeHighlighter uses pixel snapping that matches that done in the RenderTree. Changes include: - Reverting drawSubstring to use an IntPoint with pixel snapped values instead of a LayoutPoint. - Reverting borderBox to an IntRect since it's in absolute coordinates. See https://trac.webkit.org/wiki/LayoutUnit. - Frames are still laid out with integers. Cleaning up mainFrameOffset to reflect that. No new tests. No change in behavior. * inspector/DOMNodeHighlighter.cpp: 2012-04-09 Jeff Rogers Add missing IndexedDB files to CMake build https://bugs.webkit.org/show_bug.cgi?id=83495 Reviewed by Rob Buis. * CMakeLists.txt: * UseJSC.cmake: 2012-04-09 Alexey Proskuryakov [Mac] WebProcess dies due to m_process->checkURLReceivedFromWebProcess(url) dropping a file URL https://bugs.webkit.org/show_bug.cgi?id=83506 Reviewed by Darin Adler. Cannot test, because dragging within a single window never initiates a navigation, and dragging across windows is too much for DRT and WTR. * platform/mac/DragDataMac.mm: (WebCore::DragData::asURL): Add the same checks that we had for NSURLPboardType to NSStringPboardType case, preventing dropping of non-HTTP URLs. String types cannot be sanitized when they are modified by JavaScript, and are thus less trusted. String checks should be at least as restrictive as URL ones. 2012-04-09 Greg Billock Add transfer map argument to Intent constructor http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html This adds the ability to pass transferables (i.e. MessagePorts) through web intents, and puts the calling convention in line with the Web Messaging spec: http://dev.w3.org/html5/postmsg/ Implementation in chromium API follows the port-passing method of PlatformMessagePortChannel. https://bugs.webkit.org/show_bug.cgi?id=80200 Reviewed by Adam Barth. * Modules/intents/Intent.cpp: (WebCore::Intent::create): * Modules/intents/Intent.idl: * WebCore.gypi: * bindings/v8/custom/V8IntentCustom.cpp: Added. (WebCore): (WebCore::V8Intent::constructorCallback): 2012-04-09 Dana Jansens [chromium] Cull occluded surface quads https://bugs.webkit.org/show_bug.cgi?id=81227 Reviewed by Adrienne Walker. Cull render surface and replica quads during draw based on occlusion. In order to compute occlusion for the surface or replica, it must not consider occlusion found in the surface's own subtree. To do this, we reorder the calls to the occlusion tracker, and add the surface and replica quads before we "leaveToTargetRenderSurface" which merges occlusion from the surface's subtree up into its parent. Unit test: CCOcclusionTrackerTestReplicaOccluded CCOcclusionTrackerTestSurfaceWithReplicaUnoccluded CCOcclusionTrackerTestSurfaceAndReplicaOccludedDifferently CCOcclusionTrackerTestSurfaceChildOfSurface CCOcclusionTrackerTestSurfaceChildOfClippingSurface And added some sanity checks to other CCOcclusionTracker tests that have render surfaces. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::leaveToTargetRenderSurface): (WebCore::::unoccludedContributingSurfaceContentRect): (WebCore): * platform/graphics/chromium/cc/CCOcclusionTracker.h: (CCOcclusionTrackerBase): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::CCQuadCuller): (WebCore::appendQuadInternal): (WebCore::CCQuadCuller::append): (WebCore): (WebCore::CCQuadCuller::appendSurface): (WebCore::CCQuadCuller::appendReplica): * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): 2012-04-09 Andreas Kling Make CSSValuePool share values globally. Reviewed by Antti Koivisto. Remove the per-Document CSSValuePool and have everyone use a global pool accessed via "CSSValuePool& cssValuePool()". This reduces memory usage by sharing cached CSSValues between all documents, and relaxes heap churn since the common, persistenly cached values are held by CSSValuePool forever. No behavior change thanks to r113588 which introduced a mechanism that makes sure we never expose internal CSSValue objects to bindings, but read-only clones of those values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageSlice): (WebCore::valueForNinePieceImageQuad): (WebCore::valueForNinePieceImageRepeat): (WebCore::valueForNinePieceImage): (WebCore::zoomAdjustedPixelValue): (WebCore::zoomAdjustedNumberValue): (WebCore::zoomAdjustedPixelValueForLength): (WebCore::valueForReflection): (WebCore::getPositionOffsetValue): (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor): (WebCore::getBorderRadiusCornerValues): (WebCore::getBorderRadiusCornerValue): (WebCore::getBorderRadiusShorthandValue): (WebCore::computedTransform): (WebCore::CSSComputedStyleDeclaration::valueForCustomFilterNumberParameter): (WebCore::CSSComputedStyleDeclaration::valueForFilter): (WebCore::valueForGridTrackBreadth): (WebCore::valueForGridTrackList): (WebCore::valueForGridPosition): (WebCore::getDelayValue): (WebCore::getDurationValue): (WebCore::createLineBoxContainValue): (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword): (WebCore::CSSComputedStyleDeclaration::valueForShadow): (WebCore::valueForFamily): (WebCore::renderUnicodeBidiFlagsToCSSValue): (WebCore::renderTextDecorationFlagsToCSSValue): (WebCore::fillRepeatToCSSValue): (WebCore::fillSizeToCSSValue): (WebCore::contentToCSSValue): (WebCore::counterToCSSValue): (WebCore::fontFamilyFromStyle): (WebCore::lineHeightFromStyle): (WebCore::fontSizeFromStyle): (WebCore::fontStyleFromStyle): (WebCore::fontVariantFromStyle): (WebCore::fontWeightFromStyle): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSComputedStyleDeclaration.h: (WebCore): * css/CSSParser.cpp: (WebCore::parseColorValue): (WebCore::parseSimpleLengthValue): (WebCore::parseKeywordValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseColor): (WebCore::CSSParser::setStyleSheet): (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore::CSSParser::createPrimitiveStringValue): (WebCore::CSSParser::parseValidPrimitive): (WebCore::parseBackgroundClip): (WebCore::CSSParser::parseFillShorthand): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::parseShorthand): (WebCore::CSSParser::parsePage): (WebCore::CSSParser::parseSizeParameter): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseAttr): (WebCore::CSSParser::parseBackgroundColor): (WebCore::CSSParser::parseFillImage): (WebCore::CSSParser::parseFillPositionX): (WebCore::CSSParser::parseFillPositionY): (WebCore::CSSParser::parseFillPositionComponent): (WebCore::CSSParser::parseFillPosition): (WebCore::CSSParser::parseFillRepeat): (WebCore::CSSParser::parseFillSize): (WebCore::CSSParser::parseFillProperty): (WebCore::CSSParser::parseAnimationDirection): (WebCore::CSSParser::parseAnimationFillMode): (WebCore::CSSParser::parseAnimationIterationCount): (WebCore::CSSParser::parseAnimationName): (WebCore::CSSParser::parseAnimationPlayState): (WebCore::CSSParser::parseAnimationProperty): (WebCore::CSSParser::parseAnimationTimingFunction): (WebCore::CSSParser::parseGridTrackList): (WebCore::CSSParser::parseDashboardRegions): (WebCore::CSSParser::parseCounterContent): (WebCore::CSSParser::parseClipShape): (WebCore::CSSParser::parseExclusionShape): (WebCore::CSSParser::parseFont): (WebCore::FontFamilyValueBuilder::FontFamilyValueBuilder): (WebCore::FontFamilyValueBuilder::commit): (FontFamilyValueBuilder): (WebCore::CSSParser::parseFontFamily): (WebCore::CSSParser::parseFontVariant): (WebCore::CSSParser::parseFontWeight): (WebCore::ShadowParseContext::commitStyle): (WebCore::CSSParser::parseShadow): (WebCore::CSSParser::parseReflect): (WebCore::CSSParser::parseFlex): (WebCore::BorderImageParseContext::commitBorderImageProperty): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): (WebCore::BorderImageQuadParseContext::commitNumber): (WebCore::BorderImageQuadParseContext::commitBorderImageQuad): (WebCore::CSSParser::parseBorderRadius): (WebCore::CSSParser::parseAspectRatio): (WebCore::CSSParser::parseCounter): (WebCore::parseDeprecatedGradientPoint): (WebCore::parseDeprecatedGradientColorStop): (WebCore::CSSParser::parseDeprecatedGradient): (WebCore::valueFromSideKeyword): (WebCore::parseGradientColorOrKeyword): (WebCore::CSSParser::parseLinearGradient): (WebCore::CSSParser::parseRadialGradient): (WebCore::CSSParser::parseCrossfade): (WebCore::CSSParser::parseImageSet): (WebCore::CSSParser::parseCustomFilter): (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::CSSParser::parseFilter): (WebCore::CSSParser::parseFlowThread): (WebCore::CSSParser::parseRegionThread): (WebCore::CSSParser::parseTextEmphasisStyle): (WebCore::CSSParser::parseFontFeatureSettings): (WebCore::CSSParser::parseFontVariantLigatures): * css/CSSParser.h: (WebCore): (CSSParser): * css/CSSValuePool.cpp: (WebCore::cssValuePool): (WebCore): * css/CSSValuePool.h: (CSSValuePool): (WebCore): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::setProperty): * css/StylePropertySet.h: (StylePropertySet): * dom/Document.cpp: * dom/Document.h: (WebCore): (Document): * dom/StyledElement.cpp: (WebCore::StyledElement::setInlineStyleProperty): (WebCore::StyledElement::addPropertyToAttributeStyle): * html/HTMLElement.cpp: (WebCore::HTMLElement::addHTMLColorToStyle): * html/HTMLFontElement.cpp: (WebCore::HTMLFontElement::collectStyleForAttribute): * html/HTMLHRElement.cpp: (WebCore::HTMLHRElement::collectStyleForAttribute): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::createSharedCellStyle): 2012-04-09 Levi Weintraub Prepare html classes for sub-pixel LayoutUnits https://bugs.webkit.org/show_bug.cgi?id=83491 Reviewed by Eric Seidel. This patch brings the entire HTML folder up to the current state of the subpixellayout branch. Adding an intValue flavor of Length that maps to the current value function was also necessary to get us there. See https://trac.webkit.org/wiki/LayoutUnit and the descriptions below for details. No new tests. No change in behavior. * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::scrollAmount): Fixes a compiler error when length returns a float, as we intend it to do when switching to sub-pixel layout. * html/ImageDocument.cpp: (WebCore::ImageDocumentParser::finish): imageSize is always integral. * platform/Length.h: (WebCore::Length::Length): Added a constructor that takes a FractionalLayoutUnit. (Length): (WebCore::Length::intValue): Currently maps directly to Length::value, but the current logic of value will be migrated here when value is changed to return a float. (WebCore::Length::setValue): Added a variant that takes a FractionalLayoutUnit. 2012-04-09 Andrew Lo [BlackBerry] requestAnimationFrame performance choppy & inconsistent https://bugs.webkit.org/show_bug.cgi?id=83499 Reviewed by Rob Buis. Respect m_scheduled & m_previousFrameDone flags like the Mac port of DisplayRefreshMonitor does. Internal PR: 147826 requestAnimationFrame already covered by tests in LayoutTests/fast/animation. * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: (WebCore::DisplayRefreshMonitor::displayLinkFired): 2012-04-09 Luke Macpherson Make CSSValueID's into an enum instead of a collection of integers. https://bugs.webkit.org/show_bug.cgi?id=83246 Reviewed by Simon Fraser. This patch simply converts the list of integers into an enum. Follow-up patches will then convert existing code that uses integers to use the new enum. No new tests / no functionality changed. * css/makevalues.pl: 2012-04-09 Sheriff Bot Unreviewed, rolling out r113609. http://trac.webkit.org/changeset/113609 https://bugs.webkit.org/show_bug.cgi?id=83522 it broke tests (Requested by dethbakin on #webkit). * css/mediaControlsChromium.css: (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): * css/mediaControlsQuickTime.css: (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): (audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button): * html/shadow/MediaControlElements.cpp: (RenderMediaVolumeSliderContainer): (WebCore): (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer): (WebCore::RenderMediaVolumeSliderContainer::layout): (WebCore::MediaControlVolumeSliderContainerElement::createRenderer): * html/shadow/MediaControlElements.h: (MediaControlVolumeSliderContainerElement): * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::create): * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::create): 2012-04-09 Dana Jansens [chromium] Make culling work with clipped rects https://bugs.webkit.org/show_bug.cgi?id=83494 Reviewed by Adrienne Walker. Use new CCMathUtil transformation methods to deal with rects that clip the camera plane. This fixes three things: 1. A layer completely behind the camera is not visible and should not occlude. 2. A layer that is clipped by the camera is treated like a non-axis-aligned transform, as the result of a mapClippedRect() is a bounding box and may contain pixels not in the original rect. This guards our use of mapRect() when transforming occluded regions. 3. A layer's occlusion must be clipped by its scissor rect. This scissor rect exists in its target space, so occlusion in screen space is only possible if its target also is axis aligned in the screen, such that the layer's scissor rect remains a rect in screen space. Unit tests: CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::CCMathUtil::mapQuad): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::transformSurfaceOpaqueRegion): (WebCore::computeOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): (WebCore::testContentRectOccluded): (WebCore::computeUnoccludedContentRect): 2012-04-09 Sheriff Bot Unreviewed, rolling out r113613. http://trac.webkit.org/changeset/113613 https://bugs.webkit.org/show_bug.cgi?id=83509 crashing most chromium bots (Requested by simonjam on #webkit). * Modules/battery/BatteryController.cpp: * Modules/battery/BatteryController.h: (BatteryController): * Modules/battery/BatteryManager.cpp: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2012-04-06 Zhenyao Mo bindAttribLocation should check webgl reserved prefix https://bugs.webkit.org/show_bug.cgi?id=83409 Reviewed by Kenneth Russell. * html/canvas/WebGLRenderingContext.cpp: Check for invalid parameters for a few functions. (WebCore): (WebCore::WebGLRenderingContext::bindAttribLocation): (WebCore::WebGLRenderingContext::getAttribLocation): (WebCore::WebGLRenderingContext::getUniformLocation): 2012-04-09 Timothy Hatcher Fix the assertion in PageScriptDebugServer::didPause. https://webkit.org/b/82943 Reviewed by Simon Fraser. * bindings/js/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::PageScriptDebugServer): Initialize m_pausedPage to zero so the assert in didPause will not randomly fire the first time. 2012-04-09 Tim Horton FrameData constructor zeroes all fields, causing ImageOrientation to be 0 https://bugs.webkit.org/show_bug.cgi?id=83416 Reviewed by Geoff Garen. Reinstate SimpleClassVectorTraits on FrameData (which were removed by http://trac.webkit.org/changeset/113543) with canInitializeWithMemset disabled, since two of the FrameData fields cannot be initialized to zero. No new tests. * platform/graphics/BitmapImage.h: 2012-04-09 James Robinson [chromium] CCLayerTreeHost / WebLayerTreeView should be single ownership, not RefCounted https://bugs.webkit.org/show_bug.cgi?id=83413 Reviewed by Adrienne Walker. CCLayerTreeHost always has a single logical owner, typically a WebLayerTreeView via either WebViewImpl or the public API. It is currently refcounted for historical reasons but this isn't necessary and adds confusion. CCLayerTreeHost instances and pointers are carefully managed currently to avoid leaks. In particular, while LayerChromium instances hold RefPtrs, whenever we want to destroy a CCLayerTreeHost we proactively clear out these references inside setRootLayer() to break the cycle. Refactor covered by existing unit and layout tests. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::setMaskLayer): (WebCore::LayerChromium::setReplicaLayer): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::layerTreeHost): (LayerChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): 2012-04-09 Joshua Bell Unreviewed, rolling out r113473. http://trac.webkit.org/changeset/113473 https://bugs.webkit.org/show_bug.cgi?id=83074 Change does not handle cursor retention of LevelDB iterators * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::loadObjectStores): * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): (WebCore::IDBIndexBackendImpl::openCursorInternal): (WebCore::IDBIndexBackendImpl::countInternal): (WebCore::IDBIndexBackendImpl::getInternal): (WebCore::IDBIndexBackendImpl::addingKeyAllowed): * Modules/indexeddb/IDBIndexBackendImpl.h: (WebCore::IDBIndexBackendImpl::create): (IDBIndexBackendImpl): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): (WebCore::IDBObjectStoreBackendImpl::getInternal): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::deleteInternal): (WebCore::IDBObjectStoreBackendImpl::clearInternal): (WebCore): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::createIndexInternal): (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal): (WebCore::IDBObjectStoreBackendImpl::openCursorInternal): (WebCore::IDBObjectStoreBackendImpl::countInternal): (WebCore::IDBObjectStoreBackendImpl::loadIndexes): (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (WebCore): (WebCore::IDBObjectStoreBackendImpl::create): (WebCore::IDBObjectStoreBackendImpl::databaseId): (IDBObjectStoreBackendImpl): 2012-04-06 James Robinson [chromium] Texture copies should happen after incremental updates to preserve commit atomicity https://bugs.webkit.org/show_bug.cgi?id=83392 Reviewed by Adrienne Walker. This enqueues texture copy operations in the CCTextureUpdater's list instead of evaluating them immediately so if the update is spread over multiple frames we can properly defer the texture copy until the end. Otherwise, the texture copy for WebGL / Canvas 2D content happens before the commit completes and the compositor might pick up a frame for the canvas that's "ahead" of the content around it. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/cc/CCTextureUpdater.cpp: (WebCore::CCTextureUpdater::appendUpdate): (WebCore::CCTextureUpdater::appendPartialUpdate): (WebCore): (WebCore::CCTextureUpdater::appendCopy): (WebCore::CCTextureUpdater::hasMoreUpdates): (WebCore::CCTextureUpdater::update): (WebCore::CCTextureUpdater::clear): * platform/graphics/chromium/cc/CCTextureUpdater.h: (CCTextureUpdater): (UpdateEntry): (CopyEntry): 2012-04-09 Sadrul Habib Chowdhury [chromium] Add Battery Status API support. Add Battery Status API support to chromium. https://bugs.webkit.org/show_bug.cgi?id=83284 Reviewed by Adam Barth. This change is covered by tests in batterystatus/. * Modules/battery/BatteryController.cpp: (WebCore::BatteryController::updateBatteryStatus): (WebCore): * Modules/battery/BatteryController.h: (BatteryController): * Modules/battery/BatteryManager.cpp: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2012-04-09 SravanKumar Sandela Unnecessary scroll bar after changing the dimensions of a DIV https://bugs.webkit.org/show_bug.cgi?id=71541 Reviewed by Julien Chaffraix. overflow: auto was being determined based on clientWidth and clientHeight, which during style change scenarii will blindly exclude previous scrollbars while computing overflow. This is valid only for overflow: scroll, but for other cases it wrongly reduces available area. Now it is taken care by determining the overflow based on pixelSnappedPaddingBoxWidth/Height() which are newly added in RenderBox. Tests: fast/overflow/overflow-auto-destroy-scroll-after-resizing-expected.html fast/overflow/overflow-auto-destroy-scroll-after-resizing.html * rendering/RenderBox.h: (WebCore::RenderBox::paddingBoxWidth): (WebCore::RenderBox::paddingBoxHeight): (WebCore::RenderBox::pixelSnappedPaddingBoxWidth): (WebCore::RenderBox::pixelSnappedPaddingBoxHeight): (RenderBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hasHorizontalOverflow): (WebCore::RenderLayer::hasVerticalOverflow): 2012-04-09 Victor Carbune Simplified volume slider rendering. https://bugs.webkit.org/show_bug.cgi?id=82150 Reviewed by Eric Carlson. Test: media/video-controls-rendering-toggle-display-none.html * css/mediaControlsChromium.css: Update controls css for Chromium. (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): * css/mediaControlsQuickTime.css: Update controls css for Safari. (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): * html/shadow/MediaControlElements.cpp: Removed particular renderer. (WebCore): * html/shadow/MediaControlElements.h: (MediaControlVolumeSliderContainerElement): Removed particular renderer. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::create): Added a div element as a container. Removed extra unused mute button. * html/shadow/MediaControlRootElementChromium.cpp: Added an extra div element as a container for the mute button and the volume slider to easily position them relative to each other. (WebCore::MediaControlRootElementChromium::create): 2012-04-09 Levi Weintraub Correct some LayoutUnit misuse in FilterEffectRenderer, and RenderBlock https://bugs.webkit.org/show_bug.cgi?id=83366 Reviewed by Eric Seidel. Some more preparation of Render classes for FractionalLayoutUnits. See below for details of each change. No new tests. No change in behavior. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRendererHelper::applyFilterEffect): Pixel snapping image rect before drawing it. * rendering/RenderBlock.cpp: (WebCore::::string): Pixel snapping outputted values for debug. 2012-04-09 Shawn Singh [chromium] Fix layer sorting perspective w if w becomes negative https://bugs.webkit.org/show_bug.cgi?id=82997 Reviewed by Adrienne Walker. Unit test added to CCLayerSorterTest.cpp. This is a follow-up patch after r113364. That other patch implemented proper clipping so that perspective transforms do not accidentally make geometry disappear. This patch fixes a similar problem in the layer sorter code so that layers do not accidentally get sorted incorrectly. * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::LayerShape::LayerShape): * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::computeEnclosingRect): (WebCore::addVertexToClippedQuad): (WebCore::CCMathUtil::mapClippedQuad): (WebCore): (WebCore::CCMathUtil::computeEnclosingRectOfVertices): * platform/graphics/chromium/cc/CCMathUtil.h: (WebCore): (CCMathUtil): 2012-04-09 Martin Robinson [soup] Crash while loading http://www.jusco.cn https://bugs.webkit.org/show_bug.cgi?id=68238 Reviewed by Philippe Normand. Test: http/tests/xmlhttprequest/xmlhttprequest-sync-no-timers.html When running synchronous XMLHttpRequests, push a new inner thread default context, so that other sources from timers and network activity do not run. This will make synchronous requests truly synchronous with the rest of WebCore. * platform/network/soup/ResourceHandleSoup.cpp: (WebCoreSynchronousLoader): Clean up the method definitions a bit by writing them inline. (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): Push a new thread default context to prevent other sources from running. (WebCore::WebCoreSynchronousLoader::~WebCoreSynchronousLoader): Pop the inner thread default context. (WebCore::closeCallback): If the client is synchronous call didFinishLoading now. (WebCore::readCallback): Only call didFinishLoading if the client isn't synchronous. (WebCore::ResourceHandle::defaultSession): Activate use-thread-context so that the soup session respects the inner thread context. 2012-04-09 Dana Jansens [chromium] Flip transition painting delayed with threaded animations https://bugs.webkit.org/show_bug.cgi?id=82571 Reviewed by Adrienne Walker. This allows for prepainting to see and paint layers that are not facing the camera but have animating transforms. This is needed to prepaint animations that "flip" layers around to make the front visible. The changes are to add a backFaceIsVisible() helper function in CCLTHCommon. This is used like before to cull non-double sided layers, but culling is prevented on main thread when the screen space transform is unknown due to animation. We add new helper methods transformToScreenIsKnown() to identify this. However the layer is not actually visible, so we set the visibleLayerRect to be empty in this case. The calculateVisibleLayerRect needs to use the backFaceIsVisible() helper, so we move it into the .cpp file where it belongs, and make it static to the file since it is not used outide of CCLTHCommon.cpp at all. Unit test: CCLayerTreeHostCommonTest.verifyBackFaceCulling * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore): (WebCore::backFaceIsVisible): (WebCore::calculateVisibleLayerRect): (WebCore::layerOpacityIsOpaque): (WebCore::transformToParentIsKnown): (WebCore::transformToScreenIsKnown): (WebCore::layerShouldBeSkipped): (WebCore::calculateDrawTransformsAndVisibilityInternal): (WebCore::walkLayersAndCalculateVisibleLayerRects): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: (WebCore): 2012-04-09 Martin Robinson [GTK] Toggle buttons do not size appropriately in some themes https://bugs.webkit.org/show_bug.cgi?id=82833 Reviewed by Gustavo Noronha Silva. Test: platform/gtk/fast/forms/large-toggle-elements.html Instead of drawing a toggle button across the entire rectangle of the WebCore control, draw a default-sized one cenetered in the rectangle. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::paintToggle): Draw default-sized toggles. 2012-04-09 Raymond Liu When create JavaScriptNode, do not ignore NumberOfOutputChannels parameter. https://bugs.webkit.org/show_bug.cgi?id=83250 Reviewed by Chris Rogers. * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createJavaScriptNode): (WebCore): * Modules/webaudio/AudioContext.h: (AudioContext): * Modules/webaudio/AudioContext.idl: * Modules/webaudio/JavaScriptAudioNode.cpp: (WebCore::JavaScriptAudioNode::create): (WebCore): (WebCore::JavaScriptAudioNode::JavaScriptAudioNode): (WebCore::JavaScriptAudioNode::initialize): (WebCore::JavaScriptAudioNode::process): * Modules/webaudio/JavaScriptAudioNode.h: (JavaScriptAudioNode): 2012-04-09 Abhishek Arya Crash due to floats not cleared before starting SVG layout. https://bugs.webkit.org/show_bug.cgi?id=83021 Reviewed by Dirk Schulze. Manual Test - ManualTests/svg-text-float-not-removed-crash.html. Can't reproduce the failure in DRT. forceLayoutInlineChildren is used in SVG layout and overrides RenderBlock::layoutBlock. However, it missed the 'clearFloats' step, which will cause a crash when trying to access removed renderers. * rendering/RenderBlock.h: (WebCore::RenderBlock::forceLayoutInlineChildren): 2012-04-09 Jeffrey Pfau Filter files from dataTransfer.getData on Mac https://bugs.webkit.org/show_bug.cgi?id=38876 Reviewed by Enrica Casucci. The ClipboardMac class now keeps track of whether it was created for copy and paste, dragging and dropping files or dragging and dropping generic data. This enables the class to block calls to set-/getData when the clipboard is not operating on generic data, and vice-versa. Test: fast/events/drop-with-file-paths.html * editing/mac/EditorMac.mm: (WebCore::Editor::newGeneralClipboard): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::createDraggingClipboard): * platform/mac/ClipboardMac.h: (WebCore::ClipboardMac::create): (ClipboardMac): * platform/mac/ClipboardMac.mm: (WebCore::Clipboard::create): (WebCore::ClipboardMac::ClipboardMac): (WebCore::ClipboardMac::getData): (WebCore::ClipboardMac::setData): (WebCore::ClipboardMac::files): 2012-04-09 Sheriff Bot Unreviewed, rolling out r113561. http://trac.webkit.org/changeset/113561 https://bugs.webkit.org/show_bug.cgi?id=83487 broke webkit_unit_tests (Requested by simonjam on #webkit). * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::transformSurfaceOpaqueRegion): (WebCore::computeOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): (WebCore::testContentRectOccluded): (WebCore::computeUnoccludedContentRect): 2012-04-09 Levi Weintraub Correct LayoutUnit usage in style functions getRoundedBorderFor https://bugs.webkit.org/show_bug.cgi?id=83154 Reviewed by Julien Chaffraix. Correcting LayoutUnit usage in getRoundedBorderFor and the calcRadiiFor helper function. No new tests. No change in behavior. * rendering/style/RenderStyle.cpp: (WebCore::calcRadiiFor): This is a static internal function that returns the radii based on a size. It's only called from getRoundedBorderFor, so we're now pixel snapping the size before handing it to this function. (WebCore::RenderStyle::getRoundedBorderFor): Takes a LayoutRect and returns the pixel-snapped resulting RoundedRect. Using a local IntRect to avoid snapping twice. 2012-04-06 Andrey Kosyakov Web Inspector: zoom on vertical mousewheel in Timeline overview https://bugs.webkit.org/show_bug.cgi?id=83379 Reviewed by Pavel Feldman. - added support for zooming around mouse cursor upon mousewheel event; - handle mousewheel event by _onMouseWheel, not scrollWindow, so we only zoom on events internal to overview. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewWindow): (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging): (WebInspector.TimelineOverviewWindow.prototype._onMouseWheel): (WebInspector.TimelineOverviewWindow.prototype._zoom): 2012-04-09 Bill Budge Cross-origin preflight request should not include credentials. https://bugs.webkit.org/show_bug.cgi?id=37676 Modifies createAccessControlPreflightRequest so it never allows credentials. Reviewed by Adam Barth. http/tests/xmlhttprequest/access-control-preflight-credential-sync.html http/tests/xmlhttprequest/access-control-preflight-credential-async.html * loader/CrossOriginAccessControl.cpp: (WebCore::createAccessControlPreflightRequest): * loader/CrossOriginAccessControl.h: (WebCore): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight): 2012-04-09 Antti Koivisto Don't expose internal CSSValues in API https://bugs.webkit.org/show_bug.cgi?id=83426 Reviewed by Andreas Kling. The CSSValues returned from functions like CSSStyleDeclaration.getPropertyCSSValue() are currently the same instances we use internally. This creates various problems. The values can't be shared between documents as the wrappers would be shared too. Having to maintain per-document CSSValuePools complicate the architecture and increase memory usage. This also blocks sharing style sheet data structures between documents. This patch adds a concept of CSSOM-safe CSSValue. Only the safe values can be wrapped for JS access. Values are unsafe by default. The CSSOM functions that return CSSValues create safe instances by cloning the internal values. The use of APIs that return CSSValues is very rare (the currect CSSOM draft deprecates them) and cloning is cheap in any case. Future patches will eliminate the per-document value pool in favor of a global one for a memory win. In the future we want to replace internally used CSSValues with true internal types (StyleValues) and use CSSValues exclusively as wrappers (similar to how CSSStyleRule wraps internal StyleRule). * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJS): * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal): * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::CSSImageSetValue): (WebCore): (WebCore::CSSImageSetValue::cloneForCSSOM): * css/CSSImageSetValue.h: (CSSImageSetValue): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cleanup): Opportunistically fix a string leak for CSS_COUNTER_NAME values. Add all cases, remove default. (WebCore::CSSPrimitiveValue::cloneForCSSOM): (WebCore): * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::setCSSOMSafe): * css/CSSValue.cpp: (WebCore): (TextCloneCSSValue): (WebCore::TextCloneCSSValue::create): (WebCore::TextCloneCSSValue::cssText): (WebCore::TextCloneCSSValue::TextCloneCSSValue): Most non-primitive value types are not exposed in CSSOM. For those we create a dummy value that contains only the data that is accessible though the base CSSValue interface. (WebCore::CSSValue::addSubresourceStyleURLs): (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): (WebCore::CSSValue::cloneForCSSOM): * css/CSSValue.h: (WebCore): (CSSValue): (WebCore::CSSValue::isCSSOMSafe): (WebCore::CSSValue::isSubtypeExposedToCSSOM): (WebCore::CSSValue::CSSValue): * css/CSSValueList.cpp: (WebCore::CSSValueList::CSSValueList): (WebCore): (WebCore::CSSValueList::cloneForCSSOM): * css/CSSValueList.h: (CSSValueList): * css/Counter.h: (Counter): (WebCore::Counter::cloneForCSSOM): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::setCssText): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue): (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): (WebCore::PropertySetCSSStyleDeclaration::didMutate): (WebCore): (WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM): Maintain a map of safe CSSValues so we can maintain object identity. * css/PropertySetCSSStyleDeclaration.h: (WebCore::PropertySetCSSStyleDeclaration::setNeedsStyleRecalc): (PropertySetCSSStyleDeclaration): * css/RGBColor.cpp: (WebCore::RGBColor::red): (WebCore::RGBColor::green): (WebCore::RGBColor::blue): (WebCore::RGBColor::alpha): * css/Rect.h: (WebCore::RectBase::RectBase): (RectBase): (Rect): (WebCore::Rect::cloneForCSSOM): (WebCore::Rect::Rect): (Quad): (WebCore::Quad::cloneForCSSOM): (WebCore::Quad::Quad): * css/WebKitCSSFilterValue.cpp: (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue): (WebCore): (WebCore::WebKitCSSFilterValue::cloneForCSSOM): * css/WebKitCSSFilterValue.h: (WebKitCSSFilterValue): * css/WebKitCSSTransformValue.cpp: (WebCore::WebKitCSSTransformValue::WebKitCSSTransformValue): (WebCore): (WebCore::WebKitCSSTransformValue::cloneForCSSOM): * css/WebKitCSSTransformValue.h: (WebKitCSSTransformValue): * svg/SVGColor.cpp: (WebCore::SVGColor::SVGColor): (WebCore): (WebCore::SVGColor::cloneForCSSOM): * svg/SVGColor.h: (SVGColor): * svg/SVGPaint.cpp: (WebCore::SVGPaint::SVGPaint): (WebCore): (WebCore::SVGPaint::cloneForCSSOM): * svg/SVGPaint.h: (SVGPaint): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::getPresentationAttribute): 2012-04-09 Pavel Feldman Web Inspector: get rid of WebInspector.Resource.category, use WebInspector.Resource.type instead. https://bugs.webkit.org/show_bug.cgi?id=83467 Reviewed by Yury Semikhatsky. WebInspector.Resource.category is derived from the WebInspector.Resource.type and there is no real need it maintaining both. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/AuditLauncherView.js: (WebInspector.AuditLauncherView.prototype._onResourceStarted): (WebInspector.AuditLauncherView.prototype._onResourceFinished): * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.GzipRule.prototype._shouldCompress): (WebInspector.AuditRules.CombineJsResourcesRule): (WebInspector.AuditRules.CombineCssResourcesRule): (WebInspector.AuditRules.ParallelizeDownloadRule.prototype.doRun): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback): (WebInspector.AuditRules.CacheControlRule.prototype.isCompressible): (WebInspector.AuditRules.StaticCookielessRule.prototype.processCookies): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModelResourceBinding): (WebInspector.CSSStyleModelResourceBinding.prototype.setContent): (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged): * inspector/front-end/ContentProviders.js: (WebInspector.ResourceContentProvider): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModelResourceBinding): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype._getPopoverAnchor): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._makeResource): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.get this): (WebInspector.NetworkManager.get NetworkAgent): (WebInspector.NetworkManager): (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): (WebInspector.NetworkDispatcher.prototype._mimeTypeIsConsistentWithType): (WebInspector.NetworkDispatcher.prototype._updateResourceWithCachedResource): (WebInspector.NetworkDispatcher.prototype.responseReceived): (WebInspector.NetworkDispatcher.prototype.webSocketCreated): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._createFilterStatusBarItems): (WebInspector.NetworkLogView.prototype._updateSummaryBar): (WebInspector.NetworkDataGridNode.prototype.isFilteredOut): (WebInspector.NetworkDataGridNode.prototype.refreshResource): (WebInspector.NetworkDataGridNode.prototype._refreshNameCell): (WebInspector.NetworkDataGridNode.prototype.refreshGraph): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.registerDomainModelBinding): (WebInspector.Resource.prototype.set type): (WebInspector.Resource.prototype.isEditable): (WebInspector.Resource.prototype.setContent): (WebInspector.Resource.prototype.requestContent): * inspector/front-end/ResourceCategory.js: Removed. * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype._createPreviewView): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.addScript): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._onResourceUpdated): (WebInspector.ResourceTreeModel.prototype._onResourceUpdateDropped): (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): * inspector/front-end/ResourceType.js: Added. (WebInspector.ResourceType): (WebInspector.ResourceType.prototype.name): (WebInspector.ResourceType.prototype.title): (WebInspector.ResourceType.prototype.categoryTitle): (WebInspector.ResourceType.prototype.color): (WebInspector.ResourceType.prototype.isTextType): (WebInspector.ResourceType.prototype.toString): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.hasTextContent): (WebInspector.ResourceView.nonSourceViewForResource): (WebInspector.EditableResourceSourceFrame.prototype.canEditSource): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameTreeElement.prototype.appendResource): (WebInspector.FrameResourceTreeElement): (WebInspector.FrameResourceTreeElement.prototype.onattach): (WebInspector.ResourceRevisionTreeElement): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-04-09 Alexis Menard Unreviewed, adding a missing header for the Qt port. * Target.pri: 2012-04-09 Pavel Feldman Web Inspector: [network panel] type column shows "undefined" instead of "(Pending)" upon load. https://bugs.webkit.org/show_bug.cgi?id=83470 Reviewed by Yury Semikhatsky. isPingRequest is tested for as a field, not a function return value. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshTypeCell): 2012-03-30 Robert Hogan REGRESSION (r94492): Incorrect initial layout of absolutely positioned inside centering div https://bugs.webkit.org/show_bug.cgi?id=77754 Reviewed by David Hyatt. The correct static position of an center-aligned, inline, absolutely positioned object with a block child can't be known until the width of the child has been computed. This means that setStaticPositions() in RenderBlockLineLayout is setting the position too early, before the width of the child has been finalised. To fix, adjust the static position of the inline positioned object once its child's width has been calculated. Test: fast/css/align-positioned-object-on-resize.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutPositionedObjects): 2012-04-09 Eric Carlson WebVTT parser unnecessarily limits the value of a timestamp https://bugs.webkit.org/show_bug.cgi?id=83422 Reviewed by Dan Bernstein. Test: media/track/track-large-timestamp.html * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::collectTimeStamp): Make all constants double instead of int so the maximum number of hours is increased and so we don't need any casts. 2012-04-09 Abhishek Arya Incorrect placement of new child to table when before child parent is not |this|. https://bugs.webkit.org/show_bug.cgi?id=82630 Reviewed by Julien Chaffraix. Tests: fast/table/table-row-split2.html fast/table/table-section-split2.html fast/table/table-split.html fast/table/table-split2.html and tested by layouttests in commits r97180, r108127, and a few others. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChildToAnonymousColumnBlocks): function rename, block->box. (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks): ditto. (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): ditto. * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::moveChildTo): move these functions from RenderBlock, needs to be used in RenderBox::splitAnonymousBoxesAroundChild. (WebCore): (WebCore::RenderBox::moveChildrenTo): ditto. (WebCore::markBoxForRelayoutAfterSplit): helper to mark a block or table part for complete relayout after anonymous boxes are split around child. (WebCore::RenderBox::splitAnonymousBoxesAroundChild): moved from RenderBlock to be able to work with table parts. * rendering/RenderBox.h: (RenderBox): (WebCore::RenderBox::moveChildTo): (WebCore::RenderBox::moveAllChildrenTo): (WebCore::RenderBox::moveChildrenTo): * rendering/RenderObject.cpp: (WebCore::RenderObject::addChild): no longer need the hack added in r95461. * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::moveChildren): function rename, block->box. * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): Use splitAnonymousBoxesAroundChild function when |beforeChild| != |this|. * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::addChild): ditto. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild): ditto. 2012-04-03 Jocelyn Turcotte WebSocketServer: Honour WebSocketFrame::masked in makeFrameData https://bugs.webkit.org/show_bug.cgi?id=83042 Reviewed by Kent Tamura. Frames from the server should not be masked. Currently, the flag is set to false, but the frames were masked anyway. This causes clients with recent builds of WebKit to abort the connection to the inspector server, refusing masked frames from the server as per the spec. This doesn't change the behavior of WebSocket clients, which set the masked flag to true. * Modules/websockets/WebSocketFrame.cpp: (WebCore::appendFramePayload): (WebCore::WebSocketFrame::makeFrameData): 2012-04-09 Alexis Menard [Part 5] We should use CSSPropertyID rather than integers when manipulating CSS property ids. https://bugs.webkit.org/show_bug.cgi?id=83466 Reviewed by Kentaro Hara. CSSPropertyID enum holds all the CSS property ids but many parts of WebKit treat the ids as integers, this patch should adress the last remaining occurences of ints rather than CSSPropertyIDs. No new tests : There should be no behavior change in this patch. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSStyleSelector.h: (CSSStyleSelector): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::removePropertiesInSet): * page/animation/AnimationBase.cpp: (WebCore::gatherEnclosingShorthandProperties): (WebCore::AnimationBase::animatableShorthandsAffectingProperty): * page/animation/AnimationBase.h: (AnimationBase): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::pauseTransitionAtTime): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::animate): (WebCore::KeyframeAnimation::getAnimatedStyle): (WebCore::KeyframeAnimation::overrideAnimations): (WebCore::KeyframeAnimation::resumeOverriddenAnimations): (WebCore::KeyframeAnimation::timeToNextService): * rendering/style/KeyframeList.cpp: (WebCore::KeyframeList::insert): * rendering/style/KeyframeList.h: (WebCore::KeyframeValue::addProperty): (WebCore::KeyframeValue::containsProperty): (WebCore::KeyframeValue::properties): (KeyframeValue): (WebCore::KeyframeList::addProperty): (WebCore::KeyframeList::containsProperty): (WebCore::KeyframeList::beginProperties): (WebCore::KeyframeList::endProperties): (KeyframeList): 2012-04-09 Kentaro Hara Unreviewed, rebaselined run-bindings-tests results. * bindings/scripts/test/JS/JSFloat64Array.cpp: (WebCore::JSFloat64ArrayConstructor::getOwnPropertySlot): (WebCore::JSFloat64ArrayConstructor::getOwnPropertyDescriptor): (WebCore::jsFloat64ArrayConstructor): (WebCore::JSFloat64Array::getConstructor): (WebCore::jsFloat64ArrayPrototypeFunctionFoo): (WebCore::toFloat64Array): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::JSTestActiveDOMObjectConstructor::getOwnPropertySlot): (WebCore::JSTestActiveDOMObjectConstructor::getOwnPropertyDescriptor): (WebCore::jsTestActiveDOMObjectExcitingAttr): (WebCore::jsTestActiveDOMObjectConstructor): (WebCore::JSTestActiveDOMObject::getConstructor): (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): (WebCore::JSTestActiveDOMObjectOwner::isReachableFromOpaqueRoots): (WebCore::JSTestActiveDOMObjectOwner::finalize): (WebCore::toTestActiveDOMObject): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: (WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertySlot): (WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertyDescriptor): (WebCore::jsTestCustomNamedGetterConstructor): (WebCore::JSTestCustomNamedGetter::getConstructor): (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): (WebCore::JSTestCustomNamedGetterOwner::isReachableFromOpaqueRoots): (WebCore::JSTestCustomNamedGetterOwner::finalize): (WebCore::toTestCustomNamedGetter): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::JSTestEventConstructorConstructor::getOwnPropertySlot): (WebCore::JSTestEventConstructorConstructor::getOwnPropertyDescriptor): (WebCore::JSTestEventConstructorConstructor::constructJSTestEventConstructor): (WebCore::jsTestEventConstructorAttr1): (WebCore::jsTestEventConstructorAttr2): (WebCore::jsTestEventConstructorConstructor): (WebCore::JSTestEventConstructor::getConstructor): (WebCore::JSTestEventConstructorOwner::isReachableFromOpaqueRoots): (WebCore::JSTestEventConstructorOwner::finalize): (WebCore::toTestEventConstructor): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::JSTestEventTargetConstructor::getOwnPropertySlot): (WebCore::JSTestEventTargetConstructor::getOwnPropertyDescriptor): (WebCore::jsTestEventTargetConstructor): (WebCore::JSTestEventTarget::getConstructor): (WebCore::jsTestEventTargetPrototypeFunctionItem): (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener): (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener): (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent): (WebCore::JSTestEventTarget::indexGetter): (WebCore::JSTestEventTargetOwner::isReachableFromOpaqueRoots): (WebCore::JSTestEventTargetOwner::finalize): (WebCore::toTestEventTarget): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::getOwnPropertySlot): (WebCore::JSTestInterfaceConstructor::getOwnPropertyDescriptor): (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): (WebCore::jsTestInterfaceSupplementalStr1): (WebCore::jsTestInterfaceSupplementalStr2): (WebCore::jsTestInterfaceSupplementalStr3): (WebCore::jsTestInterfaceSupplementalNode): (WebCore::jsTestInterfaceConstructor): (WebCore::setJSTestInterfaceSupplementalStr2): (WebCore::setJSTestInterfaceSupplementalStr3): (WebCore::setJSTestInterfaceSupplementalNode): (WebCore::JSTestInterface::getConstructor): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3): (WebCore::JSTestInterfaceOwner::isReachableFromOpaqueRoots): (WebCore::JSTestInterfaceOwner::finalize): (WebCore::toTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot): (WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertyDescriptor): (WebCore::jsTestMediaQueryListListenerConstructor): (WebCore::JSTestMediaQueryListListener::getConstructor): (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): (WebCore::JSTestMediaQueryListListenerOwner::isReachableFromOpaqueRoots): (WebCore::JSTestMediaQueryListListenerOwner::finalize): (WebCore::toTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorConstructor::getOwnPropertySlot): (WebCore::JSTestNamedConstructorConstructor::getOwnPropertyDescriptor): (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): (WebCore::jsTestNamedConstructorConstructor): (WebCore::JSTestNamedConstructor::getConstructor): (WebCore::JSTestNamedConstructorOwner::isReachableFromOpaqueRoots): (WebCore::JSTestNamedConstructorOwner::finalize): (WebCore::toTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::getOwnPropertySlot): (WebCore::JSTestObjConstructor::getOwnPropertyDescriptor): (WebCore::JSTestObjConstructor::constructJSTestObj): (WebCore::jsTestObjReadOnlyIntAttr): (WebCore::jsTestObjReadOnlyStringAttr): (WebCore::jsTestObjReadOnlyTestObjAttr): (WebCore::jsTestObjShortAttr): (WebCore::jsTestObjUnsignedShortAttr): (WebCore::jsTestObjIntAttr): (WebCore::jsTestObjLongLongAttr): (WebCore::jsTestObjUnsignedLongLongAttr): (WebCore::jsTestObjStringAttr): (WebCore::jsTestObjTestObjAttr): (WebCore::jsTestObjSequenceAttr): (WebCore::jsTestObjXMLObjAttr): (WebCore::jsTestObjCreate): (WebCore::jsTestObjReflectedStringAttr): (WebCore::jsTestObjReflectedIntegralAttr): (WebCore::jsTestObjReflectedUnsignedIntegralAttr): (WebCore::jsTestObjReflectedBooleanAttr): (WebCore::jsTestObjReflectedURLAttr): (WebCore::jsTestObjReflectedCustomIntegralAttr): (WebCore::jsTestObjReflectedCustomBooleanAttr): (WebCore::jsTestObjReflectedCustomURLAttr): (WebCore::jsTestObjAttrWithGetterException): (WebCore::jsTestObjAttrWithSetterException): (WebCore::jsTestObjStringAttrWithGetterException): (WebCore::jsTestObjStringAttrWithSetterException): (WebCore::jsTestObjCustomAttr): (WebCore::jsTestObjWithScriptStateAttribute): (WebCore::jsTestObjWithScriptExecutionContextAttribute): (WebCore::jsTestObjWithScriptStateAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises): (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::jsTestObjConditionalAttr1): (WebCore::jsTestObjConditionalAttr2): (WebCore::jsTestObjConditionalAttr3): (WebCore::jsTestObjConditionalAttr4Constructor): (WebCore::jsTestObjConditionalAttr5Constructor): (WebCore::jsTestObjConditionalAttr6Constructor): (WebCore::jsTestObjCachedAttribute1): (WebCore::jsTestObjCachedAttribute2): (WebCore::jsTestObjContentDocument): (WebCore::jsTestObjMutablePoint): (WebCore::jsTestObjImmutablePoint): (WebCore::jsTestObjStrawberry): (WebCore::jsTestObjStrictFloat): (WebCore::jsTestObjDescription): (WebCore::jsTestObjId): (WebCore::jsTestObjHash): (WebCore::jsTestObjConstructor): (WebCore::setJSTestObjShortAttr): (WebCore::setJSTestObjUnsignedShortAttr): (WebCore::setJSTestObjIntAttr): (WebCore::setJSTestObjLongLongAttr): (WebCore::setJSTestObjUnsignedLongLongAttr): (WebCore::setJSTestObjStringAttr): (WebCore::setJSTestObjTestObjAttr): (WebCore::setJSTestObjSequenceAttr): (WebCore::setJSTestObjXMLObjAttr): (WebCore::setJSTestObjCreate): (WebCore::setJSTestObjReflectedStringAttr): (WebCore::setJSTestObjReflectedIntegralAttr): (WebCore::setJSTestObjReflectedUnsignedIntegralAttr): (WebCore::setJSTestObjReflectedBooleanAttr): (WebCore::setJSTestObjReflectedURLAttr): (WebCore::setJSTestObjReflectedCustomIntegralAttr): (WebCore::setJSTestObjReflectedCustomBooleanAttr): (WebCore::setJSTestObjReflectedCustomURLAttr): (WebCore::setJSTestObjAttrWithGetterException): (WebCore::setJSTestObjAttrWithSetterException): (WebCore::setJSTestObjStringAttrWithGetterException): (WebCore::setJSTestObjStringAttrWithSetterException): (WebCore::setJSTestObjCustomAttr): (WebCore::setJSTestObjWithScriptStateAttribute): (WebCore::setJSTestObjWithScriptExecutionContextAttribute): (WebCore::setJSTestObjWithScriptStateAttributeRaises): (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises): (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute): (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises): (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::setJSTestObjConditionalAttr1): (WebCore::setJSTestObjConditionalAttr2): (WebCore::setJSTestObjConditionalAttr3): (WebCore::setJSTestObjConditionalAttr4Constructor): (WebCore::setJSTestObjConditionalAttr5Constructor): (WebCore::setJSTestObjConditionalAttr6Constructor): (WebCore::setJSTestObjMutablePoint): (WebCore::setJSTestObjImmutablePoint): (WebCore::setJSTestObjStrawberry): (WebCore::setJSTestObjStrictFloat): (WebCore::setJSTestObjId): (WebCore::JSTestObj::getConstructor): (WebCore::jsTestObjPrototypeFunctionVoidMethod): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethod): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethod): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg): (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionIdbKey): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionMethodWithException): (WebCore::jsTestObjPrototypeFunctionCustomMethod): (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionAddEventListener): (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces): (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionConditionalMethod1): (WebCore::jsTestObjPrototypeFunctionConditionalMethod2): (WebCore::jsTestObjPrototypeFunctionConditionalMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray): (WebCore::jsTestObjPrototypeFunctionGetSVGDocument): (WebCore::jsTestObjPrototypeFunctionConvert1): (WebCore::jsTestObjPrototypeFunctionConvert2): (WebCore::jsTestObjPrototypeFunctionConvert3): (WebCore::jsTestObjPrototypeFunctionConvert4): (WebCore::jsTestObjPrototypeFunctionConvert5): (WebCore::jsTestObjPrototypeFunctionMutablePointFunction): (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction): (WebCore::jsTestObjPrototypeFunctionOrange): (WebCore::jsTestObjPrototypeFunctionStrictFunction): (WebCore::JSTestObjOwner::isReachableFromOpaqueRoots): (WebCore::JSTestObjOwner::finalize): (WebCore::toTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertyDescriptor): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): (WebCore::jsTestSerializedScriptValueInterfaceValue): (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue): (WebCore::jsTestSerializedScriptValueInterfaceCachedValue): (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue): (WebCore::jsTestSerializedScriptValueInterfaceConstructor): (WebCore::setJSTestSerializedScriptValueInterfaceValue): (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue): (WebCore::JSTestSerializedScriptValueInterface::getConstructor): (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList): (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList): (WebCore::JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots): (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize): (WebCore::toTestSerializedScriptValueInterface): 2012-04-09 Charles Wei [BlackBerry] Upstream BlackBerry change to WebCore::TouchEvent https://bugs.webkit.org/show_bug.cgi?id=83454 Reviewed by Rob Buis. BlackBerry-port enhances the TouchEvent by adding member variables to indicate if the event is double-tap or touch-hold. * dom/TouchEvent.cpp: (WebCore::TouchEvent::TouchEvent): (WebCore::TouchEvent::initTouchEvent): * dom/TouchEvent.h: (TouchEvent): (WebCore::TouchEvent::setDoubleTap): (WebCore::TouchEvent::isDoubleTap): (WebCore::TouchEvent::setTouchHold): (WebCore::TouchEvent::isTouchHold): 2012-04-09 James Robinson Remove partially implemented per-Element visibility checks from requestAnimationFrame logic https://bugs.webkit.org/show_bug.cgi?id=74232 Reviewed by Dean Jackson. The initial requestAnimationFrame implementation had an Element parameter as the second argument to the function. This element was intended to convey the element associated with the animation so that when the element was not visible the animation callback would not be run. The checked in implementation does a very limited check - testing for display:none and being detached from the tree - but does it in a way that does not work correctly if an element's visibility is manipulated by a callback running from a different document. It also adds significant complexity to the code, making it less hackable and easy to introduce subtle security bugs or infinite loops. This patch removes the parameter. Since it has always been marked optional, there is no web compat risk. If this functionality is added back in the future it needs to be implemented in a way that considers all callbacks within a Page and not only those within a single Document. * dom/Document.cpp: (WebCore::Document::webkitRequestAnimationFrame): * dom/Document.h: * dom/RequestAnimationFrameCallback.h: * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * dom/ScriptedAnimationController.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::webkitRequestAnimationFrame): * page/DOMWindow.h: * page/DOMWindow.idl: 2012-04-09 Chris Guan [Blackberry] m_isRequestedByPlugin should be copied in ResourceRequest https://bugs.webkit.org/show_bug.cgi?id=83447 Reviewed by George Staikos. It is an obvious error, We should copy m_isRequestedByPlugin in ResourceReuest. No new tests, because those existing plugin test cases are enough. * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::ResourceRequest::doPlatformCopyData): (WebCore::ResourceRequest::doPlatformAdopt): 2012-04-09 'Pavel Feldman' Not reviewed: fixing inspector front-end compilation that has been broken by the recent SaveAs and DOMStorage changes. * inspector/front-end/DOMStorage.js: * inspector/front-end/externs.js: (WebInspector.isURLSaved): 2012-04-09 Pavel Feldman Web Inspector: remove ComboBoxFileSelector and SingleFileEditorContainer. https://bugs.webkit.org/show_bug.cgi?id=83460 Reviewed by Yury Semikhatsky. We are now using scripts navigator and tabbed editor container, removing the old components. This change removes the corresponding classes and the abstractions used during the transition period. * English.lproj/localizedStrings.js: * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype._scriptSelected): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.get this): (WebInspector.ScriptsPanel.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.prototype._addUISourceCode): (WebInspector.ScriptsPanel.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype._showFile): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._editorClosed): (WebInspector.ScriptsPanel.prototype._scriptSelected): (WebInspector.ScriptsPanel.prototype._hidePinnedNavigator): (WebInspector.ScriptsPanel.prototype.set _pinNavigator): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainerDelegate): (WebInspector.TabbedEditorContainerDelegate.prototype.viewForFile): (get WebInspector): (WebInspector.TabbedEditorContainer.prototype._tabClosed): * inspector/front-end/scriptsPanel.css: 2012-04-09 Dana Jansens [chromium] Make culling work with clipped rects https://bugs.webkit.org/show_bug.cgi?id=83217 Reviewed by Adrienne Walker. Use new CCMathUtil transformation methods to deal with rects that clip the camera plane. This fixes three things: 1. A layer completely behind the camera is not visible and should not occlude. 2. A layer that is clipped by the camera is treated like a non-axis-aligned transform, as the result of a mapClippedRect() is a bounding box and may contain pixels not in the original rect. This guards our use of mapRect() when transforming occluded regions. 3. A layer's occlusion must be clipped by its scissor rect. This scissor rect exists in its target space, so occlusion in screen space is only possible if its target also is axis aligned in the screen, such that the layer's scissor rect remains a rect in screen space. Unit tests: CCOcclusionTrackerTestLayerBehindCameraDoesNotOcclude CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::transformSurfaceOpaqueRegion): (WebCore::computeOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): (WebCore::testContentRectOccluded): (WebCore::computeUnoccludedContentRect): 2012-04-09 Zan Dobersek [Gtk] Web Inspector noinst_DATA images are copied into innacurately named directory https://bugs.webkit.org/show_bug.cgi?id=83423 Reviewed by Martin Robinson. Copy Web Inspector images that are a part of the data not meant for installation into a directory named 'Images' rather than a lower-case version of that. This is required as until now, when using these inspector resources (for example during layout tests or manually pointing WEBKIT_INSPECTOR_PATH env to that location), the images were not displayed as they were not loadable. No new tests - no new functionality. * GNUmakefile.am: 2012-04-06 Pavel Feldman Web Inspector: move breakpoints active state from scripts panel to debugger presentation model. https://bugs.webkit.org/show_bug.cgi?id=83374 Reviewed by Yury Semikhatsky. Just moves the state and adds event to propagate it. This is needed to abstract JavaScriptSourceFrame from the ScriptsPanel. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.DebuggerPresentationModel.prototype.setBreakpointsActive): (WebInspector.DebuggerPresentationModel.prototype.breakpointsActive): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleBreakpointsClicked): (WebInspector.ScriptsPanel.prototype._breakpointsActiveStateChanged): (WebInspector.ScriptsPanel.prototype._createDebugToolbar): 2012-04-08 Takashi Sakamoto in is not rendered correctly. https://bugs.webkit.org/show_bug.cgi?id=81311 This code changes a code location where MeterValueElement's value attribute is initialized. In the old code, HTMLMeterElement's attach did. It is better to initialize the attribute just after creating meter's shadow subtree. Reviewed by Hajime Morita. No new tests, because an existing test, content-element-in-meter-element.html covers. However test_expectations.txt is changed. Now the test passes. * html/HTMLMeterElement.cpp: * html/HTMLMeterElement.h: (HTMLMeterElement): (HTMLMeterElement::attach): Removed attach method, because attach method is just calling LabelableElement::attach after removing didElementStateChange. (HTMLMeterElement::createShadowSubTree): Added setWidthPercentage to initialize MeterValueElement's value attribute. * LayoutTests/platform/chromium/test_expectations.txt: Removed BUGWK81311 fast/dom/shadow/content-element-in-meter.html, because now contentElementInMeterElement passes. 2012-04-08 Patrick Gansterer Build fix for !ENABLE(CSS_FILTERS) && ASSERT_DISABLED after r109953. * platform/graphics/ca/GraphicsLayerCA.cpp: 2012-04-07 Patrick Gansterer [CMake] Cleanup WTF include directories https://bugs.webkit.org/show_bug.cgi?id=82716 Reviewed by Eric Seidel. * CMakeLists.txt: 2012-04-07 Rob Buis Remove dead code in SVGCSSParser https://bugs.webkit.org/show_bug.cgi?id=83404 Reviewed by Nikolas Zimmermann. Remove code that was there to create a SVGColor representation for color, but was never reached. Since SVGColor is deprecated now (also see bug 15012), this code has lost any potential. Should SVGColor come back in SVG2 we can revisit this. Add a test to confirm for SVG we follow the CSS3 handling of color="currentColor". This is something the removed code never dealt with, but the existing code in CSSParser.cpp handles, make sure we stick to this behaviour in the future using this test. Test: svg/custom/currentColor-on-color.html * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): 2012-04-07 Nikolas Zimmermann FrameData constructor zeroes all fields, causing ImageOrientation to be 0 https://bugs.webkit.org/show_bug.cgi?id=83416 Inofficially rubber-stamped by Tim Horton. Lots of svg/as-image/ crash on debug builds. FrameData is used in a Vector and currently special VectorTraits force it to be initialized with memset(), nulling all members, instead of properly initializing them causing the ImageOrientation bug. To be able to remove the SimpleClassVectorTraits specialization, we have to allow FrameData to be copied. * platform/graphics/BitmapImage.h: 2012-04-07 Nikolas Zimmermann Work around an entity parsing bug in libxml2 2.7.3 (supplied with Lion) and unskip tests https://bugs.webkit.org/show_bug.cgi?id=82577 Reviewed by Filip Pizlo. Work-around entity expansion bug that affects several SVG tests on Lion. Sample test document which is currently broken: "> ]> &Smile; The expanded rect carries no namespace, thus an Element will be created for it, instead of a SVGRectElement. libxml2 2.7.4 fixed this bug (https://bugzilla.gnome.org/show_bug.cgi?id=502960) in 2009 already, but Lion still ships with 2.7.3, so we need to find a work-around for the problem. It works like this: - When an entity is requested (getEntityHandler) determine whether the entity is being declared (while the Unreviewed, rolling out r113526. http://trac.webkit.org/changeset/113526 https://bugs.webkit.org/show_bug.cgi?id=83417 speculative rollout for broken chrome browser_test (Requested by simonjam on #webkit). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::stopLoading): (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::setupForReplaceByMIMEType): (WebCore): (WebCore::DocumentLoader::setParsedArchiveData): (WebCore::DocumentLoader::scheduleArchiveLoad): (WebCore::DocumentLoader::documentURL): * loader/DocumentLoader.h: (DocumentLoader): * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedFirstData): (WebCore::FrameLoader::loadArchive): (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::finishedLoadingDocument): (WebCore): * loader/FrameLoader.h: (FrameLoader): (WebCore::FrameLoader::archive): 2012-04-06 James Robinson [chromium] Avoid deleting impl tree when becoming invisible https://bugs.webkit.org/show_bug.cgi?id=83396 Reviewed by Adrienne Walker. This bit of code in CCLayerTreeHost::didBecomeInvisible..() was an attempt to drop resources when becoming invisible. However, it's fairly confused - we drop textures via TextureManagers when going invisible and CCLayerImpl destructors can't delete non-managed resources since they do not have access to a context - so this code was never actually freeing up GPU resources. Having a sometimes-null CCLayerImpl tree when we still have a valid LayerChromium tree has lead to various tricky bugs. No new tests since this code wasn't doing anything useful in the first place. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): 2012-04-06 Leo Yang LocalFileSystem::initializeLocalFileSystem should be static https://bugs.webkit.org/show_bug.cgi?id=83356 Reviewed by Rob Buis. LocalFileSystem::initializeLocalFileSystem should be static because static LocalFileSystem::localFileSystem() requires initializeLocalFileSystem() is called before it gets called. No functionalities changed, no new tests. * Modules/filesystem/LocalFileSystem.h: (LocalFileSystem): 2012-04-06 Martin Robinson [GTK] Accelerated compositing is broken after recent TextureMapper reorganizations https://bugs.webkit.org/show_bug.cgi?id=83393 Reviewed by Noam Rosenthal. No new tests. This will be covered by existing accelerated compositing tests once the implementation is complete. The GTK+ implementation doesn't clip currently, so hold off enabling the scissor test until necessary. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::beginPainting): Do not enable the scissor test. (WebCore::TextureMapperGL::beginScissorClip): Enable the scissor test once we know for sure we will be using scissored clipping. 2012-04-06 Keishi Hattori Remove obsolete parts of support code https://bugs.webkit.org/show_bug.cgi?id=83117 Removing HTMLInputElement::selectedOption because it was removed from the specification. Removing -webkit-appearance:list-button and -webkit-input-list-button pseudo selector related code because we decided not to use it. Reviewed by Kent Tamura. * WebCore.order: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): (WebCore::nameToPseudoTypeMap): (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: * css/CSSValueKeywords.in: * css/html.css: (datalist): * html/HTMLInputElement.cpp: * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLInputElement.idl: * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer): * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/StylesSidebarPane.js: * platform/ThemeTypes.h: * platform/chromium/ThemeChromiumMac.mm: (WebCore::setupButtonCell): (WebCore::paintButton): (WebCore::ThemeChromiumMac::controlSize): (WebCore::ThemeChromiumMac::minimumControlSize): (WebCore::ThemeChromiumMac::controlBorder): (WebCore::ThemeChromiumMac::paint): * platform/mac/ThemeMac.mm: (WebCore::setUpButtonCell): (WebCore::paintButton): (WebCore::ThemeMac::controlSize): (WebCore::ThemeMac::minimumControlSize): (WebCore::ThemeMac::controlBorder): (WebCore::ThemeMac::paint): * platform/qt/RenderThemeQtMobile.cpp: (WebCore::RenderThemeQtMobile::computeSizeBasedOnStyle): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::paint): (WebCore::RenderTheme::paintBorderOnly): (WebCore::RenderTheme::paintDecorations): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustRepaintRect): 2012-04-06 Oliver Hunt Accessing the returnValue of a modal dialog should be performed directly on the global object. https://bugs.webkit.org/show_bug.cgi?id=83414 Reviewed by Gavin Barraclough. Presumably during the mass-devirtualising of JSObject, this deliberate use of the GlobalObject's property lookup logic directly was replaced with a dynamic call. That results in the DOMWindow filtering out the lookup. This regression was masked by r93567. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::DialogHandler::returnValue): 2012-04-06 Nate Chapin Move Archive processing to DocumentLoader, instead of FrameLoader. https://bugs.webkit.org/show_bug.cgi?id=83055 Reviewed by Adam Barth. No new tests, no functionality change intended. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::setupForReplaceByMIMEType): (WebCore::DocumentLoader::maybeCreateArchive): Renamed from FrameLoader::finishedLoadingDocument(). Returns true if an archive was created. (WebCore::DocumentLoader::setArchive): (WebCore::DocumentLoader::scheduleArchiveLoad): (WebCore::DocumentLoader::documentURL): Add a check for whether an archive url should be returned, so that we don't need special handling in Document and FrameLoader for overriding the document url later. * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedFirstData): Remove archive special cases, since DocumentLoader::documentURL() will return the right thing for legacy archives and maybeCreateArchive() will override the base url for mhtml. (WebCore::FrameLoader::loadArchive): * loader/FrameLoader.h: 2012-04-06 Charles Wei [BlackBerry] Build fix to match the latest WebCore change https://bugs.webkit.org/show_bug.cgi?id=83358 Reviewed by Rob Buis. Update the BlackBerry cmake file to reflect the fact that: 1.VDMXParser.cpp moved from graphics/skia to graphics/chromium. 2.geolocation moved to Modules/geolocation 3.websockets moved to Modules/websockets * PlatformBlackBerry.cmake: 2012-04-06 Charles Wei [BlackBerry] Restore some code which was deleted by accident. https://bugs.webkit.org/show_bug.cgi?id=83357 Reviewed by Rob Buis. No new tests, just BlackBerry build fix. * platform/network/blackberry/ResourceRequest.h: (ResourceRequest): * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore): (WebCore::mimeTypeRequestTypeMap): (WebCore::ResourceRequest::targetTypeFromMimeType): 2012-04-06 Alexandre Elias Fix bug in ContainerNode::getRect with scale transforms https://bugs.webkit.org/show_bug.cgi?id=83385 Reviewed by Simon Fraser. The bottom-right corner calculation for non-inline and replaced elements in ContainerNode::getRect was incorrect in the presence of scaling, because the untransformed element size was added after the transformation is applied. The rest of the calculations are careful to always apply the transformation as the last step, but this had been forgotten in this codepath. The fix is just to make sure the size is included in the localToAbsolute call. One bug caused by this was that a scaled element would be cut off when scrollIntoView(false) is called to scroll its parent container to make it bottom-visible. New layout test case in fast/transforms/scrollIntoView-transformed.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::getLowerRightCorner): 2012-04-06 Tim Horton m_shouldRespectImageOrientation is used uninitialized https://bugs.webkit.org/show_bug.cgi?id=83410 Reviewed by Simon Fraser. Initialize Settings's m_shouldRespectImageOrientation to false. * page/Settings.cpp: (WebCore::Settings::Settings): 2012-04-06 James Robinson [chromium] Clear values in combinedClear path not respected in WebGLRenderingContext::clearIfComposited() https://bugs.webkit.org/show_bug.cgi?id=83407 Reviewed by Kenneth Russell. When doing a combined clear in the drawing buffer path, we have to use the user specified values for the clear color / mask / depth and not all 0s. Covered by slight modification to fast/canvas/webgl/canvas-test.html * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::clearIfComposited): * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::clearFramebuffers): (WebCore::DrawingBuffer::reset): * platform/graphics/gpu/DrawingBuffer.h: 2012-04-06 Tony Chang [chromium] merge redundant conditions in WebCore.gyp https://bugs.webkit.org/show_bug.cgi?id=83319 Reviewed by Adam Barth. There were duplicate conditions in some of the targets (e.g., 2 OS=="win" sections) so I merged them and if possible, used an else block of an existing condition. No new tests, just refactoring the build file. * WebCore.gyp/WebCore.gyp: 2012-04-06 Simon Fraser Rename paintingGoesToWindow() to paintsIntoWindow() https://bugs.webkit.org/show_bug.cgi?id=83406 Reviewed by Dirk Schulze. Rename paintingGoesToWindow() to paintsIntoWindow() to be consistent with some future refactoring. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::paintsWithTransform): (WebCore::RenderLayer::setBackingNeedsRepaint): (WebCore::RenderLayer::setBackingNeedsRepaintInRect): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::containsPaintedContent): (WebCore::RenderLayerBacking::paintsIntoWindow): (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLayerBacking.h: (RenderLayerBacking): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged): * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintUsingContainer): * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): 2012-04-06 James Simonsen Roll out change to HTMLParserIdioms.cpp from 82857 https://bugs.webkit.org/show_bug.cgi?id=83402 Change 82857 causes a DCHECK on fast/forms/number/ValidityState-typeMismatch-number.html Darin suggested we roll out this file here: https://bugs.webkit.org/show_bug.cgi?id=82857#c20 Unreviewed, rolling out change that broke tests. * html/parser/HTMLParserIdioms.cpp: (WebCore::parseToDoubleForNumberType): 2012-04-06 Ilya Sherman Allow site authors to override autofilled fields' colors. https://bugs.webkit.org/show_bug.cgi?id=66032 http://code.google.com/p/chromium/issues/detail?id=46543 Reviewed by Simon Fraser. * css/html.css: (input:-webkit-autofill): Remove !important declarations. 2012-04-05 Enrica Casucci Provide Obj-C private API to simplify markup. https://bugs.webkit.org/show_bug.cgi?id=83334 Reviewed by Sam Weinig. Added test in TestWebKitAPI * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::simplifyMarkup): Exposing the new command through the editor. * editing/Editor.h: 2012-04-06 Benjamin Poulain Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION https://bugs.webkit.org/show_bug.cgi?id=83325 Reviewed by Ryosuke Niwa. The flag WTF_USE_PREEMPT_GEOLOCATION_PERMISSION was added in r63742 but was never disabled by anyone. Supporting this feature added complexity by introducing two authorization scheme. This patch removes WTF_USE_PREEMPT_GEOLOCATION_PERMISSION and the code supporting granting the authorization after startUpdating(). * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::GeoNotifier::runSuccessCallback): With the simplified authorization code, we ensure stronger constraint on GeoNotifier::runSuccessCallback(). (WebCore::Geolocation::stop): (WebCore::Geolocation::startRequest): (WebCore::Geolocation::clearWatch): (WebCore::Geolocation::setIsAllowed): (WebCore::Geolocation::positionChanged): The case (!isAllowed()) was there to support granting the authorization for WTF_USE_PREEMPT_GEOLOCATION_PERMISSION. (WebCore::Geolocation::handlePendingPermissionNotifiers): * Modules/geolocation/Geolocation.h: (Geolocation): 2012-04-06 Tom Sepez Block cross-origin iframe scroll to fragment. https://bugs.webkit.org/show_bug.cgi?id=73083 Reviewed by Adam Barth. Add a restriction similar to what FF has done for all iframes for over a year now. Our change is less disruptive in that it only does this in the cross-orgin case, which is where the fragment scrolling is problematic. Test: http/tests/navigation/anchor-frames-cross-origin.html * dom/Document.cpp: (WebCore::Document::canBeAccessedByEveryAncestorFrame): (WebCore): * dom/Document.h: (Document): * loader/FrameLoader.cpp: (WebCore::FrameLoader::finishedParsing): (WebCore::FrameLoader::loadInSameDocument): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::FrameLoader::shouldPerformFragmentNavigation): (WebCore::FrameLoader::scrollToFragmentIfAllowed): (WebCore): * loader/FrameLoader.h: (FrameLoader): 2012-04-03 Jer Noble Foreground of apple.com/iphone video page visible during full screen animation. https://bugs.webkit.org/show_bug.cgi?id=83080 Reviewed by Simon Fraser. No new tests; updated fullscreen/full-screen-stacking-context.html The apple.com/iphone video page uses a -webkit-mask: CSS style, which creates a stacking context and causes the page to pop in front of the full screen renderer. Add all the styles suggested by the W3C full screen spec to the -webkit-full-screen-ancestor rule to keep these stacking contexts from being created. * css/fullscreen.css: (:-webkit-full-screen-ancestor:not(iframe)): 2012-04-06 Abhishek Arya Virtualize createAnonymousBoxWithSameTypeAs. https://bugs.webkit.org/show_bug.cgi?id=83229 Reviewed by Julien Chaffraix. This helps to use the same function to create anonymous table parts and in the future extend to more classes derived from RenderBox. The current switch case situation was going to be messy as we will need to mix cases that were very dependent on the class, so it made sense to add a virtual function. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::splitAnonymousBlocksAroundChild): (WebCore::RenderBlock::createAnonymousBoxWithSameTypeAs): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.h: (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs): (RenderBox): * rendering/RenderInline.cpp: (WebCore::RenderInline::splitFlow): * rendering/RenderTable.h: (WebCore::RenderTable::createAnonymousBoxWithSameTypeAs): * rendering/RenderTableCell.h: (WebCore::RenderTableCell::createAnonymousBoxWithSameTypeAs): * rendering/RenderTableRow.h: (WebCore::RenderTableRow::createAnonymousBoxWithSameTypeAs): * rendering/RenderTableSection.h: (WebCore::RenderTableSection::createAnonymousBoxWithSameTypeAs): 2012-04-06 Tim Horton [cg] REGRESSION (r101517): Animating the transform of a with shape-rendering: crispEdges leaves behind garbage https://bugs.webkit.org/show_bug.cgi?id=82963 Reviewed by Simon Fraser. CoreGraphics can inflate the stroke by 1px when drawing a rectangle with antialiasing disabled at non-integer coordinates, we need to compensate by inflating the RenderSVGRect repaint bounds by 1px. No new tests, as this is not reproducible in DRT or WKTR. * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::createShape): (WebCore::RenderSVGRect::strokeBoundingBox): * rendering/svg/RenderSVGRect.h: (RenderSVGRect): 2012-04-05 Simon Fraser Avoid trying to set filters on transform layers https://bugs.webkit.org/show_bug.cgi?id=83344 Reviewed by Dean Jackson. Return early from GraphicsLayerCA::setFilters() when the filters haven't changed. This avoids trying to clear filters on CALayers which never had them, which should both help performance, and avoids console spew related to setting shadow properties on transform layers. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setFilters): 2012-04-06 James Robinson WebGL content swapped at wrong time in threaded compositing mode https://bugs.webkit.org/show_bug.cgi?id=82275 Reviewed by Kenneth Russell. When using threaded compositing, we need to defer touching the texture ID being used by the compositor until the appropriate point in the synchronization routine and not before. Specifically, there is no time at which it is safe to manipulate the texture the compositor may be using from the main thread. This breaks up the presentation path into a few pieces (depending on the context attributes) in order to maintain these invariants. Depending on the context attributes and if we're in threaded mode, there are a few different possible back/front buffer combinations: - When the context is antialiased, we have a multisampled renderbuffer and associated framebuffer. - In all cases, we have a color texture back buffer. - When preserveDrawingBuffer is set or threaded compositing is enabled, we have a separate color texture as a front buffer. The resource update is in two phases. First, on the main thread, we prepare the back buffer. This resolves from the multisampled FBO into the back color buffer if multisampled and swaps the front / back color buffer textures if preserveDrawingBuffer is false and we're using separate front / back color buffers. Second, on the compositor thread, we do a texture copy from the back to the front color buffer if preserveDrawingBuffer is true. After these steps are complete the main thread is free to manipulate the back buffer color texture without affecting any resources the compositor is using. One incidental cleanup this patch also does is remove all state queries from DrawingBuffer::clearFramebuffer(). Tests: fast/canvas/webgl/webgl-composite-modes-repaint.html fast/canvas/webgl/webgl-composite-modes.html * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::WebGLRenderingContext): (WebCore::WebGLRenderingContext::clearIfComposited): (WebCore::WebGLRenderingContext::restoreStateAfterClear): (WebCore::WebGLRenderingContext::reshape): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): * platform/graphics/cairo/DrawingBufferCairo.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::generateColorTexture): (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::initialize): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): (WebCore::DrawingBuffer::platformLayer): * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::WebGLLayerChromium): (WebCore::WebGLLayerChromium::paintContentsIfDirty): (WebCore::WebGLLayerChromium::updateCompositorResources): (WebCore::WebGLLayerChromium::paintRenderedResultsToCanvas): (WebCore::WebGLLayerChromium::setNeedsDisplayRect): (WebCore::WebGLLayerChromium::setDrawingBuffer): * platform/graphics/chromium/WebGLLayerChromium.h: (WebGLLayerChromium): * platform/graphics/clutter/DrawingBufferClutter.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::initializeContext): * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::create): (WebCore::DrawingBuffer::clear): (WebCore::DrawingBuffer::clearFramebuffer): (WebCore::DrawingBuffer::reset): (WebCore::DrawingBuffer::discardResources): * platform/graphics/gpu/DrawingBuffer.h: (DrawingBuffer): * platform/graphics/gpu/mac/DrawingBufferMac.mm: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): * platform/graphics/gpu/qt/DrawingBufferQt.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::platformLayer): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore): (WebCore::DrawingBuffer::frontColorBuffer): 2012-04-06 Julien Chaffraix Unreviewed build fix after r113486 and r113487. * rendering/RenderObject.cpp: Added missing #include. * rendering/RenderView.h: Removed bad OVERRIDE. 2012-04-06 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=81939 -webkit-image-set should update dynamically when the device scale factor changes -and corresponding- Reviewed by Darin Adler. New member variable to keep track of the scale factor. * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::CSSImageSetValue): (WebCore::CSSImageSetValue::bestImageForScaleFactor): Merge the two cachedImageSet functions. There was no need for two functions here. (WebCore::CSSImageSetValue::cachedImageSet): cachedOrPendingImageSet() now takes a Document as a parameter so that it can access the deviceScaleFactor. If there is a cached image already and the Document's deviceScaleFactor doesn't match m_scaleFactor, then m_imageSet is set to a pending image so that the best fit image will be reassessed and then loaded. (WebCore::CSSImageSetValue::cachedOrPendingImageSet): * css/CSSImageSetValue.h: (WebCore): (CSSImageSetValue): cachedOrPendingImageSet() now takes a Document. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): StyleCachedImageSet should inherit from CachedImageClient just like StyleCachedImage. It should add and remove itself as a client upon creation and destruction, respectively. * rendering/style/StyleCachedImageSet.cpp: (WebCore::StyleCachedImageSet::StyleCachedImageSet): (WebCore): (WebCore::StyleCachedImageSet::~StyleCachedImageSet): * rendering/style/StyleCachedImageSet.h: (StyleCachedImageSet): 2012-04-06 Levi Weintraub Update LayoutUnit usage in RenderView https://bugs.webkit.org/show_bug.cgi?id=83147 Reviewed by Julien Chaffraix. Updating the usage of LayoutUnits in RenderView in preparation for sub-pixel layout. This mostly affects paint and repaint functions, which take LayoutRects up to the RenderView level. This is necessary as we continue to accumulate sub-pixel offsets up to this level. No new tests. No change in behavior. * rendering/RenderView.cpp: (WebCore::RenderView::paint): Adding an assert that we're being called to paint on pixel boundaries. We don't currently ever position RenderViews at sub-pixel offsets. (WebCore::RenderView::shouldRepaint): (WebCore::RenderView::repaintViewRectangle): Switching to a LayoutRect and cleaning up a fixme that used decomposed offsets. Pixel snapping is applied before handing the rect up to the FrameView. (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): Pixel snapping before handing the rect up to the Compositor. (WebCore::RenderView::computeRectForRepaint): (WebCore::RenderView::selectionBounds): (WebCore::RenderView::viewRect): (WebCore::RenderView::unscaledDocumentRect): * rendering/RenderView.h: (RenderView): 2012-04-06 Tim Horton Add autodetection of image orientation from EXIF information https://bugs.webkit.org/show_bug.cgi?id=19688 and Original patch by David Carson and Eric Seidel. Reviewed by Simon Fraser. Add support for respecting EXIF image orientation, enabled by default for ImageDocuments. The setting shouldRespectImageOrientation causes orientation to take effect for any image included via . Test: fast/images/exif-orientation.html, fast/images/exif-orientation-css.html * WebCore.xcodeproj/project.pbxproj: Add ImageOrientation.{cpp, h} * loader/cache/CachedImage.cpp: (WebCore::CachedImage::imageForRenderer): Plumb setting down from RenderObject into Image. (WebCore::CachedImage::imageSizeForRenderer): * page/Settings.h: (WebCore::Settings::setShouldRespectImageOrientation): (WebCore::Settings::shouldRespectImageOrientation): (Settings): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::cacheFrame): (WebCore::BitmapImage::size): (WebCore::BitmapImage::sizeRespectingOrientation): (WebCore): (WebCore::BitmapImage::ensureFrameIsCached): (WebCore::BitmapImage::frameAtIndex): (WebCore::BitmapImage::frameIsCompleteAtIndex): (WebCore::BitmapImage::frameDurationAtIndex): (WebCore::BitmapImage::frameHasAlphaAtIndex): (WebCore::BitmapImage::frameOrientationAtIndex): * platform/graphics/BitmapImage.h: (WebCore::FrameData::FrameData): (FrameData): (BitmapImage): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/ImageOrientation.cpp: Added. (WebCore): (WebCore::ImageOrientation::transformFromDefault): * platform/graphics/ImageOrientation.h: Added. (WebCore): (ImageOrientation): (WebCore::ImageOrientation::ImageOrientation): (WebCore::ImageOrientation::usesWidthAsHeight): (WebCore::ImageOrientation::fromEXIFValue): (WebCore::ImageOrientation::operator==): (WebCore::ImageOrientation::operator!=): * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::orientationAtIndex): (WebCore): * platform/graphics/ImageSource.h: (WebCore): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): Transform the image while drawing if its orientation requires it. * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/cg/ImageCG.cpp: (WebCore::FrameData::clear): (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::draw): * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::imageSourceOptions): Don't use SkipMetaData on Lion/Snow Leopard, as it prevents us from retrieving orientation data. (WebCore::ImageSource::frameSizeAtIndex): Adjust the image's size based on its orientation. (WebCore): (WebCore::ImageSource::orientationAtIndex): (WebCore::ImageSource::size): * platform/graphics/mac/DragImageMac.mm: (createDragImageFromImage): Create scaled copy of image for drag image if we're respecting orientation and it is non-default. * rendering/RenderObject.h: (RenderObject): (WebCore::RenderObject::shouldRespectImageOrientation): 2012-04-06 Levi Weintraub Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle https://bugs.webkit.org/show_bug.cgi?id=83376 Reviewed by Eric Seidel. Correcting LayoutUnit usage in QT RenderTheme code. No new tests. No change in behavior. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::convertToPaintingRect): Rounding the ancestor offset before applying it to the pixel snapped partRect. (WebCore::RenderThemeQt::paintSearchFieldCancelButton): Also rounding the ancestor offset, and also pixel snapping the content rect before painting. 2012-04-06 Kenneth Russell context-lost.html is failing https://bugs.webkit.org/show_bug.cgi?id=81325 Reviewed by James Robinson. Ensure that the DrawingBuffer does not attempt to restore the TEXTURE_2D binding to an already-deleted texture. Tested with layout test fast/canvas/webgl/context-lost.html as well as WebGL conformance tests. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::loseContextImpl): 2012-04-06 Sheriff Bot Unreviewed, rolling out r113267. http://trac.webkit.org/changeset/113267 https://bugs.webkit.org/show_bug.cgi?id=83384 causes dhtml perf regression (Requested by simonjam on #webkit). * dom/ChildListMutationScope.cpp: (ChildListMutationScope::MutationAccumulator): (WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder): (WebCore::ChildListMutationScope::MutationAccumulator::childAdded): (WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded): * dom/ChildListMutationScope.h: (WebCore::ChildListMutationScope::childAdded): (MutationAccumulationRouter): * dom/ContainerNode.cpp: (WebCore): (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::appendChild): (WebCore::dispatchChildInsertionEvents): (WebCore::updateTreeAfterInsertion): 2012-04-06 Joshua Bell IndexedDB: ObjectStore/Index shouldn't hold reference to backing store https://bugs.webkit.org/show_bug.cgi?id=83074 We should be able to collect and close the leveldb backing store as soon as the database connection is closed, but the IDBObjectStoreBackendImpl and IDBIndexBackendImpl were holding RefPtrs, and those objects are kept alive by script references. Replaced RefPtrs to the IDBBackingStore with pointers to the IDBDatabase. On the back end, IDBDatabaseBackendImpl maintains a RefPtr to the IDBObjectStoreBackendImpl object, so a raw pointer back is safe. On the front end, the IDBObjectStore maintains a RefPtr to the IDBDatabase so script can navigate upwards. Ditto on both ends for the ObjectStore/Index relationship. The frontend objects maintain RefPtrs to the backend objects, so the backend objects and their owners are maintained as long as there's a script reference. Also made IDBDatabaseBackendImpl handle a null IDBFactoryBackendImpl pointer, for testing. Reviewed by Tony Chang. Tests: webkit_unit_tests --gtest_filter="IDBDatabaseBackendTest.*" * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::loadObjectStores): * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): (WebCore::IDBIndexBackendImpl::openCursorInternal): (WebCore::IDBIndexBackendImpl::countInternal): (WebCore::IDBIndexBackendImpl::getInternal): (WebCore::IDBIndexBackendImpl::addingKeyAllowed): * Modules/indexeddb/IDBIndexBackendImpl.h: (WebCore::IDBIndexBackendImpl::create): (IDBIndexBackendImpl): (WebCore::IDBIndexBackendImpl::backingStore): (WebCore::IDBIndexBackendImpl::databaseId): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): (WebCore::IDBObjectStoreBackendImpl::getInternal): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::deleteInternal): (WebCore::IDBObjectStoreBackendImpl::clearInternal): (WebCore): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::createIndexInternal): (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal): (WebCore::IDBObjectStoreBackendImpl::openCursorInternal): (WebCore::IDBObjectStoreBackendImpl::countInternal): (WebCore::IDBObjectStoreBackendImpl::loadIndexes): (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (WebCore::IDBObjectStoreBackendImpl::create): (IDBObjectStoreBackendImpl): (WebCore::IDBObjectStoreBackendImpl::backingStore): (WebCore::IDBObjectStoreBackendImpl::databaseId): 2012-04-06 Jon Lee Fix build warning on const long long to int implicit conversion. * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): 2012-04-06 Emil A Eklund Fix LayoutUnit usage and rounding in RenderBlock and RenderEmbeddedObject https://bugs.webkit.org/show_bug.cgi?id=83343 Reviewed by Eric Seidel. Fix usage of LayoutUnits and rounding/pixel snapping in RenderBlock and RenderEmbeddedObject in preparation for turing on subpixel support. No new tests, no change in functionality. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::baselinePosition): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::nodeAtPoint): 2012-04-06 Dan Bernstein HiDPI: Have canvas use a hidpi backing store, but downsample upon access Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: Added ENABLE_HIGH_DPI_CANVAS. 2012-04-06 Levi Weintraub Update LayoutUnit usage in Editor and Frame https://bugs.webkit.org/show_bug.cgi?id=83278 Reviewed by Eric Seidel. Frame and Editor both take input from the embedder, which passes along coordinates in screen coordinates, which aren't fractional. Updating a few remaining functions to show this, and correcting some inconsistencies in LayoutUnit usage. No new tests. No change in behavior. * editing/Editor.cpp: (WebCore::Editor::rangeForPoint): windowToContents returns an IntPoint. (WebCore::Editor::countMatchesForText): Using enclosingIntRect since we're (fake) repainting the entire view rect. * editing/Editor.h: (Editor): Correcting mismatched function signature. * page/Frame.cpp: (WebCore::Frame::visiblePositionForPoint): Frame takes points in screen coordinates, usually from the embedder. Changing these functions to be in IntPoints. (WebCore::Frame::documentAtPoint): Ditto. (WebCore::Frame::rangeForPoint): Ditto. * page/Frame.h: (Frame): * platform/graphics/IntRect.h: (enclosingIntRect): Adding an inline no-op copy of the FractionalLayoutRect method enclosingIntRect. 2012-04-06 Tommy Widenflycht MediaStream API: Deleting the chromium bridge class MediaStreamCenterInternal https://bugs.webkit.org/show_bug.cgi?id=83167 Reviewed by Adam Barth. The situation before this patch is that we had a MediaStreamCenter.h with #ifdefs for the chromium specific private class MediaStreamCenterInternal. This bridge class only shuffled calls between MediaStreamCenter and WebMediaStreamCenter and was needed before the introduction of Platform. To get rid of this now unnecessary class I had two alternatives: 1) Sprinkle platform/MediaStreamCenter.h with more #ifdefs, including around the class declaration. 2) Create an abstract base class that the chromium and gstreamer implementations overrides. My personal preference is 2) since I strongly dislike #ifdefs. The drawback is that MediaStreamCenter now has a vtable. However since all methods in this class are extremely low-usage it doesn't affect anything in practice. No code behaviour changes. * GNUmakefile.am: * GNUmakefile.list.am: * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::setEnabled): * Modules/mediastream/UserMediaRequest.cpp: * Modules/mediastream/UserMediaRequest.h: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/chromium/support/WebMediaStreamSourcesRequest.cpp: * platform/mediastream/MediaStreamCenter.cpp: (WebCore::MediaStreamCenter::MediaStreamCenter): (WebCore): (WebCore::MediaStreamCenter::~MediaStreamCenter): * platform/mediastream/MediaStreamCenter.h: (WebCore): (MediaStreamCenter): * platform/mediastream/MediaStreamSourcesQueryClient.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.h. (WebCore): (MediaStreamSourcesQueryClient): (WebCore::MediaStreamSourcesQueryClient::~MediaStreamSourcesQueryClient): * platform/mediastream/chromium/MediaStreamCenterChromium.cpp: (WebCore::MediaStreamCenter::instance): (WebCore::MediaStreamCenterChromium::MediaStreamCenterChromium): (WebCore::MediaStreamCenterChromium::~MediaStreamCenterChromium): (WebCore::MediaStreamCenterChromium::queryMediaStreamSources): (WebCore::MediaStreamCenterChromium::didSetMediaStreamTrackEnabled): (WebCore::MediaStreamCenterChromium::didStopLocalMediaStream): (WebCore::MediaStreamCenterChromium::didConstructMediaStream): (WebCore::MediaStreamCenterChromium::constructSDP): (WebCore): (WebCore::MediaStreamCenterChromium::stopLocalMediaStream): * platform/mediastream/chromium/MediaStreamCenterChromium.h: Renamed from Source/WebCore/platform/mediastream/chromium/MediaStreamCenterInternal.h. (WebKit): (WebCore): (MediaStreamCenterChromium): * platform/mediastream/chromium/MediaStreamCenterInternal.cpp: Removed. * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.cpp. (WebCore): (WebCore::MediaStreamCenter::instance): (WebCore::MediaStreamCenterGStreamer::MediaStreamCenterGStreamer): (WebCore::MediaStreamCenterGStreamer::~MediaStreamCenterGStreamer): (WebCore::MediaStreamCenterGStreamer::queryMediaStreamSources): (WebCore::MediaStreamCenterGStreamer::didSetMediaStreamTrackEnabled): (WebCore::MediaStreamCenterGStreamer::didStopLocalMediaStream): (WebCore::MediaStreamCenterGStreamer::didConstructMediaStream): (WebCore::MediaStreamCenterGStreamer::constructSDP): * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.h. (WebCore): (MediaStreamCenterGStreamer): 2012-04-05 Simon Fraser Should disable preserves3D() for things that enforce flattening, like overflow and filters https://bugs.webkit.org/show_bug.cgi?id=83337 Reviewed by Dean Jackson. The CSS3 Transforms spec says that some properties should cause flattening of things with transform-style: preserve-3d. We currently do this as a side effect of the GraphicsLayer structure, but we should really do it at the RenderStyle level, as we do for other things like stacking context creation. Test: compositing/overflow-trumps-transform-style.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-04-06 Tommy Widenflycht MediaStream API: MediaStreams stops proper cleanup to take place during a page reload. https://bugs.webkit.org/show_bug.cgi?id=83143 Reviewed by Adam Barth. To fix this I have converted MediaStream and LocalMediaStream to be ActiveDOMObjects. Have no idea how to write a test that succesfully verifies this. I have done manual testing to verify that proper tear-down now takes place. * Modules/mediastream/LocalMediaStream.cpp: (WebCore::LocalMediaStream::create): (WebCore::LocalMediaStream::stopFunction): (WebCore): * Modules/mediastream/LocalMediaStream.h: (LocalMediaStream): * Modules/mediastream/LocalMediaStream.idl: * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::create): (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::scriptExecutionContext): * Modules/mediastream/MediaStream.h: (MediaStream): 2012-04-06 Dan Bernstein Pixel access canvas APIs do not work transparently with high-DPI backing store https://bugs.webkit.org/show_bug.cgi?id=83072 Reviewed by Simon Fraser. Made getImageData, putImageData, and toDataURL downsample/upsample when pixels in the canvas backing store are not in a 1:1 ratio to CSS pixels. This makes clients of these APIs indifferent to the backing store resolution, up to sampling artifacts. In order for this to work, ImageBuffer has to know and respect the resolutionScale parameter. This change makes the Core Graphics-based implementation of ImageBuffer do this, but on other platforms, resolutionScale values other than 1 will not work. Such platforms should not enable the HIGH_DPI_CANVAS feature. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): Updated a comment. (WebCore::HTMLCanvasElement::createImageBuffer): Changed to create an ImageBuffer with the desired resolution instead of 1. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): Removed code that scaled the source rect, since this is now handled at the ImageBuffer level. (WebCore::CanvasRenderingContext2D::createImageData): Now returns ImageData of the requested size regardless of the backing store resolution. (WebCore::CanvasRenderingContext2D::getImageData): Ditto. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::create): Removed some code that tried to apply the resolution scale to the buffer after creating it, and changed to pass the resolution scale down to the (platform-specific) constructor, which can apply it correctly. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): Added a resolutionScale parameter, which is used to compute the backing buffer size, and to apply a device scale factor to the context. (WebCore::ImageBuffer::copyImage): Changed to return an image scaled down to the logical size of the buffer. (WebCore::ImageBuffer::getUnmultipliedImageData): Changed to pass the resolution scale to ImageData::getData(). (WebCore::ImageBuffer::getPremultipliedImageData): Ditto. (WebCore::ImageBuffer::putByteArray): Changed to pass the resolution scale to ImageData::putData(). When drawing the byte array as an image, changed to preserve the base CTM in the destination context (thus mapping from image data pixels to backing store pixels). (WebCore::ImageBuffer::toDataURL): Fixed a CGColorSpace leak. Made the returned image have the buffer’s logical size instead of the backing buffer’s size. (WebCore::ImageDataToDataURL): Fixed a CGColorSpace leak. * platform/graphics/cg/ImageBufferDataCG.cpp: (WebCore::ImageBufferData::getData): Added a resolutionScale parameter. The source coordinates are scaled by the value of that parameter, and a reverse scaling transform is applied when copying from the backing store into the destination (either explicitly using Accelerate or implicitly by drawing as an image). Since after scaling, unpremultiplication and component permutation are done in-place, made the non-Accelerate code that does these things safe in this case. (WebCore::ImageBufferData::putData): Added a resolutionScale parameter. The destination coordinates are scaled by the value of that parameter, and a scaling transform is applied when copying from the source into the backing store (either explicitly using Accelerate or implicitly by drawing as an image). Since after scaling, premultiplication and component permutation are done in-place, made the non-Accelerate code that does these things safe in this case. * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::ImageBuffer): 2012-04-06 Dana Jansens [chromium] Draw debug borders for tiles on layers with skipsDraw https://bugs.webkit.org/show_bug.cgi?id=83352 Reviewed by Adrienne Walker. The tiles are given the same color as other missing tiles. * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): 2012-04-06 Rob Buis Fix cast-align warnings in JSC https://bugs.webkit.org/show_bug.cgi?id=80790 Reviewed by George Staikos. * platform/graphics/WOFFFileFormat.cpp: (WebCore::readUInt32): (WebCore::readUInt16): * platform/image-encoders/skia/JPEGImageEncoder.cpp: (WebCore::preMultipliedBGRAtoRGB): * platform/network/MIMESniffing.cpp: 2012-04-06 Darin Adler Streamline strtod and fix some related problems https://bugs.webkit.org/show_bug.cgi?id=82857 Reviewed by Geoffrey Garen. Refactoring of code covered by existing tests. * dom/ViewportArguments.cpp: (WebCore::numericPrefix): Removed a confusing comment that just said "we tolerate extra characters" in a roundabout way. Made the "ok" argument optional. Changed to call the new version of charactersToFloat that returns the number of characters parsed rather than using the charactersToFloatIgnoringJunk/didReadNumber solution from before. (WebCore::findSizeValue): Since numericPrefix is guaranteed to return 0 when it can't parse, removed the "ok" code. Also changed the unusual syntax "float(1.0)" to just "1", which works just as well. (WebCore::findScaleValue): Ditto. (WebCore::findUserScalableValue): Ditto. * html/parser/HTMLParserIdioms.cpp: (WebCore::parseToDoubleForNumberType): Removed an unneeded code path and replaced it with an assertion; toDouble no longer will return infinity or not-a-number values. 2012-04-06 Dana Jansens [chromium] Surface replica should have a separate quad in the render pass https://bugs.webkit.org/show_bug.cgi?id=83287 Reviewed by Adrienne Walker. Generate separate quads for a RenderSurface and its replica. The replica quad is drawn independently of the surface itself. This allows us to cull each one independently. Covered by existing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::setScissorRect): (WebCore): (WebCore::CCRenderSurface::drawContents): (WebCore::CCRenderSurface::drawReplica): (WebCore::CCRenderSurface::hasReplica): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: (WebCore::CCRenderSurfaceDrawQuad::create): (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: (CCRenderSurfaceDrawQuad): (WebCore::CCRenderSurfaceDrawQuad::isReplica): 2012-04-05 Martin Robinson [GObject bindings] Fix the coding style issues in the generated bindings https://bugs.webkit.org/show_bug.cgi?id=82080 Reviewed by Kentaro Hara. No new tests. This is covered by the binding tests. * bindings/scripts/CodeGeneratorGObject.pm: Fix most style errors in the generated GObject code. * bindings/scripts/test/GObject: Updated the expected results. 2012-04-06 Adam Klein Remove bogus assert from ChildListMutationScope https://bugs.webkit.org/show_bug.cgi?id=83336 Reviewed by Ryosuke Niwa. This assert can trivially be triggered from script, but luckily the code already behaves correctly without it. * dom/ChildListMutationScope.cpp: (WebCore::ChildListMutationScope::MutationAccumulator::enqueueMutationRecord): 2012-04-06 Sheriff Bot Unreviewed, rolling out r113442. http://trac.webkit.org/changeset/113442 https://bugs.webkit.org/show_bug.cgi?id=83373 for breaking JSC bindings compilation (Requested by pfeldman on #webkit). * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * UseV8.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMutationCallbackCustom.cpp: Added. (WebCore): (WebCore::JSMutationCallback::handleEvent): * bindings/scripts/CodeGenerator.pm: * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForTypeInImpl): (GenerateCallbackHeader): (GenerateCallbackImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateCallbackHeader): (GenerateCallbackImplementation): * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::callbackWithBoolean): * bindings/scripts/test/JS/JSTestCallback.h: (JSTestCallback): * bindings/scripts/test/TestCallback.idl: * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithBoolean): * bindings/scripts/test/V8/V8TestCallback.h: (V8TestCallback): * bindings/v8/custom/V8MutationCallbackCustom.cpp: Added. (WebCore): (WebCore::V8MutationCallback::handleEvent): * dom/MutationCallback.idl: 2012-04-06 Zan Dobersek [Gtk] Unskip the video track tests https://bugs.webkit.org/show_bug.cgi?id=82590 Reviewed by Martin Robinson. Enable the video track runtime feature for the Gtk port as well. No new tests - existing ones will be unskipped. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): 2012-04-06 Michael Saboff Call Heap::discardAllCompiledCode() in low memory situations https://bugs.webkit.org/show_bug.cgi?id=83335 Reviewed by Geoffrey Garen. Added call to discardAllCompiledCode() when under memory pressure. We can re-JIT as needed. This is similar to what we used to do when we did a full GC which also cleaned up JIT code. Doing a full GC typically didn't help our memory situation, in fact it made things worse in the really low memory situation as it caused more paging. Added pass through discardAllCompiledCode() method to GCController. * bindings/js/GCController.cpp: (WebCore::GCController::discardAllCompiledCode): (WebCore): * bindings/js/GCController.h: (GCController): * platform/mac/MemoryPressureHandlerMac.mm: (WebCore::MemoryPressureHandler::releaseMemory): 2012-04-06 Andrey Kosyakov Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor https://bugs.webkit.org/show_bug.cgi?id=82616 Reviewed by Pavel Feldman. - center minimal selection on mouse cursor if the mouse hasn't moved (i.e. we had a click, not drag) * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging): 2012-04-06 Vineet Chaudhary Add CodeGenerator support for sequence<> in callbacks. https://bugs.webkit.org/show_bug.cgi?id=83233 Reviewed by Kentaro Hara. Tests: TestCallback.idl and fast/mutation/callback-arguments.html should pass even after the changes. * GNUmakefile.list.am: Removed unsued custom files V8MutationCallbackCustom.cpp and JSMutationCallbackCustom.cpp from builds. * Target.pri: Ditto. * UseJSC.cmake: Ditto. * UseV8.cmake: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSMutationCallbackCustom.cpp: Removed. * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForTypeInImpl): Add proper header type. (GenerateCallbackHeader): Generate declaration for the callback with sequence argument. (GenerateCallbackImplementation): Generate implementation for the callback with sequence argument. * bindings/scripts/CodeGeneratorV8.pm: (GenerateCallbackHeader): Generate declaration for the callback with sequence argument. (GenerateCallbackImplementation): Generate implementation for the callback with sequence argument. * bindings/scripts/test/JS/JSTestCallback.cpp: Modified test results of run-bindings-tests. (WebCore): (WebCore::JSTestCallback::handleEvent): * bindings/scripts/test/JS/JSTestCallback.h: Modified test results of run-bindings-tests. (JSTestCallback): * bindings/scripts/test/TestCallback.idl: Added test callback with sequence<> argument. * bindings/scripts/test/V8/V8TestCallback.cpp: Modified test results of run-bindings-tests. (WebCore): (WebCore::V8TestCallback::handleEvent): * bindings/scripts/test/V8/V8TestCallback.h: Modified test results of run-bindings-tests. (V8TestCallback): * bindings/v8/custom/V8MutationCallbackCustom.cpp: Removed. * dom/MutationCallback.idl: Removed custom bindings using sequence. 2012-04-06 Sheriff Bot Unreviewed, rolling out r113431. http://trac.webkit.org/changeset/113431 https://bugs.webkit.org/show_bug.cgi?id=83372 for breaking at least Chromium compilation (Requested by pfeldman on #webkit). * rendering/RenderView.cpp: (WebCore::RenderView::paint): (WebCore::RenderView::shouldRepaint): (WebCore::RenderView::repaintViewRectangle): (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): (WebCore::RenderView::computeRectForRepaint): (WebCore::RenderView::selectionBounds): (WebCore::RenderView::viewRect): (WebCore::RenderView::unscaledDocumentRect): * rendering/RenderView.h: (RenderView): 2012-04-06 Peter Rybin Web Inspector: CodeGeneratorInspector.py: completely switch all domains to 'strict' mode https://bugs.webkit.org/show_bug.cgi?id=83332 Reviewed by Pavel Feldman. Hardcoded list of domains is removed from generator. Partial domain sorting is dropped as unneeded. Types with open propery list are introduced: validator allows undocumented properties for them. Timeline domain code is patched to do runtimeCast in the last moment because true switching to type-safe interfaces should take significant time and should be done separately. * inspector/CodeGeneratorInspector.py: (Generator.go): (Generator.process_event): (Generator.process_command): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): 2012-04-06 Peter Rybin Web Inspector: CodeGeneratorInspector.py: stop accepting raw InspectorObject in generated setters https://bugs.webkit.org/show_bug.cgi?id=83327 Reviewed by Pavel Feldman. Generator fixed to have strict types in generated setter methods. Client code is switched from InspectorObject's and String's to generated types where needed. * inspector/CodeGeneratorInspector.py: (AdHocTypeContext): (format_setter_value_expression): * inspector/ConsoleMessage.cpp: (WebCore::messageSourceValue): (WebCore::messageTypeValue): (WebCore::messageLevelValue): (WebCore::ConsoleMessage::addToFrontend): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources): (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): * inspector/InspectorApplicationCacheAgent.h: (InspectorApplicationCacheAgent): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForNode): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): * inspector/InspectorMemoryAgent.cpp: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrameTree): * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForTiming): (WebCore::buildObjectForCachedResource): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::resourceStyleSheetText): (WebCore::InspectorStyleSheet::buildArrayForRuleList): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: (InspectorCSSId): (WebCore::InspectorCSSId::asProtocolValue): method is made template as now it returns 2 formally different types. (InspectorStyleSheet): (WebCore::InspectorStyleSheet::canBind): (InspectorStyleSheetForInlineStyle): 2012-04-06 Pavel Feldman Web Inspector: highlight diff in the gutter, not in the line content. https://bugs.webkit.org/show_bug.cgi?id=83371 Reviewed by Yury Semikhatsky. Now that the editing mode is enabled by default, diff highlighting gets annoying. I am moving it to the gutter (same decoration as before, but now coloring gutter only). * inspector/front-end/TextViewer.js: (WebInspector.TextEditorGutterPanel.prototype.textChanged): * inspector/front-end/textViewer.css: (.diff-container .webkit-added-line.webkit-line-number): (.diff-container .webkit-removed-line.webkit-line-number): (.diff-container .webkit-changed-line.webkit-line-number): 2012-04-06 Peter Rybin Web Inspector: CodeGeneratorInspector.py: stop accepting raw InspectorObject in generated setters https://bugs.webkit.org/show_bug.cgi?id=83327 Reviewed by Pavel Feldman. Generator fixed to have strict types in generated setter methods. Client code is switched from InspectorObject's and String's to generated types where needed. * inspector/CodeGeneratorInspector.py: (AdHocTypeContext): (format_setter_value_expression): * inspector/ConsoleMessage.cpp: (WebCore::messageSourceValue): (WebCore::messageTypeValue): (WebCore::messageLevelValue): (WebCore::ConsoleMessage::addToFrontend): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources): (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): * inspector/InspectorApplicationCacheAgent.h: (InspectorApplicationCacheAgent): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForNode): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): * inspector/InspectorMemoryAgent.cpp: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrameTree): * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForTiming): (WebCore::buildObjectForCachedResource): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::resourceStyleSheetText): (WebCore::InspectorStyleSheet::buildArrayForRuleList): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: (InspectorCSSId): (WebCore::InspectorCSSId::asProtocolValue): method is made template as now it returns 2 formally different types. (InspectorStyleSheet): (WebCore::InspectorStyleSheet::canBind): (InspectorStyleSheetForInlineStyle): 2012-04-06 Pavel Feldman Web Inspector: highlight diff in the gutter, not in the line content. https://bugs.webkit.org/show_bug.cgi?id=83371 Reviewed by Yury Semikhatsky. Now that the editing mode is enabled by default, diff highlighting gets annoying. I am moving it to the gutter (same decoration as before, but now coloring gutter only). * inspector/front-end/TextViewer.js: (WebInspector.TextEditorGutterPanel.prototype.textChanged): * inspector/front-end/textViewer.css: (.diff-container .webkit-added-line.webkit-line-number): (.diff-container .webkit-removed-line.webkit-line-number): (.diff-container .webkit-changed-line.webkit-line-number): 2012-04-06 Pavel Feldman Web Inspector: highlight diff in the gutter, not in the line content. https://bugs.webkit.org/show_bug.cgi?id=83371 Reviewed by Yury Semikhatsky. Now that the editing mode is enabled by default, diff highlighting gets annoying. I am moving it to the gutter (same decoration as before, but now coloring gutter only). * inspector/front-end/TextViewer.js: (WebInspector.TextEditorGutterPanel.prototype.textChanged): * inspector/front-end/textViewer.css: (.diff-container .webkit-added-line.webkit-line-number): (.diff-container .webkit-removed-line.webkit-line-number): (.diff-container .webkit-changed-line.webkit-line-number): 2012-04-06 Pavel Feldman Web Inspector: remove url from the saved urls map before the save action. https://bugs.webkit.org/show_bug.cgi?id=83364 Reviewed by Yury Semikhatsky. URL gets added back upon successful save anyways, but if user chooses cancel saving, we stop bugging him with the save-as dialog. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._exportAll): (WebInspector.NetworkLogView.prototype._exportResource): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameResourceTreeElement.prototype._appendSaveAsAction.doSave): (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.doSave): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._contextMenu): (WebInspector.TextViewer.prototype._commitEditing): * inspector/front-end/TimelineModel.js: (WebInspector.TimelineModel.prototype.saveToFile): * inspector/front-end/inspector.js: 2012-04-06 Andrey Kosyakov Web Inspector: display frame details in popover on frame strip in Timeline panel https://bugs.webkit.org/show_bug.cgi?id=83365 Reviewed by Pavel Feldman. - added popovers for frame strips; - factored out generateAggregatedInfo for reuse in the above; - made frame event dividers thinner, darker and greyer. * English.lproj/localizedStrings.js: Added "FPS" and "Frame" * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._flushFrame): added startTimeOffset. (WebInspector.TimelineFrameController.prototype._createSyntheticFrame): ditto. * inspector/front-end/TimelineModel.js: (WebInspector.TimelineModel.prototype._updateBoundaries): (WebInspector.TimelineModel.prototype.recordOffsetInSeconds): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._updateFrames): added link to frame to strip div. (WebInspector.TimelinePanel.prototype._refresh): (WebInspector.TimelinePanel.prototype._getPopoverAnchor): handle frame anchors separately. (WebInspector.TimelinePanel.prototype._mouseMove): ditto. (WebInspector.TimelinePanel.prototype._showPopover): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): (WebInspector.TimelinePresentationModel._generateAggregatedInfo): factored out for reuse. (WebInspector.TimelinePresentationModel.generatePopupContentForFrame): * inspector/front-end/inspectorCommon.css: (.resources-dividers-label-bar): * inspector/front-end/timelinePanel.css: (.timeline .resources-event-divider.timeline-frame-divider): made divider thin and grey. (.timeline-frame-strip): bumped z-index, added pointer-events: auto. 2012-04-06 Pavel Feldman Web Inspector: show "dirty" flag for CSS files edited in the resources panel. https://bugs.webkit.org/show_bug.cgi?id=83363 Reviewed by Yury Semikhatsky. Added TextEdited notification into the editable source frame, listening to it in the resources panel. * inspector/front-end/ResourceView.js: (WebInspector.EditableResourceSourceFrame.prototype._contentChanged): (WebInspector.EditableResourceSourceFrame.prototype.isDirty): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameResourceTreeElement.prototype._appendRevision): (WebInspector.FrameResourceTreeElement.prototype.sourceView): (WebInspector.FrameResourceTreeElement.prototype._sourceViewTextEdited): 2012-04-06 Levi Weintraub Update LayoutUnit usage in RenderView https://bugs.webkit.org/show_bug.cgi?id=83147 Reviewed by Julien Chaffraix. Updating the usage of LayoutUnits in RenderView in preparation for sub-pixel layout. This mostly affects paint and repaint functions, which take LayoutRects up to the RenderView level. This is necessary as we continue to accumulate sub-pixel offsets up to this level. No new tests. No change in behavior. * rendering/RenderView.cpp: (WebCore::RenderView::paint): Adding an assert that we're being called to paint on pixel boundaries. We don't currently ever position RenderViews at sub-pixel offsets. (WebCore::RenderView::shouldRepaint): (WebCore::RenderView::repaintViewRectangle): Switching to a LayoutRect and cleaning up a fixme that used decomposed offsets. Pixel snapping is applied before handing the rect up to the FrameView. (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): Pixel snapping before handing the rect up to the Compositor. (WebCore::RenderView::computeRectForRepaint): (WebCore::RenderView::selectionBounds): (WebCore::RenderView::viewRect): (WebCore::RenderView::unscaledDocumentRect): * rendering/RenderView.h: (RenderView): 2012-04-06 Andrey Kosyakov Web Inspector: hide popover on mouseout from anchor https://bugs.webkit.org/show_bug.cgi?id=83362 Reviewed by Pavel Feldman. - start hide popover timer when mouse moves out of popover anchor, as we won't receive mousemove events any more; - factored out starting of popover kill timer to a method. * inspector/front-end/Popover.js: (WebInspector.PopoverHelper): (WebInspector.PopoverHelper.prototype._mouseMove): Factored out StartHidePopoverTimer() (WebInspector.PopoverHelper.prototype._mouseOut): Just call StartHidePopoverTimer() when mouse moves out of anchor. (WebInspector.PopoverHelper.prototype._startHidePopoverTimer.doHide): (WebInspector.PopoverHelper.prototype._startHidePopoverTimer): (WebInspector.PopoverHelper.prototype._hidePopover): Reset hoverElement (aka anchor) when hiding popover. 2012-04-06 Andrey Kosyakov [Chromium] Web Inspector: getEventListeners(window) crashes on NTP https://bugs.webkit.org/show_bug.cgi?id=83353 Reviewed by Pavel Feldman. * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::getEventListenersCallback): 2012-04-06 Kent Tamura Touch ChromeClient.h to fix Chromium build. https://bugs.webkit.org/show_bug.cgi?id=83258 * page/ChromeClient.h: 2012-04-06 Kent Tamura Initial LocalizedDateICU.cpp implementation https://bugs.webkit.org/show_bug.cgi?id=60868 Reviewed by Hajime Morita. Add LocalizedDateICU.cpp, which supports only Date type. It uses a short format because a date field is keyboard-editable. e.g. 5/15/11 in US locale. * WebCore.gyp/WebCore.gyp: Exclude LocalizedDateNone.cpp. * WebCore.gypi: Add LocalizedDateICU.cpp. * platform/text/LocalizedDateICU.cpp: Added. (WebCore::parseLocalizedDate): (WebCore::formatLocalizedDate): 2012-04-05 Alexander Pavlov [REGRESSION] Refreshed autofill popup renders garbage https://bugs.webkit.org/show_bug.cgi?id=83255 http://code.google.com/p/chromium/issues/detail?id=118374 The code used to update only the PopupContainer coordinates as if they were the coordinates relative to the root view. Instead, a WebWidget positioned relative to the screen origin holds the PopupContainer, so it is the WebWidget that should be positioned in PopupContainer::refresh(), and the PopupContainer's location should be (0, 0) (and their sizes should always be equal). Reviewed by Kent Tamura. No new tests, as the popup appearance is not testable in WebKit. * platform/chromium/PopupContainer.cpp: (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Variable renamed. (WebCore::PopupContainer::showPopup): Use m_originalFrameRect rather than frameRect() for passing into chromeClient. (WebCore::PopupContainer::showInRect): Set up the correct frameRect() for the container. (WebCore::PopupContainer::refresh): Resize the container and position the WebWidget correctly. * platform/chromium/PopupContainer.h: (PopupContainer): 2012-04-06 Kent Tamura Calendar Picker: Add code to open/close the calendar picker https://bugs.webkit.org/show_bug.cgi?id=83258 Reviewed by Hajime Morita. No new tests. This code is not used because of no ENABLE_INPUT_TYPE_DATE. * WebCore.gypi: Add existing header files. * html/DateInputType.cpp: (WebCore::DateInputType::DateInputType): Moved from DateInputType.h because the constructor depends on CalendarPickerElement. (WebCore::DateInputType::createShadowSubtree): Store a CalendarPickerElement object. (WebCore::DateInputType::destroyShadowSubtree): Release the CalendarPickerElement object. (WebCore::DateInputType::handleBlurEvent): Close the calendar picker when the input loses focus. * html/DateInputType.h: (DateInputType): - Move the constructor definition to DateInputType.cpp - Add function declarations - Add m_pickerElement data member. * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::hostInput): A helper to get the host . (WebCore::CalendarPickerElement::defaultEventHandler): If the element is clicked, open a calendar picker. (WebCore::CalendarPickerElement::openPopup): Opens a calendar picker by ChromeClient::openPagePopup(). (WebCore::CalendarPickerElement::closePopup): Closes a calendar picker by ChromeClient::closePagePopup(). (WebCore::CalendarPickerElement::detach): Closes a calendar picker when the element loses a renderer. (WebCore::CalendarPickerElement::contentSize): Provides the initial size of a popup. (WebCore::addString): A helper for writeDocument(). (WebCore::addJavaScriptString): ditto. (WebCore::addProperty): ditto. (WebCore::CalendarPickerElement::writeDocument): Provides the source of a popup. The function creates a complete HTML with: - WebCore/Resources/calendarPicker.css - WebCore/Resources/calendarPicker.js - An object to pass localization strings and state (WebCore::CalendarPickerElement::setValueAndClosePopup): Sets the value from a calendar picker to the . (WebCore::CalendarPickerElement::didClosePopup): Clear the popup object. * html/shadow/CalendarPickerElement.h: (CalendarPickerElement): Add declarations. * platform/text/LocalizedCalendarICU.cpp: (WebCore::getFirstDayOfWeek): Make sure this is 0-base. UCAL_SUNDAY is 1. 2012-04-05 Adele Peterson and https://bugs.webkit.org/show_bug.cgi?id=74129 REGRESSION (SnowLeopard, 5.1.4): All WK2 horizontal scrollbars look broken Patch by Dan Bernstein, Reviewed by Beth Dakin. This code assumed that the current CTM wouldn't have extraneous operations built into it, but this bug is evidence that that assumption was wrong. We should just get the base CTM instead and apply the device scale factor to it. No tests added since the SnowLeopard-style scrollbars aren't testable in our regression tests right now. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): (WebCore::GraphicsContext::applyDeviceScaleFactor): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): 2012-04-05 Yuta Kitamura Leak in WebSocketChannel with workers/worker-reload.html https://bugs.webkit.org/show_bug.cgi?id=83345 Reviewed by David Levin. A speculative fix of memory leaks caused by worker-reload.html. No new tests, as this change imposes no functional change. * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy): Receive the peer as PassOwnPtr<> so the destructor of the task object can delete the peer even if the task didn't run before main thread's cleanup period. (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect): * Modules/websockets/WorkerThreadableWebSocketChannel.h: (WorkerThreadableWebSocketChannel): 2012-04-05 Lu Guanqun combine two arrays (coreExceptionNames and coreExceptionDescriptions) into one array https://bugs.webkit.org/show_bug.cgi?id=83141 Reviewed by Adam Barth. No new tests required. * dom/DOMCoreException.cpp: (CoreException): (WebCore): (WebCore::DOMCoreException::initializeDescription): 2012-04-05 David Barton Remove intrinsic padding from contentBoxRect(), etc. https://bugs.webkit.org/show_bug.cgi?id=83092 Reviewed by Julien Chaffraix. "Intrinsic padding" does not count as CSS padding, but is treated as padding by basic layout and rendering code, e.g. RenderBlock::layout(). A lot of code relies on the equation border-box = content-box + padding + border (+ scrollbars). To keep this valid, change 5 functions in RenderBox.h to not include intrinsic padding in the content box, thus reverting to their behavior before the patch for bug 33593. Instead, have sizingBox(renderer) in CSSComputedStyleDeclaration.cpp explicitly put the intrinsic padding in computed CSS content-box values [for javascript getComputedStyle()], so the above equation still also holds for CSS computed values. This seems more consistent with how the padding...() functions behave since the patch for bug 23487, and will work better for MathML. For instance, a block's contentLogicalWidth() will be the availableLogicalWidth() for use by child elements. No new tests. The only real observable changes are illustrated in the bug 83092 attached test case and discussion. These are minor and hard to automate. * css/CSSComputedStyleDeclaration.cpp: (WebCore::sizingBox): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): * rendering/RenderBox.h: (WebCore::RenderBox::contentBoxRect): (WebCore::RenderBox::contentWidth): (WebCore::RenderBox::contentHeight): (WebCore::RenderBox::contentLogicalWidth): (WebCore::RenderBox::contentLogicalHeight): - Change these 5 functions to omit intrinsic padding from the content box. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::cellBaselinePosition): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::firstLineBoxBaseline): 2012-04-05 Hironori Bono [Chromium] moving a cursor on a misspelled word should not remove a misspelled underline https://bugs.webkit.org/show_bug.cgi?id=83214 Reviewed by Ryosuke Niwa. When Chrome enables asynchronous spellchecking, it adds Spelling markers in the background. For this case, moving a cursor should not remove these markers because it requires Chrome to spellcheck text again. This change prevents removing Spelling markers added by spellcheckers asynchronously. Test: platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): 2012-04-05 Hans Muller CSS Exclusions polygon shape arguments should be comma separated https://bugs.webkit.org/show_bug.cgi?id=82368 Reviewed by Ryosuke Niwa. Changed the CSS Parser to accept a conventional comma separated argument list for the polygon exclusion shape. The syntax had used spaces to separate x,y coordinates, like: polygon(10px,20px 30px,40px). Now commas separate points: polygon(10px 20px, 30px 40px). This change is per the draft exclusions spec, http://dev.w3.org/csswg/css3-exclusions. Additional relevant information about CSS argument list syntax can be found here: http://dev.w3.org/csswg/css3-values/#component-whitespace. Factored comma recognition idiom in CSSParser.cpp into isComma() utility function. The existing tests have been updated. * css/CSSParser.cpp: (WebCore::isComma) (WebCore::CSSParser::parseFillPosition) (WebCore::CSSParser::parseFillRepeat) (WebCore::CSSParser::parseFillProperty) (WebCore::CSSParser::parseCubicBezierTimingFunctionValue) (WebCore::CSSParser::parseAnimationTimingFunction) (WebCore::CSSParser::parseAnimationProperty) (WebCore::CSSParser::parseExclusionShapePolygon) (WebCore::CSSParser::parseDeprecatedGradient) (WebCore::CSSParser::parseRadialGradient) (WebCore::CSSParser::parseGradientColorStops) (WebCore::CSSParser::parseImageSet) (WebCore::filterInfoForName) (WebCore::CSSParser::parseCustomFilter) (WebCore::CSSParser::parseFontFeatureSettings) * css/CSSWrapShapes.cpp: (WebCore::CSSWrapShapePolygon::cssText): 2012-04-05 Joshua Bell IndexedDB: Support string.length in keyPaths https://bugs.webkit.org/show_bug.cgi?id=83221 Special case in the IDB spec - keyPaths can reference the |length| property of string values. Other instrinsic properties (|length| of Array, etc) are handled automagically. Relevant section of the updated spec is: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-path-construct Reviewed by Kentaro Hara. Test: storage/indexeddb/keypath-intrinsic-properties.html * bindings/v8/IDBBindingUtilities.cpp: (WebCore): 2012-04-05 Arvid Nilsson [BlackBerry] Update the InstrumentedPlatformCanvas after rebasing Skia https://bugs.webkit.org/show_bug.cgi?id=83314 Reviewed by George Staikos. RIM PR: 143771 One new virtual method was added to the SkCanvas, to draw a nine piece image. Override it and mark output as not being a solid color anymore. * platform/graphics/blackberry/InstrumentedPlatformCanvas.h: (WebCore::InstrumentedPlatformCanvas::drawBitmapNine): (InstrumentedPlatformCanvas): 2012-04-05 Oliver Hunt Make WebCore use jsCast rather than static_cast for casting JSC objects https://bugs.webkit.org/show_bug.cgi?id=83320 Reviewed by Stephanie Lewis. Mechanically replace static_cast with jsCast where ever we can. * WebCore.exp.in: * bindings/js/DOMWrapperWorld.cpp: (WebCore::JSStringOwner::finalize): * bindings/js/DOMWrapperWorld.h: (WebCore::currentWorld): * bindings/js/JSArrayBufferCustom.cpp: (WebCore::JSArrayBufferConstructor::constructJSArrayBuffer): * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContextConstructor::constructJSAudioContext): * bindings/js/JSCSSRuleListCustom.cpp: (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots): * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): (WebCore::cssPropertyGetterCallback): * bindings/js/JSCSSValueCustom.cpp: (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots): (WebCore::JSCSSValueOwner::finalize): * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSDOMBinding.h: (WebCore::deprecatedGlobalObjectForPrototype): (WebCore::getDOMPrototype): * bindings/js/JSDOMFormDataCustom.cpp: (WebCore::toHTMLFormElement): (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): * bindings/js/JSDOMMimeTypeArrayCustom.cpp: (WebCore::JSDOMMimeTypeArray::nameGetter): * bindings/js/JSDOMPluginArrayCustom.cpp: (WebCore::JSDOMPluginArray::nameGetter): * bindings/js/JSDOMPluginCustom.cpp: (WebCore::JSDOMPlugin::nameGetter): * bindings/js/JSDOMStringMapCustom.cpp: (WebCore::JSDOMStringMap::nameGetter): * bindings/js/JSDOMWindowBase.cpp: (WebCore::toJSDOMWindow): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::childFrameGetter): (WebCore::indexGetter): (WebCore::namedItemGetter): (WebCore::toDOMWindow): * bindings/js/JSDOMWindowCustom.h: (WebCore::asJSDOMWindow): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::window): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::globalObject): * bindings/js/JSDataViewCustom.cpp: (WebCore::JSDataViewConstructor::constructJSDataView): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSEventTarget.cpp: (WebCore): (WebCore::toEventTarget): * bindings/js/JSFloat32ArrayCustom.cpp: (WebCore::JSFloat32ArrayConstructor::constructJSFloat32Array): * bindings/js/JSFloat64ArrayCustom.cpp: (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array): * bindings/js/JSGeolocationCustom.cpp: (WebCore::JSGeolocation::getCurrentPosition): (WebCore::JSGeolocation::watchPosition): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::callHTMLAllCollection): (WebCore::JSHTMLAllCollection::nameGetter): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::nameGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::nameGetter): * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::remove): * bindings/js/JSImageConstructor.cpp: (WebCore::constructImage): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): (WebCore::InjectedScriptManager::discardInjectedScript): (WebCore::InjectedScriptManager::injectedScriptFor): * bindings/js/JSInt16ArrayCustom.cpp: (WebCore::JSInt16ArrayConstructor::constructJSInt16Array): * bindings/js/JSInt32ArrayCustom.cpp: (WebCore::JSInt32ArrayConstructor::constructJSInt32Array): * bindings/js/JSInt8ArrayCustom.cpp: (WebCore::JSInt8ArrayConstructor::constructJSInt8Array): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::nameGetter): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNodeOwner::isReachableFromOpaqueRoots): (WebCore::JSNodeOwner::finalize): * bindings/js/JSNodeCustom.h: (WebCore::toJS): * bindings/js/JSNodeFilterCustom.cpp: (WebCore::toNodeFilter): * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots): (WebCore::JSNodeList::nameGetter): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectPropertyGetter): (WebCore::callPlugin): * bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSharedWorkerCustom.cpp: (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter): * bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::nameGetter): * bindings/js/JSTextTrackCueCustom.cpp: (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots): * bindings/js/JSTextTrackCustom.cpp: (WebCore::JSTextTrackOwner::isReachableFromOpaqueRoots): * bindings/js/JSTextTrackListCustom.cpp: (WebCore::JSTextTrackListOwner::isReachableFromOpaqueRoots): * bindings/js/JSTrackCustom.cpp: (WebCore::toTrack): * bindings/js/JSUint16ArrayCustom.cpp: (WebCore::JSUint16ArrayConstructor::constructJSUint16Array): * bindings/js/JSUint32ArrayCustom.cpp: (WebCore::JSUint32ArrayConstructor::constructJSUint32Array): * bindings/js/JSUint8ArrayCustom.cpp: (WebCore::JSUint8ArrayConstructor::constructJSUint8Array): * bindings/js/JSUint8ClampedArrayCustom.cpp: (WebCore::JSUint8ClampedArrayConstructor::constructJSUint8ClampedArray): * bindings/js/JSWebKitMutationObserverCustom.cpp: (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver): * bindings/js/JSWebKitPointCustom.cpp: (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocketConstructor::constructJSWebSocket): * bindings/js/JSWorkerContextBase.cpp: (WebCore::toJSDedicatedWorkerContext): (WebCore::toJSSharedWorkerContext): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorkerConstructor::constructJSWorker): * bindings/js/JSXSLTProcessorCustom.cpp: (WebCore::JSXSLTProcessor::importStylesheet): (WebCore::JSXSLTProcessor::transformToFragment): (WebCore::JSXSLTProcessor::transformToDocument): * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStackForInspector): * bindings/js/ScriptControllerMac.mm: (WebCore::updateStyleIfNeededForBindings): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidPause): * bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::set): * bindings/js/ScriptState.cpp: (WebCore::domWindowFromScriptState): (WebCore::scriptExecutionContextFromScriptState): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::fillTransferMap): (WebCore::CloneSerializer::dumpArrayBufferView): (WebCore::CloneDeserializer::getJSValue): (WebCore::CloneDeserializer::readTerminal): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject _isSafeScript]): (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateImplementation): (GenerateCallWith): (NativeToJSValue): (GenerateConstructorDefinition): * bridge/jni/jni_jsobject.h: * bridge/jni/jni_jsobject.mm: (JavaJSObject::convertJObjectToValue): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/objc/objc_utility.mm: (JSC::Bindings::convertValueToObjcValue): * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): * bridge/runtime_object.cpp: (JSC::Bindings::callRuntimeConstructor): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::resetInternalsObject): 2012-04-05 Martin Robinson [GTK] Scrolling some iframes that are partially out of the viewport leads to repaint errors https://bugs.webkit.org/show_bug.cgi?id=83309 Reviewed by Gustavo Noronha Silva. Test: platform/gtk/fast/frames/scrolling-iframe-out-of-viewport.html The X11 backing store was not properly trimming the scroll region when it was only a portion of the screen. This was hidden by subsequent repaints. * platform/gtk/GtkWidgetBackingStoreX11.cpp: (WebCore::WidgetBackingStore::scroll): Fix the calculation of the scrolling region. 2012-04-05 Sheriff Bot Unreviewed, rolling out r113299. http://trac.webkit.org/changeset/113299 https://bugs.webkit.org/show_bug.cgi?id=83297 The patch broke 11 tests on Lion. (Requested by jonlee on #webkit). * xml/parser/XMLDocumentParser.h: (XMLDocumentParser): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::endElementNs): (WebCore::getEntityHandler): (WebCore::XMLDocumentParser::initializeParserContext): 2012-04-05 Justin Novosad [Chromium] Correct misleading trace event names in Canvas2DLayerChromium https://bugs.webkit.org/show_bug.cgi?id=83310 Reviewed by Adrienne Walker. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): 2012-04-05 Dean Jackson [mac] requestAnimationFrame sometimes stuck when page loads in a background tab https://bugs.webkit.org/show_bug.cgi?id=76105 Reviewed by Simon Fraser. Fix three issues with requestAnimationFrame: - It's possible for the call to rAF to come to the document before there is a page associated. Added a guard for this. - A page may try to suspend the scripted animations before the ScriptedAnimationController exists, in which case we need to suspend it immediately after it is created. Do this by keeping track of the state in Page. Otherwise rAF would be busy looping on hidden pages until they are brought to the front and hidden again. - A page created in the background (from WebKit1) does not get informed it is not visible. This can mean that resume() is called more times than suspend() and we get into a state where the number of suspensions becomes -1, and thus fails truthiness tests. Clamp it to values >= 0. No new tests, since this is not automatically testable. The most reliable test is to open a page with rAF in a background tab within Safari. * dom/Document.cpp: (WebCore::Document::webkitRequestAnimationFrame): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::resume): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::suspendScriptedAnimations): (WebCore::Page::resumeScriptedAnimations): * page/Page.h: (WebCore::Page::scriptedAnimationsSuspended): (Page): 2012-04-05 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=83311 Crashes in WebProcess at WebCore::HistoryController::recursiveSetProvisionalItem when restoring previous session Reviewed by Sam Weinig. It's possible to hit a race condition between the UIProcess and the WebProcess where the UIProcess records for a page have been cleared out but the WebProcess is still trying to perform a history navigation within that page. In this situation HistoryController code that expects there to always be a current history item in the back/forward controller is wrong. No new tests. (The race conditions involved have proven making a test impractical) * loader/HistoryController.cpp: (WebCore::HistoryController::recursiveSetProvisionalItem): Don't ASSERT the fromItem. We now know there might not be one. (WebCore::HistoryController::recursiveGoToItem): Ditto (WebCore::HistoryController::itemsAreClones): Always return false if either item is null, as a null item and a non-null item cannot possible be clones of each other. 2012-04-05 Adam Klein Crash in MutationObservers due to an invalid HashSet iterator https://bugs.webkit.org/show_bug.cgi?id=83304 Reviewed by Ojan Vafai. If the observed node has been GCed when we clear transient observers from it, the HashSet iterator in WebKitMutationObserver::deliver would be invalidated. This patch fixes that behavior by copying the relevant registrations into a seperate vector first and operating on the copy. This patch also fixes a bug: transient observers should be cleared after every microtask, not just when delivering. Tests: fast/mutation/clear-transient-without-delivery.html fast/mutation/transient-gc-crash.html * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach): Notify the observer that it has a transient registration so it can be properly cleared. * dom/MutationObserverRegistration.h: (WebCore::MutationObserverRegistration::hasTransientRegistrations): Add an accessor for use when deliver() creates its vector of registrations. * dom/WebKitMutationObserver.cpp: (WebCore::WebKitMutationObserver::setHasTransientRegistration): Add this to the active observer set to allow transient registrations to be cleared appropriately. (WebCore::WebKitMutationObserver::deliver): Avoid modifying m_registrations while iterating over it. Clear registrations before checking for a lack of records to deliver. * dom/WebKitMutationObserver.h: 2012-04-05 Adam Klein Rebaseline binding tests after r113272. * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::constructorCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): 2012-04-05 Stephen White [chromium] Drawing an accelerated canvas onto itself is slow. https://bugs.webkit.org/show_bug.cgi?id=83295 Fixed by using a GPU-side deepCopy() in skia, so we don't trigger a readback and re-upload. Reviewed by James Robinson. Correctness is covered by existing tests. Performance is covered by the test case attached to the bug. * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::create): 2012-04-05 Dana Jansens [chromium] Record the number of tiles paint-culled instead of the incorrect number of pixels https://bugs.webkit.org/show_bug.cgi?id=82423 Reviewed by Adrienne Walker. We currently attempt to record the number of pixels we save from uploading, however the number is wrong in two ways. 1) An early-out if everything is culled results in nothing being reported. 2) With threaded-compositor, the number of pixels uploaded in one tile can be changed by culling in another tile, making the number far too difficult to compute to be worthwhile. If a tile was going to be partial-updated, but is culled, now a new tile gets to be partial-updated instead, which affects the numbers. This patch breaks up CCOverdrawMetrics to make the methods/variables less overloaded and more clear. This way they don't have to mirror each other so closely on paint/draw sides. Then we record the number of tiles for which we prevented upload via paint culling. This will still over-report (a dirty culled tile stays dirty and will be culled again each commit), but it seems more reasonable as it clearly does not try to mimic a performance metric in the way that a pixel count does, but still gives a rough estimation of the amount of paint culling going on in a page. Covered by existing tests, modified where needed. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdateTiles): * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore::CCOverdrawMetrics::CCOverdrawMetrics): (WebCore::CCOverdrawMetrics::didCullTileForUpload): (WebCore): (WebCore::CCOverdrawMetrics::didUpload): (WebCore::CCOverdrawMetrics::didCullForDrawing): (WebCore::CCOverdrawMetrics::recordMetrics): (WebCore::CCOverdrawMetrics::recordMetricsInternal): * platform/graphics/chromium/cc/CCOverdrawMetrics.h: (CCOverdrawMetrics): (WebCore::CCOverdrawMetrics::pixelsCulledForDrawing): (WebCore::CCOverdrawMetrics::pixelsUploadedOpaque): (WebCore::CCOverdrawMetrics::pixelsUploadedTranslucent): (WebCore::CCOverdrawMetrics::tilesCulledForUpload): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::append): 2012-04-05 Enrica Casucci Provide a separate editing command to cleanup of redundant markup. https://bugs.webkit.org/show_bug.cgi?id=83240 Reviewed by Ryosuke Niwa. This patch moves the logic originally performed by the private method removeRedundantMarkup inside ReplaceSelectionCommand into a separate command. This way the markup cleanup can be exposed as a separate command, independent from ReplaceSelectionCommand. No new tests. No change in functionality. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Added new file to project files. * editing/EditorAllInOne.cpp: Added SimplifyMarkupCommand. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Now uses SimplifyMarkupCommand. * editing/ReplaceSelectionCommand.h: (ReplaceSelectionCommand): Removed removeRedundantMarkup. * editing/SimplifyMarkupCommand.cpp: Added. (WebCore::SimplifyMarkupCommand::SimplifyMarkupCommand): (WebCore::SimplifyMarkupCommand::doApply): * editing/SimplifyMarkupCommand.h: Added. (WebCore::SimplifyMarkupCommand::create): 2012-04-05 Shawn Singh [chromium] Need to clip to homogeneous w=0 plane when applying transforms. https://bugs.webkit.org/show_bug.cgi?id=80806 Reviewed by Adrienne Walker. Unit tests added to CCLayerTreeHostCommon. This change is also covered by other existing unit tests and layout tests. WebCore TransformationMatrix mapRect / mapQuad / projectQuad do not properly handle the case where a surface is oriented partially behind the camera, with a perspective projection. In this case, projected points may appear to be valid in cartesian coordinates, but they are indeed not valid, and this problem can only be detected in homogeneous coordinates after applying the transform, before the divide-by-w step. The correct solution is to clip geometry where w < 0. This patch makes this change local to chromium only, to fix rendering bugs that arise from this problem. The primary fix is to correct calculateVisibleLayerRect(), but other ancillary locations are also fixed, in particular, the antialiasing code path is simply skipped when this case arises. Eventually this math needs to be merged into TransformationMatrix, to fix hit-testing bugs that occur in both Chromium and Safari. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCMathUtil.cpp: Added. (WebCore): (WebCore::HomogeneousCoordinate::HomogeneousCoordinate): (HomogeneousCoordinate): (WebCore::HomogeneousCoordinate::shouldBeClipped): (WebCore::HomogeneousCoordinate::cartesianPoint2d): (WebCore::projectPoint): (WebCore::mapPoint): (WebCore::computeClippedPointForEdge): (WebCore::expandBoundsToIncludePoint): (WebCore::computeEnclosingRectOfClippedQuad): (WebCore::computeEnclosingRect): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectQuad): * platform/graphics/chromium/cc/CCMathUtil.h: Added. (WebCore): (CCMathUtil): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::computeUnoccludedContentRect): 2012-04-05 Patrick Gansterer [Qt] Correct include paths. https://bugs.webkit.org/show_bug.cgi?id=83270 Reviewed by Eric Seidel. Modify the #include declerations so that the wtf types are included using the full path. * platform/graphics/TiledBackingStoreBackend.h: 2012-04-05 Antonio Gomes Unreviewed bit left over from rebasing the origin patch before landing it. Complementary to r113329. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::operator=): 2012-04-05 Sheriff Bot Unreviewed, rolling out r113241. http://trac.webkit.org/changeset/113241 https://bugs.webkit.org/show_bug.cgi?id=83293 Requested by sievers@chromium.org (Requested by zhenyao on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::canDraw): (WebCore::CCLayerTreeHostImpl::prepareToDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): 2012-04-05 Sheriff Bot Unreviewed, rolling out r113341. http://trac.webkit.org/changeset/113341 https://bugs.webkit.org/show_bug.cgi?id=83299 bots caught some build errors (Requested by shawnsingh on #webkit). * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCMathUtil.cpp: Removed. * platform/graphics/chromium/cc/CCMathUtil.h: Removed. * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::projectQuad): (WebCore): (WebCore::computeUnoccludedContentRect): 2012-04-05 Justin Novosad [Chromium] With the skia port, setting LCD text filtering is causing texture cache invalidations of gpu canvas backing store https://bugs.webkit.org/show_bug.cgi?id=74183 Reviewed by Stephen White. Replacing unnecessary usage of SkCanvas::LayerIter with calls to SkCanvas::isDrawingToLayer(). Same results, lower overhead, and no GPU texture invalidation. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore): (WebCore::TransparencyAwareFontPainter::initializeForGDI): * platform/graphics/harfbuzz/FontHarfBuzz.cpp: (WebCore): (WebCore::adjustTextRenderMode): * platform/graphics/skia/FontSkia.cpp: (WebCore): (WebCore::adjustTextRenderMode): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore): (WebCore::disableTextLCD): * rendering/RenderThemeChromiumWin.cpp: (WebCore): 2012-04-05 Zan Dobersek media/track/track-webvtt-tc004-magic-header.html flakily times out https://bugs.webkit.org/show_bug.cgi?id=72279 Reviewed by Eric Carlson. Move all the checking for the WebVTT file identifier from TextTrackLoader to WebVTTParser, notifying the parser clients of parsing failures through a new method. Remove the WebVTTParser::fileIdentifierMaximumLength method and make WebVTTParser::hasRequiredFileIdentifier private. The latter now operates on a vector holding the identifier data to which data is added until there's enough of it to possibly hold the optional BOM character and the required WEBVTT character sequence. No new tests. Fixes an existing test. * html/track/WebVTTParser.cpp: Fix a typo throughout the file: fileIdentiferLength -> fileIdentifierLength (WebCore): (WebCore::WebVTTParser::parseBytes): Only continue with searcing for the WEBVTT identifier if there's enough data to possibly contain the identifier. Report that the file failed to parse if the identifier was then not found. (WebCore::WebVTTParser::hasRequiredFileIdentifier): Refactor to operate on the vector containing identifier data and merge with the hasLongWebVTTIdentifier function. * html/track/WebVTTParser.h: (WebVTTParserClient): Add a new method. (WebVTTParser): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::processNewCueData): Parser is now created immediately regardless of the mime type the response holds. (WebCore::TextTrackLoader::fileFailedToParse): Log the error, set the state to failed, start the cue load timer and cancel the load if the file was not parsed successfully. (WebCore): * loader/TextTrackLoader.h: (TextTrackLoader): 2012-04-05 Shawn Singh [chromium] Need to clip to homogeneous w=0 plane when applying transforms. https://bugs.webkit.org/show_bug.cgi?id=80806 Reviewed by Adrienne Walker. Unit tests added to CCLayerTreeHostCommon. This change is also covered by other existing unit tests and layout tests. WebCore TransformationMatrix mapRect / mapQuad / projectQuad do not properly handle the case where a surface is oriented partially behind the camera, with a perspective projection. In this case, projected points may appear to be valid in cartesian coordinates, but they are indeed not valid, and this problem can only be detected in homogeneous coordinates after applying the transform, before the divide-by-w step. The correct solution is to clip geometry where w < 0. This patch makes this change local to chromium only, to fix rendering bugs that arise from this problem. The primary fix is to correct calculateVisibleLayerRect(), but other ancillary locations are also fixed, in particular, the antialiasing code path is simply skipped when this case arises. Eventually this math needs to be merged into TransformationMatrix, to fix hit-testing bugs that occur in both Chromium and Safari. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCMathUtil.cpp: Added. (WebCore): (WebCore::HomogeneousCoordinate::HomogeneousCoordinate): (HomogeneousCoordinate): (WebCore::HomogeneousCoordinate::shouldBeClipped): (WebCore::HomogeneousCoordinate::cartesianPoint2d): (WebCore::projectPoint): (WebCore::mapPoint): (WebCore::computeClippedPointForEdge): (WebCore::expandBoundsToIncludePoint): (WebCore::computeEnclosingRectOfClippedQuad): (WebCore::computeEnclosingRect): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectQuad): * platform/graphics/chromium/cc/CCMathUtil.h: Added. (WebCore): (CCMathUtil): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::computeUnoccludedContentRect): 2012-04-05 Jia Pu Move correction panel related functions from EditorClient into separated AlternativeTextClient class. https://bugs.webkit.org/show_bug.cgi?id=82970 Reviewed by Enrica Casucci. No new tests, since there's no change of functionality. The existing correction panel related functions in EditorClient are currently used only by OS X. We'd like to move them into separate AlternativeTextClient class to avoid using #ifdef's. This new client class will also hold dictation alternative related interface that we will add soon for bug 82503. * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * editing/AlternativeTextController.cpp: Changes in this file are all for calling functions in AlternativeTextClient instead of those in EditoClient. (WebCore::AlternativeTextController::show): (WebCore::AlternativeTextController::dismiss): (WebCore::AlternativeTextController::dismissSoon): (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): (WebCore::AlternativeTextController::timerFired): (WebCore::AlternativeTextController::isAutomaticSpellingCorrectionEnabled): (WebCore::AlternativeTextController::alternativeTextClient): (WebCore): (WebCore::AlternativeTextController::editorClient): (WebCore::AlternativeTextController::textChecker): (WebCore::AlternativeTextController::recordAutocorrectionResponseReversed): (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection): * editing/AlternativeTextController.h: (WebCore): (AlternativeTextController): * editing/TextCheckingHelper.h: (WebCore): * loader/EmptyClients.h: (EmptyEditorClient): * page/AlternativeTextClient.h: Added. (WebCore): (AlternativeTextClient): (WebCore::AlternativeTextClient::~AlternativeTextClient): * page/EditorClient.h: (EditorClient): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::PageClients::PageClients): * page/Page.h: (WebCore): (PageClients): (Page): (WebCore::Page::alternativeTextClient): 2012-04-05 Min Qin Fix fullscreen video button for android https://bugs.webkit.org/show_bug.cgi?id=83087 Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=70437 changed css keyword for fullscreen video button. It is changed from media-fullscreen-button to media-enter-fullscreen-button. However, it does not change the value in mediaControlChromiumAndroid.css. No behavior change. * css/mediaControlsChromiumAndroid.css: (video::-webkit-media-controls-fullscreen-button): 2012-04-05 Pavel Feldman Web Inspector: CSS file revisions are not restored upon front-end reopen. https://bugs.webkit.org/show_bug.cgi?id=83292 Reviewed by Yury Semikhatsky. Populating suggestions before the panel creation now. * inspector/front-end/inspector.js: (WebInspector._doLoadedDoneWithCapabilities.get if): 2012-04-04 Simon Fraser Add assertions to check for mutation of RenderLayer z-order lists during enumeration https://bugs.webkit.org/show_bug.cgi?id=83242 Reviewed by James Robinson. Add debug-only code that detects whether RenderLayer's z-order and normal flow lists are being cleared or otherwise mutated while we're enumerating over them. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::paintList): (WebCore::RenderLayer::calculateLayerBounds): (WebCore::RenderLayer::dirtyZOrderLists): (WebCore::RenderLayer::dirtyNormalFlowList): (WebCore::RenderLayer::updateZOrderListsSlowCase): (WebCore::RenderLayer::updateNormalFlowList): * rendering/RenderLayer.h: (RenderLayer): (WebCore::RenderLayer::layerListMutationAllowed): (WebCore::RenderLayer::setLayerListMutationAllowed): (WebCore): (LayerListMutationDetector): (WebCore::LayerListMutationDetector::LayerListMutationDetector): (WebCore::LayerListMutationDetector::~LayerListMutationDetector): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): (WebCore::RenderLayerCompositor::computeCompositingRequirements): (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect): (WebCore::RenderLayerCompositor::layerHas3DContent): 2012-04-05 Sheriff Bot Unreviewed, rolling out r113254. http://trac.webkit.org/changeset/113254 https://bugs.webkit.org/show_bug.cgi?id=83291 Requested by sievers@chromium.org (Requested by zhenyao on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::canDraw): 2012-04-05 Sheriff Bot Unreviewed, rolling out r113307. http://trac.webkit.org/changeset/113307 https://bugs.webkit.org/show_bug.cgi?id=83288 Requested by sievers@chromium.org (Requested by zhenyao on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::canDraw): 2012-03-14 Antonio Gomes Extend HitTestResult to support not "discarding" shadow content in favor of its DOM ancestor https://bugs.webkit.org/show_bug.cgi?id=80847 Reviewed by David Hyatt. In order to improve touch precision on shadow tree content, patch extends the rect-hittest'ing system to allow shadow content to be stored as the rect-hittest result node list. Primary use cases are for this extension is making it easier to improve the clickability of default controls of