2013-10-29 Jinwoo Song Re-enable simple line layout for EFL https://bugs.webkit.org/show_bug.cgi?id=123402 Reviewed by Antti Koivisto. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): 8-bit TextRun support is now enabled for EFL port, so the port can use the simple line layout. 2013-10-29 Zan Dobersek Unreviewed, follow-up to r158185. Export the required symbol. This should fix the Mac debug build. * WebCore.exp.in: 2013-10-29 Santosh Mahto Text selected with double-click gets unselected after DOM modification https://bugs.webkit.org/show_bug.cgi?id=114227 Reviewed by Ryosuke Niwa. Before this patch when selection is done by double-click (start and base remain same) and DOM is modified then selection gets vanished. This does not happen when selection is done by dragging mouse. This happens because on double-click base and extent remain the same and on DOM modification we update the selection with base and extent, so we loose the selection. Since in double-click case start/end contain the correct selection, same should be used after dom modification to update selection. Test: editing/selection/double-click-selection-with-dom-mutation.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::textWasReplaced): use start/end to update selection in case double click selection. Added a check for base != extent, if base != extent use base/extent to update the selection otherwise use start/end with directionality check. 2013-10-29 Mihnea Ovidenie [CSSRegions] Display anonymous regions in DRT https://bugs.webkit.org/show_bug.cgi?id=122963 Reviewed by Alexandru Chiculita. After https://bugs.webkit.org/show_bug.cgi?id=119135, css regions are modelled using an anonymous RenderNamedFlowFragment object inside the block having a valid -webkit-flow-from. This patch changes the way elements | pseudo-elements with -webkit-flow-from are displayed in test dumps. Before: RenderRegion {DIV} at (200,200) size 52x52 [border: (1px solid #000000)] After: RenderBlock (positioned) {DIV} at (200,200) size 52x52 [border: (1px solid #000000)] RenderNamedFlowFragment at (1,1) size 50x50 Before: Flow Threads Thread with flow-name 'article' Regions for flow 'article' RenderRegion {DIV} #region_1 RenderRegion {DIV} #region_2 After: Named flows Named flow 'article' Regions for named flow 'article' RenderNamedFlowFragment (anonymous child of {DIV::before} #region_1) RenderNamedFlowFragment (anonymous child of {DIV} #region_2) Changed existing tests based on the new dumps. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::renderName): * rendering/RenderNamedFlowFragment.h: Add a comment explaining the purpose of the class. * rendering/RenderRegion.h: * rendering/RenderTreeAsText.cpp: (WebCore::write): (WebCore::writeRenderRegionList): Adjust function to display info for anonymous regions too. (WebCore::writeRenderNamedFlowThreads): Separate dump of valid and invalid regions for a named flow. 2013-10-29 Zan Dobersek Move writeIndent, overloaded << operators from RenderTreeAsText to TextStream https://bugs.webkit.org/show_bug.cgi?id=116012 Reviewed by Simon Fraser. The writeIndent method and overloaded << operators for writing out vectors and points and rectangles of various types are not specific to the render tree nor do they depend on any rendering-specific interface. * page/scrolling/ScrollingStateNode.cpp: * page/scrolling/ScrollingStateNode.h: (ScrollingStateNode): Remove the writeIndent declaration, it's functionally the same as the TextStream method. * platform/graphics/GraphicsLayer.cpp: * platform/graphics/GraphicsLayer.h: (GraphicsLayer): Ditto. * platform/graphics/filters/DistantLightSource.cpp: Remove the RenderTreeAsText.h inclusion or replace it with the inclusion of the TextStream.h header where required. The writeIndent method is now declared there. * platform/graphics/filters/FEBlend.cpp: Ditto. * platform/graphics/filters/FEColorMatrix.cpp: Ditto. * platform/graphics/filters/FEComponentTransfer.cpp: Ditto. * platform/graphics/filters/FEComposite.cpp: Ditto. * platform/graphics/filters/FEConvolveMatrix.cpp: Ditto. * platform/graphics/filters/FECustomFilter.cpp: Ditto. * platform/graphics/filters/FEDiffuseLighting.cpp: Ditto. * platform/graphics/filters/FEDisplacementMap.cpp: Ditto. * platform/graphics/filters/FEDropShadow.cpp: Ditto. * platform/graphics/filters/FEFlood.cpp: Ditto. * platform/graphics/filters/FEGaussianBlur.cpp: Ditto. * platform/graphics/filters/FEMerge.cpp: Ditto. * platform/graphics/filters/FEMorphology.cpp: Ditto. * platform/graphics/filters/FEOffset.cpp: Ditto. * platform/graphics/filters/FESpecularLighting.cpp: Ditto. * platform/graphics/filters/FETurbulence.cpp: Ditto. * platform/graphics/filters/SourceAlpha.cpp: Ditto. * platform/graphics/filters/SourceGraphic.cpp: Ditto. * platform/text/TextStream.cpp: Move the writeIndent and operators' definitions here. (WebCore::operator<<): (WebCore): (WebCore::writeIndent): * platform/text/TextStream.h: Move the writeIndent and operators' declarations here. (WebCore): (TextStream): (WebCore::TextStream::operator<<): * rendering/RenderTreeAsText.cpp: Move the writeIndent and operators' definitions into TextStream. (WebCore): * rendering/RenderTreeAsText.h: Move the writeIndent and operators' declarations into TextStream. (WebCore): 2013-10-28 Zan Dobersek Clean up ScopedEventQueue https://bugs.webkit.org/show_bug.cgi?id=123408 Reviewed by Darin Adler. Clean up the ScopedEventQueue implementation. ScopedEventQueue::instance() should return a reference to a NeverDestroyed object. The static ScopedEventQueue::s_instance pointer is removed. The ScopedEventQueue destructor, the dispatchAllEvents method and the scope level incrementation/decrementation methods are made private. NeverDestroyed and EventQueueScope are made friends of the ScopedEventQueue class so they can access the constructor and the incrementation/decrementation methods, respectively. ScopedEventQueue method definitions are reordered to follow the order of their declarations in the header file. ScopedEventQueue::dispatchAllEvents() now uses std::move to efficiently dispatch and clear all currently queued events. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchScopedEvent): * dom/ScopedEventQueue.cpp: (WebCore::ScopedEventQueue::instance): (WebCore::ScopedEventQueue::dispatchAllEvents): * dom/ScopedEventQueue.h: (WebCore::EventQueueScope::EventQueueScope): (WebCore::EventQueueScope::~EventQueueScope): 2013-10-28 Andreas Kling applyTextTransform() should take a const RenderStyle&. This function is always called with an existing RenderStyle object. Reviewed by Anders Carlsson. 2013-10-28 Andreas Kling RenderSVGResource::applyResource() should take a const RenderStyle&. These functions are always called with an existing RenderStyle object so let them take a const reference instead of a raw pointer. Also sprinkled some missing OVERRIDEs. Reviewed by Anders Carlsson. 2013-10-28 Andreas Kling Remove unused RenderTextControl::textBaseStyle(). Reviewed by Anders Carlsson. 2013-10-28 Zan Dobersek HTML input type objects should be managed through std::unique_ptr https://bugs.webkit.org/show_bug.cgi?id=123160 Reviewed by Darin Adler. Make the constructors of the InputType subclasses public. This makes it possible to use std::make_unique on these classes and makes the T::create() helpers redundant. New instances of these classes are now managed through std::unique_ptr. InputType::create() now uses a NeverDestroyed InputTypeFactoryMap that maps type names to InputTypeFactoryFunctions and gets populated when the method is first called and the map is still empty. Certain types are not added to the factory map if they're disabled at runtime. The factory is used to create the new InputType object if the requested type was found in the map, and TextInputType is used otherwise. * html/ButtonInputType.cpp: * html/ButtonInputType.h: (WebCore::ButtonInputType::ButtonInputType): * html/CheckboxInputType.cpp: * html/CheckboxInputType.h: (WebCore::CheckboxInputType::CheckboxInputType): * html/ColorInputType.cpp: * html/ColorInputType.h: (WebCore::ColorInputType::ColorInputType): * html/DateInputType.cpp: * html/DateInputType.h: * html/DateTimeInputType.cpp: * html/DateTimeInputType.h: (WebCore::DateTimeInputType::DateTimeInputType): * html/DateTimeLocalInputType.cpp: * html/DateTimeLocalInputType.h: (WebCore::DateTimeLocalInputType::DateTimeLocalInputType): * html/EmailInputType.cpp: * html/EmailInputType.h: (WebCore::EmailInputType::EmailInputType): * html/FileInputType.cpp: * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): * html/HTMLInputElement.h: * html/HiddenInputType.cpp: * html/HiddenInputType.h: (WebCore::HiddenInputType::HiddenInputType): * html/ImageInputType.cpp: (WebCore::ImageInputType::ImageInputType): * html/ImageInputType.h: * html/InputType.cpp: (WebCore::createInputType): A templated helper that constructs a new InputType subclass object through std::make_unique. (WebCore::populateInputTypeFactoryMap): Populates the passed-in map with type-createInputType pairs. (WebCore::InputType::create): Get the InputTypeFactoryFunction for the specified type, or fall back to TextInputType. (WebCore::InputType::createText): * html/InputType.h: * html/MonthInputType.cpp: * html/MonthInputType.h: (WebCore::MonthInputType::MonthInputType): * html/NumberInputType.cpp: * html/NumberInputType.h: (WebCore::NumberInputType::NumberInputType): * html/PasswordInputType.cpp: * html/PasswordInputType.h: (WebCore::PasswordInputType::PasswordInputType): * html/RadioInputType.cpp: * html/RadioInputType.h: (WebCore::RadioInputType::RadioInputType): * html/RangeInputType.cpp: * html/RangeInputType.h: * html/ResetInputType.cpp: * html/ResetInputType.h: (WebCore::ResetInputType::ResetInputType): * html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): * html/SearchInputType.h: * html/SubmitInputType.cpp: * html/SubmitInputType.h: (WebCore::SubmitInputType::SubmitInputType): * html/TelephoneInputType.cpp: * html/TelephoneInputType.h: (WebCore::TelephoneInputType::TelephoneInputType): * html/TextInputType.cpp: * html/TextInputType.h: (WebCore::TextInputType::TextInputType): * html/TimeInputType.cpp: * html/TimeInputType.h: * html/URLInputType.cpp: * html/URLInputType.h: (WebCore::URLInputType::URLInputType): * html/WeekInputType.cpp: * html/WeekInputType.h: (WebCore::WeekInputType::WeekInputType): 2013-10-28 Brady Eidson Refactor IDB factory creation. https://bugs.webkit.org/show_bug.cgi?id=123347 Reviewed by Andreas Kling. - Rework how database directory location is passed around. - Make (some) SecurityOrigin arguments be references instead of pointers. - Add two SecurityOrigin arguments to opening databases for future use. * Modules/indexeddb/IDBFactory.cpp: (WebCore::IDBFactory::openInternal): * Modules/indexeddb/IDBFactoryBackendInterface.cpp: (WebCore::IDBFactoryBackendInterface::create): * Modules/indexeddb/IDBFactoryBackendInterface.h: * Modules/indexeddb/PageGroupIndexedDatabase.cpp: (WebCore::PageGroupIndexedDatabase::PageGroupIndexedDatabase): (WebCore::PageGroupIndexedDatabase::from): (WebCore::PageGroupIndexedDatabase::factoryBackend): * Modules/indexeddb/PageGroupIndexedDatabase.h: * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: (WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase): (WebCore::WorkerGlobalScopeIndexedDatabase::from): (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB): * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: (WebCore::IDBBackingStoreLevelDB::open): (WebCore::IDBBackingStoreLevelDB::openInMemory): * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: (WebCore::computeFileIdentifier): (WebCore::computeUniqueIdentifier): (WebCore::IDBFactoryBackendLevelDB::IDBFactoryBackendLevelDB): (WebCore::IDBFactoryBackendLevelDB::getDatabaseNames): (WebCore::IDBFactoryBackendLevelDB::deleteDatabase): (WebCore::IDBFactoryBackendLevelDB::openBackingStore): (WebCore::IDBFactoryBackendLevelDB::open): * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: (WebCore::IDBFactoryBackendLevelDB::create): * WebCore.exp.in: * platform/DatabaseStrategy.cpp: (WebCore::DatabaseStrategy::createIDBFactoryBackend): * platform/DatabaseStrategy.h: 2013-10-28 Andreas Kling RenderElement::style() should return a reference. Now that renderers always have style, go ahead and make style() return a RenderStyle&. There are countless opportunities for further cleanup enabled by this change. I'm simply passing &style() in many cases where we can really do something nicer instead. Reviewed by Anders Carlsson. 2013-10-28 Tim Horton Make TileController create the appropriate PlatformCALayer subclasses https://bugs.webkit.org/show_bug.cgi?id=123418 Reviewed by Simon Fraser. Add PlatformCALayer::createCompatibleLayer, which is overridden in each of the subclasses to create a PlatformCALayer instance of the same subclass. This is used in TileController to make bare PlatformCALayers of the correct type (Mac, Win, or Remote). * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayerMac::createCompatibleLayer): * platform/graphics/ca/win/PlatformCALayerWin.cpp: (PlatformCALayerWin::createCompatibleLayer): * platform/graphics/ca/win/PlatformCALayerWin.h: Add createCompatibleLayer and implement it in the subclasses. * platform/graphics/ca/mac/TileController.mm: (WebCore::TileController::TileController): (WebCore::TileController::tiledScrollingIndicatorLayer): (WebCore::TileController::createTileLayer): Make use of createCompatibleLayer when creating PlatformCALayers. 2013-10-28 Alexandru Chiculita Web Inspector: CSS Regions: Add protocol API to expose content nodes addition/removal https://bugs.webkit.org/show_bug.cgi?id=123424 Reviewed by Timothy Hatcher. Test: inspector-protocol/model/content-flow-content-nodes.html Adding two new inspector-protocol APIs to handle the cases when new elements are added or removed from a named flow. These APIs will trigger even though there is no region associated with the named flow. * inspector/Inspector.json: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement): (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement): * inspector/InspectorCSSAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl): (WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElement): (WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElement): * rendering/RenderNamedFlowThread.cpp: (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement): (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement): 2013-10-28 Joseph Pecoraro Web Inspector: Remove unused inspector/inline-javascript-imports.py https://bugs.webkit.org/show_bug.cgi?id=123425 Reviewed by Timothy Hatcher. * inspector/inline-javascript-imports.py: Removed. 2013-10-28 Joseph Pecoraro Web Inspector: Remove unused "externs" files and generators https://bugs.webkit.org/show_bug.cgi?id=123427 Reviewed by Timothy Hatcher. * inspector/InjectedScriptExterns.js: Removed. * inspector/generate_protocol_externs.py: Removed. 2013-10-28 Joseph Pecoraro Upstream remaining PLATFORM(IOS) and ENABLE(REMOTE_INSPECTOR) pieces https://bugs.webkit.org/show_bug.cgi?id=123411 Reviewed by Timothy Hatcher. Include an InspectorClient hook for when node searching is enabled / disabled. * inspector/InspectorClient.h: (WebCore::InspectorClient::didSetSearchingForNode): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setSearchingForNode): * inspector/InspectorOverlay.cpp: (WebCore::InspectorOverlay::didSetSearchingForNode): * inspector/InspectorOverlay.h: 2013-10-28 Benjamin Poulain Rename applyPageScaleFactorInCompositor to delegatesPageScaling https://bugs.webkit.org/show_bug.cgi?id=123417 Reviewed by Simon Fraser. * page/Frame.cpp: (WebCore::Frame::frameScaleFactor): * page/FrameView.cpp: (WebCore::FrameView::visibleContentScaleFactor): * page/Page.cpp: (WebCore::Page::setPageScaleFactor): * page/Settings.in: * platform/ScrollView.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): 2013-10-28 Myles C. Maxfield Parsing support for -webkit-text-decoration-skip: ink https://bugs.webkit.org/show_bug.cgi?id=123358 Reviewed by Dean Jackson. Adds initial parsing support for parsing -webkit-text-decoration-skip with values of "none" and "ink". This work is behind the new ENABLE(CSS3_TEXT_DECORATION) compile-time flag. Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html * Configurations/FeatureDefines.xcconfig: Adding ENABLE(CSS3_TEXT_DECORATION) * css/CSSComputedStyleDeclaration.cpp: Mapping internal representation of text-decoration-skip to a CSSValue (WebCore::renderTextDecorationSkipFlagsToCSSValue): (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSParser.cpp: Actually parsing tokens (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseTextDecorationSkip): * css/CSSParser.h: * css/CSSPropertyNames.in: adding -webkit-text-decoration-skip * css/CSSValueKeywords.in: adding ink * css/DeprecatedStyleBuilder.cpp: Mapping from CSSValue to internal representation (WebCore::ApplyPropertyTextDecorationSkip::valueToDecorationSkip): (WebCore::ApplyPropertyTextDecorationSkip::applyValue): (WebCore::ApplyPropertyTextDecorationSkip::createHandler): (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): * css/StyleResolver.cpp: decoration-skip uses DeprecatedStyleBuilder (WebCore::StyleResolver::applyProperty): * rendering/style/RenderStyle.h: Adding functions for modifying and accessing decoration-skip properties * rendering/style/RenderStyleConstants.h: Definition of internal representation * rendering/style/StyleRareInheritedData.cpp: Setting up constructors and comparators (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator==): * rendering/style/StyleRareInheritedData.h: Holds actual value of internal representation 2013-10-28 Anders Carlsson RunLoop::dispatch should take an std::function https://bugs.webkit.org/show_bug.cgi?id=123407 Reviewed by Andreas Kling. * WebCore.exp.in: * platform/RunLoop.cpp: (WebCore::RunLoop::performWork): (WebCore::RunLoop::dispatch): * platform/RunLoop.h: 2013-10-28 Tim Horton Make TileController manipulate PlatformCALayers instead of CALayers https://bugs.webkit.org/show_bug.cgi?id=123279 Reviewed by Simon Fraser. In the interest of making TileController more platform-independent (so that it can be used with the remote layer tree, and maybe Windows), move TileController onto our PlatformCALayer abstraction instead of direct manipulation of CALayers. Some fallout from this includes getting rid of special Mac-specific TileController-specific CALayer subclasses, and reworking tile painting to work in a more generic way. This is a first step, and doesn't get us all the way to a platform independent TileController, but more patches are forthcoming. No new tests, just a (largeish) refactor. * WebCore.exp.in: The signature of some methods has changed. * WebCore.xcodeproj/project.pbxproj: Remove WebTileLayer.* * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea): Use the "isTile" key on the CALayer dictionary instead of the layer's class to determine if it's a tile. TileController will set this on a tile when it is created, for now. * platform/graphics/TiledBacking.h: tiledScrollingIndicatorLayer() should return a PlatformCALayer. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::platformCALayerPaintContents): * platform/graphics/ca/GraphicsLayerCA.h: (WebCore::GraphicsLayerCA::platformCALayerIncrementRepaintCount): * platform/graphics/ca/PlatformCALayerClient.h: The PlatformCALayerClient paintContents and incrementRepaintCount callbacks should include the platformCALayer that caused the callback. * platform/graphics/ca/PlatformCALayer.h: Add LayerTypeSimpleLayer, which is similar to LayerTypeWebLayer except it just calls back its client to paint, instead of doing complicated things with repaint rects. This is so that TileController doesn't re-enter drawLayerContents when asking its GraphicsLayer to paint for each PlatformCALayer (it will be entering drawLayerContents for the first time for each layer). It also happens to be useful for things like the tile controller overlay, which don't need all that complication. Add LayerTypeTiledBackingTileLayer, which is used simply to distinguish TileController Tile layers from other LayerTypeSimpleLayers. * platform/graphics/ca/mac/LayerPool.h: * platform/graphics/ca/mac/LayerPool.mm: (WebCore::LayerPool::addLayer): (WebCore::LayerPool::takeLayerWithSize): LayerPool should operate on PlatformCALayers now. * platform/graphics/ca/mac/PlatformCALayerMac.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayerMac::PlatformCALayerMac): Set the "isTile" key on the CALayer to true for TiledBackingTileLayers, so that the scrolling performance logging can tell a tile apart from any other layer, on the scrolling thread, without touching PlatformCALayers or the TileController or any other main-thread data structures. (PlatformCALayerMac::setEdgeAntialiasingMask): Added. * platform/graphics/ca/mac/TileController.h: Remove references to Objective-C classes; instead use PlatformCALayer everywhere. TileController is now a PlatformCALayerClient, and the layers it owns are all PlatformCALayers (and it is constructed with a PlatformCALayer, etc.). Hand in the tile debug border color as a WebCore color, instead of a CGColorRef. blankPixelCountForTiles() now operates on a list of PlatformLayers instead of WebTileLayers specifically, since WebTileLayer is gone. Make drawTileMapContents private because WebTileCacheMapLayer no longer exists. (WebCore::TileController::platformCALayerDrawsContent): All of the layers who have TileController as their client paint their contents. (WebCore::TileController::platformCALayerContentsOpaque): This will only be called for layers which paint via drawLayerContents, so it's OK that we don't special-case the debugging overlay here. (WebCore::TileController::owningGraphicsLayer): Return the GraphicsLayer that owns the TileController's main layer, via its conformance to PlatformCALayerClient. This is a bit strange (because it's not strictly a GraphicsLayer, despite always being so at the moment), but is done for clarity inside TileController itself. * platform/graphics/ca/mac/TileController.mm: Remove CALayer (WebCALayerDetails), WebTiledScrollingIndicatorLayer, and a bunch of includes that we don't need anymore. (WebCore::TileController::create): (WebCore::TileController::TileController): TileController is passed a PlatformCALayer for the tile cache root layer, instead of a WebTiledBackingLayer. It also creates a PlatformCALayer with LayerTypeLayer instead of a bare CALayer for the container layer. It's OK to remove the transaction because it was only used to stop the implicit animation, which PlatformCALayer will do for us. (WebCore::TileController::~TileController): Clear the owner of the PlatformCALayers which the TileController previously owned, so they don't try to call back a destroyed TileController. (WebCore::TileController::tileCacheLayerBoundsChanged): (WebCore::TileController::setNeedsDisplay): Straightforward adjustments towards use of PlatformCALayer. (WebCore::TileController::setTileNeedsDisplayInRect): Adjustments towards use of PlatformCALayer; we need FloatRects so we can pass pointers to PlatformCALayer::setNeedsDisplay. (WebCore::TileController::platformCALayerPaintContents): Replace drawLayer with platformCALayerPaintContents, which will be called back from our various WebSimpleLayers. If the PlatformCALayer is our tiled scrolling debug indicator, paint that. Otherwise, it's a tile. Make use of drawLayerContents() to paint the tile contents. Make use of drawRepaintIndicator() to paint the repaint indicator if needed. Move scrolling performance logging code that used to be in WebTileLayer here. (WebCore::TileController::platformCALayerDeviceScaleFactor): (WebCore::TileController::platformCALayerShowDebugBorders): (WebCore::TileController::platformCALayerShowRepaintCounter): Forward these to the owning GraphicsLayerCA, because it will have the right answers. (WebCore::TileController::setScale): Adjustments towards use of PlatformCALayer; remove some code that Simon caused to be unused in 156291 but did not remove. (WebCore::TileController::setAcceleratesDrawing): (WebCore::TileController::setTilesOpaque): (WebCore::TileController::setVisibleRect): (WebCore::TileController::revalidateTiles): (WebCore::TileController::setTileDebugBorderWidth): (WebCore::TileController::setTileDebugBorderColor): (WebCore::TileController::bounds): (WebCore::TileController::blankPixelCount): (WebCore::TileController::blankPixelCountForTiles): (WebCore::queueTileForRemoval): (WebCore::TileController::setNeedsRevalidateTiles): (WebCore::TileController::ensureTilesForRect): (WebCore::TileController::retainedTileBackingStoreMemory): Straightforward adjustments towards use of PlatformCALayer. (WebCore::TileController::updateTileCoverageMap): Adjustments towards use of PlatformCALayer; rename backgroundColor to visibleRectIndicatorColor, since it's actually a border, not a background. (WebCore::TileController::tiledScrollingIndicatorLayer): Create a LayerTypeSimpleLayer PlatformCALayer for the tiled scrolling indicator. It will be asked to paint straightforwardly, like a CALayer would. Create a LayerTypeLayer PlatformCALayer for the visible rect indicator. It doesn't need to paint anything, so it doesn't get an owner. (WebCore::TileController::createTileLayer): When creating a new tile layer, adopt it by setting its owner. Otherwise, straightforward adjustments towards use of PlatformCALayer. (WebCore::TileController::platformCALayerIncrementRepaintCount): Manage repaint counts for tiles in TileController now. (WebCore::TileController::drawTileMapContents): Adjustments towards use of PlatformCALayer. * platform/graphics/ca/mac/WebTileLayer.h: Removed. * platform/graphics/ca/mac/WebTileLayer.mm: Removed. We don't need WebTileLayer anymore, tiles are now just WebSimpleLayers owned by TileController. Its behavior has been moved into TileController. * platform/graphics/ca/mac/WebTiledBackingLayer.h: * platform/graphics/ca/mac/WebTiledBackingLayer.mm: (-[WebTiledBackingLayer createTileController:]): Add createTileController: so that the WebTiledBackingLayer's owner can hand the TileController the PlatformCALayer for the WebTiledBackingLayer without propagating additional usage of PlatformCALayer::platformCALayer(), which we need to remove in light of the remote layer tree work. (-[WebTiledBackingLayer setBorderColor:]): * platform/graphics/ca/win/PlatformCALayerWin.h: Add an empty implementation of setEdgeAntialiasingMask. We'll probably want to implement it before adopting TileController on Windows. * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::displayCallback): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerPaintContents): (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerIncrementRepaintCount): * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::LayerClient::platformCALayerPaintContents): (WebCore::LayerClient::platformCALayerIncrementRepaintCount): Adjust for new parameters on PlatformCALayerClient callbacks. * platform/graphics/mac/WebLayer.h: Add WebSimpleLayer, which inherits directly from CALayer, and make our standard WebLayer (which is used for compositing layers in web content) inherit from that. * platform/graphics/mac/WebLayer.mm: Move most of the behavior of WebLayer onto WebSimpleLayer, except for its complex painting code. That stays as an override on WebLayer. (WebCore::drawLayerContents): Use the PlatformCALayer's PlatformLayer - if it exists - to extract fine-grained repaint rects. If it doesn't, we'll just use the CGContext's clip rect as our single repaint rect. Rename platformLayer to platformCALayer for accuracy. Remove special code for CATiledLayer since we ought not use it on Mac anymore. (WebCore::drawRepaintIndicator): Factor repaint indicator code out into its own function so that TileController can use it. It can't be called from drawLayerContents for TileController, since the PlatformCALayer that TileController passes in to drawLayerContents is actually that of the tile cache's root layer, not the tile itself. Also, add a custom background color parameter so TileController can override the default green color with its own standard purple. (-[WebLayer drawInContext:]): (-[WebSimpleLayer drawInContext:]): * platform/graphics/mac/WebTiledLayer.mm: (-[WebTiledLayer drawInContext:]): Removed a param from drawLayerContents because it's trivially acquirable from the PlatformCALayer. 2013-10-24 Sam Weinig Move RenderBlock functions only used by RenderBlockFlow to RenderBlockFlow https://bugs.webkit.org/show_bug.cgi?id=123318 Reviewed by David Hyatt. * rendering/LineLayoutState.h: Move FloatWithRect from RenderBlock. * rendering/RenderBlock.cpp: * rendering/RenderBlock.h: * rendering/RenderBlockFlow.cpp: * rendering/RenderBlockFlow.h: * rendering/RenderBlockLineLayout.cpp: Move pagination and float functions. 2013-10-28 Sergio Villar Senin [CSS Grid Layout] Add support for order inside grid items https://bugs.webkit.org/show_bug.cgi?id=123208 Reviewed by Antti Koivisto. Based on Blink r153457 and r153536 by Added support for sorting grid items by using -webkit-order property. Used OrderIterator to implement it so it had to be moved out of RenderFlexibleBox to be shared with RenderGrid. Tests: fast/css-grid-layout/grid-item-order-auto-flow-resolution.html fast/css-grid-layout/grid-item-order-paint-order.html * CMakeLists.txt: Added new file. * GNUmakefile.list.am: Ditto. * WebCore.vcxproj/WebCore.vcxproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * rendering/OrderIterator.cpp: Added. Ripped out of RenderFlexibleBox. (WebCore::OrderIterator::OrderIterator): (WebCore::OrderIterator::setOrderValues): Use std::move semantics. (WebCore::OrderIterator::first): Use an integer as iterator. (WebCore::OrderIterator::next): Ditto. (WebCore::OrderIterator::reset): Ditto. * rendering/OrderIterator.h: Added. (WebCore::OrderIterator::currentChild): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::RenderFlexibleBox): (WebCore::RenderFlexibleBox::layoutBlock): * rendering/RenderFlexibleBox.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::RenderGrid): (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): (WebCore::RenderGrid::paintChildren): * rendering/RenderGrid.h: 2013-10-28 Afonso R. Costa Jr. Methods on window.internals shouldn't pass a document. https://bugs.webkit.org/show_bug.cgi?id=107301 Reviewed by Alexey Proskuryakov. Each 'Internals' instance is associated with a 'Document'. So, it is not necessary to pass a document as argument. Only nodesFromRect and layerTreeAsText methods were kept because, in some Layout Tests, the 'Document' object is not the same used by Internals::contextDocument. * testing/Internals.cpp: Removed 'document' parameter. (WebCore::Internals::animationsAreSuspended): (WebCore::Internals::suspendAnimations): (WebCore::Internals::resumeAnimations): (WebCore::Internals::inspectorHighlightRects): (WebCore::Internals::inspectorHighlightObject): (WebCore::Internals::setScrollViewPosition): (WebCore::Internals::setPagination): (WebCore::Internals::configurationForViewport): (WebCore::Internals::paintControlTints): (WebCore::Internals::setDelegatesScrolling): (WebCore::Internals::touchPositionAdjustedToBestClickableNode): (WebCore::Internals::touchNodeAdjustedToBestClickableNode): (WebCore::Internals::touchPositionAdjustedToBestContextMenuNode): (WebCore::Internals::touchNodeAdjustedToBestContextMenuNode): (WebCore::Internals::bestZoomableAreaForTouchPoint): (WebCore::Internals::lastSpellCheckRequestSequence): (WebCore::Internals::lastSpellCheckProcessedSequence): (WebCore::Internals::wheelEventHandlerCount): (WebCore::Internals::touchEventHandlerCount): (WebCore::Internals::setBatteryStatus): (WebCore::Internals::setNetworkInformation): (WebCore::Internals::setDeviceProximity): (WebCore::Internals::hasSpellingMarker): (WebCore::Internals::hasAutocorrectedMarker): (WebCore::Internals::isOverwriteModeEnabled): (WebCore::Internals::toggleOverwriteModeEnabled): (WebCore::Internals::consoleMessageArgumentCounts): (WebCore::Internals::hasGrammarMarker): (WebCore::Internals::numberOfScrollableAreas): (WebCore::Internals::isPageBoxVisible): (WebCore::Internals::repaintRectsAsText): (WebCore::Internals::scrollingStateTreeAsText): (WebCore::Internals::mainThreadScrollingReasons): (WebCore::Internals::nonFastScrollableRects): (WebCore::Internals::garbageCollectDocumentResources): (WebCore::Internals::insertAuthorCSS): (WebCore::Internals::insertUserCSS): (WebCore::Internals::shortcutIconURLs): (WebCore::Internals::allIconURLs): (WebCore::Internals::setHeaderHeight): (WebCore::Internals::setFooterHeight): (WebCore::Internals::webkitWillEnterFullScreenForElement): (WebCore::Internals::webkitDidEnterFullScreenForElement): (WebCore::Internals::webkitWillExitFullScreenForElement): (WebCore::Internals::webkitDidExitFullScreenForElement): (WebCore::Internals::startTrackingRepaints): (WebCore::Internals::stopTrackingRepaints): (WebCore::Internals::getCurrentCursorInfo): * testing/Internals.h: (WebCore::Internals::setPagination): * testing/Internals.idl: 2013-10-28 Xabier Rodriguez Calvar Remove HTMLMediaElement.startTime https://bugs.webkit.org/show_bug.cgi?id=123264 Reviewed by Eric Carlson. Patch based on one by: philipj@opera.com Blink review URL: https://codereview.chromium.org/32583003 startTime has been removed from the HTMLMediaElement and its use in the rest of components. * Modules/mediacontrols/mediaControlsApple.js: (Controller.prototype.handleRewindButtonClicked): (Controller.prototype.handleTimelineMouseMove): (Controller.prototype.updateDuration): (Controller.prototype.updateTime): Removed used of startTime(). * bindings/gobject/WebKitDOMCustom.cpp: (webkit_dom_html_media_element_get_start_time): * bindings/gobject/WebKitDOMCustom.h: * bindings/gobject/WebKitDOMCustom.symbols: Added phony function. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): (WebCore::HTMLMediaElement::isBlockedOnMediaController): Removed use of startTime() * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: Removed startTime() * rendering/RenderThemeWinCE.cpp: (WebCore::RenderThemeWinCE::paintSliderThumb): Removed use of startTime() 2013-10-28 Andreas Kling RenderElement::m_style should be a Ref. Made RenderElement::m_style a Ref. This codifies the fact that it can never be null after construction. Removed a couple of unnecessary null checks that were exposed as compilation failures. Reviewed by Antti Koivisto. 2013-10-28 Bastien Nocera Name all the GLib timeout sources https://bugs.webkit.org/show_bug.cgi?id=123229 Reviewed by Anders Carlsson. Give a name to GLib timeout sources, this is helpful when profiling WebKitGTK applications. No new tests, no change in functionality. 2013-10-28 Philippe Normand MediaStreamTrackPrivate's m_client uninitialized https://bugs.webkit.org/show_bug.cgi?id=123403 Reviewed by Eric Carlson. No new tests, no change in functionality. * platform/mediastream/MediaStreamTrackPrivate.cpp: (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate): Initialize the m_client member variable. 2013-10-28 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.am: Add crypto idl files to EXTRA_DIST and remove css/fullscreenQuickTime.css that was removed. 2013-10-28 Antti Koivisto Prepare simple line layout to support multiple runs per line https://bugs.webkit.org/show_bug.cgi?id=123400 Reviewed by Andreas Kling. Bunch of renaming and some refactoring for future support for text runs. SimpleLineLayout::Lines -> SimpleLineLayout::Layout and becomes a class instead of a typedef. SimpleLineLayout::Resolver::Line -> SimpleLineLayout::Resolver::Run SimpleLineLayout::createLines() -> SimpleLineLayout::create() RenderBlockFlow::simpleLines() -> RenderBlockFlow::simpleLineLayout() RenderText::simpleLines() -> RenderText::simpleLineLayout() Added resolver construction functions: SimpleLineLayout::runResolver() SimpleLineLayout::lineResolver() 2013-10-28 Mario Sanchez Prada [GTK] Expose title and alternative text for links in image maps https://bugs.webkit.org/show_bug.cgi?id=84045 Reviewed by Chris Fleizach. Change the way we decide when the title attribute should be used for the accessible description, by not relying in the titleTagShouldBeUsedInDescriptionField() helper function but in whether we have found a visible text for it or not. This actually mimics what the Mac port does and so makes possible to share both the layout test and its expected results. * accessibility/atk/WebKitAccessibleUtil.cpp: (accessibilityDescription): Update the method to determine whether the title attribute should be used for the description. 2013-10-28 Bastien Nocera Replace 0 timeouts g_timeout_add() by g_idle_add() https://bugs.webkit.org/show_bug.cgi?id=123260 Reviewed by Carlos Garcia Campos. A zero timeout should be equivalent to using g_idle_add_full(G_PRIORITY_DEFAULT, ...) without the nagging feeling that the wrong API was used. No new tests, no change in functionality. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Use g_idle_add() instead of 0-timer. (WebCore::MediaPlayerPrivateGStreamer::videoChanged): (WebCore::MediaPlayerPrivateGStreamer::audioChanged): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Ditto. (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged): (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged): * platform/gtk/GtkDragAndDropHelper.cpp: Ditto. (WebCore::GtkDragAndDropHelper::handleDragLeave): 2013-10-28 Zan Dobersek Re-enable simple line layout for GTK https://bugs.webkit.org/show_bug.cgi?id=123388 Reviewed by Andreas Kling. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): 8-bit TextRun support is now enabled for the GTK port, so the port can use the simple line layout. 2013-10-27 Andreas Kling Fix 4 asserting SVG tests after r158097. RenderElement::setStyle() is, quite surprisingly, a virtual function with a single override in RenderSVGBlock. To match the old behavior, we have to rewrite the display type from any inline type to block instead. * rendering/RenderElement.cpp: (WebCore::RenderElement::initializeStyle): 2013-10-27 Andreas Kling Tone down overzealous assertion from r158097. RenderElement::initializeStyle() really only cares that there are no text renderers that we should be calling styleDidChange() on. Tweak the code to only check that there are no text children. * rendering/RenderElement.cpp: (WebCore::RenderElement::initializeStyle): 2013-10-27 Antti Koivisto Enable center and right text alignment for simple lines https://bugs.webkit.org/show_bug.cgi?id=123398 Reviewed by Andreas Kling. Support text-align:center and text-align:right on simple line layout path. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): text-align:justify is still not supported. (WebCore::SimpleLineLayout::computeLineLeft): (WebCore::SimpleLineLayout::createLines): Do a rounding dance that matches the line boxes. * rendering/SimpleLineLayout.h: Add left position to lines. * rendering/SimpleLineLayoutResolver.h: (WebCore::SimpleLineLayout::Resolver::Line::rect): We now do rounding during layout. (WebCore::SimpleLineLayout::Resolver::Line::baseline): 2013-10-27 Andreas Kling Renderers should receive their style at construction. Pass the RenderStyle to all non-text renderer constructors. After construction, initializeStyle() must be called (as a stopgap measure) until we are able to do style-derived initialization without virtual function calls. With this change, RenderElement::m_style is never null. Subsequent patches will add enforcement for this and also make style() return a RenderStyle&. I'm adding three FIXME's in this patch: - createRendererIfNeeded() calls AnimationController to set up the initial style manually instead of asking RenderElement's setAnimatedStyle() to do it. This can probably be done in a nicer way, but it's not clear yet how. - ImageContentData::createRenderer() does a bit of unnecessary work. This should be easy to clean up but got too distracting to be part of this patch. - Document::createRenderTree() creates the RenderView with an initial dummy RenderStyle. I've done this because resolving the document style assumes we already have a RenderView. For styleWillChange() implementations to detect that they are reacting to the initial style, I've added a hasInitializedStyle() function on RenderElement. This will return false until you've called initializeStyle() on the renderer. This should go away along with initializeStyle() eventually. Reviewed by Antti Koivisto. 2013-10-26 Tim Horton [mac] Remove WebTiledLayer https://bugs.webkit.org/show_bug.cgi?id=123395 Reviewed by Anders Carlsson. Mac doesn't use CATiledLayer at all anymore. We have to keep LayerTypeTiledLayer around for Windows, for now, but we can get rid of WebTiledLayer and some related Mac-specific code. No new tests, just removing dead code. * WebCore.xcodeproj/project.pbxproj: Remove WebTiledLayer.* * platform/graphics/ca/PlatformCALayer.h: * platform/graphics/ca/mac/PlatformCALayerMac.h: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayerMac::PlatformCALayerMac): Remove synchronouslyDisplayTilesInRect, which was only used for WebTiledLayer on Mac. Remove WebTiledLayer instantiation and setup code. * platform/graphics/mac/WebTiledLayer.h: Removed. * platform/graphics/mac/WebTiledLayer.mm: Removed. 2013-10-26 Andreas Kling CTTE: RenderImageResourceStyleImage always has a StyleImage. Codify the fact that RenderImageResourceStyleImage always wraps an existing StyleImage object. Reviewed by Antti Koivisto. 2013-10-26 Antti Koivisto Revert some accidental changes. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): * css/CSSFontSelector.cpp: * css/CSSFontSelector.h: 2013-10-26 Mark Lam Gardening: fixed broken build. https://bugs.webkit.org/show_bug.cgi?id=123354. * css/CSSFontSelector.h: 2013-10-26 Antti Koivisto fast/frames/seamless/seamless-nested-crash.html asserts on wk2 only https://bugs.webkit.org/show_bug.cgi?id=123354 Reviewed by Andreas Kling. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): Don't enable simple line layout if the primary font is loading. The code expects to use the primary font metrics for all lines but those won't match the fallbacks when font is not loaded. 2013-10-26 Carlos Garcia Campos [GTK] Deprecate public dispatch_event method in objects implementing EventTarget interface https://bugs.webkit.org/show_bug.cgi?id=123261 Reviewed by Gustavo Noronha Silva. The interface function should be used instead. * bindings/scripts/CodeGeneratorGObject.pm: (GetFunctionDeprecationInformation): Helper function to return the version when the function was deprecated and the function replacing the deprecated one. (GenerateFunction): Check if the function is deprecated to mark it as such in the header and API docs. * bindings/scripts/gobject-generate-headers.pl: Replace the unused WEBKIT_OBSOLETE_API macro with new macros to mark function as deprecated, using the glib macros so that we don't need checks for the platform. * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h: * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h: * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h: * bindings/scripts/test/GObject/WebKitDOMTestException.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: * bindings/scripts/test/GObject/WebKitDOMattribute.h: 2013-10-25 Mark Lam DatabaseManager's ProposedDatabases need to be thread-safe. https://bugs.webkit.org/show_bug.cgi?id=123313. Reviewed by Geoffrey Garen. No new tests. * Modules/webdatabase/DatabaseManager.cpp: (WebCore::DatabaseManager::DatabaseManager): (WebCore::DatabaseManager::existingDatabaseContextFor): (WebCore::DatabaseManager::registerDatabaseContext): (WebCore::DatabaseManager::unregisterDatabaseContext): (WebCore::DatabaseManager::didConstructDatabaseContext): (WebCore::DatabaseManager::didDestructDatabaseContext): (WebCore::DatabaseManager::openDatabaseBackend): (WebCore::DatabaseManager::addProposedDatabase): (WebCore::DatabaseManager::removeProposedDatabase): (WebCore::DatabaseManager::fullPathForDatabase): (WebCore::DatabaseManager::detailsForNameAndOrigin): * Modules/webdatabase/DatabaseManager.h: 2013-10-25 Joseph Pecoraro Upstream ENABLE(REMOTE_INSPECTOR) and enable on iOS and Mac https://bugs.webkit.org/show_bug.cgi?id=123111 Reviewed by Timothy Hatcher. * Configurations/FeatureDefines.xcconfig: * WebCore.exp.in: 2013-10-25 Hans Muller [CSS Shapes] CORS-enabled fetch for shape image values https://bugs.webkit.org/show_bug.cgi?id=123114 Reviewed by Andreas Kling. Access to shape images is now controlled by CORS CSS shape per http://dev.w3.org/csswg/css-shapes/#shape-outside-property. Previously shape images had to be same-origin. Shape image URL access is defined by the same logic that defines canvas tainting: same-origin and data URLs are allowed and images with a "Access-Control-Allow-Origin:" header that's either "*" or that matches the document's origin. A PotentiallyCrossOriginEnabled RequestOriginPolicy was added to ResourceLoaderOptions, to indicate that a "potentially CORS-enabled fetch" was to be undertaken. The CSSImageValue::cachedImage() method handles this option by effectively setting the "Origin:" request header (see updateRequestForAccessControl() in CrossOriginAccessControl.cpp). StyleResolver::loadPendingShapeImage() uses the new ResourceLoaderOption. The static ShapeInsideInfo and ShapeOutsideInfo isEnabledFor() method now performs the CORS check for image valued shapes. The private isOriginClean() method from CanvasRenderingContext2D has been moved to the CachedImage class so that it can be shared by the Canvas and Shape implementations. It checks the response headers per the CORS spec. Test: http/tests/security/shape-image-cors.html * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cachedImage): Handle the new ResourceLoaderOption. * css/StyleResolver.cpp: (WebCore::StyleResolver::loadPendingShapeImage): Set the new ResourceLoaderOption. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createPattern): Use the CachedImage::isOriginClean(). * loader/ResourceLoaderOptions.h: Added PotentiallyCrossOriginEnabled to RequestOriginPolicy. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::isOriginClean): Migrated from CanvasRenderingContext2D. * loader/cache/CachedImage.h: * rendering/shapes/ShapeInfo.cpp: (WebCore::::checkImageOrigin): Do the CORS check and log an error message if neccessary. * rendering/shapes/ShapeInfo.h: * rendering/shapes/ShapeInsideInfo.cpp: (WebCore::ShapeInsideInfo::isEnabledFor): Call checkImageOrigin() for images. * rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::ShapeOutsideInfo::isEnabledFor): Ditto. 2013-10-25 Jer Noble [MSE] Fix runtime errors caused by mediasource IDL attributes. https://bugs.webkit.org/show_bug.cgi?id=123352 Reviewed by Eric Carlson. Due to http://webkit.org/b/123178, MediaSource classes must add a GenerateIsReachable (and also a JSGenerateToJSObject) attribute to avoid runtime asserts and crashes. * Modules/mediasource/MediaSource.idl: * Modules/mediasource/SourceBuffer.idl: * Modules/mediasource/SourceBufferList.idl: * Modules/mediasource/WebKitMediaSource.idl: * Modules/mediasource/WebKitSourceBufferList.idl: 2013-10-25 Jacky Jiang [BlackBerry] Browser crashed at PlatformGraphicsContext::addDrawLineForText() when trying to upload a video to youtube https://bugs.webkit.org/show_bug.cgi?id=123349 Reviewed by George Staikos. Internally reviewed by George Staikos, Konrad Piascik, Eli Fidler and Arvid Nilsson. Browser crashed when dereferencing null PlatformGraphicsContext*. In FrameView::paintControlTints(), we intentionally constructed GraphicsContext with null PlatformGraphicsContext* and disabled painting by doing context.setUpdatingControlTints(true). So we should not go further in GraphicsContext::drawLineForText() if painting is disabled. Check paintingDisabled() for the other functions in PathBlackBerry.cpp as well; otherwise, it is likely we will crash at those places. * platform/graphics/blackberry/PathBlackBerry.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::drawLineForDocumentMarker): (WebCore::GraphicsContext::drawLineForText): (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::clipPath): (WebCore::GraphicsContext::canvasClip): (WebCore::GraphicsContext::clipOut): 2013-10-25 Thiago de Barros Lacerda Adding platform implementation of MediaStreamTrack https://bugs.webkit.org/show_bug.cgi?id=123301 Reviewed by Eric Carlson. No new tests needed. * CMakeLists.txt: * Modules/mediastream/AudioStreamTrack.cpp: (WebCore::AudioStreamTrack::create): Create method now receives a MediaStreamTrackPrivate as parameter. (WebCore::AudioStreamTrack::AudioStreamTrack): * Modules/mediastream/AudioStreamTrack.h: * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): Constructor now iterates through a set of MediaStreamTrackPrivate instances to create each MediaStreamTrack of MediaStream. (WebCore::MediaStream::addRemoteSource): Calling AudioStreamTrack and VideoStreamTrack with MediaStreamTrackPrivate as parameter. * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::MediaStreamTrack): Constructor now receives a MediaStreamTrackPrivate, instead of a MediaStreamSource. (WebCore::MediaStreamTrack::~MediaStreamTrack): (WebCore::MediaStreamTrack::kind): Calling method from MediaStreamTrackPrivate. (WebCore::MediaStreamTrack::setSource): Ditto. (WebCore::MediaStreamTrack::id): Ditto. (WebCore::MediaStreamTrack::label): Ditto. (WebCore::MediaStreamTrack::enabled): Ditto. (WebCore::MediaStreamTrack::setEnabled): Ditto. (WebCore::MediaStreamTrack::muted): Ditto. (WebCore::MediaStreamTrack::readonly): Ditto. (WebCore::MediaStreamTrack::remote): Ditto. (WebCore::MediaStreamTrack::readyState): Ditto. (WebCore::MediaStreamTrack::states): (WebCore::MediaStreamTrack::capabilities): (WebCore::MediaStreamTrack::clone): (WebCore::MediaStreamTrack::stopProducingData): (WebCore::MediaStreamTrack::ended): Ditto. (WebCore::MediaStreamTrack::sourceStateChanged): Ditto. (WebCore::MediaStreamTrack::sourceMutedChanged): Ditto. (WebCore::MediaStreamTrack::sourceEnabledChanged): Ditto. (WebCore::MediaStreamTrack::configureTrackRendering): (WebCore::MediaStreamTrack::stopped): Ditto. (WebCore::MediaStreamTrack::trackDidEnd): Setting Ended ready state in MediaStreamTrackPrivate. (WebCore::MediaStreamTrack::trackReadyStateChanged): Dispatches Live or Ended event. (WebCore::MediaStreamTrack::trackMutedChanged): Dispatches Muted event. * Modules/mediastream/MediaStreamTrack.h: Now inheriting from MediaStreamTrackPrivateClient. (WebCore::MediaStreamTrack::source): Calling method from MediaStreamTrackPrivate. (WebCore::MediaStreamTrack::privateTrack): * Modules/mediastream/VideoStreamTrack.cpp: (WebCore::VideoStreamTrack::create): (WebCore::VideoStreamTrack::VideoStreamTrack): Create method now receives a MediaStreamTrackPrivate as parameter. * Modules/mediastream/VideoStreamTrack.h: * platform/mediastream/MediaStreamDescriptor.cpp: (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Stores the private tracks in a Vector (property of MediaStreamDescriptor class). (WebCore::MediaStreamDescriptor::addTrack): Adds a private track to the tracks' Vector (WebCore::MediaStreamDescriptor::removeTrack): Removes a private track from the tracks' Vector * platform/mediastream/MediaStreamDescriptor.h: (WebCore::MediaStreamDescriptor::numberOfAudioSources): Renamed from numberOfAudioStreams. (WebCore::MediaStreamDescriptor::audioSources): Renamed from audioStreams. (WebCore::MediaStreamDescriptor::numberOfVideoSources): Renamed from numberOfVideoStreams. (WebCore::MediaStreamDescriptor::videoSources): Renamed from videoStreams. (WebCore::MediaStreamDescriptor::numberOfAudioTracks): Returns the number of audio tracks this MediaStreamDescriptor has. (WebCore::MediaStreamDescriptor::audioTracks): Returns a audio track, given an index (WebCore::MediaStreamDescriptor::numberOfVideoTracks): Returns the number of video tracks this MediaStreamDescriptor has. (WebCore::MediaStreamDescriptor::videoTracks): Returns a video track, given an index * platform/mediastream/MediaStreamTrackPrivate.cpp: Added. * platform/mediastream/MediaStreamTrackPrivate.h: Added. 2013-10-25 Zoltan Horvath [CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with multiple regions Reviewed by David Hyatt. I simplified the determination of the next region part of updateShapeAndSegmentsForCurrentLineInFlowThread's implementation in order to make the code more straightforward. I also tried to avoid using regionAtBlockOffset(...) function where it's possible, since it's not always that reliable, what I'll will report in a separate bug. No new tests, covered by existing tests. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread): 2013-10-25 Zoltan Horvath [CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with the first lines Reviewed by David Hyatt. We have a complex condition in updateShapeAndSegmentsForCurrentLineInFlowThread, which is adjusting the first line to the shape's top. This patch adds two boolean to make that clear. No new tests, no behavior change. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread): 2013-10-25 Antti Koivisto Faster way for simple line layout to check if text has fallback fonts https://bugs.webkit.org/show_bug.cgi?id=123342 Reviewed by Andreas Kling. Don't use RenderText::knownToHaveNoOverflowAndNoFallbackFonts as it is slow. Simple text code path test already guarantees there is no overflow. Test for fallback fonts explicitly. * platform/graphics/SimpleFontData.h: Make FINAL. * rendering/RenderText.cpp: * rendering/RenderText.h: Remove knownToHaveNoOverflowAndNoFallbackFonts() as it has no clients. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): Check if all characters can be found from the primary font. 2013-10-25 Andreas Kling SVGResourcesCache::clientDestroyed() should take a RenderElement&. This function is always called with an object, and that object is guaranteed to never be a text renderer. Reviewed by Antti Koivisto. 2013-10-25 Andreas Kling SVGResourcesCache::clientLayoutChanged() should take a RenderElement&. This function is always called with an object, and that object is guaranteed to never be a text renderer. Reviewed by Antti Koivisto. 2013-10-25 Andreas Kling SVGResourcesCache::clientStyleChanged() should take a RenderElement&. This function is always called with an object, and that object is guaranteed to never be a text renderer. Reviewed by Antti Koivisto. 2013-10-25 Andreas Kling SVG: postApplyResource() should take a RenderElement&. This function is always called with an object, and that object is guaranteed to never be a text renderer. Reviewed by Antti Koivisto. 2013-10-25 Antti Koivisto REGRESSION(r157950): It made many tests assert on Windows, EFL, GTK https://bugs.webkit.org/show_bug.cgi?id=123309 Reviewed by Andreas Kling. Disable simple line layout on non-Mac plaforms for now. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): 2013-10-24 Andreas Kling SVG: applyResource() should take a RenderElement&. This function is always called with an object, and that object is guaranteed to never be a text renderer. Reviewed by Antti Koivisto. 2013-10-25 Andreas Kling RenderElement::styleWillChange() should pass newStyle as reference. When styleWillChange() is called, there is always a new style getting set so there's no need to handle the null style case. This flushed out a couple of unnecessary checks. Reviewed by Antti Koivisto. 2013-10-25 peavo@outlook.com [WinCairo] Compile fixes. https://bugs.webkit.org/show_bug.cgi?id=123269 Reviewed by Csaba Osztrogonác. * platform/graphics/win/ImageCairoWin.cpp: Added new parameter to BitmapImage::draw() calls. (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): 2013-10-25 Sergio Villar Senin Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox https://bugs.webkit.org/show_bug.cgi?id=118620 Reviewed by Antti Koivisto. Turns out that order is extremelly uncommon so using a Vector is much less expensive. This also special-cases the much common case of only having order of value 0 by using Vectors with just one preallocated member. Also added the performance test that shows a ~1% win when using a vector instead of the HashSet. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues): (WebCore::RenderFlexibleBox::layoutBlock): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): * rendering/RenderFlexibleBox.h: 2013-10-25 Sergio Villar Senin Non-SVG build broken after r157950 https://bugs.webkit.org/show_bug.cgi?id=123328 Reviewed by Xan Lopez. The isSVGInlineTest() check should be done only if SVG is enabled. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): 2013-10-24 Jer Noble [Mac] Add helper methods to convert CMTime <--> MediaTime https://bugs.webkit.org/show_bug.cgi?id=123285 Reviewed by Eric Carlson. Add utility methods to convert between CMTime (a rational time class) and MediaTime. Once there, PlatformClockCM can now vend and accept MediaTimes for currentTime. * platform/mac/MediaTimeMac.h: * platform/mac/MediaTimeMac.cpp: (WebCore::toMediaTime): Added conversion utility method. (WebCore::toCMTime): Ditto. * platform/mac/PlatformClockCM.h: * platform/mac/PlatformClockCM.mm: (PlatformClockCM::setCurrentMediaTime): Added. (PlatformClockCM::currentMediaTime): Added. * WebCore.xcodeproj/project.pbxproj: Add new files to project. 2013-10-24 Mark Rowe Remove references to OS X 10.7 from Xcode configuration settings. Now that we're not building for OS X 10.7 they're no longer needed. Reviewed by Anders Carlsson. * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/FeatureDefines.xcconfig: * Configurations/Version.xcconfig: 2013-10-24 Antti Koivisto Cache line layout path https://bugs.webkit.org/show_bug.cgi?id=123298 Reviewed by Sam Weinig. Determining the path can be non-trivial. Avoid computing it repeatedly on relayouts. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::RenderBlock): (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): (WebCore::RenderBlock::invalidateLineLayoutPath): (WebCore::RenderBlock::removeChild): Invalidate the path when children change. * rendering/RenderBlock.h: * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutInlineChildren): (WebCore::RenderBlockFlow::styleDidChange): Invalidate the path when style changes. (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout): (WebCore::RenderBlockFlow::ensureLineBoxes): * rendering/RenderText.cpp: (WebCore::RenderText::setText): Invalidate the path when text changes. 2013-10-24 Mark Rowe Prepare for the mysterious future. Reviewed by David Kilzer. * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/FeatureDefines.xcconfig: * Configurations/Version.xcconfig: 2013-10-24 Andreas Kling DocumentLoader::cachedResourceLoader() should return a reference. ..and while we're at it, make DocumentLoader::m_cachedResourceLoader a Ref, and have CachedResourceLoader::create return a PassRef. Reviewed by Sam Weinig. 2013-10-24 Anders Carlsson Stop bringing in the std namespace https://bugs.webkit.org/show_bug.cgi?id=123273 Reviewed by Andreas Kling. * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderFromBuffer): (WebCore::AudioBufferSourceNode::startGrain): (WebCore::AudioBufferSourceNode::totalPitchRate): * Modules/webaudio/AudioNodeInput.cpp: (WebCore::AudioNodeInput::numberOfChannels): * Modules/webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): * Modules/webaudio/AudioScheduledSourceNode.cpp: (WebCore::AudioScheduledSourceNode::updateSchedulingInfo): (WebCore::AudioScheduledSourceNode::stop): * Modules/webaudio/AudioSummingJunction.cpp: * Modules/webaudio/DelayDSPKernel.cpp: (WebCore::DelayDSPKernel::process): * Modules/webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::offlineRender): * Modules/webaudio/OscillatorNode.cpp: * Modules/webaudio/PannerNode.cpp: (WebCore::PannerNode::dopplerRate): * Modules/webaudio/WaveShaperDSPKernel.cpp: (WebCore::WaveShaperDSPKernel::processCurve): * Modules/webdatabase/DatabaseTracker.cpp: (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin): * Modules/websockets/WebSocket.cpp: (WebCore::saturateAdd): * Modules/websockets/WebSocketChannel.cpp: * Modules/websockets/WebSocketFrame.cpp: (WebCore::WebSocketFrame::parseFrame): * accessibility/AccessibilityARIAGrid.cpp: * accessibility/AccessibilityARIAGridCell.cpp: * accessibility/AccessibilityARIAGridRow.cpp: * accessibility/AccessibilityList.cpp: * accessibility/AccessibilityListBox.cpp: * accessibility/AccessibilityListBoxOption.cpp: * accessibility/AccessibilityNodeObject.cpp: * accessibility/AccessibilityObject.cpp: * accessibility/AccessibilityRenderObject.cpp: * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::addChildren): * accessibility/AccessibilityTableCell.cpp: * accessibility/AccessibilityTableColumn.cpp: * accessibility/AccessibilityTableHeaderContainer.cpp: * accessibility/AccessibilityTableRow.cpp: * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]): * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): * bindings/js/JSGeolocationCustom.cpp: (WebCore::setTimeout): (WebCore::setMaximumAge): * bindings/js/ScriptController.cpp: * bindings/js/SerializedScriptValue.cpp: (WebCore::writeLittleEndian): (WebCore::CloneSerializer::write): (WebCore::CloneDeserializer::deserialize): (WebCore::CloneDeserializer::readString): * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::propertyValue): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::getFontFace): * css/CSSGradientValue.cpp: (WebCore::CSSRadialGradientValue::createGradient): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseColorParameters): (WebCore::CSSParser::parseHSLParameters): * css/CSSReflectValue.cpp: * css/DeprecatedStyleBuilder.cpp: (WebCore::ApplyPropertyFontSize::applyValue): * css/PropertySetCSSStyleDeclaration.cpp: * css/SVGCSSParser.cpp: * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getLayeredShorthandValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::viewportPercentageValue): * dom/CharacterData.cpp: (WebCore::CharacterData::parserAppendData): * dom/ContainerNode.cpp: * dom/Document.cpp: (WebCore::Document::minimumLayoutDelay): * dom/Node.cpp: (WebCore::Node::compareDocumentPosition): * dom/Range.cpp: (WebCore::Range::toString): (WebCore::Range::textRects): (WebCore::Range::textQuads): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::scheduleAnimation): * dom/StyledElement.cpp: (WebCore::StyledElement::makePresentationAttributeCacheKey): * dom/Text.cpp: * dom/ViewportArguments.cpp: (WebCore::clampLengthValue): (WebCore::clampScaleValue): (WebCore::ViewportArguments::resolve): (WebCore::computeMinimumScaleFactorForContentContained): (WebCore::restrictMinimumScaleFactorToViewportSize): * editing/AlternativeTextController.cpp: * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteInsignificantText): * editing/Editor.cpp: (WebCore::Editor::setComposition): (WebCore::Editor::compositionRange): * editing/EditorCommand.cpp: (WebCore::verticalScrollDistance): * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): (WebCore::TextIterator::handleTextBox): (WebCore::CharacterIterator::string): (WebCore::SearchBuffer::SearchBuffer): (WebCore::SearchBuffer::append): (WebCore::SearchBuffer::prependContext): (WebCore::SearchBuffer::search): * editing/VisibleUnits.cpp: (WebCore::startOfParagraph): * editing/htmlediting.cpp: * editing/markup.cpp: * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::didReceiveResponse): (WebCore::FileReaderLoader::didReceiveData): * history/BackForwardList.cpp: (WebCore::BackForwardList::backListWithLimit): (WebCore::BackForwardList::forwardListWithLimit): * history/PageCache.cpp: (WebCore::PageCache::setCapacity): * html/BaseDateAndTimeInputType.cpp: * html/FTPDirectoryDocument.cpp: * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::getRegion): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseAttribute): (WebCore::parseColorStringWithCrazyLegacyRules): * html/HTMLFormControlElement.cpp: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::getTextFieldValues): * html/HTMLImageElement.cpp: * html/HTMLInputElement.cpp: * html/HTMLMapElement.cpp: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::updateActiveTextTrackCues): (WebCore::HTMLMediaElement::textTrackAddCue): (WebCore::HTMLMediaElement::textTrackRemoveCue): (WebCore::HTMLMediaElement::rewind): (WebCore::HTMLMediaElement::seek): (WebCore::HTMLMediaElement::duration): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseAttribute): (WebCore::HTMLSelectElement::updateListBoxSelection): * html/HTMLSourceElement.cpp: * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::colSpan): (WebCore::HTMLTableCellElement::rowSpan): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::parseAttribute): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setSelectionStart): (WebCore::HTMLTextFormControlElement::setSelectionEnd): (WebCore::HTMLTextFormControlElement::select): (WebCore::HTMLTextFormControlElement::setSelectionRange): * html/HTMLTrackElement.cpp: * html/ImageDocument.cpp: (WebCore::ImageDocument::scale): * html/InputType.cpp: (WebCore::InputType::valueAsDouble): * html/MediaController.cpp: (MediaController::duration): (MediaController::currentTime): (MediaController::setCurrentTime): (MediaController::updateReadyState): * html/NumberInputType.cpp: (WebCore::NumberInputType::setValueAsDouble): (WebCore::NumberInputType::setValueAsDecimal): (WebCore::NumberInputType::createStepRange): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * html/SearchInputType.cpp: (WebCore::SearchInputType::startSearchEventTimer): * html/StepRange.cpp: (WebCore::StepRange::clampValue): (WebCore::StepRange::parseStep): * html/TimeRanges.cpp: * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessageDOMAndStartTimer): (WebCore::adjustBubblePosition): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::normalizeRect): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::validateIndexArrayConservative): (WebCore::WebGLRenderingContext::validateCompressedTexFuncData): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlRewindButtonElement::defaultEventHandler): * html/shadow/MediaControlsApple.cpp: * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::setPositionFromPoint): * inspector/ContentSearchUtils.cpp: * inspector/DOMEditor.cpp: * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::diff): * inspector/InjectedScriptHost.cpp: * loader/ProgressTracker.cpp: (WebCore::ProgressTracker::incrementProgress): * loader/cache/CachedImage.cpp: * page/DOMWindow.cpp: (WebCore::DOMWindow::adjustWindowRect): * page/EventHandler.cpp: (WebCore::MaximumDurationTracker::~MaximumDurationTracker): * page/FrameTree.cpp: * page/FrameView.cpp: (WebCore::FrameView::adjustedDeferredRepaintDelay): (WebCore::FrameView::autoSizeIfEnabled): * page/PrintContext.cpp: (WebCore::PrintContext::computeAutomaticScaleFactor): * page/SpatialNavigation.cpp: (WebCore::entryAndExitPointsForDirection): * page/animation/CSSPropertyAnimation.cpp: (WebCore::blendFilterOperations): (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists): * platform/graphics/FloatRect.cpp: (WebCore::FloatRect::FloatRect): (WebCore::FloatRect::intersect): (WebCore::FloatRect::uniteEvenIfEmpty): (WebCore::FloatRect::extend): (WebCore::FloatRect::fitToPoints): * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): (WebCore::GlyphPageTreeNode::getChild): * platform/graphics/IntRect.cpp: (WebCore::IntRect::intersect): (WebCore::IntRect::unite): (WebCore::IntRect::uniteIfNonZero): * platform/graphics/LayoutRect.cpp: (WebCore::LayoutRect::intersect): (WebCore::LayoutRect::unite): (WebCore::LayoutRect::uniteIfNonZero): * platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::platformApplyGeneric): (WebCore::FEMorphology::platformApplySoftware): * platform/mac/MemoryPressureHandlerMac.mm: (WebCore::MemoryPressureHandler::respondToMemoryPressure): * platform/text/TextCodecICU.cpp: * rendering/LineWidth.cpp: (WebCore::LineWidth::fitBelowFloats): (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight): * rendering/RenderBlock.h: (WebCore::RenderBlock::availableLogicalWidthForLine): (WebCore::RenderBlock::availableLogicalWidthForContent): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::computePreferredLogicalWidths): (WebCore::RenderFieldset::layoutSpecialExcludedChild): (WebCore::RenderFieldset::paintBoxDecorations): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::updateLogicalWidth): (WebCore::RenderFlowThread::addForcedRegionBreak): * rendering/RenderFrameBase.cpp: (WebCore::RenderFrameBase::layoutWithFlattening): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layOutAxis): * rendering/RenderSlider.cpp: (WebCore::RenderSlider::computePreferredLogicalWidths): * rendering/RenderTableCell.h: * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::selectionHeight): (WebCore::RootInlineBox::selectionHeightAdjustedForPrecedingBlock): * rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::layout): * rendering/mathml/RenderMathMLScripts.cpp: (WebCore::RenderMathMLScripts::layout): * rendering/style/RenderStyle.h: * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::imageSize): * style/StyleFontSizeFunctions.cpp: (WebCore::Style::fontSizeForKeyword): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::setCurrentTime): 2013-10-24 Andreas Kling Uncomplicate some of SVGTextRunRenderingContext. This class was weird about a few things, so I've taken these steps to clear things up: - FINAL and OVERRIDE all the things. - Constructor now takes a RenderObject&. - renderer() now returns a RenderObject&. - drawSVGGlyphs() no longer takes a TextRun. - glyphDataForCharacter() no longer takes a TextRun. To expand on the last two, there was also some awkward hoop-jumping where we'd go through the TextRun passed by argument to find its rendering context, which was really just |this| all along. Reviewed by Antti Koivisto. 2013-10-24 Roger Fong Add texture level dependent size checks to textureImage2D calls. https://bugs.webkit.org/show_bug.cgi?id=123290 Reviewed by Dean Jackson Test covered by WebGL Conformance suite 1.0.2 test, textures/texture-size-limit.html. There are different size limits when calling textureImage2D on different texture levels. We should be throwing an error if our texture size exceeds these limits. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::validateTexFuncParameters): 2013-10-24 Thiago de Barros Lacerda [MediaStream API] allow a stream source to be shared https://bugs.webkit.org/show_bug.cgi?id=121954 Reviewed by Eric Carlson. Now, the MediaStreamSource don't know about the MediaStream that owns it, since there can be more than one MediaStream that has it as source for some track. MediaStreamTrack classes now have observers registered, in case there are more than one MediaStream owning that track No new tests, no change in functionality. * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::MediaStream): Adding the MediaStream as an observer for each track it owns. (WebCore::MediaStream::addTrack): Now adding the MediaStream as an observer the new added track and adding the source to the MediaStreamDescriptor. (WebCore::MediaStream::removeTrack): Instead of removing the source right away, we first check if there isn't any other track using that source, if not we remove the source. (WebCore::MediaStream::haveTrackWithSource): (WebCore::MediaStream::addRemoteSource): MediaStreamSource has no information about the MediaStream that uses it, so now we don't set the stream in the source anymore. (WebCore::MediaStream::removeRemoteSource): There can be more than on track using the source. So we get each track that is using the source and then remove it and fire the ended event. * Modules/mediastream/MediaStream.h: * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::addObserver): (WebCore::MediaStreamTrack::removeObserver): (WebCore::MediaStreamTrack::trackDidEnd): Does not get the client from the MediaStreamDescriptor, it now notify each of its observers that the track ended. * Modules/mediastream/MediaStreamTrack.h: Adding Observer class. * platform/mediastream/MediaStreamDescriptor.cpp: Destructor now does nothing. Previously it was setting each MediaStreamSource's descriptor to null. (WebCore::MediaStreamDescriptor::removeSource): Not setting the stream in source anymore. (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto. (WebCore::MediaStreamDescriptor::setEnded): Not setting the state of the source to Ended * platform/mediastream/MediaStreamDescriptor.h: (WebCore::MediaStreamDescriptor::~MediaStreamDescriptor): * platform/mediastream/MediaStreamSource.cpp: Removing references to MediaStream object (WebCore::MediaStreamSource::MediaStreamSource): (WebCore::MediaStreamSource::reset): * platform/mediastream/MediaStreamSource.h: 2013-10-24 Daniel Bates Crash in WebCore::NavigationScheduler::startTimer() https://bugs.webkit.org/show_bug.cgi?id=123288 Reviewed by Alexey Proskuryakov. Currently NavigationScheduler::startTimer() synchronously notifies the client before the Web Inspector of a scheduled redirect. If a client cancels this redirect then NavigationScheduler::m_redirect will become null and we'll subsequently crash when informing the Web Inspector of this formerly scheduled redirect. Instead, NavigationScheduler::startTimer() should notify the Web Inspector before it notifies the client of a scheduled redirect. As a side benefit of this change, the Web Inspector is notified of a scheduled redirect before being notified of it being canceled when a client chooses to cancel a scheduled redirect. * loader/NavigationScheduler.cpp: (WebCore::NavigationScheduler::startTimer): 2013-10-24 Antti Koivisto Try to fix build without CSS_SHAPES. * rendering/SimpleLineLayout.cpp: (WebCore::SimpleLineLayout::canUseFor): 2013-10-24 Antti Koivisto Simple line layout https://bugs.webkit.org/show_bug.cgi?id=122458 Reviewed by Darin Adler. Line box based inline layout is powerful but also rather slow and memory intensive. Simple line layout is a compact alternative data structure and fast code path to cover common cases without requiring line boxes. This patch handles a case single left-aligned text renderer inside flow with no floats. Even this very basic case is sufficiently common to handle up to 25% of all text lines on some popular new sites. The decision which path to use is made per block flow (paragraph). Simple line layout aims to produce pixel-exact rendering result when compared to the line box layout. The goal is to handle everything that requires line level access in cases that allow use of simple lines. This is not quite the case yet. For example selections and outline painting are not supported. In these cases we seamlessly switch to the line boxes. The simple line data structure currently uses 12 bytes per line. Lineboxes take ~160 bytes minimum per line. Laying out the lines is also several times faster as is iterating over them. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.xcodeproj/project.pbxproj: * dom/Position.cpp: (WebCore::Position::upstream): (WebCore::Position::downstream): (WebCore::Position::getInlineBoxAndOffset): Creating positions within a simple line flow causes switch to line boxes. * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): TextIterator traverses line boxes if available. In case simple line case we need to replicate the same results (for compatibility but especially to avoid changing test results). This is done here by just traversing the string without actually using the layout. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::RenderBlock): (WebCore::RenderBlock::layoutShapeInsideInfo): * rendering/RenderBlock.h: * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutInlineChildren): Select the layout path to use. (WebCore::RenderBlockFlow::deleteLines): (WebCore::RenderBlockFlow::hitTestInlineChildren): (WebCore::RenderBlockFlow::adjustForBorderFit): (WebCore::RenderBlockFlow::firstLineBaseline): (WebCore::RenderBlockFlow::inlineBlockBaseline): (WebCore::RenderBlockFlow::inlineSelectionGaps): (WebCore::RenderBlockFlow::clearTruncation): (WebCore::RenderBlockFlow::positionForPointWithInlineChildren): (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren): (WebCore::RenderBlockFlow::paintInlineChildren): (WebCore::RenderBlockFlow::hasLines): (WebCore::RenderBlockFlow::layoutSimpleLines): Do simple layout. (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout): (WebCore::RenderBlockFlow::ensureLineBoxes): This function switches from simple lines to line boxes. The switching can be done outside normal layout. This is used to cover some cases that are not yet supported by simple lines (like selections). * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::simpleLines): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::layoutLineBoxes): Rename the line box layout function. (WebCore::RenderBlockFlow::addOverflowFromInlineChildren): * rendering/RenderText.cpp: (WebCore::RenderText::deleteLineBoxesBeforeSimpleLineLayout): (WebCore::RenderText::absoluteRects): (WebCore::RenderText::absoluteRectsForRange): (WebCore::RenderText::absoluteQuadsClippedToEllipsis): (WebCore::RenderText::absoluteQuads): (WebCore::RenderText::absoluteQuadsForRange): (WebCore::RenderText::positionForPoint): (WebCore::RenderText::knownToHaveNoOverflowAndNoFallbackFonts): (WebCore::RenderText::setSelectionState): (WebCore::RenderText::setTextWithOffset): (WebCore::RenderText::ensureLineBoxes): (WebCore::RenderText::simpleLines): (WebCore::RenderText::linesBoundingBox): (WebCore::RenderText::linesVisualOverflowBoundingBox): (WebCore::RenderText::selectionRectForRepaint): (WebCore::RenderText::caretMinOffset): (WebCore::RenderText::caretMaxOffset): (WebCore::RenderText::countRenderedCharacterOffsetsUntil): (WebCore::RenderText::containsRenderedCharacterOffset): (WebCore::RenderText::containsCaretOffset): (WebCore::RenderText::hasRenderedText): * rendering/RenderText.h: * rendering/RenderTreeAsText.cpp: (WebCore::RenderTreeAsText::writeRenderObject): (WebCore::writeSimpleLine): (WebCore::write): * rendering/SimpleLineLayout.cpp: Added. (WebCore::SimpleLineLayout::canUseFor): This check for the cases supported by the simple line layout path. (WebCore::SimpleLineLayout::isWhitespace): (WebCore::SimpleLineLayout::skipWhitespaces): (WebCore::SimpleLineLayout::textWidth): (WebCore::SimpleLineLayout::createLines): The main layout functions that breaks text to lines. It only handles the cases allowed by SimpleLineLayout::canUseFor. What it handles it aims to break exactly as line box layout does. * rendering/SimpleLineLayout.h: Added. * rendering/SimpleLineLayoutFunctions.cpp: Added. (WebCore::SimpleLineLayout::paintFlow): (WebCore::SimpleLineLayout::hitTestFlow): (WebCore::SimpleLineLayout::collectFlowOverflow): (WebCore::SimpleLineLayout::computeTextBoundingBox): * rendering/SimpleLineLayoutFunctions.h: Added. (WebCore::SimpleLineLayout::computeFlowHeight): (WebCore::SimpleLineLayout::computeFlowFirstLineBaseline): (WebCore::SimpleLineLayout::computeFlowLastLineBaseline): (WebCore::SimpleLineLayout::findTextCaretMinimumOffset): (WebCore::SimpleLineLayout::findTextCaretMaximumOffset): (WebCore::SimpleLineLayout::containsTextCaretOffset): (WebCore::SimpleLineLayout::isTextRendered): (WebCore::SimpleLineLayout::lineHeightFromFlow): Support functions called from RenderBlockFlow and RenderText. They are equivalent to similar line box functions. (WebCore::SimpleLineLayout::baselineFromFlow): * rendering/SimpleLineLayoutResolver.h: Added. (WebCore::SimpleLineLayout::Resolver::Line::Line): (WebCore::SimpleLineLayout::Resolver::Line::rect): (WebCore::SimpleLineLayout::Resolver::Line::baseline): (WebCore::SimpleLineLayout::Resolver::Line::text): (WebCore::SimpleLineLayout::Resolver::Iterator::Iterator): (WebCore::SimpleLineLayout::Resolver::Iterator::operator++): (WebCore::SimpleLineLayout::Resolver::Iterator::operator--): (WebCore::SimpleLineLayout::Resolver::Iterator::operator==): (WebCore::SimpleLineLayout::Resolver::Iterator::operator!=): (WebCore::SimpleLineLayout::Resolver::Iterator::operator*): Lazy iterator for deriving line metrics. This keeps the line data structure small as we don't need to keep easily derived values around. (WebCore::SimpleLineLayout::Resolver::Resolver): (WebCore::SimpleLineLayout::Resolver::size): (WebCore::SimpleLineLayout::Resolver::begin): (WebCore::SimpleLineLayout::Resolver::end): (WebCore::SimpleLineLayout::Resolver::last): (WebCore::SimpleLineLayout::Resolver::operator[]): 2013-10-24 Myles C. Maxfield Gaps between underlines in adjacent underlined text runs https://bugs.webkit.org/show_bug.cgi?id=123236 Reviewed by Simon Fraser and Darin Adler. There are two pieces to this change. The first piece is in InlineTextBox::paint(). We were putting floating-point extents into a LayoutSize, which simply uses ints (for now), and then immediately converting this back to a FloatSize. Instead, we should be using floats throughout all of this code. In addition, inside GraphicsContext::drawLineForText(), we are rounding the underline to pixel boundaries so that it appears very crisp on the screen. However, we should round once after performing computations, rather than rounding twice and then performing computations on the rounded numbers. Test: fast/css3-text/css3-text-decoration/no-gap-between-two-rounded-textboxes.html * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawLineForText): Change rounding mode to perform computations before rounding * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): Don't convert to a LayoutSize just to convert to a FloatSize 2013-10-24 Andreas Kling SVGRenderingContext should wrap a RenderElement. The SVG rendering context class is never used with text renderers so we can have it wrap a RenderElement for tighter code. Also renamed SVGRenderingContext::m_object to m_renderer. Reviewed by Antti Koivisto. 2013-10-24 Santosh Mahto [contenteditable] Content after non-editable element disappears when merging lines using backspace https://bugs.webkit.org/show_bug.cgi?id=122748 Reviewed by Ryosuke Niwa. In case of paragraph merging after deletion if second paragraph contains non-editable element, then content after the non-editable element(including non-editable element) will be removed while the content before the element will be merged with the first paragraph. This happens becasue endOfParagraphToMove calculation in merging function stop at editing boundary so endOfParagraphToMove becomes position just before non-editable content. With this patch now endOfParagraphToMove is calculated by skipping over the non-editable element. Test: editing/deleting/merge-paragraph-contatining-noneditable.html * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): use CanSkipOverEditingBoundary condition while calculating endOfParagraphToMove. 2013-10-24 Antoine Quint Web Inspector: Inspector doesn't show webkitTransitionEnd events in the timeline https://bugs.webkit.org/show_bug.cgi?id=123263 Reviewed by Timothy Hatcher. A legacy event type is only set on an event in EventTarget::fireEventListeners(Event*) which is called after we used to call InspectorInstrumentation::willDispatchEvent(), the method that would ultimately yield the creation of a TimelineRecord for the event in the Web Inspector frontend, and as a result we would try to dispatch an event with an unprefixed event type to the frontend, which wouldn't even happen because most likely it wouldn't have listeners for this unprefixed type. We now move the call to InspectorInstrumentation::willDispatchEvent() in EventTarget::fireEventListeners(Event*, EventTargetData*, EventListenerVector&) such that the correct event type and list of listeners is used to determine what event to dispatch to the frontend. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchEvent): Remove calls to InspectorInstrumentation::willDispatchEvent() and InspectorInstrumentation::didDispatchEvent(). * dom/EventTarget.cpp: (WebCore::EventTarget::fireEventListeners): Add call to InspectorInstrumentation::willDispatchEvent() before we go through each listener and call InspectorInstrumentation::willHandleEvent(). Additionally, we refactor some code since we're getting references to the ScriptExecutionContext and Document upfront now. 2013-10-24 Andreas Kling SVG: RenderElement-ize intersectRepaintRectWithResources(). SVGRenderSupport::intersectRepaintRectWithResources() is only ever called with non-text renderers so make it take RenderElement&. Had to tweak RenderSVGResource::resourceBoundingBox() to take the renderer by reference. Reviewed by Antti Koivisto. 2013-10-24 Joseph Pecoraro Web Inspector: Breakpoints in sourceURL named scripts do not work https://bugs.webkit.org/show_bug.cgi?id=123231 Reviewed by Timothy Hatcher. Remember a Script's sourceURL and sourceMappingURL. When setting a breakpoint by URL, check it against the sourceURL or original URL. If a script had a sourceURL that would have been the only URL sent to the frontend, so that receives priority. Test: inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: * inspector/ScriptDebugListener.h: 2013-10-23 Alexey Proskuryakov Add CryptoKey base class and bindings https://bugs.webkit.org/show_bug.cgi?id=123216 Reviewed by Sam Weinig. * crypto/CryptoKey.idl: Added. * CMakeLists.txt: * DerivedSources.make: * GNUmakefile.list.am: Process the IDL. * WebCore.xcodeproj/project.pbxproj: Added files. * bindings/js/JSCryptoKeyCustom.cpp: Added. (WebCore::JSCryptoKey::algorithm): Use a visitor to build algorithm dictionary for the key. * crypto/CryptoAlgorithmDescriptionBuilder.cpp: Added. * crypto/CryptoAlgorithmDescriptionBuilder.h: Added. An interface for a visitor we'll use to expose CrytoKey.algorithm in bindings, and possibly also for storage serialization. Not complete yet, we'll need support for a few more simple types, and less trivially, for nested algorithms. * bindings/js/JSCryptoAlgorithmBuilder.cpp: Added. * bindings/js/JSCryptoAlgorithmBuilder.h: Added. An implementation that builds an algorithm description dictionary for JS bindings. * crypto/CryptoKey.cpp: Added. (WebCore::CryptoKey::~CryptoKey): (WebCore::CryptoKey::buildAlgorithmDescription): * crypto/CryptoKey.h: Added. Added an almost empty implementation. Some of the functions that are currently marked as pure virtual will likely be implemented in this base class. 2013-10-24 Commit Queue Unreviewed, rolling out r157916. http://trac.webkit.org/changeset/157916 https://bugs.webkit.org/show_bug.cgi?id=123274 Broke Layout/flexbox-lots-of-data.html on perfbot (Requested by ap on #webkit). * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::OrderHashTraits::emptyValue): (WebCore::RenderFlexibleBox::OrderHashTraits::constructDeletedValue): (WebCore::RenderFlexibleBox::OrderHashTraits::isDeletedValue): (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues): (WebCore::RenderFlexibleBox::layoutBlock): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): * rendering/RenderFlexibleBox.h: 2013-10-24 Zan Dobersek Comment in ScopedEventQueue::dispatchEvent is unnecessarily verbose https://bugs.webkit.org/show_bug.cgi?id=123252 Reviewed by Darin Adler. Shorten the comment about the crash avoidance in ScopedEventQueue::dispatchEvent due to the calling convention in C++ is left unspecified. The problem was already fixed in r157219 and later adjusted in r157401, but the comment could have been shorter and simpler in both cases. * dom/ScopedEventQueue.cpp: (WebCore::ScopedEventQueue::dispatchEvent): 2013-10-24 Alex Christensen Removed unused ThreadSafeCoordinatedSurface and CertificateInfoCurl files. https://bugs.webkit.org/show_bug.cgi?id=123246 Reviewed by Noam Rosenthal. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: Removed references to ThreadSafeCoordinatedSurface and CertificateInfoCurl. * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp: Removed. * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h: Removed. * platform/network/curl/CertificateInfoCurl.cpp: Removed. 2013-10-24 Peter Molnar Removed Qt workaround. https://bugs.webkit.org/show_bug.cgi?id=123258 Reviewed by Csaba Osztrogonác. No change of functionality, no new tests needed. !$defines case can be removed, because Qt and Android aren't in WebKit trunk, all ports (Mac,EFL,GTK,Windows) call this script with --defines option now * css/make-css-file-arrays.pl: 2013-10-24 Antti Koivisto Remove a stray space. Not reviewed. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::addImageMapChildren): 2013-10-24 Antti Koivisto Element iterator functions should take reference https://bugs.webkit.org/show_bug.cgi?id=123267 Reviewed by Andreas Kling. The argument has to be non-null. 2013-10-24 Ryuan Choi [EFL] Build break with latest EFL 1.8 libraries. https://bugs.webkit.org/show_bug.cgi?id=123245 Reviewed by Gyuyoung Kim. After fixed build break on EFL 1.8 at r138326, EFL libraries are changed Eo typedef and splitted header files which contain version macro. * platform/Widget.h: Changed Eo typedef. * platform/efl/EflScreenUtilities.h: Ditto. * platform/graphics/Image.h: Ditto. 2013-10-24 Andreas Kling RenderSVGResource: Pass RenderElement to fill/strokePaintingResource. We never pass text renderers to these functions, so make them take RenderElement instead. Reviewed by Anders Carlsson. 2013-10-24 Carlos Garcia Campos [GObject bindings] Make EventTarget interface introspectable https://bugs.webkit.org/show_bug.cgi?id=77835 Reviewed by Gustavo Noronha Silva. Add webkit_dom_event_target_add_event_listener_with_closure and webkit_dom_event_target_remove_event_listener_with_closure to be used by GObject instrospection bindings. Instead of receving a GCallback, which makes the function not introspectable, they receive a GClosure. * bindings/gobject/GObjectEventListener.cpp: (WebCore::GObjectEventListener::GObjectEventListener): (WebCore::GObjectEventListener::~GObjectEventListener): (WebCore::GObjectEventListener::gobjectDestroyed): (WebCore::GObjectEventListener::handleEvent): (WebCore::GObjectEventListener::operator==): * bindings/gobject/GObjectEventListener.h: (WebCore::GObjectEventListener::addEventListener): (WebCore::GObjectEventListener::removeEventListener): * bindings/gobject/WebKitDOMEventTarget.cpp: (webkit_dom_event_target_dispatch_event): (webkit_dom_event_target_add_event_listener): (webkit_dom_event_target_remove_event_listener): (webkit_dom_event_target_add_event_listener_with_closure): (webkit_dom_event_target_remove_event_listener_with_closure): * bindings/gobject/WebKitDOMEventTarget.h: * bindings/scripts/CodeGeneratorGObject.pm: (GenerateEventTargetIface): * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: (webkit_dom_test_event_target_dispatch_event): (webkit_dom_test_event_target_add_event_listener): (webkit_dom_test_event_target_remove_event_listener): * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp: (webkit_dom_test_node_dispatch_event): (webkit_dom_test_node_add_event_listener): (webkit_dom_test_node_remove_event_listener): 2013-10-14 Sergio Villar Senin Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox https://bugs.webkit.org/show_bug.cgi?id=118620 Reviewed by Antti Koivisto. Turns out that order is extremelly uncommon so using a Vector is much less expensive. This also special-cases the much common case of only having order of value 0 by using Vectors with just one preallocated member. Also added the performance test that shows a ~1% win when using a vector instead of the HashSet. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues): (WebCore::RenderFlexibleBox::layoutBlock): (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): * rendering/RenderFlexibleBox.h: 2013-10-23 ChangSeok Oh Unreviewed build fix since r157823. FilterOperation::getOperationType() is renamed FilterOperation::type(). * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::prepareFilterProgram): (WebCore::TextureMapperGL::drawTexture): (WebCore::TextureMapperGL::drawUsingCustomFilter): (WebCore::TextureMapperGL::drawFiltered): (WebCore::BitmapTextureGL::applyFilters): * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp: (WebCore::CoordinatedGraphicsScene::injectCachedCustomFilterPrograms): 2013-10-23 Ryuan Choi Unreviewed build fix on CMake based ports when CMAKE_BUILD_TYPE is not given. When CMAKE_BUILD_TYPE is empty, FIND command will be failed. * CMakeLists.txt: 2013-10-23 Gyuyoung Kim Integrate css3-images image-orientation with existing EXIF support https://bugs.webkit.org/show_bug.cgi?id=91566 Reviewed by Beth Dakin. Original patch by David Barr(davidbarr@chromium.org). This patch passes an information of image orientation into existing EXIF support functions (draw() functions of image classes mainly). We need to let the functions to know the information in order to meet the image-orientation requirement. Spec: http://dev.w3.org/csswg/css-images-3/#the-image-orientation The css3-images module specification is at last call. Test: fast/css/image-orientation/image-orientation.html Image orientation test is to check if incorrect rotation value can be fixed with correct orientation. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::imageSizeForRenderer): * page/DragController.cpp: (WebCore::DragController::doImageDrag): * page/Frame.cpp: (WebCore::Frame::nodeImage): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::updateSize): (WebCore::BitmapImage::sizeRespectingOrientation): (WebCore::BitmapImage::drawPattern): * platform/graphics/BitmapImage.h: * platform/graphics/CrossfadeGeneratedImage.cpp: (WebCore::CrossfadeGeneratedImage::draw): * platform/graphics/CrossfadeGeneratedImage.h: * platform/graphics/GeneratedImage.h: * platform/graphics/GradientImage.cpp: (WebCore::GradientImage::draw): * platform/graphics/GradientImage.h: * platform/graphics/Image.cpp: (WebCore::Image::draw): (WebCore::Image::drawTiled): * platform/graphics/Image.h: * platform/graphics/blackberry/ImageBlackBerry.cpp: * platform/graphics/cairo/BitmapImageCairo.cpp: (WebCore::BitmapImage::draw): * platform/graphics/cg/BitmapImageCG.cpp: * platform/graphics/cg/PDFDocumentImage.cpp: (WebCore::PDFDocumentImage::draw): * platform/graphics/cg/PDFDocumentImage.h: * platform/graphics/win/ImageCGWin.cpp: (WebCore::BitmapImage::getHBITMAPOfSize): (WebCore::BitmapImage::drawFrameMatchingSourceSize): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::BufferedImage::draw): * platform/graphics/wince/ImageWinCE.cpp: (WebCore::BitmapImage::draw): * platform/mac/DragImageMac.mm: (WebCore::createDragImageFromImage): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintSnapshotImage): * rendering/RenderImage.cpp: (WebCore::RenderImage::styleDidChange): * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::paintSnapshot): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeRequiresLayout): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawForContainer): (WebCore::SVGImage::nativeImageForCurrentFrame): (WebCore::SVGImage::draw): * svg/graphics/SVGImage.h: * svg/graphics/SVGImageForContainer.cpp: (WebCore::SVGImageForContainer::draw): * svg/graphics/SVGImageForContainer.h: 2013-10-23 Andreas Kling Tighten typing in SVGInlineTextBox a bit. Use RenderBoxModelObject& instead of generic RenderObject* in some places where it happens as a natural consequence of keeping the original return type from InlineBox::parent()->renderer(). Reviewed by Anders Carlsson. 2013-10-23 Gyuyoung Kim Introduce RENDER_OBJECT_TYPE_CASTS to replace manual toFoo() in child render object https://bugs.webkit.org/show_bug.cgi?id=123150 Reviewed by Andreas Kling. As a step to let toFoo use TYPE_CASTS_BASE, toRenderFoo() can use it for child render object. So, this patch introduces RENDER_OBJECT_TYPE_CASTS based on the TYPE_CASTS_BASE. This will generate plenty more helper functions for render object type cast. Some unnecessary type casts are fixed by this change. No new tests, no behavior changes. * rendering/RenderBlock.h: * rendering/RenderBlockFlow.h: * rendering/RenderBox.h: * rendering/RenderBoxModelObject.h: * rendering/RenderButton.h: * rendering/RenderCounter.h: * rendering/RenderElement.h: (WebCore::RenderElement::generatingElement): * rendering/RenderEmbeddedObject.h: * rendering/RenderFieldset.h: * rendering/RenderFileUploadControl.h: * rendering/RenderFlexibleBox.h: * rendering/RenderFlowThread.h: * rendering/RenderFrame.h: * rendering/RenderFrameSet.h: * rendering/RenderFullScreen.h: * rendering/RenderHTMLCanvas.h: * rendering/RenderIFrame.h: * rendering/RenderImage.h: * rendering/RenderInline.h: * rendering/RenderLayerModelObject.h: * rendering/RenderLineBreak.h: * rendering/RenderListBox.h: * rendering/RenderListItem.h: * rendering/RenderMedia.h: * rendering/RenderMenuList.h: * rendering/RenderMeter.h: * rendering/RenderMultiColumnBlock.h: * rendering/RenderMultiColumnSet.h: * rendering/RenderNamedFlowFragment.h: * rendering/RenderNamedFlowThread.h: * rendering/RenderObject.h: * rendering/RenderProgress.h: * rendering/RenderQuote.h: * rendering/RenderRegion.h: * rendering/RenderReplaced.h: * rendering/RenderRubyRun.h: * rendering/RenderScrollbarPart.h: * rendering/RenderSearchField.h: * rendering/RenderSlider.h: * rendering/RenderSnapshottedPlugIn.h: * rendering/RenderTable.h: * rendering/RenderTableCaption.h: * rendering/RenderTableCell.h: * rendering/RenderTableCol.h: * rendering/RenderTableRow.h: * rendering/RenderTableSection.h: * rendering/RenderText.h: * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.h: * rendering/RenderWidget.h: * rendering/mathml/RenderMathMLBlock.h: * rendering/svg/RenderSVGContainer.h: * rendering/svg/RenderSVGGradientStop.h: * rendering/svg/RenderSVGImage.h: * rendering/svg/RenderSVGInlineText.h: * rendering/svg/RenderSVGPath.h: * rendering/svg/RenderSVGResourceFilter.h: * rendering/svg/RenderSVGResourceFilterPrimitive.cpp: (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGShape.h: * rendering/svg/RenderSVGText.h: * rendering/svg/RenderSVGTextPath.h: * rendering/svg/RenderSVGViewportContainer.h: * rendering/svg/SVGInlineFlowBox.cpp: (WebCore::SVGInlineFlowBox::paint): 2013-10-23 Myles C. Maxfield Include misspelling dot gap width when centering misspelling dots https://bugs.webkit.org/show_bug.cgi?id=122365 Reviewed by Simon Fraser. When calculating where to place the misspelling dots, we find the maximum number of full dots that can fit under the misspelled word, and then center a run of that many dots. However, when we're centering the run, we are only considering the size of the extra fractional dot that we cut off. However, the dot image has a "gap" of transparent pixels (which visually provide tracking for the dots) which visually appears to be empty space. We should take this gap space into consideration when centering the run of dots. We also should make sure that our dots start on integral pixel boundaries because otherwise we can't set the phase of the dot run properly. Test: editing/spelling/centering-misspelling-dots.html * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawLineForDocumentMarker): 2013-10-23 Andreas Kling SVGFilterBuilder should not be ref-counted. These objects are singly-owned and do not need ref counting. Reviewed by Anders Carlsson. 2013-10-23 Brady Eidson Remove unused IDBBackingStoreLevelDB default constructor. Rubberstamped by Anders Carlsson. * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: 2013-10-23 Alex Christensen Added Texture Mapper and Coordinated Graphics to Windows build for WinCairo. https://bugs.webkit.org/show_bug.cgi?id=123215 Reviewed by Brent Fulgham. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: Added source files for Texture Mapper to Windows build. * WebCore.vcxproj/WebCoreCairo.props: Added Texture Mapper include directories for WinCairo. 2013-10-23 Thiago de Barros Lacerda Adding mock class to test RTCDataChannelHandler https://bugs.webkit.org/show_bug.cgi?id=123205 Reviewed by Eric Carlson. Now RTCPeerConnectionHandler-datachannel LayouTest can run properly. Also updated the expected file, removing the reliable property check (which was removed in the spec) Existing tests updated. * CMakeLists.txt: * platform/mediastream/RTCDataChannelHandlerClient.h: * platform/mock/RTCDataChannelHandlerMock.cpp: Added. * platform/mock/RTCDataChannelHandlerMock.h: Added. * platform/mock/RTCNotifiersMock.cpp: (WebCore::RemoteDataChannelNotifier::RemoteDataChannelNotifier): (WebCore::RemoteDataChannelNotifier::fire): (WebCore::DataChannelStateNotifier::DataChannelStateNotifier): (WebCore::DataChannelStateNotifier::fire): * platform/mock/RTCNotifiersMock.h: * platform/mock/RTCPeerConnectionHandlerMock.cpp: (WebCore::RTCPeerConnectionHandlerMock::createDataChannel): 2013-10-23 Andreas Kling Clock should not be ref-counted. The Clock object is only ever owned by the MediaController, so remove the ref counting and store it in a std::unique_ptr. Also slapped the Clock subclasses with FINAL and OVERRIDE. Reviewed by Anders Carlsson. 2013-10-23 Mark Lam Fix assertion in DatabaseManager::detailsForNameAndOrigin() to be iOS friendly. https://bugs.webkit.org/show_bug.cgi?id=123218. Reviewed by Joseph Pecoraro. No new tests. * Modules/webdatabase/DatabaseManager.cpp: (WebCore::DatabaseManager::detailsForNameAndOrigin): 2013-10-23 Alex Christensen Separated USE(CA) from USE(ACCELERATED_COMPOSITING) to prepare WinCairo for accelerated compositing. https://bugs.webkit.org/show_bug.cgi?id=123214 Reviewed by Brent Fulgham. * platform/graphics/PlatformLayer.h: Added TextureMapperPlatformLayer PlatformLayer declaration for WinCairo. * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): (WebCore::MediaPlayerPrivateFullscreenWindow::wndProc): * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Added USE(CA) where necessary to compile WinCairo with accelerated compositing. 2013-10-23 Myles C. Maxfield Antialias underlines if they're not axis-aligned https://bugs.webkit.org/show_bug.cgi?id=123004 Reviewed by Simon Fraser. In order to make underlines crisp, GraphicsContext:drawLineForText modifies the bounds of the underline rect in order to make the rect device-pixel-aligned, and then turns off antialiasing when drawing the line. This makes sense when the underline is axis-aligned, but doesn't when the rect is rotated or skewed. Therefore, we should only opt-in to this behavior if the underline we're about to draw is axis-aligned. This requires figuring out whether or not the current transformation is axis-aligned every time GraphicsContext::drawLineForText is called, which will incur a small performance hit. However, this is justified by underlines looking much better (antialiased) when the context is rotated or skewed. Tests: svg/custom/foreign-object-skew.html svg/zoom/page/zoom-foreignObject.html svg/zoom/text/zoom-foreignObject.html: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawLineForText): 2013-10-23 Mark Lam Re-instate ProposedDatabases needed by detailsForNameAndOrigin(). https://bugs.webkit.org/show_bug.cgi?id=123131. Reviewed by Geoffrey Garen. Test: storage/websql/open-database-expand-quota.html If a webpage tries to create a database that exceeds the database size quota for that security origin, the WebKit1 quota request mechanism uses detailsForNameAndOrigin() to get the requested size of the database (that the webpage is attempting to open) in order to determine whether to increase the quota or not. Previously, detailsForNameAndOrigin() relies on the ProposedDatabase mechanism to provide this size information. This change re-instates the ProposedDatabase mechanism so that WebKit1 client code that relies on this behavior will continue to work. * Modules/webdatabase/DatabaseManager.cpp: (WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase): (WebCore::DatabaseManager::ProposedDatabase::~ProposedDatabase): (WebCore::DatabaseManager::DatabaseManager): (WebCore::DatabaseManager::openDatabaseBackend): (WebCore::DatabaseManager::fullPathForDatabase): (WebCore::DatabaseManager::detailsForNameAndOrigin): * Modules/webdatabase/DatabaseManager.h: (WebCore::DatabaseManager::ProposedDatabase::origin): (WebCore::DatabaseManager::ProposedDatabase::details): 2013-10-23 Tim Horton [cg] Fix the capitalization of kCGImageSourceSkipMetaData (-> Metadata) https://bugs.webkit.org/show_bug.cgi?id=122918 Reviewed by Anders Carlsson. * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::imageSourceOptions): The capitalization of kCGImageSourceSkipMetaData changed to kCGImageSourceSkipMetadata in Mountain Lion. 2013-10-23 Brady Eidson Make IDBDatabaseBackendLevelDB.cpp be cross platform https://bugs.webkit.org/show_bug.cgi?id=123027 Attentively reviewed by Dean Jackson. Move it out of the indexeddb/leveldb directory, and rename it to IDBDatabaseBackendImpl. Project files: * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp. * Modules/indexeddb/IDBDatabaseBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h. * Modules/indexeddb/IDBDatabaseBackendInterface.h: (WebCore::IDBDatabaseBackendInterface::isIDBDatabaseBackendImpl): Add to support a required cast in LevelDB code. * Modules/indexeddb/IDBFactoryBackendInterface.h: * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp: * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h: * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: (WebCore::IDBFactoryBackendLevelDB::deleteDatabase): (WebCore::IDBFactoryBackendLevelDB::open): (WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend): * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp: * Modules/indexeddb/leveldb/IDBLevelDBCoding.h: * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp: (WebCore::IDBTransactionBackendLevelDB::create): (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB): (WebCore::IDBTransactionBackendLevelDB::scheduleVersionChangeOperation): * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h: * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp: (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform): (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform): * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h: 2013-10-23 Daniel Bates [iOS] Upstream more ARMv7s bits https://bugs.webkit.org/show_bug.cgi?id=123052 Reviewed by Joseph Pecoraro. Define exported symbol file for armv7s and arm64. * Configurations/WebCore.xcconfig: 2013-10-23 Krzysztof Wolanski [GTK] accessibility/self-referencing-aria-labelledby.html is failing https://bugs.webkit.org/show_bug.cgi?id=121594 Reviewed by Mario Sanchez Prada. According to http://www.w3.org/TR/REC-html40/struct/objects.html#edef-IMG description of image element should be determined by alt attribute, then if it is empty by title attributte. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetDescription): 2013-10-15 Andreas Kling Tighten animation-driven restyle to operate on Element only. Text nodes are never directly animated, so we can tighten this code to work on Element only. This happens naturally since the code was already working with RenderElement everywhere. Reviewed by Antti Koivisto. 2013-10-22 Andreas Kling Even more PassRef! Convert more of the WebCore code to use PassRef for RenderStyle in places where they are known to be non-null. Re-landing this without region styling since that caused some assertions last time. Reviewed by Antti Koivisto. 2013-10-22 Zoltan Horvath Refactor LineBreaker::nextSegmentBreak, add BreakingContext that holds all its state https://bugs.webkit.org/show_bug.cgi?id=123038 Reviewed by David Hyatt. I followed Levi's logic on Blink's nextSegmentBreak refactoring (https://chromiumcodereview.appspot.com/25054004). I mostly did the same changes, but the code is too diverged at this point to just apply that patch on our trunk. The patch introduces BreakingContext as a separate class. I added new methods for each condition, which were originally located in nextSegmentBreak. I also removed the goto-s from the code. All the new methods are inline in order to avoid introducing any performance regression. The change makes the code so much cleaner and understandable. This change would be the first step of the nextSegmentBreak refactoring, I wanted to keep things in place in RenderBlockLineLayout.cpp for now, but I'm planning to separate BreakingContext into a new file and do additional changes to make things nicer. I'm tracking the entire progress under http://webkit.org/b/121261 meta bug. No new tests, covered by existing tests. - I updated 1 expected result, because there was a 1 pixel difference on the result, which I believe comes from a rounding situation. * rendering/RenderBlockFlow.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::BreakingContext::BreakingContext): (WebCore::BreakingContext::currentObject): (WebCore::BreakingContext::lineBreak): (WebCore::BreakingContext::lineBreakRef): (WebCore::BreakingContext::lineWidth): (WebCore::BreakingContext::atEnd): (WebCore::BreakingContext::clearLineBreakIfFitsOnLine): (WebCore::BreakingContext::commitLineBreakAtCurrentWidth): (WebCore::BreakingContext::initializeForCurrentObject): (WebCore::BreakingContext::increment): (WebCore::BreakingContext::handleBR): (WebCore::BreakingContext::handleOutOfFlowPositioned): (WebCore::BreakingContext::handleFloat): (WebCore::BreakingContext::handleEmptyInline): (WebCore::BreakingContext::handleReplaced): (WebCore::nextCharacter): (WebCore::BreakingContext::handleText): (WebCore::textBeginsWithBreakablePosition): (WebCore::BreakingContext::canBreakAtThisPosition): (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): (WebCore::BreakingContext::handleEndOfLine): (WebCore::LineBreaker::nextSegmentBreak): 2013-10-22 Commit Queue Unreviewed, rolling out r157826. http://trac.webkit.org/changeset/157826 https://bugs.webkit.org/show_bug.cgi?id=123197 Caused some regions tests to assert (Requested by smfr on #webkit). * dom/Document.cpp: (WebCore::Document::styleForElementIgnoringPendingStylesheets): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::styleForRenderer): * dom/Element.h: * dom/ElementRareData.h: (WebCore::ElementRareData::setComputedStyle): (WebCore::ElementRareData::resetComputedStyle): * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::textWithDirection): * page/animation/AnimationController.cpp: (WebCore::AnimationController::updateAnimations): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::animate): * page/animation/CompositeAnimation.h: * rendering/RenderElement.cpp: (WebCore::RenderElement::createFor): * rendering/RenderElement.h: (WebCore::RenderElement::setStyleInternal): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::setRegionObjectsRegionStyle): (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle): (WebCore::RenderRegion::computeStyleInRegion): (WebCore::RenderRegion::computeChildrenStyleInRegion): (WebCore::RenderRegion::setObjectStyleInRegion): * rendering/RenderRegion.h: * style/StyleResolveTree.cpp: (WebCore::Style::resolveLocal): 2013-10-22 Ryuan Choi [EFL] Remove HAVE_GLX macro https://bugs.webkit.org/show_bug.cgi?id=123191 Reviewed by Gyuyoung Kim. Since r138313, HAVE(GLX) was replaced to USE(GLX) except in GraphicsSurfaceToken.h. * platform/graphics/surfaces/GraphicsSurfaceToken.h: Replace HAVE(GLX) to USE(GLX) 2013-10-22 Mark Lam Gardening: fix broken build on Windows. https://bugs.webkit.org/show_bug.cgi?id=123174. Not reviewed. No new tests. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: 2013-10-22 Brady Eidson Get rid of IDBObjectStoreBackendLevelDB https://bugs.webkit.org/show_bug.cgi?id=123174 Reviewed by Tim Horton. This file was kind of a dumping ground. Its contents can be merged into IDBBackingStoreInterface and a new IDBIndexWriter class. Also took the opportunity to do a little bit of RefPtr<> and pointer-vs-reference cleanup. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.xcodeproj/project.pbxproj: * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Removed. * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Removed. * Modules/indexeddb/IDBIndexWriter.cpp: Added. (WebCore::IDBIndexWriter::IDBIndexWriter): (WebCore::IDBIndexWriter::writeIndexKeys): (WebCore::IDBIndexWriter::verifyIndexKeys): (WebCore::IDBIndexWriter::addingKeyAllowed): * Modules/indexeddb/IDBIndexWriter.h: Added. (WebCore::IDBIndexWriter::create): * Modules/indexeddb/IDBBackingStoreInterface.h: * Modules/indexeddb/IDBDatabaseBackendInterface.h: * Modules/indexeddb/IDBMetadata.h: * Modules/indexeddb/IDBTransactionBackendInterface.h: * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: (WebCore::IDBBackingStoreLevelDB::makeIndexWriters): (WebCore::IDBBackingStoreLevelDB::generateKey): (WebCore::IDBBackingStoreLevelDB::updateKeyGenerator): * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp: (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys): (WebCore::IDBDatabaseBackendLevelDB::setIndexesReady): * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h: * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp: (WebCore::IDBTransactionBackendLevelDB::schedulePutOperation): * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h: * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp: (WebCore::PutOperation::perform): * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h: (WebCore::PutOperation::create): (WebCore::PutOperation::PutOperation): 2013-10-22 Dean Jackson [WebGL] Implement a software rendering option on Mac https://bugs.webkit.org/show_bug.cgi?id=123177 Reviewed by Tim Horton. Implement a way to force software OpenGL rendering for WebGL, via a Setting/Preference. No new tests. We intentionally hide the capabilities of the renderer from the content, so you can't test for this setting. However, manual inspection is pretty obvious. Just go to a page with a complex shader such as https://www.shadertoy.com/view/lss3WS. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::create): If we're forcing software rendering, mark the context attributes as such. * page/Settings.in: New setting key. * platform/graphics/GraphicsContext3D.h: New flag in Attributes. (WebCore::GraphicsContext3D::Attributes::Attributes): * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): Slight update to the algorithm that sets a pixel format. If we're forcing software rendering, obviously we never want to create an accelerated pixel format. * platform/graphics/filters/CustomFilterGlobalContext.cpp: (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded): Set the attribute here before trying to create the context. * platform/graphics/filters/CustomFilterGlobalContext.h: Add a forceSoftwareRendering flag to prepareContextIfNeeded. * rendering/FilterEffectRenderer.cpp: (WebCore::createCustomFilterEffect): Check the Setting before creating a custom filter context. 2013-10-22 Anders Carlsson Revert r157445 since it broke certificates on Mac. * GNUmakefile.list.am: * PlatformEfl.cmake: * WebCore.exp.in: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * platform/network/ResourceErrorBase.h: * platform/network/ResourceResponseBase.h: * platform/network/cf/CertificateInfoCFNet.cpp: Removed. * platform/network/cf/ResourceResponse.h: * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::setCertificateChain): (WebCore::ResourceResponse::certificateChain): * platform/network/soup/ResourceError.h: (WebCore::ResourceError::ResourceError): (WebCore::ResourceError::tlsErrors): (WebCore::ResourceError::setTLSErrors): (WebCore::ResourceError::certificate): (WebCore::ResourceError::setCertificate): * platform/network/soup/ResourceErrorSoup.cpp: (WebCore::ResourceError::tlsError): (WebCore::ResourceError::platformCopy): (WebCore::ResourceError::platformCompare): * platform/network/soup/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): (WebCore::ResourceResponse::soupMessageCertificate): (WebCore::ResourceResponse::setSoupMessageCertificate): (WebCore::ResourceResponse::soupMessageTLSErrors): (WebCore::ResourceResponse::setSoupMessageTLSErrors): * platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::toSoupMessage): (WebCore::ResourceResponse::updateFromSoupMessage): 2013-10-22 Jer Noble [Media] Refactor supportsType() factory method to take a parameters object. https://bugs.webkit.org/show_bug.cgi?id=122489 Reviewed by Eric Carlson. In order to support adding new conditional properties with which to decide what MediaPlayerPrivate subclass to create, replace the two versions of the supportsType() factory method with a single one taking a parameters object. At the same time, add a 'isMediaSource' parameter to that object, allowing MediaPlayerPrivate subclasses which support the same type and codecs but which do not both support MediaSource to be distinguised. * platform/graphics/MediaPlayer.cpp: (WebCore::bestMediaEngineForSupportParameters): Renamed from bestMediaEngineForTypeAndCodecs. (WebCore::MediaPlayer::nextBestMediaEngine): Added convenience function. (WebCore::MediaPlayer::loadWithNextMediaEngine): Call nextBestMediaEngine() (WebCore::MediaPlayer::supportsType): Pass parameter object. (WebCore::MediaPlayer::networkStateChanged): Call nextBestMediaEngine(). * platform/graphics/MediaPlayer.h: * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Handle parameter object. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Remove extraneous extendedSupportsType method. (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Handle parameter object. * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp: (WebCore::MediaPlayerPrivate::supportsType): Ditto. * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Remove extraneous extendedSupportsType method. (WebCore::MediaPlayerPrivateQTKit::supportsType): Handle parameter object. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType): Ditto. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: * platform/graphics/wince/MediaPlayerPrivateWinCE.h: 2013-10-22 Andreas Kling Merge SVGRenderBlock::styleWillChange() into styleDidChange(). I meant to do this one in r157787, but better late than never. Reviewed by Geoffrey Garen. 2013-10-22 Sam Weinig CTTE: Modernize RenderBlock a bit https://bugs.webkit.org/show_bug.cgi?id=123162 Reviewed by Andreas Kling. Start threading references through RenderBlock. While we are here, do some selective modernization as well. 2013-10-22 Andreas Kling Even more PassRef! Convert the remaining WebCore code to use PassRef for RenderStyle wherever they are known to be non-null. Reviewed by Antti Koivisto. 2013-10-22 Commit Queue Unreviewed, rolling out r157819. http://trac.webkit.org/changeset/157819 https://bugs.webkit.org/show_bug.cgi?id=123180 Broke 32-bit builds (Requested by smfr on #webkit). * Configurations/WebCore.xcconfig: 2013-10-22 Antti Koivisto Rename deleteLineBoxTree to deleteLines https://bugs.webkit.org/show_bug.cgi?id=123176 Reviewed by Andreas Kling. RenderBlock::deleteLineBoxTree -> RenderBlock::deleteLines RenderInline::deleteLineBoxTree -> RenderInline::deleteLines 2013-10-22 Tim Horton {ClipPathOperation, FilterOperation}::getOperationType() should not include 'get' https://bugs.webkit.org/show_bug.cgi?id=123172 Reviewed by Simon Fraser. No new tests, just a rename. "get" in WebCore tends to mean that the function has out arguments; these have no arguments. Rename FilterOperation::getOperationType() to FilterOperation::type(). I noticed that ClipPathOperation had the same mistake, so I fixed it there too. Removed long and useless list of files. 2013-10-22 Samuel White AX: Add paramAttrs to fetch start and end text markers in a given rect. https://bugs.webkit.org/show_bug.cgi?id=122164 Reviewed by Chris Fleizach. Added ability to fetch end and start text markers inside a given bounds. This gives ScreenReaders like VoiceOver a way to retrieve the text markers for a specified column of page text. Test: platform/mac/accessibility/text-marker-for-bounds.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::mainFrame): (WebCore::AccessibilityObject::topDocument): (WebCore::AccessibilityObject::visiblePositionForBounds): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: * accessibility/AccessibilityRenderObject.h: * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper screenToContents:]): (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 2013-10-22 Zoltan Horvath [CSS Shapes] Match adjustLogicalLineTopAndLogicalHeightIfNeeded's implementation with Blink's https://bugs.webkit.org/show_bug.cgi?id=123033 Reviewed by David Hyatt. In Blink I made this function in a bit different way. This change modifies it to be identical, which helps a lot in the future cross-merging patches. No new tests, covered by existing texts. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded): 2013-10-22 Daniel Bates [iOS] Upstream more ARMv7s bits https://bugs.webkit.org/show_bug.cgi?id=123052 Reviewed by Joseph Pecoraro. * Configurations/WebCore.xcconfig: 2013-10-22 Simon Fraser Try to fix Mavericks build; use <> for framework include. * page/CaptionUserPreferencesMediaAF.cpp: 2013-10-22 Tim Horton GammaFilterOperation seems to be dead code https://bugs.webkit.org/show_bug.cgi?id=123173 Reviewed by Simon Fraser. * platform/graphics/filters/FilterOperation.cpp: * platform/graphics/filters/FilterOperation.h: Remove dead code. 2013-10-22 Antti Koivisto Rename some line box functions to be just about lines https://bugs.webkit.org/show_bug.cgi?id=123168 Reviewed by Dave Hyatt. firstLineBoxBaseline -> firstLineBaseline hasInlineBoxChildren -> hasLines Also use hasLines in a bunch of places where firstLineBox() was used. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): Also use hasRenderedText() instead of firstTextBox() * rendering/RenderFullScreen.cpp: Fix namespace. 2013-10-22 Thiago de Barros Lacerda Adding Mock class to test RTCPeerConnection https://bugs.webkit.org/show_bug.cgi?id=122848 Reviewed by Eric Carlson. The following tests can be run: RTCPeerConnection-createAnswer.html RTCPeerConnection-createOffer.html RTCPeerConnection-ice.html RTCPeerConnection-localDescription.html RTCPeerConnection-remoteDescription.html RTCPeerConnection-state.html Tests that require a MediaStream object, by invoking getUserMedia, are not ready to run yet. No new tests needed. * CMakeLists.txt: * platform/mediastream/RTCPeerConnectionHandler.cpp: (WebCore::createHandler): * platform/mediastream/RTCPeerConnectionHandler.h: * platform/mediastream/RTCPeerConnectionHandlerClient.h: * platform/mock/RTCNotifiersMock.cpp: Added. * platform/mock/RTCNotifiersMock.h: Added. * platform/mock/RTCPeerConnectionHandlerMock.cpp: Added. * platform/mock/RTCPeerConnectionHandlerMock.h: Copied from Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h. * platform/mock/TimerEventBasedMock.h: Added. * testing/Internals.cpp: (WebCore::Internals::Internals): (WebCore::Internals::enableMockRTCPeerConnectionHandler): * testing/Internals.h: 2013-10-22 Zan Dobersek WebCore::fillWithEmptyClients adopts new empty clients before leaking their pointers https://bugs.webkit.org/show_bug.cgi?id=122945 Reviewed by Anders Carlsson. * loader/EmptyClients.cpp: (WebCore::fillWithEmptyClients): Store the static empty clients as NeverDestroyed, rather than adopting the pointer of each heap-allocated object and then immediately leaking that pointer. 2013-10-22 Zan Dobersek Simplify HRTFDatabaseLoader's load map https://bugs.webkit.org/show_bug.cgi?id=122944 Reviewed by Eric Carlson. * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::loaderMap): Return a reference to a NeverDestroyed HashMap that maps sample rates to loaders. (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary): (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader): * platform/audio/HRTFDatabaseLoader.h: Remove the LoaderMap type definition, the private singleton of that type and the singleton's unused getter. 2013-10-22 Tim Horton Remote Layer Tree: Support hardware accelerated filters https://bugs.webkit.org/show_bug.cgi?id=123139 Reviewed by Anders Carlsson. * WebCore.exp.in: Export a variety of filter-related things. * platform/graphics/ca/PlatformCAFilters.h: * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayerMac::setFilters): * platform/graphics/ca/win/PlatformCAFiltersWin.cpp: (PlatformCAFilters::setFiltersOnLayer): setFiltersOnLayer should take a PlatformLayer instead of a PlatformCALayer as its argument, because it doesn't need a PlatformCALayer, and this way we can share code with the RemoteLayerTreeHost, which only has PlatformLayers and not PlatformCALayers. 2013-10-22 Brendan Long cue.text fails for some track element cues https://bugs.webkit.org/show_bug.cgi?id=81123 Reviewed by Eric Carlson. Test: media/track/track-long-captions-file.html * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::parseBytes): Use buffer when we don't have full lines. (WebCore::WebVTTParser::fileFinished): Force file to finish parsing. (WebCore::WebVTTParser::hasRequiredFileIdentifier): Simplify due to using String. (WebCore::WebVTTParser::collectCueText): Don't automatically create cues when we run out of data. (WebCore::WebVTTParser::collectNextLine): Use buffer. * html/track/WebVTTParser.h: Add m_buffer and Finished state. * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::notifyFinished): Call m_parser->fileFinished() when done. 2013-10-22 peavo@outlook.com [WinCairo] Compile error. https://bugs.webkit.org/show_bug.cgi?id=123161 Reviewed by Brent Fulgham. * rendering/RenderFlowThread.h: Move USE(ACCELERATED_COMPOSITING) guard to expose needed type. 2013-10-21 Brady Eidson Add a cross-platform IDBRecordIdentifier https://bugs.webkit.org/show_bug.cgi?id=123138 Reviewed by Andreas Kling. Add the cross-platform header: * Modules/indexeddb/IDBRecordIdentifier.h: Added. (WebCore::IDBRecordIdentifier::create): (WebCore::IDBRecordIdentifier::encodedPrimaryKey): (WebCore::IDBRecordIdentifier::version): (WebCore::IDBRecordIdentifier::reset): (WebCore::IDBRecordIdentifier::IDBRecordIdentifier): * WebCore.xcodeproj/project.pbxproj: * GNUmakefile.list.am: Remove the old abstract and LevelDB classes: * Modules/indexeddb/IDBBackingStoreInterface.h: * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h: Use the cross-platform one everywhere: * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp: (WebCore::IDBBackingStoreLevelDB::putRecord): (WebCore::IDBBackingStoreLevelDB::deleteRecord): (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore): (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord): (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow): (WebCore::ObjectStoreCursorImpl::loadCurrentRow): * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp: (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys): * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys): * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp: (WebCore::PutOperation::perform): 2013-10-22 Andrei Bucur [CSS Regions] Possible performance regression after r157567 https://bugs.webkit.org/show_bug.cgi?id=123016 Reviewed by Andreas Kling. The revision 157567 http://trac.webkit.org/changeset/157567 may have regressed Parser/html5-full-render by ~1.1% and Parser/html-parser by ~2%. These changes try to optimize the initial patch, based on Andreas Kling's review. The patch also adds a couple of refactorings that should make the code easier to read: - the CSS Shapes functions are now wrapped in a single #if clause - the CSS Shapes and CSS Regions pre-layout preparations are wrapped in a helper function The RenderFlowThread::logicalWidthChangedInRegionsForBlock function is optimized by passing it information about the state of the relayout children flag. If the flag is true already, some of the steps are skipped. Tests: no new tests. * dom/Element.cpp: (WebCore::Element::webkitGetRegionFlowRanges): * inspector/InspectorOverlay.cpp: (WebCore::buildObjectForElementInfo): * rendering/RenderBlock.cpp: (WebCore::shapeInfoRequiresRelayout): (WebCore::RenderBlock::updateShapesBeforeBlockLayout): (WebCore::RenderBlock::computeShapeSize): (WebCore::RenderBlock::prepareShapesAndPaginationBeforeBlockLayout): * rendering/RenderBlock.h: * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutBlock): (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded): (WebCore::RenderBlockFlow::setRenderNamedFlowFragment): (WebCore::RenderBlockFlow::ensureRareData): * rendering/RenderBlockFlow.h: (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData): (WebCore::RenderElement::isRenderNamedFlowFragmentContainer): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): * rendering/RenderElement.h: (WebCore::RenderElement::generatingElement): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock): * rendering/RenderFlowThread.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::layoutBlock): * rendering/RenderNamedFlowFragment.h: * rendering/RenderObject.cpp: * rendering/RenderObject.h: * rendering/RenderTreeAsText.cpp: (WebCore::write): * style/StyleResolveTree.cpp: (WebCore::Style::elementInsideRegionNeedsRenderer): 2013-10-22 Andreas Kling CSSStyleSheet constructor functions should return PassRef. Make CSSStyleSheet::create*() return PassRef and tighten some call sites that were using them. Most callers didn't need any tweaks to take advantage of PassRef. Reviewed by Antti Koivisto. 2013-10-22 Andreas Kling CTTE: RenderMathMLFraction always has a MathMLInlineContainerElement. This renderer is never anonymous and always has a corresponding MathMLInlineContainerElement. Overload element() with a tighter return type. Also marked the class FINAL and made most member functions private. Reviewed by Antti Koivisto. 2013-10-22 Andreas Kling FontGlyphs constructor functions should return PassRef. Made the two FontGlyphs creator functions return PassRef and tweaked the FontGlyphsCache in Font.cpp to make more efficient use of it. Reviewed by Antti Koivisto. 2013-10-22 Andreas Kling Fix some more code to use RenderElement instead of RenderObject. Using RenderElement where possible lets us skip the isRenderElement() branch in RenderObject::style() and generates much tighter code. Reviewed by Antti Koivisto. 2013-10-22 Andreas Kling Merge SVG renderers' styleWillChange() into styleDidChange(). This work can just as well be done after setting the style. Three more styleWillChange() overloads gone. Reviewed by Antti Koivisto. 2013-10-22 Andreas Kling CSSValueList constructor functions should return PassRef. These functions always return objects, and thus can return PassRef. Also made CSSValueList::createFromParserValueList() take a reference since that function is only ever called with a non-null value. Reviewed by Antti Koivisto. 2013-10-22 Andreas Kling Avoid parent style ref churn in createTextRendererIfNeeded(). There's no need to take a temporary ref on the parent's RenderStyle while creating a text renderer. It's not going away, and the text renderer is not going to participate in ownership afterwards. Reviewed by Antti Koivisto. 2013-10-22 Andreas Kling Remove some unnecessary null checks in RenderElement::setStyle(). After assigning the new style to RenderElement::m_style, we know that it'll be non-null, so remove all the checking for this. Reviewed by Antti Koivisto. 2013-10-22 Gyuyoung Kim Introduce ACCESSIBILITY_OBJECT_TYPE_CASTS to replace manual toFoo() in accessibility child class https://bugs.webkit.org/show_bug.cgi?id=123140 Reviewed by Andreas Kling. As a step to let toFoo use TYPE_CASTS_BASE, DEFINE_TYPE_CASTS can be used for toFoo() in accessibility child class. The DEFINE_TYPE_CASTS will generate plenty more helper functions for accessibility type cast. No new tests, no behavior changes. * accessibility/AccessibilityList.h: * accessibility/AccessibilityMenuList.h: * accessibility/AccessibilityMockObject.h: * accessibility/AccessibilityNodeObject.h: * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilitySVGRoot.h: * accessibility/AccessibilityScrollView.h: * accessibility/AccessibilitySpinButton.h: * accessibility/AccessibilityTable.h: 2013-10-22 Brian Holt [GTK] Add WebKit2 API for TLS errors https://bugs.webkit.org/show_bug.cgi?id=120160 Reviewed by Carlos Garcia Campos. Added a new constructor for CertificateInfo under Soup. * platform/network/CertificateInfo.h: * platform/network/soup/CertificateInfoSoup.cpp: (WebCore::CertificateInfo::CertificateInfo): New constructor using GTlsCertificateFlags and GTlsCertificate. 2013-10-22 Mihnea Ovidenie [CSSRegions] Use RenderStyle::hasFlowFrom when needed https://bugs.webkit.org/show_bug.cgi?id=122543 Reviewed by David Hyatt. Rename RenderStyle::hasStyleRegion -> RenderStyle::hasFlowFrom. Use RenderStyle::hasFlowFrom() helper function instead of directly checking the value of RenderStyle::regionThread(). No change of functionality, covered by existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::contentToCSSValue): (WebCore::ComputedStyleExtractor::propertyValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): * dom/PseudoElement.cpp: (WebCore::PseudoElement::didAttachRenderers): * dom/PseudoElement.h: (WebCore::pseudoElementRendererIsNeeded): * rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::shouldBeNormalFlowOnly): * rendering/style/RenderStyle.h: 2013-10-21 Brent Fulgham [WIN] Properly support reverse animations without needing software fallback. https://bugs.webkit.org/show_bug.cgi?id=85121 Reviewed by Dean Jackson. Testing is provided by existing animation tests. * platform/animation/TimingFunction.h: (WebCore::CubicBezierTimingFunction::createReversed): Added. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::addAnimation): The early return when performing a reverse or autoreverse animation is no longer needed. * platform/graphics/ca/PlatformCAAnimation.h: * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: (toCAMediaTimingFunction): Use new reversed function. * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (toCACFTimingFunction): Ditto. (PlatformCAAnimation::setTimingFunction): Pass 'reverse' flag. (PlatformCAAnimation::setTimingFunctions): Ditto. 2013-10-21 Gyuyoung Kim Use TYPE_CASTS_BASE for CSS_VALUE_TYPE_CASTS https://bugs.webkit.org/show_bug.cgi?id=123126 Reviewed by Andreas Kling. TYPE_CASTS_BASE was moved to common place to be used by all toFoo(). CSS_VALUE_TYPE_CASTS starts to use it for CSS child value. This change generates plenty more helper functions for toCSSFooValue(). Additionally, this use support that toWebKitCSSFooValue, which couldn't use CSS_VALUE_TYPE_CASTS macro. No new tests, no behavior change. * css/CSSAspectRatioValue.h: * css/CSSBorderImageSliceValue.h: * css/CSSCalculationValue.h: * css/CSSCanvasValue.h: * css/CSSCrossfadeValue.h: * css/CSSCursorImageValue.h: * css/CSSFilterImageValue.h: * css/CSSFontFaceSrcValue.h: * css/CSSFontFeatureValue.h: * css/CSSFontValue.h: * css/CSSFunctionValue.h: * css/CSSGradientValue.h: * css/CSSGridTemplateValue.h: * css/CSSImageSetValue.h: * css/CSSImageValue.h: * css/CSSInheritedValue.h: * css/CSSInitialValue.h: * css/CSSLineBoxContainValue.h: * css/CSSPrimitiveValue.h: * css/CSSReflectValue.h: * css/CSSShadowValue.h: * css/CSSTimingFunctionValue.h: * css/CSSUnicodeRangeValue.h: * css/CSSValue.h: * css/CSSValueList.h: * css/CSSVariableValue.h: * css/WebKitCSSArrayFunctionValue.h: * css/WebKitCSSFilterValue.h: * css/WebKitCSSMatFunctionValue.h: * css/WebKitCSSMixFunctionValue.h: * css/WebKitCSSSVGDocumentValue.h: * css/WebKitCSSShaderValue.h: 2013-10-21 Joone Hur Bad cast with toRenderBoxModelObject in RenderBlock::updateFirstLetter() https://bugs.webkit.org/show_bug.cgi?id=123013 Reviewed by Andreas Kling. No new tests because this was reported by Google ClusterFuzz. https://codereview.chromium.org/25713009/ There is a case that toRenderBoxModelObject causes a crash in RenderBlock::updateFirstLetter() due to bad cast, so we need to check whether the RenderObject is a RenderBoxModelObject by running isBoxModelObject() before calling toRenderBoxModelObject. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): 2013-10-21 Brady Eidson Make IDBTransactionCoordinatorLevelDB cross platform https://bugs.webkit.org/show_bug.cgi?id=123124 Enthusiastically reviewed by Tim Horton. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.xcodeproj/project.pbxproj: Make more methods pure virtual in the interface: * Modules/indexeddb/IDBTransactionBackendInterface.h: * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp: * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h: Update the name of the class, and use IDBTransactionBackendInterface instead of IDBTransactionBackendLeveDB: * Modules/indexeddb/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp. (WebCore::IDBTransactionCoordinator::create): (WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator): (WebCore::IDBTransactionCoordinator::~IDBTransactionCoordinator): (WebCore::IDBTransactionCoordinator::didCreateTransaction): (WebCore::IDBTransactionCoordinator::didStartTransaction): (WebCore::IDBTransactionCoordinator::didFinishTransaction): (WebCore::IDBTransactionCoordinator::isActive): (WebCore::IDBTransactionCoordinator::processStartedTransactions): (WebCore::doScopesOverlap): (WebCore::IDBTransactionCoordinator::canRunTransaction): * Modules/indexeddb/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h. Update the name of the class elsewhere: * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp: (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB): * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h: (WebCore::IDBDatabaseBackendLevelDB::transactionCoordinator): * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: 2013-10-21 Daniel Bates [iOS] Upstream JSGlobalObject::shouldInterruptScriptBeforeTimeout() https://bugs.webkit.org/show_bug.cgi?id=123045 Reviewed by Joseph Pecoraro. * bindings/js/JSDOMWindowBase.cpp: (WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage): Added. (WebCore::JSDOMWindowBase::shouldInterruptScript): Extracted comment and assertion about null Page object into WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage() so that it can be shared by both this function and JSDOMWindowBase::shouldInterruptScriptBeforeTimeout(). (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout): * bindings/js/JSDOMWindowBase.h: * bindings/js/JSWorkerGlobalScopeBase.cpp: (WebCore::JSWorkerGlobalScopeBase::shouldInterruptScriptBeforeTimeout): Added. * bindings/js/JSWorkerGlobalScopeBase.h: * loader/EmptyClients.h: Added isStopping(). We'll land the iOS chrome client implementation in a subsequent patch. * page/ChromeClient.h: Added isStopping(). 2013-10-21 Anders Carlsson Navigation policy callback not called when performing the same fragment navigation twice https://bugs.webkit.org/show_bug.cgi?id=123121 Reviewed by Beth Dakin. There's code in PolicyChecker::checkNavigationPolicy that will call the decision function right away if the requests are equal, without consulting any policy client. Because of this, make sure to empty out the last checked request of the document loader when doing a fragment navigation. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::loadWithDocumentLoader): 2013-10-21 Jer Noble Unreviewed build fix; unprotect the declaration of updateSleepDisabling(); * html/HTMLMediaElement.h: 2013-10-20 Mark Lam Avoid JSC debugger overhead unless needed. https://bugs.webkit.org/show_bug.cgi?id=123084. Reviewed by Geoffrey Garen. No new tests. - If no breakpoints are set, we now avoid calling the debug hook callbacks. - If no break on exception is set, we also avoid exception event debug callbacks. - When we return from the ScriptDebugServer to the JSC::Debugger, we may no longer call the debug hook callbacks if not needed. Hence, the m_currentCallFrame pointer in the ScriptDebugServer may become stale. To avoid this issue, before returning, the ScriptDebugServer will clear its m_currentCallFrame if needsOpDebugCallbacks() is false. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setBreakpoint): (WebCore::ScriptDebugServer::removeBreakpoint): (WebCore::ScriptDebugServer::clearBreakpoints): (WebCore::ScriptDebugServer::setPauseOnExceptionsState): (WebCore::ScriptDebugServer::setPauseOnNextStatement): (WebCore::ScriptDebugServer::breakProgram): (WebCore::ScriptDebugServer::stepIntoStatement): (WebCore::ScriptDebugServer::dispatchDidContinue): (WebCore::ScriptDebugServer::exception): (WebCore::ScriptDebugServer::didReachBreakpoint): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::reset): 2013-10-21 Myles C. Maxfield Grammar markers are not updated when switching between 1x and 2x https://bugs.webkit.org/show_bug.cgi?id=122146 Reviewed by Dean Jackson. When running editing/spelling/grammar-markers-hidpi.html, the 2x grammar/spelling dot resources are cached. If you then run editing/spelling/grammar-markers.html without tearing down WebKit, it re-uses the 2x dots. The difference between the two tests is a call to testRunner.setBackingScaleFactor(). We create a NSColor from an NSImage, and remember it in a static variable. However, NSColor inspects the current graphics context to determine which resolution to use, and then remembers that decision. Therefore, we want to recreate the NSColor whenever the device pixel ratio changes. This patch adds a new static function to GraphicsContext which recreates this NSColor every time the ratio changes. Tests: editing/spelling/grammar-markers.html editing/spelling/inline_spelling_markers.html * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::makePattern): (WebCore::GraphicsContext::drawLineForDocumentMarker): 2013-10-21 Simon Fraser Use pink layer borders for compositing layers with a contents layer https://bugs.webkit.org/show_bug.cgi?id=123118 Reviewed by Dean Jackson. With the existing layer border colors, it's not possible to distinguish an empty layer from one with solid color, image or video contents. So use a pink color for those. This makes it easier to diagnose bugs like 122784. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::getDebugBorderInfo): 2013-10-21 Jer Noble Limit use of display sleep assertion when