2011-06-01 Hayato Ito Reviewed by Kent Tamura. Move {Next,Previous}FocusableNode functions from Document to FocusController. https://bugs.webkit.org/show_bug.cgi?id=61839 There are some member functions in Document which use 'this' pointer, but we should use TreeScope instead of Document in some places to handle focus issues nicely. We have to move these functions out of Document class so that we can give the TreeScope as a parameter. No new tests since no functionality was changed. * dom/Document.cpp: * dom/Document.h: * page/FocusController.cpp: (WebCore::FocusController::deepFocusableNode): (WebCore::FocusController::advanceFocusInDocumentOrder): (WebCore::nextNodeWithExactTabIndex): (WebCore::previousNodeWithExactTabIndex): (WebCore::nextNodeWithGreaterTabIndex): (WebCore::previousNodeWithLowerTabIndex): (WebCore::FocusController::nextFocusableNode): (WebCore::FocusController::previousFocusableNode): * page/FocusController.h: 2011-06-01 Adrienne Walker Reviewed by James Robinson. [chromium] Fix syncing of removed mask and replica layers https://bugs.webkit.org/show_bug.cgi?id=61895 * platform/graphics/chromium/TreeSynchronizer.cpp: (WebCore::TreeSynchronizer::synchronizeTreeRecursive): 2011-06-01 Julien Chaffraix Reviewed by Simon Fraser. CSSStyleSheet#insertRule doesn't work well with imported stylesheets https://bugs.webkit.org/show_bug.cgi?id=56981 Test: fast/css/import-and-insert-rule-no-update.html The bug arises from the fact that element did not know about a programmatically loading sheet (using insertRule and @import) and would thus never call removePendingSheet. This is needed to make sure our style selector contains an up-to-date list of stylesheets. The gist of the patch adds a way for style sheet owner element to know if we are programmatically loading a style sheet. This is needed as keeps the information about that last loaded stylesheet. * css/CSSImportRule.cpp: (WebCore::CSSImportRule::insertedIntoParent): Call startLoadingDynamicSheet on our parent style sheet instead of directly adding a pending style sheet. * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::startLoadingDynamicSheet): Call startLoadingDynamicSheet on our owner element if we have one. * css/CSSStyleSheet.h: * dom/Node.h: (WebCore::Node::startLoadingDynamicSheet): Added common implementation of startLoadingDynamicSheet, which should never be called. * dom/StyleElement.cpp: (WebCore::StyleElement::startLoadingDynamicSheet): * dom/StyleElement.h: Common implementation of startLoadingDynamicSheet for style elements. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::startLoadingDynamicSheet): * html/HTMLLinkElement.h: Use the HTMLLinkElement plumbing to make sure we call addRemovePendingSheet. * html/HTMLStyleElement.h: (WebCore::HTMLStyleElement::startLoadingDynamicSheet): * svg/SVGStyleElement.h: (WebCore::SVGStyleElement::startLoadingDynamicSheet): Forward the call to StyleElement. 2011-06-01 Levi Weintraub Reviewed by Eric Seidel. Switch paintCustomHighlight to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=61562 Switching paintCustomHighlight to use an IntPoint for its paint offset instead of a pair of ints. No new tests since this is refactoring. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::paintCustomHighlight): * rendering/InlineTextBox.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paintCustomHighlight): * rendering/RenderBox.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::paintCustomHighlight): (WebCore::RootInlineBox::paint): * rendering/RootInlineBox.h: 2011-06-01 Emil A Eklund Reviewed by Eric Seidel. Switch MouseRelatedEvent to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=61574 Covered by existing tests. * dom/MouseEvent.cpp: (WebCore::MouseEvent::MouseEvent): (WebCore::MouseEvent::initMouseEvent): (WebCore::SimulatedMouseEvent::SimulatedMouseEvent): * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): (WebCore::contentsScrollOffset): (WebCore::MouseRelatedEvent::initCoordinates): (WebCore::MouseRelatedEvent::computeRelativePosition): (WebCore::MouseRelatedEvent::layerX): (WebCore::MouseRelatedEvent::layerY): (WebCore::MouseRelatedEvent::offsetX): (WebCore::MouseRelatedEvent::offsetY): (WebCore::MouseRelatedEvent::pageX): (WebCore::MouseRelatedEvent::pageY): (WebCore::MouseRelatedEvent::pageLocation): (WebCore::MouseRelatedEvent::x): (WebCore::MouseRelatedEvent::y): * dom/MouseRelatedEvent.h: (WebCore::MouseRelatedEvent::screenX): (WebCore::MouseRelatedEvent::screenY): (WebCore::MouseRelatedEvent::screenLocation): (WebCore::MouseRelatedEvent::clientX): (WebCore::MouseRelatedEvent::clientY): (WebCore::MouseRelatedEvent::clientLocation): (WebCore::MouseRelatedEvent::absoluteLocation): * dom/TouchEvent.cpp: (WebCore::TouchEvent::TouchEvent): (WebCore::TouchEvent::initTouchEvent): * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): (WebCore::WheelEvent::initWheelEvent): (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): * dom/WheelEvent.h: (WebCore::WheelEvent::create): (WebCore::WheelEvent::wheelDelta): (WebCore::WheelEvent::wheelDeltaX): (WebCore::WheelEvent::wheelDeltaY): (WebCore::WheelEvent::rawDeltaX): (WebCore::WheelEvent::rawDeltaY): (WebCore::WheelEvent::isHorizontal): * platform/graphics/IntPoint.h: (WebCore::IntPoint::scale): 2011-06-01 Levi Weintraub Reviewed by Eric Seidel. Switch paintOverflowControls to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=61884 Switching paintOverflowControls to use an IntPoint instead of a pair of ints. No new tests since this is simple refactoring. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintOverflowControls): (WebCore::RenderLayer::paintLayer): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintIntoLayer): 2011-06-01 Abhishek Arya Reviewed by Alexey Proskuryakov. Fix setting of document.body https://bugs.webkit.org/show_bug.cgi?id=60831 1. Only allowing setting to an element if it has a body tag. 2. If element is from another document, import it. Test: fast/dom/document-set-body.html * dom/Document.cpp: (WebCore::Document::setBody): 2011-06-01 Chris Fleizach Reviewed by Darin Adler. Safari always crashes on http://bbc.co.uk when VoiceOver enabled https://bugs.webkit.org/show_bug.cgi?id=61886 This crash can happen on webpages that remove an element from the DOM when the element receives focus. When AppKit goes to post a notification to inform VoiceOver the focus has changed, it asks for the AXFocusedUIElement. However by posting that notification, a render tree update is performed. This causes the element to disappear, but AppKit still has a handle to it and continues to try to reference it. When the autorelease pool pops, the reference goes bad. To fix, the root element, the AccessibilityScrollView, needs to implement updateBackingStore(), otherwise this method will not be called in time. No test could be created because to cause it depends on an internal AppKit mechanism that is only triggered remotely through the accessibility runtime. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::updateBackingStore): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: * accessibility/AccessibilityRenderObject.h: 2011-06-01 David Carson Reviewed by Antti Koivisto. https://bugs.webkit.org/show_bug.cgi?id=61831 If width and height of an iframe is fixed and should not be visible, then it shouldn't be flattened. Test: fast/frames/flattening/iframe-flattening-fixed-width-and-height-zero-size.html * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::flattenFrame): add a check for a zero width or height 2011-06-01 Daniel Cheng Reviewed by Tony Chang. [chromium] Use correct file name for dragging out images. https://bugs.webkit.org/show_bug.cgi?id=24887 We try to guess an appropriate filename when dragging out images. In order, we try to use: - The filename suggested in the HTTP header. - The last path component of the source URL. - The alt text. This matches the behavior of the other WebKit ports. Test: fast/events/drag-image-filename.html * platform/chromium/ClipboardChromium.cpp: (WebCore::writeImageToDataObject): * platform/chromium/ClipboardChromiumMac.cpp: (WebCore::isInvalidFileCharacter): (WebCore::ClipboardChromium::validateFileName): 2011-06-01 Levi Weintraub Reviewed by Eric Seidel. Text is scaled in a stair-step pattern https://bugs.webkit.org/show_bug.cgi?id=60317 Stop scaling the specified font to the actual on-screen value when font-rendering: geometricPrecision is specified, but instead scale the graphics context. This allows us to scale text up and down smoothly. Test: svg/text/scaling-font-with-geometric-precision.html * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): 2011-06-01 Levi Weintraub Reviewed by Eric Seidel. Switch paintResizer to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=61883 Switch paintResizer to take an IntPoint instead of a pair of ints. No new tests as this is simple refactoring. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintOverflowControls): (WebCore::RenderLayer::paintResizer): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): 2011-06-01 Jer Noble Reviewed by Darin Adler. Page layout messed up after exiting full screen at Apple trailers page https://bugs.webkit.org/show_bug.cgi?id=61755 Test: fullscreen/full-screen-zIndex-after.html Fix the incomplete implementation of r87660. Make parameters to setContainsFullScreenElementRecursively() in webkitWillExitFullScreenForElement() match those in webkitWillEnterFullScreenForElement(), so the ancestors' flags do not become inconsistent.. * dom/Document.cpp: (WebCore::Document::webkitWillExitFullScreenForElement): 2011-06-01 Levi Weintraub Reviewed by Eric Seidel. Switch paintScrollCorner to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=61874 Changing paintScrollCorner to take an IntPoint representing the paint offset instead of a pair of ints. No new tests as this is simple refactoring. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintOverflowControls): (WebCore::RenderLayer::paintScrollCorner): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintContents): 2011-06-01 Kenneth Russell Reviewed by Nate Chapin. [V8] Optimize fetches of indexed properties in custom bindings https://bugs.webkit.org/show_bug.cgi?id=61821 Avoid allocating garbage in affected custom bindings. This speeds up one test case by at least a factor of two. No new tests; covered by existing layout tests (typed array and otherwise). * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArray): (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::V8InspectorFrontendHost::showContextMenuCallback): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::getMessagePortArray): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::jsArrayToFloatArray): (WebCore::jsArrayToIntArray): 2011-06-01 Andras Becsi Reviewed by Csaba Osztrogonác. [Qt] Fix the Phonon build when logging is disabled https://bugs.webkit.org/show_bug.cgi?id=61869 No new tests needed. * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Add missing guards. (WebCore::MediaPlayerPrivatePhonon::networkState): (WebCore::MediaPlayerPrivatePhonon::readyState): (WebCore::MediaPlayerPrivatePhonon::updateStates): (WebCore::MediaPlayerPrivatePhonon::stateChanged): 2011-06-01 Abhishek Arya Reviewed by Antti Koivisto. Do not use the pushed style selector if it is not equal to the parent document's style selector. It usually means that it is in a bad state, e.g. already cleared. https://bugs.webkit.org/show_bug.cgi?id=61737 * dom/Element.cpp: (WebCore::StyleSelectorParentPusher::~StyleSelectorParentPusher): 2011-06-01 Levi Weintraub Reviewed by Eric Seidel. Switch RenderLineBoxList intersection functions to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=61794 Switching rangeIntersectsRect, anyLineIntersectsRect, and lineIntersectsDirtyRect to take IntPoint instead of a tx/ty to represent the offset to be applied match the rect and lines' coordinates. No new tests since this is merely refactoring. * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::rangeIntersectsRect): (WebCore::RenderLineBoxList::anyLineIntersectsRect): (WebCore::RenderLineBoxList::lineIntersectsDirtyRect): (WebCore::RenderLineBoxList::paint): (WebCore::RenderLineBoxList::hitTest): * rendering/RenderLineBoxList.h: 2011-05-19 Adrienne Walker Reviewed by James Robinson. [chromium] Don't split long, narrow layers into multiple tiles. https://bugs.webkit.org/show_bug.cgi?id=60821 This changes the heuristic for when we tile layers to be less bad about wasting texture space. Long, narrow layers that are tiled with a large tile size waste texture space. Now layers are only tiled if they are above 512px in one dimension and extend into a second tile in the other. If they are not tiled, their layer texture will exactly fit their layer bounds. In particular, this will help scrollbars. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::updateLayerSize): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::maxTextureSize): 2011-06-01 Cary Clark Reviewed by Eric Seidel. Ready Chromium port for Skia on Mac https://bugs.webkit.org/show_bug.cgi?id=61800 Skia on Mac is not enabled. The executing code is unchanged, so there are no new tests. * platform/chromium/DragImageRef.h: Use Skia for DragImageRef instead of CG. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): Get the total matrix from Skia for the scrollbar. Convert the SkCanvas into a CGContext to draw. * platform/chromium/ThemeChromiumMac.mm: (WebCore::paintStepper): Ditto. 2011-06-01 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: allow opening inspector for existing workers https://bugs.webkit.org/show_bug.cgi?id=61853 Added sidebar pane with a list of all workers. Each worker has a check box that allows opening inspector for the worker. * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didStartWorkerContextImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didStartWorkerContext): * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel): (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel): (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerContext): (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerContext): (WebCore::InspectorWorkerAgent::clearFrontend): (WebCore::InspectorWorkerAgent::connectToWorker): (WebCore::InspectorWorkerAgent::disconnectFromWorker): (WebCore::InspectorWorkerAgent::didStartWorkerContext): * inspector/InspectorWorkerAgent.h: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): * inspector/front-end/Settings.js: * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager): (WebInspector.WorkerManager.prototype._workerCreated): (WebInspector.WorkerManager.prototype._sendMessageToWorkerInspector): (WebInspector.WorkerManager.prototype.openWorkerInspector): (WebInspector.WorkerManager.prototype.closeWorkerInspector): (WebInspector.WorkerManager.prototype._workerInspectorClosing): (WebInspector.WorkerMessageForwarder): (WebInspector.WorkerMessageForwarder.prototype.workerCreated): (WebInspector.WorkerMessageForwarder.prototype.dispatchMessageFromWorker): * inspector/front-end/WorkersSidebarPane.js: (WebInspector.WorkersSidebarPane): (WebInspector.WorkersSidebarPane.prototype.addWorker): (WebInspector.WorkerListSidebarPane): (WebInspector.WorkerListSidebarPane.prototype._workerAdded): (WebInspector.WorkerListSidebarPane.prototype._workerRemoved): (WebInspector.WorkerListSidebarPane.prototype._workerInspectorClosed): (WebInspector.WorkerListSidebarPane.prototype._addWorker): (WebInspector.WorkerListSidebarPane.prototype._createCheckbox): (WebInspector.WorkerListSidebarPane.prototype._workerItemClicked): * workers/Worker.cpp: (WebCore::Worker::notifyFinished): 2011-06-01 Shishir Agrawal Reviewed by Tony Gentilcore. Renaming the Page Visibility attributes as per the modified spec draft. https://bugs.webkit.org/show_bug.cgi?id=61825 Spec draft: http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html - Event needs to be webkitVisibilityChange from webkitVisibilityStateChange - The attribute webkitIsVisible needs to change to webkitHidden * dom/Document.cpp: (WebCore::Document::webkitHidden): (WebCore::Document::dispatchVisibilityStateChangeEvent): * dom/Document.h: * dom/Document.idl: * dom/EventNames.h: 2011-06-01 Nikolas Zimmermann Reviewed by Rob Buis. Remove duplicated code in various computeReplacedLogical*() functions https://bugs.webkit.org/show_bug.cgi?id=61860 Centralize this calculation in RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth: int minLogicalWidth = computeReplacedLogicalWidthUsing(style()->logicalMinWidth()); int maxLogicalWidth = !includeMaxWidth || style()->logicalMaxWidth().isUndefined() ? logicalWidth : computeReplacedLogicalWidthUsing(style()->logicalMaxWidth()); return max(minLogicalWidth, min(logicalWidth, maxLogicalWidth)); Centralize this calculation in RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight: int minLogicalHeight = computeReplacedLogicalHeightUsing(style()->logicalMinHeight()); int maxLogicalHeight = style()->logicalMaxHeight().isUndefined() ? logicalHeight : computeReplacedLogicalHeightUsing(style()->logicalMaxHeight()); return max(minLogicalHeight, min(logicalHeight, maxLogicalHeight)); Use the new helper methods where possible, deduplicating lots of code. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidth): (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth): (WebCore::RenderBox::computeReplacedLogicalHeight): (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight): * rendering/RenderBox.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::computeReplacedLogicalWidth): (WebCore::RenderImage::computeReplacedLogicalHeight): * rendering/RenderPart.cpp: (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth): (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight): (WebCore::RenderPart::computeReplacedLogicalWidth): (WebCore::RenderPart::computeReplacedLogicalHeight): * rendering/RenderPart.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): 2011-06-01 Sheriff Bot Unreviewed, rolling out r87788. http://trac.webkit.org/changeset/87788 https://bugs.webkit.org/show_bug.cgi?id=61856 breaks windows chromium canary (Requested by jknotten on #webkit). * loader/archive/mhtml/MHTMLArchive.cpp: * loader/archive/mhtml/MHTMLArchive.h: * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): (WebCore::PageSerializer::serializeCSSStyleSheet): * platform/SharedBuffer.cpp: * platform/SharedBuffer.h: 2011-06-01 Joseph Pecoraro Reviewed by Pavel Feldman. Web Inspector: [JSC] JSLock ASSERTs Seen Under eventListenerHandlerBody https://bugs.webkit.org/show_bug.cgi?id=61835 Add a JSLock call before possible allocations in jsFunction and toString. * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerBody): 2011-06-01 Jay Civelli Reviewed by Adam Barth. Adding MHTML generation support to MHTMLArchive. https://bugs.webkit.org/show_bug.cgi?id=7169 * loader/archive/mhtml/MHTMLArchive.cpp: (WebCore::generateRandomBoundary): (WebCore::replaceNonPrintableCharacters): (WebCore::MHTMLArchive::generateMHTMLData): * loader/archive/mhtml/MHTMLArchive.h: * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): (WebCore::PageSerializer::serializeCSSStyleSheet): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::append): * platform/SharedBuffer.h: 2011-06-01 Dimitri Glazkov Reviewed by Kent Tamura. Remove ShadowElement and compact remaining used bits into RenderFileUploadControl. https://bugs.webkit.org/show_bug.cgi?id=61816 This is a near-mechanical move-and-rename of ShadowElement, which is now only used by input[type=file]. Next step -- switch it over to new shadow DOM. Refactoring, no change in behavior. * CMakeLists.txt: Removed ShadowElement.cpp and ShadowElement.h. * GNUmakefile.list.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore/WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCore/rendering/RenderingAllInOne.cpp: Ditto. * rendering/RenderFileUploadControl.cpp: (WebCore::UploadButton::create): Moved from ShadowElement, renamed as UploadButton. (WebCore::UploadButton::detach): Ditto. (WebCore::UploadButton::UploadButton): Ditto. (WebCore::RenderFileUploadControl::updateFromElement): Changed to use UploadButton. * rendering/RenderMeter.cpp: Removed ShadowElement.h include, which is no longer used. * rendering/RenderProgress.cpp: Ditto. * rendering/ShadowElement.cpp: Removed. * rendering/ShadowElement.h: Removed. 2011-06-01 Nikolas Zimmermann Reviewed by Rob Buis. SVG fails all 3 of Hixie's CSS intrinsic sizing tests https://bugs.webkit.org/show_bug.cgi?id=15473 Hixies CSS intrinsic sizing tests cover percentage sizes specified on the target SVG document as width/height attributes and using width: auto / height: auto on the that hosts the SVG document. Take percentage sizes of the outermost SVGs width/height attributes into account when determining the intrinsic size of the . Added several other testcases demonstrating several scenarios. All tests work exactly the same in WebKit and Firefox now. The *on-target-svg-absolute.xhtml tests look equal to WebKit/FF but Opera fails them, likely a relict of the different interpretation of the intrinsic size of a SVG document in SVG Tiny 1.2. Tests: svg/custom/object-sizing-height-50p-on-target-svg-absolute.xhtml svg/custom/object-sizing-height-50p-on-target-svg.xhtml svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute.xhtml svg/custom/object-sizing-width-50p-height-50p-on-target-svg.xhtml svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute.xhtml svg/custom/object-sizing-width-50p-height-75p-on-target-svg.xhtml svg/custom/object-sizing-width-50p-on-target-svg-absolute.xhtml svg/custom/object-sizing-width-50p-on-target-svg.xhtml svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute.xhtml svg/custom/object-sizing-width-75p-height-50p-on-target-svg.xhtml svg/hixie/intrinsic/001.html svg/hixie/intrinsic/002.html svg/hixie/intrinsic/003.html * rendering/RenderPart.cpp: (WebCore::RenderPart::computeReplacedLogicalWidth): (WebCore::RenderPart::computeReplacedLogicalHeight): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computeIntrinsicRatio): * rendering/svg/RenderSVGRoot.h: 2011-05-31 Tonis Tiigi Reviewed by Pavel Feldman. Web Inspector: Timeline panel improvements for managing current selection https://bugs.webkit.org/show_bug.cgi?id=61468 Enables X-axis dragging of the selected area. Double click zoom-out. Fixes slightly wrong selection area position. * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane): (WebInspector.TimelineOverviewPane.prototype._dragWindow): (WebInspector.TimelineOverviewPane.prototype._endWindowSelectorDragging): (WebInspector.TimelineOverviewPane.prototype._resizeWindowRight): (WebInspector.TimelineOverviewPane.prototype._resizeWindowMaximum): (WebInspector.TimelineOverviewPane.prototype.scrollWindow): (WebInspector.TimelineOverviewPane.prototype._createTimelineCategoryStatusBarCheckbox): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): 2011-05-31 Keishi Hattori Reviewed by Kent Tamura. Fix to enable page scroll of select element https://bugs.webkit.org/show_bug.cgi?id=53628 Manual test: select-page-scroll.html * manual-tests/select-page-scroll.html: Added. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::computeLogicalHeight): Fix min to max. 2011-05-31 Yong Li Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=54807 We have been assuming plain bitfields (like "int a : 31") are always signed integers. However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers, always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good rule we should have in order to make our code independent from compilers and compiler flags. No new test added because this change is not known to fix any issue. * css/CSSPrimitiveValue.h: * css/CSSProperty.h: * rendering/InlineBox.h: * rendering/RenderBlock.h: 2011-05-31 Hironori Bono Reviewed by Eric Seidel. Send an input event when we change the text direction. https://bugs.webkit.org/show_bug.cgi?id=50952 Both Safari and Chrome call Editor::setBaseWritingDirection() to change the text direction of an editable element with their UIs. This change calls dispatchInputEvent() to send an input event when the function actually changes the "dir" attribute so we can send an input event as written in the HTML5 spec. Test: fast/html/set-text-direction.html * editing/Editor.cpp: (WebCore::Editor::setBaseWritingDirection): 2011-05-31 Jer Noble Reviewed by Darin Adler. Flash of black at the end of full screen transition at apple.com product videos https://bugs.webkit.org/show_bug.cgi?id=61756 Added two new entries to the WebCore exports list. * WebCore.exp.in: 2011-05-31 Rafael Brandao Reviewed by Andreas Kling. [Qt] tst_QWebFrame::render() failing https://bugs.webkit.org/show_bug.cgi?id=60893 Due a problem on QPicture (http://bugreports.qt.nokia.com/browse/QTBUG-19496), this test was calculating the final geometry incorrectly. As the order between a translate and a draw operation could be relevant for it, but not for the final rendered result, they were changed on ScrollbarThemeQt::paint. * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::paint): 2011-05-27 Adrienne Walker Reviewed by James Robinson. [chromium] Fix crash from empty reflections with masks https://bugs.webkit.org/show_bug.cgi?id=61654 Change the iteration for updateCompositorResources to match that being done in the paint and draw steps. This mismatch of iteration style was causing layers with replica masks to correctly get skipped while painting but not get skipped during texture upload. Test: compositing/reflections/empty-reflection-with-mask.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.h: 2011-05-31 B.J. Wever Reviewed by Adam Barth. requestFileSystem and resolveLocalFileSystemURI are not checking if errorCallback is NULL before scheduling a callback on error. https://bugs.webkit.org/show_bug.cgi?id=49539 Test: fast/filesystem/filesystem-no-callback-null-ptr-crash.html * fileapi/DOMFileSystem.cpp: (WebCore::DOMFileSystem::scheduleCallback): Only call callback if one is supplied. 2011-05-31 Brady Eidson Reviewed by Darin Adler. Another swipe at resolving and https://bugs.webkit.org/show_bug.cgi?id=61494 Re-land http://trac.webkit.org/changeset/87566 with invalid ASSERTs removed. No new tests. No change in behavior. Instead of storing the DocumentLoader at construction and never changing it, always calculate it based on the FrameLoader's current DocumentLoader: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::suggestedMIMEType): (WebCore::Document::lastModified): (WebCore::Document::initSecurityContext): (WebCore::Document::updateURLForPushOrReplaceState): (WebCore::Document::loader): * dom/Document.h: Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario: * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): * html/MediaDocument.cpp: (WebCore::MediaDocument::replaceMediaElementTimerFired): * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::createDocumentStructure): * platform/mac/HTMLConverter.mm: (fileWrapperForElement): * WebCore.exp.in: 2011-05-31 Levi Weintraub Reviewed by Simon Fraser. Change InlineBox::paint and its overloaded variants to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=61804 Changing InlineBox::paint, its 7 overloaded variants, and RootInlineBox::paintEllipsisBox to use IntPoint for their paint offset instead of a pair of ints. No new tests since this is just a refactoring. * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::paint): * rendering/EllipsisBox.h: * rendering/InlineBox.cpp: (WebCore::InlineBox::paint): * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): * rendering/InlineTextBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintEllipsisBoxes): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::paint): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::paintEllipsisBox): (WebCore::RootInlineBox::paint): * rendering/RootInlineBox.h: * rendering/svg/SVGInlineFlowBox.cpp: (WebCore::SVGInlineFlowBox::paint): * rendering/svg/SVGInlineFlowBox.h: * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paint): * rendering/svg/SVGInlineTextBox.h: * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::paint): * rendering/svg/SVGRootInlineBox.h: 2011-05-31 James Robinson Reviewed by Kenneth Russell. [chromium] Clear out LayerChromium's m_ccLayerImpl ptr on CCLayerImpl destruction https://bugs.webkit.org/show_bug.cgi?id=61593 Whenever a CCLayerImpl is being destroyed, clear out its owner's m_ccLayerImpl pointer. This is extremely defensive and not strictly necessary, but not harmful either. * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::~CCLayerImpl): 2011-05-31 Stephen White Unreviewed; build fix. Silence some warnings on the Safari/Mac release build. * platform/graphics/gpu/TilingData.h: (WebCore::TilingData::assertTile): 2011-05-31 Justin Novosad Reviewed by Stephen White. [Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled https://bugs.webkit.org/show_bug.cgi?id=61790 Changing the build guards in these two files that are required by the accelerated compositing feature. * platform/graphics/gpu/LoopBlinnMathUtils.cpp: * platform/graphics/gpu/TilingData.cpp: 2011-05-31 Justin Novosad Reviewed by Stephen White. [Chromium] Build fails when ACCELERATED_2D_CANVAS is disabled https://bugs.webkit.org/show_bug.cgi?id=61790 Changing the build guards in these two files that are required by the accelerated compositing feature. * platform/graphics/gpu/LoopBlinnMathUtils.cpp: * platform/graphics/gpu/TilingData.cpp: 2011-05-31 Rob Buis Reviewed by Dirk Schulze. https://bugs.webkit.org/show_bug.cgi?id=34301 Creating elements via javascript do not execute https://bugs.webkit.org/show_bug.cgi?id=17043 SVG missing some .idl files Add missing idl files. Test: svg/animations/animate-mpath-insert.html * CMakeLists.txt: * CodeGenerators.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * svg/SVGAnimateMotionElement.idl: Added. * svg/SVGMPathElement.idl: Added. 2011-05-31 Robin Dunn Reviewed by Kevin Ollivier. [wx] Implement printing support for wxWidgets 2.9.x and above. https://bugs.webkit.org/show_bug.cgi?id=61796 * platform/graphics/GraphicsContext.h: * platform/graphics/wx/FontWx.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::drawEllipse): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::drawLineForText): (WebCore::GraphicsContext::scale): (WebCore::GraphicsContext::currentScale): * platform/wx/wxcode/win/non-kerned-drawing.cpp: (WebCore::drawTextWithSpacing): 2011-05-31 Joseph Pecoraro Reviewed by Pavel Feldman. Web Inspector: Missing InspectorFrontendHost.saveSessionSetting function https://bugs.webkit.org/show_bug.cgi?id=61751 Add missing stub function causing an error on load. * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.saveSessionSetting): 2011-05-31 Abhishek Arya Reviewed by Dimitri Glazkov. Improve hasMediaControls logic to check that node has media controls. This can be false when cloning nodes. https://bugs.webkit.org/show_bug.cgi?id=61765 Test: media/media-controls-clone-crash.html * dom/Node.h: (WebCore::Node::isMediaControls): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaControls): (WebCore::HTMLMediaElement::hasMediaControls): * html/shadow/MediaControls.h: (WebCore::MediaControls::isMediaControls): (WebCore::toMediaControls): 2011-05-31 Xan Lopez Reviewed by Martin Robinson. [GTK] Provide custom DOM bindings methods to check if input/textareas have been edited https://bugs.webkit.org/show_bug.cgi?id=61791 * bindings/gobject/GNUmakefile.am: add new files. * bindings/gobject/WebKitDOMCustom.cpp: Added. (webkit_dom_html_text_area_element_is_edited): (webkit_dom_html_input_element_is_edited): * bindings/gobject/WebKitDOMCustom.h: Added. 2011-05-31 Noam Rosenthal Unreviewed build fix for Symbian. Opt-out Symbian for TextureMapper. No new tests: build fix. * WebCore.pri: 2011-05-31 Levi Weintraub Reviewed by Eric Seidel. Switch paintFocusRing to IntPoint https://bugs.webkit.org/show_bug.cgi?id=61580 Switching paintFocusRing to take an IntPoint representing the paint offset instead of a pair of ints. No new tests as this is just refactoring. * rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutline): * rendering/RenderObject.cpp: (WebCore::RenderObject::paintFocusRing): (WebCore::RenderObject::paintOutline): * rendering/RenderObject.h: 2011-05-31 Abhishek Arya Reviewed by Dimitri Glazkov. Convert raw ptr to RefPtr for documentElement. https://bugs.webkit.org/show_bug.cgi?id=61688 Test: fast/dom/xml-parser-error-message-crash.svg * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::insertErrorMessageBlock): 2011-05-31 Andreas Kling Reviewed by Antti Koivisto. Canvas/JSC: Auto-generate overloads for setShadow() https://bugs.webkit.org/show_bug.cgi?id=61786 Move CanvasRenderingContext2D.setShadow() to auto-generated JSC bindings. There is a subtle difference to the previous behavior: invalid numbers of arguments now raise TypeError instead of SyntaxError. This is in accordance with Web IDL, and matches the existing V8 bindings. Test: fast/canvas/canvas-overloads-setShadow.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-05-31 Andreas Kling Reviewed by Antti Koivisto. Canvas/JSC: Auto-generate overloads for drawImageFromRect() https://bugs.webkit.org/show_bug.cgi?id=61709 Move CanvasRenderingContext2D.drawImageFromRect() to auto-generated JSC bindings. Make it [RequiresAllArguments=Raise] to match the old behavior. Side effect: calling drawImageFromRect() with zero arguments will now raise SyntaxError instead of TypeError. Test: fast/canvas/canvas-overloads-drawImageFromRect.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2D.idl: 2011-05-31 Andreas Kling Reviewed by Antti Koivisto. Canvas/JSC: Auto-generate overloads for drawImage() https://bugs.webkit.org/show_bug.cgi?id=61703 Move CanvasRenderingContext2D.drawImage() to auto-generated JSC bindings. There is a subtle difference to the previous behavior: invalid numbers of arguments now raise TypeError instead of SyntaxError. This is in accordance with Web IDL, and matches the existing V8 bindings. Test: fast/canvas/canvas-overloads-drawImage.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-05-31 Andreas Kling Reviewed by Antti Koivisto. Canvas/JSC: Auto-generate overloads for strokeRect() https://bugs.webkit.org/show_bug.cgi?id=61641 Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings. No behavioral change. Test: fast/canvas/canvas-overloads-strokeRect.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-05-31 Andreas Kling Reviewed by Antti Koivisto. Canvas/JSC: Auto-generate overloads for setFillColor() https://bugs.webkit.org/show_bug.cgi?id=61635 Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings. There is a subtle difference to the previous behavior: invalid numbers of arguments now raise TypeError instead of SyntaxError. This is in accordance with Web IDL, but doesn't matter much anyway since this method is WebKit-only. Test: fast/canvas/canvas-overloads-setFillColor.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-05-31 Andreas Kling Reviewed by Antti Koivisto. Canvas/JSC: Auto-generate overloads for setStrokeColor() https://bugs.webkit.org/show_bug.cgi?id=61629 Move CanvasRenderingContext2D.setStrokeColor() to auto-generated JSC bindings. There is a subtle difference to the previous behavior: invalid numbers of arguments now raise TypeError instead of SyntaxError. This is in accordance with Web IDL, but doesn't matter much anyway since this method is WebKit-only. Test: fast/canvas/canvas-overloads-setStrokeColor.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-05-31 Andreas Kling Reviewed by Antti Koivisto. Canvas/JSC: Auto-generate overloads for strokeText() https://bugs.webkit.org/show_bug.cgi?id=61626 Move CanvasRenderingContext2D.strokeText() to auto-generated JSC bindings. Make it [RequiresAllArguments=Raise] to match the old behavior. This has the side-effect of aligning the behaviors of JSC and V8. Test: fast/canvas/canvas-overloads-strokeText.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-05-31 Andreas Kling Reviewed by Antti Koivisto. Canvas/JSC: Auto-generate overloads for fillText() https://bugs.webkit.org/show_bug.cgi?id=61623 Move CanvasRenderingContext2D.fillText() to auto-generated JSC bindings. Make it [RequiresAllArguments=Raise] to match the old behavior. This has the side-effect of aligning the behaviors of JSC and V8. Test: fast/canvas/canvas-overloads-fillText.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-05-31 Yael Aharon Reviewed by Kenneth Rohde Christiansen. Frame flattening is broken with nested frames https://bugs.webkit.org/show_bug.cgi?id=61491 After r77988, when frame flattening is enabled, performPostLayoutTasks() is called on a timer for iframes. This causes layout of nested iframes to sometimes happen asynchronously, but WebCore expects layout to always finish synchronously. Added a call to updateWidgetPosition() for cases that performPostLayoutTasks() is now happening asynchronously. Test: fast/frames/flattening/iframe-flattening-nested.html * page/FrameView.cpp: (WebCore::FrameView::layout): 2011-05-31 Tommy Widenflycht Reviewed by Tony Gentilcore. Fix getUserMedia callback bindings for JSC. https://bugs.webkit.org/show_bug.cgi?id=60174 This patch initializes the exception code variable to 0. Test: fast/dom/MediaStream/argument-types.html * bindings/js/JSNavigatorCustom.cpp: (WebCore::JSNavigator::webkitGetUserMedia): 2011-05-31 Oleg Romashin Reviewed by Benjamin Poulain. Fix compilation with debug enabled, m_lightSource.type is not valid anymore https://bugs.webkit.org/show_bug.cgi?id=61719 * platform/graphics/filters/arm/FELightingNEON.h: (WebCore::FELighting::platformApplyNeon): 2011-05-31 Oliver Varga Reviewed by Nikolas Zimmermann. Invalid color handling is broken for SVG https://bugs.webkit.org/show_bug.cgi?id=58531 Fix invalid color fallback handling. If the fill/stroke attributes computed value leads to a an invalid color, inherit the desired color from the parent style instead. Matches Opera/FF and SVG 1.1 Second Edition (http://www.w3.org/TR/SVG/). Tests: svg/custom/invalid-stroke-hex.svg svg/custom/invalid-uri-stroke.svg * rendering/svg/RenderSVGResource.cpp: (WebCore::inheritColorFromParentStyleIfNeeded): (WebCore::requestPaintingResource): 2011-05-31 Vangelis Kokkevis Reviewed by Kent Tamura. [chromium] Avoid double deletion of DrawingBuffer's color buffer texture. https://bugs.webkit.org/show_bug.cgi?id=61761 Test: Verified that the DCHECK in GraphicsContext3D implementation doesn't trigger. * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::~DrawingBuffer): 2011-05-30 Hayato Ito Reviewed by Ryosuke Niwa. Add a utility function for dumping a tree for the Node, including a document of a frame. https://bugs.webkit.org/show_bug.cgi?id=61727 No new tests since added functions are only available in debug builds. * dom/Node.cpp: (WebCore::parentOrHostOrFrameOwner): (WebCore::traverseNextNodeAcrossFrame): (WebCore::Node::showTreeForThisAcrossFrame): * dom/Node.h: 2011-05-30 James Kozianski Reviewed by Kent Tamura. [Chromium] Make isValidProtocol() accept protocols with '+'. https://bugs.webkit.org/show_bug.cgi?id=61759 Also, detect syntax errors before security errors; some syntax errors will also trigger a security error, but it's more helpful to the programmer to know if they have a syntax error, which are well-defined in the spec, rather than a security error, which aren't. * page/Navigator.cpp: (WebCore::Navigator::registerProtocolHandler): Detect syntax errors before security errors. * platform/KURLGoogle.cpp: (WebCore::isSchemeChar): Include '+' in the list of valid characters. >>>>>>> .r87778 2011-05-30 Andrey Petrov Reviewed by Hajime Morita. Using jQuery to show/hide IMG elements crashes WebKit https://bugs.webkit.org/show_bug.cgi?id=31721 For platform code, do not assert nodes always have renderer at the time context menu action is invoked. Renderer can actually be empty for a given node if it was hidden or removed from domtree by some non-user generated event (e.g timeout) after the popup menu had been created. Changing Chromium, Gtk, Mac, Qt, Win and WinCE. Test: editing/pasteboard/copy-standalone-image-crash.html * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeImage): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeImage): * platform/qt/PasteboardQt.cpp: (WebCore::Pasteboard::writeImage): * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::writeImage): * platform/wince/PasteboardWinCE.cpp: (WebCore::Pasteboard::writeImage): 2011-05-30 Daniel Bates Reviewed by Adam Barth. Rename XSSFilter to XSSAuditor https://bugs.webkit.org/show_bug.cgi?id=61718 Currently we use the names XSSFilter and XSSAuditor throughout the project. Instead, we should choose one name for consistency. No functionality was changed. So, no new tests. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): (WebCore::HTMLDocumentParser::pumpTokenizer): * html/parser/HTMLDocumentParser.h: * html/parser/XSSAuditor.cpp: Copied from Source/WebCore/html/parser/XSSFilter.cpp. (WebCore::XSSAuditor::XSSAuditor): (WebCore::XSSAuditor::init): (WebCore::XSSAuditor::filterToken): (WebCore::XSSAuditor::filterTokenInitial): (WebCore::XSSAuditor::filterTokenAfterScriptStartTag): (WebCore::XSSAuditor::filterScriptToken): (WebCore::XSSAuditor::filterObjectToken): (WebCore::XSSAuditor::filterParamToken): (WebCore::XSSAuditor::filterEmbedToken): (WebCore::XSSAuditor::filterAppletToken): (WebCore::XSSAuditor::filterIframeToken): (WebCore::XSSAuditor::filterMetaToken): (WebCore::XSSAuditor::filterBaseToken): (WebCore::XSSAuditor::filterFormToken): (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected): (WebCore::XSSAuditor::eraseAttributeIfInjected): (WebCore::XSSAuditor::snippetForRange): (WebCore::XSSAuditor::snippetForAttribute): (WebCore::XSSAuditor::isContainedInRequest): (WebCore::XSSAuditor::isSameOriginResource): * html/parser/XSSAuditor.h: Copied from Source/WebCore/html/parser/XSSFilter.h. * html/parser/XSSFilter.cpp: Removed. * html/parser/XSSFilter.h: Removed. 2011-05-30 No'am Rosenthal Reviewed by Simon Hausmann. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Expose a public clearAll() function to reset WebCore::Animation. No new functionality, so no new tests. * platform/animation/Animation.h: (WebCore::Animation::clearAll): 2011-05-30 Eric Carlson Reviewed by Alexey Proskuryakov. Audio and video files saved to the Application Cache should preserve the original file extension https://bugs.webkit.org/show_bug.cgi?id=61750 No new tests, it isn't possible to check the name of the file in the cache from within DRT. Changes verified manually. * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::store): Append the original file extension to the cache file name. (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): Add extension parameter. * loader/appcache/ApplicationCacheStorage.h: 2011-05-30 Jer Noble Reviewed by Dan Bernstein. Play/Pause button in wrong state when entering full screen on Vimeo https://bugs.webkit.org/show_bug.cgi?id=61754 Update the play/pause button inside reset(). This ensures the button is in the correct state when the controls are created after playback has already started. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::reset): 2011-05-30 No'am Rosenthal Reviewed by Simon Hausmann. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Added a public TimingFunction::type() method. No new functionality, so no new tests. * platform/animation/TimingFunction.h: (WebCore::TimingFunction::type): 2011-05-30 Noam Rosenthal BUILD FIX for r87697 on Windows/Symbian For now enabling TextureMapper for Mac/Linux only. * WebCore.pri: 2011-05-30 David Kilzer BUILD FIX for r87692 with !ENABLE(FULLSCREEN_API) * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::determineDispatchBehavior): Mark shadowRoot as an unused parameter with !ENABLE(FULLSCREEN_API). 2011-05-30 No'am Rosenthal Reviewed by Andreas Kling. [Texmap][Qt] Enable TextureMapper by default https://bugs.webkit.org/show_bug.cgi?id=61740 Make CONFIG+=texmap an opt-out instead of an opt-in. No new functionality so no new tests. * WebCore.pri: 2011-05-30 Martin Robinson Reviewed by Xan Lopez. [GTK] fast/css/font-face-zero-hash-key.html is crashing on the bots https://bugs.webkit.org/show_bug.cgi?id=61693 Do not try to read the FT_Face from m_scaledFont if it m_scaledFont is null. A recent change fixing 0-pixel-size fonts means that m_scaledFont may now be null. No new tests. This change should cause fast/css/font-face-zero-hash-key.html to stop crashing. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::FontPlatformData): Do a null check before accessing m_scaledFont. 2011-05-30 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Texmap][Qt] Disable accelerated plugins/media until they're working. https://bugs.webkit.org/show_bug.cgi?id=61687 Until this works properly, we should indicate that our media implementation in texture mapper doesn't support accelerated compositing. This makes LayoutTests/compositing/video/* work again. * platform/graphics/qt/MediaPlayerPrivateQt.h: (WebCore::MediaPlayerPrivateQt::supportsAcceleratedRendering): (WebCore::MediaPlayerPrivateQt::platformLayer): 2011-05-30 Mikhail Naganov Reviewed by Adam Barth. [Chromium] Fix regression after r87628. https://bugs.webkit.org/show_bug.cgi?id=61733 Having r87628 in place, Chrome reliability bot crashes in WebCore::HTMLLinkElement::onloadTimerFired. This is because the change makes WebCore::CachedResource::setRequest to call checkNotify on request reset. HTMLLinkElement registers itself as CachedResource client via m_cachedSheet, which can happen even if m_cachedLinkResource wasn't set. As a result, WebCore::HTMLLinkElement::notifyFinished is got called with unset m_cachedLinkResource, which causes a crash in HTMLLinkElement::onloadTimerFired * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::notifyFinished): 2011-05-30 Jer Noble Reviewed by Darin Adler and Simon Fraser. REGRESSION (r87622): Scrubbing a Vimeo movie when in fullscreen stops playback; no way to make it start again https://bugs.webkit.org/show_bug.cgi?id=61717 rdar://problem/9522272 May be some good way to test this later. No immediate idea about the best way. When a media element is taken into full-screen mode, stop events from propagating outside the media element's shadow DOM, EventDispatcher::determineDispatchBehavior() has been changed to take a shadow root node. In our full screen media element check, we check to see if the passed shadow root is the shadow root of the full screen media element, and if so, specify events should StayInsideShadowDOM. The end result is that inside EventDispatcher::ensureEventAncestors, an ancestor chain is built up all the way from the SliderThumb to the video element's shadow root, but no further. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::determineDispatchBehavior): Restrict events to the shadow DOM when showing a full screen video. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Removed code to manage full screen controls. The events telling us about activity in the shadow DOM no longer bubble out so we need to handle this inside the shadow DOM on the root element. (WebCore::HTMLMediaElement::play): Ditto. (WebCore::HTMLMediaElement::playbackProgressTimerFired): Ditto. (WebCore::HTMLMediaElement::defaultEventHandler): Ditto. (WebCore::HTMLMediaElement::enterFullscreen): Ditto. (WebCore::HTMLMediaElement::exitFullscreen): Ditto. * html/HTMLMediaElement.h: Added isPlaying function, removed things moved to the root element. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Rolled out changes that tried to make special rules for events using preDispatchEventHandler and such. This rolls out both r87622 and r87655. (WebCore::MediaControlMuteButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlPanelMuteButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto. (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto. (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto. * html/shadow/MediaControlElements.h: Ditto. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::MediaControlRootElement): Initialize new data members. (WebCore::MediaControlRootElement::playbackStarted): Start the timer so we will consider hiding the controls later. (WebCore::MediaControlRootElement::playbackProgressed): Hide the controls if the mouse is no longer over the controls. (WebCore::MediaControlRootElement::playbackStopped): Stop the timer since we only hide automatically if we're playing. (WebCore::MediaControlRootElement::enteredFullscreen): Start the timer. (WebCore::MediaControlRootElement::exitedFullscreen): Stop the timer since we only care if we are full screen. (WebCore::MediaControlRootElement::containsRelatedTarget): Added. Helper for next function. (WebCore::MediaControlRootElement::defaultEventHandler): Do the hide/show and timer functions as the mouse is moved in and out. (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): Start the timer if needed. (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide if the conditions are met. (WebCore::MediaControlRootElement::stopHideFullscreenControlsTimer): Stop the timer. * html/shadow/MediaControlRootElement.h: Added new functions and data members. 2011-05-30 Gavin Peters Reviewed by Adam Barth. prevent HTMLLinkElement from watching multiple CachedResources https://bugs.webkit.org/show_bug.cgi?id=61686 If we modify an existing link element, stop listening to the previous cached resource, to prevent double notifications (which crash). Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): 2011-05-30 Peter Varga Unreviewed build fix. [Qt][V8] Fix debug build. No new tests needed. * css/CSSStyleDeclaration.cpp: Add missing header. * dom/Text.cpp: Ditto. * rendering/InlineTextBox.cpp: Ditto. 2011-05-30 Sheriff Bot Unreviewed, rolling out r87683. http://trac.webkit.org/changeset/87683 https://bugs.webkit.org/show_bug.cgi?id=61729 Breaks inspector tests on Chromium (Requested by apavlov on #webkit). * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update): 2011-05-25 Alexander Pavlov Reviewed by Yury Semikhatsky. Web Inspector: node selection is slow in the Elements panel. https://bugs.webkit.org/show_bug.cgi?id=60813 Schedule full style updates rather than request all node styles from the backend up front. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update.reloadAllStyles): (WebInspector.StylesSidebarPane.prototype.update): 2011-05-30 Andrey Kosyakov Reviewed by Pavel Feldman. Web Inspector: do not issue frontendReused for reload or navigation. https://bugs.webkit.org/show_bug.cgi?id=61192 - only issue frontendReused when inspector is attached after main resource committed load - upon committing loading main resource, reset agents before sending FrameNavigated to page agent - Ensure main resource is set early so that abbreviations of URLs in resource tree are consistent after reload - do not enable agents explicitly in frontendReused (this is done by backend when resotring state from cookie) * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::InspectorAgent): (WebCore::InspectorAgent::restore): (WebCore::InspectorAgent::clearFrontend): (WebCore::InspectorAgent::didCommitLoad): * inspector/InspectorAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didCommitLoadImpl): * inspector/front-end/NetworkManager.js: * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._processCachedResources): (WebInspector.ResourceTreeModel.prototype._frameNavigated): (WebInspector.ResourceTreeModel.prototype._cleanupFramesAfterNavigation): (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.reset): (WebInspector.ResourcesPanel.prototype._resetResourcesTree): (WebInspector.DatabaseTreeElement.prototype.onpopulate): (WebInspector.SearchResultsTreeElementsTraverser.prototype._lastTreeElement): * inspector/front-end/inspector.js: (WebInspector.reset): (WebInspector.frontendReused): 2011-05-30 Ryan Sleevi Reviewed by Darin Adler. FEConvolveMatrix::getPixelValue() fails to properly check if y is within bounds, causing it to fail to correctly apply the kernel and edge mode to the first targetY pixels https://bugs.webkit.org/show_bug.cgi?id=61603 Test: svg/filters/feConvolveFilter-y-bounds.svg * platform/graphics/filters/FEConvolveMatrix.cpp: (WebCore::FEConvolveMatrix::getPixelValue): 2011-05-30 Nate Chapin Reviewed by Antti Koivisto. Refactor the CachedResourceLoader -> CachedResource -> CachedResourceRequest flow so it's a little less circular. https://bugs.webkit.org/show_bug.cgi?id=61666 * loader/cache/CachedFont.cpp: (WebCore::CachedFont::beginLoadIfNeeded): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::load): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestImage): (WebCore::CachedResourceLoader::setAutoLoadImages): (WebCore::CachedResourceLoader::loadStarted): * loader/cache/CachedResourceLoader.h: * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::load): 2011-05-30 Sheriff Bot Unreviewed, rolling out r87618. http://trac.webkit.org/changeset/87618 https://bugs.webkit.org/show_bug.cgi?id=61720 Causes BrowserFocusTest.FocusOnReload to fail (Requested by abarth|gardener on #webkit). * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): 2011-05-29 Yuta Kitamura Reviewed by Kent Tamura. WebSocket closing handshake https://bugs.webkit.org/show_bug.cgi?id=35721 Implement WebSocket closing handshake based on Ian Hickson's WebSocket protocol draft 76. Tests: http/tests/websocket/tests/client-close.html http/tests/websocket/tests/server-close.html * platform/network/SocketStreamHandleBase.cpp: (WebCore::SocketStreamHandleBase::send): Do not send a message if we are in Closing state. (WebCore::SocketStreamHandleBase::close): Do not disconnect if we have pending data which have not been sent yet. In this case, the actual disconnection will happen in sendPendingData(). (WebCore::SocketStreamHandleBase::disconnect): Renamed from close(). Disconnect the connection immediately. (WebCore::SocketStreamHandleBase::sendPendingData): * platform/network/SocketStreamHandleBase.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus) to didClose(). (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake): (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::send): (WebCore::WebSocket::close): Fail if close() is attempted before the connection is established. Otherwise, set the state to CLOSING and start the closing handshake. (WebCore::WebSocket::bufferedAmount): If the state is CLOSING, we need to consider buffered data in m_channel and sent after close(). (WebCore::WebSocket::didConnect): (WebCore::WebSocket::didReceiveMessage): We need to invoke message event in CLOSING state as well as OPEN state. (WebCore::WebSocket::didReceiveMessageError): (WebCore::WebSocket::didStartClosingHandshake): (WebCore::WebSocket::didClose): * websockets/WebSocket.h: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::close): Start the closing handshake. (WebCore::WebSocketChannel::disconnect): Disconnect the socket stream, instead of close. (WebCore::WebSocketChannel::didClose): (WebCore::WebSocketChannel::didReceiveData): Ditto. (WebCore::WebSocketChannel::didFail): Ditto. (WebCore::WebSocketChannel::processBuffer): Ditto. Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started. (WebCore::WebSocketChannel::startClosingHandshake): Send 0xFF 0x00 byte sequence. (WebCore::WebSocketChannel::closingTimerFired): Disconnect the socket stream if the closing handshake has timed out. * websockets/WebSocketChannel.h: m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol specification). * websockets/WebSocketChannelClient.h: (WebCore::WebSocketChannelClient::didStartClosingHandshake): Added. (WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter. * websockets/WorkerThreadableWebSocketChannel.cpp: Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake(). (WebCore::WorkerThreadableWebSocketChannel::Peer::close): (WebCore::workerContextDidStartClosingHandshake): (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake): (WebCore::workerContextDidClose): (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): * websockets/WorkerThreadableWebSocketChannel.h: 2011-05-29 Adam Barth Attempt to fix build by implementing pure virtual function. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::shouldHideControls): * html/shadow/MediaControlRootElementChromium.h: 2011-05-29 Brian Weinstein Reviewed by Darin Adler. Controls never hide in full screen after user stops moving mouse https://bugs.webkit.org/show_bug.cgi?id=61715 When we get a mouse move event in HTMLMediaElement::defaultEventHandler, and we are in full screen, show the media controls, and then start a timer. The timer fires 3 seconds after the user's last mouse movement (timer is restarted on every mouse move), and hides the controls. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize our new timer. (WebCore::HTMLMediaElement::play): If we are in full screen mode, start our timer to hide the full screen controls. We don't want the user to have to move the mouse to hide them when they use the spacebar to play. (WebCore::HTMLMediaElement::startHideFullscreenControlsTimer): Starts a oneshot timer 3 seconds in the future if we are in full screen. (WebCore::HTMLMediaElement::hideFullscreenControlsTimerFired): Make sure that we are currently playing, and we are in full screen, and hide the controls. We don't want to hide the controls if we are paused. (WebCore::HTMLMediaElement::stopHideFullscreenControlsTimer): Stops the timer. (WebCore::HTMLMediaElement::defaultEventHandler): If we get a mouse move event and are in full screen, show the controls and start a timer to hide them. (WebCore::HTMLMediaElement::enterFullscreen): Start a timer to hide the full screen controls. The user shouldn't have the move the mouse once they enter full screen to hide the controls. (WebCore::HTMLMediaElement::exitFullscreen): Stop the timer to hide the full screen controls. * html/HTMLMediaElement.h: * html/shadow/MediaControls.h: Added pure virtual shouldHideControls() method. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::playbackStopped): Stop the timer to hide the full screen controls. (WebCore::MediaControlRootElement::shouldHideControls): Added, only report that the caller should hide the controls if the panel is not hovered. * html/shadow/MediaControlRootElement.h: 2011-05-29 Jer Noble Reviewed by Simon Fraser. Embedded Vimeo video, when taken fullscreen, is overlapped by content from the enclosing page https://bugs.webkit.org/show_bug.cgi?id=61712 Tests: fullscreen/full-screen-iframe-zIndex.html Walk up the ancestor chain for the full-screen element, marking them as full-screen ancestors. Then, we apply a pseudo-class to those elements, which disable all their stacking-context-creating styles. Set the z-index of all full-screen elements (and the iframes which contain them) to a large value, ensuring they appear above other sibling elements. This new behavior replaces the previous "-webkit-full-screen-media-document" behavior and pesudo-class, so remove it and replace it with the new pseudo-class. * css/CSSSelector.cpp: (WebCore::nameToPseudoTypeMap): Add -webkit-full-screen-ancestor and remove -webkit-full-screen-media-document. (WebCore::CSSSelector::pseudoId): Add PseudoFullScreenAncestor and remove PseudoFullScreenMediaDocument (WebCore::CSSSelector::extractPseudoType): Ditto. * css/CSSSelector.h: Ditto. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Remove the PseudoFullScreenMediaDocument implementation and replace it with PseudoFullScreenAncestor. * css/fullscreen.css: (:-webkit-full-screen): Add a z-index property. (:-webkit-full-screen-ancestor:not(iframe)): Added. Reset the z-index to auto, and reset other stacking-context creating properties. * dom/Document.cpp: (WebCore::Document::setContainsFullScreenElementRecursively): Recurse up every element instead of just the iframe elements. (WebCore::Document::webkitWillEnterFullScreenForElement): Ditto. * dom/Element.cpp: (WebCore::Element::willRemove): Reset our parent's containsFullScreenElement property. (WebCore::Element::insertedIntoTree): Ditto. (WebCore::Element::containsFullScreenElement): Moved here from HTMLElementBase. (WebCore::Element::setContainsFullScreenElement): Ditto. * dom/Element.h: * dom/ElementRareData.h: (WebCore::ElementRareData::ElementRareData): Added ivar and initializer for m_containsFullScreenElement. * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Removed ivar and initializer. (WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Moved into Element. * html/HTMLFrameElementBase.h: * rendering/style/RenderStyleConstants.h: 2011-05-29 Dan Bernstein Reviewed by Darin Adler. 30 second rewind button obscured in fullscreen controller when video uses custom inline controls https://bugs.webkit.org/show_bug.cgi?id=61714 * dom/Document.cpp: (WebCore::Document::webkitDidEnterFullScreenForElement): Call didBecomeFullscreenElement() on the new full screen element. (WebCore::Document::webkitWillExitFullScreenForElement): Call willStopBeingFullscreenElement() on the full screen element. * dom/Element.h: (WebCore::Element::didBecomeFullscreenElement): Added with a default implementation that does nothing. (WebCore::Element::willStopBeingFullscreenElement): Ditto. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didBecomeFullscreenElement): Added this override, which calls MediaControls::enteredFullscreen(). (WebCore::HTMLMediaElement::willStopBeingFullscreenElement): Added this override, which calls MediaControls::exitedFullscreen(). * html/HTMLMediaElement.h: * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Removed calls to enteredFullscreen() and exitedFullscreen() from here, since they are now called in response to changes to the fullscreen-ness of the element. 2011-05-29 Darin Adler Reviewed by Kevin Decker. REGRESSION (r87622): In media documents, clicking the full screen button and the play button pauses the video https://bugs.webkit.org/show_bug.cgi?id=61713 We need to come up with a way to regression-test these changes. Nothing at the moment. The bug is that we removed calls to preventDefault, but we still do need to prevent default handling of this event. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlElement::preDispatchEventHandler): Add back the preventDefault that was in here before r87622 as well as the stopPropagation that was added in r87622. (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto. 2011-05-29 Andreas Kling Reviewed by Kenneth Rohde Christiansen. Element: Micro-cleanup of scroll methods. https://bugs.webkit.org/show_bug.cgi?id=61705 Do an early return without calculating element boundaries when asked to scroll an element without a renderer(). * dom/Element.cpp: (WebCore::Element::scrollIntoView): (WebCore::Element::scrollIntoViewIfNeeded): (WebCore::Element::scrollByUnits): 2011-05-29 Darin Adler Reviewed by Dan Bernstein. Fix assertion seen when entering full screen mode for standalone video https://bugs.webkit.org/show_bug.cgi?id=61708 We don't currently have a way to make a regression test for this. * dom/Document.cpp: (WebCore::Document::setAnimatingFullScreen): Call scheduleForcedStyleRecalc, because scheduleStyleRecalc is intended to only be called when the style system itself detects recalc is needed. 2011-05-27 Andreas Kling Reviewed by James Robinson. [Qt] Add area check to ImageBufferData::getImageData() https://bugs.webkit.org/show_bug.cgi?id=61375 No change in behavior, just a sanity check. * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::getImageData): 2011-05-29 Beth Dakin Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=61700 Need WebKit2 API to get the size of the render tree -and corresponding- New member variable on RenderArena keeps track of the current amount of memory allocated in the arena. The new client function sends this piece of data to WebKit. * page/ChromeClient.h: (WebCore::ChromeClient::setRenderTreeSize): * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): * rendering/RenderArena.cpp: (WebCore::RenderArena::RenderArena): (WebCore::RenderArena::allocate): (WebCore::RenderArena::free): * rendering/RenderArena.h: (WebCore::RenderArena::totalRenderArenaSize): 2011-05-29 Sheriff Bot Unreviewed, rolling out r87566. http://trac.webkit.org/changeset/87566 https://bugs.webkit.org/show_bug.cgi?id=61702 It made all tests assert on Qt in debug mode (Requested by Ossy_weekend on #webkit). * WebCore.exp.in: * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::suggestedMIMEType): (WebCore::Document::lastModified): (WebCore::Document::initSecurityContext): (WebCore::Document::updateURLForPushOrReplaceState): * dom/Document.h: (WebCore::Document::setDocumentLoader): (WebCore::Document::loader): * html/MediaDocument.cpp: (WebCore::MediaDocument::replaceMediaElementTimerFired): * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::createDocumentStructure): * platform/mac/HTMLConverter.mm: (fileWrapperForElement): 2011-05-28 Steve Falkenburg Reviewed by Dan Bernstein. Don't add sub-frames to global history when navigating via back/forward https://bugs.webkit.org/show_bug.cgi?id=61701 Instead of just checking whether the load is the first in the frame, we also need to check to make sure we're loading in the main frame. Not testable due to lack of global history infrastructure in DRT. * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): 2011-05-28 Alexey Proskuryakov Suggested by Simon Fraser. REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL https://bugs.webkit.org/show_bug.cgi?id=61692 * loader/ImageLoader.cpp: (WebCore::ImageLoader::notifyFinished): There was no need to use ASSERT_UNUSED here. 2011-05-28 Alexey Proskuryakov Reviewed by Geoff Garen. REGRESSION (r85375): Load event is sometimes lost when multiple image elements use the same URL https://bugs.webkit.org/show_bug.cgi?id=61692 Test: fast/dom/gc-image-element-2.html Manually verified that tests from bug 59604 and from bug 40926 still pass. The problem here was that HTMLImageElement::hasPendingActivity() could return false when a load (or error) event was still expected to fire. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::setRequest): * loader/cache/CachedResource.h: (WebCore::CachedResource::wasCanceled): (WebCore::CachedResource::errorOccurred): Track whether the load was canceled. We want to always notify clients of load outcome, as that's the only way they could make intelligent decisions. * dom/ScriptElement.cpp: (WebCore::ScriptElement::execute): Cached resource clients now get a notifyFinished call on cancellation. Handle this case, where we don't need the execute the script, but also don't need to fire an error event. * html/HTMLImageElement.cpp: Moved hasPendingActivity() to header, since it's just a single function call now. * html/HTMLImageElement.h: (WebCore::HTMLImageElement::hasPendingActivity): There is a large window between when CachedResource::isLoading() becomes false and events are queued. ImageLoader::haveFiredLoadEvent() is a much better indication of whether we are expecting an event to fire. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::onloadTimerFired): Again, don't do anything on cancellation. * loader/ImageLoader.cpp: (WebCore::ImageEventSender::hasPendingEvents): Made it debug-only again, and fixed to give an accurate result while looping over the list of events to dispatch. (WebCore::ImageLoader::notifyFinished): Don't do anything when cancelled. We don't want to switch to a broken image icon, or to dispatch events. (WebCore::ImageEventSender::dispatchPendingEvents): Clear the current loader from dispatching list, as the event is no longer pending when it's being dispatched. * loader/ImageLoader.h: Removed unnecessary hasPendingLoadEvent(). We don't care whether one is already pending, we only care if one is expected at some time in the future, and !haveFiredLoadEvent() is our best idea of that. * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::notifyFinished): Another place to handle cancellation. 2011-05-28 Adam Barth Reviewed by Alexey Proskuryakov. Audit all uses of KURL::prettyURL https://bugs.webkit.org/show_bug.cgi?id=61201 As far as I can tell, all the callers of this API are confused. There seems to be a cargo cult of using the "pretty" version of a URL, but in reality folks just want the URL itself. The only case I'm unsure about is location.href, which could have some compatibility constraints. I've renamed prettyURL to deprecatedString to discourage folks from further cargo-culting. * WebCore.exp.in: * page/Location.cpp: (WebCore::Location::href): (WebCore::Location::toString): * platform/KURL.cpp: (WebCore::KURL::deprecatedString): * platform/KURL.h: * platform/KURLGoogle.cpp: (WebCore::KURL::deprecatedString): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::prepareForURL): * workers/WorkerLocation.cpp: (WebCore::WorkerLocation::href): (WebCore::WorkerLocation::toString): 2011-05-28 Jer Noble Reviewed by Maciej Stachowiak. Mouse clicks propagate outside full-screen media controls. https://bugs.webkit.org/show_bug.cgi?id=61689 Mouse click events are propagating out of the media controls, so mouse click listeners registered on the video element are getting fired when the user clicks on media controller buttons. By default, block propagation of click events from MediaControlElements by overriding preDispatchEventHandler, and convert all instances of defaultEventHandler -> preDispatchEventHandler. Change all calls of event->setDefaultHandled() to event->stopPropagation(). * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlElement::preDispatchEventHandler): Added. Block propagation of all mouse click events. (WebCore::MediaControlVolumeSliderContainerElement::preDispatchEventHandler): Renamed from setDefaultHandled. (WebCore::MediaControlMuteButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlPanelMuteButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlPlayButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlSeekButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlRewindButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlToggleClosedCaptionsButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlTimelineElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlVolumeSliderElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlFullscreenButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlFullscreenVolumeMinButtonElement::preDispatchEventHandler): Ditto. (WebCore::MediaControlFullscreenVolumeMaxButtonElement::preDispatchEventHandler): Ditto. * html/shadow/MediaControlElements.h: 2011-05-28 Gavin Peters Reviewed by Adam Barth. prevent HTMLLinkElement from watching multiple CachedResources https://bugs.webkit.org/show_bug.cgi?id=61686 If we modify an existing link element, stop listening to the previous cached resource, to prevent double notifications (which crash). Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): 2011-05-28 Tonis Tiigi Reviewed by Pavel Feldman. Web Inspector: there is a problem with computed style properties with wrong values https://bugs.webkit.org/show_bug.cgi?id=60535 * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._markUsedProperties): (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace): 2011-05-26 Antonio Gomes Reviewed by Andreas Kling. Logic error in WebCore/Page/SpatialNavigation.cpp::areRectsPartiallyAligned https://bugs.webkit.org/show_bug.cgi?id=61606 Removed duplicated statement within if condition. No new tests. Obvious clean up patch. * page/SpatialNavigation.cpp: (WebCore::areRectsPartiallyAligned): 2011-05-27 Simon Fraser Reviewed by Dan Bernstein. CG BitmapImage needs to check for valid CGImage in a couple of places https://bugs.webkit.org/show_bug.cgi?id=61684 BitmapImage::getCGImageArray() can throw an exception if frameAtIndex() returns null, which it may do if the image is corrupted or still loading. Protect against that here and in getFirstCGImageRefOfSize(). * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::getFirstCGImageRefOfSize): (WebCore::BitmapImage::getCGImageArray): 2011-05-27 Jochen Eisinger Reviewed by Adam Barth. Add Frame parameter to all StorageArea methods. The chromium embedder uses the Frame as context to decide whether or not to allow usage of the storage API. https://bugs.webkit.org/show_bug.cgi?id=61581 Test: platform/chromium/permissionclient/storage-permission.html * storage/Storage.cpp: (WebCore::Storage::length): (WebCore::Storage::key): (WebCore::Storage::getItem): (WebCore::Storage::contains): * storage/StorageArea.h: * storage/StorageAreaImpl.cpp: (WebCore::StorageAreaImpl::length): (WebCore::StorageAreaImpl::key): (WebCore::StorageAreaImpl::getItem): (WebCore::StorageAreaImpl::contains): * storage/StorageAreaImpl.h: 2011-05-27 Nate Chapin Reviewed by Jian Li. Keep a reference to BlobResourceHandle before calling doNotifyFinish() asynchronously to ensure it's still safe in the main thread. https://bugs.webkit.org/show_bug.cgi?id=61669 I triggered this crash in fast/files/file-reader-abort.html during a refactor that changed timings slightly. * platform/network/BlobResourceHandle.cpp: (WebCore::doNotifyFinish): (WebCore::BlobResourceHandle::notifyFinish): * platform/network/BlobResourceHandle.h: (WebCore::BlobResourceHandle::aborted): 2011-05-27 Stephanie Lewis Unreviewed. Fix a typo in the order_file flag. * Configurations/Base.xcconfig: 2011-05-27 Anders Carlsson Reviewed by Sam Weinig. Always use the default localization strategy https://bugs.webkit.org/show_bug.cgi?id=61670 Always use the default localization strategy when there's no platform strategy. * platform/DefaultLocalizationStrategy.cpp: (WebCore::DefaultLocalizationStrategy::shared): * platform/DefaultLocalizationStrategy.h: * platform/LocalizedStrings.cpp: (WebCore::inputElementAltText): (WebCore::resetButtonDefaultLabel): (WebCore::searchableIndexIntroduction): (WebCore::submitButtonDefaultLabel): (WebCore::fileButtonChooseFileLabel): (WebCore::fileButtonNoFileSelectedLabel): (WebCore::defaultDetailsSummaryText): (WebCore::copyImageUnknownFileLabel): (WebCore::contextMenuItemTagOpenLinkInNewWindow): (WebCore::contextMenuItemTagDownloadLinkToDisk): (WebCore::contextMenuItemTagCopyLinkToClipboard): (WebCore::contextMenuItemTagOpenImageInNewWindow): (WebCore::contextMenuItemTagDownloadImageToDisk): (WebCore::contextMenuItemTagCopyImageToClipboard): (WebCore::contextMenuItemTagCopyImageUrlToClipboard): (WebCore::contextMenuItemTagOpenFrameInNewWindow): (WebCore::contextMenuItemTagCopy): (WebCore::contextMenuItemTagGoBack): (WebCore::contextMenuItemTagGoForward): (WebCore::contextMenuItemTagStop): (WebCore::contextMenuItemTagReload): (WebCore::contextMenuItemTagCut): (WebCore::contextMenuItemTagPaste): (WebCore::contextMenuItemTagSelectAll): (WebCore::contextMenuItemTagNoGuessesFound): (WebCore::contextMenuItemTagIgnoreSpelling): (WebCore::contextMenuItemTagLearnSpelling): (WebCore::contextMenuItemTagSearchInSpotlight): (WebCore::contextMenuItemTagSearchWeb): (WebCore::contextMenuItemTagLookUpInDictionary): (WebCore::contextMenuItemTagOpenLink): (WebCore::contextMenuItemTagIgnoreGrammar): (WebCore::contextMenuItemTagSpellingMenu): (WebCore::contextMenuItemTagShowSpellingPanel): (WebCore::contextMenuItemTagCheckSpelling): (WebCore::contextMenuItemTagCheckSpellingWhileTyping): (WebCore::contextMenuItemTagCheckGrammarWithSpelling): (WebCore::contextMenuItemTagFontMenu): (WebCore::contextMenuItemTagShowFonts): (WebCore::contextMenuItemTagBold): (WebCore::contextMenuItemTagItalic): (WebCore::contextMenuItemTagUnderline): (WebCore::contextMenuItemTagOutline): (WebCore::contextMenuItemTagStyles): (WebCore::contextMenuItemTagShowColors): (WebCore::contextMenuItemTagSpeechMenu): (WebCore::contextMenuItemTagStartSpeaking): (WebCore::contextMenuItemTagStopSpeaking): (WebCore::contextMenuItemTagWritingDirectionMenu): (WebCore::contextMenuItemTagTextDirectionMenu): (WebCore::contextMenuItemTagDefaultDirection): (WebCore::contextMenuItemTagLeftToRight): (WebCore::contextMenuItemTagRightToLeft): (WebCore::contextMenuItemTagCorrectSpellingAutomatically): (WebCore::contextMenuItemTagSubstitutionsMenu): (WebCore::contextMenuItemTagShowSubstitutions): (WebCore::contextMenuItemTagSmartCopyPaste): (WebCore::contextMenuItemTagSmartQuotes): (WebCore::contextMenuItemTagSmartDashes): (WebCore::contextMenuItemTagSmartLinks): (WebCore::contextMenuItemTagTextReplacement): (WebCore::contextMenuItemTagTransformationsMenu): (WebCore::contextMenuItemTagMakeUpperCase): (WebCore::contextMenuItemTagMakeLowerCase): (WebCore::contextMenuItemTagCapitalize): (WebCore::contextMenuItemTagChangeBack): (WebCore::contextMenuItemTagOpenVideoInNewWindow): (WebCore::contextMenuItemTagOpenAudioInNewWindow): (WebCore::contextMenuItemTagCopyVideoLinkToClipboard): (WebCore::contextMenuItemTagCopyAudioLinkToClipboard): (WebCore::contextMenuItemTagToggleMediaControls): (WebCore::contextMenuItemTagToggleMediaLoop): (WebCore::contextMenuItemTagEnterVideoFullscreen): (WebCore::contextMenuItemTagMediaPlay): (WebCore::contextMenuItemTagMediaPause): (WebCore::contextMenuItemTagMediaMute): (WebCore::contextMenuItemTagInspectElement): (WebCore::searchMenuNoRecentSearchesText): (WebCore::searchMenuRecentSearchesText): (WebCore::searchMenuClearRecentSearchesText): (WebCore::AXWebAreaText): (WebCore::AXLinkText): (WebCore::AXListMarkerText): (WebCore::AXImageMapText): (WebCore::AXHeadingText): (WebCore::AXDefinitionListTermText): (WebCore::AXDefinitionListDefinitionText): (WebCore::AXARIAContentGroupText): (WebCore::AXButtonActionVerb): (WebCore::AXRadioButtonActionVerb): (WebCore::AXTextFieldActionVerb): (WebCore::AXCheckedCheckBoxActionVerb): (WebCore::AXUncheckedCheckBoxActionVerb): (WebCore::AXLinkActionVerb): (WebCore::AXMenuListPopupActionVerb): (WebCore::AXMenuListActionVerb): (WebCore::missingPluginText): (WebCore::crashedPluginText): (WebCore::multipleFileUploadText): (WebCore::unknownFileSizeText): (WebCore::uploadFileText): (WebCore::allFilesText): (WebCore::keygenMenuItem512): (WebCore::keygenMenuItem1024): (WebCore::keygenMenuItem2048): (WebCore::keygenKeychainItemName): (WebCore::imageTitle): (WebCore::mediaElementLoadingStateText): (WebCore::mediaElementLiveBroadcastStateText): (WebCore::localizedMediaControlElementString): (WebCore::localizedMediaControlElementHelpText): (WebCore::localizedMediaTimeDescription): (WebCore::validationMessageValueMissingText): (WebCore::validationMessageValueMissingForCheckboxText): (WebCore::validationMessageValueMissingForFileText): (WebCore::validationMessageValueMissingForMultipleFileText): (WebCore::validationMessageValueMissingForRadioText): (WebCore::validationMessageValueMissingForSelectText): (WebCore::validationMessageTypeMismatchText): (WebCore::validationMessageTypeMismatchForEmailText): (WebCore::validationMessageTypeMismatchForMultipleEmailText): (WebCore::validationMessageTypeMismatchForURLText): (WebCore::validationMessagePatternMismatchText): (WebCore::validationMessageTooLongText): (WebCore::validationMessageRangeUnderflowText): (WebCore::validationMessageRangeOverflowText): (WebCore::validationMessageStepMismatchText): 2011-05-27 Brady Eidson Reviewed by Darin Adler. First swipe at resolving and https://bugs.webkit.org/show_bug.cgi?id=61494 Make the Document be intelligent about returning its DocumentLoader, including the possibility that the DocumentLoader will be null. No new tests. No change in behavior. Instead of storing the DocumentLoader at construction and never changing it, always calculate it based on the FrameLoader's current DocumentLoader: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::suggestedMIMEType): (WebCore::Document::lastModified): (WebCore::Document::initSecurityContext): (WebCore::Document::updateURLForPushOrReplaceState): (WebCore::Document::loader): * dom/Document.h: Null-check or ASSERT that the DocumentLoader exists (or both) depending on the scenario: * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): * html/MediaDocument.cpp: (WebCore::MediaDocument::replaceMediaElementTimerFired): * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::createDocumentStructure): * platform/mac/HTMLConverter.mm: (fileWrapperForElement): * WebCore.exp.in: 2011-05-27 Jer Noble Reviewed by Maciej Stachowiak. 30 second rewind button obscured in fullscreen controller https://bugs.webkit.org/show_bug.cgi?id=61663 If reset() is called while in full-screen mode, make sure to show and hide the correct controls for that mode. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::reset): 2011-05-27 James Robinson Reviewed by Simon Fraser. GraphicsLayers for overflow controls on iframe without clipping layer left out of layer tree https://bugs.webkit.org/show_bug.cgi?id=61590 Adds overflow control layers to the compositor tree for layers without clipping layers regardless of whether the backing is parented. This ensures that the scroll corner layer for an iframe without a clipping layer ends up in the final layer tree. We don't currently render resizers for iframes, but we will soon and this keeps the graphics layer tree consistent. Test: compositing/iframes/resizer.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): 2011-05-27 Adam Barth Reviewed by Eric Seidel. HTMLVideoElement::currentSrc() should return a KURL https://bugs.webkit.org/show_bug.cgi?id=61578 I suspect we got into this mess because the author of this code didn't know about the URL attribute in WebKit IDL, which is super useful! Bad news: The line of code in question seems to have another bug, which I've documented in a FIXME. Let the yak shaving continue! * html/HTMLMediaElement.cpp: (WebCore::urlForLogging): (WebCore::HTMLMediaElement::loadResource): (WebCore::HTMLMediaElement::isSafeToLoadURL): (WebCore::HTMLMediaElement::selectNextSourceChild): (WebCore::HTMLMediaElement::getPluginProxyParams): * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::currentSrc): (WebCore::HTMLMediaElement::currentURL): * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::checkOrigin): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::absoluteMediaURL): - This complete URL call was unnecessary because currentSrc is already absolute. 2011-05-27 Mikhail Naganov Reviewed by Pavel Feldman. Web Inspector: [Chromium] Add support for showing URL of DOMWindow in heap profiles. https://bugs.webkit.org/show_bug.cgi?id=61177 * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotNode.prototype.get className): 2011-05-27 Nikolas Zimmermann Rubber-stamped by Rob Buis. embedded SVG object doesn't scale right https://bugs.webkit.org/show_bug.cgi?id=10526 Fixes crash in svg/custom/immutable-properties.html, seen on the bots. * svg/SVGLength.cpp: (WebCore::SVGLength::determineViewport): Oops forgot to merge-in a null check before landing. 2011-05-27 Nikolas Zimmermann Reviewed by Rob Buis. embedded SVG object doesn't scale right https://bugs.webkit.org/show_bug.cgi?id=10526 tags should treat width/height on a referenced SVG as intrinsic width/height https://bugs.webkit.org/show_bug.cgi?id=11976 Incorrect handling of percentage values for width/height on embedded elements https://bugs.webkit.org/show_bug.cgi?id=14793 WebKit fails some WICD 1.0 core test cases https://bugs.webkit.org/show_bug.cgi?id=15836 (partially fixed, all 'rightsizing' tests are fixed) CSS 2.1: Support replaced elements with relative intrinsic sizes https://bugs.webkit.org/show_bug.cgai?id=15849 (partially fixed) SVG embedded as doesn't respect width/height attributes https://bugs.webkit.org/show_bug.cgi?id=34972 Explicit size of object tag ignored https://bugs.webkit.org/show_bug.cgi?id=37086 Add partial support of CSS 2.1 replaced elements with intrinsic size. The feature itself is complete but has only been implemented for RenderPart, to support SVG content document size negotiation. It serves as starting point for a generalization, in future. The changes in RenderPart are a 1:1 transliteration of the spec (http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width/height, see code). SVG 1.1 says: The 'width' attribute on the outermost svg element establishes the viewport's width, unless the following conditions are met: ... and there are CSS-compatible positioning properties ([CSS2], section 9.3) specified on the referencing element (e.g., the 'object' element) or on the containing document's outermost svg element that are sufficient to establish the width of the viewport. Under these conditions, the positioning properties establish the viewport's width. If an carries width/height attributes, these specify the viewport size of the embedded SVG, instead of its own width/height or viewBox properties. If an has no width/height information, its intrinsic size needs to be calculated depending on the intrinsic ratio (viewBox width divided by height ratio) and the width/height properties on the outermost referenced element. This requires a negotiation between the host document and the embedded document. (There are several more factors that need to be considered, the CSS spec covers this and the RenderPart::computeReplaced* code covers this.) Fixes dozens of long-standing bug reports. The number one integration issue when using SVG through is resolved: "right sizing". Tests: http/tests/misc/object-embedding-svg-delayed-size-negotiation.xhtml svg/custom/object-no-size-attributes.xhtml (bug 11976, from Eric Seidel) svg/custom/object-sizing-explicit-height.xhtml (bug 10526, from Ryan Cannon) svg/custom/object-sizing-explicit-width-height.xhtml svg/custom/object-sizing-explicit-width.xhtml (bug 14793, from Oliver Hunt) svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml svg/custom/object-sizing-no-width-height.xhtml svg/custom/object-sizing.xhtml (bug 37086, from Jeff Schiller) svg/wicd/rightsizing-grid.xhtml (bug 15836, WICD rightsizing test now works) svg/wicd/test-rightsizing-a.xhtml (ditto) svg/wicd/test-rightsizing-b.xhtml (ditto) svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml svg/zoom/page/zoom-svg-through-object-with-override-size.html (bug 34972, from Andreas Kling) svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml svg/zoom/page/zoom-svg-through-object-with-text.xhtml * platform/Length.h: (WebCore::Length::isSpecified): * rendering/RenderPart.cpp: (WebCore::RenderPart::embeddedSVGContentRenderer): (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth): (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight): (WebCore::RenderPart::computeReplacedLogicalWidth): (WebCore::RenderPart::computeReplacedLogicalHeight): (WebCore::RenderPart::layout): * rendering/RenderPart.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::RenderSVGRoot): (WebCore::RenderSVGRoot::computeIntrinsicRatio): (WebCore::RenderSVGRoot::computeIntrinsicWidth): (WebCore::RenderSVGRoot::computeIntrinsicHeight): (WebCore::RenderSVGRoot::negotiateSizeWithHostDocumentIfNeeded): (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): (WebCore::RenderSVGRoot::layout): * rendering/svg/RenderSVGRoot.h: * svg/SVGLength.cpp: (WebCore::SVGLength::determineViewport): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::currentScale): (WebCore::SVGSVGElement::setCurrentScale): (WebCore::SVGSVGElement::currentViewBoxRect): (WebCore::SVGSVGElement::viewBoxToViewTransform): * svg/SVGSVGElement.h: 2011-05-27 Michael Saboff Reviewed by David Hyatt. https://bugs.webkit.org/show_bug.cgi?id=61646 Duplicate Fonts Put in Font Cache on Mac Due to Duplicate CGFontRefs for Same Font Change the platformIsEqual to just compare the m_font members if either is not null. No tests added - functionality unchanged, fixing memory abandonment. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::platformIsEqual): 2011-05-25 Martin Robinson Reviewed by Dirk Schulze. [GTK][Cairo] Twitter rendering breaks https://bugs.webkit.org/show_bug.cgi?id=60917 When instantiating a cairo_scaled_font_t font would put the font in an error state, leave the m_scaledFont member of platform data as null. Rendering with scaled fonts in the error state can later lead to corrupted rendering. Due to this change, we must always null check cairo_scaled_font_t and the platform data now carries the cairo_font_face_t object with it, so that it can be accessed later if there is no cairo_scaled_font_t. Test: platform/gtk/fonts/zero-pixel-sized-fonts.html * platform/graphics/cairo/FontCairo.cpp: (WebCore::Font::drawGlyphs): If the scaled font is null, do not render. * platform/graphics/freetype/FontPlatformData.h: Now include the cairo_font_face_t. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::FontPlatformData): Initialize the new member. (WebCore::FontPlatformData::operator=): Carry over the new member. (WebCore::FontPlatformData::operator==): Check equality with the new member. (WebCore::FontPlatformData::initializeWithFontFace): If the initialization of m_scaledFont put the font into an error state, then just free it and return. (WebCore::FontPlatformData::hasCompatibleCharmap): The font always has a compatible charmap when the scaled font is null, because rendering is always a no-op and the font data never needs to be read. * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp: (WebCore::GlyphPage::fill): Don't read font data when the scaled font is null. * platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::SimpleFontData::platformInit): Return early when there's no scaled font. (WebCore::SimpleFontData::scaledFontData): Use the new m_font member. (WebCore::SimpleFontData::containsCharacters): Return early when there's no scaled font. (WebCore::SimpleFontData::platformWidthForGlyph): Ditto. 2011-05-27 David Levin Reviewed by Darin Fisher. Need a callback for when the preferred rendered size may have changed. https://bugs.webkit.org/show_bug.cgi?id=61309 No new tests needed since no new functionality is exposed. * page/Chrome.cpp: (WebCore::Chrome::layoutUpdated): Plumbed through the call. * page/Chrome.h: Added the new method. * page/ChromeClient.h: (WebCore::ChromeClient::layoutUpdated): Ditto. * page/FrameView.cpp: (WebCore::FrameView::layout): Added a callback for whem a layout has finished. 2011-05-27 Stephanie Lewis Rubber Stamped by Adam Roben. Update Order Files. Use -order_file flag since it can order more of the binary. * Configurations/Base.xcconfig: * WebCore.order: 2011-05-27 Sheriff Bot Unreviewed, rolling out r87464. http://trac.webkit.org/changeset/87464 https://bugs.webkit.org/show_bug.cgi?id=61643 client-close/server-close tests are flaky on Chromium Mac and Windows (Requested by aklein on #webkit). * platform/network/SocketStreamHandleBase.cpp: (WebCore::SocketStreamHandleBase::send): (WebCore::SocketStreamHandleBase::close): (WebCore::SocketStreamHandleBase::sendPendingData): * platform/network/SocketStreamHandleBase.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::send): (WebCore::WebSocket::close): (WebCore::WebSocket::bufferedAmount): (WebCore::WebSocket::didConnect): (WebCore::WebSocket::didReceiveMessage): (WebCore::WebSocket::didReceiveMessageError): (WebCore::WebSocket::didClose): * websockets/WebSocket.h: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::close): (WebCore::WebSocketChannel::disconnect): (WebCore::WebSocketChannel::didClose): (WebCore::WebSocketChannel::didReceiveData): (WebCore::WebSocketChannel::didFail): (WebCore::WebSocketChannel::processBuffer): * websockets/WebSocketChannel.h: * websockets/WebSocketChannelClient.h: (WebCore::WebSocketChannelClient::didClose): * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::Peer::close): (WebCore::workerContextDidClose): (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): * websockets/WorkerThreadableWebSocketChannel.h: 2011-05-27 Rob Buis Reviewed by Nikolas Zimmermann. https://bugs.webkit.org/show_bug.cgi?id=19995 hixie.ch : anchor Link fails with fragment identifiers inside SVG fragments. Only allow links to animation elements within the document. Test: svg/hixie/links/003.xml * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): 2011-05-27 Andreas Kling Reviewed by Benjamin Poulain. Update RGBA color serialization to match HTML5. https://bugs.webkit.org/show_bug.cgi?id=61449 HTML5 now specifies that fully transparent colors should have their alpha value serialized to "0" rather than "0.0" (followed by any number of extra zeroes.) The number of decimals for alpha values between 0 and 1 is not specified, so match Gecko and Presto by returning the lowest number of decimals needed to represent the number. (No more trailing zeroes.) * platform/graphics/Color.cpp: (WebCore::Color::serialized): 2011-05-27 Hans Wennborg Reviewed by Tony Gentilcore. IndexedDB: Support mutating cursors on top of LevelDB https://bugs.webkit.org/show_bug.cgi?id=61615 We need to support the case where a new node is added to the tree in a transaction after the TreeIterator has covered the whole tree. Since this is done lazily, i.e. we set a flag that the tree might have changed, and act upon it later, some members need to be mutable, because we might need to re-seek the tree iterator in a const function. Test: storage/indexeddb/mutating-cursor.html storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html (existing) * platform/leveldb/LevelDBTransaction.cpp: (WebCore::LevelDBTransaction::set): (WebCore::LevelDBTransaction::TreeIterator::reset): (WebCore::LevelDBTransaction::TreeIterator::~TreeIterator): (WebCore::LevelDBTransaction::TreeIterator::TreeIterator): (WebCore::LevelDBTransaction::TransactionIterator::TransactionIterator): (WebCore::LevelDBTransaction::TransactionIterator::~TransactionIterator): (WebCore::LevelDBTransaction::TransactionIterator::next): (WebCore::LevelDBTransaction::TransactionIterator::prev): (WebCore::LevelDBTransaction::TransactionIterator::key): (WebCore::LevelDBTransaction::TransactionIterator::value): (WebCore::LevelDBTransaction::TransactionIterator::treeChanged): (WebCore::LevelDBTransaction::TransactionIterator::refreshTreeIterator): (WebCore::LevelDBTransaction::registerIterator): (WebCore::LevelDBTransaction::unregisterIterator): (WebCore::LevelDBTransaction::notifyIteratorsOfTreeChange): * platform/leveldb/LevelDBTransaction.h: * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::open): 2011-05-27 Sujin Park Unreviewed, buildfix if --no-javascript-debugger. Regression(R84125): Broke GTK build https://bugs.webkit.org/show_bug.cgi?id=60698 No new tests since this doesn't change any behavior. * inspector/WorkerInspectorController.h: 2011-05-26 Yael Aharon Reviewed by Tony Chang. webkit should implement the dropzone attribute https://bugs.webkit.org/show_bug.cgi?id=58210 Add support for dropzone attribute. http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute If a drag event was not canceled by JavaScript, look for an element with a dropzone attribute. If there is such an element, and it matches the drag data store, set the action defined by that element and continue processing the drag and drop operation. Tests: fast/events/dropzone-001.html fast/events/dropzone-002.html fast/events/dropzone-003.html fast/events/dropzone-004.html * dom/Clipboard.cpp: (WebCore::Clipboard::hasFileOfType): (WebCore::Clipboard::hasStringOfType): (WebCore::convertDropZoneOperationToDragOperation): (WebCore::convertDragOperationToDropZoneOperation): (WebCore::Clipboard::processDropZoneKeyword): * dom/Clipboard.h: * html/HTMLAttributeNames.in: * html/HTMLElement.idl: * page/EventHandler.cpp: (WebCore::EventHandler::findDropZone): (WebCore::EventHandler::updateDragAndDrop): * page/EventHandler.h: 2011-05-27 Patrick Gansterer Unreviewed WinCE build fix for r87467. * page/wince/FrameWinCE.cpp: 2011-05-26 Hans Wennborg Reviewed by Tony Gentilcore. IndexedDB: Support NO_DUPLICATE cursors on LevelDB back-end https://bugs.webkit.org/show_bug.cgi?id=61517 Support cursors where the direction is set to NEXT_NO_DUPLICATE, or PREV_NO_DUPLICATE, as specified here: http://www.w3.org/TR/IndexedDB/#widl-IDBCursor-NEXT_NO_DUPLICATE This is tested by storage/indexeddb/mozilla/indexes.html * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor): (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor): (WebCore::IDBLevelDBBackingStore::openIndexCursor): 2011-05-26 Hans Wennborg Reviewed by Tony Gentilcore. LevelDB: turn on paranoid checks and verify checksums, log errors https://bugs.webkit.org/show_bug.cgi?id=61516 This allows for detection of corrupted databases. Even if we can't recover from a corrupted database, discovering the problem is a step in the right direction. No new functionality, no new tests. * platform/leveldb/LevelDBDatabase.cpp: (WebCore::LevelDBDatabase::open): (WebCore::LevelDBDatabase::put): (WebCore::LevelDBDatabase::remove): (WebCore::LevelDBDatabase::get): (WebCore::LevelDBDatabase::write): (WebCore::IteratorImpl::checkStatus): (WebCore::IteratorImpl::seekToLast): (WebCore::IteratorImpl::seek): (WebCore::IteratorImpl::next): (WebCore::IteratorImpl::prev): (WebCore::LevelDBDatabase::createIterator): 2011-05-27 James Robinson Reviewed by Adam Barth. CachedResourceLoader stores data: urls in validated URL set https://bugs.webkit.org/show_bug.cgi?id=61604 CachedResourceLoader maintains a set of URLs that have been validated to avoid validating the same resource multiple times for loads within the same document. This doesn't make sense for data: URLs and just wastes memory. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::revalidateResource): (WebCore::CachedResourceLoader::loadResource): 2011-05-23 MORITA Hajime Reviewed by Tony Chang. [Refactoring] DocumentMarker should be carried around as a pointer, not value. https://bugs.webkit.org/show_bug.cgi?id=61262 - Changed return value of markersInRange() from Vector to Vector. - Introduced markersFor() that returns Vector - Removed DocumentMarkerController::setRenderedRectForMarker() which now can be replaced by RenderedDocumentMarker::setRenderedRect(). - This change didn't remove markersForNode() beucase there is patches on review which depends markersForNode(). I'll remove its call after these patches are landed. No new tests. No behavior change. * WebCore.exp.in: * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addTextMatchMarker): (WebCore::DocumentMarkerController::markersFor): (WebCore::DocumentMarkerController::markersInRange): (WebCore::DocumentMarkerController::hasMarkers): * dom/DocumentMarkerController.h: * dom/RenderedDocumentMarker.h: (WebCore::toRenderedDocumentMarker): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection): * editing/Editor.cpp: (WebCore::Editor::selectionStartHasMarkerFor): * editing/SpellingCorrectionController.cpp: (WebCore::markersHaveIdenticalDescription): (WebCore::SpellingCorrectionController::respondToChangedSelection): (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection): (WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult): * editing/SpellingCorrectionController.h: (WebCore::SpellingCorrectionController::shouldStartTimerFor): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): (WebCore::InlineTextBox::paintTextMatchMarker): (WebCore::InlineTextBox::computeRectForReplacementMarker): (WebCore::InlineTextBox::paintDocumentMarkers): * rendering/InlineTextBox.h: * rendering/svg/SVGInlineFlowBox.cpp: (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer): 2011-05-26 MORITA Hajime Reviewed by Kent Tamura. WebCore::HTMLSummaryElement::isMainSummary ReadAV@NULL https://bugs.webkit.org/show_bug.cgi?id=61511 Removed Unnecessary wrong cast to Elmement, which can be non-Element. Test: fast/html/details-summary-document-child.html * html/HTMLSummaryElement.cpp: (WebCore::HTMLSummaryElement::detailsElement): 2011-05-26 Adam Barth Reviewed by Ryosuke Niwa. FrameLoader cannot be null https://bugs.webkit.org/show_bug.cgi?id=61609 This code has a bunch of cargo-cult null checking. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createRenderer): (WebCore::HTMLMediaElement::attach): (WebCore::HTMLMediaElement::loadResource): (WebCore::HTMLMediaElement::getPluginProxyParams): (WebCore::HTMLMediaElement::createMediaPlayerProxy): (WebCore::HTMLMediaElement::updateWidget): 2011-05-26 Shane Stephens Reviewed by James Robinson. REGRESSION (r81992): layout triggered by position update fails to apply when transform is updated at same time https://bugs.webkit.org/show_bug.cgi?id=60689 When a transform is modified in a style, we were upgrading our understanding of the difference from PositionedMovementOnly to SimplifiedLayout. However, if the position of the style is independently changed at the same time, both PositionedMovement and SimplifiedLayout passes are required. Test: transforms/2d/set-transform-and-top.html * rendering/RenderObject.cpp: Added checks for SimplifiedLayoutAndPositionedMovement - when encountered, set both PositionedMovement and SimplifiedLayout update flasgs. * rendering/style/RenderStyleConstants.h: Added a new StyleDifference enum value (SimplifiedLayoutAndPositionedMovement) for cases when both PositionedMovement and SimplifiedLayout are required. 2011-05-26 Luke Macpherson Reviewed by Eric Seidel. Implement webkit margin collapse CSS properties in CSSStyleApplyProperty https://bugs.webkit.org/show_bug.cgi?id=61589 No new tests as no new functionality added. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Add handlers for: CSSPropertyWebkitMarginBeforeCollapse CSSPropertyWebkitMarginAfterCollapse CSSPropertyWebkitMarginTopCollapse CSSPropertyWebkitMarginBottomCollapse CSSPropertyWebkitMarginCollapse * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove cases that are no longer required. 2011-05-26 Adam Barth Reviewed by Eric Seidel. Support cross-origin property for images https://bugs.webkit.org/show_bug.cgi?id=61015 This patch add support for the crossorigin attribute of images and teaches 2D canvas to respect that flag and not taint a canvas if the image drawn on the canvas is allowed by CORS. While I was editing this code, I couldn't resist a couple touch-up changes. Tests: http/tests/security/canvas-remote-read-remote-image-allowed-with-credentials.html http/tests/security/canvas-remote-read-remote-image-allowed.html http/tests/security/canvas-remote-read-remote-image-blocked-no-crossorigin.html * html/HTMLAttributeNames.in: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::securityOrigin): * html/HTMLCanvasElement.h: * html/HTMLImageElement.idl: * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::checkOrigin): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createPattern): * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::passesAccessControlCheck): * loader/cache/CachedResource.h: 2011-05-26 Mihai Parparita Reviewed by Adam Barth. Fix worldID and destinationDomain argument names https://bugs.webkit.org/show_bug.cgi?id=61571 As part of working on r87423, I noticed a couple of inconsistencies in argument names: - We would use worldId in .h files but worldID in .cpp files. Standardize on the latter - SecurityOrigin::addOriginAccessWhitelistEntry would take a destinationDomains argument, even though the actual parameter was for a single domain (renamed to be singular). * bindings/v8/ScriptController.h: * bindings/v8/V8Proxy.h: * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::addOriginAccessWhitelistEntry): (WebCore::SecurityOrigin::removeOriginAccessWhitelistEntry): * page/SecurityOrigin.h: 2011-05-26 Emil A Eklund Reviewed by Eric Seidel. Replace RenderLayer::x/y/width/height with location/size https://bugs.webkit.org/show_bug.cgi?id=61414 Covered by existing tests. * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::computeRelativePosition): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeRectForRepaint): * rendering/RenderBox.h: (WebCore::RenderBox::maxLayoutOverflow): * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): (WebCore::RenderInline::computeRectForRepaint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): (WebCore::RenderLayer::convertToLayerCoords): (WebCore::RenderLayer::offsetFromResizeCorner): (WebCore::RenderLayer::calculateRects): * rendering/RenderLayer.h: (WebCore::RenderLayer::location): (WebCore::RenderLayer::setSize): * rendering/RenderObject.cpp: (WebCore::RenderObject::computeRectForRepaint): * rendering/RenderTreeAsText.cpp: (WebCore::write): (WebCore::writeLayers): (WebCore::externalRepresentation): * rendering/RenderView.cpp: (WebCore::RenderView::absoluteRects): (WebCore::RenderView::absoluteQuads): 2011-05-26 Annie Sullivan Reviewed by Ryosuke Niwa. Delete table in contentEditable/designMode produces odd contents https://bugs.webkit.org/show_bug.cgi?id=57148 Removes border-collapse, -webkit-border-horizontal-spacing, and -webkit-border-vertical-spacing from the list of properties which should be preserved during edit operations. Also renames this list to editingInheritableProperties to be more clear about what the list is for. Test: editing/deleting/delete-last-char-in-table.html * editing/EditingStyle.cpp: Removes border vertical/horizontal spacing from editingStyleProperties. * editing/EditingStyle.h: Renames OnlyInheritableProperties to OnlyEditingInheritableProperties. * editing/markup.cpp: Renames InheritablePropertiesAndBackgroundColorInEffect. 2011-05-26 Yuta Kitamura Reviewed by Kent Tamura. WebSocket closing handshake https://bugs.webkit.org/show_bug.cgi?id=35721 Implement WebSocket closing handshake based on Ian Hickson's WebSocket protocol draft 76. Tests: http/tests/websocket/tests/client-close.html http/tests/websocket/tests/server-close.html * platform/network/SocketStreamHandleBase.cpp: (WebCore::SocketStreamHandleBase::send): Do not send a message if we are in Closing state. (WebCore::SocketStreamHandleBase::close): Do not disconnect if we have pending data which have not been sent yet. In this case, the actual disconnection will happen in sendPendingData(). (WebCore::SocketStreamHandleBase::disconnect): Renamed from close(). Disconnect the connection immediately. (WebCore::SocketStreamHandleBase::sendPendingData): * platform/network/SocketStreamHandleBase.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: Add didStartClosingHandshake(). Add a function argument (ClosingHandshakeCompletionStatus) to didClose(). (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake): (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback): (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::send): (WebCore::WebSocket::close): Fail if close() is attempted before the connection is established. Otherwise, set the state to CLOSING and start the closing handshake. (WebCore::WebSocket::bufferedAmount): If the state is CLOSING, we need to consider buffered data in m_channel and sent after close(). (WebCore::WebSocket::didConnect): (WebCore::WebSocket::didReceiveMessage): We need to invoke message event in CLOSING state as well as OPEN state. (WebCore::WebSocket::didReceiveMessageError): (WebCore::WebSocket::didStartClosingHandshake): (WebCore::WebSocket::didClose): * websockets/WebSocket.h: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::close): Start the closing handshake. (WebCore::WebSocketChannel::disconnect): Disconnect the socket stream, instead of close. (WebCore::WebSocketChannel::didClose): (WebCore::WebSocketChannel::didReceiveData): Ditto. (WebCore::WebSocketChannel::didFail): Ditto. (WebCore::WebSocketChannel::processBuffer): Ditto. Handle 0xFF 0x00 byte sequence, and discard received data once the closing handshake has started. (WebCore::WebSocketChannel::startClosingHandshake): Send 0xFF 0x00 byte sequence. (WebCore::WebSocketChannel::closingTimerFired): Disconnect the socket stream if the closing handshake has timed out. * websockets/WebSocketChannel.h: m_closing is true if "the WebSocket closing handshake has started" (as stated in the protocol specification). * websockets/WebSocketChannelClient.h: (WebCore::WebSocketChannelClient::didStartClosingHandshake): Added. (WebCore::WebSocketChannelClient::didClose): Add closingHandshakeCompletion parameter. * websockets/WorkerThreadableWebSocketChannel.cpp: Add closingHandshakeCompletion parameter to didClose(), and add didStartClosingHandshake(). (WebCore::WorkerThreadableWebSocketChannel::Peer::close): (WebCore::workerContextDidStartClosingHandshake): (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake): (WebCore::workerContextDidClose): (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): * websockets/WorkerThreadableWebSocketChannel.h: 2011-05-26 David Levin Reviewed by Dmitry Titov. WebKit's font notification has problems when the WebKit main thread != UI thread. https://bugs.webkit.org/show_bug.cgi?id=61391 This doesn't happen in DumpRenderTree, so it needs a unit test which is taking me some time to write correctly. In the meantime, this issues happens to be causing some crashes in Chrome so here's the fix alone for the time being. * platform/graphics/mac/FontCacheMac.mm: (WebCore::invalidateFontCache): Ensure that FontCache::invalidate is only called on WebKit's main thread. (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Call common function for font cache invalidation. Note that the call to fontCache() is fine since the singleton is initialized well before calling this function. Theoretically, there could be a problem due to a lack of a memory barrier but that is highly unlikely and this is debug only code. (WebCore::fontCacheATSNotificationCallback): Ditto. 2011-05-26 Stephanie Lewis Reviewed by Geoff Garen. https://bugs.webkit.org/show_bug.cgi?id=61345 part of Roll back in now that the Crashes are fixed. ResourceResponseBase and ResourceResponse had two different definitions for m_isNull. ResourceResponse treats m_isNull as meaning there isn't any platform ResourceResponse. ResourceResponseBase treats m_isNull as meaning no fields have been initialized. Consolidate calls into ResourceResponseBase meaning. Don't initialize ResourceResponse.m_suggestedFilename until we want to use it. Initializing it requires reading in and parsing a plist. Add new initialization state CommonAndUncommonFields to ResourceResponse. This will be for all the header fields. Move suggestedFilename initialization to AllFields so it is never initialized unless we ask for it. Add "Content-Type" to common headers since it is looked for by every CSS sheet load. No new functionality so no new tests. * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::adopt): (WebCore::ResourceResponseBase::suggestedFilename): (WebCore::ResourceResponseBase::setSuggestedFilename): (WebCore::ResourceResponseBase::httpStatusText): (WebCore::ResourceResponseBase::setHTTPStatusText): (WebCore::ResourceResponseBase::httpHeaderField): (WebCore::ResourceResponseBase::setHTTPHeaderField): (WebCore::ResourceResponseBase::httpHeaderFields): (WebCore::ResourceResponseBase::isAttachment): (WebCore::ResourceResponseBase::setLastModifiedDate): (WebCore::ResourceResponseBase::lastModifiedDate): (WebCore::ResourceResponseBase::wasCached): (WebCore::ResourceResponseBase::connectionReused): (WebCore::ResourceResponseBase::setConnectionReused): (WebCore::ResourceResponseBase::connectionID): (WebCore::ResourceResponseBase::setConnectionID): (WebCore::ResourceResponseBase::resourceLoadTiming): (WebCore::ResourceResponseBase::setResourceLoadTiming): (WebCore::ResourceResponseBase::resourceLoadInfo): (WebCore::ResourceResponseBase::setResourceLoadInfo): * platform/network/ResourceResponseBase.h: * platform/network/cf/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit): * platform/network/mac/ResourceResponseMac.mm: 2011-05-26 James Kozianski Reviewed by Eric Seidel. Implement a whitelist for registerProtocolHandler https://bugs.webkit.org/show_bug.cgi?id=60322 * page/Navigator.cpp: (WebCore::initProtocolHandlerWhitelist): (WebCore::isProtocolWhitelisted): (WebCore::verifyProtocolHandlerScheme): 2011-05-26 Annie Sullivan Reviewed by Ryosuke Niwa. [debug feature] CSSStyleDeclaration should have a way to print cssText https://bugs.webkit.org/show_bug.cgi?id=61570 Adds a method to print the cssText to stderr for debugging. * css/CSSStyleDeclaration.cpp: (WebCore::CSSStyleDeclaration::showStyle): New method to print cssText to stderr * css/CSSStyleDeclaration.h: New method declaration 2011-05-26 Syed Idris Shah Reviewed by Andreas Kling. [Qt] fast/canvas/webgl/gl-uniform-arrays.html failing for Qt on Linux https://bugs.webkit.org/show_bug.cgi?id=60377 LayoutTests/fast/canvas/webgl/gl-uniform-arrays.html For an array of active uniform, we should be careful while truncating the name of the uniform. Currently we are truncating the last three characters of an array with out checking for [0]. As a result we are truncating the the actual name of the active uniforms i.e. color to co. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUniform): Strip "[0]" from the name if it's an array and is part of the name. 2011-05-26 Sheriff Bot Unreviewed, rolling out r87444. http://trac.webkit.org/changeset/87444 https://bugs.webkit.org/show_bug.cgi?id=61582 Layout test regressions in Chromium/WebKit: fast/css/first- letter-text-fragment-crash.html, fast/css/first-letter- visibility.html (Requested by aklein on #webkit). * page/Chrome.cpp: * page/Chrome.h: * page/ChromeClient.h: * page/FrameView.cpp: (WebCore::FrameView::setContentsSize): * page/FrameView.h: 2011-05-26 David Levin Reviewed by Darin Fisher. Need a callback for when the preferred rendered size changed. https://bugs.webkit.org/show_bug.cgi?id=61309 No new tests needed since no new functionality is exposed. * page/Chrome.cpp: (WebCore::Chrome::contentsPreferredSizeChanged): Plumbed through the call. * page/Chrome.h: Added the new method. * page/ChromeClient.h: Ditto. * page/FrameView.cpp: (WebCore::FrameView::setContentsSize): Added calculations for the preferred size and the call to contentsPreferredSizeChanged. 2011-05-25 Levi Weintraub Reviewed by Eric Seidel. Switch controlClipRect to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=60806 Switching controlClipRect to take an IntPoint representing the offset to be added instead of a pair of ints. No new tests as this is just refactoring. * WebCore.xcodeproj/project.pbxproj: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): * rendering/RenderBox.h: (WebCore::RenderBox::controlClipRect): * rendering/RenderButton.cpp: (WebCore::RenderButton::controlClipRect): * rendering/RenderButton.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemBackground): (WebCore::RenderListBox::controlClipRect): * rendering/RenderListBox.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::controlClipRect): * rendering/RenderMenuList.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::controlClipRect): * rendering/RenderTextControlSingleLine.h: 2011-05-25 Levi Weintraub Reviewed by Eric Seidel. Switch controlClipRect to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=60806 Switching controlClipRect to take an IntPoint representing the offset to be added instead of a pair of ints. No new tests as this is just refactoring. * WebCore.xcodeproj/project.pbxproj: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): * rendering/RenderBox.h: (WebCore::RenderBox::controlClipRect): * rendering/RenderButton.cpp: (WebCore::RenderButton::controlClipRect): * rendering/RenderButton.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemBackground): (WebCore::RenderListBox::controlClipRect): * rendering/RenderListBox.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::controlClipRect): * rendering/RenderMenuList.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::controlClipRect): * rendering/RenderTextControlSingleLine.h: 2011-05-26 Jeff Miller Reviewed by Steve Falkenburg. Fullscreen content is sometimes obscured by taskbar (which even covers up the "exit fullscreen" button) https://bugs.webkit.org/show_bug.cgi?id=61569 Normally, when the background fullscreen window is animated in, the Windows taskbar will be hidden, but this doesn't always work for some reason. Workaround this issue by setting the real fullscreen window to be a topmost window. * platform/graphics/win/FullScreenController.cpp: (FullScreenController::Private::fullscreenClientWndProc): Exit fullscreen when m_fullScreenWindow is deactivated. (FullScreenController::enterFullScreenRepaintCompleted): Make m_fullScreenWindow a topmost window before animating it in to ensure the taskbar is hidden. 2011-05-26 James Robinson Reviewed by Darin Fisher. [skia] Add area check to ImageBufferData::getImageData https://bugs.webkit.org/show_bug.cgi?id=61375 No change in behavior, just a sanity check. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::getImageData): 2011-05-26 Levi Weintraub Reviewed by Eric Seidel. Switch positionOverflowControls to IntSize https://bugs.webkit.org/show_bug.cgi?id=61493 Switching positionOverflowControls to take a layerOffset IntSize as opposed to a pair of ints. No new tests since this is just refactoring. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::positionOverflowControls): (WebCore::RenderLayer::paintOverflowControls): * rendering/RenderLayer.h: 2011-05-26 Sheriff Bot Unreviewed, rolling out r87368. http://trac.webkit.org/changeset/87368 https://bugs.webkit.org/show_bug.cgi?id=61564 Wrong approach, will do the wrong thing if the element needs simplified normal flow layout but is not positioned (Requested by jamesr on #webkit). * rendering/RenderObject.h: (WebCore::RenderObject::needsPositionedMovementLayout): 2011-05-02 Robert Hogan Reviewed by Adam Roben. [Qt] Allow popup windows from plugins when initiated by a user gesture https://bugs.webkit.org/show_bug.cgi?id=41292 If the event is from a user gesture and the plugin doesn't support NPN_PushPopupsEnabledState() and NPN_PopPopupsEnabledState(), allow popups. * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::dispatchNPEvent): 2011-05-26 Leandro Gracia Gil Reviewed by Dmitry Titov. [V8] Add missing compile guards for WebWorkers in WebCore. https://bugs.webkit.org/show_bug.cgi?id=61535 No new tests - refactoring only. * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::invokeEventHandler): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): 2011-05-26 Mihai Parparita Reviewed by Adam Barth. Support cross-origin XMLHttpRequest in isolated worlds https://bugs.webkit.org/show_bug.cgi?id=59843 Allows isolated worlds to be associated with a different SecurityOrigin (exposed as a setIsolatedWorldSecurityOrigin function in ScriptController). The XMLHttpRequest constructor can then check that it's being instantiated in an isolated world and use its security origin. XMLHttpRequest, ThreadableLoader and DocumentThreadableLoader had to be changed to use the copied SecurityOrigin instead of always grabbing the Document's. Test: http/tests/security/isolatedWorld/cross-origin-xhr.html * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::setIsolatedWorldSecurityOrigin): * bindings/v8/ScriptController.h: * bindings/v8/V8IsolatedContext.cpp: (WebCore::V8IsolatedContext::setSecurityOrigin): * bindings/v8/V8IsolatedContext.h: (WebCore::V8IsolatedContext::securityOrigin): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): (WebCore::V8Proxy::setIsolatedWorldSecurityOrigin): (WebCore::V8Proxy::resetIsolatedWorlds): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight): (WebCore::DocumentThreadableLoader::didReceiveResponse): (WebCore::DocumentThreadableLoader::preflightSuccess): (WebCore::DocumentThreadableLoader::isAllowedRedirect): (WebCore::DocumentThreadableLoader::securityOrigin): * loader/DocumentThreadableLoader.h: * loader/ThreadableLoader.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::create): (WebCore::XMLHttpRequest::XMLHttpRequest): (WebCore::XMLHttpRequest::securityOrigin): (WebCore::XMLHttpRequest::responseXML): (WebCore::XMLHttpRequest::createRequest): (WebCore::XMLHttpRequest::setRequestHeader): (WebCore::XMLHttpRequest::getAllResponseHeaders): (WebCore::XMLHttpRequest::getResponseHeader): * xml/XMLHttpRequest.h: 2011-05-26 Michael Nordman Reviewed by Darin Fisher. [Chromium] Use SecurityOrigin produced databaseIdentifier strings, instead of SecurityOrigin RefPtrs, as the top level key into the DatabaseTracker's collection of open databases. Otherwise we can fail to lookup databases when trying to forceably close them via WebDatabase::closeDatabaseImmediately. https://bugs.webkit.org/show_bug.cgi?id=61417 New new functionality, no tests. * storage/DatabaseTracker.h: * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::DatabaseTracker::addOpenDatabase): (WebCore::DatabaseTracker::removeOpenDatabase): (WebCore::DatabaseTracker::getOpenDatabases): (WebCore::DatabaseTracker::interruptAllDatabasesForContext): 2011-05-25 Jer Noble Reviewed by Maciej Stachowiak. Safari Web Content crashes while entering/exiting the full screen mode of the video content https://bugs.webkit.org/show_bug.cgi?id=61498 No new tests, as DRT does not currently animate the full screen transition. To guard against m_fullScreenRenderer being called after it has been deleted, add code in RenderFullScreen which notifies the document when its full-screen renderer will be destroyed. Also, add some sanity checks when accessing the full-screen renderer's layer backing. * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): Guard against a missing full-screen renderer layer. (WebCore::Document::webkitWillExitFullScreenForElement): Ditto. (WebCore::Document::setFullScreenRenderer): Added ASSERT. (WebCore::Document::fullScreenRendererDestroyed): Added. (WebCore::Document::setAnimatingFullScreen): Guard against the full-screen element having been removed from the document. * dom/Document.h: * rendering/RenderFullScreen.cpp: (RenderFullScreen::destroy): Added. Tell the Document that it's full-screen renderer is about to be destroyed. * rendering/RenderFullScreen.h: 2011-05-26 Andreas Kling Reviewed by Geoffrey Garen. Overload resolution in generated JSC bindings could be more efficient. https://bugs.webkit.org/show_bug.cgi?id=61544 Only fetch the arguments once, and not until they are needed (less work in the case of an early return.) * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined. (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): 2011-05-26 Adrienne Walker Reviewed by James Robinson. [chromium] Be robust to empty viewports in the compositor https://bugs.webkit.org/show_bug.cgi?id=61545 It's possible for a frame to be requested to be drawn before it is non-empty. The compositor should be robust to that possibility. The changes in LayerTilerChromium are the only required changes to handle this, but having an early out in LayerRendererChromium seemed like a good sanity check. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateAndDrawLayers): (WebCore::LayerRendererChromium::drawLayers): * platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::prepareToUpdate): (WebCore::LayerTilerChromium::updateRect): (WebCore::LayerTilerChromium::draw): 2011-05-26 Emil A Eklund Reviewed by Eric Seidel. Change RenderObject to use FloatPoint::scale and FloatQuad::scale https://bugs.webkit.org/show_bug.cgi?id=61497 Covered by existing test. * platform/graphics/FloatQuad.h: (WebCore::FloatQuad::scale): * rendering/RenderObject.h: (WebCore::adjustFloatQuadForAbsoluteZoom): (WebCore::adjustFloatRectForAbsoluteZoom): (WebCore::adjustFloatQuadForPageScale): (WebCore::adjustFloatRectForPageScale): 2011-05-26 Alexis Menard Unreviewed build fix for Qt and QuickTime backend. r87328 added a new system interface, we need to add it too. * platform/qt/WebCoreSystemInterface.h: * platform/qt/WebCoreSystemInterface.mm: 2011-05-26 Andrey Kosyakov Unreviewed follow-up to r87395, added checks to avoid accessing undefined member for certain timeline events. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.FormattedRecord): 2011-05-25 Ryosuke Niwa Reviewed by Enrica Casucci. WebKit duplicates styles from css rules on copy and paste https://bugs.webkit.org/show_bug.cgi?id=61466 Fixed the bug by removing duplicate properties from inline style declarations in ReplaceSelectionCommand. Also moved the code to obtain style from rules from markup.cpp to EditingStyle.cpp to share code. Test: editing/pasteboard/style-from-rules.html * editing/EditingStyle.cpp: (WebCore::EditingStyle::EditingStyle): Added a null check. (WebCore::EditingStyle::extractFontSizeDelta): Ditto. (WebCore::styleFromMatchedRulesForElement): Moved from markup.cpp. (WebCore::EditingStyle::mergeStyleFromRules): Extracted from StyledMarkupAccumulator::appendElement. (WebCore::EditingStyle::mergeStyleFromRulesForSerialization): Ditto. (WebCore::EditingStyle::removeStyleFromRules): Added. * editing/EditingStyle.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Renamed from negateStyleRulesThatAffectAppearance; Calls removeStyleFromRules. * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::appendElement): Calls mergeStyleFromRulesForSerialization. (WebCore::styleFromMatchedRulesAndInlineDecl): Calls mergeStyleFromRules; changed the return type from CSSMutableStyleDeclaration to EditingStyle. (WebCore::isElementPresentational): Calls styleFromMatchedRulesAndInlineDecl. (WebCore::shouldIncludeWrapperForFullySelectedRoot): Ditto. (WebCore::highestAncestorToWrapMarkup): Calls shouldIncludeWrapperForFullySelectedRoot. (WebCore::createMarkup): Calls styleFromMatchedRulesAndInlineDecl. 2011-05-26 Michael Schneider Reviewed by Pavel Feldman. WebInspector: Added API to access the timeline data in a inspector extension. https://bugs.webkit.org/show_bug.cgi?id=61098 * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.InspectorExtensionAPI): (WebInspector.injectedExtensionAPI): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._addRecordToTimeline): (WebInspector.ExtensionServer.prototype._onSubscribe): (WebInspector.ExtensionServer.prototype._onUnsubscribe): (WebInspector.ExtensionServer.prototype._registerHandler): (WebInspector.ExtensionServer.prototype._registerSubscriptionHandler): * inspector/front-end/TimelineManager.js: Added. (WebInspector.TimelineManager): (WebInspector.TimelineManager.prototype.start): (WebInspector.TimelineManager.prototype.stop): (WebInspector.TimelineDispatcher): (WebInspector.TimelineDispatcher.prototype.started): (WebInspector.TimelineDispatcher.prototype.stopped): (WebInspector.TimelineDispatcher.prototype.eventRecorded): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked): (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-05-26 Andrey Kosyakov Reviewed by Yury Semikhatsky. Web Inspector: TimelinePanel should not modify input timeline data when processing timeline event https://bugs.webkit.org/show_bug.cgi?id=61529 Do not modify input timeline data when processing timeline event. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._addRecordToTimeline): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._refreshDetails): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-05-26 Rob Buis Reviewed by Dirk Schulze. Dynamically created elements do not animate upon document insertion as they should https://bugs.webkit.org/show_bug.cgi?id=20028 Tests: svg/animations/animate-insert-begin.html svg/animations/animate-insert-no-begin.html Move animation initializing and rescheduling to insertedIntoDocument. This way animate elements dynamicaly inserted into the document using js start as well. * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::insertedIntoDocument): * svg/animation/SVGSMILElement.h: 2011-05-26 Andreas Kling Reviewed by Benjamin Poulain. JSC DOM bindings: ExecState::argumentCount() is size_t, not int. https://bugs.webkit.org/show_bug.cgi?id=61530 * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionClassMethodWithOptional): 2011-05-26 Simon Fraser Reviewed by Adam Roben. Some repeating linear gradients look wrong https://bugs.webkit.org/show_bug.cgi?id=61371 Test: fast/gradients/css3-repeating-linear-gradients2.html Fix incorrect stop duplication code when filling forwards a repeating gradient. The "if (srcStopOrdinal < originalNumStops - 1)" test was wrong because srcStopOrdinal had been adjusted for stops added by start-filling, but originalNumStops had not. Fix by considering srcStopOrdinal as an index into the original stops, so comparing it with originalNumStops remains valid. * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::addStops): 2011-05-26 Vsevolod Vlasov Reviewed by Yury Semikhatsky. Web Inspector: In network panel, show transfer size in a first line of resource row. https://bugs.webkit.org/show_bug.cgi?id=61354 * English.lproj/localizedStrings.js: * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._createTable): (WebInspector.NetworkDataGridNode.prototype._refreshSizeCell): 2011-05-25 Simon Fraser Reviewed by Dan Bernstein. Always antialias borders, outlines and rules when scaling https://bugs.webkit.org/show_bug.cgi?id=61502 r84273 changed the behavior of drawLineForBoxSide() to never antialias by default. This actually disabled antialiasing in some circumstances where it used to be enabled, for example collapsed table border drawing. Fix by allowing antialiasing for collapsed table borders, column rules and span outlines when the context is scaled. Test: fast/borders/border-antialiasing.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnRules): * rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutline): (WebCore::RenderInline::paintOutlineForLine): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintCollapsedBorder): 2011-05-26 Vsevolod Vlasov Reviewed by Yury Semikhatsky. Web Inspector: Use different SourceFrame instances for ResourcesPanel and NetworkPanel https://bugs.webkit.org/show_bug.cgi?id=59193 * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): (WebInspector.NetworkItemView._contentViewForResource): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._refreshResource): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get messages): (WebInspector.Resource.prototype.addMessage): (WebInspector.Resource.prototype.set errors): (WebInspector.Resource.prototype.set warnings): (WebInspector.Resource.prototype.clearErrorsAndWarnings): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._consoleMessageAdded): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.hasTextContent): (WebInspector.ResourceView.nonSourceViewForResource): (WebInspector.ResourceSourceFrame): (WebInspector.ResourceSourceFrame.mimeTypeForResource): (WebInspector.ResourceSourceFrame.prototype.requestContent): (WebInspector.ResourceSourceFrame.prototype.suggestedFileName): (WebInspector.EditableResourceSourceFrame): (WebInspector.EditableResourceSourceFrame.prototype.doubleClick): (WebInspector.EditableResourceSourceFrame.prototype.editContent): (WebInspector.EditableResourceSourceFrame.prototype.cancelEditing): (WebInspector.EditableResourceSourceFrame.prototype.afterTextChanged): (WebInspector.EditableResourceSourceFrame.prototype._clearIncrementalUpdateTimer): (WebInspector.ResourceRevisionSourceFrame): (WebInspector.ResourceRevisionSourceFrame.prototype.requestContent): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showResource): (WebInspector.ResourcesPanel.prototype._showResourceView): (WebInspector.ResourcesPanel.prototype._resourceViewForResource): (WebInspector.ResourcesPanel.prototype._showRevisionView): (WebInspector.ResourcesPanel.prototype._sourceViewForRevision): (WebInspector.ResourcesPanel.prototype.searchCanceled): (WebInspector.ResourcesPanel.prototype._findTreeElementForRevision): (WebInspector.ResourcesPanel.prototype._findTreeElementForRevision.getParent): (WebInspector.FrameResourceTreeElement): (WebInspector.FrameResourceTreeElement.prototype.onattach): (WebInspector.FrameResourceTreeElement.prototype._updateErrorsAndWarningsBubbles): (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsCleared): (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsMessageAdded): (WebInspector.FrameResourceTreeElement.prototype._appendRevision): (WebInspector.FrameResourceTreeElement.prototype.sourceView): (WebInspector.FrameResourceTreeElement.prototype._createSourceView): (WebInspector.FrameResourceTreeElement.prototype._recreateSourceView): (WebInspector.ResourceRevisionTreeElement): (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent): (WebInspector.ResourceRevisionTreeElement.prototype.sourceView): 2011-05-26 Andreas Kling Reviewed by Darin Adler. JSC DOM bindings: Use isUndefinedOrNull() instead of (isNull() || isUndefined()). https://bugs.webkit.org/show_bug.cgi?id=61472 * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined. (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): 2011-05-26 Keishi Hattori Reviewed by Kent Tamura. Add