2012-05-04 Chris Rogers Oscillator must implement noteOn() and noteOff() https://bugs.webkit.org/show_bug.cgi?id=85236 Reviewed by Kenneth Russell. Test: webaudio/oscillator-scheduling.html to be landed separately to get proper platform baselines * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::process): Simplify/remove zeroing-out silence at end of buffer, since it's now handled in the base-class AudioScheduledSourceNode::updateSchedulingInfo(). * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createBufferSource): Improve comment about ownership and dynamic-lifetime of AudioBufferSourceNode. (WebCore::AudioContext::createOscillator): AudioContext keeps a reference to the Oscillator and that reference is released in AudioScheduledSourceNode, when it has finished playing. * Modules/webaudio/AudioScheduledSourceNode.h: * Modules/webaudio/AudioScheduledSourceNode.cpp: (WebCore::AudioScheduledSourceNode::updateSchedulingInfo): updateSchedulingInfo() is now responsible for zeroing out the very start (before a note starts) and the very end (after note ends) of the output AudioBus. We've also simplified the number of arguments passed to this method, because of this. It now handles playbackState transition to FINISHED_STATE. * Modules/webaudio/Oscillator.cpp: (WebCore::Oscillator::Oscillator): (WebCore::Oscillator::calculateSampleAccuratePhaseIncrements): The frequency value needs to snap immediately to its correct value the very first time. This bug needs to be fixed here so that the Oscillator layout scheduling test works correctly. (WebCore::Oscillator::process): Since Oscillator in now changing to be a AudioScheduledSourceNode, we need to call AudioScheduledSourceNode::updateSchedulingInfo() to handle playbackState for us. (WebCore::Oscillator::propagatesSilence): Add scheduling logic for propagatesSilence(). (Oscillator): * Modules/webaudio/Oscillator.idl: Add noteOn(), noteOff() methods and playbackState according to specification. 2012-05-04 Andy Estes Remove uses of ASSERT(false) https://bugs.webkit.org/show_bug.cgi?id=85686 Reviewed by Dean Jackson. Replace uses of ASSERT(false) with ASSERT_NOT_REACHED(). Also, in two places, there was code structured like: if (expr) { // do something } else { ASSERT(false); } Replace this with: ASSERT(expr); if (!expr) return; // do something * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::deleteOrigin): (WebCore::DatabaseTracker::doneCreatingDatabase): (WebCore::DatabaseTracker::doneDeletingDatabase): (WebCore::DatabaseTracker::deleteDatabase): * bridge/objc/objc_instance.mm: (ObjcInstance::invokeObjcMethod): * bridge/objc/objc_utility.mm: (JSC::Bindings::convertObjcValueToValue): (JSC::Bindings::objcValueTypeForType): * dom/Node.cpp: (WebCore::Node::createRenderer): * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::setIconURLForPageURLInSQLDatabase): (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase): * platform/graphics/GraphicsContext3D.cpp: (WebCore::doPacking): * platform/text/BidiResolver.h: (WebCore::::createBidiRunsForLine): 2012-05-04 Noel Gordon [CG] Minor refactor of ImageBuffer::CGImageToDataURL and its callers https://bugs.webkit.org/show_bug.cgi?id=85280 Reviewed by Kenneth Russell. This patch means to simplify the diff of an upcoming patch. Refactoring here in preparation for that patch. No new tests. No behavioral change. Covered by canvas 2d and 3d tests: canvas/philip/tests/*toDataURL*.html fast/canvas/webgl/premultiplyalpha-test.html * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::CGImageToDataURL): Move the invalid image (!image) test here. The comments are about JPEG images; say that. Rename out to base64Data. (WebCore::ImageBuffer::toDataURL): Remove the !image test. (WebCore::ImageDataToDataURL): Move and define variables where used and make the code flow read similarly to toDataURL. Remove the !image test. 2012-05-04 Shawn Singh [chromium] Changes to layer tree structure need to be tracked properly https://bugs.webkit.org/show_bug.cgi?id=85421 Reviewed by Adrienne Walker. Unit test added: TreeSynchronizerTest.syncSimpleTreeAndTrackStackingOrderChange Earlier, we were relying on WebCore behavior that always called setNeedsDisplay whenever the layer tree structure changed. However, in general it is more correct to consider layer tree changes even when things don't need repainting; for example Aura code is encountring this bug now. This patch corrects the compositor so that layer tree structural changes are considered property changes, without requiring that layers needed to be repainted. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::insertChild): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::setStackingOrderChanged): (WebCore): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): 2012-05-04 Jeffrey Pfau Unreviewed; build fix after r116191. * bindings/js/JSEventListener.h: 2012-05-04 Enrica Casucci REGRESSION: Cursor jumps to the first line after deleting the last word. https://bugs.webkit.org/show_bug.cgi?id=85334 Reviewed by Ryosuke Niwa. This regression was introduced with the work to remove redundant divs. When we decide to remove a DIV, we need to adjust the selection, if it is expressed in terms of the node being removed. The new position was computed using updatePositionForNodeRemoval that was not designed for the case where we remove preserving children. This patch adds a new method to CompositeEditCommand to do this properly. Test: editing/deleting/delete-word-from-unstyled-div.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::isRemovableBlock): Code clenup. (WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren): Added. * editing/CompositeEditCommand.h: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Uses updatePositionForNodeRemovalPreservingChildren. 2012-05-04 Jeffrey Pfau Prevent early EventListener deletion https://bugs.webkit.org/show_bug.cgi?id=73970 Reviewed by Oliver Hunt. Test: fast/events/attribute-listener-deletion-crash.html * bindings/js/JSEventListener.h: (WebCore::JSEventListener::jsFunction): 2012-05-04 Yongjun Zhang Add "combining short stroke overlay character (u0335)" to lookalike characters blacklist. https://bugs.webkit.org/show_bug.cgi?id=85440 Reviewed by David Kilzer. We should add u0335 to the characters blacklist. * platform/mac/WebCoreNSURLExtras.mm: (WebCore::isLookalikeCharacter): 2012-05-04 Satoru Takabayashi [chromium] Add plumbing for file display names for drag and drop https://bugs.webkit.org/show_bug.cgi?id=85673 Reviewed by Darin Fisher. No new tests: this change itself shouldn't change existing behavior. * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::addFilename): * platform/chromium/ChromiumDataObject.h: (ChromiumDataObject): 2012-05-04 Levi Weintraub Correct pixel snapping in RenderSVGRoot::paintReplaced https://bugs.webkit.org/show_bug.cgi?id=85671 Reviewed by Eric Seidel. SVG root elements are still painted on pixel boundaries, so their children should apply transforms based on their actual painted location, not their sub-pixel one. This corrects a clipping and painting issue where these sub-pixel units are incorrectly applied to the graphics context. Covered by existing tests when sub-pixel layout is enabled. * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paintReplaced): 2012-05-04 Adam Barth Refactor CSP state to prepare for having both a ReportOnly and an Enforced policy https://bugs.webkit.org/show_bug.cgi?id=85662 Reviewed by Eric Seidel. This patch refactors the ContentSecurityPolicy state into a separate DirectiveList class to prepare for https://bugs.webkit.org/show_bug.cgi?id=85561, which will cause us to need two directive lists: one for enforcement and one for monitoring. This patch shouldn't cause any change in behavior. * page/ContentSecurityPolicy.cpp: (CSPDirectiveList): (WebCore::CSPDirectiveList::header): (WebCore::CSPDirectiveList::headerType): (WebCore::CSPDirectiveList::denyIfEnforcingPolicy): (WebCore): (WebCore::CSPDirectiveList::CSPDirectiveList): (WebCore::CSPDirectiveList::create): (WebCore::CSPDirectiveList::reportViolation): (WebCore::CSPDirectiveList::logUnrecognizedDirective): (WebCore::CSPDirectiveList::checkEval): (WebCore::CSPDirectiveList::operativeDirective): (WebCore::CSPDirectiveList::checkInlineAndReportViolation): (WebCore::CSPDirectiveList::checkEvalAndReportViolation): (WebCore::CSPDirectiveList::checkSourceAndReportViolation): (WebCore::CSPDirectiveList::allowJavaScriptURLs): (WebCore::CSPDirectiveList::allowInlineEventHandlers): (WebCore::CSPDirectiveList::allowInlineScript): (WebCore::CSPDirectiveList::allowInlineStyle): (WebCore::CSPDirectiveList::allowEval): (WebCore::CSPDirectiveList::allowScriptFromSource): (WebCore::CSPDirectiveList::allowObjectFromSource): (WebCore::CSPDirectiveList::allowChildFrameFromSource): (WebCore::CSPDirectiveList::allowImageFromSource): (WebCore::CSPDirectiveList::allowStyleFromSource): (WebCore::CSPDirectiveList::allowFontFromSource): (WebCore::CSPDirectiveList::allowMediaFromSource): (WebCore::CSPDirectiveList::allowConnectFromSource): (WebCore::CSPDirectiveList::parse): (WebCore::CSPDirectiveList::parseDirective): (WebCore::CSPDirectiveList::parseReportURI): (WebCore::CSPDirectiveList::createCSPDirective): (WebCore::CSPDirectiveList::applySandboxPolicy): (WebCore::CSPDirectiveList::addDirective): (WebCore::ContentSecurityPolicy::ContentSecurityPolicy): (WebCore::ContentSecurityPolicy::~ContentSecurityPolicy): (WebCore::ContentSecurityPolicy::copyStateFrom): (WebCore::ContentSecurityPolicy::didReceiveHeader): (WebCore::ContentSecurityPolicy::setOverrideAllowInlineStyle): (WebCore::ContentSecurityPolicy::header): (WebCore::ContentSecurityPolicy::headerType): (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): (WebCore::ContentSecurityPolicy::allowInlineScript): (WebCore::ContentSecurityPolicy::allowInlineStyle): (WebCore::ContentSecurityPolicy::allowEval): (WebCore::ContentSecurityPolicy::allowScriptFromSource): (WebCore::ContentSecurityPolicy::allowObjectFromSource): (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): (WebCore::ContentSecurityPolicy::allowImageFromSource): (WebCore::ContentSecurityPolicy::allowStyleFromSource): (WebCore::ContentSecurityPolicy::allowFontFromSource): (WebCore::ContentSecurityPolicy::allowMediaFromSource): (WebCore::ContentSecurityPolicy::allowConnectFromSource): * page/ContentSecurityPolicy.h: (WebCore): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerContext): 2012-05-04 Abhishek Arya ASSERT(beforeChildAnonymousContainer->isTable()); fails in RenderBlock::addChildIgnoringAnonymousColumnBlocks. https://bugs.webkit.org/show_bug.cgi?id=84606 Reviewed by Julien Chaffraix. RenderBlock::removeChild forgot to set display on the anonymous block, causing it to display as INLINE. To prevent this kind of failure in future, we replace createAnonymousStyle with createAnonymousStyleWithDisplay to make everyone explictly pass display as the argument. Test: fast/block/block-add-child-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay): (WebCore::RenderBlock::createAnonymousColumnsWithParentRenderer): (WebCore::RenderBlock::createAnonymousColumnSpanWithParentRenderer): * rendering/RenderInline.cpp: (WebCore::updateStyleOfAnonymousBlockContinuations): (WebCore::RenderInline::addChildIgnoringContinuation): * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderRuby.cpp: (WebCore::createAnonymousRubyInlineBlock): * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::createRubyBase): (WebCore::RenderRubyRun::staticCreateRubyRun): * rendering/RenderTable.cpp: (WebCore::RenderTable::createAnonymousWithParentRenderer): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::createAnonymousWithParentRenderer): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::createAnonymousWithParentRenderer): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::createAnonymousWithParentRenderer): * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::createAlmostAnonymousBlock): * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::createAnonymousWithParentRenderer): * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::addChild): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::createAnonymousStyleWithDisplay): * rendering/style/RenderStyle.h: 2012-04-27 Erik Arvidsson WebKit IDL does not use exception syntax https://bugs.webkit.org/show_bug.cgi?id=85100 Reviewed by Dimitri Glazkov. This adds support for exception ExceptionName { ... } which currently sets a flag on the domClass. Binding tests updated. * Modules/indexeddb/IDBDatabaseException.idl: * Modules/webdatabase/SQLException.idl: * bindings/scripts/IDLParser.pm: (ParseInterface): (DetermineParseMode): (ProcessSection): * bindings/scripts/IDLStructure.pm: * bindings/scripts/test/CPP/WebDOMTestException.cpp: Added. (WebDOMTestException::WebDOMTestExceptionPrivate::WebDOMTestExceptionPrivate): (WebDOMTestException::WebDOMTestExceptionPrivate): (WebDOMTestException::WebDOMTestException): (WebDOMTestException::operator=): (WebDOMTestException::impl): (WebDOMTestException::~WebDOMTestException): (WebDOMTestException::name): (toWebCore): (toWebKit): * bindings/scripts/test/CPP/WebDOMTestException.h: Added. (WebCore): (WebDOMTestException): * bindings/scripts/test/GObject/WebKitDOMTestException.cpp: Added. (WebKit): (WebKit::kit): (WebKit::core): (WebKit::wrapTestException): (webkit_dom_test_exception_finalize): (webkit_dom_test_exception_set_property): (webkit_dom_test_exception_get_property): (webkit_dom_test_exception_constructed): (webkit_dom_test_exception_class_init): (webkit_dom_test_exception_init): (webkit_dom_test_exception_get_name): * bindings/scripts/test/GObject/WebKitDOMTestException.h: Added. (_WebKitDOMTestException): (_WebKitDOMTestExceptionClass): * bindings/scripts/test/GObject/WebKitDOMTestExceptionPrivate.h: Added. (WebKit): * bindings/scripts/test/JS/JSTestException.cpp: Added. (WebCore): (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor): (WebCore::JSTestExceptionConstructor::finishCreation): (WebCore::JSTestExceptionConstructor::getOwnPropertySlot): (WebCore::JSTestExceptionConstructor::getOwnPropertyDescriptor): (WebCore::JSTestExceptionPrototype::self): (WebCore::JSTestException::JSTestException): (WebCore::JSTestException::finishCreation): (WebCore::JSTestException::createPrototype): (WebCore::JSTestException::destroy): (WebCore::JSTestException::~JSTestException): (WebCore::JSTestException::getOwnPropertySlot): (WebCore::JSTestException::getOwnPropertyDescriptor): (WebCore::jsTestExceptionName): (WebCore::jsTestExceptionConstructor): (WebCore::JSTestException::getConstructor): (WebCore::isObservable): (WebCore::JSTestExceptionOwner::isReachableFromOpaqueRoots): (WebCore::JSTestExceptionOwner::finalize): (WebCore::toJS): (WebCore::toTestException): * bindings/scripts/test/JS/JSTestException.h: Added. (WebCore): (JSTestException): (WebCore::JSTestException::create): (WebCore::JSTestException::createStructure): (WebCore::JSTestException::impl): (WebCore::JSTestException::releaseImpl): (WebCore::JSTestException::releaseImplIfNotNull): (JSTestExceptionOwner): (WebCore::wrapperOwner): (WebCore::wrapperContext): (JSTestExceptionPrototype): (WebCore::JSTestExceptionPrototype::create): (WebCore::JSTestExceptionPrototype::createStructure): (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype): (JSTestExceptionConstructor): (WebCore::JSTestExceptionConstructor::create): (WebCore::JSTestExceptionConstructor::createStructure): * bindings/scripts/test/ObjC/DOMTestException.h: Added. * bindings/scripts/test/ObjC/DOMTestException.mm: Added. (-[DOMTestException dealloc]): (-[DOMTestException finalize]): (-[DOMTestException name]): (core): (kit): * bindings/scripts/test/ObjC/DOMTestExceptionInternal.h: Added. (WebCore): * bindings/scripts/test/TestException.idl: Copied from Source/WebCore/xml/XPathException.idl. * bindings/scripts/test/V8/V8TestException.cpp: Added. (WebCore): (TestExceptionV8Internal): (WebCore::TestExceptionV8Internal::V8_USE): (WebCore::TestExceptionV8Internal::nameAttrGetter): (WebCore::ConfigureV8TestExceptionTemplate): (WebCore::V8TestException::GetRawTemplate): (WebCore::V8TestException::GetTemplate): (WebCore::V8TestException::HasInstance): (WebCore::V8TestException::wrapSlow): (WebCore::V8TestException::derefObject): * bindings/scripts/test/V8/V8TestException.h: Added. (WebCore): (V8TestException): (WebCore::V8TestException::toNative): (WebCore::V8TestException::wrap): (WebCore::toV8): * dom/DOMCoreException.idl: * dom/EventException.idl: * dom/RangeException.idl: * fileapi/FileException.idl: * fileapi/OperationNotAllowedException.idl: * svg/SVGException.idl: * xml/XMLHttpRequestException.idl: * xml/XPathException.idl: 2012-05-04 Rafael Weinstein V8RecursionScope not declared in V8Proxy::newInstance which causes ASSERT() failure from NPAPI https://bugs.webkit.org/show_bug.cgi?id=85659 Reviewed by Ojan Vafai. Added a stack-allocted V8RecursionScope to the newInstance call. No new tests. No change in observable behavior. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::newInstance): 2012-05-04 Joshua Bell IndexedDB: Remove all index metadata records when deleting an index https://bugs.webkit.org/show_bug.cgi?id=85557 Reviewed by Tony Chang. An assert is hit when re-loading database from backing store due to stale index metadata entry. Do a range delete to clear all metadata entries when deleting an index. Define metadata entries as enum and limits as consts instead of hardcoded ints. No new tests - issue does not repro as layout test. Will land test in Chromium. * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::getBool): Helper functions; replaces pattern of putInt()/read only lead byte. (WebCore): (WebCore::putBool): (WebCore::IDBLevelDBBackingStore::getObjectStores): Skip stale data. Use enums, helpers. (WebCore::IDBLevelDBBackingStore::createObjectStore): Use enums. (WebCore::IDBLevelDBBackingStore::deleteObjectStore): Use enums. (WebCore::getNewVersionNumber): Use enums. (WebCore::IDBLevelDBBackingStore::getIndexes): Skip stale data. Use enums, helpers. (WebCore::getNewIndexId): Use enums. (WebCore::IDBLevelDBBackingStore::createIndex): Use enums. (WebCore::IDBLevelDBBackingStore::deleteIndex): Delete metadata by range. * Modules/indexeddb/IDBLevelDBCoding.cpp: (IDBLevelDBCoding): Add constants for metadata maximum values. (WebCore::IDBLevelDBCoding::encodeBool): (WebCore::IDBLevelDBCoding::decodeBool): (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey): Use consts. (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey): Use consts. * Modules/indexeddb/IDBLevelDBCoding.h: (IDBLevelDBCoding): Expose enums for metadata types. 2012-05-04 Anders Carlsson Move markPagesForFullStyleRecalc to PageCache https://bugs.webkit.org/show_bug.cgi?id=85664 Reviewed by Dan Bernstein. Instead of going through all the history items in the back/forward list looking for cached pages, just iterate over the cached pages in the page. * history/BackForwardController.cpp: * history/BackForwardController.h: * history/HistoryItem.cpp: * history/HistoryItem.h: * history/PageCache.cpp: (WebCore::PageCache::markPagesForFullStyleRecalc): (WebCore): * history/PageCache.h: (PageCache): * page/Frame.cpp: (WebCore::Frame::setPageAndTextZoomFactors): * page/Page.cpp: (WebCore::Page::setDeviceScaleFactor): (WebCore::Page::setPagination): 2012-05-04 Tony Chang The computed style of flex-item-align should never be auto. https://bugs.webkit.org/show_bug.cgi?id=85656 Reviewed by Ojan Vafai. If the node lacks a parent and flex-item-align is auto, we should return stretch. This was recently clarified in the spec. New testcase in css3/flexbox/css-properties.html. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-05-04 Christophe Dumez [soup] URL of the ResourceResponse passed to willSendRequest is incorrect https://bugs.webkit.org/show_bug.cgi?id=85072 Reviewed by Gustavo Noronha Silva. Store the response message by catching the "got-headers" signal so that it can be passed later to willSendRequest() in case of redirection. This is required because the SoupMessage headers and URL have already been updated once restartedCallback() is called. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore): (WebCore::gotHeadersCallback): (WebCore::restartedCallback): (WebCore::sendRequestCallback): (WebCore::startHTTPRequest): 2012-05-04 Ian Vollick [chromium] CCProxy's shouldn't try to draw if there is no layer renderer https://bugs.webkit.org/show_bug.cgi?id=85218 Reviewed by Adrienne Walker. * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): 2012-05-04 Rob Buis [BlackBerry] Rendering bmp file as text file when Content-Type:image/x-ms-bmp from apache web server. https://bugs.webkit.org/show_bug.cgi?id=85036 Reviewed by Antonio Gomes. Move getNormalizedMIMEType from WebKit into MIMETypeRegistry. This way we support uncommon mime types like image/pjpeg and image/x-ms-bmp out of the box since we map to the more common image/jpeg and image/bmp respectively. * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes): (WebCore::MIMETypeRegistry::isSupportedImageMIMEType): (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType): (WebCore): (WebCore::mimeTypeAssociationMap): (WebCore::MIMETypeRegistry::getNormalizedMIMEType): * platform/MIMETypeRegistry.h: (MIMETypeRegistry): 2012-05-04 Sami Kyostila [chromium] Revert compositor layer scrolling https://bugs.webkit.org/show_bug.cgi?id=85644 Reviewed by Steve Block. This patch reverts the following commits because they were found to trigger crashes. See discussion at http://code.google.com/p/chromium/issues/detail?id=124393. [chromium] Allow scrolling non-root layers in the compositor thread http://trac.webkit.org/changeset/114651 [chromium] Don't crash when scrolling empty layer tree http://trac.webkit.org/changeset/114761 [chromium] Don't keep pointers to released layer tree http://trac.webkit.org/changeset/115080 * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerChromium): * platform/graphics/chromium/GraphicsLayerChromium.h: (GraphicsLayerChromium): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/cc/CCLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::applyScrollAndScale): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: (CCLayerTreeHostCommon): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::contentSize): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore::findScrollLayer): (WebCore::CCLayerTreeHostImpl::setRootLayer): (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits): (WebCore): (WebCore::CCLayerTreeHostImpl::adjustScrollsForPageScaleChange): (WebCore::CCLayerTreeHostImpl::setPageScaleDelta): (WebCore::CCLayerTreeHostImpl::applyPageScaleDeltaToScrollLayer): (WebCore::CCLayerTreeHostImpl::updateMaxScrollPosition): (WebCore::CCLayerTreeHostImpl::scrollBegin): (WebCore::CCLayerTreeHostImpl::scrollBy): (WebCore::CCLayerTreeHostImpl::scrollEnd): (WebCore::CCLayerTreeHostImpl::pinchGestureUpdate): (WebCore::CCLayerTreeHostImpl::computePinchZoomDeltas): (WebCore::CCLayerTreeHostImpl::makeScrollAndScaleSet): (WebCore::CCLayerTreeHostImpl::processScrollDeltas): (WebCore::CCLayerTreeHostImpl::animatePageScale): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::releaseRootLayer): (WebCore::CCLayerTreeHostImpl::scrollLayer): (CCLayerTreeHostImpl): 2012-05-04 Ojan Vafai Remove file that was deleted in http://trac.webkit.org/changeset/116085/. For some reason, this was breaking the chromium build (probably a gyp bug since chromium shouldn't be pulling in this file). * WebCore.gypi: 2012-05-04 Tony Chang fix bit packing in FillLayer on Windows https://bugs.webkit.org/show_bug.cgi?id=85636 Reviewed by Ryosuke Niwa. Use unsigned for all bit packed types. I manually verified that the current uses of these member variables always assign true or false. No new tests, adding a compile assert to verify bit packing. * rendering/style/FillLayer.cpp: (SameSizeAsFillLayer): Added compile assert. (WebCore): (WebCore::FillLayer::FillLayer): Reorder m_sizeLength so bit packed fields are adjacent. (WebCore::FillLayer::operator=): Ditto. * rendering/style/FillLayer.h: (FillLayer): Convert bools to unsigned to match other bit packed fields. 2012-05-04 Tommy Widenflycht MediaStream API: Make PeerConnection00's API fully compliant with the draft https://bugs.webkit.org/show_bug.cgi?id=85491 Reviewed by Adam Barth. Mainly making the relevant API's use objects (aka Dictionaries) instead of the temporary strings, but also making a few API's exception aware and changing the name of a flag. Test: fast/mediastream/peerconnection-iceoptions.html * Modules/mediastream/PeerConnection00.cpp: (WebCore::PeerConnection00::createMediaHints): (WebCore::PeerConnection00::createOffer): (WebCore): (WebCore::PeerConnection00::createAnswer): (WebCore::PeerConnection00::createIceOptions): (WebCore::PeerConnection00::createDefaultIceOptions): (WebCore::PeerConnection00::startIce): (WebCore::PeerConnection00::addStream): (WebCore::PeerConnection00::changeReadyState): * Modules/mediastream/PeerConnection00.h: (WebCore): (PeerConnection00): * Modules/mediastream/PeerConnection00.idl: * platform/mediastream/chromium/PeerConnection00HandlerInternal.cpp: (WebCore::PeerConnection00HandlerInternal::startIce): 2012-05-04 David Tseng Chromium should include MenuListPopups' and MenuListOptions' within the ax tree. https://bugs.webkit.org/show_bug.cgi?id=85541 Reviewed by Chris Fleizach. Covered by existing tests. LayoutTests/accessibility/menu-list-sends-change-notification.html * accessibility/AccessibilityMockObject.h: (WebCore::AccessibilityMockObject::accessibilityIsIgnored): * accessibility/chromium/AccessibilityObjectChromium.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): 2012-05-04 Levi Weintraub Unreviewed. Fixing ChangeLog conflict markers after 116009. 2012-05-04 Dan Winship [GTK] ASSERTION FAILED: shouldLoadAsEmptyDocument(r.url()) || !defersLoading() in MainResourceLoader.cpp:382 Remove a soup_session_pause_message() call that got left behind, update the defersLoading stuff to handle this case. https://bugs.webkit.org/show_bug.cgi?id=85159 Reviewed by Martin Robinson. No new tests. Now passes loader/load-defer-resume-crash.html under debug build. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::sendRequestCallback): (WebCore::ResourceHandle::platformSetDefersLoading): 2012-05-03 Martin Robinson [GTK] Rework IME handling to fix bugs and prepare for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=84556 Reviewed by Gustavo Noronha Silva. No new tests. This change is already covered by a suite of keyboard handling unit tests in WebKitGTK+. There are some changes in behavior, but they are difficult to test without mocking out an entire GtkIMContext. Add a struct, CompositionResults, which is used by PlatformKeyboardEvent to package composition information with a keyboard event. Also add some logic to PlatformKeyboardEvent to give the right information when it has composition results. * GNUmakefile.list.am: Added new sources to the list. * platform/PlatformKeyboardEvent.h: Added a new CompositionResults member, getter, and argument to the constructor. * platform/gtk/CompositionResults.h: Added. * platform/gtk/GtkInputMethodFilter.cpp: Added. * platform/gtk/GtkInputMethodFilter.h: Added. * platform/gtk/PlatformKeyboardEventGtk.cpp: (WebCore::PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode): When the key value is void return the VK_PROCESS keycode, which is the keycode that web content expects with keystrokes that trigger composition events. (WebCore::eventTypeForGdkKeyEvent): Abstract out this helper. (WebCore::modifiersForGdkKeyEvent): Abstract out this helper. (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): When a PlatformKeyEvent has composition results, use VK_PROCESS as the keycode for this event. (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): When this event is transformed into a Char event, the PlatformKeyboardEvent used for DOM keypress events, and it has composition results clear the text members. This forces the EventHandler code to drop the keypress event. Platform events that change the composition states do not have corresponding keypress DOM events (only keydown and keyup events), so this is necessary to ensure web compatibility. 2012-05-04 Jochen Eisinger Correctly update the outgoing referrer when navigating back from an history item created by pushState/replaceState https://bugs.webkit.org/show_bug.cgi?id=85374 Reviewed by Nate Chapin. Test: http/tests/history/history-navigations-set-referrer.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadInSameDocument): 2012-05-04 Tor Arne Vestbø [Qt] Clean up and split features.prf into a static list of defaults The static list of feature defaults is used as a fallback for any feature that's not dynamically detected or overriden on the command line (though build-webkit or passing DEFINES+= to qmake). The static list is complete, which allows for auto-generation based on Features.py (see bug https://bugs.webkit.org/show_bug.cgi?id=85456) https://bugs.webkit.org/show_bug.cgi?id=85611 Reviewed by Simon Hausmann. * Target.pri: 2012-05-04 Sheriff Bot Unreviewed, rolling out r116085, r116091, and r116095. http://trac.webkit.org/changeset/116085 http://trac.webkit.org/changeset/116091 http://trac.webkit.org/changeset/116095 https://bugs.webkit.org/show_bug.cgi?id=85628 We are not ready with dependencies on all platform yet (mac) + problems with debug builds. (Requested by Zoltan on #webkit). * Target.pri: * WebCore.pri: * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes): (WebCore::initializeSupportedImageMIMETypesForEncoding): * platform/graphics/ImageSource.cpp: * platform/graphics/ImageSource.h: (WebCore): * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoder::create): (WebCore): (WebCore::ImageDecoderQt::filenameExtension): (WebCore::ImageDecoderQt::internalHandleCurrentImage): (WebCore::ImageDecoderQt::clearPointers): * platform/image-decoders/ImageDecoder.cpp: (WebCore::ImageDecoder::create): * platform/image-decoders/ImageDecoder.h: (WebCore::ImageFrame::getAddr): (ImageFrame): * platform/image-decoders/qt/ImageFrameQt.cpp: Added. (WebCore): (WebCore::ImageFrame::ImageFrame): (WebCore::ImageFrame::operator=): (WebCore::ImageFrame::clearPixelData): (WebCore::ImageFrame::zeroFillPixelData): (WebCore::ImageFrame::copyBitmapData): (WebCore::ImageFrame::setSize): (WebCore::ImageFrame::asNewNativeImage): (WebCore::ImageFrame::hasAlpha): (WebCore::ImageFrame::setHasAlpha): (WebCore::ImageFrame::setColorProfile): (WebCore::ImageFrame::setStatus): (WebCore::ImageFrame::setPixmap): (WebCore::ImageFrame::width): (WebCore::ImageFrame::height): 2012-05-04 Ilya Tikhonovsky Web Inspector: eliminate temporaryProfile property from ProfilesPanel. https://bugs.webkit.org/show_bug.cgi?id=85623 We can run different profilers at the same time therefore we have to keep temorary profile per profiler type. Reviewed by Yury Semikhatsky. * inspector/front-end/CSSSelectorProfileView.js: (WebInspector.CSSSelectorProfileType.prototype.createView): (WebInspector.CSSSelectorProfileType.prototype.createTemporaryProfile): (WebInspector.CSSSelectorProfileType.prototype.createProfile): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotProfileType.prototype.createView): (WebInspector.HeapSnapshotProfileType.prototype.createTemporaryProfile): (WebInspector.HeapSnapshotProfileType.prototype.createProfile): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileType.prototype.startRecordingProfile): (WebInspector.CPUProfileType.prototype.createView): (WebInspector.CPUProfileType.prototype.createTemporaryProfile): (WebInspector.CPUProfileType.prototype.createProfile): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileType.prototype.createSidebarTreeElementForProfile): (WebInspector.ProfileType.prototype.createTemporaryProfile): (WebInspector.ProfileType.prototype.createProfile): (WebInspector.ProfileHeader): (WebInspector.HeapProfileHeader): (WebInspector.ProfilesPanel.prototype.addProfileHeader): (WebInspector.ProfilesPanel.prototype.findTemporaryProfile): (WebInspector.ProfilesPanel.prototype._removeTemporaryProfile): (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback.var): (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback): (WebInspector.ProfilesPanel.prototype._populateProfiles): (WebInspector.ProfilesPanel.prototype.setRecordingProfile): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress): (WebInspector.ProfilerDispatcher.prototype.addProfileHeader): 2012-05-04 Ilya Tikhonovsky Web Inspector: [chromium] ScriptGCEvent should not be static. https://bugs.webkit.org/show_bug.cgi?id=80788 The static members of ScriptGCEvent were moved into per isolate data structure. Drive by fix: Sometimes the used heap size after a GC is slightly more than it was before. Reviewed by Yury Semikhatsky. * bindings/v8/ScriptGCEvent.cpp: (WebCore::ScriptGCEvent::gcPrologueCallback): (WebCore::ScriptGCEvent::gcEpilogueCallback): * bindings/v8/V8Binding.h: (WebCore::GCEventData::GCEventData): (WebCore::GCEventData::clear): (GCEventData): (WebCore): (WebCore::V8BindingPerIsolateData::gcEventData): (V8BindingPerIsolateData): 2012-05-04 Kent Hansen [Qt] Update Qt bridge after changes to QMetaMethod https://bugs.webkit.org/show_bug.cgi?id=85478 Reviewed by Tor Arne Vestbø. QMetaMethod::signature() has been renamed to methodSignature() and returns a QByteArray. The new function QMetaMethod::name() gives direct access to a method's name. returnType(), parameterCount(), and parameterType() give direct access to type information. Ported the custom QtConnectionObject meta-object to revision 7; revision 6 and below aren't supported (and don't compile) with Qt5. * Target.pri: * bridge/qt/qt_class.cpp: (JSC::Bindings::QtClass::fallbackObject): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::getPropertyNames): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::findMethodIndex): (Bindings): (qt_meta_stringdata_QtConnectionObject_t): (JSC::Bindings::QtConnectionObject::qt_static_metacall): (JSC::Bindings::QtConnectionObject::qt_metacast): (JSC::Bindings::QtConnectionObject::qt_metacall): (JSC::Bindings::QtConnectionObject::execute): * bridge/qt/qt_runtime.h: (QtConnectionObject): * bridge/qt/qt_runtime_qt4.cpp: Copied from Source/WebCore/bridge/qt/qt_runtime.cpp. (Bindings): (QWKNoDebug): (JSC::Bindings::QWKNoDebug::QWKNoDebug): (JSC::Bindings::QWKNoDebug::~QWKNoDebug): (JSC::Bindings::QWKNoDebug::operator<<): (JSC::Bindings::operator<<): (RuntimeConversion): (JSC::Bindings::registerCustomType): (JSC::Bindings::isJSUint8ClampedArray): (JSC::Bindings::valueRealType): (JSC::Bindings::convertValueToQVariantMap): (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMethod::finishCreation): (JSC::Bindings::QtRuntimeMethod::~QtRuntimeMethod): (JSC::Bindings::QtRuntimeMethod::destroy): (JSC::Bindings::QtRuntimeMethodData::~QtRuntimeMethodData): (JSC::Bindings::QtRuntimeMethodData::finalize): (JSC::Bindings::QtRuntimeMetaMethodData::~QtRuntimeMetaMethodData): (JSC::Bindings::QtRuntimeConnectionMethodData::~QtRuntimeConnectionMethodData): (QtMethodMatchType): (JSC::Bindings::QtMethodMatchType::QtMethodMatchType): (JSC::Bindings::QtMethodMatchType::kind): (JSC::Bindings::QtMethodMatchType::isValid): (JSC::Bindings::QtMethodMatchType::isVariant): (JSC::Bindings::QtMethodMatchType::isMetaType): (JSC::Bindings::QtMethodMatchType::isUnresolved): (JSC::Bindings::QtMethodMatchType::isMetaEnum): (JSC::Bindings::QtMethodMatchType::enumeratorIndex): (JSC::Bindings::QtMethodMatchType::variant): (JSC::Bindings::QtMethodMatchType::metaType): (JSC::Bindings::QtMethodMatchType::metaEnum): (JSC::Bindings::QtMethodMatchType::unresolved): (JSC::Bindings::QtMethodMatchType::typeId): (JSC::Bindings::QtMethodMatchType::name): (QtMethodMatchData): (JSC::Bindings::QtMethodMatchData::QtMethodMatchData): (JSC::Bindings::QtMethodMatchData::isValid): (JSC::Bindings::QtMethodMatchData::firstUnresolvedIndex): (JSC::Bindings::indexOfMetaEnum): (JSC::Bindings::findMethodIndex): (JSC::Bindings::findSignalIndex): (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeMetaMethod::finishCreation): (JSC::Bindings::QtRuntimeMetaMethod::visitChildren): (JSC::Bindings::QtRuntimeMetaMethod::call): (JSC::Bindings::QtRuntimeMetaMethod::getCallData): (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertySlot): (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertyDescriptor): (JSC::Bindings::QtRuntimeMetaMethod::getOwnPropertyNames): (JSC::Bindings::QtRuntimeMetaMethod::lengthGetter): (JSC::Bindings::QtRuntimeMetaMethod::connectGetter): (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): (JSC::Bindings::QtRuntimeConnectionMethod::finishCreation): (JSC::Bindings::QtRuntimeConnectionMethod::call): (JSC::Bindings::QtRuntimeConnectionMethod::getCallData): (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertySlot): (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertyDescriptor): (JSC::Bindings::QtRuntimeConnectionMethod::getOwnPropertyNames): (JSC::Bindings::QtRuntimeConnectionMethod::lengthGetter): (JSC::Bindings::QtConnectionObject::QtConnectionObject): (JSC::Bindings::QtConnectionObject::~QtConnectionObject): (JSC::Bindings::QtConnectionObject::metaObject): (JSC::Bindings::QtConnectionObject::qt_metacast): (JSC::Bindings::QtConnectionObject::qt_metacall): (JSC::Bindings::isJavaScriptFunction): (JSC::Bindings::QtConnectionObject::execute): (JSC::Bindings::QtConnectionObject::match): (JSC::Bindings::QtConnectionObject::createWithInternalJSC): (JSC::Bindings::::QtArray): (JSC::Bindings::::~QtArray): (JSC::Bindings::::rootObject): (JSC::Bindings::::setValueAt): (JSC::Bindings::::valueAt): 2012-05-04 Yury Semikhatsky Web Inspector: use single method for retrieving evaluation context in the runtime agent https://bugs.webkit.org/show_bug.cgi?id=85621 Reviewed by Pavel Feldman. Merged two script state retrieval methods into one. Moved Page specific logic into PageRuntimeAgent. * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): * inspector/InspectorRuntimeAgent.h: (InspectorRuntimeAgent): * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::scriptStateForEval): * inspector/PageRuntimeAgent.h: (PageRuntimeAgent): * inspector/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::scriptStateForEval): * inspector/WorkerRuntimeAgent.h: (WorkerRuntimeAgent): 2012-05-04 Jochen Eisinger Unreviewed, rolling out r115549. http://trac.webkit.org/changeset/115549 https://bugs.webkit.org/show_bug.cgi?id=83894 The newly added CRASH() statements are triggered too often * loader/FrameLoader.cpp: (WebCore::FrameLoader::init): (WebCore::FrameLoader::setupForReplace): (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::clearProvisionalLoad): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): 2012-05-04 Zoltan Horvath [Qt] Error message fix after r116091 https://bugs.webkit.org/show_bug.cgi?id=85614 Reviewed by Alexis Menard. No new tests : error message fix. * WebCore.pri: 2012-05-04 Alexis Menard [Qt] Build fix when using libpng version > 1.2. https://bugs.webkit.org/show_bug.cgi?id=85614 Reviewed by Tor Arne Vestbø. Don't enforce the version of libpng when passing the option to the linker. No new tests : build fix. * WebCore.pri: 2012-05-04 Simon Hausmann [Qt] Images are scaled badly in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=85610 Reviewed by Jocelyn Turcotte. Enable smooth pixmap transforms when rendering into the GraphicsSurface image. This class is only used in WK2. * platform/graphics/surfaces/qt/GraphicsSurfaceQt.cpp: (WebCore::GraphicsSurface::platformBeginPaint): 2012-05-04 Zoltan Horvath [Qt] Remove unnecessary executeable bits after r116085 No new tests. * Target.pri: * WebCore.pri: * platform/graphics/ImageSource.cpp: * platform/graphics/ImageSource.h: * platform/graphics/qt/ImageDecoderQt.cpp: * platform/graphics/qt/ImageDecoderQt.h: * platform/image-decoders/ImageDecoder.cpp: * platform/image-decoders/ImageDecoder.h: 2012-05-04 Zoltan Horvath [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder https://bugs.webkit.org/show_bug.cgi?id=80400 This change modifies the default ImageDecoder for Qt-port from QImageDecoder to WebCore ImageDecoder. The new behavior is to use QImageDecoder only if WebCoreImageDecoder doesn't support the requested image type. The WTF_USE_QT_IMAGE_DECODER macro has been removed, since it is no longer needed. This change adds build depedency for libpng-dev and libjpeg-dev packages, becuase PNG and JPEG imagedecoders need not only these libraries, but their headers also. Qmake-config tests for these libraries were introduced in r110045. Reviewed by Simon Hausmann. No new tests needed. * Target.pri: Move WebCore ImageDecoder files out of guards. Remove ImageFrameQt.cpp from sources. * WebCore.pri: Move WebCore ImageDecoder include paths out of guards. * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes): Add WebCore supported and Qt supported MIME types. (WebCore::initializeSupportedImageMIMETypesForEncoding): Use Qt supported MIME types. * platform/graphics/ImageSource.cpp: Remove unnecessary includes. * platform/graphics/ImageSource.h: Remove unnecessary typedefs. (WebCore): * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::filenameExtension): Remove unnecessary semicolon. (WebCore::ImageDecoderQt::internalHandleCurrentImage): Use QImage and ImageFrame instead of QPixmap. (WebCore): (WebCore::ImageFrame::asNewNativeImage): Moved here from removed ImageFrameQt.cpp. * platform/image-decoders/ImageDecoder.cpp: Reorganize the includes of the header. (WebCore::ImageDecoder::create): Add platform macro guarded fallback case for QImageDecoder. * platform/image-decoders/ImageDecoder.h: Remove Qt-specific codes. (WebCore::ImageFrame::getAddr): Remove Qt-specific case, since it is no longer needed. (ImageFrame): * platform/image-decoders/qt/ImageFrameQt.cpp: Removed. Dead code, other code has been moved to ImageDecoderQt.cpp. 2012-05-03 Ilya Tikhonovsky Web Inspector: createRawLocationByURL is too slow if a big number of evals happen. https://bugs.webkit.org/show_bug.cgi?id=85477 It iterates through all the _scripts even they have no url. We can keep a separate map of scripts with url. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel): (WebInspector.DebuggerModel.prototype._globalObjectCleared): (WebInspector.DebuggerModel.prototype._resetScriptsMap): (WebInspector.DebuggerModel.prototype._parsedScriptSource): (WebInspector.DebuggerModel.prototype.createRawLocationByURL): 2012-05-03 David Barr Antialias single-edge solid borders https://bugs.webkit.org/show_bug.cgi?id=85031 Reviewed by Simon Fraser. Antialiasing is avoided for adjacent edges due to artifacts at the seam. There are no such artifacts for single-edge borders so enable antialiasing. Test: fast/css/border-solid-single-edge-antialias.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBorder): 2012-05-03 Adam Barth CSP: Eval isn't blocked in about:blank subframes https://bugs.webkit.org/show_bug.cgi?id=85553 Reviewed by Eric Seidel. ContentSecurityPolicy has a back pointer to ScriptExecutionContext. That means we shouldn't share a single ContentSecurityPolicy object between multiple ScriptExecutionContexts. This patch copies the state from one ScriptExecutionContext to another rather than sharing the ContentSecurityPolicy object itself. This resulted in a subtle but w.r.t. blocking eval. Because we block eval by setting a bit in the JavaScript engine when enforcing the policy, that bit wasn't copied along with the rest of the state when we were sharing the ContentSecurityPolicy object. Now that we use the more robust ContentSecurityPolicy::copyStateFrom function, we don't have that bug. Test: http/tests/security/contentSecurityPolicy/eval-blocked-in-about-blank-iframe.html * dom/Document.cpp: (WebCore::Document::initSecurityContext): (WebCore): (WebCore::Document::initContentSecurityPolicy): * dom/Document.h: (Document): * dom/SecurityContext.cpp: (WebCore::SecurityContext::setContentSecurityPolicy): * dom/SecurityContext.h: (SecurityContext): * loader/FrameLoader.cpp: (WebCore::FrameLoader::didBeginDocument): * page/ContentSecurityPolicy.h: (WebCore::ContentSecurityPolicy::create): 2012-05-03 Abhishek Arya Regression(r113769): Crash in AudioNodeOutput::disconnectAllParams. https://bugs.webkit.org/show_bug.cgi?id=85196 Reviewed by Chris Rogers. RefPtr the AudioParam hashset in AudioNodeOutput to prevent accessing destroyed entries. No new tests. Unable to reproduce it in DRT. * Modules/webaudio/AudioNodeOutput.cpp: (WebCore::AudioNodeOutput::disconnectAllParams): * Modules/webaudio/AudioNodeOutput.h: (AudioNodeOutput): 2012-05-03 Noel Gordon PNGImageDecoder: Clean up rowAvailable() some more https://bugs.webkit.org/show_bug.cgi?id=85464 Reviewed by Eric Seidel. No new tests. Covered by existing tests: fast/images/png-extra-row-crash.html in particular. * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::rowAvailable): Use colorChannels consistently. Split the useful libpng comments in two, then place the early-out code and conditions inbetween. The png variable is only used in one place so move it there. 2012-05-03 Ojan Vafai Histogram total allocated bytes in the arena in addition to the render tree size https://bugs.webkit.org/show_bug.cgi?id=85537 Reviewed by Eric Seidel. We only free bytes allocated to a RenderArena when destroying the Document. Histogram both the render tree size and the total bytes allocated. This gives a better sense of the overhead of RenderArena as well as giving a more accurate number for the amount of actual memory used by the render tree. No new tests. This is not webfacing, so this can't be tested without adding API to layout test controller, which doesn't seem worth it for this code. * page/Page.cpp: (WebCore::Page::renderTreeSize): (WebCore::Page::setVisibilityState): * page/Page.h: (Page): * platform/Arena.cpp: (WebCore::ArenaAllocate): * platform/Arena.h: (WebCore): * rendering/RenderArena.cpp: (WebCore::RenderArena::allocate): * rendering/RenderArena.h: (WebCore::RenderArena::totalRenderArenaAllocatedBytes): (RenderArena): 2012-05-03 Mary Wu [BlackBerry] Add missed member in CrossThreadResourceRequestData https://bugs.webkit.org/show_bug.cgi?id=85448 Reviewed by Antonio Gomes. * platform/network/blackberry/ResourceRequest.h: (CrossThreadResourceRequestData): * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::ResourceRequest::doPlatformCopyData): (WebCore::ResourceRequest::doPlatformAdopt): 2012-05-03 Adam Barth CSP shouldn't block about:blank for iframes https://bugs.webkit.org/show_bug.cgi?id=85233 Reviewed by Eric Seidel. As discussed at the W3C WebAppSec face-to-face meeting, there's no point in blocking about:blank iframes or objects because blocking a frame or object just results in displaying about:blank anyway. This patch just removes the spurious console message and violation report. Test: http/tests/security/contentSecurityPolicy/frame-src-about-blank-allowed-by-default.html * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::allowObjectFromSource): (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): 2012-05-03 Sheriff Bot Unreviewed, rolling out r116040. http://trac.webkit.org/changeset/116040 https://bugs.webkit.org/show_bug.cgi?id=85559 Broke a few IndexedDB browsertests (Requested by zhenyao on #webkit). * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::direction): * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::transaction): (WebCore): * Modules/indexeddb/IDBDatabase.h: * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.h: (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.idl: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): * Modules/indexeddb/IDBObjectStore.h: (WebCore::IDBObjectStore::openCursor): (IDBObjectStore): * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::readyState): (WebCore::IDBRequest::markEarlyDeath): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::finishCursor): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::stop): * Modules/indexeddb/IDBRequest.h: * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::mode): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: 2012-05-03 Raphael Kubo da Costa [CMake] Rewrite FindCairo.cmake. https://bugs.webkit.org/show_bug.cgi?id=84895 Reviewed by Daniel Bates. The old approach relied on pkg-config for finding Cairo (which introduced a dependency on pkg-config that could be avoided), used the LibFindMacros code that we should probably remove in the future and did not use the FindPackageHandleStandardArguments module. Change all that by rewriting the module. - Use the pkg-config output optionally instead of requiring it like LibFindMacros did. - Remove the implicit dependency on FreeType which often found it the wrong way via pkg-config and without considering CMAKE_PREFIX_PATH. - Retrieve the Cairo version by looking at cairo-version.h instead of relying on pkg-config. It requires some additional code for checking if the desired version has been found, but that will not be needed once we start depending on CMake 2.8.3 or later. The only downside is that FPHSA sets _FOUND instead of _FOUND, and to keep things consistent Cairo_LIBRARIES and Cairo_INCLUDE_DIRS have become CAIRO_LIBRARIES and CAIRO_INCLUDE_DIRS. No new tests, build system change. * PlatformEfl.cmake: Use CAIRO_FOO instead of Cairo_FOO. 2012-05-03 Anders Carlsson Focus ring only appears in top-left tile https://bugs.webkit.org/show_bug.cgi?id=85556 Reviewed by Simon Fraser. It is sufficient to just apply the current CTM to the clip rect and set that as the focus ring clip rect. * platform/graphics/mac/WebLayer.mm: (drawLayerContents): 2012-05-03 Alec Flett IndexedDB: Replace numeric constants with strings https://bugs.webkit.org/show_bug.cgi?id=84894 Reviewed by Tony Chang. Test: storage/indexeddb/legacy-constants.html Update IDBObjectStore.openCursor, IDBIndex.openCursor, IDBIndex.openKeyCursor, IDBDatabase.transaction, IDBCursor.direction, IDBTransaction.mode, and IDBRequest.readyState to meet the latest spec. All of these APIs now support string-based values in addition to the legacy/deprecated enum-based values. * Modules/indexeddb/IDBCursor.cpp: (WebCore): (WebCore::IDBCursor::direction): (WebCore::IDBCursor::stringToDirection): (WebCore::IDBCursor::directionToString): * Modules/indexeddb/IDBCursor.h: (IDBCursor): * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::transaction): (WebCore): * Modules/indexeddb/IDBDatabase.h: (IDBDatabase): * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.h: (WebCore::IDBIndex::openCursor): (IDBIndex): (WebCore::IDBIndex::openKeyCursor): * Modules/indexeddb/IDBIndex.idl: * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): (WebCore): * Modules/indexeddb/IDBObjectStore.h: (WebCore::IDBObjectStore::openCursor): (IDBObjectStore): * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::readyState): (WebCore::IDBRequest::markEarlyDeath): (WebCore::IDBRequest::resetReadyState): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::finishCursor): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::stop): * Modules/indexeddb/IDBRequest.h: * Modules/indexeddb/IDBRequest.idl: * Modules/indexeddb/IDBTransaction.cpp: (WebCore): (WebCore::IDBTransaction::mode): (WebCore::IDBTransaction::stringToMode): (WebCore::IDBTransaction::modeToString): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): * Modules/indexeddb/IDBTransaction.idl: 2012-05-03 Sam Weinig Add an eventPhase NONE constant https://bugs.webkit.org/show_bug.cgi?id=85397 Reviewed by Anders Carlsson. Updates existing tests. * dom/Event.h: * dom/Event.idl: Add NONE constant. 2012-05-03 Tony Chang Height overflow when nesting multiple new Flexbox'es. https://bugs.webkit.org/show_bug.cgi?id=83572 Reviewed by Ojan Vafai. Test: css3/flexbox/nested-stretch.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): 2012-05-03 Julien Chaffraix ASSERT(!m_zOrderListsDirty) is triggering in Safari https://bugs.webkit.org/show_bug.cgi?id=85512 Reviewed by Simon Fraser. Unfortunately no test as I don't think the 2 cases are testable reliably. A better fix would be to introduce some iterator that handle updating the lists for you. For now, just adding the missing updateLayerListsIfNeeded() calls. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerHas3DContent): 2012-05-03 Philip Rogers Fix numeric precision issue in SVG animations https://bugs.webkit.org/show_bug.cgi?id=85502 Reviewed by Dirk Schulze. r93938 had a bug where floating point numbers where compared exactly, exposing a bug when floating point precision was not sufficient. This change compares against an epsilon value to get around these precision issues. Test: svg/animations/animate-end-attribute-numeric-precision.html * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat): 2012-05-03 Joshua Bell Fix coding style issues in IDBLevelDBCoding.cpp https://bugs.webkit.org/show_bug.cgi?id=85536 Reviewed by Tony Chang. No tests - just code formatting changes. * Modules/indexeddb/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::encodeIDBKey): (WebCore::IDBLevelDBCoding::decodeIDBKey): (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): 2012-04-30 Filip Pizlo PageCache autorelease should not wait until 3 seconds and 42 pages https://bugs.webkit.org/show_bug.cgi?id=85254 Reviewed by Geoffrey Garen. No new tests, since there is no change in behavior. * history/PageCache.cpp: (WebCore): (WebCore::PageCache::PageCache): (WebCore::PageCache::releaseAutoreleasedPagesNowDueToTimer): * history/PageCache.h: (PageCache): 2012-05-03 Levi Weintraub Unreviewed build fix for Mac WK2. Adding a mistakenly removed symbol back to WebCore.exp.in. * WebCore.exp.in: 2012-05-03 Levi Weintraub Unreviewed build fix for Qt after 116009. No changes in behavior. * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): 2012-05-03 W. James MacLean [chromium] Revise touchpad fling curve to use exponential curve, to improve feel and small fling performance. https://bugs.webkit.org/show_bug.cgi?id=85530 Reviewed by Kenneth Russell. Existing unit tests updated for new curve. Modifies TouchpadFLingGestureCurve to use an exponential, rather than polynomial, curve. This change appears to improve the overall feel of touchpad fling, and substantially improves small-fling performance. * platform/TouchpadFlingPlatformGestureCurve.cpp: (WebCore::TouchpadFlingPlatformGestureCurve::create): (WebCore): (WebCore::position): (WebCore::velocity): (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve): 2012-04-23 Levi Weintraub and Emil A Eklund [meta] Switch away from integers representing pixels for layout/event handling/rendering https://bugs.webkit.org/show_bug.cgi?id=60318 Reviewed by Eric Seidel. Swapping the LayoutUnit backend to FractionalLayoutUnit from int. FractionalLayoutUnit is a new type that uses an integer to represent a fraction of a pixel. We're also adding a feature flag -- ENABLE_SUBPIXEL_LAYOUT -- that toggles this fraction between 1/1 and 1/60. Initially, all platforms will default to subpixel layout being off, so FractionalLayoutUnits will effectively continue to act as integers. With ENABLE_SUBPIXEL_LAYOUT turned on, FractionalLayoutUnits accumulate error from sub-pixel CSS values and applied zooming, and painting uses pixel-snapping to align these values to pixels. See http://trac.webkit.org/wiki/LayoutUnit for details. In a number of previous patches, LayoutUnits were plumbed throughout the rendering tree to prepare for this change. This included a number of functions in LayoutTypes.h and the IntRect/Point/Size classes that were effectively no-ops while LayoutUnits were integers. Subsequent patches will remove unnecessary versions of these functions; see http://webkit.org/b/84616 for tracking these changes. Tests: fast/sub-pixel/client-width-height-snapping.html fast/sub-pixel/layout-boxes-with-zoom.html fast/sub-pixel/size-of-box-with-zoom.html * WebCore.exp.in: Updating function signatures that expose FractionalLayoutUnits. * WebCore.xcodeproj/project.pbxproj: Adding missing FractionalLayoutPoint.h header. * css/CSSComputedStyleDeclaration.cpp: (WebCore::zoomAdjustedPixelValue): Using adjustFloatForAbsoluteZoom instead of int to make use of extra precision before returning the pixel value. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): No longer rounds for imprecise conversion when sub-pixel layout is enabled. (WebCore::CSSPrimitiveValue::customCssText): Returning integer values for pixels. * dom/Element.cpp: (WebCore::adjustForLocalZoom): Using rounding instead of incrementing the value before adjusting to account for truncation when sub-pixel layout is enabled. * page/SpatialNavigation.cpp: (WebCore::distanceDataForNode): Using FractionalLayoutUnit::abs instead of std::abs. * platform/FractionalLayoutUnit.h: Adding some missing operators and a flag around the constant denominator to switch it between 1/1 and 1/60 depending on the feature flag. * platform/Length.h: Changing the default type for value to float, and adding intValue since this more closely matches usage in a sub-pixel layout world. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::paint): Using minimumIntValueForLength in this platform code instead of LayoutUnits. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): * rendering/LayoutTypes.h: This file contains the actual switch for changing LayoutUnits to be FractionalLayoutUnits. Also updating stub methods with their proper implementations. * rendering/PaintInfo.h: (WebCore::PaintInfo::infiniteRect): Ensuring the infiniteRect doesn't overflow the FractionalLayoutUnit bounds. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine): Switch to FractionalLayoutUnit's abs function instead of std::abs. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Add rounding for setting the phase of the background geometry before applying modulo from the tile size. * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): Stop applying flex when we have less than a pixel to distribute. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::backgroundClipRect): Replace PaintInfo::infiniteRect with the LayoutRect equivalent. * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::rangeIntersectsRect): Using FractionalLayoutUnit::abs instead of std::abs. * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Ditto. * rendering/RenderObject.h: (WebCore): Removing unnecessary adjustForAbsoluteZoom function. (WebCore::RenderObject::outlineSize): Outlines remain ints. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::styleOrColLogicalWidth): Build fix. Using floats because colWidthSum is a Length which uses floats. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): Explicit templatization for max. * rendering/RenderTreeAsText.cpp: Adding code to minimize test expectation churn. It may be worth outputting float values in test expectations, but this isn't done with the inline box tree yet, either. * rendering/RenderTreeAsText.h: (WebCore): Adding a FractionalLayoutPoint operator. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::updateWidgetGeometry): Adding missing pixel snapping, and switching absoluteContentBox to an IntRect, as this is what boundingBox returns. * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writePositionAndStyle): Adding an enclosingIntRect for consistency with old results. 2012-05-03 Levi Weintraub and Emil A Eklund [meta] Switch away from integers representing pixels for layout/event handling/rendering https://bugs.webkit.org/show_bug.cgi?id=60318 Reviewed by Eric Seidel. Swapping the LayoutUnit backend to FractionalLayoutUnit from int. FractionalLayoutUnit is a new type that uses an integer that can represent a fraction of a pixel. The ENABLE_SUBPIXEL_LAYOUT feature flags toggles this fraction between 1/1 and 1/60. Initially, all platforms will default to subpixel layout being off, so FractionalLayoutUnits will effectively continue to act as integers. With ENABLE_SUBPIXEL_LAYOUT turned on, FractionalLayoutUnits accumulate error from sub-pixel CSS values and applied zooming, and painting uses pixel-snapping to align these values to pixels and prevent unwanted anti-aliasing. See http://trac.webkit.org/wiki/LayoutUnit for details. In a number of previous patches, LayoutUnits were plumbed throughout the rendering tree to prepare for this change. This included a number of functions in LayoutTypes.h and the IntRect/Point/Size classes that were effectively no-ops while LayoutUnits were integers. See http://webkit.org/b/60318 for the exhaustive list of changes that were done in preparation for this. Subsequent patches will remove unnecessary versions of these functions. http://webkit.org/b/84616 tracks these changes. Tests: fast/sub-pixel/client-width-height-snapping.html fast/sub-pixel/layout-boxes-with-zoom.html fast/sub-pixel/size-of-box-with-zoom.html * WebCore.exp.in: Updating function signatures that expose FractionalLayoutUnits. * WebCore.order: Ditto. * WebCore.xcodeproj/project.pbxproj: Adding missing FractionalLayoutPoint.h header. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): No longer rounds for imprecise conversion when sub-pixel layout is enabled. * dom/Element.cpp: (WebCore::adjustForLocalZoom): Using rounding instead of incrementing the value before adjusting to account for truncation when sub-pixel layout is enabled. * rendering/mathml/RenderMathMLBlock.cpp: (WebCore): Fixing a static initializer build error by moving an integer constant to be an int. * rendering/LayoutTypes.h: This file contains the actual switch for changing LayoutUnits to be FractionalLayoutUnits. Also updating stub methods with their proper implementations. * rendering/PaintInfo.h: (WebCore::PaintInfo::infiniteRect): Ensuring the infiniteRect doesn't overflow the FractionalLayoutUnit bounds. LayoutRect::infiniteRect() is the largest rectangle that can be represented using LayoutUnits. * rendering/RenderLayer.h: (WebCore::ClipRect::operator!=): Add overload of != to fix complaining compilers when * rendering/RenderTreeAsText.cpp: Adding code to minimize test expectation churn. It may be worth outputting float values in test expectations, but this isn't done with the inline box tree yet, either. * rendering/RenderTreeAsText.h: (WebCore): Adding a FractionalLayoutPoint operator. * rendering/svg/SVGRenderTreeAsText.cpp: (WebCore::writePositionAndStyle): (WebCore): Adding a FractionalLayoutPoint operator. 2012-05-03 Anders Carlsson Move repaint counter drawing code out into a separate function https://bugs.webkit.org/show_bug.cgi?id=85539 Reviewed by Simon Fraser. The majority of code in TileCache::drawLayer deals with drawing the repaint counter. Move this code out into a separate function to make it more clear what drawLayer does. * platform/graphics/ca/mac/TileCache.h: (TileCache): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::drawLayer): (WebCore::TileCache::drawRepaintCounter): (WebCore): 2012-05-03 Simon Fraser Compositing 'requiresOwnBackingStore' logic caused new clip rect assertions https://bugs.webkit.org/show_bug.cgi?id=85455 Reviewed by Dean Jackson. r114283 added logic that allows compositing layers to avoid allocating their own backing store and to paint into an ancestor instead. However, that caused assertions in RenderLayer::updateClipRects() about m_clipRectsRoot being incorrect, because clip rect code assumed that compositing layers always painted themselves. Fixed by calling paintsIntoCompositedAncestor() in RenderLayer::clippingRoot(), so that clip rect computation matches painting. I wasn't able to easily make a test that reproduces the assertion in DRT. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::clippingRoot): 2012-05-03 Tim Horton REGRESSION(99539): SVG disregards page scale and device scale https://bugs.webkit.org/show_bug.cgi?id=77237 Reviewed by Simon Fraser. Rename SVGImageCache::SizeAndZoom to SVGImageCache::SizeAndScales, as it carries more than just zoom now. Pass the product of the device and page scales through everything that takes a SVGImageCache::SizeAndScales, using it to inflate the size of the buffer created in lookupOrCreateBitmapImageForRenderer, and to inflate the destination rectangle passed to SVGImage::draw, which will cause a transformation on the context being drawn into. Invalidate the SVGImageCache entry on device/page scale changes in addition to zoom changes. This patch does not cause SVGImageCache to take into account scale caused by CSS transforms; that is tracked separately by https://bugs.webkit.org/show_bug.cgi?id=85335. Tests: svg/as-image/image-respects-deviceScaleFactor.html svg/as-image/image-respects-pageScaleFactor.html * loader/cache/CachedImage.cpp: (WebCore::CachedImage::setContainerSizeForRenderer): (WebCore::CachedImage::imageSizeForRenderer): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawSVGToImageBuffer): * svg/graphics/SVGImage.h: * svg/graphics/SVGImageCache.cpp: (WebCore::SVGImageCache::~SVGImageCache): (WebCore::SVGImageCache::removeRendererFromCache): (WebCore::SVGImageCache::setRequestedSizeAndScales): (WebCore::SVGImageCache::requestedSizeAndScales): (WebCore::SVGImageCache::redraw): (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer): * svg/graphics/SVGImageCache.h: (WebCore::SVGImageCache::SizeAndScales::SizeAndScales): (SizeAndScales): (SVGImageCache): (WebCore::SVGImageCache::ImageData::ImageData): (ImageData): 2012-05-03 Fady Samuel Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport https://bugs.webkit.org/show_bug.cgi?id=70609 Reviewed by Kenneth Rohde Christiansen. Make Viewport Attributes' layoutSize be a FloatRect to avoid rounding too early, and the occasional off by one fixed layout dimensions. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): * dom/ViewportArguments.h: (ViewportAttributes): 2012-05-03 Joshua Bell IndexedDB: Handle generated keys up to 2^53 https://bugs.webkit.org/show_bug.cgi?id=85114 The spec defines the behavior for generated keys up to 2^53 (the maximum integer storable as an ECMAScript number) and the error case when going beyond that. Ensure that we can handle values up to that point and generate errors beyond. Reviewed by Tony Chang. Test: storage/indexeddb/key-generator.html * Modules/indexeddb/IDBBackingStore.h: (IDBBackingStore): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber): * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-05-03 Simon Fraser Remove RenderLayerCompositor::didStartAcceleratedAnimation() https://bugs.webkit.org/show_bug.cgi?id=85514 Reviewed by Antti Koivisto. Remove RenderLayerCompositor::didStartAcceleratedAnimation(), which is no longer needed. Code removal, no new tests. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): * rendering/RenderLayerCompositor.cpp: * rendering/RenderLayerCompositor.h: 2012-05-03 Andreas Kling REGRESSION(r111387): CSSOM representation of 'background-image' values should be CSSPrimitiveValue. Reviewed by Antti Koivisto. Use the cloneForCSSOM() mechanism in CSSValue to expose CSSImageValue to bindings as a URI primitive value. This matches the specced behavior of computed image values, and restores our previous behavior without having CSSImageValue subclass CSSPrimitiveValue. Also added a failsafe return after the isCSSOMSafe() assertion in the JSC bindings, since it's better to expose an incorrect return value than an insecurely shared one, should we have or add bugs in this code. * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJS): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cloneForCSSOM): * css/CSSImageValue.h: * css/CSSValue.cpp: (WebCore::CSSValue::cloneForCSSOM): 2012-05-03 Keishi Hattori Crash in HTMLFormControlElement::m_fieldSetAncestor https://bugs.webkit.org/show_bug.cgi?id=85453 Reviewed by Kent Tamura. Modified tests: fast/forms/datalist/datalist-child-validation.html fast/forms/form-control-element-crash.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFrom): Only set the invalid ancestor flag. The element will be detached from the document so there is no need to update the style. And the validation message will be hidden by the blur event. (WebCore::HTMLFormControlElement::willValidate): Because of the change to removedFrom, m_ancestorsValid may be false. 2012-05-03 Simon Fraser Keep overlap testing for compositing on pages with 3d transforms when possible https://bugs.webkit.org/show_bug.cgi?id=62487 Reviewed by Antti Koivisto. Change RenderLayerCompositor to always use overlap testing when possible. Rather than turn off overlap testing wholesale when encountering a non-affine transform, or starting an accelerated transform animation, we constrain the disabling of overlap testing to within overflow:hidden areas when possible. Tests: compositing/layer-creation/overlap-animation.html compositing/layer-creation/overlap-transforms.html * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::setCompositedBounds): Whitespace fix. * rendering/RenderLayerCompositor.cpp: (WebCore::CompositingState::CompositingState): (CompositingState): Add a member boolean to track whether we're testing overlap. Add a copy constructor. (WebCore::RenderLayerCompositor::updateCompositingLayers): Initialize the 'testing overlap' setting based on m_compositingConsultsOverlap (though this will always be true until removed in a future commit). (WebCore::RenderLayerCompositor::updateBacking): No longer turn off overlap testing when we see a non-affine transform. (WebCore::RenderLayerCompositor::computeCompositingRequirements): No need for the 'struct' in the arguments. Consult compositingState.m_testingOverlap to see if we want to test overlap. Use the new CompositingState copy ctor for childState, but set m_subtreeIsCompositing to false as before. If this layer is composited, look to see if need to disable over lap testing based on the transform or an animation. Just as we propagate m_subtreeIsCompositing, we have to propagate m_testingOverlap=false for the rest of the traverse. If we've just processed a layer which clips compositing descendants, we can go back to testing for overlap. (WebCore::RenderLayerCompositor::didStartAcceleratedAnimation): No need to do anything here now. It will be removed in future. (WebCore::RenderLayerCompositor::hasNonAffineTransform): No longer check perspective here, since that doesn't affect whether _this_ layer should disable overlap testing. Checking for a non-affine transform is sufficient. (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation): New method to check if AnimationController is running a transform animation. * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): 2012-05-03 Chris Fleizach accessibility/misspelled-attributed-string.html test sometimes throws exceptions https://bugs.webkit.org/show_bug.cgi?id=85081 Reviewed by Darin Adler. Add in more range checking in case we get back ranges from spell checking that are wrong. * accessibility/mac/WebAccessibilityObjectWrapper.mm: (AXAttributeStringSetFont): (AXAttributeStringSetColor): (AXAttributeStringSetNumber): (AXAttributeStringSetBlockquoteLevel): (AXAttributeStringSetHeadingLevel): (AXAttributeStringSetElement): 2012-05-03 Pavel Feldman Web Inspector: move canonical mime type calculation to Resource https://bugs.webkit.org/show_bug.cgi?id=85507 Reviewed by Yury Semikhatsky. Drive-by: small refactoring that prepares code for formatter extraction. * inspector/front-end/BreakpointsSidebarPane.js: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.createLiveLocation): (WebInspector.DebuggerModel.prototype.rawLocationToUILocation): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModelResourceBinding.prototype._uiSourceCodeForResource): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._createNetworkRequest): (get WebInspector): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.requestContent): (WebInspector.Resource.prototype.canonicalMimeType): (WebInspector.Resource.prototype._innerRequestContent.callback): (WebInspector.Resource.prototype._innerRequestContent): * inspector/front-end/ResourceView.js: (WebInspector.ResourceSourceFrame.prototype.requestContent): (WebInspector.ResourceSourceFrame.prototype._contentChanged): 2012-05-03 Yury Semikhatsky Web Inspector: 'expires' value is incorrect for cookies https://bugs.webkit.org/show_bug.cgi?id=85489 Reviewed by Pavel Feldman. Fixed cookie 'expires' property type from integer to number so that we don't lose precision when assembling Cookie parameter in InspectorResourceAgent. * inspector/Inspector.json: 2012-05-03 Dan Bernstein highlight for Ruby text is mispositioned in the Web Inspector https://bugs.webkit.org/show_bug.cgi?id=82684 Reviewed by Simon Fraser. Tests: fast/writing-mode/flipped-blocks-inline-map-local-to-container-expected.html fast/writing-mode/flipped-blocks-inline-map-local-to-container.html In flipped blocks writing modes, flipping was being applied twice to box descendants of inline children of the flipped block, once during RenderBox::mapLocalToContainer, and then again by RenderInline::mapLocalToContainer. The fix is to make the latter only apply the flip to local coordinates originating in the inline or a descendant inline. This is done by adding a parameter of type ApplyContainerFlipOrNot, which defaults to ApplyContainerFlip but is reset to DoNotApplyContainerFlip in recursive calls into mapLocalToContainer(). * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter, passing DoNotApplyContainerFlip when recursing into the container. * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::mapLocalToContainer): Added ApplyContainerFlipOrNot paramerer, and made the flipping conditional on its value. * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter, passing DoNotApplyContainerFlip when recursing into the container. (WebCore::RenderObject::localToContainerQuad): Pass ApplyContainerFlip. (WebCore::RenderObject::localToContainerPoint): Ditto. * rendering/RenderObject.h: * rendering/RenderView.cpp: (WebCore::RenderView::mapLocalToContainer): Added ApplyContainerFlipOrNot parameter. * rendering/RenderView.h: * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::mapLocalToContainer): Ditto. * rendering/svg/RenderSVGText.h: * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::mapLocalToContainer): Pass DoNotApplyContainerFlip when recursing into the parent. 2012-05-03 Pavel Feldman Web Inspector: make Script a ContentProvider. https://bugs.webkit.org/show_bug.cgi?id=85486 Reviewed by Yury Semikhatsky. This allows us to get rid of the corresponding content provider wrapper. * inspector/front-end/ContentProviders.js: * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype._createContentProvider): * inspector/front-end/Script.js: (WebInspector.Script.prototype.contentURL): (WebInspector.Script.prototype.requestContent.didGetScriptSource): (WebInspector.Script.prototype.requestContent): * inspector/front-end/SnippetsModel.js: (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript): 2012-05-03 Caio Marcelo de Oliveira Filho Remove extra checks for empty string when parsing CSS value https://bugs.webkit.org/show_bug.cgi?id=85480 Reviewed by Alexis Menard. Each parse value helper function was checking whether the value string was empty. For the common case this check is already done by StylePropertySet::setProperty(). So this patch make CSSParser::parseValue() assume the value string is not empty, and fix the other two clients. Test: fast/html/font-face-empty-should-not-crash.html * css/CSSParser.cpp: (WebCore::parseColorValue): Replace the string empty check by an ASSERT() to document function's expectations. (WebCore::parseSimpleLengthValue): Ditto. (WebCore::parseKeywordValue): Ditto. (WebCore::CSSParser::parseFontFaceValue): This will be covered by the added test. (WebCore::CSSParser::parseValue): * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::setMatrixValue): This is already covered by transforms/cssmatrix-2d-interface.xhtml. 2012-05-03 Arpita Bahuguna Broken handling of pseudo-elements in selectors API https://bugs.webkit.org/show_bug.cgi?id=83446 Reviewed by Antti Koivisto. Test: fast/dom/Window/querySelectorAll-with-pseudo-elements.html * css/SelectorChecker.cpp: (WebCore::SelectorChecker::SelectorChecker): Setting the default value for the enum member m_mode to ResolvingStyle. (WebCore::SelectorChecker::checkSelector): Instead of verifying against the bool m_isCollectingRulesOnly, we now check whether or not m_mode is set to ResolvingStyle. (WebCore::SelectorChecker::checkOneSelector): Instead of verifying against the bool m_isCollectingRulesOnly, we now check whether or not m_mode is set to ResolvingStyle. Also, for the pseudo-elements case we check if its value is set to QueryingRules in which case we return false. * css/SelectorChecker.h: (WebCore::SelectorChecker::mode): Returns the mode (m_mode) value. (WebCore::SelectorChecker::setMode): Sets the mode (m_mode) to the passed enum value. * css/StyleResolver.cpp: (WebCore::StyleResolver::sortAndTransferMatchedRules): (WebCore::StyleResolver::collectMatchingRulesForList): Retrieves SelectorChecker's mode value. * dom/SelectorQuery.cpp: (WebCore::SelectorQuery::SelectorQuery): Sets SelectorChecker's mode to QueryingRules. * html/shadow/ContentSelectorQuery.cpp: (WebCore::ContentSelectorQuery::ContentSelectorQuery): Sets SelectorChecker's mode to CollectingRules. 2012-05-03 Pavel Feldman Web Inspector: EXC_BAD_ACCESS in DOM breakpoint processing code. https://bugs.webkit.org/show_bug.cgi?id=85482 Reviewed by Yury Semikhatsky. 0 check added since we are guaranteed to get immediate parent, but not the whole ancestor tree. * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent): 2012-05-03 Ilya Tikhonovsky Web Inspector: compile time ambiguity happens when I try to assign a TypeBuilder object to an out argument. https://bugs.webkit.org/show_bug.cgi?id=85462 It happens because we have type casting operators for both types RefPtr<*Type*> and PassRefPtr<*Type*>. I think we can drop PassRefPtr type casting operator and use a named function 'release'. Reviewed by Yury Semikhatsky. * inspector/CodeGeneratorInspector.py: * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::buildObjectForSearchMatch): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache): * inspector/InspectorPageAgent.cpp: (WebCore::buildObjectForCookie): (WebCore::buildObjectForSearchResult): * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForTiming): (WebCore::InspectorResourceAgent::buildInitiatorObject): * inspector/ScriptCallFrame.cpp: (WebCore::ScriptCallFrame::buildInspectorObject): 2012-05-03 Yury Semikhatsky Web Inspector: crash in InspectorResourceAgent::didReceiveWebSocketFrame https://bugs.webkit.org/show_bug.cgi?id=85394 Reviewed by Pavel Feldman. Pass string length explicitely when creating String object from non-null-terminated char* strings. * inspector/InspectorResourceAgent.cpp: (WebCore): (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame): (WebCore::InspectorResourceAgent::didSendWebSocketFrame): 2012-05-03 'Pavel Feldman' Not reviewed: never surround InspectorInstrumentation:: with ENABLED(INSPECTOR) * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::appendChild): (WebCore::dispatchChildRemovalEvents): 2012-04-30 Pavel Feldman Web Inspector: migrate breakpoint manager to live locations. https://bugs.webkit.org/show_bug.cgi?id=85136 Reviewed by Yury Semikhatsky. - Merges Breakpoint and UIBreakpoint to have single instance - Extracts storage from the breakpoint manager - Makes breakpoint manager use source mapping from the script, not the presentation model - Removes breakpoints collection from the UISourceCode Unfortunately, there are too many inter-dependencies that require that these changes are done simultaneously. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype.breakpoint): (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode): (WebInspector.BreakpointManager.prototype.removeAllBreakpoints): (WebInspector.BreakpointManager.prototype.reset): (WebInspector.BreakpointManager.prototype.debuggerReset): (WebInspector.BreakpointManager.prototype._breakpointResolved): (WebInspector.BreakpointManager.prototype._removeBreakpoint): (WebInspector.BreakpointManager.prototype._uiLocationAdded): (WebInspector.BreakpointManager.prototype._uiLocationRemoved): (WebInspector.BreakpointManager.prototype.storage): (WebInspector.BreakpointManager.Breakpoint): (WebInspector.BreakpointManager.Breakpoint.prototype.primaryUILocation): (WebInspector.BreakpointManager.Breakpoint.prototype._addResolvedLocation): (WebInspector.BreakpointManager.Breakpoint.prototype.enabled): (WebInspector.BreakpointManager.Breakpoint.prototype.setEnabled): (WebInspector.BreakpointManager.Breakpoint.prototype.condition): (WebInspector.BreakpointManager.Breakpoint.prototype.setCondition): (WebInspector.BreakpointManager.Breakpoint.prototype._updateBreakpoint): (WebInspector.BreakpointManager.Breakpoint.prototype.remove): (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger.didSetBreakpoint): (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger): (WebInspector.BreakpointManager.Breakpoint.prototype._removeFromDebugger): (WebInspector.BreakpointManager.Breakpoint.prototype._resetLocations): (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId): (WebInspector.BreakpointManager.Breakpoint.prototype._fakeBreakpointAtPrimaryLocation): (WebInspector.BreakpointManager.Storage.get this): (WebInspector.BreakpointManager.Storage): (WebInspector.BreakpointManager.Storage.prototype.restoreBreakpoints): (WebInspector.BreakpointManager.Storage.prototype._updateBreakpoint): (WebInspector.BreakpointManager.Storage.prototype._removeBreakpoint): (WebInspector.BreakpointManager.Storage.prototype._save): (set WebInspector.BreakpointManager.Storage.Item): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded.didRequestContent): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointRemoved): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.highlightBreakpoint): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._createBreakpointItemId): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointClicked): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel): (WebInspector.DebuggerModel.prototype.breakpointsActive): (WebInspector.DebuggerModel.prototype.createLiveLocation): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged): (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource): (WebInspector.JavaScriptSource.prototype.consoleMessagesCleared): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype.canEditSource): (WebInspector.JavaScriptSourceFrame.prototype.editContent): (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged): (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu): (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.didEditContent): (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration): (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown): (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing): (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition): (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded): (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved): (WebInspector.JavaScriptSourceFrame.prototype.onTextViewerContentLoaded): (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint): (WebInspector.JavaScriptSourceFrame.prototype._continueToLine): (WebInspector.JavaScriptSourceFrame.prototype._updateBreakpointsAfterLiveEdit): * inspector/front-end/Script.js: (WebInspector.Script.prototype.rawLocationToUILocation): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded): (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved): (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetUILocation): (WebInspector.ScriptsPanel.prototype._debuggerPaused): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.contentChanged): 2012-05-03 Andrey Kosyakov Unreviewed attemp to fix chromium win build broken at r115943. * notifications/NotificationClient.h: (WebCore): 2012-05-03 Vivek Galatage Linker warnings due to duplicate symbols for SimplifyMarkupCommand.cpp on Windows https://bugs.webkit.org/show_bug.cgi?id=85467 Reviewed by Ryosuke Niwa. Removed the multiple inclusion of the file SimplifyMarkupCommand.cpp No new tests required. * WebCore.vcproj/WebCore.vcproj: 2012-05-03 Uday Kiran CSS clip: auto clips to box borders instead of removing clipping https://bugs.webkit.org/show_bug.cgi?id=36772 Reviewed by Andreas Kling. According to CSS 2.1 spec, http://www.w3.org/TR/CSS2/visufx.html#propdef-clip, clip property with value 'auto' the element does not clip. Also getPropertyValue for clip when auto is specified should return "auto" and not "rect(0px 0px 0px 0px)". Tests: css2.1/20110323/clip-001-expected.html css2.1/20110323/clip-001.html * css/StyleBuilder.cpp: (WebCore::ApplyPropertyClip::applyValue): 2012-05-02 Antti Koivisto Add temporary feature define for parsed stylesheet caching https://bugs.webkit.org/show_bug.cgi?id=85413 Rubber-stamped by Nikolas Zimmermann. While not an externally visible feature this is still a significant internal change. It is good to have define in case someone has an urgent need to turn it off. Caching is enabled by default on all platforms. The define should be removed after some bake time. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): 2012-05-03 Nikolas Zimmermann Accumulation for values-animation is broken https://bugs.webkit.org/show_bug.cgi?id=85158 Reviewed by Zoltan Herczeg. Follow-up patch: Add const Foo& foo() const accessors to SVGAnimatedType, to avoid the "Foo& foo = animated->foo()" idiom in all cases where we don't need to mutate 'foo'. Use "const Foo& foo = animated->foo()" instead. Inline all of these methods to avoid the function call overhead. For to-animations we actually mutated the from value before, but it wasn't a problem in practive, as we did that on every animation step. Fully avoid these inconsitencies by never mutating the from/to types stored in SVGAnimateElement. Cache toAtEndOfDurationType just like m_toType/m_fromType in SVGAnimateElement, to avoid reconstructing it on every animation step. No new tests, only design/performance fixes. * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateToAtEndOfDurationValue): (WebCore::SVGAnimateElement::targetElementWillChange): * svg/SVGAnimateElement.h: (SVGAnimateElement): * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement): (WebCore::SVGAnimateMotionElement::calculateToAtEndOfDurationValue): (WebCore::SVGAnimateMotionElement::calculateFromAndToValues): (WebCore::SVGAnimateMotionElement::calculateFromAndByValues): (WebCore::SVGAnimateMotionElement::calculateAnimatedValue): * svg/SVGAnimateMotionElement.h: (SVGAnimateMotionElement): * svg/SVGAnimatedAngle.cpp: (WebCore::SVGAnimatedAngleAnimator::addAnimatedTypes): (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): * svg/SVGAnimatedBoolean.cpp: (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue): * svg/SVGAnimatedColor.cpp: (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue): * svg/SVGAnimatedEnumeration.cpp: (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue): * svg/SVGAnimatedInteger.cpp: (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue): * svg/SVGAnimatedIntegerOptionalInteger.cpp: (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::addAnimatedTypes): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue): * svg/SVGAnimatedLength.cpp: (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes): (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue): * svg/SVGAnimatedLengthList.cpp: (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumber.cpp: (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumberList.cpp: (WebCore::SVGAnimatedNumberListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue): * svg/SVGAnimatedNumberOptionalNumber.cpp: (WebCore::SVGAnimatedNumberOptionalNumberAnimator::addAnimatedTypes): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue): * svg/SVGAnimatedPath.cpp: (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue): * svg/SVGAnimatedPointList.cpp: (WebCore::SVGAnimatedPointListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue): * svg/SVGAnimatedPreserveAspectRatio.cpp: (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue): * svg/SVGAnimatedRect.cpp: (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue): * svg/SVGAnimatedString.cpp: (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes): (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue): * svg/SVGAnimatedType.cpp: * svg/SVGAnimatedType.h: (WebCore::SVGAnimatedType::angleAndEnumeration): (SVGAnimatedType): (WebCore::SVGAnimatedType::boolean): (WebCore::SVGAnimatedType::color): (WebCore::SVGAnimatedType::enumeration): (WebCore::SVGAnimatedType::integer): (WebCore::SVGAnimatedType::integerOptionalInteger): (WebCore::SVGAnimatedType::length): (WebCore::SVGAnimatedType::lengthList): (WebCore::SVGAnimatedType::number): (WebCore::SVGAnimatedType::numberList): (WebCore::SVGAnimatedType::numberOptionalNumber): (WebCore::SVGAnimatedType::path): (WebCore::SVGAnimatedType::pointList): (WebCore::SVGAnimatedType::preserveAspectRatio): (WebCore::SVGAnimatedType::rect): (WebCore::SVGAnimatedType::string): (WebCore::SVGAnimatedType::transformList): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): (WebCore::SVGAnimationElement::startedActiveInterval): (WebCore::SVGAnimationElement::updateAnimation): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::adjustFromToListValues): (WebCore::SVGAnimationElement::animateDiscreteType): (SVGAnimationElement): 2012-05-02 Alexander Færøy Rename deviceDPI to devicePixelRatio https://bugs.webkit.org/show_bug.cgi?id=85049 Reviewed by Kenneth Rohde Christiansen. No new tests added since this is a minor refactoring with no changes that should affect tests. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setDevicePixelRatio): (WebCore::Settings::devicePixelRatio): (Settings): 2012-05-03 Nikolas Zimmermann Fix multiple begin values support - especially with seeking through setCurrentTime https://bugs.webkit.org/show_bug.cgi?id=85372 Reviewed by Zoltan Herczeg. Multiple begin values aka. begin="0s; 2s" aren't correctly handled - resulting in broken & unexpected behavior. Supporting seeking properly on documents containing such animations is very important, otherwise we can't reliable test animations using either reftests or the SVG JS animation test framework. Testcase: What's expected? Two times should be contained in the 'begin' times list in SVGSMILElement: m_beginTimes = { 0s, 2s }. The initial first resolved interval is: m_intervalBegin=0.0s, m_intervalEnd=8.0s. During t=0s..1.9999s the m_intervalBegin/m_intervalEnd are correct. At t=2s, a new interval can be started. m_intervalEnd should be set to nextBeginTime, where nextBeginTime=2s. The current interval should get cropped to: m_intervalBegin=0s, m_intervalEnd=2s. The following call to resolveNextInterval() sees that elapsed >= m_intervalEnd, and thus moves on to the next interval. m_intervalBegin should be 2s and m_intervalEnd=10s after that. In trunk this behavior is only partly implemented and broken. Especially broken together with seeking via SVGSVGElement.setCurrentTime. That's because we don't correctly seek to the right interval in case of multiple begin values, eg. if we sample an animation with begin="0s; 3s" dur="6s" we always remain in the first interval and don't move on. Fix all of these issues, making lots more tests work in Dr. Olaf Hofmanns SVG Animation test suite. Tests: svg/animations/multiple-begin-additive-animation.html svg/animations/multiple-begin-animation-discrete-expected.svg svg/animations/multiple-begin-animation-discrete.svg svg/animations/multiple-begin-animation-expected.svg svg/animations/multiple-begin-animation.svg * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::begin): (WebCore::SMILTimeContainer::setElapsed): (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SMILTimeContainer.h: (SMILTimeContainer): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::findInstanceTime): (WebCore::SVGSMILElement::resolveInterval): (WebCore::SVGSMILElement::resolveNextInterval): (WebCore): (WebCore::SVGSMILElement::checkRestart): (WebCore::SVGSMILElement::seekToIntervalCorrespondingToTime): (WebCore::SVGSMILElement::progress): * svg/animation/SVGSMILElement.h: (SVGSMILElement): 2012-05-03 Dana Jansens [chromium] Don't add small opaque areas to the occlusion tracker's Region https://bugs.webkit.org/show_bug.cgi?id=85297 Reviewed by Adrienne Walker. Don't add small opaque areas (smaller than 160x160) to the occlusion tracker's Region objects to avoid high Region::unite() costs. We would like Region to just be fast enough that this isn't a concern, and there are patches in flight to do this, but at the moment, small opaque areas add significant cost if there is many of them, for potentially small gains since they do not cover entire tiles. Comments in http://code.google.com/p/chromium/issues/detail?id=124687 motivate this approach for now, and point to around 160x160 being a reasonable threshold. Removes the opaque paint tracking flag while we're here. The flag is no longer used, and was broken when we moved the "paint vs opaque flag" distinction out to the layers. Unit test: CCOcclusionTrackerTestMinimumTrackingSize * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::::CCOcclusionTrackerBase): (WebCore::addOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): * platform/graphics/chromium/cc/CCOcclusionTracker.h: (WebCore::CCOcclusionTrackerBase::setMinimumTrackingSize): (CCOcclusionTrackerBase): (WebCore::CCOcclusionTrackerBase::preferredMinimumTrackingSize): 2012-05-02 Jon Lee Migrate permission functions to Notification from NotificationCenter https://bugs.webkit.org/show_bug.cgi?id=80485 Reviewed by Jian Li. * notifications/Notification.idl: Add permission functions. * notifications/DOMWindowNotifications.idl: Wrap webkitNotifications as part of legacy API. * notifications/Notification.cpp: New permission functions are wrapped with ENABLE(NOTIFICATIONS) (WebCore::Notification::taskTimerFired): Use the new permission functions to determine whether we can show the notification. (WebCore::Notification::permissionLevel): (WebCore::Notification::permissionString): Declare three static locals for each of the values, and return based on the permission enum. (WebCore::Notification::requestPermission): Forward request to client. * notifications/Notification.h: * notifications/NotificationPermissionCallback.h: Added. (NotificationPermissionCallback): (WebCore::NotificationPermissionCallback::~NotificationPermissionCallback): * notifications/NotificationPermissionCallback.idl: Added. * notifications/NotificationCenter.cpp: Wrap permission functions in ENABLE(LEGACY_NOTIFICATIONS) * notifications/NotificationCenter.h: Wrap permission functions in ENABLE(LEGACY_NOTIFICATIONS) * notifications/NotificationCenter.idl: Refactor conditionals to make the center available only when ENABLE(LEGACY_NOTIFICATIONS) is on. * notifications/NotificationPresenter.h: (WebCore::NotificationPresenter::requestPermission): Add new requestPermission() function for new NotificationPermissionCallback type. Make it a stub implementation until all ports have adopted. * notifications/NotificationClient.h: Add another requestPermission() client call, wrapped in ENABLE(NOTIFICATIONS) that accepts the NotificationPermissionCallback. Wrap the original one in ENABLE(LEGACY_NOTIFICATIONS). * bindings/js/JSDesktopNotificationsCustom.cpp: Change to include the implementation only in ENABLE(LEGACY_NOTIFICATIONS). * bindings/js/JSNotificationsCustom.cpp: Custom implementation of requestPermission(). * bindings/v8/custom/V8NotificationCustom.cpp: Custom implementation of requestPermission(). * notifications/WorkerContextNotifications.idl: Make webktNotifications available only in legacy API. * CMakeLists.txt: Add new callback idl. * DerivedSources.make: Add new callback idl. * DerivedSources.pri: Add new callback idl. * GNUmakefile.list.am: Add NotificationPermissionCallback files. * Target.pri: Include JSNotificationCustom.cpp, V8NotificationCustom.cpp * UseJSC.cmake: Include JSNotificationCustom.cpp * UseV8.cmake: Include V8NotificationCustom.cpp * WebCore.gypi: Include JSNotificationCustom.cpp, V8NotificationCustom.cpp, JSNotificationPermissionCallback.{h,cpp} * WebCore.vcproj/WebCore.vcproj: Include JSNotificationCustom.cpp, JSNotificationPermissionCallback.{h,cpp} * WebCore.exp.in: Export permissionString(). * WebCore.xcodeproj/project.pbxproj: Add callback idl, h, and cpp files. 2012-05-02 Sheriff Bot Unreviewed, rolling out r115907. http://trac.webkit.org/changeset/115907 https://bugs.webkit.org/show_bug.cgi?id=85458 It broke all viewport tests on Qt and on GTK (Requested by Ossy on #webkit). * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): * dom/ViewportArguments.h: (ViewportAttributes): 2012-05-02 Gustavo Noronha Silva [GTK] Finish moving modules into libWebCoreModules.la https://bugs.webkit.org/show_bug.cgi?id=85449 Unreviewed build fix. * GNUmakefile.list.am: move remaining modules source files into the libWebCoreModules library, this should fix the problems people had building the 1.9.1 tarball with unpatched make. 2012-05-02 Dongwoo Im [EFL] Unreviewed, Fix build break when WEB_AUDIO is enabled. https://bugs.webkit.org/show_bug.cgi?id=85443 Unreviewed build fix. Three new files were added in the Modules/webaudio directory. These files should be included into the CMakeLists.txt file. * CMakeLists.txt: Add the newly created files into the CMakeLists.txt 2012-05-02 Eric Seidel Sort ENABLE_ defines in FeatureDefines.xcconfig files to make them easier to compare with one another (and easier to autogenerate) https://bugs.webkit.org/show_bug.cgi?id=85433 Reviewed by Adam Barth. I have a script which can autogenerate these xcconfig files as well as the vsprops files (and soon the Chromium, cmake, gnumake and qmake) feature lists from a central feature list file. In preparation for posting such a tool, I'm re-sorting these xcconfig files to be alphabetically ordered (currently they're close, but not quite). There is also at least one inconsistency between these files (CSS_LEGACY_PREFIXES) which I will fix in a second pass. I will also sort the FEATURE_DEFINES = line in a follow-up patch. * Configurations/FeatureDefines.xcconfig: 2012-05-02 Dana Jansens [chromium] Don't occlude pixels in a surface that are needed for a background filter blur https://bugs.webkit.org/show_bug.cgi?id=84317 Reviewed by Adrienne Walker. Blur filters move pixels around, so a pixel can influence the value of pixels at some distance away. If a pixel is not occluded, then all pixels within the radius of the blur may influence the value of that pixel, so they should also stay unoccluded. For background filters, the pixels are read from the filter's target surface, so we remove occlusion from that target surface from pixels that will blur into visible pixels. Unit test: CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilter CCOcclusionTrackerTestTwoBackgroundFiltersReduceOcclusionTwice CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilterWithClip CCOcclusionTrackerTestDontReduceOcclusionBelowBackgroundFilter CCOcclusionTrackerTestDontReduceOcclusionIfBackgroundFilterIsOccluded CCOcclusionTrackerTestReduceOcclusionWhenBackgroundFilterIsPartiallyOccluded * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::reduceOcclusion): (WebCore): (WebCore::reduceOcclusionBelowSurface): (WebCore::::leaveToTargetRenderSurface): (WebCore::::unoccludedContributingSurfaceContentRect): * platform/graphics/chromium/cc/CCOcclusionTracker.h: (CCOcclusionTrackerBase): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::appendSurface): (WebCore::CCQuadCuller::appendReplica): 2012-05-02 Levi Weintraub Convert FractionalLayoutUnit overflow assertions to stderr warnings https://bugs.webkit.org/show_bug.cgi?id=85393 Reviewed by Eric Seidel. Writing warnings to stderr when FractionalLayoutUnits overflow on debug builds instead of asserting and crashing. It can be very useful to WebKit developers know when overflow is occurring, but it's not always a programming error, so assert wasn't the right action. No new tests. No change in behavior. * platform/FractionalLayoutUnit.h: (WebCore): (WebCore::FractionalLayoutUnit::FractionalLayoutUnit): (WebCore::FractionalLayoutUnit::toUnsigned): (WebCore::FractionalLayoutUnit::setRawValue): 2012-04-18 Jon Honeycutt FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more information about the form being submitted https://bugs.webkit.org/show_bug.cgi?id=84297 Reviewed by Andy Estes. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::prepareForSubmission): Get the form field names and values, and use them to create a FormState object. Pass this object when calling dispatchWillSendSubmitEvent(). (WebCore::HTMLFormElement::getTextFieldValues): Loop over the associated elements, looking for elements. Collect their names and values. * html/HTMLFormElement.h: Declare getTextFieldData(). * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::dispatchWillSendSubmitEvent): Updated declaration for new parameter type. * loader/FrameLoaderClient.h: Updated declaration of dispatchWillSendSubmitEvent() for new param type. 2012-04-13 Jon Honeycutt Make Page::setDefersLoading() have a call count so that each time loading is deferred, it must be balanced with a call to resume. https://bugs.webkit.org/show_bug.cgi?id=84522 Reviewed by Andy Estes. * page/Page.cpp: (WebCore::Page::Page): Initialize new call count member. (WebCore::Page::setDefersLoading): Check whether the callers wants balanced defer/resume loading behavior. If the call count is not changing from 0 to 1 or 1 to 0, return early. Otherwise, defer or resume loading for frames in this page. * page/Page.h: (WebCore::Page::defersLoading): Added a member to hold the call count. * page/Settings.cpp: (WebCore::Settings::Settings): Initialized new member m_wantsBalancedSetDefersLoadingBehavior. * page/Settings.h: (Settings): Added new member m_wantsBalancedSetDefersLoadingBehavior. (WebCore::Settings::setWantsBalancedSetDefersLoadingBehavior): Setter. (WebCore::Settings::wantsBalancedSetDefersLoadingBehavior): Getter. 2012-05-02 Ojan Vafai Add a histogram for rendertree size https://bugs.webkit.org/show_bug.cgi?id=85226 Reviewed by Eric Seidel. We record it when the page gets hidden, since this is a point at which, in theory, we could kill the rendertree. No new tests. This isn't web visible, so there's no way to test it. * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): * page/Page.cpp: (WebCore::Page::renderTreeSize): (WebCore): (WebCore::Page::setVisibilityState): * page/Page.h: (Page): * platform/HistogramSupport.cpp: (WebCore::HistogramSupport::histogramCustomCounts): (WebCore): * platform/HistogramSupport.h: (HistogramSupport): * platform/chromium/HistogramSupportChromium.cpp: (WebCore::HistogramSupport::histogramCustomCounts): (WebCore): 2012-05-02 Sheriff Bot Unreviewed, rolling out r115902. http://trac.webkit.org/changeset/115902 https://bugs.webkit.org/show_bug.cgi?id=85441 Compile failure on linux 32 (Requested by zhenyao on #webkit). * Modules/indexeddb/IDBBackingStore.h: (IDBBackingStore): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber): * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-05-02 Julien Chaffraix Add ASSERTs to avoid querying dirtied z-index or normal flow lists on RenderLayer https://bugs.webkit.org/show_bug.cgi?id=84920 Reviewed by Simon Fraser. Covered by existing tests in Debug (at least several time!). This change adds some ASSERTs on RenderLayer that prevent any use of its lists if they are dirtied. On top of this change, we added an invariant that non-stacking contexts should have their z-index lists NULL (instead of empty or NULL previously). This is enforced at updateZOrderLists time as we now ensure that it is called in a timely manner. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateLayerBounds): Added call to updateLayersIfNeeded as we will query them later and there is no guarantee that they are not dirty (we recurse in our children as part of calculateLayerBounds). This was causing the new ASSERTs to trigger on css3/filter/ tests. (WebCore::RenderLayer::dirtyZOrderLists): Added a comment as to why we can't ASSERT that we are in a stacking context here. (WebCore::RenderLayer::rebuildZOrderLists): Added an ASSERT that we only rebuild z-index lists for dirtied stacking context. (WebCore::RenderLayer::updateLayerListsIfNeeded): Updated to ensure that the reflection layer has its layers updated too. This was triggering the new ASSERTs on fast/runins/run-in-layer-not-removed-crash.html. (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded): Updated to use the new isDirtyStackingContext function. * rendering/RenderLayer.h: (WebCore::RenderLayer::isDirtyStackingContext): New helper function. Also made updateLayerListsIfNeeded() the only way to update layer. That should prevent any misuse. (WebCore::RenderLayer::posZOrderList): (WebCore::RenderLayer::negZOrderList): (WebCore::RenderLayer::normalFlowList): ASSERT that we don't query any of the previous lists if they are dirty. Also enforce the invariant that non-stacking contexts should have NULL z-index lists. (WebCore::RenderLayer::clearZOrderLists): New function to clearZOrderLists so that we can enfore the previous invariant. (WebCore::RenderLayer::updateZOrderLists): Updated to clear the dirty flag and the z-index lists for non-stacking context. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): (WebCore::RenderLayerCompositor::computeCompositingRequirements): (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Removed the explicit ASSERTs. (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): (WebCore::RenderLayerCompositor::canBeComposited): Disabled compositing on RenderLayer in flow thread. Because flow thread's RenderLayer are not collected as part of RenderLayer's lists and could be composited, this was causing the new ASSERTs to trigger (e.g. on fast/regions/webkit-flow-renderer-layer.html). * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): Updated to use updateLayerListsIfNeeded(). 2012-05-02 Levi Weintraub Remove unused adjustForAbsoluteZoom method in RenderObject.h https://bugs.webkit.org/show_bug.cgi?id=85396 Reviewed by Eric Seidel. We only want to use the integer adjustForAbsoluteZoom method, so this remnant is both unused and potentially confusing. No new tests. Removing unused code. * rendering/RenderObject.h: (WebCore): 2012-05-02 Fady Samuel Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport https://bugs.webkit.org/show_bug.cgi?id=70609 Reviewed by Kenneth Rohde Christiansen. Make ViewportAttributes' layoutSize be a FloatRect to avoid rounding too early, and the occasional off by one fixed layout dimensions. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): * dom/ViewportArguments.h: (ViewportAttributes): 2012-05-02 Joshua Bell IndexedDB: Handle generated keys up to 2^53 https://bugs.webkit.org/show_bug.cgi?id=85114 The spec defines the behavior for generated keys up to 2^53 (the maximum integer storable as an ECMAScript number) and the error case when going beyond that. Ensure that we can handle values up to that point and generate errors beyond. Reviewed by Tony Chang. Test: storage/indexeddb/key-generator.html * Modules/indexeddb/IDBBackingStore.h: (IDBBackingStore): * Modules/indexeddb/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber): * Modules/indexeddb/IDBLevelDBBackingStore.h: (IDBLevelDBBackingStore): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (IDBObjectStoreBackendImpl): 2012-05-02 Adam Klein Childlist mutations in shadow DOM should be observable with MutationObservers https://bugs.webkit.org/show_bug.cgi?id=85402 Reviewed by Ojan Vafai. Though Mutation Events are not supported in Shadow DOM, MutationObservers are supposed to be. Due to a misplacement of the ChildListMutationScope, they were erroneously getting skipped. This patch moves code around to properly notify when childlist are mutated in shadow DOM and covers that change with a new test. Test: fast/mutation/shadow-dom.html * dom/ContainerNode.cpp: (WebCore::willRemoveChild): Handle notification of removal directly. (WebCore::willRemoveChildren): ditto. (WebCore::dispatchChildInsertionEvents): Remove notification of insertion. (WebCore::dispatchChildRemovalEvents): Remove notification of removal. (WebCore::updateTreeAfterInsertion): Handle notification of insertion directly. 2012-05-02 Eric Carlson Crash in WebCore::TextTrackList::remove https://bugs.webkit.org/show_bug.cgi?id=85095 Reviewed by Maciej Stachowiak. Test: media/track/track-remove-quickly.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::willRemoveTrack): Return immediately if the tracks collection has not been allocated yet. 2012-05-02 David Barton After appending MathML with jquery the table renders with overlaps https://bugs.webkit.org/show_bug.cgi?id=52444 Reviewed by Julien Chaffraix. This patch also fixes bugs 72834 and 47781. The main problem is that correct preferred logical widths are affected by operator stretching. Thus we add a call to setNeedsLayoutAndPrefWidthsRecalc() after the stretching code in RenderMathMLOperator.cpp, and change RenderMathMLBlock and RenderMathMLRow to make sure that stretching of children is done before an 's preferred logical widths are computed. Test: Added a test to mathml/presentation/mo-stretch.html * rendering/mathml/RenderMathMLBlock.cpp: (WebCore::RenderMathMLBlock::RenderMathMLBlock): (WebCore::RenderMathMLBlock::computePreferredLogicalWidths): (WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights): (WebCore::RenderMathMLBlock::preferredLogicalHeightAfterSizing): * rendering/mathml/RenderMathMLBlock.h: (WebCore::RenderMathMLBlock::unembellishedOperator): (WebCore::RenderMathMLBlock::isPreferredLogicalHeightDirty): (WebCore::RenderMathMLBlock::preferredLogicalHeight): (WebCore::RenderMathMLBlock::setPreferredLogicalHeight): - Add m_preferredLogicalHeight and methods to compute and return it. - Remove stretchToHeight() from most classes as it no longer needs to be done recursively. We just call it on the base of an embellished operator, and that calls setNeedsLayoutAndPrefWidthsRecalc() to mark itself and its container chain. * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::stretchToHeight): - Don't compare an unexpanded height to an expanded one. (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): (WebCore::RenderMathMLOperator::updateFromElement): - After stretching, call setNeedsLayoutAndPrefWidthsRecalc(). * rendering/mathml/RenderMathMLOperator.h: (RenderMathMLOperator): * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::computePreferredLogicalWidths): (WebCore::RenderMathMLRow::layout): * rendering/mathml/RenderMathMLRow.h: (RenderMathMLRow): - Add computePreferredLogicalWidths(), using computeChildrenPreferredLogicalHeights() to compute our children's preferred logical heights if necessary, followed by operator stretching. * rendering/mathml/RenderMathMLSubSup.cpp: * rendering/mathml/RenderMathMLSubSup.h: (RenderMathMLSubSup): * rendering/mathml/RenderMathMLUnderOver.cpp: * rendering/mathml/RenderMathMLUnderOver.h: (RenderMathMLUnderOver): 2012-05-02 Dana Jansens [chromium] Avoid extra Region copies in CCOcclusionTracker https://bugs.webkit.org/show_bug.cgi?id=85257 Reviewed by Adrienne Walker. Instead of making a Region for each layer and then uniting the region with the current occlusion, directly add the rects for the given layer to the current occlusion. When subtracting a region from a rect, just subtract the region directly instead of computing the intersecting region. Covered by existing tests. * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::addOcclusionBehindLayer): (WebCore::::markOccludedBehindLayer): (WebCore::rectSubtractRegion): 2012-05-02 Keith Rosenblatt [Qt] ASSERT in FontCustomPlatformDataQt.cpp with invalid font in data URI https://bugs.webkit.org/show_bug.cgi?id=85089 Reviewed by Simon Hausmann. Do not return data referencing an invalid QRawFont from createFontCustomPlatformData(). Instead return null. Test: fast/css/font-face-data-uri-invalid.html * platform/graphics/qt/FontCustomPlatformDataQt.cpp: (WebCore::createFontCustomPlatformData): 2012-05-02 Michal Mocny [chromium] Set contents texture manager preferred memory limit based on GpuMemoryManager suggestion. https://bugs.webkit.org/show_bug.cgi?id=84270 Reviewed by Kenneth Russell. Updates the content texture manager memory limits based on GpuMemoryManager memory allocation suggestions. The memory allocation size (in bytes) is fed from LayerRendererChromium memory allocation changed callback handler to CCLayerTreeHost. At that point we adjust the limits, using the existing notions of preferred and max limits. On android, the preferred limit is half the maximum (as it has always been), but on all other platforms the preferred limit is now equal to max, in order to allow more agressive prepainting. Finally, android has memory constraints dependant on viewportSize, but that logic has been pushed into the GpuMemoryManager. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged): (WebCore::LayerRendererChromium::beginDrawingFrame): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromiumClient): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::setMemoryAllocationLimitBytes): (WebCore): * platform/graphics/chromium/TextureManager.h: (TextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setViewportSize): (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setContentsMemoryAllocationLimitBytes): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImplClient): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread): (WebCore): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread): (WebCore): (WebCore::CCThreadProxy::setContentsMemoryAllocationLimitBytes): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-05-02 Emil A Eklund Fix usage of layout types in platform code https://bugs.webkit.org/show_bug.cgi?id=85392 Reviewed by Eric Seidel. No new tests, no change in functionality. * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureTap): Use rounded point for gestures as event handling is still mostly int based. 2012-05-02 Kenneth Russell Don't allocate stencil buffer if stencil flag is false in context creation attributes https://bugs.webkit.org/show_bug.cgi?id=85317 Reviewed by Dimitri Glazkov. Make it appear to WebGL application that there is no stencil buffer even if the underlying GraphicsContext3D allocated one. Verified intended behavior with test case from Mozilla's bug report. Updated context-attributes-alpha-depth-stencil-antialias.html test from Khronos repository. Ran WebGL layout tests on Linux in Chrome's DRT and on Mac OS in Safari's. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::hasStencilBuffer): Added query method. (WebCore): Changed desired semantics of isValidRenderbuffer. * html/canvas/WebGLFramebuffer.h: (WebGLFramebuffer): Added hasStencilBuffer. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::initializeNewContext): Clear new flag. (WebCore::WebGLRenderingContext::bindFramebuffer): Reset stencil test upon framebuffer change. (WebCore::WebGLRenderingContext::disable): Cache flag; reset stencil test. (WebCore::WebGLRenderingContext::enable): Cache flag; reset stencil test. (WebCore::WebGLRenderingContext::framebufferRenderbuffer): Reset stencil test upon renderbuffer change. (WebCore::WebGLRenderingContext::getContextAttributes): Force depth and stencil to false if false was requested. (WebCore::WebGLRenderingContext::isEnabled): Return cached flag. (WebCore::WebGLRenderingContext::renderbufferStorage): Reset stencil test upon renderbuffer reallocation. (WebCore::WebGLRenderingContext::applyStencilTest): Enable or disable stencil test based on request and availability. (WebCore::WebGLRenderingContext::enableOrDisable): Helper function. * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): Added cache of STENCIL_TEST flag. Deleted unused m_stencilBits. 2012-05-02 Ryosuke Niwa Drag and drop text into table is pasting the text in the next element https://bugs.webkit.org/show_bug.cgi?id=75004 Reviewed by Darin Adler. The bug was caused by ReplaceSelectionCommand adjusting the insertion position to be before of the block element containing the insertion position even when the block element is a table cell. Fixed the bug by not moving the insertion position before the table cell in this case. Test: editing/pasteboard/paste-into-table-cell.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): 2012-05-02 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=85309 supportsExpandedScrollbars() should check for the method we actually call rather than a related method Reviewed by Anders Carlsson. Missing colon. * platform/mac/ScrollbarThemeMac.mm: (WebCore::supportsExpandedScrollbars): 2012-05-02 Antti Koivisto Move title and media queries from StyleSheetInternal to CSSStyleSheet https://bugs.webkit.org/show_bug.cgi?id=85387 Reviewed by Anders Carlsson. Stylesheet title and media queries are determined by the owner, not by the stylesheet itself. The fields belong to CSSStyleSheet. This will make it easier to share StyleSheetInternal instances between documents. * css/CSSStyleSheet.cpp: (WebCore::StyleSheetInternal::StyleSheetInternal): (WebCore::StyleSheetInternal::isCacheable): (WebCore): (WebCore::CSSStyleSheet::setDisabled): Invalidate the document style directly instead of ping-ponging through StyleSheetInternal. (WebCore::CSSStyleSheet::setMediaQueries): (WebCore::CSSStyleSheet::media): * css/CSSStyleSheet.h: (StyleSheetInternal): (WebCore::StyleSheetInternal::originalURL): (WebCore::StyleSheetInternal::hasCharsetRule): (WebCore::CSSStyleSheet::mediaQueries): (CSSStyleSheet): (WebCore::CSSStyleSheet::setTitle): * css/StyleResolver.cpp: (WebCore::StyleResolver::appendAuthorStylesheets): (WebCore::StyleResolver::collectMatchingRulesForList): * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createCSSStyleSheet): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::setCSSStyleSheet): * dom/StyleElement.cpp: (WebCore::StyleElement::createSheet): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseAttribute): (WebCore::HTMLLinkElement::setCSSStyleSheet): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::parseAttribute): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::parseAttribute): 2012-05-02 Alexis Menard Unreviewed Qt build fix with GCC 4.7.0. * platform/qt/DeviceMotionProviderQt.h: (DeviceMotionProviderQt): * platform/qt/DeviceOrientationProviderQt.cpp: (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt): (WebCore): * platform/qt/DeviceOrientationProviderQt.h: (DeviceOrientationProviderQt): 2012-05-02 No'am Rosenthal [Texmap] Enable css filters in TextureMapperGL https://bugs.webkit.org/show_bug.cgi?id=75778 Unreviewed build fix to greenify the Qt Minimal bot. * platform/graphics/texmap/TextureMapperShaderManager.h: 2012-05-02 Philippe Normand [GTK] Compilation warnings in RenderTheme https://bugs.webkit.org/show_bug.cgi?id=85286 Reviewed by Martin Robinson. Removed un-needed code and refactored fileListNameForWidth accordingly to avoid un-used variable warnings during compilation. * platform/gtk/RenderThemeGtk.cpp: (WebCore): (WebCore::RenderThemeGtk::fileListNameForWidth): 2012-05-02 Ryosuke Niwa NULL ptr in WebCore::AppendNodeCommand::AppendNodeCommand https://bugs.webkit.org/show_bug.cgi?id=75843 Reviewed by Tony Chang. The crash was caused by indentIntoBlockquote's passing a bad outerBlock to moveParagraphsWithClone. When the position is created after blockquote in the following DOM: BODY * BLOCKQUOTE style=margin: 0 0 0 40px; border: none; padding: 0px; E #text "\nx\n" VisiblePosition's constructor (of startOfContents) turns the position into a legacy position (blockquote, 0). The crash occurs because this position doesn't belong in the same paragraph as E, which is the paragraph we're trying to move into the blockquote. Fixed bug by calling positionInParentAfterNode instead of positionAfterNode for now. We should eventually be able to use positionAfterNode here once VisiblePosition's constructor starts handling before/after positions properly. Test: editing/execCommand/indent-with-after-content-crash.html * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::indentIntoBlockquote): 2012-05-02 Jer Noble WebWindowFadeAnimation ignores "duration" parameter. https://bugs.webkit.org/show_bug.cgi?id=85386 Reviewed by Brady Eidson. Ignoring the "duration" parameter causes the full screen fade and scale animations to get out of sync. * platform/mac/WebWindowAnimation.mm: (-[WebWindowFadeAnimation initWithDuration:window:initialAlpha:finalAlpha:]): 2012-05-02 Julien Chaffraix REGRESSION(110072): Clipping is not applied on layers that are animated using platform code https://bugs.webkit.org/show_bug.cgi?id=83954 Reviewed by Simon Fraser. Tests: fast/layers/no-clipping-overflow-hidden-added-after-transform-expected.html fast/layers/no-clipping-overflow-hidden-added-after-transform.html fast/layers/no-clipping-overflow-hidden-added-after-transition-expected.html fast/layers/no-clipping-overflow-hidden-added-after-transition.html fast/layers/no-clipping-overflow-hidden-hardware-acceleration-expected.html fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html (and all the tests that will need to be rebaselined) r110072 changed the way we create layers to lazily allocate overflow: hidden ones based on layout overflow. However with hardware acceleration, certain operations do cause overflow without actually calling layout (the test cases added as part of this change are using transition / animation). This means that those cases wouldn't properly clip. Due to the above issue and the other regressions from r110072, the easiest fix is to just to roll it out. * rendering/RenderBox.h: Changed to allocate a layer whenever we have an overflow clip. * rendering/RenderBox.cpp: (WebCore::RenderBox::scrolledContentOffset): (WebCore::RenderBox::cachedSizeForOverflowClip): Reverted those 2 to avoid using the cached size logic. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateScrollInfoAfterLayout): (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::paint): (WebCore::RenderBlock::isPointInOverflowControl): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::willBeDestroyed): (WebCore::RenderBox::styleDidChange): (WebCore::RenderBox::layout): (WebCore::RenderBox::scrollWidth): (WebCore::RenderBox::scrollHeight): (WebCore::RenderBox::scrollLeft): (WebCore::RenderBox::scrollTop): (WebCore::RenderBox::setScrollLeft): (WebCore::RenderBox::setScrollTop): (WebCore::RenderBox::includeVerticalScrollbarSize): (WebCore::RenderBox::includeHorizontalScrollbarSize): (WebCore::RenderBox::pushContentsClip): (WebCore::RenderBox::popContentsClip): (WebCore::RenderBox::addLayoutOverflow): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleDidChange): * rendering/RenderBoxModelObject.h: (RenderBoxModelObject): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): * rendering/RenderTableRow.h: (RenderTableRow): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layout): Removed the previous scaffolding code and reverted some functions to being private (as they were prior to r110072). 2012-05-02 No'am Rosenthal [Texmap] Enable css filters in TextureMapperGL https://bugs.webkit.org/show_bug.cgi?id=75778 Reviewed by Jocelyn Turcotte. Added support for color filters in TextureMapperGL. Blur and shadow would be done in a different patch. Modified BitmapTexture::applyFilters to return a texture, since GL cannot paint a texture into itself. Created a shader map for standard filters, since all of them work more or less the same way with a single uniform. Added the colorization shaders based on the W3C filter spec, as already implemented in FEFilterRenderer.cpp and FEColorMatrix.cpp. We use two swapping textures to render the filters. Covered by tests in css3/filters. * platform/graphics/texmap/TextureMapper.cpp: (WebCore::TextureMapper::acquireTextureFromPool): * platform/graphics/texmap/TextureMapper.h: (WebCore::BitmapTexture::applyFilters): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::updateContents): (WebCore): (WebCore::TextureMapperGL::drawFiltered): (WebCore::BitmapTextureGL::applyFilters): (WebCore::BitmapTextureGL::bind): * platform/graphics/texmap/TextureMapperGL.h: (TextureMapperGL): (BitmapTextureGL): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::applyFilters): * platform/graphics/texmap/TextureMapperImageBuffer.h: (BitmapTextureImageBuffer): * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::applyFilters): (WebCore::TextureMapperLayer::syncCompositingStateSelf): * platform/graphics/texmap/TextureMapperShaderManager.cpp: (WebCore::TextureMapperShaderManager::~TextureMapperShaderManager): (WebCore): (WebCore::StandardFilterProgram::~StandardFilterProgram): (WebCore::StandardFilterProgram::StandardFilterProgram): (WebCore::StandardFilterProgram::create): (WebCore::StandardFilterProgram::prepare): (WebCore::TextureMapperShaderManager::getShaderForFilter): * platform/graphics/texmap/TextureMapperShaderManager.h: (WebCore): (StandardFilterProgram): (WebCore::StandardFilterProgram::vertexAttrib): (WebCore::StandardFilterProgram::texCoordAttrib): (WebCore::StandardFilterProgram::textureUniform): (TextureMapperShaderManager): 2012-05-02 Philippe Normand [GTK] media/track/track-cue-rendering-snap-to-lines-not-set.html fails https://bugs.webkit.org/show_bug.cgi?id=84378 Reviewed by Eric Carlson. Fix positioning of the controls panel back to relative, as it is in the parent CSS. Also remove some duplicate CSS attributes. * css/mediaControlsGtk.css: (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel): 2012-05-02 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=85309 supportsExpandedScrollbars() should check for the method we actually call rather than a related method -and corresponding- Reviewed by Anders Carlsson. * platform/mac/ScrollbarThemeMac.mm: (WebCore::supportsExpandedScrollbars): 2012-05-02 Zalan Bujtas [Qt] Remove redundant updateViewportArguments() call from HTMLBodyElement::didNotifyDescendantInseretions() https://bugs.webkit.org/show_bug.cgi?id=84241 Reviewed by Kenneth Rohde Christiansen. No need to update viewport arguments when the body element is inserted into the Document. Viewport arguments are updated first when the Document is set on the Frame, and later on any subsequent occurence of the viewport meta tag in the document. It is sufficient to dispatch viewport update once per main frame, if no viewport meta tag is present. Also add a flag to be able to track viewport argument update dispatch. No tests. Currrent viewport tests cover this behaviour. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::updateViewportArguments): (WebCore::Document::documentWillSuspendForPageCache): * dom/Document.h: (Document): (WebCore::Document::didDispatchViewportPropertiesChanged): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::didNotifyDescendantInseretions): 2012-05-02 Pavel Feldman Web Inspector: Cannot read property 'length' of undefined TextEditorModel.js:467 https://bugs.webkit.org/show_bug.cgi?id=85360 Reviewed by Yury Semikhatsky. Added the undo/redo stack length checks. * inspector/front-end/TextEditorModel.js: (WebInspector.TextEditorModel.endsWithBracketRegex.): 2012-05-02 Pavel Feldman WebInspector: Scripts panel editor dirty state is cleared when the tab with editor is closed. https://bugs.webkit.org/show_bug.cgi?id=85361 Reviewed by Yury Semikhatsky. Added content validation upon script show. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.wasShown): 2012-05-02 Pavel Feldman Web Inspector: breakpoints are de-activated only upon the second click. https://bugs.webkit.org/show_bug.cgi?id=85359 Reviewed by Yury Semikhatsky. Initial value for activated state is set. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel): 2012-05-02 Pavel Feldman Web Inspector: live edit fails to report error https://bugs.webkit.org/show_bug.cgi?id=85357 Reviewed by Yury Semikhatsky. ProtocolError is now a string, not an error object. * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._queryError): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.didEditContent): 2012-05-02 Lars Knudsen [Qt] Make DeviceMotion and DeviceOrientation work with WebKit2 https://bugs.webkit.org/show_bug.cgi?id=64595 Reviewed by Kenneth Rohde Christiansen. No new tests added. This change adds support for WK2 what was in WK1. Also moving DeviceMotion and DeviceOrientation clients and providers to WebCore. This is done to allow clean dependencies when statically linking WK2. * Target.pri: * WebCore.pri: * platform/qt/DeviceMotionClientQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp. (WebCore): (WebCore::DeviceMotionClientQt::~DeviceMotionClientQt): (WebCore::DeviceMotionClientQt::deviceMotionControllerDestroyed): (WebCore::DeviceMotionClientQt::setController): (WebCore::DeviceMotionClientQt::startUpdating): (WebCore::DeviceMotionClientQt::stopUpdating): (WebCore::DeviceMotionClientQt::currentDeviceMotion): * platform/qt/DeviceMotionClientQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h. (WebCore): (DeviceMotionClientQt): (WebCore::DeviceMotionClientQt::DeviceMotionClientQt): * platform/qt/DeviceMotionProviderQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp. (WebCore): (WebCore::DeviceMotionProviderQt::DeviceMotionProviderQt): (WebCore::DeviceMotionProviderQt::~DeviceMotionProviderQt): (WebCore::DeviceMotionProviderQt::setController): (WebCore::DeviceMotionProviderQt::start): (WebCore::DeviceMotionProviderQt::stop): (WebCore::DeviceMotionProviderQt::filter): * platform/qt/DeviceMotionProviderQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h. (WebCore): (DeviceMotionProviderQt): (WebCore::DeviceMotionProviderQt::currentDeviceMotion): * platform/qt/DeviceOrientationClientQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp. (WebCore): (WebCore::DeviceOrientationClientQt::deviceOrientationControllerDestroyed): (WebCore::DeviceOrientationClientQt::setController): (WebCore::DeviceOrientationClientQt::startUpdating): (WebCore::DeviceOrientationClientQt::stopUpdating): (WebCore::DeviceOrientationClientQt::lastOrientation): * platform/qt/DeviceOrientationClientQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h. (WebCore): (DeviceOrientationClientQt): * platform/qt/DeviceOrientationProviderQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp. (WebCore): (WebCore::DeviceOrientationProviderQt::DeviceOrientationProviderQt): (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt): (WebCore::DeviceOrientationProviderQt::setController): (WebCore::DeviceOrientationProviderQt::start): (WebCore::DeviceOrientationProviderQt::stop): (WebCore::DeviceOrientationProviderQt::filter): * platform/qt/DeviceOrientationProviderQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h. (WebCore): (DeviceOrientationProviderQt): (WebCore::DeviceOrientationProviderQt::isActive): (WebCore::DeviceOrientationProviderQt::lastOrientation): (WebCore::DeviceOrientationProviderQt::hasAlpha): 2012-05-02 Yury Semikhatsky Web Inspector: exception in console when there are watch expressions https://bugs.webkit.org/show_bug.cgi?id=85351 Check if script execution is still paused before trying to resolve an object for script popover because execution may be resumed after popover showing is scheduled but before we start resolving the object under the cursor in which case there is no selected call frame any more and we should hide the popover. Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover): 2012-05-02 Tommy Widenflycht MediaStream API: Changing webkitGetUserMedia to take an object instead of a string https://bugs.webkit.org/show_bug.cgi?id=84850 Reviewed by Dimitri Glazkov. The standard changed a while back to use an object as a dictionary but since JSC didn't support the Dictionary class until just recently we have not updated the API until now. Change covered by existing, and edited, tests. * Modules/mediastream/NavigatorMediaStream.cpp: (WebCore::NavigatorMediaStream::webkitGetUserMedia): * Modules/mediastream/NavigatorMediaStream.h: (WebCore): (NavigatorMediaStream): * Modules/mediastream/NavigatorMediaStream.idl: * Modules/mediastream/UserMediaRequest.cpp: (WebCore::UserMediaRequest::create): (WebCore::UserMediaRequest::UserMediaRequest): * Modules/mediastream/UserMediaRequest.h: (WebCore): (UserMediaRequest): * platform/mediastream/MediaStreamSourcesQueryClient.h: (MediaStreamSourcesQueryClient): 2012-05-02 Antti Koivisto StyleSheetInternal::parseUserStyleSheet() should be called parseAuthorStyleSheet(). Rubber-stamped by Nikolas Zimmermann. * css/CSSImportRule.cpp: (WebCore::StyleRuleImport::setCSSStyleSheet): * css/CSSStyleSheet.cpp: (WebCore::StyleSheetInternal::parseAuthorStyleSheet): * css/CSSStyleSheet.h: (StyleSheetInternal): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): 2012-05-02 Yury Semikhatsky REGRESSION: Web Inspector doesn't show cookies anymore https://bugs.webkit.org/show_bug.cgi?id=85349 Pass root node instead of DataGrid object to the "populateNode" method. Added compiler annotations so that closure compiler catches such errors. Reviewed by Pavel Feldman. * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable.prototype._rebuildTable): * inspector/front-end/NetworkRequest.js: (WebInspector.NetworkRequest.prototype.addFrameError): 2012-05-02 Dongwoo Im [EFL] Implement the Web Audio API feature. https://bugs.webkit.org/show_bug.cgi?id=78688 Reviewed by Philippe Normand. Implement the Web Audio API feature on the EFL port. https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html * CMakeLists.txt: Add the list of the files which are needed for the Web Audio APi. * PlatformEfl.cmake: Add the list of the files which are needed for the Web Audio APi. * UseJSC.cmake: Add the list of the files which are needed for the Web Audio APi. * platform/audio/HRTFElevation.cpp: Enable the USE_CONCATENATED_IMPULSE_RESPONSES macro. (WebCore): * platform/audio/efl/AudioBusEfl.cpp: Added. (WebCore): (WebCore::AudioBus::loadPlatformResource): Create the absolute path of the audio resource. 2012-05-01 Kentaro Hara [V8] Add an Isolate parameter to setJSWrapperForXXX() https://bugs.webkit.org/show_bug.cgi?id=85329 Reviewed by Adam Barth. The objective is to pass Isolate around in V8 bindings. This patch adds an Isolate parameter to setJSWrapperForXXX() and passes Isolate to setJSWrapperForXXX() in CodeGeneratorV8.pm. I'll pass Isolate to setJSWrapperForXXX() in custom bindings in a follow-up patch. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: Modified as described above. (GenerateConstructorCallback): (GenerateEventConstructorCallback): (GenerateNamedConstructorCallback): (GenerateToV8Converters): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode): * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests results. (WebCore::V8Float64Array::wrapSlow): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore::V8TestActiveDOMObject::wrapSlow): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore::V8TestCustomNamedGetter::wrapSlow): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore::V8TestEventConstructor::constructorCallback): (WebCore::V8TestEventConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore::V8TestEventTarget::wrapSlow): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::constructorCallback): (WebCore::V8TestInterface::wrapSlow): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore::V8TestMediaQueryListListener::wrapSlow): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): (WebCore::V8TestNamedConstructor::wrapSlow): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore::V8TestNode::constructorCallback): (WebCore::V8TestNode::wrapSlow): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::constructorCallback): (WebCore::V8TestObj::wrapSlow): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): (WebCore::V8TestSerializedScriptValueInterface::wrapSlow): 2012-05-01 Eric Seidel Add