2012-03-23 Eric Carlson Deal with DOM modifications when evaluating source elements. https://bugs.webkit.org/show_bug.cgi?id=81163 Reviewed by Alexey Proskuryakov. Test: media/video-beforeload-remove-source.html * dom/ContainerNode.cpp: Make NodeVector and collectNodes public, renamed as getChildNodes. (WebCore::ContainerNode::takeAllChildrenFrom): collectNodes -> getChildNodes. (WebCore::ContainerNode::willRemove): collectNodes -> getChildNodes. (WebCore::ContainerNode::willRemoveChildren): collectNodes -> getChildNodes. (WebCore::ContainerNode::insertedIntoDocument): collectNodes -> getChildNodes. (WebCore::ContainerNode::removedFromDocument): collectNodes -> getChildNodes. * dom/ContainerNode.h: (WebCore::getChildNodes): * editing/ReplaceSelectionCommand.cpp: Remove unused NodeVector declaration. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): m_nextChildNodeToConsider and m_currentSourceNode are now RefPtrs. (WebCore::HTMLMediaElement::loadTimerFired): Protect HTMLMediaElement from being deleted during a DOM modification during an event callback. (WebCore::HTMLMediaElement::load): Ditto. (WebCore::HTMLMediaElement::selectMediaResource): Set m_nextChildNodeToConsider to the first child node, it will be the first node considered. (WebCore::HTMLMediaElement::havePotentialSourceChild): m_nextChildNodeToConsider and m_currentSourceNode are now RefPtrs. (WebCore::HTMLMediaElement::selectNextSourceChild): Collect all child nodes in a vector before looking for nodes because 'beforeload' event handlers can mutate the DOM. Don't use a that is no longer a child node after 'beforeload'. Use 0 to represent the end of the child node list because m_nextChildNodeToConsider is now a RefPtr so using the previous sentinel, "this", would cause a retain cycle. (WebCore::HTMLMediaElement::sourceWasAdded): m_nextChildNodeToConsider and m_currentSourceNode are now RefPtrs. (WebCore::HTMLMediaElement::sourceWillBeRemoved): Ditto. (WebCore::HTMLMediaElement::getPluginProxyParams): Protect HTMLMediaElement from being deleted during a DOM modification during an event callback. * html/HTMLMediaElement.h: 2012-03-23 Dean Jackson Disable CSS_SHADERS in Apple builds https://bugs.webkit.org/show_bug.cgi?id=81996 Reviewed by Simon Fraser. Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h. * Configurations/FeatureDefines.xcconfig: 2012-03-23 Dave Michael Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called https://bugs.webkit.org/show_bug.cgi?id=80428 Reviewed by Eric Seidel and Ryosuke Niwa. Make HTMLPluginElement release its m_NPObject in detach() to break a reference-counting cycle that happens on reload or navigation. With this change, HTMLPlugInElement::removedFromDocument is unnecessary, so it was removed. Note that Releasing m_NPObject does not result in a call to the plugin; it simply releases a reference count on the wrapper object for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked when the render tree is destroyed, when PluginView calls PluginPackage::unload.) Thus, it is safe to release m_NPObject in detach, because it can not result in layout or style changes. Also added numberOfLiveNodes() and numberOfLiveDocuments() to window.internals to enable testing. Test: plugins/netscape-dom-access-and-reload.html * WebCore.exp.in: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::detach): * html/HTMLPlugInElement.h: (HTMLPlugInElement): * testing/Internals.cpp: (WebCore): (WebCore::Internals::numberOfLiveNodes): (WebCore::Internals::numberOfLiveDocuments): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-23 Ryosuke Niwa CSSParser doesn't set border-*-width/style/color to initial by border shorthand property https://bugs.webkit.org/show_bug.cgi?id=82040 Reviewed by Antti Koivisto. The border shorthand property sets values for border-width, border-style, and border-color shorthand properties. While CSSParser::parseValue can process these shorthand properties properly and set the longhand properties such as border-top-width, border-right-width, ... border-left-color, CSSParser::addProperty can't and the initialization in parseShorthand fails for the border property. Fixed the bug by explicitly initializing longhand properties. Changing the behavior here is unlikely to break the Web since our behavior already differs from that of Firefox and Internet Explorer. Both of those browsers return the actual initial values such as "medium" and "currentColor". This discrepancy is tracked by https://bugs.webkit.org/show_bug.cgi?id=82078. Test: fast/css/border-shorthand-initialize-longhands.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Uses borderAbridgedLonghand. (WebCore::CSSParser::parseShorthand): Uses longhand properties for initialization if one is available. This allows us to initialize multiple properties (e.g. border-*-color) for a single property missing in the set. * css/CSSPropertyLonghand.cpp: (WebCore::borderAbridgedLonghand): Added. The longhand here (border-width, border-style, border-color) is "abridged" in the sense that they're still shorthands. * css/CSSPropertyLonghand.h: (WebCore::CSSPropertyLonghand::CSSPropertyLonghand): (CSSPropertyLonghand): Added the version that takes longhand instances for initialization purposes. (WebCore::CSSPropertyLonghand::longhandsForInitialization): 2012-03-23 Tony Chang [chromium] rename newwtf target back to wtf https://bugs.webkit.org/show_bug.cgi?id=82064 Reviewed by Adam Barth. No new tests, only renaming a build target. * WebCore.gyp/WebCore.gyp: 2012-03-23 Adrienne Walker [chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms https://bugs.webkit.org/show_bug.cgi?id=82066 Reviewed by James Robinson. With threaded compositing, OSX will crash and Windows will have black scrollbars. Fix that by reverting to the previosu behavior of updating scrollbars on the main thread instead. * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::scrollbarLayerDidChange): 2012-03-23 Dan Bernstein ASSERTION FAILED: ASSERT(input == AnimationStateInputEndTimerFired || input == AnimationStateInputPlayStatePaused) in AnimationBase::updateStateMachine causing multiple "crashes" on Lion Intel Debug WebKit testers https://bugs.webkit.org/show_bug.cgi?id=81351 Rubber-stamped by Jessie Berlin. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::updateStateMachine): Replaced the assertion with a LOG_ERROR so that the issue is still noticeable, but it does not automatically make the debug bots red. 2012-03-23 Mike Lawther CSS3 calc: image sizing works with mixed percentage/absolute https://bugs.webkit.org/show_bug.cgi?id=82017 Reviewed by Ojan Vafai. Test: css3/calc/img-size-expected.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): (WebCore::RenderBox::computeReplacedLogicalHeightUsing): 2012-03-23 Julien Chaffraix REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height https://bugs.webkit.org/show_bug.cgi?id=81826 Reviewed by Tony Chang. Covered by tables/mozilla/bugs/bug27038-{1|2}.html. This partly reverts r107971: the extra logical height distribution change was not needed to fix the bug (it is needed by the test though). We revert to giving all the extra height to the first tbody and not the first section. This is broken but unfortunately some websites are relying on that. Getting a real distribution algorithm is covered by bug 81824. However this is super tricky to get right and I did not want to add more compatibility risks until I have something solid. * rendering/RenderTable.cpp: (WebCore::RenderTable::distributeExtraLogicalHeight): 2012-03-23 Xingnan Wang Optimize for IPP in DirectConvolver::process() https://bugs.webkit.org/show_bug.cgi?id=80255 Reviewed by Chris Rogers. Increase ~2X performance by conv() in IPP. * platform/audio/DirectConvolver.cpp: (WebCore::DirectConvolver::DirectConvolver): (WebCore::DirectConvolver::process): * platform/audio/DirectConvolver.h: (DirectConvolver): 2012-03-23 Tommy Widenflycht MediaStream API (JSEP): Introducing PeerConnection00 and IceCallback https://bugs.webkit.org/show_bug.cgi?id=81657 Reviewed by Adam Barth. Last major WebCore patch for the JSEP PeerConnection, together with the associated IceCallback (they both depend on each other and IceCallback has very few lines of real code). My next patch after this one will do a major overhaul of the existing layout tests and add a few new ones. * GNUmakefile.list.am: * Modules/mediastream/DOMWindowMediaStream.idl: * Modules/mediastream/IceCallback.h: Added. (WebCore): (IceCallback): (WebCore::IceCallback::~IceCallback): * Modules/mediastream/IceCallback.idl: Added. * Modules/mediastream/PeerConnection00.cpp: Added. (WebCore): (WebCore::PeerConnection00::create): (WebCore::PeerConnection00::PeerConnection00): (WebCore::PeerConnection00::~PeerConnection00): (WebCore::PeerConnection00::hasLocalAudioTrack): (WebCore::PeerConnection00::hasLocalVideoTrack): (WebCore::PeerConnection00::parseMediaHints): (WebCore::PeerConnection00::createOffer): (WebCore::PeerConnection00::createAnswer): (WebCore::PeerConnection00::setLocalDescription): (WebCore::PeerConnection00::setRemoteDescription): (WebCore::PeerConnection00::localDescription): (WebCore::PeerConnection00::remoteDescription): (WebCore::PeerConnection00::startIce): (WebCore::PeerConnection00::processIceMessage): (WebCore::PeerConnection00::readyState): (WebCore::PeerConnection00::iceState): (WebCore::PeerConnection00::addStream): (WebCore::PeerConnection00::removeStream): (WebCore::PeerConnection00::localStreams): (WebCore::PeerConnection00::remoteStreams): (WebCore::PeerConnection00::close): (WebCore::PeerConnection00::didGenerateIceCandidate): (WebCore::PeerConnection00::didChangeReadyState): (WebCore::PeerConnection00::didChangeIceState): (WebCore::PeerConnection00::didAddRemoteStream): (WebCore::PeerConnection00::didRemoveRemoteStream): (WebCore::PeerConnection00::interfaceName): (WebCore::PeerConnection00::scriptExecutionContext): (WebCore::PeerConnection00::stop): (WebCore::PeerConnection00::eventTargetData): (WebCore::PeerConnection00::ensureEventTargetData): (WebCore::PeerConnection00::changeReadyState): (WebCore::PeerConnection00::changeIceState): * Modules/mediastream/PeerConnection00.h: Added. (WebCore): (PeerConnection00): (WebCore::PeerConnection00::refEventTarget): (WebCore::PeerConnection00::derefEventTarget): * Modules/mediastream/PeerConnection00.idl: Added. * WebCore.gypi: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled): * bindings/js/JSPeerConnection00Custom.cpp: Added. (WebCore): (WebCore::JSPeerConnection00Constructor::constructJSPeerConnection00): * dom/EventTargetFactory.in: 2012-03-23 Adrienne Walker [chromium] Fix scrollbarLayerLostContext flaky test crash on 10.6 https://bugs.webkit.org/show_bug.cgi?id=82062 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): 2012-03-23 Tommy Widenflycht [chromium] MediaStream API (JSEP): Extending WebMediaStreamCenter https://bugs.webkit.org/show_bug.cgi?id=81924 Reviewed by Adam Barth. Nothing to test, just moving methods. * platform/mediastream/MediaStreamCenter.cpp: (WebCore::MediaStreamCenter::constructSDP): (WebCore): 2012-03-23 Sami Kyostila Reuse buffer allocation if canvas size does not change https://bugs.webkit.org/show_bug.cgi?id=80871 Reviewed by Stephen White. If the user changes the width or height attributes of a canvas element, the contents of the canvas should be cleared and the context state should be reset. This has become a common idiom to clear the canvas "efficiently" at the start of a frame. Previously, this code path triggered a full reallocation of the image buffer backing the canvas, leading to reduced performance. This patch implements an optimization where we reuse the previous image buffer allocation if the size of the canvas did not change. Also, instead of clearing the canvas every time its dimensions are touched, we only clear if anything has been drawn into the canvas since it was previously cleared. Note that for now this optimization only applies for 2D canvases, since it is not entirely clear how touching the dimensions of a WebGL canvas should work. Test: fast/canvas/canvas-resize-after-paint-without-layout.html + existing layout tests for canvas resetting. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): (WebCore::HTMLCanvasElement::reset): (WebCore::HTMLCanvasElement::createImageBuffer): Save the initial graphics context state so we can restore it without creating a new context. (WebCore::HTMLCanvasElement::clearImageBuffer): (WebCore): (WebCore::HTMLCanvasElement::clearCopiedImage): * html/HTMLCanvasElement.h: (HTMLCanvasElement): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::reset): No need to notify the compositor when the context is reset, because clearing the image buffer does the same thing. We can also skip the notification if we did not have an image buffer at the time of the reset, because the reset will not have any visual impact in this case. Finally, if the canvas size did change, the notification is also unnecessary because of the call to RenderObject::repaint() from HTMLCanvasElement::reset(). 2012-03-22 Martin Robinson Fix some code generation warnings on GTK+. Reviewed by Gustavo Noronha Silva. No new tests. This just fixes warnings. * GNUmakefile.am: Remove nonexistent directories from the list IDL directories. 2012-03-23 Sheriff Bot Unreviewed, rolling out r111751. http://trac.webkit.org/changeset/111751 https://bugs.webkit.org/show_bug.cgi?id=82060 caused 15% page cycler regression for chromium-linux (Requested by eae on #webkit). * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-03-23 Kentaro Hara Support [ImplementedAs] for attributes https://bugs.webkit.org/show_bug.cgi?id=81605 Reviewed by Adam Barth. [ImplementedAs] just supports methods. [ImplementedAs] should support attributes too. Explained here: https://trac.webkit.org/wiki/WebKitIDL#ImplementedAs Test: bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGenerator.pm: Modified to support [ImplementedAs] for attributes. (AttributeNameForGetterAndSetter): * bindings/scripts/test/TestObj.idl: Added a test case. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. (WebDOMTestObj::strawberry): (WebDOMTestObj::setStrawberry): * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_strawberry): (webkit_dom_test_obj_set_strawberry): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjStrawberry): (WebCore::setJSTestObjStrawberry): * bindings/scripts/test/JS/JSTestObj.h: (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj strawberry]): (-[DOMTestObj setStrawberry:]): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::strawberryAttrGetter): (TestObjInternal): (WebCore::TestObjInternal::strawberryAttrSetter): (WebCore): 2012-03-23 Tommy Widenflycht The JSC code generator doesn't generate correct code for Constructors https://bugs.webkit.org/show_bug.cgi?id=82046 Reviewed by Kentaro Hara. The main bulk of generated code for constructors uses the name jsConstructor for the created object, and then calls GenerateParametersCheck which generates code that uses the name castedThis. * bindings/scripts/CodeGeneratorJS.pm: (GenerateConstructorDefinition): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::finishCreation): (WebCore::JSTestObjConstructor::constructJSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::constructorCallback): 2012-03-23 Tommy Widenflycht The JSC code generator can't handle boolean arguments for Callbacks https://bugs.webkit.org/show_bug.cgi?id=82045 Reviewed by Kentaro Hara. CodeGeneratorJS.pm only handles DOMStrings and objects as arguments for a Callback, so I added support for boolean values as well. * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallbackImplementation): * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: (WebDOMTestCallback::callbackWithBoolean): * bindings/scripts/test/CPP/WebDOMTestCallback.h: (WebDOMTestCallback): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (webkit_dom_test_callback_callback_with_boolean): * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::callbackWithBoolean): (WebCore): * bindings/scripts/test/JS/JSTestCallback.h: (JSTestCallback): * bindings/scripts/test/ObjC/DOMTestCallback.h: * bindings/scripts/test/ObjC/DOMTestCallback.mm: (-[DOMTestCallback callbackWithBoolean:]): * bindings/scripts/test/TestCallback.idl: * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithBoolean): (WebCore): * bindings/scripts/test/V8/V8TestCallback.h: (V8TestCallback): 2012-03-23 Allan Sandfeld Jensen Touch adjustment forgets some subtarget quads. https://bugs.webkit.org/show_bug.cgi?id=82044 Reviewed by Kenneth Rohde Christiansen. Do not uncritically skip all nodes that are ancestors to other test results. Instead return the inner-most element if multiple nodes have the same distance. Test: touchadjustment/block-testing.html * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::compileSubtargetList): (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric): 2012-03-23 Allan Sandfeld Jensen TouchAdjustment does not correct for frame position https://bugs.webkit.org/show_bug.cgi?id=82043 Reviewed by Kenneth Rohde Christiansen. Convert geometry to window coordinates before calculating distance. Test: touchadjustment/iframe.html * page/TouchAdjustment.cpp: (WebCore::TouchAdjustment::distanceSquaredToTargetCenterLine): 2012-03-23 Vlad Voicu Fixed minor WebInspector display issue Clicking on disabled sections in Styles Sidebar Pane creates new elements. https://bugs.webkit.org/show_bug.cgi?id=81925 Reviewed by Timothy Hatcher No new tests should be required. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick): (WebInspector.StylePropertyTreeElement.prototype): 2012-03-23 Kentaro Hara Unreviewed, rebaselined run-bindings-tests results. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::methodWithCallbackArgCallback): (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjInternal::methodWithCallbackAndOptionalArgCallback): (WebCore::TestObjInternal::overloadedMethod5Callback): (WebCore::TestObjInternal::overloadedMethodCallback): 2012-03-23 Ryosuke Niwa cssText should use StringBuilder https://bugs.webkit.org/show_bug.cgi?id=82028 Reviewed by Hajime Morita. Make StylePropertySet::asText more efficient by deploying StringBuilder; avoids heap churn by String::operator+ and String::operator+=. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::asText): 2012-03-23 Ryosuke Niwa REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms https://bugs.webkit.org/show_bug.cgi?id=82035 Rollout r111754 since it caused a test to fail and the test added by the patch is failing on Mac WebKit 2. * WebCore.exp.in: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::detach): (WebCore): (WebCore::HTMLPlugInElement::removedFromDocument): * html/HTMLPlugInElement.h: (HTMLPlugInElement): * testing/Internals.cpp: * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-23 Adam Barth Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 2) https://bugs.webkit.org/show_bug.cgi?id=82026 Reviewed by Kentaro Hara. This patch removes DOMWindow::resetNotifications, which was unneeded special-case logic for clearing the notifications center. The previous patch that tried to accomplish the same thing did not override willDetachPage, which is why it caused crashes. There's actually a cleaner way to handle these cases, which will let us implement reconnectFrame, but that will need to wait for the next patch. * notifications/DOMWindowNotifications.cpp: (WebCore::DOMWindowNotifications::DOMWindowNotifications): (WebCore::DOMWindowNotifications::from): (WebCore::DOMWindowNotifications::webkitNotifications): (WebCore): (WebCore::DOMWindowNotifications::disconnectFrame): (WebCore::DOMWindowNotifications::willDetachPage): (WebCore::DOMWindowNotifications::reset): * notifications/DOMWindowNotifications.h: (DOMWindowNotifications): * page/DOMWindow.cpp: (WebCore::DOMWindow::willDetachPage): (WebCore::DOMWindow::disconnectDOMWindowProperties): (WebCore::DOMWindow::clearDOMWindowProperties): * page/DOMWindow.h: (DOMWindow): * page/Frame.cpp: (WebCore::Frame::willDetachPage): 2012-03-22 Adam Barth Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 1) https://bugs.webkit.org/show_bug.cgi?id=82015 Reviewed by Kentaro Hara. This patch moves DOMWindow.webkitNotifications from DOMWindow.idl to DOMWindowNotificiations.idl in preparation for moving notificiations into Modules. A future patch will remove DOMWindow::resetNotificaitions in favor of more general mechanisms. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * notifications/DOMWindowNotifications.cpp: Added. (WebCore): (WebCore::DOMWindowNotifications::DOMWindowNotifications): (WebCore::DOMWindowNotifications::~DOMWindowNotifications): (WebCore::DOMWindowNotifications::from): (WebCore::DOMWindowNotifications::webkitNotifications): (WebCore::DOMWindowNotifications::reset): (WebCore::DOMWindowNotifications::supplementName): * notifications/DOMWindowNotifications.h: Added. (WebCore): (DOMWindowNotifications): * notifications/DOMWindowNotifications.idl: Added. * page/DOMWindow.cpp: (WebCore::DOMWindow::~DOMWindow): (WebCore): (WebCore::DOMWindow::resetNotifications): * page/DOMWindow.h: (WebCore): (DOMWindow): * page/DOMWindow.idl: 2012-03-22 Li Yin A client MUST close a connection if it detects a masked frame https://bugs.webkit.org/show_bug.cgi?id=81361 Reviewed by Kent Tamura. A server must not mask any frames that it sends to the client. Change the test case, not mask the frames from server to client. Test: http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame): 2012-03-22 Li Yin [WebSocket]The minimal number of bytes MUST be used to encode the length https://bugs.webkit.org/show_bug.cgi?id=81443 Reviewed by Kent Tamura. From RFC 6455 http://tools.ietf.org/html/rfc6455#section-5.2 the minimal number of bytes MUST be used to encode the length New test case : http/tests/websocket/tests/hybi/invalid-encode-length.html * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::parseFrame): 2012-03-22 Adam Barth Unreviewed. Sort xcodeproj file. * WebCore.xcodeproj/project.pbxproj: 2012-03-22 Mao Yujie Implement strict testing criterion for callback function definition https://bugs.webkit.org/show_bug.cgi?id=80005 Reviewed by Adam Barth. Callback function should be defined as the function type instead of the object type. LayoutTest: fast/dom/MediaStream/argument-types.html * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheckExpression): (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheckExpression): (GenerateParametersCheck): 2012-03-22 Gyuyoung Kim Convert hasGrammarMarker to use Internals interface https://bugs.webkit.org/show_bug.cgi?id=82004 Reviewed by Ryosuke Niwa. Remove hasGrammarMarker functions, because it is able to work in the cross-port way through the Internals interface. No new tests, since we are improving here the infra-structure for testing a specific method. * testing/Internals.cpp: (WebCore::Internals::hasGrammarMarker): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-22 Xingnan Wang Add exception for the setter of "fftSize" in RealtimeAnalyserNode https://bugs.webkit.org/show_bug.cgi?id=81748 Reviewed by Chris Rogers. * Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::setFftSize): * Modules/webaudio/RealtimeAnalyser.h: (RealtimeAnalyser): * Modules/webaudio/RealtimeAnalyserNode.cpp: (WebCore::RealtimeAnalyserNode::setFftSize): (WebCore): * Modules/webaudio/RealtimeAnalyserNode.h: (RealtimeAnalyserNode): * Modules/webaudio/RealtimeAnalyserNode.idl: 2012-03-22 Leo Yang [BlackBerry] Add HistoryItemViewState for BlackBerry port https://bugs.webkit.org/show_bug.cgi?id=81867 Reviewed by Rob Buis. HistoryItemViewState is the blackberry specific field of HistoryItem. It's used to maintain the porting specific view state. No new test because the port can't be built yet. * history/HistoryItem.h: (HistoryItem): (WebCore::HistoryItem::viewState): 2012-03-22 SravanKumar Sandela Fieldset unexpectedly stretches to minimum intrinsic width https://bugs.webkit.org/show_bug.cgi?id=79128 Reviewed by Julien Chaffraix. Fieldset element width will now check if css width is specified explicitly before stretching to minimum intrinsic width. The reference can be taken from IE9, instead of FF(FF acknowledged the broken behavior). Tests: fast/forms/fieldset-width-nostretch-ifspecified-expected.html fast/forms/fieldset-width-nostretch-ifspecified.html * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::stretchesToMinIntrinsicLogicalWidth): (WebCore): * rendering/RenderFieldset.h: (RenderFieldset): 2012-03-22 Shawn Singh [chromium] Target surface should be damaged for a new layers even when layer had no changes https://bugs.webkit.org/show_bug.cgi?id=81879 Reviewed by Adrienne Walker. Unit test added to CCDamageTrackerTest. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::removeRectFromCurrentFrame): added a boolean arg to detect if the layer is new on this update. (WebCore::CCDamageTracker::extendDamageForLayer): added logic that damages the target surface if the layer is new. (WebCore::CCDamageTracker::extendDamageForRenderSurface): added logic that damages the target surface if the descendant surface is new; similar logic for the surface's replica if the replica is new. * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): 2012-03-22 Charles Wei [BlackBerry] Need to store the meta info of a page in the ViewState of the history https://bugs.webkit.org/show_bug.cgi?id=82000 Reviewed by Rob Buis. Internally reviewed by George Staikos. No new tests, BlackBerry porting doesn't build yet upstreaming. * history/blackberry/HistoryItemViewState.h: (WebCore::HistoryItemViewState::HistoryItemViewState): (HistoryItemViewState): 2012-03-22 Adam Klein [v8] wrapSlow methods should ref underlying object before creating wrapper https://bugs.webkit.org/show_bug.cgi?id=81919 Reviewed by Adam Barth. Because instatiating the wrapper can trigger GC, it's important that wrapSlow() hold a reference to an object when creating a wrapper for that object. Once the V8 wrapper exists and is associated with the object, the reference can be handed off (via leakRef) to be handled by the normal binding code logic (where derefObject is called if the handle is GCed). Binding tests have been updated to reflect this change. Testing the change directly is hard. Any test landed today would only be a valid test until V8's logic about when to GC changes, at which point it would become dead weight. So I don't think it's worth landing a layout test along with this. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): Make wrapSlow take a PassRefPtr for RefCounted objects. (GenerateToV8Converters): Get rid of the explicit call to ref() and instead call leakRef() when adding a RefCounted object to the DOM map. (GetPassRefPtrType): Helper to generate "PassRefPtr", or "PassRefPtr >" as appropriate. * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore::V8Float64Array::wrapSlow): * bindings/scripts/test/V8/V8Float64Array.h: (V8Float64Array): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::V8TestActiveDOMObject::wrapSlow): * bindings/scripts/test/V8/V8TestActiveDOMObject.h: (V8TestActiveDOMObject): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::wrapSlow): * bindings/scripts/test/V8/V8TestCustomNamedGetter.h: (V8TestCustomNamedGetter): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestEventConstructor.h: (V8TestEventConstructor): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::V8TestEventTarget::wrapSlow): * bindings/scripts/test/V8/V8TestEventTarget.h: (V8TestEventTarget): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::wrapSlow): * bindings/scripts/test/V8/V8TestInterface.h: (V8TestInterface): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::wrapSlow): * bindings/scripts/test/V8/V8TestMediaQueryListListener.h: (V8TestMediaQueryListListener): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestNamedConstructor.h: (V8TestNamedConstructor): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::wrapSlow): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::wrapSlow): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h: (V8TestSerializedScriptValueInterface): 2012-03-22 Jonathan Dong [BlackBerry] add interface clearCredentials() and clearNeverRememberSites() https://bugs.webkit.org/show_bug.cgi?id=81887 Reviewed by Rob Buis. Fixed SQL issue when clearing table logins and table never_remember. No new tests. * platform/network/blackberry/CredentialBackingStore.cpp: (WebCore::CredentialBackingStore::clearLogins): (WebCore::CredentialBackingStore::clearNeverRemember): 2012-03-22 Jonathan Dong [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail https://bugs.webkit.org/show_bug.cgi?id=80135 Reviewed by Rob Buis. Modified the interface function authenticationChallenge() in class PageClientBlackBerry, moved Credential from return value to the function's reference parameter, and returned a bool to indicate if user pressed Ok button or not. Removed the logic which checks m_currentWebChallenge not null, because we should challenge user again if the last provided credential is not valid; also added the logic that will popup challenge dialog again immediately if user press Ok buttton directly without inputting anything. No new tests. * platform/blackberry/PageClientBlackBerry.h: * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleAuthHeader): (WebCore::NetworkJob::sendRequestWithCredentials): 2012-03-22 Jason Liu [BlackBerry] Synchronize platform/network/blackberry https://bugs.webkit.org/show_bug.cgi?id=81874 We changed a lot in these files locally. But the changes are not upstreamed. It is not convenient to do the other upstreaming work based on these differences. So upstream these changes. Reviewed by Rob Buis. No new tests. Just synchronize codes. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::NetworkJob): (WebCore::NetworkJob::initialize): (WebCore::NetworkJob::handleNotifyHeaderReceived): (WebCore::NetworkJob::handleNotifyDataReceived): (WebCore::NetworkJob::sendResponseIfNeeded): (WebCore::NetworkJob::sendRequestWithCredentials): (WebCore::NetworkJob::handleAbout): * platform/network/blackberry/NetworkJob.h: (WebCore::NetworkJob::isError): (NetworkJob): * platform/network/blackberry/NetworkManager.cpp: (WebCore::NetworkManager::startJob): * platform/network/blackberry/ResourceRequest.h: (WebCore::ResourceRequest::ResourceRequest): * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::platformTargetTypeForRequest): 2012-03-22 Tom Sepez XSS Auditor bypass via script tag src=data:, URLS. https://bugs.webkit.org/show_bug.cgi?id=81948 Reviewed by Adam Barth. This change fixes an XSSAuditor bypass wherby a script with a data: URL src attribute could evade detection by using characters from the page to create a snippet for matching not found in the URL's reflected vector. This change terminates the snippet for matching earlier in these cases. Test: http/tests/security/xssAuditor/script-tag-with-source-data-url2.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::decodedSnippetForAttribute): 2012-03-22 Dana Jansens [chromium] Incorrect assert on animating opacity for a surface https://bugs.webkit.org/show_bug.cgi?id=81994 Reviewed by Adrienne Walker. Draw opacity and animation state match on the surface itself. A surface with animating opacity always has an owning layer without animation, as the surface does the animation for it. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::paintLayerContents): 2012-03-22 Dana Jansens [chromium] Skip frames when checkerboarding an animation https://bugs.webkit.org/show_bug.cgi?id=81716 Reviewed by Adrienne Walker. This will stop drawing frames when prepareToDraw fails, if the draw is not forced. The expected behaviour is outlined below by the unit tests. When a draw fails, we: 1. Set m_needsRedraw to try again next vsync 2. Set m_needsCommit because we need more data from webkit to succeed 3. Set m_drawIfPossibleFailed. This allows us to try draw again within the same vsync *if* a commit finishes during this time. Unit test: CCSchedulerTest.RequestRedrawInsideFailedDraw CCSchedulerTest.RequestCommitInsideFailedDraw CCSchedulerTest.NoBeginFrameWhenDrawFails CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain CCSchedulerStateMachineTest.TestSetNeedsRedrawDuringFailedDrawDoesNotRemoveNeedsRedraw CCSchedulerStateMachineTest.TestCommitAfterFailedDrawAllowsDrawInSameFrame CCSchedulerStateMachineTest.TestCommitAfterFailedAndSuccessfulDrawDoesNotAllowDrawInSameFrame CCSchedulerStateMachineTest.TestFailedDrawIsRetriedNextVSync * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::processScheduledActions): * platform/graphics/chromium/cc/CCScheduler.h: (CCSchedulerClient): * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine): (WebCore::CCSchedulerStateMachine::nextAction): (WebCore::CCSchedulerStateMachine::updateState): (WebCore::CCSchedulerStateMachine::didDrawIfPossibleCompleted): (WebCore): * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: (CCSchedulerStateMachine): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): (WebCore): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapIfPossible): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapForced): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-03-22 W. James MacLean [chromium] Force update of nonFastScrollableRegion if target CCLayerImpl has been freshly created. https://bugs.webkit.org/show_bug.cgi?id=81968 Reviewed by Adrienne Walker. Added unit test to existing tests for TreeSynchronizer. When creating a new CCLayerImpl during tree synchronization, make sure we transfer the nonFastScrollableRegion as the new CCLayerImpl will default to an empty region. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::nonFastScrollableRegion): (WebCore::LayerChromium::setNonFastScrollableRegionChanged): * platform/graphics/chromium/TreeSynchronizer.cpp: (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl): 2012-03-22 Raphael Kubo da Costa [CMake] Unreviewed build fix after r111778. * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with ${WTF_DIR}/wtf ones. 2012-03-22 Tony Chang Unreviewed, fix chromium build after wtf move. Only use newwtf, remove references to wtf. * WebCore.gyp/WebCore.gyp: 2012-03-22 Benjamin Poulain Remove an obsolete comment regarding magic frames from Geolocation https://bugs.webkit.org/show_bug.cgi?id=81871 Reviewed by Alexey Proskuryakov. Moving a frame into another document is no longer possible after r111361. The comment is now irrelevant. * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::stop): 2012-03-22 Csaba Osztrogonác Actually move WTF files to their new home https://bugs.webkit.org/show_bug.cgi?id=81844 [Qt] Unreviewed buildfix after r111778. * Target.pri: 2012-03-22 Kentaro Hara run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl https://bugs.webkit.org/show_bug.cgi?id=81852 Reviewed by Adam Barth. run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl: Use of uninitialized value in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2743. Use of uninitialized value $name in substitution (s///) at WebCore/bindings/scripts/CodeGenerator.pm line 119. Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2969. Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2972. Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 367. Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 368. ... This is because [Constructor(...)] does not yet support [Optional] arguments. It just supports [Optional=DefaultIsUndefined] and [Optional=DefaultIsNullString] arguments: https://trac.webkit.org/wiki/WebKitIDL#Constructor This patch replaces [Optional] with [Optional=DefaultIsUndefined] in TestSerializedScriptValueInterface.idl. Test: bindings/scripts/test/TestSerializedScriptValueInterface.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateConstructorDefinition): * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorCallback): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): 2012-03-22 Michal Mocny [chromium] LayerRendererChromium should use GpuMemoryAllocationChanged callback to explicitly manage framebuffer. https://bugs.webkit.org/show_bug.cgi?id=81823 Reviewed by Adrienne Walker. New UnitTests: LayerRendererChromiumTest * platform/graphics/chromium/LayerRendererChromium.cpp: (LayerRendererGpuMemoryAllocationChangedCallbackAdapter): (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::create): (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::~LayerRendererGpuMemoryAllocationChangedCallbackAdapter): (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged): (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::LayerRendererGpuMemoryAllocationChangedCallbackAdapter): (WebCore): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::~LayerRendererChromium): (WebCore::LayerRendererChromium::setVisible): (WebCore::LayerRendererChromium::swapBuffers): (WebCore::LayerRendererChromium::discardFramebuffer): (WebCore::LayerRendererChromium::ensureFramebuffer): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromiumClient): (LayerRendererChromium): (WebCore::LayerRendererChromium::isFramebufferDiscarded): (ScopedEnsureFramebufferAllocation): (WebCore::ScopedEnsureFramebufferAllocation::ScopedEnsureFramebufferAllocation): (WebCore::ScopedEnsureFramebufferAllocation::~ScopedEnsureFramebufferAllocation): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::LayerRendererCapabilities::LayerRendererCapabilities): (LayerRendererCapabilities): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setVisible): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::compositeAndReadback): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::compositeAndReadback): 2012-03-22 Adam Barth ContainerNode::insertedIntoTree and removedFromTree use weak iteration patterns https://bugs.webkit.org/show_bug.cgi?id=80570 Reviewed by Ryosuke Niwa. These functions use weak iteration patterns, but as far as I can tell, we never execute script below these functions. This patch adds ASSERTs to help us avoid adding events in the future. * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertedIntoTree): (WebCore::ContainerNode::removedFromTree): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadInternal): - There's a somewhat complex call chain from insertedIntoTree into HTMLMediaElement, and somewhat complex control flow below loadInternal that eventually leads to the BeforeLoad event being fired. In studying this code, I don't see a way for the BeforeLoad event to be fired during insertedIntoTree, but I've added this assert here to make sure we don't call loadInternal when we're not supposed to dispatch events. This ASSERT should help us catch these BeforeLoad errors more quickly. 2012-03-22 Raphael Kubo da Costa Crash in fast/dom/navigator-detached-nocrash.html https://bugs.webkit.org/show_bug.cgi?id=81773 Reviewed by Adam Barth. BatteryManager::create() blindly assumes the Navigator* it receives has a valid Frame, which is not always the case, as made evident by the crashing test. Follow abarth's suggestion and just stop NavigatorBattery::webkitBattery() before it reaches the call to BatteryManager::create() if that's the case. No new tests, covered by fast/dom/navigator-detached-nocrash.html. * Modules/battery/NavigatorBattery.cpp: (WebCore::NavigatorBattery::webkitBattery): 2012-03-22 Emil A Eklund Unreviewed, add missing include statement for CSSValueList.h. * css/CSSStyleSelector.h: 2012-03-22 Tony Chang flexbox flexing implementation should match the spec https://bugs.webkit.org/show_bug.cgi?id=70796 Reviewed by Ojan Vafai. Match the algorithm in the spec. Handling min/max constraints are slightly improved. http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths New test cases in css3/flexbox/flex-algorithm-min-max.html. * rendering/RenderFlexibleBox.cpp: (WebCore::adjustFlexSizeForMinAndMax): Step 5 of resolving flexible lengths. (WebCore): (WebCore::RenderFlexibleBox::Violation::Violation): (RenderFlexibleBox::Violation): (WebCore::RenderFlexibleBox::freezeViolations): Used by step 6. (WebCore::RenderFlexibleBox::resolveFlexibleLengths): * rendering/RenderFlexibleBox.h: 2012-03-22 Emil A Eklund Unreviewed, add missing import. * rendering/RenderThemeMac.mm: 2012-03-22 Anders Carlsson ASSERT(!needsLayout) in RenderView.cpp when visiting http://www.panic.com/blog/ https://bugs.webkit.org/show_bug.cgi?id=81953 Reviewed by Sam Weinig. If a page ends up creating CATiledLayers, CA transactions can be committed outside of the normal CA run loop observer, so we can't call setNeedsDisplay on tile cache layers directly because then we'll end up calling into painting code before all the layers have been flushed. Fix this by adding a list of dirty rects to platformCALayerDidCreateTiles and change GraphicsLayerCA to mark them as dirty. This ensures that any CA transaction commits won't cause newly added layers to be painted. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::LayerClient::platformCALayerDidCreateTiles): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles): * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): * platform/graphics/ca/PlatformCALayerClient.h: (PlatformCALayerClient): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setScale): (WebCore::TileCache::revalidateTiles): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles): 2012-03-19 Robert Hogan Text should overflow when list item height set to 0 https://bugs.webkit.org/show_bug.cgi?id=78726 Reviewed by Julien Chaffraix. Tests: css2.1/20110323/height-applies-to-010a-expected.html fast/css/heightless-list-item-expected.html fast/css/heightless-list-item.html * rendering/RenderListItem.cpp: (WebCore::RenderListItem::paint): If the list item has height:0, only paint it if the list item allows any block or inline content to overflow unclipped. The zero-height check is a shortcut to avoid unnecessary painting and this seems to be the only case where there's something to do. 2012-03-22 Dave Michael HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called https://bugs.webkit.org/show_bug.cgi?id=80428 Reviewed by Eric Seidel. Make HTMLPluginElement release its m_NPObject in detach() to break a reference-counting cycle that happens on reload or navigation. With this change, HTMLPlugInElement::removedFromDocument is unnecessary, so it was removed. Note that Releasing m_NPObject does not result in a call to the plugin; it simply releases a reference count on the wrapper object for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked when the render tree is destroyed, when PluginView calls PluginPackage::unload.) Thus, it is safe to release m_NPObject in detach, because it can not result in layout or style changes. Also added numberOfLiveNodes() and numberOfLiveDocuments() to window.internals to enable testing. Test: plugins/netscape-dom-access-and-reload.html * WebCore.exp.in: * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::detach): * html/HTMLPlugInElement.h: (HTMLPlugInElement): * testing/Internals.cpp: (WebCore::Internals::numberOfLiveDocuments): (WebCore::Internals::numberOfLiveNodes): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-03-22 Shawn Singh [chromium] Make CCDamageTracker robust to empty layer lists https://bugs.webkit.org/show_bug.cgi?id=81831 Reviewed by Adrienne Walker. Added a unit test in CCDamageTrackerTest that causes a crash in the old code. With this patch applied, the crash will not occur. In theory, that crash should never occur anyway, unless there is a bug outside the damage tracker, but for robustness it's appropriate to handle it properly. In addition to this fix, performed some trivial maintenance on the damage tracker code. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::updateDamageTrackingState): removed unclean code that accessed the targetSurface to get necessary information. Instead, we now pass those args through the damage tracker's API. * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): modified args passed to damage tracker on update. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces): modified args passed to damage tracker on update. 2012-03-22 Julien Chaffraix Enable style sharing for elements with a style attribute https://bugs.webkit.org/show_bug.cgi?id=81523 Reviewed by Antti Koivisto. Memory improvement change only. Overall, this is a performance wash (some benchmarks may regress a bit due to the increase in time taken by CSSStyleSelector::locateSharedStyle as we try more nodes, others increase their performance due to style sharing). Instrumenting our style sharing, this should give us some nice memory shavings on some benchmarks: - HTML5 isn't impacted as it doesn't use much inline style - page cyclers' intl1 showed a 6% increase in style sharing. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): This method now handles inline style like presentation attributes on the element. (WebCore::CSSStyleSelector::collectMatchingRulesForList): (WebCore::CSSStyleSelector::locateSharedStyle): Don't bail out for an element with an inline style declaration. (WebCore::CSSStyleSelector::stylesEqual): Generalized attributeStylesEqual to share the logic between attribute and inline style property set. This means that attribute checks are actually doing a little extra more work but that didn't impact our benchmarks. 2012-03-22 Kevin Ollivier [wx] Unreviewed. WebDOM build fix after array type changes. * bindings/scripts/CodeGeneratorCPP.pm: (ShouldSkipType): 2012-03-22 Pavel Feldman Web Inspector: text gutter decorations should move upon edits. https://bugs.webkit.org/show_bug.cgi?id=81932 Reviewed by Vsevolod Vlasov. Decorations set by the line number now shift as editing inserts / removes lines. * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._syncLineHeight): (WebInspector.TextEditorGutterPanel): (WebInspector.TextEditorGutterPanel.prototype.textChanged): (WebInspector.TextEditorGutterPanel.prototype.syncClientHeight): (WebInspector.TextEditorGutterPanel.prototype.addDecoration): (WebInspector.TextEditorGutterPanel.prototype.removeDecoration): 2012-03-21 Robert Hogan CSS 2.1 failure: fixed-table-layout-006 fails https://bugs.webkit.org/show_bug.cgi?id=78412 Reviewed by Julien Chaffraix. Tests: css2.1/20110323/fixed-table-layout-006.htm fast/css/fixed-table-layout-cell-padding.htm In fixed tables, positive width specified on a column should include borders and padding. See the thread at http://lists.w3.org/Archives/Public/www-style/2011Oct/0502.html. The discussion there resulted in a whole new set of tests for section 17.5.2.1 in the CSS 2.1 spec. See http://test.csswg.org/harness/test/CSS21_DEV/section/17.5.2.1/. This patch allows WebKit to pass all of them, and all tests for the 17.5.2.1 section as a whole. I'll land them all separately. * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): Include border width and cell padding in the width of the column. Note that borderAndPaddingLogicalWidth() returns the border width for separate and collapsed borders as appropriate. 2012-03-22 Simon Fraser Factor compositing layer updates after scroll into a new method https://bugs.webkit.org/show_bug.cgi?id=81943 Reviewed by Dean Jackson. Move some code that updates compositing layers after scrolling into its own method, for cleanliness. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollTo): (WebCore::RenderLayer::updateCompositingLayersAfterScroll): (WebCore): * rendering/RenderLayer.h: (RenderLayer): 2012-03-22 Gavin Barraclough Add JSValue::isFunction https://bugs.webkit.org/show_bug.cgi?id=81935 Reviewed by Geoff Garen. This would be useful in the WebCore bindings code. Also, remove asFunction, replace with jsCast. * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::functionDetails): * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): 2012-03-22 Jocelyn Turcotte TiledBackingStore: Fix test regressions that appeared with r111560. https://bugs.webkit.org/show_bug.cgi?id=81519 Reviewed by Kenneth Rohde Christiansen. The visible rect wasn't intersected with the contents rect anymore which could lead to an astronomical layer size to check for intersecting tiles. Add a visibleContentsRect that doesn't do the conversion and use it in visibleAreaIsCovered. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::visibleContentsRect): (WebCore): (WebCore::TiledBackingStore::visibleRect): (WebCore::TiledBackingStore::visibleAreaIsCovered): * platform/graphics/TiledBackingStore.h: (TiledBackingStore): 2012-03-22 Joe Thomas Make Length Calculation functions non-inline https://bugs.webkit.org/show_bug.cgi?id=81733 Currently length calculation functions in LengthFunctions.h are inline. These functions are pretty big to be inline. And these functions are expected to grow again when new length units will be introduced in bug 27160. A decent rule of thumb is to not inline a function if it is more than 10 lines long. Also it's typically not cost effective to inline functions with loops or switch statements. (Reference: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Inline_Functions). Ran PerformanceTests/Parser/html5-full-render.html on Mac Snow-Leopard with and without the patch and did not see much performance difference. Reviewed by Antti Koivisto. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/LengthFunctions.cpp: Added. (WebCore): (WebCore::miminumValueForLength): (WebCore::valueForLength): (WebCore::floatValueForLength): * css/LengthFunctions.h: (WebCore): 2012-03-22 Alexis Menard Increase code sharing between CSSParser and CSSPropertyLonghand. https://bugs.webkit.org/show_bug.cgi?id=81587 Reviewed by Antti Koivisto. Expose the longhands declaration for a given shorthand in CSSPropertyLonghand and make CSSParser use them. It will make the declaration of longhands in one place only. Remove the map of CSSPropertyLonghand and replace it by a regular switch/case. The map doesn't bring much here and it's cleaner and faster to use the switch. It also shows a little performance improvement in CSS/CSSPropertySetterGetter.html. No new tests : no behavior change. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseAnimationShorthand): (WebCore::CSSParser::parseTransitionShorthand): (WebCore::CSSParser::parseShorthand): Modify the prototype of this function to directly use the CSSPropertyLonghand. * css/CSSParser.h: (WebCore): (CSSParser): * css/CSSPropertyLonghand.cpp: (WebCore): (WebCore::backgroundLonghand): (WebCore::backgroundPositionLonghand): (WebCore::backgroundRepeatLonghand): (WebCore::borderLonghand): (WebCore::borderBottomLonghand): (WebCore::borderColorLonghand): (WebCore::borderImageLonghand): (WebCore::borderLeftLonghand): (WebCore::borderRadiusLonghand): (WebCore::borderRightLonghand): (WebCore::borderSpacingLonghand): (WebCore::borderStyleLonghand): (WebCore::borderTopLonghand): (WebCore::borderWidthLonghand): (WebCore::listStyleLonghand): (WebCore::fontLonghand): (WebCore::marginLonghand): (WebCore::outlineLonghand): (WebCore::overflowLonghand): (WebCore::paddingLonghand): (WebCore::webkitAnimationLonghand): (WebCore::webkitBorderAfterLonghand): (WebCore::webkitBorderBeforeLonghand): (WebCore::webkitBorderEndLonghand): (WebCore::webkitBorderStartLonghand): (WebCore::webkitColumnsLonghand): (WebCore::webkitColumnRuleLonghand): (WebCore::webkitFlexFlowLonghand): (WebCore::webkitMarginCollapseLonghand): (WebCore::webkitMarqueeLonghand): (WebCore::webkitMaskLonghand): (WebCore::webkitMaskPositionLonghand): (WebCore::webkitMaskRepeatLonghand): (WebCore::webkitTextEmphasisLonghand): (WebCore::webkitTextStrokeLonghand): (WebCore::webkitTransitionLonghand): (WebCore::webkitTransformOriginLonghand): (WebCore::webkitWrapLonghand): (WebCore::longhandForProperty): * css/CSSPropertyLonghand.h: (WebCore): 2012-03-22 Emil A Eklund Unreviewed, touching file to force bots to pick up CSS_SHADERS flag change. * css/CSSStyleSelector.h: (CSSStyleSelector): 2012-03-22 Xingnan Wang ReverbConvolver::latencyFrames() should return 0. https://bugs.webkit.org/show_bug.cgi?id=81806 Reviewed by Chris Rogers. * platform/audio/ReverbConvolver.cpp: (WebCore::ReverbConvolver::latencyFrames): 2012-03-22 Tony Chang refactor flexbox in preparation for flex-line-pack https://bugs.webkit.org/show_bug.cgi?id=81843 Reviewed by Ojan Vafai. Replace WrapReverseContext with a vector of LineContexts that contain the same information, plus values needed for flex-align. alignChildren has been moved to after all the lines have been positioned. We want to align children after flex-line-pack has changed the size of each line to avoid unnecessary layouts. Take 2: Remove the assert. If there are no children, then there are no flex lines. Instead, assert that child is not null. No new tests, just refactoring. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct, holds information needed for wrap-reverse and aligning children. (RenderFlexibleBox::LineContext): (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time. (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext * rendering/RenderFlexibleBox.h: 2012-03-22 Allan Sandfeld Jensen Event dispatching in XMLHttpRequestProgressEventThrottle should go through XMLHttpRequestProgressEventThrottle::dispatchEvent https://bugs.webkit.org/show_bug.cgi?id=46743 Reviewed by Julien Chaffraix Based on original patch by Anton D'Auria In preparation for platform-specific queuing of XMLHttpRequest events, this patch changes all calls to m_target->dispatchEvent to XMLHttpRequestProgressEventThrottle::dispatchEvent. Currently, we queue only one progress event on suspend() if we have throttled progress events. We should be able to queue all XHR events that can be generated after suspend(), if the platform network layer continues to receive data. XMLHttpRequest uses XMLHttpRequestProgressEventThrottle to dispatch only download events, so this doesn't change behavior of upload events, which aren't throttled or queued. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::callReadyStateChangeListener): * xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent): (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent): (WebCore::XMLHttpRequestProgressEventThrottle::dispatchPausedEvent): (WebCore::XMLHttpRequestProgressEventThrottle::fired): * xml/XMLHttpRequestProgressEventThrottle.h: (XMLHttpRequestProgressEventThrottle): 2012-03-22 Sudarsana Nagineni [EFL] Map BackSpace key code to Unicode value https://bugs.webkit.org/show_bug.cgi?id=81130 Reviewed by Gustavo Noronha Silva. Test: fast/events/backspace-navigates-back.html * platform/efl/EflKeyboardUtilities.cpp: (WebCore::createKeyMap): Map BackSpace to Unicode value 2012-03-22 Abhishek Arya Incorrect beforeChild parent calculation in RenderRubyBase::moveChildren. https://bugs.webkit.org/show_bug.cgi?id=80297 Reviewed by Julien Chaffraix. beforeChild might share the same anonymous block parent with other previous siblings. Before moving the children across ruby bases, we need to make sure to split the tree across the beforeChild correctly. Test: fast/ruby/ruby-text-before-child-split.html * rendering/RenderRubyBase.cpp: (WebCore::RenderRubyBase::moveChildren): 2012-03-22 Kristóf Kosztyó [Qt] Fix Qt minimal build after r111692 Reviewed by Csaba Osztrogonác. * bindings/js/JSScriptProfileNodeCustom.cpp: 2012-03-22 Adrienne Walker [chromium] Fix scrollbar layers holding onto invalid textures after lost context https://bugs.webkit.org/show_bug.cgi?id=81841 Reviewed by James Robinson. Unit test: CCLayerTreeHostImplTest.scrollbarLayerLostContext * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::willDraw): 2012-03-22 Philippe Normand [GTK] ASSERT bug in WebAudio (AudioFileReader) https://bugs.webkit.org/show_bug.cgi?id=81777 Reviewed by Martin Robinson. * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: (WebCore::AudioFileReader::decodeAudioForBusCreation): Don't steal the GstBus floating reference. (WebCore::AudioFileReader::createBus): Ditto. 2012-03-22 Ilya Tikhonovsky Unreviewed: Web Inspector: fix syntax error in text. * English.lproj/localizedStrings.js: * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotWorker.prototype._messageReceived): 2012-03-22 Sheriff Bot Unreviewed, rolling out r111688. http://trac.webkit.org/changeset/111688 https://bugs.webkit.org/show_bug.cgi?id=81912 "Heap profiler test fails" (Requested by yurys on #webkit). * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildRetainers): 2012-03-22 Dana Jansens [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame https://bugs.webkit.org/show_bug.cgi?id=81437 Reviewed by Adrienne Walker. Split CCLayerTreeHostImpl::drawLayers() into two phases: prepareToDraw() and drawLayers(). When calculating a RenderPass, and we checkerboard a quad on a layer, bubble this info back up to CCLayerTreeHostImpl. If the layer is transforming in an animation, then abort the prepareToDraw() phase and cause it to return false back to the thread proxy. Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): (FrameData): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::append): * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwap): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): 2012-03-22 Levi Weintraub Correct LayoutUnit usage in Accessibility code https://bugs.webkit.org/show_bug.cgi?id=81789 Reviewed by Eric Seidel. Reverting Accessibility hit testing code back to integers. Accessibility hit tests originate from the embedder and don't accumulate offsets, so we get nothing from using LayoutUnits, and needlessly expose them to the embedder. No new tests. No change in behavior. * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::elementAccessibilityHitTest): See above. * accessibility/AccessibilityListBox.h: (AccessibilityListBox): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::clickPoint): This value is only ever used to display a context menu, which is always done with integer coordinates. (WebCore::AccessibilityObject::boundingBoxForQuads): This is a bounding box built from floats. We don't pixel snap floats, so we return an integer bounding box. (WebCore::AccessibilityObject::elementAccessibilityHitTest): See above. (WebCore::AccessibilityObject::scrollToMakeVisible): Pixel snapping the bounding box and simplifying up the code to position it at (0,0). * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::accessibilityHitTest): See above. (AccessibilityObject): (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect): Convenience method for embedder callers. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::visiblePositionForPoint): The point passed in here is comes from screen coordinates and originates in embedder code. Reverting it to take an integer. (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): See above. (WebCore::AccessibilityRenderObject::accessibilityHitTest): See above. * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::accessibilityHitTest): See above. * accessibility/AccessibilityScrollView.h: (AccessibilityScrollView): * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySlider::elementAccessibilityHitTest): See above. * accessibility/AccessibilitySlider.h: (AccessibilitySlider): 2012-03-21 Ilya Tikhonovsky Web Inspector: HeapProfiler: Heap snapshot worker has to report the errors to the front-end https://bugs.webkit.org/show_bug.cgi?id=81804 Sometimes the worker process of HeapSnapshot does some wrong thing and throw an Exception. At this momemnt we have no way to see the error in the front-end. Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/HeapSnapshotProxy.js: check the exception field and dump it into front-end's console. (WebInspector.HeapSnapshotWorker.prototype._messageReceived): * inspector/front-end/HeapSnapshotWorkerDispatcher.js: catch the exception and transfer it's text to requester's side. (WebInspector.HeapSnapshotWorkerDispatcher.prototype.dispatchMessage): 2012-03-22 Carlos Garcia Campos [GTK] Use the angle-bracket form to include wtf headers https://bugs.webkit.org/show_bug.cgi?id=81884 Reviewed by Eric Seidel. Use #include instead of #include "foo". * platform/graphics/freetype/FontPlatformData.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/gtk/DataObjectGtk.h: * platform/network/ResourceHandleInternal.h: * platform/network/soup/SocketStreamHandleSoup.cpp: 2012-03-22 Alexander Pavlov Web Inspector: Case of the elements of the xml document should be shown as it is in the console https://bugs.webkit.org/show_bug.cgi?id=81902 When registering a detached root, DOMAgent always presumes it is a node, while it can also be a document. Reviewed by Vsevolod Vlasov. Test: inspector/console/console-xml-document.html * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode): * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._setDetachedRoot): 2012-03-22 Vsevolod Vlasov Web Inspector: Introduce ScriptBound/ScriptUnbound events in ScriptMapping. https://bugs.webkit.org/show_bug.cgi?id=81904 Reviewed by Pavel Feldman. This is another step on the way to cleaner BreakpointManager logic. Here we extract ScriptBound/ScriptUnbound events from UISourceCodeListChanged event. This allows us to handle script-uiSourceCode binding separately from uiSourceCode creation/deletion and to handle unbinding that was not possible at all before. * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype._uiSourceCodesForSourceMap): (WebInspector.CompilerScriptMapping.prototype.addScript.get this): (WebInspector.CompilerScriptMapping.prototype.addScript): (WebInspector.CompilerScriptMapping.prototype.reset): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged): * inspector/front-end/ScriptMapping.js: (WebInspector.MainScriptMapping): (WebInspector.MainScriptMapping.prototype._updateLiveLocation): (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged): (WebInspector.MainScriptMapping.prototype._handleScriptBound): (WebInspector.MainScriptMapping.prototype._handleScriptUnbound): * inspector/front-end/SnippetsModel.js: (WebInspector.SnippetsScriptMapping.prototype.addScript.get this): (WebInspector.SnippetsScriptMapping.prototype._snippetAdded): (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript): (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved.get this): (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved): (WebInspector.SnippetsScriptMapping.prototype.reset): 2012-03-22 Vineet Chaudhary https://bugs.webkit.org/show_bug.cgi?id=81893 Remove custom bindings form ScriptProfileNode.idl of attribute type Array. Reviewed by Kentaro Hara. Replace [CustomGetter] Array with sequence. To remove the custom bindings code. Test: No new tests. LayoutTests/fast/profiler/* test are enough for this. * bindings/js/JSScriptProfileNodeCustom.cpp: Removed custom function. (WebCore::JSScriptProfileNode::callUID): * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: Removed custom function. (WebCore): * inspector/ScriptProfileNode.idl: Replaced Array with sequence. 2012-03-22 Andrey Kosyakov Web Inspector: only update timeline overview categories strips when these are visible https://bugs.webkit.org/show_bug.cgi?id=81903 Reviewed by Pavel Feldman. - factor out category strips update into a separate method; - only invoke it when "Timeline" overview mode is selected. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype._showTimelines): (WebInspector.TimelineOverviewPane.prototype.update): (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips): 2012-03-22 Levi Weintraub Update LayoutUnit usage in FrameSelection https://bugs.webkit.org/show_bug.cgi?id=81754 Reviewed by Eric Seidel. FrameSelection stores its caret and repaint bounds in absolute coordinates. Absolute coordinates we treat as pixel values, so this patch changes these values to integers. Sub-pixel precision will still be used when these coordinates are passed down and used locally. No new tests. No change in behavior. * editing/FrameSelection.cpp: (WebCore::absoluteCaretY): Uses absolute coordinates, which are ints. (WebCore::FrameSelection::modify): Uses absolute coordinates to handle vertical selection modification. Sub-pixel precision will be used when these values are converted to local ones. (WebCore::CaretBase::absoluteBoundsForLocalRect): Absolute coordinates -> ints. (WebCore::FrameSelection::absoluteCaretBounds): Ditto. (WebCore::CaretBase::caretRepaintRect): The caret repaint rect is stored in absolute coordinates. Reverting the values to ints. (WebCore::FrameSelection::recomputeCaretRect): Ditto. * editing/FrameSelection.h: (FrameSelection): * editing/mac/FrameSelectionMac.mm: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Switching to store absolute coordinates as integers. 2012-03-22 Alexei Filippov Web Inspector: Speed up the build retainers phase. https://bugs.webkit.org/show_bug.cgi?id=81763 Replacing the edge iterator with a raw loop makes it faster by more than 10 times. Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildRetainers): 2012-03-22 No'am Rosenthal [Qt][WK2] The background appears to have one extra pixel from the contents https://bugs.webkit.org/show_bug.cgi?id=81830 Reviewed by Kenneth Rohde Christiansen. TextureMapperGL applied a 1-offset that was covering for another bug, which was already fixed. No new tests, this would be tested once we test GL rendering results. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGLData::SharedGLData::scissorClip): 2012-03-22 W. James MacLean Rename touchpad fling curve, add curve parameters to constructor. https://bugs.webkit.org/show_bug.cgi?id=81820 Reviewed by Adrienne Walker. Covered by existing unit tests. * GNUmakefile.list.am: * WebCore.gypi: * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::fireUpAnAnimation): * platform/TouchpadFlingPlatformGestureCurve.cpp: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp. (WebCore): (WebCore::TouchpadFlingPlatformGestureCurve::create): (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve): (WebCore::TouchpadFlingPlatformGestureCurve::~TouchpadFlingPlatformGestureCurve): (WebCore::TouchpadFlingPlatformGestureCurve::apply): * platform/TouchpadFlingPlatformGestureCurve.h: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.h. (WebCore): (TouchpadFlingPlatformGestureCurve): 2012-03-22 Pavel Feldman Web Inspector: make CSS and JavaScript files editable by default. https://bugs.webkit.org/show_bug.cgi?id=81787 Reviewed by Vsevolod Vlasov. This change removes cancelEditing and setReadOnly capabilities from source frame. It removes dblclick handler as well since one does not need to enter editing mode. It also establishes proper content dispatching so that views are updated with the resource content. All these are inter-dependent, need to be landed simultaneously. Drive-by follow up to the r111675 where range is modified prior to the exiting edit mode. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype.requestContent): (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.didEditContent): (WebInspector.JavaScriptSourceFrame.prototype._lineNumberAfterEditing): * inspector/front-end/ResourceView.js: (WebInspector.ResourceSourceFrame): (WebInspector.ResourceSourceFrame.prototype.suggestedFileName): (WebInspector.ResourceSourceFrame.prototype._contentChanged): (WebInspector.EditableResourceSourceFrame.prototype.canEditSource): (WebInspector.EditableResourceSourceFrame.prototype.editContent.callbackWrapper): (WebInspector.EditableResourceSourceFrame.prototype.editContent): (WebInspector.EditableResourceSourceFrame.prototype._contentChanged): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype._innerShowView): (WebInspector.FrameResourceTreeElement.prototype._appendRevision): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.setScriptSourceIsDirty): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.wasShown): (WebInspector.SourceFrame.prototype.willHide): (WebInspector.SourceFrame.prototype.beforeTextChanged): (WebInspector.SourceFrame.prototype.setContent): (WebInspector.SourceFrame.prototype.commitEditing): (WebInspector.SourceFrame.prototype.didEditContent): (WebInspector.SourceFrame.prototype.editContent): * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype._startEditing): (WebInspector.TextPrompt.prototype._stopEditing): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer): (WebInspector.TextViewer.prototype._registerShortcuts): (WebInspector.TextEditorMainPanel.prototype.handleEnterKey): 2012-03-22 Allan Sandfeld Jensen [Qt] Enable FAST_MOBILE_SCROLLING when scrolling is delegated. https://bugs.webkit.org/show_bug.cgi?id=81889 Reviewed by Kenneth Rohde Christiansen. On the Qt platform only enable the fast mobile scroll feature when scrolling is delegated. * rendering/RenderObject.cpp: (WebCore::RenderObject::styleWillChange): 2012-03-22 Pavel Feldman Web Inspector: dispatch styleSheetChanged event synchronously. https://bugs.webkit.org/show_bug.cgi?id=81892 Reviewed by Vsevolod Vlasov. Today, backend generates stylesheet change event synchronously from within set* command. But CSSStyleModel defers its dispatching until the stylesheet content is available. This prevents us from ignoring update events from within commands that initiated those updates. This change makes stylesheet change event dispatch synchronously and delegates stylesheet content fetching to the event client. * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged): (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt): (WebInspector.CSSStyleModelResourceBinding.prototype.setContent): (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent.callbackWrapper): (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent): (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged.callback): (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged): (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged): 2012-03-21 Ian Vollick [chromium] timing functions are getting incorrectly applied for accelerated css transitions https://bugs.webkit.org/show_bug.cgi?id=81692 Reviewed by Adrienne Walker. Tested in CCLayerTreeHostTestAddAnimationWithTimingFunction * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: 2012-03-22 Pavel Feldman Web Inspector: allow on-hover popover while in edit mode. https://bugs.webkit.org/show_bug.cgi?id=81898 Reviewed by Vsevolod Vlasov. This change allows popover while in-edit mode, hides it upon Esc. It also introduces anchorOverride concept in ObjectPopoverHelper that allows dynamically switching the anchor (say if we want to highlight anchor itself). * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/ElementsPanel.js: * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover.showObjectPopover): (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover): (WebInspector.JavaScriptSourceFrame.prototype._onKeyDown): * inspector/front-end/NetworkPanel.js: * inspector/front-end/ObjectPopoverHelper.js: (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.): (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover): * inspector/front-end/Popover.js: (WebInspector.PopoverHelper.prototype.isPopoverVisible): * inspector/front-end/TimelinePanel.js: 2012-03-22 Pavel Feldman Web Inspector: breakpoints should shift when line break is inserted in the middle of the line. https://bugs.webkit.org/show_bug.cgi?id=81896 Reviewed by Vsevolod Vlasov. There is a bug that collapses selection prior to exiting change mode, we should never collapse edit area prior committing. * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.endsWithBracketRegex.): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer): (WebInspector.TextEditorMainPanel.prototype.highlightLine): (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.callback): (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo): 2012-03-22 Zoltan Herczeg Merge SVGImageBufferTools to SVGRenderingContext https://bugs.webkit.org/show_bug.cgi?id=81890 Reviewed by Nikolas Zimmermann. Copy the code to SVGRenderingContext and delete SVGImageBufferTools[.cpp.h]. Update build systems, no functionality change. This is the first step towards making SVGImageBufferTools stageful. Existing tests cover this issue. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * rendering/svg/RenderSVGAllInOne.cpp: * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): (WebCore::RenderSVGResourcePattern::createTileImage): * rendering/svg/SVGImageBufferTools.cpp: Removed. * rendering/svg/SVGImageBufferTools.h: Removed. * rendering/svg/SVGInlineTextBox.cpp: * rendering/svg/SVGRenderingContext.cpp: (WebCore::currentContentTransformation): (WebCore): (WebCore::SVGRenderingContext::calculateTransformationToOutermostSVGCoordinateSystem): (WebCore::SVGRenderingContext::createImageBuffer): (WebCore::SVGRenderingContext::createImageBufferForPattern): (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): (WebCore::SVGRenderingContext::clipToImageBuffer): (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect): (WebCore::SVGRenderingContext::clampedAbsoluteSize): (WebCore::SVGRenderingContext::clear2DRotation): * rendering/svg/SVGRenderingContext.h: (SVGRenderingContext): (WebCore::SVGRenderingContext::calculateImageBufferRect): * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::platformApplySoftware): 2012-03-22 Hyowon Kim [EFL] Add PageClientEfl to WebCoreSupport. https://bugs.webkit.org/show_bug.cgi?id=80748 Reviewed by Noam Rosenthal. * platform/Widget.h: Use PageClientEfl as type for PlatformPageClient. (WebCore): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::createSurface): Change the argument type. * plugins/efl/PluginViewEfl.cpp: (WebCore::PluginView::platformGetValue): Use PageClientEfl. 2012-03-22 Kaustubh Atrawalkar blur() on shadow host should work when a shadow host contains a focused element in its shadow DOM subtrees https://bugs.webkit.org/show_bug.cgi?id=81102 Reviewed by Hajime Morita. This implementation will support blur for a focused element when its shadowHost's blur() is called. To achieve this Element::blur() function is modified to blur the focused node in it's treeScope. Test: fast/dom/shadow/shadow-root-blur.html * dom/Element.cpp: (WebCore::Element::blur): Modified to blur current treeScope's focused node. * dom/ShadowRoot.h: (WebCore::ShadowRoot::activeElement): Rework for code sharing. * dom/TreeScope.cpp: (WebCore::TreeScope::focusedNode): Added new function to share code for getting focused node. * dom/TreeScope.h: (TreeScope): New function declartion. * html/HTMLDocument.cpp: (WebCore::HTMLDocument::activeElement): Rework for code sharing. 2012-03-22 Vsevolod Vlasov Web Inspector: RawSourceCode does not need uiSourceCode lists because it never has more than one. https://bugs.webkit.org/show_bug.cgi?id=81894 RawSourceCode never has more than one uiSourceCode, uiSourceCodeList are just remains of older implementation. This patch switches RawSourceCode and SourceMappings from uiSourceCodeList to uiSourceCode. Reviewed by Pavel Feldman. * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype.uiSourceCode): (WebInspector.RawSourceCode.prototype._saveSourceMapping): (WebInspector.RawSourceCode.SourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.SourceMapping.prototype.uiSourceCode): (WebInspector.RawSourceCode.PlainSourceMapping): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiSourceCode): (WebInspector.RawSourceCode.FormattedSourceMapping): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiSourceCode): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.uiSourceCodeList): (WebInspector.ResourceScriptMapping.prototype.addScript): (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged): (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged): (WebInspector.ResourceScriptMapping.prototype.reset): 2012-03-22 Mario Sanchez Prada [GTK] Fix the only remaining coding style issue in GTK accessibility code https://bugs.webkit.org/show_bug.cgi?id=81885 Reviewed by Xan Lopez. Add needed extra line and remove an unneeded one. * accessibility/gtk/AccessibilityObjectAtk.cpp: 2012-03-22 Kent Tamura Expand RenderTextControlSingleLine::controlClipRect() to contain contentRect(). https://bugs.webkit.org/show_bug.cgi?id=81866 Reviewed by Hajime Morita. We need to expand the controlClipRect because the existing shadow tree of a text field can be wrapped by another shadow tree. e.g. A current situation: ┗ ShadowRoot ┗ container element ┌────────────┐'s border box │┌──────────┐│ ││container box ││ │└──────────┘│ └────────────┘ Wrapped by another ShadowRoot: ┗ New ShadowRoot ┣ represents the existing shadow tree ┃ ┗ container element ┗ D: an additional decoration element ┌────────────┐'s border box │┌───────┬──┐│ ││container box │ D ││ │└───────┴──┘│ └────────────┘ In this case, if we clip child renderers by container box, D is not drawn. We should clip by the content box of the . A search field has an exceptional behavior. It can have the container box of which height is taller than the content box height. The controlClipRect should contain both of the container box and the content box in this case. In other cases, the container box is equivalent to the content box. So the code always unites them. No new tests. This won't make any behavior change for now. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::controlClipRect): 2012-03-22 Yoshifumi Inoue [Forms] The option element should not be form associated element. https://bugs.webkit.org/show_bug.cgi?id=79764 Reviewed by Kent Tamura. This patch changes base class of HTMLOptionELement to HTMLElement from HTMLFormControlElement for saving memory space and iteration time of extra "option" elements in HTMLFormElement::m_formAssociatedElements and matching the HTML5 specification for ease of maintenance. This patch changes behavior of handling of CSS pseudo classes "invalid" and "valid". The "option" elements no longer use these CSS pseudo classes as HTML5 specification. This bug was filed in https://bugs.webkit.org/show_bug.cgi?id=80088 Changes of TextIterator is lead by usage of isFormControlElement. This changes will be replaced with more meaningful predicate as part of https://bugs.webkit.org/show_bug.cgi?id=80381 No new tests but updated select-live-pseudo-selectors.html test. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): Added checking of the "option" element and returns false as HTMLFormControlElement. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOneSelector): Removed isFormControlElement for PseudoDisabled and PseudoChecked. * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed form parameter of call site of HTMLOptionElement::create. * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::HTMLOptionElement): Removed form parameter which no longer needed. Changed base class in initialization list. Added m_disabled initialization. (WebCore::HTMLOptionElement::create): Removed form parameter which no longer needed. (WebCore::HTMLOptionElement::attach): Changeid base class. (WebCore::HTMLOptionElement::detach): Changed base class. (WebCore::HTMLOptionElement::parseAttribute): Changed base class. Added "disabled" attribute handling. (WebCore::HTMLOptionElement::childrenChanged): Changed base class. (WebCore::HTMLOptionElement::insertedIntoTree): Changed base class. * html/HTMLOptionElement.h: (HTMLOptionElement): Added new member variable m_disabled which was in HTMLFormControlElement. (WebCore::HTMLOptionElement::ownElementDisabled): Changed for using m_disabled. * html/HTMLTagNames.in: Removed constructorNeedsFormElement for the "option" element, which was used for passing form parameter to create function. 2012-03-21 Pavel Podivilov Web Inspector: rename ClosureCompilerSourceMapping to SourceMapParser and move it to CompilerScriptMapping.js. https://bugs.webkit.org/show_bug.cgi?id=81780 Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/CompilerScriptMapping.js: (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript): (WebInspector.SourceMapParserPayload): (WebInspector.SourceMapParser): (WebInspector.SourceMapParser.prototype.load): (WebInspector.SourceMapParser.prototype.compiledLocationToSourceLocation): (WebInspector.SourceMapParser.prototype.sourceLocationToCompiledLocation): (WebInspector.SourceMapParser.prototype.sources): (WebInspector.SourceMapParser.prototype.loadSourceCode): (WebInspector.SourceMapParser.prototype._findMapping): (WebInspector.SourceMapParser.prototype._parseMappingPayload): (WebInspector.SourceMapParser.prototype._parseSections): (WebInspector.SourceMapParser.prototype._parseMap): (WebInspector.SourceMapParser.prototype._isSeparator): (WebInspector.SourceMapParser.prototype._decodeVLQ): (WebInspector.SourceMapParser.prototype._canonicalizeURL): (WebInspector.SourceMapParser.StringCharIterator): (WebInspector.SourceMapParser.StringCharIterator.prototype.next): (WebInspector.SourceMapParser.StringCharIterator.prototype.peek): (WebInspector.SourceMapParser.StringCharIterator.prototype.hasNext): * inspector/front-end/CompilerSourceMapping.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2012-03-21 Vsevolod Vlasov Web Inspector: IndexedDB transaction is not closed when requesting data. https://bugs.webkit.org/show_bug.cgi?id=81837 Reviewed by Pavel Feldman. * inspector/InspectorIndexedDBAgent.cpp: Added missing IDBCursorBackendInterface::postSuccessHandlerCallback() call. (WebCore): 2012-03-21 Yury Semikhatsky Web Inspector: event listeners section is broken for about:blank page https://bugs.webkit.org/show_bug.cgi?id=81795 Parse about:blank as a valid URL. Reviewed by Pavel Feldman. Test: inspector/elements/event-listeners-about-blank.html * inspector/front-end/utilities.js: (String.prototype.asParsedURL): 2012-03-21 Dan Bernstein REGRESSION (r111635): Assertion failure in RenderFlexibleBox::layoutFlexItems() (!lineContexts.size()) in many flexbox tests https://bugs.webkit.org/show_bug.cgi?id=81870 Reverted r111635, the fix for bug 81843. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::WrapReverseContext::WrapReverseContext): (WebCore::RenderFlexibleBox::WrapReverseContext::addCrossAxisOffset): (RenderFlexibleBox::WrapReverseContext): (WebCore::RenderFlexibleBox::WrapReverseContext::addNumberOfChildrenOnLine): (WebCore::RenderFlexibleBox::WrapReverseContext::lineCrossAxisDelta): (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::alignChildren): (WebCore::RenderFlexibleBox::flipForWrapReverse): * rendering/RenderFlexibleBox.h: 2012-03-21 Emil A Eklund Unreviewed change touching CustomFilterProgram.h to try to force the chromium-win bots to rebuilt it and pick up on the fact that CSS_SHADERS is not set (since r111610). * platform/graphics/filters/CustomFilterProgram.h: 2012-03-21 Vangelis Kokkevis [chromium] FPS counter causes garbage to be displayed at top left corner https://bugs.webkit.org/show_bug.cgi?id=81851 The HUD expects the PlatformCanvas it paints on to be cleared on creation which is no longer true after http://src.chromium.org/viewvc/chrome?view=rev&revision=127196 . This patch does an explicit clearRect before the HUD contents are painted. Reviewed by Adrienne Walker. TEST=Manually verified that --show-fps-counter and --show-composited-layer-tree work correctly. * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): 2012-03-21 Ryosuke Niwa Touch a file to make Chromium Windows bots happy. * css/CSSValueKeywords.in: 2012-03-19 Igor Oliveira Every call to RenderObject::setAnimatableStyle() iterates through all m_compositeAnimations: potentially O(N^2) https://bugs.webkit.org/show_bug.cgi?id=38025 Implement updateAnimationTimerForRender. This reduces unnecessary animation steps on the current RenderObject by checking the value of timeToNextService before starting a new timer. Reviewed by Dean Jackson. Test: animations/animation-welcome-safari.html * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer): (WebCore): (WebCore::AnimationController::updateAnimations): * page/animation/AnimationControllerPrivate.h: (AnimationControllerPrivate): 2012-03-21 Sheriff Bot Unreviewed, rolling out r111616. http://trac.webkit.org/changeset/111616 https://bugs.webkit.org/show_bug.cgi?id=81862 broke chromium mac (Requested by eae on #webkit). * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::append): * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwap): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): 2012-03-21 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=80322 Implement image-set Reviewed by Dean Jackson. This initial implementation of -webkit-image-set. http://lists.w3.org/Archives/Public/www-style/2012Feb/1103.html The idea behind the feature is to allow authors to provide multiple variants of the same image at differing resolutions, and to allow the User Agent to choose the resource that is most appropriate at the time. This patch will choose the most appropriate image based on device scale factor. CSSImageSetValue inherits from CSSValueList and behaves a lot like CSSImageValue. * WebCore.xcodeproj/project.pbxproj: * css/CSSImageSetValue.h: Added. (WebCore): (CSSImageSetValue): (WebCore::CSSImageSetValue::create): (WebCore::CSSImageSetValue::isPending): (ImageWithScale): (WebCore::CSSImageSetValue::compareByScaleFactor): * css/CSSImageSetValue.cpp: Added. (WebCore): (WebCore::CSSImageSetValue::CSSImageSetValue): (WebCore::CSSImageSetValue::~CSSImageSetValue): (WebCore::CSSImageSetValue::cachedOrPendingImageSet): (WebCore::CSSImageSetValue::customCssText): fillImageSet() iterates through the value list and turns the information into a sorted Vector of ImageWithScales (which is a struct containing image URLs and scale factors). (WebCore::CSSImageSetValue::fillImageSet): cachedImageSet() finds which image is most appropriate based on the device scale factor, and it loads only that image. In the future, additional scale factors will be taken into account. (WebCore::CSSImageSetValue::bestImageForScaleFactor): (WebCore::CSSImageSetValue::cachedImageSet): parseImageSet() is called everywhere in the CSSParser that a regular image or generated image can be found. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseFillImage): (WebCore::CSSParser::parseBorderImage): (WebCore): (WebCore::CSSParser::parseImageSet): * css/CSSParser.h: Since CSSImageSetValue is implemented as a value list, ApplyPropertyFillLayer::applyValue() needs to be more specific when it's looking for a list of multiple URLs. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyFillLayer::applyValue): Handle image-set as a valid image value. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSStyleSelector.h: (CSSStyleSelector): * css/CSSValue.cpp: (WebCore::CSSValue::cssText): (WebCore::CSSValue::destroy): * css/CSSValue.h: (CSSValue): (WebCore::CSSValue::isImageSetValue): computeIntrinsicDimensions() now takes an optional scaleFactor parameter that represents the author-enforced "intrinsic" scale factor of the image. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::computeIntrinsicDimensions): * loader/cache/CachedImage.h: (CachedImage): * platform/graphics/GeneratedImage.h: (GeneratedImage): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratedImage::computeIntrinsicDimensions): * platform/graphics/Image.cpp: (WebCore::Image::computeIntrinsicDimensions): * platform/graphics/Image.h: (Image): * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::computeIntrinsicDimensions): * platform/graphics/cg/PDFDocumentImage.h: (PDFDocumentImage): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::computeIntrinsicDimensions): * svg/graphics/SVGImage.h: (SVGImage): Inherits from StyleImage and returns a scaled size for imageSize() and computeIntrinsicDimensions(). * rendering/style/StyleCachedImageSet.cpp: Added. (WebCore): (WebCore::StyleCachedImageSet::StyleCachedImageSet): (WebCore::StyleCachedImageSet::cssValue): (WebCore::StyleCachedImageSet::canRender): (WebCore::StyleCachedImageSet::isLoaded): (WebCore::StyleCachedImageSet::errorOccurred): (WebCore::StyleCachedImageSet::imageSize): (WebCore::StyleCachedImageSet::imageHasRelativeWidth): (WebCore::StyleCachedImageSet::imageHasRelativeHeight): (WebCore::StyleCachedImageSet::computeIntrinsicDimensions): (WebCore::StyleCachedImageSet::usesImageContainerSize): (WebCore::StyleCachedImageSet::setContainerSizeForRenderer): (WebCore::StyleCachedImageSet::addClient): (WebCore::StyleCachedImageSet::removeClient): (WebCore::StyleCachedImageSet::image): * rendering/style/StyleCachedImageSet.h: Added. (WebCore): (StyleCachedImageSet): (WebCore::StyleCachedImageSet::create): (WebCore::StyleCachedImageSet::data): (WebCore::StyleCachedImageSet::cachedImage): Handle image-set. * rendering/style/StyleImage.h: (WebCore::StyleImage::isCachedImageSet): (WebCore::StyleImage::StyleImage): (StyleImage): * rendering/style/StylePendingImage.h: (StylePendingImage): (WebCore::StylePendingImage::cssImageSetValue): 2012-03-21 David Barton MathML internals - improve naming in RenderMathMLSquareRoot.cpp and RenderMathMLRoot.cpp https://bugs.webkit.org/show_bug.cgi?id=81850 Reviewed by Eric Seidel. This prepares these files for bug fixes, and eventually combining their common code. To understand this patch, I suggest you start with RenderMathMLSquareRoot.cpp, as it's simpler than RenderMathMLRoot.cpp. No new tests. LayoutTests/mathml/presentation/roots.xhtml is thorough enough for this. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore): (WebCore::RenderMathMLRoot::addChild): (WebCore::RenderMathMLRoot::paint): (WebCore::RenderMathMLRoot::layout): * rendering/mathml/RenderMathMLRoot.h: (WebCore): (RenderMathMLRoot): * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore): (WebCore::RenderMathMLSquareRoot::paint): (WebCore::RenderMathMLSquareRoot::layout): * rendering/mathml/RenderMathMLSquareRoot.h: (WebCore): (RenderMathMLSquareRoot): * rendering/mathml/RenderMathMLSubSup.h: (WebCore): 2012-03-21 Tony Chang refactor flexbox in preparation for flex-line-pack https://bugs.webkit.org/show_bug.cgi?id=81843 Reviewed by Ojan Vafai. Replace WrapReverseContext with a vector of LineContexts that contain the same information, plus values needed for flex-align. alignChildren has been moved to after all the lines have been positioned. We want to align children after flex-line-pack has changed the size of each line to avoid unnecessary layouts. No new tests, just refactoring. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct, holds information needed for wrap-reverse and aligning children. (RenderFlexibleBox::LineContext): (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time. (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext * rendering/RenderFlexibleBox.h: 2012-03-21 Ryosuke Niwa BDI element should have dir=auto by default https://bugs.webkit.org/show_bug.cgi?id=68773 Reviewed by Daniel Bates. Treat bdi elements without dir content attribute as if they have dir=auto per spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-bdi-element The patch tries to encapsulate the logic to look for dir content attribute and dir=auto. It also adds HTMLBDIElement interface (binding remains to use HTMLElement) to set selfOrAncestorHasDirAutoAttribute flag true by default, which is used by functions like directionalityIfhasDirAutoAttribute to look for elements with dir=auto. Since dir=auto-ness of bdi elements can be overridden by dir content attribute, we must change and only change the default value. Tests: fast/text/international/bdi-dir-default-to-auto-expected.html fast/text/international/bdi-dir-default-to-auto.html * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * html/HTMLBDIElement.h: Added. (WebCore): (HTMLBDIElement): (WebCore::HTMLBDIElement::create): (WebCore::HTMLBDIElement::HTMLBDIElement): Sets selfOrAncestorHasDirAutoAttribute to true because bdi elements are treated as if it has dir=auto by default. * html/HTMLElement.cpp: (WebCore::elementAffectsDirectionality): Added. Checks if the specified element is bdi or has dir content attribute. (WebCore): (WebCore::setHasDirAutoFlagRecursively): (WebCore::HTMLElement::hasDirectionAuto): Added. Checks if the specified element should be treated as if it has dir=auto (bdi or element with dir=auto). (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): * html/HTMLElement.h: (HTMLElement): * html/HTMLTagNames.in: Use HTMLBDIElement instead of HTMLElement for constructing bdi element to set selfOrAncestorHasDirAutoAttribute true but still use HTMLElement for binding. 2012-03-21 Luke Macpherson Use CSSPrimitiveValue::convertToLength() in a few places. https://bugs.webkit.org/show_bug.cgi?id=81492 Reviewed by Eric Seidel. No new tests - refactoring only. CSSPrimitiveValue::convertToLength() provides the same functionality that is duplicated in many places in CSSStyleSelector. This patch removes some of that code duplication. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyVerticalAlign::applyValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-03-21 Patrick Gansterer Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r111601. * rendering/svg/RenderSVGRoot.cpp: 2012-03-21 Patrick Gansterer Build fix for !ENABLE(INSPECTOR) after r104831. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidParseSource): 2012-03-21 Xiaomei Ji visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox https://bugs.webkit.org/show_bug.cgi?id=81408 Reviewed by Ryosuke Niwa. Cache logically ordered leaf boxes under a particular root box. Also, move 'Vector string' declared in visualWordPosition() to outside of loop (it is always clear-ed before use). * editing/visible_units.cpp: (CachedLogicallyOrderedLeafBoxes): Add class to cache logically ordered leaf boxes under a particular root box. (WebCore::CachedLogicallyOrderedLeafBoxes::size): (WebCore::CachedLogicallyOrderedLeafBoxes::firstBox): (WebCore): (WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes): (WebCore::CachedLogicallyOrderedLeafBoxes::previousTextBox): (WebCore::CachedLogicallyOrderedLeafBoxes::nextTextBox): (WebCore::CachedLogicallyOrderedLeafBoxes::collectBoxes): (WebCore::CachedLogicallyOrderedLeafBoxes::boxIndexInLeaves): (WebCore::logicallyPreviousBox): Pass CachedLogicallyOrderedLeafBoxes object around. (WebCore::logicallyNextBox): (WebCore::wordBreakIteratorForMinOffsetBoundary): (WebCore::wordBreakIteratorForMaxOffsetBoundary): (WebCore::visualWordPosition): 2012-03-21 Dana Jansens [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame https://bugs.webkit.org/show_bug.cgi?id=81437 Reviewed by Adrienne Walker. Split CCLayerTreeHostImpl::drawLayers() into two phases: prepareToDraw() and drawLayers(). When calculating a RenderPass, and we checkerboard a quad on a layer, bubble this info back up to CCLayerTreeHostImpl. If the layer is transforming in an animation, then abort the prepareToDraw() phase and cause it to return false back to the thread proxy. Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): (FrameData): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::append): * platform/graphics/chromium/cc/CCQuadCuller.h: (CCQuadCuller): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForLayer): * platform/graphics/chromium/cc/CCRenderPass.h: (CCRenderPass): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: (WebCore::CCScrollbarLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: (CCScrollbarLayerImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: (WebCore::CCSolidColorLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: (CCSolidColorLayerImpl): * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: (WebCore::CCTextureLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTextureLayerImpl.h: (CCTextureLayerImpl): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwap): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (CCTiledLayerImpl): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (CCVideoLayerImpl): 2012-03-21 Enrica Casucci WebKitURLWithTitles pasteboard format should support URLs containing Emoji characters. https://bugs.webkit.org/show_bug.cgi?id=81835 Reviewed by Brady Eidson. When writing the URL in the pasteboard for the WebURLWithTitles format, we use the user visible string instead of the original URL. In case of URL with Unicode characters, we lose the encoding. Added TestWebKitAPI test. * platform/mac/PasteboardMac.mm: (WebCore::writeURLForTypes): Writes to the pasteboard the original URL. 2012-03-21 Levi Weintraub Correct LayoutUnit usage in VisiblePosition.cpp https://bugs.webkit.org/show_bug.cgi?id=81775 Reviewed by Eric Seidel. Correcting a mismatch between the .h and .cpp for the definition of localCaretRect, and properly using LayoutUnits for local coordinates. No new tests. No change in behavior. * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::localCaretRect): Switching to return a LayoutRect, as in the header. Local coordinates are in LayoutUnits. (WebCore::VisiblePosition::absoluteCaretBounds): Using LayoutRect for the localCaretRect. (WebCore::VisiblePosition::lineDirectionPointForBlockDirectionNavigation): Ditto. 2012-03-21 Adam Klein "this" argument for MutationCallbacks should be the MutationObserver https://bugs.webkit.org/show_bug.cgi?id=81712 Reviewed by Adam Barth. Test: fast/mutation/callback-arguments.html * bindings/js/JSCallbackData.cpp: (WebCore::JSCallbackData::invokeCallback): Add an overload that takes an explicit this argument and have the old method call the new one. * bindings/js/JSCallbackData.h: (JSCallbackData): * bindings/js/JSMutationCallbackCustom.cpp: (WebCore::JSMutationCallback::handleEvent): Call the new overload. * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): Add an overload that takes an explicit this argument and have the old method call the new one. * bindings/v8/custom/V8CustomVoidCallback.h: (WebCore): * bindings/v8/custom/V8MutationCallbackCustom.cpp: (WebCore::V8MutationCallback::handleEvent): Call the new overload. 2012-03-21 Alexandru Chiculita [CSS Shaders] Make CSS Shaders compile on Chromium https://bugs.webkit.org/show_bug.cgi?id=81435 Reviewed by Stephen White. This patch enables the CSS Shaders compile time flag, but keeps the runtime flag disabled. The only way to test the functionality now is to use the overridePreference from dump render tree. Also part of this patch I fix a layering violation: I removed the "Document" reference from the FECustomFilter.cpp and passed the HostWindow directly. There should be no problem when the HostWindow changes, because the RenderLayer and the FECustomFilter get recreated anyway. No new tests. I've updated the existing custom filter tests to run under Chromium and added the expected results. I've just added window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1") to force enable the feature at runtime. * loader/cache/CachedResource.cpp: Made CachedResource::ShaderResource report as ResourceRequest::TargetIsSubresource for Chromium. (WebCore::cachedResourceTypeToTargetType): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::FECustomFilter): Removed Document and just used the HostWindow directly. (WebCore::FECustomFilter::create): (WebCore::FECustomFilter::initializeContext): (WebCore::FECustomFilter::bindVertexAttribute): There was a typo and instead of using the "size" parameter it always used 4 component attribute. Other drivers didn't complain about it, but it was clearly a bug. (WebCore::FECustomFilter::bindProgramAndBuffers): Reading the image back from GPU will flip vertically the framebuffer in Chromium. I've flipped the projection matrix only on Chromium, so that we get the correct result. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::build): Passing the HostWindow instead of the Document. 2012-03-21 Mark Pilgrim Realphabetize about webaudio move https://bugs.webkit.org/show_bug.cgi?id=81825 Reviewed by Adam Barth. No new tests, all existing tests pass. * CMakeLists.txt: 2012-03-21 Anders Carlsson Evict tiles from pages in background tabs https://bugs.webkit.org/show_bug.cgi?id=81829 Reviewed by Andreas Kling. When the tile cache for a page is no longer in a window (which happens when it's moved to a background tab), schedule a tile revalidation after 4 seconds. This tile revalidation will ensure that tiles outside of the visible rect will be dropped. * platform/graphics/ca/mac/TileCache.h: (TileCache): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::tileCacheLayerBoundsChanged): (WebCore::TileCache::setIsInWindow): (WebCore::TileCache::tileCoverageRect): (WebCore): (WebCore::TileCache::scheduleTileRevalidation): (WebCore::TileCache::revalidateTiles): 2012-03-21 Stephen Chenney SVG layout leaves objects still needing layout https://bugs.webkit.org/show_bug.cgi?id=81006 Reviewed by Nikolas Zimmermann. Change the layout of SVG objects such that resources that trigger layout of other objects are handled in a distinct pass, and then objects still requiring layout are laid out again. Test: svg/custom/delete-text-innerText-crash.html * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::layout): * rendering/svg/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::layout): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): (WebCore::RenderSVGRoot::addResourceForClientInvalidation): (WebCore): * rendering/svg/RenderSVGRoot.h: (RenderSVGRoot): 2012-03-21 Tim Horton Make use of CG rounded-rect primitives https://bugs.webkit.org/show_bug.cgi?id=79932 Reviewed by Simon Fraser. Portions of patch by Nikolas Zimmermann and Mustafizur Rahaman. Dispatch to potentially platform-specific rounded rectangle path construction from addPathForRoundedRect. Make use of this to call wkCGPathAddRoundedRect on Lion and above, as long as the rounded corners are all equivalent. The origin of the stroke dash differs between the bezier approach and the path added by wkCGPathAddRoundedRect, so Path::addRoundedRect() takes a new parameter allowing code which is sensitive to stroke dash origin (i.e. SVG) to fall back to the old behavior if need be. Make use of the new Path::addRoundedRect() parameter to fall back to the old (bezier) rounded-rect behavior when constructing a dashed SVG path, in order to continue complying with the spec. No new tests, as this is covered by many that use rounded corners, and is only a performance improvement. * WebCore.exp.in: * platform/graphics/Path.cpp: (WebCore::Path::addRoundedRect): (WebCore): (WebCore::Path::addPathForRoundedRect): * platform/graphics/Path.h: (Path): * platform/graphics/cg/PathCG.cpp: (WebCore::Path::platformAddPathForRoundedRect): (WebCore): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * rendering/svg/SVGPathData.cpp: (WebCore::updatePathFromRectElement): 2012-03-21 David Reveman [Chromium] GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query support. https://bugs.webkit.org/show_bug.cgi?id=80988 Reviewed by Adrienne Walker. Expose EXT_occlusion_query API to WebKit compositor. Add GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query enums. * platform/graphics/chromium/Extensions3DChromium.h: (Extensions3DChromium): 2012-03-21 Tony Chang compute the sign of flexibility for new flexbox https://bugs.webkit.org/show_bug.cgi?id=81722 Reviewed by Ojan Vafai. This implements the computation of the sign of flexibility used by the new flexing algorithm. http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths No new tests, we don't use the sign of flexibility yet. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutFlexItems): (WebCore::RenderFlexibleBox::computeNextFlexLine): Compute the size adjusted for min/max as well as not adjusted. (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Renamed to match spec text better. * rendering/RenderFlexibleBox.h: Added enum for flex sign. 2012-03-21 Vsevolod Vlasov Web Inspector: Extract WebInspector.UIBreakpoint from WebInspector.Breakpoint. https://bugs.webkit.org/show_bug.cgi?id=81669 Reviewed by Pavel Feldman. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.get for): (WebInspector.BreakpointManager): (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved): (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype.removeBreakpoint): (WebInspector.BreakpointManager.prototype._innerRemoveBreakpoint): (WebInspector.BreakpointManager.prototype.removeAllBreakpoints): (WebInspector.BreakpointManager.prototype._moveBreakpointInUI): (WebInspector.BreakpointManager.prototype._uiBreakpoints.get this): (WebInspector.BreakpointManager.prototype._uiBreakpoints): (WebInspector.BreakpointManager.prototype.get _uiBreakpoint): (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI): (WebInspector.BreakpointManager.prototype._breakpoints): (WebInspector.BreakpointManager.prototype._breakpoint): (WebInspector.BreakpointManager.prototype._addBreakpointToModel): (WebInspector.BreakpointManager.prototype._removeBreakpointFromModel): (WebInspector.BreakpointManager.prototype._forEachBreakpoint): (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger): (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger): (WebInspector.BreakpointManager.prototype.debuggerReset): (WebInspector.Breakpoint.prototype.serialize): (WebInspector.Breakpoint.prototype.get uiBreakpoint): (WebInspector.Breakpoint.prototype.createUIBreakpoint): (WebInspector.Breakpoint.prototype.removeUIBreakpoint): (WebInspector.UIBreakpoint): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged): (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): * inspector/front-end/ScriptsPanel.js: 2012-03-21 Anders Carlsson TileCache needs to know if its containing page is in a window https://bugs.webkit.org/show_bug.cgi?id=81821 Reviewed by Andreas Kling. This is in preparation for throwing away invisible tiles in background tabs to reduce memory usage. * page/FrameView.cpp: (WebCore::FrameView::didMoveOnscreen): (WebCore::FrameView::willMoveOffscreen): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::didMoveOnscreen): (WebCore::Page::willMoveOffscreen): * page/Page.h: (WebCore::Page::isOnscreen): (Page): * platform/graphics/TiledBacking.h: (TiledBacking): * platform/graphics/ca/mac/TileCache.h: (TileCache): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::TileCache): (WebCore::TileCache::setIsInWindow): (WebCore): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): 2012-03-21 Xingnan Wang Web audio layout test failed in debug with an ASSERT error in ReverbConvolverStage.cpp https://bugs.webkit.org/show_bug.cgi?id=81744 Reviewed by Chris Rogers. * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::ReverbConvolverStage): 2012-03-21 Xiaomei Ji [chromium] Font fallback in cr-win is wrong for string contains zero-width-space. https://bugs.webkit.org/show_bug.cgi?id=79961 Reviewed by Adam Barth. Treat zero-width-space (\u200B) as true for treatAsZeroWidthSpaceInComplexScipt(). * platform/graphics/Font.h: (WebCore::Font::treatAsZeroWidthSpaceInComplexScript): * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances): * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::shapeAndPlaceItem): 2012-03-21 Patrick Gansterer Build fix for !ENABLE(INSPECTOR) after r111005. * inspector/ContentSearchUtils.h: 2012-03-21 Ulan Degenbaev [V8] V8GCForContextDispose should indicate whether a context is disposed for the main frame or not https://bugs.webkit.org/show_bug.cgi?id=81200 Reviewed by Adam Barth. Pass a hint to V8::IdleNotification that requests more aggressive GC when a main frame context is disposed and requests incremental GC otherwise. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::disposeContextHandles): * bindings/v8/V8GCForContextDispose.cpp: (WebCore::V8GCForContextDispose::V8GCForContextDispose): (WebCore::V8GCForContextDispose::notifyContextDisposed): (WebCore::V8GCForContextDispose::pseudoIdleTimerFired): * bindings/v8/V8GCForContextDispose.h: (V8GCForContextDispose): 2012-03-21 Nat Duca [chromium] CCThreadProxy must initialize frameBeginTime to monotonicallyIncreasingTime rather than zero https://bugs.webkit.org/show_bug.cgi?id=81790 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionBeginFrame): 2012-03-21 Xingnan Wang Add multichannel support in RealtimeAnalyser https://bugs.webkit.org/show_bug.cgi?id=81745 Reviewed by Chris Rogers. * Modules/webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::writeInput): (WebCore): 2012-03-21 Eric Carlson Removing HTMLTrackElement does not delete TextTrack https://bugs.webkit.org/show_bug.cgi?id=80873 Reviewed by Antti Koivisto. No new tests, but media/track/track-language-preference.html has been updated to test this fix. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didAddTrack): Renamed from trackWasAdded. (WebCore::HTMLMediaElement::willRemoveTrack): Renamed from trackWasRemoved because it is called before the track is removed, to allow the TextTrack to be removed. * html/HTMLMediaElement.h: * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::insertedIntoTree): Renamed from insertedIntoDocument (WebCore::HTMLTrackElement::willRemove): Renamed from removedFromDocument. * html/HTMLTrackElement.h: * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::trackElementIndex): Don't include tracks that are not in the document in the calcualtion. 2012-03-21 Zeno Albisser [Qt][Mac] ranlib segfaults when creating symbol tables for libWebCore.a. https://bugs.webkit.org/show_bug.cgi?id=81750 Building WebCore on mac currently creates an archive that is bigger than 4GB. But ranlib fails to create a symbol table for such a big archive, even on 64bit machines. Therefore we start using SVGAllInOne.cpp when building debug on mac. This reduces the size of the archive by about 300MB. Reviewed by Tor Arne Vestbø. * Target.pri: 2012-03-21 Tommy Widenflycht [chromium] MediaStream API (JSEP): Introducing WebSessionDescription and WebIceCandidate https://bugs.webkit.org/show_bug.cgi?id=81339 Reviewed by Adam Barth. Not possible to test until the entire JSEP feature is commited. * Modules/mediastream/IceCandidate.cpp: (WebCore::IceCandidate::toSdp): * Modules/mediastream/SessionDescription.cpp: (WebCore::SessionDescription::toSdp): * platform/mediastream/IceCandidateDescriptor.cpp: (WebCore::IceCandidateDescriptor::toSDP): * platform/mediastream/IceCandidateDescriptor.h: (IceCandidateDescriptor): * platform/mediastream/MediaStreamCenter.cpp: (WebCore::MediaStreamCenter::constructSDP): * platform/mediastream/MediaStreamCenter.h: (MediaStreamCenter): * platform/mediastream/SessionDescriptionDescriptor.cpp: (WebCore::SessionDescriptionDescriptor::SessionDescriptionDescriptor): (WebCore::SessionDescriptionDescriptor::toSDP): (WebCore::SessionDescriptionDescriptor::initialSDP): * platform/mediastream/SessionDescriptionDescriptor.h: (SessionDescriptionDescriptor): 2012-03-21 Yuta Kitamura Use RFC version of WebSocket protocol by default https://bugs.webkit.org/show_bug.cgi?id=81718 Reviewed by Kent Tamura. Flip the default value of Settings::m_useHixie76WebSocketProtocol so WebKit ports will use RFC version of WebSocket protocol by default. All the existing ports already use the RFC protocol as of now, so this change will not make any impact (hopefully). No new tests. No change in functionality. * page/Settings.cpp: (WebCore::Settings::Settings): 2012-03-21 Andrey Kosyakov Web Inspector: only show JS event listeners in Event Listeners tab of Elements panel https://bugs.webkit.org/show_bug.cgi?id=81798 Reviewed by Pavel Feldman. * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::getJSListenerFunctions): * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerBody): (WebCore::eventListenerHandlerLocation): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::getJSListenerFunctions): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getEventListeners): 2012-03-21 Andrey Kosyakov EventListener::Type enum has unused member InspectorDOMAgentType https://bugs.webkit.org/show_bug.cgi?id=81794 Reviewed by Pavel Feldman. * dom/EventListener.h: 2012-03-21 Tom Hudson Incremental cleanup of BitmapImage: inlined virtual functions https://bugs.webkit.org/show_bug.cgi?id=81688 Reviewed by James Robinson. No change in functionality, so no new tests. Move virtual functions defined in headers into .cpp files. * WebCore.gypi: * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::isBitmapImage): (WebCore): (WebCore::BitmapImage::hasSingleSecurityOrigin): (WebCore::BitmapImage::nativeImageForCurrentFrame): (WebCore::BitmapImage::currentFrameHasAlpha): (WebCore::BitmapImage::notSolidColor): (WebCore::BitmapImage::decodedSize): (WebCore::BitmapImage::mayFillWithSolidColor): (WebCore::BitmapImage::solidColor): * platform/graphics/BitmapImage.h: (BitmapImage): * platform/graphics/skia/BitmapImageSingleFrameSkia.cpp: Added. (WebCore): (WebCore::BitmapImageSingleFrameSkia::isBitmapImage): (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha): (WebCore::BitmapImageSingleFrameSkia::size): (WebCore::BitmapImageSingleFrameSkia::destroyDecodedData): (WebCore::BitmapImageSingleFrameSkia::decodedSize): (WebCore::BitmapImageSingleFrameSkia::nativeImageForCurrentFrame): (WebCore::BitmapImageSingleFrameSkia::notSolidColor): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (BitmapImageSingleFrameSkia): 2012-03-21 Alexey Proskuryakov Remove obsolete File attributes https://bugs.webkit.org/show_bug.cgi?id=79383 Reviewed by Hajime Morita. * bindings/objc/PublicDOMInterfaces.h: * fileapi/File.h: * fileapi/File.idl: Removed fileName and fileSize, they have different names now. * html/FileInputType.cpp: (WebCore::FileInputType::appendFormData): (WebCore::FileInputType::getTypeSpecificValue): (WebCore::FileInputType::defaultToolTip): Updated to use new function names. 2012-03-21 Jocelyn Turcotte TiledBackingStore: Create the first round of tiles synchronously after setting the visible rect. https://bugs.webkit.org/show_bug.cgi?id=81762 Reviewed by Kenneth Rohde Christiansen. The first round of tiles should cover completely the visible rect. Creating the tiles synchronously allows us to get the new tiles immediately and prevents an extra AC layers sync to be able to remove the old tiles. At some point it might also make sense to remove the tile creation timer completely. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::coverWithTilesIfNeeded): 2012-03-19 Jocelyn Turcotte TiledBackingStore: When checking if the visible area is covered, only convert to scaled coordinates once. https://bugs.webkit.org/show_bug.cgi?id=81519 Reviewed by Kenneth Rohde Christiansen. Both visibleRect and coverageRatio call mapFromContents on the input rect, this woulc cause the coverageRatio to never reach 1.0 when the contents is scaled up. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::visibleAreaIsCovered): 2012-03-21 Mao Yujie MediaStream API: Need to support MediaStream constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=78781 Reviewed by Adam Barth. No new tests. * Modules/mediastream/DOMWindowMediaStream.idl: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled): 2012-03-21 Philip Rogers Skip building resources if SVGTRef is not in a document https://bugs.webkit.org/show_bug.cgi?id=81473 Reviewed by Nikolas Zimmermann. We can skip the building of pending resources in SVGTRef if we're not yet in a document. This mirrors the nearly identical logic in SVGUseElement::buildPendingResource() and SVGFEImageElement::buildPendingResource(). Test: http/tests/svg/tref-adoptNode-crash.html * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::buildPendingResource): 2012-03-21 Sami Kyostila [chromium] Use floating point scroll deltas for layers https://bugs.webkit.org/show_bug.cgi?id=81546 Reviewed by James Robinson. Use floating point scroll deltas for layers instead of integral scroll deltas. This is because due to page scaling it may be necessary to scroll layers in sub-CSS-pixel steps to avoid visible jumps. When the floating point scroll offset is committed to the main thread, it is truncated to integer, but the fractional part is kept on the CC side to make sure fractional scroll offsets are accumulated correctly over multiple commits. Test: CCLayerTreeHostTestFractionalScroll * platform/graphics/FloatPoint.h: (WebCore::toSize): (WebCore): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::scrollBy): (WebCore::CCLayerImpl::setScrollDelta): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::scrollDelta): (CCLayerImpl): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation): (WebCore::CCLayerTreeHostImpl::adjustScrollsForPageScaleChange): (WebCore::CCLayerTreeHostImpl::processScrollDeltas): (WebCore::CCLayerTreeHostImpl::animatePageScale): 2012-03-21 Li Yin [WebSocket]The Sec-WebSocket-Accept MUST NOT appear more than once in an HTTP response https://bugs.webkit.org/show_bug.cgi?id=81655 Reviewed by Adam Barth. Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header.html * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::readHTTPHeaders): 2012-03-21 Alexei Filippov Web Inspector: Speedup heap snapshot loading. https://bugs.webkit.org/show_bug.cgi?id=81788 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotLoader.prototype._parseNodes): 2012-03-21 Pavel Feldman Web Inspector: get rid of isInEditMode, use isBeingEdited on particular element. https://bugs.webkit.org/show_bug.cgi?id=81766 Reviewed by Yury Semikhatsky. We should check event target and its ancestors for being edited, not use some global property. This change also introduces Event.prototype.consume so that we were consistently consuming events. * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView.prototype._onKeyDown): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked): * inspector/front-end/CSSSelectorProfileView.js: * inspector/front-end/Checkbox.js: (WebInspector.Checkbox.prototype.addEventListener): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._enterKeyPressed): (WebInspector.ConsoleGroup.prototype._titleClicked): * inspector/front-end/ContextMenu.js: (WebInspector.ContextMenu.prototype.show): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype._keyDown): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._enterKeyPressed): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid): (WebInspector.DetailedHeapshotView.prototype._startRetainersHeaderDragging): (WebInspector.DetailedHeapshotView.prototype._retainersHeaderDragging): (WebInspector.DetailedHeapshotView.prototype._endRetainersHeaderDragging): * inspector/front-end/Dialog.js: (WebInspector.Dialog.prototype._onKeyDown): * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype._startStatusBarDragging): (WebInspector.Drawer.prototype._statusBarDragging): (WebInspector.Drawer.prototype._endStatusBarDragging): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.get if): * inspector/front-end/HelpScreen.js: (WebInspector.HelpScreen.prototype._onKeyDown): * inspector/front-end/InspectorView.js: (WebInspector.InspectorView.prototype._keyDown): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode): * inspector/front-end/NetworkPanel.js: * inspector/front-end/Object.js: (WebInspector.Event.prototype.preventDefault): (WebInspector.Event.prototype.consume): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype._promptKeyDown): * inspector/front-end/ProfileView.js: * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype._onKeyDown): * inspector/front-end/Section.js: (WebInspector.Section.prototype.handleClick): * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SoftContextMenu.js: (.WebInspector.SoftContextMenu.prototype.show): (.WebInspector.SoftContextMenu.prototype._menuItemMouseDown): (.WebInspector.SoftContextMenu.prototype._menuKeyDown): (.WebInspector.SoftContextMenu.prototype._discardMenu): * inspector/front-end/Spectrum.js: (WebInspector.Spectrum.draggable.consume): (WebInspector.Spectrum.draggable.start): (WebInspector.Spectrum.draggable.stop): (WebInspector.Spectrum.draggable): (WebInspector.Spectrum.prototype._onKeyDown): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.muteEventListener): (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype.set _createNewRule): (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane): (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick): (WebInspector.StylePropertiesSection.prototype._handleSelectorClick): (WebInspector.StylePropertyTreeElement.prototype.updateTitle.): (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.onKeyDown): (WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler): (WebInspector.TextPrompt.SuggestBox.prototype._onItemMouseDown): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._handleKeyDown): * inspector/front-end/Toolbar.js: (WebInspector.ToolbarDropdown.prototype._onKeyDown): * inspector/front-end/UIUtils.js: (WebInspector.isBeingEdited): (WebInspector.startEditing): * inspector/front-end/View.js: (WebInspector.View.prototype._doLoadCSS): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSidebarPane.prototype._addButtonClicked): (WebInspector.WatchExpressionsSidebarPane.prototype._refreshButtonClicked): * inspector/front-end/inspector.js: (WebInspector.documentClick.followLink): (WebInspector.documentClick): (WebInspector.documentKeyDown): (WebInspector.postDocumentKeyDown): (WebInspector.addMainEventListeners): * inspector/front-end/treeoutline.js: (TreeOutline.prototype._treeKeyPress): (TreeOutline.prototype._treeKeyDown): (TreeOutline.prototype._searchInputKeyDown): (TreeElement.treeElementToggled): (TreeElement.prototype.selectOnMouseDown): * inspector/front-end/utilities.js: (Event.prototype.consume): 2012-03-21 Yury Semikhatsky Web Inspector: event listener section doesn't show all event listeners of the element ancestors https://bugs.webkit.org/show_bug.cgi?id=81782 Event listeners section now contains all event listeners for the selected element ancestors chain (in case option "All Nodes" is selected). Reviewed by Pavel Feldman. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getEventListenersForNode): * inspector/front-end/EventListenersSidebarPane.js: (WebInspector.EventListenersSidebarPane.prototype.update.callback): (WebInspector.EventListenersSidebarPane.prototype.update): (WebInspector.EventListenersSidebarPane.prototype): 2012-03-21 Ilya Tikhonovsky Web Inspector: HeapSnapshot: move all builders and calculation calls to HeapSnapshot._init function. https://bugs.webkit.org/show_bug.cgi?id=81784 Reviewed by Yury Semikhatsky. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype.dispose): (WebInspector.HeapSnapshot.prototype._retainersForNode): (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode): (WebInspector.HeapSnapshot.prototype._flagsOfNode): (WebInspector.HeapSnapshot.prototype.aggregates): (WebInspector.HeapSnapshot.prototype._buildRetainers): (WebInspector.HeapSnapshot.prototype.get nodeIndexes): 2012-03-21 Jessie Berlin WTF headers should be in $(ConfigurationBuildDir)\include\private\wtf, not $(ConfigurationBuildDir)\include\private\JavaScriptCore\wtf. https://bugs.webkit.org/show_bug.cgi?id=81739 Reviewed by Dan Bernstein. * WebCore.vcproj/WebCore.vcproj: Look for AtomicString.cpp, StringBuilder.cpp, StringImpl.cpp, and WTFString.cpp in the wtf subdirectory of the build output, not the JavaScriptCore/wtf subdirectory. 2012-03-21 Jonathan Dong [BlackBerry] Credential save and autofill implemetation https://bugs.webkit.org/show_bug.cgi?id=80401 Reviewed by Rob Buis. Added interface function authenticationChallenge() and notifyShouldSaveCredential() into PageClientBlackBerry. As this class is our platform specific interface, by doing this we don't need to add an interface function in class FrameLoaderClient which is a platform independent interface. No new tests. * platform/blackberry/PageClientBlackBerry.h: (WebCore): * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendRequestWithCredentials): 2012-03-21 Ilya Tikhonovsky Web Inspector: HeapProfiler: DOM node id can overflow Int32. https://bugs.webkit.org/show_bug.cgi?id=81776 Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.Uint32Array): (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk): (WebInspector.HeapSnapshot.prototype._buildReverseIndex.var): (WebInspector.HeapSnapshot.prototype._buildReverseIndex): (WebInspector.HeapSnapshot.prototype._buildNodeIndex): 2012-03-21 Tim Dresser [chromium] Increase size of Combo Box Options for touch and high DPI devices https://bugs.webkit.org/show_bug.cgi?id=80027 Reviewed by Darin Fisher. Scale Combo box popups by defaultDeviceScaleFactor, and add padding to