2012-02-15 Pablo Flouret Add support for the translate attribute in html elements. https://bugs.webkit.org/show_bug.cgi?id=78751 Reviewed by Adam Barth. The translate attribute is used to specify whether an element's attribute values and the values of its Text node children are to be translated when the page is localized, or whether to leave them unchanged. Details at http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#attr-translate Test: fast/dom/HTMLElement/translate.html * html/HTMLAttributeNames.in: * html/HTMLElement.cpp: (WebCore::HTMLElement::translateAttributeMode): (WebCore): (WebCore::HTMLElement::translate): (WebCore::HTMLElement::setTranslate): * html/HTMLElement.h: (HTMLElement): * html/HTMLElement.idl: 2012-02-15 Sami Kyostila Add -webkit-overflow-scrolling CSS property https://bugs.webkit.org/show_bug.cgi?id=78664 Reviewed by Eric Seidel. Add a CSS property indicating that an element with overflow scrolling should follow the platform's behavior for touch scrollable user interface objects. For instance, this property could enable momentum scrolling for the element if that is the platform convention. The property has two possible values: auto (default) and touch. The former does not alter overflow scrolling behavior, while the latter activates touch scrolling. As a side effect, enabling touch scrolling also causes an element to gain a stacking context. This is to allow the implementation to promote the scrolling contents into a render layer, which can be translated more efficiently. This property was introduced with iOS 5 WebKit. Another implementation is in Chrome for Android. Test: platform/chromium/compositing/overflow/overflow-scrolling-touch-stacking-context.html * css/CSSComputedStyleDeclaration.cpp: (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSProperty.cpp: (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): * rendering/style/StyleRareInheritedData.h: (StyleRareInheritedData): 2012-02-15 Levi Weintraub Add zeroLayoutUnit constant. https://bugs.webkit.org/show_bug.cgi?id=78747 Reviewed by Eric Seidel. Converting call sites where LayoutUnits and raw zeros are in ternary operations and templatized function calls (like std::max and min) to use a new zeroLayoutUnit constant instead of the raw zero. No new tests. No change in behavior. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow): (WebCore::InlineFlowBox::paintFillLayer): (WebCore::InlineFlowBox::paintBoxDecorations): (WebCore::InlineFlowBox::paintMask): (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): * rendering/LayoutTypes.h: (WebCore): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::MarginInfo::MarginInfo): (WebCore::RenderBlock::adjustFloatingBlock): (WebCore::RenderBlock::paintColumnRules): (WebCore::RenderBlock::nextFloatLogicalBottomBelow): (WebCore::RenderBlock::getClearDelta): (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): (WebCore::getHeightForLineCount): (WebCore::RenderBlock::adjustForUnsplittableChild): * rendering/RenderBlock.h: (WebCore::RenderBlock::paginationStrut): (WebCore::RenderBlock::pageLogicalOffset): * rendering/RenderBlockLineLayout.cpp: (WebCore::LineLayoutState::updateRepaintRangeFromBox): (WebCore::RenderBlock::addOverflowFromInlineChildren): * rendering/RenderBox.cpp: (WebCore::RenderBox::positionForPoint): * rendering/RenderBox.h: (WebCore::RenderBox::minYVisualOverflow): (WebCore::RenderBox::minXVisualOverflow): (RenderBox): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::offsetLeft): (WebCore::RenderBoxModelObject::offsetTop): (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): * rendering/RenderFileUploadControl.cpp: (WebCore::nodeWidth): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::computeLogicalWidth): * rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutlineForLine): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::listIndexAtOffset): (WebCore::RenderListBox::verticalScrollbarWidth): * rendering/RenderMarquee.cpp: (WebCore::RenderMarquee::computePosition): * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintAfterLayoutIfNeeded): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computePreferredLogicalWidths): * rendering/RenderTable.cpp: (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth): (WebCore::RenderTable::layout): * rendering/RenderTable.h: (WebCore::RenderTable::bordersPaddingAndSpacingInRowDirection): * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::layout): 2012-02-15 Alexey Proskuryakov Crash after trying to use FileReader in a document with null origin string https://bugs.webkit.org/show_bug.cgi?id=78649 Reviewed by Enrica Casucci. Test: fast/files/null-origin-string.html * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::~FileReaderLoader): HashMaps don't like empty keys, and they don't like removing keys that have never been added. 2012-02-15 Anders Carlsson Attempt to fix the Snow Leopard build. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::createTileLayer): * platform/graphics/ca/mac/WebTileCacheLayer.mm: (-[WebTileCacheLayer setContentsScale:]): 2012-02-15 Dan Bernstein REGRESSION (r107836): fast/box-shadow/spread.html and fast/writing-mode/box-shadow-*.html tests failing https://bugs.webkit.org/show_bug.cgi?id=78759 Reviewed by Simon Fraser. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::boxShadowCanBeAppliedToBackground): Added. Returns false if paintFillLayer() would push a clip before painting the layer, thus preventing it from casting its own shadow. (WebCore::InlineFlowBox::paintBoxDecorations): Pass this as an additional parameter to boxShadowShouldBeAppliedToBackground(). * rendering/InlineFlowBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Pass the InlineFlowBox along to boxShadowShouldBeAppliedToBackground(). (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground): Added an InlineFlowBox parameter. If non-0, check boxShadowCanBeAppliedToBackground(). Also check for shadow spread, and for the case of border radius with a background image, in which paintFillLayerExtended uses clipping. Finally, fixed a bug in the for() loop for finding the last background layer which was noticed by Tony Chang. * rendering/RenderBoxModelObject.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground): * rendering/RenderTableCell.h: 2012-02-15 Erik Arvidsson Expose Window constructor https://bugs.webkit.org/show_bug.cgi?id=78722 Reviewed by Adam Barth. Test: fast/dom/Window/window-constructor-presence.html * page/DOMWindow.idl: 2012-02-15 Kelly Norton fill-opacity does not render properly only on Chromium Mac. https://bugs.webkit.org/show_bug.cgi?id=78624 Reviewed by Stephen White. Test: svg/text/text-fill-opacity.svg * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::drawGlyphs): 2012-02-15 Leo Yang [BlackBerry] Upstream WebPageClient.h https://bugs.webkit.org/show_bug.cgi?id=78660 Reviewed by Antonio Gomes. Header inclusion fix, no new test. * plugins/blackberry/PluginViewPrivateBlackBerry.h: Add #include and #include because they are being removed from WebKit/blackberry/Api/WebPageClient.h. 2012-02-15 Tim Horton REGRESSION(r105057): Dynamically changing offsets is broken https://bugs.webkit.org/show_bug.cgi?id=78385 Reviewed by Simon Fraser. Don't short-circuit buildLayoutAttributesIfNeeded if m_textPositions is already full; we can't skip rebuilding the layout attributes, just walking the tree to acquire the positioning lists (invalidation of positioning lists is already covered by textDOMChanged). Test: svg/text/tspan-dynamic-positioning.svg * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesIfNeeded): 2012-02-15 Tommy Widenflycht MediaStream API: Removing SecurityContext from the embedder API https://bugs.webkit.org/show_bug.cgi?id=73816 Reviewed by Darin Fisher. Tests for the Media Stream API will be provided by the bug 56587, pending enough landed code. * mediastream/PeerConnection.cpp: (WebCore::PeerConnection::PeerConnection): * platform/mediastream/PeerConnectionHandler.h: (WebCore): (PeerConnectionHandler): * platform/mediastream/gstreamer/PeerConnectionHandler.cpp: (WebCore::PeerConnectionHandler::create): (WebCore::PeerConnectionHandler::PeerConnectionHandler): 2012-02-15 Nate Chapin Fix test regressons from r107672. https://bugs.webkit.org/show_bug.cgi?id=76564 Move setting CachedRawResource::m_identifer from data() to setResponse(). WorkerScriptLoader depends on the identifier being set correctly during setResponse() in order to correctly mark itself as a ScriptResource in the inspector. Reviewed by Adam Barth. Fixes several worker script loading tests. * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::data): (WebCore::CachedRawResource::setResponse): 2012-02-15 Enrica Casucci REGRESSION: "Copy image" fails...copies image URL instead. https://bugs.webkit.org/show_bug.cgi?id=78723 During the refactoring of the Pasteboard class some code was lost. When placing an NSImage in the NSPasteboard as NSTIFFPboardType, we need to use the its TIFF representation. Reviewed by Andy Estes. * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeImage): 2012-01-31 Raphael Kubo da Costa [soup] Add support for multiple SoupSessions. https://bugs.webkit.org/show_bug.cgi?id=77341 Reviewed by Gustavo Noronha Silva. Make the libsoup network backend support multiple SoupSessions. This is accomplished by using the NetworkingContext classes, which now have a `soupSession()' method when the libsoup backend is being used. libsoup's ResourceHandle implementation now retrieves the SoupSession via the NetworkingContext it receives instead of relying on defaultSession(). defaultSession() is still used when a null NetworkingContext is passed to ResourceHandle::start (for example, via webkit_download_start). The CookieJar implementation retrieves the SoupSession from the NetworkingContext as much as possible as well -- the functions used by WebKit2 could not be converted, though, as they seem to assume there is only one shared cookie jar. No new tests, covered by the existing ones. * platform/network/NetworkingContext.h: (NetworkingContext): Add soupSession() method if USE(SOUP) is set. * platform/network/ResourceHandleInternal.h: (ResourceHandleInternal): * platform/network/soup/CookieJarSoup.cpp: (WebCore::cookieJarForDocument): (WebCore): (WebCore::defaultCookieJar): (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandleInternal::soupSession): Add method to retrieve a SoupSession from a NetworkingContext and fallback to defaultSession() if there's no valid NetworkingContext. (WebCore): (WebCore::ensureSessionIsInitialized): Only change or use the default cookie jar if the SoupSession being changed is the default one. (WebCore::sendRequestCallback): (WebCore::startHTTPRequest): (WebCore::ResourceHandle::cancel): (WebCore::startNonHTTPRequest): 2012-02-15 Anders Carlsson The TileCache object should be deallocated on the main thread https://bugs.webkit.org/show_bug.cgi?id=78757 Reviewed by Sam Weinig. Since the WebTileCacheLayer can be deleted on the scrolling thread, we need to make sure that the underlying TileCache object is actually destroyed on the main thread. * platform/graphics/ca/mac/TileCache.h: * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::~TileCache): Assert that this object is being destroyed on the main thread. * platform/graphics/ca/mac/WebTileCacheLayer.mm: (-[WebTileCacheLayer dealloc]): If dealloc is being called from a non-main thread, make sure to delete the tile cache object on the main thread. 2012-02-15 Anders Carlsson Scrolling Coordinator must be deleted on the main thread https://bugs.webkit.org/show_bug.cgi?id=78756 Reviewed by Sam Weinig. ScrollingTree::invalidate will finish breaking the cycle between the scrolling coordinator and the scrolling tree by dereffing the scrolling coordinator. We need to make sure that this happens on the main thread because the scrolling coordinator expects to be destroyed from there. * page/scrolling/ScrollingTree.cpp: (WebCore::derefScrollingCoordinator): (WebCore): (WebCore::ScrollingTree::invalidate): 2012-02-15 Anders Carlsson Scrolling coordinator should handle pages being restored from the page cache https://bugs.webkit.org/show_bug.cgi?id=78753 Reviewed by Sam Weinig. Replace ScrollingCoordinator::frameViewScrollLayerDidChange with a new member function, ScrollingCoordinator::frameViewRootLayerDidChange which is called whenever the root layer of the frame view changes (which happens on back/forward navigation as well). In this function, reset the scrolling tree state from the frame view. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::scrollLayerForFrameView): Add a helper function. (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange): Reset the entire scrolling tree state. (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition): Call the newly added helper function. * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): * page/scrolling/mac/ScrollingCoordinatorMac.mm: Remove frameViewScrollLayerDidChange. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::ensureRootLayer): Remove call to ScrollingCoordinator::frameViewScrollLayerDidChange. (WebCore::RenderLayerCompositor::attachRootLayer): Call ScrollingCoordinator::frameViewRootLayerDidChange. 2012-02-15 Enrica Casucci Refactor ClipboardMac class to use PlatformStrategies. https://bugs.webkit.org/show_bug.cgi?id=78554 Reviewed by Anders Carlsson. No new tests. No change in behavior. * WebCore.exp.in: Added new exported methods of the PlatformPasteboard class * editing/mac/EditorMac.mm: (WebCore::Editor::newGeneralClipboard): Use name based pasteboard references. * page/DragClient.h: (WebCore::DragClient::declareAndWriteDragImage): Ditto. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::createDraggingClipboard): Ditto. * platform/PasteboardStrategy.h: Added new methods to get a unique pasteboard name and the pasteboard change count. * platform/PlatformPasteboard.h: Ditto. * platform/mac/ClipboardMac.h: (WebCore::ClipboardMac::create): Using name based pasteboard. (WebCore::ClipboardMac::pasteboardName): Replacing the old pasteboard() method. * platform/mac/ClipboardMac.mm: All the methods below have been modified to avoid using Objective-C types and direct access to NSPasteboard object. (WebCore::Clipboard::create): (WebCore::ClipboardMac::ClipboardMac): (WebCore::ClipboardMac::hasData): (WebCore::cocoaTypeFromHTMLClipboardType): (WebCore::utiTypeFromCocoaType): (WebCore::addHTMLClipboardTypesForCocoaType): (WebCore::ClipboardMac::clearData): (WebCore::ClipboardMac::clearAllData): (WebCore::absoluteURLsFromPasteboardFilenames): (WebCore::absoluteURLsFromPasteboard): (WebCore::ClipboardMac::getData): (WebCore::ClipboardMac::setData): (WebCore::ClipboardMac::types): (WebCore::ClipboardMac::files): (WebCore::ClipboardMac::setDragImage): (WebCore::ClipboardMac::writeRange): (WebCore::ClipboardMac::writePlainText): (WebCore::ClipboardMac::writeURL): (WebCore::ClipboardMac::declareAndWriteDragImage): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeClipboard): Using name based pasteboard reference. * platform/mac/PlatformPasteboardMac.mm: (WebCore::PlatformPasteboard::getPathnamesForType): Fixed to support NSArray and NString content. (WebCore::PlatformPasteboard::changeCount): Added. (WebCore::PlatformPasteboard::uniqueName): Added. 2012-02-15 Anders Carlsson TileCache needs to support setting the contents scale https://bugs.webkit.org/show_bug.cgi?id=78741 Reviewed by Sam Weinig. * platform/graphics/ca/mac/TileCache.h: * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setContentsScale): Update the contents scale of all the tiles and then revalidate the tile cache since tiles might have come and gone as a result of setting the contents scale. (WebCore::TileCache::createTileLayer): Set the contents scale of the tile layer. * platform/graphics/ca/mac/WebTileCacheLayer.mm: (-[WebTileCacheLayer setContentsScale:]): Call TileCache::setContentsScale. 2012-02-15 Anders Carlsson Try to fix the Chromium build and remove a snarky comment in the process. * platform/chromium/PopupListBox.cpp: (WebCore::PopupListBox::handleWheelEvent): 2012-02-15 Anders Carlsson Wheel events should be re-dispatched to the scrolling thread https://bugs.webkit.org/show_bug.cgi?id=78731 Reviewed by Sam Weinig. When threaded scrolling is enabled, all the state is assumed to be kept in the scrolling tree, on the scrolling thread. This means that even if we do end up processing an event on the main thread (because of wheel event handlers for example), we still have to dispatch the wheel event back to the scrolling thread. * page/FrameView.cpp: (WebCore::FrameView::wheelEvent): Move wheelEvent from ScrollView and ask the scrolling coordinator to handle the wheel event. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::handleWheelEvent): Dispatch the event to the scrolling thread, unless it will start a gesture. In that case we'll return false so that information will be passed back to the UI process. (ScrollingCoordinator): * platform/ScrollView.cpp: * platform/ScrollView.h: Move wheelEvent to FrameView. 2012-02-15 Mark Hahnenberg RootObject::finalize can cause a crash in object->invalidate() https://bugs.webkit.org/show_bug.cgi?id=78645 Reviewed by Geoffrey Garen. No new tests. * bridge/runtime_root.cpp: (JSC::Bindings::RootObject::finalize): Added a stack-allocated RefPtr to protect the RootObject during the call to invalidate(). 2012-02-15 Dan Bernstein Box shadow drawing takes an unnecessarily slow code path in some single-shadow, opaque-background cases https://bugs.webkit.org/show_bug.cgi?id=78728 In some cases, when there is only one normal box shadow, and the box has an opaque background, it is possible to draw the box shadow by having the background cast it directly. This appears to be faster than the generic code path that uses a separate drawing pass to cast the shadow, clipping out the border box and the shadow-casting box. Reviewed by Dave Hyatt. No new tests, because behavior is unchanged. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations): Changed to not paint normal box shadows if they are going to be cast by the background. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Ditto. * rendering/RenderBox.h: Made determineBackgroundBleedAvoidance() protected. * rendering/RenderBoxModelObject.cpp: (WebCore::applyBoxShadowForBackground): Added this helper function, which applies the first normal shadow from the given RenderStyle to the given GraphicsContext. (WebCore::RenderBoxModelObject::paintFillLayerExtended): Added calls to applyBoxShadowForBackground() before drawing the background color when needed. (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground): Added. Returns true in some of the cases where the box shadow can be cast by the background directly. * rendering/RenderBoxModelObject.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): Changed to not paint normal box shadows if they are going to be cast by the background. * rendering/RenderTable.cpp: (WebCore::RenderTable::paintBoxDecorations): Ditto. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground): Added this override that always returns false, because table cells sometimes apply a clip before drawing the background. * rendering/RenderTableCell.h: 2012-02-15 Ojan Vafai getComputedStyle of flex-item-align:auto should resolve to it's parent's flex-align value https://bugs.webkit.org/show_bug.cgi?id=76326 Reviewed by Tony Chang. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-02-15 Sadrul Habib Chowdhury Notify ChromeClient when touch-event handlers are installed/removed. https://bugs.webkit.org/show_bug.cgi?id=77440 Reviewed by Darin Fisher and Ryosuke Niwa. Keep a count of the number of touch-event handlers and notify the embedder when the count changes. Depending on the count, the embedder can decide whether or not to dispatch touch events to webkit. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::didAddTouchEventHandler): (WebCore): (WebCore::Document::didRemoveTouchEventHandler): * dom/Document.h: (WebCore::Document::touchEventHandlerCount): (Document): * dom/Node.cpp: (WebCore::isTouchEventType): (WebCore::tryAddEventListener): (WebCore::tryRemoveEventListener): * loader/EmptyClients.h: (WebCore::EmptyChromeClient::numTouchEventHandlersChanged): * page/ChromeClient.h: (ChromeClient): * page/Frame.cpp: (WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged): (WebCore::Frame::notifyChromeClientTouchEventHandlerCountChanged): (WebCore): * page/Frame.h: (Frame): 2012-02-15 Eric Carlson Unset the active flag when TextTrackCues go away https://bugs.webkit.org/show_bug.cgi?id=72552 Reviewed by Maciej Stachowiak. Test: media/track/track-active-cues.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadTimerFired): Configure new text tracks before preparing to load so we know about all tracks when resource selection begins. (WebCore::HTMLMediaElement::prepareForLoad): Call updateActiveTextTrackCues after setting to m_readyState is HAVE_NOTHING so all cues get deactivated. Don't build list of available text tracks because resource selection won't actually start until after the load timer fires. (WebCore::HTMLMediaElement::loadInternal): Build list of non-disabled tracks. (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Clear the active flag on all cues when m_readyState is HAVE_NOTHING or m_player is 0. (WebCore::HTMLMediaElement::setReadyState): Don't update m_readyState when tracks which haven't loaded yet will prevent events from firing. Call updateActiveTextTrackCues to ensure that the first cue(s) are shown as soon as possible. (WebCore::HTMLMediaElement::userCancelledLoad): Call updateActiveTextTrackCues when when m_readyState is HAVE_NOTHING so all cues get deactivated. 2012-02-15 Jessie Berlin WebCore build exceeds address space on 32-bit Windows builders (again). https://bugs.webkit.org/show_bug.cgi?id=78724 Reviewed by Jon Honeycutt. Add the rest of the inspector .cpp files to the InspectorAllInOne.cpp file in Production and Release builds. * WebCore.vcproj/WebCore.vcproj: In the process, let VS have its way with this file. * inspector/InspectorAllInOne.cpp: 2012-02-15 Anders Carlsson Remove ScrollableArea::handleGestureEvent https://bugs.webkit.org/show_bug.cgi?id=78661 Reviewed by Adam Roben. ScrollableArea::handleGestureEvent ends up being a no-op so remove it and the related code. * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): * platform/ScrollAnimator.cpp: * platform/ScrollAnimator.h: (ScrollAnimator): * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: (ScrollView): * platform/ScrollableArea.cpp: * platform/ScrollableArea.h: (ScrollableArea): 2012-02-14 Stephen White Fix for incorrect/offset image in CSS filters (non-composited path) https://bugs.webkit.org/show_bug.cgi?id=78626 Reviewed by Darin Adler. Test: css3/filters/multiple-filters-invalidation.html * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::prepare): When invalidating results, invalidate all intermediate filter results, not just the last effect's result. 2012-02-15 Alexander Pavlov Web Inspector: "Minus" (Delete) button disappears for hovered watch expression in Watches pane https://bugs.webkit.org/show_bug.cgi?id=78714 Reviewed by Pavel Feldman. * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype._mouseOut): 2012-02-15 Patrick Gansterer [CMake] Move RunLoop to WebCore/platform https://bugs.webkit.org/show_bug.cgi?id=78504 Reviewed by Adam Roben. r105475 moved RunLoop.cpp from WebKit2 to WebCore, but missed the CMake based ports. * CMakeLists.txt: * PlatformWinCE.cmake: 2012-02-15 Zoltan Herczeg Remove clipToImageBuffer from SourceAlpha and feComposite https://bugs.webkit.org/show_bug.cgi?id=78355 Reviewed by Nikolas Zimmermann. The implementation of clipToImageBuffer is inefficient on non-mac platforms, so we would benefit if remove it. Existing tests cover this feature. * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::platformApplySoftware): * platform/graphics/filters/SourceAlpha.cpp: (WebCore::SourceAlpha::platformApplySoftware): 2012-02-15 Simon Hausmann [Qt] Replace use of QGLWidget/QGLContext with QOpenGLContext and QSurface for Qt 5 https://bugs.webkit.org/show_bug.cgi?id=78694 Reviewed by Noam Rosenthal. Typedef PlatformGraphicsContext3D and PlatformGraphicsSurface3D to QOpenGLContext and QSurface for Qt 5. Use these APIs to change the current context and get the procedure addresses. Removed QGraphicsObject inheritance remainder while we're at it, because that code path is obsolete. * platform/graphics/GraphicsContext3D.h: * platform/graphics/cairo/OpenGLShims.cpp: (WebCore::getProcAddress): * platform/graphics/cairo/OpenGLShims.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext): (WebCore::GraphicsContext3DPrivate::makeCurrentIfNeeded): (WebCore::GraphicsContext3D::~GraphicsContext3D): 2012-02-15 Simon Hausmann [Qt] Move Qt platform specific GL Context/Surface creation out of WebCore into WebKit https://bugs.webkit.org/show_bug.cgi?id=78692 Reviewed by Noam Rosenthal. Replace the "glWidget" term in the GraphicsContext with "surface" and delegate the context and surface creation to the page client. * platform/graphics/GraphicsContext3D.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: (GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext): (WebCore::GraphicsContext3DPrivate::makeCurrentIfNeeded): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::platformGraphicsContext3D): * platform/qt/QWebPageClient.h: (QWebPageClient): 2012-02-15 No'am Rosenthal [Texmap] Support filters in TextureMapperImageBuffer https://bugs.webkit.org/show_bug.cgi?id=76026 Implement GraphicsLayer::setFilters for TextureMapper, and pass the filters all the way to BitmapTextureImageBuffer. This does not introduce a new filters implementation, but rather uses the non-AC implementation. A complete implementation will be needed in TextureMapperGL, which can use some of the glue in this code. Reviewed by Kenneth Rohde Christiansen. Unskipped 10 tests in css3/filters. * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore): (WebCore::GraphicsLayerTextureMapper::setFilters): * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (GraphicsLayerTextureMapper): * platform/graphics/texmap/TextureMapper.h: (BitmapTexture): (WebCore::BitmapTexture::applyFilters): * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore): (WebCore::BitmapTextureImageBuffer::applyFilters): * platform/graphics/texmap/TextureMapperImageBuffer.h: (BitmapTextureImageBuffer): * platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::shouldPaintToIntermediateSurface): (WebCore): (WebCore::applyFilters): (WebCore::TextureMapperLayer::paintRecursive): (WebCore::TextureMapperLayer::syncCompositingStateSelf): * platform/graphics/texmap/TextureMapperLayer.h: (State): 2012-02-15 Simon Hausmann [Qt] Clean up fallback rendering of GraphicsContext3D to Canvas https://bugs.webkit.org/show_bug.cgi?id=78690 Reviewed by Noam Rosenthal. Use the common paintRenderingResultsToCanvas code to retrieve the pixels from the FBO and use a Qt port specific paintToCanvas implementation to wrap the pixels into a QImage and render it into the graphics context, just like it's done for the other ports. This removes the QGraphicsObject based paint, which is an now obsolete method of rendering. * platform/graphics/GraphicsContext3D.h: * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): * platform/graphics/qt/GraphicsContext3DQt.cpp: (GraphicsContext3DPrivate): (WebCore::GraphicsContext3D::paintToCanvas): 2012-02-14 Simon Hausmann [Qt] Eliminate first set of QtWidgets dependencies from WebCore https://bugs.webkit.org/show_bug.cgi?id=78611 Reviewed by Kenneth Rohde Christiansen. * bindings/js/ScriptControllerQt.cpp: Remove unused include. * page/qt/EventHandlerQt.cpp: (WebCore::EventHandler::tabsToAllFormControls): Replace import of private Qt(Widgets) variable with the default of Qt 5, where it is also not configurable. * platform/ContextMenu.h: Remove unused include. * platform/ContextMenuItem.h: Ditto. * platform/Widget.h: Use QObject as type for PlatformWidget instead of QWidget. * platform/graphics/Icon.h: (Icon): Prefer QImage over QIcon for storage. * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: (WebCore): Make it compile with QWindow for Qt 5 and QWidget for Qt 4. * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp: (FullScreenVideoWindow::FullScreenVideoWindow): (FullScreenVideoWindow::keyPressEvent): (FullScreenVideoWindow::event): (FullScreenVideoWindow::showFullScreen): (PlatformVideoWindow::PlatformVideoWindow): * platform/graphics/qt/IconQt.cpp: Revert the implementation of this class back to notImplemented(). It was trying to load the actual file as QIcon instead of trying to find a symbolic icon for the given file. We should probably use the QMimeType API in Qt 5 once it becomes available. (WebCore::Icon::createIconForFiles): (WebCore::Icon::paint): * platform/graphics/qt/ImageQt.cpp: (graphics): Remove use of QStyle for retrieving icons. Code moved to WebCoreSupport instead. * platform/qt/ContextMenuQt.cpp: Removed unused include. * platform/qt/PlatformScreenQt.cpp: Add #ifdefs to use QScreen API with Qt 5. (WebCore::screenDepth): (WebCore::screenDepthPerComponent): (WebCore::screenIsMonochrome): (WebCore::screenRect): (WebCore::screenAvailableRect): * platform/qt/QWebPageClient.h: Add hook for showing/hiding widget. (WebCore): (QWebPageClient): * platform/qt/SoundQt.cpp: (WebCore::systemBeep): Beep is not implemented in Qt 5 and its use is questionable. Move back to notImplemented() until proper QPA API becomes available in Qt 5 (if ever...). * platform/qt/WidgetQt.cpp: Delegate QWidget specific show/hide calls to the PageClient, out of WebCore. (WebCore::Widget::Widget): (WebCore::Widget::show): (WebCore::Widget::hide): * plugins/PluginView.h: Remove unused include. * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): When dumping properties of QWidget, use the QObject property API to retrieve the values instead of QWidget specific API. Removed the mask from the dump as it's not available as property and our layout tests don't seem to use it. 2012-02-15 Alexander Pavlov Web Inspector: Fix minor design issues in the Spectrum color picker https://bugs.webkit.org/show_bug.cgi?id=78693 Drive-by: frontend compilability fixes. Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/compile-front-end.sh: * inspector/front-end/ElementsPanel.js: * inspector/front-end/Popover.js: * inspector/front-end/Spectrum.js: (WebInspector.Spectrum.rgbaToHSVA): (WebInspector.Spectrum.prototype.set color): (WebInspector.Spectrum.prototype.get isVisible): (WebInspector.Spectrum.prototype.toggle): (WebInspector.Spectrum.prototype.show): (WebInspector.Spectrum.prototype.hide): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype.updateTitle.): * inspector/front-end/elementsPanel.css: (.spectrum-container): (.spectrum-top): (.spectrum-color): (.spectrum-hue): (.spectrum-fill): (.spectrum-range-container): (.spectrum-range-container *): (.spectrum-range-container label): (.spectrum-range-container input): (.swatch, .spectrum-dragger, .spectrum-slider): (.spectrum-sat): (.spectrum-val): (.spectrum-dragger): (.spectrum-slider): * inspector/front-end/inspector.css: (.custom-popup-vertical-scroll ::-webkit-scrollbar-track-piece:vertical:increment): 2012-02-15 Yury Semikhatsky Unreviewed. Build fix after r107806 * inspector/InjectedScript.cpp: (WebCore::InjectedScript::callFunctionWithEvalEnabled): * inspector/InjectedScript.h: (InjectedScript): 2012-02-15 Yury Semikhatsky Web Inspector: crash when inspecting an element on a page with eval disabled by CSP https://bugs.webkit.org/show_bug.cgi?id=78705 Inspector functions in injected script may use eval so we need to make sure it is allowed for inspector code on pages where it is prohibited by CSP. Reviewed by Pavel Feldman. Test: inspector/elements/resolve-node-blocked.html * inspector/InjectedScript.cpp: (WebCore::InjectedScript::nodeForObjectId): (WebCore::InjectedScript::wrapCallFrames): (WebCore::InjectedScript::wrapObject): (WebCore::InjectedScript::releaseObjectGroup): (WebCore::InjectedScript::callFunctionWithEvalEnabled): (WebCore): (WebCore::InjectedScript::makeCall): * inspector/InjectedScript.h: (InjectedScript): 2012-02-13 Brian Grinstead Web Inspector: Add colorpicker functionality to color swatches in Styles Sidebar https://bugs.webkit.org/show_bug.cgi?id=71262 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/Settings.js: * inspector/front-end/Spectrum.js: Added. (WebInspector.Spectrum.hueDrag): (WebInspector.Spectrum.colorDrag): (WebInspector.Spectrum.alphaDrag): (WebInspector.Spectrum): (WebInspector.Spectrum.hsvaToRGBA): (WebInspector.Spectrum.rgbaToHSVA): (WebInspector.Spectrum.draggable.prevent): (WebInspector.Spectrum.draggable.move): (WebInspector.Spectrum.draggable.start): (WebInspector.Spectrum.draggable.stop): (WebInspector.Spectrum.draggable): (WebInspector.Spectrum.prototype.set color): (WebInspector.Spectrum.prototype.get color): (WebInspector.Spectrum.prototype.get outputColorFormat): (WebInspector.Spectrum.prototype.get colorHueOnly): (WebInspector.Spectrum.prototype.set displayText): (WebInspector.Spectrum.prototype._onchange): (WebInspector.Spectrum.prototype._updateHelperLocations): (WebInspector.Spectrum.prototype._updateUI): (WebInspector.Spectrum.prototype.toggle): (WebInspector.Spectrum.prototype.show): (WebInspector.Spectrum.prototype.reposition): (WebInspector.Spectrum.prototype.hide): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylePropertyTreeElement.prototype.updateTitle.): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: (.swatch): (.swatch-inner): (.spectrum-container): (.spectrum-top): (.spectrum-color): (.spectrum-hue): (.spectrum-fill): (.spectrum-range-container): (.spectrum-range-container *): (.spectrum-range-container label): (.spectrum-range-container input): (.swatch, .spectrum-dragger, .spectrum-slider): (.spectrum-sat): (.spectrum-val): (.spectrum-dragger): (.spectrum-slider): * inspector/front-end/inspector.html: 2012-02-15 Kenneth Rohde Christiansen [Qt] Be smarter with tile usages during tiling https://bugs.webkit.org/show_bug.cgi?id=78243 Reviewed by Simon Hausmann. The keep rect used to know what existing tiles to keep around, is now a padding (in tile dimensions) around the usual cover rect. With usual, I mean to point out that we take our panning optimization into account. We also do a good effort at keeping the amount of tiles steady, by not simply intersecting our areas with the contentRect, but moving it first into legal bounds and then expanding in opposite direction to cover a similar amount of pixels. In the future the cover area should be calculated given available system memory. * platform/graphics/TiledBackingStore.cpp: (WebCore): (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::adjustForContentsRect): (WebCore::TiledBackingStore::computeCoverAndKeepRect): (WebCore::TiledBackingStore::tileRectForCoordinate): * platform/graphics/TiledBackingStore.h: (TiledBackingStore): 2012-02-13 Vsevolod Vlasov Web Inspector: [InspectorIndexedDB] Pass data entries from object stores and indexes to front-end. https://bugs.webkit.org/show_bug.cgi?id=78503 Reviewed by Yury Semikhatsky. Test: http/tests/inspector/indexeddb/database-data.html * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::deserializeForInspector): (WebCore): * bindings/js/SerializedScriptValue.h: (SerializedScriptValue): * bindings/v8/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::deserializeForInspector): (WebCore): * bindings/v8/SerializedScriptValue.h: (SerializedScriptValue): * inspector/InjectedScript.cpp: (WebCore::InjectedScript::wrapObject): (WebCore::InjectedScript::wrapSerializedObject): (WebCore): (WebCore::InjectedScript::canAccessInspectedWindow): * inspector/InjectedScript.h: (InjectedScript): * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent): (WebCore::assertFrame): (WebCore::assertDocument): (WebCore::InspectorIndexedDBAgent::requestData): * inspector/InspectorIndexedDBAgent.h: (WebCore): (WebCore::InspectorIndexedDBAgent::create): (InspectorIndexedDBAgent): * inspector/front-end/IndexedDBModel.js: (WebInspector.IndexedDBModel.idbKeyFromKey): (WebInspector.IndexedDBModel.keyFromIDBKey): (WebInspector.IndexedDBModel.keyRangeFromIDBKeyRange): (WebInspector.IndexedDBModel.prototype._loadDatabase): (WebInspector.IndexedDBModel.prototype.loadObjectStoreData): (WebInspector.IndexedDBModel.prototype.loadIndexData): (WebInspector.IndexedDBModel.Entry): (WebInspector.IndexedDBRequestManager): (WebInspector.IndexedDBRequestManager.prototype._requestData.innerCallback): (WebInspector.IndexedDBRequestManager.prototype._requestData): (WebInspector.IndexedDBRequestManager.prototype.requestObjectStoreData): (WebInspector.IndexedDBRequestManager.prototype._objectStoreDataLoaded): (WebInspector.IndexedDBRequestManager.prototype.requestIndexData): (WebInspector.IndexedDBRequestManager.prototype._indexDataLoaded): (WebInspector.IndexedDBRequestManager.prototype._frameDetached): (WebInspector.IndexedDBRequestManager.prototype._databaseRemoved): (WebInspector.IndexedDBRequestManager.prototype._reset): (WebInspector.IndexedDBRequestManager.DataRequest): (WebInspector.IndexedDBDispatcher.prototype.databaseLoaded): (WebInspector.IndexedDBDispatcher.prototype.objectStoreDataLoaded): (WebInspector.IndexedDBDispatcher.prototype.indexDataLoaded): 2012-02-15 Hajime Morrita REGRESSION(r107518): DeviceOrientationController doesn't remove registered DOMWindows https://bugs.webkit.org/show_bug.cgi?id=78683 Reviewed by Kentaro Hara. A copy-n-paste disaster. This change fixed it by calling correct methods. No new tests. Needs browser side mocking for testing this. A Chromium automated test covers this. * page/DOMWindow.cpp: (WebCore::DOMWindow::removeAllEventListeners): * page/Page.cpp: (WebCore::Page::provideSupplement): (WebCore::Page::requireSupplement): * page/Page.h: Fix typo. (Page): 2012-02-15 Roland Steiner Unreviewed, quick build fix for 107792 * inspector/DOMEditor.cpp: (WebCore::DOMEditor::RemoveAttributeAction::redo): 2012-02-15 Tony Gentilcore [chromium] Don't use increased FontCache size on Android https://bugs.webkit.org/show_bug.cgi?id=78656 Reviewed by Adam Barth. The chromium port uses a larger font cache size because it increases performance on the intl1 and intl2 page cyclers. However, on Android devices where resources are more constrained, it isn't desireable to allow the FontCache to grow so big. No new tests because no testable difference in functionality. * platform/graphics/FontCache.cpp: (WebCore): 2012-02-15 Roland Steiner When this pattern is used it is also common that the rules only apply to elements that come after the style element. When the set of active stylesheets changes we invalidate and recompute the entire document style. This is very expensive. We can detect the case above and avoid the style recalc. On engadget.com, this patch cuts the time spent in style recalcs to roughly half. There are further savings from reduced relayouts. In total the engine CPU time used over the page load is reduced by ~10%. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::collectFeatures): Refactor feature collection from constructor to a separate function. (WebCore::CSSStyleSelector::appendAuthorStylesheets): New function for non-destructively updating the style selector. (WebCore::CSSStyleSelector::Features::clear): Clear the features for another collection. (WebCore::CSSStyleSelector::determineStylesheetSelectorScopes): Find if all rules on a stylesheetare scoped to some set of ids and classes. (WebCore::CSSStyleSelector::styleForDocument): Add optional font selector argument. We updated the correct base style font on style selector construction but that is no longer sufficient as font selector may be updated without reconstructing the style selector. (WebCore::RuleSet::addRulesFromSheet): Invalidate the matched declaration cache in case of new font-face rules. * css/CSSStyleSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::determineSelectorScopes): Find if all rules on a selector list are scoped to some set of ids and classes. * css/SelectorChecker.h: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::recalcStyle): Pass the font selector, if exists, to styleForDocument so we always have the base font up to date. (WebCore::Document::combineCSSFeatureFlags): (WebCore::Document::resetCSSFeatureFlags): (WebCore::Document::createStyleSelector): Refactor css feature flag resetting to functions. (WebCore::Document::removePendingSheet): Use new PendingStylesheetCompleted flag when new stylesheets arrive. (WebCore::Document::styleSelectorChanged): Skip style recalc if it is not needed. (WebCore::Document::collectActiveStylesheets): Refactor collecting stylesheets to a separate function. (WebCore::Document::testAddedStylesheetRequiresStyleRecalc): Determine the scopes and use hasElementWithId/getElementsByClassName to figure out if any scoped elements currently exist in the tree. (WebCore::Document::analyzeStylesheetChange): Figure out if we can update the style selector incrementally and if we can skip the style recalc. (WebCore::Document::updateActiveStylesheets): Renamed from recalcStyleSelector. Invoke the new analysis functions. * dom/Document.h: 2012-01-04 Igor Oliveira Share fractional time code between AnimationBase and KeyframeAnimation https://bugs.webkit.org/show_bug.cgi?id=75549 Remove left over from changeset 104045. Unreviewed trivial fix. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::fractionalTime): 2012-01-04 Igor Oliveira Share fractional time code between AnimationBase and KeyframeAnimation https://bugs.webkit.org/show_bug.cgi?id=75549 Share fractional time calculation between AnimationBase and KeyframeAnimation. Reviewed by Simon Fraser. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::fractionalTime): (WebCore::AnimationBase::progress): * page/animation/AnimationBase.h: * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): 2012-01-03 Vangelis Kokkevis [chromium] Bypass the shadow texture copy for accelerated canvas when running the compositor in single threaded mode. https://bugs.webkit.org/show_bug.cgi?id=75146 The texture copy fails on Windows as glCopyTexImage2D() doesn't support BGRA source textures. This change also modifies Canvas2DLayerChromium::updateCompositorResources to call glCopyTexSubImage2D() instead of glCopyTexImage2D() so that the copy can work with texture allocated via the glTexStorage2D extension. Reviewed by James Robinson. Tests: Canvas2DLayerChromiumTest.cpp * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: 2012-01-04 Adam Roben Use one big printf command instead of many chained echo commands to generate idl_files.tmp This works around a bug in Cygwin where sh.exe will crash if given a too-long sequence of &&-chained commands. Fixes REGRESSION (r103519): WebCore's DerivedSources.make crashes sh.exe if path to WebKit source tree is long enough Reviewed by Antti Koivisto. * DerivedSources.make: Change the '(echo foo && echo bar && echo baz && echo -n) > ./idl_files.tmp' command to 'printf "foo\nbar\nbaz\n" > ./idl_files.tmp'. We use the patsubst function to append "\n" to each IDL filename, then use the subst function to remove the spaces between the filenames. 2012-01-04 Mihnea Ovidenie [CSSRegions]Rollout support for background-color region styling https://bugs.webkit.org/show_bug.cgi?id=75007 Reviewed by Tony Chang. Removed functionality, therefore no new tests. Since this is a temporary rollout, the tests for region-style with background-color are not removed in this patch, just skipped. * WebCore.exp.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::addMatchedDeclaration): (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::matchAllRules): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::RuleData::RuleData): (WebCore::RuleSet::RuleSet): (WebCore::RuleSet::addToRuleSet): (WebCore::CSSStyleSelector::applyDeclarations): (WebCore::CSSStyleSelector::applyProperty): * css/CSSStyleSelector.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::setRegionRangeForBox): * rendering/RenderFlowThread.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paint): (WebCore::RenderLayer::hitTest): * rendering/RenderObject.cpp: * rendering/RenderObject.h: * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): * rendering/RenderRegion.cpp: * rendering/RenderRegion.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: 2012-01-04 Tor Arne Vestbø [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies The custom qmake variable 'WEBKIT' is used for signaling that a target depends in some way on other subproject of the WebKit project. For now this is limited to the set of intermediate libraries: wtf, javascriptcore, webcore, and webkit2. This replaces the previous convension of using load(foo) for just include paths, and CONFIG += foo to also link against foo. Adding a dependency results in additional include paths being available, and potentially linking to the library. This is decided by the build system based on conditions such as what kind of target is being built and the general build config. An advantage to his approach is that it simplifies the individual foo.prf files, for example by allowing us to use INCLUDEPATH += and LIBS += as normal instead of prepending. Reviewed by Simon Hausmann. * Target.pri: 2012-01-03 Adam Barth HTMLConstructionSite::attach shouldn't return a value https://bugs.webkit.org/show_bug.cgi?id=75520 Reviewed by Eric Seidel. We used to return a value to avoid some refchurn, but now that we're using tasks, we always need to take that reference. Removing the return value lets us remove the template parameter, which is a boon. This patch has no impact on the html-parser.html benchmark. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attachLater): (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody): (WebCore::HTMLConstructionSite::insertDoctype): (WebCore::HTMLConstructionSite::insertComment): (WebCore::HTMLConstructionSite::insertCommentOnDocument): (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement): (WebCore::HTMLConstructionSite::insertHTMLHeadElement): (WebCore::HTMLConstructionSite::insertHTMLBodyElement): (WebCore::HTMLConstructionSite::insertHTMLFormElement): (WebCore::HTMLConstructionSite::insertHTMLElement): (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::insertForeignElement): (WebCore::HTMLConstructionSite::insertTextNode): (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements): (WebCore::HTMLConstructionSite::fosterParent): * html/parser/HTMLConstructionSite.h: 2012-01-03 Adam Barth Fix assert when foster parenting self-closing elements https://bugs.webkit.org/show_bug.cgi?id=75527 Unreviewed. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::fosterParent): - We can't execute this task immediately because the code for self-closing elements wants to set the self-closing flag. Instead, we queue the task. 2012-01-03 Charles Wei [BlackBerry] Need to support credentials in the URL https://bugs.webkit.org/show_bug.cgi?id=75341 Reviewed by George Staikos. No new tests required. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::sendRequestWithCredentials): 2012-01-03 Noel Gordon [chromium] Use data decoding swizzle for turbo JPEG grayscale images https://bugs.webkit.org/show_bug.cgi?id=75189 Reviewed by Adam Barth. No new tests. Covered by exiting tests, in particular for grayscale images that were corrupted by earlier versions on libjpeg-turbo: tables/mozilla/bugs/bug29314.html tables/mozilla/bugs/bug13169.html tables/mozilla/bugs/bug10565.html tables/mozilla/bugs/bug11026.html fast/repaint/backgroundSizeRepaint.html fast/repaint/block-layout-inline-children-replaced.html fast/repaint/clipped-relative.html fast/repaint/selected-replaced.html tables/mozilla/bugs/bug12908-1.html * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageReader::decode): Use a data decoding swizzle for JCS_GRAYSCALE images. 2012-01-03 Adam Barth Minor speed improvement in HTML parser https://bugs.webkit.org/show_bug.cgi?id=75517 Reviewed by Eric Seidel. This improves the html-parser.html benchmark by 0.3%. I don't think that's actually anything to write home about, but this patch makes me feel better about my life. * html/parser/HTMLFormattingElementList.cpp: (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly): 2012-01-03 Kentaro Hara Remove temporary code that we've inserted to implement the [Supplemental] IDL incrementally https://bugs.webkit.org/show_bug.cgi?id=75510 Reviewed by Adam Barth. Now all build systems support the [Supplemental] IDL. This patch removes all temporary code that we've inserted to implement the [Supplemental] IDL. No tests. No change in behavior. Confirm that all builds pass. * bindings/js/JSDOMWindowCustom.cpp: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bindings/scripts/generate-bindings.pl: * page/DOMWindow.idl: Removed all attributes with a temporal [Supplemented] IDL. 2012-01-03 Karl Koscher Give embedders a chance to handle postMessage calls https://bugs.webkit.org/show_bug.cgi?id=73883 To support cross-process postMessage calls in Chromium (bug 73337), we need to intercept postMessage calls to proxy windows. Originally we were just going to add a native event listener on the Chromium side, but that required more changes to WebKit and was a bit of a hack. See bug 73359 for a discuss about moving to this approach. Reviewed by Adam Barth. Test: platform/chromium/fast/events/intercept-postmessage.html * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::willCheckAndDispatchPostMessage): new method to allow the embedder to intercept postMessage calls * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): add a call to FrameLoaderClient::willCheckAndDispatchPostMessage 2012-01-03 Eric Penner [chromium] Prevent crashing due to NULL texture updater. https://bugs.webkit.org/show_bug.cgi?id=75288 Reviewed by James Robinson. * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: * platform/graphics/chromium/ImageLayerChromium.h: 2012-01-03 Shawn Singh [chromium] CCLayerSorter accidentally reverses order of some layers. https://bugs.webkit.org/show_bug.cgi?id=75046 Reviewed by James Robinson. Unit test added to CCLayerSorterTest.cpp Fixes two related bugs that were causing z-ordering problems in layers when preserves3D triggers the need for layer sorting. The first problem was that CCLayerSorter accidentally reversed the order of layers when there was no sorting dependency between them. The second problem was that zDiff had numerical precision problems that forced sorting dependencies that were sometimes incorrect, when the dependencies should not have existed. * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::checkOverlap): (WebCore::CCLayerSorter::sort): 2012-01-03 Leo Yang [BlackBerry] Add support of blob form data to the BlackBerry port https://bugs.webkit.org/show_bug.cgi?id=75218 Pass FormDataElement::encodedBlob type of form data to the BlackBerry platform request to support blob data and blob file range. Reviewed by George Staikos. The port can't be built now, no new tests so far. * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore::ResourceRequest::initializePlatformRequest): 2012-01-03 Adam Barth Two null crashes in Treebuilder https://bugs.webkit.org/show_bug.cgi?id=66101 Reviewed by Eric Seidel. The underly issue with causing the crash is that we're re-entering the tree builder. We've done a bunch of point fixes around tree builder re-entrancy, but neither the implementation nor the specification are really designed to handle re-entrancy. Firefox avoids this problem by putting the parser on its own thread. I don't think we're quite ready to do that yet (although we will eventually, presumably, as computers become ever more parallel). The approach in this patch is to queue up the DOM mutations and actually perform them on a shallower stack. That's essentially the approach we've used for executing . This patch queues up DOM modifications and executes them from a clean call stack, stopping us from re-entering the tree builder. We might need to experiment with exactly where to kick off the queue, but this location seems reasonable and fixes the crash. Test: fast/parser/re-enter-and-crash.html * html/parser/HTMLConstructionSite.cpp: (WebCore::executeTask): - Add a helper function for actually executing a queue DOM mutation. (WebCore::HTMLConstructionSite::attach): - Instead of actually attaching the element to the DOM, this function now queues the element for attachment. In a follow-up patch, I plan to change this function to return void (and I'll probably rename it to something that makes it clear that it only queues the attachment). (WebCore::HTMLConstructionSite::executeQueuedTasks): (WebCore::HTMLConstructionSite::insertDoctype): - Setting the compatmode from the Doctype requires the doctype to actually be in the DOM, so we need to execute our queued tasks synchronously. We can likely improve this function by passing the Doctype element explicitly in a follow-up patch. (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement): (WebCore::HTMLConstructionSite::insertTextNode): (WebCore::HTMLConstructionSite::findFosterSite): (WebCore::HTMLConstructionSite::fosterParent): * html/parser/HTMLConstructionSite.h: (WebCore::HTMLConstructionSiteTask::HTMLConstructionSiteTask): - Add a task object that holds on to the relevant elements. We define some vector traits for this object to match the traits on RefPtr (which make Vector operations faster by explaining that this type is moveable without having to churn reference counts). * html/parser/HTMLElementStack.cpp: (WebCore::HTMLElementStack::pushCommon): - We delay the "begin parsing" call until we actually attach the element to the DOM. That splits the responsibility for calling begin/finished, which is less than ideal, but I didn't see another solution. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken): - Kick off the queued mutations. 2012-01-03 Adam Barth view-source doesn't colorize correctly https://bugs.webkit.org/show_bug.cgi?id=62971 Reviewed by Eric Seidel. The reason these tags weren't colorized correctly was because the characters for the end tags where consumed by the tokenizer at the same time as it consumed the text of the script tag. These characters are buffered internally by the tokenizer because the tokenizer is searching for "an appropriate end tag", which is "" in this case. I tried a number of different approaches to fixing this bug. The approach in this patch adds an accessor to the tokenizer to read out the buffered characters. This approach makes it easier for the HTMLSourceTracker to get exactly the right value for these buffered characters without having to do a complicated simulation of the buffering itself. Tests: fast/frames/viewsource-plain-text-tags.html: * html/parser/HTMLViewSourceParser.cpp: (WebCore::HTMLViewSourceParser::pumpTokenizer): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): - Give the HTMLSourceTracker a pointer to the tokenizer so it can ask for the buffered characters. * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::start): - The idea here is to treat characters buffered internally by the tokenizer the same way we treat characters that were contained in a previous segment of source. We copy them into our accumulation buffer and adjust the token base offset to account for the extra characters. (WebCore::HTMLSourceTracker::end): - Don't consier the character buffered by the tokenizer to be part of the token we've just finished. (WebCore::HTMLSourceTracker::sourceForToken): - Remove the assumption that all of the m_previousSource is contained in the source for the current token. Because we now understand that the tokenizer can buffer some characters internally, we might not exhaust the m_previousSource. * html/parser/HTMLSourceTracker.h: - Rename m_sourceFromPreviousSegments to m_previousSource and changed to a SegementedString to avoid extra mallocs we keep appending tiny segments. - Rename m_source to m_currentSource to contrast nicely with m_previousSource. * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::flushBufferedEndTag): (WebCore::HTMLTokenizer::nextToken): - Previously, we cleared the temporary buffer lazily when we needed to add new characters to it. Now we clear it eagerly so that it's length tells us whether we're currently using it to store characters. - Previously, we weren't storing the character that we used to terminate the appropriate end tag (e.g., the > in ) because we didn't need to "unbuffer" that character into the HTMLToken::appendToCharacter. Now, we do store that character in the temporary buffer so that the HTMLSourceTracker can see that character. (WebCore::HTMLTokenizer::bufferedCharacters): * html/parser/HTMLTokenizer.h: (WebCore::HTMLTokenizer::numberOfBufferedCharacters): - Add accessor methods to copy out the buffered characters. - Also, unrelated to the rest of this patch, I made the constructor for HTMLTokenizer explicit because it takes only a single paramater, per the style guide. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::clear): - SegmentedString::clear wasn't clearing all of its state. I don't think this issue was actually observable, but I noticed it when working on this patch, so I fixed it. 2012-01-03 Benjamin Poulain Exclude Mac's PlatformEventFactory from iOS https://bugs.webkit.org/show_bug.cgi?id=75493 Reviewed by Sam Weinig. Move PlatformEventFactory.(h|cpp) to PlatformEventFactoryMac(h|cpp) and exclude the file from iOS build. * Configurations/WebCore.xcconfig: Also exclude EventHandlerMac for consistency. * WebCore.xcodeproj/project.pbxproj: * page/mac/EventHandlerMac.mm: * platform/mac/PlatformEventFactoryMac.h: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.h. * platform/mac/PlatformEventFactoryMac.mm: Renamed from Source/WebCore/platform/mac/PlatformEventFactory.mm. (WebCore::globalPoint): (WebCore::globalPointForEvent): (WebCore::pointForEvent): (WebCore::mouseButtonForEvent): (WebCore::mouseEventTypeForEvent): (WebCore::clickCountForEvent): (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): (WebCore::gestureEventTypeForEvent): (WebCore::textFromEvent): (WebCore::unmodifiedTextFromEvent): (WebCore::keyIdentifierForKeyEvent): (WebCore::isKeypadEvent): (WebCore::windowsKeyCodeForKeyEvent): (WebCore::isKeyUpEvent): (WebCore::modifiersForEvent): (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): (WebCore::PlatformEventFactory::createPlatformMouseEvent): (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): (WebCore::PlatformEventFactory::createPlatformWheelEvent): (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): (WebCore::PlatformEventFactory::createPlatformKeyboardEvent): (WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder): (WebCore::PlatformEventFactory::createPlatformGestureEvent): 2012-01-03 Wei James Optimize AudioBufferSourceNode process by avoiding interpolation when pitchRate==1 https://bugs.webkit.org/show_bug.cgi?id=74592 Reviewed by Kenneth Russell. Covered by existing webaudio layout tests, especially webaudio/audiobuffersource-playbackrate.html * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping): (WebCore::AudioBufferSourceNode::renderFromBuffer): * webaudio/AudioBufferSourceNode.h: 2012-01-03 Joseph Pecoraro Web Inspector: Access to Node Highlighting info without drawing https://bugs.webkit.org/show_bug.cgi?id=75504 Provide a "getHighlight" method alongside "drawHighlight" that gets most of the important node highlighting information. This can be used by a port to do its own node highlighting or provide extra content without interfering with the highlight rects. Reviewed by Timothy Hatcher. * WebCore.xcodeproj/project.pbxproj: Privately expose the Highlight struct in DOMNodeHighlighter.h. * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawHighlight): (WebCore::DOMNodeHighlighter::getHighlight): * inspector/DOMNodeHighlighter.h: Reuse the existing draw code to instead populate the Highlight struct with the information it is about to draw, and only draw if there is a context. * inspector/InspectorController.cpp: (WebCore::InspectorController::getHighlight): * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getHighlight): * inspector/InspectorDOMAgent.h: Get highlight information by going through getHighlight in InspectorController. This is alongside drawHighlight. 2012-01-03 Shawn Singh [chromium] Push drawsContent and contentsVisible into accelerated compositor https://bugs.webkit.org/show_bug.cgi?id=71209 Reviewed by James Robinson. Tests: compositing/visibility/visibility-simple-canvas2d-layer.html compositing/visibility/visibility-simple-video-layer.html compositing/visibility/visibility-simple-webgl-layer.html Rebaselined compositing/visibility/visibility-image-layers.html The CSS visibility property was not being properly obeyed by many specialized layer types in the accelerated compositor. The root of the problem was that drawsContent and contentsVisible flags were not properly propagated into the compositor. This patch removes the drawsContent() callback, and instead makes sure that drawsContent and contentsVisible are "pushed" through the accelerated compositor. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::drawsContent): * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setDrawsContent): (WebCore::GraphicsLayerChromium::setContentsVisible): (WebCore::GraphicsLayerChromium::setContentsToImage): (WebCore::GraphicsLayerChromium::setContentsToCanvas): (WebCore::GraphicsLayerChromium::setContentsToMedia): (WebCore::GraphicsLayerChromium::updateLayerIsDrawable): (WebCore::GraphicsLayerChromium::setupContentsLayer): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::setIsDrawable): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::drawsContent): * platform/graphics/chromium/PluginLayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::drawsContent): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::drawsContent): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::dumpLayerProperties): 2012-01-03 Shawn Singh [chromium] Make sure root damage rect gets passed to renderer https://bugs.webkit.org/show_bug.cgi?id=74893 Reviewed by James Robinson. Unit test added to CCLayerTreeHostImplTest.cpp * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::swapBuffers): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::swapBuffers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: 2012-01-03 Yuzhu Shen v8 binding: npCreateV8ScriptObject() should not returned an existing V8NPObject if the rootObject doesn't match https://bugs.webkit.org/show_bug.cgi?id=74515 Reviewed by Nate Chapin. Test: http/tests/plugins/create-v8-script-objects.html * bindings/v8/NPV8Object.cpp: (WebCore::freeV8NPObject): (WebCore::npCreateV8ScriptObject): 2012-01-03 Jon Lee Leak of WebNotificationClient when page is destroyed https://bugs.webkit.org/show_bug.cgi?id=74980 Reviewed by Mark Rowe. * notifications/NotificationController.cpp: (WebCore::NotificationController::~NotificationController): Notify the client that the controller has been destroyed. * notifications/NotificationPresenter.h: Add notificationControllerDestroyed() callback to the client interface. 2012-01-03 Alexis Menard getComputedStyle for list-style is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75443 Reviewed by Tony Chang. Implement getComputedStyle for list-style. Test: fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-01-03 Adrienne Walker [chromium] Remove unneeded content vs. layer space distinction in tiled layers https://bugs.webkit.org/show_bug.cgi?id=75498 Reviewed by James Robinson. Long ago, before scrollbars became their own layers, tiled layers had a distinction between content space (what's mostly called layer space elsewhere) and layer space (the transformed content space). It seemed like this transform could get reused for supporting RTL pages, but as that's not the case, it should be eradicated. Tiled layers now deal with everything in "layer space", which is a 2d rectangle starting at (0, 0) in the top left of the layer and extending to contentBounds() in the bottom right. As no code actually set the tiler position, this change should be a no-op. Test: LayoutTests/compositing/ * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::isDirty): (WebCore::UpdatableTile::clearDirty): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::createTile): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::protectTileTextures): (WebCore::TiledLayerChromium::prepareToUpdateTiles): (WebCore::TiledLayerChromium::prepareToUpdate): (WebCore::TiledLayerChromium::prepareToUpdateIdle): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::operator=): (WebCore::CCLayerTilingData::layerRectToTileIndices): (WebCore::CCLayerTilingData::tileRect): * platform/graphics/chromium/cc/CCLayerTilingData.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): 2011-12-22 Joseph Pecoraro Implement Date and Time Input Value Sanitization https://bugs.webkit.org/show_bug.cgi?id=59951 Sanitize non-parsable incoming strings to the empty string. Reviewed by Kent Tamura. Covered by existing tests. * html/BaseDateAndTimeInputType.h: * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::sanitizeValue): check if the incoming string is valid. If not just return the empty string. 2012-01-03 Julien Chaffraix RenderLayer::backgroundClipRect should not check parent() https://bugs.webkit.org/show_bug.cgi?id=73731 Reviewed by Simon Fraser. Clean-up only, no expected change in behavior. * rendering/RenderLayer.cpp: (WebCore::backgroundClipRectForPosition): Changed RenderObject::isPositioned() to a check for AbsolutePosition for consistency but also as this is equivalent due to: - the previous check for FixedPosition. - RenderView, which is positioned, will never goes to this code as it has no parent(). (WebCore::RenderLayer::backgroundClipRect): Removed the parent() check. While at it, also moved the inline initialization of |backgroundClipRect| to its own function and removed a |view| check as the associated ASSERT seems to never have been reached. 2012-01-03 Alexey Proskuryakov REGRESSION (r102247): Focus ring is not drawn around a button Rubber-stamped by Dan Bernstein. * platform/mac/ThemeMac.mm: (WebCore::updateStates): Flip an incorrect conditional, this code should run on Snow Leopard and Lion. 2012-01-03 Alexis Menard getComputedStyle should return shorthands property with the minimum number of sides possible. https://bugs.webkit.org/show_bug.cgi?id=75434 Reviewed by Tony Chang. As stated in http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties we should return shorthands properties with the minimum number of sides possible. Existing tests have been updated accordingly. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand): * css/CSSComputedStyleDeclaration.h: 2012-01-03 Martin Robinson [GTK] GTK+ 3 theming code does not use the GtkOrientable style class https://bugs.webkit.org/show_bug.cgi?id=72789 Reviewed by Philippe Normand. No new tests. Testing GTK+ theming is quite difficult because no two distributions have the same set of themes. Current tests prevent regressions. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::applySliderStyleContextClasses): Added this helper that properly handles the orientable style class. (WebCore::RenderThemeGtk::paintSliderTrack): Use the new helper. (WebCore::RenderThemeGtk::paintSliderThumb): Ditto. * platform/gtk/ScrollbarThemeGtk3.cpp: (WebCore::applyScrollbarStyleContextClasses): Added this helper that properly handles the orientable style class. (WebCore::ScrollbarThemeGtk::paintTrackBackground): Use the new helper. (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto. (WebCore::ScrollbarThemeGtk::paintThumb): Ditto. (WebCore::ScrollbarThemeGtk::paintButton): Ditto. 2012-01-03 Florin Malita NULL ptr in WebCore::SVGStyledTransformableElement::animatedLocalTransform https://bugs.webkit.org/show_bug.cgi?id=75227 Reviewed by Dirk Schulze. Test: svg/custom/webkit-transform-crash.html * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::animatedLocalTransform): Add a null-renderer check. 2012-01-03 Alexis Menard getComputedStyle for border is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75319 Reviewed by Tony Chang. Implement getComputedStyle for border. fast/css/getComputedStyle/getComputedStyle-border-shorthand.html was extented. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-01-03 Alexis Menard Sort the WebCore Xcode project file Reviewed by Dimitri Glazkov. * WebCore.xcodeproj/project.pbxproj: 2012-01-03 Adrienne Walker [chromium] Set tiler bounds explicitly rather than growing them https://bugs.webkit.org/show_bug.cgi?id=75331 Reviewed by James Robinson. Rather than only growing bounds, make the bounds on the tiler be set explicitly by TiledLayerChromium. This patch now properly invalidates regions when the bounds change. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateBounds): (WebCore::TiledLayerChromium::prepareToUpdate): (WebCore::TiledLayerChromium::prepareToUpdateIdle): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::setBounds): (WebCore::CCLayerTilingData::bounds): * platform/graphics/chromium/cc/CCLayerTilingData.h: 2012-01-03 Martin Robinson [GTK] Slider thumb is not centered on the track with the unico theme https://bugs.webkit.org/show_bug.cgi?id=72802 Reviewed by Philippe Normand. No new tests. This only applies to certain GTK+ themes. Existing tests cover the default GTK+ theme. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::RenderThemeGtk::paintSliderThumb): Do not resize the slider thumb by the trough border. 2012-01-03 Adrienne Walker [chromium] Make tiled layer's tiler always exist https://bugs.webkit.org/show_bug.cgi?id=75329 Reviewed by James Robinson. TiledLayerChromium has some awkward code to handle lazily creating the tiler, including lots of null checks and shadowing the tile size. Instead, always create the tiler up front. As values change that invalidate all tiles, reset it rather than clear the pointer. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setIsNonCompositedContent): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::cleanupResources): (WebCore::TiledLayerChromium::setTileSize): (WebCore::TiledLayerChromium::setBorderTexelOption): (WebCore::TiledLayerChromium::drawsContent): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::setTilingOption): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::setIsNonCompositedContent): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::protectTileTextures): (WebCore::TiledLayerChromium::prepareToUpdate): (WebCore::TiledLayerChromium::prepareToUpdateIdle): (WebCore::TiledLayerChromium::needsIdlePaint): (WebCore::TiledLayerChromium::idlePaintRect): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: (WebCore::CCLayerTilingData::setBorderTexelOption): * platform/graphics/chromium/cc/CCLayerTilingData.h: * platform/graphics/gpu/TilingData.cpp: (WebCore::TilingData::setHasBorderTexels): * platform/graphics/gpu/TilingData.h: 2012-01-03 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::JSTestEventConstructor::destroy): * bindings/scripts/test/JS/JSTestEventConstructor.h: (WebCore::JSTestEventConstructor::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::destroy): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::destroy): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::JSTestNamedConstructor::destroy): * bindings/scripts/test/JS/JSTestNamedConstructor.h: (WebCore::JSTestNamedConstructor::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::destroy): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::releaseImplIfNotNull): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::destroy): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull): 2012-01-03 Carlos Garcia Campos [GTK] Fix scrollbars size with GTK+ 3.x https://bugs.webkit.org/show_bug.cgi?id=75467 Reviewed by Xan Lopez. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::getStyleContext): Add the style class for the given widget type to the GtkWidgetPath when creating GtkStyleContext objects. 2012-01-03 Alexis Menard getComputedStyle for outline is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75441 Reviewed by Antonio Gomes. Implement getComputedStyle for outline. Test: fast/css/getComputedStyle/getComputedStyle-outline-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-01-03 Carlos Garcia Campos [GTK] Use gdk_screen_get_monitor_workarea() when available for screenAvailableRect() https://bugs.webkit.org/show_bug.cgi?id=75435 Reviewed by Martin Robinson. * platform/gtk/GtkVersioning.c: (getScreenCurrentDesktop): (getScreenWorkArea): (gdk_screen_get_monitor_workarea): Implement it when GTK+ < 3.3.6. * platform/gtk/GtkVersioning.h: * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenAvailableRect): Use gdk_screen_get_monitor_workarea() instead of our own implementation. 2012-01-02 Kentaro Hara REGRESSION(r103919): Remove resolve-supplemental.pl from the WebCore target in Xcode https://bugs.webkit.org/show_bug.cgi?id=75458 Reviewed by Adam Barth. At r103919, we added resolve-supplemental.pl to WebCore.framework/Resources, but we should have added it to the project without adding it to any target. This patch fixes it. No tests. No change in behavior. * WebCore.xcodeproj/project.pbxproj: 2012-01-02 Kentaro Hara Enable the [Supplemental] IDL on GTK/GObject https://bugs.webkit.org/show_bug.cgi?id=75411 Reviewed by Adam Barth. This patch enables the [Supplemental] IDL on GObject bindings of GTK by changing the build flow of bindings/gobject/GNUmakefile.am 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 the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * GNUmakefile.am: * bindings/gobject/GNUmakefile.am: 2012-01-02 Kentaro Hara Add resolve-supplemental.pl to project.pbxproj https://bugs.webkit.org/show_bug.cgi?id=75426 Reviewed by Adam Barth. We should have added "resolve-supplemental.pl" to build scripts of AppleWebKit when we enabled the [Supplemental] IDL on AppleWebKit at r103519. This is a follow-up patch for it. No tests. Just confirm that the AppleWebKit build passes. * WebCore.xcodeproj/project.pbxproj: 2012-01-02 Kentaro Hara Add resolve-supplemental.pl to build scripts of AppleWin https://bugs.webkit.org/show_bug.cgi?id=75412 Reviewed by Adam Barth. We should have added "resolve-supplemental.pl" to build scripts of AppleWin when we enabled the [Supplemental] IDL on AppleWin at r103519. This is a follow-up patch for it. No tests. Just confirm that the AppleWin build passes. * WebCore.vcproj/MigrateScripts: * WebCore.vcproj/WebCore.vcproj: 2012-01-02 Sam Weinig Fix the build. * bindings/scripts/CodeGeneratorJS.pm: 2012-01-02 Andy Estes Fix the Windows build after r103888. * WebCore.vcproj/WebCore.vcproj: Remove CollectionCache.{cpp, h} from the WebCore vcproj. 2012-01-02 Sam Weinig REGRESSION(r100517): We're leaking many, many DOM objects! https://bugs.webkit.org/show_bug.cgi?id=75451 Reviewed by Mark Rowe. * bindings/scripts/CodeGeneratorJS.pm: Add a temporary workaround to the problem of handle finalizers not getting called by adding back the destructors (or rather their replacement, destroy() functions). 2012-01-02 Caio Marcelo de Oliveira Filho Fix chromium mac build after r103905 https://bugs.webkit.org/show_bug.cgi?id=75436 Reviewed by Csaba Osztrogonác. Adding parenthesis to disambiguate because clang gives error "expression is not assignable". * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): 2011-12-29 Caio Marcelo de Oliveira Filho Use HashMap in RenderSVGResourceGradient https://bugs.webkit.org/show_bug.cgi?id=75364 Reviewed by Daniel Bates. * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::removeAllClientsFromCache): (WebCore::RenderSVGResourceGradient::removeClientFromCache): (WebCore::RenderSVGResourceGradient::applyResource): avoid looking up the hash twice by using HashMap::add(). * rendering/svg/RenderSVGResourceGradient.h: rename m_gradient to m_gradientMap. 2012-01-02 Tor Arne Vestbø [Qt] Fix qmake warning about unescaped backslashes Reviewed by Ossy. * DerivedSources.pri: 2012-01-02 Carlos Garcia Campos Unreviewed. Fix make distcheck issue. * GNUmakefile.am: Add resolve-supplemental.pl script to EXTRA_DIST. 2012-01-01 Andreas Kling Clear HTMLCollection's internal cache on construction. Reviewed by Antti Koivisto. * html/HTMLCollection.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::invalidateCacheIfNeeded): 2012-01-01 Eunmi Lee [EFL] Move function to get dpi to the WebCore/platform/efl/EflScreenUtilities.cpp. https://bugs.webkit.org/show_bug.cgi?id=75292 Reviewed by Andreas Kling. Move ewk_util_dpi_get() function in the ewk_util.cpp to the WebCore/platform/efl/EflScreenUtilities.cpp in order to use it in the WebKit2. The function's name is changed to getDPI(). * PlatformEfl.cmake: * platform/efl/EflScreenUtilities.cpp: Added. (WebCore::getDPI): * platform/efl/EflScreenUtilities.h: Added. 2012-01-01 Andreas Kling Merge CollectionCache into HTMLCollection. Reviewed by Anders Carlsson. - Move the members of CollectionCache into HTMLCollection. - Renamed resetCollectionInfo() to invalidateCacheIfNeeded(). - Removed a bunch of overkill HashMap::checkConsistency() calls. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * html/CollectionCache.cpp: Removed. * html/CollectionCache.h: Removed. Remove CollectionCache. * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::HTMLCollection::invalidateCacheIfNeeded): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::nextItem): (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): (WebCore::HTMLCollection::append): * html/HTMLCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::item): (WebCore::HTMLFormCollection::getNamedItem): (WebCore::HTMLFormCollection::nextItem): (WebCore::HTMLFormCollection::namedItem): (WebCore::HTMLFormCollection::updateNameCache): HTMLCollection's m_info and info() become "struct m_cache" (protected.) * html/HTMLOptionsCollection.cpp: * html/HTMLOptionsCollection.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setRecalcListItems): Expose HTMLCollection::invalidateCacheIfNeeded() so we can call it from HTMLSelectElement::setRecalcListItems(). * html/HTMLFormCollection.h: Remove stale declaration of formCollectionInfo() which no longer exists. 2012-01-01 Andreas Kling Move the remaining collections to caching on their respective base nodes. Reviewed by Anders Carlsson. Add a (lazily-allocated) array of HTMLCollections to ElementRareData and cache the various collections on their base node rather than recreating them every time. Test: fast/dom/collection-idempotence.html fast/dom/gc-9.html * html/CollectionType.h: * dom/ElementRareData.h: (WebCore::ElementRareData::hasCachedHTMLCollections): (WebCore::ElementRareData::cachedHTMLCollection): (WebCore::ElementRareData::ensureCachedHTMLCollection): * dom/Element.h: * dom/Element.cpp: (WebCore::Element::ensureCachedHTMLCollection): Plumbing to cache HTMLCollections on ElementRareData. (WebCore::Element::~Element): Detach any cached collections from an element when it's destroyed. * html/HTMLCollection.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::create): (WebCore::HTMLCollection::~HTMLCollection): (WebCore::HTMLCollection::detachFromNode): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): * dom/Document.cpp: (WebCore::Document::cachedCollection): Consolidate the HTMLCollection constructors and get rid of the hacks to optionally retain the base node. * html/HTMLDataListElement.cpp: (WebCore::HTMLDataListElement::options): * html/HTMLElement.cpp: (WebCore::HTMLElement::children): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::areas): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::tBodies): * html/HTMLTableRowElement.cpp: (WebCore::HTMLTableRowElement::cells): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::rows): Cached collections! 2012-01-01 Raymond Liu Use overload methods to implement [Optional] parameters in AudioNode.idl https://bugs.webkit.org/show_bug.cgi?id=75402 Reviewed by Adam Barth. No new tests required. * GNUmakefile.list.am: * UseV8.cmake: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSAudioNodeCustom.cpp: Removed. * bindings/v8/custom/V8AudioNodeCustom.cpp: Removed. * webaudio/AudioNode.cpp: (WebCore::AudioNode::connect): (WebCore::AudioNode::disconnect): * webaudio/AudioNode.h: * webaudio/AudioNode.idl: 2011-12-20 Robert Hogan CSS 2.1 failure: border-collapse-offset-002.htm fails https://bugs.webkit.org/show_bug.cgi?id=71705 Reviewed by Julien Chaffraix. Tests: css2.1/20110323/border-collapse-offset-002-expected.html fast/css/caption-width-absolute-position-offset-top.htm fast/css/caption-width-absolute-position.htm fast/css/caption-width-fixed-position-offset-top.htm fast/css/caption-width-fixed-position.htm fast/css/caption-width-relative-position-offset-top.htm fast/css/caption-width-relative-position.htm Table captions are implemented as children of the table but have a special requirement to expand to the full width of the table rather than just the 'available' width, i.e. the full width minus padding and borders. To accomodate this create a RenderTableCaption object that reimplements containingBlockLogicalWidthForContent() to return the full width of the containing block (i.e. the table) rather than the available width. * CMakeLists.txt: Add RenderTableCaption.[cpp|h] * GNUmakefile.list.am: Add RenderTableCaption.[cpp|h] * Target.pri: Add RenderTableCaption.[cpp|h] * WebCore.gypi: Add RenderTableCaption.[cpp|h] * WebCore.vcproj/WebCore.vcproj: Add RenderTableCaption.[cpp|h] * WebCore.xcodeproj/project.pbxproj: Add RenderTableCaption.[cpp|h] * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Use RenderTableCaption * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): Add RenderTableCaption.[cpp|h] (WebCore::RenderObject::addChild): ditto * rendering/RenderObject.h: (WebCore::RenderObject::isTableCaption): * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): * rendering/RenderTable.h: * rendering/RenderTableCaption.cpp: Added. (WebCore::RenderTableCaption::RenderTableCaption): Implement RenderTableCaption (WebCore::RenderTableCaption::~RenderTableCaption): (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Return the containing block's full width rather than it's available width. * rendering/RenderTableCaption.h: Added. (WebCore::RenderTableCaption::isTableCaption): (WebCore::toRenderTableCaption): * rendering/RenderingAllInOne.cpp: 2012-01-01 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/CPP/WebDOMTestSupplemental.cpp: Added. * bindings/scripts/test/CPP/WebDOMTestSupplemental.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.cpp: Added. * bindings/scripts/test/GObject/WebKitDOMTestSupplemental.h: Added. * bindings/scripts/test/ObjC/DOMTestSupplemental.cpp: Added. * bindings/scripts/test/ObjC/DOMTestSupplemental.h: Added. 2012-01-01 Andreas Kling Make HTMLCollections play nice after their base node is gone. Reviewed by Anders Carlsson. Added HTMLCollection::detachFromNode() and call that from destructors of nodes with cached collections. Sprinkled checks/assertions where applicable to make sure HTMLCollections are empty after their associated node has been destroyed. This is a slight change in behavior, as collections would previously keep their nodes alive indefinitely. Added a test to document this. Test: fast/dom/htmlcollection-zombies.html * dom/Document.cpp: (WebCore::Document::~Document): * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::detachFromNode): (WebCore::HTMLCollection::resetCollectionInfo): (WebCore::HTMLCollection::itemAfter): (WebCore::HTMLCollection::calcLength): (WebCore::HTMLCollection::length): (WebCore::HTMLCollection::item): (WebCore::HTMLCollection::nextItem): (WebCore::HTMLCollection::namedItem): (WebCore::HTMLCollection::updateNameCache): (WebCore::HTMLCollection::hasNamedItem): (WebCore::HTMLCollection::namedItems): (WebCore::HTMLCollection::tags): * html/HTMLCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::calcLength): (WebCore::HTMLFormCollection::item): (WebCore::HTMLFormCollection::getNamedItem): (WebCore::HTMLFormCollection::getNamedFormItem): (WebCore::HTMLFormCollection::namedItem): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::~HTMLFormElement): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::add): (WebCore::HTMLOptionsCollection::remove): (WebCore::HTMLOptionsCollection::selectedIndex): (WebCore::HTMLOptionsCollection::setSelectedIndex): (WebCore::HTMLOptionsCollection::setLength): * html/HTMLPropertiesCollection.cpp: (WebCore::HTMLPropertiesCollection::length): (WebCore::HTMLPropertiesCollection::item): (WebCore::HTMLPropertiesCollection::names): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::~HTMLSelectElement): * html/HTMLSelectElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::~HTMLTableElement): * html/HTMLTableElement.h: * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::itemAfter): 2012-01-01 Andreas Kling HTMLCollection: Remove the constructor's custom CollectionCache* argument. Reviewed by Anders Carlsson. We no longer need to initialize HTMLCollections with a custom CollectionCache, so remove the argument from the constructor. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): * html/HTMLCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): 2011-12-31 Dan Bernstein WebCore changes for: REGRESSION (WebKit2): Cursor, hover states not updated when page scrolls under stationary mouse pointer https://bugs.webkit.org/show_bug.cgi?id=75405 Reviewed by Anders Carlsson. Test: fast/events/frame-scroll-fake-mouse-move.html * page/FrameView.cpp: (WebCore::FrameView::scrollPositionChanged): Added a call to EventHandler::dispatchFakeMouseMoveEventSoon(). 2012-01-01 Andreas Kling Cache named item collections on Document, not just their caches. Reviewed by Anders Carlsson. Keep two maps of name -> RefPtr on Document. We already had maps for the CollectionCaches and were creating the HTMLNameCollections every time they were accessed. We now let the collections create and manage the CollectionCaches instead of Document. No new tests since these collections are not exposed to the web. * dom/Document.h: * dom/Document.cpp: (WebCore::Document::windowNamedItems): (WebCore::Document::documentNamedItems): Replace the name/CollectionCache maps by name/HTMLNameCollection maps. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::namedItemGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): Pass names as AtomicStrings to Document's collection getters. * html/HTMLNameCollection.h: (WebCore::HTMLNameCollection::create): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): Store the name in an AtomicString instead of a String, incidentally making traversal of HTMLNameCollections more efficient. * html/CollectionType.h: Remove two now-unneeded constants. 2012-01-01 Andreas Kling Remove Document::collectionInfo() and let collections manage their caches. Reviewed by Anders Carlsson. Remove the CollectionCaches from Document and have the document's collections create and manage the caches on-demand instead. This is a step towards merging CollectionCache into HTMLCollection. * dom/Document.h: * dom/Document.cpp: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): * html/HTMLOptionsCollection.cpp: 2012-01-01 Andreas Kling RenderThemeMac: Avoid double hash lookup in systemColor(). Reviewed by Anders Carlsson. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::systemColor): 2012-01-01 Andreas Kling CSSStyleSelector: Avoid double hash lookup in keyframeStylesForAnimation(). Reviewed by Anders Carlsson. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::keyframeStylesForAnimation): 2012-01-01 Andreas Kling KeyframeAnimation: Use hash lookups to determine if property is animated. Reviewed by Anders Carlsson. Clean out an old FIXME about using hash lookups instead of iterating over the properties. * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::hasAnimationForProperty): (WebCore::KeyframeAnimation::affectsProperty): 2011-12-31 Dan Bernstein WebCore change for Cannot print USPS shipping labels http://webkit.org/b/72801 Reviewed by Anders Carlsson and Alexey Proskuryakov. * WebCore.exp.in: Exported Chrome::print(). 2011-12-31 Dan Bernstein WebCore changes for REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document Reviewed by Alexey Proskuryakov. * WebCore.exp.in: Exported PluginDocument::pluginWidget(). * WebCore.xcodeproj/project.pbxproj: Promoted PluginDocument.h to private. * html/PluginDocument.h: Fixed a typo in a comment. 2011-12-30 Andreas Kling Cache and reuse the HTMLTableElement.rows collection. Reviewed by Anders Carlsson. Let HTMLTableElement::rows() cache the returned collection and tie it to the lifetime of the form. Test: fast/dom/table-rows-collection-idempotence.html fast/dom/gc-9.html * html/HTMLTableElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rows): Cache the HTMLTableRowsCollection returned by rows() on the HTMLTableElement. Remove the per-table CollectionCache and let the collection manage that. * html/HTMLTableRowsCollection.h: * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): (WebCore::HTMLTableRowsCollection::create): Tell the base class constructor to not retain the back-pointer to the table. 2011-12-30 Andreas Kling Cache and reuse the HTMLSelectElement.options collection. Reviewed by Anders Carlsson. Let HTMLSelectElement::options() cache the returned collection and tie it to the lifetime of the form. This shrinks HTMLSelectElement by sizeof(CollectionCache) minus one pointer. Test: fast/dom/select-options-collection-idempotence.html fast/gc-9.html * html/HTMLSelectElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::options): Cache the HTMLOptionsCollection returned by options() on the HTMLSelectElement. Remove the per-select CollectionCache and let the collection manage that. * html/HTMLOptionsCollection.h: * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::create): (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Tell the base class constructor to not retain the back-pointer to the element. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setRecalcListItems): * html/HTMLOptionsCollection.cpp: (WebCore::HTMLOptionsCollection::invalidateCache): Added so HTMLSelectElement can invalidate the collection without triggering unnecessary instantiation of a CollectionCache. 2011-12-30 Kentaro Hara Enable the [Supplemental] IDL on CMake https://bugs.webkit.org/show_bug.cgi?id=75345 Reviewed by Daniel Bates. This patch enables the [Supplemental] IDL on CMake by changing the build flow of CMake 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 the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * CMakeLists.txt: * UseJSC.cmake: Modified to reflect the new build flow as described above. * UseV8.cmake: Ditto. 2011-12-30 Robert Hogan REGRESSION (r94492): Text is shifted to the right in some buttons in the Mac App Store https://bugs.webkit.org/show_bug.cgi?id=74723 Reviewed by Dan Bernstein. Tests: fast/css/absolute-inline-alignment-2.html fast/css/absolute-inline-alignment.html Inline positioned elements in the leading spaces of an inline run need to align to adjacent text, so add them to the run as they're encountered. * rendering/RenderBlockLineLayout.cpp: (WebCore::LineInfo::LineInfo): Keep a count of positioned objects encountered when skipping leading whitespace. (WebCore::LineInfo::runsFromLeadingWhitespace): (WebCore::LineInfo::resetRunsFromLeadingWhitespace): (WebCore::LineInfo::incrementRunsFromLeadingWhitespace): (WebCore::RenderBlock::constructLine): Leading positioned objects should not be considered when deciding the number of runs in a line. Otherwise they would contribute towards line height themselves and prevent a free-standing BR following the positioned object from providing a full 20px of height. (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Since a run containing line-breaks will enter skipLeadingWhitespace for each new line we reset the count every time so that the count of positioned objects we encounter only affects the line they appear on. This case is covered by fast/inline/styledEmptyInlinesWithBRs.html (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): Add a run for each inline positioned object encountered in leading white space. Keep a count of them so that they can be excluded from the total number of runs in constructLine. 2011-12-30 Raymond Liu Remove unnecessary [Custom] attribute in CanvasRenderingContext2D.idl https://bugs.webkit.org/show_bug.cgi?id=75376 Reviewed by Adam Barth. No new tests required. * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * html/canvas/CanvasRenderingContext2D.idl: 2011-12-30 Andreas Kling Cache and reuse the HTMLFormElement.elements collection. Reviewed by Anders Carlsson. Let HTMLFormElement::elements() cache the returned collection and tie it to the lifetime of the form. This reduces memory consumption by ~70 kB (on 64-bit) when viewing your average popular post on reddit.com. Test: fast/dom/form-elements-collection-idempotence.html fast/dom/gc-9.html * html/HTMLFormElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::elements): Cache the HTMLFormCollection returned by elements() on the HTMLFormElement. Remove the per-form CollectionCache and let the collection manage that. * html/HTMLCollection.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::create): Have the HTMLCollection constructor take a bool argument that decides whether we retain the base node pointer or not. This mechanism is a temporary measure until all collection types are owned by their respective base nodes. * html/HTMLFormCollection.h: * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::HTMLFormCollection): (WebCore::HTMLFormCollection::create): Tell the base class constructor to not retain the back-pointer to the form. 2011-12-30 Andreas Kling Unreviewed buildfix after r103841. * inspector/InspectorMemoryAgent.cpp: 2011-12-30 Andreas Kling CSSStyleDeclaration: Only allow setting parent rule at construction. Reviewed by Dan Bernstein. A CSSStyleDeclaration should only ever belong to one CSSRule. Enforce this at compile-time by replacing setParentRule(CSSRule*) with clearParentRule(). * css/CSSFontFaceRule.cpp: (WebCore::CSSFontFaceRule::~CSSFontFaceRule): * css/CSSStyleDeclaration.h: (WebCore::CSSStyleDeclaration::clearParentRule): * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::~CSSStyleRule): * css/WebKitCSSKeyframeRule.cpp: (WebCore::WebKitCSSKeyframeRule::~WebKitCSSKeyframeRule): 2011-12-30 Andreas Kling WebKitCSSKeyframeRule.style.parentRule should point to the keyframe rule. Reviewed by Antti Koivisto. Let CSS animation keyframe rules .style.parentRule point back to the keyframe board, rather than the keyframes rule containing it. Test: fast/css/css-keyframe-style-parentRule.html * css/CSSParser.cpp: (WebCore::CSSParser::createKeyframeRule): * css/WebKitCSSKeyframeRule.cpp: (WebCore::WebKitCSSKeyframeRule::setDeclaration): Set the CSSMutableStyleDeclaration's parent rule when creating it instead of in WebKitCSSKeyframeRule::setDeclaration(). Add assertion to make sure it's only called with declarations already parented to the keyframe rule. * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule): (WebCore::WebKitCSSKeyframesRule::append): (WebCore::WebKitCSSKeyframesRule::deleteRule): Stop reparenting keyframe rules' style declarations to the keyframes rule. 2011-12-30 Yury Semikhatsky Web Inspector: use typed front-end API in the memory agent https://bugs.webkit.org/show_bug.cgi?id=75382 Memory agent now uses generate C++ API for communicating to the front-end. Reviewed by Pavel Feldman. * inspector/InspectorMemoryAgent.cpp: (WebCore::DOMTreeStatistics::CounterVisitor::CounterVisitor): (WebCore::DOMTreeStatistics::CounterVisitor::counters): (WebCore::DOMTreeStatistics::CounterVisitor::visitNode): 2011-12-30 Pavel Feldman Web Inspector: migrate from "attached" to "compact" styles. https://bugs.webkit.org/show_bug.cgi?id=75381 When front-end is docked to right, it should look like "detached", but is still "attached". Use "compact" mode instead of "attached" mode in the styles to mitigate it. Reviewed by Yury Semikhatsky. * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype.updateSearchLabel): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar.prototype.set compact): (WebInspector.Toolbar.prototype._toolbarDragStart): (WebInspector.Toolbar.prototype._toolbarDrag): * inspector/front-end/helpScreen.css: (body.compact .help-window-outer): (body.compact .help-window-main): (body.compact .help-window-caption): (body.compact .help-close-button): (body.compact .help-content): * inspector/front-end/inspector.css: (body.compact #toolbar): (body.compact.port-qt #toolbar): (body.compact.inactive #toolbar): (body.compact #search-toolbar-label): (body.compact #toolbar-dropdown-arrow): (body.compact #search): (body.compact.port-qt .toolbar-item.close-left, body.compact.port-qt .toolbar-item.close-right): (body.compact #main): * inspector/front-end/inspector.js: (WebInspector.set attached): (WebInspector.get isCompactMode): (WebInspector.get _setCompactMode): (WebInspector._installDockToRight.listener.get if): (WebInspector._installDockToRight.listener): * inspector/front-end/inspectorCommon.css: (body.dock-to-right): (body.dock-to-right.inactive): 2011-12-30 Sheriff Bot Unreviewed, rolling out r103794. http://trac.webkit.org/changeset/103794 https://bugs.webkit.org/show_bug.cgi?id=75379 the ASSERT is triggered by several tests (Requested by jchaffraix on #webkit). * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): (WebCore::RenderTable::addChild): (WebCore::RenderTable::layout): (WebCore::RenderTable::recalcSections): (WebCore::RenderTable::outerBorderAfter): (WebCore::RenderTable::sectionAbove): (WebCore::RenderTable::sectionBelow): * rendering/RenderTable.h: (WebCore::RenderTable::header): (WebCore::RenderTable::footer): (WebCore::RenderTable::firstBody): (WebCore::RenderTable::hasSections): (WebCore::RenderTable::topSection): 2011-12-29 Pavel Feldman Web Inspector: enable dock-to-right view (still need embedders to support it). https://bugs.webkit.org/show_bug.cgi?id=75360 Reviewed by Yury Semikhatsky. * English.lproj/localizedStrings.js: * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/inspector.js: (WebInspector.set attached): (WebInspector._renderAsAttached.get return): (WebInspector._renderAsAttached): (WebInspector._installDockToRight.updateToolbar): 2011-12-29 Raymond Liu Use IDL overloads in AudioContext.idl for createBuffer https://bugs.webkit.org/show_bug.cgi?id=75293 Reviewed by Adam Barth. No new tests required. * bindings/js/JSAudioContextCustom.cpp: * bindings/v8/custom/V8AudioContextCustom.cpp: * webaudio/AudioContext.cpp: (WebCore::AudioContext::createBuffer): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: 2011-12-29 Andreas Kling HTMLDivElement: Remove unnecessary variable in parseMappedAttribute(). Reviewed by Daniel Bates. * html/HTMLDivElement.cpp: (WebCore::HTMLDivElement::parseMappedAttribute): 2011-12-29 Andreas Kling HTMLParagraphElement: Remove unnecessary variable in parseMappedAttribute(). Reviewed by Daniel Bates. * html/HTMLParagraphElement.cpp: (WebCore::HTMLParagraphElement::parseMappedAttribute): 2011-12-29 Andreas Kling Use HashMap for Document's named item collection caches. Reviewed by Daniel Bates. * dom/Document.cpp: (WebCore::Document::~Document): Remove now-unneeded deleteAllValues() loop. (WebCore::Document::nameCollectionInfo): Use add() instead of find()/add() to avoid one extra hash lookup. * dom/Document.h: Switch the value type of m_nameCollectionInfo to use OwnPtr. 2011-12-29 David Barton mfenced skips the first separator if the separators attribute contains multiple separators https://bugs.webkit.org/show_bug.cgi?id=57697 Reviewed by Dan Bernstein. Added 2 test cases. * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::addChild): - Thanks to Xun Sun for the off-by-one error fix. 2011-12-29 Alexis Menard Enable the [Supplemental] IDL on Qt. https://bugs.webkit.org/show_bug.cgi?id=75274 Reviewed by Andreas Kling. http://trac.webkit.org/changeset/103783 broke the Qt SL bot. This patch fixes the problem by using 'tr' rather than 'sed' which seems to be more consistent between Mac and Linux. * DerivedSources.pri: 2011-12-29 Vsevolod Vlasov Web Inspector: Scripts navigator should support incremental search by typing. https://bugs.webkit.org/show_bug.cgi?id=75349 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement): (WebInspector.ScriptsNavigator.prototype.show): (WebInspector.ScriptsNavigator.prototype._reset): (WebInspector.NavigatorTreeOutline): (WebInspector.NavigatorTreeOutline.prototype.scriptTreeElements): (WebInspector.NavigatorTreeOutline.prototype.searchStarted): (WebInspector.NavigatorTreeOutline.prototype.searchFinished): (WebInspector.BaseNavigatorTreeElement.prototype.onreveal): (WebInspector.BaseNavigatorTreeElement.prototype.set titleText): (WebInspector.BaseNavigatorTreeElement.prototype.matchesSearchText): * inspector/front-end/inspector.css: (.outline-disclosure ol.search-match-not-found li.selected .selection): (.outline-disclosure ol.search-match-found li.selected): (.outline-disclosure ol.search-match-found li.selected *): (.outline-disclosure ol.search-match-found li.parent.selected::before): (.outline-disclosure ol.search-match-found li.parent.expanded.selected::before): * inspector/front-end/scriptsPanel.css: (#scripts-navigator-tree-search-box): (#scripts-navigator-tree-search-box.visible): (#scripts-navigator-tree-search-box > input): (.scripts.panel .navigator .search-match-found li.selected .selection): (.scripts.panel .navigator .search-match-not-found li.selected .selection): (.scripts.panel .navigator .searching li.selected .selection): * inspector/front-end/treeoutline.js: (TreeOutline): (TreeOutline.prototype._treeKeyPress): (TreeOutline.prototype._startSearch.focusSearchInput): (TreeOutline.prototype._startSearch): (TreeOutline.prototype._searchTextChanged): (TreeOutline.prototype._showSearchMatchElement): (TreeOutline.prototype._searchInputKeyDown): (TreeOutline.prototype._nextSearchMatch): (TreeOutline.prototype._previousSearchMatch): (TreeOutline.prototype._searchInputBlur): (TreeOutline.prototype._searchFinished): (TreeOutline.prototype.stopSearch): 2011-12-29 Vsevolod Vlasov Web Inspector: Scripts navigator should trim long file names and show full url in tooltip. https://bugs.webkit.org/show_bug.cgi?id=75343 Reviewed by Pavel Feldman. Test: inspector/debugger/ui-source-code-display-name.html * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype.setScriptSourceIsDirty): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.EditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.EditorContainer.prototype.replaceSourceFrames): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype._appendSourceFrameTab): (WebInspector.TabbedEditorContainer.prototype._tabClosed): (WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab.get if): (WebInspector.TabbedEditorContainer.prototype._replaceSourceFrameTab): (WebInspector.TabbedEditorContainer.prototype.get replaceSourceFrames): (WebInspector.TabbedEditorContainer.prototype.reset): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.appendTab): (WebInspector.TabbedPane.prototype.changeTabTooltip): (WebInspector.TabbedPaneTab): (WebInspector.TabbedPaneTab.prototype.get tooltip): (WebInspector.TabbedPaneTab.prototype.set tooltip): (WebInspector.TabbedPaneTab.prototype._createTabElement): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype._parseURL): * inspector/front-end/utilities.js: (): 2011-12-29 Alexis Menard getComputedStyle for margin is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75358 Reviewed by Andreas Kling. Implement getComputedStyle for margin. Test: fast/css/getComputedStyle/getComputedStyle-margin-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-29 Caio Marcelo de Oliveira Filho Use HashMap in RenderSVGResourcePattern https://bugs.webkit.org/show_bug.cgi?id=75361 Reviewed by Andreas Kling. * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::removeAllClientsFromCache): (WebCore::RenderSVGResourcePattern::removeClientFromCache): (WebCore::RenderSVGResourcePattern::applyResource): use HashMap::add() to avoid looking up the hash twice. * rendering/svg/RenderSVGResourcePattern.h: rename m_pattern to m_patternMap to improve readability a little bit. 2011-12-29 Alexis Menard getComputedStyle for padding is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75352 Reviewed by Andreas Kling. Implement getComputedStyle for padding shorthand property. Test: fast/css/getComputedStyle/getComputedStyle-padding-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-29 Caio Marcelo de Oliveira Filho Use HashMap in OriginAccessMap https://bugs.webkit.org/show_bug.cgi?id=75327 Reviewed by Andreas Kling. * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 2011-12-29 Pavel Podivilov Web Inspector: support sourceMappingURL magic comment. https://bugs.webkit.org/show_bug.cgi?id=75356 Reviewed by Pavel Feldman. * inspector/ContentSearchUtils.cpp: (WebCore::ContentSearchUtils::findSourceMapURL): * inspector/ContentSearchUtils.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::sourceMapURLForScript): 2011-12-29 Alexander Pavlov Web Inspector: Suggest pop-over doesn't hide on tab switch https://bugs.webkit.org/show_bug.cgi?id=73611 Reviewed by Pavel Feldman. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.willHide): * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.complete): (WebInspector.TextPrompt.prototype._completionsReady): (WebInspector.TextPrompt.prototype.acceptSuggestion): (WebInspector.TextPrompt.prototype.hideSuggestBox): (WebInspector.TextPrompt.SuggestBox.prototype._completionsReady): 2011-12-28 Alexander Pavlov Web Inspector: Implement CSS selector profiler https://bugs.webkit.org/show_bug.cgi?id=74004 Reviewed by Pavel Feldman. This implementation of CSS selector profiler measures the total time required to match a certain selector against DOM nodes and apply the style declaration properties to the particular element, as well as the number of selector matches (i.e. the number of nodes that matched the selector.) The results are approximate due to internal matching algorithm optimizations (shared styles et al.) Multiple selectors with the same selectorText are coalesced into a single record. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/CSSSelectorProfileView.js: Added. (WebInspector.CSSSelectorDataGridNode): (WebInspector.CSSSelectorDataGridNode.prototype.get rawData): (WebInspector.CSSSelectorProfileView): (WebInspector.CSSSelectorProfileView.prototype.get statusBarItems): (WebInspector.CSSSelectorProfileView.prototype.get profile): (WebInspector.CSSSelectorProfileView.prototype.set profile): (WebInspector.CSSSelectorProfileView.prototype._createProfileNodes): (WebInspector.CSSSelectorProfileView.prototype.rebuildGridItems): (WebInspector.CSSSelectorProfileView.prototype.refreshData): (WebInspector.CSSSelectorProfileView.prototype.refreshShowAsPercents): (WebInspector.CSSSelectorProfileView.prototype._sortProfile.get selectorComparator): (WebInspector.CSSSelectorProfileView.prototype._sortProfile.timeComparator): (WebInspector.CSSSelectorProfileView.prototype._sortProfile.matchesComparator): (WebInspector.CSSSelectorProfileView.prototype._sortProfile): (WebInspector.CSSSelectorProfileType): (WebInspector.CSSSelectorProfileType.prototype.get buttonTooltip): (WebInspector.CSSSelectorProfileType.prototype.buttonClicked): (WebInspector.CSSSelectorProfileType.prototype.get treeItemTitle): (WebInspector.CSSSelectorProfileType.prototype.get description): (WebInspector.CSSSelectorProfileType.prototype.reset): (WebInspector.CSSSelectorProfileType.prototype.isRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.setRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.startRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.stopRecordingProfile): (WebInspector.CSSSelectorProfileType.prototype.createSidebarTreeElementForProfile): (WebInspector.CSSSelectorProfileType.prototype.createView): * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/ProfileView.js: * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileType.prototype.reset): (WebInspector.ProfilesPanel.prototype._reset): (WebInspector.ProfilesPanel.prototype.addProfileHeader): (WebInspector.ProfilesPanel.prototype._removeTemporaryProfile): (WebInspector.ProfilesPanel.prototype.setRecordingProfile): (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress): (WebInspector.ProfilerDispatcher.prototype.addProfileHeader): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/profilesPanel.css: 2011-12-29 Sheriff Bot Unreviewed, rolling out r103798. http://trac.webkit.org/changeset/103798 https://bugs.webkit.org/show_bug.cgi?id=75353 some small scrollbar differences are making the tests fail on several platforms (Requested by jchaffraix on #webkit). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterScroll): 2011-12-29 Alexander Pavlov Web Inspector: Focus of the DOM tree is not restored when switching to the Elements panel https://bugs.webkit.org/show_bug.cgi?id=75351 Reviewed by Yury Semikhatsky. * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.wasShown): 2011-12-29 Julien Chaffraix REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling https://bugs.webkit.org/show_bug.cgi?id=67100 Reviewed by Dan Bernstein. Tests: fast/layers/scroll-with-transform-composited-layer-expected.html fast/layers/scroll-with-transform-composited-layer.html fast/layers/scroll-with-transform-layer-expected.html fast/layers/scroll-with-transform-layer.html The regression came from a previous optimization that was wrongly kept after r93614. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Remove the early return for transformed layer. This change worked as we used to call updateLayerPositions from scrollTo which would call updateLayerPosition on all our descendants. After r93614, this is no longer the case and we explicitely need to call updateLayerPosition on our descendants from updateLayerPositionsAfterScroll. 2011-12-29 Alexander Pavlov Web Inspector: Tree views can be collapsed/hidden using the keyboard arrows https://bugs.webkit.org/show_bug.cgi?id=46272 Reviewed by Yury Semikhatsky. WebInspector.SidebarSectionTreeElement which is not selectable has also been made non-collapsible and expanded by default. * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._registerProfileType): * inspector/front-end/SidebarTreeElement.js: (WebInspector.SidebarSectionTreeElement): (WebInspector.SidebarSectionTreeElement.prototype.selectable.false.collapse): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): 2011-12-29 Pavel Feldman Web Inspector: [chromium] pass dock to side request to the embedder. https://bugs.webkit.org/show_bug.cgi?id=75344 Reviewed by Yury Semikhatsky. I'd like to enable dock-to-right for the front-end window. This is a background work to pass control flow from the front-end to the front-end host. * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: (WebCore::InspectorFrontendClientLocal::requestSetDockSide): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::requestSetDockSide): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow): (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow): (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide): 2011-12-28 Pavel Podivilov Web Inspector: add "enable source maps" checkbox setting. https://bugs.webkit.org/show_bug.cgi?id=75311 Reviewed by Pavel Feldman. When "enable source maps" is on, all auto detected source maps are silently applied. * English.lproj/localizedStrings.js: * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createUISourceCode): * inspector/front-end/Settings.js: (WebInspector.Settings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): * inspector/front-end/inspector.js: (WebInspector._toolbarItemClicked): 2011-12-29 Julien Chaffraix Tighten our checks for needsSectionRecalc in RenderTable https://bugs.webkit.org/show_bug.cgi?id=73972 Reviewed by Adam Barth. Refactoring covered under the new tests. Now most of the functions use the header, first body and footer's getters that checks if we need a section recalculation. The only exceptions are addChild and recalcSections as they can be called with the bit set. * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): (WebCore::RenderTable::outerBorderAfter): (WebCore::RenderTable::sectionAbove): (WebCore::RenderTable::sectionBelow): Updated the previous functions to use the sections' getters. (WebCore::RenderTable::RenderTable): (WebCore::RenderTable::addChild): (WebCore::RenderTable::recalcSections): Update the previous functions after the 2 renames (see below). * rendering/RenderTable.h: (WebCore::RenderTable::header): (WebCore::RenderTable::footer): (WebCore::RenderTable::firstBody): Added some ASSERT here. Also renamed m_head to m_header and m_foot to m_footer to match the getter and to avoid unneeded abbreviation. (WebCore::RenderTable::hasSections): (WebCore::RenderTable::topSection): Updated the previous functions to use the section getters. 2011-12-28 Caio Marcelo de Oliveira Filho Use HashMap for UserScriptMap and UserStyleSheetMap https://bugs.webkit.org/show_bug.cgi?id=75323 Reviewed by Darin Adler. * dom/Document.cpp: (WebCore::Document::pageGroupUserSheets): * page/PageGroup.cpp: (WebCore::PageGroup::addUserScriptToWorld): (WebCore::PageGroup::addUserStyleSheetToWorld): (WebCore::PageGroup::removeUserScriptFromWorld): (WebCore::PageGroup::removeUserStyleSheetFromWorld): fix a small mistake in previous code. Now the entry for world is removed (and deleted) only if its stylesheet vector is empty. (WebCore::PageGroup::removeUserScriptsFromWorld): (WebCore::PageGroup::removeUserStyleSheetsFromWorld): (WebCore::PageGroup::removeAllUserContent): * page/UserScriptTypes.h: * page/UserStyleSheetTypes.h: 2011-12-28 Andreas Kling Reduce memory used by NamedNodeMap. Reviewed by Sam Weinig. Give NamedNodeMap's attribute vector an inline capacity of 4. The vast majority of elements have <= 4 attributes, and if they don't have any we normally don't allocate an attribute map at all. This reduces memory consumption by 1.2MB (on 64-bit) when loading the full HTML5 spec at . * dom/NamedNodeMap.h: 2011-12-28 Andreas Kling Reduce memory used by SpaceSplitString. Reviewed by Sam Weinig. Split the string upon creation instead of waiting until it's accessed. This allows us to get rid of all data members except the substring vector. Since we're storing AtomicStrings, this is way more memory-efficient than the previous implementation in the majority of cases. Also reduced the inline capcity of the vector to 2 (from 8), after testing showed this to cover 90% of the cases on the Alexa top sites. All in all this reduces memory consumption by 1.1MB (on 64-bit) when loading the full HTML5 spec at . On that same page, less than 2ms is spent (on my MBP) splitting the ~20000 strings. * dom/SpaceSplitString.cpp: (WebCore::SpaceSplitStringData::createVector): (WebCore::SpaceSplitStringData::containsAll): (WebCore::SpaceSplitStringData::remove): * dom/SpaceSplitString.h: (WebCore::SpaceSplitStringData::SpaceSplitStringData): (WebCore::SpaceSplitStringData::contains): (WebCore::SpaceSplitStringData::size): (WebCore::SpaceSplitStringData::operator[]): 2011-12-28 ChangSeok Oh [GTK] Fix compilation issue when selecting opengl for Accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=75309 Reviewed by Martin Robinson. Add TextureMapperGL and TextureMapperGLCairo files. They define new classes required to implement TextureMapperGL for GTK port. No new tests required. * GNUmakefile.list.am: * platform/graphics/cairo/TextureMapperGLCairo.cpp: Added. (WebCore::BGRA32PremultimpliedBufferCairo::BGRA32PremultimpliedBufferCairo): (WebCore::BGRA32PremultimpliedBufferCairo::~BGRA32PremultimpliedBufferCairo): (WebCore::BGRA32PremultimpliedBufferCairo::beginPaint): (WebCore::BGRA32PremultimpliedBufferCairo::data): (WebCore::BGRA32PremultimpliedBufferCairo::endPaint): (WebCore::uidForImage): (WebCore::BGRA32PremultimpliedBuffer::create): * platform/graphics/cairo/TextureMapperGLCairo.h: Added. 2011-12-28 Sheriff Bot Unreviewed, rolling out r103782. http://trac.webkit.org/changeset/103782 https://bugs.webkit.org/show_bug.cgi?id=75328 broke origin-whitelisting-removal.html (Requested by kling on #webkit). * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 2011-12-28 Kentaro Hara Enable the [Supplemental] IDL on Qt https://bugs.webkit.org/show_bug.cgi?id=75274 Reviewed by Adam Barth. This patch enables the [Supplemental] IDL on Qt by changing the build flow of Qt 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 the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * DerivedSources.pri: Described the above build flow. 2011-12-28 Caio Marcelo de Oliveira Filho Use HashMap in OriginAccessMap https://bugs.webkit.org/show_bug.cgi?id=75327 Reviewed by Andreas Kling. * page/SecurityPolicy.cpp: (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): (WebCore::SecurityPolicy::resetOriginAccessWhitelists): 2011-12-28 Caio Marcelo de Oliveira Filho Use HashMap for ProgressTracker's items https://bugs.webkit.org/show_bug.cgi?id=75326 Reviewed by Andreas Kling. * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::~ProgressTracker): although is empty, the destructor was kept so in the header file we can forward declare ProgressItem and use in an OwnPtr. (WebCore::ProgressTracker::reset): (WebCore::ProgressTracker::incrementProgress): (WebCore::ProgressTracker::completeProgress): removed a useless assignment to item member just before it is deleted. * loader/ProgressTracker.h: 2011-12-28 Alexis Menard getComputedStyle for border-color is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75324 Reviewed by Andreas Kling. Implement getComputedStyle for border-color. Test: fast/css/getComputedStyle/getComputedStyle-border-color-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-28 Darin Adler Use OwnPtr to handle lifetime and deletion of FontFace objects https://bugs.webkit.org/show_bug.cgi?id=75221 Reviewed by Daniel Bates. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): Use add instead of get/set to read and then later fill a cache. Use new version of registerCustomFont that takes PassOwnPtr. * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::getFontData): Ditto. * dom/Document.cpp: (WebCore::Document::registerCustomFont): Take a PassOwnPtr instead of raw pointer. * dom/Document.h: Ditto. 2011-12-28 Adam Barth "Fake" insertion mode in HTMLTreeBuilder doesn't do anything https://bugs.webkit.org/show_bug.cgi?id=75322 Reviewed by Darin Adler. This machinery isn't needed anymore now that we're using the new foreign content hotness. * html/parser/HTMLTreeBuilder.cpp: * html/parser/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::setInsertionMode): 2011-12-28 Alexis Menard getComputedStyle for border-style is not implemented. https://bugs.webkit.org/show_bug.cgi?id=75312 Reviewed by Andreas Kling. Implement getComputedStyle for border-style. Test: fast/css/getComputedStyle/getComputedStyle-border-style-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2011-12-28 Alexis Menard getComputedStyle for border-bottom, border-top, border-left, border-right is not implemented. https://bugs.webkit.org/show_bug.cgi?id=74743 Reviewed by Tony Chang. Implement getComputedStyle for border-top, border-bottom, border-right, border-left. Test: fast/css/getComputedStyle/getComputedStyle-border-shorthand.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForShorthandProperties): * css/CSSComputedStyleDeclaration.h: 2011-12-28 Robert Hogan Inline flow not learning height of all text descendants https://bugs.webkit.org/show_bug.cgi?id=75305 Reviewed by Dan Bernstein. Tests: fast/inline/nested-text-descendants-expected.html fast/inline/nested-text-descendants.html The root inline box would only learn it had text descendants if its first grandchild was text. It wasn't informed of subsequent text grandchildren so could not factor them into its calculation of the line height. To fix this, propagate the existence of a text descendant to the root inline box by walking up through the text child's ancestors. * rendering/InlineFlowBox.cpp: (WebCore::setHasTextDescendantsOnAncestors): (WebCore::InlineFlowBox::addToLine): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::setHasTextDescendants): 2011-12-28 Sheriff Bot Unreviewed, rolling out r103620. http://trac.webkit.org/changeset/103620 https://bugs.webkit.org/show_bug.cgi?id=75316 Causes many crashes (Requested by abarth on #webkit). * loader/FrameLoaderClient.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): 2011-12-28 Alexander Pavlov [V8][Chromium] 'randomString' in document.body.style always returns true https://bugs.webkit.org/show_bug.cgi?id=75313 Reviewed by Adam Barth. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertyQuery): 2011-12-28 Vsevolod Vlasov Web Inspector: Add domain.png to WebCore.gypi / WebKit.qrc. https://bugs.webkit.org/show_bug.cgi?id=75310 Reviewed by Pavel Feldman. * WebCore.gypi: * inspector/front-end/WebKit.qrc: 2011-12-28 Vsevolod Vlasov Web Inspector: ExperimentsSettings causes warning on chromium when reading localizedStrings. https://bugs.webkit.org/show_bug.cgi?id=75299 Reviewed by Pavel Feldman. * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype._createExperimentCheckbox): 2011-12-28 Vsevolod Vlasov Web Inspector: Scripts panel: add debug sidebar resizer to TabbedEditorContainer. https://bugs.webkit.org/show_bug.cgi?id=75300 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: * inspector/front-end/scriptsPanel.css: (#scripts-debug-sidebar-resizer-widget): 2011-12-28 Alexander Pavlov Web Inspector: Introduce a Profiler launcher view similar to that in the Audits panel https://bugs.webkit.org/show_bug.cgi?id=75228 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/AuditLauncherView.js: (WebInspector.AuditLauncherView): * inspector/front-end/AuditsPanel.js: (WebInspector.AuditsPanel): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotProfileType): (WebInspector.DetailedHeapshotProfileType.prototype.get treeItemTitle): (WebInspector.DetailedHeapshotProfileType.prototype.get description): * inspector/front-end/ProfileLauncherView.js: Added. (WebInspector.ProfileLauncherView): (WebInspector.ProfileLauncherView.prototype.setUpEventListeners): (WebInspector.ProfileLauncherView.prototype.addProfileType): (WebInspector.ProfileLauncherView.prototype._controlButtonClicked): (WebInspector.ProfileLauncherView.prototype._updateControls): (WebInspector.ProfileLauncherView.prototype._profileTypeChanged): (WebInspector.ProfileLauncherView.prototype._onProfileStarted): (WebInspector.ProfileLauncherView.prototype._onProfileFinished): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileType): (WebInspector.CPUProfileType.prototype.get treeItemTitle): (WebInspector.CPUProfileType.prototype.get description): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileType.prototype.get treeItemTitle): (WebInspector.ProfileType.prototype.get description): (WebInspector.ProfilesPanel.prototype.get statusBarItems): (WebInspector.ProfilesPanel.prototype.toggleRecordButton): (WebInspector.ProfilesPanel.prototype._onProfileTypeSelected): (WebInspector.ProfilesPanel.prototype._reset): (WebInspector.ProfilesPanel.prototype._showLauncherView): (WebInspector.ProfilesPanel.prototype._registerProfileType): (WebInspector.ProfilesPanel.prototype._addProfileHeader): (WebInspector.ProfilesPanel.prototype._updateInterface): (WebInspector.ProfileTypeTreeElement): (WebInspector.ProfileTypeTreeElement.prototype.collapse): (WebInspector.ProfilesSidebarTreeElement): (WebInspector.ProfilesSidebarTreeElement.prototype.onattach): (WebInspector.ProfilesSidebarTreeElement.prototype.onselect): (WebInspector.ProfilesSidebarTreeElement.prototype.get selectable): (WebInspector.ProfilesSidebarTreeElement.prototype.refresh): * inspector/front-end/WebKit.qrc: * inspector/front-end/WelcomeView.js: Removed. * inspector/front-end/auditsPanel.css: (.audit-launcher-view .audit-launcher-view-content): (.audit-launcher-view div.button-container): (.panel-enabler-view.audit-launcher-view label): (.panel-enabler-view.audit-launcher-view label.disabled): * inspector/front-end/inspector.html: * inspector/front-end/panelEnablerView.css: (.panel-enabler-view img): (.panel-enabler-view .flexible-space): (.panel-enabler-view button:not(.status-bar-item)): (body.inactive .panel-enabler-view button, .panel-enabler-view button:disabled): (.panel-enabler-view input[type="radio"]): (.panel-enabler-view input[type="radio"]:active:not(:disabled)): (.panel-enabler-view input[type="radio"]:checked): (.panel-enabler-view input[type="radio"]:checked:active): * inspector/front-end/profilesPanel.css: (.profile-launcher-view-tree-item > .icon): (.profile-launcher-view-content): (.profile-launcher-view-content h1): (.panel-enabler-view.profile-launcher-view form): (.panel-enabler-view.profile-launcher-view label): (.profile-launcher-view-content p): (.panel-enabler-view.profile-launcher-view button:not(.status-bar-item)): (.profile-launcher-view-content button.running:not(.status-bar-item)): (body.inactive .profile-launcher-view-content button.running:not(.status-bar-item)): 2011-12-28 Sheriff Bot Unreviewed, rolling out r103763. http://trac.webkit.org/changeset/103763 https://bugs.webkit.org/show_bug.cgi?id=75307 "Compilation fails on Snow Leopard" (Requested by yurys on #webkit). * inspector/CodeGeneratorInspector.py: (Helper): (create_ad_hoc_type_declaration.Helper): (CodeGenerator.generate_type_builder): (get_in_c_type_text): 2011-12-28 Peter Rybin Web Inspector: CodeGeneratorInspector.py: generate enum types. https://bugs.webkit.org/show_bug.cgi?id=74954 Reviewed by Yury Semikhatsky. Internal map of string contants is created. C enums are created for each JSON enum. * inspector/CodeGeneratorInspector.py: (EnumConstants.add_constant): (EnumConstants): (EnumConstants.get_enum_constant_code): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.EnumBinding.get_in_c_type_text): (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern): (TypeBindings.create_type_declaration_.PlainString.reduce_to_raw_type): (TypeBindings.create_type_declaration_.PlainString.get_setter_value_expression_pattern): (get_in_c_type_text): (get_setter_value_expression_pattern): (PlainObjectBinding.get_in_c_type_text): (PlainObjectBinding.get_setter_value_expression_pattern): (RawTypesBinding.get_in_c_type_text): (RawTypesBinding.get_setter_value_expression_pattern): (get_annotated_type_text): (MethodGenerateModes.get_modes): (MethodGenerateModes.StrictParameterMode.get_c_param_type_text): (MethodGenerateModes.StrictParameterMode): (MethodGenerateModes.StrictParameterMode.get_setter_value_expression): (MethodGenerateModes.RawParameterMode.get_c_param_type_text): (MethodGenerateModes.RawParameterMode): (MethodGenerateModes.RawParameterMode.get_setter_value_expression): (MethodGenerateModes.CombinedMode.get_c_param_type_text): (MethodGenerateModes): (MethodGenerateModes.CombinedMode): (MethodGenerateModes.CombinedMode.get_setter_value_expression): 2011-12-28 Hans Wennborg IndexedDB: IDBKeyRange constructor should throw when lower > upper https://bugs.webkit.org/show_bug.cgi?id=74705 Reviewed by Tony Chang. Make IDBKeyRange throw an exception when lower > upper, or lower == upper and one or both of the bounds is open. Tested in storage/indexeddb/keyrange.html. * storage/IDBKeyRange.cpp: (WebCore::IDBKeyRange::bound): 2011-12-28 Alexander Pavlov Web Inspector: [protocol] empty enum constant should be replaced with identifier https://bugs.webkit.org/show_bug.cgi?id=75273 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::buildObjectForRule): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSRule.prototype.get isRegular): 2011-12-27 Pavel Feldman Web Inspector: complete annotating SDK component. https://bugs.webkit.org/show_bug.cgi?id=75259 Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype._cacheDisabledSettingChanged): (WebInspector.NetworkDispatcher.prototype._isNull): (WebInspector.NetworkDispatcher.prototype.webSocketCreated): * inspector/front-end/Resource.js: (WebInspector.Resource.displayName): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._onResourceUpdated): (WebInspector.ResourceTreeModel.prototype._consoleMessageAdded): (WebInspector.ResourceTreeFrame.prototype.get name): * inspector/front-end/TabbedEditorContainer.js: 2011-12-27 Anantanarayanan G Iyengar Crash in the WebKit accessibility code while attempting to retrieve the title UI element. https://bugs.webkit.org/show_bug.cgi?id=75279 Reviewed by Ryosuke Niwa. Fix a crash in the the WebKit accessibility code which occurs while retrieving the title UI clement. The fix is to NULL check the RenderObject::node return value. No test added as there is no reduction. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::titleUIElement): 2011-12-27 Dominic Cooney Remove initWebKitAnimationEvent method https://bugs.webkit.org/show_bug.cgi?id=71698 Reviewed by Ojan Vafai. Now that WebKitAnimationEvent has a constructor, we don't need this method. is tracking the change to the CSS Animations spec. * dom/WebKitAnimationEvent.cpp: * dom/WebKitAnimationEvent.h: * dom/WebKitAnimationEvent.idl: 2011-12-27 Dominic Cooney Remove initWebKitTransitionEvent method https://bugs.webkit.org/show_bug.cgi?id=71701 Reviewed by Ojan Vafai. Now that WebKitTransitionEvent has a constructor, we don't need this method. is tracking the change to the CSS Transitions spec. * dom/WebKitTransitionEvent.cpp: * dom/WebKitTransitionEvent.h: * dom/WebKitTransitionEvent.idl: 2011-12-27 Tony Chang Move HarfBuzz files into their own directory https://bugs.webkit.org/show_bug.cgi?id=72780 Reviewed by Daniel Bates. FontCacheLinux.cpp got moved to platform/graphics/skia/FontCacheSkia.cpp since it wasn't HarfBuzz specific. I used HarfBuzz in filenames since that seems to be how the name is capitalized on the project home page. Fixed some style errors caught by the style checker. * PlatformBlackBerry.cmake: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/graphics/chromium/FontPlatformData.h: * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.cpp. * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h: Renamed from Source/WebCore/platform/graphics/chromium/ComplexTextControllerLinux.h. * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontLinux.cpp. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Renamed from Source/WebCore/platform/graphics/chromium/FontPlatformDataLinux.h. * platform/graphics/harfbuzz/HarfBuzzSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/HarfbuzzSkia.cpp. * platform/graphics/harfbuzz/HarfBuzzSkia.h: Renamed from Source/WebCore/platform/graphics/chromium/HarfbuzzSkia.h. * platform/graphics/harfbuzz/SimpleFontDataSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/SimpleFontDataLinux.cpp. * platform/graphics/skia/FontCacheSkia.cpp: Renamed from Source/WebCore/platform/graphics/chromium/FontCacheLinux.cpp. * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: 2011-12-27 Huang Dongsung [TexMap][QT] The fragment shader in OpenGL ES2 requires the default precision qualifier. https://bugs.webkit.org/show_bug.cgi?id=75168 Reviewed by Noam Rosenthal. No new functionality so no new tests. * platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::TextureMapperGL::initializeShaders): 2011-12-27 Ryosuke Niwa [Chromium] uninitialized variable in fakeMouseMoveEventTimerFired https://bugs.webkit.org/show_bug.cgi?id=75263 Reviewed by Tony Chang. The failure was caused by PlatformKeyboardEvent::getCurrentModifierState in PlatformKeyboardEventChromium.cpp not initializing arguments on Linux. Fixed the failure by always assigning false to the arguments. But we should really fix this function for Linux. Not recognizing any modifier isn't great. * platform/chromium/PlatformKeyboardEventChromium.cpp: (WebCore::PlatformKeyboardEvent::getCurrentModifierState): 2011-12-27 Kentaro Hara WIP: Enable the [Supplemental] IDL on Gtk https://bugs.webkit.org/show_bug.cgi?id=74972 Reviewed by Adam Barth. This patch enables the [Supplemental] IDL on Gtk by changing the build flow of Gtk 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 the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * GNUmakefile.am: Described the above build flow. * GNUmakefile.list.am: Added a list of IDL files. Instead, removed a list of JS*.h and JS*.cpp that are generated by the IDL files. 2011-12-27 Tony Chang [chromium] When building with clang, enable -Wglobal-constructors https://bugs.webkit.org/show_bug.cgi?id=74365 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: 2011-12-27 Tony Chang [chromium] really enable wpo for WebCore libs and for WTF https://bugs.webkit.org/show_bug.cgi?id=75264 Reviewed by Adam Barth. * WebCore.gyp/WebCore.gyp: The variable was getting clobbered by the value set in common.gypi. Use a target_defaults instead to set the variable. I tested manually on my Windows machine and WholeProgramOptimization is getting set when buildtype is Official. 2011-12-27 Tony Chang [chromium] remove references to files no longer in the tree https://bugs.webkit.org/show_bug.cgi?id=75262 Reviewed by Adam Barth. * WebCore.gypi: platform/mac/PlatformMouseEventMac.mm and platform/mac/WheelEventMac.mm were removed in r103652. 2011-12-27 Vsevolod Vlasov Unreviewed web inspector localizedStrings.js fix. * English.lproj/localizedStrings.js: 2011-12-27 Vsevolod Vlasov Web Inspector: Introduce support for experimental settings. https://bugs.webkit.org/show_bug.cgi?id=75250 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/ScriptsPanel.js: * inspector/front-end/Settings.js: (WebInspector.ExperimentsSettings): (WebInspector.ExperimentsSettings.prototype.get experiments): (WebInspector.ExperimentsSettings.prototype.get experimentsEnabled): (WebInspector.ExperimentsSettings.prototype._createExperiment): (WebInspector.ExperimentsSettings.prototype.set _cleanUpSetting.get var): (WebInspector.ExperimentsSettings.prototype.set _cleanUpSetting): (set WebInspector.Experiment): (WebInspector.Experiment.prototype.get name): (WebInspector.Experiment.prototype.get title): (WebInspector.Experiment.prototype.isEnabled): (WebInspector.Experiment.prototype.setEnabled): (set WebInspector): * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen): (WebInspector.SettingsScreen.prototype._createExperimentsWarningSubsection): (WebInspector.SettingsScreen.prototype._createExperimentCheckbox.listener): (WebInspector.SettingsScreen.prototype._createExperimentCheckbox): * inspector/front-end/helpScreen.css: (.settings-experiments-warning-subsection-warning): (.settings-experiments-warning-subsection-message): 2011-12-27 Alexander Pavlov Web Inspector: exception when scrolling in JavaScriptOutline dialog with empty query https://bugs.webkit.org/show_bug.cgi?id=75255 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptOutlineDialog.js: (WebInspector.JavaScriptOutlineDialog.prototype._onScroll): 2011-12-27 Pavel Feldman Web Inspector: add more annotations on SDK classes. https://bugs.webkit.org/show_bug.cgi?id=75247 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/compile-front-end.sh: * inspector/front-end/ApplicationCacheModel.js: (WebInspector.ApplicationCacheDispatcher.prototype.networkStateUpdated): * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._breakpoint): * inspector/front-end/Color.js: (WebInspector.Color.prototype.get shorthex): (WebInspector.Color.prototype.get hex): (WebInspector.Color.prototype.get rgb): (WebInspector.Color.prototype.get hsl): (WebInspector.Color.prototype.get nickname): (WebInspector.Color.prototype.hasShortHex): (WebInspector.Color.prototype._individualRGBValueToFloatValue): (WebInspector.Color.prototype._rgbStringsToHex): (WebInspector.Color.prototype._parse.this.nickname.set 2): (WebInspector.Color.prototype._parse.this.hsla.set 1): (WebInspector.Color.prototype._parse.this.rgba.set 0): (WebInspector.Color.prototype._parse.set WebInspector): (WebInspector.Color.prototype._parse): * inspector/front-end/CompilerSourceMapping.js: * inspector/front-end/ConsoleModel.js: * inspector/front-end/ContentProviders.js: (WebInspector.ScriptContentProvider): (WebInspector.ConcatenatedScriptsContentProvider): (WebInspector.CompilerSourceMappingContentProvider): (WebInspector.StaticContentProvider): * inspector/front-end/CookieParser.js: (WebInspector.CookieParser.KeyValue): (WebInspector.CookieParser.prototype.parseCookie): (WebInspector.CookieParser.prototype.parseSetCookie): (WebInspector.CookieParser.prototype._extractKeyValue): * inspector/front-end/DOMStorage.js: * inspector/front-end/Database.js: (WebInspector.DatabaseDispatcher.prototype.sqlTransactionSucceeded): (WebInspector.DatabaseDispatcher.prototype.sqlTransactionFailed): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.Location): (WebInspector.DebuggerModel.prototype._failedToParseScriptSource): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/ElementsTreeOutline.js: * inspector/front-end/HAREntry.js: * inspector/front-end/NetworkLog.js: (WebInspector.NetworkLog.prototype._mainFrameNavigated): * inspector/front-end/Placard.js: * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation): (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.prototype.setPropertyValue.propertySetCallback): (WebInspector.RemoteObject.prototype.setPropertyValue): (WebInspector.LocalJSONObject.prototype.get hasChildren): (WebInspector.LocalJSONObject.prototype._children): * inspector/front-end/Resource.js: (WebInspector.Resource.restoreRevisions): (WebInspector.Resource.prototype.get queryParameters): (WebInspector.Resource.prototype.get formParameters): (WebInspector.Resource.prototype.isHttpFamily): * inspector/front-end/ResourceCategory.js: * inspector/front-end/ResourceUtils.js: * inspector/front-end/ScopeChainSidebarPane.js: (WebInspector.ScopeChainSidebarPane.prototype.update): * inspector/front-end/Script.js: (WebInspector.Script.prototype.isInlineScript): * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.positionToLocation): * inspector/front-end/WelcomeView.js: (WebInspector.WelcomeView.prototype.addMessage): * inspector/front-end/externs.js: (Array.prototype.upperBound): 2011-12-27 Vsevolod Vlasov Web Inspector: Scripts panel tabbed editor does not reopen closed tabs. https://bugs.webkit.org/show_bug.cgi?id=75245 Reviewed by Pavel Feldman. * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView): * inspector/front-end/TabbedEditorContainer.js: (WebInspector.TabbedEditorContainer): (WebInspector.TabbedEditorContainer.prototype._tabClosed): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.closeTab): (WebInspector.TabbedPane.prototype.selectTab): 2011-12-27 Yury Semikhatsky Web Inspector: report per document JS event listener count https://bugs.webkit.org/show_bug.cgi?id=74298 This patch adds JS event listener count to the memory agent report. Reviewed by Pavel Feldman. Test: inspector/dom-statistics.html * inspector/Inspector.json: * inspector/InspectorMemoryAgent.cpp: 2011-12-27 Alexander Pavlov Web Inspector: [REGRESSION] Go to Function dialog always has a minimal height https://bugs.webkit.org/show_bug.cgi?id=75254 Reviewed by Yury Semikhatsky. * inspector/front-end/scriptsPanel.css: (.script-view): 2011-12-26 Vsevolod Vlasov Web Inspector: Create tabbed editor for scripts panel. https://bugs.webkit.org/show_bug.cgi?id=75230 Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes.get if): (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes): (WebInspector.NavigatorScriptTreeElement.prototype.ondblclick): (WebInspector.NavigatorScriptTreeElement.prototype.onenter): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/TabbedEditorContainer.js: Added. * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.get visibleView): (WebInspector.TabbedPane.prototype.get selectedTabId): (WebInspector.TabbedPane.prototype.closeAllTabs): (WebInspector.TabbedPane.prototype.changeTabTitle): (WebInspector.TabbedPane.prototype.changeTabView): (WebInspector.TabbedPaneTab): (WebInspector.TabbedPaneTab.prototype.get title): (WebInspector.TabbedPaneTab.prototype.set title): (WebInspector.TabbedPaneTab.prototype.get view): (WebInspector.TabbedPaneTab.prototype.set view): (WebInspector.TabbedPaneTab.prototype._createTabElement): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/scriptsPanel.css: (.scripts-views-container): (.script-view): (#scripts-editor-container-tabbed-pane .tabbed-pane-header): (#scripts-editor-container-tabbed-pane .tabbed-pane-header-contents): (#scripts-editor-container-tabbed-pane .tabbed-pane-content): 2011-12-27 Pavel Feldman Not reviewed: Rolling out r103703 for breaking Canvas2DLayerChromiumTest.testFullLifecycle. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: 2011-12-22 Vangelis Kokkevis [chromium] Bypass the shadow texture copy for accelerated canvas when running the compositor in single threaded mode. https://bugs.webkit.org/show_bug.cgi?id=75146 The texture copy fails on Windows as glCopyTexImage2D() doesn't support BGRA source textures. This change also modified Canvas2DLayerChromium::updateCompositorResources to call glCopyTexSubImage2D() instead of glCopyTexImage2D() so that the copy can work with texture allocated via the glTexStorage2D extension. Reviewed by James Robinson. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: 2011-12-26 Gyuyoung Kim [EFL][WK2] Implement context menu for EFL port. https://bugs.webkit.org/show_bug.cgi?id=74995 Reviewed by Anders Carlsson. Implement missing ContextMenuEfl class in order to support WK2's context menu. Because WK2's context menu still needs WebCore's context menu implementation. And of course, this patch also can be used for WK1 without CROSS_PLATFORM_CONTEXT_MENU option. * platform/ContextMenu.h: * platform/ContextMenuItem.h: * platform/PlatformMenuDescription.h: * platform/efl/ContextMenuEfl.cpp: (WebCore::ContextMenu::~ContextMenu): (WebCore::ContextMenu::appendItem): (WebCore::ContextMenu::insertItem): (WebCore::ContextMenu::itemCount): (WebCore::ContextMenu::setPlatformDescription): (WebCore::ContextMenu::platformDescription): (WebCore::ContextMenu::releasePlatformDescription): (WebCore::platformMenuDescription): (WebCore::contextMenuItemVector): * platform/efl/ContextMenuItemEfl.cpp: (WebCore::ContextMenuItem::ContextMenuItem): (WebCore::ContextMenuItem::~ContextMenuItem): (WebCore::ContextMenuItem::setType): (WebCore::ContextMenuItem::type): (WebCore::ContextMenuItem::setAction): (WebCore::ContextMenuItem::action): (WebCore::ContextMenuItem::setTitle): (WebCore::ContextMenuItem::title): (WebCore::ContextMenuItem::setChecked): (WebCore::ContextMenuItem::checked): (WebCore::ContextMenuItem::setEnabled): (WebCore::ContextMenuItem::enabled): 2011-12-26 Hajime Morrita [Refactoring] Node::setTreeScopeRecursively() doesn't need includeRoot parameter https://bugs.webkit.org/show_bug.cgi?id=75240 Reviewed by Anders Carlsson. No new tests. No behavior change. * dom/Node.cpp: (WebCore::Node::setTreeScopeRecursively): * dom/Node.h: 2011-12-26 Darin Adler Use OwnPtr and OwnArrayPtr in a couple more places https://bugs.webkit.org/show_bug.cgi?id=75211 Reviewed by Andreas Kling. I had a patch with some changes from a while back from going through all sorts of classes and changing code to use adoptPtr. Most were landed long ago, these are the ones that still apply. There are six pieces here that could each be landed separately. The big one is CSSParser. * css/CSSGrammar.y: Update for members and functions that now return PassOwnPtr instead of raw pointers. * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): Remove explicit construction for m_valueList and m_data since OwnPtr and OwnArrayPtr initialize to zero without it. (WebCore::CSSParser::~CSSParser): Removed delete m_valueList and fastFree(m_data) since OwnPtr and OwnArrayPtr handle that. (WebCore::CSSParser::setupParser): Use adoptArrayPtr and new for the character array instead of fastFree/fastMalloc. Added get function calls as needed. (WebCore::CSSParser::parseValue): Added get function calls as needed. (WebCore::CSSParser::parseContent): Ditto. (WebCore::CSSParser::parseFillProperty): Ditto. (WebCore::CSSParser::parseTransformOriginShorthand): Ditto. (WebCore::CSSParser::parseBorderImage): Ditto. (WebCore::CSSParser::parseTransformOrigin): Ditto. (WebCore::CSSParser::parsePerspectiveOrigin): Ditto. (WebCore::CSSParser::sinkFloatingValueList): Changed to return PassOwnPtr. The adoptPtr call is here. (WebCore::CSSParser::sinkFloatingFunction): Ditto. (WebCore::CSSParser::markSelectorListStart): Added get function calls as needed. (WebCore::CSSParser::markSelectorListEnd): Ditto. (WebCore::CSSParser::markRuleBodyStart): Ditto. (WebCore::CSSParser::markRuleBodyEnd): Ditto. (WebCore::CSSParser::markPropertyStart): Ditto. (WebCore::CSSParser::markPropertyEnd): Ditto. * css/CSSParser.h: Moved conditional includes to their own paragraph. Made sinkFloatingValueList and sinkFloatingFunction return PassOwnPtr. Made m_valueList an OwnPtr and m_data an OwnArrayPtr. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): Added a call to the get function. * html/PluginDocument.h: Made isPluginDocument private. Also marked all the functions that are overriding here as OVERRIDE since I was touching the header. * html/parser/HTMLToken.h: (WebCore::HTMLTokenTypes::DoctypeData::DoctypeData): Removed an unneeded line explicitly initializing the base class. * page/animation/AnimationBase.cpp: (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper): Fixed indent. * rendering/style/RenderStyle.h: Moved conditional includes to their own paragraph. * xml/parser/MarkupTokenBase.h: (WebCore::MarkupTokenBase::beginDOCTYPE): Removed unneeded parentheses. 2011-12-26 Vsevolod Vlasov Web Inspector: Extract FileEditor from ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=75229 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName): * inspector/front-end/ScriptsNavigator.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.get visibleView): (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced.get if): (WebInspector.ScriptsPanel.EditorContainer): (WebInspector.ScriptsPanel.EditorContainer.prototype.get currentSourceFrame): (WebInspector.ScriptsPanel.EditorContainer.prototype.show): (WebInspector.ScriptsPanel.EditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.EditorContainer.prototype.isSourceFrameOpen): (WebInspector.ScriptsPanel.EditorContainer.prototype.replaceSourceFrames): (WebInspector.ScriptsPanel.EditorContainer.prototype.setSourceFrameIsDirty): (WebInspector.ScriptsPanel.EditorContainer.prototype.reset): (WebInspector.ScriptsPanel.SingleFileEditorContainer): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.get currentSourceFrame): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.show): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showSourceFrame): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.isSourceFrameOpen): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.setSourceFrameIsDirty): (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.reset): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode.prototype.get domain): (WebInspector.UISourceCode.prototype.get folderName): (WebInspector.UISourceCode.prototype.get fileName): (WebInspector.UISourceCode.prototype.get displayName): (WebInspector.UISourceCode.prototype._parseURL): 2011-12-26 Darin Adler Fix mutation observer build after didMoveToNewDocument change https://bugs.webkit.org/show_bug.cgi?id=75224 Reviewed by Hajime Morita. * dom/Node.cpp: (WebCore::willCallDidMoveToNewDocument): Added. (WebCore::didMoveToNewDocumentWasCalled): Added. (WebCore::Node::setDocument): Call new debugging function. (WebCore::Node::didMoveToNewDocument): Ditto. Also use ASSERT_UNUSED unconditionally rather than UNUSED_PARAM inside and #if. Also added a new assertion that checks that hte old document was passed through properly. 2011-12-26 Alexander Pavlov Web Inspector: [Scripts] Implement iterative match highlighting in the "Go to Function" dialog item list https://bugs.webkit.org/show_bug.cgi?id=75226 Reviewed by Pavel Feldman. * inspector/front-end/JavaScriptOutlineDialog.js: (WebInspector.JavaScriptOutlineDialog): (WebInspector.JavaScriptOutlineDialog.prototype._createSearchRegExp): (WebInspector.JavaScriptOutlineDialog.prototype._filterFunctions): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.previousItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.nextItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown): (WebInspector.JavaScriptOutlineDialog.prototype._updateSelection): (WebInspector.JavaScriptOutlineDialog.prototype._onScroll): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype.highlightViewportItems): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype.clearHighlight): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype._highlightItem): (WebInspector.JavaScriptOutlineDialog.MatchHighlighter.prototype._viewportRowRange): * inspector/front-end/javaScriptOutlineDialog.css: (.js-outline-dialog > .container > div.item > span.highlight): 2011-12-26 Vsevolod Vlasov Web Inspector: Extract FileSelector from ScriptsPanel. https://bugs.webkit.org/show_bug.cgi?id=75173 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement): (WebInspector.ScriptsNavigator.prototype.show): (WebInspector.ScriptsNavigator.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsNavigator.prototype.replaceUISourceCodes): (WebInspector.ScriptsNavigator.prototype.scriptSelected): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if): (WebInspector.ScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype._showSourceLine): (WebInspector.ScriptsPanel.prototype._showAndRevealInFileSelector): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._updateExecutionLine): (WebInspector.ScriptsPanel.prototype._scriptSelected): (WebInspector.ScriptsPanel.FileSelector): (WebInspector.ScriptsPanel.FileSelector.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.FileSelector.prototype.show): (WebInspector.ScriptsPanel.FileSelector.prototype.addUISourceCode): (WebInspector.ScriptsPanel.FileSelector.prototype.isScriptSourceAdded): (WebInspector.ScriptsPanel.FileSelector.prototype.revealUISourceCode): (WebInspector.ScriptsPanel.FileSelector.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsPanel.FileSelector.prototype.replaceUISourceCodes): (WebInspector.ScriptsPanel.ComboBoxFileSelector): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.get defaultFocusedElement): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.show): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.showDebugSidebarResizeWidget): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.addUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.isScriptSourceAdded): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.revealUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._innerRevealUISourceCode): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addToHistory): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.replaceUISourceCodes): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._showScriptFoldersSettingChanged): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._reset): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype.setScriptSourceIsDirty): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._createEditorToolbar): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.get var): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered.optionCompare): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect.insertOrdered): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._resetFilesSelect): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._updateBackAndForwardButtons): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goBack): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._goForward): (WebInspector.ScriptsPanel.ComboBoxFileSelector.prototype._filesSelectChanged): * inspector/front-end/inspector.html: * inspector/front-end/utilities.js: (): 2011-12-26 Alexander Pavlov Web Inspector: Implement "Go to Function" dialog for JavaScript https://bugs.webkit.org/show_bug.cgi?id=75092 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/JavaScriptOutlineDialog.js: Added. (WebInspector.JavaScriptOutlineDialog.onMouseDown): (WebInspector.JavaScriptOutlineDialog): (WebInspector.JavaScriptOutlineDialog.didAddChunk): (WebInspector.JavaScriptOutlineDialog.install): (WebInspector.JavaScriptOutlineDialog._show): (WebInspector.JavaScriptOutlineDialog.createShortcut): (WebInspector.JavaScriptOutlineDialog.prototype._resizeWindow): (WebInspector.JavaScriptOutlineDialog.prototype._appendItemElements): (WebInspector.JavaScriptOutlineDialog.prototype._createSearchRegExp): (WebInspector.JavaScriptOutlineDialog.prototype._filterFunctions): (WebInspector.JavaScriptOutlineDialog.prototype._selectFirstItem): (WebInspector.JavaScriptOutlineDialog.prototype._hide): (WebInspector.JavaScriptOutlineDialog.prototype._onBlur): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.previousItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown.nextItem): (WebInspector.JavaScriptOutlineDialog.prototype._onKeyDown): (WebInspector.JavaScriptOutlineDialog.prototype._scheduleFilter): (WebInspector.JavaScriptOutlineDialog.prototype._updateSelection): (WebInspector.JavaScriptOutlineDialog.prototype._onClick): (WebInspector.JavaScriptOutlineDialog.prototype._onMouseMove): (WebInspector.JavaScriptOutlineDialog.prototype._highlightFunctionLine): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.get uiSourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._didBuildOutlineChunk): (WebInspector.ScriptsPanel.prototype._reset): (WebInspector.ScriptsPanel.prototype.requestVisibleScriptOutline): (WebInspector.ScriptsPanel.prototype._createEditorToolbar): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/javaScriptOutlineDialog.css: Added. (.js-outline-dialog): (.js-outline-dialog > input): (.js-outline-dialog > div.progress): (.js-outline-dialog > div.container): (.js-outline-dialog > .container > div.item): (.js-outline-dialog > .container > div.item.selected): 2011-12-26 Pavel Feldman Web Inspector: make SDK compilation component self-contained. https://bugs.webkit.org/show_bug.cgi?id=75172 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessageImpl): (WebInspector.ConsoleMessageImpl.prototype.get stackTrace): (WebInspector.ConsoleMessageImpl.prototype.clone): * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated): (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.prototype.isErrorOrWarning): (WebInspector.ConsoleMessage.prototype.updateRepeatCount): (WebInspector.ConsoleMessage.prototype.clone): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): * inspector/front-end/ResourceUtils.js: * inspector/front-end/UIUtils.js: (WebInspector.resetToolbarColors): (WebInspector.populateHrefContextMenu): 2011-12-26 Hajime Morrita Unreviewed bad merge fix. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::didMoveToNewDocument): 2011-12-25 Hajime Morrita https://bugs.webkit.org/show_bug.cgi?id=74067 Refactoring: Unitfy willMoveToNewDocument() and didMoveToNewDocument() Reviewed by Darin Adler. No new tests. No behavior change. This change combines two method Node::willMoveToNewOwnerDocument() and Node::didMoveToNewOwnerDocument() into Node::didMoveToNewDocument(Document* oldDocument). The intention of this change is: - Making upcoming refactoring (Bug 59816) possible. The refactoring will turn Node::m_document into Node::m_treeScope, and we will no longer have Node::setDocument() where we can invoke both willMoveToNewDocument() and didMoveToNewDocument() at once. - Killing one extra virtual method call. - Making the concept of "move" clearer by keeping such an operation into the single method. * dom/Node.cpp: (WebCore::setWillMoveToNewDocumentWasCalled): (WebCore::setDidMoveToNewDocumentWasCalled): (WebCore::Node::setDocument): (WebCore::Node::didMoveToNewDocument): * dom/Node.h: * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::didMoveToNewDocument): * html/FormAssociatedElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::didMoveToNewDocument): (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument): * html/HTMLFormControlElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::didMoveToNewDocument): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::didMoveToNewDocument): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::didMoveToNewDocument): * html/HTMLInputElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::didMoveToNewDocument): * html/HTMLMediaElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::didMoveToNewDocument): * html/HTMLObjectElement.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): * html/HTMLPlugInImageElement.h: * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::didMoveToNewDocument): * html/HTMLVideoElement.h: * html/ImageDocument.cpp: (WebCore::ImageDocumentElement::didMoveToNewDocument): * html/ImageInputType.cpp: (WebCore::ImageInputType::willMoveToNewDocument): * loader/ImageLoader.cpp: (WebCore::ImageLoader::elementDidMoveToNewDocument): * loader/ImageLoader.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::didMoveToNewDocument): * svg/SVGImageElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::didMoveToNewDocument): * svg/SVGSVGElement.h: 2011-12-25 Kentaro Hara REGRESSION(r102987): Fix the filename prefix of the generated empty .h and .cpp files for [Supplemental] IDLs https://bugs.webkit.org/show_bug.cgi?id=75082 Reviewed by Darin Adler. In bug 74481, we changed generate-bindings.pl so that it generates empty .h and .cpp files for the [Supplemental] IDLs. However, the filename prefixes of those .h and .cpp files are wrong. This patch fixes the prefixes as follows: generator=JS => JS*.h, JS*.cpp generator=V8 => V8*.h, V8*.cpp generator=ObjC => DOM*.h, DOM*.cpp generator=GObject => WebKitDOM*.h, WebKitDOM*.cpp generator=CPP => WebDOM*.h, WebDOM*.cpp No new tests. No change in behavior. I confirmed that the names of generated .h and .cpp files are correct. * bindings/scripts/CodeGenerator.pm: (FileNamePrefix): Returns the prefix of file names. * bindings/scripts/CodeGeneratorCPP.pm: (GenerateInterface): Uses CodeGenerator::FileNamePrefix. * bindings/scripts/CodeGeneratorGObject.pm: (GenerateInterface): Ditto. * bindings/scripts/CodeGeneratorJS.pm: (GenerateInterface): Ditto. * bindings/scripts/CodeGeneratorObjC.pm: (GenerateInterface): Ditto. * bindings/scripts/CodeGeneratorV8.pm: (GenerateInterface): Ditto. * bindings/scripts/generate-bindings.pl: (generateEmptyHeaderAndCpp): Ditto. 2011-12-25 Dan Bernstein WebCore changes for: Find indicators overlap when a match spans multiple text boxes https://bugs.webkit.org/show_bug.cgi?id=75220 Reviewed by Darin Adler. * WebCore.exp.in: Exported new unionRect(const Vector&) and existing FloatRect::intersects(). * platform/graphics/FloatRect.cpp: (WebCore::unionRect): Added. * platform/graphics/FloatRect.h: 2011-12-25 Darin Adler Use OwnPtr for CSSFontFace::m_sources https://bugs.webkit.org/show_bug.cgi?id=75219 Reviewed by Dan Bernstein. * css/CSSFontFace.cpp: (WebCore::CSSFontFace::isLoaded): Use the same size_t idiom here as in the rest of the functions. (WebCore::CSSFontFace::isValid): Ditto. Also removed unneeded empty special casing. (WebCore::CSSFontFace::addSource): Changed to take a PassOwnPtr. Reordered so the PassOwnPtr zeroing does not cause trouble. (WebCore::CSSFontFace::getFontData): Added call to get. (WebCore::CSSFontFace::hasSVGFontFaceSource): Use the same size_t idiom here as in the rest of the functions. * css/CSSFontFace.h: Use PassOwnPtr for addSource argument, and Vector for the m_sources vector. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Use OwnPtr and PassOwnPtr for font face sources that are passed to addSource. * css/CSSSegmentedFontFace.cpp: Added a now-needed include. 2011-12-24 Jarred Nicholls Allow XMLHttpRequest responseType to be set at any state up to and including HEADERS_RECEIVED https://bugs.webkit.org/show_bug.cgi?id=75190 XMLHttpRequest.responseType should be modifiable at any state up to and including the HEADERS_RECEIVED state. Therefore, subsequent calls to open() should not reset responseType to its default value, and calls to open() must follow the same spec mandate set forth in setResponseType() for synchronous HTTP(S) requests made from the window context. Reviewed by Alexey Proskuryakov. Tests: fast/xmlhttprequest/xmlhttprequest-responsetype-before-open-sync-request.html fast/xmlhttprequest/xmlhttprequest-responsetype-before-open.html fast/xmlhttprequest/xmlhttprequest-responsetype-set-at-headers-received.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setResponseType): Prevent setting the value only when in LOADING and DONE states. No longer check if m_loader is present, which is instantiated on a call to send(), because responseType can be safely changed after a request is sent. (WebCore::XMLHttpRequest::open): Do not reset m_responseTypeCode to the default value, and prevent calls to open() for synchronous HTTP(S) requests made from the window context when m_responseTypeCode is not the default value. 2011-12-25 Sam Weinig Fix tests failing as a result of r103643 https://bugs.webkit.org/show_bug.cgi?id=75209 Reviewed by Dan Bernstein. Switch accidental switch of default scroll granularity from ScrollByPageWheelEvent back to ScrollByPixelWheelEvent. * platform/mac/PlatformEventFactory.mm: (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): 2011-12-25 Darin Adler Change CSS canvas code that does HashMap get/set to use the more efficient add idiom https://bugs.webkit.org/show_bug.cgi?id=75204 Reviewed by Dan Bernstein. * dom/Document.cpp: (WebCore::Document::getCSSCanvasContext): Change local variable name of element to element; it's not the function result, so not good to name it result. (WebCore::Document::getCSSCanvasElement): Use add instead of get/set so we only do one hash table lookup. 2011-12-24 Andreas Kling CSSElementStyleDeclarations should never move between elements. Reviewed by Anders Carlsson. Have the CSSElementStyleDeclaration subclasses take a StyledElement* in the constructor and replace setElement(StyledElement*) by clearElement(). No behavior change, just enforcing the current behavior at compile-time. * css/CSSElementStyleDeclaration.h: (WebCore::CSSElementStyleDeclaration::clearElement): (WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration): * css/CSSInlineStyleDeclaration.h: (WebCore::CSSInlineStyleDeclaration::create): (WebCore::CSSInlineStyleDeclaration::CSSInlineStyleDeclaration): * dom/StyledElement.cpp: (WebCore::StyledElement::createInlineStyleDecl): (WebCore::StyledElement::destroyInlineStyleDecl): * svg/SVGFontFaceElement.cpp: (WebCore::FontFaceStyleDeclaration::FontFaceStyleDeclaration): 2011-12-23 Andreas Kling Decouple CSSMappedAttributeDeclaration from element completely. Reviewed by Darin Adler. Let CSSMappedAttributeDeclaration inherit from CSSMutableDeclaration instead of CSSElementStyleDeclaration. Add methods to CSSMappedAttributeDeclaration for setting properties that also take a StyledElement* and use that mechanism instead of temporarily associating an element with the declaration. This reduces the size of mapped attributes by 4/8 bytes, but more importantly opens a number of ways to simplify style declarations in future patches. * css/CSSMutableStyleDeclaration.h: * dom/CSSMappedAttributeDeclaration.cpp: (WebCore::CSSMappedAttributeDeclaration::setNeedsStyleRecalc): (WebCore::CSSMappedAttributeDeclaration::setMappedImageProperty): (WebCore::CSSMappedAttributeDeclaration::setMappedLengthProperty): (WebCore::CSSMappedAttributeDeclaration::setMappedProperty): (WebCore::CSSMappedAttributeDeclaration::removeMappedProperty): * dom/CSSMappedAttributeDeclaration.h: (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration): Add/move methods to CSSMappedAttributeDeclaration for setting/removing properties that also take a StyledElement*. That element is used for scheduling style recalc and passing the right document to CSSParser. * css/CSSParser.h: * css/CSSParser.cpp: (WebCore::parseColorValue): (WebCore::parseSimpleLengthValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseMappedAttributeValue): Added a parsedMappedAttributeValue() alternative to parseValue() that takes a StyledElement*. * dom/StyledElement.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::setContentEditable): Add (and use) a StyledElement::removeCSSProperty() complement to the addCSS*() functions. * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): (WebCore::StyledElement::removeCSSProperty): (WebCore::StyledElement::addCSSProperty): (WebCore::StyledElement::addCSSImageProperty): (WebCore::StyledElement::addCSSLength): (WebCore::StyledElement::addCSSColor): (WebCore::StyledElement::createMappedDecl): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::additionalAttributeStyleDecls): (WebCore::HTMLTableElement::addSharedCellBordersDecl): (WebCore::HTMLTableElement::addSharedCellPaddingDecl): (WebCore::HTMLTableElement::addSharedGroupDecls): Use the setMapped*Property() functions to plumb the element through. * css/CSSElementStyleDeclaration.h: Update comment about CSSElementStyleDeclaration's subclasses. 2011-12-24 Jarred Nicholls Allow XMLHttpRequest withCredentials to be set prior to a call to open() https://bugs.webkit.org/show_bug.cgi?id=75194 XMLHttpRequest.withCredentials attribute should be modifiable prior to the OPENED state per the W3C spec. See http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-withcredentials-attribute Reviewed by Alexey Proskuryakov. Test: fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setWithCredentials): Prevent setting the value only after the OPENED state. 2011-12-24 Andreas Kling Remove empty inline RenderStyle destructor. Rubber-stamped by Anders "Ordvits" Carlsson. * rendering/style/RenderStyle.h: 2011-12-24 Andreas Kling RenderStyle: Inline the destructor. Reviewed by Kenneth Rohde Christiansen. The (empty) RenderStyle destructor gets a little hot sometimes, reaching up to 0.4% when loading the full HTML5 spec. Inline it to remove the pointless function call. * rendering/style/RenderStyle.cpp: * rendering/style/RenderStyle.h: (WebCore::RenderStyleBitfields::~RenderStyle): 2011-12-23 Noel Gordon JPEG decoders should only save color profile markers if color management is enabled https://bugs.webkit.org/show_bug.cgi?id=75182 Reviewed by Adam Barth. No new tests. Covered by existing tests. fast/images/ycbcr-with-cmyk-color-profile.html fast/images/gray-scale-jpeg-with-color-profile.html fast/images/cmyk-jpeg-with-color-profile.html fast/images/color-jpeg-with-color-profile.html * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageReader::JPEGImageReader): Store color profile (JPEG_APP0 + 2) markers using the iccjpeg helper setup_read_icc_profile() if color management is enabled. 2011-12-23 Alice Boxhall Fix crash when adding paragraph in contenteditable with role=textbox. https://bugs.webkit.org/show_bug.cgi?id=75159 Reviewed by Ryosuke Niwa. Test: accessibility/textbox-role-on-contenteditable-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::childrenChanged): Use rendererIsEditable() rather than isContentEditable() as this method is called during render layouts, and isContentEditable() triggers a layout update, which crashes. 2011-12-23 Noel Gordon [chromium] JPEG image with CMYK ICC color profile renders color-inverted and squashed https://bugs.webkit.org/show_bug.cgi?id=74400 Reviewed by Adam Barth. Use color profiles for GRAYSCALE, RGB, YCbCr, CMYK and YCCK jpeg images only if their embedded color profile is from an RGB color space input device. Test: fast/images/ycbcr-with-cmyk-color-profile.html - YCbCr image, with CMYK output device color profile. Existing Tests: fast/images/gray-scale-jpeg-with-color-profile.html - YCbCr image, with GRAY input device color profile. fast/images/cmyk-jpeg-with-color-profile.html - YCCK image, with CMYK output device color profile. fast/images/color-jpeg-with-color-profile.html - YCbCr image, with RGB input device color profile. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::rgbColorProfile): Return true if the profile has an RGB color space. (WebCore::inputDeviceColorProfile): Return true if the profile is from an input device. (WebCore::readColorProfile): Ignore the embedded color profile unless if it is from an RGB color space input device. (WebCore::JPEGImageReader::decode): 2011-12-23 Dan Bernstein Print dlerror() when dyld functions fail unexpectedly https://bugs.webkit.org/show_bug.cgi?id=75185 Reviewed by Sam Weinig. * platform/mac/SoftLinking.h: 2011-12-23 Sam Weinig Start extracting platform specific bits out of PlatformEvents https://bugs.webkit.org/show_bug.cgi?id=75063 Reviewed by Anders Carlsson. * WebCore.exp.in: Update exports. * WebCore.xcodeproj/project.pbxproj: Add factory, remove implementation files for mac PlatformWheelEvent and PlatformMouseEvent. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): (WebCore::EventHandler::keyEvent): (WebCore::EventHandler::currentPlatformMouseEvent): Switch to use the factory. * platform/PlatformEvent.h: (WebCore::PlatformEvent::shiftKey): (WebCore::PlatformEvent::ctrlKey): (WebCore::PlatformEvent::altKey): (WebCore::PlatformEvent::metaKey): (WebCore::PlatformEvent::modifiers): (WebCore::PlatformEvent::PlatformEvent): Switch to storing the modifiers as bits on an unsigned instead of as individual bools. * platform/PlatformGestureEvent.h: Remove unused timestamp member. * platform/PlatformKeyboardEvent.h: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): (WebCore::PlatformKeyboardEvent::keyIdentifier): (WebCore::PlatformKeyboardEvent::macCharCode): (WebCore::PlatformKeyboardEvent::isSystemKey): Give this class a more consistent interface across platforms, and remove constructor that took an NSEvent. * platform/PlatformMouseEvent.h: Remove constructor that took an NSEvent (and an unused constructor that took many arguments) as well as some free functions for point conversion. * platform/PlatformWheelEvent.h: Remove constructor that took an NSEvent and an unnecessary override of the timestamp() function. * platform/mac/KeyEventMac.mm: Removed constructor and moved helpers to PlatformEventFactory. * platform/mac/PlatformEventFactory.h: Added. * platform/mac/PlatformEventFactory.mm: Added. (WebCore::globalPoint): (WebCore::globalPointForEvent): (WebCore::pointForEvent): (WebCore::mouseButtonForEvent): (WebCore::mouseEventTypeForEvent): (WebCore::clickCountForEvent): (WebCore::momentumPhaseForEvent): (WebCore::phaseForEvent): (WebCore::gestureEventTypeForEvent): (WebCore::textFromEvent): (WebCore::unmodifiedTextFromEvent): (WebCore::keyIdentifierForKeyEvent): (WebCore::isKeypadEvent): (WebCore::windowsKeyCodeForKeyEvent): (WebCore::isKeyUpEvent): (WebCore::modifiersForEvent): (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): (WebCore::PlatformEventFactory::createPlatformMouseEvent): (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): (WebCore::PlatformEventFactory::createPlatformWheelEvent): (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): (WebCore::PlatformEventFactory::createPlatformKeyboardEvent): (WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder): (WebCore::PlatformEventFactory::createPlatformGestureEvent): Consolidate platform event creation logic and add factory functions. * platform/mac/PlatformMouseEventMac.mm: Removed. * platform/mac/WheelEventMac.mm: Removed. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: Expose wkGetNSEventKeyChar in WebCore. * platform/gtk/PlatformKeyboardEventGtk.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/gtk/PlatformMouseEventGtk.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/gtk/PlatformWheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/qt/PlatformMouseEventQt.cpp: (WebCore::mouseEventModifiersFromQtKeyboardModifiers): (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/qt/PlatformTouchEventQt.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/win/KeyEventWin.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/win/WheelEventWin.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): Update for new variables/names. 2011-12-22 Andreas Kling CSSParser: Avoid creating dummy declaration in parseColor() slow path. Reviewed by Darin Adler. We only needed the dummy declaration to trigger the instantiation of a CSSValuePool. Added an ensureCSSValuePool() method and have parseColor() call that instead. Also renamed the fast-path parseColor() to fastParseColor() and reordered the arguments for consistency with the slow-path parseColor(). * css/CSSParser.cpp: (WebCore::parseColorValue): (WebCore::CSSParser::parseColor): (WebCore::CSSParser::ensureCSSValuePool): (WebCore::CSSParser::fastParseColor): (WebCore::CSSParser::parseColorFromValue): * css/CSSParser.h: 2011-12-21 Andreas Kling Automate elements' registration as document namedItem/extraNamedItem. Reviewed by Antti Koivisto. Remove caching of the "id" and "name" attributes on applet, embed, form, image and object elements. We were caching them to keep the document's map of named and "extra named" (named by id) item counts in sync. Instead, add a hook to Element::willModifyAttribute() that detects when the attributes are being changed and handle the registration/unregistration automatically if the element returns true for shouldRegisterAsNamedItem() or shouldRegisterAsExtraNamedItem() respectively. This shrinks the elements by two AtomicStrings (8 or 16 bytes) each. IFrame elements retain the old mechanism for now, as there are some subtle differences to how that's handled. * dom/Node.h: (WebCore::Node::hasName): (WebCore::Node::setHasName): Cache whether we have a "name" attribute or not (1 bit on Node.) This is done in order to minimize the overhead added to Element's insertedIntoDocument() and removeFromDocument(). * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): Update the Node's has-name flag as appropriate. * dom/Element.cpp: (WebCore::Element::updateNamedItemRegistration): (WebCore::Element::updateExtraNamedItemRegistration): Added. Called when the "name" and "id" attributes are changed. Updates the document's named item maps accordingly. (WebCore::Element::insertedIntoDocument): (WebCore::Element::removedFromDocument): Make sure updateName() is called in addition to updateId() when applicable. * dom/Element.h: (WebCore::Element::shouldRegisterAsNamedItem): (WebCore::Element::shouldRegisterAsExtraNamedItem): Added. If an element returns true for these, it will be automatically registered with the document when the name/id attribute changes. (WebCore::Element::updateId): (WebCore::Element::updateName): Register/unregister from the document's named item maps as appropriate. (WebCore::Element::willModifyAttribute): Add updateName() hook in addition to the existing updateId() hook. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setAttributes): Make sure updateName() is called when we're cloning the attributes from another element. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): * html/HTMLAppletElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): (WebCore::HTMLEmbedElement::insertedIntoDocument): * html/HTMLEmbedElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedIntoDocument): (WebCore::HTMLFormElement::removedFromDocument): (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): (WebCore::HTMLImageElement::insertedIntoDocument): * html/HTMLImageElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): (WebCore::HTMLObjectElement::insertedIntoDocument): (WebCore::HTMLObjectElement::removedFromDocument): * html/HTMLObjectElement.h: * html/HTMLPlugInElement.h: Remove duplicated code that is now handled by Element. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateDocNamedItem): (WebCore::HTMLObjectElement::formControlName): Use fastGetAttribute() since we no longer cache the name. 2011-12-23 Anders Carlsson Add two (currently unused) new member functions to ScrollElasticityControllerClient https://bugs.webkit.org/show_bug.cgi?id=75179 Reviewed by Dan Bernstein. This is so we'll be able to move more code to ScrollElasticityController. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::pinnedInDirection): (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints): * platform/mac/ScrollElasticityController.h: 2011-12-23 Simon Fraser Blur filter doesn't invalidate enough https://bugs.webkit.org/show_bug.cgi?id=74891 Reviewed by Darin Adler. Take the effects of filters into account for repainting; we need to inflate the repaint rect by the outsets provided by the filter. Test: css3/filters/filter-repaint.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeRectForRepaint): * rendering/RenderInline.cpp: (WebCore::RenderInline::computeRectForRepaint): 2011-12-23 Simon Fraser Filters should apply to inline elements https://bugs.webkit.org/show_bug.cgi?id=75152 Reviewed by Darin Adler. Filters need to cause creation of RenderLayers for inlines, just like opacity and masks do. Test: css3/filters/filtered-inline.html * rendering/RenderInline.h: (WebCore::RenderInline::requiresLayer): * rendering/RenderTableRow.h: Remove an obviously incorrect comment. 2011-12-23 Jarred Nicholls Synchronous XHR in window context should not support new XHR responseTypes for HTTP(S) requests https://bugs.webkit.org/show_bug.cgi?id=72154 Per the latest W3C editor draft: http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html This is a spec-mandated attempt to thwart and otherwise discourage the use of synchronous XHR in the window context by deliberately not exposing newer functionality. Here we are disabling the use of responseType in synchronous HTTP(S) XHR requests from the window context. When a user attempts this action, an InvalidAccessError exception is thrown and a message is printed to the console to further explain. Renamed reportUnsafeUsage to a more generic name, and hoisted it up so it would be defined earlier and thus referenceable by setResponseType. Reviewed by Alexey Proskuryakov. Test: fast/xmlhttprequest/xmlhttprequest-responsetype-sync-request.html * xml/XMLHttpRequest.cpp: (WebCore::logConsoleError): reportUnsafeUsage -> logConsoleError (WebCore::XMLHttpRequest::setResponseType): (WebCore::XMLHttpRequest::setRequestHeader): reportUnsafeUsage -> logConsoleError (WebCore::XMLHttpRequest::getResponseHeader): reportUnsafeUsage -> logConsoleError (WebCore::XMLHttpRequest::didFail): reportUnsafeUsage -> logConsoleError 2011-12-23 Alexander Pavlov Web Inspector: Implement a worker for parsing out JavaScript function data https://bugs.webkit.org/show_bug.cgi?id=75166 Reviewed by Pavel Feldman. Test: inspector/debugger/script-extract-outline.html * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.prototype.formatContent): * inspector/front-end/ScriptFormatterWorker.js: (onmessage): (format): (getChunkCount): (): (Array.prototype.keySet): 2011-12-23 Ilya Tikhonovsky Unreviewed, rolling out r103624. http://trac.webkit.org/changeset/103624 https://bugs.webkit.org/show_bug.cgi?id=68916 Broke Snow Leopard builders * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.pri: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDirectoryEntryCustom.cpp: (WebCore::JSDirectoryEntry::getFile): (WebCore::JSDirectoryEntry::getDirectory): * bindings/js/JSDirectoryEntrySyncCustom.cpp: (WebCore::getFlags): * bindings/v8/custom/V8DirectoryEntryCustom.cpp: (WebCore::V8DirectoryEntry::getDirectoryCallback): (WebCore::V8DirectoryEntry::getFileCallback): * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp: (WebCore::getFlags): * fileapi/WebKitFlags.idl: Added. * page/DOMWindow.idl: * workers/WorkerContext.idl: 2011-12-23 Eric Uhrhane [fileapi] WebKitFlags should not be constructable per Directories & System spec https://bugs.webkit.org/show_bug.cgi?id=68916 Reviewed by Eric Seidel. Remove IDL for the object and all DOM references to it. * fileapi/WebKitFlags.idl: Removed. * page/DOMWindow.idl: * workers/WorkerContext.idl: Remove references to the JSC/V8 objects compiled from the IDL. * bindings/js/JSDirectoryEntryCustom.cpp: (WebCore::JSDirectoryEntry::getFile): (WebCore::JSDirectoryEntry::getDirectory): * bindings/js/JSDirectoryEntrySyncCustom.cpp: (WebCore::getFlags): * bindings/v8/custom/V8DirectoryEntryCustom.cpp: (WebCore::V8DirectoryEntry::getDirectoryCallback): (WebCore::V8DirectoryEntry::getFileCallback): * bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp: (WebCore::getFlags): Fix up build files. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCore/CMakeLists.txt: * WebCore/CodeGenerators.pri: * WebCore/DerivedSources.cpp: * WebCore/GNUmakefile.list.am: 2011-12-23 Pavel Feldman Web Inspector: Migrate to native Function.prototype.bind; fix front-end compilation with the version of compiler that respects Function.prototype.bind. https://bugs.webkit.org/show_bug.cgi?id=75170 Reviewed by Yury Semikhatsky. * inspector/front-end/ApplicationCacheModel.js: * inspector/front-end/CSSKeywordCompletions.js: (WebInspector.CSSKeywordCompletions.colors): * inspector/front-end/CSSStyleModel.js: * inspector/front-end/CompilerSourceMapping.js: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype.pushNodeToFrontend): (WebInspector.DOMAgent.prototype.pushNodeByPathToFrontend): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable.onDocumentAvailable): (WebInspector.DOMAgent.prototype._dispatchWhenDocumentAvailable): (WebInspector.DOMAgent.prototype._loadNodeAttributes): (WebInspector.DOMAgent.prototype.querySelector): (WebInspector.DOMAgent.prototype.querySelectorAll): * inspector/front-end/DebuggerModel.js: * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/ExtensionAPI.js: (injectedExtensionAPI.InspectorExtensionAPI): (injectedExtensionAPI): * inspector/front-end/ExtensionPanel.js: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.enableResourceTracking): (WebInspector.NetworkManager.prototype.disableResourceTracking): * inspector/front-end/Script.js: * inspector/front-end/Settings.js: * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.complete): * inspector/front-end/utilities.js: 2011-12-23 Leo Yang [BlackBerry] Add the BlackBerry specific pauseLoad(bool) to ResourceHandle https://bugs.webkit.org/show_bug.cgi?id=75162 Reviewed by George Staikos. The porting can be built now, no new tests so far. * platform/network/ResourceHandle.h: 2011-12-23 Karl Koscher Give embedders a chance to handle postMessage calls https://bugs.webkit.org/show_bug.cgi?id=73883 To support cross-process postMessage calls in Chromium (bug 73337), we need to intercept postMessage calls to proxy windows. Originally we were just going to add a native event listener on the Chromium side, but that required more changes to WebKit and was a bit of a hack. See bug 73359 for a discuss about moving to this approach. Reviewed by Adam Barth. Test: platform/chromium/fast/events/intercept-postmessage.html * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::willCheckAndDispatchPostMessage): new method to allow the embedder to intercept postMessage calls * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessageTimerFired): add a call to FrameLoaderClient::willCheckAndDispatchPostMessage 2011-12-23 Tom Sepez XSLT-created HTML documents do not inherit content-security-policy from originally loaded XML. https://bugs.webkit.org/show_bug.cgi?id=75043 Reviewed by Adam Barth. Test: http/tests/security/contentSecurityPolicy/xsl-img-blocked.php * page/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::copyStateFrom): (WebCore::ContentSecurityPolicy::didReceiveHeader): * page/ContentSecurityPolicy.h: * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::createDocumentFromSource): 2011-12-23 Darin Adler REGRESSION (r97533): Optgroup label is not disabled https://bugs.webkit.org/show_bug.cgi?id=74869 Reviewed by Alexey Proskuryakov. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemIsEnabled): Added back a line of code that was accidentally deleted as part of the refactoring in r97533. This line of code ensures that any items that are not option elements are disabled. 2011-12-19 Alexander Pavlov Web Inspector: Add CSSStyleSelector instrumentation calls towards implementing a CSS selector profiler https://bugs.webkit.org/show_bug.cgi?id=74863 Performance checks run on PerformanceTest/Parser/html5-full-render.html did not result in any noticeable perf regression, as the instrumentation calls are inline and bail out early if there are no Web Inspector frontends open. Reviewed by Antti Koivisto. No new tests, as the functionality is not bound to any user-visible outputs. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchRulesForList): (WebCore::CSSStyleSelector::applyDeclaration): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willMatchRuleImpl): (WebCore::InspectorInstrumentation::didMatchRuleImpl): (WebCore::InspectorInstrumentation::willProcessRuleImpl): (WebCore::InspectorInstrumentation::didProcessRuleImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willMatchRule): (WebCore::InspectorInstrumentation::didMatchRule): (WebCore::InspectorInstrumentation::willProcessRule): (WebCore::InspectorInstrumentation::didProcessRule): 2011-12-23 Ivan Briano [EFL] Fix building with Glib support disabled https://bugs.webkit.org/show_bug.cgi?id=70990 Reviewed by Martin Robinson. Add forward declaration for cairo_surface_t, missing when building the EFL port with Glib disabled. * platform/cairo/WidgetBackingStore.h: 2011-12-23 Adam Klein Minimize callsites and duplication of before/after advice for attribute mutations https://bugs.webkit.org/show_bug.cgi?id=75054 Reviewed by Ryosuke Niwa. r103452 helpfully made before and after advice regarding attribute changes symmetrical. This change finishes that work, by pulling together all the before/after work, not just the crumbs previously covered. This includes incrementing Document::domTreeVersion() when an attribute is about to be changed, Inspector instrumentation, and MutationEvent dispatch. This is in addition to the previous code, which handled enqueueing MutationRecords for MutationObservers and updating the Document's list of IDs. The only change in behavior should be in InspectorInstrumentation, which causes DOM breakpoints to occur for more cases of Attribute mutation. This seems like more correct behavior, and a test has been included to exercise it. Hopefully the last Attribute-related refactor for awhile. * dom/Attr.cpp: (WebCore::Attr::setValue): Update to call didModifyAttribute instead of attributeChanged. * dom/Element.cpp: (WebCore::Element::removeAttribute): Got rid of removeAttributeInternal as most of that logic moved back into NamedNodeMap::removeAttribute. (WebCore::Element::setAttributeInternal): Reorganized to read better now that only some cases result in calls to will/didModifyAttribute. (WebCore::Element::willModifyAttribute): Un-inlined and added incDOMTreeVersion and InspectorInstrumentation calls. (WebCore::Element::didModifyAttribute): New method which encapsulates calling attributeChanged, InspectorInstrumentation, and MutationEvents. (WebCore::Element::didRemoveAttribute): New method which encapsulates calling attributeChanged, InspectorInstrumentation, and MutationEvents. Separate from didModifyAttribute because it has special handling of the removed Attribute's value. * dom/Element.h: (WebCore::Element::willRemoveAttribute): New method which delegates to willModifyAttribute as appropriate. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): Simplified. (WebCore::NamedNodeMap::removeNamedItem): Simplified. (WebCore::NamedNodeMap::addAttribute): Added calls to will/didModifyAttribute. (WebCore::NamedNodeMap::removeAttribute): ditto. (WebCore::NamedNodeMap::replaceAttribute): ditto. * svg/properties/SVGAnimatedPropertySynchronizer.h: Reverted changes made in r103452 now that addAttribute/removeAttribute once again call attributeChanged appropriately. 2011-12-22 Matt Falkenhagen Map 'lang' and xml:lang attributes to '-webkit-locale' CSS property for use with font fallback and text-transform https://bugs.webkit.org/show_bug.cgi?id=67586 Original patch by Jungshik Shin Reviewed by Darin Adler. Tests: fast/text/lang-mapped-to-webkit-locale.xhtml fast/text/xml-lang-ignored-in-html.html * html/HTMLElement.cpp: (WebCore::HTMLElement::mapLanguageAttributeToLocale): (WebCore::HTMLElement::parseMappedAttribute): Map 'lang' and 'xml:lang' to -webkit-locale. * html/HTMLElement.h: 2011-12-22 Ryosuke Niwa WinCE build fix after r103539. * rendering/svg/RenderSVGResource.cpp: (WebCore::RenderSVGResource::removeFromFilterCache): 2011-12-22 Chris Marrin Crash and incorrect behavior when switching between hardware and software CSS filters https://bugs.webkit.org/show_bug.cgi?id=75130 Reviewed by Simon Fraser. Test: css3/filters/crash-hw-sw-switch.html Backing store on layer gets fixed up (added or removed) after style change is evaluated so the state of the m_filter variable might not match the current filter state. Added updateOrRemoveFilterEffect() call to ensureBacking() and clearBacking() to get the m_filter property in the right state. Also added an ASSERT() where the crash was occuring. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::ensureBacking): (WebCore::RenderLayer::clearBacking): 2011-12-22 Jon Lee Radio buttons cut in download movie sheet https://bugs.webkit.org/show_bug.cgi?id=75128 Reviewed by Dan Bernstein. Test: compositing/overflow/theme-affects-visual-overflow.html The clipping comes from the fact the visual overflow rect of the radio button's RenderBlock is not expanded to accommodate for the size of the button on the Mac platform. We use the existing RenderTheme::adjustRepaintRect() to make the appropriate adjustment. This, consequently, makes it unnecessary to have to recalculate it for repaint. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeOverflow): As part of the overflow computation, we make a call to addVisualOverflowFromTheme(). (WebCore::RenderBlock::addVisualOverflowFromTheme): Ask the theme to inflate the RenderBlock's rect if necessary, and add that to the visual overflow rect. * rendering/RenderBlock.h: Added addVisualOverflowFromTheme(). * rendering/RenderBox.cpp: (WebCore::RenderBox::clippedOverflowRectForRepaint): Remove the call to adjustRepaintRect() since the rectangle r already uses the new visual overflow rect. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::clippedOverflowRectForRepaint): Remove the call to adjustRepaintRect() since the rectangle r already uses the new visual overflow rect. 2011-12-22 Chris Rogers Fix mac build breakage - add SincResampler files to WebCore.xcodeproj https://bugs.webkit.org/show_bug.cgi?id=75139 Unreviewed build fix. * WebCore.xcodeproj/project.pbxproj: 2011-12-22 Simon Fraser Animating some CSS filter values is wrong https://bugs.webkit.org/show_bug.cgi?id=75122 Reviewed by Chris Marrin. Fix some reversed filter animation behavior for brightness, contrast and drop-shadow filters. Test: css3/filters/filter-animation-from-none.html * platform/graphics/filters/FilterOperation.cpp: (WebCore::BasicComponentTransferFilterOperation::blend): Just use the global blend() function. (WebCore::BasicComponentTransferFilterOperation::passthroughAmount): Add CONTRAST and BRIGHTNESS to the sswitch. (WebCore::GammaFilterOperation::blend): Fix the ordering. (WebCore::DropShadowFilterOperation::blend): Fix the ordering. 2011-12-22 Chris Rogers Fix mac build caused by improper include of "Locker.h" https://bugs.webkit.org/show_bug.cgi?id=75134 Unreviewed build fix. * webaudio/MediaElementAudioSourceNode.cpp: 2011-12-22 Anders Carlsson More ScrollAnimatorMac cleanup https://bugs.webkit.org/show_bug.cgi?id=75127 Reviewed by Andreas Kling. Introduce a immediateScrollByWithoutContentEdgeConstraints and use it whenever we want to scroll by an offset instead of doing the setConstrainsScrollingToContentEdge dance. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): 2011-12-22 Chris Rogers Implement MediaElementAudioSourceNode::setFormat() so numberOfChannels and sampleRate are accounted for https://bugs.webkit.org/show_bug.cgi?id=75057 Reviewed by Eric Carlson. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: Add MultiChannelResampler source files to makefiles. * platform/audio/MultiChannelResampler.cpp: Added. (WebCore::MultiChannelResampler::MultiChannelResampler): (WebCore::MultiChannelResampler::process): * platform/audio/MultiChannelResampler.h: Added. Add MultiChannelResampler implementation which uses one SincResampler per channel. * webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::create): (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::setFormat): (WebCore::MediaElementAudioSourceNode::process): Implement MediaElementAudioSourceNode::setFormat() so that we can properly setup a sample-rate converter and set the number of channels of the MediaElementAudioSourceNode output. * webaudio/MediaElementAudioSourceNode.h: 2011-12-22 Chris Fleizach AX: WebKit should ignore ARIA role=presentation on focusable elements https://bugs.webkit.org/show_bug.cgi?id=75101 Reviewed by Darin Adler. If an element is focusable, the presentational role must be ignored, lest the user not be able to interact with something important. Test: accessibility/presentational-elements-with-focus.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): (WebCore::AccessibilityRenderObject::inheritsPresentationalRole): 2011-12-22 Anders Carlsson Use immediateScrollBy instead of immediateScrollTo where possible https://bugs.webkit.org/show_bug.cgi?id=75124 Reviewed by Sam Weinig. Instead of computing the position to scroll to, just compute the delta and use scrollBy instead. * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): 2011-12-22 Anders Carlsson Remove a private ScrollAnimatorMac getter/setter and just update the member variable directly https://bugs.webkit.org/show_bug.cgi?id=75121 Reviewed by Sam Weinig. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): 2011-12-22 Anders Carlsson Simplify ScrollAnimatorMac scrollByDelta functions https://bugs.webkit.org/show_bug.cgi?id=75120 Reviewed by Sam Weinig. Merge immediateScrollByDeltaX and immediateScrollByDeltaY to a single function and rename it to immediateScrollBy. Also, rename immediateScrollToPoint to immediateScrollTo. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorMac::immediateScrollTo): (WebCore::ScrollAnimatorMac::immediateScrollBy): (WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation): (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): 2011-12-22 Anders Carlsson Make some ScrollAnimatorMac member functions private https://bugs.webkit.org/show_bug.cgi?id=75117 Reviewed by Sam Weinig. Make virtual member functions and functions that are only called from ScrollAnimatorMac private. * platform/mac/ScrollAnimatorMac.h: 2011-12-22 Anders Carlsson Move some member variables out of ScrollElasticityController https://bugs.webkit.org/show_bug.cgi?id=75115 Reviewed by Adam Roben. Move a couple of member variables that aren't related to rubberbanding out from ScrollElasticityController and back into ScrollAnimatorMac and remove now unneeded ScrollElasticityControllerClient member functions as well. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::handleWheelEvent): (WebCore::ScrollAnimatorMac::beginScrollGesture): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollElasticityController.mm: (WebCore::ScrollElasticityController::ScrollElasticityController): (WebCore::ScrollElasticityController::beginScrollGesture): 2011-12-22 Balazs Kelemen Fix debug build with assertions disabled https://bugs.webkit.org/show_bug.cgi?id=75075 Reviewed by Darin Adler. Check whether assertions are disabled instead of NDEBUG where appropriate to avoid "defined but not used" warnings. No change in behaviour so no new tests. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::insertInLRUList): (WebCore::MemoryCache::removeFromLiveDecodedResourcesList): (WebCore::MemoryCache::insertInLiveDecodedResourcesList): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChild): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): 2011-12-22 Anders Carlsson Get rid of didStartAnimatedScroll and didCompleteAnimatedScroll https://bugs.webkit.org/show_bug.cgi?id=75107 Reviewed by Adam Roben. This is another step towards removing the display throttling in WebKit2. * page/ChromeClient.h: * page/FrameView.cpp: * page/FrameView.h: * platform/ScrollableArea.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::scroll): (WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation): 2011-12-22 Anders Carlsson Remove didStartRubberBand and didCompleteRubberBand callbacks https://bugs.webkit.org/show_bug.cgi?id=75102 Reviewed by Adam Roben. The code to do display throttling in WebKit2 is complex and doesn't really help us except on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead. * page/ChromeClient.h: * page/FrameView.cpp: * page/FrameView.h: * platform/ScrollView.cpp: * platform/ScrollView.h: * platform/ScrollableArea.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): * rendering/RenderLayer.cpp: * rendering/RenderLayer.h: 2011-12-22 Vsevolod Vlasov Web Inspector: [Regression] Network item view is not displayed. https://bugs.webkit.org/show_bug.cgi?id=75100 Not reviewed, one line css fix. * inspector/front-end/networkPanel.css: (.network-item-view.visible): 2011-12-22 Andreas Kling NamedNodeMap: Get rid of declCount(). Reviewed by Darin Adler. We already have the number of mapped attribute declarations in the map stored in m_mappedAttributeCount (updated by declAdded()/declRemoved()) so compare that in mappedMapsEquivalent() to skip one loop over the map. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::mappedMapsEquivalent): * dom/NamedNodeMap.h: 2011-12-22 Andreas Kling SnowLeopard crashes due to thread-unsafe EventListenerIterator ASSERTs Reviewed by Darin Adler. Guard EventListenerMap::m_activeIteratorCount with a mutex. * dom/EventListenerMap.cpp: (WebCore::activeIteratorCountMutex): (WebCore::EventListenerMap::assertNoActiveIterators): (WebCore::EventListenerMap::clear): (WebCore::EventListenerMap::add): (WebCore::EventListenerMap::remove): (WebCore::EventListenerMap::find): (WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup): (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget): (WebCore::EventListenerIterator::EventListenerIterator): (WebCore::EventListenerIterator::~EventListenerIterator): * dom/EventListenerMap.h: (WebCore::EventListenerMap::assertNoActiveIterators): 2011-12-22 Vsevolod Vlasov Web Inspector: TabbedPane should support closeable tabs, hiding tabs into drop down menu. https://bugs.webkit.org/show_bug.cgi?id=75085 Reviewed by Pavel Feldman. Test: inspector/tabbed-pane-tabs-to-show.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ScriptsNavigator.js: (WebInspector.ScriptsNavigator): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane): (WebInspector.TabbedPane.prototype.set shrinkableTabs): (WebInspector.TabbedPane.prototype.set closeableTabs): (WebInspector.TabbedPane.prototype.appendTab): (WebInspector.TabbedPane.prototype.closeTab): (WebInspector.TabbedPane.prototype.selectTab): (WebInspector.TabbedPane.prototype.onResize): (WebInspector.TabbedPane.prototype._updateTabElements): (WebInspector.TabbedPane.prototype._showTabElement): (WebInspector.TabbedPane.prototype._hideTabElement): (WebInspector.TabbedPane.prototype._createDropDownButton): (WebInspector.TabbedPane.prototype._updateTabsDropDown): (WebInspector.TabbedPane.prototype._populateDropDownFromIndex): (WebInspector.TabbedPane.prototype._tabsSelectChanged): (WebInspector.TabbedPane.prototype._measureDropDownButton): (WebInspector.TabbedPane.prototype._updateWidths): (WebInspector.TabbedPane.prototype._calculateMaxWidth.var): (WebInspector.TabbedPane.prototype._calculateMaxWidth): (WebInspector.TabbedPane.prototype._hideCurrentTab): (WebInspector.TabbedPaneTab): (WebInspector.TabbedPaneTab.prototype.get id): (WebInspector.TabbedPaneTab.prototype.get tabElement): (WebInspector.TabbedPaneTab.prototype.get measuredWidth): (WebInspector.TabbedPaneTab.prototype.get width): (WebInspector.TabbedPaneTab.prototype.set width): (WebInspector.TabbedPaneTab.prototype._createTabElement): (WebInspector.TabbedPaneTab.prototype._measure): (WebInspector.TabbedPaneTab.prototype._tabSelected): (WebInspector.TabbedPaneTab.prototype._tabClosed): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: * inspector/front-end/scriptsPanel.css: (#scripts-navigator-tabbed-pane .tabbed-pane-header-contents): * inspector/front-end/tabbedPane.css: Added. 2011-12-22 Chris Fleizach AX: attributed strings do not include AXHeading information when a link is contained within the heading https://bugs.webkit.org/show_bug.cgi?id=75059 Reviewed by Darin Adler. An attributed string should contain the heading level of an ancestor node if it exists. This change allows the ancestor to be higher up in the hierarchy than just the direct parent. Test: platform/mac/accessibility/heading-and-link-attributed-string.html * accessibility/mac/WebAccessibilityObjectWrapper.mm: (AXAttributeStringSetHeadingLevel): 2011-12-22 Chris Fleizach AX: Title attribute should not be used in AXTitle https://bugs.webkit.org/show_bug.cgi?id=75027 Reviewed by Darin Adler. Accessibility has been incorrectly exposing the title attribute through AXTitle. The title attribute better corresponds with a help tag for accessibility clients. Test: platform/mac/accessibility/title-attribute-not-used-as-axtitle.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): Don't use the title attribute. (WebCore::AccessibilityRenderObject::exposesTitleUIElement): Change the semantics around when a checkbox or radio button combines it's title ui element. The change makes it so that we will expose the title ui element when the control already has a label. Otherwise the title ui element is hidden, and it's text is used as the AXTitle for the control. (WebCore::AccessibilityRenderObject::titleUIElement): Change this method so it always returns the title ui element, and then leave it up to exposesTitleUIElement to determine whether it should be shown. * accessibility/AccessibilityTableCell.h: (WebCore::AccessibilityTableCell::exposesTitleUIElement): There's no special logic for table cells that have title ui elements, and we don't want to use the logic in AccessibilityRenderObject, hence the override here. * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 2011-12-22 Chris Fleizach AX: aria-describedby should not be part of AXDescription (should be a part of AXHelp) https://bugs.webkit.org/show_bug.cgi?id=75052 Reviewed by Darin Adler. According to the ARIA spec, aria-describedby is a more detailed description that is akin to help, rather than a description describing the actual object. As such, it makes more sense for this attribute to be exposed under help text. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::helpText): (WebCore::AccessibilityRenderObject::ariaAccessibilityDescription): 2011-12-22 Mariusz Grzegorczyk [EFL] Missing plugins support for efl port https://bugs.webkit.org/show_bug.cgi?id=44505 Reviewed by Anders Carlsson. Basic functionality of plugins for efl port. Template version, so no new tests are needed. * PlatformEfl.cmake: * plugins/PluginView.h: * plugins/efl/PluginDataEfl.cpp: Added. Copied from plugins/gtk/PluginDataGtk.cpp. (WebCore::PluginData::initPlugins): Fill mime/description/extension maps for plugins. (WebCore::PluginData::refresh): Refresh plugin's database. * plugins/efl/PluginPackageEfl.cpp: Added. Copied from plugins/gtk/PluginPackageGtk.cpp. (WebCore::PluginPackage::fetchInfo): Get info from plugin's library about name and mime supported. (WebCore::PluginPackage::NPVersion): (WebCore::PluginPackage::load): Load plugin. * plugins/efl/PluginViewEfl.cpp: Added. Copied from plugins/gtk/PluginViewGtk.cpp. (WebCore::PluginView::dispatchNPEvent): (WebCore::PluginView::handleFocusInEvent): (WebCore::PluginView::handleFocusOutEvent): (WebCore::PluginView::handleKeyboardEvent): (WebCore::PluginView::handleMouseEvent): (WebCore::PluginView::updatePluginWidget): (WebCore::PluginView::setFocus): (WebCore::PluginView::show): (WebCore::PluginView::hide): (WebCore::PluginView::paint): (WebCore::PluginView::setParent): (WebCore::PluginView::setNPWindowRect): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::setParentVisible): (WebCore::PluginView::handlePostReadFile): (WebCore::PluginView::platformGetValueStatic): (WebCore::PluginView::platformGetValue): (WebCore::PluginView::invalidateRect): (WebCore::PluginView::invalidateRegion): (WebCore::PluginView::forceRedraw): (WebCore::PluginView::platformStart): (WebCore::PluginView::platformDestroy): 2011-12-22 Pavel Podivilov Web Inspector: add "install source map" to JS source frame context menu. https://bugs.webkit.org/show_bug.cgi?id=74181 Reviewed by Pavel Feldman. Add "install source map" to source frame context menu when source map url is auto detected. * English.lproj/localizedStrings.js: * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMapping.prototype.load): (WebInspector.ClosureCompilerSourceMapping.prototype._parseSections): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping): * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu): (WebInspector.JavaScriptSourceFrame.prototype.cancelEditing): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent): (WebInspector.RawSourceCode.prototype._createSourceMapping): (WebInspector.RawSourceCode.prototype._createUISourceCode): * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): 2011-12-22 Branimir Lambov SVG: "filter" race condition may prevent SVG elements from being re-drawn https://bugs.webkit.org/show_bug.cgi?id=53088 Reviewed by Nikolas Zimmermann. Added code to explicitly invalidate data cached by filters applied to an invalidated object or one of its parents. Test: svg/filters/filter-refresh.svg * rendering/svg/RenderSVGResource.cpp: (WebCore::RenderSVGResource::removeFromFilterCache): (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): Added code to invalidate any filters applied to any of the parents. * rendering/svg/RenderSVGResource.h: * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): Replaced a duplicate of RenderSVGResource:: markForLayoutAndParentResourceInvalidation with a call to the method. * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientLayoutChanged): Removed filter invalidation code as this function would not be called if the filter isn't already invalidated. (WebCore::SVGResourcesCache::clientStyleChanged): (WebCore::SVGResourcesCache::clientUpdatedFromElement): Replaced filter invalidation with a markForLayoutAndParentResourceInvalidation call as all filters in the ancestor chain need to be invalidated. 2011-12-22 Leo Yang [BlackBerry] Upstream the BlackBerry change to ResourceHandle.h https://bugs.webkit.org/show_bug.cgi?id=75061 Reviewed by George Staikos. No functionality change to the existing code, no new tests. * platform/network/ResourceHandle.h: 2011-12-22 Alexandru Chiculita [CSS Shaders] Follow up bug to fix issues mentioned in comment 23 from bug 73317 https://bugs.webkit.org/show_bug.cgi?id=74840 Some comments were added on bug 73317 after the patch was reviewed and committed. This patch is fixing those issues, mostly about coding style and some missing comments. The initial patch had no explanation about the feature in the ChangeLog, so I'm including the description in this patch: CSS Shaders allow a designer to use a pair of WebGL vertex and fragment shaders to alter the final rendering of a specific element. The navigator will render the element inside a texture and map it to a mesh. The mesh is formed by equal sized quads, that depending on the mesh style, attached or detached, can be stitched or separated. The number of quads can be changed from CSS. Usually the vertex shader is changing the vertices of the mesh, while the fragment shader affects only the color that is rendered to screen (for example lighting effects). More info about CSS Shaders can be found in the specification https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html Also a good tutorial is published here http://www.adobe.com/devnet/html5/articles/css-shaders.html Initially we are using the software filter effects pipeline. It uploads the image to the GPU, applies the shaders, reads it back to CPU and continues the rendering. The advantage of using the software pipeline is that it can be enabled on all the platforms that have WebGL support. The obvious disadvantage is performance: copies from CPU memory to GPU memory and the CPU will need to wait the GPU to finish before it could continue. In following patches the shaders will be integrated in the hardware accelerated pipeline, so that no copies and, most important, no waits will be required. Also, the new syntax counts total number of the lines and the columns, not just the additional lines and columns, so the minimum accepted and the default value is now 1 by 1. Reviewed by Nikolas Zimmermann. Some tests were updated for the default mesh size change. * css/CSSParser.cpp: Only accept non-zero positive int values for mesh sizes. (WebCore::CSSParser::parseCustomFilter): * css/CSSStyleSelector.cpp: Updated the default mesh size to be 1 column with 1 line. (WebCore::CSSStyleSelector::createCustomFilterOperation): * loader/cache/CachedShader.cpp: (WebCore::CachedShader::shaderString): Corrected the CachedShader to use a StringBuilder. Also there was an incorrect cast to bool, which resulted from a copy/paste from CachedScript which still has both same issues. (WebCore::CachedShader::data): * loader/cache/CachedShader.h: * platform/graphics/filters/CustomFilterMesh.cpp: (WebCore::MeshGenerator::MeshGenerator): (WebCore::MeshGenerator::verticesCount): (WebCore::MeshGenerator::generateAttachedMesh): (WebCore::MeshGenerator::generateDetachedMesh): (WebCore::CustomFilterMesh::CustomFilterMesh): * platform/graphics/filters/CustomFilterMesh.h: (WebCore::CustomFilterMesh::create): * platform/graphics/filters/CustomFilterShader.cpp: (WebCore::CustomFilterShader::CustomFilterShader): Exploded the body of the constructor into smaller helper functions. (WebCore::CustomFilterShader::compileShader): (WebCore::CustomFilterShader::linkProgram): (WebCore::CustomFilterShader::initializeParameterLocations): * platform/graphics/filters/CustomFilterShader.h: * platform/graphics/filters/FECustomFilter.cpp: (WebCore::orthogonalProjectionMatrix): Passing a TransformationMatrix by reference to be filled with the result matrix, instead of returning it by value. Also changed the name of the method. (WebCore::FECustomFilter::FECustomFilter): (WebCore::FECustomFilter::platformApplySoftware): Created some helper functions to make this method shorter. (WebCore::FECustomFilter::initializeContext): (WebCore::FECustomFilter::resizeContext): (WebCore::FECustomFilter::bindVertexAttribute): (WebCore::FECustomFilter::bindProgramAndBuffers): * platform/graphics/filters/FECustomFilter.h: 2011-12-12 Pavel Podivilov Web Inspector: fix source map url resolving. https://bugs.webkit.org/show_bug.cgi?id=74305 Reviewed by Pavel Feldman. Also fix the bug with repeated source urls in mapping sections. * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype.sources): (WebInspector.ClosureCompilerSourceMapping.prototype._parseMap): (WebInspector.ClosureCompilerSourceMapping.prototype._resolveSourceMapURL): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping): * inspector/front-end/utilities.js: (String.prototype.asParsedURL): 2011-12-09 Pavel Podivilov Web Inspector: auto detect source map url. https://bugs.webkit.org/show_bug.cgi?id=74088 Reviewed by Pavel Feldman. Check to see if "X-SourceMap" HTTP response header was sent with script resource. Header value will be used as auto suggestion for source map url in UI. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::sourceMapURLForScript): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._parsedScriptSource): (WebInspector.DebuggerDispatcher.prototype.scriptParsed): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): * inspector/front-end/Script.js: (WebInspector.Script): 2011-12-22 Kentaro Hara Change the build flow of AppleWebKit to use the [Supplemental] IDL https://bugs.webkit.org/show_bug.cgi?id=74900 Reviewed by Adam Barth. This is the final step for bug 74599. This patch changes the build flow of DerivedSources.make as follows, and thus enable the [Supplemental] IDL. - 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 the IDL files that are implementing $idl; } Tests: Confirm that build succeeds. http/tests/websocket/tests/* * DerivedSources.make: Described the build flow as described above. Added a list of IDL files. Instead, removed a list of JS*.h and JS*.cpp which are generated by the IDL files. 2011-12-22 Eric Uhrhane [filesystem] Remove old filesystem naming restrictions https://bugs.webkit.org/show_bug.cgi?id=62813 Reviewed by David Levin. * fileapi/DOMFilePath.cpp: (WebCore::DOMFilePath::isValidPath): Replace strict restrictions with minimal safety [no files named "." or "..", no use of '\\' or '\0' in paths, no use of '/' in file names]. 2011-12-22 Greg Billock [Coverity] Address use-after-free report in MemoryCache https://bugs.webkit.org/show_bug.cgi?id=74970 Reviewed by Eric Seidel. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::revalidationSucceeded): 2011-12-22 Tom Sepez XSLT-created HTML documents do not inherit first party for cookies from originally loaded XML. https://bugs.webkit.org/show_bug.cgi?id=74757 Reviewed by Alexey Proskuryakov. Tests: http/tests/security/cookies/first-party-cookie-allow-xslt.xml http/tests/security/cookies/third-party-cookie-blocking-xslt.xml * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::createDocumentFromSource): 2011-12-22 Daniel Jalkut WebKit editing throws exception when monochrome color dragged onto text https://bugs.webkit.org/show_bug.cgi?id=74775 Reviewed by Ryosuke Niwa. Handle non-RGB colorspace colors in the Mac platform drag manager. Fixes NSException thrown when dragging monochrome colors to contentEditable regions. Manual test added to trunk/ManualTests/drag-color-to-contenteditable.html * platform/mac/DragDataMac.mm: (WebCore::DragData::asColor): 2011-12-22 Peter Rybin Web Inspector: CodeGeneratorInspector.py: generate anonymous types. https://bugs.webkit.org/show_bug.cgi?id=74890 Reviewed by Yury Semikhatsky. Anonymous types are generated. Forward declarations are generated. In general it now generates C++ types for anonymous object types from JSON. It takes a name from the type declaration site, usually a parameter name. This all is explained in comments in generated file. Also all generated types now refer to other generated types in setter methods -- but this is commented out in generated code for now. All necessary forward declarations are also added. Anonymous enums are generated, but they are in comments too, because we didn't have solution about form the enums should have in C++ API. Internally: The change reorganizes type bindings — a polymorphous "code generator" object is factored out from binding. A helper class Writer is added to allow generating code with ajustable indentations and to support insertion points where additional code can be inserted retroactively. ForwardListener class is used for preparing necessary forward declarations. AdHocTypeContext conception is a speculative abstract class that is needed wherever anonymous type can emerge. * inspector/CodeGeneratorInspector.py: (fix_type_name.Result.output_comment): (Writer.__init__): (Writer.newline): (Writer.append): (Writer.newline_multiline): (Writer.append_multiline): (Writer.get_indented): (Writer): (Writer.insert_writer): (TypeBindings.create_named_type_declaration.Helper.write_doc): (TypeBindings.create_named_type_declaration.Helper): (TypeBindings.create_named_type_declaration.Helper.add_to_forward_listener): (TypeBindings.create_named_type_declaration): (TypeBindings.create_ad_hoc_type_declaration.Helper.write_doc): (TypeBindings.create_ad_hoc_type_declaration.Helper): (TypeBindings.create_ad_hoc_type_declaration.Helper.add_to_forward_listener): (TypeBindings.create_ad_hoc_type_declaration): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.register_use): (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator): (TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator.generate_type_builder.String): (TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator.generate_type_builder): (TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator): (TypeBindings.create_type_declaration_.PlainString.get_code_generator.CodeGenerator.register_use): (TypeBindings.create_type_declaration_.PlainString.get_code_generator): (TypeBindings.create_type_declaration_.PlainString.get_in_c_type_text.name): (TypeBindings.create_type_declaration_.PlainString): (TypeBindings.create_type_declaration_): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator): (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder): (AdHocTypeContextImpl.__init__): (AdHocTypeContextImpl.get_type_name_fix.NameFix): (AdHocTypeContextImpl.get_type_name_fix.NameFix.output_comment): (AdHocTypeContextImpl.get_type_name_fix): (AdHocTypeContextImpl): (AdHocTypeContextImpl.call_generate_type_builder): (generate_forward_declaration): (register_use): (get_in_c_type_text): (reduce_to_raw_type): (PlainObjectBinding.get_code_generator): (CodeGenerator.generate_type_builder.AdHocTypeContext.get_type_name_fix.NameFix): (CodeGenerator.generate_type_builder.AdHocTypeContext.get_type_name_fix.NameFix.output_comment): (CodeGenerator.generate_type_builder.AdHocTypeContext.get_type_name_fix): (CodeGenerator.generate_type_builder.AdHocTypeContext): (CodeGenerator.generate_type_builder.AdHocTypeContext.call_generate_type_builder): (CodeGenerator.generate_type_builder): (CodeGenerator): (CodeGenerator.register_use): (RawTypesBinding.get_code_generator): (RawTypesBinding.get_in_c_type_text): (RawTypesBinding): (RawTypesBinding.reduce_to_raw_type): (TypeData.__init__): (TypeData.get_json_type): (resolve_param_type): (Generator.go): (Generator.process_event.NoOpForwardListener): (Generator.process_event.NoOpForwardListener.add_type_data): (Generator.process_event.AdHocTypeContext.get_type_name_fix.NameFix): (Generator.process_event.AdHocTypeContext.get_type_name_fix.NameFix.output_comment): (Generator.process_event.AdHocTypeContext.get_type_name_fix): (Generator.process_event.AdHocTypeContext): (Generator.process_event.AdHocTypeContext.call_generate_type_builder): (Generator.process_event): (Generator.process_types.ForwardListener): (Generator.process_types.ForwardListener.add_type_data): (Generator.process_types.generate_all_domains_code.namespace_lazy_generator): (Generator.process_types.generate_all_domains_code): (Generator.process_types.call_type_builder): (Generator.process_types.generate_forward_callback): (Generator): (Generator.process_types): (flatten_list.fill_recursive): (flatten_list): 2011-12-22 Hans Muller Onloadend event is not supported in XMLHttpRequest https://bugs.webkit.org/show_bug.cgi?id=40952 Reviewed by Julien Chaffraix. Added support for the loadend ProgressEvent to XMLHttpRequest and XMLHttpRequestUpload. A new method, dispatchEventAndLoadEnd(), was added to XMLHttpRequestProgressEventThrottle and XMLHttpRequestUpload to foolproof the common case of dispatching a load, abort, or error event followed by a loadend event. Tests: http/tests/xmlhttprequest/onloadend-event-after-abort.html http/tests/xmlhttprequest/onloadend-event-after-error.html http/tests/xmlhttprequest/onloadend-event-after-load.html http/tests/xmlhttprequest/onloadend-event-after-sync-requests.html http/tests/xmlhttprequest/upload-onloadend-event-after-abort.html http/tests/xmlhttprequest/upload-onloadend-event-after-load.html http/tests/xmlhttprequest/upload-onloadend-event-after-sync-requests.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::callReadyStateChangeListener): (WebCore::XMLHttpRequest::abort): (WebCore::XMLHttpRequest::networkError): (WebCore::XMLHttpRequest::abortError): (WebCore::XMLHttpRequest::didSendData): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: * xml/XMLHttpRequestProgressEventThrottle.cpp: (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEventAndLoadEnd): * xml/XMLHttpRequestProgressEventThrottle.h: * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::dispatchEventAndLoadEnd): * xml/XMLHttpRequestUpload.h: * xml/XMLHttpRequestUpload.idl: 2011-12-22 Mark Pilgrim [FileSystem API] Entry.getMetadata successCallback is required https://bugs.webkit.org/show_bug.cgi?id=69638 Reviewed by Eric Seidel. Test: fast/filesystem/simple-required-arguments-getmetadata.html * fileapi/Entry.idl: remove [Optional] flag from successCallback parameter 2011-12-22 Ilya Tikhonovsky Unreviewed, rolling out r103405. http://trac.webkit.org/changeset/103405 https://bugs.webkit.org/show_bug.cgi?id=74088 it broke WorkerDevToolsSanityTest.InspectSharedWorker * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._parsedScriptSource): (WebInspector.DebuggerDispatcher.prototype.scriptParsed): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): * inspector/front-end/Script.js: (WebInspector.Script): (WebInspector.Script.prototype.searchInContent): 2011-12-21 Darin Adler Make ~CSSParserSelector use Vector https://bugs.webkit.org/show_bug.cgi?id=73782 Reviewed by Alexey Proskuryakov. * css/CSSParserValues.cpp: (WebCore::CSSParserSelector::~CSSParserSelector): Use Vector so we don't have to call leakPtr or deleteAllValues. 2011-12-21 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. This patch changes when onchange event fired in select element for: 1 Fire onchange event for type ahead selection. 2 Don't fire onchange event for Enter key. We've already fired onchange event for cursor key and type ahead selection. So, onchange for Enter key is redundant. This behavior is compatible to IE(9.0.8112.16421) and Opera(9.80) on Windows. FF(8.01) doesn't fire onchange by cursor key selection change and type ahead. FF requires Enter key press to fire onchange event. Test: fast/forms/select/menulist-type-ahead-find.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Don't fire onchange event for Entry key. (WebCore::HTMLSelectElement::typeAheadFind): Add DispatchChangeEvent when calling selectOption method. 2011-12-21 Darin Adler Tweak and comment some transform-related code https://bugs.webkit.org/show_bug.cgi?id=68670 Reviewed by Daniel Bates. * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::paint): Added a FIXME about additional overhead paid here when the scale factor is 2x. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBoxShadow): Added a FIXME about this check possibly being wrong, and also changed the local vairable name so the check need not stretch over multiple lines. 2011-12-21 Kent Tamura Change the item type of Document::m_formElementsWithState from Element* to HTMLFormControlElementWithState*. https://bugs.webkit.org/show_bug.cgi?id=74998 Reviewed by Andreas Kling. No new tests. Just refactoring. * dom/Document.cpp: (WebCore::Document::formElementsState): Use HTMLFormControlElementWithState*. * dom/Document.h: (WebCore::Document::registerFormElementWithState): Change the argument type. (WebCore::Document::unregisterFormElementWithState): ditto. (WebCore::Document::formElements): Renamed from getFormElements(). * dom/Element.h: Removed shouldSaveAndRestoreFormControlState(), saveFormControlState(), and restoreFormControlState() because they are not called for Element anymore. * html/HTMLFormControlElement.h: - Make formControlName() and formControlType() public. They are called from Document class. - Make shouldSaveAndRestoreFormControlState() public, and non-virtual. This is called from Document class, and no other classes override this. (WebCore::HTMLFormControlElementWithState::saveFormControlState): Moved from Element. (WebCore::HTMLFormControlElementWithState::restoreFormControlState): ditto. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateCheckedRadioButtons): Use HTMLFormControlElementWithState* instead of Element*. 2011-12-21 Alexandre Elias [chromium] Always use border texels on platforms using pageScaleDelta https://bugs.webkit.org/show_bug.cgi?id=74226 Reviewed by James Robinson. On platforms where the root layer can be zoomed in at draw time (pageScaleDelta), we want to turn on border texels in order for scaling to use GL_LINEAR instead of GL_NEAREST. No new tests. (Flag flip.) * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdate): 2011-12-21 Dale Curtis [chromium] Scale audio, video tags in MediaDocument to fit in window. https://bugs.webkit.org/show_bug.cgi?id=73948 Add CSS max-height: 100%, max-width: 100% settings to the audio and video tags when in MediaDocuments. Reviewed by Eric Seidel. Test: media/video-scales-in-media-document.html * css/mediaControlsChromium.css: (audio:-webkit-full-page-media, video:-webkit-full-page-media): 2011-12-21 Konrad Piascik Implement the JavaScriptCore bindings for eventListenerHandlerLocation https://bugs.webkit.org/show_bug.cgi?id=74313 Reviewed by Eric Seidel. Implemented the JavaScriptCore binding to allow Web Inspector to show the function name and line number for an event listener in the Elements panel. Tested by opening up a page which has a registered event listener in Safari and checking if the Elements panel script name and line number are present and clickable. * ForwardingHeaders/runtime/Executable.h: Added. * ForwardingHeaders/wtf/SegmentedVector.h: Added. * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerLocation): 2011-12-21 Chris Guan Upstream the Multipart feature in Blackberry port https://bugs.webkit.org/show_bug.cgi?id=73533 Reviewed by Rob Buis. I refactored Multipart code of Blackberry port. Moved Multipart into Blackerry network layer and removed the dependence of std::string. Initial upstream, no new test cases. * platform/network/blackberry/DeferredData.cpp: (WebCore::DeferredData::deferMultipartHeaderReceived): (WebCore::DeferredData::processHeaders): (WebCore::DeferredData::processDeferredData): * platform/network/blackberry/DeferredData.h: (WebCore::DeferredData::hasDeferredData): * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::notifyMultipartHeaderReceived): (WebCore::NetworkJob::handleNotifyMultipartHeaderReceived): (WebCore::NetworkJob::handleNotifyDataReceived): (WebCore::NetworkJob::handleNotifyClose): (WebCore::NetworkJob::startNewJobWithRequest): (WebCore::NetworkJob::sendResponseIfNeeded): (WebCore::NetworkJob::sendMultipartResponseIfNeeded): * platform/network/blackberry/NetworkJob.h: 2011-12-21 Eric Carlson Fix text track cue font size and colors https://bugs.webkit.org/show_bug.cgi?id=75051 Reviewed by Darin Adler. No new tests, updated media/track/track-cue-rendering.html for the changes. * css/mediaControls.css: (video::-webkit-media-text-track-container): Match WebVTT spec. (video::-webkit-media-text-track-display): Ditto. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::updateSizes): Change font size from 4% of the video height to 5% as per the spec. Don't enforce a minimum size. 2011-12-21 Andreas Kling Unreviewed, rolling out r103473. http://trac.webkit.org/changeset/103473 https://bugs.webkit.org/show_bug.cgi?id=74991 Overestimated my superpowers a bit here. * dom/Element.cpp: (WebCore::Element::attributeChanged): (WebCore::Element::insertedIntoDocument): (WebCore::Element::removedFromDocument): * dom/Element.h: (WebCore::Element::updateId): (WebCore::Element::willModifyAttribute): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setAttributes): * dom/Node.h: * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): (WebCore::HTMLAppletElement::insertedIntoDocument): (WebCore::HTMLAppletElement::removedFromDocument): * html/HTMLAppletElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): (WebCore::HTMLEmbedElement::insertedIntoDocument): (WebCore::HTMLEmbedElement::removedFromDocument): * html/HTMLEmbedElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedIntoDocument): (WebCore::HTMLFormElement::removedFromDocument): (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): (WebCore::HTMLImageElement::insertedIntoDocument): (WebCore::HTMLImageElement::removedFromDocument): * html/HTMLImageElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): (WebCore::HTMLObjectElement::insertedIntoDocument): (WebCore::HTMLObjectElement::removedFromDocument): (WebCore::HTMLObjectElement::updateDocNamedItem): (WebCore::HTMLObjectElement::formControlName): * html/HTMLObjectElement.h: * html/HTMLPlugInElement.h: 2011-12-21 Simon Fraser Clean up RenderLayer code that applies filters and transforms https://bugs.webkit.org/show_bug.cgi?id=75032 This also fixes: Nested filters not working as expected https://bugs.webkit.org/show_bug.cgi?id=75029 Filter region is computed incorrectly https://bugs.webkit.org/show_bug.cgi?id=74889 Reviewed by James Robinson. RenderLayer::paintLayer() had this confusing behavior where, for transforms, it would change the CTM and then re-enter the method with a bit set. This was partially, but incorrectly copied for filters, so things like nested filters didn't work, and the case of a filter + transform was confused. Clean up by making RenderLayer::paintLayer() be a fairly simple method that handles the re-entering with bit set, for both transforms and filters. The bulk of the code in RenderLayer::paintLayer() is now in RenderLayer::paintLayerContents(). There is no behavior change for transforms. There are two fixes for filters. First, instead of just using the layer size to compute the bounds of the filtered region, use transparencyClipBox() which already takes descendents, box decorations etc into account (it's what we use for opacity). Some cleanup of the coordinate math, and separation from transforms code was also achieved. Second, make sure we toggle off the PaintLayerAppliedFilters bit (which was renamed for clarity) for sublayers, so that sublayers paint their filters correctly. Tests: css3/filters/filter-region.html css3/filters/nested-filters.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::updateFilterBackingStore): * rendering/RenderLayer.h: 2011-12-21 Per-Erik Brodin Discard event data not followed by an empty line before eof when parsing an event-stream https://bugs.webkit.org/show_bug.cgi?id=68833 Reviewed by Alexey Proskuryakov. Test: http/tests/eventsource/eventsource-eof.html * page/EventSource.cpp: (WebCore::EventSource::didFinishLoading): (WebCore::EventSource::parseEventStreamLine): * page/EventSource.h: 2011-12-21 Andreas Kling Automate elements' registration as document namedItem/extraNamedItem. Reviewed by Antti Koivisto. Remove caching of the "id" and "name" attributes on applet, embed, form, image and object elements. We were caching them to keep the document's map of named and "extra named" (named by id) item counts in sync. Instead, add a hook to Element::willModifyAttribute() that detects when the attributes are being changed and handle the registration/unregistration automatically if the element returns true for shouldRegisterAsNamedItem() or shouldRegisterAsExtraNamedItem() respectively. This shrinks the elements by two AtomicStrings (8 or 16 bytes) each. IFrame elements retain the old mechanism for now, as there are some subtle differences to how that's handled. * dom/Node.h: (WebCore::Node::hasName): (WebCore::Node::setHasName): Cache whether we have a "name" attribute or not (1 bit on Node.) This is done in order to minimize the overhead added to Element's insertedIntoDocument() and removeFromDocument(). * dom/Element.cpp: (WebCore::Element::updateNamedItemRegistration): (WebCore::Element::updateExtraNamedItemRegistration): Added. Called when the "name" and "id" attributes are changed. Updates the document's named item maps accordingly. (WebCore::Element::insertedIntoDocument): (WebCore::Element::removedFromDocument): Make sure updateName() is called in addition to updateId() when applicable. (WebCore::Element::attributeChanged): Update the Node's has-name flag as appropriate. * dom/Element.h: (WebCore::Element::shouldRegisterAsNamedItem): (WebCore::Element::shouldRegisterAsExtraNamedItem): Added. If an element returns true for these, it will be automatically registered with the document when the name/id attribute changes. (WebCore::Element::updateId): (WebCore::Element::updateName): Register/unregister from the document's named item maps as appropriate. (WebCore::Element::willModifyAttribute): Add updateName() hook in addition to the existing updateId() hook. * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setAttributes): Make sure updateName() is called when we're cloning the attributes from another element. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): * html/HTMLAppletElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): (WebCore::HTMLEmbedElement::insertedIntoDocument): * html/HTMLEmbedElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedIntoDocument): (WebCore::HTMLFormElement::removedFromDocument): (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFormElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): (WebCore::HTMLImageElement::insertedIntoDocument): * html/HTMLImageElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): (WebCore::HTMLObjectElement::insertedIntoDocument): (WebCore::HTMLObjectElement::removedFromDocument): * html/HTMLObjectElement.h: * html/HTMLPlugInElement.h: Remove duplicated code that is now handled by Element. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateDocNamedItem): (WebCore::HTMLObjectElement::formControlName): Use fastGetAttribute() since we no longer cache the name. 2011-12-21 Wyatt Carss Reviewed by Ryosuke Niwa. strong and b should be font-weight: bold, not bolder https://bugs.webkit.org/show_bug.cgi?id=56400 Test: fast/html/font-weight-bold-for-b-and-strong.html * css/html.css: (strong, b): 2011-12-21 Florin Malita Improper handling of foreignobjects nested in svg groups https://bugs.webkit.org/show_bug.cgi?id=69762 Reviewed by Nikolas Zimmermann. Tests: svg/foreignObject/repaint-rect-coordinates-expected.html svg/foreignObject/repaint-rect-coordinates.html * rendering/svg/RenderSVGForeignObject.h: (WebCore::RenderSVGForeignObject::objectBoundingBox): (WebCore::RenderSVGForeignObject::strokeBoundingBox): (WebCore::RenderSVGForeignObject::repaintRectInLocalCoordinates): Return local coordinates. 2011-12-21 Anders Carlsson Make it possible to use contents layers in scrollbars https://bugs.webkit.org/show_bug.cgi?id=75044 Reviewed by Simon Fraser. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange): (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange): Don't pass const GraphicsLayers to these member functions; we need to be able to mutate them. * platform/ScrollView.cpp: (positionScrollbarLayer): If the scrollbar layer has a contents layer, just update its contents rect. Otherwise, invalidate the scrollbar layer. 2011-12-21 Anders Carlsson Always reposition the scrollbar layers when the frame view size changes https://bugs.webkit.org/show_bug.cgi?id=75035 Reviewed by Darin Adler. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Remove the layersChanged check and unconditionally call positionScrollbarLayers(). This only worked by accident before because we were recreating horizontal and vertical scrollbars on every call. 2011-12-21 Michał Pakuła vel Rutka [EFL] Add 'Select All' option to context menus in WebKit-EFL. https://bugs.webkit.org/show_bug.cgi?id=74920 Reviewed by Eric Seidel. Enable 'Select All' option to context menus called on input fields in WebKit-EFL as it is enabled in GTK and QT ports. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): Add 'Select All' option. (WebCore::ContextMenuController::populate): Append 'Select All' item. (WebCore::ContextMenuController::checkOrEnableIfNeeded): Enable 'Select All' option. * platform/ContextMenuItem.h: Add 'Select All' option. * platform/LocalizationStrategy.h: Add constructor for 'Select All' option. * platform/LocalizedStrings.h: Add constructor for 'Select All' option. 2011-12-20 Adam Klein Make calls to willModifyAttribute and attributeChanged symmetrical https://bugs.webkit.org/show_bug.cgi?id=74987 Reviewed by Ryosuke Niwa. Previously, calls to Element::willModifyAttribute sometimes happened in one method while calls to Element::attributeChanged happened in another. This change makes them symmetrical for all the cases I know about: setAttribute, removeAttribute, setNamedItem, removeNamedItem. To accomplish this, NamedNodeMap::addAttribute, removeAttribute, and replaceAttribute have been reduced to their pure functionality of manipulating m_attributes, and their callers are left responsible for properly notifying the Element of the underlying changes. One other bit of refactoring was done: to simplify Element::setAttribute, it now dispatches to Element::removeAttributeInternal if the incoming value is null. No new tests, no change in behavior. * dom/Attribute.h: * dom/Element.cpp: (WebCore::Element::removeAttribute): (WebCore::Element::removeAttributeInternal): Added, sharing code between the two removeAttribute overloads. (WebCore::Element::setAttributeInternal): * dom/Element.h: * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): (WebCore::NamedNodeMap::removeNamedItem): (WebCore::NamedNodeMap::addAttribute): (WebCore::NamedNodeMap::removeAttribute): (WebCore::NamedNodeMap::replaceAttribute): * svg/properties/SVGAnimatedPropertySynchronizer.h: Call Element::setAttribute unless the attribute is already present, and add a comment explaining why the code looks the way it does. 2011-12-21 Adrienne Walker Unreviewed, rolling out r103408. http://trac.webkit.org/changeset/103408 https://bugs.webkit.org/show_bug.cgi?id=75017 WorkerDevToolsSanityTest.InspectSharedWorker is failing (Requested by loislo_ on #webkit). * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype.sources): (WebInspector.ClosureCompilerSourceMapping.prototype._parseMap): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.setCompilerSourceMapping): * inspector/front-end/utilities.js: (String.prototype.asParsedURL): 2011-12-21 Stephen White Fix CSS filters crash on zero-sized elements. https://bugs.webkit.org/show_bug.cgi?id=75020 Reviewed by Dean Jackson. Test: css3/filters/filter-empty-element-crash.html * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRenderer::inputContext): Protect against null ImageBuffer. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): Protect against null GraphicsContext. 2011-12-21 Anders Carlsson Inform the scrolling coordinator when scrollbar layers come and go https://bugs.webkit.org/show_bug.cgi?id=75028 Reviewed by Andreas Kling and Simon Fraser. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::setFrameViewHorizontalScrollbarLayer): (WebCore::ScrollingCoordinator::setFrameViewVerticalScrollbarLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): 2011-12-20 Dmitry Lomov [Chromium] DatabaseTrackerChromium: iterating DatabaseSet races with Database disposal on worker thread https://bugs.webkit.org/show_bug.cgi?id=74554 Reviewed by David Levin. Covered by existing tests in fast/workers/storage. * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::NotifyDatabaseObserverOnCloseTask::create): (WebCore::NotifyDatabaseObserverOnCloseTask::performTask): (WebCore::NotifyDatabaseObserverOnCloseTask::isCleanupTask): (WebCore::NotifyDatabaseObserverOnCloseTask::NotifyDatabaseObserverOnCloseTask): (WebCore::DatabaseTracker::removeOpenDatabase): 2011-12-21 Eric Carlson HTMLMediaElement::configureTextTrackDisplay is unnecessary https://bugs.webkit.org/show_bug.cgi?id=74945 Reviewed by Darin Adler. Nothing to test, just removing redundant code. Correct behavior tested by media/track/track-cue-rendering.html and media/track/track-cue-nothing-to-render.html. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::configureTextTrackDisplay): Don't show and hide track, just call updateTextTrackDisplay and it will do the right thing. 2011-12-21 Anders Carlsson ScrollingCoordinator functions should take FrameView objects https://bugs.webkit.org/show_bug.cgi?id=75023 Reviewed by Sam Weinig. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::syncFrameViewGeometry): * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::setFrameViewScrollLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): (WebCore::RenderLayerCompositor::updateRootLayerPosition): (WebCore::RenderLayerCompositor::ensureRootLayer): 2011-12-21 Anders Carlsson Get rid of ScrollableAreaClient https://bugs.webkit.org/show_bug.cgi?id=75021 Reviewed by Sam Weinig. The ScrollableAreaClient interface will just add an extra level of indirection between ScrollableArea and ScrollAnimator, which is unnecessary. Eventually I'd like to rename ScrollAnimator to something that better reflects all the different responsibilities it currently has. * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::FrameView): * page/ScrollingCoordinator.cpp: * page/ScrollingCoordinator.h: * platform/ScrollView.cpp: (WebCore::ScrollView::ScrollView): * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::ScrollableArea): * platform/ScrollableArea.h: * platform/ScrollableAreaClient.h: Removed. 2011-12-21 Anders Carlsson Don't recreate scrollbar layers whenever the frame view size changes https://bugs.webkit.org/show_bug.cgi?id=75018 Reviewed by Darin Adler and Simon Fraser. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): 2011-12-20 Andrey Kosyakov Web Inspector: [Extension API] refactor extension API build code, expose experimental APIs conditionally in chromium https://bugs.webkit.org/show_bug.cgi?id=74941 Reviewed by Pavel Feldman. * WebCore.gypi: * inspector/front-end/ExtensionAPI.js: (buildPlatformExtensionAPI.platformExtensionAPI): (buildPlatformExtensionAPI): (buildExtensionAPIInjectedScript): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._addExtension): (window.addExtension): 2011-12-12 Pavel Podivilov Web Inspector: fix source map url resolving. https://bugs.webkit.org/show_bug.cgi?id=74305 Reviewed by Pavel Feldman. Also fix the bug with repeated source urls in mapping sections. * inspector/front-end/CompilerSourceMapping.js: (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype.sources): (WebInspector.ClosureCompilerSourceMapping.prototype._parseMap): (WebInspector.ClosureCompilerSourceMapping.prototype._resolveSourceMapURL): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.installCompilerSourceMapping): * inspector/front-end/utilities.js: (String.prototype.asParsedURL): 2011-12-21 Renata Hodovan New renderer for SVGRectElement https://bugs.webkit.org/show_bug.cgi?id=65769 Rubber-stamped by Zoltan Herczeg. Change the return value of RenderSVGRect::renderName() from RenderSVGPath to RenderSVGRect. This is a follow-up patch of r101517 to correct the DRT output. * rendering/svg/RenderSVGRect.h: (WebCore::RenderSVGRect::renderName): 2011-12-21 Vsevolod Vlasov Web Inspector: TabbedPane should use tabElement width measuring to layout tab elements when width is too small to fit them. https://bugs.webkit.org/show_bug.cgi?id=75005 Reviewed by Pavel Feldman. Test: inspector/tabbed-pane-max-tab-width-calculation.html * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView.prototype.wasShown): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane): (WebInspector.TabbedPane.prototype.appendTab): (WebInspector.TabbedPane.prototype._createTabElement): (WebInspector.TabbedPane.prototype.onResize): (WebInspector.TabbedPane.prototype._maybeMeasureAndUpdate): (WebInspector.TabbedPane.prototype._measureTab): (WebInspector.TabbedPane.prototype._updateWidths): (WebInspector.TabbedPane.prototype._calculateMaxWidth): (WebInspector.TabbedPaneTab): * inspector/front-end/inspector.css: (.tabbed-pane-header): (.tabbed-pane-header-tabs): (.tabbed-pane-header-tab): (.tabbed-pane-header-tab.measuring): (.tabbed-pane-header-tab.selected): * inspector/front-end/scriptsPanel.css: (#scripts-navigator-tabbed-pane .tabbed-pane-header-tabs): 2011-12-09 Pavel Podivilov Web Inspector: auto detect source map url. https://bugs.webkit.org/show_bug.cgi?id=74088 Reviewed by Pavel Feldman. Check to see if "X-SourceMap" HTTP response header was sent with script resource. Header value will be used as auto suggestion for source map url in UI. * inspector/Inspector.json: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::sourceMapURLForScript): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._parsedScriptSource): (WebInspector.DebuggerDispatcher.prototype.scriptParsed): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): * inspector/front-end/Script.js: (WebInspector.Script): 2011-12-21 Pierre Rossi [Qt] Mobile theme refinements https://bugs.webkit.org/show_bug.cgi?id=74727 Mostly to replace most of the rounded-rect-shaped controls with squircle-shaped ones. Reviewed by Kenneth Rohde Christiansen. No new tests needed. * platform/qt/RenderThemeQtMobile.cpp: (WebCore::drawControlBackground): (WebCore::painterScale): (WebCore::borderPen): (WebCore::StylePainterMobile::drawCheckableBackground): Toned down the gradient a bit. (WebCore::StylePainterMobile::findCheckBox): (WebCore::StylePainterMobile::drawRadio): (WebCore::StylePainterMobile::findRadio): (WebCore::StylePainterMobile::drawMultipleComboButton): increase spacing between the dots. (WebCore::StylePainterMobile::drawSimpleComboButton): attempt to improve readability. (WebCore::StylePainterMobile::getButtonImageSize): (WebCore::StylePainterMobile::findComboButton): (WebCore::StylePainterMobile::drawLineEdit): (WebCore::StylePainterMobile::findLineEdit): (WebCore::StylePainterMobile::drawPushButton): (WebCore::StylePainterMobile::findPushButton): (WebCore::StylePainterMobile::drawComboBox): (WebCore::StylePainterMobile::drawProgress): (WebCore::StylePainterMobile::drawSliderThumb): (WebCore::RenderThemeQtMobile::computeSizeBasedOnStyle): (WebCore::RenderThemeQtMobile::paintTextField): * platform/qt/RenderThemeQtMobile.h: 2011-12-21 Alexander Pavlov Web Inspector: CSSStyleSheet::cssRules can return 0 and InspectorStyleSheet dosen't check https://bugs.webkit.org/show_bug.cgi?id=74938 Prevent security checks when retrieving a just-added CSS rule from the "inspector stylesheet". Reviewed by Pavel Feldman. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::addRule): 2011-12-21 Renata Hodovan Fulfill FIXME in HTMLLinkElement.h. https://bugs.webkit.org/show_bug.cgi?id=74278 Rename isStyleSheetLoading() method to styleSheetIsLoading(). This new one has the correct grammar. Reviewed by Darin Adler. No new tests because the functionality remains the same. * dom/Document.cpp: (WebCore::Document::recalcStyleSelector): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setDisabledState): (WebCore::HTMLLinkElement::styleSheetIsLoading): (WebCore::HTMLLinkElement::sheetLoaded): * html/HTMLLinkElement.h: 2011-12-21 Yosifumi Inoue [Forms] Add OVERRIDE to WebCore/html/*InputType.h https://bugs.webkit.org/show_bug.cgi?id=74996 Reviewed by Kent Tamura. No new tests. Changes are just for compilation. * html/BaseButtonInputType.h: Add OVERRIDE. * html/BaseCheckableInputType.h: Add OVERRIDE. * html/BaseDateAndTimeInputType.h: Add OVERRIDE. * html/BaseTextInputType.h: Add OVERRIDE. * html/ButtonInputType.h: Add OVERRIDE. * html/CheckboxInputType.h: Add OVERRIDE. * html/ColorInputType.h: Add OVERRIDE. * html/DateInputType.h: Add OVERRIDE. * html/DateTimeInputType.h: Add OVERRIDE. * html/DateTimeLocalInputType.h: Add OVERRIDE. * html/EmailInputType.h: Add OVERRIDE. * html/FileInputType.h: Add OVERRIDE. * html/HiddenInputType.h: Add OVERRIDE. * html/ImageInputType.h: Add OVERRIDE. * html/IsIndexInputType.h: Add OVERRIDE. * html/MonthInputType.h: Add OVERRIDE. * html/NumberInputType.h: Add OVERRIDE. * html/PasswordInputType.h: Add OVERRIDE. * html/RadioInputType.h: Add OVERRIDE. * html/RangeInputType.h: Add OVERRIDE. * html/ResetInputType.h: Add OVERRIDE. * html/SearchInputType.h: Add OVERRIDE. * html/SubmitInputType.h: Add OVERRIDE. * html/TelephoneInputType.h: Add OVERRIDE. * html/TextFieldInputType.h: Add OVERRIDE. * html/TextInputType.h: Add OVERRIDE. * html/TimeInputType.h: Add OVERRIDE. * html/URLInputType.h: Add OVERRIDE. * html/WeekInputType.h: Add OVERRIDE. 2011-12-21 Matt Falkenhagen Add all ICU languages to LocaleToScriptMappingDefault.cpp https://bugs.webkit.org/show_bug.cgi?id=67274 Reviewed by Kent Tamura. This better mimics the behavior of LocaleToScriptMappingICU.cpp. ICU languages from ICU 3.6 are added. Also, script suffix in locale is handled, so for example "fa_Latn" is mapped to Latin while "fa" is mapped to Arabic. No new tests, there is no visible effect until default per-script fonts are added to non-ICU ports (alternatively, we could extend DumpRenderTree to support overridePreference for per-script fonts as in bug 71110). * platform/text/LocaleToScriptMappingDefault.cpp: (WebCore::getScriptCode): add script name to script code mapping (WebCore::localeToScriptCodeForFontSelection): add ICU languages to map 2011-12-20 Mary Wu Upstream PageClientBlackBerry.h into WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=74169 Reviewed by Daniel Bates. Initial upstream, no new tests. * platform/blackberry/PageClientBlackBerry.h: Added. 2011-12-20 Mary Wu Upstream PlatformMouseEvent and LocalizedStrings into WebCore/platform/blackberry https://bugs.webkit.org/show_bug.cgi?id=74383 Reviewed by Daniel Bates. Other Main Contributors: Rob Buis Mike Fenton Initial upstream, no new tests. * PlatformBlackBerry.cmake: Modified to rename Localizations.cpp to LocalizedStringsBlackBerry.cpp * platform/blackberry/LocalizedStringsBlackBerry.cpp: Added. * platform/blackberry/PlatformMouseEventBlackBerry.cpp: Added. 2011-12-20 Peter Rybin Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type. https://bugs.webkit.org/show_bug.cgi?id=69366 Reviewed by Pavel Feldman. Generator fixed and all usages are changed manually. * inspector/CodeGeneratorInspector.py: (RawTypes.BaseType): (RawTypes.BaseType.get_output_argument_prefix): (RawTypes.Object.get_output_argument_prefix): (RawTypes.Array.get_output_argument_prefix): (RawTypes): (Generator.process_command): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::getComputedStyleForNode): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::getStyleSheet): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::stopSelectorProfiler): (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl): * inspector/InspectorCSSAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getDocument): (WebCore::InspectorDOMAgent::querySelectorAll): (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::getSearchResults): (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::getAttributes): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::setScriptSource): (WebCore::InspectorDebuggerAgent::getFunctionLocation): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getDOMNodeCount): * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::getResourceTree): (WebCore::InspectorPageAgent::searchInResource): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getProfileHeaders): (WebCore::InspectorProfilerAgent::getProfile): (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): * inspector/InspectorProfilerAgent.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: 2011-12-20 Eric Penner [chromium] m_triggerIdlePaints not reset after a compositeAndReadback https://bugs.webkit.org/show_bug.cgi?id=74974 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::compositeAndReadback): 2011-12-20 David Levin Move misplaced assert in SQLiteStatement.cpp https://bugs.webkit.org/show_bug.cgi?id=74975 Reviewed by Dmitry Titov. The test is coming with bug 74666. * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::step): If a database was interrupted before the prepare method was called, then m_isPrepared will be false, so I moved the assert to be after the check for interrupted. 2011-12-20 Eric Carlson WebVTT cues sometimes render when they should not https://bugs.webkit.org/show_bug.cgi?id=74873 Not reviewed: update Chromium to pass new test added in r103371. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::updateTextTrackDisplay): 2011-12-20 Andreas Kling HTMLOptionsCollection: Remove incorrect FIXME about having a base class. Reviewed by Alexey Proskuryakov. HTMLOptionsCollection should indeed inherit from HTMLCollection according to current HTML5, so remove the comment saying we should change that. Spec: http://www.whatwg.org/specs/web-apps/current-work/#htmloptionscollection * html/HTMLOptionsCollection.idl: 2011-12-20 Florin Malita td element ignores zero width/height input element https://bugs.webkit.org/show_bug.cgi?id=74636 Reviewed by Kent Tamura. Test: fast/forms/input-zero-width.html * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::computePreferredLogicalWidths): Relax the attribute test to allow setting widths == 0. 2011-12-20 Adam Klein Avoid unnecessary work when removing attributes from an element https://bugs.webkit.org/show_bug.cgi?id=74953 Reviewed by Ryosuke Niwa. Various codepaths in Element and NamedNodeMap repeatedly search through the list of attributes during a single operation. To avoid this, I've added new getters to NamedNodeMap that return indices rather than Attribute*s (they return WTF::notFound if no match is found). These new methods are now used during removeAttribute operations, as well as setAttribute and NamedNodeMap::setNamedItem (along with a new replaceAttribute helper method). The other optimization here involves the creation/destruction of never-references Attr nodes. This is now avoided by calling NamedNodeMap::removeAttribute directly instead of going through NamedNodeMap::removeNamedItem. As a cleanup after the above changes, the ExceptionCode argument is gone from Element::removeAttribute and friends (it was never set previously). The bulk of the files mentioned below are simply updating callers to these methods. No new tests, no change in behavior expected. * dom/DatasetDOMStringMap.cpp: (WebCore::DatasetDOMStringMap::deleteItem): * dom/Element.cpp: (WebCore::Element::removeAttribute): (WebCore::Element::setBooleanAttribute): (WebCore::Element::removeAttributeNS): (WebCore::Element::setAttribute): (WebCore::Element::setAttributeInternal): * dom/Element.h: * dom/Element.idl: * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): (WebCore::NamedNodeMap::removeNamedItem): (WebCore::NamedNodeMap::getAttributeItemIndexSlowCase): (WebCore::NamedNodeMap::replaceAttribute): (WebCore::NamedNodeMap::removeAttribute): * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::getAttributeItem): (WebCore::NamedNodeMap::getAttributeItemIndex): (WebCore::NamedNodeMap::removeAttribute): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::executeApply): * html/HTMLElement.cpp: (WebCore::HTMLElement::setContentEditable): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setType): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributesAsText): (WebCore::InspectorDOMAgent::removeAttribute): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::transferUseAttributesToReplacedElement): 2011-12-20 Eric Carlson WebVTT cues sometimes render when they should not https://bugs.webkit.org/show_bug.cgi?id=74873 Reviewed by Darin Adler. Test: media/track/track-cue-nothing-to-render.html * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::updateTextTrackDisplay): Don't return early if the current cue is empty so the previous cue is removed. 2011-12-20 Ami Fischman Don't crash on the second time VideoLayerChromium::createCCVideoLayer() is called https://bugs.webkit.org/show_bug.cgi?id=74963 Reviewed by James Robinson. Manually tested by force-dropping the layer tree in CCLayerTreeHost::didBecomeInvisibleOnImplThread(). Crashed before the fix, doesn't crash after. * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::~VideoLayerChromium): (WebCore::VideoLayerChromium::createCCLayerImpl): * platform/graphics/chromium/VideoLayerChromium.h: 2011-12-20 Scott Graham wouldTaintOrigin m_cleanURLs cache grows very large when data urls used https://bugs.webkit.org/show_bug.cgi?id=74957 Reviewed by Kenneth Russell. No new tests, but memory usage of CanvasRenderingContext::m_cleanURLs is reduced. * html/canvas/CanvasRenderingContext.cpp: (WebCore::CanvasRenderingContext::wouldTaintOrigin): 2011-12-20 Greg Billock Change adoptPtr(new ...) to ...::create in Page.cpp https://bugs.webkit.org/show_bug.cgi?id=74457 Reviewed by Darin Adler. * dom/DeviceMotionController.cpp: (WebCore::DeviceMotionController::create): * dom/DeviceMotionController.h: * dom/DeviceOrientationController.cpp: (WebCore::DeviceOrientationController::create): * dom/DeviceOrientationController.h: * editing/FrameSelection.cpp: (WebCore::DragCaretController::create): * editing/FrameSelection.h: * history/BackForwardController.cpp: (WebCore::BackForwardController::create): * history/BackForwardController.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::create): * inspector/InspectorController.h: * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::create): * loader/ProgressTracker.h: * notifications/NotificationController.cpp: (WebCore::NotificationController::create): * notifications/NotificationController.h: * page/Chrome.cpp: (WebCore::Chrome::create): * page/Chrome.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::create): * page/ContextMenuController.h: * page/DragController.cpp: (WebCore::DragController::create): * page/DragController.h: * page/FocusController.cpp: (WebCore::FocusController::create): * page/FocusController.h: * page/GeolocationController.cpp: (WebCore::GeolocationController::create): * page/GeolocationController.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::initGroup): (WebCore::Page::speechInput): * page/PageGroup.cpp: (WebCore::PageGroup::create): * page/PageGroup.h: * page/Settings.cpp: (WebCore::Settings::create): * page/Settings.h: * page/SpeechInput.cpp: (WebCore::SpeechInput::create): * page/SpeechInput.h: 2011-12-20 Ryosuke Niwa Mac build fix after r103354. * platform/mac/ScrollAnimatorMac.mm: (systemUptime): 2011-12-20 Anders Carlsson Add ScrollableArea::contentsResized and have it call the scroll animator https://bugs.webkit.org/show_bug.cgi?id=74966 Reviewed by Sam Weinig. * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::setContentsSize): (WebCore::FrameView::contentsResized): * page/FrameView.h: * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::contentsResized): * platform/ScrollableArea.h: 2011-12-20 Simon Fraser requestAnimationFrame on Mac fires at 60fps even when drawing is much slower https://bugs.webkit.org/show_bug.cgi?id=74964 Reviewed by Chris Marrin. On Mac requestAnimationFrame uses a CVDisplayLink, sending notifications from the display link thread to the main thread that the display link fired. However, there was no throttling on these notifications; if processing an event took a long time, notifications would pile up, and then get handled after the slow event completed. This would cause JS animations which animate by changing style to report 60fps when their display framerate was much lower. Fix by throttling notifications from the display link thread to the web thread; if the previous event hasn't completed yet, don't send any new ones. No new tests, since testing this runtime behavior is hard. * platform/graphics/DisplayRefreshMonitor.cpp: (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor): (WebCore::DisplayRefreshMonitor::refreshDisplayOnMainThread): (WebCore::DisplayRefreshMonitor::notifyClients): Factored out of the static refreshDisplayOnMainThread method so we can use 'this'. * platform/graphics/DisplayRefreshMonitor.h: * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: (WebCore::DisplayRefreshMonitor::displayLinkFired): 2011-12-20 Greg Billock [Coverity] Fix leak in V8HTMLDocument https://bugs.webkit.org/show_bug.cgi?id=74943 Reviewed by Adam Barth. * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::openCallback): 2011-12-20 Sailesh Agrawal Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac https://bugs.webkit.org/show_bug.cgi?id=61144 Reviewed by Beth Dakin. At a high level the main changes are: - replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks - delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff. - delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing - delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing No new tests. Just refactoring. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/chromium/ScrollAnimatorChromiumMac.h: Removed. * platform/chromium/ScrollAnimatorChromiumMac.mm: Removed. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed. * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarPainterPaintTrack): (WebCore::ScrollbarThemeChromiumMac::paint): * platform/mac/EmptyProtocolDefinitions.h: * platform/mac/NSScrollerImpDetails.h: (WebCore::isScrollbarOverlayAPIAvailable): * platform/mac/NSScrollerImpDetails.mm: Added. (WebCore::isScrollbarOverlayAPIAvailable): (WebCore::recommendedScrollerStyle): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (scrollbarPainterForScrollbar): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar): (WebCore::ScrollAnimatorMac::mouseExitedScrollbar): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::cancelAnimations): (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (+[WebScrollbarPrefsObserver appearancePrefsChanged:]): (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer): (WebCore::ScrollbarThemeMac::ScrollbarThemeMac): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasButtons): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::scrollbarPainterPaint): (WebCore::ScrollbarThemeMac::paint): 2011-12-20 Tony Chang sizeof(RenderStyle) is 64 instead of 56 on Windows (x86) https://bugs.webkit.org/show_bug.cgi?id=74876 Reviewed by Ryosuke Niwa. Move bit fields into a new class and use unsigned for all types so we align at 4 byte bounds. Also move the initializers into the header file (has the side benefit of not needing to duplicate the initializers in 3 places). Enable the compile assert on Windows. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::RenderStyleBitfields::affectedByUncommonAttributeSelectors): (WebCore::RenderStyleBitfields::setAffectedByUncommonAttributeSelectors): (WebCore::RenderStyleBitfields::unique): (WebCore::RenderStyleBitfields::setUnique): (WebCore::RenderStyleBitfields::affectedByEmpty): (WebCore::RenderStyleBitfields::emptyState): (WebCore::RenderStyleBitfields::setEmptyState): (WebCore::RenderStyleBitfields::childrenAffectedByFirstChildRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByFirstChildRules): (WebCore::RenderStyleBitfields::childrenAffectedByLastChildRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByLastChildRules): (WebCore::RenderStyleBitfields::childrenAffectedByDirectAdjacentRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByDirectAdjacentRules): (WebCore::RenderStyleBitfields::childrenAffectedByForwardPositionalRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByForwardPositionalRules): (WebCore::RenderStyleBitfields::childrenAffectedByBackwardPositionalRules): (WebCore::RenderStyleBitfields::setChildrenAffectedByBackwardPositionalRules): (WebCore::RenderStyleBitfields::firstChildState): (WebCore::RenderStyleBitfields::setFirstChildState): (WebCore::RenderStyleBitfields::lastChildState): (WebCore::RenderStyleBitfields::setLastChildState): (WebCore::RenderStyleBitfields::childIndex): (WebCore::RenderStyleBitfields::setChildIndex): (WebCore::RenderStyleBitfields::setHasExplicitlyInheritedProperties): (WebCore::RenderStyleBitfields::hasExplicitlyInheritedProperties): 2011-12-20 Tony Chang [chromium] enable WPO for WebCore libs in official builds https://bugs.webkit.org/show_bug.cgi?id=74947 Reviewed by James Robinson. Also move enable_wexit_time_destructors to the top level variables so we don't have to add it to all targets. * WebCore.gyp/WebCore.gyp: 2011-12-20 Anders Carlsson Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions https://bugs.webkit.org/show_bug.cgi?id=74951 Reviewed by Sam Weinig. * WebCore.exp.in: * page/EventHandler.cpp: (WebCore::EventHandler::mouseMoved): (WebCore::EventHandler::updateMouseEventTargetNode): * page/FocusController.cpp: (WebCore::FocusController::setActive): * page/FrameView.cpp: (WebCore::FrameView::didMoveOnscreen): (WebCore::FrameView::willMoveOffscreen): (WebCore::FrameView::notifyPageThatContentAreaWillPaint): * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::contentAreaWillPaint): (WebCore::ScrollableArea::mouseEnteredContentArea): (WebCore::ScrollableArea::mouseExitedContentArea): (WebCore::ScrollableArea::mouseMovedInContentArea): (WebCore::ScrollableArea::mouseEnteredScrollbar): (WebCore::ScrollableArea::mouseExitedScrollbar): (WebCore::ScrollableArea::contentAreaDidShow): (WebCore::ScrollableArea::contentAreaDidHide): * platform/ScrollableArea.h: * platform/ScrollableAreaClient.h: * platform/Scrollbar.cpp: (WebCore::Scrollbar::mouseEntered): (WebCore::Scrollbar::mouseExited): (WebCore::Scrollbar::mouseUp): 2011-12-20 Jarred Nicholls Perform case insensitive matching on MIME types in XHR https://bugs.webkit.org/show_bug.cgi?id=74800 Perform case insensitive matching on responseMIMEType() in didReceiveData(). Workaround case sensitive matching by DOMImplementation::isXMLMIMEType() in responseIsXML(). Reviewed by Darin Adler. Tests: http/tests/xmlhttprequest/xmlhttprequest-mimetype-mixed-case.html http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-mixed-case.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData): (WebCore::XMLHttpRequest::responseIsXML): 2011-12-20 Adam Klein Remove no-op DOMAttr* event dispatch methods from Element https://bugs.webkit.org/show_bug.cgi?id=74946 Reviewed by Darin Adler. The removed methods had their bodies #if 0'd out, so this should have no effect on anything. * dom/Element.cpp: * dom/Element.h: * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::addAttribute): (WebCore::NamedNodeMap::removeAttribute): 2011-12-20 Anders Carlsson ScrollableArea should have an optional ScrollableAreaClient https://bugs.webkit.org/show_bug.cgi?id=74949 Reviewed by Sam Weinig. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * page/FrameView.cpp: (WebCore::scrollableAreaClient): (WebCore::FrameView::FrameView): * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::scrollableAreaClientForFrame): * page/ScrollingCoordinator.h: * platform/ScrollView.cpp: (WebCore::ScrollView::ScrollView): * platform/ScrollView.h: * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::ScrollableArea): * platform/ScrollableArea.h: * platform/ScrollableAreaClient.h: Added. (WebCore::ScrollableAreaClient::~ScrollableAreaClient): (WebCore::ScrollableAreaClient::ScrollableAreaClient): 2011-12-19 Adam Klein Rename Element::setAttributeMap to parserSetAttributeMap and limit its use to the parser https://bugs.webkit.org/show_bug.cgi?id=74885 Reviewed by Ryosuke Niwa. Element::setAttributeMap is currently used by the parser in cases where a NamedNodeMap of attributes has already been allocated and transfers ownership to the Element. Other uses in WebCore don't have this ownership-transfer requirement, and so are more clearly expressed with normal setAttribute calls. Eliminating non-parser callers allows the code to make safe assumptions about the state of the Element it's called on: no need to worry about, e.g., updating the id in the document's cache or enqueueing mutation records. No new tests, no change in behavior expected. * dom/Element.cpp: (WebCore::Element::parserSetAttributeMap): Renamed, added assertions to make sure it's not called unexpectedly, update comments. * dom/Element.h: * html/HTMLViewSourceDocument.cpp: Use setAttribute instead of setAttributeMap. (WebCore::HTMLViewSourceDocument::createContainingTable): (WebCore::HTMLViewSourceDocument::addSpanWithClassName): (WebCore::HTMLViewSourceDocument::addLine): (WebCore::HTMLViewSourceDocument::addBase): (WebCore::HTMLViewSourceDocument::addLink): * html/parser/HTMLConstructionSite.cpp: Reference new name. (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::createElement): (WebCore::HTMLConstructionSite::createHTMLElement): * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::constructTreeFromToken): Use setAttribute instead of setAttributeMap. Also get rid of an unnecessary String -> AtomicString conversion. 2011-12-20 Iain Merrick Remove unused parameter from RenderLayerCompositor::rebuildCompositingLayerTree https://bugs.webkit.org/show_bug.cgi?id=74936 Reviewed by Simon Fraser. Pure refactoring, no change in functionality. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): * rendering/RenderLayerCompositor.h: 2011-12-20 Tony Chang RenderStyle::InheritedFlags and RenderStyle::NonInheritedFlags members should be 4 byte aligned https://bugs.webkit.org/show_bug.cgi?id=74880 Reviewed by Ryosuke Niwa. Use unsigned for all types so we get 4 byte boundaries (unsigned char means we try to align to 1 byte boundaries) and add setters and getters for bool members. Move some members around to make sure we're aligned to 4 byte boundaries. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::copyNonInheritedFrom): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::NonInheritedFlags::affectedByHover): (WebCore::InheritedFlags::NonInheritedFlags::setAffectedByHover): (WebCore::InheritedFlags::NonInheritedFlags::affectedByActive): (WebCore::InheritedFlags::NonInheritedFlags::setAffectedByActive): (WebCore::InheritedFlags::NonInheritedFlags::affectedByDrag): (WebCore::InheritedFlags::NonInheritedFlags::setAffectedByDrag): (WebCore::InheritedFlags::NonInheritedFlags::isLink): (WebCore::InheritedFlags::NonInheritedFlags::setIsLink): (WebCore::InheritedFlags::setBitDefaults): (WebCore::InheritedFlags::affectedByHoverRules): (WebCore::InheritedFlags::affectedByActiveRules): (WebCore::InheritedFlags::affectedByDragRules): (WebCore::InheritedFlags::setAffectedByHoverRules): (WebCore::InheritedFlags::setAffectedByActiveRules): (WebCore::InheritedFlags::setAffectedByDragRules): (WebCore::InheritedFlags::isLink): (WebCore::InheritedFlags::setIsLink): 2011-12-20 Julien Chaffraix Regression(99212): table rows get incorrect height after changing some cells' height https://bugs.webkit.org/show_bug.cgi?id=74303 Reviewed by Darin Adler. Tests: fast/table/resize-table-binding-cell.html fast/table/resize-table-cell.html fast/table/resize-table-row.html r99212 wrongly implemented the row's logicalHeight recalculation. The original code would use recalcCells which would properly recalculate a row logicalHeight by iterating over the table's cells but throwing out the existing result. Our approach is just to recompute our row's logicalHeight and leave the rest of the section untouched. * rendering/RenderTableSection.cpp: (WebCore::updateLogicalHeightForCell): Added this new helper function to update the RowStruct logicalHeight during |addCell| and |rowLogicalHeightChanged|. (WebCore::RenderTableSection::addCell): Replaced the old code with a call to updateLogicalHeightForCell. (WebCore::RenderTableSection::rowLogicalHeightChanged): Added a call to updateLogicalHeightForCell for each cells. 2011-12-20 Sheriff Bot Unreviewed, rolling out r103322. http://trac.webkit.org/changeset/103322 https://bugs.webkit.org/show_bug.cgi?id=74927 seven inspector's tests are crashing on qt (Requested by loislo on #webkit). * inspector/CodeGeneratorInspector.py: (RawTypes.BaseType.is_event_param_check_optional): (RawTypes.Object.is_event_param_check_optional): (RawTypes.Array.is_event_param_check_optional): (RawTypes): (Generator.process_command): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::getComputedStyleForNode): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::getStyleSheet): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::stopSelectorProfiler): * inspector/InspectorCSSAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getDocument): (WebCore::InspectorDOMAgent::querySelectorAll): (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::getSearchResults): (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::getAttributes): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::setScriptSource): (WebCore::InspectorDebuggerAgent::getFunctionLocation): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getDOMNodeCount): * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::getResourceTree): (WebCore::InspectorPageAgent::searchInResource): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getProfileHeaders): (WebCore::InspectorProfilerAgent::getProfile): (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): * inspector/InspectorProfilerAgent.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: 2011-12-19 Andrey Kosyakov Web Inspector: [Extensions API] allow setting extension API per extension security origin https://bugs.webkit.org/show_bug.cgi?id=74868 Reviewed by Pavel Feldman. This replaces InspectorExtensionAPI string within InspectorFrontendHost with a map by extension security origin, so that we can have APIs customized by extension (in particular, this is needed to expose experimental APIs only to certain extensions). * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::didClearWindowObjectInWorld): (WebCore::InspectorAgent::setInjectedScriptForOrigin): * inspector/InspectorAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::setInjectedScriptForOrigin): * inspector/InspectorController.h: * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::setInjectedScriptForOrigin): * inspector/InspectorFrontendHost.h: * inspector/InspectorFrontendHost.idl: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._addExtension): 2011-12-20 Peter Rybin Web Inspector: CodeGenerator should not use pointers for out params of RefPtr type. https://bugs.webkit.org/show_bug.cgi?id=69366 Reviewed by Pavel Feldman. Generator fixed and all usages are changed manually. * inspector/CodeGeneratorInspector.py: (RawTypes.BaseType.is_event_param_check_optional): (RawTypes.BaseType): (RawTypes.BaseType.get_output_argument_prefix): (RawTypes.Object.get_output_argument_prefix): (RawTypes.Array.get_output_argument_prefix): (RawTypes): (Generator.process_command): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests): (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::getMatchedStylesForNode): (WebCore::InspectorCSSAgent::getInlineStylesForNode): (WebCore::InspectorCSSAgent::getComputedStyleForNode): (WebCore::InspectorCSSAgent::getAllStyleSheets): (WebCore::InspectorCSSAgent::getStyleSheet): (WebCore::InspectorCSSAgent::setPropertyText): (WebCore::InspectorCSSAgent::toggleProperty): (WebCore::InspectorCSSAgent::setRuleSelector): (WebCore::InspectorCSSAgent::addRule): (WebCore::InspectorCSSAgent::getSupportedCSSProperties): (WebCore::InspectorCSSAgent::stopSelectorProfiler): (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl): * inspector/InspectorCSSAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getDocument): (WebCore::InspectorDOMAgent::querySelectorAll): (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::getSearchResults): (WebCore::InspectorDOMAgent::resolveNode): (WebCore::InspectorDOMAgent::getAttributes): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::searchInContent): (WebCore::InspectorDebuggerAgent::setScriptSource): (WebCore::InspectorDebuggerAgent::getFunctionLocation): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getDOMNodeCount): * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::getCookies): (WebCore::InspectorPageAgent::getResourceTree): (WebCore::InspectorPageAgent::searchInResource): (WebCore::InspectorPageAgent::searchInResources): * inspector/InspectorPageAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getProfileHeaders): (WebCore::InspectorProfilerAgent::getProfile): (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): * inspector/InspectorProfilerAgent.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::callFunctionOn): (WebCore::InspectorRuntimeAgent::getProperties): * inspector/InspectorRuntimeAgent.h: 2011-12-20 Julien Chaffraix Crash in RenderTable::outerBorderAfter http://webkit.org/b/74026 Reviewed by Eric Seidel. Test: fast/table/computeLogicalWidth-table-needsSectionRecalc.html RenderBlock can call computeLogicalWidth() before calling layout(). The code in RenderTable::computeLogicalWidth would make the assumption that layout() was called as layout() is responsible for recomputing our sections. To prevent the issue, let's just recompute the section if it's needed as this situation shouldn't be an error. Also adding more knowledge of table in RenderBlock seems bad. * rendering/RenderTable.cpp: (WebCore::RenderTable::computeLogicalWidth): Make sure we recalculate our section if it's needed. 2011-12-20 Kentaro Hara [Refactoring] Replace imp with impl in CodeGeneratorJS.pm https://bugs.webkit.org/show_bug.cgi?id=74901 Reviewed by Adam Barth. As pointed out in bug 74837, the generated code by CodeGeneratorJS.pm includes both 'imp' and 'impl'. This patch unifies them into 'impl'. I confirmed that "perl -lne 'print if /imp[^a-z]/' CodeGeneratorJS.pm" outputs nothing. No new tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateAttributeEventListenerCall): (GenerateEventListenerCall): (GenerateImplementation): (GenerateParametersCheck): (GenerateImplementationFunctionCall): (NativeToJSValue): * bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests results. (WebCore::jsFloat64ArrayPrototypeFunctionFoo): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::jsTestEventConstructorAttr1): (WebCore::jsTestEventConstructorAttr2): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::jsTestInterfaceStr1): (WebCore::jsTestInterfaceStr2): (WebCore::jsTestInterfaceStr3): (WebCore::setJSTestInterfaceStr2): (WebCore::setJSTestInterfaceStr3): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjReadOnlyIntAttr): (WebCore::jsTestObjReadOnlyStringAttr): (WebCore::jsTestObjReadOnlyTestObjAttr): (WebCore::jsTestObjShortAttr): (WebCore::jsTestObjUnsignedShortAttr): (WebCore::jsTestObjIntAttr): (WebCore::jsTestObjLongLongAttr): (WebCore::jsTestObjUnsignedLongLongAttr): (WebCore::jsTestObjStringAttr): (WebCore::jsTestObjTestObjAttr): (WebCore::jsTestObjXMLObjAttr): (WebCore::jsTestObjCreate): (WebCore::jsTestObjReflectedStringAttr): (WebCore::jsTestObjReflectedIntegralAttr): (WebCore::jsTestObjReflectedUnsignedIntegralAttr): (WebCore::jsTestObjReflectedBooleanAttr): (WebCore::jsTestObjReflectedURLAttr): (WebCore::jsTestObjReflectedNonEmptyURLAttr): (WebCore::jsTestObjReflectedCustomIntegralAttr): (WebCore::jsTestObjReflectedCustomBooleanAttr): (WebCore::jsTestObjReflectedCustomURLAttr): (WebCore::jsTestObjReflectedCustomNonEmptyURLAttr): (WebCore::jsTestObjAttrWithGetterException): (WebCore::jsTestObjAttrWithSetterException): (WebCore::jsTestObjStringAttrWithGetterException): (WebCore::jsTestObjStringAttrWithSetterException): (WebCore::jsTestObjScriptStringAttr): (WebCore::jsTestObjConditionalAttr1): (WebCore::jsTestObjConditionalAttr2): (WebCore::jsTestObjConditionalAttr3): (WebCore::jsTestObjCachedAttribute1): (WebCore::jsTestObjCachedAttribute2): (WebCore::jsTestObjDescription): (WebCore::jsTestObjId): (WebCore::jsTestObjHash): (WebCore::setJSTestObjShortAttr): (WebCore::setJSTestObjUnsignedShortAttr): (WebCore::setJSTestObjIntAttr): (WebCore::setJSTestObjLongLongAttr): (WebCore::setJSTestObjUnsignedLongLongAttr): (WebCore::setJSTestObjStringAttr): (WebCore::setJSTestObjTestObjAttr): (WebCore::setJSTestObjXMLObjAttr): (WebCore::setJSTestObjCreate): (WebCore::setJSTestObjReflectedStringAttr): (WebCore::setJSTestObjReflectedIntegralAttr): (WebCore::setJSTestObjReflectedUnsignedIntegralAttr): (WebCore::setJSTestObjReflectedBooleanAttr): (WebCore::setJSTestObjReflectedURLAttr): (WebCore::setJSTestObjReflectedNonEmptyURLAttr): (WebCore::setJSTestObjReflectedCustomIntegralAttr): (WebCore::setJSTestObjReflectedCustomBooleanAttr): (WebCore::setJSTestObjReflectedCustomURLAttr): (WebCore::setJSTestObjReflectedCustomNonEmptyURLAttr): (WebCore::setJSTestObjAttrWithGetterException): (WebCore::setJSTestObjAttrWithSetterException): (WebCore::setJSTestObjStringAttrWithGetterException): (WebCore::setJSTestObjStringAttrWithSetterException): (WebCore::setJSTestObjConditionalAttr1): (WebCore::setJSTestObjConditionalAttr2): (WebCore::setJSTestObjConditionalAttr3): (WebCore::setJSTestObjId): (WebCore::jsTestObjPrototypeFunctionVoidMethod): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethod): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethod): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionIdbKey): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionMethodWithException): (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): (WebCore::jsTestObjPrototypeFunctionAddEventListener): (WebCore::jsTestObjPrototypeFunctionRemoveEventListener): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrame): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj): (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException): (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException): (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionConditionalMethod1): (WebCore::jsTestObjPrototypeFunctionConditionalMethod2): (WebCore::jsTestObjPrototypeFunctionConditionalMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::jsTestSerializedScriptValueInterfaceValue): 2011-12-20 Alok Priyadarshi [chromium] compositing/shadows tests fail with accelerated painting https://bugs.webkit.org/show_bug.cgi?id=74871 Reviewed by James Robinson. Switched over to new API for creating accelerated canvas GrContext::createPlatformTexture. It correctly binds the stencil buffer to the FBO. Test: compositing/shadows/shadow-drawing.html (existing) * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: (WebCore::createAcceleratedCanvas): (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::allocate): (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/ManagedTexture.h: 2011-12-20 Sheriff Bot Unreviewed, rolling out r103291. http://trac.webkit.org/changeset/103291 https://bugs.webkit.org/show_bug.cgi?id=74915 Looks like it broke fast/events/touch and fast/events/touch/gesture/gesture-scroll.html http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Mac10.5/builds/7010 (Requested by loislo on #webkit). * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/chromium/ScrollAnimatorChromiumMac.h: Copied from Source/WebCore/platform/mac/ScrollAnimatorMac.h. (WebCore::ScrollAnimatorChromiumMac::setIsDrawingIntoLayer): (WebCore::ScrollAnimatorChromiumMac::isDrawingIntoLayer): (WebCore::ScrollAnimatorChromiumMac::haveScrolledSincePageLoad): (WebCore::ScrollAnimatorChromiumMac::setNeedsScrollerStyleUpdate): (WebCore::ScrollAnimatorChromiumMac::needsScrollerStyleUpdate): * platform/chromium/ScrollAnimatorChromiumMac.mm: Added. (-[NSProcessInfo systemUptime]): (abs): (-[ScrollAnimationHelperDelegate initWithScrollAnimator:WebCore::]): (-[ScrollAnimationHelperDelegate scrollAnimatorDestroyed]): (-[ScrollAnimationHelperDelegate bounds]): (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]): (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]): (-[ScrollAnimationHelperDelegate convertSizeToBase:]): (-[ScrollAnimationHelperDelegate convertSizeFromBase:]): (-[ScrollAnimationHelperDelegate convertSizeToBacking:]): (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]): (-[ScrollAnimationHelperDelegate superview]): (-[ScrollAnimationHelperDelegate documentView]): (-[ScrollAnimationHelperDelegate window]): (-[ScrollAnimationHelperDelegate _recursiveRecomputeToolTips]): (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]): (-[ScrollbarPainterControllerDelegate scrollAnimatorDestroyed]): (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPartAnimation setCurrentProgress:]): (-[ScrollbarPartAnimation scrollAnimatorDestroyed]): (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]): (-[ScrollbarPainterDelegate cancelAnimations]): (-[ScrollbarPainterDelegate convertRectToBacking:]): (-[ScrollbarPainterDelegate convertRectFromBacking:]): (-[ScrollbarPainterDelegate layer]): (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]): (-[ScrollbarPainterDelegate scrollAnimatorDestroyed]): (WebCore::ScrollAnimator::create): (WebCore::chromiumScrollbarTheme): (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac): (WebCore::ScrollAnimatorChromiumMac::scroll): (WebCore::ScrollAnimatorChromiumMac::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorChromiumMac::adjustScrollXPositionIfNecessary): (WebCore::ScrollAnimatorChromiumMac::adjustScrollYPositionIfNecessary): (WebCore::ScrollAnimatorChromiumMac::adjustScrollPositionIfNecessary): (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY): (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPointForScrollAnimation): (WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged): (WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint): (WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea): (WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorChromiumMac::willStartLiveResize): (WebCore::ScrollAnimatorChromiumMac::contentsResized): (WebCore::ScrollAnimatorChromiumMac::willEndLiveResize): (WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow): (WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide): (WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture): (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorChromiumMac::cancelAnimations): (WebCore::elasticDeltaForTimeDelta): (WebCore::elasticDeltaForReboundDelta): (WebCore::reboundDeltaForElasticDelta): (WebCore::scrollWheelMultiplier): (WebCore::isScrollingLeftAndShouldNotRubberBand): (WebCore::isScrollingRightAndShouldNotRubberBand): (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent): (WebCore::ScrollAnimatorChromiumMac::pinnedInDirection): (WebCore::ScrollAnimatorChromiumMac::allowsVerticalStretching): (WebCore::ScrollAnimatorChromiumMac::allowsHorizontalStretching): (WebCore::ScrollAnimatorChromiumMac::smoothScrollWithEvent): (WebCore::ScrollAnimatorChromiumMac::beginScrollGesture): (WebCore::ScrollAnimatorChromiumMac::endScrollGesture): (WebCore::ScrollAnimatorChromiumMac::snapRubberBand): (WebCore::roundTowardZero): (WebCore::roundToDevicePixelTowardZero): (WebCore::ScrollAnimatorChromiumMac::snapRubberBandTimerFired): (WebCore::ScrollAnimatorChromiumMac::setIsActive): (WebCore::ScrollAnimatorChromiumMac::updateScrollerStyle): (WebCore::ScrollAnimatorChromiumMac::startScrollbarPaintTimer): (WebCore::ScrollAnimatorChromiumMac::scrollbarPaintTimerIsActive): (WebCore::ScrollAnimatorChromiumMac::stopScrollbarPaintTimer): (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired): (WebCore::ScrollAnimatorChromiumMac::setVisibleScrollerThumbRect): * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Added. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Added. (lookUpNSScrollerImpClass): (lookUpNSScrollerImpPairClass): (scrollbarControlSizeToNSControlSize): (preferredScrollerStyle): (wkScrollbarPainterUsesOverlayScrollers): (wkScrollbarPainterIsHorizontal): (wkScrollbarPainterKnobAlpha): (wkScrollbarPainterSetOverlayState): (wkScrollbarPainterPaint): (wkScrollbarPainterPaintTrack): (wkScrollbarPainterPaintKnob): (wkScrollbarMinimumThumbLength): (wkScrollbarPainterSetDelegate): (wkScrollbarPainterSetEnabled): (wkScrollbarPainterTrackAlpha): (wkMakeScrollbarPainter): (wkScrollbarThickness): (wkScrollbarMinimumTotalLengthNeededForThumb): (wkVerticalScrollbarPainterForController): (wkHorizontalScrollbarPainterForController): (wkScrollbarPainterControllerStyle): (wkMakeScrollbarReplacementPainter): (wkSetPainterForPainterController): (wkSetScrollbarPainterControllerStyle): (wkScrollbarPainterKnobRect): (wkSetScrollbarPainterKnobAlpha): (wkSetScrollbarPainterTrackAlpha): (wkSetScrollbarPainterKnobStyle): (wkMakeScrollbarPainterController): (wkContentAreaScrolled): (wkContentAreaWillPaint): (wkMouseEnteredContentArea): (wkMouseExitedContentArea): (wkMouseMovedInContentArea): (wkWillStartLiveResize): (wkContentAreaResized): (wkWillEndLiveResize): (wkContentAreaDidShow): (wkContentAreaDidHide): (wkDidBeginScrollGesture): (wkDidEndScrollGesture): (wkScrollbarPainterForceFlashScrollers): (isScrollbarOverlayAPIAvailable): * platform/chromium/ScrollbarThemeChromiumMac.h: (WebCore::ScrollbarThemeChromiumMac::supportsControlTints): (WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages): * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::scrollbarMap): (+[ScrollbarPrefsObserver appearancePrefsChanged:]): (+[ScrollbarPrefsObserver behaviorPrefsChanged:]): (+[ScrollbarPrefsObserver registerAsObserver]): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeChromiumMac::registerScrollbar): (WebCore::ScrollbarThemeChromiumMac::unregisterScrollbar): (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar): (WebCore::ScrollbarThemeChromiumMac::painterForScrollbar): (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::ScrollbarThemeChromiumMac::preferencesChanged): (WebCore::ScrollbarThemeChromiumMac::scrollbarThickness): (WebCore::ScrollbarThemeChromiumMac::usesOverlayScrollbars): (WebCore::toScrollbarPainterKnobStyle): (WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeChromiumMac::initialAutoscrollTimerDelay): (WebCore::ScrollbarThemeChromiumMac::autoscrollTimerDelay): (WebCore::ScrollbarThemeChromiumMac::buttonsPlacement): (WebCore::ScrollbarThemeChromiumMac::hasButtons): (WebCore::ScrollbarThemeChromiumMac::hasThumb): (WebCore::buttonRepaintRect): (WebCore::ScrollbarThemeChromiumMac::backButtonRect): (WebCore::ScrollbarThemeChromiumMac::forwardButtonRect): (WebCore::ScrollbarThemeChromiumMac::trackRect): (WebCore::ScrollbarThemeChromiumMac::minimumThumbLength): (WebCore::ScrollbarThemeChromiumMac::shouldCenterOnThumb): (WebCore::ScrollbarThemeChromiumMac::shouldDragDocumentInsteadOfThumb): (WebCore::scrollbarPartToHIPressedState): (WebCore::ScrollbarThemeChromiumMac::updateEnabledState): (WebCore::ScrollbarThemeChromiumMac::paint): * platform/mac/EmptyProtocolDefinitions.h: * platform/mac/NSScrollerImpDetails.h: * platform/mac/NSScrollerImpDetails.mm: Removed. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (-[WebScrollbarPainterDelegate layer]): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar): (WebCore::ScrollAnimatorMac::mouseExitedScrollbar): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::cancelAnimations): (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (+[WebScrollbarPrefsObserver appearancePrefsChanged:]): (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]): (WebCore::ScrollbarTheme::nativeTheme): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::ScrollbarThemeMac): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasButtons): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::scrollbarPartToHIPressedState): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::ScrollbarThemeMac::paint): 2011-12-19 Adam Klein Make all calls to NamedNodeMap::setAttributes go through Element https://bugs.webkit.org/show_bug.cgi?id=74895 Reviewed by Ryosuke Niwa. There are two reasons for this change. One is an optimization: some callers were previously always creating a NamedNodeMap even if the source didn't have any attributes. The other reason is forward-looking: setAttributes' behavior is subtly wrong in the presence of MutationObservers. This doesn't matter for most callers since the element on which setAttributesFromElement is called is newly-created. In the editing case, however, it could make a difference in behavior, which I hope to fix in a future change without sacrificing the performance of cloneNode() on an Element (which is what NamedNodeMap::setAttributes is designed for). No new tests, no change in behavior. * dom/Element.cpp: (WebCore::Element::cloneElementWithoutChildren): Call setAttributesFromElement. * dom/Element.h: (WebCore::Element::setAttributesFromElement): Create new inline helper method which conditionally forwards to NamedNodeMap::setAttribute. * dom/NamedNodeMap.h: Make setAttributes private (Element is already a friend). * editing/ReplaceNodeWithSpanCommand.cpp: (WebCore::swapInNodePreservingAttributesAndChildren): Call setAttributesFromElement. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setNodeName): Call setAttributesFromElement. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Call setAttributesFromElement. (WebCore::SVGUseElement::transferUseAttributesToReplacedElement): Call setAttributesFromElement and make use of ASSERT_NO_EXCEPTION to make code easier to read. 2011-12-19 Leo Yang [BlackBerry] Upstream the BlackBerry change to ResourceRequestBase.cpp https://bugs.webkit.org/show_bug.cgi?id=74910 Reviewed by Daniel Bates. No functionality change to the existing code, no new tests. * platform/network/ResourceRequestBase.cpp: The BlackBerry porting has its own initializeMaximumHTTPConnectionCountPerHost(). Exclude the default implementation. 2011-12-19 Leo Yang [BlackBerry] Upstream the BlackBerry change to NetworkStateNotifier.h https://bugs.webkit.org/show_bug.cgi?id=74904 Reviewed by Daniel Bates. No functionality change to existing code, no new tests. * platform/network/NetworkStateNotifier.h: 2011-12-19 Yael Aharon Update dropzone implementation per spec update https://bugs.webkit.org/show_bug.cgi?id=74834 Reviewed by Tony Chang. Update support for dropzone attribute to use file: and string: instead of f: and s:. http://www.whatwg.org/specs/web-apps/current-work/#the-dropzone-attribute No new tests. Existing tests cover this and were updated. * dom/Clipboard.cpp: (WebCore::Clipboard::hasDropZoneType): 2011-12-19 Sam Weinig Add support for scrollLineDown: and scrollLineUp: NSResponder selectors https://bugs.webkit.org/show_bug.cgi?id=74907 Reviewed by Dan Bernstein. Added API test: WebKit2.ScrollByLineCommands * editing/EditorCommand.cpp: (WebCore::executeScrollLineUp): (WebCore::executeScrollLineDown): (WebCore::createCommandMap): Add implementations for scrollLineUp/Down. Do not expose these to execCommand 2011-12-19 Huang Dongsung [QT] WebGL can not make the frame buffer with the stencil buffer. https://bugs.webkit.org/show_bug.cgi?id=74783 When initializing a framebuffer in OpenGL ES 2, we need to initialize the depth and stencil buffers separately, as opposed to the combined depth-stencil buffer we initialize for desktop GL. This makes fast/canvas/webgl/context-attributes-depth-stencil-combination.html work in OpenGL ES 2. Reviewed by Noam Rosenthal. * platform/graphics/GraphicsContext3D.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::reshape): 2011-12-19 Ami Fischman Teach VideoLayerChromium how to render native texture (to support HW video decode). https://bugs.webkit.org/show_bug.cgi?id=73043 Reviewed by James Robinson. Fix the life-cycle of video frames handled by VideoLayerChromium/CCVideoLayerImpl. VideoFrameProvider::{get,put}CurrentFrame provide lease semantics. Previously VideoLayerChromium would acquire the lease for the duration of copying the frame, even if that was only a texture ID, and immediately return the lease, while CCVideoLayerImpl::draw() would come along later and use the (no-longer locked) texture optimistically. This change makes it so that CCVideoLayerImpl holds the frame's lease for the duration of draw(), guaranteeing the frame is valid to read. Existing test coverage (compositing/video/, LayoutTests). HW render of HW-decoded textures is not yet tested explicitly. * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::~VideoLayerChromium): (WebCore::VideoLayerChromium::createCCLayerImpl): (WebCore::VideoLayerChromium::releaseProvider): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::setProvider): (WebCore::convertVFCFormatToGC3DFormat): (WebCore::CCVideoLayerImpl::draw): (WebCore::CCVideoLayerImpl::copyFrameToTextures): (WebCore::CCVideoLayerImpl::copyPlaneToTexture): (WebCore::computeVisibleSize): (WebCore::CCVideoLayerImpl::reserveTextures): (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawCommon): (WebCore::CCVideoLayerImpl::drawRGBA): (WebCore::CCVideoLayerImpl::drawNativeTexture): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-12-19 Sam Weinig More PlatformEvent cleanup https://bugs.webkit.org/show_bug.cgi?id=74831 Reviewed by Dan Bernstein. * platform/PlatformMouseEvent.h: (WebCore::PlatformMouseEvent::position): Rename pos -> position(). Remove x() and y() accessors. (WebCore::PlatformMouseEvent::globalPosition): Added. Replaces globalX() and globalY() accessors. (WebCore::PlatformMouseEvent::movementDelta): Added. Replaces movementX() and movementY() accessors. * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::position): Renamed pos -> position(). (WebCore::PlatformWheelEvent::globalPosition): Renamed globalPos -> globalPosition(). * dom/MouseEvent.cpp: (WebCore::MouseEvent::create): * dom/WheelEvent.cpp: (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): * page/DragController.cpp: (WebCore::DragController::startDrag): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::eventMayStartDrag): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::selectCursor): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::dispatchDragEvent): (WebCore::EventHandler::prepareMouseEvent): (WebCore::EventHandler::dispatchMouseEvent): (WebCore::EventHandler::handleWheelEvent): (WebCore::EventHandler::sendContextMenuEvent): (WebCore::EventHandler::handleDrag): (WebCore::EventHandler::handleTouchEvent): * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::passMousePressEventToSubframe): * platform/Scrollbar.cpp: (WebCore::Scrollbar::mouseMoved): (WebCore::Scrollbar::mouseDown): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::hitTest): * platform/chromium/PopupContainer.cpp: (WebCore::constructRelativeMouseEvent): (WebCore::constructRelativeWheelEvent): * platform/chromium/PopupListBox.cpp: (WebCore::PopupListBox::handleMouseDownEvent): (WebCore::PopupListBox::handleMouseMoveEvent): (WebCore::PopupListBox::handleMouseReleaseEvent): (WebCore::PopupListBox::handleWheelEvent): * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin): * platform/qt/ScrollbarQt.cpp: (WebCore::Scrollbar::contextMenu): * platform/qt/ScrollbarThemeQt.cpp: (WebCore::ScrollbarThemeQt::hitTest): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): Update to use new names, access style. 2011-12-19 Adam Klein Remove unused ExceptionCode& argument from Element::setAttribute(QualifiedName) https://bugs.webkit.org/show_bug.cgi?id=74740 Reviewed by Ryosuke Niwa. Updated lots of callers to remove third argument. The list of changes below only lists things other than updating callers. * dom/Document.cpp: (WebCore::Document::importNode): * dom/Element.cpp: (WebCore::Element::setAttribute): (WebCore::Element::setAttributeNS): (WebCore::Element::setIntegralAttribute): (WebCore::Element::setUnsignedIntegralAttribute): * dom/Element.h: Removed third arg from method, removed old two-arg overload which now has an identical signature. * editing/mac/EditorMac.mm: Updated caller and used ASSERT_NO_EXCEPTION for nearby code. (WebCore::styleForSelectionStart): * html/HTMLElement.cpp: (WebCore::HTMLElement::setContentEditable): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributesAsText): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue): * svg/SVGElement.idl: Removed 'setter raises(DOMException)' * svg/SVGGlyphRefElement.idl: ditto. * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::setType): (WebCore::SVGStyleElement::setMedia): (WebCore::SVGStyleElement::setTitle): * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processAttributes): 2011-12-19 Kentaro Hara Unreviewed. Rebaselined run-bindings-tests results. * bindings/scripts/test/JS/JSFloat64Array.h: (WebCore::JSFloat64Array::create): (WebCore::JSFloat64ArrayPrototype::create): (WebCore::JSFloat64ArrayConstructor::create): * bindings/scripts/test/JS/JSTestEventConstructor.h: (WebCore::JSTestEventConstructor::create): (WebCore::JSTestEventConstructorPrototype::create): (WebCore::JSTestEventConstructorConstructor::create): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::create): (WebCore::JSTestInterfacePrototype::create): (WebCore::JSTestInterfaceConstructor::create): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::create): (WebCore::JSTestMediaQueryListListenerPrototype::create): (WebCore::JSTestMediaQueryListListenerConstructor::create): * bindings/scripts/test/JS/JSTestNamedConstructor.h: (WebCore::JSTestNamedConstructor::create): (WebCore::JSTestNamedConstructorPrototype::create): (WebCore::JSTestNamedConstructorConstructor::create): (WebCore::JSTestNamedConstructorNamedConstructor::create): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::create): (WebCore::JSTestObjPrototype::create): (WebCore::JSTestObjConstructor::create): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::create): (WebCore::JSTestSerializedScriptValueInterfacePrototype::create): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create): 2011-12-19 James Robinson [chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired https://bugs.webkit.org/show_bug.cgi?id=74376 Reviewed by Kenneth Russell. CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper scheduling decision. This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic. There is a large amount of unit test coverage for this change, largely in LayerChromiumTest * platform/graphics/chromium/GraphicsLayerChromium.cpp: * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setNeedsCommit): (WebCore::LayerChromium::insertChild): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::setRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCScopedThreadProxy.h: (WebCore::CCScopedThreadProxy::runTaskIfNotShutdown): 2011-12-19 Sailesh Agrawal Merge ScrollAnimatorChromiumMac.mm back to ScrollAnimatorMac https://bugs.webkit.org/show_bug.cgi?id=61144 Reviewed by Beth Dakin. At a high level the main changes are: - replace #ifdefs in ScrollAnimatorMac and ScrollbarThemeMac with run time checks - delete duplicate code in ScrollbarThemeChromiumMac. Keep the paint code since it does tickmarks and SKIA stuff. - delete ScrollAnimatorChromiumMac since ScrollAnimatorMac does the exact same thing - delete ScrollbarOverlayUtilitiesChromiumMac since NSScrollerImpDetails does the same thing No new tests. Just refactoring. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/chromium/ScrollAnimatorChromiumMac.h: Removed. * platform/chromium/ScrollAnimatorChromiumMac.mm: Removed. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: Removed. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: Removed. * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarPainterPaintTrack): (WebCore::ScrollbarThemeChromiumMac::paint): * platform/mac/EmptyProtocolDefinitions.h: * platform/mac/NSScrollerImpDetails.h: (WebCore::isScrollbarOverlayAPIAvailable): * platform/mac/NSScrollerImpDetails.mm: Added. (WebCore::isScrollbarOverlayAPIAvailable): (WebCore::recommendedScrollerStyle): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (scrollbarPainterForScrollbar): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar): (WebCore::ScrollAnimatorMac::mouseExitedScrollbar): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::cancelAnimations): (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): * platform/mac/ScrollElasticityController.h: * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (+[WebScrollbarPrefsObserver appearancePrefsChanged:]): (+[WebScrollbarPrefsObserver behaviorPrefsChanged:]): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::setIsCurrentlyDrawingIntoLayer): (WebCore::ScrollbarThemeMac::ScrollbarThemeMac): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasButtons): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::scrollbarPartToHIPressedState): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::scrollbarPainterPaint): (WebCore::ScrollbarThemeMac::paint): 2011-12-19 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-19 Joshua Bell IndexedDB multiple calls to transaction.objectStore(name) should return the same instance https://bugs.webkit.org/show_bug.cgi?id=60208 Reviewed by Tony Chang. Ditto for calls to IDBObjectStore.index(). Calling these methods after the enclosing transaction has finished now consistently throws an error, which allows us to break reference cycles. Test: storage/indexeddb/mozilla/object-identity.html * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): * storage/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): (WebCore::IDBObjectStore::index): (WebCore::IDBObjectStore::transactionFinished): * storage/IDBObjectStore.h: * storage/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): (WebCore::IDBTransaction::objectStoreCreated): (WebCore::IDBTransaction::dispatchEvent): * storage/IDBTransaction.h: 2011-12-19 Anders Carlsson Send gesture events through the event dispatcher and scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=74879 Reviewed by Andreas Kling. * WebCore.exp.in: Export ScrollingCoordinator::handleGestureEvent. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::handleGestureEvent): * page/ScrollingCoordinator.h: Add handleGestureEvent stub. 2011-12-19 Kentaro Hara Move WebAudio and WebSocket getters from JSDOMWindowCustom.cpp to JSDOMWindow{WebAudio,WebSocket}Custom.cpp https://bugs.webkit.org/show_bug.cgi?id=74841 Reviewed by Adam Barth. This is the second step for bug 74599. We are planning to enable the [Supplemental] IDL and modularize WebAudio and WebSocket on AppleWebKit. This patch moves webkitAudioContext() and webSocket() from JSDOMWindowCustom.cpp to JSDOMWindowWebAudioCustom.cpp and JSDOMWindowWebSocketCustom.cpp, for modularization. Tests: Confirm that build succeeds. http/tests/websocket/tests/* * GNUmakefile.list.am: Added JSDOMWindowWebAudioCustom.cpp and JSDOMWindowWebSocketCustom.cpp. * Target.pri: Ditto. * UseJSC.cmake: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSBindingsAllInOne.cpp: Ditto. * bindings/js/JSDOMWindowCustom.cpp: For now we do not remove settingsForWindow(), webkitAudioContext() and webSocket(), since other build systems are still using them. We will remove them after all build systems implement the [Supplemental] IDL. * bindings/js/JSDOMWindowWebAudioCustom.cpp: Added. (WebCore::settingsForWindowWebAudio): (WebCore::JSDOMWindow::webkitAudioContext): * bindings/js/JSDOMWindowWebSocketCustom.cpp: Added. (WebCore::settingsForWindowWebSocket): (WebCore::JSDOMWindow::webSocket): * bindings/scripts/CodeGeneratorJS.pm: Until we implement the [Supplemental] IDL on all build systems, we need to temporarily allow two kinds of webkitAudioContext() and webSocket(). (GenerateHeader): 2011-12-16 Zhenyao Mo Postpone deleteRenderbuffer/deleteTexture until all framebuffer attachment points are removed. https://bugs.webkit.org/show_bug.cgi?id=74741 Reviewed by Kenneth Russell. Use WebGLObject's attachment count mechanism to track if a renderbuffer/texture is still attached to framebuffers, and if its deletion should be delated or not. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer): (WebCore::WebGLFramebuffer::getAttachment): (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): (WebCore::WebGLFramebuffer::deleteObjectImpl): (WebCore::WebGLFramebuffer::isBound): * html/canvas/WebGLFramebuffer.h: 2011-12-19 Iain Merrick [chromium] Accelerated canvas broken in threaded compositing mode https://bugs.webkit.org/show_bug.cgi?id=72738 We were flushing the Skia canvas in updateCompositorResources, which is illegal as it runs on the wrong thread. Moved to paintContentsIfDirty instead. For correct rendering on the compositor thread, we make a copy of the canvas texture in updateCompositorResources. Removed m_textureId and pushPropertiesTo from CanvasLayerChromium, as it's no longer common between Canvas2DLayerChromium and WebGLLayerChromium. WebGL changes do not change functionality. Reviewed by James Robinson. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::create): (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::setTextureId): (WebCore::Canvas2DLayerChromium::contentChanged): (WebCore::Canvas2DLayerChromium::drawsContent): (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): (WebCore::Canvas2DLayerChromium::setLayerTreeHost): (WebCore::Canvas2DLayerChromium::setTextureManager): (WebCore::Canvas2DLayerChromium::updateCompositorResources): (WebCore::Canvas2DLayerChromium::pushPropertiesTo): (WebCore::Canvas2DLayerChromium::unreserveContentsTexture): (WebCore::Canvas2DLayerChromium::cleanupResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::CanvasLayerChromium): * platform/graphics/chromium/CanvasLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::WebGLLayerChromium): (WebCore::WebGLLayerChromium::pushPropertiesTo): * platform/graphics/chromium/WebGLLayerChromium.h: (WebCore::WebGLLayerChromium::textureId): (WebCore::WebGLLayerChromium::setTextureId): * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: (WebCore::CCCanvasLayerImpl::textureId): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::createAcceleratedCanvas): 2011-12-19 Mike Reed [skia] cache typeface in FontPlatformData https://bugs.webkit.org/show_bug.cgi?id=74415 Reviewed by Stephen White. No new tests. optimization only, existing tests in play * 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): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::setupPaintForFont): (WebCore::paintSkiaText): * platform/graphics/skia/SkiaFontWin.h: 2011-12-04 Robert Hogan CSS 2.1 failure: border-conflict-element-* https://bugs.webkit.org/show_bug.cgi?id=71244 Reviewed by Darin Adler. From http://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution : "When two adjacent cells have the same border-width and the same border-style in a 'border-collapse: collapse' table, then the color of the border from the leftmost cell wins (if the table's 'direction' is 'ltr'; right, if it is 'rtl') and the color of the border from the topmost cell wins." RenderTable manages collapsed borders by first creating a list of unique border values sorted in ascending priority. A unique border value is determined by style, width and color and cell-type precedence. For each entry in this list RenderTableSection paints each cell in its section starting at the top-left. If a cell is using the border RenderTable is currently iterating for, the cell will paint that border. The problems with this approach are: 1. Painting cells from the top-left to the bottom-right means that borders further to the right and to the bottom of the table will paint over those further to the left and the top, breaking the precedence due to cell position. 2. It creates more unique borders in the list than necessary. Borders that differ only on color do not need to be painted in a separate iteration. Precedence in such cases is determined by cell position. So in order to respect cell position when painting collapsed borders: 1. RenderTableCell now treats borders with the same style, width and precedence as equal. This results in a performance improvement on tables where collapsed borders differ only in color, since RenderTable is no longer painting every cell in the table for each unique collapsed border color. It also allows color to be a function of cell position rather than border type. 2. RenderTableSection now paints collapsed borders separately from cells and from the bottom-right to the top-left instead of top-left to bottom-right. If a collapsed border has precedence due to style, width or cell-group-type it will still be respected but precedence due to color is enforced by painting cells nearer to the top and left *after* cells nearer to the bottom and right. The order in which collapsed borders paint over each other in the same cell has not changed. Unlike Firefox, WebKit does not attempt render them as diagonals or attempt to give borders on the edge of the table precedence so that grooved and ridged styles have a smooth edge all round the table. This fixes the following failing tests from the border-conflict-element-* set in the CSS 2.1 test suite: border-conflict-element-001d.htm border-conflict-element-0037.htm border-conflict-element-0038.htm One test in the suite is known to be wrong, so a corrected version has been landed outside the css2.1 folder: border-conflict-element-002.htm This change entails rebaselining quite a few tests, see the LayoutTests ChangeLog for a full explanation of the rebaselines. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paint): (WebCore::addBorderStyle): (WebCore::compareBorderValuesForQSort): (WebCore::RenderTableCell::paintCollapsedBorders): * rendering/RenderTableCell.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintCell): (WebCore::RenderTableSection::paintObject): * rendering/style/CollapsedBorderValue.h: (WebCore::CollapsedBorderValue::isSameIgnoringColor): 2011-12-19 Jer Noble MediaController: cannot scrub while playing. https://bugs.webkit.org/show_bug.cgi?id=74870 rdar://problem/10602037 Reviewed by Eric Carlson. Updated media/media-controller-playback.html test. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setController): Change order of operations; set the controllers media element before passing controller to the controls. * html/MediaController.cpp: (MediaController::updatePlaybackState): Stop the playback clock when WAITING or ENDED. (MediaController::beginScrubbing): Stop the playback clock. (MediaController::endScrubbing): Restart (if necessary) the playback clock. (MediaController::canPlay): Return true if paused. * platform/mac/PlatformClockCA.cpp: (PlatformClockCA::setCurrentTime): Stop the CAClock before changing the current time. 2011-12-19 Adam Barth We don't pass all of the html5lib unsafe-text.dat tests https://bugs.webkit.org/show_bug.cgi?id=74825 Reviewed by Eric Seidel. This patch is actually three (tiny) related patches. Together these changes cause use to pass the plain-text-unsafe.dat tests from html5lib. Tests: html5lib/runner.html * html/parser/HTMLTokenizer.cpp: (WebCore::::shouldSkipNullCharacters): - We're not supposed to skip null characters in the PLAINTEXTState. This might cause compatibility problems with text/plain documents that contains NUL characters because we use the PLAINTEXTState to parse them. If we run into any trouble, it's easy to fix in TextDocumentParser. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::constructTreeFromToken): - Fix typo. (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken): - We're supposed to replace NUL characters if the next character token if we're in foreign content. The previous check didn't quite get this case correctly. (WebCore::HTMLTreeBuilder::processTokenInForeignContent): - Now that we replace NUL characters with the replacement character, we need to be more careful about the fact that replacement characters don't flip m_framesetOk to false. Note: This new check matches the check for non-foreign content. 2011-12-19 Adam Barth WebKit should support HTML entities that expand to more than one character https://bugs.webkit.org/show_bug.cgi?id=74826 Reviewed by Darin Adler. Tests: html5lib/runner.html * html/parser/HTMLEntityNames.in: - Add missing HTML entities from HTML5 spec. I'll sort this file in a followup patch. (It's not quite sorted perfectly and sorting in this patch would introduce noise into the patch.) * html/parser/HTMLEntityParser.cpp: (WebCore::decodeNamedEntity): - convertToUTF16 always returns true, so make it return void instead. - Teach the entity parse that some entities expand to two characters. * html/parser/HTMLEntityParser.h: - Add a warning that decodeNamedEntity is really a broken API. - This patch doesn't actually change any behavior of this API, but it does illustrate that the two callers of this API (the two XML parsers) really need to move a more sensible API. * html/parser/HTMLEntitySearch.cpp: (WebCore::HTMLEntitySearch::HTMLEntitySearch): (WebCore::HTMLEntitySearch::advance): * html/parser/HTMLEntitySearch.h: (WebCore::HTMLEntitySearch::fail): - Remove the concept of currentValue. This isn't really used for anything and conflicts with the idea that entities can expand to more than one character. * html/parser/HTMLEntityTable.h: - Add storage for two UChar32 values per entity. * html/parser/create-html-entity-table: (convert_value_to_int): - Teach this script to handle entities that expand to multiple Unicode characters. * xml/parser/CharacterReferenceParserInlineMethods.h: (WebCore::consumeCharacterReference): - Update this function now that convertToUTF16 returns void. * xml/parser/XMLCharacterReferenceParser.cpp: - The XML version of convertToUTF16 also needs to return void to match the HTML signature. (It used to return true all the time as well.) * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processHTMLEntity): - Update this caller use leftValue instead of value. My sense is that this code is moderately broken today because it's using HTML entities in parsing XML. I've added a FIXME. This code is disabled in all builds, so I don't feel a big need to fix this issue in this patch. We should either finish this project or delete this complexity from the project. 2011-12-19 Andreas Kling Avoid instantiating ScrollAnimators when possible. Reviewed by Beth Dakin. Have RenderLayer::scrollToOffset() check if we're scrolling to the already current offset. In that case, don't call down to scrollToOffsetWithoutAnimation(), avoiding the instantiation of a ScrollAnimator. This reduces memory consumption by 400 kB (on 32-bit) when viewing the full HTML5 spec on , since we were creating a ScrollAnimator for every single RenderLayer. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): 2011-12-19 Chris Guan [BlackBerry] remove one file related to multipart from the BlackBerry build system https://bugs.webkit.org/show_bug.cgi?id=74839 Reviewed by Daniel Bates. After refactored multipart, the code of MultipartResponseDelegate have been moved out of WebCore, we do not need to upstream MultipartResponseDelegate any more. So remove it from PlatformBlackBerry.cmake to update build system. * PlatformBlackBerry.cmake: 2011-12-15 Geoffrey Garen Placement new does an unnecessary NULL check https://bugs.webkit.org/show_bug.cgi?id=74676 Reviewed by Sam Weinig. * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::create): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateConstructorDeclaration): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::create): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::create): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::create): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::create): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.h: (JSC::RuntimeMethod::create): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): * dom/Document.h: (WebCore::FormElementKeyHashTraits::constructDeletedValue): Use NotNull placement new, as in JavaScriptCore. * platform/PODArena.h: (WebCore::PODArena::allocateObject): No need to check for NULL explicitly, since that's the built-in behavior of placement new. * platform/graphics/FontCache.cpp: (WebCore::FontDataCacheKeyTraits::constructDeletedValue): * platform/graphics/IntRectHash.h: * platform/graphics/IntSizeHash.h: More NotNull. * rendering/RenderObject.h: Declaring that we throw is the C++ way to say that operator new will not return NULL. 2011-12-19 Eric Carlson Render text tracks https://bugs.webkit.org/show_bug.cgi?id=62886 Reviewed by Sam Weinig. Test: media/track/track-cue-rendering.html * css/mediaControls.css: (video::-webkit-media-text-track-container): (video::-webkit-media-text-track-display): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_haveVisibleTextTrack. (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Trigger an update of the text track display. (WebCore::HTMLMediaElement::textTrackModeChanged): call configureTextTrackDisplay() so the text track display is hidden or shown when necessary. (WebCore::HTMLMediaElement::userIsInterestedInThisTrack): Minor cleanup. (WebCore::HTMLMediaElement::createMediaControls): configureMediaControls() always called reset after creating the controls, do it here instead. (WebCore::HTMLMediaElement::configureMediaControls): Simplify and cleanup. (WebCore::HTMLMediaElement::configureTextTrackDisplay): Show and hide text track display. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::currentlyVisibleCues): * html/shadow/MediaControlElements.cpp: (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement): New. (WebCore::RenderTextTrackContainerElement::layout): New. Call the display element so it can update the position and font size. (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): New. (WebCore::MediaControlTextTrackContainerElement::create): Ditto. (WebCore::MediaControlTextTrackContainerElement::createRenderer): Ditto. (WebCore::MediaControlTextTrackContainerElement::shadowPseudoId): Ditto. (WebCore::MediaControlTextTrackContainerElement::updateSizes): Keep the cue display element positioned above the bottom of the video box, and size the font according to the video height. (WebCore::MediaControlTextTrackDisplayElement::MediaControlTextTrackDisplayElement): New. (WebCore::MediaControlTextTrackDisplayElement::create): Ditto. (WebCore::MediaControlTextTrackDisplayElement::shadowPseudoId): Ditto. * html/shadow/MediaControlElements.h: (WebCore::MediaControlTextTrackContainerElement::displayType): (WebCore::MediaControlTextTrackDisplayElement::displayType): * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::MediaControlRootElement): New. (WebCore::MediaControlRootElement::setMediaController): Ditto. (WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto. * html/shadow/MediaControlRootElement.h: * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): New. (WebCore::MediaControlRootElement::createTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::showTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::hideTextTrackDisplay): Ditto. (WebCore::MediaControlRootElement::updateTextTrackDisplay): Ditto. * html/shadow/MediaControlRootElementChromium.h: * html/shadow/MediaControls.h: 2011-12-19 Eric Carlson Enable for Mac build https://bugs.webkit.org/show_bug.cgi?id=74838 Reviewed by Darin Adler. * Configurations/FeatureDefines.xcconfig: * bindings/generic/RuntimeEnabledFeatures.cpp: 2011-12-19 Kenneth Rohde Christiansen Make the Editor::setIgnoreCompositionSelectionChange public as it is needed by Qt Reviewed by Simon Hausmann. * editing/Editor.h: 2011-12-19 Alexander Pavlov Web Inspector: Implement CSS selector profiler backend https://bugs.webkit.org/show_bug.cgi?id=74603 Reviewed by Pavel Feldman. No new tests, as the changed code does not result in visible effects yet. * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::RuleMatchingStats::RuleMatchingStats): (WebCore::SelectorProfile::SelectorProfile): (WebCore::SelectorProfile::~SelectorProfile): (WebCore::SelectorProfile::totalMatchingTimeMs): (WebCore::SelectorProfile::startSelector): (WebCore::SelectorProfile::commitSelector): (WebCore::SelectorProfile::commitSelectorTime): (WebCore::SelectorProfile::toInspectorObject): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::restore): (WebCore::InspectorCSSAgent::startSelectorProfiler): (WebCore::InspectorCSSAgent::stopSelectorProfiler): (WebCore::InspectorCSSAgent::willMatchRule): (WebCore::InspectorCSSAgent::didMatchRule): (WebCore::InspectorCSSAgent::willProcessRule): (WebCore::InspectorCSSAgent::didProcessRule): * inspector/InspectorCSSAgent.h: 2011-12-19 Alexander Pavlov Web Inspector: Status bar button glyph for the "Record" buttons broken https://bugs.webkit.org/show_bug.cgi?id=74861 Reviewed by Pavel Feldman. * inspector/front-end/inspector.css: (.record-cpu-profile-status-bar-item .glyph, .record-profile-status-bar-item .glyph): (.record-cpu-profile-status-bar-item.toggled-on .glyph, .record-profile-status-bar-item.toggled-on .glyph): 2011-12-19 Pavel Feldman Web Inspector: only the first @rule is highlighted in CSS https://bugs.webkit.org/show_bug.cgi?id=74568 Reviewed by Timothy Hatcher. * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer.prototype.nextToken): * inspector/front-end/SourceCSSTokenizer.re2js: 2011-12-19 Ilya Tikhonovsky Web Inspector: Feature Request: Able to remove all breakpoints. https://bugs.webkit.org/show_bug.cgi?id=63055 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.removeAllBreakpoints): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.removeAllBreakpoints): 2011-12-19 Benjamin Poulain Build fix for ScrollingCoordinatorMac.mm when building on a case sensitive system Unreviewed build fix for r103180. StdlibExtras.h->StdLibExtras.h to compile on case sensitive system. * page/mac/ScrollingCoordinatorMac.mm: 2011-12-19 Kentaro Hara Remove unnecessary [JSCCustomGetter] IDLs from DOMWindow.idl https://bugs.webkit.org/show_bug.cgi?id=74829 Reviewed by Adam Barth. Now JSC has implemented the [Constructor] IDL and it generates getDOMConstructor() automatically. This patch removes hand-written unnecessary getDOMConstructor()s from JSDOMWindowCustom.cpp. No new tests. No change in behavior. * bindings/js/JSDOMWindowCustom.cpp: * page/DOMWindow.idl: 2011-12-19 Adam Barth The HTML parser doesn't enforce the "Noah's Ark condition" from the HTML5 spec https://bugs.webkit.org/show_bug.cgi?id=74828 Reviewed by Darin Adler. This patch implement the "Noah's Ark condition" from the HTML5 specification. This condition limits the number of identitical elements that can be in the list of active formatting elements. I'm not entirely sure that enforcing this condition is worth the complexity, but given that we've come this far in support of the HTML5 parsing algorithm, we might as well finish it. After this patch, we pass all but one of the html5lib parsing tests! Tests: html5lib/runner.html * html/parser/HTMLFormattingElementList.cpp: (WebCore::attributeCount): (WebCore::HTMLFormattingElementList::append): (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly): (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition): * html/parser/HTMLFormattingElementList.h: 2011-12-19 Benjamin Poulain Add support for 8 bits strings to Document::isValidName() https://bugs.webkit.org/show_bug.cgi?id=74784 Reviewed by Darin Adler. Avoid the conversion to 16bits when we are in the ASCII fast path, otherwise fallback to the Unicode testing in 16bits. * dom/Document.cpp: (WebCore::isValidNameASCII): (WebCore::Document::isValidName): 2011-12-18 Kentaro Hara REGRESSION(r101445): [JSC] Generated code for custom getters and setters with the [Supplemental] IDL is wrong https://bugs.webkit.org/show_bug.cgi?id=74837 Reviewed by Darin Adler. In bug 73162, we implemented the [Supplemental] IDL, but the generated code for custom getters and setters was wrong in JSC. This patch fixes CodeGeneratorJS.pm so that the result of WebCore/bindings/scripts/test/TestInterface.idl becomes as follows: Wrong: JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&) { JSTestInterface* castedThis = static_cast(asObject(slotBase)); return JSTestSupplemental::str3(castedThis, exec); } Correct: JSValue jsTestInterfaceStr3(ExecState* exec, JSValue slotBase, const Identifier&) { JSTestInterface* castedThis = static_cast(asObject(slotBase)); TestInterface* imp = static_cast(castedThis->impl()); return castedThis->str3(imp, exec); } Tests: bindings/scripts/test/JS/TestInterface.idl * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: Updated run-bindings-tests result. (WebCore::jsTestInterfaceStr3): (WebCore::setJSTestInterfaceStr3): * bindings/scripts/test/JS/JSTestInterface.h: Ditto. 2011-12-18 Adam Barth Fix typo in comment. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2011-12-18 Keishi Hattori Implement UI WebKit chromium part https://bugs.webkit.org/show_bug.cgi?id=65897 Reviewed by Darin Fisher. * GNUmakefile.list.am: Removed ColorChooser.cpp and added ColorChooserClient.h * WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h * WebCore.xcodeproj/project.pbxproj: Removed ColorChooser.cpp and added ColorChooserClient.h 2011-12-18 David Barton , , , and baseline positions are wrong https://bugs.webkit.org/show_bug.cgi?id=72821 Reviewed by Darin Adler. Tested by rebaselining 8 existing tests. (Pardon the pun.) * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::baselinePosition): Just using the base's (these puns are not my fault) baseline did not leave room for the exponent. * rendering/mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::baselinePosition): Added a guard condition, and removed some bad lines apparently mistakenly copied from RenderMathMLSubSup.cpp. 2011-12-18 Luke Macpherson Implement CSS line-height property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74561 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::isNumber): * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyLineHeight::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-12-18 Luke Macpherson Implement CSS outline shorthand property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74467 Reviewed by Andreas Kling. No new tests / refactoring only. RenderStyle::resetOutline was removed in favor of explicity expanding to the initial values of the shorthand expansion. This improves consistency because the initial values to use are more clearly (and singularly) defined. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: 2011-12-18 Sheriff Bot Unreviewed, rolling out r103205. http://trac.webkit.org/changeset/103205 https://bugs.webkit.org/show_bug.cgi?id=74833 There are valid characters above 0x80 when the string is 8bits (Requested by benjaminp on #webkit). * dom/Document.cpp: (WebCore::isValidNameASCII): (WebCore::Document::isValidName): 2011-12-18 Luke Macpherson Separate box alignment and box pack values into separate enums. https://bugs.webkit.org/show_bug.cgi?id=74580 Reviewed by Andreas Kling. 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-18 Luke Macpherson Implement CSS font-size property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74368 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyFontSize::largerFontSize): (WebCore::ApplyPropertyFontSize::smallerFontSize): (WebCore::ApplyPropertyFontSize::applyInheritValue): (WebCore::ApplyPropertyFontSize::applyInitialValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontSize::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::hasParentNode): 2011-12-18 Sheriff Bot Unreviewed, rolling out r103199. http://trac.webkit.org/changeset/103199 https://bugs.webkit.org/show_bug.cgi?id=74832 Caused a bot crashiness extravaganza! (Requested by kling on #webkit). * platform/KURL.cpp: (WebCore::isLetterMatchIgnoringCase): (WebCore::protocolIs): 2011-12-18 Dan Bernstein Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout-after-image-load.html https://bugs.webkit.org/show_bug.cgi?id=67759 Reviewed by Darin Adler. Test: fast/block/positioning/positioned-float-layout-after-image-load.html Positioned floats are both floating and positioned. Made the following functions treat them as positioned rather than as floats by reordering code. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::skipTrailingWhitespace): (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace): (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-12-18 Benjamin Poulain Add support for 8 bits strings to Document::isValidName() https://bugs.webkit.org/show_bug.cgi?id=74784 Reviewed by Andreas Kling. The valid name has a fast path for ASCII, and a slow path taking Unicode characters into account. For 8-bit strings, we don't need to take the non-ASCII path as it could never succeed if the ASCII path didn't. * dom/Document.cpp: (WebCore::isValidNameASCII): (WebCore::Document::isValidName): 2011-12-18 Huang Dongsung [Qt] Remove redundant m_glWidget->makeCurrent() calls in GraphicsContext3DQt. https://bugs.webkit.org/show_bug.cgi?id=73814 It causes a performance hit. Moved the redundant function calls to makeContextCurrent(). Reviewed by Noam Rosenthal. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): (WebCore::GraphicsContext3DPrivate::paint): (WebCore::GraphicsContext3DPrivate::makeCurrentIfNeeded): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::activeTexture): (WebCore::GraphicsContext3D::attachShader): (WebCore::GraphicsContext3D::getAttachedShaders): (WebCore::GraphicsContext3D::bindAttribLocation): (WebCore::GraphicsContext3D::bindBuffer): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::bindRenderbuffer): (WebCore::GraphicsContext3D::bindTexture): (WebCore::GraphicsContext3D::blendColor): (WebCore::GraphicsContext3D::blendEquation): (WebCore::GraphicsContext3D::blendEquationSeparate): (WebCore::GraphicsContext3D::blendFunc): (WebCore::GraphicsContext3D::blendFuncSeparate): (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::bufferSubData): (WebCore::GraphicsContext3D::checkFramebufferStatus): (WebCore::GraphicsContext3D::clearColor): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::clearDepth): (WebCore::GraphicsContext3D::clearStencil): (WebCore::GraphicsContext3D::colorMask): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::compressedTexImage2D): (WebCore::GraphicsContext3D::compressedTexSubImage2D): (WebCore::GraphicsContext3D::copyTexImage2D): (WebCore::GraphicsContext3D::copyTexSubImage2D): (WebCore::GraphicsContext3D::cullFace): (WebCore::GraphicsContext3D::depthFunc): (WebCore::GraphicsContext3D::depthMask): (WebCore::GraphicsContext3D::depthRange): (WebCore::GraphicsContext3D::detachShader): (WebCore::GraphicsContext3D::disable): (WebCore::GraphicsContext3D::disableVertexAttribArray): (WebCore::GraphicsContext3D::drawArrays): (WebCore::GraphicsContext3D::drawElements): (WebCore::GraphicsContext3D::enable): (WebCore::GraphicsContext3D::enableVertexAttribArray): (WebCore::GraphicsContext3D::finish): (WebCore::GraphicsContext3D::flush): (WebCore::GraphicsContext3D::framebufferRenderbuffer): (WebCore::GraphicsContext3D::framebufferTexture2D): (WebCore::GraphicsContext3D::frontFace): (WebCore::GraphicsContext3D::generateMipmap): (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::getActiveUniform): (WebCore::GraphicsContext3D::getAttribLocation): (WebCore::GraphicsContext3D::getError): (WebCore::GraphicsContext3D::getString): (WebCore::GraphicsContext3D::hint): (WebCore::GraphicsContext3D::isBuffer): (WebCore::GraphicsContext3D::isEnabled): (WebCore::GraphicsContext3D::isFramebuffer): (WebCore::GraphicsContext3D::isProgram): (WebCore::GraphicsContext3D::isRenderbuffer): (WebCore::GraphicsContext3D::isShader): (WebCore::GraphicsContext3D::isTexture): (WebCore::GraphicsContext3D::lineWidth): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::pixelStorei): (WebCore::GraphicsContext3D::polygonOffset): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::sampleCoverage): (WebCore::GraphicsContext3D::scissor): (WebCore::GraphicsContext3D::shaderSource): (WebCore::GraphicsContext3D::stencilFunc): (WebCore::GraphicsContext3D::stencilFuncSeparate): (WebCore::GraphicsContext3D::stencilMask): (WebCore::GraphicsContext3D::stencilMaskSeparate): (WebCore::GraphicsContext3D::stencilOp): (WebCore::GraphicsContext3D::stencilOpSeparate): (WebCore::GraphicsContext3D::texParameterf): (WebCore::GraphicsContext3D::texParameteri): (WebCore::GraphicsContext3D::uniform1f): (WebCore::GraphicsContext3D::uniform1fv): (WebCore::GraphicsContext3D::uniform2f): (WebCore::GraphicsContext3D::uniform2fv): (WebCore::GraphicsContext3D::uniform3f): (WebCore::GraphicsContext3D::uniform3fv): (WebCore::GraphicsContext3D::uniform4f): (WebCore::GraphicsContext3D::uniform4fv): (WebCore::GraphicsContext3D::uniform1i): (WebCore::GraphicsContext3D::uniform1iv): (WebCore::GraphicsContext3D::uniform2i): (WebCore::GraphicsContext3D::uniform2iv): (WebCore::GraphicsContext3D::uniform3i): (WebCore::GraphicsContext3D::uniform3iv): (WebCore::GraphicsContext3D::uniform4i): (WebCore::GraphicsContext3D::uniform4iv): (WebCore::GraphicsContext3D::uniformMatrix2fv): (WebCore::GraphicsContext3D::uniformMatrix3fv): (WebCore::GraphicsContext3D::uniformMatrix4fv): (WebCore::GraphicsContext3D::useProgram): (WebCore::GraphicsContext3D::validateProgram): (WebCore::GraphicsContext3D::vertexAttrib1f): (WebCore::GraphicsContext3D::vertexAttrib1fv): (WebCore::GraphicsContext3D::vertexAttrib2f): (WebCore::GraphicsContext3D::vertexAttrib2fv): (WebCore::GraphicsContext3D::vertexAttrib3f): (WebCore::GraphicsContext3D::vertexAttrib3fv): (WebCore::GraphicsContext3D::vertexAttrib4f): (WebCore::GraphicsContext3D::vertexAttrib4fv): (WebCore::GraphicsContext3D::vertexAttribPointer): (WebCore::GraphicsContext3D::viewport): (WebCore::GraphicsContext3D::getBooleanv): (WebCore::GraphicsContext3D::getBufferParameteriv): (WebCore::GraphicsContext3D::getFloatv): (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): (WebCore::GraphicsContext3D::getIntegerv): (WebCore::GraphicsContext3D::getProgramiv): (WebCore::GraphicsContext3D::getProgramInfoLog): (WebCore::GraphicsContext3D::getRenderbufferParameteriv): (WebCore::GraphicsContext3D::getShaderiv): (WebCore::GraphicsContext3D::getShaderInfoLog): (WebCore::GraphicsContext3D::getShaderSource): (WebCore::GraphicsContext3D::getTexParameterfv): (WebCore::GraphicsContext3D::getTexParameteriv): (WebCore::GraphicsContext3D::getUniformfv): (WebCore::GraphicsContext3D::getUniformiv): (WebCore::GraphicsContext3D::getUniformLocation): (WebCore::GraphicsContext3D::getVertexAttribfv): (WebCore::GraphicsContext3D::getVertexAttribiv): (WebCore::GraphicsContext3D::getVertexAttribOffset): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::texSubImage2D): (WebCore::GraphicsContext3D::createBuffer): (WebCore::GraphicsContext3D::createFramebuffer): (WebCore::GraphicsContext3D::createProgram): (WebCore::GraphicsContext3D::createRenderbuffer): (WebCore::GraphicsContext3D::createShader): (WebCore::GraphicsContext3D::createTexture): (WebCore::GraphicsContext3D::deleteBuffer): (WebCore::GraphicsContext3D::deleteFramebuffer): (WebCore::GraphicsContext3D::deleteProgram): (WebCore::GraphicsContext3D::deleteRenderbuffer): (WebCore::GraphicsContext3D::deleteShader): (WebCore::GraphicsContext3D::deleteTexture): 2011-12-18 Andreas Kling Removing unrelated printf() that slipped into my last commit. * platform/ScrollableArea.cpp: (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation): 2011-12-18 Andreas Kling KURL::protocolIs() should handle 8-bit strings. Reviewed by Antti Koivisto. * platform/KURL.cpp: (WebCore::isLetterMatchIgnoringCase): Turned this into a template method so it can be used for both UChar and LChar. (WebCore::charactersAreProtocol): (WebCore::protocolIs): Handle 8/16 bit strings separately to avoid conversion. 2011-12-18 Alice Boxhall Make AccessibilityObject::lineForPosition return the correct value for cases where the position is not within the current object. https://bugs.webkit.org/show_bug.cgi?id=71348 Reviewed by Chris Fleizach. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::lineForPosition): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 2011-12-18 Sam Weinig Make EventHandler::handleWheelEvent take const PlatformWheelEvent& https://bugs.webkit.org/show_bug.cgi?id=74824 Reviewed by Anders Carlsson. * WebCore.exp.in: * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEvent): * page/EventHandler.h: * page/blackberry/EventHandlerBlackBerry.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/efl/EventHandlerEfl.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/gtk/EventHandlerGtk.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passWheelEventToWidget): * page/qt/EventHandlerQt.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/win/EventHandlerWin.cpp: (WebCore::EventHandler::passWheelEventToWidget): * page/wx/EventHandlerWx.cpp: (WebCore::EventHandler::passWheelEventToWidget): * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::copyTurningVerticalTicksIntoHorizontalTicks): 2011-12-18 James Kozianski [chromium] Add worldId parameter to allowScriptExtension() https://bugs.webkit.org/show_bug.cgi?id=74214 Chromium uses the worldId to determine what extension is running in a v8 context and knowing that at the time allowScriptExtension() is called allows us to conditionally inject extension APIs. Reviewed by Darin Fisher. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::initContextIfNeeded): (WebCore::V8DOMWindowShell::createNewContext): * bindings/v8/V8DOMWindowShell.h: * bindings/v8/V8IsolatedContext.cpp: (WebCore::V8IsolatedContext::V8IsolatedContext): * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::allowScriptExtension): * loader/FrameLoaderClient.h: 2011-12-18 Adam Barth Adoption agency iteration limits in HTML parser don't match HTML5 spec https://bugs.webkit.org/show_bug.cgi?id=74822 Reviewed by Eric Seidel. Previously, we were using the iteration limits from the old tree builder. Now we use the iteration limits from the HTML5 specification. Tests: html5lib/runner.html * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2011-12-18 Antti Koivisto https://bugs.webkit.org/show_bug.cgi?id=73954 REGRESSION (r97745): Transitions don't work on links Reviewed by Andreas Kling. Test: transitions/visited-link-color.html Since visited link colors are now part of the RenderStyle, they need to be transitioned along with the corresponding regular colors. * page/animation/AnimationBase.cpp: (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): (WebCore::PropertyWrapperVisitedAffectedColor::equals): (WebCore::PropertyWrapperVisitedAffectedColor::blend): (WebCore::AnimationBase::ensurePropertyMap): Add new wrapper class that applies both regular and visited color. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::visitedLinkColor): (WebCore::InheritedFlags::visitedLinkBackgroundColor): (WebCore::InheritedFlags::visitedLinkBorderLeftColor): (WebCore::InheritedFlags::visitedLinkBorderRightColor): (WebCore::InheritedFlags::visitedLinkBorderBottomColor): (WebCore::InheritedFlags::visitedLinkBorderTopColor): (WebCore::InheritedFlags::visitedLinkOutlineColor): (WebCore::InheritedFlags::visitedLinkColumnRuleColor): (WebCore::InheritedFlags::visitedLinkTextEmphasisColor): (WebCore::InheritedFlags::visitedLinkTextFillColor): (WebCore::InheritedFlags::visitedLinkTextStrokeColor): Add accessors. * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Opportunistic fix. Don't know how to test. 2011-12-18 Anders Carlsson Set the main frame view scroll position asynchronously https://bugs.webkit.org/show_bug.cgi?id=74823 Reviewed by Sam Weinig. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::ScrollingCoordinator): Initialize m_didDispatchDidUpdateMainFrameScrollPosition to false. (WebCore::ScrollingCoordinator::didUpdateMainFrameScrollPosition): Get the scroll position, reset m_didDispatchDidUpdateMainFrameScrollPosition to false and then call FrameView::setScrollOffset to update the scroll position. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::scrollByOnScrollingThread): Update the scroll position and dispatch ScrollingCoordinator::didUpdateMainFrameScrollPosition on the main thread if needed. 2011-12-18 Andreas Kling JSC/HTMLCollection: Optimize canGetItemsForName(). Reviewed by Sam Weinig. Add HTMLCollection::hasNamedItem(name) and use that in the JSC bindings' canGetItemsForName() instead of fetching the list of named items just to check if it's empty or not. * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::JSHTMLAllCollection::canGetItemsForName): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::canGetItemsForName): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::hasNamedItem): * html/HTMLCollection.h: 2011-12-18 Sam Weinig Spruce up PlatformWheelEvent a bit https://bugs.webkit.org/show_bug.cgi?id=74821 Reviewed by Dan Bernstein. * dom/WheelEvent.cpp: (WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator): * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::directionInvertedFromDevice): Remove x/y getters in favor of direct access to the IntPoints, and rename webkitDirectionInvertedFromDevice() to directionInvertedFromDevice() since it is not an exposed API. 2011-12-18 Anders Carlsson Scroll the main frame on the scrolling thread https://bugs.webkit.org/show_bug.cgi?id=74820 Reviewed by Andreas Kling. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::handleWheelEvent): Compute a scroll offset from the wheel event and tell the scrolling thread to scroll by the given offset. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinator::scrollByOnScrollingThread): Clamp the updated position to the minimum and maximum scrollable position. (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPositionOnScrollingThread): Actually reposition the layer. 2011-12-18 Andreas Kling HTMLAllCollection: Get rid of stateful namedItem traversal. Reviewed by Sam Weinig. Add a namedItemWithIndex() function to HTMLAllCollection to cover the document.all(name, index) use-case. This moves the collection traversal into WebCore and allows us to remove some complexity. This incidentally fixes a bug where the CollectionCache would point to the last node returned by document.all(name, index) without the correct associated node index (because info()->current was getting set without updating info()->position.) Added a layout test for that. Test: fast/dom/htmlallcollection-call-with-index-caching-bug.html * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::callHTMLAllCollection): * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: (WebCore::V8HTMLAllCollection::callAsFunctionCallback): Replace collection traversal by calls to namedItemWithIndex(). * html/HTMLCollection.h: Promoted updateNameCache() to protected (for HTMLAllCollection.) Demoted checkForNameMatch() to private. * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::namedItemWithIndex): Added for document.all(name, index). Uses the name/id cache. * html/HTMLAllCollection.cpp: * html/HTMLAllCollection.h: (WebCore::HTMLAllCollection::HTMLAllCollection): Removed m_idsDone, HTMLAllCollection is now stateless. 2011-12-18 Anders Carlsson The scrolling coordinator should know about the main frame scroll layer https://bugs.webkit.org/show_bug.cgi?id=74817 Reviewed by Andreas Kling. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingThread::threadCallback): Move the * to where it belongs. (WebCore::ScrollingCoordinator::setFrameScrollLayer): Keep track of the underlying CALayer of the frame scroll layer. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::ensureRootLayer): Call ScrollingCoordinator::setFrameScrollLayer. 2011-12-18 Andreas Kling Interacting with GMail message lists is sluggish. Reviewed by Dan Bernstein. Add an argument to collapsed*Border() to control whether the border color is computed or not. This allows us to avoid expensive work when we're only interested in the metrics. RenderStyle::visitedDependentColor() was very hot (4.5%) when hit-testing on GMail and this removes its usage altogether. This should be an improvement for table rendering as well, since it was all happening below RenderBox::overflowClipRect(). * rendering/RenderTableCell.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::collapsedLeftBorder): (WebCore::RenderTableCell::collapsedRightBorder): (WebCore::RenderTableCell::collapsedTopBorder): (WebCore::RenderTableCell::collapsedBottomBorder): Add and propagate an IncludeBorderColorOrNot argument that decides whether we compute the CollapsedBorderValue's color. (WebCore::RenderTableCell::collapsedStartBorder): (WebCore::RenderTableCell::collapsedEndBorder): Renamed start & end to startColorProperty & endColorProperty for clarity. Also same modifications as the above functions. (WebCore::RenderTableCell::collapsedBeforeBorder): (WebCore::RenderTableCell::collapsedAfterBorder): Renamed before & after to beforeColorProperty & afterColorProperty for clarity. Also same modifications as the above functions. (WebCore::RenderTableCell::borderHalfStart): (WebCore::RenderTableCell::borderHalfEnd): (WebCore::RenderTableCell::borderHalfBefore): (WebCore::RenderTableCell::borderHalfAfter): Pass DoNotIncludeBorderColor to collapsed*Border() since we only care about the metrics here. 2011-12-18 Anders Carlsson The scrolling coordinator should keep track of the main frame geometry https://bugs.webkit.org/show_bug.cgi?id=74816 Reviewed by Andreas Kling. * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::syncFrameGeometry): Update the frame geometry accordingly when it changes. * page/ScrollingCoordinator.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): (WebCore::RenderLayerCompositor::updateRootLayerPosition): Call ScrollingCoordinator::syncFrameGeometry. (WebCore::RenderLayerCompositor::scrollingCoordinator): Add new getter. 2011-12-17 Sam Weinig Move timestamp down from PlatformEvent subclasses to the base class https://bugs.webkit.org/show_bug.cgi?id=74805 Reviewed by Anders Carlsson. * platform/PlatformEvent.h: (WebCore::PlatformEvent::type): (WebCore::PlatformEvent::timestamp): (WebCore::PlatformEvent::PlatformEvent): * platform/PlatformGestureEvent.h: (WebCore::PlatformGestureEvent::PlatformGestureEvent): * platform/PlatformMouseEvent.h: (WebCore::PlatformMouseEvent::PlatformMouseEvent): (WebCore::PlatformMouseEvent::clickCount): * platform/PlatformTouchEvent.h: (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/efl/PlatformKeyboardEventEfl.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/efl/PlatformMouseEventEfl.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/efl/PlatformTouchEventEfl.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/efl/PlatformWheelEventEfl.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/gtk/PlatformKeyboardEventGtk.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/gtk/PlatformWheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/mac/PlatformMouseEventMac.mm: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/qt/WheelEventQt.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/win/KeyEventWin.cpp: (WebCore::singleCharacterString): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/win/PlatformMouseEventWin.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/win/WheelEventWin.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/wx/KeyboardEventWx.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/wx/MouseEventWx.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/wx/MouseWheelEventWx.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2011-12-18 Anders Carlsson Add a scrolling thread to the scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=74814 Reviewed by Andreas Kling. * WebCore.exp.in: Export ScrollingCoordinator::handleWheelEvent. * WebCore.xcodeproj/project.pbxproj: Add ScrollingCoordinatorMac.mm * page/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::handleWheelEvent): Add a stub function. * page/ScrollingCoordinator.h: * page/mac/ScrollingCoordinatorMac.mm: Added. Add a ScrollingThread object which creates a thread and attaches a run loop source to it, allowing for functions to be dispatched and run on said thread. (WebCore::ScrollingCoordinator::isScrollingThread): Call ScrollingThread::isCurrentThread. (WebCore::ScrollingCoordinator::dispatchOnScrollingThread): Call ScrollingThread::dispatch. 2011-12-18 Anders Carlsson EventDispatcher should keep track of all scrolling coordinators https://bugs.webkit.org/show_bug.cgi?id=74810 Reviewed by Andreas Kling. Export symbols needed by WebKit2. * WebCore.exp.in: 2011-12-18 Raul Hudea Add transform function completion to web-inspector Web Inspector: Auto-complete transform functions for -webkit-transform https://bugs.webkit.org/show_bug.cgi?id=74730 Reviewed by Pavel Feldman. No new test. Trivial change. * inspector/front-end/CSSKeywordCompletions.js: 2011-12-18 Ilya Tikhonovsky Web Inspector: chromium profiler: change default root type for retaining paths from GC Roots to DOMWindow. https://bugs.webkit.org/show_bug.cgi?id=74697 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype.get isTracingToWindowObjects): 2011-12-18 Peter Rybin Web Inspector: Switch to type-safe JSON ConsoleMessage.cpp, InspectorDOMAgent.cpp, InspectorDebuggerAgent.cpp, ScriptCallFrame.cpp https://bugs.webkit.org/show_bug.cgi?id=74549 Reviewed by Pavel Feldman. Work with InspectorObject is replaced with type-safe generated API usage. Inspector.json and Inspector-0.1.json are also changed to better reflect data types that are actually being transmitted. * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::addToFrontend): * inspector/Inspector-0.1.json: * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForNode): (WebCore::InspectorDOMAgent::buildObjectForEventListener): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::resolveBreakpoint): * inspector/ScriptCallFrame.cpp: (WebCore::ScriptCallFrame::buildInspectorObject): 2011-12-18 Peter Rybin Web Inspector: CodeGeneratorInspector.py: use generated types in method parameters https://bugs.webkit.org/show_bug.cgi?id=74661 Reviewed by Pavel Feldman. Type binding object is added to raw_type object. * inspector/CodeGeneratorInspector.py: (TypeBindings.create_for_named_type_declaration.EnumBinding.generate_type_builder): (TypeBindings.create_for_named_type_declaration.EnumBinding.get_in_c_type_text): (TypeBindings.create_for_named_type_declaration.EnumBinding): (TypeBindings.create_for_named_type_declaration.EnumBinding.reduce_to_raw_type): (TypeBindings.create_for_named_type_declaration.PlainString.generate_type_builder): (TypeBindings.create_for_named_type_declaration.PlainString.reduce_to_raw_type): (TypeBindings.create_for_named_type_declaration.PlainString): (TypeBindings.create_for_named_type_declaration.PlainString.get_in_c_type_text): (TypeBindings): (TypeBindings.create_for_named_type_declaration.ClassBinding): (get_in_c_type_text): (reduce_to_raw_type): (PlainObjectBinding.generate_type_builder): (PlainObjectBinding.get_in_c_type_text): (PlainObjectBinding): (PlainObjectBinding.reduce_to_raw_type): (RawTypesBinding.generate_type_builder): (RawTypesBinding.get_in_c_type_text): (RawTypesBinding): (RawTypesBinding.reduce_to_raw_type): (resolve_param_type.RawTypeBinding.reduce_to_raw_type): (resolve_param_type.RawTypeBinding): (resolve_param_type.RawTypeBinding.get_in_c_type_text): (resolve_param_type): (Generator.process_event): 2011-12-18 Sheriff Bot Unreviewed, rolling out r103169. http://trac.webkit.org/changeset/103169 https://bugs.webkit.org/show_bug.cgi?id=74809 it broke compilation on many platforms (Requested by loislo_ on #webkit). * WebCore.gypi: * platform/ColorChooser.cpp: Renamed from Source/WebKit/chromium/src/ColorChooserProxy.h. (WebCore::ColorChooserClient::~ColorChooserClient): (WebCore::ColorChooserClient::newColorChooser): (WebCore::ColorChooserClient::discardChooser): (WebCore::ColorChooser::ColorChooser): (WebCore::ColorChooser::create): (WebCore::ColorChooser::~ColorChooser): (WebCore::ColorChooser::didChooseColor): (WebCore::ColorChooser::didCleanup): 2011-12-18 Alexandru Chiculita [CSS Shaders] Add FECustomFilter that renders custom filters https://bugs.webkit.org/show_bug.cgi?id=73317 Using a GraphicsContext3D to render the shaders in GPU, read the result back and use it in the software filters pipeline. Reviewed by Chris Marrin. Test: css3/filters/effect-custom.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/cache/CachedShader.cpp: (WebCore::CachedShader::CachedShader): (WebCore::CachedShader::shaderString): (WebCore::CachedShader::data): * loader/cache/CachedShader.h: * platform/graphics/filters/CustomFilterMesh.cpp: Added. (WebCore::MeshGenerator::MeshGenerator): (WebCore::MeshGenerator::vertices): (WebCore::MeshGenerator::indices): (WebCore::MeshGenerator::points): (WebCore::MeshGenerator::pointsCount): (WebCore::MeshGenerator::tiles): (WebCore::MeshGenerator::tilesCount): (WebCore::MeshGenerator::indicesCount): (WebCore::MeshGenerator::floatsPerVertex): (WebCore::MeshGenerator::vertexCount): (WebCore::MeshGenerator::addTile): (WebCore::MeshGenerator::addAttachedMeshIndex): (WebCore::MeshGenerator::generateAttachedMesh): (WebCore::MeshGenerator::addDetachedMeshVertexAndIndex): (WebCore::MeshGenerator::generateDetachedMesh): (WebCore::MeshGenerator::addPositionAttribute): (WebCore::MeshGenerator::addTexCoordAttribute): (WebCore::MeshGenerator::addMeshCoordAttribute): (WebCore::MeshGenerator::addTriangleCoordAttribute): (WebCore::MeshGenerator::addAttachedMeshVertexAttributes): (WebCore::MeshGenerator::addDetachedMeshVertexAttributes): (WebCore::MeshGenerator::dumpBuffers): (WebCore::CustomFilterMesh::CustomFilterMesh): (WebCore::CustomFilterMesh::~CustomFilterMesh): * platform/graphics/filters/CustomFilterMesh.h: Added. (WebCore::CustomFilterMesh::create): (WebCore::CustomFilterMesh::verticesBufferObject): (WebCore::CustomFilterMesh::bytesPerVertex): (WebCore::CustomFilterMesh::elementsBufferObject): (WebCore::CustomFilterMesh::indicesCount): (WebCore::CustomFilterMesh::meshBox): (WebCore::CustomFilterMesh::meshType): * platform/graphics/filters/CustomFilterShader.cpp: Added. (WebCore::CustomFilterShader::defaultVertexShaderString): (WebCore::CustomFilterShader::defaultFragmentShaderString): (WebCore::CustomFilterShader::CustomFilterShader): (WebCore::CustomFilterShader::~CustomFilterShader): * platform/graphics/filters/CustomFilterShader.h: Added. * platform/graphics/filters/FECustomFilter.cpp: Added. (WebCore::orthoMatrix): (WebCore::FECustomFilter::FECustomFilter): (WebCore::FECustomFilter::create): (WebCore::FECustomFilter::platformApplySoftware): (WebCore::FECustomFilter::dump): (WebCore::FECustomFilter::externalRepresentation): * platform/graphics/filters/FECustomFilter.h: Added. * platform/graphics/gpu/Texture.cpp: * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::toColumnMajorFloatArray): * platform/graphics/transforms/TransformationMatrix.h: * rendering/FilterEffectObserver.h: Copied from Source/WebCore/loader/cache/CachedShader.cpp. (WebCore::FilterEffectObserver::~FilterEffectObserver): * rendering/FilterEffectRenderer.cpp: (WebCore::isWebGLEnabled): (WebCore::FilterEffectRenderer::FilterEffectRenderer): (WebCore::FilterEffectRenderer::build): (WebCore::FilterEffectRenderer::notifyFinished): * rendering/FilterEffectRenderer.h: (WebCore::FilterEffectRenderer::create): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterEffect): (WebCore::RenderLayer::filterNeedsRepaint): * rendering/RenderLayer.h: * rendering/style/StyleCachedShader.h: (WebCore::StyleCachedShader::cachedShader): * rendering/style/StyleShader.h: (WebCore::StyleShader::cachedShader): 2011-12-18 Keishi Hattori Implement UI WebKit chromium part https://bugs.webkit.org/show_bug.cgi?id=65897 Reviewed by Darin Fisher. * WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h 2011-12-17 Keishi Hattori Refactor input type color WebCore part https://bugs.webkit.org/show_bug.cgi?id=74591 Reviewed by Kent Tamura. Changing ColorChooser to address issues raised in Bug 65897. Chrome::createColorChooser will return a WebCore::ColorChooser instance so the WebCore side (ColorInputType) and call the WebKit side. We pass the ColorChooserClient as an argument to Chrome::createColorChooser so the WebKit side can call callbacks, didEndChooser and didChooseColor. * html/ColorInputType.cpp: (WebCore::ColorInputType::~ColorInputType): (WebCore::ColorInputType::setValue): (WebCore::ColorInputType::handleDOMActivateEvent): Calls createColorChooser to open the color chooser. (WebCore::ColorInputType::detach): (WebCore::ColorInputType::didEndChooser): Release the ColorChooser object. (WebCore::ColorInputType::endColorChooser): (WebCore::ColorInputType::updateColorSwatch): Added argument so it will compile again. * html/ColorInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::selectColorInColorChooser): * loader/EmptyClients.h: (WebCore::EmptyChromeClient::createColorChooser): * loader/FrameLoader.cpp: * page/Chrome.cpp: (WebCore::Chrome::createColorChooser): Opens the color chooser. Returns a ColorChooser PassOwnPtr. * page/Chrome.h: * page/ChromeClient.h: * platform/ColorChooser.h: (WebCore::ColorChooser::~ColorChooser): (WebCore::ColorChooser::setSelectedColor): (WebCore::ColorChooser::endChooser): * platform/ColorChooserClient.h: Added. 2011-12-17 Sam Weinig Make PlatformTouchEvent inherit from PlatformEvent https://bugs.webkit.org/show_bug.cgi?id=74777 Reviewed by Andreas Kling. * platform/PlatformEvent.h: Add TouchEvent types. * platform/PlatformTouchEvent.h: (WebCore::PlatformTouchEvent::PlatformTouchEvent): Make inherit from PlatformEvent. * platform/blackberry/PlatformTouchEventBlackBerry.cpp: (WebCore::touchEventType): (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/efl/PlatformTouchEventEfl.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/qt/PlatformTouchEventQt.cpp: (WebCore::PlatformTouchEvent::PlatformTouchEvent): Make necessary changes to work with new base class. 2011-12-17 Andreas Kling Cache and reuse the HTMLAllCollection returned by document.all. Reviewed by Antti Koivisto. Let Document cache the document.all collection, just like we do for the other collections (.links, .images, etc.) This is primarily a memory optimization, as repeated calls to document.all will no longer cause collection objects to stack up. Tests: fast/dom/document-collection-idempotence.html fast/dom/gc-9.html * dom/Document.h: * dom/Document.cpp: (WebCore::Document::all): Cache the HTMLAllCollection and reuse it across calls instead of creating a new one each time. * html/HTMLAllCollection.h: * html/HTMLAllCollection.cpp: (WebCore::HTMLAllCollection::create): (WebCore::HTMLAllCollection::HTMLAllCollection): Make the HTMLAllCollection constructor take a Document* to enforce the fact that it's the only way it should ever be created. * html/HTMLAllCollection.idl: * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Custom reachability code for JSC, same as HTMLCollection. 2011-12-17 Andreas Kling HTMLCollection: Simplify itemAfter(). Reviewed by Antti Koivisto. Whether to do deep traversal of children depends on m_type which doesn't change after construction, so move that decision there by caching it in a "m_includeChildren" bit. Also factored out the big switch statement in itemAfter() into an isAcceptableElement() function. Last and least, use fastHasAttribute() to check for itempropAttr since it's not SVG animatable. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::HTMLCollection::shouldIncludeChildren): (WebCore::HTMLCollection::isAcceptableElement): (WebCore::HTMLCollection::itemAfter): * html/HTMLCollection.h: 2011-12-17 Andreas Kling TagNodeList: Optimize nodeMatches() for the common case. Reviewed by Antti Koivisto. Reject based on tag name mismatch before comparing the namespaces, as this case is vastly more common. nodeMatches() is very hot on the DOM Query (Dojo) test on Dromaeo. This change takes it from 8.3% to 7.7% on my MBP. * dom/TagNodeList.cpp: (WebCore::TagNodeList::nodeMatches): 2011-12-17 Andreas Kling NameNodeList: Use fastGetAttribute() in nodeMatches(). Reviewed by Darin Adler. It's safe and slightly more efficient to use fastGetAttribute() for HTMLNames::nameAttr here. * dom/NameNodeList.cpp: (WebCore::NameNodeList::nodeMatches): 2011-12-17 Andreas Kling CSSPrimitiveValue: Inline getIdent(). Reviewed by Antti Koivisto. Inline the trivial getIdent(), the same as its getFoo() siblings. * css/CSSPrimitiveValue.cpp: * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::getIdent): 2011-12-17 Andreas Kling CSSStyleSelector: Clean up matchRules(). Reviewed by Antti Koivisto. - Early return from the isCollectingRulesOnly() path to reduce nesting. - Move the creation of m_ruleList out of the loop that builds the list. - Removed some comments from the Captain Obvious department. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchRules): 2011-12-17 Andreas Kling RuleSet: Remove style sheet null-check in addRulesFromSheet(). Reviewed by Antti Koivisto. Replace the "sheet" null-check in addRulesFromSheet() by an assertion. The only call-site where it could be null was when adding rules from an @import'ed sheet, so add a check there instead. * css/CSSStyleSelector.cpp: (WebCore::RuleSet::addRulesFromSheet): 2011-12-17 Andreas Kling CSSStyleSelector: Clean up getColorFromPrimitiveValue(). Reviewed by Antti Koivisto. Rename getColorFromPrimitiveValue() to colorFromPrimitiveValue() and rework it to be a bit more readable. * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::addStops): * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyColor::applyValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::colorFromPrimitiveValue): (WebCore::CSSStyleSelector::createFilterOperations): * css/CSSStyleSelector.h: * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): 2011-12-17 Kenichi Ishibashi Text dispappear when SVG font has no latin character https://bugs.webkit.org/show_bug.cgi?id=71765 Reviewed by Nikolas Zimmermann. Initialize SVG font metrics even if the font doesn't contain latin characters. Test: svg/custom/svg-fonts-no-latin-glyph.html * svg/SVGFontData.cpp: (WebCore::SVGFontData::initializeFontData): Initializes metrics even if the zeroGlyphPage doesn't exist. 2011-12-17 David Barton Radical sign drawn incorrectly due to refactoring typo https://bugs.webkit.org/show_bug.cgi?id=74780 Reviewed by Dan Bernstein. LayoutTests/mathml/presentation/roots.xhtml shows the bug, but apparently its .png checksum is ok so run-webkit-tests can't detect the problem. * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::paint): In revision 88250, one paintOffset should have been adjustedPaintOffset. 2011-12-17 Adrienne Walker [chromium] Reverting r103011, r103135 due to Aura test failures Unreviewed gardening. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::~ContentLayerChromium): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::notifySyncRequired): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerTreeHost): (WebCore::LayerChromium::setNeedsCommit): (WebCore::LayerChromium::setParent): (WebCore::LayerChromium::setMaskLayer): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setReplicaLayer): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::setRootLayer): 2011-12-16 Chris Marrin Hardware acceleration of W3C Filter Effects https://bugs.webkit.org/show_bug.cgi?id=68479 Reviewed by Simon Fraser. Tests: css3/filters/effect-blur-hw.html css3/filters/effect-combined-hw.html css3/filters/effect-drop-shadow-hw.html css3/filters/effect-grayscale-hw.html css3/filters/effect-hue-rotate-hw.html css3/filters/effect-invert-hw.html css3/filters/effect-opacity-hw.html css3/filters/effect-saturate-hw.html css3/filters/effect-sepia-hw.html Implement hardware acceleration of filters. If a filter is on a RenderLayer and that layer has a GraphicsLayer, a test is done to see if the desired filter can be rendered in hardware. If so, skip rendering it when painting, and add the filters to the CALayer. Currently Mac only, using CoreImage. Animation is done in software, with the filters being recreated every frame. There are some fidelity issues with the software renderer, but those will be dealt with as bugs to be fixed. * platform/graphics/GraphicsLayer.h: Pass down FilterOperations (WebCore::GraphicsLayer::filter): (WebCore::GraphicsLayer::setFilter): * platform/graphics/ca/GraphicsLayerCA.cpp: Deferred passdown of FilterOperations to PlatformCALayer (WebCore::GraphicsLayerCA::setFilter): (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): (WebCore::GraphicsLayerCA::updateFilter): (WebCore::GraphicsLayerCA::ensureStructuralLayer): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: Mac implementation using CI (PlatformCALayer::setFilter): (PlatformCALayer::filterCanBeComposited): Static function to tell GraphicsLayer if this Filter object can be rendered * platform/graphics/filters/FilterOperations.cpp: (WebCore::FilterOperations::operator=): * platform/graphics/filters/FilterOperations.h: (WebCore::FilterOperations::FilterOperations): * rendering/RenderLayer.cpp: Pass filter object to GraphicsLayer (WebCore::RenderLayer::rendersFilter): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::updateOrRemoveFilterEffect): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): (WebCore::RenderLayerBacking::updateLayerFilter): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): * rendering/RenderLayerBacking.h: (WebCore::RenderLayerBacking::canCompositeFilter): 2011-12-17 Philippe Normand Unreviewed, GTK build fix after r103131. * GNUmakefile.list.am: Fix typo... s/.cop/.cpp 2011-12-16 Benjamin Poulain FEComposite does not build when you disable filters on ARMv7 https://bugs.webkit.org/show_bug.cgi?id=74772 Reviewed by David Kilzer. Add the missing ENABLE(FILTERS). * platform/graphics/filters/arm/FECompositeArithmeticNEON.cpp: * platform/graphics/filters/arm/FECompositeArithmeticNEON.h: 2011-12-16 Ryosuke Niwa Mac build fix after r103104. * WebCore.xcodeproj/project.pbxproj: 2011-12-16 Adam Klein Consolidate before-advice regarding attribute modification into a single method https://bugs.webkit.org/show_bug.cgi?id=74752 Reviewed by Ryosuke Niwa. Adds a willModifyAttribute method to Element, meant to be called before an attribute on that Element is added/removed/changed. Replace most calls to Element::updateId and all calls to Element::enqueueAttributesMutationRecordIfRequested with calls to willModifyAttribute. Moreover, enqueueAttributesMutation... can now be private since its only caller is willModifyAttribute. The only remaining direct calls to updateId are in cases the entire NamedNodeMap is being replaced. These are implementation details of WebCore that shouldn't be exposed via MutationObservers. No new tests, no expected change in behavior. * dom/Attr.cpp: (WebCore::Attr::setValue): (WebCore::Attr::childrenChanged): Besides the above change, use a StringBuilder to build up value, and only do String -> AtomicString conversion once. * dom/Element.cpp: (WebCore::Element::setAttributeInternal): * dom/Element.h: (WebCore::Element::willModifyAttribute): * dom/NamedNodeMap.cpp: (WebCore::NamedNodeMap::setNamedItem): (WebCore::NamedNodeMap::removeNamedItem): 2011-12-16 James Robinson [chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired https://bugs.webkit.org/show_bug.cgi?id=74376 Reviewed by Kenneth Russell. CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper scheduling decision. This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic. There is a large amount of unit test coverage for this change, largely in LayerChromiumTest * platform/graphics/chromium/GraphicsLayerChromium.cpp: * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setNeedsCommit): (WebCore::LayerChromium::insertChild): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::setRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCScopedThreadProxy.h: (WebCore::CCScopedThreadProxy::runTaskIfNotShutdown): 2011-12-16 Adam Klein Fix typo in MarkupTokenBase: rename takeAtributes to takeAttributes https://bugs.webkit.org/show_bug.cgi?id=74766 Reviewed by Darin Adler. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML): (WebCore::HTMLConstructionSite::insertScriptElement): (WebCore::HTMLConstructionSite::createElement): (WebCore::HTMLConstructionSite::createHTMLElement): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::attributesForIsindexInput): * xml/parser/MarkupTokenBase.h: (WebCore::AtomicMarkupTokenBase::takeAttributes): 2011-12-16 Adam Barth