2012-06-14 Kent Tamura Validate form state strings in FormController::setStateForNewFormElements() https://bugs.webkit.org/show_bug.cgi?id=88768 Reviewed by Hajime Morita. Reject invalid form state vectors. This state vectors are generated by WebKit itself. However it can be invalid because - Serialized state vectors can be corrupted - A future version of WebKit might change the format So we had better reject unexpected state vectors as possible. Test: fast/forms/state-restore-broken-state.html * WebCore.exp.in: Expose some symbols used by Internals.cpp. * html/FormController.cpp: (WebCore::isNotFormControlTypeCharacter): A helper for state validation. (WebCore::FormController::setStateForNewFormElements): Reject state vectors of which size is not a multiple of 3, or a type name is invalid. * testing/Internals.cpp: (WebCore::Internals::formControlStateOfPreviousHistoryItem): Returns a form state vector of the previous document. (WebCore::Internals::setFormControlStateOfPreviousHistoryItem): Sets a form state vector for the previous document. * testing/Internals.h: Declare new functions. * testing/Internals.idl: ditto. 2012-06-14 Sheriff Bot Unreviewed, rolling out r120393. http://trac.webkit.org/changeset/120393 https://bugs.webkit.org/show_bug.cgi?id=89163 breaks cr-mac build (Requested by morrita on #webkit). * WebCore.gyp/WebCore.gyp: * platform/image-decoders/ImageDecoder.h: (ImageFrame): (ImageDecoder): * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (turboSwizzled): (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::close): (WebCore::JPEGImageReader::decode): (JPEGImageReader): (WebCore::JPEGImageDecoder::outputScanlines): * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageReader::PNGImageReader): (WebCore::PNGImageReader::close): (WebCore::PNGImageReader::currentBufferSize): (PNGImageReader): (WebCore::PNGImageReader::decodingSizeOnly): (WebCore::PNGImageReader::interlaceBuffer): (WebCore::PNGImageReader::hasAlpha): (WebCore::PNGImageReader::setHasAlpha): (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable): * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore): (WebCore::resolveColorSpace): (WebCore::createColorSpace): (WebCore::ImageFrame::setColorProfile): (WebCore::ImageFrame::setStatus): 2012-06-14 Julien Chaffraix RenderLayer subtrees without any self-painting layer shouldn't be walked during painting https://bugs.webkit.org/show_bug.cgi?id=88888 Reviewed by Simon Fraser. Performance optimization, covered by existing tests. The gist of this change is to add a has-self-painting-layer-descendant flag (including an invalidation logic) that is used to avoid walking subtrees without any self-painting layer. On http://dglazkov.github.com/performance-tests/biggrid.html with a 100,000 rows by 100 columns table, it brings the paint time during scrolling from ~45ms to ~6ms on my machine. The test case is a pathologic example here but the optimization should apply in other cases. The new update logic piggy-backs on top of the existing updateVisibilityStatus() one that got repurposed and renamed as part of this change. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::addChild): (WebCore::RenderLayer::removeChild): (WebCore::RenderLayer::styleChanged): These functions were updated to dirty / set the new flag. (WebCore::RenderLayer::dirtyAncestorChainHasSelfPaintingLayerDescendantStatus): (WebCore::RenderLayer::setAncestorChainHasSelfPaintingLayerDescendant): Added those functions to handle setting / invalidating the new flag. (WebCore::RenderLayer::updateSelfPaintingLayerAfterStyleChange): Added this function to handle style update. (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::paintLayerContentsAndReflection): (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::paintList): Changed this logic to bail out if we have no self-painting descendants. This is what is giving the performance improvement. Also added some performance ASSERTs to ensure the methods are not called when they shouldn't. (WebCore::RenderLayer::updateDescendantDependentFlags): Renamed from updateVisibilityStatus to account for the new usage. (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::updateLayerPositionsAfterScroll): (WebCore::RenderLayer::collectLayers): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Updated after updateVisibilityStatus rename. * rendering/RenderLayer.h: (WebCore::RenderLayer::hasSelfPaintingLayerDescendant): Added the declaration of the new functions as well as the new flag and dirty bit. 2012-06-14 Tony Payne [chromium] Add iccjpeg and qcms to chromium port https://bugs.webkit.org/show_bug.cgi?id=81974 Reviewed by Adam Barth. Covered by existing layout tests which will be rebaselined. * WebCore.gyp/WebCore.gyp: Add qcms to the build. * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Return an sRGB profile. On OSX, return the default RGB profile. Add FIXME to use the user's monitor profile and verify that profile for other platforms. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (turboSwizzled): For libjpeg-turbo, JCS_EXT_BGRA and JCS_EXT_RGBA are the two known output color spaces for which the decoder uses a data swizzle. (colorSpaceHasAlpha): JPEG's have no alpha in the output color space. For libjpeg-turbo, alpha may be present in the swizzled output color space. (WebCore::JPEGImageReader::JPEGImageReader): (WebCore::JPEGImageReader::close): (WebCore::JPEGImageReader::decode): For QCMSLIB, create the color transform to use during decoding, and ensure we switch to inputing RGBA data to qcms even if the desired output data is BGRA: outputScanlines() sends BGRA data to the frame buffer following color correction if needed. (JPEGImageReader): (WebCore::JPEGImageReader::colorTransform): qcms color transform getter. (WebCore::JPEGImageReader::createColorTransform): Create color transform. Release the existing transform (if any) and assign to the color transform created from the color profile data. (WebCore::JPEGImageDecoder::outputScanlines): Minor style fix. Apply color transform to each decoded image row. * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageReader::PNGImageReader): (WebCore::PNGImageReader::close): (WebCore::PNGImageReader::currentBufferSize): Move this adjacent to other setters and getters. (WebCore::PNGImageReader::decodingSizeOnly): Ditto. (WebCore::PNGImageReader::setHasAlpha): Ditto. (WebCore::PNGImageReader::hasAlpha): Ditto. (WebCore::PNGImageReader::interlaceBuffer): Ditto. (WebCore::PNGImageReader::createRowBuffer): Creates a temporary row buffer, used when a color transform is applied to the decoded image pixels. (WebCore::PNGImageReader::rowBuffer): Return the temporary row buffer. (WebCore::PNGImageReader::colorTransform): qcms color transform getter. (WebCore::PNGImageReader::createColorTransform): Create color transform. Release the existing transform (if any) and assign to the color transform created from the color profile data. (WebCore::PNGImageDecoder::headerAvailable): For QCMSLIB, create the color transform to use for decoding. Clear m_colorProfile (not used anymore). (WebCore::PNGImageDecoder::rowAvailable): Create temporary row buffer if a color transform is needed for decoding. Apply color transform to each decoded image row. * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::ImageFrame::setColorProfile): Old method of colorProfiles is no longer used. Add a FIXME to remove the old implementation. (WebCore::ImageFrame::setStatus): Remove old color correction code. 2012-06-14 Sheriff Bot Unreviewed, rolling out r120384. http://trac.webkit.org/changeset/120384 https://bugs.webkit.org/show_bug.cgi?id=89157 breaks create-blob-url-from-data-url.html (Requested by morrita on #webkit). * fileapi/Blob.cpp: (WebCore::Blob::Blob): * fileapi/BlobURL.cpp: (WebCore::BlobURL::createBlobURL): * fileapi/BlobURL.h: (BlobURL): * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::start): * fileapi/ThreadableBlobRegistry.cpp: (WebCore): (WebCore::ThreadableBlobRegistry::registerBlobURL): (WebCore::ThreadableBlobRegistry::unregisterBlobURL): * fileapi/ThreadableBlobRegistry.h: (WebCore): (ThreadableBlobRegistry): * html/DOMURL.cpp: (WebCore::DOMURL::createObjectURL): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::create): 2012-06-14 Yoshifumi Inoue [Forms] Copy RenderTextControlSingleLine.{cpp,h} to RenderSearchFiled.{cpp,h} https://bugs.webkit.org/show_bug.cgi?id=89155 Reviewed by Kent Tamura. This patch copies RenderTextControlSingleLine.cpp and .h into RenderSearchField.cpp and .h with just "cp" code. New files aren't compiled until bug 88980. No new tests. This patch doesn't change behavior. * rendering/RenderSearchField.cpp: Added. (WebCore::RenderTextControlInnerBlock::positionForPoint): (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::containerElement): (WebCore::RenderTextControlSingleLine::innerBlockElement): (WebCore::RenderTextControlSingleLine::innerSpinButtonElement): (WebCore::RenderTextControlSingleLine::resultsButtonElement): (WebCore::RenderTextControlSingleLine::cancelButtonElement): (WebCore::RenderTextControlSingleLine::textBaseStyle): (WebCore::RenderTextControlSingleLine::addSearchResult): (WebCore::RenderTextControlSingleLine::showPopup): (WebCore::RenderTextControlSingleLine::hidePopup): (WebCore::RenderTextControlSingleLine::paint): (WebCore::RenderTextControlSingleLine::layout): (WebCore::RenderTextControlSingleLine::nodeAtPoint): (WebCore::RenderTextControlSingleLine::styleDidChange): (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): (WebCore::RenderTextControlSingleLine::hasControlClip): (WebCore::RenderTextControlSingleLine::controlClipRect): (WebCore::RenderTextControlSingleLine::getAvgCharWidth): (WebCore::RenderTextControlSingleLine::preferredContentWidth): (WebCore::RenderTextControlSingleLine::computeControlHeight): (WebCore::RenderTextControlSingleLine::updateFromElement): (WebCore::RenderTextControlSingleLine::createInnerTextStyle): (WebCore::RenderTextControlSingleLine::createInnerBlockStyle): (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility): (WebCore::RenderTextControlSingleLine::visibilityForCancelButton): (WebCore::RenderTextControlSingleLine::textShouldBeTruncated): (WebCore::RenderTextControlSingleLine::autosaveName): (WebCore::RenderTextControlSingleLine::valueChanged): (WebCore::RenderTextControlSingleLine::itemText): (WebCore::RenderTextControlSingleLine::itemLabel): (WebCore::RenderTextControlSingleLine::itemIcon): (WebCore::RenderTextControlSingleLine::itemIsEnabled): (WebCore::RenderTextControlSingleLine::itemStyle): (WebCore::RenderTextControlSingleLine::menuStyle): (WebCore::RenderTextControlSingleLine::clientInsetLeft): (WebCore::RenderTextControlSingleLine::clientInsetRight): (WebCore::RenderTextControlSingleLine::clientPaddingLeft): (WebCore::RenderTextControlSingleLine::clientPaddingRight): (WebCore::RenderTextControlSingleLine::listSize): (WebCore::RenderTextControlSingleLine::selectedIndex): (WebCore::RenderTextControlSingleLine::popupDidHide): (WebCore::RenderTextControlSingleLine::itemIsSeparator): (WebCore::RenderTextControlSingleLine::itemIsLabel): (WebCore::RenderTextControlSingleLine::itemIsSelected): (WebCore::RenderTextControlSingleLine::setTextFromItem): (WebCore::RenderTextControlSingleLine::fontSelector): (WebCore::RenderTextControlSingleLine::hostWindow): (WebCore::RenderTextControlSingleLine::autoscroll): (WebCore::RenderTextControlSingleLine::scrollWidth): (WebCore::RenderTextControlSingleLine::scrollHeight): (WebCore::RenderTextControlSingleLine::scrollLeft): (WebCore::RenderTextControlSingleLine::scrollTop): (WebCore::RenderTextControlSingleLine::setScrollLeft): (WebCore::RenderTextControlSingleLine::setScrollTop): (WebCore::RenderTextControlSingleLine::scroll): (WebCore::RenderTextControlSingleLine::logicalScroll): (WebCore::RenderTextControlSingleLine::createScrollbar): (WebCore::RenderTextControlSingleLine::inputElement): * rendering/RenderSearchField.h: Added. (RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::popupIsVisible): (WebCore::RenderTextControlSingleLine::isTextField): (WebCore::toRenderTextControlSingleLine): (RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock): (WebCore::RenderTextControlInnerBlock::hasLineIfEmpty): 2012-06-14 Kent Tamura [JSC/V8] "DOMString[]" for function return values should not be null https://bugs.webkit.org/show_bug.cgi?id=89151 Reviewed by Kentaro Hara. jsArray and v8Array are used for "DOMString[]", not "DOMString[]?". So we should not return JavaScript null object. No new tests. We have no plan to use this code in production code for now. It will be used for window.internals functions. * bindings/js/JSDOMBinding.cpp: (WebCore::jsArray): For null input, returns an empty array, not null. * bindings/v8/V8Binding.cpp: (WebCore::v8Array): Implement DOMStringList -> JavaScript array conversion. Like jsArray(), we don't return null object. * bindings/v8/V8Binding.h: (WebCore): Declare v8Array(). 2012-06-14 Dale Curtis Disable click/dbl-click on MediaDocument for Chromium. Fix layout test for all platforms. https://bugs.webkit.org/show_bug.cgi?id=89129 As titled, click-to-pause and double-click-to-play behavior are unwanted on Chromium. A long standing issue (~3 years) has been to disable this feature. Reviewed by Eric Carlson. Uses existing click/double-click test. * html/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): 2012-06-14 Jian Li FileReader is dysfunctional in documents with "null" origin string https://bugs.webkit.org/show_bug.cgi?id=78648 Reviewed by Adam Barth. The fix is to keep in-memory map from blob URL to SecurityOrigin for the unique origin case. Test: fast/files/file-reader-file-url.html * fileapi/Blob.cpp: (WebCore::Blob::Blob): * fileapi/BlobURL.cpp: (WebCore::BlobURL::getOrigin): Return the origin string embeded in the blob URL. (WebCore): (WebCore::BlobURL::createBlobURL): Remove the check for null origin string since it is handled now. * fileapi/BlobURL.h: (BlobURL): * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::start): * fileapi/ThreadableBlobRegistry.cpp: (WebCore): (WebCore::originMap): Thread-specific in-memory map from the blob URL to the origin. (WebCore::ThreadableBlobRegistry::registerBlobURL): Add the map from the blob URL to the origin. (WebCore::ThreadableBlobRegistry::unregisterBlobURL): Remove the map for the unregistered blob URL. (WebCore::ThreadableBlobRegistry::cachedOrigin): Retrieve the origin associated with the blob URL. * fileapi/ThreadableBlobRegistry.h: (WebCore): (ThreadableBlobRegistry): * html/DOMURL.cpp: (WebCore::DOMURL::createObjectURL): * page/SecurityOrigin.cpp: (WebCore::cachedOrigin): Return the cached origin for the blob URL if it exists. (WebCore): (WebCore::SecurityOrigin::create): Call cachedOrigin to get the cached origin first. 2012-06-14 Sudarsana Nagineni [CMAKE] Move JSDeprecatedPeerConnectionCustom.cpp from CMakeLists.txt to UseJSC.cmake https://bugs.webkit.org/show_bug.cgi?id=89015 Reviewed by Antonio Gomes. Include JSDeprecatedPeerConnectionCustom.cpp in UseJSC.cmake instead of CMakeLists.txt. No change in functionality so no new tests. * CMakeLists.txt: * UseJSC.cmake: 2012-06-14 Xianzhu Wang [Chromium] Add setAutoHint() and setUseBitmaps() in WebFontRendering https://bugs.webkit.org/show_bug.cgi?id=89014 Reviewed by James Robinson. No new tests because of no change of functionality. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore): (WebCore::FontPlatformData::setAutoHint): (WebCore::FontPlatformData::setUseBitmaps): (WebCore::FontPlatformData::setAntiAlias): (WebCore::FontPlatformData::setupPaint): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (FontPlatformData): 2012-06-14 Ryuan Choi [EFL] Move cursor related code from WidgetEfl to ewk_view and EflScreenUtilities. https://bugs.webkit.org/show_bug.cgi?id=88803 Reviewed by Chang Shu. Because WebProcess can not control cursor, setCursor should be passed to ChromeClient like other ports. * platform/Widget.h: (Widget): * platform/efl/EflScreenUtilities.cpp: (WebCore::applyFallbackCursor): Moved from WidgetEfl.cpp. (WebCore): (WebCore::isUsingEcoreX): Moved from WidgetEfl.cpp. * platform/efl/EflScreenUtilities.h: (WebCore): * platform/efl/WidgetEfl.cpp: Removes cursor related codes. (WebCore::WidgetPrivate::WidgetPrivate): (WebCore::Widget::~Widget): (WebCore::Widget::setCursor): Redirect to HostWindow. (WebCore::Widget::setEvasObject): 2012-06-14 Ryosuke Niwa Radio node lists do not get updated when inserted back into a document https://bugs.webkit.org/show_bug.cgi?id=88825 Reviewed by Darin Adler. The bug was caused by RadioNodeList's m_node not being adjusted back to a document after it was removed from the document and inserted back. While we could be doing this adjustment again when the HTMLFormElement is inserted back into the document, this whole approach is fragile because adds a maintenance burden on root elements of RadioNodeList. Change the approach to the problem instead and detect when m_node is detached from the document. Now RadioNodeList and LabelsNodeList will always use its root element as m_node and DynamicSubtreeNodeList's node() will then determine whether it should use its document or not based on the flag (rootedAtDocument) passed by the constructor of the node list and m_node->inDocument(). Also invalidate node lists rooted at the document level regardless where the DOM mutation took place. * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::~ClassNodeList): * dom/Document.cpp: (WebCore::Document::registerDynamicSubtreeNodeList): Moved from Node. (WebCore::Document::unregisterDynamicSubtreeNodeList): Ditto. * dom/Document.h: (Document): * dom/DynamicNodeList.cpp: (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Takes DynamicNodeListRootType which tell us whether node() should return m_node's document by default or not. (WebCore::DynamicSubtreeNodeList::length): Refactor code to avoid node() multiple times. (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent): Ditto. (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent): Ditto. (WebCore::DynamicNodeList::itemWithName): Ditto. * dom/DynamicNodeList.h: (WebCore::DynamicNodeList::DynamicNodeList): (WebCore::DynamicNodeList::node): Returns m_node->document() if m_node is still in the document and the node list was rooted at document. (WebCore::DynamicNodeList::Caches::Caches): (Caches): (DynamicNodeList): (DynamicSubtreeNodeList): * dom/NameNodeList.cpp: (WebCore::NameNodeList::~NameNodeList): * dom/Node.cpp: (WebCore): (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Invalidate m_listsInvalidatedAtDocument at document instead of trying to invalidate it on every ancestor we traverse. (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto. (WebCore::NodeListsNodeData::invalidateCachesForDocument): Extracted from invalidateCachesThatDependOnAttributes. (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes): (WebCore::Node::radioNodeList): * dom/Node.h: (Node): * dom/NodeRareData.h: (NodeListsNodeData): * dom/TagNodeList.cpp: (WebCore::TagNodeList::~TagNodeList): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::removedFrom): * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): Takes Element* first since that's the order we use elsewhere. * html/RadioNodeList.h: (WebCore::RadioNodeList::create): (RadioNodeList): 2012-06-14 Tony Chang Fix bit packing of StyleRareInheritedData on Windows https://bugs.webkit.org/show_bug.cgi?id=89112 Reviewed by Ryosuke Niwa. On my machine (64 bit Chromium Linux), StyleRareInheritedData is 168 bytes. No new tests, added a compile assert to ensure correctness going forward. * rendering/style/StyleRareInheritedData.cpp: (SameSizeAsStyleRareInheritedData): (WebCore): * rendering/style/StyleRareInheritedData.h: (StyleRareInheritedData): 2012-06-14 Andreas Kling Crashes below IconDatabase::performPendingRetainAndReleaseOperations(). Reviewed by Brady Eidson. Put isolatedCopy() strings in the retain/release operation queues to make sure it's safe for secondary threads to ref/deref them in performPendingRetainAndReleaseOperations(). Also added assertions as appropriate. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::retainIconForPageURL): (WebCore::IconDatabase::releaseIconForPageURL): (WebCore::IconDatabase::performPendingRetainAndReleaseOperations): 2012-06-14 Shawn Singh [chromium] For hit testing in CCLayerTreeHostCommon, need to check that the transform is invertible before inverting it. https://bugs.webkit.org/show_bug.cgi?id=89049 Reviewed by Adrienne Walker. Unit test added to CCLayerTreeHostCommonTest.cpp: CCLayerTreeHostCommonTest.verifyHitTestingForUninvertibleTransform * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::pointHitsRect): 2012-06-14 Maciej Stachowiak The whole world rebuilds when you touch any IDL file https://bugs.webkit.org/show_bug.cgi?id=89125 Reviewed by Sam Weinig. No new tests; this only changes the build system and its dependencies. * bindings/scripts/preprocess-idls.pl: Optionally generate the dependencies for supplemental IDLs in Makefile format. * DerivedSources.make: Use the new feature of preprocess-idls.pl to generate the correct IDL dependencies created by Supplemental, then include it. This way, we avoid the situation where every bindings file implicitly depends on every single IDL file in the project. 2012-06-14 Ian Vollick [chromium] Certain settings in CCSettings could be global https://bugs.webkit.org/show_bug.cgi?id=88384 Reviewed by James Robinson. No new tests. No new functionality. * WebCore.gypi: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: (WebCore::CCDebugRectHistory::enabled): (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame): * platform/graphics/chromium/cc/CCDebugRectHistory.h: (WebCore): (CCDebugRectHistory): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::showDebugRects): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawDebugRects): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeSettings::CCLayerTreeSettings): (CCLayerTreeSettings): (CCLayerTreeHost): (WebCore::CCLayerTreeHost::settings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::create): (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): (WebCore::CCRenderer::settings): * platform/graphics/chromium/cc/CCSettings.cpp: Added. (WebCore): (WebCore::CCSettings::perTilePaintingEnabled): (WebCore::CCSettings::setPerTilePaintingEnabled): (WebCore::CCSettings::partialSwapEnabled): (WebCore::CCSettings::setPartialSwapEnabled): (WebCore::CCSettings::acceleratedAnimationEnabled): (WebCore::CCSettings::setAcceleratedAnimationEnabled): (WebCore::CCSettings::reset): * platform/graphics/chromium/cc/CCSettings.h: Added. (WebCore): (CCSettings): * testing/InternalSettings.cpp: * testing/InternalSettings.h: (InternalSettings): 2012-06-14 Alejandro G. Castro [GTK] Add TextureMapper ImageBuffer support as a fallback from the hardware accelerated path https://bugs.webkit.org/show_bug.cgi?id=73634 Remove the TextureMapperCairo classes, now we use TextureMapperImageBuffer to implement the software fallback. Add implementation for the 3D transformations in the 2D cairo graphics context. Reviewed by Martin Robinson. This patch adds a new implementation of already tested cases. * GNUmakefile.list.am: * platform/graphics/cairo/GraphicsContext3DPrivate.cpp: (WebCore): (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): Required for compilation when WebGL is enabled. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::get3DTransform): (WebCore::GraphicsContext::concat3DTransform): (WebCore::GraphicsContext::set3DTransform): * platform/graphics/cairo/TextureMapperCairo.cpp: Removed. * platform/graphics/cairo/TextureMapperCairo.h: Removed. * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::updateContents): 2012-06-14 Jia Pu Mark text with text alternative with blue underline. https://bugs.webkit.org/show_bug.cgi?id=83047 Reviewed by Enrica Casucci. Tests: platform/mac/editing/input/edit-dictated-text-with-alternative.html platform/mac/editing/input/insert-dictated-text.html This patch implements visual indication on dictated text with alternatives, and provides UI to show alternative text on OS X. Majority of the changes is for generalizing existing AlternativeTextController class to handle dictation alternatives. The two new classes, AlternativeTextUIController and TextAlternativeWithRange, are used by both WebKit and WK2. So WebCore seems to be the natural place for them. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * editing/AlternativeTextController.cpp: Expanded exising class interface to support dictation alternatives. (DictationAlternativeDetails): Marker detail class for dictation alternative mark. (WebCore::DictationAlternativeDetails::create): (WebCore::DictationAlternativeDetails::dictationContext): (WebCore::DictationAlternativeDetails::DictationAlternativeDetails): (WebCore::markerTypesForAppliedDictationAlternative): (WebCore::AlternativeTextController::applyAlternativeTextToRange): Generalized existing applyAlternativeTextToRange() to handle dictation alternatives. (WebCore::AlternativeTextController::timerFired): Expanded existing code to handle dictation alternatives. (WebCore::AlternativeTextController::handleAlternativeTextUIResult): Expanded existing code to handle dictation alternatives. (WebCore::AlternativeTextController::respondToChangedSelection): Moved part of the function into respondToMarkerAtEndOfWord() to improve readability. (WebCore::AlternativeTextController::shouldStartTimerFor): (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord): (WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText): (WebCore::AlternativeTextController::removeDictationAlternativesForMarker): (WebCore::AlternativeTextController::dictationAlternativesForMarker): (WebCore::AlternativeTextController::applyDictationAlternative): * editing/AlternativeTextController.h: * editing/Editor.cpp: (WebCore::Editor::notifyComponentsOnChangedSelection): Renamed existing respondToChangedSelection() function to avoid naming collision. (WebCore::Editor::appliedEditing): (WebCore::Editor::unappliedEditing): (WebCore::Editor::reappliedEditing): (WebCore::Editor::updateMarkersForWordsAffectedByEditing): (WebCore::Editor::changeSelectionAfterCommand): (WebCore::Editor::respondToChangedSelection): (WebCore::Editor::dictationAlternativesForMarker): (WebCore::Editor::applyDictationAlternativelternative): * editing/Editor.h: * editing/FrameSelection.h: * editing/mac/AlternativeTextUIController.h: Added. WK1 and WK2 use this class to keep track of text alternatives objects. (AlternativeTextUIController): (WebCore::AlternativeTextUIController::AlternativeTextUIController): (AlernativeTextContextController): (WebCore::AlternativeTextUIController::AlernativeTextContextController::AlernativeTextContextController): * editing/mac/AlternativeTextUIController.mm: Added. (WebCore::AlternativeTextUIController::AlernativeTextContextController::addAlternatives): (WebCore::AlternativeTextUIController::AlernativeTextContextController::alternativesForContext): (WebCore::AlternativeTextUIController::AlernativeTextContextController::removeAlternativesForContext): (WebCore::AlternativeTextUIController::AlernativeTextContextController::clear): (WebCore::AlternativeTextUIController::addAlternatives): (WebCore::AlternativeTextUIController::alternativesForContext): (WebCore::AlternativeTextUIController::clear): (WebCore::AlternativeTextUIController::showAlternatives): (WebCore::AlternativeTextUIController::handleAcceptedAlternative): (WebCore::AlternativeTextUIController::dismissAlternatives): (WebCore::AlternativeTextUIController::removeAlternatives): * editing/mac/TextAlternativeWithRange.h: Added. A simple struct to make it easier to pass around a pair of text alternatives object and range. * editing/mac/TextAlternativeWithRange.mm: Added. (WebCore::TextAlternativeWithRange::TextAlternativeWithRange): (WebCore::collectDictationTextAlternatives): * page/AlternativeTextClient.h: * page/ContextMenuController.cpp: Added code to show alternative dictated text in context menu. (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::checkOrEnableIfNeeded): * platform/ContextMenuItem.h: * rendering/HitTestResult.cpp: (WebCore::HitTestResult::dictationAlternatives): * rendering/HitTestResult.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintDocumentMarker): 2012-06-14 Emil A Eklund Change RenderTableSection::calcRowLogicalHeight to round rather than floor height https://bugs.webkit.org/show_bug.cgi?id=88813 Reviewed by Julien Chaffraix. Change RenderTableSection::calcRowLogicalHeight to round the logicalHeight instead of flooring it. This matches our rounding logic elsewhere and results in table rows better matching the expected height. Test: fast/sub-pixel/table-rows-have-stable-height.html * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): 2012-06-14 Andrey Adaikin Web Inspector: Remove devtoolsInjectedScript hidden property https://bugs.webkit.org/show_bug.cgi?id=89087 We use the devtoolsInjectedScript hidden property to reference a InjectedScript object for a given ScriptState, but we also have the same reference in the InjectedScriptManager's hash maps. Just use the hash maps and remove the hidden property from the global object. Reviewed by Pavel Feldman. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::visitChildren): * bindings/js/JSDOMGlobalObject.h: (JSDOMGlobalObject): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): * bindings/v8/V8HiddenPropertyName.h: (WebCore): * bindings/v8/custom/V8InjectedScriptManager.cpp: * inspector/InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::discardInjectedScripts): (WebCore::InjectedScriptManager::discardInjectedScriptsFor): (WebCore::InjectedScriptManager::injectedScriptFor): (WebCore): (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation): * inspector/InjectedScriptManager.h: (InjectedScriptManager): 2012-06-14 James Robinson [chromium] Move opaque rectangle tracking logic out of compositor core https://bugs.webkit.org/show_bug.cgi?id=89031 Reviewed by Adrienne Walker. This moves the opaque paint tracking logic from the compositor (specifically CanvasLayerTextureUpdater) out to a dedicated class used by GraphicsLayerChromium for GraphicsContext-painted content. This changes the interface exposed by the compositor to pass a SkCanvas and let the user fill in an opaque rect if needed. Callers that are using GraphicsContext to paint can instantiate a PlatformContextSkia / GraphicsContext around this SkCanvas if they choose to, or use some other strategy, or not fill it in at all. This avoids creating extra wrapper classes if the eventual caller is going to use the underlying SkCanvas anyway (such as WebContentLayer) and breaks the dependency from the compositor code on GraphicsContext / PlatformContextSkia. OpaqueRectTrackingContentLayerDelegate is a helper class that wraps a ContentLayerDelegate implementation with PlatformContextSkia's opaque region tracking logic. * WebCore.gypi: * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: (WebCore::BitmapCanvasLayerTextureUpdater::BitmapCanvasLayerTextureUpdater): (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate): (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect): (WebCore::BitmapCanvasLayerTextureUpdater::setOpaque): * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: (WebCore): (BitmapCanvasLayerTextureUpdater): * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: (WebCore::CanvasLayerTextureUpdater::paintContents): * platform/graphics/chromium/CanvasLayerTextureUpdater.h: (WebCore): (CanvasLayerTextureUpdater): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::paint): * platform/graphics/chromium/ContentLayerChromium.h: (ContentLayerDelegate): (WebCore): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::GraphicsLayerChromium): (WebCore::GraphicsLayerChromium::paint): * platform/graphics/chromium/GraphicsLayerChromium.h: (GraphicsLayerChromium): * platform/graphics/chromium/LayerPainterChromium.h: (LayerPainterChromium): * platform/graphics/chromium/LinkHighlight.cpp: (WebCore::LinkHighlight::paintContents): * platform/graphics/chromium/LinkHighlight.h: (LinkHighlight): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp: Added. (WebCore): (WebCore::OpaqueRectTrackingContentLayerDelegate::OpaqueRectTrackingContentLayerDelegate): (WebCore::OpaqueRectTrackingContentLayerDelegate::~OpaqueRectTrackingContentLayerDelegate): (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents): * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h: Added. (WebCore): (GraphicsContextPainter): (WebCore::GraphicsContextPainter::~GraphicsContextPainter): (OpaqueRectTrackingContentLayerDelegate): (WebCore::OpaqueRectTrackingContentLayerDelegate::setOpaque): * platform/graphics/chromium/PlatformCanvas.cpp: (WebCore::PlatformCanvas::Painter::Painter): * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): 2012-06-14 Justin Novosad [Chromium] webkitImageSmoothingEnabled canvas property does not work on redraw https://bugs.webkit.org/show_bug.cgi?id=89018 Reviewed by Stephen White. Test: fast/canvas/canvas-imageSmoothingEnabled-repaint.html When an accelerated canvas layer prepares its texture for the compositor, it must send a notification to skia to invalidate texture proprties that are cached by skia, since the compositor may modify them. The use case this fixes is when a canvas to canvas copy is performed with webkitImageSmoothingEnabled=false on the destination canvas. The backing texture of the source canvas will be set to "nearest" filtering by skia in order to perform the copy. Then, the compositor sets filtering back to "linear" when the source canvas is drawn. Skia is designed to only update GL attributes when required, so errors occur when the skia-side GL state cache is out of sync. * platform/graphics/chromium/Canvas2DLayerBridge.cpp: (WebCore::Canvas2DLayerBridge::prepareTexture): 2012-06-14 Jon Honeycutt Fix some failing tests on Windows by resetting the page scale factor between tests. https://bugs.webkit.org/show_bug.cgi?id=89078 Reviewed by Dirk Pranke. * testing/Internals.cpp: (WebCore::Internals::reset): Set the scale factor to 1.0. 2012-06-14 Sami Kyostila Register fixed position layers with ScrollingCoordinator https://bugs.webkit.org/show_bug.cgi?id=78864 Reviewed by James Robinson. This patch makes ScrollingCoordinator aware of page elements that are either fixed positioned directly or through their ancestors and that also have their own composited backing layers. This allows the ScrollingCoordinator implementation to potentially enable fast scrolling even if there are fixed elements on the page, because the compositor can automatically reposition the fixed element layers after scrolling. Since fixed position layers need to be explicitly supported by the ScrollingCoordinator implementation, we add a new supportsFixedPositionLayers() query for checking this. * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::FrameView::useSlowRepaints): (WebCore::FrameView::addFixedObject): (WebCore::FrameView::removeFixedObject): * page/FrameView.h: (FrameView): (WebCore::FrameView::fixedObjects): (WebCore::FrameView::hasFixedObjects): * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange): (WebCore::ScrollingCoordinator::hasNonLayerFixedObjects): (WebCore): (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread): (WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPosition): (WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer): * page/scrolling/ScrollingCoordinator.h: (ScrollingCoordinator): * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: (WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPosition): (WebCore): (WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer): * rendering/RenderBox.cpp: (WebCore::RenderBox::willBeDestroyed): (WebCore::RenderBox::styleWillChange): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBacking): (WebCore): (WebCore::RenderLayerCompositor::fixedPositionedByAncestor): (WebCore::RenderLayerCompositor::ensureRootLayer): * rendering/RenderLayerCompositor.h: 2012-06-14 Alexey Proskuryakov [CFNetwork] XMLHttpRequest incorrectly returns cached responses even when there is a Vary header field https://bugs.webkit.org/show_bug.cgi?id=88925 Reviewed by David Kilzer. Test: http/tests/cache/xhr-vary-header.html * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willCacheResponse): Don't cache the response at all if there is a Vary header field. CFNetwork won't look at it if we allowed the response cached. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::createNSURLConnection): [NSURLResponse copy] is mutable in practice, but we should be nice, and use -mutableCopy. (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]): Same fix as in CFNet code. 2012-06-13 Andrey Kosyakov Web Inspector: use CSS gradients instead of images for timeline bars, checkboxes & bullets https://bugs.webkit.org/show_bug.cgi?id=89024 Reviewed by Pavel Feldman. This brings a bunch of UI changes to the way Timeline bars and related controls are rendered: - introduce new color palette for categories; - replace images used to render timeline bars, list bullets and categories checkboxes with CSS gradients; - "flatten" timeline bars - make square list bullets, sharpen corners for lower pane bars; - make links on the list sidebar grey - add more space between categories checkboxes, make labels lighter. * WebCore.gypi: Remove old images, add tickMark.png. * inspector/front-end/Images/timelineBarBlue.png: Removed. * inspector/front-end/Images/timelineBarDarkGreen.png: Removed. * inspector/front-end/Images/timelineBarGray.png: Removed. * inspector/front-end/Images/timelineBarGreen.png: Removed. * inspector/front-end/Images/timelineBarLightPurple.png: Removed. * inspector/front-end/Images/timelineBarOrange.png: Removed. * inspector/front-end/Images/timelineBarPurple.png: Removed. * inspector/front-end/Images/timelineBarRed.png: Removed. * inspector/front-end/Images/timelineBarYellow.png: Removed. * inspector/front-end/Images/timelineCheckmarks.png: Removed. * inspector/front-end/Images/timelineDots.png: Removed. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.wasShown): (WebInspector.TimelinePanel.prototype._closeRecordDetails): Fixed trailing spaces; (WebInspector.TimelinePanel.prototype._injectCategoryStyles): Inject generated styles for categories, if necessary. * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.categories): (WebInspector.TimelinePresentationModel.createFillStyle): (WebInspector.TimelinePresentationModel.createStyleRuleForCategory): * inspector/front-end/WebKit.qrc: Remove old images, add tickMark.png * inspector/front-end/inspector.css: (.sidebar-tree-section): * inspector/front-end/timelinePanel.css: (#timeline-container .webkit-html-resource-link): (.timeline-category-statusbar-item): (.timeline-category-statusbar-item .timeline-category-checkbox): (.timeline-category-statusbar-item .timeline-category-checkbox:checked::before): (.timeline-tree-item): (.timeline-tree-item .timeline-tree-icon): (.timeline-graph-bar): (.timeline-graph-bar.with-children): (.timeline-graph-bar.cpu): (.timeline-aggregated-category): * inspector/front-end/utilities.js: (Object.values): Return an array of object field's values. 2012-06-14 Silvia Pfeiffer Change mute button and volume slider behaviour for new Chromium video controls. https://bugs.webkit.org/show_bug.cgi?id=88743 Reviewed by Eric Carlson. No new tests, final patch will contain the rebaselined tests. The Chrome video controls are receiving a visual update. This patch makes the mute button and the volume slider interact with each other. When the user mutes the video through clicking the mute button, the volume slider animates to 0% volume. Upon unmute, the previous volume level is restored. Further, when the user drags the volume slider thumb or clicks on the slider and the video is muted, the video unmutes and sets the volume to the user's chosen level. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Add a member field to the volume slider to allow user interaction to unmute the video. (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Add the logic to unmute the video if the m_clearMutedOnUserInteraction member field is true. (WebCore::MediaControlVolumeSliderElement::setClearMutedOnUserInteraction): Add a member function to change the value of the m_clearMutedOnUserInteraction member field. * html/shadow/MediaControlElements.h: (MediaControlVolumeSliderElement): Add the setClearMutedOnUserInteraction member function and the m_clearMutedOnUserInteraction member field. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::create): Activate unmute on user interaction on the Chromium video volume slider. (WebCore::MediaControlRootElementChromium::changedMute): Add logic to set volume slider to 0 when muted and reset to volume when unmuted. * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaVolumeSlider): Add logic to paint the volume slider active area as 0 when muted. 2012-06-14 Vsevolod Vlasov Web Inspector: Breakpoints should not be set when UISourceCode content is diverged from VM version of the script. https://bugs.webkit.org/show_bug.cgi?id=89109 Reviewed by Pavel Feldman. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.Breakpoint.prototype._updateBreakpoint): * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.isDivergedFromVM): (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): 2012-06-14 Vsevolod Vlasov Web Inspector: DebuggerModel should support setting breakpoints without script by sourceURL only. https://bugs.webkit.org/show_bug.cgi?id=88988 Reviewed by Pavel Feldman. This change allows setting all saved breakpoints in debugger model by url before the site with corresponding scripts was loaded (allows breaking in onload handler on first load). This change also simplifies implementation of snippets debugging. * inspector/front-end/BreakpointManager.js: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation): 2012-06-14 Pavel Feldman Web Inspector: refactor settings screen to move user agent and experiments out of general tab. https://bugs.webkit.org/show_bug.cgi?id=89101 Reviewed by Vsevolod Vlasov. See image attached to the bug. * English.lproj/localizedStrings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsScreen.prototype.selectTab): (WebInspector.SettingsScreen.prototype._tabSelected): (WebInspector.SettingsScreen.prototype.set wasShown): (WebInspector.SettingsScreen.prototype.willHide): (WebInspector.SettingsTab): (WebInspector.SettingsTab.prototype._appendSection): (WebInspector.SettingsTab.prototype._createCustomSetting): (WebInspector.GenericSettingsTab): (WebInspector.GenericSettingsTab.prototype._showPaintRectsChanged): (WebInspector.GenericSettingsTab.prototype.get _updateScriptDisabledCheckbox): (WebInspector.GenericSettingsTab.prototype._javaScriptDisabledChanged): (WebInspector.UserAgentSettingsTab): (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.get const): (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.textDoubleClicked): (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.textChanged): (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.set checkboxClicked): (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement): (WebInspector.ExperimentsSettingsTab): (WebInspector.ExperimentsSettingsTab.prototype._createExperimentsWarningSubsection): (WebInspector.ExperimentsSettingsTab.prototype._createExperimentCheckbox.listener): (WebInspector.ExperimentsSettingsTab.prototype._createExperimentCheckbox): * inspector/front-end/ShortcutsScreen.js: * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.get headerContentsElement): * inspector/front-end/helpScreen.css: (.settings-tab.help-container): (.settings-tab .help-block): (.help-content fieldset): (#settings-screen .tabbed-pane-header-tabs): (#settings-screen .tabbed-pane-header-tab): 2012-06-13 Mark Hahnenberg Worker tear-down can re-enter JSC during GC finalization pt. 2 https://bugs.webkit.org/show_bug.cgi?id=88601 Reviewed by David Levin. No new tests. Current regression tests are sufficient. * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): (WebCore::WorkerMessagingProxy::workerObjectDestroyed): We clear the m_workerObject here because we don't want anybody else trying to send messages to the Worker now that it has been destroyed. We also queue the asynchronous task for the various other cleanup that still needs to be done. This allows us to avoid the problem of re-entrant JS code execution during GC. (WebCore): (WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal): Here we set m_mayBeDestroyed to true. This is the point after which deleting the WorkerMessagingProxy in workerContextDestroyedInternal() is okay. It could happen during this function call if the worker thread has been shutdown already, or it could be called later after we shut down the worker thread. (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal): We check m_mayBeDestroyed here instead of checking m_workerObject. This change effectively orthogonalizes the roles that m_workerObject was filling. Since we were eagerly clearing m_workerObject, but we wanted to asynchronously call workerObjectDestroyed(), we needed to make sure we didn't accidentally try to delete the WorkerMessagingProxy twice (once from destroying the Worker and once from destroying the WorkerContext). This boolean field should fix that issue--we set it lazily like we wanted to do without being in danger of causing use-after-free issues with m_workerObject. * workers/WorkerMessagingProxy.h: Added the new field and function. (WorkerMessagingProxy): 2012-06-14 Alexander Pavlov Web Inspector: Selector list start position is not extracted for style rules inside @media rules https://bugs.webkit.org/show_bug.cgi?id=89094 Reviewed by Pavel Feldman. Selector list start is now marked inside the "ruleset" rule rather than separately, before its invocation(s). * css/CSSGrammar.y: 2012-06-14 Eric Penner [chromium] Fix race condition where animations start, finish and are deleted on the composite thread, all before the start even arrives on the main thread. https://bugs.webkit.org/show_bug.cgi?id=88439 Reviewed by James Robinson. Scheduling behavior covered by existing tests. * platform/graphics/chromium/cc/CCActiveAnimation.cpp: (WebCore::CCActiveAnimation::isFinishedAt): * platform/graphics/chromium/cc/CCActiveAnimation.h: (WebCore::CCActiveAnimation::isFinished): * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: (WebCore::CCLayerAnimationController::suspendAnimations): (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo): (WebCore::CCLayerAnimationController::animate): (WebCore::CCLayerAnimationController::hasActiveAnimation): (WebCore): (WebCore::CCLayerAnimationController::markAnimationsForDeletion): (WebCore::CCLayerAnimationController::purgeAnimationsMarkedForDeletion): * platform/graphics/chromium/cc/CCLayerAnimationController.h: (CCLayerAnimationController): 2012-06-14 Vsevolod Vlasov Web Inspector: ConsoleView.evaluateUsingTextPrompt should evaluate without command line API. https://bugs.webkit.org/show_bug.cgi?id=89096 Reviewed by Pavel Feldman. * inspector/front-end/ConsoleView.js: 2012-06-14 Silvia Pfeiffer Update the time display of the new Chromium media controls. https://bugs.webkit.org/show_bug.cgi?id=88724 Reviewed by Eric Carlson. No new tests, final patch will contain the rebaselined tests. The Chrome video controls are receiving a visual update. This patch changes the format of the time digits that are displayed. They are different for media files of different duration. For non-autoplaying videos, the duration is shown before playback is started. * css/mediaControlsChromium.css: (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display): Format the new duration display the same as the current time display. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): Add a member field for the duration display. (WebCore::MediaControlRootElementChromium::create): Add an element for the duration display and initially hide the current time display. (WebCore::MediaControlRootElementChromium::setMediaController): Add the duration display to the controller. (WebCore::MediaControlRootElementChromium::reset): Add reset functionality for the duration display. (WebCore::MediaControlRootElementChromium::playbackStarted): Show the current time display and hide the duration display upon playback start. (WebCore::MediaControlRootElementChromium::updateTimeDisplay): Show the current time display and hide the duration display when current time is non-zero. * html/shadow/MediaControlRootElementChromium.h: (WebCore): Add the MediaControlTimeRemainingDisplayElement which provides use with the duration display. (MediaControlRootElementChromium): Add a duration member field, reusing the existing MediaControlTimeRemainingDisplayElement. * rendering/RenderMediaControlsChromium.cpp: (WebCore::formatChromiumMediaControlsTime): Formats a given time under the condition of a given duration. (WebCore::RenderMediaControlsChromium::formatMediaControlsTime): When formatting a single time, assume it to also provide the duration conditions. (WebCore::RenderMediaControlsChromium::formatMediaControlsCurrentTime): Format the current time given the duration. (WebCore::RenderMediaControlsChromium::formatMediaControlsRemainingTime): Format the remaining time from the current time given the duration. * rendering/RenderMediaControlsChromium.h: (RenderMediaControlsChromium): Declare the time formatting member functions. * rendering/RenderThemeChromiumMac.h: (RenderThemeChromiumMac): Declare the time formatting member functions for Chromium on the Mac. * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::formatMediaControlsTime): (WebCore::RenderThemeChromiumMac::formatMediaControlsCurrentTime): (WebCore::RenderThemeChromiumMac::formatMediaControlsRemainingTime): Call the time formatting member functions of RenderMediaControlsChromium on the Mac. * rendering/RenderThemeChromiumSkia.cpp: (WebCore::formatMediaControlsTime): (WebCore::formatMediaControlsCurrentTime): (WebCore::formatMediaControlsRemainingTime): Call the time formatting member functions of RenderMediaControlsChromium on Skia. * rendering/RenderThemeChromiumSkia.h: (RenderThemeChromiumSkia): Declare the time formatting member functions for Chromium Skia. 2012-06-14 Eugene Klyuchnikov Web Inspector: Refactor message loop instrumentation. https://bugs.webkit.org/show_bug.cgi?id=88978 Reviewed by Pavel Feldman. 1) Remove "messageLoop" term 2) Reuse WebThread::TaskObserver interface 3) Move implementation (from embedder) to platform code. * inspector/InspectorClient.h: (WebCore::InspectorClient::startMainThreadMonitoring): Renamed method. (WebCore::InspectorClient::stopMainThreadMonitoring): Ditto. * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::start): (WebCore::InspectorTimelineAgent::stop): 2012-06-14 Dominik Röttsches [svg] SVGResources applied to Text with Incorrect Transformations in non-CG Implementations https://bugs.webkit.org/show_bug.cgi?id=64966 Reviewed by Nikolas Zimmermann. SVGInlineTextBox::paintTextWithShadows for non-CG implementations resets the scale aspect of the currently applied CTM. This leads to patterns and gradients being incorrectly downscaled. This way of resetting the CTM and drawing fonts "natively" scaled was introduced in r77485 to fix a number of issues with SVG font scaling. Unfortunately, this breaks scaling of patterns and gradients. To fix it, we need to push the transformation back into the pattern/gradient space transformation. Tests: svg/transforms/transformed-text-fill-gradient.html svg/transforms/transformed-text-fill-pattern.html * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): Moving the scaling factor calculation out into SVGRenderingContext. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::shouldTransformOnTextPainting): Reusing the scaling factor calculation from SVGRenderingContext. (WebCore): * rendering/svg/RenderSVGResourceContainer.h: (RenderSVGResourceContainer): * rendering/svg/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::applyResource): If needed, push down transformation into gradient space. * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): If needed, push transformation into pattern space. * rendering/svg/SVGRenderingContext.cpp: (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor): Common scaling factor calculation for RenderSVGInlineText and RenderSVGResourceContainer. * rendering/svg/SVGRenderingContext.h: (SVGRenderingContext): 2012-06-14 Yoshifumi Inoue [Form] Replace InputNumber type to Decimal type and drop InputNumber https://bugs.webkit.org/show_bug.cgi?id=88746 Reviewed by Kent Tamura. This patch removes InputNumber introduced by r119540 by replacing InputNumber type to Decimal type and changing convertDoubleToDecimal and convertDecimalToDouble to Decimal::fromDouble and Decimal::toDouble, respectively. No new tests. This patch doesn't change behavior. * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::setValueAsDecimal): (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp): (WebCore::BaseDateAndTimeInputType::parseToNumber): (WebCore::BaseDateAndTimeInputType::serialize): (WebCore::BaseDateAndTimeInputType::serializeWithComponents): (WebCore::BaseDateAndTimeInputType::serializeWithMilliseconds): * html/BaseDateAndTimeInputType.h: (BaseDateAndTimeInputType): * html/DateInputType.cpp: (WebCore::DateInputType::createStepRange): * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::defaultValueForStepUp): (WebCore::DateTimeInputType::createStepRange): * html/DateTimeInputType.h: (DateTimeInputType): * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::createStepRange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::getAllowedValueStep): * html/HTMLInputElement.h: (HTMLInputElement): * html/InputType.cpp: (WebCore::InputType::setValueAsDouble): (WebCore::InputType::setValueAsDecimal): (WebCore::InputType::rangeUnderflow): (WebCore::InputType::rangeOverflow): (WebCore::InputType::defaultValueForStepUp): (WebCore::InputType::minimum): (WebCore::InputType::maximum): (WebCore::InputType::isInRange): (WebCore::InputType::isOutOfRange): (WebCore::InputType::stepMismatch): (WebCore::InputType::validationMessage): (WebCore::InputType::parseToNumber): (WebCore::InputType::parseToNumberOrNaN): (WebCore::InputType::serialize): (WebCore::InputType::applyStep): (WebCore::InputType::getAllowedValueStep): (WebCore::InputType::stepUpFromRenderer): * html/InputType.h: (InputType): * html/MonthInputType.cpp: (WebCore::MonthInputType::defaultValueForStepUp): (WebCore::MonthInputType::createStepRange): (WebCore::MonthInputType::parseToNumber): * html/MonthInputType.h: (MonthInputType): * html/NumberInputType.cpp: (WebCore::NumberInputType::setValueAsDecimal): (WebCore::NumberInputType::createStepRange): (WebCore::NumberInputType::parseToNumber): (WebCore::NumberInputType::serialize): * html/NumberInputType.h: (NumberInputType): * html/RangeInputType.cpp: (WebCore::ensureMaximum): (WebCore::RangeInputType::setValueAsDecimal): (WebCore::RangeInputType::createStepRange): (WebCore::RangeInputType::handleKeydownEvent): (WebCore::RangeInputType::parseToNumber): (WebCore::RangeInputType::serialize): (WebCore::RangeInputType::sanitizeValue): * html/RangeInputType.h: (RangeInputType): * html/StepRange.cpp: (WebCore::StepRange::StepRange): (WebCore::StepRange::acceptableError): (WebCore::StepRange::alignValueForStep): (WebCore::StepRange::clampValue): (WebCore::StepRange::parseStep): (WebCore::StepRange::roundByStep): (WebCore::StepRange::stepMismatch): * html/StepRange.h: (WebCore::StepRange::StepDescription::defaultValue): (StepRange): (WebCore::StepRange::maximum): (WebCore::StepRange::minimum): (WebCore::StepRange::step): (WebCore::StepRange::stepBase): (WebCore::StepRange::defaultValue): (WebCore::StepRange::proportionFromValue): (WebCore::StepRange::valueFromProportion): * html/TimeInputType.cpp: (WebCore::TimeInputType::defaultValueForStepUp): (WebCore::TimeInputType::createStepRange): * html/TimeInputType.h: (TimeInputType): * html/WeekInputType.cpp: (WebCore::WeekInputType::createStepRange): * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::writeDocument): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderPosition): (WebCore::RenderSliderThumb::layout): (WebCore::SliderThumbElement::setPositionFromPoint): 2012-06-14 Jan Keromnes Web Inspector: Implement ExtensionPanel.show() method https://bugs.webkit.org/show_bug.cgi?id=88473 Implemented ExtensionPanel.show() API method to allow extension developers to show their panel when needed. Reviewed by Pavel Feldman. Tests for this method are in: LayoutTests/inspector/extensions/extensions-panel.html * inspector/front-end/ExtensionAPI.js: (defineCommonExtensionSymbols): (injectedExtensionAPI.ExtensionPanelImpl.prototype.createStatusBarButton): (injectedExtensionAPI.ExtensionPanelImpl.prototype.show): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._onShowPanel): 2012-06-14 Kent Tamura Fix a typo in r120304. https://bugs.webkit.org/show_bug.cgi?id=89070 * bindings/scripts/CodeGeneratorV8.pm: (NativeToJSValue): * bindings/scripts/test/V8/V8TestObj.cpp: 2012-06-14 David Barr Add dpcm to css3-images image-resolution https://bugs.webkit.org/show_bug.cgi?id=85442 Reviewed by Tony Chang. The css3-images module is at candidate recommendation. http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-resolution No new tests; extended fast/css/image-resolution/image-resolution.html * css/CSSGrammar.y: Add DPCM token and unary term. * css/CSSParser.cpp: Extend range of units accepted for resolution and tokenize "dpcm". (WebCore::CSSParser::validUnit): Accept CSSPrimitiveValue::CSS_DPCM. (WebCore::CSSParser::createPrimitiveNumericValue): Accept CSSPrimitiveValue::CSS_DPCM. (WebCore::unitFromString): Map "dpcm" to CSSPrimitiveValue::CSS_DPCM. (WebCore::CSSParser::parseValidPrimitive): Accept CSSPrimitiveValue::CSS_DPCM. (WebCore::CSSParser::detectNumberToken): Map "dpcm" to CSSPrimitiveValue::CSS_DPCM. * css/CSSPrimitiveValue.cpp: Add CSSPrimitiveValue::CSS_DPCM as a numeric unit. (WebCore::isValidCSSUnitTypeForDoubleConversion): Accept CSSPrimitiveValue::CSS_DPCM. (WebCore::unitCategory): Map CSSPrimitiveValue::CSS_DPCM to CSSPrimitiveValue::UResolution. (WebCore::conversionToCanonicalUnitsScaleFactor): Scale CSSPrimitiveValue::CSS_DPCM to CSSPrimitiveValue::CSS_DPPX. (WebCore::CSSPrimitiveValue::customCssText): Format CSSPrimitiveValue::CSS_DPCM as "dpcm". (WebCore::CSSPrimitiveValue::cloneForCSSOM): Accept CSSPrimitiveValue::CSS_DPCM as numeric unit. * css/CSSPrimitiveValue.h: Add CSSPrimitiveValue::CSS_DPCM. 2012-06-14 Ilya Tikhonovsky Web Inspector: REGRESSION HeapProfiler can't remove heap snapshot from the list if Dominators view has been opened. https://bugs.webkit.org/show_bug.cgi?id=89080 There was no dispose method on artificial ShowMoreDataGrid node. Reviewed by Pavel Feldman. * inspector/front-end/ShowMoreDataGridNode.js: (WebInspector.ShowMoreDataGridNode.prototype.nodeHeight): (WebInspector.ShowMoreDataGridNode.prototype.dispose): 2012-06-14 Kent Tamura [JSC/V8] Improve DOMString[] support https://bugs.webkit.org/show_bug.cgi?id=89070 Reviewed by Kentaro Hara. Tests: new test case in TestObj.idl * bindings/js/JSDOMBinding.cpp: (WebCore::jsArray): Implement jsArray() for DOMStringList. * bindings/js/JSDOMBinding.h: Declare jsArray() for DOMStringList. * bindings/scripts/CodeGeneratorJS.pm: (NativeToJSValue): Avoid to include JSDOMString.h and DOMString.h. * bindings/scripts/CodeGeneratorV8.pm: (GetNativeType): Move a check for DOMString[] because it's a RefPtr type and we'd like to avoid to generate RefPtr (%non_wrapper_types): DOMString[] is not a wrapper type. This is needed to avoid to generate unnecessary custom function template. (NativeToJSValue): Avoid to include V8DOMString.h and DOMString.h. * bindings/scripts/test/TestObj.idl: Add non-overload function using DOMString[]. * bindings/scripts/test/JS/JSTestObj.cpp: Update expectation. * bindings/scripts/test/JS/JSTestObj.h: ditto. * bindings/scripts/test/V8/V8TestObj.cpp: ditto. 2012-06-14 Matt Falkenhagen LocaleToScriptMappingDefault.cpp should also do what scriptCodeForFontSelection does in LocaleToScriptMappingICU.cpp https://bugs.webkit.org/show_bug.cgi?id=88845 Reviewed by Kent Tamura. Test: fast/text/international/jpan-script-equivalence.html * platform/text/LocaleToScriptMappingDefault.cpp: (WebCore::scriptNameToCode): 2012-06-14 Pavel Feldman Web Inspector: render dock-to-right icon in status bar. https://bugs.webkit.org/show_bug.cgi?id=89040 Reviewed by Vsevolod Vlasov. Today we render dock to bottom icon for both actions (dock to bottom and dock to right). * inspector/front-end/Images/statusbarButtonGlyphs.png: * inspector/front-end/inspector.css: (button.dock-status-bar-item.status-bar-item.toggled-undock .glyph): (button.dock-status-bar-item.status-bar-item.toggled-bottom .glyph): (button.dock-status-bar-item.status-bar-item.toggled-right .glyph): * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector._installDockToRight.listener): (windowLoaded): (WebInspector.setDockingUnavailable): 2012-06-14 Pavel Feldman Web Inspector: clear execution live before the text edit. https://bugs.webkit.org/show_bug.cgi?id=89016 Reviewed by Vsevolod Vlasov. Otherwise we can't remove them after committing the edit. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged): (WebInspector.JavaScriptSourceFrame.prototype.clearExecutionLine): 2012-06-14 Min Qin Remove the const keyword from MediaPlayerPrivate::enterFullscreen() https://bugs.webkit.org/show_bug.cgi?id=89044 Reviewed by Adam Barth. enterFullscreen() and exitFullscreen() could both modify the player state. This change reverts the change we made in r120213. Just function declaration change, no test needed. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::enterFullscreen): 2012-06-14 Edaena Salinas Jasso el.getAttribute('type') returns 'null' when setting el.type to null https://bugs.webkit.org/show_bug.cgi?id=89030 Reviewed by Alexey Proskuryakov. Test: fast/dom/HTMLButtonElement/change-type.html * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::setType): Changed parameter to be AtomicString to address an unrelated review comment from bug 14439 for slightly better performance. * html/HTMLButtonElement.h: (HTMLButtonElement): Changed parameter to be AtomicString to address an unrelated review comment from bug 14439 for slightly better performance. * html/HTMLButtonElement.idl: Specified TreatNullAs NullString for the type attribute. 2012-06-14 Alec Flett IndexedDB: Creating a transaction from within a transaction callback should fail https://bugs.webkit.org/show_bug.cgi?id=80547 Reviewed by Tony Chang. Prevent creation of a transaction, via IDBDatabase.transaction() or IDBDatabase.setVersion(), from inside a setVersion() transaction, as per spec. Update many tests to deal with this. Test restructuring uncovered some inconsistencies in transaction mode handling. So also do some minor cleanup in the way the transaction mode is passed between the frontend and backend transaction objects, and add additional asserts. * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::update): * Modules/indexeddb/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::update): * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::setVersion): (WebCore::IDBDatabase::transaction): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::putInternal): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::onSuccess): * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::create): (WebCore::IDBTransaction::IDBTransaction): (WebCore::IDBTransaction::stringToMode): (WebCore::IDBTransaction::modeToString): * Modules/indexeddb/IDBTransaction.h: (IDBTransaction): 2012-06-14 Li Yin [WebSocket] WebSocket object in Worker Context should fire error event when it fails connection. https://bugs.webkit.org/show_bug.cgi?id=88744 Reviewed by Kent Tamura. Spec:http://dev.w3.org/html5/websockets/#feedback-from-the-protocol The behavior of firing error event in Document has been implemented in Committed r117944. WebSocket in WorkerContext is also required to fire error event. Test: http/tests/websocket/tests/hybi/workers/close.html * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError): (WebCore): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: (ThreadableWebSocketChannelClientWrapper): * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::workerContextDidReceiveMessageError): (WebCore): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError): * Modules/websockets/WorkerThreadableWebSocketChannel.h: (Peer): 2012-06-13 Kinuko Yasuda Unreviewed build fix attempt for r120285 * Modules/filesystem/DOMFileSystemBase.cpp: (WebCore): 2012-06-13 MORITA Hajime Unreviewed expectation update. * bindings/scripts/test/V8/V8Float64Array.cpp: * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: * bindings/scripts/test/V8/V8TestEventConstructor.cpp: * bindings/scripts/test/V8/V8TestEventTarget.cpp: * bindings/scripts/test/V8/V8TestException.cpp: * bindings/scripts/test/V8/V8TestInterface.cpp: * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: * bindings/scripts/test/V8/V8TestNode.cpp: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::V8TestObj::installPerContextProperties): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: 2012-06-13 Kinuko Yasuda Move isolated file system code out of chromium-specific directory https://bugs.webkit.org/show_bug.cgi?id=88997 Reviewed by Adam Barth. The code does not need to be chromium-specific. Any platforms that have file system implementation and manage mappings from file system id to a set of files should share the code. No new tests as this has no functional/behavioral changes. * Modules/filesystem/DOMFileSystem.cpp: (WebCore::DOMFileSystem::createIsolatedFileSystem): (WebCore): * Modules/filesystem/DOMFileSystem.h: (DOMFileSystem): * Modules/filesystem/DOMFileSystemBase.h: (DOMFileSystemBase): * Modules/filesystem/FileSystemType.h: * Modules/filesystem/chromium/DOMFileSystemChromium.cpp: * Modules/filesystem/chromium/DOMFileSystemChromium.h: Removed. * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp: (WebCore::DraggedIsolatedFileSystem::getDOMFileSystem): * WebCore.gypi: 2012-06-07 Kinuko Yasuda File::lastModifiedDate should use NaN or separate boolean flag for null Date value https://bugs.webkit.org/show_bug.cgi?id=87826 Reviewed by Kent Tamura. Test: http/tests/local/fileapi/file-last-modified-after-delete.html * fileapi/File.cpp: (WebCore::File::File): (WebCore::File::captureSnapshot): (WebCore::File::lastModifiedDate): (WebCore::File::lastModifiedDateForBinding): Removed. * fileapi/File.h: (File): * fileapi/File.idl: * platform/FileMetadata.h: (WebCore::FileMetadata::FileMetadata): * platform/FileSystem.h: * platform/FileStream.cpp: (WebCore::FileStream::getSize): * platform/chromium/support/WebHTTPBody.cpp: (WebKit::WebHTTPBody::elementAt): * platform/network/BlobData.h: (WebCore::BlobDataItem::doNotCheckFileChange): Removed. * platform/network/BlobData.cpp: * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::advanceCurrentStream): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::blobIsOutOfDate): 2012-06-13 Eli Fidler Fix CMake build with SMOOTH_SCROLLING enabled https://bugs.webkit.org/show_bug.cgi?id=89032 Reviewed by Antonio Gomes. SMOOTH_SCROLLING pulls in ScrollAnimatorNone.cpp, which has dependencies on platform/ActivePlatformGestureAnimation.cpp and platform/TouchpadFlingPlatformGestureCurve.cpp * CMakeLists.txt: 2012-06-13 Mihai Balan Touched CSSPropertyNames.in to trigger a proper rebuild [CSS Regions] Adding feature defines for CSS Regions & exclusions for Windows https://bugs.webkit.org/show_bug.cgi?id=88645 Reviewed by Sam Weinig. Previous work on #87442 added feature defines to allow proper disabling of CSS Regions and exclusions (previously even with the feature disabled, parsing still worked). However, the feature defines were enabled on Mac only - they were broken on Windows. This patch adds the feature defines to (re)enable regions and exclusions on Windows. * css/CSSPropertyNames.in: Touched to trigger a proper rebuild. Incremental builds were broken on Windows. 2012-06-13 Arnaud Renevier make sure headers are included only once per file https://bugs.webkit.org/show_bug.cgi?id=88931 Reviewed by Darin Adler. * Modules/indexeddb/IDBDatabase.cpp: * WebCorePrefix.h: * bindings/js/JSHTMLAllCollectionCustom.cpp: * bindings/v8/V8Utilities.cpp: * bindings/v8/custom/V8LocationCustom.cpp: * bridge/NP_jsobject.cpp: * editing/Editor.cpp: * html/HTMLMediaElement.cpp: * platform/graphics/cairo/PlatformContextCairo.cpp: * rendering/InlineFlowBox.cpp: 2012-06-13 MORITA Hajime Unreviewed typo fix. * platform/RefCountedSupplement.h: 2012-06-13 Sheriff Bot Unreviewed, rolling out r120268. http://trac.webkit.org/changeset/120268 https://bugs.webkit.org/show_bug.cgi?id=89060 WebCompositor::setPerTilePaintingEnabled hits an assertion in DEBUG (Requested by dominicc|work on #webkit). * WebCore.gypi: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setPerTileDrawingEnabled): (WebCore::Settings::perTileDrawingEnabled): (Settings): (WebCore::Settings::setPartialSwapEnabled): (WebCore::Settings::partialSwapEnabled): (WebCore::Settings::setThreadedAnimationEnabled): (WebCore::Settings::threadedAnimationEnabled): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: (WebCore::CCDebugRectHistory::enabled): (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame): * platform/graphics/chromium/cc/CCDebugRectHistory.h: (WebCore): (CCDebugRectHistory): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::showDebugRects): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawDebugRects): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (CCSettings): (CCLayerTreeHost): (WebCore::CCLayerTreeHost::settings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::create): (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): (WebCore::CCRenderer::settings): * platform/graphics/chromium/cc/CCSettings.cpp: Removed. * platform/graphics/chromium/cc/CCSettings.h: Removed. * testing/InternalSettings.cpp: (WebCore::InternalSettings::setPerTileDrawingEnabled): (WebCore): * testing/InternalSettings.h: (InternalSettings): 2012-06-13 Ian Vollick [chromium] Certain settings in CCSettings could be global https://bugs.webkit.org/show_bug.cgi?id=88384 Reviewed by James Robinson. No new tests. No new functionality. * WebCore.gypi: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (Settings): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::addAnimation): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: (WebCore::CCDebugRectHistory::enabled): (WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame): * platform/graphics/chromium/cc/CCDebugRectHistory.h: (WebCore): (CCDebugRectHistory): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::showDebugRects): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawDebugRects): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeSettings::CCLayerTreeSettings): (CCLayerTreeSettings): (CCLayerTreeHost): (WebCore::CCLayerTreeHost::settings): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::create): (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList): (WebCore::CCLayerTreeHostImpl::animateLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): (WebCore::CCRenderer::settings): * platform/graphics/chromium/cc/CCSettings.cpp: Added. (WebCore): (WebCore::CCSettings::perTilePaintingEnabled): (WebCore::CCSettings::setPerTilePaintingEnabled): (WebCore::CCSettings::partialSwapEnabled): (WebCore::CCSettings::setPartialSwapEnabled): (WebCore::CCSettings::acceleratedAnimationEnabled): (WebCore::CCSettings::setAcceleratedAnimationEnabled): (WebCore::CCSettings::reset): * platform/graphics/chromium/cc/CCSettings.h: Added. (WebCore): (CCSettings): * testing/InternalSettings.cpp: * testing/InternalSettings.h: (InternalSettings): 2012-06-13 Crystal Zhang [BlackBerry] Apply New Style and JS for Select Popup https://bugs.webkit.org/show_bug.cgi?id=89020 Reviewed by Rob Buis. PR 162854 Use new python script for data generating, as the old one is too simple and problematic. * PlatformBlackBerry.cmake: 2012-06-13 Dana Jansens [chromium] Assert if iterating an invalid RenderSurfaceLayerList, where a layer in the list has no RenderSurface https://bugs.webkit.org/show_bug.cgi?id=89004 Reviewed by Adrienne Walker. A RenderSurfaceLayerList expects that all layers in the list own a RenderSurface. If an invalid RSLL is iterated over, the CCLayerIterator class will now ASSERT in debug mode, as well as considering the list empty in release mode. We will be adding code to CCLayerTreeHostImpl to save a RSLL across frames, so adding a clearRenderSurfaces() method with a FIXME comment to make it clear that we should clear the RSLL when we remove RenderSurfaces from the layers in the saved RSLL. * platform/graphics/chromium/cc/CCLayerIterator.h: (WebCore::CCLayerIterator::CCLayerIterator): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): (WebCore::clearRenderSurfacesOnCCLayerImplRecursive): (WebCore::CCLayerTreeHostImpl::clearRenderSurfaces): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): 2012-06-13 Yael Aharon Remove redundant code from RenderView and RenderBlock https://bugs.webkit.org/show_bug.cgi?id=89019 Reviewed by Abhishek Arya. As pointed out in https://bugs.webkit.org/show_bug.cgi?id=83981#c7 , RenderView::insertFixedPositionedObject() is redundant and should be removed. No new tests. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::insertPositionedObject): (WebCore::RenderBlock::removePositionedObject): * rendering/RenderView.cpp: (WebCore): * rendering/RenderView.h: (RenderView): 2012-06-13 Dana Jansens [chromium] Create a CCStreamVideoDrawQuad used for StreamTexture video output https://bugs.webkit.org/show_bug.cgi?id=88826 Reviewed by Adrienne Walker. Remove the matrix from the CCVideoDrawQuad, and create a new quad specifically for StreamTexture video decoder output. This quad contains only the fields needed for display - textureId and the matrix to be applied to texture coords. Removes the (0, 0, 1, 1) "transform" from the shader used for these quads, as it was a no-op. No new tests, no change in behaviour. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawQuad): (WebCore::LayerRendererChromium::drawStreamVideoQuad): (WebCore::LayerRendererChromium::drawVideoQuad): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderVideoTransform::VertexShaderVideoTransform): (WebCore::VertexShaderVideoTransform::init): (WebCore::VertexShaderVideoTransform::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (VertexShaderVideoTransform): * platform/graphics/chromium/cc/CCDrawQuad.cpp: (WebCore::CCDrawQuad::toStreamVideoDrawQuad): (WebCore): * platform/graphics/chromium/cc/CCDrawQuad.h: (WebCore): (CCDrawQuad): * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: Added. (WebCore): (WebCore::CCStreamVideoDrawQuad::create): (WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad): * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h: Added. (WebCore): (CCStreamVideoDrawQuad): (WebCore::CCStreamVideoDrawQuad::textureId): (WebCore::CCStreamVideoDrawQuad::matrix): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-06-13 Martin Robinson [GTK] Add an accelerated compositing implementation for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=86037 Reviewed by Alejandro G. Castro. No new tests. These changes are covered by the compositing tests, which we will gradually try to turn on for the bots. Add a new GLContext method for getting to current default framebuffer size, which is quite useful for preventing composited content quivering while resizing. * platform/graphics/cairo/GLContext.h: * platform/graphics/glx/GLContextGLX.cpp: (WebCore::GLContextGLX::defaultFrameBufferSize): Added this implementation for X11 which asks the X server for the window size. * platform/graphics/glx/GLContextGLX.h: 2012-06-13 Shawn Singh [chromium] Implement hit-testing for impl-side input handling in accelerated compositor https://bugs.webkit.org/show_bug.cgi?id=88972 Reviewed by Adrienne Walker. The original hit testing code by Sami Kyostila. This patch implements a simple impl-side hit-testing helper function. At this time, the main motivation for this is so that composited scrollable layers can be scrolled by the impl thread -- and a prerequisite for that is the ability to hit-test on the impl thread, to determine where the scrolling action should be applied. To implement the actual hit test, it's possible to compute the hit test in two equivalent ways: (a) inverse-project the point into local space, or (b) forward-transform the rect to screen space It's not obvious which one would perform better, or which one would be more robust to w < 0 homogeneous clipping issues. For this patch, we simply opt for the inverse-projection approach. 10 unit tests added to CCLayerTreeHostCommonTest.cpp: CCLayerTreeHostCommonTest.verifyHitTestingForEmptyLayerList CCLayerTreeHostCommonTest.verifyHitTestingForSingleLayer CCLayerTreeHostCommonTest.verifyHitTestingForSinglePositionedLayer CCLayerTreeHostCommonTest.verifyHitTestingForSingleRotatedLayer CCLayerTreeHostCommonTest.verifyHitTestingForSinglePerspectiveLayer CCLayerTreeHostCommonTest.verifyHitTestingForSingleLayerWithScaledContents CCLayerTreeHostCommonTest.verifyHitTestingForSimpleClippedLayer CCLayerTreeHostCommonTest.verifyHitTestingForMultiClippedRotatedLayer CCLayerTreeHostCommonTest.verifyHitTestingForMultipleLayers CCLayerTreeHostCommonTest.verifyHitTestingForMultipleLayerLists * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::pointHitsRect): (WebCore): (WebCore::pointIsClippedBySurfaceOrClipRect): (WebCore::CCLayerTreeHostCommon::findLayerThatIsHitByPoint): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: (CCLayerTreeHostCommon): * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::projectHomogeneousPoint): (WebCore::mapHomogeneousPoint): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapClippedQuad): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectPoint): (WebCore): * platform/graphics/chromium/cc/CCMathUtil.h: (WebCore): (CCMathUtil): 2012-06-13 Charles Wei Need customized toDOMStringList for IndexedDB JSC binding. https://bugs.webkit.org/show_bug.cgi?id=87965 Reviewed by Kentaro Hara. IndexedDB database interface uses DOMStringList as the input parameter. The generated toDOMStringList() can't convert an JSArray of Strings to native DOMStringList. We need a custom function to do this. Because this patch adds one new file (JSDOMStringList.cpp), all build systems are updated accordingly to pick up this file. Tests: Corresponding bindings/scripts/test/JS files have been updated accordingly. * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSDOMStringListCustom.cpp: Added. (WebCore): (WebCore::toDOMStringList): * bindings/scripts/CodeGeneratorJS.pm: (IndexGetterReturnsStrings): (GenerateHeader): (GetNativeType): (GetNativeTypeForCallbacks): (JSValueToNative): * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::callbackWithStringList): * bindings/scripts/test/JS/JSTestCallback.h: (JSTestCallback): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): * dom/DOMStringList.idl: 2012-06-13 Jeffrey Pfau Padding and borders can cause integer overflow in block layouts https://bugs.webkit.org/show_bug.cgi?id=88820 Reviewed by Tony Chang. Tests: fast/block/block-size-integer-overflow.html fast/flexbox/box-size-integer-overflow.html fast/table/table-size-integer-overflow.html * rendering/AutoTableLayout.cpp: Decreased max int. (WebCore::AutoTableLayout::computePreferredLogicalWidths): * rendering/FixedTableLayout.cpp: Use shared constant. (WebCore::FixedTableLayout::computePreferredLogicalWidths): * rendering/RenderBlock.cpp: Removed unused constant. * rendering/TableLayout.h: Add shared constant. (TableLayout): 2012-06-13 Gregg Tavares Refactor WebGLFramebuffer to handle texture attachments https://bugs.webkit.org/show_bug.cgi?id=88697 Reviewed by Adrienne Walker. In order to add support for depth textures WebGLFramebuffer needed to be refactored to handle textures as attachments. No new tests as no new functionality. * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::WebGLAttachment::WebGLAttachment): (WebCore): (WebCore::WebGLFramebuffer::WebGLAttachment::~WebGLAttachment): (WebCore::WebGLFramebuffer::WebGLFramebuffer): (WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer): (WebCore::WebGLFramebuffer::attach): (WebCore::WebGLFramebuffer::getAttachmentObject): (WebCore::WebGLFramebuffer::getAttachment): (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): (WebCore::WebGLFramebuffer::getColorBufferWidth): (WebCore::WebGLFramebuffer::getColorBufferHeight): (WebCore::WebGLFramebuffer::getColorBufferFormat): (WebCore::WebGLFramebuffer::checkStatus): (WebCore::WebGLFramebuffer::onAccess): (WebCore::WebGLFramebuffer::hasStencilBuffer): (WebCore::WebGLFramebuffer::deleteObjectImpl): (WebCore::WebGLFramebuffer::initializeAttachments): * html/canvas/WebGLFramebuffer.h: (WebGLAttachment): (WebGLFramebuffer): * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::framebufferRenderbuffer): (WebCore::WebGLRenderingContext::reattachDepthStencilAttachments): (WebCore::WebGLRenderingContext::framebufferTexture2D): (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): * html/canvas/WebGLRenderingContext.h: (WebGLRenderingContext): 2012-06-13 Konrad Piascik Remove return statement in void method https://bugs.webkit.org/show_bug.cgi?id=88998 Reviewed by Andreas Kling * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::collectStyleForAttribute): 2012-06-13 Benjamin Poulain Implement the simple constructors WTFURL's KURL https://bugs.webkit.org/show_bug.cgi?id=85724 Reviewed by Adam Barth. This patch implement the correct initialization of KURL from an absolute URL. The URL correctness is also relaxed in order to have KURLWTFURL works similarily to KURL. * platform/KURLWTFURL.cpp: (WebCore::KURL::KURL): (WebCore::KURL::isValid): (WebCore::KURL::string): (WebCore::KURL::protocol): (WebCore::KURL::host): (WebCore::KURL::port): Fix a bug where invalidPortNumber was returned if no port was defined. (WebCore::KURL::hasFragmentIdentifier): (WebCore::KURL::fragmentIdentifier): (WebCore::KURL::protocolIs): (WebCore::KURL::removeFragmentIdentifier): (WebCore): (WebCore::KURL::print): * platform/cf/KURLCFNet.cpp: (WebCore::KURL::KURL): (WebCore::KURL::createCFURL): (WebCore): * platform/mac/KURLMac.mm: (WebCore::KURL::KURL): (WebCore::KURL::createCFURL): (WebCore): Use the code of KURL to make the conversion from WTFURL to NSURL. 2012-06-12 Vincent Scheib Remove duplicate webkitpointerlockchange events when unlocking. https://bugs.webkit.org/show_bug.cgi?id=88917 Reviewed by Dimitri Glazkov. Subsequent patches adding the new API for entering and exiting pointer lock would be burdened by handling multiple change events when the lock target is changed. This change introduces temporary code to suppress duplicate change events. Existing tests simplified by removing the duplicate change events. * page/PointerLockController.cpp: (WebCore::PointerLockController::requestPointerLock): (WebCore::PointerLockController::didLosePointerLock): * page/PointerLockController.h: (PointerLockController): 2012-06-13 Silvia Pfeiffer Update range sliders rendering for volume and playback position of new Chrome video controls. https://bugs.webkit.org/show_bug.cgi?id=88623 Reviewed by Eric Carlson. No new tests, final patch will contain the rebaselined tests. The Chrome video controls are receiving a visual update. This patch contains updates to the rendering of the range sliders for the playback position and the volume. This includes the creation of a shadowPseudoId to be able to style the range sliders via CSS, the rendering of the slider background and the highlighted ranges. * css/mediaControlsChromium.css: (input[type="range"]::-webkit-media-slider-container): Adjust the styling of the slider container backgrounds. (input[type="range"]::-webkit-media-slider-thumb): Adjust the styling of the slider thumbs. * html/shadow/SliderThumbElement.cpp: (WebCore::sliderThumbShadowPseudoId): Add an accessor function for the slider thumb shadowPseudoId. (WebCore::mediaSliderThumbShadowPseudoId): Add an accessor function for the media slider thumb shadowPseudoId. (WebCore::SliderThumbElement::shadowPseudoId): Add a different CSS pseudo-class name to the media slider thumbs. (WebCore::TrackLimiterElement::shadowPseudoId): Add a different CSS pseudo-class name to the media slider thumbs. (WebCore::SliderContainerElement::shadowPseudoId): Add a different CSS pseudo-class name to the media slider background container. * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintRoundedSliderBackground): Add function to draw rounded background of sliders in a dark color. (WebCore::paintSliderRangeHighlight): Add function to draw a highlighted grey region on the sliders, which is rounded only at its ends. (WebCore::paintMediaSlider): Update the background and buffered range renderings on the playback position slider by making use of the new helper functions. (WebCore::paintMediaVolumeSlider): Update the background and buffered range renderings on the volume slider by making use of the new helper functions. 2012-06-13 Christopher Hutten-Czapski 2012-06-13 Christopher Hutten-Czapski [BlackBerry] Update Select Popup's styling https://bugs.webkit.org/show_bug.cgi?id=89005 Reviewed by Rob Buis. Add in some nicely-styled CSS and JS for the BlackBerry port's (like bug 88293 for directory drag-and-drop). No new tests as this has no behavioral changes. * html/FileInputType.cpp: (WebCore::FileInputType::receiveDroppedFiles): * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::receiveDroppedFiles): * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::receiveDroppedFiles): * html/InputType.h: * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): 2012-06-12 Thiago Marcos P. Santos Generate -webkit-box-decoration-break property only when the feature is enabled https://bugs.webkit.org/show_bug.cgi?id=88861 Reviewed by Alexis Menard. Otherwise it will hit an assertion if the property is present on the style but the feature disabled. Also fixes a compilation warning when the feature is disabled. * css/CSSPropertyNames.in: * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): 2012-06-12 Darin Adler Tweaked the Mac export file a bit more, adding more-correct iOS cases. Reviewed by David Kilzer. * WebCore.exp.in: Rearrangement. 2012-06-11 Jocelyn Turcotte Using extrernal ICU library on case unsensitive drives will not work https://bugs.webkit.org/show_bug.cgi?id=70913 Reviewed by Csaba Osztrogonác. * platform/graphics/surfaces/GraphicsSurface.h: 2012-06-11 Dana Jansens [chromium] Use TextureDrawQuad for video layer output when it produces a single GL texture https://bugs.webkit.org/show_bug.cgi?id=88814 Reviewed by Adrienne Walker. When a CCVideLayerImpl produces quads for a frame that is contained in a single GL texture, then use the TextureDrawQuad instead of the VideoDrawQuad. Moves the computation for the RGBA(software) and NativeTexture (hardware) cases from LayerRendererChromium into CCVideoLayerImpl, so it can embed these values in the TextureDrawQuad. No new tests, behaviour should be the same. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawStreamTexture): (WebCore::LayerRendererChromium::drawVideoQuad): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::appendQuads): 2012-06-12 Silvia Pfeiffer Change the volume slider to horizontal rendering for Chrome video controls. https://bugs.webkit.org/show_bug.cgi?id=87835 Reviewed by Eric Carlson. No new tests - final patch in the Chrome controls update series will contain rebaselined tests. The Chrome video controls are receiving a visual update. The volume slider is moved into the controls with horizontal rendering, the volume slider container is removed. The visual update itself is in a separate patch. * css/mediaControlsChromium.css: (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button): Removed relative positioning to render all controls elements equally in DOM order. (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button): Removed absolute positioning to render all controls elements equally in DOM order. (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container): Removed absolute positioning to render all controls elements equally in DOM order. (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container): Removed volume slider container - it's not necessary any more. (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display): Remove flexbox and introduce inline display to always display this field. (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider): Removed absolute positioning to render all controls elements equally in DOM order. * html/shadow/MediaControlRootElementChromium.cpp: (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium): Removed volume slider container - it's not necessary any more. (WebCore::MediaControlRootElementChromium::create): Appended the volume slider and the mute button directly to the panel, removed volume slider container. (WebCore::MediaControlRootElementChromium::setMediaController): Removed volume slider container. (WebCore::MediaControlRootElementChromium::reportedError): Removed volume slider container. (WebCore::MediaControlRootElementChromium::showVolumeSlider): Removed volume slider container. * html/shadow/MediaControlRootElementChromium.h: (WebCore): (MediaControlRootElementChromium): Removed volume slider container. * html/shadow/SliderThumbElement.cpp: (WebCore::hasVerticalAppearance): Allow use of horizontal media volume slider. (WebCore::RenderSliderThumb::layout): Reuse hasVerticalAppearance function. * rendering/RenderMediaControlsChromium.cpp: (WebCore::RenderMediaControlsChromium::paintMediaVolumeSlider): Change line drawing from vertical to horizontal. * rendering/RenderTheme.h: (WebCore::RenderTheme::usesVerticalVolumeSlider): Add usesVerticalVolumeSlider function to allow horizontal volume sliders. * rendering/RenderThemeChromiumMac.h: (WebCore::RenderThemeChromiumMac::usesVerticalVolumeSlider): Add usesVerticalVolumeSlider function to allow horizontal volume sliders. Add usesVerticalVolumeSlider function to allow horizontal volume sliders. * rendering/RenderThemeChromiumSkia.h: (WebCore::RenderThemeChromiumSkia::usesVerticalVolumeSlider): Add usesVerticalVolumeSlider function to allow horizontal volume sliders. 2012-06-12 Andrei Bucur [CSSRegions]NamedFlow::overset should return true when there's no region chain attached https://bugs.webkit.org/show_bug.cgi?id=88515 The CSS Regions specifies that the "overset" attribute needs to return true if the content overflows, there's no region attached to the flow or if the NamedFlow is in the NULL state: http://www.w3.org/TR/css3-regions/#dom-named-flow-overset This patch updates WebKit's behavior in the last two situations to match the one in the spec. Reviewed by Andreas Kling. Test: fast/regions/webkit-named-flow-overset.html was updated * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::RenderFlowThread::computeOverflowStateForRegions): If the last valid region is null, the flow has not region chain attached or it's in the NULL state. 2012-06-12 Rahul Tiwari Web Inspector: Provide context menu for deleting recorded profile on Profiles Panel https://bugs.webkit.org/show_bug.cgi?id=88286 Added the context menu to delete the selected profile. Reviewed by Pavel Feldman. No new tests required as UI related change * English.lproj/localizedStrings.js: Removed property svn:mime-type. * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent): 2012-06-12 Pavel Feldman Not reviewed: removed svn:mime-type property from English.lproj/localizedStrings.js * English.lproj/localizedStrings.js 2012-06-12 Dan Bernstein Tried to fix the notification-enabled build after r120044. * notifications/NotificationController.cpp: (WebCore::NotificationController::NotificationController): (WebCore::NotificationController::create): (WebCore::provideNotification): * notifications/NotificationController.h: (NotificationController): 2012-06-12 Huang Dongsung [Qt][Texmap] Falling leaves demo missing clipping. https://bugs.webkit.org/show_bug.cgi?id=88704 The bug originated from begining native painting mode of QPainter after enabling scissor test, because begining native painting mode disables scissor test. Covered by existing compositing tests. Reviewed by Noam Rosenthal. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::beginPainting): 2012-06-12 Csaba Osztrogonác [Qt][Win] Buildfix related to fromWinHBITMAP https://bugs.webkit.org/show_bug.cgi?id=88863 Reviewed by Jocelyn Turcotte. * platform/graphics/qt/GraphicsContextQt.cpp: Add qt_pixmapFromWinHBITMAP and HBitmapFormat enum. (WebCore): (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/qt/ImageQt.cpp: (WebCore): Move qt_pixmapFromWinHBITMAP to outside of WebCore namespace. (Fix after r119924.) 2012-06-12 Takashi Sakamoto [Shadow DOM]