2011-12-16 Jarred Nicholls Support HTML documents in XHR.responseXML https://bugs.webkit.org/show_bug.cgi?id=74626 Latest W3C XHR spec details for the responseXML attribute: http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-responsexml-attribute http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#document-response-entity-body XHR.responseXML was not compliant per the latest editor's draft of the XHR spec. The following compliance issue have been corrected: - A responseType of "text" should disallow access to responseXML by throwing an InvalidState exception. - When the error flag is toggled, responseXML should return "null" immediately and not attempt to create a new Document. - responseXML should return a valid HTML document when the MIME type is "text/html", but only when the caller has explicitly set responseType to "document". Reviewed by Alexey Proskuryakov. Tests: fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks.html fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-strict.html fast/xmlhttprequest/xmlhttprequest-responseXML-html-no-responsetype.html fast/xmlhttprequest/xmlhttprequest-responseXML-invalid-xml.html fast/xmlhttprequest/xmlhttprequest-responseXML-xml-document-responsetype.html fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): (WebCore::XMLHttpRequest::clearResponseBuffers): * xml/XMLHttpRequest.h: Rename m_responseXML to m_responseDocument (WebCore::XMLHttpRequest::optionalResponseXML): 2011-12-16 Ryosuke Niwa Only EditCommandComposition should implement unapply and reapply https://bugs.webkit.org/show_bug.cgi?id=74490 Reviewed by Eric Seidel. Introduce new abstract class UndoStep to replace EditCommand for EditorClient, and make EditCommand private to WebCore. * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * editing/CompositeEditCommand.cpp: (WebCore::EditCommandComposition::create): Takes EditAction instead of boolean for CreateLinkCommand. (WebCore::EditCommandComposition::EditCommandComposition): Ditto. (WebCore::EditCommandComposition::unapply): Moved from EditCommand; we don't have to call isTopLevelCommand anymore because EditCommandComposition is always top-level. In fact, the only thing unapply/reapply do in addition to what doUnapply/doReapply do for sub-level commands is disabling and enabling delete button and defining an event queue scope. However, these can be done at top-level command anyway, so we now only call doApply for sub-level commands. (WebCore::EditCommandComposition::reapply): Ditto. (WebCore::EditCommandComposition::setStartingSelection): Added. (WebCore::EditCommandComposition::setEndingSelection): Added. (WebCore::applyCommand): Moved from EditCommand. (WebCore::CompositeEditCommand::apply): Moved from EditCommand; doesn't call isTopLevelCommand for the same reason. (WebCore::CompositeEditCommand::ensureComposition): (WebCore::CompositeEditCommand::applyCommandToComposite): Call doApply instead of apply for the same reason. * editing/CompositeEditCommand.h: (WebCore::EditCommandComposition::wasCreateLinkCommand): (WebCore::EditCommandComposition::startingSelection): Added. (WebCore::EditCommandComposition::endingSelection): Added. * editing/EditCommand.cpp: (WebCore::EditCommand::setStartingSelection): (WebCore::EditCommand::setEndingSelection): (WebCore::SimpleEditCommand::doReapply): Moved from EditCommand. * editing/EditCommand.h: * editing/UndoStep.h: Added. (WebCore::UndoStep::~UndoStep): * loader/EmptyClients.h: (WebCore::EmptyEditorClient::shouldInsertNode): (WebCore::EmptyEditorClient::didSetSelectionTypesForPasteboard): (WebCore::EmptyEditorClient::registerCommandForUndo): Takes UndoStep instead of EditCommand. (WebCore::EmptyEditorClient::registerCommandForRedo): Ditto. * page/EditorClient.h: 2011-12-16 Simon Fraser Allow a PlatformCALayer to own its own sublayers https://bugs.webkit.org/show_bug.cgi?id=74744 Reviewed by Anders Carlsson. GraphicsLayerCA rebuilds the sublayer list of CALayers, which would blow away any custom layers that a PlatformCALayer wants to maintain as children. Make it possible for a PlatformLayerCA to indicate that it wants a specific list of sublayers to be maintained as the first layers in the child list. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateSublayerList): * platform/graphics/ca/PlatformCALayer.h: (WebCore::PlatformCALayer::customSublayers): * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::PlatformCALayer): 2011-12-16 Adam Barth

A
doesn't parse correctly https://bugs.webkit.org/show_bug.cgi?id=74658 Reviewed by Darin Adler. Previously, we handled skipping newlines after
 in the tokenizer,
        which isn't how the spec handles them.  Instead, the spec skips them in
        the tree builder.  This isn't usually observable, except in the case of
        an HTML entity.  In that case, the tokenzier sees '&' (because the
        entity hasn't been decoded yet), but the tree builder sees '\n' (the
        decoded entity).  This patch fixes the bug by more closely aligning our
        implementation with the spec.

        Test: html5lib/runner.html

        * html/parser/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::reset):
        (WebCore::HTMLTokenizer::nextToken):
        * html/parser/HTMLTokenizer.h:
        * html/parser/HTMLTreeBuilder.cpp:
        (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
        (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
        (WebCore::HTMLTreeBuilder::processStartTagForInBody):
        (WebCore::HTMLTreeBuilder::processCharacterBuffer):
        * html/parser/HTMLTreeBuilder.h:
        * xml/parser/MarkupTokenizerBase.h:

2011-12-16  Joshua Bell  

        IndexedDB: Implement IDBObjectStore.count() and IDBIndex.count()
        https://bugs.webkit.org/show_bug.cgi?id=73686

        Reviewed by Tony Chang.

        These new methods open an internal cursor and iterate through the
        results, returning the number of items found. Note that only
        passing an IDBKeyRange is supported, not an IDBKey. Supporting
        that will require some IDL/binding monkeying; several other
        methods also need the same Key-or-KeyRange behavior.

        Tests: storage/indexeddb/index-count.html
               storage/indexeddb/objectstore-count.html

        * bindings/v8/SerializedScriptValue.cpp:
        (WebCore::SerializedScriptValue::numberValue):
        * bindings/v8/SerializedScriptValue.h:
        * storage/IDBIndex.cpp:
        (WebCore::IDBIndex::openCursor):
        (WebCore::IDBIndex::count):
        * storage/IDBIndex.h:
        (WebCore::IDBIndex::count):
        * storage/IDBIndex.idl:
        * storage/IDBIndexBackendImpl.cpp:
        (WebCore::IDBIndexBackendImpl::countInternal):
        (WebCore::IDBIndexBackendImpl::count):
        * storage/IDBIndexBackendImpl.h:
        * storage/IDBIndexBackendInterface.h:
        * storage/IDBObjectStore.cpp:
        (WebCore::IDBObjectStore::count):
        * storage/IDBObjectStore.h:
        (WebCore::IDBObjectStore::count):
        * storage/IDBObjectStore.idl:
        * storage/IDBObjectStoreBackendImpl.cpp:
        (WebCore::IDBObjectStoreBackendImpl::count):
        (WebCore::IDBObjectStoreBackendImpl::countInternal):
        * storage/IDBObjectStoreBackendImpl.h:
        * storage/IDBObjectStoreBackendInterface.h:

2011-12-16  Yael Aharon  

        Audio file in video element has a size of 0x0 .
        https://bugs.webkit.org/show_bug.cgi?id=74738

        Reviewed by Kenneth Rohde Christiansen.

        When the source of a video element has audio only, the intrinsic size of the video should
        not be 0x0. Instead, it should be the same as as no media was loaded.

        No new tests. An existing test is covering this case and was modified to reflect this change.

        * rendering/RenderVideo.cpp:
        (WebCore::RenderVideo::calculateIntrinsicSize):

2011-12-16  Alexis Menard  

        getComputedStyle for border-width is not implemented.
        https://bugs.webkit.org/show_bug.cgi?id=74635

        Reviewed by Tony Chang.

        Implement getComputedStyle for border-width.

        Test: fast/css/getComputedStyle/getComputedStyle-border-width.html

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

2011-12-16  Branimir Lambov  

        [chromium] svg/clip-path/clip-in-mask.svg fails on Windows and Linux
        https://bugs.webkit.org/show_bug.cgi?id=53378

        Reviewed by Tony Chang.

        Fixes a problem in Skia's clipping layer code's handling of coordinate
        transformations that was causing all complex clipping (including text
        and/or masks) to fail.

        The method beginLayerClippedToImage was taking rectangle coordinates
        in one local coordinate space, but it was applying them in a different  
        one because of the delay between the time it is called and the actual 
        application occurs in applyClipFromImage. The fix translates the 
        coordinates passed to beginLayerClippedToImage to absolute ones, so 
        that they are not affected by any change in the transform matrix, and 
        makes sure that applyClipFromImage clears the matrix before drawing
        the clip layer to correctly apply the absolute coordinates.

        * platform/graphics/skia/PlatformContextSkia.cpp:
        (WebCore::PlatformContextSkia::beginLayerClippedToImage):
        (WebCore::PlatformContextSkia::applyClipFromImage):
        * platform/graphics/skia/PlatformContextSkia.h:

2011-12-16  Mark Hahnenberg  

        De-virtualize destructors
        https://bugs.webkit.org/show_bug.cgi?id=74331

        Reviewed by Geoffrey Garen.

        No new tests.

        Doing everything here that was done to the JSCell hierarchy in JavaScriptCore. 
        See the ChangeLog for this commit for a more in-depth description.

        * WebCore.exp.in: Add/remove symbols.
        * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Remove first arg from isJSArray call.
        (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
        * bindings/js/JSDOMBinding.cpp: Add trival destructor assert for DOMConstructorObject 
        and DOMConstructorWithDocument.
        * bindings/js/JSDOMGlobalObject.cpp: Add static destroy.  Add implementation for 
        scriptExecutionContext that dispatches to different functions in subclasses 
        depending on our current ClassInfo.  We do this so that we can get rid of the 
        virtual-ness of scriptExecutionContext, because any virtual functions will throw 
        off the layout of the object and we'll crash at runtime.
        (WebCore::JSDOMGlobalObject::destroy):
        (WebCore::JSDOMGlobalObject::scriptExecutionContext):
        * bindings/js/JSDOMGlobalObject.h:
        * bindings/js/JSDOMWindowBase.cpp: Add static destroy.
        (WebCore::JSDOMWindowBase::destroy):
        * bindings/js/JSDOMWindowBase.h: De-virtualize scriptExecutionContext.
        * bindings/js/JSDOMWindowShell.cpp: Add static destroy.
        (WebCore::JSDOMWindowShell::destroy):
        * bindings/js/JSDOMWindowShell.h:
        * bindings/js/JSDOMWrapper.cpp: Add trivial destructor assert.
        * bindings/js/JSDOMWrapper.h: Add a ClassInfo to JSDOMWrapper since it now overrides 
        a MethodTable function. Remove vtableAnchor virtual function.
        * bindings/js/JSImageConstructor.cpp: Add trivial destructor assert.
        * bindings/js/JSNodeCustom.cpp: Change implementation of pushEventHandlerScope so that 
        it dispatches to the correct function depending on the 
        identity of the class as specified by the ClassInfo.  
        See JSDOMGlobalObject::scriptExecutionContext for explanation.
        (WebCore::JSNode::pushEventHandlerScope):
        * bindings/js/JSWebSocketCustom.cpp: Remove first arg to isJSArray call.
        (WebCore::JSWebSocketConstructor::constructJSWebSocket):
        * bindings/js/JSWorkerContextBase.cpp: Add static destroy.
        (WebCore::JSWorkerContextBase::destroy):
        * bindings/js/JSWorkerContextBase.h: 
        * bindings/js/ScriptValue.cpp: Remove first arg to isJSArray call.
        (WebCore::jsToInspectorValue): 
        * bindings/js/SerializedScriptValue.cpp: Ditto.
        (WebCore::CloneSerializer::isArray):
        (WebCore::CloneSerializer::getSparseIndex):
        * bindings/scripts/CodeGeneratorJS.pm:
        (GenerateHeader): Remove virtual-ness of any custom pushEventHandlerScope (see 
        JSNodeCustom::pushEventHandlerScope for explanation).  Remove virtual toBoolean 
        for anybody who masquerades as undefined, since our JSObject implementation handles 
        this based on the TypeInfo in the Structure. Add trivial destructor assert for any 
        class other than DOMWindow or WorkerContexts.
        (GenerateImplementation): Change ClassInfo definitions to use Base::s_info, since 
        typing the parent class more than once is duplication of information and increases 
        the likelihood of mistakes.  Pass ClassInfo to TypeArrayDescriptors instead of vptr. 
        (GenerateConstructorDefinition): Add trivial destructor assert for all generated constructors.
        * bridge/c/CRuntimeObject.cpp: Remove empty virtual destructor.
        * bridge/c/CRuntimeObject.h: 
        * bridge/jni/jsc/JavaRuntimeObject.cpp: Ditto.
        * bridge/jni/jsc/JavaRuntimeObject.h: 
        * bridge/objc/ObjCRuntimeObject.h: Ditto.
        * bridge/objc/ObjCRuntimeObject.mm:
        * bridge/objc/objc_runtime.h: Add static destroy for ObjcFallbackObjectImp. De-virtualize 
        toBoolean in the short term.  Need longer term fix.
        * bridge/objc/objc_runtime.mm:
        (JSC::Bindings::ObjcFallbackObjectImp::destroy):
        * bridge/qt/qt_runtime.cpp: Add static destroy to QtRuntimeMethod.
        (JSC::Bindings::QtRuntimeMethod::destroy):
        * bridge/qt/qt_runtime.h: De-virtualize ~QtRuntimeMethod.
        * bridge/runtime_array.cpp: De-virtualize destructor. Add static destroy.
        (JSC::RuntimeArray::destroy):
        * bridge/runtime_array.h:
        * bridge/runtime_method.cpp: Remove vtableAnchor. Add static destroy.
        (JSC::RuntimeMethod::destroy):
        * bridge/runtime_method.h:
        * bridge/runtime_object.cpp: Add static destroy.
        (JSC::Bindings::RuntimeObject::destroy):
        * bridge/runtime_object.h:

2011-12-15  Alexey Proskuryakov  

        Poor XPath performance when evaluating an expression that returns a lot of nodes
        https://bugs.webkit.org/show_bug.cgi?id=74665
        

        Reviewed by Darin Adler.

        No change in funcitonality. Well covered by existing tests (ran them with zero cutoff to
        execute the new code path).

        Our sorting function is optimized for small node sets in large documents, and this is the
        opposite of it. Added another one that traverses the whole document, adding nodes from the
        node set to sorted list. That doesn't grow with the number of nodes nearly as fast.

        Cutoff amount chosen for the document referenced in bug - this is roughly where the algorithms
        have the same performance on it.

        * xml/XPathNodeSet.cpp:
        (WebCore::XPath::NodeSet::sort):
        (WebCore::XPath::findRootNode):
        (WebCore::XPath::NodeSet::traversalSort):
        * xml/XPathNodeSet.h:

2011-12-15  Antti Koivisto  

        https://bugs.webkit.org/show_bug.cgi?id=74677
        Count ResourceLoadScheduler suspends/resumes

        Reviewed by Andreas Kling.

        Using boolean is not robust when there are multiple clients calling suspendPendingRequests/resumePendingRequests.
        
        Increment and decrement suspend count instead of just setting/unsetting a boolean.

        * loader/ResourceLoadScheduler.cpp:
        (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
        (WebCore::ResourceLoadScheduler::servePendingRequests):
        (WebCore::ResourceLoadScheduler::suspendPendingRequests):
        (WebCore::ResourceLoadScheduler::resumePendingRequests):
        * loader/ResourceLoadScheduler.h:
        (WebCore::ResourceLoadScheduler::isSuspendingPendingRequests):

2011-12-16  Adam Klein  

        Improve performance of ChildListMutationScope when no MutationObservers are present
        https://bugs.webkit.org/show_bug.cgi?id=74671

        Reviewed by Ojan Vafai.

        Inline ChildListMutationScope's methods (including constructor and
        destructor), and provide a fast-fail case when no mutation observers
        are present.

        The code reorganization necessary for the above also removed the
        anonymous namespace in ChildListMutationScope.cpp, making both helper
        classes private inner classes of ChildListMutationScope.

        No new tests, refactoring only.

        * dom/ChildListMutationScope.cpp:
        (WebCore::ChildListMutationScope::MutationAccumulator::MutationAccumulator):
        (WebCore::ChildListMutationScope::MutationAccumulator::~MutationAccumulator):
        (WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder):
        (WebCore::ChildListMutationScope::MutationAccumulator::childAdded):
        (WebCore::ChildListMutationScope::MutationAccumulator::isRemovedNodeInOrder):
        (WebCore::ChildListMutationScope::MutationAccumulator::willRemoveChild):
        (WebCore::ChildListMutationScope::MutationAccumulator::enqueueMutationRecord):
        (WebCore::ChildListMutationScope::MutationAccumulator::clear):
        (WebCore::ChildListMutationScope::MutationAccumulator::isEmpty):
        (WebCore::ChildListMutationScope::MutationAccumulationRouter::MutationAccumulationRouter):
        (WebCore::ChildListMutationScope::MutationAccumulationRouter::~MutationAccumulationRouter):
        (WebCore::ChildListMutationScope::MutationAccumulationRouter::initialize):
        (WebCore::ChildListMutationScope::MutationAccumulationRouter::instance):
        (WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded):
        (WebCore::ChildListMutationScope::MutationAccumulationRouter::willRemoveChild):
        (WebCore::ChildListMutationScope::MutationAccumulationRouter::incrementScopingLevel):
        (WebCore::ChildListMutationScope::MutationAccumulationRouter::decrementScopingLevel):
        * dom/ChildListMutationScope.h:
        (WebCore::ChildListMutationScope::ChildListMutationScope):
        (WebCore::ChildListMutationScope::~ChildListMutationScope):
        (WebCore::ChildListMutationScope::childAdded):
        (WebCore::ChildListMutationScope::willRemoveChild):

2011-12-16  Dean Jackson  

        Filters need to affect visual overflow
        https://bugs.webkit.org/show_bug.cgi?id=71930

        Reviewed by Simon Fraser.

        Make sure filters are included in visual overflow.
        Add a new method to calculate the expansion of overflow
        region given a list of FilterOperations. This is a slight
        duplication of code from the rendering path, but is needed
        because overflow is calculated before the FilterEffect
        chain is built.

        Also, filters were always rendered into their
        input rectangle which was wrong for any effect
        that produced a different sized result - drop-shadow
        and blur. This required two changes. First, FilterEffect
        needed a flag to decide whether or not to clip
        output to primitive regions (as required by SVG but not
        what we want here). Second, the rendering operation
        draws into the rectangle the filter claims is its painting
        rectangle.

        Test: css3/filters/regions-expanding.html

        * platform/graphics/filters/FEDropShadow.cpp:
        (WebCore::FEDropShadow::determineAbsolutePaintRect): Only
        clipToBounds if necessary.
        * platform/graphics/filters/FEGaussianBlur.cpp:
        (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): CSS filters
        ask for the kernel size before the Filter object is created, so
        add a new method to return an unscaled kernel.
        (WebCore::FEGaussianBlur::calculateKernelSize):
        (WebCore::FEGaussianBlur::determineAbsolutePaintRect): Only
        clipToBounds if necessary.
        * platform/graphics/filters/FEGaussianBlur.h:
        * platform/graphics/filters/FEMorphology.cpp:
        (WebCore::FEMorphology::determineAbsolutePaintRect): Only
        clipToBounds if necessary.
        * platform/graphics/filters/FEOffset.cpp:
        (WebCore::FEOffset::determineAbsolutePaintRect): Only
        clipToBounds if necessary.
        * platform/graphics/filters/FilterEffect.cpp:
        (WebCore::FilterEffect::FilterEffect): Initialize clipToBounds
        as false so SVG remains unchanged.
        (WebCore::FilterEffect::determineAbsolutePaintRect): Only
        clipToBounds if necessary.
        * platform/graphics/filters/FilterEffect.h:
        (WebCore::FilterEffect::clipsToBounds):
        (WebCore::FilterEffect::setClipsToBounds):
        * rendering/FilterEffectRenderer.cpp:
        (WebCore::FilterEffectRenderer::build): Make sure we set our
        filters here to NOT clip to bounds.
        * rendering/FilterEffectRenderer.h:
        (WebCore::FilterEffectRenderer::outputRect): Asks the filter
        operation for the size of the result image.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::computeOverflow):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::addVisualEffectOverflow): Change the name
        from addBoxShadowAndBorderOverflow().
        * rendering/RenderBox.h:
        * rendering/RenderEmbeddedObject.cpp:
        (WebCore::RenderEmbeddedObject::layout):
        * rendering/RenderIFrame.cpp:
        (WebCore::RenderIFrame::layout):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayer):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::hasBoxDecorations): Change name from
        hasBorderOutlineOrShadow().
        (WebCore::hasBoxDecorationsOrBackground):
        (WebCore::hasBoxDecorationsOrBackgroundImage):
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::layout):
        * rendering/style/FilterOperations.cpp:
        (WebCore::outsetSizeForBlur): Return an IntSize that is the amount
        of offset.
        (WebCore::FilterOperations::hasOutsets):
        (WebCore::FilterOperations::getOutsets):
        * rendering/style/FilterOperations.h:
        * rendering/style/RenderStyle.h:
        (WebCore::InheritedFlags::getFilterOutsets):
        (WebCore::InheritedFlags::hasFilterOutsets):
        * svg/graphics/filters/SVGFEImage.cpp:
        (WebCore::FEImage::determineAbsolutePaintRect): Only
        clipToBounds if necessary.

2011-12-16  Alexis Menard  , Jakub Wieczorek  

        Add support for 
    . https://bugs.webkit.org/show_bug.cgi?id=36724 The reversed attribute makes an ordered list appear with marker values decreasing from n, where n is the number of items. See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed Reviewed by Darin Adler. Tests: fast/lists/ol-reversed-dynamic-simple.html fast/lists/ol-reversed-dynamic.html fast/lists/ol-reversed-nested-items.html fast/lists/ol-reversed-nested-list.html fast/lists/ol-reversed-simple.html * html/HTMLAttributeNames.in: * html/HTMLOListElement.cpp: (WebCore::HTMLOListElement::HTMLOListElement): (WebCore::HTMLOListElement::parseMappedAttribute): (WebCore::HTMLOListElement::updateItemValues): (WebCore::HTMLOListElement::recalculateItemCount): * html/HTMLOListElement.h: (WebCore::HTMLOListElement::start): (WebCore::HTMLOListElement::isReversed): (WebCore::HTMLOListElement::itemCountChanged): (WebCore::HTMLOListElement::itemCount): * html/HTMLOListElement.idl: * rendering/RenderListItem.cpp: (WebCore::RenderListItem::nextListItem): (WebCore::previousListItem): (WebCore::RenderListItem::calcValue): (WebCore::RenderListItem::explicitValueChanged): (WebCore::previousOrNextItem): (WebCore::RenderListItem::updateListMarkerNumbers): * rendering/RenderListItem.h: 2011-12-16 Mikhail Naganov Scroll non-visible edit controls and caret into the center of the view when starting typing. https://bugs.webkit.org/show_bug.cgi?id=65027 Reviewed by Ryosuke Niwa. Tests: editing/input/caret-at-the-edge-of-contenteditable.html editing/input/caret-at-the-edge-of-input.html editing/input/reveal-caret-of-multiline-contenteditable.html editing/input/reveal-caret-of-multiline-input.html editing/input/reveal-contenteditable-on-input-vertically.html editing/input/reveal-contenteditable-on-paste-vertically.html editing/input/reveal-edit-on-input-vertically.html editing/input/reveal-edit-on-paste-vertically.html * editing/Editor.cpp: (WebCore::Editor::insertTextWithoutSendingTextEvent): (WebCore::Editor::revealSelectionAfterEditingOperation): 2011-12-16 Ryosuke Niwa Touch RenderStyle in an attempt to fix linking errors on Chromium Windows bots. * rendering/style/RenderStyle.h: 2011-12-14 Nat Duca [chromium] DelayBasedTimeSource should not change its timebase on late ticks https://bugs.webkit.org/show_bug.cgi?id=74573 The original DelayBasedTimeSource was designed to shift its timebase to the tick time when a tick came back "late." The rationale was that it is better to just "start fresh" after a stutter. After profiling this, this time-rebasing just destabilizes frame rate anytime the thread gets loaded. This patch keeps the timebase stationary, leading to vastly smoother framerates when the message loop is under load. Reviewed by James Robinson. * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp: (WebCore::CCDelayBasedTimeSource::updateState): 2011-12-16 Sheriff Bot Unreviewed, rolling out r103062. http://trac.webkit.org/changeset/103062 https://bugs.webkit.org/show_bug.cgi?id=74715 It broke many tests (Requested by Ossy on #webkit). * html/HTMLAttributeNames.in: * html/HTMLOListElement.cpp: (WebCore::HTMLOListElement::HTMLOListElement): (WebCore::HTMLOListElement::parseMappedAttribute): * html/HTMLOListElement.h: (WebCore::HTMLOListElement::start): * html/HTMLOListElement.idl: * rendering/RenderListItem.cpp: (WebCore::previousListItem): (WebCore::RenderListItem::calcValue): (WebCore::RenderListItem::explicitValueChanged): (WebCore::RenderListItem::updateListMarkerNumbers): * rendering/RenderListItem.h: 2011-12-16 Alexis Menard , Jakub Wieczorek Add support for
      . https://bugs.webkit.org/show_bug.cgi?id=36724 The reversed attribute makes an ordered list appear with marker values decreasing from n, where n is the number of items. See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed Reviewed by Darin Adler. Tests: fast/lists/ol-reversed-dynamic-simple.html fast/lists/ol-reversed-dynamic.html fast/lists/ol-reversed-nested-items.html fast/lists/ol-reversed-nested-list.html fast/lists/ol-reversed-simple.html * html/HTMLAttributeNames.in: * html/HTMLOListElement.cpp: (WebCore::HTMLOListElement::HTMLOListElement): (WebCore::HTMLOListElement::parseMappedAttribute): (WebCore::HTMLOListElement::updateItemValues): (WebCore::HTMLOListElement::recalculateItemCount): * html/HTMLOListElement.h: (WebCore::HTMLOListElement::start): (WebCore::HTMLOListElement::isReversed): (WebCore::HTMLOListElement::itemCountChanged): (WebCore::HTMLOListElement::itemCount): * html/HTMLOListElement.idl: * rendering/RenderListItem.cpp: (WebCore::RenderListItem::nextListItem): (WebCore::previousListItem): (WebCore::RenderListItem::calcValue): (WebCore::RenderListItem::explicitValueChanged): (WebCore::previousOrNextItem): (WebCore::RenderListItem::updateListMarkerNumbers): * rendering/RenderListItem.h: 2011-12-15 Stephen White Enable CSS_FILTERS in Chromium. https://bugs.webkit.org/show_bug.cgi?id=74334 Reviewed by Chris Marrin. Covered by css3/filters (when enabled). * platform/graphics/filters/FilterOperation.h: (WebCore::PassthroughFilterOperation::PassthroughFilterOperation): Since wingdi.h #define's PASSTHROUGH, #undef it after the includes. 2011-12-16 Patrick Gansterer Unreviewed WinCE build fix after r102979. Make everHadLayout() public accessible as it was before the change. * rendering/RenderObject.h: (WebCore::RenderObject::everHadLayout): 2011-12-15 Hans Wennborg IndexedDB: Don't prefetch values from key cursors https://bugs.webkit.org/show_bug.cgi?id=74604 Reviewed by Tony Chang. Since index key cursors don't have values, prefetching should not try to retrieve them. Doing so trips an ASSERT in debug builds. This will be tested Chromium-side. * storage/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::prefetchContinueInternal): 2011-12-16 Yosifumi Inoue [Forms] The "maxlength" attribute on "textarea" tag miscounts hard newlines https://bugs.webkit.org/show_bug.cgi?id=74686 Reviewed by Kent Tamura. This patch counts LF in textarea value as two for LF to CRLF conversion on submission. No new tests. Existing tests cover all changes. * html/HTMLTextAreaElement.cpp: (WebCore::computeLengthForSubmission): Count LF as 2 for CR LF conversion on submission. (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent): Use computeLengthForSubmission instead of numGraphemeClusters. (WebCore::HTMLTextAreaElement::tooLong): Use computeLengthForSubmission instead of numGraphemeClusters. 2011-12-16 Hajime Morrita Unreviewed, rolling out r103045. http://trac.webkit.org/changeset/103045 https://bugs.webkit.org/show_bug.cgi?id=74590 Breaks select-script-onchange.html on Chromium Windows * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::typeAheadFind): 2011-12-16 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.list.am: Add missing header file. 2011-12-16 Yosifumi Inoue [Forms] Selection change by type-ahead doesn't fire 'change' event https://bugs.webkit.org/show_bug.cgi?id=74590 Reviewed by Kent Tamura. Fire onchange even for type ahead selection. Test: fast/forms/select/menulist-type-ahead-find.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::typeAheadFind): Add DispatchChangeEvent when calling selectOption method. 2011-12-16 Andreas Kling Don't call Document::body() twice in the same function. Reviewed by Dan Bernstein. Document::body() is O(n), so we should avoid calling it multiple times unnecessarily. * dom/Document.cpp: (WebCore::Document::updateLayoutIgnorePendingStylesheets): 2011-12-16 Daniel Sievers [Chromium] Add trace events for decoding and drawing images. https://bugs.webkit.org/show_bug.cgi?id=74547 Reviewed by James Robinson. * platform/graphics/skia/ImageSkia.cpp: (WebCore::drawResampledBitmap): (WebCore::paintSkBitmap): (WebCore::Image::drawPattern): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::resizedBitmap): * platform/image-decoders/bmp/BMPImageDecoder.cpp: (WebCore::BMPImageDecoder::decode): * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::decode): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::decode): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageDecoder::decode): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::decode): * platform/image-decoders/webp/WEBPImageDecoder.cpp: (WebCore::WEBPImageDecoder::decode): 2011-12-15 Martin Robinson Fix 'make dist' in preparation for the GTK+ release. * GNUmakefile.list.am: Add missing header. 2011-12-15 Rafael Ávila de Espíndola Don't create empty files on error. https://bugs.webkit.org/show_bug.cgi?id=74373 Reviewed by Ryosuke Niwa. * css/makeprop.pl: * css/makevalues.pl: * make-hash-tools.pl: 2011-12-15 Yongjun Zhang PODIntervalTree takes 1.7MB memory on www.nytimes.com. https://bugs.webkit.org/show_bug.cgi?id=73712 Reviewed by Kenneth Russell. For a RenderBlock which has floating objects inside, we will create a PODIntervalTree and a PODArena with at least one 16KB chunk. A page could have a large number of such RenderBlocks and they could take huge amount of memory. To fix that, we can create a shared PODArena in the root RenderView. Instead of having their own PODArena, each RenderBlock with floating objects could share this PODArena to reduce memory consumption. The shared PODArena could grow unboundedly if we keep removing and adding floating objects. We can fix that by reusing the freed memory in each chunk. However, a PODArena could allocate objects of different sizes and it would be complex to keep track of the size for each allocation in PODArena. To address that, this patch added class PODFreeListArena which only allocates objects of type T (hence the same size). We can then use a free list to track freed nodes inside the chunk and reuse the free nodes in future allocations. Manually tested on nytimes.com and the heap consumption of PODIntervalTree reduced from 1.7MB to 16KB. Performance doesn't regress on test PerformanceTests/Layout/floats.html. * WebCore.xcodeproj/project.pbxproj: add new header file PODFreeListArena.h. * platform/PODArena.h: (WebCore::PODArena::~PODArena): change dtor to virtual. (WebCore::PODArena::Chunk::~Chunk): ditto. * platform/PODFreeListArena.h: Added. (WebCore::PODFreeListArena::create): (WebCore::PODFreeListArena::allocateObject): allocate an object. (WebCore::PODFreeListArena::freeObject): free an object, find the right chunk and update its free list. (WebCore::PODFreeListArena::allocate): allocate memory from the free list or current chunk. (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk): add m_freeList to track freed cells. (WebCore::PODFreeListArena::FreeListChunk::allocate): reuse a free cell if there is one. (WebCore::PODFreeListArena::FreeListChunk::free): make the memory taken by this object is free, and link it to m_freeList. (WebCore::PODFreeListArena::FreeListChunk::contains): check if a pointer is inside this chunk. (WebCore::PODFreeListArena::FreeListChunk::hasFreeList): check if this chunk has free cells. * platform/PODRedBlackTree.h: (WebCore::PODRedBlackTree::PODRedBlackTree): take PODFreeListArena instead of PODArena, since nodes of a particular PODRedBlackTree is always of the same size. (WebCore::PODRedBlackTree::clear): mark all nodes before clearing the tree. (WebCore::PODRedBlackTree::initIfNeeded): add initIfNeeded to take an external PODFreeListArena. (WebCore::PODRedBlackTree::add): (WebCore::PODRedBlackTree::deleteNode): mark the node free in arena after it is removed from the tree. (WebCore::PODRedBlackTree::markFree): mark all node free in the tree. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::addIntrudingFloats): (WebCore::RenderBlock::FloatingObjects::computePlacedFloatsTree): passing the shared PODFreeListArena to m_placedFloatsTree. * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatingObjects::FloatingObjects): * rendering/RenderView.cpp: (WebCore::RenderView::intervalArena): create the shared PODFreeListArena lazily. * rendering/RenderView.h: 2011-12-15 Tony Chang Unreviewed, rollout r102825 because it didn't improve performance. https://bugs.webkit.org/show_bug.cgi?id=74622 * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): 2011-12-15 Ryosuke Niwa sizeof(RenderObject) is 32 instead of 24 on Windows https://bugs.webkit.org/show_bug.cgi?id=74646 Reviewed by Darin Adler. Make all bitfields in RenderObject to unsigned and wrap them around by RenderObjectBitfields. Also add a compilation time assertion to make sure we won't grow RenderObject's size unintentionally. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout): (WebCore::RenderBlock::layoutColumns): * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatWithRect::FloatWithRect): * rendering/RenderObject.cpp: (WebCore::SameSizeAsRenderObject::~SameSizeAsRenderObject): (WebCore::RenderObject::RenderObject): (WebCore::RenderObject::markContainingBlocksForLayout): (WebCore::RenderObject::setPreferredLogicalWidthsDirty): (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths): (WebCore::RenderObject::styleWillChange): (WebCore::RenderObject::styleDidChange): (WebCore::RenderObject::willBeDestroyed): (WebCore::RenderObject::updateDragState): * rendering/RenderObject.h: (WebCore::RenderObject::hasCounterNodeMap): (WebCore::RenderObject::setHasCounterNodeMap): (WebCore::RenderObject::childrenInline): (WebCore::RenderObject::setChildrenInline): (WebCore::RenderObject::hasColumns): (WebCore::RenderObject::setHasColumns): (WebCore::RenderObject::inRenderFlowThread): (WebCore::RenderObject::setInRenderFlowThread): (WebCore::RenderObject::isAnonymous): (WebCore::RenderObject::setIsAnonymous): (WebCore::RenderObject::isAnonymousBlock): (WebCore::RenderObject::isFloating): (WebCore::RenderObject::isPositioned): (WebCore::RenderObject::isRelPositioned): (WebCore::RenderObject::isText): (WebCore::RenderObject::isBox): (WebCore::RenderObject::isInline): (WebCore::RenderObject::isDragging): (WebCore::RenderObject::isReplaced): (WebCore::RenderObject::isHorizontalWritingMode): (WebCore::RenderObject::hasLayer): (WebCore::RenderObject::hasBoxDecorations): (WebCore::RenderObject::needsLayout): (WebCore::RenderObject::selfNeedsLayout): (WebCore::RenderObject::needsPositionedMovementLayout): (WebCore::RenderObject::needsPositionedMovementLayoutOnly): (WebCore::RenderObject::posChildNeedsLayout): (WebCore::RenderObject::needsSimplifiedNormalFlowLayout): (WebCore::RenderObject::normalChildNeedsLayout): (WebCore::RenderObject::preferredLogicalWidthsDirty): (WebCore::RenderObject::hasOverflowClip): (WebCore::RenderObject::hasTransform): (WebCore::RenderObject::node): (WebCore::RenderObject::setPositioned): (WebCore::RenderObject::setRelPositioned): (WebCore::RenderObject::setFloating): (WebCore::RenderObject::setInline): (WebCore::RenderObject::setHasBoxDecorations): (WebCore::RenderObject::setIsText): (WebCore::RenderObject::setIsBox): (WebCore::RenderObject::setReplaced): (WebCore::RenderObject::setHorizontalWritingMode): (WebCore::RenderObject::setHasOverflowClip): (WebCore::RenderObject::setHasLayer): (WebCore::RenderObject::setHasTransform): (WebCore::RenderObject::setHasReflection): (WebCore::RenderObject::hasReflection): (WebCore::RenderObject::setHasMarkupTruncation): (WebCore::RenderObject::hasMarkupTruncation): (WebCore::RenderObject::selectionState): (WebCore::RenderObject::setSelectionState): (WebCore::RenderObject::hasSelectedChildren): (WebCore::RenderObject::isMarginBeforeQuirk): (WebCore::RenderObject::isMarginAfterQuirk): (WebCore::RenderObject::setMarginBeforeQuirk): (WebCore::RenderObject::setMarginAfterQuirk): (WebCore::RenderObject::everHadLayout): (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields): (WebCore::RenderObject::RenderObjectBitfields::selectionState): (WebCore::RenderObject::RenderObjectBitfields::setSelectionState): (WebCore::RenderObject::setNeedsPositionedMovementLayout): (WebCore::RenderObject::setNormalChildNeedsLayout): (WebCore::RenderObject::setPosChildNeedsLayout): (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout): (WebCore::RenderObject::setPaintBackground): (WebCore::RenderObject::setIsDragging): (WebCore::RenderObject::setEverHadLayout): (WebCore::RenderObject::setNeedsLayout): (WebCore::RenderObject::setChildNeedsLayout): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): 2011-12-15 Wei Charles [BlackBerry] Upstream BlackBerry porting of pluginView https://bugs.webkit.org/show_bug.cgi?id=73397 Reviewed by Daniel Bates. No new tests for now. * plugins/blackberry/PluginViewBlackBerry.cpp: Added. 2011-12-15 Joshua Bell IndexedDB: Can't pass DOMStringList to IDBDatabase.transaction() https://bugs.webkit.org/show_bug.cgi?id=74452 Reviewed by Adam Barth. V8 code generator generated checks for DOMStringList arguments, then deferred to a function that only handled array inputs. This previously worked for IndexedDB because it would fall into a now-removed default handler. Modified storage/indexeddb/transaction-basics.html to test this. * bindings/v8/V8Binding.cpp: (WebCore::v8ValueToWebCoreDOMStringList): 2011-12-15 Adam Klein Make Element::setAttributeInternal inline in an attempt to avoid function call overhead https://bugs.webkit.org/show_bug.cgi?id=74638 Reviewed by Andreas Kling. In r102695, I factored common code in setAttribute into Element::setAttributeInternal. This may have caused a perf regression due to the extra function call, which inlining should eliminate. Running Dromaeo locally suggests that this will improve performance by ~9% on the "dom-attr element.property = value" test (which assigns a value to an element's id). * dom/Element.cpp: (WebCore::Element::setAttributeInternal): 2011-12-15 Mary Wu Upstream FileSystemBlackBerry.cpp into WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=74491 Reviewed by Rob Buis. We are using POSIX porting of FileSystem, so here only implement other necessary functions. Initial upstream, no new tests. * platform/blackberry/FileSystemBlackBerry.cpp: Added. (WebCore::homeDirectoryPath): (WebCore::fileSystemRepresentation): (WebCore::unloadModule): (WebCore::openTemporaryFile): 2011-12-15 Adrienne Walker [chromium] Clean up unnecessary leaf functions in GraphicsLayerChromium https://bugs.webkit.org/show_bug.cgi?id=74140 Reviewed by James Robinson. Tested by existing compositor layout tests. This is a follow-on cleanup to r102196, which made some of these functions less useful than they had been in the past. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setContentsOpaque): (WebCore::GraphicsLayerChromium::setBackfaceVisibility): (WebCore::GraphicsLayerChromium::updateLayerPreserves3D): * platform/graphics/chromium/GraphicsLayerChromium.h: 2011-12-15 Kenneth Russell Unreviewed, rolling out r103000. http://trac.webkit.org/changeset/103000 https://bugs.webkit.org/show_bug.cgi?id=74658 Does not handle text/plain documents correctly. * html/parser/HTMLTokenizer.cpp: * html/parser/HTMLTokenizer.h: * html/parser/HTMLTreeBuilder.cpp: * html/parser/HTMLTreeBuilder.h: * xml/parser/MarkupTokenizerBase.h: 2011-12-15 James Robinson [chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly https://bugs.webkit.org/show_bug.cgi?id=74477 Reviewed by Kenneth Russell. This enforces that the m_layerTreeHost pointer on LayerChromium instances is always up to date, instead of lazily setting it in the paintContents loop. There are two invariants: 1.) If a LayerChromium is the root layer of a CCLayerTreeHost, or is reachable via the children, mask, or replica pointers from the root layer of a CCLayerTreeHost, then that LayerChromium's m_layerTreeHost pointer refers to that CCLayerTreeHost 2.) If a LayerChromium is not a root layer or reachable from a root layer of any CCLayerTreeHost, its CCLayerTreeHost pointer is nil. Covered by several new layout tests in LayerChromiumTest * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerTreeHost): (WebCore::LayerChromium::setParent): (WebCore::LayerChromium::setMaskLayer): (WebCore::LayerChromium::setReplicaLayer): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::createTile): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-12-15 Sheriff Bot Unreviewed, rolling out r102652 and r102717. http://trac.webkit.org/changeset/102652 http://trac.webkit.org/changeset/102717 https://bugs.webkit.org/show_bug.cgi?id=74674 Broke too many webs. (Requested by kling on #webkit). * WebCore.exp.in: 2011-12-15 Anders Carlsson Lazily create the scrolling coordinator and add a setting for enabling it https://bugs.webkit.org/show_bug.cgi?id=74667 Reviewed by Darin Adler. * WebCore.xcodeproj/project.pbxproj: Make ScrollingCoordinator.h a private header so it can be used in WebKit. * page/Page.cpp: (WebCore::Page::Page): Don't create the scrolling coordinator. (WebCore::Page::~Page): Check for a null scrolling coordinator. (WebCore::Page::scrollingCoordinator): Create the scrolling coordinator lazily. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setScrollingCoordinatorEnabled): (WebCore::Settings::scrollingCoordinatorEnabled): Add a setting for enabling the scrolling coordinator. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): Use a tile cache layer for the main frame when the scrolling coordinator is neabled. 2011-12-15 Gyuyoung Kim Unreviewed. Fix build break when data-transfer-items is enabled. * platform/efl/ClipboardEfl.cpp: (WebCore::ClipboardEfl::items): * platform/efl/ClipboardEfl.h: 2011-12-15 Adam Barth

      parses incorrectly https://bugs.webkit.org/show_bug.cgi?id=74668 Reviewed by Darin Adler. This patch updates our implementation to match a change to the HTML5 specification regarding how elements parse. Previously, and similar tags used to pop the stack up to the element. Now the popping does not occur. Tests: html5lib/runner.html * html/parser/HTMLTreeBuilder.cpp: 2011-12-15 Daniel Sievers [Chromium] Avoid strdup() for extra argument when tracing is disabled. https://bugs.webkit.org/show_bug.cgi?id=74637 Reviewed by James Robinson. * platform/chromium/TraceEvent.h: (WebCore::internal::ScopeTracer::ScopeTracer): 2011-12-15 Rafael Weinstein [MutationObservers] Add a document-level flag that can trivially be checked to avoid doing unnessary work if mutation observers absent https://bugs.webkit.org/show_bug.cgi?id=74641 Reviewed by Ojan Vafai. This patch adds a byte of flags to Document, of which three bits are used to signal if any node owned by the document has a Mutation Observer of the given type. This is used to reduce the cost of discovering there are none to a single (inlined) method call and bit-check. Also, a similar byte of flags which was used to optimize a particular case when mutation observers are present has been removed, with the reasoning that we should first focus on minimizing impact on the null-case before optimizing particular in-use cases. Also, MutationObserverInterestGroup is broken out into its own file (which probably should have happened earlier, but now avoids a circular header dependency). No tests needed. This patch is just a refactor. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSMutableStyleDeclaration.cpp: * dom/CharacterData.cpp: * dom/ChildListMutationScope.cpp: * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore::Document::hasMutationObserversOfType): (WebCore::Document::hasMutationObservers): (WebCore::Document::addMutationObserverTypes): * dom/Element.cpp: * dom/MutationObserverInterestGroup.cpp: Added. (WebCore::MutationObserverInterestGroup::createIfNeeded): (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup): (WebCore::MutationObserverInterestGroup::isOldValueRequested): (WebCore::MutationObserverInterestGroup::enqueueMutationRecord): * dom/MutationObserverInterestGroup.h: Copied from Source/WebCore/dom/WebKitMutationObserver.h. (WebCore::MutationObserverInterestGroup::createForChildListMutation): (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation): (WebCore::MutationObserverInterestGroup::createForAttributesMutation): (WebCore::MutationObserverInterestGroup::hasOldValue): * dom/Node.cpp: (WebCore::Node::didMoveToNewOwnerDocument): (WebCore::Node::getRegisteredMutationObserversOfType): (WebCore::Node::notifyMutationObserversNodeWillDetach): * dom/Node.h: * dom/WebKitMutationObserver.cpp: (WebCore::WebKitMutationObserver::observe): * dom/WebKitMutationObserver.h: 2011-12-15 Adam Barth
      
      A
      doesn't parse correctly https://bugs.webkit.org/show_bug.cgi?id=74658 Reviewed by Darin Adler. Previously, we handled skipping newlines after
       in the tokenizer,
              which isn't how the spec handles them.  Instead, the spec skips them in
              the tree builder.  This isn't usually observable, except in the case of
              an HTML entity.  In that case, the tokenzier sees '&' (because the
              entity hasn't been decoded yet), but the tree builder sees '\n' (the
              decoded entity).  This patch fixes the bug by more closely aligning our
              implementation with the spec.
      
              Test: html5lib/runner.html
      
              * html/parser/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::reset):
              (WebCore::HTMLTokenizer::nextToken):
              * html/parser/HTMLTokenizer.h:
              * html/parser/HTMLTreeBuilder.cpp:
              (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
              (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
              (WebCore::HTMLTreeBuilder::processStartTagForInBody):
              (WebCore::HTMLTreeBuilder::processCharacterBuffer):
              * html/parser/HTMLTreeBuilder.h:
              * xml/parser/MarkupTokenizerBase.h:
      
      2011-12-15  Kenneth Russell  
      
              Unreviewed, rolling out r102989.
              http://trac.webkit.org/changeset/102989
              https://bugs.webkit.org/show_bug.cgi?id=74580
      
              Caused SHOULD NOT BE REACHED assertions in debug builds.
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSPrimitiveValueMappings.h:
              (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
              (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * rendering/RenderDeprecatedFlexibleBox.cpp:
              (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
              (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
              * rendering/RenderFullScreen.cpp:
              (createFullScreenStyle):
              * rendering/style/RenderStyle.h:
              (WebCore::InheritedFlags::boxPack):
              (WebCore::InheritedFlags::setBoxAlign):
              (WebCore::InheritedFlags::setBoxPack):
              (WebCore::InheritedFlags::initialBoxPack):
              * rendering/style/RenderStyleConstants.h:
              * rendering/style/StyleDeprecatedFlexibleBoxData.h:
      
      2011-12-15  Ryosuke Niwa  
      
              Touch make_name.pl in an attempt to make Qt bots happy.
      
              * dom/make_names.pl:
              (printNamesHeaderFile):
      
      2011-12-15  Kentaro Hara  
      
              Unreviewed. Rebaselined run-bindings-tests results.
      
              * bindings/scripts/test/JS/JSFloat64Array.cpp:
              * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
              * bindings/scripts/test/JS/JSTestObj.cpp:
      
      2011-12-15  Luke Macpherson   
      
              Separate box alignment and box pack values into separate enums.
              https://bugs.webkit.org/show_bug.cgi?id=74580
      
              Reviewed by Darin Adler.
      
              No new tests / refactoring only.
      
              Separating these types cleans up the code by removing several assertions that
              values are in the correct ranges, as this is ensured by the type system.
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
              * css/CSSPrimitiveValueMappings.h:
              (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
              (WebCore::CSSPrimitiveValue::operator EBoxPack):
              (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              * rendering/RenderDeprecatedFlexibleBox.cpp:
              (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
              (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
              * rendering/RenderFullScreen.cpp:
              (createFullScreenStyle):
              * rendering/style/RenderStyle.h:
              (WebCore::InheritedFlags::boxPack):
              (WebCore::InheritedFlags::setBoxAlign):
              (WebCore::InheritedFlags::setBoxPack):
              (WebCore::InheritedFlags::initialBoxPack):
              * rendering/style/RenderStyleConstants.h:
              * rendering/style/StyleDeprecatedFlexibleBoxData.h:
      
      2011-12-15  Kentaro Hara  
      
              REGRESSION(r102663): generate-bindings.pl runs every time
              https://bugs.webkit.org/show_bug.cgi?id=74481
      
              Reviewed by Adam Barth.
      
              See the comment #1 of bug 74481 for the cause of this bug.
      
              This patch fixes generate-bindings.pl so that it generates .h and .cpp files
              even for IDL files that do not need .h and .cpp files. This is just to prevent
              build scripts from trying to generate .h and .cpp files at every build.
      
              No new tests. No change in behavior.
      
              * bindings/scripts/generate-bindings.pl:
              (generateEmptyHeaderAndCpp): Generates .h and .cpp files for IDL files
              that do not need .h and .cpp files.
              * bindings/scripts/test/CPP/CPPTestSupplemental.cpp: Added.
              * bindings/scripts/test/CPP/CPPTestSupplemental.h: Added.
              * bindings/scripts/test/GObject/GObjectTestSupplemental.cpp: Added.
              * bindings/scripts/test/GObject/GObjectTestSupplemental.h: Added.
              * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added.
              * bindings/scripts/test/JS/JSTestSupplemental.h: Added.
              * bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp: Added.
              * bindings/scripts/test/ObjC/ObjCTestSupplemental.h: Added.
              * bindings/scripts/test/V8/V8TestSupplemental.cpp: Added.
              * bindings/scripts/test/V8/V8TestSupplemental.h: Added.
      
      2011-12-15  Jarred Nicholls  
      
              Unreviewed build fix. Mac build broken when CSS Filters enabled.
              Needed to move Filter headers out as private headers in WebCore.framework.
      
              * WebCore.xcodeproj/project.pbxproj:
      
      2011-12-15  Eric Seidel  
      
              WebCore has two (disconnected) ways to keep track of updated widgets, should be unified
              https://bugs.webkit.org/show_bug.cgi?id=74367
      
              Reviewed by Adam Barth.
      
              It seems the FrameView updateWidgets set is needed for now,
              so just making FrameView::addWidgetToUpdate mark the DOM node
              as needing a widget update and later when it goes to call
              updateWidget() checking first if it needs an update.
      
              No new tests, just adding an assert.
      
              * html/HTMLEmbedElement.cpp:
              (WebCore::HTMLEmbedElement::updateWidget):
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::updateWidget):
              * html/HTMLPlugInImageElement.h:
              (WebCore::HTMLPlugInImageElement::needsWidgetUpdate):
              (WebCore::HTMLPlugInImageElement::setNeedsWidgetUpdate):
              * page/FrameView.cpp:
              (WebCore::FrameView::addWidgetToUpdate):
              (WebCore::FrameView::updateWidget):
      
      2011-12-15  Alexandru Chiculita  
      
              Windows project file is broken. It has a missing  enclosing tag
              https://bugs.webkit.org/show_bug.cgi?id=74632
      
              Reviewed by Anders Carlsson.
      
              No new tests, just fixing the project file.
      
              * WebCore.vcproj/WebCore.vcproj:
      
      2011-12-15  Adam Barth  
      
              
      parses incorrectly https://bugs.webkit.org/show_bug.cgi?id=68106 Reviewed by Eric Seidel. This patch updates our implementation of the HTML5 parser to account for recent changes in the spec. The main change in this patch is to remove the "in foreign content" state from the tree builder. Rather than maintaining this as a separate state, the parser now introspects on the stack of open elements to determine whether the parser is in foriegn content. In the process, I've deleted some now-unused machinery in the tree builder. Tested by the html5lib LayoutTests. These tests show the progression in our spec compliance. * html/parser/HTMLElementStack.cpp: * html/parser/HTMLElementStack.h: * html/parser/HTMLTreeBuilder.cpp: * html/parser/HTMLTreeBuilder.h: * mathml/mathattrs.in: 2011-12-15 Ryosuke Niwa m_hasCounterNodeMap and m_everHadLayout should be private to RenderObject https://bugs.webkit.org/show_bug.cgi?id=74645 Reviewed by Eric Seidel. Made them private and added getters and setters as needed. * rendering/RenderCounter.cpp: (WebCore::makeCounterNode): (WebCore::RenderCounter::destroyCounterNodes): (WebCore::updateCounters): (WebCore::RenderCounter::rendererStyleChanged): (showCounterRendererTree): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): * rendering/RenderObject.h: (WebCore::RenderObject::hasCounterNodeMap): (WebCore::RenderObject::setHasCounterNodeMap): (WebCore::RenderObject::everHadLayout): * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::layout): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::layout): * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::layout): * rendering/svg/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::layout): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): * rendering/svg/RenderSVGShape.cpp: (WebCore::RenderSVGShape::layout): * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): 2011-12-15 Vsevolod Vlasov Not able to navigate the Resource tab options properly with arrow keys after adding the sticky-notes. https://bugs.webkit.org/show_bug.cgi?id=72013 Reviewed by Pavel Feldman. * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView): (WebInspector.DatabaseQueryView.prototype._messagesClicked): * inspector/front-end/ResourcesPanel.js: (WebInspector.DatabaseTreeElement.prototype.onexpand): 2011-12-15 Anders Carlsson Add ScrollingCoordinator class and ENABLE_THREADED_SCROLLING define https://bugs.webkit.org/show_bug.cgi?id=74639 Reviewed by Andreas Kling. Add a ScrollingCoordinator class and make it a member of Page. Tear it down when the page goes away. * WebCore.xcodeproj/project.pbxproj: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::~Page): * page/Page.h: (WebCore::Page::scrollingCoordinator): * page/ScrollingCoordinator.cpp: Added. (WebCore::ScrollingCoordinator::create): (WebCore::ScrollingCoordinator::ScrollingCoordinator): (WebCore::ScrollingCoordinator::~ScrollingCoordinator): (WebCore::ScrollingCoordinator::pageDestroyed): * page/ScrollingCoordinator.h: Added. 2011-12-15 Kenneth Russell Rename WEBKIT_lose_context to WEBKIT_WEBGL_lose_context https://bugs.webkit.org/show_bug.cgi?id=71870 Reviewed by James Robinson. Re-landing after original commit was rolled out. Rename largely done with do-webcore-rename with a couple of necessary manual fixups. Ran WebGL layout tests. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * html/canvas/WebGLExtension.h: * html/canvas/WebGLLoseContext.cpp: Copied from Source/WebCore/html/canvas/WebKitLoseContext.cpp. (WebCore::WebGLLoseContext::WebGLLoseContext): (WebCore::WebGLLoseContext::~WebGLLoseContext): (WebCore::WebGLLoseContext::getName): (WebCore::WebGLLoseContext::create): (WebCore::WebGLLoseContext::loseContext): (WebCore::WebGLLoseContext::restoreContext): * html/canvas/WebGLLoseContext.h: Copied from Source/WebCore/html/canvas/WebKitLoseContext.h. * html/canvas/WebGLLoseContext.idl: Copied from Source/WebCore/html/canvas/WebKitLoseContext.idl. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: * html/canvas/WebKitLoseContext.cpp: Removed. * html/canvas/WebKitLoseContext.h: Removed. * html/canvas/WebKitLoseContext.idl: Removed. 2011-12-15 Brady Eidson https://bugs.webkit.org/show_bug.cgi?id=74631 HTMLMediaElement should not register for document activation callbacks as it doesn't use them Reviewed by Eric Carlson. No new tests. (No behavior change, pruning useless code) * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::~HTMLMediaElement): (WebCore::HTMLMediaElement::willMoveToNewOwnerDocument): (WebCore::HTMLMediaElement::didMoveToNewOwnerDocument): 2011-12-15 Eric Carlson Text tracks should be treated differently according to their kind https://bugs.webkit.org/show_bug.cgi?id=72547 Reviewed by Sam Weinig. Tests: media/track/track-default-attribute.html media/track/track-mode-not-changed-by-new-track.html media/track/track-mode-triggers-loading.html * html/HTMLAudioElement.cpp: (WebCore::HTMLAudioElement::HTMLAudioElement): Add "createdByParser" parameter. (WebCore::HTMLAudioElement::create): Ditto. (WebCore::HTMLAudioElement::createForJSConstructor): Deal with constructor change. * html/HTMLAudioElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Add "createdByParser" parameter. Initialize m_parsingInProgress. (WebCore::HTMLMediaElement::finishParsingChildren): Clear m_parsingInProgress. Schedule track loading if necessary. (WebCore::HTMLMediaElement::loadTimerFired): Call configureTextTracks not call scheduleLoad, it just schedules the load timer again. (WebCore::HTMLMediaElement::prepareForLoad): Add all non-disabled track elements to a vector so we can prevent the media element's readyState from reaching HAVE_METADATA until the tracks are ready. (WebCore::HTMLMediaElement::textTracksAreReady): New. Return false unless all tracks that were not disabled when loading started have loaded or failed. (WebCore::HTMLMediaElement::textTrackReadyStateChanged): Call setReadyState when a track is stops loading. (WebCore::HTMLMediaElement::textTrackModeChanged): Trigger loading when the mode changes to hidden or showing for the first time. (WebCore::HTMLMediaElement::setReadyState): Do not advance to HAVE_METADATA or higher while track elements are loading. (WebCore::HTMLMediaElement::addTrack): Removed. (WebCore::HTMLMediaElement::showingTrackWithSameKind): New. (WebCore::HTMLMediaElement::trackWasAdded): (WebCore::HTMLMediaElement::trackWillBeRemoved): Flag a track as unconfigured so it will be reconfigured if it is added to another element. (WebCore::HTMLMediaElement::userIsInterestedInThisLanguage): New. (WebCore::HTMLMediaElement::userIsInterestedInThisTrack): New. Consider user preferences. (WebCore::HTMLMediaElement::configureTextTrack): New. Configure a track as per the user's preferences. (WebCore::HTMLMediaElement::configureTextTracks): New. Configure all track elements. * html/HTMLMediaElement.h: * html/HTMLMediaElement.h: * html/HTMLTagNames.in: Add constructorNeedsCreatedByParser to audio and video. * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::HTMLTrackElement): Initialize m_hasBeenConfigured. * html/HTMLTrackElement.h: (WebCore::HTMLTrackElement::hasBeenConfigured): (WebCore::HTMLTrackElement::setHasBeenConfigured): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::HTMLVideoElement): Add "createdByParser" parameter. (WebCore::HTMLVideoElement::create): Ditto. * html/HTMLVideoElement.h: * html/TextTrack.cpp: (WebCore::TextTrack::TextTrack): Initialize m_mode to DISABLED, not HIDDEN. Initialize m_showingByDefault. (WebCore::TextTrack::setMode): Clear the "showing by default" flag when a track's mode is explicitly set to SHOWING. (WebCore::TextTrack::mode): Return SHOWING whenever the "showing by default" flag is set. * html/TextTrack.h: (WebCore::TextTrack::showingByDefault): (WebCore::TextTrack::setShowingByDefault): * html/TextTrackCue.cpp: (WebCore::TextTrackCue::isActive): Return false if a cue has no track, or if its track is disabled. (WebCore::TextTrackCue::setIsActive): Don't enable a cue if it has no track, or if its track is disabled. 2011-12-15 Brady Eidson Unreviewed, rolling out r102829. http://trac.webkit.org/changeset/102829 https://bugs.webkit.org/show_bug.cgi?id=74533 Caused https://bugs.webkit.org/show_bug.cgi?id=74555 * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument): (WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument): (WebCore::HTMLPlugInImageElement::documentWillBecomeInactive): (WebCore::HTMLPlugInImageElement::documentDidBecomeActive): * html/HTMLPlugInImageElement.h: 2011-12-15 James Simonsen [Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime() https://bugs.webkit.org/show_bug.cgi?id=58354 Reviewed by Pavel Feldman. No new tests. Relies on existing webtiming-* tests. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: Use monotonic times. (WebCore::Document::setReadyState): (WebCore::Document::finishedParsing): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didFinishLoadingImpl): Convert monotonicFinishTime to wall time if needed. * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForTiming): Convert monotonic requestTime to wall time. (WebCore::buildObjectForResourceResponse): Plumbing for above. (WebCore::buildObjectForCachedResource): Ditto. (WebCore::InspectorResourceAgent::willSendRequest): Ditto. (WebCore::InspectorResourceAgent::didReceiveResponse): Ditto. (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): Ditto. * loader/DocumentLoadTiming.cpp: Added. (WebCore::DocumentLoadTiming::DocumentLoadTiming): (WebCore::DocumentLoadTiming::setNavigationStart): Determine reference time and root reference time. (WebCore::DocumentLoadTiming::addRedirect): Moved logic from MainResourceLoader. (WebCore::DocumentLoadTiming::convertMonotonicTimeToDocumentTime): Helper to compute wall time from monotonic time. * loader/DocumentLoadTiming.h: Turned into class. Made times monotonic. (WebCore::DocumentLoadTiming::setUnloadEventStart): (WebCore::DocumentLoadTiming::setUnloadEventEnd): (WebCore::DocumentLoadTiming::setRedirectStart): (WebCore::DocumentLoadTiming::setRedirectEnd): (WebCore::DocumentLoadTiming::setFetchStart): (WebCore::DocumentLoadTiming::setResponseEnd): (WebCore::DocumentLoadTiming::setLoadEventStart): (WebCore::DocumentLoadTiming::setLoadEventEnd): (WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument): (WebCore::DocumentLoadTiming::navigationStart): (WebCore::DocumentLoadTiming::unloadEventStart): (WebCore::DocumentLoadTiming::unloadEventEnd): (WebCore::DocumentLoadTiming::redirectStart): (WebCore::DocumentLoadTiming::redirectEnd): (WebCore::DocumentLoadTiming::redirectCount): (WebCore::DocumentLoadTiming::fetchStart): (WebCore::DocumentLoadTiming::responseEnd): (WebCore::DocumentLoadTiming::loadEventStart): (WebCore::DocumentLoadTiming::loadEventEnd): (WebCore::DocumentLoadTiming::hasCrossOriginRedirect): (WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterNavigationPolicy): (WebCore::MainResourceLoader::willSendRequest): Moved logic to DocumentLoadTiming. (WebCore::MainResourceLoader::didReceiveData): Use monotonic time. (WebCore::MainResourceLoader::didFinishLoading): Ditto. (WebCore::MainResourceLoader::load): * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchLoadEvent): * page/DOMWindow.h: Removed dispatchTimedEvent. It doesn't really help in the new model. * page/PerformanceNavigation.cpp: (WebCore::PerformanceNavigation::redirectCount): * page/PerformanceTiming.cpp: Removed skew correction code. This should never happen now. (WebCore::PerformanceTiming::navigationStart): (WebCore::PerformanceTiming::unloadEventStart): (WebCore::PerformanceTiming::unloadEventEnd): (WebCore::PerformanceTiming::redirectStart): (WebCore::PerformanceTiming::redirectEnd): (WebCore::PerformanceTiming::fetchStart): (WebCore::PerformanceTiming::responseEnd): (WebCore::PerformanceTiming::domLoading): (WebCore::PerformanceTiming::domInteractive): (WebCore::PerformanceTiming::domContentLoadedEventStart): (WebCore::PerformanceTiming::domContentLoadedEventEnd): (WebCore::PerformanceTiming::domComplete): (WebCore::PerformanceTiming::loadEventStart): (WebCore::PerformanceTiming::loadEventEnd): (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Used for ResourceLoadTiming. (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds): Used for DocumentTiming and DocumentLoadTiming. * page/PerformanceTiming.h: * platform/network/ResourceLoadTiming.cpp: (WebCore::ResourceLoadTiming::convertResourceLoadTimeToDocumentTime): * platform/network/ResourceLoadTiming.h: Added helper function to convert to wall times. Added instructions for use. 2011-12-15 Martin Robinson plugin crash [GTK] Plugins sometimes crash WebKitGTK+ with Gdk-CRITICAL **: gdk_window_get_toplevel: assertion `GDK_IS_WINDOW (window)' failed https://bugs.webkit.org/show_bug.cgi?id=73719 Reviewed by Philippe Normand. No new tests. It's difficult to test or reproduce this exact situation as it only occurs when running plugins under nspluginwrapper. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::platformGetValue): Properly handle when the plugin tries to get the window value when the GtkSocket is no longer realized. 2011-12-15 Martin Kosiba Fix find on web pages with -webkit-user-select: none for Chromium https://bugs.webkit.org/show_bug.cgi?id=72281 Reviewed by Ryosuke Niwa. Adding findStringAndScrollToVisible to Editor. This new method returns the new match as a range rather than modify the active selection. Test: editing/text-iterator/findString-selection-disabled.html * editing/Editor.cpp: (WebCore::Editor::findStringAndScrollToVisible): * editing/Editor.h: 2011-12-14 Anders Carlsson Add WTF::Function to wtf/Forward.h https://bugs.webkit.org/show_bug.cgi?id=74576 Reviewed by Adam Roben. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Add a JSC:: qualifier to the Function flags to avoid ambiguities. 2011-12-15 Julien Chaffraix Hardware-backed renderLayer could avoid repainting during a positioned movement layout https://bugs.webkit.org/show_bug.cgi?id=74370 Reviewed by Simon Fraser. Tests: compositing/absolute-position-changed-in-composited-layer.html compositing/absolute-position-changed-with-composited-parent-layer.html compositing/fixed-position-changed-in-composited-layer.html compositing/fixed-position-changed-within-composited-parent-layer.html To be able to properly skip repainting after a positioned movement layout only, we needed to add more state to the current |setNeedsFullRepaint| method. As part of that we refactored the callers and internal fields to better match the new meaning. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleDidChange): Explicitely gave the RepaintStatus to setRepaintStatus. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::removeOnlyThisLayer): Updated those function after the renamings. (WebCore::RenderLayer::updateLayerPositions): Ditto. Also added a sholdRepaintAfterLayout check. (WebCore::RenderLayer::shouldRepaintAfterLayout): Heart of the optimization, if we just did a positioned movement layout of composited RenderLayer, then don't repaint. All the other cases should still trigger a repaint. * rendering/RenderLayer.h: (WebCore::RenderLayer::setRepaintStatus): Renamed setNeedsFullRepaint to setRepaintStatus. Also added a new enum RepaintStatus. * rendering/RenderObject.cpp: (WebCore::RenderObject::setLayerNeedsFullRepaint): Updated after the renamings. (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout): New method that pass a new value to the RenderLayer. * rendering/RenderObject.h: (WebCore::RenderObject::setNeedsPositionedMovementLayout): Switched the call to the dedicated method. 2011-12-15 Antti Koivisto Don't invoke CSSStyleSelector::pushParent before Text::recalcTextStyle https://bugs.webkit.org/show_bug.cgi?id=74575 Reviewed by Darin Adler. Text::recalcTextStyle never enters the style selector so pushing the state is not necessary * dom/Element.cpp: (WebCore::Element::recalcStyle): 2011-12-15 Chris Marrin Fixed error in Target.pri. Unreviewed. * Target.pri: 2011-12-15 Alexander Pavlov Web Inspector: #hex colors are not highlighted in CSS files https://bugs.webkit.org/show_bug.cgi?id=74570 Reviewed by Pavel Feldman. Drive by: highlight color keywords as colors, not as keywords. * inspector/front-end/CSSKeywordCompletions.js: (WebInspector.CSSKeywordCompletions.colors): * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer): (WebInspector.SourceCSSTokenizer.prototype.nextToken): * inspector/front-end/SourceCSSTokenizer.re2js: 2011-12-14 Chris Marrin Hardware acceleration of W3C Filter Effects https://bugs.webkit.org/show_bug.cgi?id=68479 Reviewed by Simon Fraser. Move FilterOperation(s) to platform/graphics/filters so it can be used to pass filter information down to GraphicsLayer for hardware acceleration. This leaves the CustomFilterOperation subclass in rendering/style since it has dependencies outside platform. Some part of that class will eventually need to be down in platform. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/FilterOperation.cpp: Renamed from Source/WebCore/rendering/style/FilterOperation.cpp. (WebCore::BasicColorMatrixFilterOperation::blend): (WebCore::BasicColorMatrixFilterOperation::passthroughAmount): (WebCore::BasicComponentTransferFilterOperation::blend): (WebCore::BasicComponentTransferFilterOperation::passthroughAmount): (WebCore::GammaFilterOperation::blend): (WebCore::BlurFilterOperation::blend): (WebCore::DropShadowFilterOperation::blend): * platform/graphics/filters/FilterOperation.h: Renamed from Source/WebCore/rendering/style/FilterOperation.h. (WebCore::FilterOperation::~FilterOperation): (WebCore::FilterOperation::operator!=): (WebCore::FilterOperation::blend): (WebCore::FilterOperation::getOperationType): (WebCore::FilterOperation::isSameType): (WebCore::FilterOperation::FilterOperation): (WebCore::PassthroughFilterOperation::create): (WebCore::PassthroughFilterOperation::operator==): (WebCore::PassthroughFilterOperation::PassthroughFilterOperation): (WebCore::ReferenceFilterOperation::create): (WebCore::ReferenceFilterOperation::reference): (WebCore::ReferenceFilterOperation::operator==): (WebCore::ReferenceFilterOperation::ReferenceFilterOperation): (WebCore::BasicColorMatrixFilterOperation::create): (WebCore::BasicColorMatrixFilterOperation::amount): (WebCore::BasicColorMatrixFilterOperation::operator==): (WebCore::BasicColorMatrixFilterOperation::BasicColorMatrixFilterOperation): (WebCore::BasicComponentTransferFilterOperation::create): (WebCore::BasicComponentTransferFilterOperation::amount): (WebCore::BasicComponentTransferFilterOperation::operator==): (WebCore::BasicComponentTransferFilterOperation::BasicComponentTransferFilterOperation): (WebCore::GammaFilterOperation::create): (WebCore::GammaFilterOperation::amplitude): (WebCore::GammaFilterOperation::exponent): (WebCore::GammaFilterOperation::offset): (WebCore::GammaFilterOperation::operator==): (WebCore::GammaFilterOperation::GammaFilterOperation): (WebCore::BlurFilterOperation::create): (WebCore::BlurFilterOperation::stdDeviationX): (WebCore::BlurFilterOperation::stdDeviationY): (WebCore::BlurFilterOperation::operator==): (WebCore::BlurFilterOperation::BlurFilterOperation): (WebCore::SharpenFilterOperation::create): (WebCore::SharpenFilterOperation::amount): (WebCore::SharpenFilterOperation::radius): (WebCore::SharpenFilterOperation::threshold): (WebCore::SharpenFilterOperation::operator==): (WebCore::SharpenFilterOperation::SharpenFilterOperation): (WebCore::DropShadowFilterOperation::create): (WebCore::DropShadowFilterOperation::x): (WebCore::DropShadowFilterOperation::y): (WebCore::DropShadowFilterOperation::stdDeviation): (WebCore::DropShadowFilterOperation::color): (WebCore::DropShadowFilterOperation::operator==): (WebCore::DropShadowFilterOperation::DropShadowFilterOperation): * platform/graphics/filters/FilterOperations.cpp: Renamed from Source/WebCore/rendering/style/FilterOperations.cpp. (WebCore::FilterOperations::FilterOperations): (WebCore::FilterOperations::operator==): (WebCore::FilterOperations::operationsMatch): * platform/graphics/filters/FilterOperations.h: Renamed from Source/WebCore/rendering/style/FilterOperations.h. (WebCore::FilterOperations::operator!=): (WebCore::FilterOperations::clear): (WebCore::FilterOperations::operations): (WebCore::FilterOperations::size): (WebCore::FilterOperations::at): 2011-12-15 Igor Oliveira [Qt] Support requestAnimationFrame API https://bugs.webkit.org/show_bug.cgi?id=74528 Add necessary files to Target.pri when enabling requestAnimationFrame option. Reviewed by Kenneth Rohde Christiansen. * Target.pri: 2011-12-15 Otto Cheung Removing BlackBerryCookieCache from the build system https://bugs.webkit.org/show_bug.cgi?id=74318 Reviewed by Rob Buis. Removing any references to BlackBerryCookieCache in files that are upstreamed. We are removing the BlackBerryCookieCache because the CookieManager cookie structure has been refactored to have a similar structure to the cache. Since the read speeds in both structures are similar, we no longer need the cache to speed up read performance. No new tests, this patch by itself will not work. This patch is only removing the references to BlackBerryCookieCache in files that are upstreamed. * PlatformBlackBerry.cmake: * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::handleNotifyHeaderReceived): 2011-12-15 Kenneth Rohde Christiansen [Qt] Mobile theme improvements Rubberstamped by Simon Hausmann. - Invert the gradient on the checkboxes - Make the buttons on the multi select combobox work on floats - Mini cleanups * platform/qt/RenderThemeQtMobile.cpp: (WebCore::StylePainterMobile::drawCheckableBackground): (WebCore::StylePainterMobile::drawMultipleComboButton): (WebCore::StylePainterMobile::getButtonImageSize): (WebCore::StylePainterMobile::drawComboBox): 2011-12-15 Peter Rybin Web Inspector: CodeGeneratorInspector.py convert script conditions to precompiler #ifs https://bugs.webkit.org/show_bug.cgi?id=74534 Reviewed by Pavel Feldman. Generator is rewritten to add #if's to output. * inspector/CodeGeneratorInspector.py: (DomainNameFixes.get_fixed_data.Res.get_guard.Guard.generate_open): (DomainNameFixes.get_fixed_data.Res.get_guard.Guard): (DomainNameFixes.get_fixed_data.Res.get_guard.Guard.generate_close): (DomainNameFixes.get_fixed_data.Res): (DomainNameFixes.get_fixed_data.Res.get_guard): (Generator.go): (Generator.process_event): (Generator.process_command): (Generator.process_types): 2011-12-15 Jesus Sanchez-Palencia [Qt][WK2] Setting Download as action for navigation request crashes WebProcess https://bugs.webkit.org/show_bug.cgi?id=74526 Reviewed by Simon Hausmann. Adding checks for networkcontext and networkAccessManager and return true in case they don't exist, following the same logic as if the CookieJar doesn't exist. * platform/qt/ThirdPartyCookiesQt.cpp: (WebCore::thirdPartyCookiePolicyPermits): 2011-12-14 Tor Arne Vestbø [Qt] Get rid of layering violation in PluginViewQt PluginViewQt has a layering violation in relying on QWebPagePrivate for the check if running under DRT. We remove this and add a specific flag in the PluginView for this check, enabled from DRTSupport. This isn't pretty, but an improvement over what's currently there. Reviewed by Simon Hausmann. * plugins/PluginView.h: * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::updatePluginWidget): (WebCore::setXKeyEventSpecificFields): 2011-12-14 Vsevolod Vlasov Web Inspector: Console should show network messages origins. https://bugs.webkit.org/show_bug.cgi?id=74521 Reviewed by Pavel Feldman. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatMessage): 2011-12-15 Rakesh KN "user-select none" causes selection to incorrectly escape from clicked container https://bugs.webkit.org/show_bug.cgi?id=57289 Reviewed by Ryosuke Niwa. Not selecting the nearest word from the target node if target node has -webkit-user-select:none Test: fast/events/mouse-double-triple-click-should-not-select-next-node-for-user-select-none.html * page/EventHandler.cpp: (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): If target node has webkit-user-select:none style then do not update the selection. 2011-12-13 Andrey Kosyakov Web Inspector: Generated HAR is missing pages.startedDateTime https://bugs.webkit.org/show_bug.cgi?id=74188 Reviewed by Pavel Feldman. * inspector/front-end/HAREntry.js: (WebInspector.HARLog.prototype._buildPages): * inspector/front-end/NetworkLog.js: (WebInspector.NetworkLog): (WebInspector.NetworkLog.prototype.get mainResourceStartTime): (WebInspector.NetworkLog.prototype._mainFrameNavigated): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._updateSummaryBar): 2011-12-15 Kenichi Ishibashi Supports Unicode variation selector https://bugs.webkit.org/show_bug.cgi?id=50999 Reviewed by Nikolas Zimmermann. Adds SimpleFontData::updateGlyphWithVariationSelector() which substitutes the glyph in question based on the selector. WidthIterator::advance() calls it when an unicode variation selector follows the character. Test: fast/text/unicode-variation-selector.html * platform/graphics/SimpleFontData.h: Added updateGlyphWithVariationSelector(). * platform/graphics/SurrogatePairAwareTextIterator.cpp: (WebCore::isUnicodeBMPVariationSelector): Added. (WebCore::isUnicodeSupplementaryVariationSelector): Added. (WebCore::SurrogatePairAwareTextIterator::hasTrailingVariationSelector): Added. * platform/graphics/SurrogatePairAwareTextIterator.h: * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advance): Changed to detect variation selectors. * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Added. * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto. * platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::decomposeToUTF16): Ditto. (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto. * platform/graphics/pango/SimpleFontDataPango.cpp: (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto. * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto. * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto. * platform/graphics/wince/SimpleFontDataWinCE.cpp: (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto. * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto. 2011-12-15 Alexander Pavlov [v8] Expose the "filter" property in V8CSSStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=73426 Reviewed by Adam Barth. Test: fast/css/style-enumerate-properties.html The "filter" CSS property used to be masked to be compliant with JSC, but JSC has supported this property for quite a while. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::hasCSSPropertyNamePrefix): clean up WTF prefixes (WebCore::cssPropertyInfo): remove the "wasFilter" flag (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): remove the "filter" check (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): return the "filter" value as v8String 2011-12-15 Hajime Morrita Unreviewed build fix attempt for Chromium Mac. * page/PerformanceTiming.h: 2011-12-15 Alexander Pavlov Unreviewed, build fix after r102906 (poor merge). * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileType.prototype.buttonClicked): 2011-12-15 Vsevolod Vlasov Unreviewed revert of r102696 ([Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()). Breaks inspector's network panel timeline on chromium. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::setReadyState): (WebCore::Document::finishedParsing): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didFinishLoadingImpl): * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForTiming): (WebCore::buildObjectForResourceResponse): (WebCore::buildObjectForCachedResource): (WebCore::InspectorResourceAgent::willSendRequest): (WebCore::InspectorResourceAgent::didReceiveResponse): (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): * loader/DocumentLoadTiming.cpp: Removed. * loader/DocumentLoadTiming.h: (WebCore::DocumentLoadTiming::DocumentLoadTiming): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterNavigationPolicy): (WebCore::MainResourceLoader::willSendRequest): (WebCore::MainResourceLoader::didReceiveData): (WebCore::MainResourceLoader::didFinishLoading): (WebCore::MainResourceLoader::load): * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchLoadEvent): (WebCore::DOMWindow::dispatchTimedEvent): * page/DOMWindow.h: * page/PerformanceNavigation.cpp: (WebCore::PerformanceNavigation::redirectCount): * page/PerformanceTiming.cpp: (WebCore::getPossiblySkewedTimeInKnownRange): (WebCore::PerformanceTiming::navigationStart): (WebCore::PerformanceTiming::unloadEventStart): (WebCore::PerformanceTiming::unloadEventEnd): (WebCore::PerformanceTiming::redirectStart): (WebCore::PerformanceTiming::redirectEnd): (WebCore::PerformanceTiming::fetchStart): (WebCore::PerformanceTiming::responseEnd): (WebCore::PerformanceTiming::domLoading): (WebCore::PerformanceTiming::domInteractive): (WebCore::PerformanceTiming::domContentLoadedEventStart): (WebCore::PerformanceTiming::domContentLoadedEventEnd): (WebCore::PerformanceTiming::domComplete): (WebCore::PerformanceTiming::loadEventStart): (WebCore::PerformanceTiming::loadEventEnd): (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): * page/PerformanceTiming.h: * platform/network/ResourceLoadTiming.cpp: Removed. * platform/network/ResourceLoadTiming.h: 2011-12-15 Alexander Pavlov Unreviewed, fix Closure compiler warnings after r102905. * inspector/front-end/CSSStyleModel.js: Add JSDoc annotations 2011-12-14 Alexander Pavlov Web Inspector: make ProfilesPanel scale as the number of ProfileTypes grows https://bugs.webkit.org/show_bug.cgi?id=74391 Reviewed by Pavel Feldman. Whenever a profile is started, this change disables all profile recording buttons, except the one that correponds to the running profile. Once the profiling is finished, all buttons get enabled back again. * English.lproj/localizedStrings.js: * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView.profileCallback): (WebInspector.CPUProfileType.prototype.get buttonTooltip): (WebInspector.CPUProfileType.prototype.get buttonStyle): (WebInspector.CPUProfileType.prototype.buttonClicked): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.get statusBarItems.clickHandler): (WebInspector.ProfilesPanel.prototype.get statusBarItems): (WebInspector.ProfilesPanel.prototype._addProfileHeader): (WebInspector.ProfilesPanel.prototype.updateProfileTypeButtons): (WebInspector.ProfilesPanel.prototype._updateInterface): (WebInspector.ProfilesPanel.prototype.setRecordingProfile): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress): (WebInspector.ProfilerDispatcher.prototype.setRecordingProfile): * inspector/front-end/inspector.css: (.record-cpu-profile-status-bar-item .glyph): (.record-cpu-profile-status-bar-item.toggled-on .glyph): 2011-12-15 Alexander Pavlov Web Inspector: [Styles] Update selected DOM element styles whenever applicable media queries change https://bugs.webkit.org/show_bug.cgi?id=74292 The change introduces and handles in the frontend a new event type for the CSS domain, "mediaQueryResultChanged", which gets fired every time a viewport-dependent media feature changes its value. This allows users to see live changes of the (media-dependent) matched rules for inspected elements. Reviewed by Pavel Feldman. * inspector/CodeGeneratorInspector.py: (DomainNameFixes): * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::setFrontend): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::restore): (WebCore::InspectorCSSAgent::enable): (WebCore::InspectorCSSAgent::disable): (WebCore::InspectorCSSAgent::mediaQueryResultChanged): * inspector/InspectorCSSAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::mediaQueryResultChangedImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::mediaQueryResultChanged): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel): (WebInspector.CSSStyleModel.prototype.mediaQueryResultChanged): (WebInspector.CSSDispatcher): (WebInspector.CSSDispatcher.prototype.mediaQueryResultChanged): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane): (WebInspector.MetricsSidebarPane.prototype._styleSheetOrMediaQueryResultChanged): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype._styleSheetOrMediaQueryResultChanged): * page/FrameView.cpp: (WebCore::FrameView::layout): 2011-12-14 Vsevolod Vlasov Web Inspector: [Regression] Network manager fails to show resource type and MIME type in incorrect MIME type console message. https://bugs.webkit.org/show_bug.cgi?id=74516 Reviewed by Pavel Feldman. Test: http/tests/inspector/network/script-as-text-loading.html * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatMessage): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): 2011-11-03 Kent Tamura A spin button changes the value incorrectly if it is clicked after touch events. https://bugs.webkit.org/show_bug.cgi?id=71181 Reviewed by Ryosuke Niwa. SpinButtonElement assumed setHovered(true) was always called before a mousemove event in the element. It is not true for touch events. We should not reset m_upDownState to Indetermiante in setHovered(true), and should reset it when the mouse pointer moves out. This change fixes the flakiness of fast/forms/input-step-as-double.html. Test: fast/events/touch/touch-before-pressing-spin-button.html * html/shadow/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::defaultEventHandler): Add an assertion that m_upDownState should not be Indetermiante. Reset m_upDownState to Indeterminate when the mouse pointer moves out from the element. (WebCore::SpinButtonElement::setHovered): Reset m_upDownState to Indeterminate when the element becomes unhovered. 2011-12-14 Lucas Forschler https://bugs.webkit.org/show_bug.cgi?id=74543 Add CSS*.cpp to a new CSSAllInOne.cpp file with two exceptions: CSSProperty.cpp CSSPrimitiveValue.cpp Adding these two broke things with a templates problem that was not easily fixable. Reviewed by Steve Falkenburg. * WebCore.vcproj/WebCore.vcproj: * css/CSSAllInOne.cpp: Added. 2011-12-14 Tim Horton Generated images should respect the accelerated state of the context they're going to be drawn into https://bugs.webkit.org/show_bug.cgi?id=74577 Reviewed by Simon Fraser. The tiled code path for GeneratorGeneratedImage and CrossfadeGeneratedImage blindly creates an unaccelerated ImageBuffer. Instead, take into account the accelerated state of the destination context. No new tests, as this is a simple performance improvement. * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/GeneratorGeneratedImage.cpp: (WebCore::GeneratorGeneratedImage::drawPattern): 2011-12-14 Ilya Tikhonovsky Web Inspector: cleanup unused variable introduced at r102803 * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.enableResourceTracking): (WebInspector.NetworkManager.prototype.disableResourceTracking): 2011-12-14 Wei James fast path to accelerate processing in AudioBus::processWithGainFromMonoStereo https://bugs.webkit.org/show_bug.cgi?id=74054 Reviewed by Kenneth Russell. Avoid de-zippering when the gain has converged on the targetGain. It can get about 75% performance gain at most when all frames don't need de-zippering. * platform/audio/AudioBus.cpp: (WebCore::AudioBus::processWithGainFromMonoStereo): 2011-12-14 Adam Klein Optimize MutationObserverInterestGroup construction https://bugs.webkit.org/show_bug.cgi?id=74563 Reviewed by Ojan Vafai. Inline MutationObserverInterestGroup's creation methods and fix an accidental pass-by-value in an attempt to further reduce the CPU footprint of MutationObservers. No new tests, refactor only. * dom/WebKitMutationObserver.cpp: (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup): Pass observers HashMap by reference. * dom/WebKitMutationObserver.h: (WebCore::MutationObserverInterestGroup::createForChildListMutation): Inline. (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation): Inline. (WebCore::MutationObserverInterestGroup::createForAttributesMutation): Inline. (WebCore::MutationObserverInterestGroup::hasOldValue): Remove spurious inline keyword. 2011-12-14 Dominic Mazzoni Seeing crash in DRT after loading-iframe-sends-notification.html land https://bugs.webkit.org/show_bug.cgi?id=72624 When an iframe finishes loading, send an accessibility notification on the renderer, rather than on a parent node. The only reason it was being posted on a parent before was because there was no way to detect that in a test. This is simpler and now covered by the test. Reviewed by Chris Fleizach. Updates existing test: accessibility/loading-iframe-sends-notification.html * dom/Document.cpp: (WebCore::Document::implicitClose): 2011-12-14 Nat Duca [chromium] Add inhibitDraw to CCScheduler and drop root impl to prevent background flash on tab restore https://bugs.webkit.org/show_bug.cgi?id=74351 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setNeedsCommit): (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::getNextAction): (WebCore::CCScheduler::processScheduledActions): * platform/graphics/chromium/cc/CCScheduler.h: * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine): (WebCore::CCSchedulerStateMachine::nextAction): * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: (WebCore::CCSchedulerStateMachine::setInhibitDraw): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setVisibleOnImplThread): (WebCore::CCThreadProxy::inhibitDraw): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-12-14 Ken Buchanan Crash due to incorrect parsing of isolates https://bugs.webkit.org/show_bug.cgi?id=74311 When content is wrapped, all hell breaks loose https://bugs.webkit.org/show_bug.cgi?id=74396 Reviewed by Eric Seidel. When an isolate was encountered during run layout, the entire isolate would be parsed, even if the run started in the middle of the isolate. This would sometimes cause parts of the isolate to be added multiple times as runs. This patch marks the starting position within the isolate so nothing is parsed twice. This patch changes appendRun() so that when a run is added that is inside an isolate, it saves the start position of the run rather than the root. This allows constructBidiRuns() to resume parsing the isolate from the correct position. The change to RenderBox partially reverts a previous change I had done. It makes sense to screen for the condition, as was previously the case. This patch does not add the test case from 74396 because a separate bug is preventing it from rendering correctly. * rendering/InlineIterator.h: (WebCore::addPlaceholderRunForIsolatedInline) (WebCore::IsolateTracker::addFakeRunIfNecessary) (WebCore::InlineBidiResolver::appendRun) * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockLineLayout::constructBidiRuns) * rendering/RenderBox.cpp: (WebCore::RenderBox::positionLineBox) 2011-12-14 Jing Zhao Opening two popup menus by dispatchEvent() makes problems. https://bugs.webkit.org/show_bug.cgi?id=73304 Reviewed by Kent Tamura. By using element.dispatchEvent(), a user written script can open two popup menus, which causes various problems in different platforms. Add a hasOpenedPopup() method in ChromeClient and a wrapper in Chrome. In RenderMenuList::showPopup(), check if there is an opened popup menu before opening a new popup menu. Test: fast/forms/select-popup-crash.html * loader/EmptyClients.h: Overrides hasOpenedPopup(). (WebCore::EmptyChromeClient::hasOpenedPopup): Returns false as a default case. * page/Chrome.cpp: (WebCore::Chrome::hasOpenedPopup): Calls ChromeClient::hasOpenedPopup(). * page/Chrome.h: Declares hasOpenedPopup(). * page/ChromeClient.h: Declares hasOpenedPopup() as a pure virtual function. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::showPopup): Calls Chrome::hasOpenedPopup() before opening a new popup menu. 2011-12-14 Tony Chang Clean up style in CSSStyleSelector.cpp https://bugs.webkit.org/show_bug.cgi?id=74548 Reviewed by Ojan Vafai. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): 2011-12-14 Kenneth Russell Unreviewed, rolling out r102794. http://trac.webkit.org/changeset/102794 https://bugs.webkit.org/show_bug.cgi?id=74220 Reapplying patch since it is not the cause of the problems described in bug 74220. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::reportUnsafeAccessTo): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): 2011-12-14 Sam Weinig Remove whitespace from InheritedPropertySheets attributes in vsprops files to appease the Visual Studio project migrator. Reviewed by Adam Roben. * WebCore.vcproj/QTMovieWinDebug.vsprops: * WebCore.vcproj/QTMovieWinDebugAll.vsprops: * WebCore.vcproj/QTMovieWinDebugCairoCFLite.vsprops: * WebCore.vcproj/QTMovieWinProduction.vsprops: * WebCore.vcproj/QTMovieWinRelease.vsprops: * WebCore.vcproj/QTMovieWinReleaseCairoCFLite.vsprops: * WebCore.vcproj/WebCoreDebug.vsprops: * WebCore.vcproj/WebCoreDebugAll.vsprops: * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops: * WebCore.vcproj/WebCoreProduction.vsprops: * WebCore.vcproj/WebCoreRelease.vsprops: * WebCore.vcproj/WebCoreReleaseCairoCFLite.vsprops: 2011-12-14 Enrica Casucci One more attempt to fix the release build (hopefully the last) Unreviewed. * editing/ReplaceSelectionCommand.cpp: Added NodeRenderStyle.h 2011-12-14 Kenneth Russell Unreviewed, rolling out r102816. http://trac.webkit.org/changeset/102816 https://bugs.webkit.org/show_bug.cgi?id=74415 Implicated in font-related crashes on Chromium canaries. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::Font::drawGlyphs): * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::operator=): (WebCore::FontPlatformData::~FontPlatformData): * platform/graphics/chromium/FontPlatformDataChromiumWin.h: (WebCore::FontPlatformData::size): (WebCore::FontPlatformData::hash): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::setupPaintForFont): (WebCore::paintSkiaText): * platform/graphics/skia/SkiaFontWin.h: 2011-12-14 Simon Fraser Filter amounts should accept percentages https://bugs.webkit.org/show_bug.cgi?id=74531 Reviewed by Chris Marrin. Support percentage arguments for some filter functions, using the FPercent flag to validUnit(). Fix CSSStyleSelector::createFilterOperations() to do the divide by 100 for percentages. Replaced isValidFilterArgument(), which just tested arguments one by one for validity, with parseBuiltinFilterArguments() which tests and creates the CSSValues at the same time, which is a little more efficient. It also allows filter-specific behavior to be more localized in this method. Covered by existing tests. * css/CSSParser.cpp: (WebCore::CSSParser::parseBuiltinFilterArguments): (WebCore::CSSParser::parseFilter): * css/CSSParser.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::createFilterOperations): 2011-12-14 Enrica Casucci Build fix. Unreviewed. * editing/ReplaceSelectionCommand.cpp: Added include RenderStyle.h 2011-12-14 Hajime Morrita JS_INLINE and WTF_INLINE should be visible from WebCore https://bugs.webkit.org/show_bug.cgi?id=73191 Reviewed by Kevin Ollivier. - Moved export related definitions from config.h to ExportMacros.h, JSExportMacros.h and PlatformExportMacros.h - Added forwarding headers which are referred from config.h No new tests. Only build related changes. * ForwardingHeaders/runtime/JSExportMacros.h: Added. * ForwardingHeaders/wtf/ExportMacros.h: Added. * WebCore.xcodeproj/project.pbxproj: * config.h: * platform/PlatformExportMacros.h: Copied from Source/JavaScriptCore/wtf/ExportMacros.h. 2011-12-14 Enrica Casucci Need a way to produce leaner markup when pasting a fragment containing verbose markup https://bugs.webkit.org/show_bug.cgi?id=74514 Reviewed by Ryosuke Niwa. This patch is another step in the direction of reducing the verbosity of the markup produced with editing operations. After the copied fragment is inserted in the document, it is analyzed to remove all the elements that don't contribute to the style. The decision is made comparing the render styles. As part of the cleanup, unstyled divs with single child element are removed. The logic to determine the blocks that can be removed is the same used in DeleteSelectionCommand and has been moved in CompositeEditCommand. Test: editing/pasteboard/paste-and-sanitize.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::isRemovableBlock): Implements logic to determine if a block can be removed. * editing/CompositeEditCommand.h: Added isRemovableBlock declaration. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Implemented using isRemovableBlock from CompositeEditCommand. * editing/Editor.cpp: (WebCore::Editor::replaceSelectionWithFragment): Added SanitizeFragment option. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Added initialization of m_sanitizeFragment member. (WebCore::ReplaceSelectionCommand::removeRedundantMarkup): New method implementing the cleanup logic. (WebCore::ReplaceSelectionCommand::doApply): Added call to removeRedundantMarkup after the fragment is inserted in the document. * editing/ReplaceSelectionCommand.h: Added new value to the enum CommandOption, a new member variable and the new method declaration. 2011-12-14 Adrienne Walker [chromium] Refactor tile drawing to be more data-driven https://bugs.webkit.org/show_bug.cgi?id=73059 Reviewed by James Robinson. Partially tested by compositor layout tests. Debug borders and checkerboarding tested manually. This is the first part of a move towards rendering quads on screen from a bag of data rather than in virtual CCLayerImpl::draw functions. CCDrawQuad-derived classes store material-specific pieces of data to use when rendering. CCLayerImpl classes now create these CCDrawQuad objects rather than issuing direct GL commands. Where this data is shared between quads that come from the same layer, that data is stored in a CCSharedQuadState object rather than duplicated. CCRenderPass is the class that holds the list of quads and the target surface that they draw into. Drawing a frame consists of drawing a series of render passes onto their respective surfaces. CCLayerTreeHostImpl constructs these render passes from the output of calculateDrawTransformsAndVisibility by asking each layer to insert quads into a list and hands them off to LayerRendererChromium for rendering. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::clearSurfaceForDebug): (WebCore::LayerRendererChromium::beginDrawingFrame): (WebCore::LayerRendererChromium::drawRenderPass): (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawDebugBorderQuad): (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): (WebCore::LayerRendererChromium::drawSolidColorQuad): (WebCore::tileUniformLocation): (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): (WebCore::LayerRendererChromium::drawCustomLayerQuad): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::useRenderSurface): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/ShaderChromium.h: (WebCore::FragmentTexAlphaBinding::edgeLocation): (WebCore::FragmentTexAlphaBinding::fragmentTexTransformLocation): (WebCore::FragmentTexOpaqueBinding::edgeLocation): (WebCore::FragmentTexOpaqueBinding::fragmentTexTransformLocation): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::pushPropertiesTo): * platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp: Added. (WebCore::CCCustomLayerDrawQuad::create): (WebCore::CCCustomLayerDrawQuad::CCCustomLayerDrawQuad): * platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h: Added. (WebCore::CCCustomLayerDrawQuad::layer): * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Added. (WebCore::CCDebugBorderDrawQuad::create): (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad): * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: Added. (WebCore::CCDebugBorderDrawQuad::color): (WebCore::CCDebugBorderDrawQuad::width): * platform/graphics/chromium/cc/CCDrawQuad.cpp: Added. (WebCore::CCDrawQuad::CCDrawQuad): (WebCore::CCDrawQuad::toDebugBorderDrawQuad): (WebCore::CCDrawQuad::toRenderSurfaceDrawQuad): (WebCore::CCDrawQuad::toSolidColorDrawQuad): (WebCore::CCDrawQuad::toTileDrawQuad): (WebCore::CCDrawQuad::toCustomLayerDrawQuad): * platform/graphics/chromium/cc/CCDrawQuad.h: Added. (WebCore::CCDrawQuad::quadRect): (WebCore::CCDrawQuad::quadTransform): (WebCore::CCDrawQuad::layerTransform): (WebCore::CCDrawQuad::layerRect): (WebCore::CCDrawQuad::clipRect): (WebCore::CCDrawQuad::opacity): (WebCore::CCDrawQuad::drawsOpaque): (WebCore::CCDrawQuad::needsBlending): (WebCore::CCDrawQuad::isLayerAxisAlignedIntRect): (WebCore::CCDrawQuad::material): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createSharedQuadState): (WebCore::CCLayerImpl::appendQuads): (WebCore::CCLayerImpl::appendDebugBorderQuad): (WebCore::CCLayerImpl::quadTransform): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces): (WebCore::computeScreenSpaceTransformForSurface): (WebCore::damageInSurfaceSpace): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCRenderPass.cpp: Added. (WebCore::CCRenderPass::create): (WebCore::CCRenderPass::CCRenderPass): (WebCore::CCRenderPass::appendQuadsForLayer): (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderPass.h: Added. (WebCore::CCRenderPass::quadList): (WebCore::CCRenderPass::targetSurface): (WebCore::CCRenderPass::setSurfaceDamageRect): (WebCore::CCRenderPass::surfaceDamageRect): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: Added. (WebCore::CCRenderSurfaceDrawQuad::create): (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: Added. (WebCore::CCRenderSurfaceDrawQuad::layer): (WebCore::CCRenderSurfaceDrawQuad::surfaceDamageRect): * platform/graphics/chromium/cc/CCSharedQuadState.cpp: Added. (WebCore::CCSharedQuadState::create): (WebCore::CCSharedQuadState::CCSharedQuadState): (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect): * platform/graphics/chromium/cc/CCSharedQuadState.h: Added. (WebCore::CCSharedQuadState::quadTransform): (WebCore::CCSharedQuadState::layerTransform): (WebCore::CCSharedQuadState::layerRect): (WebCore::CCSharedQuadState::clipRect): (WebCore::CCSharedQuadState::opacity): (WebCore::CCSharedQuadState::isOpaque): * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Added. (WebCore::CCSolidColorDrawQuad::create): (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad): * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: Added. (WebCore::CCSolidColorDrawQuad::color): * platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Added. (WebCore::CCTileDrawQuad::create): (WebCore::CCTileDrawQuad::CCTileDrawQuad): * platform/graphics/chromium/cc/CCTileDrawQuad.h: Added. (WebCore::CCTileDrawQuad::textureId): (WebCore::CCTileDrawQuad::textureOffset): (WebCore::CCTileDrawQuad::textureSize): (WebCore::CCTileDrawQuad::textureFilter): (WebCore::CCTileDrawQuad::swizzleContents): (WebCore::CCTileDrawQuad::leftEdgeAA): (WebCore::CCTileDrawQuad::topEdgeAA): (WebCore::CCTileDrawQuad::rightEdgeAA): (WebCore::CCTileDrawQuad::bottomEdgeAA): (WebCore::CCTileDrawQuad::isAntialiased): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::CCTiledLayerImpl): (WebCore::CCTiledLayerImpl::quadTransform): (WebCore::CCTiledLayerImpl::appendQuads): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (WebCore::CCTiledLayerImpl::setContentsSwizzled): (WebCore::CCTiledLayerImpl::contentsSwizzled): 2011-12-14 Ojan Vafai Implement flexDirection and flexWrap and make flexFlow a proper shorthand. https://bugs.webkit.org/show_bug.cgi?id=74542 Reviewed by Tony Chang. In a followup patch, I'll cleanup all the *Flow methods in RenderFlexibleBox. Existing tests cover all the rendering behaviors, so only need to test the css property parsing. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::getPropertyValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexDirection): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyLonghand.cpp: (WebCore::initShorthandMap): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/RenderBox.cpp: (WebCore::RenderBox::sizesToIntrinsicLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::isColumnFlow): (WebCore::RenderFlexibleBox::isLeftToRightFlow): (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): (WebCore::RenderFlexibleBox::alignChildren): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexDirection): (WebCore::InheritedFlags::isColumnFlexDirection): (WebCore::InheritedFlags::setFlexDirection): (WebCore::InheritedFlags::initialFlexDirection): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2011-12-13 Jon Lee Enable notifications on Mac. Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: 2011-12-14 Ryosuke Niwa COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows https://bugs.webkit.org/show_bug.cgi?id=74327 Reviewed by Darin Adler. Always use unsigned instead of bool and unsigned in the bitfields of RuleData to shrink its size under MSVC. Unlike gcc and clang, MSVC pads each consecutive member variables of the same type in bitfields. e.g. if you have: sturct AB { unsigned m_1 : 31; bool m_2 : 1; } then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang only allocate sizeof(unsigned) * 1 for AB. * css/CSSStyleSelector.cpp: (WebCore::RuleData::RuleData): 2011-12-14 Ryosuke Niwa NodeChildList shouldn't be in NodeListNodeData https://bugs.webkit.org/show_bug.cgi?id=73969 Reviewed by Sam Weinig. Move NodeChildList out of NodeListNodeData to separate it from the other node lists in order to resolve the bug 73853. Unlike other DynamicNodeList, we don't need to invalidate NodeChildList on ancestors when children change. Moving ChildNodeList out of NodeListNodeData makes this difference apparent and makes DynamicNodeList::Caches in NodeListNodeData always held by a DynamicSubtreeNodeList, eliminating the need for hasOwnCaches() checks in various places. Also renamed the existing DynamicNodeList to DynamicSubtreeNodeList and re-introduced DynamicNodeList from which DynamicSubtreeNodeList and ChildNodeList both inherit to share the code for itemWithName. In addition, renamed registerDynamicNodeList and unregisterDynamicNodeList, which updates a counter for TreeScope::hasNodeListCaches, to registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList respectively. They are no longer called by ChildNodeList in order to avoid walking up the DOM tree inside invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged. Test: fast/dom/childnode-item-after-itemname.html * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots): * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::ChildNodeList): (WebCore::ChildNodeList::length): (WebCore::ChildNodeList::item): (WebCore::ChildNodeList::nodeMatches): * dom/ChildNodeList.h: * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): (WebCore::ClassNodeList::~ClassNodeList): * dom/ClassNodeList.h: * dom/ContainerNode.cpp: (WebCore::ContainerNode::childrenChanged): * dom/DynamicNodeList.cpp: (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): (WebCore::DynamicSubtreeNodeList::length): (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent): (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent): (WebCore::DynamicSubtreeNodeList::item): (WebCore::DynamicNodeList::itemWithName): (WebCore::DynamicSubtreeNodeList::isDynamicNodeList): (WebCore::DynamicSubtreeNodeList::invalidateCache): (WebCore::DynamicSubtreeNodeList::Caches::Caches): (WebCore::DynamicSubtreeNodeList::Caches::create): (WebCore::DynamicSubtreeNodeList::Caches::reset): * dom/DynamicNodeList.h: (WebCore::DynamicNodeList::DynamicNodeList): (WebCore::DynamicNodeList::~DynamicNodeList): (WebCore::DynamicNodeList::node): (WebCore::DynamicSubtreeNodeList::rootNode): * dom/NameNodeList.cpp: (WebCore::NameNodeList::NameNodeList): (WebCore::NameNodeList::~NameNodeList): * dom/NameNodeList.h: * dom/Node.cpp: (WebCore::Node::childNodes): (WebCore::Node::registerDynamicSubtreeNodeList): (WebCore::Node::unregisterDynamicSubtreeNodeList): (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): (WebCore::Node::removeCachedClassNodeList): (WebCore::Node::removeCachedNameNodeList): (WebCore::Node::removeCachedTagNodeList): (WebCore::Node::removeCachedLabelsNodeList): (WebCore::NodeListsNodeData::invalidateCaches): (WebCore::NodeListsNodeData::isEmpty): (WebCore::NodeRareData::clearChildNodeListCache): * dom/Node.h: * dom/NodeRareData.h: (WebCore::NodeRareData::nodeLists): (WebCore::NodeRareData::ensureChildNodeListCache): * dom/TagNodeList.cpp: (WebCore::TagNodeList::TagNodeList): (WebCore::TagNodeList::~TagNodeList): * dom/TagNodeList.h: * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): * html/LabelsNodeList.h: 2011-12-14 Ryosuke Niwa Push more member functions from EditCommand to CompositeEditCommand https://bugs.webkit.org/show_bug.cgi?id=74249 Reviewed by Enrica Casucci. Moved startingRootEditableElement and endingRootEditableElement from EditCommand to EditCommandComposition, and isTypingCommand, preservesTypingStyle, shouldRetainAutocorrectionIndicator, setShouldRetainAutocorrectionIndicator, and shouldStopCaretBlinking from EditCommand to CompositeEditCommand. Also removed EditCommand::updateLayout(). * editing/ApplyBlockElementCommand.cpp: (WebCore::ApplyBlockElementCommand::doApply): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): (WebCore::ApplyStyleCommand::applyInlineStyle): * editing/CompositeEditCommand.cpp: (WebCore::EditCommandComposition::EditCommandComposition): (WebCore::EditCommandComposition::setStartingSelection): (WebCore::EditCommandComposition::setEndingSelection): (WebCore::CompositeEditCommand::preservesTypingStyle): (WebCore::CompositeEditCommand::isTypingCommand): (WebCore::CompositeEditCommand::shouldRetainAutocorrectionIndicator): (WebCore::CompositeEditCommand::setShouldRetainAutocorrectionIndicator): (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): (WebCore::CompositeEditCommand::moveParagraphs): * editing/CompositeEditCommand.h: (WebCore::EditCommandComposition::startingRootEditableElement): (WebCore::EditCommandComposition::endingRootEditableElement): (WebCore::CompositeEditCommand::shouldStopCaretBlinking): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): (WebCore::DeleteSelectionCommand::fixupWhitespace): * editing/EditCommand.cpp: (WebCore::EditCommand::apply): (WebCore::EditCommand::unapply): (WebCore::EditCommand::reapply): (WebCore::EditCommand::setStartingSelection): (WebCore::EditCommand::setEndingSelection): (WebCore::EditCommand::setParent): * editing/EditCommand.h: (WebCore::EditCommand::isEditCommandComposition): * editing/Editor.cpp: (WebCore::dispatchEditableContentChangedEvents): (WebCore::Editor::appliedEditing): (WebCore::Editor::unappliedEditing): (WebCore::Editor::reappliedEditing): * editing/Editor.h: (WebCore::Editor::lastEditCommand): * editing/FrameSelection.cpp: (WebCore::FrameSelection::updateAppearance): * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::outdentParagraph): * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/TypingCommand.cpp: (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping): * editing/TypingCommand.h: (WebCore::TypingCommand::shouldRetainAutocorrectionIndicator): 2011-12-14 Tony Chang Fix compile on gcc on Mac. css/CSSStyleSelector.cpp:1254:166: error: unused parameter 'regionForStyling' [-Werror,-Wunused-parameter,3] css/CSSStyleSelector.cpp:1425:134: error: unused parameter 'regionForStyling' [-Werror,-Wunused-parameter,3] * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): 2011-12-14 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=74533 REGRESSION(r102619): Reproducible crash closing window with video + poster image inside an object element Reviewed by Darin Adler. Test: media/crash-closing-page-with-media-as-plugin-fallback.html Switch HTMLPlugInImageElement from using document activation callbacks to using the ActiveDOMObject mechanism which will prevent the unnecessary (and crashy) work at Document teardown: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::canSuspend): (WebCore::HTMLPlugInImageElement::suspend): (WebCore::HTMLPlugInImageElement::resume): * html/HTMLPlugInImageElement.h: 2011-12-14 Adrienne Walker [chromium] Compositor needs to set texture filtering on canvas layers https://bugs.webkit.org/show_bug.cgi?id=74530 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): 2011-12-14 Tony Chang Remove added calls to CSSStyleSelector to gain back another 2% in page cyclers https://bugs.webkit.org/show_bug.cgi?id=74537 Reviewed by Ojan Vafai. In r102234, calls to initForRegionStyling() were added in CSSStyleSelector. There's still a 2% perf regression in chromium page cyclers, so try removing these calls. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): 2011-12-14 Jonathan Backer [chromium] Plumb through flag for enabling partial swap https://bugs.webkit.org/show_bug.cgi?id=74513 Reviewed by James Robinson. * page/Settings.h: (WebCore::Settings::setPartialSwapEnabled): (WebCore::Settings::partialSwapEnabled): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): 2011-12-14 Mike Reed [skia] cache typeface in FontPlatformData https://bugs.webkit.org/show_bug.cgi?id=74415 Reviewed by Stephen White. No new tests. Existing tests apply, this is just an optimization to avoid looking up the typeface on each drawText call. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::Font::drawGlyphs): * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: (WebCore::createTypefaceFromHFont): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::operator=): (WebCore::FontPlatformData::~FontPlatformData): * platform/graphics/chromium/FontPlatformDataChromiumWin.h: (WebCore::FontPlatformData::typeface): (WebCore::FontPlatformData::lfQuality): (WebCore::FontPlatformData::hash): (WebCore::FontPlatformData::operator==): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::setupPaintForFont): (WebCore::paintSkiaText): * platform/graphics/skia/SkiaFontWin.h: 2011-12-14 Simon Fraser Make -webkit-filter animatable https://bugs.webkit.org/show_bug.cgi?id=68476 Reviewed by Chris Marrin. Add -webkit-filter to the list of CSS properties that are animatable. Animate it like we do transforms, by looking for matching lists of filter functions. Each kind of filter operation has a blend() method that handles blending for that filter. Test: css3/filters/filter-animation.html * GNUmakefile.list.am: Add FilterOperation.cpp to the build. * Target.pri: Ditto * WebCore.gypi: Ditto * WebCore.vcproj/WebCore.vcproj: Ditto * WebCore.xcodeproj/project.pbxproj: Ditto * page/animation/AnimationBase.cpp: (WebCore::blendFunc): New blendFunc() for FilterOperations, which does per-filter blending. (WebCore::AnimationBase::ensurePropertyMap): Make PropertyWrapper for filters. (WebCore::AnimationBase::AnimationBase): Adjust initialization order. * page/animation/AnimationBase.h: Adjusted the member variable order to minimize padding. (WebCore::AnimationBase::filterFunctionListsMatch): Accessor for the flag. * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::reset): (WebCore::ImplicitAnimation::validateTransformFunctionList): Adjust comment. The "is valid" terminology is confusing. (WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists): New method to check for matching lists of filter functions. * page/animation/ImplicitAnimation.h: * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::KeyframeAnimation): (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists): New method to check for matching lists of filter functions. * page/animation/KeyframeAnimation.h: * rendering/style/FilterOperation.cpp: Added. (WebCore::BasicColorMatrixFilterOperation::blend): (WebCore::BasicColorMatrixFilterOperation::passthroughAmount): (WebCore::BasicComponentTransferFilterOperation::blend): (WebCore::BasicComponentTransferFilterOperation::passthroughAmount): Different filters have different values for m_amount for the "passthrough" behavior. This method returns the appropriate value. (WebCore::GammaFilterOperation::blend): (WebCore::BlurFilterOperation::blend): (WebCore::DropShadowFilterOperation::blend): * rendering/style/FilterOperation.h: (WebCore::FilterOperation::blend): (WebCore::PassthroughFilterOperation::create): New "no-op" filter. (WebCore::PassthroughFilterOperation::operator==): (WebCore::PassthroughFilterOperation::PassthroughFilterOperation): * rendering/style/FilterOperations.cpp: (WebCore::FilterOperations::operationsMatch): * rendering/style/FilterOperations.h: 2011-12-14 Adam Klein Broaden support for mutation observation of attributes https://bugs.webkit.org/show_bug.cgi?id=74448 Reviewed by Ryosuke Niwa. The previously-landed MutationObserver support for attributes was incomplete: it didn't support mutations related to Attr nodes (methods on Attrs, setAttributeNode/removeAttributeNode on Element, or methods on NamedNodeMap). This patch adds full support of mutation observation for all these cases, and adds test cases for all these situations. * dom/Attr.cpp: (WebCore::Attr::setValue): Enqueue a mutation record when Attr.value is set from JS. (WebCore::Attr::childrenChanged): Enqueue a mutation record when an Attr's value changes to due additions/removals of Text children. * dom/Element.cpp: (WebCore::Element::enqueueAttributesMutationRecordIfRequested): Previously a static, expose as part of Element's interface to allow it to be re-used by NamedNodeMap and Attr. (WebCore::Element::removeAttribute): Remove enqueue call now handled by NamedNodeMap. (WebCore::Element::setAttributeInternal): Fixup call of enqueueAttributesMutationRecordIfRequested. * dom/Element.h: * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): Enqueue a mutation record when an attribute is changed via Element.attributes.setNamedItem from JS. (WebCore::NamedNodeMap::removeNamedItem): Enqueue a mutation record when an attribute is removed, either via Element.attributes.removeNamedItem or Element.removeAttribute. 2011-12-14 Raymond Toy * platform/audio/Distance.h (WebCore): Incorrect calculation for DistanceEffect linearGain https://bugs.webkit.org/show_bug.cgi?id=72871 Reviewed by Kenneth Russell. Tests still need to be written for all distance models. This does not add a new API and just corrects an implementation error. * platform/audio/Distance.cpp: (WebCore::DistanceEffect::linearGain): Implement correct linearGain function. (Fix proposed by davidgaleano@hotmail.com.) * platform/audio/Distance.h: Add link to Open AL specification. 2011-12-14 Ilya Tikhonovsky Web Inspector: consider disabling network tracking while running the CPU profile. https://bugs.webkit.org/show_bug.cgi?id=74221 The WebCore instrumentation on the backend affects the performance of inspected page. As the result the CPU profiler's stats data are far away from the reality. Solution: the profiler code will temporary disable the resource tracking on backend. Side effect: the resource tree gets out of sinc because it uses Network Agent's notifications for updating the resource tree. Solution: NetworkManager will report about the changes of the resource tracking state and ResourcePanel will re-fetch the resources tree. Reviewed by Pavel Feldman. * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.enableResourceTracking.networkAgentEnabled): (WebInspector.NetworkManager.prototype.enableResourceTracking): (WebInspector.NetworkManager.prototype.disableResourceTracking.networkAgentDisabled): (WebInspector.NetworkManager.prototype.disableResourceTracking): (WebInspector.NetworkManager.prototype.inflightResourceForURL): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileType.prototype.buttonClicked): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel): (WebInspector.ResourceTreeModel.prototype._onResourceTrackingEnabled): 2011-12-14 Carlos Garcia Campos [GTK] Fix PlatformScreen::screenAvailableRect when there's no view widget https://bugs.webkit.org/show_bug.cgi?id=74520 Reviewed by Martin Robinson. Use the default screen to get the available screen area instead of just returning an empty rectangle. This is useful for WebKit2, since there's no view widget in the web process. * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenAvailableRect): 2011-12-14 Eric Carlson Media url with fragment may not load https://bugs.webkit.org/show_bug.cgi?id=74443 Reviewed by Darin Adler. Test: media/media-extension-with-fragment.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): Pass the KURL to MediaPlayer, let it extract a String when it needs it. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): Take a KURL, not a String. Look for the file extension in the last path component so we don't examine fragments and/or queries. * platform/graphics/MediaPlayer.h: 2011-12-14 Jacky Jiang [BlackBerry] Remove some duplicate entries in Source/WebCore/PlatformBlackBerry.cmake https://bugs.webkit.org/show_bug.cgi?id=74484 Reviewed by Daniel Bates. Trivial fix, so no new tests. * PlatformBlackBerry.cmake: 2011-12-14 Anders Carlsson Add back the callOnMainThread overload that takes a WTF::Function https://bugs.webkit.org/show_bug.cgi?id=74512 Reviewed by Darin Adler. Explicitly qualify the Function enum flag, since MSVC2005 is too stupid to disambiguate the Function class template and the enum flag. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlot): (WebCore::JSDOMWindow::getOwnPropertyDescriptor): * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::getOwnPropertySlotDelegate): (WebCore::JSHistory::getOwnPropertyDescriptorDelegate): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::getOwnPropertySlotDelegate): (WebCore::JSLocation::getOwnPropertyDescriptorDelegate): 2011-12-14 Kenneth Russell Unreviewed, rolling out r102688. http://trac.webkit.org/changeset/102688 https://bugs.webkit.org/show_bug.cgi?id=74220 Under the hypothesis that it might be the cause of browser_tests and ui_tests crashes on Chromium canaries -- will reland if not. * bindings/v8/V8Proxy.cpp: (WebCore::addMessageToConsole): (WebCore::logInfo): (WebCore::V8Proxy::reportUnsafeAccessTo): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): 2011-12-14 Vsevolod Vlasov Web Inspector: DatabaseTableView should escape table name. https://bugs.webkit.org/show_bug.cgi?id=74503 Reviewed by Pavel Feldman. Test: inspector/database-table-name-excaping.html * inspector/front-end/DatabaseTableView.js: (WebInspector.DatabaseTableView.prototype._escapeTableName): (WebInspector.DatabaseTableView.prototype.update): 2011-12-14 Philippe Normand [GStreamer] padTemplate leak in webkitwebaudiosrc https://bugs.webkit.org/show_bug.cgi?id=74495 Reviewed by Martin Robinson. Use a GstPadTemplate smart pointer in webkit_web_audio_src_init to avoid a memory leak after the ghost pad creation. * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: (webkit_web_audio_src_init): * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: (WTF::adoptGRef): (WTF::GstPadTemplate): * platform/graphics/gstreamer/GRefPtrGStreamer.h: 2011-12-14 Julien Chaffraix Crash in RenderBox::paintBoxDecorations when documentElement has no renderer https://bugs.webkit.org/show_bug.cgi?id=64284 Reviewed by Ryosuke Niwa. Test: fast/dynamic/crash-paint-no-documentElement-renderer.html * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBackground): Check the documentElement's renderer before using it which matches what RenderView does. 2011-12-14 Tom Sepez DocumentLoader should ref its mainResourceLoader. https://bugs.webkit.org/show_bug.cgi?id=74424 Reviewed by Adam Barth. Tests: platform/chromium/http/tests/security/mixedContent/insecure-iframe-in-main-frame-allowed.html platform/chromium/http/tests/security/mixedContent/insecure-iframe-in-main-frame-blocked.html * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::startLoadingMainResource): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::loadNow): 2011-12-14 Stephen White CSS Filters should support GPU acceleration https://bugs.webkit.org/show_bug.cgi?id=74441 Reviewed by Darin Adler. Will be covered by existing CSS filters tests, when run in GPU mode. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::prepare): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterEffect): 2011-12-14 Brian Salomon [CHROMIUM/SKIA] Handle put[Un/Pre]multipliedImageData conversions in Skia rather than ImageBuffer https://bugs.webkit.org/show_bug.cgi?id=73953 Reviewed by Stephen White. Tested by existing canvas2d layout tests. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::putImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): 2011-12-14 Mary Wu Remove SharedBufferBlackBerry.cpp from WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=74488 Reviewed by Rob Buis. Remove dead code, no new tests. * platform/blackberry/SharedBufferBlackBerry.cpp: Removed. 2011-12-14 Kentaro Hara Use [Supplemental] IDL in WebSocket https://bugs.webkit.org/show_bug.cgi?id=74160 Reviewed by Adam Barth. By using the [Supplemental] IDL, this patch moves declarations of WebSocket attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl, which helps make WebSocket a self-contained module. No new tests, no change in behavior. Confirm that http/tests/websocket/* pass. * WebCore.gypi: Added DOMWindowWebSocket.idl. * page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details). * websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl. 2011-12-14 Pierre Rossi Unreviewed fix. Broke qt minimal release compilation. * platform/qt/RenderThemeQtMobile.cpp: 2011-12-14 Allan Sandfeld Jensen Add different salt to different types of selectors. So the CSS fast path can tell the different between tags and class attributes with otherwise identical values. https://bugs.webkit.org/show_bug.cgi?id=74284 Reviewed by Antti Koivisto. * css/SelectorChecker.cpp: (WebCore::collectElementIdentifierHashes): (WebCore::collectDescendantSelectorIdentifierHashes): * css/SelectorChecker.h: 2011-12-14 Pierre Rossi [Qt] Mobile theme could use a little refresh https://bugs.webkit.org/show_bug.cgi?id=74293 The look and feel of the "mobile theme" we're using in QtWebKit dates back to the maemo 5 days. This is an attempt at making it look less out of place, and also support progress and range. Reviewed by Kenneth Rohde Christiansen. No new tests, this is still not the default theme for tests. * DerivedSources.pri: * css/mobileThemeQt.css: Added. (input[type="submit"], select): (input[type="submit"]:disabled, input[type="submit"]:disabled:active, select:disabled, input[type="text"]:disabled): (input[type="submit"]:active): * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::extraDefaultStyleSheet): (WebCore::StylePainter::StylePainter): (WebCore::StylePainter::init): (WebCore::StylePainter::~StylePainter): * platform/qt/RenderThemeQt.h: * platform/qt/RenderThemeQtMobile.cpp: (WebCore::drawRectangularControlBackground): (WebCore::shrinkRectToSquare): (WebCore::StylePainterMobile::StylePainterMobile): (WebCore::StylePainterMobile::~StylePainterMobile): (WebCore::StylePainterMobile::drawCheckableBackground): (WebCore::StylePainterMobile::sizeForPainterScale): (WebCore::StylePainterMobile::drawChecker): (WebCore::StylePainterMobile::findCheckBox): (WebCore::StylePainterMobile::drawRadio): (WebCore::StylePainterMobile::findRadio): (WebCore::StylePainterMobile::drawMultipleComboButton): (WebCore::StylePainterMobile::drawSimpleComboButton): (WebCore::StylePainterMobile::getButtonImageSize): (WebCore::StylePainterMobile::findComboButton): (WebCore::StylePainterMobile::drawLineEdit): (WebCore::StylePainterMobile::drawCheckBox): (WebCore::StylePainterMobile::drawRadioButton): (WebCore::StylePainterMobile::drawPushButton): (WebCore::StylePainterMobile::drawComboBox): (WebCore::StylePainterMobile::drawProgress): (WebCore::StylePainterMobile::drawSliderThumb): (WebCore::RenderThemeQtMobile::paintButton): (WebCore::RenderThemeQtMobile::paintTextField): (WebCore::RenderThemeQtMobile::setPopupPadding): (WebCore::RenderThemeQtMobile::paintMenuList): (WebCore::RenderThemeQtMobile::paintMenuListButton): (WebCore::RenderThemeQtMobile::animationDurationForProgressBar): (WebCore::RenderThemeQtMobile::paintProgressBar): (WebCore::RenderThemeQtMobile::paintSliderTrack): (WebCore::RenderThemeQtMobile::paintSliderThumb): (WebCore::RenderThemeQtMobile::adjustSliderThumbSize): * platform/qt/RenderThemeQtMobile.h: 2011-12-14 Rakesh KN [Non-Mac] Change event should be fired when changing option by using keyboard. https://bugs.webkit.org/show_bug.cgi?id=74384 Reviewed by Kent Tamura. Fire onchange event when option is changed using up/down/right/left/pageup/pagedown/home/end keys. Test: fast/forms/select/menulist-onchange-fired-with-key-up-down.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Setting the DispatchChangeEvent selection option flag when the option is selected using up/down/right/left/pageup/pagedown/home/end keys. 2011-12-13 Vsevolod Vlasov Web Inspector: TreeOutline's is broken when li elements have padding-left different from 14px. https://bugs.webkit.org/show_bug.cgi?id=74445 Reviewed by Pavel Feldman. * inspector/front-end/treeoutline.js: (TreeElement.prototype.isEventWithinDisclosureTriangle): 2011-12-13 Vsevolod Vlasov Web Inspector: [Regression] Scripts panel debug sidebar toolbar should not be scrolled out of the screen. https://bugs.webkit.org/show_bug.cgi?id=74447 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.wasShown): * inspector/front-end/scriptsPanel.css: (#scripts-debug-toolbar): (#scripts-debug-sidebar-contents): 2011-12-14 Alexander Færøy [Qt] DeviceOrientationClientMockQt should be removed in favor of DeviceOrientationClientMock https://bugs.webkit.org/show_bug.cgi?id=74417 Reviewed by Simon Hausmann. Based on original patch by Kenneth Christiansen. Already covered by current tests. * dom/DeviceOrientationController.h: (WebCore::DeviceOrientationController::client): 2011-12-14 Jacky Jiang [BlackBerry] Switch to libjpeg for decoding https://bugs.webkit.org/show_bug.cgi?id=74475 Reviewed by Daniel Bates. Switch to cross platform JPEG image decoder for decoding as this keeps us inline with other ports and less to maintain. * PlatformBlackBerry.cmake: 2011-12-03 Philippe Normand [GTK] Bad text rendering since r101343 https://bugs.webkit.org/show_bug.cgi?id=73744 Reviewed by Martin Robinson. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::setCairoFontOptionsFromFontConfigPattern): Keep Cairo hint metrics unchanged for better visual font rendering results. 2011-12-13 Hajime Morrita Unreviewed attempt for fixing windows build. - Included which defined portable version of lround(). - Add some static_cast<> to suppress warnings. * platform/animation/AnimationUtilities.h: (WebCore::blend): 2011-12-13 Wei Charles [BlackBerry] Add the new plugin files into the build system. https://bugs.webkit.org/show_bug.cgi?id=74483 Reviewed by Daniel Bates. No new tests, just add new files to the build system. * PlatformBlackBerry.cmake: 2011-12-13 Yosifumi Inoue [Forms] Default selection of select(menulist) should not be disabled https://bugs.webkit.org/show_bug.cgi?id=74270 Reviewed by Kent Tamura. This patch changes default selection of select(menulist) element to 1. Selected option element. If there are multiple options which have selected state, we pick the largest index option up. (same as current) 2. Non-disabled option element (new behavior) 3. The first option if all options are disabled. (new behavior) Tests: fast/forms/select/menulist-disabled-option-expected.html fast/forms/select/menulist-disabled-option.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::recalcListItems): Implement new logic for selection. 2011-12-13 Simon Fraser Share blend progress code https://bugs.webkit.org/show_bug.cgi?id=74464 Reviewed by Dean Jackson. Lots of places in the code had copies of the animation interpolation logic "from + (to - from) * progress", in various forms. Coalesce all these into calls to a few new inline functions in a new AnimationUtilities.h header. Color and Length get their own blend fuctions in their respective headers. Covered by existing tests. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSGradientValue.cpp: * page/animation/AnimationBase.cpp: (WebCore::blendFunc): * platform/Length.h: (WebCore::Length::blend): * platform/animation/AnimationUtilities.h: Added. (WebCore::blend): * platform/graphics/Color.h: (WebCore::blend): * platform/graphics/transforms/PerspectiveTransformOperation.cpp: (WebCore::PerspectiveTransformOperation::blend): * platform/graphics/transforms/RotateTransformOperation.cpp: (WebCore::RotateTransformOperation::blend): * platform/graphics/transforms/ScaleTransformOperation.cpp: (WebCore::ScaleTransformOperation::blend): * platform/graphics/transforms/SkewTransformOperation.cpp: (WebCore::SkewTransformOperation::blend): * platform/graphics/transforms/TranslateTransformOperation.cpp: (WebCore::TranslateTransformOperation::blend): * svg/SVGLength.h: (WebCore::SVGLength::blend): * svg/SVGPathBlender.cpp: (WebCore::blendFloatPoint): (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat): (WebCore::SVGPathBlender::blendArcToSegment): 2011-12-13 Mary Wu Upstream 3 files into WebCore/platform/blackberry ClipboardBlackBerry.cpp/h, PasteboardBlackBerry.cpp https://bugs.webkit.org/show_bug.cgi?id=74381 Reviewed by Rob Buis. Main contributor: Mike Fenton Initial upstream, no new tests. * platform/blackberry/ClipboardBlackBerry.cpp: Added. * platform/blackberry/ClipboardBlackBerry.h: Added. * platform/blackberry/PasteboardBlackBerry.cpp: Added. 2011-12-13 James Robinson Unreviewed, rolling out r102726. http://trac.webkit.org/changeset/102726 https://bugs.webkit.org/show_bug.cgi?id=74154 Does not compile on clang * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::UpdatableTile): (WebCore::TiledLayerChromium::createTile): * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::addTile): (WebCore::CCLayerTilingData::takeTile): (WebCore::CCLayerTilingData::tileAt): * platform/graphics/chromium/cc/CCLayerTilingData.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::DrawableTile::DrawableTile): (WebCore::CCTiledLayerImpl::createTile): 2011-12-13 Hajime Morrita Unreviewed, rolling out r102732. http://trac.webkit.org/changeset/102732 The last fix makes no sense... * platform/graphics/chromium/cc/CCLayerTilingData.h: 2011-12-13 Hajime Morrita HTML details summary not working with form controls https://bugs.webkit.org/show_bug.cgi?id=74398 Reviewed by Kent Tamura. Allowed HTMLSummaryElement to skip the toggle logic if the event target is a form control. Test: fast/html/details-click-controls.html * html/HTMLSummaryElement.cpp: (WebCore::isClickableControl): (WebCore::HTMLSummaryElement::defaultEventHandler): 2011-12-13 James Wei Optimize to not use pow() in the inner loop in AudioParamTimeline https://bugs.webkit.org/show_bug.cgi?id=73530 Reviewed by Kenneth Russell. No new tests. * webaudio/AudioParamTimeline.cpp: (WebCore:AudioParamTimeline:valuesForTimeRangeImpl): 2011-12-13 Hajime Morrita Unreviewed Chromium-Mac build fix trial. * platform/graphics/chromium/cc/CCLayerTilingData.h: 2011-12-13 David Reveman [Chromium] Initialize Settings::m_perTileDrawingEnabled properly. https://bugs.webkit.org/show_bug.cgi?id=74476 Reviewed by James Robinson. Add m_perTileDrawingEnabled(false) to WebCore::Settings initialize list. No new tests. * page/Settings.cpp: (WebCore::Settings::Settings): 2011-12-13 Anders Carlsson Add a very bare-bones implementation of bind and Function to WTF https://bugs.webkit.org/show_bug.cgi?id=74462 Reviewed by Sam Weinig. Add a forwarding header for Functional.h. * ForwardingHeaders/wtf/Functional.h: Added. 2011-12-13 Adrienne Walker [chromium] Use HashMap<..., OwnPtr> for compositor tilemap https://bugs.webkit.org/show_bug.cgi?id=74154 Reviewed by James Robinson. After r102410 landed, it's now possible to properly use an OwnPtr to store tiles rather than hackily use a RefPtr. Covered by the compositing/ layout tests. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::create): (WebCore::UpdatableTile::UpdatableTile): (WebCore::TiledLayerChromium::createTile): * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::addTile): (WebCore::CCLayerTilingData::takeTile): (WebCore::CCLayerTilingData::tileAt): * platform/graphics/chromium/cc/CCLayerTilingData.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::DrawableTile::create): (WebCore::DrawableTile::DrawableTile): (WebCore::CCTiledLayerImpl::createTile): 2011-12-13 Dmitry Lomov https://bugs.webkit.org/show_bug.cgi?id=73691 [JSC] Implement correct order of window.postMessage arguments. This change supports a new signature of windowPostMessage: postMessage(message, targetOrigin[, transferrables]) as well as the legacy webkit-proprietary: postMessage(message, [transferrables,] targetOrigin) The latter is only supported for cases when targetOrigin is a String. Reviewed by David Levin. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::handlePostMessage): * page/DOMWindow.idl: 2011-12-13 Rafael Weinstein [MutationObservers] Avoid allocations if no observers are present https://bugs.webkit.org/show_bug.cgi?id=74423 Reviewed by Ojan Vafai. This patch adds Node::mayHaveMutationObserversOfType which can be used to check if there are any observers at all which could receive a give type of mutation. MutationObserverInterestGroup uses this to possibly exit early (returning null) if no observers are present. No tests needed. This patch is just a refactor. * css/CSSMutableStyleDeclaration.cpp: * dom/CharacterData.cpp: (WebCore::CharacterData::dispatchModifiedEvent): * dom/ChildListMutationScope.cpp: (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::incrementScopingLevel): * dom/Element.cpp: (WebCore::enqueueAttributesMutationRecord): * dom/Node.cpp: (WebCore::Node::mayHaveMutationObserversOfType): * dom/Node.h: * dom/WebKitMutationObserver.cpp: (WebCore::MutationObserverInterestGroup::createIfNeeded): (WebCore::MutationObserverInterestGroup::createForChildListMutation): (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation): (WebCore::MutationObserverInterestGroup::createForAttributesMutation): (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup): (WebCore::MutationObserverInterestGroup::enqueueMutationRecord): * dom/WebKitMutationObserver.h: 2011-12-13 Robin Dunn Don't make the bitmap transparent when using theme drawing calls that don't support transparent bitmaps. https://bugs.webkit.org/show_bug.cgi?id=74319 Reviewed by Kevin Ollivier. * platform/wx/LocalDC.h: (WebCore::LocalDC::LocalDC): * platform/wx/RenderThemeWx.cpp: (WebCore::RenderThemeWx::paintButton): 2011-12-13 Tony Chang Inline all of initForRegionStyling except for the rarely used part for non-null regions. https://bugs.webkit.org/show_bug.cgi?id=74435 Reviewed by Andreas Kling. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::initForRegionStyling): Inline setting of m_regionForStyling (WebCore::CSSStyleSelector::initRegionRules): Move code that only applies to CSSRegions into non-inlined code. * css/CSSStyleSelector.h: 2011-12-13 James Simonsen Unreviewed, Chromium Mac build fix. * page/PerformanceTiming.h: 2011-12-13 Adam Klein Update variable names in NamedNodeMap methods to match WebKit style https://bugs.webkit.org/show_bug.cgi?id=74437 Reviewed by Ojan Vafai. While reading these methods in preparation for a refactor, I found them hard to understand due to short or confusing variable names. I think the new names are much clearer, and match WebKit style. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): (WebCore::NamedNodeMap::removeNamedItem): 2011-12-13 Xingnan Wang Implement a function of vector multiply with SSE2 optimization in VectorMath.cpp. https://bugs.webkit.org/show_bug.cgi?id=74048 Reviewed by Benjamin Poulain. The vmul is a function for an element-by-element multiply of two float vectors and we get about 3.4x performance improvement with SSE2 optimization compared with the common multiply. Use vmul in AudioBus::copyWithSampleAccurateGainValuesFrom(). * platform/audio/AudioBus.cpp: (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom): * platform/audio/VectorMath.cpp: (WebCore::VectorMath::vmul): * platform/audio/VectorMath.h: 2011-12-13 Vsevolod Vlasov Web Inspector: [Regression] ResourceHeadersView sections should be expanded by default. https://bugs.webkit.org/show_bug.cgi?id=74434 Reviewed by Pavel Feldman. * inspector/front-end/treeoutline.js: 2011-12-13 Vsevolod Vlasov Web Inspector: Network item view does not correctly decode "+" in request parameters. https://bugs.webkit.org/show_bug.cgi?id=74422 Reviewed by Pavel Feldman. Test: http/tests/inspector/network/request-parameters-decoding.html * inspector/front-end/ResourceHeadersView.js: (WebInspector.ResourceHeadersView.prototype._formatParameter): (WebInspector.ResourceHeadersView.prototype._refreshParms): 2011-12-13 Alok Priyadarshi [chromium] compositing/masks layout tests fail with accelerated drawing https://bugs.webkit.org/show_bug.cgi?id=72760 Reviewed by Stephen White. Accelerated drawing path used to render bottom-up upright textures, which was opposite of what the software path rendered. The textures produced by the accelerated path was flipped along Y in the shader to make it upside down as expected by the compositor. This strategy does not work in case of masks which do not go through a shader and hence do not get flipped, which results in a case where texture in the render surface is top-down, while that in the mask is bottom-up. This patch makes accelerated drawing path render textures in the same orientation as the software path. LayerTextureUpdater::Orientation was added to support the difference in texture orientation between software and accelerated paths. Now that both paths produce textures in the same orientation, there is no need for it. No new tests needed. Covered by existing compositing tests. * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: * platform/graphics/chromium/ImageLayerChromium.cpp: * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::setLayerTreeHost): (WebCore::TiledLayerChromium::pushPropertiesTo): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::drawTiles): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (WebCore::CCTiledLayerImpl::setSkipsDraw): 2011-12-09 Zhenyao Mo Implement GLES2 CheckFramebufferStatus() behavior https://bugs.webkit.org/show_bug.cgi?id=74228 Reviewed by Kenneth Russell. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::getColorBufferWidth): Add ColorBuffer to the function name - this is more accurate. (WebCore::WebGLFramebuffer::getColorBufferHeight): Ditto. (WebCore::WebGLFramebuffer::checkStatus): Implement full semantics of GLES2 glCheckFramebufferStatus(). (WebCore::WebGLFramebuffer::onAccess): Call checkStatus(). * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::checkFramebufferStatus): Call checkStatus(). (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): No longer check framebuffer status. (WebCore::WebGLRenderingContext::getBoundFramebufferWidth): Call getColorBufferWidth. (WebCore::WebGLRenderingContext::getBoundFramebufferHeight): Call getColorBufferHeight. 2011-12-13 James Simonsen [Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime() https://bugs.webkit.org/show_bug.cgi?id=58354 Reviewed by Pavel Feldman. No new tests. Relies on existing webtiming-* tests. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: Use monotonic times. (WebCore::Document::setReadyState): (WebCore::Document::finishedParsing): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didFinishLoadingImpl): Convert monotonicFinishTime to wall time if needed. * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForTiming): Convert monotonic requestTime to wall time. (WebCore::buildObjectForResourceResponse): Plumbing for above. (WebCore::buildObjectForCachedResource): Ditto. (WebCore::InspectorResourceAgent::willSendRequest): Ditto. (WebCore::InspectorResourceAgent::didReceiveResponse): Ditto. (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): Ditto. * loader/DocumentLoadTiming.cpp: Added. (WebCore::DocumentLoadTiming::DocumentLoadTiming): (WebCore::DocumentLoadTiming::setNavigationStart): Determine reference time and root reference time. (WebCore::DocumentLoadTiming::addRedirect): Moved logic from MainResourceLoader. (WebCore::DocumentLoadTiming::convertMonotonicTimeToDocumentTime): Helper to compute wall time from monotonic time. * loader/DocumentLoadTiming.h: Turned into class. Made times monotonic. (WebCore::DocumentLoadTiming::setUnloadEventStart): (WebCore::DocumentLoadTiming::setUnloadEventEnd): (WebCore::DocumentLoadTiming::setRedirectStart): (WebCore::DocumentLoadTiming::setRedirectEnd): (WebCore::DocumentLoadTiming::setFetchStart): (WebCore::DocumentLoadTiming::setResponseEnd): (WebCore::DocumentLoadTiming::setLoadEventStart): (WebCore::DocumentLoadTiming::setLoadEventEnd): (WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument): (WebCore::DocumentLoadTiming::navigationStart): (WebCore::DocumentLoadTiming::unloadEventStart): (WebCore::DocumentLoadTiming::unloadEventEnd): (WebCore::DocumentLoadTiming::redirectStart): (WebCore::DocumentLoadTiming::redirectEnd): (WebCore::DocumentLoadTiming::redirectCount): (WebCore::DocumentLoadTiming::fetchStart): (WebCore::DocumentLoadTiming::responseEnd): (WebCore::DocumentLoadTiming::loadEventStart): (WebCore::DocumentLoadTiming::loadEventEnd): (WebCore::DocumentLoadTiming::hasCrossOriginRedirect): (WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): (WebCore::FrameLoader::loadProvisionalItemFromCachedPage): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterNavigationPolicy): (WebCore::MainResourceLoader::willSendRequest): Moved logic to DocumentLoadTiming. (WebCore::MainResourceLoader::didReceiveData): Use monotonic time. (WebCore::MainResourceLoader::didFinishLoading): Ditto. (WebCore::MainResourceLoader::load): * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchLoadEvent): * page/DOMWindow.h: Removed dispatchTimedEvent. It doesn't really help in the new model. * page/PerformanceNavigation.cpp: (WebCore::PerformanceNavigation::redirectCount): * page/PerformanceTiming.cpp: Removed skew correction code. This should never happen now. (WebCore::PerformanceTiming::navigationStart): (WebCore::PerformanceTiming::unloadEventStart): (WebCore::PerformanceTiming::unloadEventEnd): (WebCore::PerformanceTiming::redirectStart): (WebCore::PerformanceTiming::redirectEnd): (WebCore::PerformanceTiming::fetchStart): (WebCore::PerformanceTiming::responseEnd): (WebCore::PerformanceTiming::domLoading): (WebCore::PerformanceTiming::domInteractive): (WebCore::PerformanceTiming::domContentLoadedEventStart): (WebCore::PerformanceTiming::domContentLoadedEventEnd): (WebCore::PerformanceTiming::domComplete): (WebCore::PerformanceTiming::loadEventStart): (WebCore::PerformanceTiming::loadEventEnd): (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Used for ResourceLoadTiming. (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds): Used for DocumentTiming and DocumentLoadTiming. * page/PerformanceTiming.h: * platform/network/ResourceLoadTiming.cpp: (WebCore::ResourceLoadTiming::convertResourceLoadTimeToDocumentTime): * platform/network/ResourceLoadTiming.h: Added helper function to convert to wall times. Added instructions for use. 2011-12-13 Adam Klein Reduce code duplication in Element::setAttribute methods https://bugs.webkit.org/show_bug.cgi?id=74425 Reviewed by Ryosuke Niwa. Two overloads of Element::setAttribute share almost all their code, including tricky logic around updating the appropriate Attribute and Attr objects and notifying the Inspector and MutationObservers. This patch puts the common logic in a new setAttributeInternal method which is called by the other two. No new tests, refactoring only. * dom/Element.cpp: (WebCore::Element::setAttribute): (WebCore::Element::setAttributeInternal): * dom/Element.h: 2011-12-13 Brady Eidson Disable deprecation warnings around more code where we cannot easily switch away from the deprecated APIs. Reviewed by Mark Rowe. * bindings/objc/DOMInternal.mm: * bridge/objc/objc_instance.mm: 2011-12-12 Robert Hogan CSS 2.1 failure: eof-002.htm fails https://bugs.webkit.org/show_bug.cgi?id=74309 Reviewed by Dean Jackson. Test: css2.1/20110323/eof-002-expected.html * css/CSSGrammar.y: Treat EOF during a function expression with an open parenthesis as a close parenthesis. 2011-12-13 Adam Klein V8Proxy cleanup: replace custom logging methods with standard WebCore calls https://bugs.webkit.org/show_bug.cgi?id=74220 Reviewed by Adam Barth. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::reportUnsafeAccessTo): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): 2011-12-13 Tor Arne Vestbø [Qt] Get rid of layering violations in includes WebKit/qt/API and WebKit/qt/WebCoreSupport should not be included in the webcore.prf, but rather in each target that specificly needs headers in these location. We used to include them directly in webcore since we had layering violations between WebCore and WebKit, but now that they are gone there's no reason to do that. Reviewed by Simon Hausmann. * bridge/qt/qt_instance.cpp: * platform/graphics/qt/GraphicsContext3DQt.cpp: * platform/graphics/qt/ImageQt.cpp: * platform/network/qt/QNetworkReplyHandler.cpp: * platform/network/qt/ResourceHandleQt.cpp: * platform/qt/CookieJarQt.cpp: * platform/qt/RenderThemeQStyle.cpp: * platform/qt/RenderThemeQt.cpp: 2011-12-13 Vsevolod Vlasov Web Inspector: Add scripts navigator sidebar to scripts panel. https://bugs.webkit.org/show_bug.cgi?id=73086 Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/Images/domain.png: Added. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName): * inspector/front-end/ScriptsNavigator.js: Added. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if): (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype._removeSourceFrame): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): (WebInspector.ScriptsPanel.prototype._updateExecutionLine): (WebInspector.ScriptsPanel.prototype._scriptSelectedInNavigator): (WebInspector.ScriptsPanel.prototype._createDebugToolbar): * inspector/front-end/Settings.js: * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.appendTab): (WebInspector.TabbedPane.prototype.selectTab): (WebInspector.TabbedPane.prototype.highlightLine): (WebInspector.TabbedPane.prototype.elementsToRestoreScrollPositionsFor): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.get domain): (WebInspector.UISourceCode.prototype.get folderName): (WebInspector.UISourceCode.prototype.get displayName): (WebInspector.UISourceCode.prototype._parseURL): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (.tabbed-pane): (.tabbed-pane-content): * inspector/front-end/inspector.html: * inspector/front-end/networkPanel.css: * inspector/front-end/scriptsPanel.css: (#scripts-navigator-resizer-widget): (.scripts-navigator-domain-tree-item .icon): (.scripts-navigator-folder-tree-item .icon): (.scripts-navigator-script-tree-item .icon): (.scripts.panel .navigator): (#scripts-navigator-tabbed-pane .tabbed-pane-header): (#scripts-navigator-tabbed-pane .tabbed-pane-content): (.scripts.panel .navigator li): (.scripts.panel .navigator :focus li.selected): (.scripts.panel .navigator li.selected .selection): (.scripts.panel .navigator :focus li.selected .selection): (.scripts.panel .navigator .icon): (.scripts.panel .base-navigator-tree-element-title): * inspector/front-end/treeoutline.js: (TreeOutline): (TreeOutline.prototype.appendChild): 2011-12-12 Andreas Kling CollectionCache: Remove unused copy constructor and make it noncopyable. Reviewed by Simon Hausmann. * html/CollectionCache.cpp: * html/CollectionCache.h: 2011-12-13 Jarred Nicholls XHR should use m_responseTypeCode internally to be consistent with WebKit coding style https://bugs.webkit.org/show_bug.cgi?id=74330 Reviewed by Alexey Proskuryakov. No new tests needed, no behavioral changes. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseText): (WebCore::XMLHttpRequest::responseXML): (WebCore::XMLHttpRequest::responseBlob): (WebCore::XMLHttpRequest::didReceiveData): * xml/XMLHttpRequest.h: (WebCore::XMLHttpRequest::asBlob): 2011-12-13 Kentaro Hara Use the [Supplemental] IDL for webaudio attributes in Chromium https://bugs.webkit.org/show_bug.cgi?id=73394 Reviewed by Adam Barth. - Overview: Using the [Supplemental] IDL, this patch moves the attribute declarations of webaudio from DOMWindow.idl into a new IDL file webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained feature (aka a module). - This patch changes the build flow of WebCore.gyp as follows: Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl; } - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL will be removed after build scripts for all platforms support the [Supplemental] IDL. The motivation for the [Supplemented] IDL is as follows: In order to support the [Supplemental] IDL, we need to (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp (2) and run generate-bindings.pl with the supplemental_dependency.tmp. This build flow requires a change on the following build scripts, but changing all the build scripts all at once without any regression is too difficult: - DerivedSources.make - DerivedSources.pri - GNUmakefile.am - PlatformBlackBerry.cmake - UseJSC.cmake - UseV8.cmake - WebCore.vcproj/MigrateScripts - WebCore.vcproj/WebCore.vcproj - bindings/gobject/GNUmakefile.am - WebCore.gyp/WebCore.gyp Thus, we are planning to change the build scripts one by one, which implies that we need to allow the temporary state in which some build scripts support [Supplemental] IDL but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented]. The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental] in another IDL file somewhere, like this: DOMWindowWebAudio.idl: interface [ Supplemental=DOMWindow ] DOMWindowWebAudio { attribute attr1; attribute attr2; }; DOMWindow.idl: interface [ ] DOMWindow { attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL. attribute attr3; attribute attr4; }; Assuming these IDL files, this patch implements the following logic in generate-bindings.pl: - If a given build script supports the [Supplemental] IDL, generate-bindings.pl ignores all attributes with the [Supplemented] IDL. - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL as normal attributes and instead ignores all attributes with the [Supplemental] IDL (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL). Tests: webaudio/* * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above. * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style path by the cygpath command. * WebCore.gypi: Added DOMWindowWebAudio.idl. * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL. Added the --additionalIdlFilesList option to specify the IDL files that are not listed in supplemental-dependency.tmp but should generate .h and .cpp files. * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL. * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl. 2011-12-13 Yosifumi Inoue RenderTheme should have a function for disabled text color adjustment https://bugs.webkit.org/show_bug.cgi?id=74143 Change disabledTextColor to private method. Reviewed by Kent Tamura. No new tests / existing tests cover this change. * rendering/RenderThemeChromiumMac.h: Change disabledTextColor to private. * rendering/RenderThemeChromiumSkia.h: Change disabledTextColor to private. 2011-12-12 Daniel Bates Unreviewed, rolling out r102656. http://trac.webkit.org/changeset/102656 https://bugs.webkit.org/show_bug.cgi?id=74313 Broke the Mac, Windows and WinCairo builds. We need to look into this patch some more. * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerLocation): 2011-12-12 Konrad Piascik 2011-12-12 Konrad Piascik Implement the JavaScriptCore bindings for eventListenerHandlerLocation https://bugs.webkit.org/show_bug.cgi?id=74313 Reviewed by Geoffrey Garen. Open any page in Web Inspector and look at the event listeners. They should now link to the script which created them. * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerLocation): 2011-12-12 Yosifumi Inoue RenderTheme should have a function for disabled text color adjustment https://bugs.webkit.org/show_bug.cgi?id=74143 Reviewed by Kent Tamura. No new tests / existing tests cover this change. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::adjustInnerTextStyle): Use RenderTheme::disabledTextColor instead of PLATFORM wraped static function. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::disabledTextColor): Moved from RenderTextControl.cpp. This method implements for non-Chromium color. * rendering/RenderTheme.h: Add new virtual method disabledTextColor. * rendering/RenderThemeChromiumMac.h: Implementation of RenderTheme::disabledTextColor for Chrimium Mac. * rendering/RenderThemeChromiumSkia.h: Implementation of RenderTheme::disabledTextColor for Chrimium. 2011-12-12 Kenneth Russell Unreviewed, rolling out r102648. http://trac.webkit.org/changeset/102648 https://bugs.webkit.org/show_bug.cgi?id=74313 Broke the Snow Leopard and Windows builds * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerLocation): 2011-12-12 Andreas Kling Resizing Cappuccino is very laggy on WebKit since Safari 5.1 and Reviewed by Anders Carlsson. * WebCore.exp.in: Export FloatPoint(const NSPoint&) 2011-12-12 Jarred Nicholls [Qt] QTKIT-based video support must target OS X 10.5 or higher https://bugs.webkit.org/show_bug.cgi?id=74294 WebCore on OS X Lion fails to build when QTKIT video support is enabled, unless a deployment target of 10.5+ is specified explicitly. Reviewed by Noam Rosenthal. No new tests as this is a build issue. * Target.pri: 2011-12-12 Luke Macpherson Implement CSS text-decoration property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74258 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyTextDecoration::applyValue): (WebCore::ApplyPropertyTextDecoration::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-12-12 Adrienne Walker iframe fails to scroll in composited page https://bugs.webkit.org/show_bug.cgi?id=72682 Reviewed by Simon Fraser. FrameView::scrollContentsSlowPath only was catching the case where a child iframe had a composited parent. Now detect if the child iframe has any composited ancestor. Test: compositing/iframes/scroll-grandchild-iframe.html * page/FrameView.cpp: (WebCore::FrameView::scrollContentsSlowPath): 2011-12-12 Konrad Piascik Implement the JavaScriptCore bindings for eventListenerHandlerLocation https://bugs.webkit.org/show_bug.cgi?id=74313 Reviewed by Geoffrey Garen. Open any page in Web Inspector and look at the event listeners. They should now link to the script which created them. * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerLocation): 2011-12-12 Erik Arvidsson [V8] CodeGeneratorV8.pm does not correctly work with inherited HasIndexGetter https://bugs.webkit.org/show_bug.cgi?id=74027 Reviewed by Adam Barth. Instead of having to write a custom indexer when the interface has an inherited indexer we get the signature from the super interface. Tested by existing tests. * Target.pri: Remove V8DOMSettableTokenListCustom.cpp and V8WebKitCSSFilterValueCustom.cpp. * UseV8.cmake: Ditto. * WebCore.gypi: Ditto. * bindings/scripts/CodeGenerator.pm: (FindSuperMethod): Returns the first matching function in one of the ancestor interfaces. * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementationIndexer): If the current interface has no indexer try to find an indexer in one of the super interfaces. (GenerateImplementationNamedPropertyGetter): Ditto for named property getter. * bindings/v8/custom/V8DOMSettableTokenListCustom.cpp: Removed. * bindings/v8/custom/V8WebKitCSSFilterValueCustom.cpp: Removed. 2011-12-12 Simon Fraser Make it possible to substitute a different CALayer implementation for the main root layer https://bugs.webkit.org/show_bug.cgi?id=74369 Reviewed by Anders Carlsson. Some platforms may wish to have the main root layer (which corresponds with the main frame's RenderView's layer) implemented by a custom platform layer, for example to contain a cache of tiles. Make this possible on Mac by adding a new method to GraphicsLayerClient(), and implementing it in RenderLayerBacking. This new behavior is not yet enabled. Also clean up some WebLayer/WebTiledLayer code. * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsLayerClient.h: (WebCore::GraphicsLayerClient::shouldUseTileCache): New client method that indicates that the GraphicsLayer should host a tile cache layer instead of a normal layer. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::GraphicsLayerCA): Ask the client, if any, whether to create a tile cache layer. * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: NSClassFromString(@"CATransformLayer") was for Leopard; we can just use the classname now. Handle LayerTypeTileCacheLayer. (PlatformCALayer::PlatformCALayer): * platform/graphics/ca/mac/WebTileCacheLayer.h: Copied from Source/WebCore/platform/graphics/mac/WebLayer.h. * platform/graphics/ca/mac/WebTileCacheLayer.mm: Copied from Source/WebCore/platform/graphics/mac/WebLayer.h. * platform/graphics/mac/WebLayer.h: Remove the setLayerNeedsDisplayInRect() hackery. * platform/graphics/mac/WebLayer.mm: setLayerNeedsDisplayInRect() tried to share code between WebLayer and WebTiledLayer by using Obj-C runtime methods to find the superclass. This causes infinite recursion if Web[Tiled]Layer is subclassed, so remove it. (-[WebLayer setNeedsDisplayInRect:]): Code moved here from setLayerNeedsDisplayInRect. * platform/graphics/mac/WebTiledLayer.mm: (-[WebTiledLayer setNeedsDisplayInRect:]): Code copied here from setLayerNeedsDisplayInRect. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): Find out, and cache if we're the main frame's layer. (WebCore::RenderLayerBacking::shouldUseTileCache): Return m_usingTiledCacheLayer, which is always false for now. (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Use m_isMainFrameRenderViewLayer. (WebCore::RenderLayerBacking::paintingGoesToWindow): The tile cache layer needs to paint itself. * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.h: m_compositeForFixedPosition was unused. 2011-12-12 Ryosuke Niwa REGRESSION(r102357): respondToUnappliedEditing exits early for CreateLinkCommand https://bugs.webkit.org/show_bug.cgi?id=74356 Reviewed by Enrica Casucci. The problem was that isCreateLinkCommand was called on EditCommandComposition by respondToUnappliedEditing. Fixed the bug by propagating the value of isCreteLinkCommand from CompositeEditCommand to EditCommandComposition via wasCreateLinkCommand. Also move isCreateLinkCommand from EditCommand to CompositeEditCommand to prevent this mistake in the future. * editing/CompositeEditCommand.cpp: (WebCore::EditCommandComposition::create): (WebCore::EditCommandComposition::EditCommandComposition): (WebCore::CompositeEditCommand::ensureComposition): (WebCore::CompositeEditCommand::isCreateLinkCommand): * editing/CompositeEditCommand.h: (WebCore::EditCommandComposition::wasCreateLinkCommand): * editing/SpellingCorrectionController.cpp: (WebCore::SpellingCorrectionController::respondToUnappliedEditing): * editing/SpellingCorrectionController.h: 2011-12-12 Mihnea Ovidenie [CSSRegions]Revert RenderObject::style() to its state before region styling https://bugs.webkit.org/show_bug.cgi?id=74315 Reviewed by Tony Chang. * rendering/RenderObject.h: (WebCore::RenderObject::style): 2011-12-12 Adam Klein Don't crash in StyleAttributeMutationScope if the style declaration's element has been GCed https://bugs.webkit.org/show_bug.cgi?id=74321 Reviewed by Ryosuke Niwa. In r101101, Rafael Weinstein added code to CSSMutableStyleDeclaration.cpp which depended on isInlineStyleDeclaration returning true iff the element it pointed to was non-null (it will be nulled-out if the element is garbage collected). Then, in r101172, Andreas Kling changed the semantics so that isInlineStyleDeclaration only described the type of the declaration, not the state of the related element. This change updates Rafael's code with an explicit check that the element is still alive. Test: fast/dom/css-inline-style-declaration-crash.html * css/CSSMutableStyleDeclaration.cpp: 2011-12-12 Chris Fleizach AX: aria-hidden inheritance broken when applying to some descendants https://bugs.webkit.org/show_bug.cgi?id=73940 Reviewed by Darin Adler. When adding children, we were not updating the children cache for direct AX descendants. This meant that toggling aria-hidden could result in a stale cache where elements would not be reachable. Making this fix also exposed a problem in AccessibilityTable where the AccessibilityHeaderObject was not being managed correctly as a mock element. Test: platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::addChildren): * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::clearChildren): (WebCore::AccessibilityTable::headerContainer): * accessibility/AccessibilityTable.h: 2011-12-12 Jeremy Apthorp When the mouse is dragged out of an :active element, it should lose :hover. https://bugs.webkit.org/show_bug.cgi?id=57206 Reviewed by Ryosuke Niwa. Test: fast/css/hover-active-drag.html * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseMoveEvent): Don't mark mouse-drag hit tests read-only, since they no longer are. (WebCore::EventHandler::dragSourceEndedAt): Send a hit test request when the mouse goes up after a drag, so RenderLayer has a chance to update the hover/active status. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateHoverActiveState): Only allow the :active state to change on mouse down or mouse up. 2011-12-12 Kenneth Russell Unreviewed Windows build fix after http://trac.webkit.org/changeset/102619 . Remove OVERRIDE specifier from virtual destructor. * html/HTMLPlugInImageElement.h: 2011-12-12 Ryosuke Niwa WebKit code shouldn't be calling applyCommand directly https://bugs.webkit.org/show_bug.cgi?id=74337 Reviewed by Darin Adler. Make WebKit-layer code call Editor::replaceSelectionWithFragment and Editor::replaceSelectionWithText instead of manually creating and applying ReplaceSelectionCommand. The only behavioral difference is that new code will end up checking for spell checks. However, this difference appears to be unintentional since the code predates http://trac.webkit.org/changeset/73886, which introduced an invocation of spellcheck code. Unfortunately no tests since there doesn't seem to be anyway to test this change. * WebCore.exp.in: * editing/EditCommand.cpp: (WebCore::applyCommand): * editing/EditCommand.h: * editing/Editor.h: 2011-11-26 Adam Barth Remove platform/audio/fftw https://bugs.webkit.org/show_bug.cgi?id=73163 Reviewed by Eric Seidel. The FFTW library is GPL, not LGPL, like WebKit. This patch removes the integration with the library so folks who use WebAudio don't accidentially violate the GPL by linking in FFTW. * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/audio/FFTFrame.h: * platform/audio/FFTFrameStub.cpp: * platform/audio/fftw: Removed. * platform/audio/fftw/FFTFrameFFTW.cpp: Removed. 2011-12-12 Kenneth Russell COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows https://bugs.webkit.org/show_bug.cgi?id=74327 Unreviewed build fix. True fix should follow under above bug. * css/CSSStyleSelector.cpp: 2011-12-12 David Grogan Fix compilation error when !ENABLE(WORKERS) https://bugs.webkit.org/show_bug.cgi?id=74029 Reviewed by Yury Semikhatsky. * storage/IDBFactory.cpp: (WebCore::IDBFactory::open): add #if ENABLE(WORKERS) guard 2011-12-12 Brady Eidson Page cache should support pages with plugins. and https://bugs.webkit.org/show_bug.cgi?id=13634 Reviewed by Anders Carlsson. By making plugin elements renderers go display:none when entering the page cache, we destroy the plug-in in a cross platform way as well as handle invalidating script objects created by that plugin. By restoring the original style when leaving the page cache and forcing a style recalc on the plugin element, the plugin is gracefully reinstantiated when the user goes back. Test: plugins/netscape-plugin-page-cache-works.html * dom/Document.cpp: (WebCore::Document::documentDidBecomeActive): Copy this collection before iterating over it, as the callbacks might result in mutating the set. * dom/Node.h: (WebCore::Node::setHasCustomStyleForRenderer): (WebCore::Node::clearHasCustomStyleForRenderer): Expose the ability to stop using a custom renderer and go back to the default renderer. * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Move the document inactivation call to the same place we suspend active DOM objects. It is important this call be *after* the beforeunload event is dispatched, and was coincidental non of the elements that using Document activation had run in to this problem yet. * history/PageCache.cpp: (WebCore::logCanCacheFrameDecision): (WebCore::PageCache::canCachePageContainingThisFrame): If the page contains plugins but the PageCacheSupportsPlugins setting is true, allow this page. Kill and recreate the plugin by listening for Document activation callbacks and setting a custom display:none render style: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement): Unregister for document activation callbacks. (WebCore::HTMLPlugInImageElement::createRenderer): Once a renderer (ie. plugin instance) is created, this element needs Document (in)activation callbacks. (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument): Manage Document activation callback registration. (WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument): Ditto. (WebCore::HTMLPlugInImageElement::documentWillBecomeInactive): Clone the element's current style and set the clone's display value to None. Start using this custom style and force a style recall. This destroys the renderer and therefore the plugin instance. (WebCore::HTMLPlugInImageElement::documentDidBecomeActive): Stop using the custom style and force a style recall to reinstantiate the plugin. (WebCore::HTMLPlugInImageElement::customStyleForRenderer): Return the stand-in style that has display:none set. * html/HTMLPlugInImageElement.h: Add a setting that allows runtime configuration of whether or not the page cache supports plugins: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setPageCacheSupportsPlugins): (WebCore::Settings::pageCacheSupportsPlugins): 2011-12-12 Ojan Vafai r102234 caused RuleData to use 33 bits in its bitmask https://bugs.webkit.org/show_bug.cgi?id=74314 Reviewed by Antti Koivisto. Lower m_position to something more reasonable. A million should be plenty. Current large sites (e.g. gmail) seem to use tens of thousands. Added a COMPILE_ASSERT to ensure this doesn't regress. No new tests. * css/CSSStyleSelector.cpp: 2011-12-12 James Robinson Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change https://bugs.webkit.org/show_bug.cgi?id=74231 Reviewed by Simon Fraser. The RequestAnimationFrame spec has renamed cancelRequestAnimationFrame to cancelAnimationFrame in response to feedback from Mozilla and Microsoft that the old name was too long and didn't parallel setTimeout/clearTimeout and setInterval/clearInterval very well. This updates our IDL to match, while preserving the old name as an alias to be compatible with current content. * dom/Document.cpp: (WebCore::Document::webkitCancelAnimationFrame): * dom/Document.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::webkitCancelAnimationFrame): * page/DOMWindow.h: (WebCore::DOMWindow::webkitCancelRequestAnimationFrame): * page/DOMWindow.idl: 2011-12-12 Shawn Singh [chromium] Remove assumption that empty surface is always at end of list https://bugs.webkit.org/show_bug.cgi?id=74037 Reviewed by James Robinson. Test case added to CCLayerTreeHostCommonTest.cpp, which reproduces a crash reported in http://code.google.com/p/chromium/issues/detail?id=106734 This patch fixes the crash in a less risky way to be merged into m17, but the root of the issue needs to be addressed in a follow-up patch. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): 2011-12-12 Simon Fraser Share code that checks for matching sets of transform operations https://bugs.webkit.org/show_bug.cgi?id=74265 Reviewed by Dan Bernstein. Add TransformOperations::operationsMatch() and call it from the three places that used this same code. Tested by existing tests. * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::validateTransformFunctionList): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::validateTransformFunctionList): * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::fetchTransformOperationList): * platform/graphics/transforms/TransformOperations.cpp: (WebCore::TransformOperations::operationsMatch): * platform/graphics/transforms/TransformOperations.h: 2011-12-12 Antti Koivisto Cache visited link hash https://bugs.webkit.org/show_bug.cgi?id=74095 Reviewed by Darin Adler. Visited link hash is relatively expensive to compute. We can cache it for anchor elements with minimal relative memory cost for faster style resolve. On my machine this speeds up style matching on full HTML spec by ~100ms or ~1% of the total CPU usage. It makes link elements 8 bytes larger, a relatively minor increase to their overall size. Invalidate the hashes on base URL for completeness sake (lack of style invalidation means that this scenario is not properly supported currently). Covered by existing tests. No specific test for visited hash invalidation on dynamic base URL change as the effect is not testable due to lack of style invalidation. * css/SelectorChecker.cpp: (WebCore::SelectorChecker::determineLinkStateSlowCase): (WebCore::SelectorChecker::visitedStateChanged): * html/Document.cpp: * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::HTMLAnchorElement): (WebCore::HTMLAnchorElement::parseMappedAttribute): * html/HTMLAnchorElement.h: (WebCore::HTMLAnchorElement::visitedLinkHash): 2011-12-12 Martin Robinson [GTK] gtk_widget_size_allocate for plugin widgets should happen in the WebView size-allocate method https://bugs.webkit.org/show_bug.cgi?id=72805 Reviewed by Gustavo Noronha Silva. No new tests. This is only a performance tweak. Instead of immediately calling gtk_widget_size during painting, defer this until the size-allocate method of the WebView. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::updateWidgetAllocationAndClip): Instead of immediately changing the widget allocation, just record it in a GObject data attachment. 2011-12-12 Nate Chapin A SubresourceLoader in the middle of revalidating a resource should be treated as finishing (similar to didFinishLoading and didFail) to ensure that willCancel() doesn't declare the revalidation as having failed reentrantly. https://bugs.webkit.org/show_bug.cgi?id=72762 Reviewed by Adam Barth. Test: http/tests/cache/cancel-during-revalidation-succeeded.html * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse): 2011-12-12 Mary Wu Upstream 3 files into WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=74275 Reviewed by Rob Buis. Initial upstream, no new tests. * platform/blackberry/ContextMenuBlackBerry.cpp: Added. * platform/blackberry/ContextMenuItemBlackBerry.cpp: Added. * platform/blackberry/TemporaryLinkStubs.cpp: Added. 2011-12-12 Pierre Rossi [Qt] Rendering issues with sliders and QStyle https://bugs.webkit.org/show_bug.cgi?id=73921 With QStyle's origins being deeply rooted with widgets, several styles make wrong assumptions, leading to sliders not being painted properly in WebKit. We can solve a lot of problems by systematically translating the painter to the top left corner of the render object. Reviewed by Simon Hausmann. No new tests. The Qt tests are ran with the Windows style, this fixes some quirks affecting other styles. * platform/qt/RenderThemeQStyle.cpp: (WebCore::RenderThemeQStyle::paintSliderTrack): (WebCore::RenderThemeQStyle::paintSliderThumb): 2011-12-12 Mary Wu Upstream 5 files into WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=73798 Reviewed by Rob Buis. Main contributors: Genevieve Mak Mike Lattanzio George Staikos Initial upstream, no new tests. * platform/blackberry/PlatformTouchEventBlackBerry.cpp: Added. (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/blackberry/PlatformTouchPointBlackBerry.cpp: Added. (WebCore::PlatformTouchPoint::PlatformTouchPoint): * platform/blackberry/SharedBufferBlackBerry.cpp: Added. (WebCore::SharedBuffer::createWithContentsOfFile): * platform/blackberry/SharedTimerBlackBerry.cpp: Added. (WebCore::SharedTimerBlackBerry::SharedTimerBlackBerry): (WebCore::SharedTimerBlackBerry::~SharedTimerBlackBerry): (WebCore::SharedTimerBlackBerry::instance): (WebCore::SharedTimerBlackBerry::start): (WebCore::SharedTimerBlackBerry::stop): (WebCore::setSharedTimerFiredFunction): (WebCore::setSharedTimerFireInterval): (WebCore::stopSharedTimer): * platform/blackberry/SystemTimeBlackBerry.cpp: Added. (WebCore::userIdleTime): 2011-12-12 Alexander Pavlov Implement a cache for CSSStyleRule::selectorText() https://bugs.webkit.org/show_bug.cgi?id=74269 This change is geared towards speeding up the CSS selector profiler, its implementation tracked at https://bugs.webkit.org/show_bug.cgi?id=74004. Using a proof-of-concept implementation of the profiler, this change reduces the profiler temporal overhead on PerformanceTests/Parser/html5-full-render.html roughly by 86% (from ~72 seconds down to ~10 seconds). This change also does not considerably increase average memory usage, as reading selectorText is a relatively rare case during normal web browsing. Reviewed by Andreas Kling. No new tests, as this functionality is covered by existing tests. * css/CSSRule.h: * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::~CSSStyleRule): (WebCore::selectorTextCache): (WebCore::CSSStyleRule::cleanup): (WebCore::CSSStyleRule::generateSelectorText): (WebCore::CSSStyleRule::selectorText): (WebCore::CSSStyleRule::setSelectorText): * css/CSSStyleRule.h: 2011-12-12 Alexander Pavlov Web Inspector: [Styles] Modified selector text needs sanitization https://bugs.webkit.org/show_bug.cgi?id=74291 Reviewed by Yury Semikhatsky. * inspector/front-end/StylesSidebarPane.js: 2011-12-12 Renata Hodovan Fulfill FIXME in HTMLLinkElement.h. https://bugs.webkit.org/show_bug.cgi?id=74278 Rename HTMLLinkElement::isLoading() to isStyleSheetLoading(). Reviewed by Andreas Kling. No new tests because the functionality remains the same. * dom/Document.cpp: (WebCore::Document::recalcStyleSelector): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setDisabledState): (WebCore::HTMLLinkElement::isStyleSheetLoading): (WebCore::HTMLLinkElement::sheetLoaded): * html/HTMLLinkElement.h: 2011-11-25 Alexander Pavlov WebKit does not enumerate over CSS properties in HTMLElement.style https://bugs.webkit.org/show_bug.cgi?id=23946 Reviewed by Darin Adler. This change generates a list of JavaScript mirrors of the CSS properties and allows to enumerate them using the "in" operator on the CSSStyleDeclaration object. Test: fast/css/style-enumerate-properties.html * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Added. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): Added. (WebCore::V8CSSStyleDeclaration::namedPropertyQuery): Added. (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): A small drive-by optimization (local initialization moved down). * css/CSSStyleDeclaration.idl: Use a custom property enumerator. * css/makeprop.pl: Add a function to convert CSS property names into JS ones. 2011-12-12 Alexander Pavlov Unreviewed, build fix. Revert r102570 which broke SnowLeopard builders. * bindings/js/JSCSSStyleDeclarationCustom.cpp: * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): * css/CSSStyleDeclaration.idl: * css/makeprop.pl: 2011-12-12 Ilya Tikhonovsky Web Inspector: chromium: UI: Detailed Heap snapshot shows too many objects' hidden properties. https://bugs.webkit.org/show_bug.cgi?id=74289 WebCore objects have many hidden properties. The Detailed Heap shapshot view shows all these props for a selected object. The result view looks too heavy and users usually failed to find a useful information about the object. Looks like such ability is unnecessary in the most cases. I'd like to introduce a configurable property that will show/hide these props from the view. Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/DetailedHeapshotGridNodes.js: * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy.prototype.createPathFinder): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): 2011-12-12 Kentaro Hara Unreviewed, rolling out r102556. http://trac.webkit.org/changeset/102556 https://bugs.webkit.org/show_bug.cgi?id=73394 clobber build failure * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): * WebCore.gypi: * bindings/scripts/generate-bindings.pl: * page/DOMWindow.idl: * webaudio/DOMWindowWebAudio.idl: Removed. 2011-12-12 Kentaro Hara Unreviewed, rolling out r102558. http://trac.webkit.org/changeset/102558 https://bugs.webkit.org/show_bug.cgi?id=74160 clobber build failure * WebCore.gypi: * page/DOMWindow.idl: * websockets/DOMWindowWebSocket.idl: Removed. 2011-11-25 Alexander Pavlov WebKit does not enumerate over CSS properties in HTMLElement.style https://bugs.webkit.org/show_bug.cgi?id=23946 Reviewed by Darin Adler. This change generates a list of JavaScript mirrors of the CSS properties and allows to enumerate them using the "in" operator on the CSSStyleDeclaration object. Test: fast/css/style-enumerate-properties.html * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Added. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): Added. (WebCore::V8CSSStyleDeclaration::namedPropertyQuery): Added. (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): A small drive-by optimization (local initialization moved down). * css/CSSStyleDeclaration.idl: Use a custom property enumerator. * css/makeprop.pl: Add a function to convert CSS property names into JS ones, and a string comparator. 2011-12-09 Yury Semikhatsky Web Inspector: provide per Document Node count statistics https://bugs.webkit.org/show_bug.cgi?id=74100 Memory agent now returns counters for nodes with given names. For each object group root user will see total number of its descendtants and per tag name counts. This patch also moves generic CounterVisitor code out of V8 bindings. It may well be used with both JS engines. Reviewed by Pavel Feldman. * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/ScriptProfiler.h: (WebCore::ScriptProfiler::visitJSDOMWrappers): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::visitJSDOMWrappers): * bindings/v8/ScriptProfiler.h: * inspector/DOMWrapperVisitor.h: Added. (WebCore::DOMWrapperVisitor::~DOMWrapperVisitor): * inspector/Inspector.json: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getDOMNodeCount): * inspector/InspectorMemoryAgent.h: 2011-12-12 Noel Gordon WebPImageDecoder: Increase image/webp decoding performance 10-20% https://bugs.webkit.org/show_bug.cgi?id=74263 Reviewed by Adam Barth. Avoid copying data from the RGB buffer of decoded image output to the backing pixel store. That is slow - costs 10% of the overall decoding time at libwebp 0.1.2, and 20% at libwebp 0.1.3. Instead, instruct the decoder to write the decoded pixels directly to the backing pixel store. No new tests. Covered by existing tests. No progressive decoding test exists in DRT, see https://bugs.webkit.org/show_bug.cgi?id=74062 * platform/image-decoders/webp/WEBPImageDecoder.cpp: (outputMode): Define output pixel format. On little-endian machines, output BGRA pixels to the backing store, for example. (WebCore::WEBPImageDecoder::WEBPImageDecoder): (WebCore::WEBPImageDecoder::decode): * platform/image-decoders/webp/WEBPImageDecoder.h: 2011-12-11 Zoltan Herczeg Add new CSS nth-children parsing tests https://bugs.webkit.org/show_bug.cgi?id=74178 Reviewed by Darin Adler. Test: fast/css/parsing-css-nth-child.html * css/CSSParser.cpp: (WebCore::isValidNthToken): Add "-n" to the possible identifiers. 2011-12-11 Kentaro Hara Use [Supplemental] IDL in WebSocket https://bugs.webkit.org/show_bug.cgi?id=74160 Reviewed by Adam Barth. By using the [Supplemental] IDL, this patch moves declarations of WebSocket attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl, which helps make WebSocket a self-contained module. No new tests, no change in behavior. Confirm that http/tests/websocket/* pass. * WebCore.gypi: Added DOMWindowWebSocket.idl. * page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details). * websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl. 2011-12-11 Luke Macpherson Implement webkit-line-grid and webkit-line-grid-snap CSS properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74262 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-12-11 Kentaro Hara Use the [Supplemental] IDL for webaudio attributes in Chromium https://bugs.webkit.org/show_bug.cgi?id=73394 Reviewed by Adam Barth. - Overview: Using the [Supplemental] IDL, this patch moves the attribute declarations of webaudio from DOMWindow.idl into a new IDL file webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained feature (aka a module). - This patch changes the build flow of WebCore.gyp as follows: Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl; } - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL will be removed after build scripts for all platforms support the [Supplemental] IDL. The motivation for the [Supplemented] IDL is as follows: In order to support the [Supplemental] IDL, we need to (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp (2) and run generate-bindings.pl with the supplemental_dependency.tmp. This build flow requires a change on the following build scripts, but changing all the build scripts all at once without any regression is too difficult: - DerivedSources.make - DerivedSources.pri - GNUmakefile.am - PlatformBlackBerry.cmake - UseJSC.cmake - UseV8.cmake - WebCore.vcproj/MigrateScripts - WebCore.vcproj/WebCore.vcproj - bindings/gobject/GNUmakefile.am - WebCore.gyp/WebCore.gyp Thus, we are planning to change the build scripts one by one, which implies that we need to allow the temporary state in which some build scripts support [Supplemental] IDL but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented]. The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental] in another IDL file somewhere, like this: DOMWindowWebAudio.idl: interface [ Supplemental=DOMWindow ] DOMWindowWebAudio { attribute attr1; attribute attr2; }; DOMWindow.idl: interface [ ] DOMWindow { attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL. attribute attr3; attribute attr4; }; Assuming these IDL files, this patch implements the following logic in generate-bindings.pl: - If a given build script supports the [Supplemental] IDL, generate-bindings.pl ignores all attributes with the [Supplemented] IDL. - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL as normal attributes and instead ignores all attributes with the [Supplemental] IDL (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL). Tests: webaudio/* * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above. * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style path by the cygpath command. * WebCore.gypi: Added DOMWindowWebAudio.idl. * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL. * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL. * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl. 2011-12-11 Andreas Kling Micro-optimize CSSStyleSelector::findSiblingForStyleSharing(). Reviewed by Antti Koivisto. Move the isStyledElement() check from canShareStyleWithElement() into the loop in findSiblingForStyleSharing(), and tighten up the argument/return types to StyledElement* as appropriate. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::findSiblingForStyleSharing): (WebCore::CSSStyleSelector::locateSharedStyle): * css/CSSStyleSelector.h: 2011-12-11 Shinya Kawanaka Asynchronous path synchronous path of SpellChecker should share the code to mark misspellings. https://bugs.webkit.org/show_bug.cgi?id=73616 Reviewed by Hajime Morita. Asynchronous spellchecking path should call the same method for the synchronous spellchecking path to mark misspellings. No new tests. Covered by existing tests. * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): (WebCore::Editor::markAndReplaceFor): Takes SpellCheckRequest object. * editing/Editor.h: * editing/SpellChecker.cpp: (WebCore::SpellChecker::didCheck): Calls the same method of synchronous spellchecking path. 2011-12-11 Luke Macpherson Implement CSS display property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=73500 Reviewed by Andreas Kling. Refactoring only / no functionality changed. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyDisplay::isValidDisplayValue): (WebCore::ApplyPropertyDisplay::applyInheritValue): (WebCore::ApplyPropertyDisplay::applyInitialValue): (WebCore::ApplyPropertyDisplay::applyValue): (WebCore::ApplyPropertyDisplay::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-12-11 Geoffrey Garen Try to fix the Qt build. Unreviewed. * css/CSSStyleDeclaration.cpp: Maybe an #include will solve our problem? Someday, compiler error messages will not suck. Today is not that day. 2011-12-11 Luke Macpherson Implement CSS resize property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74162 Reviewed by Julien Chaffraix. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyResize::applyValue): (WebCore::ApplyPropertyResize::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-12-11 Andreas Kling Move CSSElementStyleDeclaration to its own cpp/h files. Reviewed by Sam Weinig. CSSElementStyleDeclaration is old enough to move out of CSSMutableStyleDeclaration's attic and into her own apartment. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMBinding.h: * css/CSSElementStyleDeclaration.cpp: Added. (WebCore::CSSElementStyleDeclaration::styleSheet): * css/CSSElementStyleDeclaration.h: Added. (WebCore::CSSElementStyleDeclaration::element): (WebCore::CSSElementStyleDeclaration::setElement): (WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration): (WebCore::CSSElementStyleDeclaration::~CSSElementStyleDeclaration): * css/CSSInlineStyleDeclaration.h: * css/CSSMutableStyleDeclaration.cpp: * css/CSSMutableStyleDeclaration.h: * dom/CSSMappedAttributeDeclaration.h: 2011-12-11 Benjamin Poulain Add KillRingNone.cpp to Mac build system https://bugs.webkit.org/show_bug.cgi?id=74168 Reviewed by David Kilzer. Add KillRingNone.cpp so it can be used on iOS, but blacklist the file from the build in order to avoid conflicts with KillRingMac. * Configurations/WebCore.xcconfig: * WebCore.xcodeproj/project.pbxproj: 2011-12-11 Peter Rybin Web Inspector: [protocol] alter some type names generated from Inspector.json https://bugs.webkit.org/show_bug.cgi?id=74247 Reviewed by Pavel Feldman. Manually-filled map added that contains problem type names and its replacement. * inspector/CodeGeneratorInspector.py: (fix_type_name.Result): (fix_type_name.Result.output_comment): (fix_type_name): (TypeBindings.create_for_named_type_declaration.write_doc): (TypeBindings.create_for_named_type_declaration.EnumBinding.generate_type_builder): (TypeBindings.create_for_named_type_declaration.PlainString.generate_type_builder): (TypeBindings): (TypeBindings.create_for_named_type_declaration.ClassBinding.generate_type_builder): (Generator.process_types): 2011-12-11 Andreas Kling WK2/NetscapePlugin: Incorrect mouse event coordinates when frameScaleFactor != 1. and Reviewed by Anders Carlsson. * WebCore.exp.in: Export AffineTransform::scale(double). 2011-12-10 Andreas Kling Remove OS(SYMBIAN) block from Settings constructor. Reviewed by Benjamin Poulain. Kill the last OS(SYMBIAN) block in WebKit! * page/Settings.cpp: (WebCore::Settings::Settings): 2011-12-11 Dan Bernstein REGRESSION (r80438): First word on a line or after collapsed space may not be hyphenated even though it should https://bugs.webkit.org/show_bug.cgi?id=74239 Reviewed by Anders Carlsson. Tests: fast/text/hyphenate-first-word-after-skipped-space-expected.html fast/text/hyphenate-first-word-after-skipped-space.html * rendering/RenderBlockLineLayout.cpp: (WebCore::tryHyphenating): Replaced the assumption that the character at lastSpace is a space iff lastSpace is non-zero with a test of whether it is a space, in the sense that it should not be counted as part of the prefix when comparing it to the value of hyphenate-limit-before. 2011-12-10 Benjamin Poulain #ifdef the parts of the Mac platform which should not be used on iOS https://bugs.webkit.org/show_bug.cgi?id=74246 Reviewed by David Kilzer. * Configurations/WebCore.xcconfig: * platform/FileSystem.cpp: * platform/mac/FileSystemMac.mm: * platform/mac/Language.mm: (+[WebLanguageChangeObserver _webkit_languagePreferencesDidChange]): (WebCore::createHTTPStyleLanguageCode): (WebCore::platformDefaultLanguage): * platform/mac/LocalizedStringsMac.mm: (WebCore::localizedString): (+[WebCoreSharedBufferData initialize]): * platform/mac/WebCoreNSStringExtras.h: * platform/mac/WebCoreNSStringExtras.mm: * platform/mac/WebFontCache.mm: * platform/mac/WebNSAttributedStringExtras.mm: The value NSAttachmentCharacter is not defined in the iOS SDK so we add it here. 2011-12-10 Ryosuke Niwa The previous fix broke Lion release build. Fix that. * editing/SpellingCorrectionCommand.cpp: 2011-12-10 Ryosuke Niwa Lion build fix attempt after r102527. * editing/SpellingCorrectionCommand.cpp: 2011-12-10 Kevin Ollivier [wx] Unreviewed build fixes. Add missing header for CPP DOM bindings and add stubs for new DPI methods. * bindings/scripts/CodeGeneratorCPP.pm: (AddIncludesForType): * platform/wx/ScreenWx.cpp: (WebCore::screenHorizontalDPI): (WebCore::screenVerticalDPI): 2011-12-10 Ryosuke Niwa Mac build fix. Remove an erroneous OVERRIDE. * editing/CompositeEditCommand.h: 2011-12-09 Robert Hogan CSS 2.1 failure: numerous counter-increment-* tests fail https://bugs.webkit.org/show_bug.cgi?id=73360 Reviewed by Julien Chaffraix. Allow counter-increment to handle integer underflow and overflow. Also allow 'counter' to inherit. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyCounter::applyInheritValue): (WebCore::ApplyPropertyCounter::applyValue): (WebCore::ApplyPropertyCounter::createHandler): 2011-12-09 Ryosuke Niwa There should be a way to count the number of nodes held by undo stack https://bugs.webkit.org/show_bug.cgi?id=74099 Reviewed by Enrica Casucci. Add getNodesInCommand to all SimpleEditCommands and EditCommandComposition in debug builds. We can easily aggregate the number of nodes held by the undo stack by calling this function on each item in the undo stack. * editing/AppendNodeCommand.cpp: (WebCore::AppendNodeCommand::getNodesInCommand): * editing/AppendNodeCommand.h: * editing/CompositeEditCommand.cpp: (WebCore::EditCommandComposition::getNodesInCommand): * editing/CompositeEditCommand.h: * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::getNodesInCommand): * editing/DeleteFromTextNodeCommand.h: * editing/EditCommand.cpp: (WebCore::SimpleEditCommand::addNodeAndDescedents): * editing/EditCommand.h: * editing/Editor.cpp: (WebCore::Editor::appliedEditing): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::getNodesInCommand): * editing/InsertIntoTextNodeCommand.h: * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::getNodesInCommand): * editing/InsertNodeBeforeCommand.h: * editing/MergeIdenticalElementsCommand.cpp: (WebCore::MergeIdenticalElementsCommand::getNodesInCommand): * editing/MergeIdenticalElementsCommand.h: * editing/RemoveCSSPropertyCommand.cpp: (WebCore::RemoveCSSPropertyCommand::getNodesInCommand): * editing/RemoveCSSPropertyCommand.h: * editing/RemoveNodeCommand.cpp: (WebCore::RemoveNodeCommand::getNodesInCommand): * editing/RemoveNodeCommand.h: * editing/ReplaceNodeWithSpanCommand.cpp: (WebCore::ReplaceNodeWithSpanCommand::getNodesInCommand): * editing/ReplaceNodeWithSpanCommand.h: * editing/SetNodeAttributeCommand.cpp: (WebCore::SetNodeAttributeCommand::getNodesInCommand): * editing/SetNodeAttributeCommand.h: * editing/SetSelectionCommand.h: * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::getNodesInCommand): * editing/SplitElementCommand.h: * editing/SplitTextNodeCommand.cpp: (WebCore::SplitTextNodeCommand::getNodesInCommand): * editing/SplitTextNodeCommand.h: * editing/WrapContentsInDummySpanCommand.cpp: (WebCore::WrapContentsInDummySpanCommand::getNodesInCommand): * editing/WrapContentsInDummySpanCommand.h: 2011-11-09 Robert Hogan CSS 2.1 failure: outline-color-* tests fail https://bugs.webkit.org/show_bug.cgi?id=71931 Reviewed by Julien Chaffraix. Test: css2.1/20110323/outline-color-001.html WebKit didn't paint the top block in this series of tests because it ignored the outline of objects with a zero size. Fix this by taking account of both offset and width of the outline when deciding whether to paint it. * rendering/RenderObject.cpp: (WebCore::RenderObject::paintOutline): paint the outline even when the block has zero size 2011-12-10 Arko Saha Microdata: Fix compilation error in MICRODATA enabled build. https://bugs.webkit.org/show_bug.cgi?id=74235 Reviewed by Andreas Kling. * dom/Document.cpp: (WebCore::Document::getItems): 2011-12-10 Jarred Nicholls [V8] Remove old ArrayBuffer guards from V8XMLHttpRequestCustom.cpp https://bugs.webkit.org/show_bug.cgi?id=74234 Reviewed by Adam Barth. No new tests are necessary. * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseAccessorGetter): 2011-12-10 Noel Gordon WebPImageDecoder progressive decodes fail to decode valid images https://bugs.webkit.org/show_bug.cgi?id=74062 Reviewed by Adam Barth. The WEBP header is followed by a so-called P0 header, then some data to decode. If a partial P0 header is received during progressive decodes, WebPIDecGetRGB() returns false; that makes the decoder enter the failed state, no image appears on the page. James Zern (webp) recommended the following via e-mail: WebPIUpdate() validates input data, and will return an error status for malformed data (bit-stream error, invalid data). Otherwise, it returns OK or SUSPENDED. OK means that decoding is done/complete/no-error, and SUSPENDED means more input data is needed to complete decoding. A NULL return from WebPIDecGetRGB() is valid at this time due to a partial P0, and should not be interpreted as a decoding failure. No new tests. Not something DumpRenderTree can easily test. * platform/image-decoders/webp/WEBPImageDecoder.cpp: (WebCore::WEBPImageDecoder::decode): A NULL WebPIDecGetRGB() return is acceptable here. Return false instead of failing the decoder. 2011-12-09 Benjamin Poulain Add the FileSystem functions of iOS https://bugs.webkit.org/show_bug.cgi?id=74164 Reviewed by David Kilzer. Two functions are needed on iOS for temporary files and directories. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * platform/ios/FileSystemIOS.h: Added. * platform/ios/FileSystemIOS.mm: Added. (WebCore::createTemporaryDirectory): (WebCore::createTemporaryFile): 2011-12-09 Jacky Jiang Remove ResourceHandle::bufferedData() from ResourceHandleBlackBerry.cpp https://bugs.webkit.org/show_bug.cgi?id=74197 The bufferedData() was removed in r95120. Reviewed by Rob Buis. Trivial fix, so no new tests. * platform/network/blackberry/ResourceHandleBlackBerry.cpp: 2011-12-09 Eric Penner [chromium] Prevent ASSERT in legitimate out-of-memory case. https://bugs.webkit.org/show_bug.cgi?id=74215 Reviewed by James Robinson. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): 2011-12-09 Arko Saha NameNodeListCache should be invalidated when name attribute changes/modified. https://bugs.webkit.org/show_bug.cgi?id=70810 Reviewed by Ryosuke Niwa. Test: fast/dom/getelementsbyname-invalidation-cache.html * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseMappedAttribute): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseMappedAttribute): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::parseMappedAttribute): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::parseMappedAttribute): * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::parseMappedAttribute): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::parseMappedAttribute): 2011-12-09 Anders Carlsson Fix Lion release build. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]): 2011-12-09 Mark Pilgrim [FileSystem API] Entry.remove successCallback is required https://bugs.webkit.org/show_bug.cgi?id=69639 Reviewed by Adam Barth. Test: fast/filesystem/simple-required-arguments-remove.html * fileapi/Entry.idl: remove [Optional] flag from Entry.remove.successCallback parameter 2011-12-09 Tim Horton background-image transitions trigger between equivalent images https://bugs.webkit.org/show_bug.cgi?id=74229 Reviewed by Darin Adler. Patch by Simon Fraser. For animation property wrappers around StyleImage properties, test the equivalence of the image itself, instead of equality of the StyleImage pointer. Test: transitions/equivalent-background-image-no-transition.html * page/animation/AnimationBase.cpp: (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper): (WebCore::StyleImagePropertyWrapper::equals): (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper): (WebCore::FillLayerStyleImagePropertyWrapper::equals): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::AnimationBase::ensurePropertyMap): 2011-12-09 Mary Wu Small style fix on DragDataBlackBerry.cpp https://bugs.webkit.org/show_bug.cgi?id=74171 Reviewed by Rob Buis. Style fix, no function impact, no new tests. * platform/blackberry/DragDataBlackBerry.cpp: (WebCore::DragData::containsURL): (WebCore::DragData::asFilenames): (WebCore::DragData::asURL): (WebCore::DragData::asFragment): 2011-12-09 Tony Chang add css parsing for flex-flow: wrap and wrap-reverse https://bugs.webkit.org/show_bug.cgi?id=74008 Reviewed by Ojan Vafai. Also save 2 bits in StyleFlexibleBoxData by changing the size of m_flexFlow (there are only 4 enum values). * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Print the wrap value if it exists. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Parse a second token and put the values into a CSSValueList. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexWrap): * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyFlexFlow::applyInheritValue): Does not inherit. (WebCore::ApplyPropertyFlexFlow::applyInitialValue): (WebCore::ApplyPropertyFlexFlow::applyValue): Special handler for setting two render style values from one CSS property. (WebCore::ApplyPropertyFlexFlow::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexWrap): (WebCore::InheritedFlags::setFlexWrap): (WebCore::InheritedFlags::initialFlexWrap): * rendering/style/RenderStyleConstants.h: EFlexWrap to hold flex wrap values. * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2 bits is enough to hold the 4 flexFlow values. 2011-12-09 KwangHyuk Kim [EFL] Add RefPtrEfl specialization for evas_object. https://bugs.webkit.org/show_bug.cgi?id=73790 Reviewed by Ryosuke Niwa. As evas_object is also based on reference count, RefPtr is applied for evas_object. * PlatformEfl.cmake: * platform/efl/RefPtrEfl.cpp: Added. (WTF::refIfNotNull): (WTF::derefIfNotNull): * platform/efl/RefPtrEfl.h: Added. 2011-12-09 Tony Chang REGRESSION(102234): 2-3% layout regression https://bugs.webkit.org/show_bug.cgi?id=74141 Reviewed by David Hyatt. Don't allocate a RuleSet when there are no regions. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::initForRegionStyling): 2011-12-09 Anders Carlsson Fix assertion failure in ScrollAnimatorMac https://bugs.webkit.org/show_bug.cgi?id=74222 Reviewed by Andreas Kling. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]): This can be called with a nil scrollerImp, just return NSZeroPoint when that happens. 2011-12-09 Anders Carlsson Move the "is currently drawing into layer" flag out into ScrollbarThemeMac https://bugs.webkit.org/show_bug.cgi?id=74217 Reviewed by Beth Dakin. There's no need to store this flag inside ScrollAnimatorMac, just make it a global and put it in ScrollbarThemeMac instead. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterDelegate layer]): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::isCurrentlyDrawingIntoLayer): (WebCore::ScrollbarThemeMac::paint): 2011-12-09 Anders Carlsson Minor cleanup in ScrollAnimatorMac.mm https://bugs.webkit.org/show_bug.cgi?id=74211 Reviewed by Andreas Kling. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]): No need to get the scrollbar from the scroll animator anymore. (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): Try to get data from the scrollbar and/or the scrollable area instead of the scrollbar painter. 2011-12-09 David Levin Regression(r53595): Sync xhr requests in workers aren't terminated on worker close. https://bugs.webkit.org/show_bug.cgi?id=71695 Reviewed by Zoltan Herczeg. Overview: Message loops rely on the message queue being killed in order to exit. r53595 stopped this from happening because killing a message loop would also stop it from doing database clean up tasks. The database clean up tasks needed to be tasks due to ordering issues. (They wanted to run after certain order tasks were run.) This was solved by once again terminating the message queue but then still runnning clean-up tasks from the killed message queue. * workers/WorkerRunLoop.cpp: (WebCore::WorkerRunLoop::run): Added the call to run clean-up tasks. (WebCore::WorkerRunLoop::runInMode): (WebCore::WorkerRunLoop::runCleanupTasks): Loop to simply clear out all clean up tasks. (WebCore::WorkerRunLoop::Task::performTask): Stop non-clean up tasks from running after the loop has been terminated. * workers/WorkerRunLoop.h: (WebCore::WorkerRunLoop::terminated): Just made it const. * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownFinishTask::performTask): Removed the terminate clause since it was put back in stop. (WebCore::WorkerThread::stop): Terminate the run loop so that all loops will exit and clean up tasks will run. Also removed a comment about nested workers because nested workers are no longer imminent and the issue mentioned is one of many that should logically be investigated -- behavior correctness in the face of different orderings of shutdown between the document and each worker -- when implementing them. 2011-12-09 Tony Chang Unreviewed, rolling out r102416. http://trac.webkit.org/changeset/102416 https://bugs.webkit.org/show_bug.cgi?id=73394 Chromium Win clobber builds are failing. * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): * WebCore.gypi: * bindings/scripts/generate-bindings.pl: * page/DOMWindow.idl: * webaudio/DOMWindowWebAudio.idl: Removed. 2011-12-09 Eric Carlson JSC wrappers for TextTrack and TextTrackCue should not be collected during event dispatch or when owner is reachable https://bugs.webkit.org/show_bug.cgi?id=72179 Reviewed by Geoff Garen. Tests: media/track/text-track-cue-is-reachable.html media/track/text-track-is-reachable.html * GNUmakefile.list.am: Add JSTextTrackCueCustom.cpp and JSTextTrackCustom.cpp. * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto * bindings/js/JSBindingsAllInOne.cpp: Ditto. * bindings/js/JSTextTrackCueCustom.cpp: Added. (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots): New. (WebCore::JSTextTrackCueOwner::visitChildren): New. * bindings/js/JSTextTrackCustom.cpp: Added. (WebCore::JSTextTrackOwner::isReachableFromOpaqueRoots): New. (WebCore::JSTextTrack::visitChildren): New, mark all cues. * bindings/js/JSTextTrackCustom.h: Added. (WebCore::root): New. * bindings/js/JSTextTrackListCustom.cpp: (WebCore::JSTextTrackList::visitChildren): New, mark all tracks. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::trackWillBeRemoved): TextTracks::remove now takes a TextTrack*. * html/LoadableTextTrack.h: (WebCore::LoadableTextTrack::trackElement): New, return the . * html/TextTrack.cpp: (WebCore::TextTrack::TextTrack): Initialize m_mediaElement. * html/TextTrack.h: (WebCore::TextTrack::setMediaElement): New. (WebCore::TextTrack::mediaElement): Ditto. * html/TextTrack.idl: Add CustomIsReachable and CustomMarkFunction. * html/TextTrackCue.idl: Add CustomIsReachable. * html/track/TextTrackList.cpp: (TextTrackList::append): Set track's media element. (TextTrackList::remove): Clear track's media element. Take a raw ptr, not a PassRefPtr. * html/track/TextTrackList.h: * html/track/TextTrackList.idl: Add CustomMarkFunction 2011-12-09 Chris Fleizach WebKit should ignore images with @alt matching only whitespace https://bugs.webkit.org/show_bug.cgi?id=74189 Reviewed by Darin Adler. Test: accessibility/img-alt-tag-only-whitespace.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): 2011-12-09 Anders Carlsson Remove NSAnimationContext calls https://bugs.webkit.org/show_bug.cgi?id=74207 Reviewed by Sam Weinig. NSAnimationContext is not used for NSAnimation subclasses, so the calls to beginGrouping/endGrouping and setDuration: are essentially no-ops. Remove them. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): 2011-12-09 Anders Carlsson Rename scrollAnimatorDestroyed to invalidate https://bugs.webkit.org/show_bug.cgi?id=74206 Reviewed by Sam Weinig. Since these methods can be called when both scrollbars are destroyed and the scroll animator itself is destroyed, rename it to something more neutral. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollAnimationHelperDelegate invalidate]): (-[WebScrollbarPartAnimation invalidate]): (-[WebScrollbarPainterDelegate invalidate]): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): 2011-12-09 Anders Carlsson WebScrollbarPainterControllerDelegate should know about the ScrollableArea, not the ScrollAnimatorMac https://bugs.webkit.org/show_bug.cgi?id=74204 Reviewed by Sam Weinig. It makes more logical sense to associate the WebScrollbarPainterControllerDelegate object with its ScrollableArea, since painting has nothing to do with animation. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterControllerDelegate initWithScrollableArea:]): (-[WebScrollbarPainterControllerDelegate invalidate]): (-[WebScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]): (-[WebScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]): (-[WebScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]): (-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]): (-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): 2011-12-09 Jarred Nicholls [JSC] Allow cached attributes in bindings that declare a custom mark function https://bugs.webkit.org/show_bug.cgi?id=74187 Reviewed by Oliver Hunt. No new tests, current binding tests are sufficient. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): 2011-12-09 Anders Carlsson Remove duplicate animation ivars https://bugs.webkit.org/show_bug.cgi?id=74194 Reviewed by Sam Weinig. Since we now have one WebScrollbarPainterDelegate for each scrollbar, we no longer need separate vertical/horizontal animation objects, so get rid of them. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterDelegate cancelAnimations]): (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): (-[WebScrollbarPainterDelegate scrollAnimatorDestroyed]): 2011-12-09 Anders Carlsson WebScrollbarPartAnimation should only know about the scrollbar it's animating https://bugs.webkit.org/show_bug.cgi?id=74192 Reviewed by Sam Weinig. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]): Change the designated initializer to just take the scrollbar. Also, make the animation non-blocking here so we don't have to do it in all the call sites. (-[WebScrollbarPartAnimation startAnimation]): Update the scrollbar painter. (-[WebScrollbarPartAnimation setCurrentProgress:]): Just invalidate the scrollbar we're animating. (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): Update call sites to use the new designated initializer. 2011-12-08 Jocelyn Turcotte Inspector: Don't translate the context when rendering the highlights on a tiled layer. https://bugs.webkit.org/show_bug.cgi?id=74085 Reviewed by Kenneth Rohde Christiansen. When the frame view is using fixed layouting, the page overlay is the size of the whole page and the context shouldn't be translated. The visible rect is still used in that case to display element titles within the visible rect. Also: - Rename overlayRect to visibleRect to reduce confusion in this case. - Remove the superfluous boundingBox check. * inspector/DOMNodeHighlighter.cpp: 2011-12-09 Vsevolod Vlasov Unreviewed inspector utilities syntax fix. * inspector/front-end/utilities.js: (): 2011-12-09 Joone Hur , Gustavo Noronha Silva [GTK] Initial implementation of Accelerated Compositing using Clutter https://bugs.webkit.org/show_bug.cgi?id=73319 Reviewed by Gustavo Noronha Silva. No new tests added as this feature will be able to reuse the existing CSS3 transforms layout tests. * GNUmakefile.am: Include WebCore/platform/graphics/clutter path. * GNUmakefile.list.am: Add GraphicsLayerClutter. * platform/clutter/GRefPtrClutter.cpp: Added. (WTF::adoptGRef): (WTF::ClutterActor): * platform/clutter/GRefPtrClutter.h: Added. * platform/graphics/GraphicsLayer.h: Define PlatformLayer type, which represents ClutterActor. * platform/graphics/clutter/GraphicsLayerClutter.cpp: Boilerplate implementation. (WebCore::GraphicsLayerClutter::GraphicsLayerClutter): (WebCore::GraphicsLayerClutter::platformLayer): * platform/graphics/clutter/GraphicsLayerClutter.h: Boilerplate implementation. 2011-12-08 Vsevolod Vlasov Web Inspector: Introduce a Map class allowing to store values indexed by arbitrary objects. https://bugs.webkit.org/show_bug.cgi?id=74084 Reviewed by Pavel Feldman. Test: inspector/map.html * inspector/front-end/treeoutline.js: (TreeOutline): (): (TreeElement.prototype.collapse): (TreeElement.prototype.expand): * inspector/front-end/utilities.js: (): 2011-12-09 Peter Rybin Web Inspector: [protocol] generate C++ classes for protocol JSON named types https://bugs.webkit.org/show_bug.cgi?id=72835 Reviewed by Yury Semikhatsky. Extends python generator functionality. Makes constructor in InspectorObject public. * inspector/CodeGeneratorInspector.py: * inspector/InspectorValues.h: 2011-12-08 Viatcheslav Ostapenko [Qt] [WK2] Webkit should release TextureMapper GL objects if page paint node is deallocated. https://bugs.webkit.org/show_bug.cgi?id=73591 Reviewed by Noam Rosenthal. Implementation of helper function to remove all GL allocated tiles when QQuickWebView gets removed from canvas. Tested by new API test in WK2 (tst_QQuickWebView::removeFromCanvas). * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::purgeNodeTexturesRecursive): * platform/graphics/texmap/TextureMapperNode.h: 2011-12-08 Leo Yang Upstream platform/network/blackberry/DeferredData.{h, cpp}, NetworkJob.{h, cpp} and NetworkManager.{h, cpp} https://bugs.webkit.org/show_bug.cgi?id=73791 Reviewed by Rob Buis. Other main contributors: Joe Mason Lianghui Chen Charles Wei Initial upstream, can't be built yet, no new tests. * platform/network/blackberry/DeferredData.cpp: Added. * platform/network/blackberry/DeferredData.h: Added. * platform/network/blackberry/NetworkJob.cpp: Added. * platform/network/blackberry/NetworkJob.h: Added. * platform/network/blackberry/NetworkManager.cpp: Added. * platform/network/blackberry/NetworkManager.h: Added. 2011-12-08 Ryosuke Niwa It's semantically incorrect to call notifyNodeListsAttributeChanged in dispatchSubtreeModifiedEvent https://bugs.webkit.org/show_bug.cgi?id=74028 Reviewed by Darin Adler. Remove a call to notifyNodeListsAttributeChanged in dispatchSubtreeModified and add explicit calls to notifyNodeListsAttributeChanged at appropriate places. Also merge notifyNodeListsChildrenChanged with notifyLocalNodeListsChildrenChanged, and notifyNodeListsAttributeChanged with notifyLocalNodeListsAttributeChanged, and rename them to invalidateNodeListsCacheAfterAttributeChanges and invalidateNodeListsCacheAfterNodeChanges respectively. * dom/Attr.cpp: (WebCore::Attr::childrenChanged): * dom/ContainerNode.cpp: (WebCore::ContainerNode::childrenChanged): * dom/Document.cpp: (WebCore::Document::updateRangesAfterNodeChanges): * dom/Document.h: * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::addAttribute): (WebCore::NamedNodeMap::removeAttribute): * dom/Node.cpp: (WebCore::removeNodeListCacheIfPossible): (WebCore::Node::unregisterDynamicNodeList): (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanges): (WebCore::Node::invalidateNodeListsCacheAfterNodeChanges): (WebCore::Node::dispatchSubtreeModifiedEvent): * dom/Node.h: * dom/NodeRareData.h: * dom/StyledElement.cpp: (WebCore::StyledElement::classAttributeChanged): 2011-12-08 Kenichi Ishibashi Unreviewed, rolling out r102418. http://trac.webkit.org/changeset/102418 https://bugs.webkit.org/show_bug.cgi?id=71870 Caused Chromium build failure. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * html/canvas/WebGLExtension.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: * html/canvas/WebKitLoseContext.cpp: Renamed from Source/WebCore/html/canvas/WebGLLoseContext.cpp. (WebCore::WebKitLoseContext::WebKitLoseContext): (WebCore::WebKitLoseContext::~WebKitLoseContext): (WebCore::WebKitLoseContext::getName): (WebCore::WebKitLoseContext::create): (WebCore::WebKitLoseContext::loseContext): (WebCore::WebKitLoseContext::restoreContext): * html/canvas/WebKitLoseContext.h: Renamed from Source/WebCore/html/canvas/WebGLLoseContext.h. * html/canvas/WebKitLoseContext.idl: Renamed from Source/WebCore/html/canvas/WebGLLoseContext.idl. 2011-12-08 Fady Samuel [Chromium] Enable viewport metatag https://bugs.webkit.org/show_bug.cgi?id=73495 Reviewed by Darin Fisher. Recompute viewpot parameters on frame rect resize. * page/FrameView.cpp: (WebCore::FrameView::setFrameRect): 2011-12-08 Kent Tamura Build fix for r102419. https://bugs.webkit.org/show_bug.cgi?id=73916 * platform/PopupMenuClient.h: (WebCore::PopupMenuClient::listBoxSelectItem): Remove unused argument names. 2011-12-08 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/JS/JSFloat64Array.cpp: * bindings/scripts/test/JS/JSTestEventConstructor.cpp: * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 2011-12-08 Mary Wu Upstream BlackBerry porting of MIMETypeRegistry/KeyboardEvent https://bugs.webkit.org/show_bug.cgi?id=73534 Reviewed by Rob Buis. Other main contributors: Mike Fenton Joe Mason Max Feil Lukas Sydorowski Crystal Zhang Initial upstream, no new tests. * platform/blackberry/MIMETypeRegistryBlackBerry.cpp: Added. (WebCore::MIMETypeRegistry::getMIMETypeForExtension): (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp: Added. (WebCore::keyIdentifierForBlackBerryCharacter): (WebCore::windowsKeyCodeForBlackBerryCharacter): (WebCore::adjustCharacterFromOS): (WebCore::toWebCorePlatformKeyboardEventType): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): (WebCore::PlatformKeyboardEvent::currentCapsLockState): (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): (WebCore::PlatformKeyboardEvent::getCurrentModifierState): 2011-12-08 Sheriff Bot Unreviewed, rolling out r101619. http://trac.webkit.org/changeset/101619 https://bugs.webkit.org/show_bug.cgi?id=74158 this patch produces bad behaviour on mac (Requested by jeremya_ on #webkit). * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::dragSourceEndedAt): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateHoverActiveState): 2011-12-08 Adam Klein [MutationObservers] V8LazyEventHandler breaks microtask delivery semantics https://bugs.webkit.org/show_bug.cgi?id=73492 Reviewed by Adam Barth. Test: fast/mutation/inline-event-listener.html * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): Call v8::Script::Run directly instead of going through V8Proxy. 2011-12-08 Hayato Ito Suppress rendering of light children when ShadowRoot is dynamically created. https://bugs.webkit.org/show_bug.cgi?id=72441 Reviewed by Ryosuke Niwa. Tests: fast/dom/shadow/dynamically-created-shadow-root-expected.html fast/dom/shadow/dynamically-created-shadow-root.html * dom/Element.cpp: (WebCore::Element::setShadowRoot): 2011-12-08 Pierre Rossi Drop ENABLE_NO_LISTBOX_RENDERING, and make it a runtime decision. https://bugs.webkit.org/show_bug.cgi?id=73916 This was needed for Qt since the mobile theme, which can be picked up at runtime, delegates the rendering of list boxes. Reviewed by Kent Tamura. No new tests, there's no functional change. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::usesMenuList): * html/HTMLSelectElement.h: * platform/PopupMenuClient.h: (WebCore::PopupMenuClient::listBoxSelectItem): (WebCore::PopupMenuClient::multiple): * platform/qt/RenderThemeQtMobile.h: (WebCore::RenderThemeQtMobile::delegatesMenuListRendering): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::multiple): * rendering/RenderMenuList.h: * rendering/RenderTheme.h: (WebCore::RenderTheme::delegatesMenuListRendering): 2011-12-08 Kenneth Russell Rename WEBKIT_lose_context to WEBKIT_WEBGL_lose_context https://bugs.webkit.org/show_bug.cgi?id=71870 Reviewed by James Robinson. Rename largely done with do-webcore-rename with a couple of necessary manual fixups. Ran WebGL layout tests. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * html/canvas/WebGLExtension.h: * html/canvas/WebGLLoseContext.cpp: Copied from Source/WebCore/html/canvas/WebKitLoseContext.cpp. (WebCore::WebGLLoseContext::WebGLLoseContext): (WebCore::WebGLLoseContext::~WebGLLoseContext): (WebCore::WebGLLoseContext::getName): (WebCore::WebGLLoseContext::create): (WebCore::WebGLLoseContext::loseContext): (WebCore::WebGLLoseContext::restoreContext): * html/canvas/WebGLLoseContext.h: Copied from Source/WebCore/html/canvas/WebKitLoseContext.h. * html/canvas/WebGLLoseContext.idl: Copied from Source/WebCore/html/canvas/WebKitLoseContext.idl. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: * html/canvas/WebKitLoseContext.cpp: Removed. * html/canvas/WebKitLoseContext.h: Removed. * html/canvas/WebKitLoseContext.idl: Removed. 2011-12-08 Kentaro Hara Use the [Supplemental] IDL for webaudio attributes in Chromium https://bugs.webkit.org/show_bug.cgi?id=73394 Reviewed by Adam Barth. - Overview: Using the [Supplemental] IDL, this patch moves the attribute declarations of webaudio from DOMWindow.idl into a new IDL file webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained feature (aka a module). - This patch changes the build flow of WebCore.gyp as follows: Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl; } - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL will be removed after build scripts for all platforms support the [Supplemental] IDL. The motivation for the [Supplemented] IDL is as follows: In order to support the [Supplemental] IDL, we need to (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp (2) and run generate-bindings.pl with the supplemental_dependency.tmp. This build flow requires a change on the following build scripts, but changing all the build scripts all at once without any regression is too difficult: - DerivedSources.make - DerivedSources.pri - GNUmakefile.am - PlatformBlackBerry.cmake - UseJSC.cmake - UseV8.cmake - WebCore.vcproj/MigrateScripts - WebCore.vcproj/WebCore.vcproj - bindings/gobject/GNUmakefile.am - WebCore.gyp/WebCore.gyp Thus, we are planning to change the build scripts one by one, which implies that we need to allow the temporary state in which some build scripts support [Supplemental] IDL but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented]. The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental] in another IDL file somewhere, like this: DOMWindowWebAudio.idl: interface [ Supplemental=DOMWindow ] DOMWindowWebAudio { attribute attr1; attribute attr2; }; DOMWindow.idl: interface [ ] DOMWindow { attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL. attribute attr3; attribute attr4; }; Assuming these IDL files, this patch implements the following logic in generate-bindings.pl: - If a given build script supports the [Supplemental] IDL, generate-bindings.pl ignores all attributes with the [Supplemented] IDL. - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL as normal attributes and instead ignores all attributes with the [Supplemental] IDL (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL). Tests: webaudio/* * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above. * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style path by the cygpath command. * WebCore.gypi: Added DOMWindowWebAudio.idl. * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL. * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL. * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl. 2011-12-08 Van Lam Caret keeps blinking during forward-delete https://bugs.webkit.org/show_bug.cgi?id=38564 Reviewed by Darin Adler. Currently updateAppearance determines if the caret should stop blinking based on whether or not the editing operation changed the position of the caret; so the caret stops blinking in case of typing text and backwards delete (which always displace the caret) but does not stop blinking in the case of forward delete (which does not displace the caret). Added a boolean member function shouldStopCaretBlinking in EditCommand which will return true if the object is a TypingCommand (my understanding here is that all TypingCommands should stop the caret from blinking for a cycle, currently 0.5 seconds). Then used this function to stop the caret from blinking if the last editing command is a TypingCommand. * editing/EditCommand.h: (WebCore::EditCommand::shouldStopCaretBlinking): * editing/FrameSelection.cpp: (WebCore::FrameSelection::updateAppearance): * editing/TypingCommand.h: (WebCore::TypingCommand::shouldStopCaretBlinking): 2011-12-08 Adam Klein Use HashMap> in ChildListMutationScope https://bugs.webkit.org/show_bug.cgi?id=73964 Reviewed by Darin Adler. Re-landing r102267 with a fix for the clang build. No new tests, refactoring only. * dom/ChildListMutationScope.cpp: (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::childAdded): (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::willRemoveChild): (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::incrementScopingLevel): (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::decrementScopingLevel): 2011-12-08 Anders Carlsson WebScrollbarPainterDelegate should have a pointer to its Scrollbar https://bugs.webkit.org/show_bug.cgi?id=74149 Reviewed by Darin Adler. This is another step towards making the scroll animation code more robust. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterDelegate initWithScrollbar:WebCore::]): (-[WebScrollbarPainterDelegate scrollAnimator]): (-[WebScrollbarPainterDelegate layer]): (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]): (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): (-[WebScrollbarPainterDelegate scrollAnimatorDestroyed]): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): 2011-12-08 Rakesh KN keyboard event doesn't fire while moving mouse with button pressed https://bugs.webkit.org/show_bug.cgi?id=73821 Reviewed by Alexey Proskuryakov. Autoscroll should not stop on key press. Test: fast/events/autoscroll-should-not-stop-on-keypress.html * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Removed the check for autoscroll so that autoscroll is not stopped on key press and key event is processed. 2011-12-08 Anders Carlsson Add scrollAnimator getter method to WebScrollbarPainterDelegate https://bugs.webkit.org/show_bug.cgi?id=74146 Reviewed by Beth Dakin. * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterDelegate scrollAnimator]): (-[WebScrollbarPainterDelegate layer]): (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]): (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): 2011-12-08 James Robinson Improve handling of frame removal during requestAnimationFrame callback invocation https://bugs.webkit.org/show_bug.cgi?id=74036 Reviewed by Adam Barth. See bug for details. Test: fast/animation/request-animation-frame-detach-element.html * dom/Document.cpp: (WebCore::Document::removedLastRef): (WebCore::Document::detach): * dom/Document.h: * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::~ScriptedAnimationController): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): (WebCore::ScriptedAnimationController::scheduleAnimation): * dom/ScriptedAnimationController.h: (WebCore::ScriptedAnimationController::create): (WebCore::ScriptedAnimationController::clearDocumentPointer): * page/FrameView.cpp: (WebCore::FrameView::serviceScriptedAnimations): 2011-12-08 Yongjun Zhang Use bitfield for bool data members in BitmapImage. https://bugs.webkit.org/show_bug.cgi?id=74102 Reviewed by Darin Adler. Class BitmapImage and FrameData has bool data members, we can use bitfield for those data members to reduce the BitmapImage's memory footprint. * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::BitmapImage): * platform/graphics/BitmapImage.h: (WebCore::FrameData::FrameData): * platform/graphics/cairo/ImageCairo.cpp: (WebCore::BitmapImage::BitmapImage): * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::BitmapImage): * platform/graphics/openvg/ImageOpenVG.cpp: (WebCore::BitmapImage::BitmapImage): * platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::BitmapImage): 2011-12-08 Anders Carlsson Fix a paste-o in ScrollAnimatorMac::updateScrollerStyle https://bugs.webkit.org/show_bug.cgi?id=74145 Reviewed by Sam Weinig. Call setHorizontalScrollerImp to set the horizontal scrollbar painter. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::updateScrollerStyle): 2011-12-08 Anders Carlsson Create one WebScrollbarPainterDelegate for each scrollbar https://bugs.webkit.org/show_bug.cgi?id=74142 Reviewed by Sam Weinig. Create and destroy WebScrollbarPainterDelegate objects as scrollbars come and go. This is a step towards simplifying the WebScrollbarPainterDelegate object. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::cancelAnimations): 2011-12-08 David Reveman [Chromium] Add per-tile painting flag to DumpRenderTree and rename AcceleratedDrawing to AcceleratedPainting in chromium specific code. https://bugs.webkit.org/show_bug.cgi?id=74017 Reviewed by James Robinson. Add per-tile drawing to page settings. No new tests. * page/Settings.h: (WebCore::Settings::setPerTileDrawingEnabled): (WebCore::Settings::perTileDrawingEnabled): * testing/Internals.cpp: (WebCore::Internals::setPerTileDrawingEnabled): * testing/Internals.h: 2011-12-08 Anders Carlsson Add a scrollbarPainterForScrollbar helper function https://bugs.webkit.org/show_bug.cgi?id=74139 Reviewed by Sam Weinig. * platform/mac/ScrollAnimatorMac.mm: (macScrollbarTheme): (scrollbarPainterForScrollbar): (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar): (WebCore::ScrollAnimatorMac::mouseExitedScrollbar): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): 2011-12-08 James Robinson [chromium] Move NonCompositedContentHost to WebKit https://bugs.webkit.org/show_bug.cgi?id=74047 Reviewed by Kenneth Russell. Updates WebCore.gypi to remove files no longer within WebCore and removes unused forward declaration and include from LayerRendererChromium. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: 2011-12-08 Sami Kyostila [chromium] Layer contents scale change should trigger invalidation https://bugs.webkit.org/show_bug.cgi?id=74086 When the contents scale of a layer is changed, the entire contents of the layer should be marked dirty. Reviewed by James Robinson. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setContentsScale): 2011-12-08 Stephen White [chromium] Add CSS_FILTERS custom binding file to WebCore.gypi. https://bugs.webkit.org/show_bug.cgi?id=74091 Reviewed by Adam Barth. If it builds, you're happy. * WebCore.gypi: 2011-12-08 Ryosuke Niwa Line breaks are lost when pasted into textarea text starting with a blank line set while textarea is hidden https://bugs.webkit.org/show_bug.cgi?id=74126 Reviewed by Tony Chang. The bug was caused by the code that generated text out of pre-rendered text was generating div's inside the fragment pasted into textarea even though serialization algorithm in textarea doesn't handle block elements. Fixed the bug by special-casing this in createFragmentFromText. In the long run, we should really get rid of this whole pre-rendering trick. * editing/markup.cpp: (WebCore::createFragmentFromText): 2011-12-08 Florin Malita Moving SVG elements on the page doesn't always erase element at the old position https://bugs.webkit.org/show_bug.cgi?id=74002 Reviewed by Darin Adler. Test: svg/repaint/container-repaint.svg * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): Save the old repaint bounds before updating the viewport. 2011-12-08 Tim Horton Enable animations of CSS images using -webkit-cross-fade https://bugs.webkit.org/show_bug.cgi?id=74049 Reviewed by Simon Fraser. Add support for animating CSS images in the following properties: - background(-image) - border-image(-source) - list-style(-image) - -webkit-mask-box-image(-source) - -webkit-mask-image(-source) This patch only adds support for transitioning between NinePieceImages where all of the properties except the image itself are equal, and the size of the images are equal. Other cases will not animate. Add animation blend functions for StyleImage and NinePieceImage. Apply the proper compositing operation to -webkit-cross-fade, and fix handling of the destination and source areas to support scaling. Tests: animations/cross-fade-background-image.html animations/cross-fade-border-image-source.html animations/cross-fade-list-style-image.html animations/cross-fade-webkit-mask-box-image.html animations/cross-fade-webkit-mask-image.html * css/CSSCrossfadeValue.cpp: (WebCore::cachedImageForCSSValue): (WebCore::CSSCrossfadeValue::fixedSize): (WebCore::CSSCrossfadeValue::image): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::CSSImageValue): * css/CSSImageValue.h: (WebCore::CSSImageValue::create): * page/animation/AnimationBase.cpp: (WebCore::crossfadeBlend): (WebCore::blendFunc): (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper): (WebCore::RefCountedPropertyWrapper::blend): (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper): (WebCore::FillLayerRefCountedPropertyWrapper::blend): (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): (WebCore::AnimationBase::ensurePropertyMap): (WebCore::addShorthandProperties): * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::drawCrossfade): (WebCore::CrossfadeGeneratedImage::draw): (WebCore::CrossfadeGeneratedImage::drawPattern): * platform/graphics/CrossfadeGeneratedImage.h: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setMaskImage): 2011-12-08 Stephen White Use Skia's implementation of Gaussian blur when accelerated filters are enabled. https://bugs.webkit.org/show_bug.cgi?id=73949 Reviewed by Zoltan Herczeg. In the future, this will be covered by the SVG tests run in GPU mode. * WebCore.gypi: Add FEGaussianBlurSkia.cpp to the build. * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::platformApplySoftware): Call out to platformApplySkia() when USE_SKIA is enabled. * platform/graphics/filters/FEGaussianBlur.h: platformApplySkia() declaration. * platform/graphics/filters/skia: Added. * platform/graphics/filters/skia/FEGaussianBlurSkia.cpp: Added. (WebCore::FEGaussianBlur::platformApplySkia): On the Skia port, use SkBlurImageFilter for drawing Gaussian blurs in accelerated mode. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::copyImage): Implement ImageBuffer::copyImage() with DontCopyBackingStore semantics. 2011-12-08 Erik Arvidsson CodeGeneratorV8: Fix issue with overloaded static conditional methods https://bugs.webkit.org/show_bug.cgi?id=74114 Reviewed by Adam Barth. The code generator was missing checks for Conditional for overloaded methods. * bindings/scripts/CodeGeneratorV8.pm: (GenerateOverloadedFunctionCallback): Generate needed #ifdefs. (GenerateFunctionCallback): Ditto. * bindings/scripts/test/V8/V8TestObj.cpp: Wrap conditional methods with #ifdefs. (WebCore::ConfigureV8TestObjTemplate): 2011-12-08 Dominic Mazzoni AccessibilityController should support listening to notifications on all elements. https://bugs.webkit.org/show_bug.cgi?id=72866 Changes accessibilitySetShouldRepostNotifications from an instance method into a class method so that it can be used for global notification listeners, not just for listeners on a particular object. Reviewed by Chris Fleizach. Test: accessibility/notification-listeners.html * accessibility/mac/WebAccessibilityObjectWrapper.h: * accessibility/mac/WebAccessibilityObjectWrapper.mm: (+[WebAccessibilityObjectWrapper accessibilitySetShouldRepostNotifications:]): (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): 2011-12-08 Vsevolod Vlasov Web Inspector: Rename createScriptCallStack() without parameters to createScriptCallStackForInspector(). https://bugs.webkit.org/show_bug.cgi?id=74120 Reviewed by Pavel Feldman. * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStackForInspector): * bindings/js/ScriptCallStackFactory.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateFunctionCallback): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::customArgsAndExceptionCallback): * bindings/v8/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStackForInspector): * bindings/v8/ScriptCallStackFactory.h: 2011-12-08 Adrienne Walker [chromium] Remove dead code in compositor https://bugs.webkit.org/show_bug.cgi?id=74103 Reviewed by James Robinson. Tested via the compiler. * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: 2011-12-08 Eric Penner [chromium] Need to adjust memory limit and viewport multipliers. https://bugs.webkit.org/show_bug.cgi?id=74022 Reviewed by James Robinson. * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): Changing constants (WebCore::TextureManager::reclaimLimitBytes): ditto 2011-12-08 Benjamin Poulain Add a platform EventLoop for iOS https://bugs.webkit.org/show_bug.cgi?id=74043 Reviewed by David Kilzer. * WebCore.xcodeproj/project.pbxproj: * platform/ios/EventLoopIOS.mm: Added. (WebCore::EventLoop::cycle): 2011-12-08 Pavel Feldman Web Inspector: return node counts on the document / detached root basis https://bugs.webkit.org/show_bug.cgi?id=74104 Reviewed by Yury Semikhatsky. * bindings/js/ScriptProfiler.h: * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::domNodeCount): * bindings/v8/ScriptProfiler.h: * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getDOMNodeCount): (WebCore::InspectorMemoryAgent::InspectorMemoryAgent): * inspector/InspectorMemoryAgent.h: (WebCore::InspectorMemoryAgent::create): 2011-12-08 Andreas Kling RenderObject: Rename styleSlowCase() to styleInRegion(). Rubber-stamped by David Hyatt. * WebCore.exp.in: * rendering/RenderObject.cpp: (WebCore::RenderObject::styleInRegion): * rendering/RenderObject.h: (WebCore::RenderObject::style): 2011-12-08 Andreas Kling Optimize RenderObject::containingBlock(). Reviewed by David Hyatt. When climbing the parent chain to locate the containing block-level element, use !isRenderBlock() to reject renderers rather than checking against an arbitrary list of non-block renderers and then rejecting anything that isn't a block anyway. RenderObject::containingBlock() was very hot (2.0%) when scrolling on youtube.com. This change takes it down to 1.0% (60% of which is RenderObject::isRenderBlock().) * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): 2011-12-08 Nayan Kumar K Define DEBUG_GL_COMMANDS only in debug builds. https://bugs.webkit.org/show_bug.cgi?id=74083 Reviewed by Noam Rosenthal. No tests added as this change does not affect functionality. * platform/graphics/opengl/TextureMapperGL.cpp: 2011-12-08 Ryosuke Niwa CompositeEditCommand should not be kept alive for undo and redo https://bugs.webkit.org/show_bug.cgi?id=64414 Reviewed by Enrica Casucci. This patch introduces EditCommandComposition that replaces CompositeEditCommand for undo and redo purposes. Furthermore, we now keep a list of commands instead of a tree of commands to unapply and reapply edit commands that composes an undoable action. Each top-level CompositeEditCommand holds a ref-pointer to EditCommandComposition, and applyCommandToComposite adds new SimpleEditCommands to the list. * editing/CompositeEditCommand.cpp: (WebCore::EditCommandComposition::create): (WebCore::EditCommandComposition::doApply): Never used. (WebCore::EditCommandComposition::doUnapply): (WebCore::EditCommandComposition::doReapply): (WebCore::EditCommandComposition::append): (WebCore::CompositeEditCommand::~CompositeEditCommand): Add an assertion to ensure we didn't create a composition for CompositeEditCommands that have parents. (WebCore::CompositeEditCommand::doUnapply): Never used. (WebCore::CompositeEditCommand::doReapply): Never used. (WebCore::CompositeEditCommand::ensureComposition): Creates and attaches a EditCommandComposition. (WebCore::CompositeEditCommand::applyCommandToComposite): Append a SimpleEditCommand to the composition. * editing/CompositeEditCommand.h: (WebCore::EditCommandComposition::EditCommandComposition): (WebCore::CompositeEditCommand::composition): (WebCore::toEditCommandComposition): (WebCore::toCompositeEditCommand): * editing/DeleteButtonController.cpp: Wrap RemoveNodeCommand in RemoveTargetCommand since top level commands are now required to be a CompositeEditCommand. (WebCore::RemoveTargetCommand::create): (WebCore::RemoveTargetCommand::RemoveTargetCommand): (WebCore::RemoveTargetCommand::doApply): (WebCore::DeleteButtonController::deleteTarget): * editing/EditCommand.cpp: (WebCore::EditCommand::EditCommand): New constructor; used by EditCommandComposition. (WebCore::EditCommand::apply): Create a composition for a top-level command. (WebCore::EditCommand::unapply): Since we clear m_parent of SimpleEditCommand as soon as they are added to EditCommandComposition, we can't use isTopLevelCommand() to differentiate EditCommandComposition from SimpleEditCommand. Use isEditCommandComposition() instead. (WebCore::EditCommand::reapply): Ditto. (WebCore::compositionIfPossible): (WebCore::EditCommand::setStartingSelection): Update the starting selection of EditCommandComposition. (WebCore::EditCommand::setEndingSelection): Ditto. (WebCore::EditCommand::setParent): Accepts a null pointer in order to avoid keeping a stale pointer in m_parent inside SimpleEditCommand when CompositeEditCommand goes away. * editing/EditCommand.h: (WebCore::EditCommand::isSimpleEditCommand): (WebCore::EditCommand::isCompositeEditCommand): (WebCore::EditCommand::isEditCommandComposition): (WebCore::EditCommand::parent): (WebCore::toSimpleEditCommand): * editing/Editor.cpp: (WebCore::Editor::appliedEditing): Register a EditCommandComposition, instead of a CompositeEditCommand to the undo stack. (WebCore::Editor::unappliedEditing): Unapplied or reapplied commands are now always EditCommandComposition. (WebCore::Editor::reappliedEditing): * editing/Editor.h: 2011-12-08 Stephen White Add missing V8 bindings to get CSS_FILTERS to compile in Chromium. https://bugs.webkit.org/show_bug.cgi?id=74091 Reviewed by Kenneth Russell. Will be covered by tests in css3/filters (when enabled). * bindings/v8/custom/V8WebKitCSSFilterValueCustom.cpp: Added. (WebCore::V8WebKitCSSFilterValue::indexedPropertyGetter): 2011-12-08 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=73348 REGRESSION: Assertion when loading a page with a scrollable RenderLayer -and corresponding- Reviewed by Darin Adler. The main problem here is that certain delegate calls into AppKit for overlay scrollbars can cause AppKit to call back into WebKit looking for more information. The assertion happens when WebKit tells AppKit that the scroll position has changed during a layout, and AppKit immediately asks WebKit to convert some coordinates, and WebKit asserts that you shouldn't do that while a layout is still happening. It's still possible for AppKit to call this delegate method while a layout is happening, and we should guard against that. This patch, however, does not do that. This change instead addresses the reason this assertion started happening much more frequently recently, which is that it recently became true that notifyPositionChanged() can be called when the position has not changed. To fix the assertion AND the bug that that change was intended to fix, we can just make sure that either the position OR the scroll origin has changed before calling notifyPositionChanged(). * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::immediateScrollToPoint): Call resetScrollOriginChanged() after the scroll instead of before so that we know whether or not to call notifyPositionChanged(). * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): 2011-12-08 Kaustubh Atrawalkar Fixing support for static conditional overloaded functions. https://bugs.webkit.org/show_bug.cgi?id=74068 Reviewed by Adam Barth. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Pushing "static" keyword after condition "#if". * bindings/scripts/test/CPP/WebDOMTestObj.cpp: (WebDOMTestObj::overloadedMethod1): Added newly generated bindings. * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto. * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto. (webkit_dom_test_obj_overloaded_method1): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto. * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): (WebCore::jsTestObjConstructorFunctionOverloadedMethod1): * bindings/scripts/test/JS/JSTestObj.h: Ditto. * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto. * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto. (-[DOMTestObj overloadedMethod1:]): * bindings/scripts/test/TestObj.idl: Ditto. * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::TestObjInternal::overloadedMethod11Callback): (WebCore::TestObjInternal::overloadedMethod12Callback): (WebCore::TestObjInternal::overloadedMethod1Callback): (WebCore::ConfigureV8TestObjTemplate): 2011-12-08 Andreas Kling Remove EventListenerMap destructor. Reviewed by Darin Adler. Let the compiler generate ~EventListenerMap(). We only needed it when the hash map was managing raw pointers. We're losing the no-iterators assertion from clear() by doing this, but that was superfluous to begin with - we were just using it to avoid duplicating code. * dom/EventListenerMap.cpp: * dom/EventListenerMap.h: 2011-12-08 Takashi Toyoshima Provide more specific error description for SocketStreamError. https://bugs.webkit.org/show_bug.cgi?id=74066 Reviewed by Martin Robinson. No new tests because this change just improve error messages for unexpected failures. * platform/network/soup/SocketStreamError.h: Add an argument for passing error description. (WebCore::SocketStreamError::SocketStreamError): * platform/network/soup/SocketStreamHandleSoup.cpp: Add error description for SocketStreamError. (WebCore::SocketStreamHandle::connected): (WebCore::SocketStreamHandle::readBytes): (WebCore::SocketStreamHandle::platformSend): (WebCore::SocketStreamHandle::platformClose): 2011-12-08 Mihnea Ovidenie [CSSRegions][CSSOM] Implement NamedFlow interface https://bugs.webkit.org/show_bug.cgi?id=66642 Reviewed by David Hyatt. Add WebKitNamedFlow to support the NamedFlow interface. No methods are yet implemented on this interface. The NamedFlow object is a live object. The first time user asks for it, it gets a valid JS object whose properties will reflect the changes to the flow thread. Tests: fast/regions/webkit-named-flow-existing-flow.html fast/regions/webkit-named-flow-flow-added.html fast/regions/webkit-named-flow-modified-flow.html fast/regions/webkit-named-flow-non-existing-flow.html fast/regions/webkit-named-flow-removed-flow.html fast/regions/webkit-named-flow-same-object.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * dom/DOMAllInOne.cpp: * dom/Document.cpp: (WebCore::Document::webkitGetFlowByName): * dom/Document.h: * dom/Document.idl: * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded): * dom/WebKitNamedFlow.cpp: Added. (WebCore::WebKitNamedFlow::WebKitNamedFlow): (WebCore::WebKitNamedFlow::~WebKitNamedFlow): * dom/WebKitNamedFlow.h: Added. (WebCore::WebKitNamedFlow::create): * dom/WebKitNamedFlow.idl: Added. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::ensureNamedFlow): * rendering/RenderFlowThread.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/RenderView.cpp: (WebCore::RenderView::ensureRenderFlowThreadWithName): * rendering/RenderView.h: 2011-12-08 Sheriff Bot Unreviewed, rolling out r102321. http://trac.webkit.org/changeset/102321 https://bugs.webkit.org/show_bug.cgi?id=74072 "Breaks all Chromium clobbered builds" (Requested by apavlov_ on #webkit). * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): * WebCore.gypi: * bindings/scripts/generate-bindings.pl: * page/DOMWindow.idl: * webaudio/DOMWindowWebAudio.idl: Removed. 2011-12-08 Shinya Kawanaka Refactoring: Editor::requestCheckingFor should take SpellCheckRequest object. https://bugs.webkit.org/show_bug.cgi?id=74033 Reviewed by Hajime Morita. SpellChecker::requestCheckingFor takes SpellCheckRequest object in order to make it easy to pass necessary information to requestCheckingFor. No new tests. Covered by existing tests. * editing/Editor.cpp: (WebCore::Editor::replaceSelectionWithFragment): Uses the new interface. (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): ditto. * editing/SpellChecker.cpp: (WebCore::SpellCheckRequest::SpellCheckRequest): (WebCore::SpellCheckRequest::~SpellCheckRequest): (WebCore::SpellCheckRequest::create): Creates a new SpellCheckRequest object. (WebCore::SpellChecker::requestCheckingFor): Uses the new interface. (WebCore::SpellChecker::didCheck): * editing/SpellChecker.h: (WebCore::SpellCheckRequest::setSequence): (WebCore::SpellCheckRequest::sequence): (WebCore::SpellCheckRequest::checkingRange): (WebCore::SpellCheckRequest::paragraphRange): (WebCore::SpellCheckRequest::text): (WebCore::SpellCheckRequest::mask): (WebCore::SpellCheckRequest::rootEditableElement): 2011-12-08 Sheriff Bot Unreviewed, rolling out r102323. http://trac.webkit.org/changeset/102323 https://bugs.webkit.org/show_bug.cgi?id=74069 Caused Chromium and GTK build failure (Requested by bashi on #webkit). * testing/Internals.cpp: (WebCore::Internals::getPageScaleFactor): * testing/Internals.h: * testing/Internals.idl: 2011-12-08 Fady Samuel Move scalePageBy from eventSender to window.internals https://bugs.webkit.org/show_bug.cgi?id=64512 Reviewed by Simon Fraser. Added setPageScaleFactor to window.internals. Renamed window.internals.getPageScaleFactor to window.internals.pageScaleFactor to match the webkit style. * testing/Internals.cpp: (WebCore::Internals::pageScaleFactor): (WebCore::Internals::setPageScaleFactor): * testing/Internals.h: * testing/Internals.idl: 2011-12-08 Kentaro Hara Use the [Supplemental] IDL for webaudio attributes in Chromium https://bugs.webkit.org/show_bug.cgi?id=73394 Reviewed by Adam Barth. - Overview: Using the [Supplemental] IDL, this patch moves the attribute declarations of webaudio from DOMWindow.idl into a new IDL file webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained feature (aka a module). - This patch changes the build flow of WebCore.gyp as follows: Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl; } - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL will be removed after build scripts for all platforms support the [Supplemental] IDL. The motivation for the [Supplemented] IDL is as follows: In order to support the [Supplemental] IDL, we need to (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp (2) and run generate-bindings.pl with the supplemental_dependency.tmp. This build flow requires a change on the following build scripts, but changing all the build scripts all at once without any regression is too difficult: - DerivedSources.make - DerivedSources.pri - GNUmakefile.am - PlatformBlackBerry.cmake - UseJSC.cmake - UseV8.cmake - WebCore.vcproj/MigrateScripts - WebCore.vcproj/WebCore.vcproj - bindings/gobject/GNUmakefile.am - WebCore.gyp/WebCore.gyp Thus, we are planning to change the build scripts one by one, which implies that we need to allow the temporary state in which some build scripts support [Supplemental] IDL but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented]. The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental] in another IDL file somewhere, like this: DOMWindowWebAudio.idl: interface [ Supplemental=DOMWindow ] DOMWindowWebAudio { attribute attr1; attribute attr2; }; DOMWindow.idl: interface [ ] DOMWindow { attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL. attribute attr3; attribute attr4; }; Assuming these IDL files, this patch implements the following logic in generate-bindings.pl: - If a given build script supports the [Supplemental] IDL, generate-bindings.pl ignores all attributes with the [Supplemented] IDL. - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL as normal attributes and instead ignores all attributes with the [Supplemental] IDL (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL). Tests: webaudio/* * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above. * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style path by the cygpath command. * WebCore.gypi: Added DOMWindowWebAudio.idl. * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL. * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL. * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl. 2011-12-07 Yosifumi Inoue CSS color gets adjusted for disabled input elements https://bugs.webkit.org/show_bug.cgi?id=54643 Reviewed by Kent Tamura. No new tests. covered by existing tests. Need rebasing some existing tests for Chromimum. Remove automatic color adjustment for disabled text control for Chromimum. * css/themeChromium.css: Add CSS entries for default style for disabled input and textarea elements. * WebCore/rendering/RenderTextControl.cpp: (disabledTextColor): Removed for PLATFORM(CHROMIUM) (RenderTextControl::adjustInnerTextStyle): Don't call disabledTextColor for Chromium. 2011-12-07 Dmitry Lomov https://bugs.webkit.org/show_bug.cgi?id=74038 [V8][Chromium] Support legacy argument order in window.postMessage/window.webkitPostMessage. Reviewed by David Levin. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::isLegacyTargetOriginDesignation): (WebCore::handlePostMessageCallback): 2011-12-07 Mary Wu Upstream 4 files into WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=73541 Reviewed by Antonio Gomes. Initial upstream of BlackBerry porting of PlatformScreen/ SSLKeyGenerator/Sound/Widget, no new tests. * PlatformBlackBerry.cmake: Modified to remove empty file "WheelEventBlackBerry.cpp" * platform/blackberry/PlatformScreenBlackBerry.cpp: Added. (WebCore::screenIsMonochrome): (WebCore::screenDepthPerComponent): (WebCore::screenDepth): (WebCore::screenAvailableRect): (WebCore::screenRect): * platform/blackberry/SSLKeyGeneratorBlackBerry.cpp: Added. (WebCore::getSupportedKeySizes): (WebCore::signedPublicKeyAndChallengeString): * platform/blackberry/SoundBlackBerry.cpp: Added. (WebCore::systemBeep): * platform/blackberry/WidgetBlackBerry.cpp: Added. (WebCore::Widget::Widget): (WebCore::Widget::~Widget): (WebCore::Widget::hide): (WebCore::Widget::paint): (WebCore::Widget::setCursor): (WebCore::Widget::setFocus): (WebCore::Widget::setFrameRect): (WebCore::Widget::setIsSelected): (WebCore::Widget::show): (WebCore::Widget::frameRect): 2011-12-07 Kenichi Ishibashi Refactor CSSParser::parseFontFaceSrc() https://bugs.webkit.org/show_bug.cgi?id=73989 Reviewed by Darin Adler. Test: fast/css/font-face-src-parsing.html * css/CSSParser.cpp: (WebCore::CSSParser::parseFontFaceSrcURI): Added. (WebCore::CSSParser::parseFontFaceSrcLocal): Added. (WebCore::CSSParser::parseFontFaceSrc): Rewrote. * css/CSSParser.h: 2011-12-07 Xingnan Wang Implement the SSE optimization in SincResampler::process() https://bugs.webkit.org/show_bug.cgi?id=73789 Reviewed by Benjamin Poulain. Here is about 70% performance improvement on the hot spot of sample convolving. * platform/audio/SincResampler.cpp: 2011-12-07 Luke Macpherson Implement border image source properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=73981 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyBorderImageSource::applyValue): (WebCore::ApplyPropertyBorderImageSource::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-12-07 Noel Gordon WebPImageDecoder should not do a full image decode if progressive decoding is active https://bugs.webkit.org/show_bug.cgi?id=74041 Reviewed by Adam Barth. If the decoder input data state reaches allDataReceived during a progressive image decode, the decoder performs a full image decode. On allDataReceived, check if we already have a decoder, and if so, continue to run the progressive decoder. No new tests. No change in behavior. * platform/image-decoders/webp/WEBPImageDecoder.cpp: (WebCore::WEBPImageDecoder::decode): 2011-12-07 Alexandre Elias [chromium] Add page-scale animation support to Impl thread https://bugs.webkit.org/show_bug.cgi?id=72996 Reviewed by James Robinson. This adds a new math helper class to compute the progress of the animation, and code in the CCLayerTreeHostImpl to apply the animation frame by frame. No new tests. (https://bugs.webkit.org/show_bug.cgi?id=71529 filed.) * WebCore.gypi: * platform/graphics/chromium/cc/CCInputHandler.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::animate): (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation): (WebCore::CCLayerTreeHostImpl::processScrollDeltas): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCPageScaleAnimation.cpp: Added. (WebCore::CCPageScaleAnimation::CCPageScaleAnimation): (WebCore::CCPageScaleAnimation::initialize): (WebCore::CCPageScaleAnimation::zoomTo): (WebCore::CCPageScaleAnimation::zoomWithAnchor): (WebCore::CCPageScaleAnimation::zoomElsewhere): (WebCore::CCPageScaleAnimation::scrollOffsetAtTime): (WebCore::CCPageScaleAnimation::pageScaleAtTime): (WebCore::CCPageScaleAnimation::isAnimationCompleteAtTime): (WebCore::CCPageScaleAnimation::progressRatioForTime): (WebCore::CCPageScaleAnimation::scrollOffsetAtRatio): (WebCore::CCPageScaleAnimation::pageScaleAtRatio): * platform/graphics/chromium/cc/CCPageScaleAnimation.h: Added. (WebCore::CCPageScaleAnimation::startTime): (WebCore::CCPageScaleAnimation::duration): (WebCore::CCPageScaleAnimation::endTime): (WebCore::CCPageScaleAnimation::finalScrollOffset): (WebCore::CCPageScaleAnimation::finalPageScale): 2011-12-07 Shinya Kawanaka Editor::markAndReplaceFor should take Range instead of TextCheckingParagraph. https://bugs.webkit.org/show_bug.cgi?id=74035 Reviewed by Hajime Morita. Editor::markAndReplaceFor takes chekcing range and paragraph range instead of spelling paragraph and grammar paragraph. No new tests. Covered by existing tests. * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): (WebCore::Editor::markAndReplaceFor): * editing/Editor.h: * editing/TextCheckingHelper.cpp: (WebCore::TextCheckingParagraph::TextCheckingParagraph): * editing/TextCheckingHelper.h: 2011-12-07 Ami Fischman Force LTR layout for media controls even in RTL documents. https://bugs.webkit.org/show_bug.cgi?id=74024 Reviewed by Darin Adler. Test: media/controls-layout-direction.html * css/mediaControls.css: (::-webkit-media-controls): 2011-12-07 Mark Pilgrim [FileSystem API] requestFileSystem successCallback is required https://bugs.webkit.org/show_bug.cgi?id=69637 Reviewed by Darin Adler. * page/DOMWindow.idl: remove [Optional] flag from successCallback parameter 2011-12-07 Leo Yang Upstream the BlackBerry porting of network Resource https://bugs.webkit.org/show_bug.cgi?id=73388 Reviewed by Rob Buis. Other main contributors: Joe Mason Yong Li Gary Simmons Genevieve Mak Chris Guan Mike Lattanzio Initial upstream, can't be built yet, no new tests. * platform/network/blackberry/ResourceError.h: Added. * platform/network/blackberry/ResourceErrorBlackBerry.cpp: Added. * platform/network/blackberry/ResourceHandleBlackBerry.cpp: Added. * platform/network/blackberry/ResourceRequest.h: Added. * platform/network/blackberry/ResourceRequestBlackBerry.cpp: Added. * platform/network/blackberry/ResourceResponse.h: Added. * platform/network/blackberry/ResourceResponseBlackBerry.cpp: Added. 2011-12-07 Fady Samuel [Chromium] Plumb DPI info into PlatformScreen https://bugs.webkit.org/show_bug.cgi?id=70556 Reviewed by Darin Fisher. Make DPI information accessible from WebKit through PlatformScreen. This is useful when making scaling computations on various devices (e.g. Viewport meta tag). This patch adds DPI plumbing on Chromium Win/Mac/Linux platforms. * page/Screen.cpp: (WebCore::Screen::horizontalDPI): (WebCore::Screen::verticalDPI): * page/Screen.h: * platform/PlatformScreen.h: * platform/chromium/PlatformScreenChromium.cpp: (WebCore::screenHorizontalDPI): (WebCore::screenVerticalDPI): * platform/chromium/PlatformSupport.h: * platform/efl/PlatformScreenEfl.cpp: (WebCore::screenHorizontalDPI): (WebCore::screenVerticalDPI): * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenHorizontalDPI): (WebCore::screenVerticalDPI): * platform/mac/PlatformScreenMac.mm: (WebCore::screenHorizontalDPI): (WebCore::screenVerticalDPI): * platform/qt/PlatformScreenQt.cpp: (WebCore::screenHorizontalDPI): (WebCore::screenVerticalDPI): * platform/win/PlatformScreenWin.cpp: (WebCore::screenHorizontalDPI): (WebCore::screenVerticalDPI): 2011-12-07 Aaron Colwell Revert mixed content handling for video fix and follow-up test expectations & Skipped changes. (r101883, r101918, r101927, r101981, r101986, r101997) https://bugs.webkit.org/show_bug.cgi?id=72178 Reviewed by Adam Barth. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): * loader/cache/CachedRawResource.cpp: * loader/cache/CachedRawResource.h: * loader/cache/CachedResource.cpp: (WebCore::defaultPriorityForResourceType): (WebCore::cachedResourceTypeToTargetType): * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::createResource): (WebCore::CachedResourceLoader::checkInsecureContent): (WebCore::CachedResourceLoader::canRequest): (WebCore::CachedResourceLoader::requestResource): 2011-12-07 Ryuan Choi [EFL] Introduce AssertMatchingEnums.cpp. https://bugs.webkit.org/show_bug.cgi?id=65238 Reviewed by Filip Pizlo. Remove switch statement which convert EWK_TOUCH_PointType enum values to WebCore::PlatformTouchPoint::State enum values. Newly added AssertMatchingEnums.cpp assure that they are equal. No new tests, no new functionality. * platform/efl/PlatformTouchEventEfl.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): 2011-12-07 Shawn Singh [chromium] Clearing root surface should happen after damage tracking https://bugs.webkit.org/show_bug.cgi?id=73958 Reviewed by James Robinson. No new semantics, covered by existing layout tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::clearSurfaceForDebug): (WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces): (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerRendererChromium.h: 2011-12-07 Florin Malita
    1. behaves like
    2. (the same for negative numbers) https://bugs.webkit.org/show_bug.cgi?id=73911 Reviewed by Alexey Proskuryakov. Allow LI values <= 0 and consolidate the value processing logic. * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::parseMappedAttribute): Delegated value parsing to parseValue(). (WebCore::HTMLLIElement::attach): Ditto. Explicit value null testing is no longer necessary, as parseValue's toInt() performs an equivalent check. (WebCore::HTMLLIElement::parseValue): Consolidated value parsing logic. * html/HTMLLIElement.h: 2011-12-07 Joshua Bell IndexedDB: Replace bool args in IDBKeyRange private methods with enum https://bugs.webkit.org/show_bug.cgi?id=70743 Reviewed by Tony Chang. No new tests - no functional changes. * storage/IDBKeyRange.cpp: (WebCore::IDBKeyRange::IDBKeyRange): (WebCore::IDBKeyRange::bound): * storage/IDBKeyRange.h: (WebCore::IDBKeyRange::create): (WebCore::IDBKeyRange::lowerOpen): (WebCore::IDBKeyRange::upperOpen): 2011-12-07 Sheriff Bot Unreviewed, rolling out r102267. http://trac.webkit.org/changeset/102267 https://bugs.webkit.org/show_bug.cgi?id=74032 Breaks build on Chromium Mac Debug (Requested by aklein on #webkit). * dom/ChildListMutationScope.cpp: (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::childAdded): (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::willRemoveChild): (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::incrementScopingLevel): (WebCore::MutationAccumulationRouter::MutationAccumulationRouter::decrementScopingLevel): 2011-12-07 Kentaro Hara REGRESSION (r95249): Right side can be truncated when printing https://bugs.webkit.org/show_bug.cgi?id=73868 Reviewed by Darin Adler. When we print a page with an overflowed width, the right side of the page can be truncated. This is due to a wrong rendering calculation. Since 'maximumShrinkFactor' is a ratio based on 'pageSize', 'maximumShrinkFactor' should multiply (not 'originalPageSize') but 'pageSize'. This bug happens if all the following conditions are met: - pageLogicalWidth < docLogicalWidth - originalPageSize.width * maximumShrinkFactor < docLogicalWidth - docLogicalWidth < pageLogicalWidth * maximumShrinkFactor Test: printing/width-overflow.html * page/FrameView.cpp: (WebCore::FrameView::forceLayoutForPagination): 2011-12-07 Yong Li Defer ScriptExecutionContext::Task's in Document when page loading is deferred. Schedule them with timer when page loading is resumed. The tasks will be performed in the original order. This fixes the problem that database callbacks could be missed when page loading was deferred. https://bugs.webkit.org/show_bug.cgi?id=49401 Reviewed by Darin Adler. Manual test added: ManualTests/database-callback-deferred.html. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::didReceiveTask): (WebCore::Document::postTask): (WebCore::Document::pendingTasksTimerFired): (WebCore::Document::suspendScheduledTasks): (WebCore::Document::resumeScheduledTasks): * dom/Document.h: * page/PageGroupLoadDeferrer.cpp: (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): 2011-12-07 Andreas Kling RenderObject::style(): Inline early-return condition. Reviewed by Anders Carlsson. style() was very hot (6.1%) when scrolling around on youtube.com, and 100% of the calls were taking the early return path. Inlined the !isRenderFlowThread() check and renamed the function to styleSlowCase(). * rendering/RenderObject.cpp: (WebCore::RenderObject::styleSlowCase): * rendering/RenderObject.h: (WebCore::RenderObject::style): 2011-12-07 Adam Klein Use HashMap> in ChildListMutationScope https://bugs.webkit.org/show_bug.cgi?id=73964 Reviewed by Ryosuke Niwa. No new tests, refactoring only. * dom/ChildListMutationScope.cpp: (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::childAdded): (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::willRemoveChild): (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::incrementScopingLevel): (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::decrementScopingLevel): 2011-12-07 Andreas Kling RenderLayer::updateZOrderLists(): Inline early-return condition. Reviewed by Anders Carlsson. updateZOrderLists() was hot (1.2%) when scrolling around on youtube.com, and 85% of the calls were taking the early return path. Inlined the two checks for the early return and renamed the function to updateZOrderListsSlowCase(). Also reversed their order to avoid the virtual call (RenderObject::isRenderView()) if possible. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateZOrderListsSlowCase): * rendering/RenderLayer.h: (WebCore::RenderLayer::updateZOrderLists): 2011-12-07 Sheriff Bot Unreviewed, rolling out r102244. http://trac.webkit.org/changeset/102244 https://bugs.webkit.org/show_bug.cgi?id=74016 caused debug test timeouts (Requested by simonjam on #webkit). * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::putImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): 2011-12-07 Adam Klein Layout Test inspector/debugger/dom-breakpoints.html fails on chromium linux debug with ENABLE(MUTATION_OBSERVERS) https://bugs.webkit.org/show_bug.cgi?id=73919 Reviewed by Ojan Vafai. Use StyleAttributeMutationScope to manage DOM breakpoints for style property changes. Instead of calling InspectorInstrumentation::didInvalidateStyleAttr() directly in setNeedsStyleRecalc, set a bool in the current StyleAttributeMutationScope, and delay the call until the scope's counter runs down to zero. This keeps the inspector JS from re-entering CSSMutableStyleDeclaration until all StyleAttributeMutationScope work is done. Also fix a small bug in StyleAttributeMutationScope, where s_shouldDeliver wasn't getting reset properly to false. * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc): 2011-12-07 Ken Buchanan Crash from multicol spans with layers https://bugs.webkit.org/show_bug.cgi?id=68030 Reviewed by David Hyatt. The layer tree diverges from the render tree when a span is being split between columns. This patch causes the layer tree to be updated when necessary. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::splitFlow) (WebCore::RenderBlock::splitBlocks) 2011-12-07 Alexey Proskuryakov Handling of !important in inline style sets is broken https://bugs.webkit.org/show_bug.cgi?id=73941 Reviewed by Dave Hyatt. This behavior was introduced in bug 8223 to match IE and Firefox. But it doesn't appear that we're matching any browser today, and CSSOM spec agrees with them. * WebCore.exp.in: Don't export CSSStyleDeclaration::setProperty(), no one is using it. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::putDelegate): Use regular setProperty(), not the incorrect version that's being removed. Properties set via IDL attributes are never important. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertySetter): Made the same fix for v8. Why did v8 bindings authors copy/paste the code?! * css/CSSStyleDeclaration.cpp: * css/CSSStyleDeclaration.h: Removed a version of setProperty() that attempted to parse the value and extract !important from it. * html/ImageDocument.cpp: (WebCore::ImageDocument::resizeImageToFit): (WebCore::ImageDocument::restoreImageSize): (WebCore::ImageDocument::windowSizeChanged): * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): We never needed to use this version of setProperty() here, it was just unnecessarily slower. 2011-12-07 Xianzhu Wang In FontCacheAndroid.cpp should keep the pointer valid returned from CString::data() https://bugs.webkit.org/show_bug.cgi?id=73849 The changed code has been covered by many existing layout tests. Reviewed by Adam Barth. * platform/graphics/chromium/FontCacheAndroid.cpp: (WebCore::FontCache::createFontPlatformData): 2011-12-07 Xiaomei Ji Turn on move caret by word visually for Windows platform. https://bugs.webkit.org/show_bug.cgi?id=59652 Reviewed by Ryosuke Niwa. We already support (arrow key) moving cursor by character in visual order. This patch implements (ctrl/alt-arrow) moving cursor by word in visual order (in Windows). It matches Firefox's default behavior. Without this patch, ctrl(alt for mac)-arrow key or selection.modify("move", "left"/"right", "word") moves cursor by word in logical order. IE implements moving cursor by logical order for both arrow key and ctrl-arrow key. Firefox implements moving cursor by visual order for both operations. From Chromium bug report, native speakers would like moving cursor by visual order since it is more intuitive. The patch is only enabled for Windows (by EditingBehavior) because current implementation matches Windows' native behavior. For exmaple, if the logical text is "abc def hij", the cursor positions are "|abc |def |hij|" no matter pressing ctrl-left-arrow or ctrl-right-arrow. Mac and Linux's native behavior is slightly different. In which, when pressing ctrl-left-arrow, the cursor positions are "|abc |def |hij|". When pressing ctrl-right-arrow, the cursor positions are "|abc| def| hij|". We will implement it next. Test: editing/selection/move-left-right-by-word-mac.html * editing/EditingBehavior.h: (WebCore::EditingBehavior::shouldMoveLeftRightByWordInVisualOrder): * editing/FrameSelection.cpp: Remove experimental enum WebKitVisualWordGranularity. (WebCore::FrameSelection::modifyExtendingRight): (WebCore::FrameSelection::modifyExtendingForward): (WebCore::FrameSelection::modifyMovingRight): (WebCore::FrameSelection::modifyMovingForward): (WebCore::FrameSelection::modifyExtendingLeft): (WebCore::FrameSelection::modifyExtendingBackward): (WebCore::FrameSelection::modifyMovingLeft): (WebCore::FrameSelection::modifyMovingBackward): * editing/TextGranularity.h: Remove experimental enum WebKitVisualWordGranularity. * editing/VisibleSelection.cpp: Remove experimental enum WebKitVisualWordGranularity. (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity): * page/DOMSelection.cpp: Remove experimental experimental flag -webkit-visual-word. (WebCore::DOMSelection::modify): 2011-12-07 Jonathan Backer [chromium] Plumb damage from WebExternalTextureLayer and WebPluginContainer to CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=73485 Reviewed by Darin Fisher. * platform/graphics/chromium/PluginLayerChromium.cpp: (WebCore::PluginLayerChromium::updateCompositorResources): (WebCore::PluginLayerChromium::invalidateRect): * platform/graphics/chromium/PluginLayerChromium.h: 2011-12-07 Mary Wu Upstream 5 files into WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=73632 Reviewed by Rob Buis. Initial upstream, no new tests. * PlatformBlackBerry.cmake: Remove two empty files from build list. * platform/blackberry/PopupMenuBlackBerry.cpp: Added. (WebCore::PopupMenuBlackBerry::PopupMenuBlackBerry): (WebCore::PopupMenuBlackBerry::~PopupMenuBlackBerry): (WebCore::PopupMenuBlackBerry::show): (WebCore::PopupMenuBlackBerry::hide): (WebCore::PopupMenuBlackBerry::updateFromElement): (WebCore::PopupMenuBlackBerry::disconnectClient): * platform/blackberry/PopupMenuBlackBerry.h: Added. (WebCore::PopupMenuBlackBerry::client): * platform/blackberry/ScrollbarThemeBlackBerry.cpp: Added. (WebCore::ScrollbarTheme::nativeTheme): * platform/blackberry/SearchPopupMenuBlackBerry.cpp: Added. (WebCore::SearchPopupMenuBlackBerry::SearchPopupMenuBlackBerry): (WebCore::SearchPopupMenuBlackBerry::popupMenu): (WebCore::SearchPopupMenuBlackBerry::enabled): (WebCore::SearchPopupMenuBlackBerry::saveRecentSearches): (WebCore::SearchPopupMenuBlackBerry::loadRecentSearches): * platform/blackberry/SearchPopupMenuBlackBerry.h: Added. 2011-12-07 Dan Bernstein Fixed the definition of BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING from r102246. * platform/mac/ThemeMac.mm: Added parentheses. 2011-12-07 Dan Bernstein Focus rings are not drawn around push buttons, radio buttons and checkboxes Reviewed by Darin Adler. Instead of relying on -setShowsFirstResponder: to make -drawWithFrame:inView: draw the focus ring, use -drawFocusRingMaskWithFrame:inView:. * platform/mac/ThemeMac.mm: (-[NSCell _web_drawFocusRingWithFrame:inView:]): Added. Sets up the focus ring style and a transparency layer, then uses -drawFocusRingMaskWithFrame:inView: to draw the focus ring. (WebCore::updateStates): Eliminated calls to get and set showsFirstResponder. (WebCore::paintCheckbox): Changed to use -_web_drawFocusRingWithFrame:inView:. (WebCore::paintRadio): Ditto. (WebCore::paintButton): Ditto. 2011-12-07 Brian Salomon [CHROMIUM/SKIA] Handle put[Un/Pre]multipliedImageData conversions in Skia rather than ImageBuffer https://bugs.webkit.org/show_bug.cgi?id=73953 Reviewed by Stephen White. Tested by existing canvas2d layout tests. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::putImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): 2011-12-07 Andreas Kling Micro-optimize ScrollView::visibleContentRect(). Reviewed by Anders Carlsson. Reorder the scrollbar exclusion code to minimize the number of virtual calls to ScrollableArea::verticalScrollbar(), ScrollableArea::horizontalScrollbar() and Scrollbar::isOverlayScrollbar(). * platform/ScrollView.cpp: (WebCore::ScrollView::visibleContentRect): 2011-12-07 Andreas Kling ApplyPropertyBorderImage: Remove unneeded template argument for mapNinePieceImage(). Reviewed by Antti Koivisto. Have ApplyPropertyBorderImage call mapNinePieceImage() directly now that it's public (instead of passing it as a template argument.) * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyBorderImage::applyValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): 2011-12-07 Jessie Berlin Mac build fix after r102235. * WebCore.exp.in: 2011-11-30 Simon Hausmann [Qt] V8 debug build fixes. Reviewed by Tor Arne Vestbø. * Target.pri: Add missing files to the build. * loader/SubresourceLoader.cpp: Add missing CString.h header file inclusion, that is implicitly included with Chromium builds and only needed in ASSERTS in debug builds. * loader/cache/CachedResource.cpp: Ditto. * page/FrameTree.cpp: Ditto. * platform/graphics/MediaPlayer.cpp: Ditto. 2011-11-30 Simon Hausmann [Qt] V8 build fixes. Reviewed by Tor Arne Vestbø. * Target.pri: Don't load(javascriptcore) if we're building with v8. 2011-12-07 Mary Wu Change function name InitializeLoggingChannelsIfNecessary to follow coding style guideline https://bugs.webkit.org/show_bug.cgi?id=73986 Reviewed by Kenneth Rohde Christiansen. Just function name change, no new tests. * platform/Logging.h: * platform/efl/LoggingEfl.cpp: (WebCore::initializeLoggingChannelsIfNecessary): * platform/gtk/LoggingGtk.cpp: (WebCore::initializeLoggingChannelsIfNecessary): * platform/mac/LoggingMac.mm: (WebCore::initializeLoggingChannelsIfNecessary): * platform/qt/LoggingQt.cpp: (WebCore::initializeLoggingChannelsIfNecessary): * platform/win/LoggingWin.cpp: (WebCore::initializeLoggingChannelsIfNecessary): * platform/wx/LoggingWx.cpp: (WebCore::initializeLoggingChannelsIfNecessary): 2011-12-07 Mihnea Ovidenie [CSSRegions]Add support for background-color in region styling https://bugs.webkit.org/show_bug.cgi?id=71488 Reviewed by David Hyatt. Tests: fast/regions/region-style-block-background-color.html fast/regions/region-style-block-background-color2.html fast/regions/region-style-image-background-color.html fast/regions/region-style-inline-background-color.html * WebCore.exp.in: * css/CSSStyleSelector.cpp: (WebCore::RuleData::regionStyleRule): (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::addMatchedDeclaration): (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::matchAllRules): (WebCore::CSSStyleSelector::initForRegionStyling): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::RuleData::RuleData): (WebCore::RuleSet::RuleSet): (WebCore::RuleSet::addToRuleSet): (WebCore::CSSStyleSelector::applyDeclarations): (WebCore::isValidRegionStyleProperty): (WebCore::CSSStyleSelector::applyProperty): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::setRegionForStyling): (WebCore::CSSStyleSelector::regionForStyling): (WebCore::CSSStyleSelector::applyPropertyToRegionStyle): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::clearRenderRegionRangeMap): (WebCore::RenderFlowThread::~RenderFlowThread): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::clearRenderObjectCustomStyle): (WebCore::RenderFlowThread::setRegionRangeForBox): * rendering/RenderFlowThread.h: * rendering/RenderLayer.cpp: (WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer): (WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer): (WebCore::RenderLayer::paint): (WebCore::RenderLayer::hitTest): * rendering/RenderObject.cpp: (WebCore::RenderObject::style): * rendering/RenderObject.h: (WebCore::RenderObject::canHaveRegionStyle): * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::layout): (WebCore::RenderRegion::renderObjectRegionStyle): (WebCore::RenderRegion::computeStyleInRegion): (WebCore::RenderRegion::clearObjectStyleInRegion): * rendering/RenderRegion.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: (WebCore::RenderView::currentRenderRegion): (WebCore::RenderView::setCurrentRenderRegion): 2011-12-01 Vsevolod Vlasov Web Inspector: Extract default call stack creation and check for front-end from console. https://bugs.webkit.org/show_bug.cgi?id=73566 Reviewed by Yury Semikhatsky. * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): * bindings/js/ScriptCallStackFactory.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateFunctionCallback): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::customArgsAndExceptionCallback): * bindings/v8/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): * bindings/v8/ScriptCallStackFactory.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::hasFrontendForScriptContext): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::hasFrontendForScriptContext): * inspector/WorkerInspectorController.h: (WebCore::WorkerInspectorController::hasFrontend): * page/Console.cpp: * page/Console.h: 2011-12-07 Shinya Kawanaka Internals should have a method to reutrn the max sequence number of spellcheck reqeust. https://bugs.webkit.org/show_bug.cgi?id=73511 Reviewed by Hajime Morita. Internal state of SpellChecker should be able to be exposed for testing SpellChecker. This patch will enable us to know asynchronous spellcheck has finished or not. Test: editing/spelling/spellcheck-sequencenum.html * editing/SpellChecker.cpp: (WebCore::SpellChecker::SpellChecker): (WebCore::SpellChecker::createRequest): (WebCore::SpellChecker::didCheck): * editing/SpellChecker.h: (WebCore::SpellChecker::lastRequestSequence): Interface to take SpellCheck sequence numbers. (WebCore::SpellChecker::lastProcessedSequence): ditto. * testing/Internals.cpp: (WebCore::spellchecker): (WebCore::Internals::lastSpellCheckRequestSequence): (WebCore::Internals::lastSpellCheckProcessedSequence): * testing/Internals.h: * testing/Internals.idl: 2011-12-07 Ryosuke Niwa TypingCommand duplicates code to obtain the last typing command https://bugs.webkit.org/show_bug.cgi?id=73984 Reviewed by Kent Tamura. Extracted lastTypingCommandIfStillOpenForTyping out of isOpenForMoreTypingCommand and a bunch of TypingCommand static member functions. Also made more member functions of TypingCommand private. * editing/Editor.cpp: (WebCore::Editor::setComposition): * editing/FrameSelection.cpp: (WebCore::FrameSelection::setSelection): * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteSelection): (WebCore::TypingCommand::deleteKeyPressed): (WebCore::TypingCommand::forwardDeleteKeyPressed): (WebCore::TypingCommand::insertText): (WebCore::TypingCommand::insertLineBreak): (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): (WebCore::TypingCommand::insertParagraphSeparator): (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping): (WebCore::TypingCommand::closeTyping): * editing/TypingCommand.h: (WebCore::TypingCommand::isOpenForMoreTyping): (WebCore::TypingCommand::closeTyping): 2011-12-06 Mary Wu upstream BlackBerry porting of KURL/Logging https://bugs.webkit.org/show_bug.cgi?id=73524 Reviewed by Antonio Gomes. * platform/blackberry/KURLBlackBerry.cpp: Added. (WebCore::KURL::fileSystemPath): * platform/blackberry/LoggingBlackBerry.cpp: Added. (WebCore::initializeWithUserDefault): (WebCore::InitializeLoggingChannelsIfNecessary): 2011-12-06 Leo Yang [BlackBerry] Remove redundant files in PlatformBlackBerry.cmake https://bugs.webkit.org/show_bug.cgi?id=73976 Reviewed by Antonio Gomes. The listing of the following files in PlatformBlackBerry.cmake are redundant. They should be removed. platform/network/blackberry/MultipartResponseDelegate.cpp platform/network/blackberry/NetworkManager.cpp platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp platform/network/blackberry/ResourceErrorBlackBerry.cpp platform/network/blackberry/ResourceRequestBlackBerry.cpp * PlatformBlackBerry.cmake: 2011-12-06 Shinya Kawanaka Refactoring: Editor::markAllMisspellingsAndBadGrammarInRanges should be refactored. https://bugs.webkit.org/show_bug.cgi?id=73628 Reviewed by Hajime Morita. Extracted a code for adding markers and replacing misspelled words from WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges. No new tests. covered by existing tests. * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Extracted a code for adding markers and replacing missplled words, and moved to markAndReplaceFor. (WebCore::Editor::markAndReplaceFor): * editing/Editor.h: 2011-12-06 Julien Chaffraix Avoid calling calculateRects in RenderLayer::paintLayer when the rectangles are not needed https://bugs.webkit.org/show_bug.cgi?id=73754 Reviewed by Simon Fraser. Performance change, no change in behavior. RenderLayer::paintLayer can easily be called a million time when scrolling on a big table with td { overflow: hidden; }. We would spend a lot of time recomputing the rectangles that we never unused for painting as our layer was not self-painting (clipping layer only) and we did not paint some overlay scrollbars. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): Simplified and moved the shouldPaint logic earlier in the function. Now the branches are checking the same boolean which makes the logic more obvious. A consequence of filling shouldPaint earlier is that we call |calculateRects| only if there is a chance the rectangles will used. Also cached the result of isSelfPaintingLayer() in a local variable (isSelfPaintingLayer() is fairly expensive due to several virtual calls). * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintIntoLayer): For coherency, applied the same optimizations here too: added an early return instead of conditionaly call |calculateRects| as we don't have to restore any clip. 2011-12-06 Benjamin Poulain Simplify KURL's checkEncodedString() https://bugs.webkit.org/show_bug.cgi?id=73890 Reviewed by Andreas Kling. The Macro UNUSED_PARAM is not supposed to be used for this case, use ASSERT_UNUSED instead. * platform/KURL.cpp: (WebCore::checkEncodedString): 2011-12-06 Ryosuke Niwa The code to create a NodeListsNodeData is duplicated everywhere https://bugs.webkit.org/show_bug.cgi?id=73961 Reviewed by Darin Adler. Extracted the logic to create NodeListsNodeData as NodeRareData::ensureNodeLists. * dom/Document.cpp: (WebCore::Document::getItems): * dom/Node.cpp: (WebCore::Node::childNodes): (WebCore::Node::registerDynamicNodeList): (WebCore::Node::getElementsByTagName): (WebCore::Node::getElementsByTagNameNS): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): * dom/NodeRareData.h: (WebCore::NodeRareData::ensureNodeLists): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::labels): 2011-12-06 Leo Yang Upstream about: feature in WebKit/blackberry/WebCoreSupport/ https://bugs.webkit.org/show_bug.cgi?id=73612 Reviewed by Antonio Gomes. * PlatformBlackBerry.cmake: Move platform/network/blackberry/AboutData.{h, cpp} to WebKit/blackberry/WebCoreSupport 2011-12-06 Benjamin Poulain WebKit Mac does not build without CONTEXT MENU https://bugs.webkit.org/show_bug.cgi?id=73962 Reviewed by Pavel Feldman. In the patch r100903, the symbols were exported under ENABLE(CONTEXT_MENUS) because the feature is triggered from the menus. The implementation has no dependency on the context menu but is necessary to build when the inspector is enabled. This patch moves the exported symbols from ENABLE(CONTEXT_MENUS) to ENABLE(INSPECTOR). * WebCore.exp.in: 2011-12-06 Adrienne Walker [chromium] setNeedsCommit on non-composited host layers should trigger commit https://bugs.webkit.org/show_bug.cgi?id=73711 Reviewed by James Robinson. Pipe non-composited content host syncs to setNeedsCommit. Since now the NonCompositedContentHost generates setNeedsCommit, don't call it unnecessarily, e.g. calling setBackgroundColor to the same color each frame should not retrigger more commits. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setAnchorPoint): (WebCore::GraphicsLayerChromium::setTransform): (WebCore::GraphicsLayerChromium::setChildrenTransform): (WebCore::GraphicsLayerChromium::setMasksToBounds): (WebCore::GraphicsLayerChromium::setBackgroundColor): (WebCore::GraphicsLayerChromium::clearBackgroundColor): (WebCore::GraphicsLayerChromium::setContentsOpaque): (WebCore::GraphicsLayerChromium::setBackfaceVisibility): (WebCore::GraphicsLayerChromium::setOpacity): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setNeedsCommit): (WebCore::LayerChromium::setAnchorPoint): (WebCore::LayerChromium::setAnchorPointZ): (WebCore::LayerChromium::setBackgroundColor): (WebCore::LayerChromium::setMasksToBounds): (WebCore::LayerChromium::setMaskLayer): (WebCore::LayerChromium::setOpacity): (WebCore::LayerChromium::setOpaque): (WebCore::LayerChromium::setPosition): (WebCore::LayerChromium::setSublayerTransform): (WebCore::LayerChromium::setTransform): (WebCore::LayerChromium::setScrollPosition): (WebCore::LayerChromium::setScrollable): (WebCore::LayerChromium::setDoubleSided): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setReplicaLayer): * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::notifySyncRequired): * platform/graphics/chromium/NonCompositedContentHost.h: 2011-12-06 Kenichi Ishibashi [Chromium] unknown characters symbol on \n in complex script text (RTL and LTR) https://bugs.webkit.org/show_bug.cgi?id=73806 Reviewed by Tony Chang. Sets fMergeNeutralItems to 1 instead of merging script items based on their tags. Tests: platform/chromium/fast/text/international/chromium-complex-text-non-printable-expected.html platform/chromium/fast/text/international/chromium-complex-text-non-printable.html * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::fillRuns): Removed a block which merges script items. 2011-12-06 Luke Macpherson Implement remaining border-image and webkit-maskbox-image properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=73391 Reviewed by Hajime Morita. No new tests / refacoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyBorderImageModifier::getValue): (WebCore::ApplyPropertyBorderImageModifier::setValue): (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): (WebCore::ApplyPropertyBorderImageModifier::applyValue): (WebCore::ApplyPropertyBorderImageModifier::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSStyleSelector.h: 2011-12-06 Pavel Feldman Web Inspector: introduce a memory agent stub. https://bugs.webkit.org/show_bug.cgi?id=73930 Reviewed by Timothy Hatcher. We'd like to experiment with the memory stats and hence need a nice home for that. Adding this undocumented agent / domain for now. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/ScriptProfiler.h: (WebCore::ScriptProfiler::nodeCount): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::nodeCount): * bindings/v8/ScriptProfiler.h: * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorMemoryAgent.cpp: Added. (WebCore::InspectorMemoryAgent::~InspectorMemoryAgent): (WebCore::InspectorMemoryAgent::getNodeCounter): (WebCore::InspectorMemoryAgent::InspectorMemoryAgent): * inspector/InspectorMemoryAgent.h: Added. (WebCore::InspectorMemoryAgent::create): 2011-12-06 Julien Chaffraix Unreviewed build fix after 102183. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::initialGridTrackValue): Use DEFINE_STATIC_LOCAL to avoid having an exit-time destructor. 2011-12-06 Julien Chaffraix Inline RenderObject::view() https://bugs.webkit.org/show_bug.cgi?id=73733 Reviewed by Darin Adler. Micro-performance optimization, no change in behavior. RenderObject::view() is super hot and is taking ~4-5% of the time in some benchmarks as it is called several hundred thousands times. For some reason, the compiler did not inline it even though it is very simple in release builds. * WebCore.exp.in: Removed RenderObject::view() as it is inlined now. * rendering/RenderObject.cpp: Moved the implementation from here ... * rendering/RenderView.h: (WebCore::RenderObject::view): ... to here to avoid a cyclic dependency between RenderObject and RenderView. Also marked the function as ALWAYS_INLINE. * rendering/RenderObject.h: * rendering/svg/RenderSVGResourceContainer.cpp: Added #include "RenderView.h" as the code checks for view() during repaint. 2011-12-06 Julien Chaffraix CSS Grid Layout: Add support for parsing multiple grid-columns or grid-rows https://bugs.webkit.org/show_bug.cgi?id=73272 Reviewed by Tony Chang. Test: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html Updated our supported syntax to match the following: := [ ]+ | 'none' := | | 'auto' (the naming loosely matches the specification) * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForGridTrackBreadth): Added function to handle a breadth (extended with 'auto' that the spec puts in ). (WebCore::valueForGridTrackList): Create a space seperated list of track breadth or none. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated to use the new functions. * css/CSSParser.cpp: (WebCore::CSSParser::parseGridTrackList): Extended the function to match the new syntax. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Removed our simple implementation. Replaced by the CSSStyleSelector functions. * css/CSSStyleSelector.cpp: (WebCore::createGridTrackBreadth): (WebCore::createGridTrackList): Added those 2 functions to convert the CSSPrimitiveValue to a Vector as expected by RenderStyle. (WebCore::CSSStyleSelector::applyProperty): Added our 2 properties now that it is not handled by CSSStyleApplyProperty. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::gridColumns): (WebCore::InheritedFlags::gridRows): (WebCore::InheritedFlags::setGridColumns): (WebCore::InheritedFlags::setGridRows): (WebCore::InheritedFlags::initialGridColumns): (WebCore::InheritedFlags::initialGridRows): Updated the previous methods to take a Vector of Length. (WebCore::InheritedFlags::initialGridTrackValue): Needed function to return a Vector with one 'none' Length (the initial value per the specification). * rendering/style/StyleGridData.h: Updated to use a Vector. 2011-12-06 David Reveman [Chromium] Implement tile-sized painting using SkPicture. https://bugs.webkit.org/show_bug.cgi?id=71869 Reviewed by James Robinson. Add texture uploader that paints tile-sized chunks using SkPicture recording and playback. Expose setting which allows this texture updater to be enabled. No new tests. Covered by existing tests. * WebCore.gypi: * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: Added. (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::create): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::BitmapSkPictureCanvasLayerTextureUpdater): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::~BitmapSkPictureCanvasLayerTextureUpdater): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::createTexture): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::sampledTexelFormat): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: Added. (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::textureUpdater): (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::orientation): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): 2011-12-06 Adrienne Walker [chromium] Don't crash if tile upload happens without painting first https://bugs.webkit.org/show_bug.cgi?id=73939 Reviewed by James Robinson. Remove at least one place (in ImageLayerChromium) where this could happen. Although this shouldn't happen, we should be robust to it in the chance that other code causes it to. * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): 2011-12-06 Ruben Enable web audio by default on non-Mac POSIX platforms https://bugs.webkit.org/show_bug.cgi?id=73491 Reviewed by Tony Chang. No new tests, just changing gyp includes. * WebCore.gyp/WebCore.gyp: 2011-12-06 Benjamin Poulain Put length in its own variable in KURL copyASCII https://bugs.webkit.org/show_bug.cgi?id=73928 Reviewed by Darin Adler. * platform/KURL.cpp: (WebCore::copyASCII): 2011-12-06 Dana Jansens [chromium] Set opaque flag for ImageLayerChromium https://bugs.webkit.org/show_bug.cgi?id=72964 Reviewed by James Robinson. Unit test in tests/ImageLayerChromiumTest.cpp. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setContentsToImage): * platform/graphics/chromium/GraphicsLayerChromium.h: (WebCore::GraphicsLayerChromium::contentsLayer): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::setContents): 2011-12-06 Alexandre Elias [chromium] Apply sent deltas on finishCommit https://bugs.webkit.org/show_bug.cgi?id=73884 Reviewed by James Robinson. This moves scroll and pageScale "sent" deltas to be applied to the layer at the end of the commit, instead of the beginning. This has several advantages, especially for page scale: - When pageScale changes, no longer any need to change the scroll's coordinate space at beginning of commit, which is complex and prone to bugs (this fixes a problem where we were forgetting to modify the scrollPosition before). - No need for non-commit-related code to consider the "sent" values. m_pageScale is now always the content scale factor, and m_pageScaleDelta is the scale to be on the impl-side matrix. - This will make it easy to send arbitrary fake or future delta values for example while pinch zooming out. The scroll logic is similarly altered for consistency's sake. Note that I also moved the tree synchronize to the beginning of finishCommit in order to avoid having to change the pageScale coordinate space of sentScrollDelta in adjustScrollsForPageScaleChange(). No new tests. (Refactoring of existing code.) * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::finishCommitOnImplThread): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits): (WebCore::CCLayerTreeHostImpl::applyPageScaleDeltaToScrollLayer): (WebCore::CCLayerTreeHostImpl::processScrollDeltas): 2011-12-06 Gavin Barraclough https://bugs.webkit.org/show_bug.cgi?id=68328 The generator and intrinsic fields in HashTableValue/HashEntry and associated structures and methods are redundant Reviewed by Geoff Garen. Intrinsic is no longer in the DFG namespace, is always in the hash table. Removed ThunkGenerator. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHashTable): 2011-12-06 Dimitri Glazkov Unreviewed, rolling out r102091. http://trac.webkit.org/changeset/102091 https://bugs.webkit.org/show_bug.cgi?id=73711 Caused Clang Linux compile failure. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setAnchorPoint): (WebCore::GraphicsLayerChromium::setTransform): (WebCore::GraphicsLayerChromium::setChildrenTransform): (WebCore::GraphicsLayerChromium::setMasksToBounds): (WebCore::GraphicsLayerChromium::setBackgroundColor): (WebCore::GraphicsLayerChromium::clearBackgroundColor): (WebCore::GraphicsLayerChromium::setContentsOpaque): (WebCore::GraphicsLayerChromium::setBackfaceVisibility): (WebCore::GraphicsLayerChromium::setOpacity): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setNeedsCommit): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setAnchorPoint): (WebCore::LayerChromium::setAnchorPointZ): (WebCore::LayerChromium::setBackgroundColor): (WebCore::LayerChromium::setMasksToBounds): (WebCore::LayerChromium::setMaskLayer): (WebCore::LayerChromium::setOpacity): (WebCore::LayerChromium::setOpaque): (WebCore::LayerChromium::setPosition): (WebCore::LayerChromium::setSublayerTransform): (WebCore::LayerChromium::setTransform): (WebCore::LayerChromium::setScrollPosition): (WebCore::LayerChromium::setScrollable): (WebCore::LayerChromium::setDoubleSided): (WebCore::LayerChromium::setReplicaLayer): * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::notifySyncRequired): * platform/graphics/chromium/NonCompositedContentHost.h: 2011-12-06 Dana Jansens [Chromium] Make root layer always opaque https://bugs.webkit.org/show_bug.cgi?id=70564 Reviewed by James Robinson. * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::NonCompositedContentHost): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): 2011-12-06 Noel Gordon WebPImageDecoder computes image width and height multiple times https://bugs.webkit.org/show_bug.cgi?id=73796 Reviewed by Adam Barth. Once sufficient image data arrives, we can compute the decoded image height and width from the WEBP image header data. From then on, the decoded image size is known so there's no need to re-read it from the WEBP image header again. No change in behavior, so no new tests. * platform/image-decoders/webp/WEBPImageDecoder.cpp: (WebCore::WEBPImageDecoder::decode): 2011-12-06 Mike Reed optimize TransformationMatrix::scale by not calling through to generic multiply https://bugs.webkit.org/show_bug.cgi?id=73830 Reviewed by Kenneth Russell. No new tests. Optimization only, existing tests exercise the code * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::scaleNonUniform): (WebCore::TransformationMatrix::scale3d): 2011-12-06 Eric Carlson Revert WebCore track Settings changes made in r101977 https://bugs.webkit.org/show_bug.cgi?id=73879 Reviewed by Sam Weinig. No new tests yet, still nothing to test. * page/Settings.cpp: Move the preference setters back into the .h file. * page/Settings.h: (WebCore::Settings::setShouldDisplaySubtitles): (WebCore::Settings::setShouldDisplayCaptions): (WebCore::Settings::setShouldDisplayTextDescriptions): 2011-12-06 Andreas Kling MediaList: Remove constructor that takes a CSSImportRule*. Reviewed by Antti Koivisto. * css/MediaList.h: * css/MediaList.cpp: Remove MediaList(CSSImportRule*, ...) constructor. * css/CSSImportRule.cpp: (WebCore::CSSImportRule::CSSImportRule): Have CSSImportRule construct its MediaList by passing the parent style sheet, which is exactly what the old constructor accomplished. Also assert that we're always created with a non-null parent sheet. 2011-12-06 Jarred Nicholls getComputedStyle returns wrong value for margin-* https://bugs.webkit.org/show_bug.cgi?id=73334 margin-* getComputedStyle values should return the "used" absolute value when there is a renderer and the specified value is relative (percentage, auto, etc.). When there is no renderer, the specified value should be returned. See http://dev.w3.org/csswg/cssom/#resolved-values. Reviewed by Darin Adler. Test: fast/css/getComputedStyle/getComputedStyle-resolved-values.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-06 Alexey Proskuryakov REGRESSION (WebKit2): Kill ring is not cleared when selection changes https://bugs.webkit.org/show_bug.cgi?id=73888 Reviewed by Mark Rowe. Test: editing/pasteboard/emacs-ctrl-k-with-move.html * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): Moved the code to clear kill ring from Mac WebKit, as it's needed in all Mac ports at least. 2011-12-06 Darin Adler Use HashMap in CollectionCache https://bugs.webkit.org/show_bug.cgi?id=73784 Reviewed by Andreas Kling. * html/CollectionCache.cpp: (WebCore::CollectionCache::copyCacheMap): Use adoptPtr. (WebCore::CollectionCache::reset): Removed now-unneeded calls to deleteAllValues. (WebCore::append): Added. Helper function for appending elements to the maps from the collection cache. * html/CollectionCache.h: Changed mapped type in NodeCacheMap to OwnPtr. Added append function. * html/HTMLCollection.cpp: (WebCore::nameShouldBeVisibleInDocumentAll): Added, to factor out common code in two functions below. (WebCore::HTMLCollection::checkForNameMatch): Changed to call nameShouldBeVisibleInDocumentAll. (WebCore::HTMLCollection::updateNameCache): Ditto. Also updated cache code to use the append function, so it will work with OwnPtr. Also eliminated an unneeded get call before each hash table add; we do both at once in the new append function. * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::updateNameCache): More of the same. 2011-12-06 Yury Semikhatsky [Chromium] Web Inspector: getFunctionLocation should return scriptId as String not as int https://bugs.webkit.org/show_bug.cgi?id=73892 Reviewed by Pavel Feldman. * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::functionLocationCallback): scriptId should be a string not a number * inspector/Inspector.json: removed unused parameter 2011-11-21 Balazs Kelemen Enable ParallelJobs by default https://bugs.webkit.org/show_bug.cgi?id=70032 Reviewed by Zoltan Herczeg. Covered by existing tests. According to measurements on Mac and Linux it is a considerable speedup for SVG on multicore. Remove the ENABLE(PARALLEL_JOBS) guard. Fix the Windows build by qualifying ParallelJobs with the WTF namespace (otherwise MSVC believes it belongs to WebCore which is likely a compiler bug). * platform/graphics/filters/FEConvolveMatrix.cpp: (WebCore::FEConvolveMatrix::setInteriorPixelsWorker): (WebCore::FEConvolveMatrix::platformApplySoftware): * platform/graphics/filters/FEConvolveMatrix.h: * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::platformApplyWorker): (WebCore::FEGaussianBlur::platformApply): * platform/graphics/filters/FEGaussianBlur.h: * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::platformApplyGenericWorker): (WebCore::FELighting::platformApplyGeneric): * platform/graphics/filters/FELighting.h: * platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::platformApplyWorker): (WebCore::FEMorphology::platformApply): * platform/graphics/filters/FEMorphology.h: * platform/graphics/filters/FETurbulence.cpp: (WebCore::FETurbulence::fillRegionWorker): (WebCore::FETurbulence::platformApplySoftware): * platform/graphics/filters/FETurbulence.h: * platform/graphics/filters/arm/FELightingNEON.cpp: (WebCore::FELighting::platformApplyNeonWorker): * platform/graphics/filters/arm/FELightingNEON.h: (WebCore::FELighting::platformApplyNeon): 2011-12-06 Andreas Kling Unreviewed assertion fix for r102123. * platform/KURL.cpp: (WebCore::checkEncodedString): 2011-12-06 Benjamin Poulain Simplify KURL's checkEncodedString() https://bugs.webkit.org/show_bug.cgi?id=73890 Reviewed by Andreas Kling. The method was reimplementing String::containsOnlyASCII(). Use the method from String and we can remove the #if NDEBUG. * platform/KURL.cpp: (WebCore::checkEncodedString): 2011-12-06 Sheriff Bot Unreviewed, rolling out r102111. http://trac.webkit.org/changeset/102111 https://bugs.webkit.org/show_bug.cgi?id=73902 Breaks compilation (Requested by vsevik on #webkit). * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): * editing/Editor.h: 2011-12-06 Hajime Morrita [Refactoring] Accessing Node::m_document should be minimized. https://bugs.webkit.org/show_bug.cgi?id=73800 Reviewed by Kent Tamura. No new tests. No behavioral change. Replaced m_document reference with the document() accessor or temporaril variables. This is a preparation for using m_document space to point a shadow root pointer. * dom/Document.h: (WebCore::Node::Node): * dom/Node.cpp: (WebCore::Node::~Node): 2011-12-06 Shinya Kawanaka https://bugs.webkit.org/show_bug.cgi?id=73889 TextCheckingParagraph::offsetTo should not have a side effect. Reviewed by Hajime Morita. Since TextCheckingParagraph::offsetTo had a side effect, its cache often became inconsistent. This is likely to cause a bug when changing SpellChecker and Editor. No new tests. Covered by existing tests. * editing/TextCheckingHelper.cpp: (WebCore::TextCheckingParagraph::offsetTo): 2011-12-06 Eric Penner [chromium] Set texture limits as multiples of viewport size instead of hardcoded values https://bugs.webkit.org/show_bug.cgi?id=72202 Reviewed by James Robinson. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): added viewport param (WebCore::LayerRendererChromium::initializeSharedObjects): ditto * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): calculated based on viewport (WebCore::TextureManager::reclaimLimitBytes): ditto (WebCore::TextureManager::lowLimitBytes): ditto (WebCore::TextureManager::TextureManager): added viewport param (WebCore::TextureManager::setMaxMemoryLimitBytes): changed name (WebCore::TextureManager::setPreferredMemoryLimitBytes): added function (WebCore::TextureManager::requestTexture): added viewport param * platform/graphics/chromium/TextureManager.h: ditto (WebCore::TextureManager::create): ditto * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: ditto (WebCore::CCLayerTreeHost::initialize): ditto (WebCore::CCLayerTreeHost::beginCommitOnImplThread): ditto (WebCore::CCLayerTreeHost::setViewport): ditto (WebCore::CCLayerTreeHost::setVisible): ditto (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): ditto 2011-12-06 Huang Dongsung [TexMap][QT] Draw the borders of media and webgl elements in TexMap. https://bugs.webkit.org/show_bug.cgi?id=73817 GraphicsContext3D only draws the content of the WebGL canvas, not the additional CSS such as the borders. TextureMapper should render the content of a media/webgl layer before drawing the actual canvas. This makes LayoutTests/compositing/webgl/webgl-reflection.html work. Reviewed by Noam Rosenthal. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::TextureMapperNode::renderContent): (WebCore::TextureMapperNode::paintSelf): 2011-12-06 Sheriff Bot Unreviewed, rolling out r102043. http://trac.webkit.org/changeset/102043 https://bugs.webkit.org/show_bug.cgi?id=73898 Breaks chromium mac-cg compilation. (Requested by vsevik on #webkit). * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setContentsToImage): * platform/graphics/chromium/GraphicsLayerChromium.h: (WebCore::GraphicsLayerChromium::contentsLayer): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::setContents): 2011-12-06 Shinya Kawanaka Refactoring: Editor::markAllMisspellingsAndBadGrammarInRanges should be refactored. https://bugs.webkit.org/show_bug.cgi?id=73628 Reviewed by Hajime Morita. Extracted a code for adding markers and replacing misspelled words from WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges. No new tests. covered by existing tests. * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Extracted a code for adding markers and replacing missplled words, and moved to markAndReplaceFor. (WebCore::Editor::markAndReplaceFor): * editing/Editor.h: 2011-12-05 Alexander Pavlov Web Inspector: [Audits] Implement "Stop" button and progress bar instead of spinner. https://bugs.webkit.org/show_bug.cgi?id=73626 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/AuditLauncherView.js: (WebInspector.AuditLauncherView): (WebInspector.AuditLauncherView.prototype._setAuditRunning): (WebInspector.AuditLauncherView.prototype._launchButtonClicked): (WebInspector.AuditLauncherView.prototype._createLauncherUI): (WebInspector.AuditLauncherView.prototype._updateResourceProgress): (WebInspector.AuditLauncherView.prototype._updateButton): * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.GzipRule.prototype.doRun): (WebInspector.AuditRules.CombineExternalResourcesRule.prototype.doRun): (WebInspector.AuditRules.MinimizeDnsLookupsRule.prototype.doRun): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.documentLoaded): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback): (WebInspector.AuditRules.UnusedCssRule.prototype.doRun): (WebInspector.AuditRules.CacheControlRule.prototype.doRun): (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun): (WebInspector.AuditRules.CssInHeadRule.prototype.doRun): (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.externalStylesheetsReceived): (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.inlineStylesReceived): (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.onDocumentAvailable): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.cssBeforeInlineReceived): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.lateStylesReceived): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.onDocumentAvailable): (WebInspector.AuditRules.CookieRuleBase.prototype.doRun.resultCallback): (WebInspector.AuditRules.CookieRuleBase.prototype.doRun): * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): (WebInspector.AuditsPanel.prototype._executeAudit.ruleResultReadyCallback): (WebInspector.AuditsPanel.prototype._executeAudit): (WebInspector.AuditsPanel.prototype._auditFinishedCallback): (WebInspector.AuditsPanel.prototype.terminateAudit): (WebInspector.AuditCategory.prototype.run): (WebInspector.AuditRule.prototype.run): (WebInspector.AuditRule.prototype.doRun): (WebInspector.AuditProgressMonitor): (WebInspector.AuditProgressMonitor.prototype.setTotalWork): (WebInspector.AuditProgressMonitor.prototype.worked): (WebInspector.AuditProgressMonitor.prototype.get indeterminate): (WebInspector.AuditProgressMonitor.prototype.done): (WebInspector.AuditProgressMonitor.prototype.get canceled): (WebInspector.AuditProgressMonitor.prototype.set canceled): 2011-12-06 Viatcheslav Ostapenko [Qt] [WK2] MiniBrowser assert on startup in debug build after r101713 https://bugs.webkit.org/show_bug.cgi?id=73874 This change partially reverts r101713 restoring original behaviour for KUrl creation from empty string and fixes asserts in debug build. Reviewed by Alexey Proskuryakov. No new tests. Tests from r101713 pass. * platform/KURL.cpp: (WebCore::KURL::init): (WebCore::KURL::parse): * platform/KURL.h: 2011-12-06 Andreas Kling Use HashMap for EventListenerMap's internal map. Reviewed by Benjamin Poulain. Changed the value type of EventListenerMap::m_hashMap to OwnPtr. This means we no longer need to manually delete the vectors when taking them out of the map, which makes the code a little prettier. A few tweaks were necessary; release() instead of leakPtr() when switching modes and adoptPtr()/get() sprinkled as needed. * dom/EventListenerMap.h: * dom/EventListenerMap.cpp: (WebCore::EventListenerMap::clear): (WebCore::EventListenerMap::add): (WebCore::EventListenerMap::remove): (WebCore::EventListenerMap::find): (WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup): (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget): 2011-12-05 Rafael Weinstein [MutationObservers] Support 'attributes' mutation records for element.removeAttribute https://bugs.webkit.org/show_bug.cgi?id=73880 Reviewed by Ojan Vafai. * dom/Element.cpp: (WebCore::enqueueAttributesMutationRecord): (WebCore::Element::removeAttribute): 2011-12-05 Dana Jansens Set opaque flag for WebGLLayerChromium https://bugs.webkit.org/show_bug.cgi?id=73876 Reviewed by James Robinson. New unit test in tests/WebGLLayerChromiumTest.cpp * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::platformLayer): 2011-12-05 Benjamin Poulain Upstream the Cursor implementation of iOS https://bugs.webkit.org/show_bug.cgi?id=73724 Reviewed by David Kilzer. iOS does not need to support the Cursor of WebKit. For compatibility, Cursor is implemented as an empty class on the platform. * Configurations/WebCore.xcconfig: * WebCore.xcodeproj/project.pbxproj: * platform/Cursor.h: (WebCore::Cursor::Cursor): * platform/ios/CursorIOS.cpp: Added. (WebCore::cursor): (WebCore::pointerCursor): (WebCore::crossCursor): (WebCore::handCursor): (WebCore::moveCursor): (WebCore::iBeamCursor): (WebCore::waitCursor): (WebCore::helpCursor): (WebCore::eastResizeCursor): (WebCore::northResizeCursor): (WebCore::northEastResizeCursor): (WebCore::northWestResizeCursor): (WebCore::southResizeCursor): (WebCore::southEastResizeCursor): (WebCore::southWestResizeCursor): (WebCore::westResizeCursor): (WebCore::northSouthResizeCursor): (WebCore::eastWestResizeCursor): (WebCore::northEastSouthWestResizeCursor): (WebCore::northWestSouthEastResizeCursor): (WebCore::columnResizeCursor): (WebCore::rowResizeCursor): (WebCore::middlePanningCursor): (WebCore::eastPanningCursor): (WebCore::northPanningCursor): (WebCore::northEastPanningCursor): (WebCore::northWestPanningCursor): (WebCore::southPanningCursor): (WebCore::southEastPanningCursor): (WebCore::southWestPanningCursor): (WebCore::westPanningCursor): (WebCore::verticalTextCursor): (WebCore::cellCursor): (WebCore::contextMenuCursor): (WebCore::noDropCursor): (WebCore::notAllowedCursor): (WebCore::progressCursor): (WebCore::aliasCursor): (WebCore::zoomInCursor): (WebCore::zoomOutCursor): (WebCore::copyCursor): (WebCore::noneCursor): (WebCore::grabCursor): (WebCore::grabbingCursor): (WebCore::determineHotSpot): 2011-12-05 Noel Gordon [GTK] GIF image test crashes on 32- and 64-bit Release https://bugs.webkit.org/show_bug.cgi?id=73812 Reviewed by Adam Barth. Call resize() on the image pixel backing store after allocation to see if that stops the GIF image decoder animation tests crashes on GTK. No new tests, covered by exiting tests ... fast/backgrounds/animated-gif-as-background.html fast/images/dont-crash-with-null-gif-frames.html fast/images/gif-loop-count.html * platform/image-decoders/ImageDecoder.cpp: (WebCore::ImageFrame::setSize): 2011-12-05 Erik Arvidsson Could save a lot of memory in CharacterData by not always storing a String https://bugs.webkit.org/show_bug.cgi?id=72404 Reviewed by Ojan Vafai. When a Text node is created by the parser we check if the string is all whitespace and if so we put it in the AtomicString table so that all future identical whitespace strings can share the StringImpl. No new tests. Covered by existing tests. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLNames::isAllWhitespace): (WebCore::HTMLConstructionSite::insertTextNode): If we do not know whether the string is all whitespace this now checks the string If the string is all whitespace we create an AtomicString for it. * html/parser/HTMLConstructionSite.h: * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingNonWhitespace): We never cared about the return value here. (WebCore::HTMLTreeBuilder::processCharacterBuffer): Pass WhitespaceMode in the case we know whether the string is all whitespace or not. (WebCore::HTMLTreeBuilder::defaultForInTableText): Ditto. 2011-12-05 Benjamin Poulain Update KURL's copy copyASCII to avoid String::characters() https://bugs.webkit.org/show_bug.cgi?id=73794 Reviewed by Andreas Kling. When the String is already on 8 bits, we can simply copy the data. In the 16 bits case, everything remains the same. * platform/KURL.cpp: (WebCore::copyASCII): (WebCore::appendASCII): (WebCore::KURL::init): (WebCore::KURL::parse): (WebCore::KURL::copyToBuffer): 2011-12-05 Yong Li https://bugs.webkit.org/show_bug.cgi?id=73683 Implement KeyframeValueList::operator=() and KeyframeValueList::swap(). Reviewed by Darin Adler. No new tests as no functional change. * platform/graphics/GraphicsLayer.h: (WebCore::KeyframeValueList::operator=): Added (WebCore::KeyframeValueList::swap): Added 2011-12-05 Adrienne Walker [chromium] setNeedsCommit on non-composited host layers should trigger commit https://bugs.webkit.org/show_bug.cgi?id=73711 Reviewed by James Robinson. Pipe non-composited content host syncs to setNeedsCommit. Since now the NonCompositedContentHost generates setNeedsCommit, don't call it unnecessarily, e.g. calling setBackgroundColor to the same color each frame should not retrigger more commits. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setAnchorPoint): (WebCore::GraphicsLayerChromium::setTransform): (WebCore::GraphicsLayerChromium::setChildrenTransform): (WebCore::GraphicsLayerChromium::setMasksToBounds): (WebCore::GraphicsLayerChromium::setBackgroundColor): (WebCore::GraphicsLayerChromium::clearBackgroundColor): (WebCore::GraphicsLayerChromium::setContentsOpaque): (WebCore::GraphicsLayerChromium::setBackfaceVisibility): (WebCore::GraphicsLayerChromium::setOpacity): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setNeedsCommit): (WebCore::LayerChromium::setAnchorPoint): (WebCore::LayerChromium::setAnchorPointZ): (WebCore::LayerChromium::setBackgroundColor): (WebCore::LayerChromium::setMasksToBounds): (WebCore::LayerChromium::setMaskLayer): (WebCore::LayerChromium::setOpacity): (WebCore::LayerChromium::setOpaque): (WebCore::LayerChromium::setPosition): (WebCore::LayerChromium::setSublayerTransform): (WebCore::LayerChromium::setTransform): (WebCore::LayerChromium::setScrollPosition): (WebCore::LayerChromium::setScrollable): (WebCore::LayerChromium::setDoubleSided): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setReplicaLayer): * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::notifySyncRequired): * platform/graphics/chromium/NonCompositedContentHost.h: 2011-12-05 Tony Chang small refactor of RenderFlexibleBox https://bugs.webkit.org/show_bug.cgi?id=73854 Reviewed by Darin Adler. No new tests, just a refactor. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::isLeftToRightFlow): Inline isReverseFlow since it's only used in one place. (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Rename startEdge to mainAxisOffset. Rename logicalTop to crossAxisOffset. Get rid of logicalLeft local variable since it's confusing. Move shouldFlipMainAxis out of the for loop to avoid computing it each iteration. * rendering/RenderFlexibleBox.h: 2011-12-05 Florin Malita Heap-buffer-overflow in WebCore::HTMLTreeBuilder::processEndTag https://bugs.webkit.org/show_bug.cgi?id=73765 Reviewed by Adam Barth. Test: fast/parser/foreign-content-crash.html Use m_tree.currentNode() instead of m_tree.currentElement() as the top node is not always an Element. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndTag): 2011-12-05 Stephen White Allow the ImageBuffers used by SVG filters to be accelerated https://bugs.webkit.org/show_bug.cgi?id=73842 Reviewed by Kenneth Russell. Regressions covered by existing SVG tests; new functionality to be tested by the API exposed on Internals. * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setAcceleratedFiltersEnabled): (WebCore::Settings::acceleratedFiltersEnabled): * platform/graphics/filters/FETile.cpp: (WebCore::FETile::platformApplySoftware): * platform/graphics/filters/Filter.h: (WebCore::Filter::Filter): (WebCore::Filter::renderingMode): (WebCore::Filter::setRenderingMode): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::asImageBuffer): (WebCore::FilterEffect::createImageBufferResult): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::platformTransformColorSpace): * rendering/svg/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): * rendering/svg/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::createTileImage): * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::createImageBuffer): * rendering/svg/SVGImageBufferTools.h: * testing/Internals.cpp: (WebCore::Internals::setAcceleratedFiltersEnabled): * testing/Internals.h: * testing/Internals.idl: 2011-12-05 Benjamin Poulain Upstream htmlSelectMultipleItems needed for https://bugs.webkit.org/show_bug.cgi?id=73615 Reviewed by Joseph Pecoraro. Placeholder visibility was checked by HTMLInputElement::value emptiness. It should be innerTextValue emptiness because it is possible that a number field has empty HTMLInputElement::value and non-empty innerTextValue. Tests: fast/forms/number/number-placeholder-with-unacceptable-value.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateInnerTextValue): We should update placeholder visiblity when the innerTextValue is updated. (WebCore::HTMLInputElement::subtreeHasChanged): ditto. (WebCore::HTMLInputElement::setSuggestedValue): We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it. (WebCore::HTMLInputElement::setValueFromRenderer): We don't need to call updatePlaceholderVisibility() because subtreeHasChanged() calls it. * html/HTMLInputElement.h: Checks innerTextValue emptiness. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it. 2011-12-01 Alok Priyadarshi [chromium] CCLayerQuad does not return FloatQuad in correct order https://bugs.webkit.org/show_bug.cgi?id=73247 Reviewed by James Robinson. Returned the FloatQuad coordinates in correct order. Covered by new unit tests in CCLayerQuadTest.cpp. * platform/graphics/chromium/cc/CCLayerQuad.cpp: (WebCore::CCLayerQuad::floatQuad): 2011-12-02 Sheriff Bot Unreviewed, rolling out r101833. http://trac.webkit.org/changeset/101833 https://bugs.webkit.org/show_bug.cgi?id=73678 test_expectations file invalid: run Tools/Scripts/new-run- webkit-tests --lint-test-files (Requested by scheib on #webkit). * platform/graphics/chromium/cc/CCLayerQuad.cpp: (WebCore::CCLayerQuad::floatQuad): 2011-12-02 Alok Priyadarshi [chromium] CCLayerQuad does not return FloatQuad in correct orientation https://bugs.webkit.org/show_bug.cgi?id=73247 Reviewed by James Robinson. Returned the FloatQuad coordinates in correct order. Covered by new unit tests in CCLayerQuadTest.cpp. * platform/graphics/chromium/cc/CCLayerQuad.cpp: (WebCore::CCLayerQuad::floatQuad): 2011-12-01 Dmitry Lomov https://bugs.webkit.org/show_bug.cgi?id=73589 [V8][Chromium] Adjust postMessage to the latest "implementation-ready" spec. - postMessage should support transfer of MessagePorts - the order of arguments to Window::postMessage and Window::webkitPostMessage should be (msg, targetOrigin [, transfer]) Reviewed by David Levin. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::handlePostMessageCallback): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::handlePostMessageCallback): 2011-12-02 Enrica Casucci https://bugs.webkit.org/show_bug.cgi?id=73497 This is a followup to the patch submitted for the bug above. Tha patch was landed in r101575 and I missed to make one of the changes suggested by the reviewer that had pointed out that the code was still making use of the deprecatedNode method. Unreviewed. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Changed deprecatedNode to containerNode. 2011-12-02 Tom Sepez Content-security-policy script-src not enforced on workers. https://bugs.webkit.org/show_bug.cgi?id=73240 Reviewed by Adam Barth. Add a CSP check in AbstractWorker.cpp as part of resolving URL. Test: http/tests/security/contentSecurityPolicy/worker-script-src.html * workers/AbstractWorker.cpp: (WebCore::AbstractWorker::resolveURL): 2011-12-02 Daniel Cheng [chromium] Add plumbing for supporting custom MIME types in DataTransfer. https://bugs.webkit.org/show_bug.cgi?id=73594 Reviewed by David Levin. Tests: editing/pasteboard/clipboard-customData.html fast/events/drag-customData.html * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::types): (WebCore::ChromiumDataObject::getData): (WebCore::ChromiumDataObject::setData): * platform/chromium/ChromiumDataObject.h: (WebCore::ChromiumDataObject::customData): * platform/chromium/PlatformSupport.h: 2011-12-02 Darin Adler [Mac] Form stream data structures still not threadsafe https://bugs.webkit.org/show_bug.cgi?id=73674 Reviewed by Anders Carlsson. * platform/network/mac/FormDataStreamMac.mm: (WebCore::streamFieldsMapMutex): Added. (WebCore::associateStreamWithResourceHandle): Use streamFieldsMapMutex. (WebCore::formCreate): Ditto. (WebCore::formFinalize): Ditto. (WebCore::httpBodyFromStream): Ditto. 2011-12-02 Joshua Bell IndexedDB: Rename "multientry" to "multiEntry" per spec change https://bugs.webkit.org/show_bug.cgi?id=73578 Reviewed by Darin Fisher. * storage/IDBIndex.h: (WebCore::IDBIndex::multiEntry): * storage/IDBIndex.idl: * storage/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): * storage/IDBIndexBackendImpl.h: (WebCore::IDBIndexBackendImpl::create): (WebCore::IDBIndexBackendImpl::multiEntry): * storage/IDBIndexBackendInterface.h: * storage/IDBLevelDBBackingStore.cpp: (WebCore::IDBLevelDBBackingStore::getIndexes): (WebCore::IDBLevelDBBackingStore::createIndex): * storage/IDBLevelDBCoding.cpp: * storage/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::createIndexInternal): (WebCore::IDBObjectStoreBackendImpl::loadIndexes): * storage/IDBObjectStoreBackendImpl.h: * storage/IDBObjectStoreBackendInterface.h: 2011-12-02 Sheriff Bot Unreviewed, rolling out r101805. http://trac.webkit.org/changeset/101805 https://bugs.webkit.org/show_bug.cgi?id=73670 Many canvas tests started failing due to the isEmpty change (Requested by darin on #webkit). * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): (WebCore::Path::fastBoundingRect): (WebCore::Path::isEmpty): 2011-12-01 Darin Adler [Mac] Reference count threading violation in FormDataStreamMac.mm https://bugs.webkit.org/show_bug.cgi?id=73627 Reviewed by Sam Weinig. Shows up as a crash during existing layout test runs so no new tests are required. * platform/network/mac/FormDataStreamMac.mm: (WebCore::streamFieldsMap): Replaced getStreamFormDataMap with this. Use an NSMapTable instead of a HashMap because we need to remove items from this on a non-main thread. (WebCore::associateStreamWithResourceHandle): Use NSMapGet instead of HashMap::contains here. (WebCore::formCreate): FormStreamFields now stores a RefPtr to the form data. Added the code to fill that in. Did it in a more modern way to avoid the leakRef and adoptRef that were used before. Replaced the code that set up the stream form data map entry with code that sets an entry in the streamFieldsMap. (WebCore::formFinishFinalizationOnMainThread): Added. Contains the work of finalization that must be done on the main thread, specifically, destroying the fields structure that contains objects with RefPtr in them. We can't touch these reference counts on non-main threads. (WebCore::formFinalize): Changed this to use NSMapRemove on the streamFieldsMap. Added a callOnMainThread to finish the finalization. (WebCore::setHTTPBody): Removed the leakRef, no longer needed, that used to be balanced by an adoptRef in formCreate. (WebCore::httpBodyFromStream): Changed to use NSMapGet. 2011-12-02 Antti Koivisto https://bugs.webkit.org/show_bug.cgi?id=73520 REGRESSION(r101524): Article titles invisible until hover on blaze.com Reviewed by Darin Adler. We need to invalidate the matched declaration cache when new web fonts are loaded. Fonts in the cached RenderStyles may not be valid anymore. Also renamed m_matchStyleDeclarationCache -> m_matchedStyleDeclarationCache. Test reduction by the Reduction Fairy (aka kling). Test: fast/css/font-face-cache-bug.html * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::dispatchInvalidationCallbacks): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::findFromMatchedDeclarationCache): (WebCore::CSSStyleSelector::addToMatchedDeclarationCache): (WebCore::CSSStyleSelector::invalidateMatchedDeclarationCache): * css/CSSStyleSelector.h: 2011-11-02 Jer Noble MediaControls should use MediaController if present. https://bugs.webkit.org/show_bug.cgi?id=71410 Reviewed by Eric Carlson. No new tests; covered by existing tests. Add support for individual media controls to control the MediaController of their associated HTMLMediaElement, if present. The video spec requires that UA provided media controls be implemented in terms of their HTMLMediaElement's MediaController, if present. So for each of the media controls, modify their constructor to take a Document* instead of an HTMLMediaElement, and add an setter taking a MediaControllerInterface. Now that MediaControls have an abstract interface instead of an HTMLMediaElement, use toParentMediaElement to find the controllingVideoElement. * accessibility/AccessibilityMediaControls.cpp: (WebCore::AccessibilityMediaControlsContainer::controllingVideoElement): Pass the MediaController or the HTMLMediaElement when setting up the elements controls. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::createMediaControls): (WebCore::HTMLMediaElement::setMediaController): The following functions have only constructor changes: * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlElement::MediaControlElement): (WebCore::MediaControlPanelElement::MediaControlPanelElement): (WebCore::MediaControlPanelElement::create): (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): (WebCore::MediaControlTimelineContainerElement::create): (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement): (WebCore::MediaControlVolumeSliderContainerElement::create): (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): (WebCore::MediaControlStatusDisplayElement::create): (WebCore::MediaControlInputElement::MediaControlInputElement): (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): (WebCore::MediaControlMuteButtonElement::defaultEventHandler): (WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement): (WebCore::MediaControlPanelMuteButtonElement::create): (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): (WebCore::MediaControlVolumeSliderMuteButtonElement::create): (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): (WebCore::MediaControlPlayButtonElement::create): (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): (WebCore::MediaControlSeekForwardButtonElement::create): (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): (WebCore::MediaControlSeekBackButtonElement::create): (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): (WebCore::MediaControlRewindButtonElement::create): (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): (WebCore::MediaControlReturnToRealtimeButtonElement::create): (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): (WebCore::MediaControlToggleClosedCaptionsButtonElement::create): (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): (WebCore::MediaControlTimelineElement::create): (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): (WebCore::MediaControlVolumeSliderElement::create): (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement): (WebCore::MediaControlFullscreenVolumeSliderElement::create): (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): (WebCore::MediaControlFullscreenButtonElement::create): (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement): (WebCore::MediaControlFullscreenVolumeMinButtonElement::create): (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement): (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create): (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement): (WebCore::MediaControlTimeRemainingDisplayElement::create): (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement): (WebCore::MediaControlCurrentTimeDisplayElement::create): (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement): * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::MediaControlRootElement): (WebCore::MediaControls::create): (WebCore::MediaControlRootElement::create): * html/shadow/MediaControlRootElement.h: * html/shadow/MediaControls.cpp: (WebCore::MediaControls::MediaControls): * html/shadow/MediaControls.h: The following functions now call MediaControllerInterface instead of HTMLMediaElement directly: * html/shadow/MediaControlElements.h: (WebCore::MediaControlStatusDisplayElement::update): (WebCore::MediaControlMuteButtonElement::updateDisplayType): (WebCore::MediaControlPlayButtonElement::defaultEventHandler): (WebCore::MediaControlPlayButtonElement::updateDisplayType): (WebCore::MediaControlSeekButtonElement::startTimer): (WebCore::MediaControlSeekButtonElement::stopTimer): (WebCore::MediaControlSeekButtonElement::nextRate): (WebCore::MediaControlSeekButtonElement::seekTimerFired): (WebCore::MediaControlRewindButtonElement::defaultEventHandler): (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler): (WebCore::MediaControlToggleClosedCaptionsButtonElement::updateDisplayType): (WebCore::MediaControlTimelineElement::defaultEventHandler): (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::reset): (WebCore::MediaControlRootElement::playbackStarted): (WebCore::MediaControlRootElement::playbackProgressed): (WebCore::MediaControlRootElement::playbackStopped): (WebCore::MediaControlRootElement::updateTimeDisplay): (WebCore::MediaControlRootElement::loadedMetadata): (WebCore::MediaControlRootElement::changedVolume): (WebCore::MediaControlRootElement::enteredFullscreen): (WebCore::MediaControlRootElement::showVolumeSlider): (WebCore::MediaControlRootElement::defaultEventHandler): (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): (WebCore::MediaControls::create): (WebCore::MediaControlRootElementChromium::create): (WebCore::MediaControlRootElementChromium::reset): (WebCore::MediaControlRootElementChromium::playbackStarted): (WebCore::MediaControlRootElementChromium::playbackProgressed): (WebCore::MediaControlRootElementChromium::playbackStopped): (WebCore::MediaControlRootElementChromium::updateTimeDisplay): (WebCore::MediaControlRootElementChromium::defaultEventHandler): (WebCore::MediaControlRootElementChromium::changedVolume): (WebCore::MediaControlRootElementChromium::showVolumeSlider): * html/shadow/MediaControlRootElementChromium.h: The following functions set the current MediaControllerInterface. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::setMediaController): * html/shadow/MediaControlElements.h: (WebCore::MediaControlElement::setMediaController): (WebCore::MediaControlElement::mediaController): (WebCore::MediaControlInputElement::setMediaController): (WebCore::MediaControlInputElement::mediaController): * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::setMediaController): 2011-12-02 Stephen Chenney REGRESSION (r91125): Polyline tool in google docs is broken https://bugs.webkit.org/show_bug.cgi?id=65796 Reviewed by Darin Adler. Work around a bug in CoreGraphics, that caused incorrect bounds for paths consisting only of move-to elements. This causes problems in SVG, when the enormous bounds prevented the drawing of things behind. Tests: svg/custom/path-moveto-only-rendering.svg svg/custom/subpaths-moveto-only-rendering.svg * platform/graphics/cg/PathCG.cpp: (WebCore::PathIsEmptyOrSingleMoveTester::PathIsEmptyOrSingleMoveTester): Class to test for isEmpty accoridng ot the same rules as other platforms. (WebCore::PathIsEmptyOrSingleMoveTester::isEmpty): Query the result (WebCore::PathIsEmptyOrSingleMoveTester::testPathElement): Path iterator method (WebCore::PathHasOnlyMoveToTester::PathHasOnlyMoveToTester): Class to test whether a path contains only move-to elements, and hence should have null bounds. (WebCore::PathHasOnlyMoveToTester::hasOnlyMoveTo): Query the result (WebCore::PathHasOnlyMoveToTester::testPathElement): Path iterator method. (WebCore::Path::boundingRect): Modified to check for move-to only paths (WebCore::Path::fastBoundingRect): Modified to check for move-to only paths (WebCore::Path::isEmpty): Now uses the method that matches other platforms. 2011-12-02 Sheriff Bot Unreviewed, rolling out r101794. http://trac.webkit.org/changeset/101794 https://bugs.webkit.org/show_bug.cgi?id=73656 Broke win build (Requested by vsevik on #webkit). * bindings/js/ScriptCallStackFactory.cpp: * bindings/js/ScriptCallStackFactory.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateFunctionCallback): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::customArgsAndExceptionCallback): * bindings/v8/ScriptCallStackFactory.cpp: * bindings/v8/ScriptCallStackFactory.h: * inspector/InspectorInstrumentation.cpp: * inspector/InspectorInstrumentation.h: * inspector/WorkerInspectorController.h: * page/Console.cpp: (WebCore::Console::shouldCaptureFullStackTrace): * page/Console.h: 2011-12-02 Raphael Kubo da Costa Unreviewed, revert r101347. https://bugs.webkit.org/show_bug.cgi?id=73580 It breaks the linking of Tools/ targets due to missing functions. * PlatformEfl.cmake: * platform/graphics/GraphicsLayer.cpp: * platform/graphics/GraphicsLayer.h: * platform/graphics/efl/GraphicsLayerEfl.cpp: Added. (WebCore::GraphicsLayer::create): (WebCore::GraphicsLayerEfl::GraphicsLayerEfl): (WebCore::GraphicsLayerEfl::~GraphicsLayerEfl): (WebCore::GraphicsLayerEfl::setNeedsDisplay): (WebCore::GraphicsLayerEfl::setNeedsDisplayInRect): * platform/graphics/efl/GraphicsLayerEfl.h: Added. * platform/graphics/texmap/TextureMapperNode.cpp: (WebCore::solveCubicBezierFunction): (WebCore::solveStepsFunction): 2011-12-01 Vsevolod Vlasov Web Inspector: Extract default call stack creation and check for front-end from console. https://bugs.webkit.org/show_bug.cgi?id=73566 Reviewed by Yury Semikhatsky. * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): * bindings/js/ScriptCallStackFactory.h: * bindings/scripts/CodeGeneratorJS.pm: (GenerateParametersCheck): * bindings/scripts/CodeGeneratorV8.pm: (GenerateFunctionCallback): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::customArgsAndExceptionCallback): * bindings/v8/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStack): * bindings/v8/ScriptCallStackFactory.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::hasFrontendForScriptContext): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::hasFrontendForScriptContext): * inspector/WorkerInspectorController.h: (WebCore::WorkerInspectorController::hasFrontend): * page/Console.cpp: * page/Console.h: 2011-12-02 Gavin Peters Remove instrumentation tracking a fixed bug https://bugs.webkit.org/show_bug.cgi?id=73471 The underlying bug is fixed (bug 72068), and this instrumentation was intrusive and using memory, plus the conditional compilation made me sad. Reviewed by Nate Chapin. No new tests. * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::requestScript): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: * dom/ScriptRunner.cpp: (WebCore::ScriptRunner::queueScriptForExecution): 2011-12-02 Vsevolod Vlasov Web Inspector: Split view works weirdly in network panel when resizing, showing/hiding main element. https://bugs.webkit.org/show_bug.cgi?id=73650 Reviewed by Pavel Feldman. * inspector/front-end/SplitView.js: (WebInspector.SplitView.prototype._updateResizer): (WebInspector.SplitView.prototype.hideMainElement): (WebInspector.SplitView.prototype.showMainElement): (WebInspector.SplitView.prototype.onResize): (WebInspector.SplitView.prototype._restoreSidebarWidth): 2011-12-02 Sheriff Bot Unreviewed, rolling out r101783. http://trac.webkit.org/changeset/101783 https://bugs.webkit.org/show_bug.cgi?id=73652 Broke chromium win build. (Requested by vsevik on #webkit). * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): * WebCore.gypi: * bindings/scripts/generate-bindings.pl: * page/DOMWindow.idl: * webaudio/DOMWindowWebAudio.idl: Removed. 2011-11-28 Alexander Pavlov Inline non-replaced elements are reported to have zero width and height https://bugs.webkit.org/show_bug.cgi?id=61117 Reviewed by Antti Koivisto. According to http://www.w3.org/TR/CSS21/visudet.html, the "width" and "height" properties do not apply for inline non-replaced elements and should have their initial value of "auto" as their computed values. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-02 Sami Kyostila [chromium] Make CCInputHandler scrolling stateful https://bugs.webkit.org/show_bug.cgi?id=73345 This change makes the scrolling part of CCInputHandler stateful by replacing scrollRootLayer() with scrollBegin(), scrollBy() and scrollEnd(). This is done in preparation for scrollable sublayers. Specifically, scrollBegin() will allow CCLayerTreeHostImpl to perform input event hit testing to find the layer to be scrolled. Reviewed by Steve Block. Tested in CCLayerTreeHostImplTest. * platform/graphics/chromium/cc/CCInputHandler.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::currentTimeMs): (WebCore::CCLayerTreeHostImpl::setNeedsRedraw): (WebCore::findInnermostScrollableLayerAtPoint): (WebCore::CCLayerTreeHostImpl::scrollBegin): (WebCore::CCLayerTreeHostImpl::scrollBy): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: 2011-12-02 Kentaro Hara Use the [Supplemental] IDL for webaudio attributes in Chromium https://bugs.webkit.org/show_bug.cgi?id=73394 Reviewed by Adam Barth. - Overview: Using the [Supplemental] IDL, this patch moves the attribute declarations of webaudio from DOMWindow.idl into a new IDL file webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained feature (aka a module). - This patch changes the build flow of WebCore.gyp as follows: Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl; } - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL will be removed after build scripts for all platforms support the [Supplemental] IDL. The motivation for the [Supplemented] IDL is as follows: In order to support the [Supplemental] IDL, we need to (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp (2) and run generate-bindings.pl with the supplemental_dependency.tmp. This build flow requires a change on the following build scripts, but changing all the build scripts all at once without any regression is too difficult: - DerivedSources.make - DerivedSources.pri - GNUmakefile.am - PlatformBlackBerry.cmake - UseJSC.cmake - UseV8.cmake - WebCore.vcproj/MigrateScripts - WebCore.vcproj/WebCore.vcproj - bindings/gobject/GNUmakefile.am - WebCore.gyp/WebCore.gyp Thus, we are planning to change the build scripts one by one, which implies that we need to allow the temporary state in which some build scripts support [Supplemental] IDL but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented]. The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental] in another IDL file somewhere, like this: DOMWindowWebAudio.idl: interface [ Supplemental=DOMWindow ] DOMWindowWebAudio { attribute attr1; attribute attr2; }; DOMWindow.idl: interface [ ] DOMWindow { attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL. attribute attr3; attribute attr4; }; Assuming these IDL files, this patch implements the following logic in generate-bindings.pl: - If a given build script supports the [Supplemental] IDL, generate-bindings.pl ignores all attributes with the [Supplemented] IDL. - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL as normal attributes and instead ignores all attributes with the [Supplemental] IDL (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL). Tests: webaudio/* * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above. * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. * WebCore.gypi: Added DOMWindowWebAudio.idl. * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL. * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL. * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl. 2011-12-02 Vsevolod Vlasov Web Inspector: Network panel row highlighting does not work. https://bugs.webkit.org/show_bug.cgi?id=73644 Reviewed by Pavel Feldman. * inspector/front-end/networkLogView.css: (.network-log-grid tr.highlighted-row): (from): (to): 2011-12-02 Pavel Feldman Not reviewed: remove console.timeStamp from the inspector backend dispatcher. * inspector/front-end/InspectorBackend.js: (InspectorBackendClass.prototype.sendMessageObjectToBackend): 2011-12-02 Hajime Morrita Unreviewed, rolling out r101751 and r101775. http://trac.webkit.org/changeset/101751 http://trac.webkit.org/changeset/101775 https://bugs.webkit.org/show_bug.cgi?id=73191 breaks Windows build * ForwardingHeaders/runtime/JSExportMacros.h: Removed. * ForwardingHeaders/wtf/ExportMacros.h: Removed. * WebCore.vcproj/QTMovieWinCommon.vsprops: * WebCore.xcodeproj/project.pbxproj: * config.h: * platform/PlatformExportMacros.h: Removed. 2011-12-02 Pavel Feldman Web Inspector: introduce backend stub generation from JSON for the standalone development / remote front-ends. https://bugs.webkit.org/show_bug.cgi?id=73636 Reviewed by Yury Semikhatsky. * inspector/front-end/DOMStorage.js: * inspector/front-end/Database.js: * inspector/front-end/InspectorBackend.js: (InspectorBackendClass): (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype.registerEvent): (InspectorBackendClass.prototype.runAfterPendingDispatches): (InspectorBackendClass.prototype.loadFromJSONIfNeeded): * inspector/front-end/TimelineManager.js: * inspector/front-end/inspector.js: 2011-12-02 MORITA Hajime Unreviewed, another attempt to build fix for r101751: Adding an include path to make PlatformExportMacros.h visibile from QTMovieWin. * WebCore.vcproj/QTMovieWinCommon.vsprops: 2011-12-02 Hajime Morrita Unreviewed, rolling out r101772. http://trac.webkit.org/changeset/101772 It didn't fix the build failure * WebCore.vcproj/QTMovieWinCommon.vsprops: 2011-12-02 MORITA Hajime Unreviewed attempt to build fix for r101751: Adding an include path to make PlatformExportMacros.h visibile from QTMovieWin. * WebCore.vcproj/QTMovieWinCommon.vsprops: 2011-12-01 Andrey Kosyakov Web Inspector: [Extensions API] pass preferred resource line number to extension's open resource handler https://bugs.webkit.org/show_bug.cgi?id=73084 Reviewed by Pavel Feldman. * inspector/front-end/ExtensionAPI.js: (injectedExtensionAPI.Panels.prototype.setOpenResourceHandler.else.callbackWrapper): (injectedExtensionAPI.Panels.prototype.setOpenResourceHandler): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._handleOpenURL): * inspector/front-end/HandlerRegistry.js: (get WebInspector.HandlerRegistry.prototype.set dispatch): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.populateLineGutterContextMenu): (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu): (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateLineGutterContextMenu): (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._contextMenu): (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu): (WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu): * inspector/front-end/externs.js: (WebInspector.populateResourceContextMenu): * inspector/front-end/inspector.js: (WebInspector.populateResourceContextMenu): (WebInspector._showAnchorLocation): 2011-12-01 Nayan Kumar K [GTK] Add compilation options to enable/disable Accelerated Compositing and to choose texture mapper implementation. https://bugs.webkit.org/show_bug.cgi?id=73458 Reviewed by Martin Robinson. No new tests added as this patch doesn't affect any functionality. * GNUmakefile.am: Guard the include files. * GNUmakefile.list.am: Guard the compilation of few files. * platform/graphics/GraphicsLayer.h: Guard the typedef of GraphicsLayer. 2011-12-01 Andrey Kosyakov Web Inspector: use object properties, not element attributes to pass preferred panel/line/request id in linkified anchors https://bugs.webkit.org/show_bug.cgi?id=73556 Reviewed by Pavel Feldman. * inspector/front-end/AuditFormatters.js: (WebInspector.AuditFormatters.resourceLink): * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl.prototype._formatMessage.else.else.linkifier): (WebInspector.ConsoleMessageImpl.prototype._formatMessage): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateAnchor): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype._resourceByAnchor): (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/ResourceUtils.js: (WebInspector.linkifyStringAsFragment): (WebInspector.linkifyResourceAsNode): (WebInspector.linkifyRequestAsNode): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showAnchorLocation): * inspector/front-end/inspector.js: (WebInspector._showAnchorLocation): 2011-12-02 Pavel Feldman Web Inspector: refactor InspectorBackendDispatcher so that it does not use JSON-serialized command templates. https://bugs.webkit.org/show_bug.cgi?id=73569 Reviewed by Yury Semikhatsky. * inspector/CodeGeneratorInspector.py: (Generator.process_command): * inspector/Inspector.json: * inspector/front-end/InspectorBackend.js: (InspectorBackendClass.prototype._wrap.callback): (InspectorBackendClass.prototype._wrap): (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._invoke): (InspectorBackendClass.prototype._sendMessageToBackend): (InspectorBackendClass.prototype._wrapCallbackAndSendMessageObject): 2011-12-02 Yosifumi Inoue Range sliders and spin buttons don't work with multi-columns. https://bugs.webkit.org/show_bug.cgi?id=70898 Reviewed by Dan Bernstein. This patch makes RenderBlock::hitTestColumns and RenderBoxModelObject::mapAbsoluteToLocal to handle point in multi-column same logic. In multi-column, coordinate of box model rendering object is different from absolute coordinate.. Columns in box model rendering object spans vertically rather than horizontally. When absolute point is represented in (column[i]+dx, column[0]+dy), it is (column[0]+dx, column[0] + columnHeight + dy) in box model rendering object coordinate. Tests: fast/events/document-elementFromPoint.html fast/events/offsetX-offsetY.html fast/forms/number/spin-in-multi-column.html fast/forms/range/slider-in-multi-column.html fast/forms/select/listbox-in-multi-column.html * rendering/RenderBlock.cpp: (WebCore::ColumnRectIterator::ColumnRectIterator): Added (WebCore::ColumnRectIterator::advance): Added (WebCore::ColumnRectIterator::columnRect): Added (WebCore::ColumnRectIterator::hasMore): Added (WebCore::ColumnRectIterator::adjust): Added (WebCore::ColumnRectIterator::update): Added (WebCore::RenderBlock::hitTestColumns): Use ColumnRectIterator. (WebCore::RenderBlock::adjustForColumnRect): Added * rendering/RenderBlock.h: Add adjustForColumnRect. * rendering/RenderBox.cpp: (WebCore::RenderBox::mapAbsoluteToLocalPoint): Call RenderBoxModelObject::mapAbsoluteToLocalPoint. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint): Move from RenderInline::mapAbsoluteToLocalPoint and call RenderBlock::adjustForColumnRect. * rendering/RenderBoxModelObject.h: add mapAbsoluteToLocalPoint. * rendering/RenderInline.cpp: Move mapAbsoluteToLocalPoint to RenderBoxModelObject. * rendering/RenderInline.h: remove mapAbsoluteToLocalPoint. 2011-12-02 Pavel Feldman InspectorController destruction order leads to use-after-free https://bugs.webkit.org/show_bug.cgi?id=73582 Reviewed by Yury Semikhatsky. * inspector/InspectorBaseAgent.h: (WebCore::InspectorBaseAgentInterface::discardAgent): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::~InspectorCSSAgent): (WebCore::InspectorCSSAgent::discardAgent): * inspector/InspectorCSSAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::~InspectorController): * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::~InspectorDOMDebuggerAgent): (WebCore::InspectorDOMDebuggerAgent::discardAgent): * inspector/InspectorDOMDebuggerAgent.h: 2011-12-02 Leo Yang image element with src attribute can't be replaced by content: url() style https://bugs.webkit.org/show_bug.cgi?id=42840 ImageLoader were updating renderer even if the renderer's image is style generated content. This was wrong because if an image element with src attribute and style="content: url(...)" attribute the src image might override content image. The correct behavior should be showing content image. This patch is differentiating style generated RenderImage from the normal RenderImage and keeps the RenderImageSource untouched if the renderer is generated content. Reviewed by Darin Adler. Test: fast/images/image-css3-content-data.html * loader/ImageLoader.cpp: (WebCore::ImageLoader::renderImageResource): * rendering/RenderImage.cpp: (WebCore::RenderImage::RenderImage): * rendering/RenderImage.h: (WebCore::RenderImage::setIsGeneratedContent): (WebCore::RenderImage::isGeneratedContent): * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): 2011-12-01 David Levin Add a way to automatically size a single frame to fit its content. https://bugs.webkit.org/show_bug.cgi?id=73420 Reviewed by Dmitry Titov. No new functionality exposed so no new tests. (There is a Chromium specific test in https://bugs.webkit.org/show_bug.cgi?id=73058.) * page/FrameView.cpp: (WebCore::FrameView::FrameView): Initialized the new variables. (WebCore::FrameView::layout): (WebCore::FrameView::autoSizeIfEnabled): (WebCore::FrameView::enableAutoSizeMode): * page/FrameView.h: 2011-12-01 Hajime Morrita JS_INLINE and WTF_INLINE should be visible from WebCore https://bugs.webkit.org/show_bug.cgi?id=73191 Reviewed by Kevin Ollivier. - Moved export related definitions from config.h to ExportMacros.h, JSExportMacros.h and PlatformExportMacros.h - Added forwarding headers which are referred from config.h No new tests. Only build related changes. * ForwardingHeaders/runtime/JSExportMacros.h: Added. * ForwardingHeaders/wtf/ExportMacros.h: Added. * WebCore.xcodeproj/project.pbxproj: * config.h: * platform/PlatformExportMacros.h: Copied from Source/JavaScriptCore/wtf/ExportMacros.h. 2011-12-01 Jon Lee [WK2] Add further support for notifications https://bugs.webkit.org/show_bug.cgi?id=73572 Reviewed by Darin Adler. * WebCore.exp.in: Export constructor and dispatch functions * dom/EventNames.h: Add show event. * notifications/Notification.cpp: (WebCore::Notification::show): For the Mac platform, we just forward the show() call to the notification client and update the state, because we cannot get synchronous acknowledgment that the notification got delivered. (WebCore::Notification::dispatchShowEvent): Create simple events and dispatch to the notification. (WebCore::Notification::dispatchClickEvent): Ditto. (WebCore::Notification::dispatchCloseEvent): Ditto. (WebCore::Notification::dispatchErrorEvent): Ditto. * notifications/Notification.h: Add dispatch functions. * notifications/Notification.idl: Add onshow event listener. The ondisplay event listener should be removed when implementations change the event listener to onshow. 2011-12-01 Max Vujovic Focus ring of imagemap's area element does not scale when CSS zoom style is applied https://bugs.webkit.org/show_bug.cgi?id=73595 Reviewed by Darin Adler. Tests: fast/images/imagemap-focus-ring-zoom-style-expected.html fast/images/imagemap-focus-ring-zoom-style.html * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::computePath): The computePath method now uses the RenderObject's effectiveZoom instead of the Frame's page zoom to compute the path for the area element's focus ring. 2011-12-01 Kent Tamura REGRESSION(r90971): Placeholder text of input control is rendered over positioned elements with z-index:0. https://bugs.webkit.org/show_bug.cgi?id=67408 Reviewed by Darin Adler. The bug was caused by "position:relative" in the default style of -webkit-input-placeholder. If there were other positioned elements with z-index:0, a placeholder might be rendered over them. "position:relative" is not needed because RenderTextControlSingleLine and RenderTextControlMultipleLine lay out the placeholder renderer by custom layout code. Tests: fast/forms/placeholder-with-positioned-element.html * css/html.css: (::-webkit-input-placeholder): Remove position:relative. 2011-12-01 Andreas Kling CSSMutableStyleDeclaration: Removed unused multiLength argument in setLengthProperty(). Reviewed by Darin Adler. * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::setLengthProperty): * css/CSSMutableStyleDeclaration.h: 2011-12-01 Kentaro Hara Unreviewed, rolling out r101737. http://trac.webkit.org/changeset/101737 https://bugs.webkit.org/show_bug.cgi?id=73394 Chromium/Mac and Chromium/Win build are broken * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): * WebCore.gypi: * bindings/scripts/generate-bindings.pl: * page/DOMWindow.idl: * webaudio/DOMWindowWebAudio.idl: Removed. 2011-12-01 Kentaro Hara Use the [Supplemental] IDL for webaudio attributes in Chromium https://bugs.webkit.org/show_bug.cgi?id=73394 Reviewed by Adam Barth. - Overview: Using the [Supplemental] IDL, this patch moves the attribute declarations of webaudio from DOMWindow.idl into a new IDL file webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained feature (aka a module). - This patch changes the build flow of WebCore.gyp as follows: Previous build flow: foreach $idl (all IDL files) { generate-bindings.pl depends on $idl; generate-bindings.pl reads $idl; generate-bindings.pl generates .h and .cpp files for $idl; } New build flow (See the discussions in bug 72138 for more details): resolve-supplemental.pl depends on all IDL files; resolve-supplemental.pl reads all IDL files; resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX]; resolve-supplemental.pl outputs supplemental_dependency.tmp; foreach $idl (all IDL files) { generate-bindings.pl depends on $idl and supplemental_dependency.tmp; generate-bindings.pl reads $idl; generate-bindings.pl reads supplemental_dependency.tmp; generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl; } - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL will be removed after build scripts for all platforms support the [Supplemental] IDL. The motivation for the [Supplemented] IDL is as follows: In order to support the [Supplemental] IDL, we need to (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp (2) and run generate-bindings.pl with the supplemental_dependency.tmp. This build flow requires a change on the following build scripts, but changing all the build scripts all at once without any regression is too difficult: - DerivedSources.make - DerivedSources.pri - GNUmakefile.am - PlatformBlackBerry.cmake - UseJSC.cmake - UseV8.cmake - WebCore.vcproj/MigrateScripts - WebCore.vcproj/WebCore.vcproj - bindings/gobject/GNUmakefile.am - WebCore.gyp/WebCore.gyp Thus, we are planning to change the build scripts one by one, which implies that we need to allow the temporary state in which some build scripts support [Supplemental] IDL but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented]. The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental] in another IDL file somewhere, like this: DOMWindowWebAudio.idl: interface [ Supplemental=DOMWindow ] DOMWindowWebAudio { attribute attr1; attribute attr2; }; DOMWindow.idl: interface [ ] DOMWindow { attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL. attribute attr3; attribute attr4; }; Assuming these IDL files, this patch implements the following logic in generate-bindings.pl: - If a given build script supports the [Supplemental] IDL, generate-bindings.pl ignores all attributes with the [Supplemented] IDL. - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL as normal attributes and instead ignores all attributes with the [Supplemental] IDL (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL). Tests: webaudio/* * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above. * WebCore.gyp/scripts/action_derivedsourcesallinone.py: (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. * WebCore.gypi: Added DOMWindowWebAudio.idl. * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL. * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL. * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl. 2011-12-01 Rafael Weinstein [MutationObservers] StyleAttributeMutationScope shouldn't be implemented with static classes https://bugs.webkit.org/show_bug.cgi?id=73596 Reviewed by Ojan Vafai. No tests needed. This patch is a minor refactor. * css/CSSMutableStyleDeclaration.cpp: 2011-12-01 Andreas Kling CSSMutableStyleDeclaration: Remove unused function setStringProperty(). Reviewed by Darin Adler. * css/CSSMutableStyleDeclaration.cpp: * css/CSSMutableStyleDeclaration.h: 2011-12-01 Ryosuke Niwa REGRESSION(r101268): Intermittent assertion failure in fast/block/child-not-removed-from-parent-lineboxes-crash.html https://bugs.webkit.org/show_bug.cgi?id=73250 Reviewed by Darin Adler. Reset the position when exiting early in layoutRunsAndFloatsInRange. No new tests because we don't have a reliable reproduction for this failure. However, the failure is caught by the existing fast/block/child-not-removed-from-parent-lineboxes-crash.html intermittently with about 30% probability. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloatsInRange): 2011-12-01 Shinya Kawanaka Asynchronous SpellChecker should consider multiple requests. https://bugs.webkit.org/show_bug.cgi?id=72939 Reviewed by Hajime Morita. Now SpellChecker saves a request when it is processing the previous spellcheck request. If there is a request having the same root editable element, the older request is replaced by newer request. Test: editing/spelling/spellcheck-queue.html * editing/SpellChecker.cpp: (WebCore::SpellChecker::SpellCheckRequest::SpellCheckRequest): A structure to have spell check request. (WebCore::SpellChecker::SpellCheckRequest::sequence): (WebCore::SpellChecker::SpellCheckRequest::range): (WebCore::SpellChecker::SpellCheckRequest::text): (WebCore::SpellChecker::SpellCheckRequest::mask): (WebCore::SpellChecker::SpellCheckRequest::rootEditableElement): (WebCore::SpellChecker::SpellChecker): (WebCore::SpellChecker::createRequest): (WebCore::SpellChecker::timerFiredToProcessQueuedRequest): When timer is fired, queued request is processed if any. (WebCore::SpellChecker::canCheckAsynchronously): (WebCore::SpellChecker::requestCheckingFor): When the spellchecker is processing another request, the latest request is queued. (WebCore::SpellChecker::invokeRequest): (WebCore::SpellChecker::enqueueRequest): Enqueues a request. If there is an older request whose root editable element is the same as the request, it will be replaced. (WebCore::SpellChecker::didCheck): * editing/SpellChecker.h: 2011-12-01 Takashi Toyoshima bufferedAmount calculation is wrong in CLOSING and CLOSED state. https://bugs.webkit.org/show_bug.cgi?id=73404 Reviewed by Kent Tamura. WebSocket::bufferedAmount() must return buffered frame size including disposed frames which are passed via send() calls after close(). Old implementation had a problem at CLOSING state. Buffered frame size was added to m_bufferedAmountAfterClose at close(). But the function returns the sum of m_bufferedAmountAfterClose and internally buffered frame size, or m_channel->bufferedAmount(). So, buffered frames was double counted. In new implementation, m_bufferedAmount always represents buffered frame size and m_bufferedAmountAfterClose does disposed frame size. As a result, bufferedAmount() implementation become just to return the sum of m_bufferedAmount and m_bufferedAmountAfterClose. Test: http/tests/websocket/tests/hybi/bufferedAmount-after-close-in-busy.html * websockets/WebSocket.cpp: Implement new bufferedAmount handling. (WebCore::saturateAdd): (WebCore::WebSocket::WebSocket): (WebCore::WebSocket::send): (WebCore::WebSocket::close): (WebCore::WebSocket::bufferedAmount): (WebCore::WebSocket::didUpdateBufferedAmount): (WebCore::WebSocket::didClose): * websockets/WebSocket.h: 2011-12-01 Kentaro Hara Replace a custom constructor of window.Option with the [NamedConstructor] IDL https://bugs.webkit.org/show_bug.cgi?id=73498 Reviewed by Adam Barth. Removes JSOptionConstructor.{h,cpp} and generates the constructor of window.Option by the [NamedConstructor] IDL. Tests: fast/js/custom-constructors.html fast/forms/option-index.html fast/forms/add-and-remove-option.html fast/dom/dom-add-optionelement.html * GNUmakefile.list.am: Removed JSOptionConstructor.{h,cpp}. * Target.pri: Ditto. * UseJSC.cmake: Ditto. * WebCore.gypi: Ditto. * WebCore.order: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Ditto. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::option): Specifies the NamedConstructor. * bindings/js/JSOptionConstructor.cpp: Removed. * bindings/js/JSOptionConstructor.h: Removed. * page/DOMWindow.idl: Removed the [JSCustomConstructor] IDL. 2011-12-01 Kentaro Hara Replace a custom constructor of window.Audio with the [NamedConstructor] IDL https://bugs.webkit.org/show_bug.cgi?id=73496 Reviewed by Adam Barth. Removes JSAudioConstructor.{h,cpp} and generates the constructor of window.Audio by the [NamedConstructor] IDL. Tests: fast/js/custom-constructors.html media/audio-constructor.html media/audio-constructor-src.html media/audio-constructor-preload.html media/audio-controls-do-not-fade-out.html media/audio-controls-rendering.html * GNUmakefile.list.am: Removed JSAudioConstructor.{h,cpp}. * Target.pri: Ditto. * UseJSC.cmake: Ditto. * WebCore.gypi: Ditto. * WebCore.order: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Ditto. * bindings/js/JSAudioConstructor.cpp: Removed. * bindings/js/JSAudioConstructor.h: Removed. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::audio): Specifies the NamedConstructor. * page/DOMWindow.idl: Removed the [JSCustomConstructor] IDL. 2011-12-01 Mark Pilgrim [FileSystem API] DirectoryEntry.removeRecursively successCallback is required https://bugs.webkit.org/show_bug.cgi?id=69644 Reviewed by Adam Barth. * fileapi/DirectoryEntry.idl: remove [Optional] flag from successCallback 2011-12-01 Mark Pilgrim [FileSystem API] DirectoryEntry.getDirectory path argument is required https://bugs.webkit.org/show_bug.cgi?id=69643 Reviewed by Adam Barth. Test: fast/filesystem/simple-required-arguments-getdirectory.html * bindings/js/JSDirectoryEntryCustom.cpp: (WebCore::JSDirectoryEntry::getDirectory): throw TypeError if not enough arguments * bindings/v8/custom/V8DirectoryEntryCustom.cpp: (WebCore::V8DirectoryEntry::getDirectoryCallback): throw TypeError if not enough arguments 2011-12-01 Rafael Weinstein V8 bindings cleanup: V8WindowErrorHandler shouldn't be directly invoking script https://bugs.webkit.org/show_bug.cgi?id=73576 Reviewed by Adam Barth. No tests needed. This patch is just bindings hygiene. * bindings/v8/V8WindowErrorHandler.cpp: (WebCore::V8WindowErrorHandler::callListenerFunction): 2011-12-01 Benjamin Poulain URLs are encoded in UTF-8, then decoded as if they are Latin1 https://bugs.webkit.org/show_bug.cgi?id=71758 Reviewed by Darin Adler. Previously, invalid URLs could have a string emanating from a partial parsing of the input. The creation of the string was done through the Latin1 codec regardless of the encoding of the char* url. This caused two types of issues, URLs were evaluated as half-parsed, and the coding and decoding of the string was not consistent. This patch changes KURL::parse() to fallback on the original string whenever the parsing of the URL fails. Test: fast/url/invalid-urls-utf8.html * platform/KURL.cpp: (WebCore::KURL::KURL): (WebCore::KURL::init): (WebCore::KURL::parse): Previously, originalString was only used as an optimization to avoid the allocation of a string. Since this optimization depends on the comparison of the incoming string and the encoded buffer. This patches generalizes originalString to always be the original string being parsed by KURL. The optimization is kept by comparing that string and the final parsed result. * platform/KURL.h: (WebCore::KURL::parse): * platform/cf/KURLCFNet.cpp: (WebCore::KURL::KURL): * platform/mac/KURLMac.mm: (WebCore::KURL::KURL): 2011-12-01 Martin Robinson [GTK] Add a helper function to find the current executable's path https://bugs.webkit.org/show_bug.cgi?id=73473 Reviewed by Gustavo Noronha Silva. No new tests. This should not change behavior. * platform/gtk/FileSystemGtk.cpp: (WebCore::applicationDirectoryPath): Now use the new WTF function to get the current executable's path. 2011-12-01 Andreas Kling StyledElement: Clean up inline style accessors. Reviewed by Antti Koivisto. Renamed StyledElement's getInlineStyleDecl() to ensureInlineStyleDecl() to make it clear that it will always return non-null as opposed to inlineStyleDecl(). Also updated call sites to store the return value in a CSSInlineStyleDeclaration* rather than a CSSMutableStyleDeclaration*, and reduced scoping of temporaries in some cases. * dom/StyledElement.cpp: (WebCore::StyledElement::createInlineStyleDecl): (WebCore::StyledElement::destroyInlineStyleDecl): (WebCore::StyledElement::parseMappedAttribute): (WebCore::StyledElement::ensureInlineStyleDecl): (WebCore::StyledElement::style): (WebCore::StyledElement::copyNonAttributeProperties): (WebCore::StyledElement::addSubresourceAttributeURLs): * dom/StyledElement.h: (WebCore::StyledElement::inlineStyleDecl): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): (WebCore::ApplyStyleCommand::addBlockStyle): (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::createDeletionUI): (WebCore::DeleteButtonController::show): (WebCore::DeleteButtonController::hide): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): (WebCore::ReplaceSelectionCommand::handleStyleSpans): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility): * html/ValidationMessage.cpp: (WebCore::adjustBubblePosition): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlElement::show): (WebCore::MediaControlElement::hide): (WebCore::MediaControlPanelElement::setPosition): (WebCore::MediaControlPanelElement::resetPosition): (WebCore::MediaControlPanelElement::makeOpaque): (WebCore::MediaControlPanelElement::makeTransparent): (WebCore::MediaControlInputElement::show): (WebCore::MediaControlInputElement::hide): * html/shadow/MeterShadowElement.cpp: (WebCore::MeterValueElement::setWidthPercentage): * html/shadow/ProgressShadowElement.cpp: (WebCore::ProgressValueElement::setWidthPercentage): * html/shadow/SliderThumbElement.cpp: (WebCore::TrackLimiterElement::create): 2011-12-01 Kelly Norton More void functions eager to return values in RenderObject & WebFrameImpl https://bugs.webkit.org/show_bug.cgi?id=73571 Reviewed by Adam Barth. * rendering/RenderObject.h: (WebCore::RenderObject::computeAbsoluteRepaintRect): 2011-12-01 Sheriff Bot Unreviewed, rolling out r101691. http://trac.webkit.org/changeset/101691 https://bugs.webkit.org/show_bug.cgi?id=73588 Tests fail on Chromium bots, early warning system warned committer, please adjust test_expectations in patch (Requested by scheib on #webkit). * platform/KURL.cpp: (WebCore::KURL::KURL): (WebCore::KURL::init): (WebCore::KURL::parse): * platform/KURL.h: * platform/cf/KURLCFNet.cpp: (WebCore::KURL::KURL): * platform/mac/KURLMac.mm: (WebCore::KURL::KURL): 2011-12-01 Peter Beverloo [Chromium] Add the FontCache implementation for Android https://bugs.webkit.org/show_bug.cgi?id=73452 Add the FontCache implementation specific for the Chromium WebKit port on Android, and include various font-related files intended for Linux which can be re-used. Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/graphics/chromium/FontCacheAndroid.cpp: Added. (WebCore::getFallbackFontName): (WebCore::isFallbackFamily): (WebCore::FontCache::platformInit): (WebCore::FontCache::getFontDataForCharacters): (WebCore::FontCache::getSimilarFontPlatformData): (WebCore::FontCache::getLastResortFallbackFont): (WebCore::FontCache::getTraitsInFamily): (WebCore::FontCache::createFontPlatformData): 2011-12-01 Tony Chang Need to implement flex-flow: row-reverse https://bugs.webkit.org/show_bug.cgi?id=70778 Reviewed by Ojan Vafai. We can't just change the direction of the FlexOrderIterator because we want the overflow to be on the left side. Instead, we apply similar logic as when we're laying out RTL content. Putting the check in isLeftToRightFlow() lets us flip the flexbox's border and padding and the flexitems' margins. We then layout from right to left in layoutAndPlaceChildren. Also remove 2 uncalled functions. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::isReverseFlow): (WebCore::RenderFlexibleBox::isLeftToRightFlow): * rendering/RenderFlexibleBox.h: 2011-12-01 Daniel Sievers [Chromium] Early returns in calculateDrawTransformsAndVisibilityInternal() are not respected by parent. https://bugs.webkit.org/show_bug.cgi?id=73270 Non-drawing child trees should not be added to the parent render surface's layer list and should neither extend the parent layer's drawable content rect. This also fixes assertions from the content texture residency logic, which doesn't like it if we try to use a render surface through a parent, while that surface itself was never 'used' in the same frame. Reviewed by James Robinson. Added unit test. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): 2011-12-01 David Reveman [Chromium] Use contentBounds instead of bounds for invalidation. https://bugs.webkit.org/show_bug.cgi?id=73525 Reviewed by James Robinson. Use setNeedsDisplay() instead of setNeedsDisplayRect() when possible. No new tests. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setBounds): 2011-12-01 Andreas Kling CSSStyleSelector: Add missing fields to constructor initializer list. Reviewed by Antti Koivisto. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): 2011-12-01 Benjamin Poulain Get rid of the unused function nameForCursorType() https://bugs.webkit.org/show_bug.cgi?id=73529 Reviewed by Joseph Pecoraro. The function nameForCursorType was introduced in r63339 and has not been used anywhere since that commit. * WebCore.exp.in: * platform/Cursor.cpp: * platform/Cursor.h: 2011-12-01 Andreas Kling CSSMutableStyleDeclaration: Unnecessary double hash lookup in construction. Reviewed by Antti Koivisto. Use HashMap::find() instead of contains() followed by get() on successful lookup. * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration): 2011-11-30 Benjamin Poulain URLs are encoded in UTF-8, then decoded as if they are Latin1 https://bugs.webkit.org/show_bug.cgi?id=71758 Reviewed by Darin Adler. Previously, invalid URLs could have a string emanating from a partial parsing of the input. The creation of the string was done through the Latin1 codec regardless of the encoding of the char* url. This caused two types of issues, URLs were evaluated as half-parsed, and the coding and decoding of the string was not consistent. This patch changes KURL::parse() to fallback on the original string whenever the parsing of the URL fails. Test: fast/url/invalid-urls-utf8.html * platform/KURL.cpp: (WebCore::KURL::KURL): (WebCore::KURL::init): (WebCore::KURL::parse): Previously, originalString was only used as an optimization to avoid the allocation of a string. Since this optimization depends on the comparison of the incoming string and the encoded buffer. This patches generalizes originalString to always be the original string being parsed by KURL. The optimization is kept by comparing that string and the final parsed result. * platform/KURL.h: (WebCore::KURL::parse): * platform/cf/KURLCFNet.cpp: (WebCore::KURL::KURL): * platform/mac/KURLMac.mm: (WebCore::KURL::KURL): 2011-12-01 Wei Charles [Blackberry] Upstream BlackBerry porting of plugin framework -- part 2 https://bugs.webkit.org/show_bug.cgi?id=73513 Reviewed by Antonio Gomes. No new tests for now. * plugins/blackberry/NPCallbacksBlackBerry.cpp: Added. * plugins/blackberry/NPCallbacksBlackBerry.h: Added. * plugins/blackberry/PluginViewPrivateBlackBerry.cpp: Added. * plugins/blackberry/PluginViewPrivateBlackBerry.h: Added. 2011-12-01 Andreas Kling JSC/CSSOM: root(CSSElementStyleDeclaration) should never need to follow the element. Reviewed by Antti Koivisto. A CSSElementStyleDeclaration should always either have a null element pointer, or return a valid parentStyleSheet(), since having an element pointer implies having an associated element sheet. In light of this, replace the opaque-root-from-element path for style declarations by an assertion. * bindings/js/JSDOMBinding.h: (WebCore::root): 2011-12-01 Patrick Gansterer [CMake] Make the feature defines for DOM names explicit https://bugs.webkit.org/show_bug.cgi?id=72812 Reviewed by Daniel Bates. * CMakeLists.txt: 2011-11-30 Dmitry Lomov https://bugs.webkit.org/show_bug.cgi?id=73503 [Chromium][V8] Implement ArrayBuffer transfer in chromium. Portions of this patch come from Luke Zarko. Reviewed by David Levin. Test: fast/canvas/webgl/arraybuffer-transfer-of-control.html * bindings/v8/SerializedScriptValue.cpp: (WebCore::V8ObjectMap::Writer::writeTransferredArrayBuffer): (WebCore::V8ObjectMap::Serializer::Serializer): (WebCore::V8ObjectMap::Serializer::writeAndGreyArrayBufferView): (WebCore::V8ObjectMap::Serializer::writeArrayBuffer): (WebCore::V8ObjectMap::Serializer::writeTransferredArrayBuffer): (WebCore::V8ObjectMap::Serializer::doSerialize): (WebCore::V8ObjectMap::Reader::read): (WebCore::V8ObjectMap::Reader::readArrayBufferView): (WebCore::V8ObjectMap::Deserializer::Deserializer): (WebCore::V8ObjectMap::Deserializer::tryGetTransferredArrayBuffer): (WebCore::SerializedScriptValue::create): (WebCore::neuterBinding): (WebCore::SerializedScriptValue::transferArrayBuffers): (WebCore::SerializedScriptValue::SerializedScriptValue): (WebCore::SerializedScriptValue::deserialize): * bindings/v8/SerializedScriptValue.h: 2011-12-01 Roland Steiner Shadow ID pseudo-element selectors serialize incorrectly https://bugs.webkit.org/show_bug.cgi?id=73542 Avoid space for ShadowDescendant combinator. Reviewed by Dimitri Glazkov. * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): 2011-12-01 Wajahat Siddiqui Popup menu can get stuck in closed state when GtkMenu can't grab mouse. https://bugs.webkit.org/show_bug.cgi?id=56466 Add a check if popup menu is not visible due to no mouse grab, Ensure WebCore is in sync with proper state. Reviewed by Martin Robinson. * platform/gtk/PopupMenuGtk.cpp: (WebCore::PopupMenuGtk::show): 2011-12-01 Eric Carlson When playing audio in