2012-04-06 Nate Chapin Move Archive processing to DocumentLoader, instead of FrameLoader. https://bugs.webkit.org/show_bug.cgi?id=83055 Reviewed by Adam Barth. No new tests, no functionality change intended. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::setupForReplaceByMIMEType): (WebCore::DocumentLoader::maybeCreateArchive): Renamed from FrameLoader::finishedLoadingDocument(). Returns true if an archive was created. (WebCore::DocumentLoader::setArchive): (WebCore::DocumentLoader::scheduleArchiveLoad): (WebCore::DocumentLoader::documentURL): Add a check for whether an archive url should be returned, so that we don't need special handling in Document and FrameLoader for overriding the document url later. * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedFirstData): Remove archive special cases, since DocumentLoader::documentURL() will return the right thing for legacy archives and maybeCreateArchive() will override the base url for mhtml. (WebCore::FrameLoader::loadArchive): * loader/FrameLoader.h: 2012-04-06 Charles Wei [BlackBerry] Build fix to match the latest WebCore change https://bugs.webkit.org/show_bug.cgi?id=83358 Reviewed by Rob Buis. Update the BlackBerry cmake file to reflect the fact that: 1.VDMXParser.cpp moved from graphics/skia to graphics/chromium. 2.geolocation moved to Modules/geolocation 3.websockets moved to Modules/websockets * PlatformBlackBerry.cmake: 2012-04-06 Charles Wei [BlackBerry] Restore some code which was deleted by accident. https://bugs.webkit.org/show_bug.cgi?id=83357 Reviewed by Rob Buis. No new tests, just BlackBerry build fix. * platform/network/blackberry/ResourceRequest.h: (ResourceRequest): * platform/network/blackberry/ResourceRequestBlackBerry.cpp: (WebCore): (WebCore::mimeTypeRequestTypeMap): (WebCore::ResourceRequest::targetTypeFromMimeType): 2012-04-06 Alexandre Elias Fix bug in ContainerNode::getRect with scale transforms https://bugs.webkit.org/show_bug.cgi?id=83385 Reviewed by Simon Fraser. The bottom-right corner calculation for non-inline and replaced elements in ContainerNode::getRect was incorrect in the presence of scaling, because the untransformed element size was added after the transformation is applied. The rest of the calculations are careful to always apply the transformation as the last step, but this had been forgotten in this codepath. The fix is just to make sure the size is included in the localToAbsolute call. One bug caused by this was that a scaled element would be cut off when scrollIntoView(false) is called to scroll its parent container to make it bottom-visible. New layout test case in fast/transforms/scrollIntoView-transformed.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::getLowerRightCorner): 2012-04-06 Tim Horton m_shouldRespectImageOrientation is used uninitialized https://bugs.webkit.org/show_bug.cgi?id=83410 Reviewed by Simon Fraser. Initialize Settings's m_shouldRespectImageOrientation to false. * page/Settings.cpp: (WebCore::Settings::Settings): 2012-04-06 James Robinson [chromium] Clear values in combinedClear path not respected in WebGLRenderingContext::clearIfComposited() https://bugs.webkit.org/show_bug.cgi?id=83407 Reviewed by Kenneth Russell. When doing a combined clear in the drawing buffer path, we have to use the user specified values for the clear color / mask / depth and not all 0s. Covered by slight modification to fast/canvas/webgl/canvas-test.html * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::clearIfComposited): * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::clearFramebuffers): (WebCore::DrawingBuffer::reset): * platform/graphics/gpu/DrawingBuffer.h: 2012-04-06 Tony Chang [chromium] merge redundant conditions in WebCore.gyp https://bugs.webkit.org/show_bug.cgi?id=83319 Reviewed by Adam Barth. There were duplicate conditions in some of the targets (e.g., 2 OS=="win" sections) so I merged them and if possible, used an else block of an existing condition. No new tests, just refactoring the build file. * WebCore.gyp/WebCore.gyp: 2012-04-06 Simon Fraser Rename paintingGoesToWindow() to paintsIntoWindow() https://bugs.webkit.org/show_bug.cgi?id=83406 Reviewed by Dirk Schulze. Rename paintingGoesToWindow() to paintsIntoWindow() to be consistent with some future refactoring. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::paintsWithTransform): (WebCore::RenderLayer::setBackingNeedsRepaint): (WebCore::RenderLayer::setBackingNeedsRepaintInRect): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::containsPaintedContent): (WebCore::RenderLayerBacking::paintsIntoWindow): (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLayerBacking.h: (RenderLayerBacking): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged): * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintUsingContainer): * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): 2012-04-06 James Simonsen Roll out change to HTMLParserIdioms.cpp from 82857 https://bugs.webkit.org/show_bug.cgi?id=83402 Change 82857 causes a DCHECK on fast/forms/number/ValidityState-typeMismatch-number.html Darin suggested we roll out this file here: https://bugs.webkit.org/show_bug.cgi?id=82857#c20 Unreviewed, rolling out change that broke tests. * html/parser/HTMLParserIdioms.cpp: (WebCore::parseToDoubleForNumberType): 2012-04-06 Ilya Sherman Allow site authors to override autofilled fields' colors. https://bugs.webkit.org/show_bug.cgi?id=66032 http://code.google.com/p/chromium/issues/detail?id=46543 Reviewed by Simon Fraser. * css/html.css: (input:-webkit-autofill): Remove !important declarations. 2012-04-05 Enrica Casucci Provide Obj-C private API to simplify markup. https://bugs.webkit.org/show_bug.cgi?id=83334 Reviewed by Sam Weinig. Added test in TestWebKitAPI * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::simplifyMarkup): Exposing the new command through the editor. * editing/Editor.h: 2012-04-06 Benjamin Poulain Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION https://bugs.webkit.org/show_bug.cgi?id=83325 Reviewed by Ryosuke Niwa. The flag WTF_USE_PREEMPT_GEOLOCATION_PERMISSION was added in r63742 but was never disabled by anyone. Supporting this feature added complexity by introducing two authorization scheme. This patch removes WTF_USE_PREEMPT_GEOLOCATION_PERMISSION and the code supporting granting the authorization after startUpdating(). * Modules/geolocation/Geolocation.cpp: (WebCore::Geolocation::GeoNotifier::runSuccessCallback): With the simplified authorization code, we ensure stronger constraint on GeoNotifier::runSuccessCallback(). (WebCore::Geolocation::stop): (WebCore::Geolocation::startRequest): (WebCore::Geolocation::clearWatch): (WebCore::Geolocation::setIsAllowed): (WebCore::Geolocation::positionChanged): The case (!isAllowed()) was there to support granting the authorization for WTF_USE_PREEMPT_GEOLOCATION_PERMISSION. (WebCore::Geolocation::handlePendingPermissionNotifiers): * Modules/geolocation/Geolocation.h: (Geolocation): 2012-04-06 Tom Sepez Block cross-origin iframe scroll to fragment. https://bugs.webkit.org/show_bug.cgi?id=73083 Reviewed by Adam Barth. Add a restriction similar to what FF has done for all iframes for over a year now. Our change is less disruptive in that it only does this in the cross-orgin case, which is where the fragment scrolling is problematic. Test: http/tests/navigation/anchor-frames-cross-origin.html * dom/Document.cpp: (WebCore::Document::canBeAccessedByEveryAncestorFrame): (WebCore): * dom/Document.h: (Document): * loader/FrameLoader.cpp: (WebCore::FrameLoader::finishedParsing): (WebCore::FrameLoader::loadInSameDocument): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::FrameLoader::shouldPerformFragmentNavigation): (WebCore::FrameLoader::scrollToFragmentIfAllowed): (WebCore): * loader/FrameLoader.h: (FrameLoader): 2012-04-03 Jer Noble Foreground of apple.com/iphone video page visible during full screen animation. https://bugs.webkit.org/show_bug.cgi?id=83080 Reviewed by Simon Fraser. No new tests; updated fullscreen/full-screen-stacking-context.html The apple.com/iphone video page uses a -webkit-mask: CSS style, which creates a stacking context and causes the page to pop in front of the full screen renderer. Add all the styles suggested by the W3C full screen spec to the -webkit-full-screen-ancestor rule to keep these stacking contexts from being created. * css/fullscreen.css: (:-webkit-full-screen-ancestor:not(iframe)): 2012-04-06 Abhishek Arya Virtualize createAnonymousBoxWithSameTypeAs. https://bugs.webkit.org/show_bug.cgi?id=83229 Reviewed by Julien Chaffraix. This helps to use the same function to create anonymous table parts and in the future extend to more classes derived from RenderBox. The current switch case situation was going to be messy as we will need to mix cases that were very dependent on the class, so it made sense to add a virtual function. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::splitAnonymousBlocksAroundChild): (WebCore::RenderBlock::createAnonymousBoxWithSameTypeAs): * rendering/RenderBlock.h: (RenderBlock): * rendering/RenderBox.h: (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs): (RenderBox): * rendering/RenderInline.cpp: (WebCore::RenderInline::splitFlow): * rendering/RenderTable.h: (WebCore::RenderTable::createAnonymousBoxWithSameTypeAs): * rendering/RenderTableCell.h: (WebCore::RenderTableCell::createAnonymousBoxWithSameTypeAs): * rendering/RenderTableRow.h: (WebCore::RenderTableRow::createAnonymousBoxWithSameTypeAs): * rendering/RenderTableSection.h: (WebCore::RenderTableSection::createAnonymousBoxWithSameTypeAs): 2012-04-06 Tim Horton [cg] REGRESSION (r101517): Animating the transform of a with shape-rendering: crispEdges leaves behind garbage https://bugs.webkit.org/show_bug.cgi?id=82963 Reviewed by Simon Fraser. CoreGraphics can inflate the stroke by 1px when drawing a rectangle with antialiasing disabled at non-integer coordinates, we need to compensate by inflating the RenderSVGRect repaint bounds by 1px. No new tests, as this is not reproducible in DRT or WKTR. * rendering/svg/RenderSVGRect.cpp: (WebCore::RenderSVGRect::createShape): (WebCore::RenderSVGRect::strokeBoundingBox): * rendering/svg/RenderSVGRect.h: (RenderSVGRect): 2012-04-05 Simon Fraser Avoid trying to set filters on transform layers https://bugs.webkit.org/show_bug.cgi?id=83344 Reviewed by Dean Jackson. Return early from GraphicsLayerCA::setFilters() when the filters haven't changed. This avoids trying to clear filters on CALayers which never had them, which should both help performance, and avoids console spew related to setting shadow properties on transform layers. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setFilters): 2012-04-06 James Robinson WebGL content swapped at wrong time in threaded compositing mode https://bugs.webkit.org/show_bug.cgi?id=82275 Reviewed by Kenneth Russell. When using threaded compositing, we need to defer touching the texture ID being used by the compositor until the appropriate point in the synchronization routine and not before. Specifically, there is no time at which it is safe to manipulate the texture the compositor may be using from the main thread. This breaks up the presentation path into a few pieces (depending on the context attributes) in order to maintain these invariants. Depending on the context attributes and if we're in threaded mode, there are a few different possible back/front buffer combinations: - When the context is antialiased, we have a multisampled renderbuffer and associated framebuffer. - In all cases, we have a color texture back buffer. - When preserveDrawingBuffer is set or threaded compositing is enabled, we have a separate color texture as a front buffer. The resource update is in two phases. First, on the main thread, we prepare the back buffer. This resolves from the multisampled FBO into the back color buffer if multisampled and swaps the front / back color buffer textures if preserveDrawingBuffer is false and we're using separate front / back color buffers. Second, on the compositor thread, we do a texture copy from the back to the front color buffer if preserveDrawingBuffer is true. After these steps are complete the main thread is free to manipulate the back buffer color texture without affecting any resources the compositor is using. One incidental cleanup this patch also does is remove all state queries from DrawingBuffer::clearFramebuffer(). Tests: fast/canvas/webgl/webgl-composite-modes-repaint.html fast/canvas/webgl/webgl-composite-modes.html * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::WebGLRenderingContext): (WebCore::WebGLRenderingContext::clearIfComposited): (WebCore::WebGLRenderingContext::restoreStateAfterClear): (WebCore::WebGLRenderingContext::reshape): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): * platform/graphics/cairo/DrawingBufferCairo.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::generateColorTexture): (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::initialize): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): (WebCore::DrawingBuffer::platformLayer): * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::WebGLLayerChromium): (WebCore::WebGLLayerChromium::paintContentsIfDirty): (WebCore::WebGLLayerChromium::updateCompositorResources): (WebCore::WebGLLayerChromium::paintRenderedResultsToCanvas): (WebCore::WebGLLayerChromium::setNeedsDisplayRect): (WebCore::WebGLLayerChromium::setDrawingBuffer): * platform/graphics/chromium/WebGLLayerChromium.h: (WebGLLayerChromium): * platform/graphics/clutter/DrawingBufferClutter.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): * platform/graphics/filters/FECustomFilter.cpp: (WebCore::FECustomFilter::initializeContext): * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::create): (WebCore::DrawingBuffer::clear): (WebCore::DrawingBuffer::clearFramebuffer): (WebCore::DrawingBuffer::reset): (WebCore::DrawingBuffer::discardResources): * platform/graphics/gpu/DrawingBuffer.h: (DrawingBuffer): * platform/graphics/gpu/mac/DrawingBufferMac.mm: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore::DrawingBuffer::frontColorBuffer): * platform/graphics/gpu/qt/DrawingBufferQt.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::platformLayer): (WebCore::DrawingBuffer::prepareBackBuffer): (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer): (WebCore): (WebCore::DrawingBuffer::frontColorBuffer): 2012-04-06 Julien Chaffraix Unreviewed build fix after r113486 and r113487. * rendering/RenderObject.cpp: Added missing #include. * rendering/RenderView.h: Removed bad OVERRIDE. 2012-04-06 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=81939 -webkit-image-set should update dynamically when the device scale factor changes -and corresponding- Reviewed by Darin Adler. New member variable to keep track of the scale factor. * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::CSSImageSetValue): (WebCore::CSSImageSetValue::bestImageForScaleFactor): Merge the two cachedImageSet functions. There was no need for two functions here. (WebCore::CSSImageSetValue::cachedImageSet): cachedOrPendingImageSet() now takes a Document as a parameter so that it can access the deviceScaleFactor. If there is a cached image already and the Document's deviceScaleFactor doesn't match m_scaleFactor, then m_imageSet is set to a pending image so that the best fit image will be reassessed and then loaded. (WebCore::CSSImageSetValue::cachedOrPendingImageSet): * css/CSSImageSetValue.h: (WebCore): (CSSImageSetValue): cachedOrPendingImageSet() now takes a Document. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): StyleCachedImageSet should inherit from CachedImageClient just like StyleCachedImage. It should add and remove itself as a client upon creation and destruction, respectively. * rendering/style/StyleCachedImageSet.cpp: (WebCore::StyleCachedImageSet::StyleCachedImageSet): (WebCore): (WebCore::StyleCachedImageSet::~StyleCachedImageSet): * rendering/style/StyleCachedImageSet.h: (StyleCachedImageSet): 2012-04-06 Levi Weintraub Update LayoutUnit usage in RenderView https://bugs.webkit.org/show_bug.cgi?id=83147 Reviewed by Julien Chaffraix. Updating the usage of LayoutUnits in RenderView in preparation for sub-pixel layout. This mostly affects paint and repaint functions, which take LayoutRects up to the RenderView level. This is necessary as we continue to accumulate sub-pixel offsets up to this level. No new tests. No change in behavior. * rendering/RenderView.cpp: (WebCore::RenderView::paint): Adding an assert that we're being called to paint on pixel boundaries. We don't currently ever position RenderViews at sub-pixel offsets. (WebCore::RenderView::shouldRepaint): (WebCore::RenderView::repaintViewRectangle): Switching to a LayoutRect and cleaning up a fixme that used decomposed offsets. Pixel snapping is applied before handing the rect up to the FrameView. (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): Pixel snapping before handing the rect up to the Compositor. (WebCore::RenderView::computeRectForRepaint): (WebCore::RenderView::selectionBounds): (WebCore::RenderView::viewRect): (WebCore::RenderView::unscaledDocumentRect): * rendering/RenderView.h: (RenderView): 2012-04-06 Tim Horton Add autodetection of image orientation from EXIF information https://bugs.webkit.org/show_bug.cgi?id=19688 and Original patch by David Carson and Eric Seidel. Reviewed by Simon Fraser. Add support for respecting EXIF image orientation, enabled by default for ImageDocuments. The setting shouldRespectImageOrientation causes orientation to take effect for any image included via . Test: fast/images/exif-orientation.html, fast/images/exif-orientation-css.html * WebCore.xcodeproj/project.pbxproj: Add ImageOrientation.{cpp, h} * loader/cache/CachedImage.cpp: (WebCore::CachedImage::imageForRenderer): Plumb setting down from RenderObject into Image. (WebCore::CachedImage::imageSizeForRenderer): * page/Settings.h: (WebCore::Settings::setShouldRespectImageOrientation): (WebCore::Settings::shouldRespectImageOrientation): (Settings): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::cacheFrame): (WebCore::BitmapImage::size): (WebCore::BitmapImage::sizeRespectingOrientation): (WebCore): (WebCore::BitmapImage::ensureFrameIsCached): (WebCore::BitmapImage::frameAtIndex): (WebCore::BitmapImage::frameIsCompleteAtIndex): (WebCore::BitmapImage::frameDurationAtIndex): (WebCore::BitmapImage::frameHasAlphaAtIndex): (WebCore::BitmapImage::frameOrientationAtIndex): * platform/graphics/BitmapImage.h: (WebCore::FrameData::FrameData): (FrameData): (BitmapImage): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/ImageOrientation.cpp: Added. (WebCore): (WebCore::ImageOrientation::transformFromDefault): * platform/graphics/ImageOrientation.h: Added. (WebCore): (ImageOrientation): (WebCore::ImageOrientation::ImageOrientation): (WebCore::ImageOrientation::usesWidthAsHeight): (WebCore::ImageOrientation::fromEXIFValue): (WebCore::ImageOrientation::operator==): (WebCore::ImageOrientation::operator!=): * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::orientationAtIndex): (WebCore): * platform/graphics/ImageSource.h: (WebCore): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): Transform the image while drawing if its orientation requires it. * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::draw): * platform/graphics/cg/ImageCG.cpp: (WebCore::FrameData::clear): (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::draw): * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::imageSourceOptions): Don't use SkipMetaData on Lion/Snow Leopard, as it prevents us from retrieving orientation data. (WebCore::ImageSource::frameSizeAtIndex): Adjust the image's size based on its orientation. (WebCore): (WebCore::ImageSource::orientationAtIndex): (WebCore::ImageSource::size): * platform/graphics/mac/DragImageMac.mm: (createDragImageFromImage): Create scaled copy of image for drag image if we're respecting orientation and it is non-default. * rendering/RenderObject.h: (RenderObject): (WebCore::RenderObject::shouldRespectImageOrientation): 2012-04-06 Levi Weintraub Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle https://bugs.webkit.org/show_bug.cgi?id=83376 Reviewed by Eric Seidel. Correcting LayoutUnit usage in QT RenderTheme code. No new tests. No change in behavior. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::convertToPaintingRect): Rounding the ancestor offset before applying it to the pixel snapped partRect. (WebCore::RenderThemeQt::paintSearchFieldCancelButton): Also rounding the ancestor offset, and also pixel snapping the content rect before painting. 2012-04-06 Kenneth Russell context-lost.html is failing https://bugs.webkit.org/show_bug.cgi?id=81325 Reviewed by James Robinson. Ensure that the DrawingBuffer does not attempt to restore the TEXTURE_2D binding to an already-deleted texture. Tested with layout test fast/canvas/webgl/context-lost.html as well as WebGL conformance tests. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::loseContextImpl): 2012-04-06 Sheriff Bot Unreviewed, rolling out r113267. http://trac.webkit.org/changeset/113267 https://bugs.webkit.org/show_bug.cgi?id=83384 causes dhtml perf regression (Requested by simonjam on #webkit). * dom/ChildListMutationScope.cpp: (ChildListMutationScope::MutationAccumulator): (WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder): (WebCore::ChildListMutationScope::MutationAccumulator::childAdded): (WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded): * dom/ChildListMutationScope.h: (WebCore::ChildListMutationScope::childAdded): (MutationAccumulationRouter): * dom/ContainerNode.cpp: (WebCore): (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::appendChild): (WebCore::dispatchChildInsertionEvents): (WebCore::updateTreeAfterInsertion): 2012-04-06 Joshua Bell IndexedDB: ObjectStore/Index shouldn't hold reference to backing store https://bugs.webkit.org/show_bug.cgi?id=83074 We should be able to collect and close the leveldb backing store as soon as the database connection is closed, but the IDBObjectStoreBackendImpl and IDBIndexBackendImpl were holding RefPtrs, and those objects are kept alive by script references. Replaced RefPtrs to the IDBBackingStore with pointers to the IDBDatabase. On the back end, IDBDatabaseBackendImpl maintains a RefPtr to the IDBObjectStoreBackendImpl object, so a raw pointer back is safe. On the front end, the IDBObjectStore maintains a RefPtr to the IDBDatabase so script can navigate upwards. Ditto on both ends for the ObjectStore/Index relationship. The frontend objects maintain RefPtrs to the backend objects, so the backend objects and their owners are maintained as long as there's a script reference. Also made IDBDatabaseBackendImpl handle a null IDBFactoryBackendImpl pointer, for testing. Reviewed by Tony Chang. Tests: webkit_unit_tests --gtest_filter="IDBDatabaseBackendTest.*" * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::loadObjectStores): * Modules/indexeddb/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): (WebCore::IDBIndexBackendImpl::openCursorInternal): (WebCore::IDBIndexBackendImpl::countInternal): (WebCore::IDBIndexBackendImpl::getInternal): (WebCore::IDBIndexBackendImpl::addingKeyAllowed): * Modules/indexeddb/IDBIndexBackendImpl.h: (WebCore::IDBIndexBackendImpl::create): (IDBIndexBackendImpl): (WebCore::IDBIndexBackendImpl::backingStore): (WebCore::IDBIndexBackendImpl::databaseId): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): (WebCore::IDBObjectStoreBackendImpl::getInternal): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::deleteInternal): (WebCore::IDBObjectStoreBackendImpl::clearInternal): (WebCore): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::createIndexInternal): (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal): (WebCore::IDBObjectStoreBackendImpl::openCursorInternal): (WebCore::IDBObjectStoreBackendImpl::countInternal): (WebCore::IDBObjectStoreBackendImpl::loadIndexes): (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey): * Modules/indexeddb/IDBObjectStoreBackendImpl.h: (WebCore::IDBObjectStoreBackendImpl::create): (IDBObjectStoreBackendImpl): (WebCore::IDBObjectStoreBackendImpl::backingStore): (WebCore::IDBObjectStoreBackendImpl::databaseId): 2012-04-06 Jon Lee Fix build warning on const long long to int implicit conversion. * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): 2012-04-06 Emil A Eklund Fix LayoutUnit usage and rounding in RenderBlock and RenderEmbeddedObject https://bugs.webkit.org/show_bug.cgi?id=83343 Reviewed by Eric Seidel. Fix usage of LayoutUnits and rounding/pixel snapping in RenderBlock and RenderEmbeddedObject in preparation for turing on subpixel support. No new tests, no change in functionality. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::baselinePosition): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::nodeAtPoint): 2012-04-06 Dan Bernstein HiDPI: Have canvas use a hidpi backing store, but downsample upon access Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: Added ENABLE_HIGH_DPI_CANVAS. 2012-04-06 Levi Weintraub Update LayoutUnit usage in Editor and Frame https://bugs.webkit.org/show_bug.cgi?id=83278 Reviewed by Eric Seidel. Frame and Editor both take input from the embedder, which passes along coordinates in screen coordinates, which aren't fractional. Updating a few remaining functions to show this, and correcting some inconsistencies in LayoutUnit usage. No new tests. No change in behavior. * editing/Editor.cpp: (WebCore::Editor::rangeForPoint): windowToContents returns an IntPoint. (WebCore::Editor::countMatchesForText): Using enclosingIntRect since we're (fake) repainting the entire view rect. * editing/Editor.h: (Editor): Correcting mismatched function signature. * page/Frame.cpp: (WebCore::Frame::visiblePositionForPoint): Frame takes points in screen coordinates, usually from the embedder. Changing these functions to be in IntPoints. (WebCore::Frame::documentAtPoint): Ditto. (WebCore::Frame::rangeForPoint): Ditto. * page/Frame.h: (Frame): * platform/graphics/IntRect.h: (enclosingIntRect): Adding an inline no-op copy of the FractionalLayoutRect method enclosingIntRect. 2012-04-06 Tommy Widenflycht MediaStream API: Deleting the chromium bridge class MediaStreamCenterInternal https://bugs.webkit.org/show_bug.cgi?id=83167 Reviewed by Adam Barth. The situation before this patch is that we had a MediaStreamCenter.h with #ifdefs for the chromium specific private class MediaStreamCenterInternal. This bridge class only shuffled calls between MediaStreamCenter and WebMediaStreamCenter and was needed before the introduction of Platform. To get rid of this now unnecessary class I had two alternatives: 1) Sprinkle platform/MediaStreamCenter.h with more #ifdefs, including around the class declaration. 2) Create an abstract base class that the chromium and gstreamer implementations overrides. My personal preference is 2) since I strongly dislike #ifdefs. The drawback is that MediaStreamCenter now has a vtable. However since all methods in this class are extremely low-usage it doesn't affect anything in practice. No code behaviour changes. * GNUmakefile.am: * GNUmakefile.list.am: * Modules/mediastream/MediaStreamTrack.cpp: (WebCore::MediaStreamTrack::setEnabled): * Modules/mediastream/UserMediaRequest.cpp: * Modules/mediastream/UserMediaRequest.h: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/chromium/support/WebMediaStreamSourcesRequest.cpp: * platform/mediastream/MediaStreamCenter.cpp: (WebCore::MediaStreamCenter::MediaStreamCenter): (WebCore): (WebCore::MediaStreamCenter::~MediaStreamCenter): * platform/mediastream/MediaStreamCenter.h: (WebCore): (MediaStreamCenter): * platform/mediastream/MediaStreamSourcesQueryClient.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.h. (WebCore): (MediaStreamSourcesQueryClient): (WebCore::MediaStreamSourcesQueryClient::~MediaStreamSourcesQueryClient): * platform/mediastream/chromium/MediaStreamCenterChromium.cpp: (WebCore::MediaStreamCenter::instance): (WebCore::MediaStreamCenterChromium::MediaStreamCenterChromium): (WebCore::MediaStreamCenterChromium::~MediaStreamCenterChromium): (WebCore::MediaStreamCenterChromium::queryMediaStreamSources): (WebCore::MediaStreamCenterChromium::didSetMediaStreamTrackEnabled): (WebCore::MediaStreamCenterChromium::didStopLocalMediaStream): (WebCore::MediaStreamCenterChromium::didConstructMediaStream): (WebCore::MediaStreamCenterChromium::constructSDP): (WebCore): (WebCore::MediaStreamCenterChromium::stopLocalMediaStream): * platform/mediastream/chromium/MediaStreamCenterChromium.h: Renamed from Source/WebCore/platform/mediastream/chromium/MediaStreamCenterInternal.h. (WebKit): (WebCore): (MediaStreamCenterChromium): * platform/mediastream/chromium/MediaStreamCenterInternal.cpp: Removed. * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.cpp. (WebCore): (WebCore::MediaStreamCenter::instance): (WebCore::MediaStreamCenterGStreamer::MediaStreamCenterGStreamer): (WebCore::MediaStreamCenterGStreamer::~MediaStreamCenterGStreamer): (WebCore::MediaStreamCenterGStreamer::queryMediaStreamSources): (WebCore::MediaStreamCenterGStreamer::didSetMediaStreamTrackEnabled): (WebCore::MediaStreamCenterGStreamer::didStopLocalMediaStream): (WebCore::MediaStreamCenterGStreamer::didConstructMediaStream): (WebCore::MediaStreamCenterGStreamer::constructSDP): * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.h. (WebCore): (MediaStreamCenterGStreamer): 2012-04-05 Simon Fraser Should disable preserves3D() for things that enforce flattening, like overflow and filters https://bugs.webkit.org/show_bug.cgi?id=83337 Reviewed by Dean Jackson. The CSS3 Transforms spec says that some properties should cause flattening of things with transform-style: preserve-3d. We currently do this as a side effect of the GraphicsLayer structure, but we should really do it at the RenderStyle level, as we do for other things like stacking context creation. Test: compositing/overflow-trumps-transform-style.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): 2012-04-06 Tommy Widenflycht MediaStream API: MediaStreams stops proper cleanup to take place during a page reload. https://bugs.webkit.org/show_bug.cgi?id=83143 Reviewed by Adam Barth. To fix this I have converted MediaStream and LocalMediaStream to be ActiveDOMObjects. Have no idea how to write a test that succesfully verifies this. I have done manual testing to verify that proper tear-down now takes place. * Modules/mediastream/LocalMediaStream.cpp: (WebCore::LocalMediaStream::create): (WebCore::LocalMediaStream::stopFunction): (WebCore): * Modules/mediastream/LocalMediaStream.h: (LocalMediaStream): * Modules/mediastream/LocalMediaStream.idl: * Modules/mediastream/MediaStream.cpp: (WebCore::MediaStream::create): (WebCore::MediaStream::MediaStream): (WebCore::MediaStream::scriptExecutionContext): * Modules/mediastream/MediaStream.h: (MediaStream): 2012-04-06 Dan Bernstein Pixel access canvas APIs do not work transparently with high-DPI backing store https://bugs.webkit.org/show_bug.cgi?id=83072 Reviewed by Simon Fraser. Made getImageData, putImageData, and toDataURL downsample/upsample when pixels in the canvas backing store are not in a 1:1 ratio to CSS pixels. This makes clients of these APIs indifferent to the backing store resolution, up to sampling artifacts. In order for this to work, ImageBuffer has to know and respect the resolutionScale parameter. This change makes the Core Graphics-based implementation of ImageBuffer do this, but on other platforms, resolutionScale values other than 1 will not work. Such platforms should not enable the HIGH_DPI_CANVAS feature. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): Updated a comment. (WebCore::HTMLCanvasElement::createImageBuffer): Changed to create an ImageBuffer with the desired resolution instead of 1. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): Removed code that scaled the source rect, since this is now handled at the ImageBuffer level. (WebCore::CanvasRenderingContext2D::createImageData): Now returns ImageData of the requested size regardless of the backing store resolution. (WebCore::CanvasRenderingContext2D::getImageData): Ditto. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::create): Removed some code that tried to apply the resolution scale to the buffer after creating it, and changed to pass the resolution scale down to the (platform-specific) constructor, which can apply it correctly. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): Added a resolutionScale parameter, which is used to compute the backing buffer size, and to apply a device scale factor to the context. (WebCore::ImageBuffer::copyImage): Changed to return an image scaled down to the logical size of the buffer. (WebCore::ImageBuffer::getUnmultipliedImageData): Changed to pass the resolution scale to ImageData::getData(). (WebCore::ImageBuffer::getPremultipliedImageData): Ditto. (WebCore::ImageBuffer::putByteArray): Changed to pass the resolution scale to ImageData::putData(). When drawing the byte array as an image, changed to preserve the base CTM in the destination context (thus mapping from image data pixels to backing store pixels). (WebCore::ImageBuffer::toDataURL): Fixed a CGColorSpace leak. Made the returned image have the buffer’s logical size instead of the backing buffer’s size. (WebCore::ImageDataToDataURL): Fixed a CGColorSpace leak. * platform/graphics/cg/ImageBufferDataCG.cpp: (WebCore::ImageBufferData::getData): Added a resolutionScale parameter. The source coordinates are scaled by the value of that parameter, and a reverse scaling transform is applied when copying from the backing store into the destination (either explicitly using Accelerate or implicitly by drawing as an image). Since after scaling, unpremultiplication and component permutation are done in-place, made the non-Accelerate code that does these things safe in this case. (WebCore::ImageBufferData::putData): Added a resolutionScale parameter. The destination coordinates are scaled by the value of that parameter, and a scaling transform is applied when copying from the source into the backing store (either explicitly using Accelerate or implicitly by drawing as an image). Since after scaling, premultiplication and component permutation are done in-place, made the non-Accelerate code that does these things safe in this case. * platform/graphics/cg/ImageBufferDataCG.h: * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::ImageBuffer): 2012-04-06 Dana Jansens [chromium] Draw debug borders for tiles on layers with skipsDraw https://bugs.webkit.org/show_bug.cgi?id=83352 Reviewed by Adrienne Walker. The tiles are given the same color as other missing tiles. * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::appendQuads): 2012-04-06 Rob Buis Fix cast-align warnings in JSC https://bugs.webkit.org/show_bug.cgi?id=80790 Reviewed by George Staikos. * platform/graphics/WOFFFileFormat.cpp: (WebCore::readUInt32): (WebCore::readUInt16): * platform/image-encoders/skia/JPEGImageEncoder.cpp: (WebCore::preMultipliedBGRAtoRGB): * platform/network/MIMESniffing.cpp: 2012-04-06 Darin Adler Streamline strtod and fix some related problems https://bugs.webkit.org/show_bug.cgi?id=82857 Reviewed by Geoffrey Garen. Refactoring of code covered by existing tests. * dom/ViewportArguments.cpp: (WebCore::numericPrefix): Removed a confusing comment that just said "we tolerate extra characters" in a roundabout way. Made the "ok" argument optional. Changed to call the new version of charactersToFloat that returns the number of characters parsed rather than using the charactersToFloatIgnoringJunk/didReadNumber solution from before. (WebCore::findSizeValue): Since numericPrefix is guaranteed to return 0 when it can't parse, removed the "ok" code. Also changed the unusual syntax "float(1.0)" to just "1", which works just as well. (WebCore::findScaleValue): Ditto. (WebCore::findUserScalableValue): Ditto. * html/parser/HTMLParserIdioms.cpp: (WebCore::parseToDoubleForNumberType): Removed an unneeded code path and replaced it with an assertion; toDouble no longer will return infinity or not-a-number values. 2012-04-06 Dana Jansens [chromium] Surface replica should have a separate quad in the render pass https://bugs.webkit.org/show_bug.cgi?id=83287 Reviewed by Adrienne Walker. Generate separate quads for a RenderSurface and its replica. The replica quad is drawn independently of the surface itself. This allows us to cull each one independently. Covered by existing tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay): * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::setScissorRect): (WebCore): (WebCore::CCRenderSurface::drawContents): (WebCore::CCRenderSurface::drawReplica): (WebCore::CCRenderSurface::hasReplica): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: (WebCore::CCRenderSurfaceDrawQuad::create): (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad): * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: (CCRenderSurfaceDrawQuad): (WebCore::CCRenderSurfaceDrawQuad::isReplica): 2012-04-05 Martin Robinson [GObject bindings] Fix the coding style issues in the generated bindings https://bugs.webkit.org/show_bug.cgi?id=82080 Reviewed by Kentaro Hara. No new tests. This is covered by the binding tests. * bindings/scripts/CodeGeneratorGObject.pm: Fix most style errors in the generated GObject code. * bindings/scripts/test/GObject: Updated the expected results. 2012-04-06 Adam Klein Remove bogus assert from ChildListMutationScope https://bugs.webkit.org/show_bug.cgi?id=83336 Reviewed by Ryosuke Niwa. This assert can trivially be triggered from script, but luckily the code already behaves correctly without it. * dom/ChildListMutationScope.cpp: (WebCore::ChildListMutationScope::MutationAccumulator::enqueueMutationRecord): 2012-04-06 Sheriff Bot Unreviewed, rolling out r113442. http://trac.webkit.org/changeset/113442 https://bugs.webkit.org/show_bug.cgi?id=83373 for breaking JSC bindings compilation (Requested by pfeldman on #webkit). * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * UseV8.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMutationCallbackCustom.cpp: Added. (WebCore): (WebCore::JSMutationCallback::handleEvent): * bindings/scripts/CodeGenerator.pm: * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForTypeInImpl): (GenerateCallbackHeader): (GenerateCallbackImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateCallbackHeader): (GenerateCallbackImplementation): * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::callbackWithBoolean): * bindings/scripts/test/JS/JSTestCallback.h: (JSTestCallback): * bindings/scripts/test/TestCallback.idl: * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithBoolean): * bindings/scripts/test/V8/V8TestCallback.h: (V8TestCallback): * bindings/v8/custom/V8MutationCallbackCustom.cpp: Added. (WebCore): (WebCore::V8MutationCallback::handleEvent): * dom/MutationCallback.idl: 2012-04-06 Zan Dobersek [Gtk] Unskip the video track tests https://bugs.webkit.org/show_bug.cgi?id=82590 Reviewed by Martin Robinson. Enable the video track runtime feature for the Gtk port as well. No new tests - existing ones will be unskipped. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore): 2012-04-06 Michael Saboff Call Heap::discardAllCompiledCode() in low memory situations https://bugs.webkit.org/show_bug.cgi?id=83335 Reviewed by Geoffrey Garen. Added call to discardAllCompiledCode() when under memory pressure. We can re-JIT as needed. This is similar to what we used to do when we did a full GC which also cleaned up JIT code. Doing a full GC typically didn't help our memory situation, in fact it made things worse in the really low memory situation as it caused more paging. Added pass through discardAllCompiledCode() method to GCController. * bindings/js/GCController.cpp: (WebCore::GCController::discardAllCompiledCode): (WebCore): * bindings/js/GCController.h: (GCController): * platform/mac/MemoryPressureHandlerMac.mm: (WebCore::MemoryPressureHandler::releaseMemory): 2012-04-06 Andrey Kosyakov Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor https://bugs.webkit.org/show_bug.cgi?id=82616 Reviewed by Pavel Feldman. - center minimal selection on mouse cursor if the mouse hasn't moved (i.e. we had a click, not drag) * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging): 2012-04-06 Vineet Chaudhary Add CodeGenerator support for sequence<> in callbacks. https://bugs.webkit.org/show_bug.cgi?id=83233 Reviewed by Kentaro Hara. Tests: TestCallback.idl and fast/mutation/callback-arguments.html should pass even after the changes. * GNUmakefile.list.am: Removed unsued custom files V8MutationCallbackCustom.cpp and JSMutationCallbackCustom.cpp from builds. * Target.pri: Ditto. * UseJSC.cmake: Ditto. * UseV8.cmake: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSMutationCallbackCustom.cpp: Removed. * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForTypeInImpl): Add proper header type. (GenerateCallbackHeader): Generate declaration for the callback with sequence argument. (GenerateCallbackImplementation): Generate implementation for the callback with sequence argument. * bindings/scripts/CodeGeneratorV8.pm: (GenerateCallbackHeader): Generate declaration for the callback with sequence argument. (GenerateCallbackImplementation): Generate implementation for the callback with sequence argument. * bindings/scripts/test/JS/JSTestCallback.cpp: Modified test results of run-bindings-tests. (WebCore): (WebCore::JSTestCallback::handleEvent): * bindings/scripts/test/JS/JSTestCallback.h: Modified test results of run-bindings-tests. (JSTestCallback): * bindings/scripts/test/TestCallback.idl: Added test callback with sequence<> argument. * bindings/scripts/test/V8/V8TestCallback.cpp: Modified test results of run-bindings-tests. (WebCore): (WebCore::V8TestCallback::handleEvent): * bindings/scripts/test/V8/V8TestCallback.h: Modified test results of run-bindings-tests. (V8TestCallback): * bindings/v8/custom/V8MutationCallbackCustom.cpp: Removed. * dom/MutationCallback.idl: Removed custom bindings using sequence. 2012-04-06 Sheriff Bot Unreviewed, rolling out r113431. http://trac.webkit.org/changeset/113431 https://bugs.webkit.org/show_bug.cgi?id=83372 for breaking at least Chromium compilation (Requested by pfeldman on #webkit). * rendering/RenderView.cpp: (WebCore::RenderView::paint): (WebCore::RenderView::shouldRepaint): (WebCore::RenderView::repaintViewRectangle): (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): (WebCore::RenderView::computeRectForRepaint): (WebCore::RenderView::selectionBounds): (WebCore::RenderView::viewRect): (WebCore::RenderView::unscaledDocumentRect): * rendering/RenderView.h: (RenderView): 2012-04-06 Peter Rybin Web Inspector: CodeGeneratorInspector.py: completely switch all domains to 'strict' mode https://bugs.webkit.org/show_bug.cgi?id=83332 Reviewed by Pavel Feldman. Hardcoded list of domains is removed from generator. Partial domain sorting is dropped as unneeded. Types with open propery list are introduced: validator allows undocumented properties for them. Timeline domain code is patched to do runtimeCast in the last moment because true switching to type-safe interfaces should take significant time and should be done separately. * inspector/CodeGeneratorInspector.py: (Generator.go): (Generator.process_event): (Generator.process_command): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline): 2012-04-06 Peter Rybin Web Inspector: CodeGeneratorInspector.py: stop accepting raw InspectorObject in generated setters https://bugs.webkit.org/show_bug.cgi?id=83327 Reviewed by Pavel Feldman. Generator fixed to have strict types in generated setter methods. Client code is switched from InspectorObject's and String's to generated types where needed. * inspector/CodeGeneratorInspector.py: (AdHocTypeContext): (format_setter_value_expression): * inspector/ConsoleMessage.cpp: (WebCore::messageSourceValue): (WebCore::messageTypeValue): (WebCore::messageLevelValue): (WebCore::ConsoleMessage::addToFrontend): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources): (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): * inspector/InspectorApplicationCacheAgent.h: (InspectorApplicationCacheAgent): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForNode): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): * inspector/InspectorMemoryAgent.cpp: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrameTree): * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForTiming): (WebCore::buildObjectForCachedResource): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::resourceStyleSheetText): (WebCore::InspectorStyleSheet::buildArrayForRuleList): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: (InspectorCSSId): (WebCore::InspectorCSSId::asProtocolValue): method is made template as now it returns 2 formally different types. (InspectorStyleSheet): (WebCore::InspectorStyleSheet::canBind): (InspectorStyleSheetForInlineStyle): 2012-04-06 Pavel Feldman Web Inspector: highlight diff in the gutter, not in the line content. https://bugs.webkit.org/show_bug.cgi?id=83371 Reviewed by Yury Semikhatsky. Now that the editing mode is enabled by default, diff highlighting gets annoying. I am moving it to the gutter (same decoration as before, but now coloring gutter only). * inspector/front-end/TextViewer.js: (WebInspector.TextEditorGutterPanel.prototype.textChanged): * inspector/front-end/textViewer.css: (.diff-container .webkit-added-line.webkit-line-number): (.diff-container .webkit-removed-line.webkit-line-number): (.diff-container .webkit-changed-line.webkit-line-number): 2012-04-06 Peter Rybin Web Inspector: CodeGeneratorInspector.py: stop accepting raw InspectorObject in generated setters https://bugs.webkit.org/show_bug.cgi?id=83327 Reviewed by Pavel Feldman. Generator fixed to have strict types in generated setter methods. Client code is switched from InspectorObject's and String's to generated types where needed. * inspector/CodeGeneratorInspector.py: (AdHocTypeContext): (format_setter_value_expression): * inspector/ConsoleMessage.cpp: (WebCore::messageSourceValue): (WebCore::messageTypeValue): (WebCore::messageLevelValue): (WebCore::ConsoleMessage::addToFrontend): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources): (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource): * inspector/InspectorApplicationCacheAgent.h: (InspectorApplicationCacheAgent): * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::asInspectorStyleSheet): (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): (WebCore::InspectorCSSAgent::detectOrigin): * inspector/InspectorCSSAgent.h: (InspectorCSSAgent): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::buildObjectForNode): * inspector/InspectorIndexedDBAgent.cpp: (WebCore): * inspector/InspectorMemoryAgent.cpp: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrameTree): * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForTiming): (WebCore::buildObjectForCachedResource): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::buildObjectForStyle): (WebCore::InspectorStyleSheet::create): (WebCore::InspectorStyleSheet::InspectorStyleSheet): (WebCore::InspectorStyleSheet::buildObjectForRule): (WebCore::InspectorStyleSheet::resourceStyleSheetText): (WebCore::InspectorStyleSheet::buildArrayForRuleList): (WebCore::InspectorStyleSheetForInlineStyle::create): (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): * inspector/InspectorStyleSheet.h: (InspectorCSSId): (WebCore::InspectorCSSId::asProtocolValue): method is made template as now it returns 2 formally different types. (InspectorStyleSheet): (WebCore::InspectorStyleSheet::canBind): (InspectorStyleSheetForInlineStyle): 2012-04-06 Pavel Feldman Web Inspector: highlight diff in the gutter, not in the line content. https://bugs.webkit.org/show_bug.cgi?id=83371 Reviewed by Yury Semikhatsky. Now that the editing mode is enabled by default, diff highlighting gets annoying. I am moving it to the gutter (same decoration as before, but now coloring gutter only). * inspector/front-end/TextViewer.js: (WebInspector.TextEditorGutterPanel.prototype.textChanged): * inspector/front-end/textViewer.css: (.diff-container .webkit-added-line.webkit-line-number): (.diff-container .webkit-removed-line.webkit-line-number): (.diff-container .webkit-changed-line.webkit-line-number): 2012-04-06 Pavel Feldman Web Inspector: highlight diff in the gutter, not in the line content. https://bugs.webkit.org/show_bug.cgi?id=83371 Reviewed by Yury Semikhatsky. Now that the editing mode is enabled by default, diff highlighting gets annoying. I am moving it to the gutter (same decoration as before, but now coloring gutter only). * inspector/front-end/TextViewer.js: (WebInspector.TextEditorGutterPanel.prototype.textChanged): * inspector/front-end/textViewer.css: (.diff-container .webkit-added-line.webkit-line-number): (.diff-container .webkit-removed-line.webkit-line-number): (.diff-container .webkit-changed-line.webkit-line-number): 2012-04-06 Pavel Feldman Web Inspector: remove url from the saved urls map before the save action. https://bugs.webkit.org/show_bug.cgi?id=83364 Reviewed by Yury Semikhatsky. URL gets added back upon successful save anyways, but if user chooses cancel saving, we stop bugging him with the save-as dialog. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._exportAll): (WebInspector.NetworkLogView.prototype._exportResource): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameResourceTreeElement.prototype._appendSaveAsAction.doSave): (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.doSave): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._contextMenu): (WebInspector.TextViewer.prototype._commitEditing): * inspector/front-end/TimelineModel.js: (WebInspector.TimelineModel.prototype.saveToFile): * inspector/front-end/inspector.js: 2012-04-06 Andrey Kosyakov Web Inspector: display frame details in popover on frame strip in Timeline panel https://bugs.webkit.org/show_bug.cgi?id=83365 Reviewed by Pavel Feldman. - added popovers for frame strips; - factored out generateAggregatedInfo for reuse in the above; - made frame event dividers thinner, darker and greyer. * English.lproj/localizedStrings.js: Added "FPS" and "Frame" * inspector/front-end/TimelineFrameController.js: (WebInspector.TimelineFrameController.prototype._flushFrame): added startTimeOffset. (WebInspector.TimelineFrameController.prototype._createSyntheticFrame): ditto. * inspector/front-end/TimelineModel.js: (WebInspector.TimelineModel.prototype._updateBoundaries): (WebInspector.TimelineModel.prototype.recordOffsetInSeconds): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._updateFrames): added link to frame to strip div. (WebInspector.TimelinePanel.prototype._refresh): (WebInspector.TimelinePanel.prototype._getPopoverAnchor): handle frame anchors separately. (WebInspector.TimelinePanel.prototype._mouseMove): ditto. (WebInspector.TimelinePanel.prototype._showPopover): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): (WebInspector.TimelinePresentationModel._generateAggregatedInfo): factored out for reuse. (WebInspector.TimelinePresentationModel.generatePopupContentForFrame): * inspector/front-end/inspectorCommon.css: (.resources-dividers-label-bar): * inspector/front-end/timelinePanel.css: (.timeline .resources-event-divider.timeline-frame-divider): made divider thin and grey. (.timeline-frame-strip): bumped z-index, added pointer-events: auto. 2012-04-06 Pavel Feldman Web Inspector: show "dirty" flag for CSS files edited in the resources panel. https://bugs.webkit.org/show_bug.cgi?id=83363 Reviewed by Yury Semikhatsky. Added TextEdited notification into the editable source frame, listening to it in the resources panel. * inspector/front-end/ResourceView.js: (WebInspector.EditableResourceSourceFrame.prototype._contentChanged): (WebInspector.EditableResourceSourceFrame.prototype.isDirty): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameResourceTreeElement.prototype._appendRevision): (WebInspector.FrameResourceTreeElement.prototype.sourceView): (WebInspector.FrameResourceTreeElement.prototype._sourceViewTextEdited): 2012-04-06 Levi Weintraub Update LayoutUnit usage in RenderView https://bugs.webkit.org/show_bug.cgi?id=83147 Reviewed by Julien Chaffraix. Updating the usage of LayoutUnits in RenderView in preparation for sub-pixel layout. This mostly affects paint and repaint functions, which take LayoutRects up to the RenderView level. This is necessary as we continue to accumulate sub-pixel offsets up to this level. No new tests. No change in behavior. * rendering/RenderView.cpp: (WebCore::RenderView::paint): Adding an assert that we're being called to paint on pixel boundaries. We don't currently ever position RenderViews at sub-pixel offsets. (WebCore::RenderView::shouldRepaint): (WebCore::RenderView::repaintViewRectangle): Switching to a LayoutRect and cleaning up a fixme that used decomposed offsets. Pixel snapping is applied before handing the rect up to the FrameView. (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): Pixel snapping before handing the rect up to the Compositor. (WebCore::RenderView::computeRectForRepaint): (WebCore::RenderView::selectionBounds): (WebCore::RenderView::viewRect): (WebCore::RenderView::unscaledDocumentRect): * rendering/RenderView.h: (RenderView): 2012-04-06 Andrey Kosyakov Web Inspector: hide popover on mouseout from anchor https://bugs.webkit.org/show_bug.cgi?id=83362 Reviewed by Pavel Feldman. - start hide popover timer when mouse moves out of popover anchor, as we won't receive mousemove events any more; - factored out starting of popover kill timer to a method. * inspector/front-end/Popover.js: (WebInspector.PopoverHelper): (WebInspector.PopoverHelper.prototype._mouseMove): Factored out StartHidePopoverTimer() (WebInspector.PopoverHelper.prototype._mouseOut): Just call StartHidePopoverTimer() when mouse moves out of anchor. (WebInspector.PopoverHelper.prototype._startHidePopoverTimer.doHide): (WebInspector.PopoverHelper.prototype._startHidePopoverTimer): (WebInspector.PopoverHelper.prototype._hidePopover): Reset hoverElement (aka anchor) when hiding popover. 2012-04-06 Andrey Kosyakov [Chromium] Web Inspector: getEventListeners(window) crashes on NTP https://bugs.webkit.org/show_bug.cgi?id=83353 Reviewed by Pavel Feldman. * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::getEventListenersCallback): 2012-04-06 Kent Tamura Touch ChromeClient.h to fix Chromium build. https://bugs.webkit.org/show_bug.cgi?id=83258 * page/ChromeClient.h: 2012-04-06 Kent Tamura Initial LocalizedDateICU.cpp implementation https://bugs.webkit.org/show_bug.cgi?id=60868 Reviewed by Hajime Morita. Add LocalizedDateICU.cpp, which supports only Date type. It uses a short format because a date field is keyboard-editable. e.g. 5/15/11 in US locale. * WebCore.gyp/WebCore.gyp: Exclude LocalizedDateNone.cpp. * WebCore.gypi: Add LocalizedDateICU.cpp. * platform/text/LocalizedDateICU.cpp: Added. (WebCore::parseLocalizedDate): (WebCore::formatLocalizedDate): 2012-04-05 Alexander Pavlov [REGRESSION] Refreshed autofill popup renders garbage https://bugs.webkit.org/show_bug.cgi?id=83255 http://code.google.com/p/chromium/issues/detail?id=118374 The code used to update only the PopupContainer coordinates as if they were the coordinates relative to the root view. Instead, a WebWidget positioned relative to the screen origin holds the PopupContainer, so it is the WebWidget that should be positioned in PopupContainer::refresh(), and the PopupContainer's location should be (0, 0) (and their sizes should always be equal). Reviewed by Kent Tamura. No new tests, as the popup appearance is not testable in WebKit. * platform/chromium/PopupContainer.cpp: (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Variable renamed. (WebCore::PopupContainer::showPopup): Use m_originalFrameRect rather than frameRect() for passing into chromeClient. (WebCore::PopupContainer::showInRect): Set up the correct frameRect() for the container. (WebCore::PopupContainer::refresh): Resize the container and position the WebWidget correctly. * platform/chromium/PopupContainer.h: (PopupContainer): 2012-04-06 Kent Tamura Calendar Picker: Add code to open/close the calendar picker https://bugs.webkit.org/show_bug.cgi?id=83258 Reviewed by Hajime Morita. No new tests. This code is not used because of no ENABLE_INPUT_TYPE_DATE. * WebCore.gypi: Add existing header files. * html/DateInputType.cpp: (WebCore::DateInputType::DateInputType): Moved from DateInputType.h because the constructor depends on CalendarPickerElement. (WebCore::DateInputType::createShadowSubtree): Store a CalendarPickerElement object. (WebCore::DateInputType::destroyShadowSubtree): Release the CalendarPickerElement object. (WebCore::DateInputType::handleBlurEvent): Close the calendar picker when the input loses focus. * html/DateInputType.h: (DateInputType): - Move the constructor definition to DateInputType.cpp - Add function declarations - Add m_pickerElement data member. * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::hostInput): A helper to get the host . (WebCore::CalendarPickerElement::defaultEventHandler): If the element is clicked, open a calendar picker. (WebCore::CalendarPickerElement::openPopup): Opens a calendar picker by ChromeClient::openPagePopup(). (WebCore::CalendarPickerElement::closePopup): Closes a calendar picker by ChromeClient::closePagePopup(). (WebCore::CalendarPickerElement::detach): Closes a calendar picker when the element loses a renderer. (WebCore::CalendarPickerElement::contentSize): Provides the initial size of a popup. (WebCore::addString): A helper for writeDocument(). (WebCore::addJavaScriptString): ditto. (WebCore::addProperty): ditto. (WebCore::CalendarPickerElement::writeDocument): Provides the source of a popup. The function creates a complete HTML with: - WebCore/Resources/calendarPicker.css - WebCore/Resources/calendarPicker.js - An object to pass localization strings and state (WebCore::CalendarPickerElement::setValueAndClosePopup): Sets the value from a calendar picker to the . (WebCore::CalendarPickerElement::didClosePopup): Clear the popup object. * html/shadow/CalendarPickerElement.h: (CalendarPickerElement): Add declarations. * platform/text/LocalizedCalendarICU.cpp: (WebCore::getFirstDayOfWeek): Make sure this is 0-base. UCAL_SUNDAY is 1. 2012-04-05 Adele Peterson and https://bugs.webkit.org/show_bug.cgi?id=74129 REGRESSION (SnowLeopard, 5.1.4): All WK2 horizontal scrollbars look broken Patch by Dan Bernstein, Reviewed by Beth Dakin. This code assumed that the current CTM wouldn't have extraneous operations built into it, but this bug is evidence that that assumption was wrong. We should just get the base CTM instead and apply the device scale factor to it. No tests added since the SnowLeopard-style scrollbars aren't testable in our regression tests right now. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): (WebCore::GraphicsContext::applyDeviceScaleFactor): * platform/graphics/GraphicsContext.h: (GraphicsContext): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor): 2012-04-05 Yuta Kitamura Leak in WebSocketChannel with workers/worker-reload.html https://bugs.webkit.org/show_bug.cgi?id=83345 Reviewed by David Levin. A speculative fix of memory leaks caused by worker-reload.html. No new tests, as this change imposes no functional change. * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy): Receive the peer as PassOwnPtr<> so the destructor of the task object can delete the peer even if the task didn't run before main thread's cleanup period. (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect): * Modules/websockets/WorkerThreadableWebSocketChannel.h: (WorkerThreadableWebSocketChannel): 2012-04-05 Lu Guanqun combine two arrays (coreExceptionNames and coreExceptionDescriptions) into one array https://bugs.webkit.org/show_bug.cgi?id=83141 Reviewed by Adam Barth. No new tests required. * dom/DOMCoreException.cpp: (CoreException): (WebCore): (WebCore::DOMCoreException::initializeDescription): 2012-04-05 David Barton Remove intrinsic padding from contentBoxRect(), etc. https://bugs.webkit.org/show_bug.cgi?id=83092 Reviewed by Julien Chaffraix. "Intrinsic padding" does not count as CSS padding, but is treated as padding by basic layout and rendering code, e.g. RenderBlock::layout(). A lot of code relies on the equation border-box = content-box + padding + border (+ scrollbars). To keep this valid, change 5 functions in RenderBox.h to not include intrinsic padding in the content box, thus reverting to their behavior before the patch for bug 33593. Instead, have sizingBox(renderer) in CSSComputedStyleDeclaration.cpp explicitly put the intrinsic padding in computed CSS content-box values [for javascript getComputedStyle()], so the above equation still also holds for CSS computed values. This seems more consistent with how the padding...() functions behave since the patch for bug 23487, and will work better for MathML. For instance, a block's contentLogicalWidth() will be the availableLogicalWidth() for use by child elements. No new tests. The only real observable changes are illustrated in the bug 83092 attached test case and discussion. These are minor and hard to automate. * css/CSSComputedStyleDeclaration.cpp: (WebCore::sizingBox): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::removeNode): * rendering/RenderBox.h: (WebCore::RenderBox::contentBoxRect): (WebCore::RenderBox::contentWidth): (WebCore::RenderBox::contentHeight): (WebCore::RenderBox::contentLogicalWidth): (WebCore::RenderBox::contentLogicalHeight): - Change these 5 functions to omit intrinsic padding from the content box. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::cellBaselinePosition): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::firstLineBoxBaseline): 2012-04-05 Hironori Bono [Chromium] moving a cursor on a misspelled word should not remove a misspelled underline https://bugs.webkit.org/show_bug.cgi?id=83214 Reviewed by Ryosuke Niwa. When Chrome enables asynchronous spellchecking, it adds Spelling markers in the background. For this case, moving a cursor should not remove these markers because it requires Chrome to spellcheck text again. This change prevents removing Spelling markers added by spellcheckers asynchronously. Test: platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): 2012-04-05 Hans Muller CSS Exclusions polygon shape arguments should be comma separated https://bugs.webkit.org/show_bug.cgi?id=82368 Reviewed by Ryosuke Niwa. Changed the CSS Parser to accept a conventional comma separated argument list for the polygon exclusion shape. The syntax had used spaces to separate x,y coordinates, like: polygon(10px,20px 30px,40px). Now commas separate points: polygon(10px 20px, 30px 40px). This change is per the draft exclusions spec, http://dev.w3.org/csswg/css3-exclusions. Additional relevant information about CSS argument list syntax can be found here: http://dev.w3.org/csswg/css3-values/#component-whitespace. Factored comma recognition idiom in CSSParser.cpp into isComma() utility function. The existing tests have been updated. * css/CSSParser.cpp: (WebCore::isComma) (WebCore::CSSParser::parseFillPosition) (WebCore::CSSParser::parseFillRepeat) (WebCore::CSSParser::parseFillProperty) (WebCore::CSSParser::parseCubicBezierTimingFunctionValue) (WebCore::CSSParser::parseAnimationTimingFunction) (WebCore::CSSParser::parseAnimationProperty) (WebCore::CSSParser::parseExclusionShapePolygon) (WebCore::CSSParser::parseDeprecatedGradient) (WebCore::CSSParser::parseRadialGradient) (WebCore::CSSParser::parseGradientColorStops) (WebCore::CSSParser::parseImageSet) (WebCore::filterInfoForName) (WebCore::CSSParser::parseCustomFilter) (WebCore::CSSParser::parseFontFeatureSettings) * css/CSSWrapShapes.cpp: (WebCore::CSSWrapShapePolygon::cssText): 2012-04-05 Joshua Bell IndexedDB: Support string.length in keyPaths https://bugs.webkit.org/show_bug.cgi?id=83221 Special case in the IDB spec - keyPaths can reference the |length| property of string values. Other instrinsic properties (|length| of Array, etc) are handled automagically. Relevant section of the updated spec is: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-path-construct Reviewed by Kentaro Hara. Test: storage/indexeddb/keypath-intrinsic-properties.html * bindings/v8/IDBBindingUtilities.cpp: (WebCore): 2012-04-05 Arvid Nilsson [BlackBerry] Update the InstrumentedPlatformCanvas after rebasing Skia https://bugs.webkit.org/show_bug.cgi?id=83314 Reviewed by George Staikos. RIM PR: 143771 One new virtual method was added to the SkCanvas, to draw a nine piece image. Override it and mark output as not being a solid color anymore. * platform/graphics/blackberry/InstrumentedPlatformCanvas.h: (WebCore::InstrumentedPlatformCanvas::drawBitmapNine): (InstrumentedPlatformCanvas): 2012-04-05 Oliver Hunt Make WebCore use jsCast rather than static_cast for casting JSC objects https://bugs.webkit.org/show_bug.cgi?id=83320 Reviewed by Stephanie Lewis. Mechanically replace static_cast with jsCast where ever we can. * WebCore.exp.in: * bindings/js/DOMWrapperWorld.cpp: (WebCore::JSStringOwner::finalize): * bindings/js/DOMWrapperWorld.h: (WebCore::currentWorld): * bindings/js/JSArrayBufferCustom.cpp: (WebCore::JSArrayBufferConstructor::constructJSArrayBuffer): * bindings/js/JSAudioContextCustom.cpp: (WebCore::JSAudioContextConstructor::constructJSAudioContext): * bindings/js/JSCSSRuleListCustom.cpp: (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots): * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::cssPropertyGetterPixelOrPosPrefixCallback): (WebCore::cssPropertyGetterCallback): * bindings/js/JSCSSValueCustom.cpp: (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots): (WebCore::JSCSSValueOwner::finalize): * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSDOMBinding.h: (WebCore::deprecatedGlobalObjectForPrototype): (WebCore::getDOMPrototype): * bindings/js/JSDOMFormDataCustom.cpp: (WebCore::toHTMLFormElement): (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): * bindings/js/JSDOMMimeTypeArrayCustom.cpp: (WebCore::JSDOMMimeTypeArray::nameGetter): * bindings/js/JSDOMPluginArrayCustom.cpp: (WebCore::JSDOMPluginArray::nameGetter): * bindings/js/JSDOMPluginCustom.cpp: (WebCore::JSDOMPlugin::nameGetter): * bindings/js/JSDOMStringMapCustom.cpp: (WebCore::JSDOMStringMap::nameGetter): * bindings/js/JSDOMWindowBase.cpp: (WebCore::toJSDOMWindow): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::childFrameGetter): (WebCore::indexGetter): (WebCore::namedItemGetter): (WebCore::toDOMWindow): * bindings/js/JSDOMWindowCustom.h: (WebCore::asJSDOMWindow): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::window): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::globalObject): * bindings/js/JSDataViewCustom.cpp: (WebCore::JSDataViewConstructor::constructJSDataView): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSEventTarget.cpp: (WebCore): (WebCore::toEventTarget): * bindings/js/JSFloat32ArrayCustom.cpp: (WebCore::JSFloat32ArrayConstructor::constructJSFloat32Array): * bindings/js/JSFloat64ArrayCustom.cpp: (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array): * bindings/js/JSGeolocationCustom.cpp: (WebCore::JSGeolocation::getCurrentPosition): (WebCore::JSGeolocation::watchPosition): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::callHTMLAllCollection): (WebCore::JSHTMLAllCollection::nameGetter): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::nameGetter): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::nameGetter): * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::remove): * bindings/js/JSImageConstructor.cpp: (WebCore::constructImage): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): (WebCore::InjectedScriptManager::discardInjectedScript): (WebCore::InjectedScriptManager::injectedScriptFor): * bindings/js/JSInt16ArrayCustom.cpp: (WebCore::JSInt16ArrayConstructor::constructJSInt16Array): * bindings/js/JSInt32ArrayCustom.cpp: (WebCore::JSInt32ArrayConstructor::constructJSInt32Array): * bindings/js/JSInt8ArrayCustom.cpp: (WebCore::JSInt8ArrayConstructor::constructJSInt8Array): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::initializeJSFunction): * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::nameGetter): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNodeOwner::isReachableFromOpaqueRoots): (WebCore::JSNodeOwner::finalize): * bindings/js/JSNodeCustom.h: (WebCore::toJS): * bindings/js/JSNodeFilterCustom.cpp: (WebCore::toNodeFilter): * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots): (WebCore::JSNodeList::nameGetter): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectPropertyGetter): (WebCore::callPlugin): * bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSharedWorkerCustom.cpp: (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter): * bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::nameGetter): * bindings/js/JSTextTrackCueCustom.cpp: (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots): * bindings/js/JSTextTrackCustom.cpp: (WebCore::JSTextTrackOwner::isReachableFromOpaqueRoots): * bindings/js/JSTextTrackListCustom.cpp: (WebCore::JSTextTrackListOwner::isReachableFromOpaqueRoots): * bindings/js/JSTrackCustom.cpp: (WebCore::toTrack): * bindings/js/JSUint16ArrayCustom.cpp: (WebCore::JSUint16ArrayConstructor::constructJSUint16Array): * bindings/js/JSUint32ArrayCustom.cpp: (WebCore::JSUint32ArrayConstructor::constructJSUint32Array): * bindings/js/JSUint8ArrayCustom.cpp: (WebCore::JSUint8ArrayConstructor::constructJSUint8Array): * bindings/js/JSUint8ClampedArrayCustom.cpp: (WebCore::JSUint8ClampedArrayConstructor::constructJSUint8ClampedArray): * bindings/js/JSWebKitMutationObserverCustom.cpp: (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver): * bindings/js/JSWebKitPointCustom.cpp: (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocketConstructor::constructJSWebSocket): * bindings/js/JSWorkerContextBase.cpp: (WebCore::toJSDedicatedWorkerContext): (WebCore::toJSSharedWorkerContext): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorkerConstructor::constructJSWorker): * bindings/js/JSXSLTProcessorCustom.cpp: (WebCore::JSXSLTProcessor::importStylesheet): (WebCore::JSXSLTProcessor::transformToFragment): (WebCore::JSXSLTProcessor::transformToDocument): * bindings/js/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStackForInspector): * bindings/js/ScriptControllerMac.mm: (WebCore::updateStyleIfNeededForBindings): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidPause): * bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::set): * bindings/js/ScriptState.cpp: (WebCore::domWindowFromScriptState): (WebCore::scriptExecutionContextFromScriptState): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::fillTransferMap): (WebCore::CloneSerializer::dumpArrayBufferView): (WebCore::CloneDeserializer::getJSValue): (WebCore::CloneDeserializer::readTerminal): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject _isSafeScript]): (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateImplementation): (GenerateCallWith): (NativeToJSValue): (GenerateConstructorDefinition): * bridge/jni/jni_jsobject.h: * bridge/jni/jni_jsobject.mm: (JavaJSObject::convertJObjectToValue): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/objc/objc_utility.mm: (JSC::Bindings::convertValueToObjcValue): * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): * bridge/runtime_object.cpp: (JSC::Bindings::callRuntimeConstructor): * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::injectInternalsObject): (WebCoreTestSupport::resetInternalsObject): 2012-04-05 Martin Robinson [GTK] Scrolling some iframes that are partially out of the viewport leads to repaint errors https://bugs.webkit.org/show_bug.cgi?id=83309 Reviewed by Gustavo Noronha Silva. Test: platform/gtk/fast/frames/scrolling-iframe-out-of-viewport.html The X11 backing store was not properly trimming the scroll region when it was only a portion of the screen. This was hidden by subsequent repaints. * platform/gtk/GtkWidgetBackingStoreX11.cpp: (WebCore::WidgetBackingStore::scroll): Fix the calculation of the scrolling region. 2012-04-05 Sheriff Bot Unreviewed, rolling out r113299. http://trac.webkit.org/changeset/113299 https://bugs.webkit.org/show_bug.cgi?id=83297 The patch broke 11 tests on Lion. (Requested by jonlee on #webkit). * xml/parser/XMLDocumentParser.h: (XMLDocumentParser): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::endElementNs): (WebCore::getEntityHandler): (WebCore::XMLDocumentParser::initializeParserContext): 2012-04-05 Justin Novosad [Chromium] Correct misleading trace event names in Canvas2DLayerChromium https://bugs.webkit.org/show_bug.cgi?id=83310 Reviewed by Adrienne Walker. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::paintContentsIfDirty): 2012-04-05 Dean Jackson [mac] requestAnimationFrame sometimes stuck when page loads in a background tab https://bugs.webkit.org/show_bug.cgi?id=76105 Reviewed by Simon Fraser. Fix three issues with requestAnimationFrame: - It's possible for the call to rAF to come to the document before there is a page associated. Added a guard for this. - A page may try to suspend the scripted animations before the ScriptedAnimationController exists, in which case we need to suspend it immediately after it is created. Do this by keeping track of the state in Page. Otherwise rAF would be busy looping on hidden pages until they are brought to the front and hidden again. - A page created in the background (from WebKit1) does not get informed it is not visible. This can mean that resume() is called more times than suspend() and we get into a state where the number of suspensions becomes -1, and thus fails truthiness tests. Clamp it to values >= 0. No new tests, since this is not automatically testable. The most reliable test is to open a page with rAF in a background tab within Safari. * dom/Document.cpp: (WebCore::Document::webkitRequestAnimationFrame): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::resume): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::suspendScriptedAnimations): (WebCore::Page::resumeScriptedAnimations): * page/Page.h: (WebCore::Page::scriptedAnimationsSuspended): (Page): 2012-04-05 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=83311 Crashes in WebProcess at WebCore::HistoryController::recursiveSetProvisionalItem when restoring previous session Reviewed by Sam Weinig. It's possible to hit a race condition between the UIProcess and the WebProcess where the UIProcess records for a page have been cleared out but the WebProcess is still trying to perform a history navigation within that page. In this situation HistoryController code that expects there to always be a current history item in the back/forward controller is wrong. No new tests. (The race conditions involved have proven making a test impractical) * loader/HistoryController.cpp: (WebCore::HistoryController::recursiveSetProvisionalItem): Don't ASSERT the fromItem. We now know there might not be one. (WebCore::HistoryController::recursiveGoToItem): Ditto (WebCore::HistoryController::itemsAreClones): Always return false if either item is null, as a null item and a non-null item cannot possible be clones of each other. 2012-04-05 Adam Klein Crash in MutationObservers due to an invalid HashSet iterator https://bugs.webkit.org/show_bug.cgi?id=83304 Reviewed by Ojan Vafai. If the observed node has been GCed when we clear transient observers from it, the HashSet iterator in WebKitMutationObserver::deliver would be invalidated. This patch fixes that behavior by copying the relevant registrations into a seperate vector first and operating on the copy. This patch also fixes a bug: transient observers should be cleared after every microtask, not just when delivering. Tests: fast/mutation/clear-transient-without-delivery.html fast/mutation/transient-gc-crash.html * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach): Notify the observer that it has a transient registration so it can be properly cleared. * dom/MutationObserverRegistration.h: (WebCore::MutationObserverRegistration::hasTransientRegistrations): Add an accessor for use when deliver() creates its vector of registrations. * dom/WebKitMutationObserver.cpp: (WebCore::WebKitMutationObserver::setHasTransientRegistration): Add this to the active observer set to allow transient registrations to be cleared appropriately. (WebCore::WebKitMutationObserver::deliver): Avoid modifying m_registrations while iterating over it. Clear registrations before checking for a lack of records to deliver. * dom/WebKitMutationObserver.h: 2012-04-05 Adam Klein Rebaseline binding tests after r113272. * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::constructorCallback): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): 2012-04-05 Stephen White [chromium] Drawing an accelerated canvas onto itself is slow. https://bugs.webkit.org/show_bug.cgi?id=83295 Fixed by using a GPU-side deepCopy() in skia, so we don't trigger a readback and re-upload. Reviewed by James Robinson. Correctness is covered by existing tests. Performance is covered by the test case attached to the bug. * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::create): 2012-04-05 Dana Jansens [chromium] Record the number of tiles paint-culled instead of the incorrect number of pixels https://bugs.webkit.org/show_bug.cgi?id=82423 Reviewed by Adrienne Walker. We currently attempt to record the number of pixels we save from uploading, however the number is wrong in two ways. 1) An early-out if everything is culled results in nothing being reported. 2) With threaded-compositor, the number of pixels uploaded in one tile can be changed by culling in another tile, making the number far too difficult to compute to be worthwhile. If a tile was going to be partial-updated, but is culled, now a new tile gets to be partial-updated instead, which affects the numbers. This patch breaks up CCOverdrawMetrics to make the methods/variables less overloaded and more clear. This way they don't have to mirror each other so closely on paint/draw sides. Then we record the number of tiles for which we prevented upload via paint culling. This will still over-report (a dirty culled tile stays dirty and will be culled again each commit), but it seems more reasonable as it clearly does not try to mimic a performance metric in the way that a pixel count does, but still gives a rough estimation of the amount of paint culling going on in a page. Covered by existing tests, modified where needed. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdateTiles): * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: (WebCore::CCOverdrawMetrics::CCOverdrawMetrics): (WebCore::CCOverdrawMetrics::didCullTileForUpload): (WebCore): (WebCore::CCOverdrawMetrics::didUpload): (WebCore::CCOverdrawMetrics::didCullForDrawing): (WebCore::CCOverdrawMetrics::recordMetrics): (WebCore::CCOverdrawMetrics::recordMetricsInternal): * platform/graphics/chromium/cc/CCOverdrawMetrics.h: (CCOverdrawMetrics): (WebCore::CCOverdrawMetrics::pixelsCulledForDrawing): (WebCore::CCOverdrawMetrics::pixelsUploadedOpaque): (WebCore::CCOverdrawMetrics::pixelsUploadedTranslucent): (WebCore::CCOverdrawMetrics::tilesCulledForUpload): * platform/graphics/chromium/cc/CCQuadCuller.cpp: (WebCore::CCQuadCuller::append): 2012-04-05 Enrica Casucci Provide a separate editing command to cleanup of redundant markup. https://bugs.webkit.org/show_bug.cgi?id=83240 Reviewed by Ryosuke Niwa. This patch moves the logic originally performed by the private method removeRedundantMarkup inside ReplaceSelectionCommand into a separate command. This way the markup cleanup can be exposed as a separate command, independent from ReplaceSelectionCommand. No new tests. No change in functionality. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Added new file to project files. * editing/EditorAllInOne.cpp: Added SimplifyMarkupCommand. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Now uses SimplifyMarkupCommand. * editing/ReplaceSelectionCommand.h: (ReplaceSelectionCommand): Removed removeRedundantMarkup. * editing/SimplifyMarkupCommand.cpp: Added. (WebCore::SimplifyMarkupCommand::SimplifyMarkupCommand): (WebCore::SimplifyMarkupCommand::doApply): * editing/SimplifyMarkupCommand.h: Added. (WebCore::SimplifyMarkupCommand::create): 2012-04-05 Shawn Singh [chromium] Need to clip to homogeneous w=0 plane when applying transforms. https://bugs.webkit.org/show_bug.cgi?id=80806 Reviewed by Adrienne Walker. Unit tests added to CCLayerTreeHostCommon. This change is also covered by other existing unit tests and layout tests. WebCore TransformationMatrix mapRect / mapQuad / projectQuad do not properly handle the case where a surface is oriented partially behind the camera, with a perspective projection. In this case, projected points may appear to be valid in cartesian coordinates, but they are indeed not valid, and this problem can only be detected in homogeneous coordinates after applying the transform, before the divide-by-w step. The correct solution is to clip geometry where w < 0. This patch makes this change local to chromium only, to fix rendering bugs that arise from this problem. The primary fix is to correct calculateVisibleLayerRect(), but other ancillary locations are also fixed, in particular, the antialiasing code path is simply skipped when this case arises. Eventually this math needs to be merged into TransformationMatrix, to fix hit-testing bugs that occur in both Chromium and Safari. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCMathUtil.cpp: Added. (WebCore): (WebCore::HomogeneousCoordinate::HomogeneousCoordinate): (HomogeneousCoordinate): (WebCore::HomogeneousCoordinate::shouldBeClipped): (WebCore::HomogeneousCoordinate::cartesianPoint2d): (WebCore::projectPoint): (WebCore::mapPoint): (WebCore::computeClippedPointForEdge): (WebCore::expandBoundsToIncludePoint): (WebCore::computeEnclosingRectOfClippedQuad): (WebCore::computeEnclosingRect): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectQuad): * platform/graphics/chromium/cc/CCMathUtil.h: Added. (WebCore): (CCMathUtil): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::computeUnoccludedContentRect): 2012-04-05 Patrick Gansterer [Qt] Correct include paths. https://bugs.webkit.org/show_bug.cgi?id=83270 Reviewed by Eric Seidel. Modify the #include declerations so that the wtf types are included using the full path. * platform/graphics/TiledBackingStoreBackend.h: 2012-04-05 Antonio Gomes Unreviewed bit left over from rebasing the origin patch before landing it. Complementary to r113329. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::operator=): 2012-04-05 Sheriff Bot Unreviewed, rolling out r113241. http://trac.webkit.org/changeset/113241 https://bugs.webkit.org/show_bug.cgi?id=83293 Requested by sievers@chromium.org (Requested by zhenyao on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::canDraw): (WebCore::CCLayerTreeHostImpl::prepareToDraw): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): 2012-04-05 Sheriff Bot Unreviewed, rolling out r113341. http://trac.webkit.org/changeset/113341 https://bugs.webkit.org/show_bug.cgi?id=83299 bots caught some build errors (Requested by shawnsingh on #webkit). * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCMathUtil.cpp: Removed. * platform/graphics/chromium/cc/CCMathUtil.h: Removed. * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::projectQuad): (WebCore): (WebCore::computeUnoccludedContentRect): 2012-04-05 Justin Novosad [Chromium] With the skia port, setting LCD text filtering is causing texture cache invalidations of gpu canvas backing store https://bugs.webkit.org/show_bug.cgi?id=74183 Reviewed by Stephen White. Replacing unnecessary usage of SkCanvas::LayerIter with calls to SkCanvas::isDrawingToLayer(). Same results, lower overhead, and no GPU texture invalidation. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore): (WebCore::TransparencyAwareFontPainter::initializeForGDI): * platform/graphics/harfbuzz/FontHarfBuzz.cpp: (WebCore): (WebCore::adjustTextRenderMode): * platform/graphics/skia/FontSkia.cpp: (WebCore): (WebCore::adjustTextRenderMode): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore): (WebCore::disableTextLCD): * rendering/RenderThemeChromiumWin.cpp: (WebCore): 2012-04-05 Zan Dobersek media/track/track-webvtt-tc004-magic-header.html flakily times out https://bugs.webkit.org/show_bug.cgi?id=72279 Reviewed by Eric Carlson. Move all the checking for the WebVTT file identifier from TextTrackLoader to WebVTTParser, notifying the parser clients of parsing failures through a new method. Remove the WebVTTParser::fileIdentifierMaximumLength method and make WebVTTParser::hasRequiredFileIdentifier private. The latter now operates on a vector holding the identifier data to which data is added until there's enough of it to possibly hold the optional BOM character and the required WEBVTT character sequence. No new tests. Fixes an existing test. * html/track/WebVTTParser.cpp: Fix a typo throughout the file: fileIdentiferLength -> fileIdentifierLength (WebCore): (WebCore::WebVTTParser::parseBytes): Only continue with searcing for the WEBVTT identifier if there's enough data to possibly contain the identifier. Report that the file failed to parse if the identifier was then not found. (WebCore::WebVTTParser::hasRequiredFileIdentifier): Refactor to operate on the vector containing identifier data and merge with the hasLongWebVTTIdentifier function. * html/track/WebVTTParser.h: (WebVTTParserClient): Add a new method. (WebVTTParser): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::processNewCueData): Parser is now created immediately regardless of the mime type the response holds. (WebCore::TextTrackLoader::fileFailedToParse): Log the error, set the state to failed, start the cue load timer and cancel the load if the file was not parsed successfully. (WebCore): * loader/TextTrackLoader.h: (TextTrackLoader): 2012-04-05 Shawn Singh [chromium] Need to clip to homogeneous w=0 plane when applying transforms. https://bugs.webkit.org/show_bug.cgi?id=80806 Reviewed by Adrienne Walker. Unit tests added to CCLayerTreeHostCommon. This change is also covered by other existing unit tests and layout tests. WebCore TransformationMatrix mapRect / mapQuad / projectQuad do not properly handle the case where a surface is oriented partially behind the camera, with a perspective projection. In this case, projected points may appear to be valid in cartesian coordinates, but they are indeed not valid, and this problem can only be detected in homogeneous coordinates after applying the transform, before the divide-by-w step. The correct solution is to clip geometry where w < 0. This patch makes this change local to chromium only, to fix rendering bugs that arise from this problem. The primary fix is to correct calculateVisibleLayerRect(), but other ancillary locations are also fixed, in particular, the antialiasing code path is simply skipped when this case arises. Eventually this math needs to be merged into TransformationMatrix, to fix hit-testing bugs that occur in both Chromium and Safari. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCMathUtil.cpp: Added. (WebCore): (WebCore::HomogeneousCoordinate::HomogeneousCoordinate): (HomogeneousCoordinate): (WebCore::HomogeneousCoordinate::shouldBeClipped): (WebCore::HomogeneousCoordinate::cartesianPoint2d): (WebCore::projectPoint): (WebCore::mapPoint): (WebCore::computeClippedPointForEdge): (WebCore::expandBoundsToIncludePoint): (WebCore::computeEnclosingRectOfClippedQuad): (WebCore::computeEnclosingRect): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectQuad): * platform/graphics/chromium/cc/CCMathUtil.h: Added. (WebCore): (CCMathUtil): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::computeUnoccludedContentRect): 2012-04-05 Jia Pu Move correction panel related functions from EditorClient into separated AlternativeTextClient class. https://bugs.webkit.org/show_bug.cgi?id=82970 Reviewed by Enrica Casucci. No new tests, since there's no change of functionality. The existing correction panel related functions in EditorClient are currently used only by OS X. We'd like to move them into separate AlternativeTextClient class to avoid using #ifdef's. This new client class will also hold dictation alternative related interface that we will add soon for bug 82503. * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * editing/AlternativeTextController.cpp: Changes in this file are all for calling functions in AlternativeTextClient instead of those in EditoClient. (WebCore::AlternativeTextController::show): (WebCore::AlternativeTextController::dismiss): (WebCore::AlternativeTextController::dismissSoon): (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): (WebCore::AlternativeTextController::timerFired): (WebCore::AlternativeTextController::isAutomaticSpellingCorrectionEnabled): (WebCore::AlternativeTextController::alternativeTextClient): (WebCore): (WebCore::AlternativeTextController::editorClient): (WebCore::AlternativeTextController::textChecker): (WebCore::AlternativeTextController::recordAutocorrectionResponseReversed): (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection): * editing/AlternativeTextController.h: (WebCore): (AlternativeTextController): * editing/TextCheckingHelper.h: (WebCore): * loader/EmptyClients.h: (EmptyEditorClient): * page/AlternativeTextClient.h: Added. (WebCore): (AlternativeTextClient): (WebCore::AlternativeTextClient::~AlternativeTextClient): * page/EditorClient.h: (EditorClient): * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::PageClients::PageClients): * page/Page.h: (WebCore): (PageClients): (Page): (WebCore::Page::alternativeTextClient): 2012-04-05 Min Qin Fix fullscreen video button for android https://bugs.webkit.org/show_bug.cgi?id=83087 Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=70437 changed css keyword for fullscreen video button. It is changed from media-fullscreen-button to media-enter-fullscreen-button. However, it does not change the value in mediaControlChromiumAndroid.css. No behavior change. * css/mediaControlsChromiumAndroid.css: (video::-webkit-media-controls-fullscreen-button): 2012-04-05 Pavel Feldman Web Inspector: CSS file revisions are not restored upon front-end reopen. https://bugs.webkit.org/show_bug.cgi?id=83292 Reviewed by Yury Semikhatsky. Populating suggestions before the panel creation now. * inspector/front-end/inspector.js: (WebInspector._doLoadedDoneWithCapabilities.get if): 2012-04-04 Simon Fraser Add assertions to check for mutation of RenderLayer z-order lists during enumeration https://bugs.webkit.org/show_bug.cgi?id=83242 Reviewed by James Robinson. Add debug-only code that detects whether RenderLayer's z-order and normal flow lists are being cleared or otherwise mutated while we're enumerating over them. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::paintList): (WebCore::RenderLayer::calculateLayerBounds): (WebCore::RenderLayer::dirtyZOrderLists): (WebCore::RenderLayer::dirtyNormalFlowList): (WebCore::RenderLayer::updateZOrderListsSlowCase): (WebCore::RenderLayer::updateNormalFlowList): * rendering/RenderLayer.h: (RenderLayer): (WebCore::RenderLayer::layerListMutationAllowed): (WebCore::RenderLayer::setLayerListMutationAllowed): (WebCore): (LayerListMutationDetector): (WebCore::LayerListMutationDetector::LayerListMutationDetector): (WebCore::LayerListMutationDetector::~LayerListMutationDetector): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): (WebCore::RenderLayerCompositor::computeCompositingRequirements): (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect): (WebCore::RenderLayerCompositor::layerHas3DContent): 2012-04-05 Sheriff Bot Unreviewed, rolling out r113254. http://trac.webkit.org/changeset/113254 https://bugs.webkit.org/show_bug.cgi?id=83291 Requested by sievers@chromium.org (Requested by zhenyao on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::canDraw): 2012-04-05 Sheriff Bot Unreviewed, rolling out r113307. http://trac.webkit.org/changeset/113307 https://bugs.webkit.org/show_bug.cgi?id=83288 Requested by sievers@chromium.org (Requested by zhenyao on #webkit). * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::canDraw): 2012-03-14 Antonio Gomes Extend HitTestResult to support not "discarding" shadow content in favor of its DOM ancestor https://bugs.webkit.org/show_bug.cgi?id=80847 Reviewed by David Hyatt. In order to improve touch precision on shadow tree content, patch extends the rect-hittest'ing system to allow shadow content to be stored as the rect-hittest result node list. Primary use cases are for this extension is making it easier to improve the clickability of default controls of