2010-08-25 Sheriff Bot Unreviewed, rolling out r66074. http://trac.webkit.org/changeset/66074 https://bugs.webkit.org/show_bug.cgi?id=44660 Chromium canary turned red (Requested by yuzo on #webkit). * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::responseText): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseTextAccessorGetter): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseText): (WebCore::XMLHttpRequest::responseXML): (WebCore::XMLHttpRequest::open): (WebCore::XMLHttpRequest::abort): (WebCore::XMLHttpRequest::clearResponse): (WebCore::XMLHttpRequest::didFinishLoading): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: 2010-08-25 Mark Rowe Reviewed by Dan Bernstein. WebCore's icon database often prevents Safari from being killable via sudden termination We need to ensure that each call to disableSuddenTermination is balanced by a corresponding call to enableSuddenTermination. It's possbile for several calls to IconDatabase::wakeSyncThread to correspond to only a single iteration of the loop within IconDatabase::syncThreadMainLoop. This results in the sudden termination disable count growing without bound rather than being balanced when the work completes. We can prevent this by ensuring that we only disable sudden termination once for each corresponding iteration of the sync thread's main loop. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::IconDatabase): (WebCore::IconDatabase::wakeSyncThread): Only disable sudden termination if it has not yet been disabled for this iteration of the sync thread's main loop. (WebCore::IconDatabase::syncThreadMainLoop): Clear the flag indicating that sudden termination has been disabled after reenabling it so that future calls to wakeSyncThread disable sudden termination once more. * loader/icon/IconDatabase.h: 2010-08-25 Michael Nordman Reviewed by David Levin. https://bugs.webkit.org/show_bug.cgi?id=44133 IDL bindings for XmlHttpRequest.responseBlob support, doesn't do anything yet. Adds two new attributes, asBlob and responseBlob. Runtime disabled by default, also behind a new ENABLE_XHR_RESPONSE_BLOB compile time guard. No new tests, just adding some stubs. * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setResponseBlobEnabled): (WebCore::RuntimeEnabledFeatures::responseBlobEnabled): (WebCore::RuntimeEnabledFeatures::asBlobEnabled): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::responseText): Changed to allow an exceptional return path. * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseTextAccessorGetter): Changed to allow an exceptional return path. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseText): Changed to raise an exception when accessed with asBlob set to true. (WebCore::XMLHttpRequest::responseXML): Changed to raise an exception when accessed with asBlob set to true. (WebCore::XMLHttpRequest::responseBlob): Added stub method, returns 0 for now. (WebCore::XMLHttpRequest::setAsBlob): Sets the asBlob attribute, raises exception if called at an inappropriate time. (WebCore::XMLHttpRequest::open): Resets asBlob to false, the default value. (WebCore::XMLHttpRequest::abort): Clears m_responseBlob. (WebCore::XMLHttpRequest::clearResponse): Clears m_responseBlob. (WebCore::XMLHttpRequest::didFinishLoading): Added a FIXME to populate m_responseBlob. * xml/XMLHttpRequest.h: (WebCore::XMLHttpRequest::asBlob): * xml/XMLHttpRequest.idl: 2010-08-24 Victoria Kirst Reviewed by Darin Fisher. Adding a means of communication between WebKit/WebCore and chromium in order to share video frames. This adds the necessary WebKit-side classes and methods, but does not actually use them yet - that will be committed in a separate patch after the corresponding Chromium side is committed. https://bugs.webkit.org/show_bug.cgi?id=44539 No new tests, as these new classes/APIs are not yet used. * platform/graphics/chromium/VideoFrameChromium.h: Added. (WebCore::VideoFrameChromium::): * platform/graphics/chromium/VideoFrameProvider.h: Added. * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::create): (WebCore::VideoLayerChromium::VideoLayerChromium): * platform/graphics/chromium/VideoLayerChromium.h: 2010-08-25 Kenneth Russell Reviewed by Simon Fraser. Source data passed to TypedArray creators should be const https://bugs.webkit.org/show_bug.cgi?id=44649 Compiled and ran existing WebGL tests to verify. * html/canvas/Float32Array.cpp: (WebCore::Float32Array::create): * html/canvas/Float32Array.h: * html/canvas/TypedArrayBase.h: (WebCore::TypedArrayBase::create): 2010-08-25 Eric Seidel Unreviewed, just removing a dead enum. Remove endTagRequirement now that the LegacyHTMLDocumentParser is dead https://bugs.webkit.org/show_bug.cgi?id=44626 Remove HTMLTagStatus since it's not used anymore. * html/HTMLElement.h: 2010-08-25 Chris Fleizach Reviewed by David Kilzer. AX: CSS first letter text transform causes crash https://bugs.webkit.org/show_bug.cgi?id=44352 Test: accessibility/first-letter-text-transform-causes-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::nextContinuation): 2010-08-25 Eric Seidel Reviewed by Adam Barth. Remove endTagRequirement now that the LegacyHTMLDocumentParser is dead https://bugs.webkit.org/show_bug.cgi?id=44626 Serialization is covered by a bunch of tests. innerHTML behavior is sadly not. In either case, this is just moving code and should have no functional change. * editing/markup.cpp: (WebCore::elementCannotHaveEndTag): (WebCore::MarkupAccumulator::shouldSelfClose): (WebCore::MarkupAccumulator::appendEndMarkup): (WebCore::serializeNodesWithNamespaces): * html/HTMLAnchorElement.h: * html/HTMLAreaElement.h: * html/HTMLBRElement.h: * html/HTMLBaseElement.h: * html/HTMLBaseFontElement.h: * html/HTMLBlockquoteElement.h: * html/HTMLBodyElement.h: * html/HTMLCanvasElement.cpp: * html/HTMLCanvasElement.h: * html/HTMLDListElement.h: * html/HTMLDataGridCellElement.h: * html/HTMLDataGridColElement.h: * html/HTMLDirectoryElement.h: * html/HTMLDivElement.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::nodeName): (WebCore::HTMLElement::ieForbidsInsertHTML): (WebCore::HTMLElement::deprecatedCreateContextualFragment): (WebCore::HTMLElement::setInnerText): (WebCore::HTMLElement::setOuterText): * html/HTMLElement.h: * html/HTMLEmbedElement.h: * html/HTMLFontElement.h: * html/HTMLFormControlElement.h: * html/HTMLFormElement.h: * html/HTMLFrameElement.h: * html/HTMLFrameSetElement.h: * html/HTMLHRElement.h: * html/HTMLHeadElement.h: * html/HTMLHeadingElement.h: * html/HTMLHtmlElement.h: * html/HTMLIFrameElement.h: * html/HTMLImageElement.h: * html/HTMLInputElement.h: * html/HTMLIsIndexElement.h: * html/HTMLLIElement.h: * html/HTMLLinkElement.h: * html/HTMLMapElement.h: * html/HTMLMarqueeElement.h: * html/HTMLMenuElement.h: * html/HTMLMetaElement.h: * html/HTMLModElement.h: * html/HTMLOListElement.h: * html/HTMLOptionElement.h: * html/HTMLParagraphElement.h: * html/HTMLParamElement.h: * html/HTMLPlugInElement.h: * html/HTMLPreElement.h: * html/HTMLQuoteElement.h: * html/HTMLScriptElement.h: * html/HTMLSourceElement.h: * html/HTMLStyleElement.h: * html/HTMLTableCaptionElement.h: * html/HTMLTableCellElement.h: * html/HTMLTableColElement.cpp: * html/HTMLTableColElement.h: * html/HTMLTableElement.h: * html/HTMLTableRowElement.h: * html/HTMLTableSectionElement.h: * html/HTMLUListElement.h: 2010-08-20 Zhenyao Mo Reviewed by Kenneth Russell. WebGL must enforce restrictions even if running on OpenGL ES 2.0 https://bugs.webkit.org/show_bug.cgi?id=42908 * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::getColorBufferFormat): Get format at given level instead of 0. * html/canvas/WebGLRenderingContext.cpp: Add two new flags and use them to replace the original isGLES2Compliant(). (WebCore::WebGLRenderingContext::WebGLRenderingContext): (WebCore::WebGLRenderingContext::bindTexture): (WebCore::WebGLRenderingContext::blendEquation): (WebCore::WebGLRenderingContext::blendEquationSeparate): (WebCore::WebGLRenderingContext::bufferData): (WebCore::WebGLRenderingContext::bufferSubData): (WebCore::WebGLRenderingContext::checkFramebufferStatus): (WebCore::WebGLRenderingContext::clear): (WebCore::WebGLRenderingContext::copyTexImage2D): (WebCore::WebGLRenderingContext::copyTexSubImage2D): (WebCore::WebGLRenderingContext::disable): (WebCore::WebGLRenderingContext::drawArrays): (WebCore::WebGLRenderingContext::drawElements): (WebCore::WebGLRenderingContext::enable): (WebCore::WebGLRenderingContext::generateMipmap): (WebCore::WebGLRenderingContext::hint): (WebCore::WebGLRenderingContext::isEnabled): (WebCore::WebGLRenderingContext::texImage2DBase): (WebCore::WebGLRenderingContext::texParameter): (WebCore::WebGLRenderingContext::isGLES2NPOTStrict): (WebCore::WebGLRenderingContext::isErrorGeneratedOnOutOfBoundsAccesses): * html/canvas/WebGLRenderingContext.h: Declare two new flags. * html/canvas/WebGLTexture.cpp: Get format at given level instead of 0. (WebCore::WebGLTexture::getInternalFormat): * html/canvas/WebGLTexture.h: Ditto. * platform/graphics/GraphicsContext3D.h: Add three new flags. * platform/graphics/mac/GraphicsContext3DMac.mm: Ditto. (WebCore::GraphicsContext3D::isGLES2NPOTStrict): (WebCore::GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses): * platform/graphics/qt/GraphicsContext3DQt.cpp: Ditto. (WebCore::GraphicsContext3D::isGLES2NPOTStrict): (WebCore::GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses): 2010-08-25 Brent Fulgham Build correction, no review. * WebCore.vcproj/WebCore.vcproj: Add missing implementation for PlatformRefPtrCairo. 2010-08-25 Cris Neckar Reviewed by Darin Adler. Added abort condition for RenderCounters when traversing a detached render tree. https://bugs.webkit.org/show_bug.cgi?id=43812 Test: fast/css/counters/counter-traverse-object-crash.html * rendering/RenderCounter.cpp: (WebCore::findPlaceForCounter): 2010-08-25 Chris Marrin Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=44629 Add layer consistency checking and fix found crashing bug The crash was being caused by some of the calls which mutated the sublayer list leaving the list in an inconsistent state. This eventually lead to a crash. It would also lead to visual artifacts if the crash didn't occur. Added consistency checking to catch this and any other inconsistencies in the sublayer list. The particular bug in this case was caused by clamping an index for insertion to the current size of the sublayer list. CACF uses an index equal to the current length to indicate an append operation. With tiled layers the apparent size of the list is one less than its actual size (to accomodate the layer which holds the list of tiles) so this clamping was causing the new layer to get inserted before the tile parent. The tile parent was then mistaken for a WKCACFLayer and it eventually tried to deref that layer, causing the crash. I also added some protection when destroying a WKCACFLayer. The user data for the corresponding CACFLayer is now changed to 0xDeadBeef rather than null. This allows dangling layers to be more easily identified. This value is checked and ASSERTed if seen. I also remove the sublayers on destruction to make the consistency checks work properly while a layer is being destroyed. Test: compositing/tiling/crash-reparent-tiled-layer.html * platform/graphics/win/WKCACFLayer.cpp: * platform/graphics/win/WKCACFLayer.h: * platform/graphics/win/WebTiledLayer.cpp: * platform/graphics/win/WebTiledLayer.h: 2010-08-25 Ryosuke Niwa Reviewed by Darin Adler. WebCore::InsertListCommand::modifyRange infinite loop (100% CPU usage) https://bugs.webkit.org/show_bug.cgi?id=33668 The bug was caused by enclosingListChild returning a list child whose enclosing list is a sibling of the current list child. Fixed enclosingListChild to traverse upwards in the DOM to find the list child which is a sibling of the current list child. Also fixed adjacentEnclosingList to only returns the list that belongs to the same outer list. In doApplyForSingleParagraph, if the start or the end of currentSelection existed inside a list content moved by moveParagraphWithClones, either end could point to a wrong position after the move. Fixed this problem by checking this condition upfront and restoring later. In doApply, if moveParagraph or moveParagraphWithClones, endOfSelection or startOfLastParagraph could be null or orphaned, fixed this problem by indexForVisiblePosition. Test: editing/execCommand/insert-list-orphaned-item-with-nested-lists.html * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): (WebCore::enclosingListChild): (WebCore::InsertListCommand::doApplyForSingleParagraph): (WebCore::adjacentEnclosingList): (WebCore::InsertListCommand::listifyParagraph): 2010-08-25 Brent Fulgham Build corrections, no review. * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Add include for new (missing) "CairoPath.h" class. * platform/graphics/cairo/PlatformRefPtrCairo.h: Correct include and compilation guards to match coding conventions. * platform/graphics/win/FontCustomPlatformDataCairo.cpp: Change implementation to match CG version, using the FontCustomPlatformData name, rather than the original FontCustomPlatformDataCairo. * platform/graphics/win/FontCustomPlatformDataCairo.h: Same as for the .cpp file. 2010-08-25 Krzysztof Czech Reviewed by Kenneth Rohde Christiansen. [EFL] Crash while calling PopupMenuEfl destructor https://bugs.webkit.org/show_bug.cgi?id=44497 Condition checks if m_view is defined before popup is hide * platform/efl/PopupMenuEfl.cpp: (WebCore::PopupMenuEfl::~PopupMenuEfl): 2010-08-24 Ryosuke Niwa Reviewed by Tony Chang. Creating a link when selecting multiple nodes creates multiple links https://bugs.webkit.org/show_bug.cgi?id=30836 The bug was caused by applyInlineStyleToRange calling addInlineStyleIfNeeded on each inline element. Modified applyInlineStyleToRange to call addInlineStyleIfNeeded once for all inline elements with the same style difference. Because this implies that anchor element may wrap other inline elements when added, modified pushDownInlineStyleAroundNode to push down styled elements. Removed pushPartiallySelectedAnchorElementsDown from CompositeEditCommand since ApplyStyleCommand now correctly pushes down anchors at the start and the end of the selection. Test: editing/execCommand/toggle-link.html * editing/ApplyStyleCommand.cpp: (WebCore::StyleChange::operator==): Added. (WebCore::StyleChange::operator!=): Added. (WebCore::ApplyStyleCommand::applyInlineStyleToRange): Wraps inline elements with the same style difference by one element instead of wrapping each element separately. (WebCore::ApplyStyleCommand::extractInlineStyleToPushDown): Extracts styled element. (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Avoids adding styled element. (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Pushes down styled element. (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): No longer checks inline-ness. (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Adds style even when m_removeOnly. Callers should set addStyledElement = DoNotAddStyledElement to avoid adding styled element. * editing/ApplyStyleCommand.h: * editing/CompositeEditCommand.cpp: Removed pushPartiallySelectedAnchorElementsDown. * editing/CompositeEditCommand.h: Removed pushPartiallySelectedAnchorElementsDown. * editing/CreateLinkCommand.cpp: (WebCore::CreateLinkCommand::doApply): used to call pushPartiallySelectedAnchorElementsDown. * editing/UnlinkCommand.cpp: (WebCore::UnlinkCommand::doApply): Used to call pushPartiallySelectedAnchorElementsDown. 2010-08-24 Zhenyao Mo Reviewed by Kenneth Russell. Passing premultiplyAlpha=false to tex{Sub}Image2D loses information (skia) https://bugs.webkit.org/show_bug.cgi?id=38282 Test: fast/canvas/webgl/gl-teximage.html * platform/graphics/GraphicsContext3D.cpp: Fix a bug where alpha channel is ignored. * platform/graphics/ImageSource.cpp: Add premultiplyAlpha flag. (WebCore::ImageSource::ImageSource): (WebCore::ImageSource::setData): * platform/graphics/ImageSource.h: Ditto. * platform/graphics/cg/ImageSourceCG.cpp: Ditto. (WebCore::ImageSource::ImageSource): * platform/graphics/qt/ImageDecoderQt.cpp: Ditto. (WebCore::ImageDecoder::create): (WebCore::ImageDecoderQt::ImageDecoderQt): (WebCore::ImageDecoderQt::frameCount): (WebCore::ImageDecoderQt::forceLoadEverything): * platform/graphics/qt/ImageDecoderQt.h: Ditto. * platform/graphics/skia/GraphicsContext3DSkia.cpp: Fix the premultiplyAlpha data loss issue in skia. (WebCore::GraphicsContext3D::getImageData): * platform/image-decoders/ImageDecoder.cpp: Add premultiplyAlpha flag. (WebCore::ImageDecoder::create): (WebCore::RGBA32Buffer::RGBA32Buffer): (WebCore::RGBA32Buffer::operator=): * platform/image-decoders/ImageDecoder.h: Ditto. (WebCore::RGBA32Buffer::premultiplyAlpha): (WebCore::RGBA32Buffer::setPremultiplyAlpha): (WebCore::RGBA32Buffer::setRGBA): (WebCore::ImageDecoder::ImageDecoder): * platform/image-decoders/bmp/BMPImageDecoder.cpp: Ditto. (WebCore::BMPImageDecoder::BMPImageDecoder): (WebCore::BMPImageDecoder::frameBufferAtIndex): * platform/image-decoders/bmp/BMPImageDecoder.h: Ditto. * platform/image-decoders/gif/GIFImageDecoder.cpp: Ditto. (WebCore::GIFImageDecoder::GIFImageDecoder): (WebCore::GIFImageDecoder::frameCount): * platform/image-decoders/gif/GIFImageDecoder.h: Ditto. * platform/image-decoders/ico/ICOImageDecoder.cpp: Ditto. (WebCore::ICOImageDecoder::ICOImageDecoder): (WebCore::ICOImageDecoder::frameCount): (WebCore::ICOImageDecoder::decodeAtIndex): * platform/image-decoders/ico/ICOImageDecoder.h: Ditto. * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto. (WebCore::JPEGImageDecoder::JPEGImageDecoder): (WebCore::JPEGImageDecoder::frameBufferAtIndex): * platform/image-decoders/jpeg/JPEGImageDecoder.h: Ditto. * platform/image-decoders/png/PNGImageDecoder.cpp: Ditto. (WebCore::PNGImageDecoder::PNGImageDecoder): (WebCore::PNGImageDecoder::frameBufferAtIndex): * platform/image-decoders/png/PNGImageDecoder.h: Ditto. * platform/image-decoders/skia/ImageDecoderSkia.cpp: Ditto. (WebCore::RGBA32Buffer::RGBA32Buffer): (WebCore::RGBA32Buffer::operator=): 2010-08-25 Adam Barth Reviewed by Eric Seidel. Remove XBL https://bugs.webkit.org/show_bug.cgi?id=44621 This patch removes support for XBL. XBL seems cool, but this code is old and pretty bitrotten. If we decide to support XBL in the future, we can recover this code from this revision. As it stands, it doesn't seem worth half-maintaining this code. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): * dom/Document.h: * loader/Cache.cpp: (WebCore::createResource): (WebCore::Cache::getStatistics): * loader/Cache.h: * loader/CachedResource.h: (WebCore::CachedResource::): * loader/CachedResourceClient.h: (WebCore::CachedResourceClient::setXSLStyleSheet): (WebCore::CachedResourceClient::fontLoaded): * loader/CachedXBLDocument.cpp: Removed. * loader/CachedXBLDocument.h: Removed. * loader/DocLoader.cpp: (WebCore::DocLoader::canRequest): * loader/DocLoader.h: * loader/loader.cpp: (WebCore::cachedResourceTypeToTargetType): (WebCore::Loader::determinePriority): * rendering/style/BindingURI.cpp: Removed. * rendering/style/BindingURI.h: Removed. * rendering/style/RenderStyle.cpp: * rendering/style/RenderStyle.h: * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2010-08-25 Andreas Kling Reviewed by Ariya Hidayat. [Qt] GraphicsContext: Construct with the correct default LineJoin (MiterJoin) We weren't setting it explicitly which caused us to use Qt::MiterJoin when we actually want Qt::SvgMiterJoin. Fixes display glitches on the "Monster" chrome experiment among other things. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::GraphicsContext): 2010-08-25 Rafael Antognolli Unreviewed build fix. [EFL] Build fix for revision 66024 https://bugs.webkit.org/show_bug.cgi?id=44631 No new features added, so no new tests. * CMakeListsEfl.txt: change GRefPtrCairo.cpp by PlatformRefPtrCairo.cpp. 2010-08-25 Ryosuke Niwa Reviewed by Darin Adler. Various designmode="on"/"off" & execCommand("Undo") NULL pointer crashes https://bugs.webkit.org/show_bug.cgi?id=32823 The bug was caused by changeSelectionAfterCommand which updates the selection without checking the whether new selection is valid or not. Fixed changeSelectionAfterCommand so that it won't update the selection when either end of the new selection is orphaned. Also fixed various editing commands to exit early if either end of the selection is orphaned. Tests: editing/undo/orphaned-selection-crash-bug32823-1.html editing/undo/orphaned-selection-crash-bug32823-2.html editing/undo/orphaned-selection-crash-bug32823-3.html editing/undo/orphaned-selection-crash-bug32823-4.html * editing/Editor.cpp: (WebCore::Editor::changeSelectionAfterCommand): No longer sets orphaned selection. * editing/VisibleSelection.h: (WebCore::VisibleSelection::isNonOrphanedRange): Added. (WebCore::VisibleSelection::isNonOrphanedCaretOrRange): Added. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::doApply): Added an early exist. See above. * editing/FormatBlockCommand.cpp: (WebCore::FormatBlockCommand::doApply): Ditto. * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::doApply): Ditto. * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): Ditto. * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): Ditto. * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto. * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Ditto. * editing/MoveSelectionCommand.cpp: (WebCore::MoveSelectionCommand::doApply): Ditto. * editing/RemoveFormatCommand.cpp: (WebCore::RemoveFormatCommand::doApply): Ditto. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Ditto. * editing/TypingCommand.cpp: (WebCore::TypingCommand::doApply): Ditto. * editing/UnlinkCommand.cpp: (WebCore::UnlinkCommand::doApply): Ditto. 2010-08-25 Simon Fraser Reviewed by Dan Bernstein. Flash content draws in front of site's drop down menu at http://www.monster.com/ https://bugs.webkit.org/show_bug.cgi?id=41330 If an iframe with composited content became overlapped, we failed to consider that iframe for compositing if it had no RenderLayer, so the layering would be incorrect. Overlap is detected at painting time, but it's bad for FrameView::setIsOverlapped() to call setNeedsStyleRecalc(), because this would cause subsequent calls to FrameView::paintContents() in the same painting batch to bail with needsLayout(). Instead, we do the setNeedsStyleRecalc() from RenderLayerCompositor::notifyIFramesOfCompositingChange(), so that the parent document has a chance to update style, and give the iframe a RenderLayer. Then setIsOverlapped() simply needs to schedule a layer update, which we do on a timer. When dumping layers via Frame::layerTreeAsText(), if a layer update is pending, then update the layers. Test: compositing/iframes/become-overlapped-iframe.html * page/Frame.cpp: (WebCore::Frame::layerTreeAsText): * page/FrameView.cpp: (WebCore::FrameView::setIsOverlapped): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::scheduleCompositingLayerUpdate): (WebCore::RenderLayerCompositor::compositingLayerUpdatePending): (WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): * rendering/RenderLayerCompositor.h: 2010-08-25 Martin Robinson Reviewed by Gustavo Noronha Silva. Cairo and EFL port shouldn't depend on glib. https://bugs.webkit.org/show_bug.cgi?id=44354 No new tests as functionality has not changed. Replace occurrences of GRefPtr and adoptGRef with PlatformRefPtr and adoptPlatformRef. Rename GRefPtrCairo to PlatformRefPtrCairo. * GNUmakefile.am: * platform/Cursor.h: * platform/graphics/cairo/GRefPtrCairo.cpp: Removed. * platform/graphics/cairo/GRefPtrCairo.h: Removed. * platform/graphics/cairo/ImageCairo.cpp: (WebCore::Image::drawPattern): * platform/graphics/cairo/PlatformRefPtrCairo.cpp: Added. (WTF::refPlatformPtr): (WTF::derefPlatformPtr): * platform/graphics/cairo/PlatformRefPtrCairo.h: Added. * platform/graphics/gtk/ImageBufferGtk.cpp: (WebCore::ImageBuffer::toDataURL): * platform/gtk/ClipboardGtk.cpp: (WebCore::ClipboardGtk::declareAndWriteDragImage): * platform/gtk/CursorGtk.cpp: (WebCore::createNamedCursor): (WebCore::createCustomCursor): (WebCore::Cursor::ensurePlatformCursor): * platform/gtk/DataObjectGtk.h: * platform/gtk/GRefPtrGtk.cpp: (WTF::refPlatformPtr): (WTF::derefPlatformPtr): * platform/gtk/GRefPtrGtk.h: * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeImage): * platform/gtk/PasteboardHelper.cpp: (WebCore::PasteboardHelper::dropAtomsForContext): * platform/gtk/PopupMenuGtk.h: * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::RenderThemeGtk): (WebCore::paintMozillaGtkWidget): * platform/gtk/RenderThemeGtk.h: 2010-08-25 Eric Carlson Reviewed by Alexey Proskuryakov. HTMLMediaElement.canPlayType must be case insensitive for MIME type. https://bugs.webkit.org/show_bug.cgi?id=44577 * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): (WebCore::MediaPlayer::supportsType): 2010-08-25 Xan Lopez Reviewed by Martin Robinson. [GTK] CodeGeneratorGObject not picking up FEATURE_DEFINES https://bugs.webkit.org/show_bug.cgi?id=44608 Move FEATURE_DEFINES declaration to the toplevel GNUmakefile.am, since it's used there now too. * GNUmakefile.am: 2010-08-25 Dawit Alemayehu Reviewed by Ariya Hidayat. Proper workaround for missing Gtk initialization in Adobe's flash plugins. https://bugs.webkit.org/show_bug.cgi?id=44405 * plugins/qt/PluginPackageQt.cpp: (WebCore::initializeGtk): (WebCore::PluginPackage::load): 2010-08-25 Ilya Tikhonovsky Reviewed by Yury Semikhatsky. WebInspector: InspectorBackendStub.js is not updated when Inspector.idl changes. https://bugs.webkit.org/show_bug.cgi?id=44604 * WebCore.xcodeproj/project.pbxproj: 2010-08-25 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: don't stop on DOM breakpoints when all breakpoints are deactivated https://bugs.webkit.org/show_bug.cgi?id=44509 * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::ScriptDebugServer): (WebCore::ScriptDebugServer::setBreakpointsActivated): (WebCore::ScriptDebugServer::breakProgram): * bindings/v8/ScriptDebugServer.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::create): 2010-08-25 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: lazily request frontend settings instead of pushing them on connect https://bugs.webkit.org/show_bug.cgi?id=44607 * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createParser): * inspector/Inspector.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::getSettings): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::populateScriptObjects): this method is now called explicitely from the frontend, it should be gone eventually once all panels request initial data lazily. * inspector/InspectorController.h: * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.show): (WebInspector.ProfilesPanel.prototype.profilerWasEnabled): (WebInspector.ProfilesPanel.prototype._reset): * inspector/front-end/Settings.js: (WebInspector.Settings): (WebInspector.Settings.initialize.populateApplicationSettings): (WebInspector.Settings.initialize.populateSessionSettings): (WebInspector.Settings.initialize): * inspector/front-end/inspector.js: (WebInspector.doLoadedDone): 2010-08-25 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: support checked and disabled context menu items. https://bugs.webkit.org/show_bug.cgi?id=44612 * platform/ContextMenu.cpp: (WebCore::ContextMenu::checkOrEnableIfNeeded): 2010-08-25 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: support disabled and checked context menu items. https://bugs.webkit.org/show_bug.cgi?id=44601 * bindings/js/JSInspectorFrontendHostCustom.cpp: (WebCore::JSInspectorFrontendHost::showContextMenu): * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::V8InspectorFrontendHost::showContextMenuCallback): * inspector/front-end/ContextMenu.js: (WebInspector.ContextMenu.prototype.appendItem): 2010-08-25 Zaheer Ahmad Reviewed by Xan Lopez. [GTK] GTK port doesnt compile with video turned off https://bugs.webkit.org/show_bug.cgi?id=44236 Generate the audio GObject DOM bindings only if video enabled * WebCore/GNUMakefile.am * WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: Make the audio code invocation conditional 2010-08-24 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: add "Attribute Modified" and "Node Removed" DOM breakpoints https://bugs.webkit.org/show_bug.cgi?id=44532 Test: inspector/dom-breakpoint.html * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setDOMBreakpoint): (WebCore::InspectorDOMAgent::removeDOMBreakpoint): (WebCore::InspectorDOMAgent::didInsertDOMNode): (WebCore::InspectorDOMAgent::didRemoveDOMNode): (WebCore::InspectorDOMAgent::didModifyDOMAttr): * inspector/front-end/DOMAgent.js: * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu): 2010-08-25 Satish Sampath Reviewed by Jeremy Orlow. Pass the element's bounds to embedder during speech recognition. https://bugs.webkit.org/show_bug.cgi?id=44427 The embedder would typically want to show a native UI with information, settings etc. By passing the display bounds of the html element, the embedder can position the native speech recognition UI appropriately. * page/SpeechInput.cpp: (WebCore::SpeechInput::startRecognition): * page/SpeechInput.h: * page/SpeechInputClient.h: * platform/mock/SpeechInputClientMock.cpp: (WebCore::SpeechInputClientMock::startRecognition): * platform/mock/SpeechInputClientMock.h: * rendering/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::detach): 2010-08-25 Yongjun Zhang Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=44461 Assertion failure at WebCore/platform/network/CredentialStorage.cpp:85. Remove the assertion at CredentialStorage.cpp:85 since it is legal to have multiple forward slashes after the path component. No test needed. * platform/network/CredentialStorage.cpp: (WebCore::protectionSpaceMapKeyFromURL): 2010-08-25 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: search in Scripts panel brings ui back to original search view. https://bugs.webkit.org/show_bug.cgi?id=44516 * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.searchCanceled): (WebInspector.Panel.prototype.jumpToNextSearchResult): (WebInspector.Panel.prototype.jumpToPreviousSearchResult): * inspector/front-end/ResourcesPanel.js: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.searchCanceled): (WebInspector.ScriptsPanel.prototype.performSearch.finishedCallback): (WebInspector.ScriptsPanel.prototype.performSearch): (WebInspector.ScriptsPanel.prototype.jumpToNextSearchResult): (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult): 2010-08-25 Kent Tamura Reviewed by Shinichiro Hamaji : Support auto-repeat by mouse press https://bugs.webkit.org/show_bug.cgi?id=44476 Like arrow button of scrollbars, spinbuttons of should continue to increase/decrease their values while the mouse button is pressed. No new tests because the new behavior strongly depends on a timer. * rendering/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::SpinButtonElement): Initializes the timer. (WebCore::SpinButtonElement::defaultEventHandler): Starts the timer by a mousedown event. (WebCore::SpinButtonElement::startRepeatingTimer): (WebCore::SpinButtonElement::stopRepeatingTimer): (WebCore::SpinButtonElement::repeatingTimerFired): * rendering/TextControlInnerElements.h: 2010-08-25 Gabor Loki Reviewed by Gavin Barraclough. Avoid increasing required alignment of target type warning https://bugs.webkit.org/show_bug.cgi?id=43963 Fix alignment warnings on Qt. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertQVariantToValue): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::getImageData): (WebCore::putImageData): * platform/image-decoders/ImageDecoder.h: (WebCore::RGBA32Buffer::getAddr): * platform/text/qt/TextCodecQt.cpp: (WebCore::TextCodecQt::decode): 2010-08-25 Kent Tamura Reviewed by Shinichiro Hamaji Fix a bug that a spin-button doesn't release mouse capturing https://bugs.webkit.org/show_bug.cgi?id=44411 - LeftButton should be checked only for clickEvent. Note that this change doesn't change the behavior because button() value is initialized with LeftButton even for mousemoveEvent. - Should pass a SpinButtonElement node to setCapturingMouseEventsNode(). Test: fast/forms/input-spinbutton-capturing.html * rendering/TextControlInnerElements.cpp: (WebCore::SpinButtonElement::defaultEventHandler): 2010-08-25 Gabor Loki Reviewed by Gavin Barraclough. Avoid increasing required alignment of target type warning https://bugs.webkit.org/show_bug.cgi?id=43963 Fix platform independent alignment warnings. * loader/CachedMetadata.h: (WebCore::CachedMetadata::readUnsigned): * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::decode): 2010-08-25 Patrick Gansterer Reviewed by Adam Roben. Add missing methods at ResourceHandleWin https://bugs.webkit.org/show_bug.cgi?id=44453 * platform/network/win/ResourceHandleWin.cpp: (WebCore::ResourceHandle::willLoadFromCache): (WebCore::prefetchDNS): (WebCore::ResourceHandle::bufferedData): (WebCore::ResourceHandle::supportsBufferedData): (WebCore::ResourceHandle::loadsBlocked): (WebCore::ResourceHandle::platformSetDefersLoading): 2010-08-25 Adam Barth Second attempt to fix Qt build * dom/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::parseDtd): 2010-08-24 Eric Seidel Reviewed by Adam Barth. Remove more DTD junk now that the LegacyHTMLDocumentParser is gone https://bugs.webkit.org/show_bug.cgi?id=44588 Just removing dead code, thus no tests. * html/HTMLElement.cpp: (WebCore::HTMLElement::nodeName): * html/HTMLElement.h: 2010-08-24 Adam Barth Qt build fix. * dom/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::parseStartElement): (WebCore::XMLDocumentParser::parseProcessingInstruction): (WebCore::XMLDocumentParser::parseCdata): (WebCore::XMLDocumentParser::parseComment): (WebCore::XMLDocumentParser::parseDtd): 2010-08-24 Adam Barth Reviewed by Eric Seidel. Delete HTMLElement::checkDTD https://bugs.webkit.org/show_bug.cgi?id=44563 This function existed to service the LegacyHTMLTreeBuilder. The new HTMLTreeBuilder has this logic internalized. Pulling on this thread caused me to remove a legacyParserAddChild and to discover some code that shouldn't be calling these parser-specific APIs. * dom/ContainerNode.cpp: (WebCore::ContainerNode::parserAddChild): (WebCore::ContainerNode::deprecatedParserAddChild): * dom/ContainerNode.h: * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): * dom/Node.cpp: (WebCore::Node::deprecatedParserAddChild): * dom/Node.h: * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::enterText): * dom/XMLDocumentParser.h: * dom/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::characters): (WebCore::XMLDocumentParser::processingInstruction): (WebCore::XMLDocumentParser::cdataBlock): (WebCore::XMLDocumentParser::comment): (WebCore::XMLDocumentParser::internalSubset): * dom/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::parseStartElement): (WebCore::XMLDocumentParser::parseCharacters): (WebCore::XMLDocumentParser::parseProcessingInstruction): (WebCore::XMLDocumentParser::parseCdata): (WebCore::XMLDocumentParser::parseComment): (WebCore::XMLDocumentParser::parseDtd): * html/HTMLDataGridElement.cpp: * html/HTMLDataGridElement.h: * html/HTMLDataGridRowElement.cpp: * html/HTMLDataGridRowElement.h: * html/HTMLDataListElement.cpp: * html/HTMLDataListElement.h: * html/HTMLDocument.cpp: * html/HTMLDocument.h: * html/HTMLElement.cpp: * html/HTMLElement.h: * html/HTMLFieldSetElement.cpp: * html/HTMLFieldSetElement.h: * html/HTMLFrameSetElement.cpp: * html/HTMLFrameSetElement.h: * html/HTMLHeadElement.cpp: * html/HTMLHeadElement.h: * html/HTMLHeadingElement.cpp: * html/HTMLHeadingElement.h: * html/HTMLHtmlElement.cpp: * html/HTMLHtmlElement.h: * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::HTMLKeygenElement): * html/HTMLMapElement.cpp: * html/HTMLMapElement.h: * html/HTMLMediaElement.cpp: * html/HTMLMediaElement.h: * html/HTMLNoScriptElement.cpp: * html/HTMLNoScriptElement.h: * html/HTMLOptGroupElement.cpp: * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: * html/HTMLOptionElement.h: * html/HTMLParagraphElement.cpp: * html/HTMLParagraphElement.h: * html/HTMLPlugInElement.cpp: * html/HTMLPlugInElement.h: * html/HTMLScriptElement.h: * html/HTMLSelectElement.cpp: * html/HTMLSelectElement.h: * html/HTMLStyleElement.h: * html/HTMLTableColElement.cpp: * html/HTMLTableColElement.h: * html/HTMLTableElement.cpp: * html/HTMLTableElement.h: * html/HTMLTableRowElement.cpp: * html/HTMLTableRowElement.h: * html/HTMLTableSectionElement.cpp: * html/HTMLTableSectionElement.h: * html/HTMLTextAreaElement.h: * html/HTMLTitleElement.h: * rendering/MediaControlElements.cpp: (WebCore::MediaControlElement::attachToParent): (WebCore::MediaControlInputElement::attachToParent): * rendering/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::attachInnerElement): 2010-08-24 Adam Barth Reviewed by Eric Seidel. Remove tagPriority https://bugs.webkit.org/show_bug.cgi?id=44557 This code used to be used by the old parser. Now it's unused. * html/HTMLAnchorElement.h: * html/HTMLAppletElement.h: * html/HTMLAreaElement.h: * html/HTMLAudioElement.h: * html/HTMLBRElement.h: * html/HTMLBaseElement.h: * html/HTMLBaseFontElement.h: * html/HTMLBlockquoteElement.h: * html/HTMLBodyElement.h: * html/HTMLCanvasElement.cpp: * html/HTMLCanvasElement.h: * html/HTMLDListElement.h: * html/HTMLDataGridCellElement.h: * html/HTMLDataGridColElement.h: * html/HTMLDataGridElement.h: * html/HTMLDataGridRowElement.h: * html/HTMLDirectoryElement.h: * html/HTMLDivElement.h: * html/HTMLElement.cpp: * html/HTMLElement.h: * html/HTMLEmbedElement.h: * html/HTMLFieldSetElement.h: * html/HTMLFontElement.h: * html/HTMLFormControlElement.h: * html/HTMLFormElement.h: * html/HTMLFrameElement.h: * html/HTMLFrameSetElement.h: * html/HTMLHRElement.h: * html/HTMLHeadElement.h: * html/HTMLHeadingElement.h: * html/HTMLHtmlElement.h: * html/HTMLIFrameElement.h: * html/HTMLImageElement.h: * html/HTMLInputElement.h: * html/HTMLIsIndexElement.h: * html/HTMLKeygenElement.h: * html/HTMLLIElement.h: * html/HTMLLabelElement.h: * html/HTMLLinkElement.h: * html/HTMLMapElement.h: * html/HTMLMarqueeElement.h: * html/HTMLMenuElement.h: * html/HTMLMetaElement.h: * html/HTMLModElement.h: * html/HTMLOListElement.h: * html/HTMLObjectElement.h: * html/HTMLOptionElement.h: * html/HTMLParagraphElement.h: * html/HTMLParamElement.h: * html/HTMLPreElement.h: * html/HTMLQuoteElement.h: * html/HTMLScriptElement.h: * html/HTMLSelectElement.h: * html/HTMLSourceElement.h: * html/HTMLStyleElement.h: * html/HTMLTableCaptionElement.h: * html/HTMLTableCellElement.h: * html/HTMLTableColElement.cpp: * html/HTMLTableColElement.h: * html/HTMLTableElement.h: * html/HTMLTableRowElement.h: * html/HTMLTableSectionElement.h: * html/HTMLUListElement.h: * html/HTMLVideoElement.h: 2010-08-24 Eric Seidel Reviewed by Adam Barth. Fix one more html5lib test case for button scoping https://bugs.webkit.org/show_bug.cgi?id=44583 I <3 test driven development. * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): 2010-08-24 Eric Seidel Reviewed by Adam Barth. Remove HTML5 parser testing infrastructure now that we don't need it https://bugs.webkit.org/show_bug.cgi?id=44581 Just removing dead code, no tests. * dom/DocumentFragment.cpp: * dom/DocumentFragment.h: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: 2010-08-24 Adam Barth Reviewed by Eric Seidel. Remove unneeded include in HTMLPreloadScanner https://bugs.webkit.org/show_bug.cgi?id=44552 Slowly but steadily sweeping up the dust in the HTML parser. * html/HTMLPreloadScanner.cpp: * html/HTMLPreloadScanner.h: 2010-08-24 Kinuko Yasuda Reviewed by Dumitru Daniliuc. Implement virtual path utilities for FileSystem API https://bugs.webkit.org/show_bug.cgi?id=44132 No new tests; tests will be added later. (Each DOMFilePath's method is briefly tested locally.) * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * storage/DOMFilePath.cpp: Added. * storage/DOMFilePath.h: Added. 2010-08-24 Adam Barth Reviewed by Eric Seidel. HTMLParserScheduler::create https://bugs.webkit.org/show_bug.cgi?id=44551 * html/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): * html/HTMLParserScheduler.h: (WebCore::HTMLParserScheduler::create): 2010-08-24 Daniel Bates Fix code comment as per Darin Adler's suggestion in . I inadvertently did not update this comment when I landed changeset 65967 . * rendering/RenderListMarker.cpp: (WebCore::listMarkerSuffix): 2010-08-24 Daniel Bates Reviewed by Darin Adler. Suffix for CSS alphabetic list style types should fallback to decimal for ordinals outside of their representable range https://bugs.webkit.org/show_bug.cgi?id=44486 Test: fast/lists/w3-css3-list-styles-fallback-style.html Fixes an issue where the decimal suffix is not used for ordinals that cannot be represented by the alphabetic list style type. Currently, for ordinals that cannot be represented in the alphabetic list style we use the suffix associated with the list style. Instead, we should use the suffix for the decimal list style ('.'). For instance, when the list style type is Afar and the starting ordinal is 0, then we fallback to the decimal list style suffix '.' because 0 cannot be represented in Afar. * rendering/RenderListMarker.cpp: (WebCore::toRoman): Moved bounds check into WebCore::effectiveListMarkerType(). (WebCore::toAlphabetic): Ditto. (WebCore::toHebrew): Ditto. (WebCore::toArmenian): Ditto. (WebCore::toGeorgian): Ditto. (WebCore::toCJKIdeographic): Ditto. (WebCore::effectiveListMarkerType): Added. (WebCore::listMarkerSuffix): Added value parameter to prototype. Modified to call WebCore::effectiveListMarkerType. (WebCore::listMarkerText): Modified to call WebCore::effectiveListMarkerType(). (WebCore::RenderListMarker::paint): Modified to pass list item ordinal (i.e. m_listItem->value()) to WebCore::listMarkerSuffix(). (WebCore::RenderListMarker::calcPrefWidths): Ditto. (WebCore::RenderListMarker::getRelativeMarkerRect): Ditto. 2010-08-24 Gavin Barraclough Windows build fix. * ForwardingHeaders/wtf/DecimalNumber.h: Added. 2010-08-23 Gavin Barraclough Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=44487 * html/LegacyHTMLTreeBuilder.cpp: (WebCore::serializeForNumberType): Update function call to numberToString. 2010-08-24 Eric Seidel Reviewed by Adam Barth. XMLDocumentParser needs to implement DocumentParser::detach() https://bugs.webkit.org/show_bug.cgi?id=44533 Test: fast/frames/set-parent-src-synchronously.xhtml In the example from the page we were accessing document() after DocumentParser::detach() was called. To prevent this I added an ASSERT(m_document) to document(), causing many test cases to cover the bug shown in bug 44533. To fix the bug, I implemented XMLDocumentParser::detach() and had it call clearCurrentNodeStack(), thus making it impossible for XMLDocumentParser to still have the Document on the node stack after detach (which was what was causing this bug). While fixing this, I noticed that XMLDocumentParser may have the same trouble crashing that the HTMLDocumentParser did when synchronously deleted from JS (for example by an iframe navigation). I added a test case to cover this and protected the parser after the two places it executes scripts. * dom/DocumentParser.h: (WebCore::DocumentParser::document): (WebCore::DocumentParser::isDetached): * dom/RawDataDocumentParser.h: (WebCore::RawDataDocumentParser::finish): * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::append): (WebCore::XMLDocumentParser::detach): (WebCore::XMLDocumentParser::notifyFinished): * dom/XMLDocumentParser.h: * dom/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::endElementNs): (WebCore::XMLDocumentParser::resumeParsing): * html/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::willPumpLexer): (WebCore::HTMLDocumentParser::didPumpLexer): (WebCore::HTMLDocumentParser::end): (WebCore::HTMLDocumentParser::endIfDelayed): (WebCore::HTMLDocumentParser::script): * html/HTMLViewSourceParser.cpp: (WebCore::HTMLViewSourceParser::updateTokenizerState): * html/HTMLViewSourceParser.h: (WebCore::HTMLViewSourceParser::document): * loader/ImageDocument.cpp: (WebCore::ImageDocumentParser::document): 2010-08-24 Patrick Gansterer Reviewed by Adam Roben. Add SynchronousLoader for ResourceHandleWin https://bugs.webkit.org/show_bug.cgi?id=44452 * platform/network/win/ResourceHandleWin.cpp: (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): (WebCore::WebCoreSynchronousLoader::didReceiveResponse): (WebCore::WebCoreSynchronousLoader::didReceiveData): (WebCore::WebCoreSynchronousLoader::didFinishLoading): (WebCore::WebCoreSynchronousLoader::didFail): (WebCore::ResourceHandle::loadResourceSynchronously): 2010-08-24 Ryosuke Niwa Unreviewed. Replaced soft tab indentation by hard tab indentation for LegacyWebArchive.h. * WebCore.xcodeproj/project.pbxproj: 2010-08-24 Joseph Pecoraro Reviewed by Mark Rowe. Web Inspector: RemoteInspectorFrontend can be renamed to InspectorFrontend https://bugs.webkit.org/show_bug.cgi?id=44499 Follow-up. No longer generate the RemoteInspectorFrontend files, just generate the required InspectorFrontend files. * DerivedSources.make: 2010-08-20 Joseph Pecoraro Reviewed by Pavel Feldman. Web Inspector: Backend Should Provide Full Supported CSS Properties List https://bugs.webkit.org/show_bug.cgi?id=40886 This allows the backend to send the front-end its complete list of supported CSS Properties. This is used in CSS Autocompletion and CSS Syntax Highlighting to show which styles are supported. * css/makeprop.pl: moved CSS properties to the header file. * inspector/Inspector.idl: expose getSupportedCSSProperties. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getSupportedCSSProperties): * inspector/InspectorDOMAgent.h: * inspector/front-end/CSSCompletions.js: (WebInspector.CSSCompletions._firstIndexOfPrefix): handle a possible error case before properties have loaded. (WebInspector.CSSCompletions._load): fill up the special array with the received properties. * inspector/front-end/SourceCSSTokenizer.js: (WebInspector.SourceCSSTokenizer): use the list of support properties from the backend. * inspector/front-end/SourceCSSTokenizer.re2js: * inspector/front-end/inspector.js: request the list of supported CSS properties on load. (WebInspector.doLoadedDone): 2010-08-24 Adam Barth Reviewed by Eric Seidel. Delete LegacyHTMLTreeBuilder https://bugs.webkit.org/show_bug.cgi?id=44554 There were some free functions in LegacyHTMLTreeBuilder that needed a new home. I've put them in HTMLTreeBuilder, but they'll probably need a better home eventually. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::shouldCreateImplicitHead): * dom/DocumentParser.h: * dom/ScriptableDocumentParser.h: * html/HTMLConstructionSite.cpp: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::removedFromTree): * html/HTMLInputElement.cpp: * html/HTMLMeterElement.cpp: * html/HTMLProgressElement.cpp: * html/HTMLTreeBuilder.cpp: (WebCore::serializeForNumberType): (WebCore::parseToDoubleForNumberType): * html/HTMLTreeBuilder.h: * html/HTMLViewSourceParser.h: * html/LegacyHTMLTreeBuilder.cpp: Removed. * html/LegacyHTMLTreeBuilder.h: Removed. * html/StepRange.cpp: * html/ValidityState.cpp: * rendering/RenderSlider.cpp: 2010-08-24 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: show DOM breakpoints in sidebar pane https://bugs.webkit.org/show_bug.cgi?id=44424 * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype._setBreakpoint): (WebInspector.BreakpointManager.prototype._breakpointRemoved): (WebInspector.BreakpointManager.prototype._setBreakpointOnBackend): (WebInspector.Breakpoint.prototype.set enabled): (WebInspector.Breakpoint.prototype.set condition): (WebInspector.Breakpoint.prototype.remove): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.BreakpointsSidebarPane): (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): (WebInspector.BreakpointsSidebarPane.prototype._breakpointRemoved): (WebInspector.BreakpointsSidebarPane.prototype._contextMenuEventFired): (WebInspector.BreakpointItem): (WebInspector.BreakpointItem.prototype.element): (WebInspector.BreakpointItem.prototype.remove): (WebInspector.BreakpointItem.prototype._checkboxClicked): (WebInspector.BreakpointItem.prototype._enableChanged): (WebInspector.BreakpointItem.prototype._removed): (WebInspector.JSBreakpointItem): (WebInspector.JSBreakpointItem.prototype._textChanged): (WebInspector.DOMBreakpointItem): (WebInspector.DOMBreakpointItem.prototype.compareTo): * inspector/front-end/DOMAgent.js: (WebInspector.DOMBreakpointManager): (WebInspector.DOMBreakpointManager.prototype.setBreakpoint): (WebInspector.DOMBreakpointManager.prototype.removeBreakpointsForNode): (WebInspector.DOMBreakpointManager.prototype._breakpointRemoved): (WebInspector.DOMBreakpoint): (WebInspector.DOMBreakpoint.prototype.get enabled): (WebInspector.DOMBreakpoint.prototype.set enabled): (WebInspector.DOMBreakpoint.prototype.remove): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype.reset): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu): * inspector/front-end/ScriptView.js: (WebInspector.ScriptView): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype._breakpointAdded): (WebInspector.ScriptsPanel.prototype.reset): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.set visible): (WebInspector.SourceFrame.prototype.addBreakpoint): (WebInspector.SourceFrame.prototype._breakpointRemoved): (WebInspector.SourceFrame.prototype._addBreakpointToSource): (WebInspector.SourceFrame.prototype._removeBreakpointFromSource): (WebInspector.SourceFrame.prototype._contextMenu.addConditionalBreakpoint): (WebInspector.SourceFrame.prototype._contextMenu): (WebInspector.SourceFrame.prototype._mouseDown): * inspector/front-end/SourceView.js: (WebInspector.SourceView): (WebInspector.SourceView.prototype.updateLocalContent): * inspector/front-end/inspector.js: (WebInspector.createJSBreakpointsSidebarPane.breakpointAdded): (WebInspector.createJSBreakpointsSidebarPane): (WebInspector.createDOMBreakpointsSidebarPane.breakpointAdded): (WebInspector.createDOMBreakpointsSidebarPane): (WebInspector.doLoadedDone): 2010-08-24 Stephen White Reviewed by Dumitru Daniliuc. Speculative fix for layout test failures on Chrome/Linux. https://bugs.webkit.org/show_bug.cgi?id=44550 Tests fast/canvas/arc-crash.html, fast/canvas/canvas-state-intact-after-putImageData.html, and fast/canvas/toDataURL-supportedTypes.html are failing on Chrome/Linux. Can't repro the failure locally, but this fix can't hurt. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas): 2010-08-24 Dumitru Daniliuc Reviewed by Dimitri Glazkov. Fix the NodeFilter wrapper and the binding for acceptNode. https://bugs.webkit.org/show_bug.cgi?id=44542 * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::wrapNativeNodeFilter): This function should always create a filter. V8NodeFilterCondition::acceptNode() will check if the given object can be used as a filter, and throw an exception if it can't. * bindings/v8/V8NodeFilterCondition.cpp: (WebCore::V8NodeFilterCondition::acceptNode): Update this binding to do the same thing that the JS binding does. 2010-08-24 Simon Fraser Reviewed by Tony Chang. After r65681, caret no longer displays promptly while editing form fields https://bugs.webkit.org/show_bug.cgi?id=44294 The caret no longer eagerly updates its rect on every paint, so we have to manually update it after scrolling the selection into view when the selection changes. Tested by the pixel results of fast/forms/input-text-scroll-left-on-blur.html * page/Frame.cpp: (WebCore::Frame::revealSelection): 2010-08-24 Adam Barth Reviewed by Darin Adler. Remove redundant call to OwnPtr::clear https://bugs.webkit.org/show_bug.cgi?id=44548 As pointed out by Darin, this call to clear is not needed. * editing/TextIterator.cpp: (WebCore::plainTextToMallocAllocatedBuffer): 2010-08-24 Adam Barth Reviewed by Eric Seidel. HTMLTokenizer::create https://bugs.webkit.org/show_bug.cgi?id=44477 * html/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): * html/HTMLPreloadScanner.cpp: (WebCore::HTMLPreloadScanner::HTMLPreloadScanner): (WebCore::HTMLPreloadScanner::scan): (WebCore::HTMLPreloadScanner::processToken): * html/HTMLPreloadScanner.h: * html/HTMLTokenizer.h: (WebCore::HTMLTokenizer::create): * html/HTMLViewSourceParser.cpp: (WebCore::HTMLViewSourceParser::HTMLViewSourceParser): (WebCore::HTMLViewSourceParser::pumpTokenizer): (WebCore::HTMLViewSourceParser::updateTokenizerState): * html/HTMLViewSourceParser.h: 2010-08-24 Adam Barth Reviewed by Darin Adler. Remove references to LegacyHTMLTreebuilder from HTMLTreeBuilder https://bugs.webkit.org/show_bug.cgi?id=44544 * html/HTMLDocumentParser.cpp: * html/HTMLDocumentParser.h: * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext): (WebCore::HTMLTreeBuilder::FragmentParsingContext::document): (WebCore::HTMLTreeBuilder::constructTreeFromToken): (WebCore::HTMLTreeBuilder::finished): * html/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElement): 2010-08-24 Xan Lopez Try to fix GTK+ build. Move GTK_API_VERSION_2 define out. * GNUmakefile.am: 2010-08-24 Simon Fraser Reviewed by Sam Weinig. TreeWalker traversal order is wrong when skipping and rejecting https://bugs.webkit.org/show_bug.cgi?id=44377 TreeWalker's nextSibling() and previousSibling() behaved incorrectly when traversing down a subtree where all nodes are skipped; it backed all the way up to the root of the subtree, then jump to the subtree's parentNode. This would skip later siblings. Fix by resetting 'node' when traversing to children so that node = node->parentNode() gets the correct node later. Test: fast/dom/TreeWalker/traversal-skip-most.html * dom/TreeWalker.cpp: (WebCore::TreeWalker::previousSibling): (WebCore::TreeWalker::nextSibling): 2010-08-24 Hans Wennborg Reviewed by Steve Block. Remove null-checks from DeviceOrientationController https://bugs.webkit.org/show_bug.cgi?id=44504 Remove checks for m_client being NULL from DeviceOrientationController. It will never be NULL, and this is checked by an ASSERT on construction. Will be covered by layout tests for device orientation. * dom/DeviceOrientationController.cpp: (WebCore::DeviceOrientationController::timerFired): (WebCore::DeviceOrientationController::addListener): (WebCore::DeviceOrientationController::removeListener): (WebCore::DeviceOrientationController::removeAllListeners): 2010-08-24 Stephen White Reviewed by Kenneth Russell. Fix accelerated 2d canvas with accelerated compositing off. https://bugs.webkit.org/show_bug.cgi?id=44525 Tested by running with --enable-accelerated-2d-canvas with --enable-accelerated-compositing off. ImageBuffer::copyImage changes covered by LayoutTests/fast/canvas/canvas-pattern-*.html. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): Extend the accelerated compositing check and the readback for non-accelerated compositing to accelerated 2D canvas also. * html/canvas/CanvasRenderingContext.cpp: * html/canvas/CanvasRenderingContext.h: (WebCore::CanvasRenderingContext::paintsIntoCanvasBuffer): Move this logic from WebGL to common canvas context code. * html/canvas/WebGLRenderingContext.h: Remove implementation of paintsIntoCanvasBuffer. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::copyImage): When copying the image for patterns, sync the software canvas. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::prepareForSoftwareDraw): Use SkDevice::eraseColor() to clear the canvas for mixed mode rendering. 2010-08-24 Adam Barth Reviewed by Eric Seidel. Deploy adoptPtr in WebCore/editing https://bugs.webkit.org/show_bug.cgi?id=44501 * editing/Editor.cpp: (WebCore::Editor::Editor): * editing/TextIterator.cpp: (WebCore::plainTextToMallocAllocatedBuffer): 2010-08-24 Adam Barth Reviewed by Eric Seidel. Deploy adoptPtr in WebCore/history https://bugs.webkit.org/show_bug.cgi?id=44502 * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): (WebCore::HistoryItem::addRedirectURL): 2010-08-24 Adam Barth Reviewed by Eric Seidel. Partial deployment of adoptPtr to WebCore/html https://bugs.webkit.org/show_bug.cgi?id=44507 Deploy adoptPtr to some more places in WebCore/html. The big chunk that I haven't done yet is createRenderer, but that's going to be a big patch unto itself. * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::formCollectionInfo): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::addElementAlias): * html/HTMLInputElement.cpp: (WebCore::createTypeMap): (WebCore::HTMLInputElement::setInputType): (WebCore::HTMLInputElement::parseMappedAttribute): (WebCore::HTMLInputElement::attach): (WebCore::HTMLInputElement::preDispatchEventHandler): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): (WebCore::HTMLObjectElement::attach): * html/HTMLToken.h: (WebCore::HTMLToken::beginDOCTYPE): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::attach): (WebCore::HTMLVideoElement::parseMappedAttribute): * html/ValidityState.h: (WebCore::ValidityState::create): 2010-08-24 Adam Barth Reviewed by Eric Seidel. Partial deployment of adoptPtr to WebCore/html https://bugs.webkit.org/show_bug.cgi?id=44507 There's a lot of places that need adoptPtr in WebCore/html. This patch does some of them. More will follow. * html/FileThreadTask.h: (WebCore::FileThreadTask0::create): (WebCore::FileThreadTask1::create): (WebCore::FileThreadTask2::create): (WebCore::FileThreadTask3::create): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::mapMouseEvent): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::getContext): * html/HTMLElementStack.cpp: (WebCore::HTMLElementStack::insertAbove): (WebCore::HTMLElementStack::pushCommon): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): (WebCore::HTMLEmbedElement::attach): 2010-08-24 Sam Weinig Reviewed by Simon Fraser. Improve comment for Simon. * editing/Editor.h: 2010-08-24 Sam Weinig Reviewed by Oliver Hunt. Paste event fires twice for mac WebKit https://bugs.webkit.org/show_bug.cgi?id=44535 The mac implementation of paste in WebKit was accidentally calling Editor::tryDHTMLPaste twice, once in -[WebHTMLView paste:] and once in Editor::pasteAsPlainText (which is called by -[WebHTMLView paste:]). Use the new pasteAsPlainTextBypassingDHTML function to bypass the second call. Test: editing/pasteboard/paste-event-only-once.html * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::pasteAsPlainTextBypassingDHTML): * editing/Editor.h: Expose a function which just pastes using from the general pasteboard, bypassing all the checking and DHTML pasting. 2010-08-24 Nate Chapin Unreviewed. Chromium build fix (add a #include missing in PingLoader.cpp) * loader/PingLoader.cpp: 2010-08-24 Nate Chapin Reviewed by David Levin. Allow image loads triggered from unload handlers to run entirely independently of any other loads or navigations. https://bugs.webkit.org/show_bug.cgi?id=30457 Test: http/tests/navigation/image-load-in-unload-handler.html * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/DocLoader.cpp: (WebCore::DocLoader::requestImage): Use PingLoader for image loads in unload handlers. * loader/FrameLoader.h: (WebCore::FrameLoader::pageDismissalEventBeingDispatched): * loader/PingLoader.cpp: Added. (WebCore::PingLoader::loadImage): Set the appropriate headers for an image load in unload handler (since we're not using SubresourceLoader, we need to do this manually here). (WebCore::PingLoader::PingLoader): * loader/PingLoader.h: Added. (WebCore::PingLoader::~PingLoader): (WebCore::PingLoader::didReceiveResponse): (WebCore::PingLoader::didReceiveData): (WebCore::PingLoader::didFinishLoading): (WebCore::PingLoader::didFail): 2010-08-24 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: Trace to the style that contributes to the computed styles panel. https://bugs.webkit.org/show_bug.cgi?id=44448 Test: inspector/styles-computed-trace.html * English.lproj/localizedStrings.js: * inspector/front-end/Section.js: (WebInspector.Section.prototype.set subtitle): (WebInspector.Section.prototype.get subtitleAsTextForTest): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._refreshUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules): (WebInspector.StylesSidebarPane.prototype._refreshSectionsForStyleRules): (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): (WebInspector.StylePropertiesSection.linkifyUncopyable): (WebInspector.StylePropertiesSection): (WebInspector.StylePropertiesSection.prototype.isPropertyInherited): (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded): (WebInspector.StylePropertiesSection.prototype.isPropertyDisabled): (WebInspector.StylePropertiesSection.prototype.update): (WebInspector.StylePropertiesSection.prototype.onpopulate): (WebInspector.ComputedStylePropertiesSection): (WebInspector.ComputedStylePropertiesSection.prototype.collapse): (WebInspector.ComputedStylePropertiesSection.prototype._isPropertyInherited): (WebInspector.ComputedStylePropertiesSection.prototype.update): (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate): (WebInspector.ComputedStylePropertiesSection.prototype.rebuildComputedTrace): (WebInspector.BlankStylePropertiesSection): * inspector/front-end/inspector.css: (.styles-section a::before): * inspector/front-end/inspector.js: (WebInspector.documentClick.followLink): (WebInspector.documentClick): (WebInspector.linkifyResourceAsNode): 2010-08-24 Daniel Cheng Reviewed by Eric Seidel. [chromium] Generate drag images for HTML elements and selections. https://bugs.webkit.org/show_bug.cgi?id=43449 We weren't properly generating drag images if an HTML element was set as the drag feedback image. I also implemented dragImageForSelection while I was working on this part of the code. No new tests. * WebCore.exp.in: * bindings/objc/DOM.mm: (-[DOMNode renderedImage]): * page/Frame.h: * page/brew/FrameBrew.cpp: (WebCore::Frame::nodeImage): * page/chromium/FrameChromium.cpp: (WebCore::): (WebCore::Frame::nodeImage): (WebCore::Frame::dragImageForSelection): * page/efl/FrameEfl.cpp: (WebCore::Frame::nodeImage): * page/gtk/FrameGtk.cpp: (WebCore::Frame::nodeImage): * page/haiku/FrameHaiku.cpp: (WebCore::Frame::nodeImage): * page/mac/FrameMac.mm: (WebCore::Frame::nodeImage): (WebCore::Frame::dragImageForSelection): * page/qt/FrameQt.cpp: (WebCore::Frame::nodeImage): (WebCore::Frame::dragImageForSelection): * page/win/FrameCGWin.cpp: (WebCore::Frame::nodeImage): * page/win/FrameCairoWin.cpp: (WebCore::Frame::nodeImage): * page/wince/FrameWince.cpp: (WebCore::Frame::nodeImage): * page/wx/FrameWx.cpp: (WebCore::Frame::nodeImage): * platform/chromium/ClipboardChromium.cpp: (WebCore::ClipboardChromium::createDragImage): * rendering/RenderObject.cpp: (WebCore::RenderObject::selectionForegroundColor): 2010-08-24 Jeremy Orlow Reviewed by Steve Block. IndexedDB needs to manually delete all objectStore data and indexes https://bugs.webkit.org/show_bug.cgi?id=44522 Apparently it's only newer versions of SQLite that handle cascade delete. The rest silently fail. So do it manually. Test: storage/indexeddb/objectstore-removeobjectstore.html * storage/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::doDelete): (WebCore::IDBDatabaseBackendImpl::removeObjectStore): * storage/IDBDatabaseBackendImpl.h: * storage/IDBFactoryBackendImpl.cpp: (WebCore::createTables): * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::removeIndex): * storage/IDBObjectStoreBackendImpl.h: (WebCore::IDBObjectStoreBackendImpl::create): (WebCore::IDBObjectStoreBackendImpl::id): 2010-08-23 Sam Weinig Reviewed by Adam Barth. Fix for and Change behavior of javascript: urls in and back to how they behaved before r50698. Tests: fast/loader/javascript-url-in-embed.html fast/loader/javascript-url-in-object.html * loader/SubframeLoader.cpp: (WebCore::SubframeLoader::requestFrame): (WebCore::SubframeLoader::requestObject): (WebCore::SubframeLoader::loadOrRedirectSubframe): * loader/SubframeLoader.h: 2010-08-24 Xan Lopez Reviewed by Gustavo Noronha. Update code to compile with latest GTK+ 3.x. * platform/gtk/gtk2drawing.c: (TSOffsetStyleGCs): (moz_gtk_entry_paint): * plugins/gtk/gtk2xtbin.c: (gtk_xtbin_new): 2010-08-24 Nikolas Zimmermann Reviewed by Dirk Schulze. -webkit-svg-shadow doesn't repaint on changes https://bugs.webkit.org/show_bug.cgi?id=44521 Trivial fix, to make -webkit-svg-shadow react on changes. Test: svg/css/shadow-changes.svg * rendering/style/SVGRenderStyle.cpp: (WebCore::SVGRenderStyle::diff): If 'svgShadow' is not equal, cause a repaint. 2010-08-24 Dirk Schulze Reviewed by Nikolas Zimmermann. Cg logs ": CGPathCloseSubpath: no current point. " in lots of tests https://bugs.webkit.org/show_bug.cgi?id=43026 Check if the path is empty before closing it. * svg/SVGPathBuilder.cpp: (WebCore::SVGPathBuilder::moveTo): 2010-08-24 Marcus Bulach Reviewed by Jeremy Orlow. Hooks IDBKeyPath with IDBObjectStorage::put. https://bugs.webkit.org/show_bug.cgi?id=44275 Adds a mechanism to extract an IDBKey from SerializedScriptValue using IDBKeyPath during IDBObjectStorage::put. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/chromium/ChromiumBridge.h: * storage/IDBKeyPathBackendImpl.cpp: Added. (IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath): * storage/IDBKeyPathBackendImpl.h: Added. * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::put): * storage/chromium/IDBKeyPathBackendImpl.cpp: Added. (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath): 2010-08-24 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: RemoteInspectorFrontend can be renamed to InspectorFrontend. The old version of InspectorFrontend was removed some time ago and now it is possible to rename the new version of inspector frontend class to its original name. https://bugs.webkit.org/show_bug.cgi?id=44499 * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.pri: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/CodeGeneratorInspector.pm: * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::addToFrontend): (WebCore::ConsoleMessage::updateRepeatCountInConsole): * inspector/ConsoleMessage.h: * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::pushNodePathToFrontend): (WebCore::InjectedScriptHost::frontend): * inspector/InjectedScriptHost.h: * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::dispatchOnInjectedScript): (WebCore::InspectorBackend::frontend): * inspector/InspectorBackend.h: * inspector/InspectorCSSStore.cpp: * inspector/InspectorCSSStore.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::inspectedPageDestroyed): (WebCore::InspectorController::inspect): (WebCore::InspectorController::focusNode): (WebCore::InspectorController::windowVisible): (WebCore::InspectorController::addConsoleMessage): (WebCore::InspectorController::clearConsoleMessages): (WebCore::InspectorController::inspectedWindowScriptObjectCleared): (WebCore::InspectorController::setSearchingForNode): (WebCore::InspectorController::setMonitoringXHR): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::show): (WebCore::InspectorController::showPanel): (WebCore::InspectorController::close): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::populateScriptObjects): (WebCore::InspectorController::pruneResources): (WebCore::InspectorController::didCommitLoad): (WebCore::InspectorController::didLoadResourceFromMemoryCache): (WebCore::InspectorController::identifierForInitialRequest): (WebCore::InspectorController::mainResourceFiredDOMContentEvent): (WebCore::InspectorController::mainResourceFiredLoadEvent): (WebCore::InspectorController::willSendRequest): (WebCore::InspectorController::didReceiveResponse): (WebCore::InspectorController::didReceiveContentLength): (WebCore::InspectorController::didFinishLoading): (WebCore::InspectorController::didFailLoading): (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest): (WebCore::InspectorController::scriptImported): (WebCore::InspectorController::enableResourceTracking): (WebCore::InspectorController::disableResourceTracking): (WebCore::InspectorController::startTimelineProfiler): (WebCore::InspectorController::stopTimelineProfiler): (WebCore::InspectorController::postWorkerNotificationToFrontend): (WebCore::InspectorController::didCreateWorker): (WebCore::InspectorController::didDestroyWorker): (WebCore::InspectorController::selectDatabase): (WebCore::InspectorController::didOpenDatabase): (WebCore::InspectorController::didUseDOMStorage): (WebCore::InspectorController::selectDOMStorage): (WebCore::InspectorController::enableDebuggerFromFrontend): (WebCore::InspectorController::enableDebugger): (WebCore::InspectorController::disableDebugger): (WebCore::InspectorController::evaluateForTestInFrontend): * inspector/InspectorController.h: (WebCore::InspectorController::hasFrontend): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): * inspector/InspectorDOMAgent.h: (WebCore::InspectorDOMAgent::create): * inspector/InspectorDOMStorageResource.cpp: (WebCore::InspectorDOMStorageResource::bind): * inspector/InspectorDOMStorageResource.h: * inspector/InspectorDatabaseResource.cpp: (WebCore::InspectorDatabaseResource::bind): * inspector/InspectorDatabaseResource.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::create): (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState): (WebCore::InspectorDebuggerAgent::didParseSource): (WebCore::InspectorDebuggerAgent::failedToParseSource): (WebCore::InspectorDebuggerAgent::didPause): (WebCore::InspectorDebuggerAgent::didContinue): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::InspectorProfilerAgent): (WebCore::InspectorProfilerAgent::addProfile): (WebCore::InspectorProfilerAgent::disable): (WebCore::InspectorProfilerAgent::enable): (WebCore::InspectorProfilerAgent::resetState): (WebCore::InspectorProfilerAgent::toggleRecordButton): * inspector/InspectorProfilerAgent.h: (WebCore::InspectorProfilerAgent::setFrontend): * inspector/InspectorResource.cpp: (WebCore::InspectorResource::updateScriptObject): (WebCore::InspectorResource::releaseScriptObject): * inspector/InspectorResource.h: * inspector/InspectorStorageAgent.cpp: (WebCore::InspectorStorageAgent::InspectorStorageAgent): * inspector/InspectorStorageAgent.h: (WebCore::InspectorStorageAgent::create): (WebCore::InspectorStorageAgent::frontend): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): (WebCore::InspectorTimelineAgent::resetFrontendProxyObject): * inspector/InspectorTimelineAgent.h: 2010-08-24 Nikolas Zimmermann Reviewed by Dirk Schulze. Markers don't render, when applied to a target using vector-effect="non-scaling-stroke" https://bugs.webkit.org/show_bug.cgi?id=44511 Make fillAndStrokePath a member function of RenderPath, to avoid having to pass the const Path& and this paramters. Don't leave the GraphicsContext mutated after applying non-scaling-stroke transformation, otherwhise markers will be renderer in the wrong coordinate space, and thus don't show up anymore. Test: svg/custom/non-scaling-stroke-markers.svg * rendering/RenderPath.cpp: (WebCore::RenderPath::fillAndStrokePath): (WebCore::RenderPath::paint): * rendering/RenderPath.h: 2010-08-24 Adam Barth Reviewed by Kenneth Rohde Christiansen. Remove wrong code from Qt that's dumping extra markup into the clipboard https://bugs.webkit.org/show_bug.cgi?id=44506 I have no way of testing this patch, but hopefully it should fix a bunch of newly failing tests. This code seems very confused. * platform/qt/PasteboardQt.cpp: (WebCore::Pasteboard::writeSelection): 2010-08-24 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: fix gcc warnings introduced in 65731 https://bugs.webkit.org/show_bug.cgi?id=44468 * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::didInsertDOMNode): (WebCore::InspectorDOMAgent::pauseOnBreakpoint): 2010-08-24 Ariya Hidayat Reviewed by Simon Hausmann. [Qt] Blur shadow for rectangle fill https://bugs.webkit.org/show_bug.cgi?id=44488 Refactor fillRect() function to support blur radius in the shadow. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): 2010-08-24 Nikolas Zimmermann Reviewed by Dirk Schulze clip-path does not work inside mask element https://bugs.webkit.org/show_bug.cgi?id=41428 Add new tests covering nesting of clippers and maskers, with different unitTypes for the content coordinate system. Scale all ImageBuffer content to take into account that ImageBuffers use integer based sizes, where the content is floating-point sized. This compensates rounded errors, when scaling the document. Tests: svg/clip-path/clip-in-mask-objectBoundingBox.svg svg/clip-path/clip-in-mask-userSpaceOnUse.svg svg/clip-path/clip-in-mask.svg svg/clip-path/deep-nested-clip-in-mask-different-unitTypes.svg svg/clip-path/deep-nested-clip-in-mask-panning.svg svg/clip-path/deep-nested-clip-in-mask.svg svg/clip-path/nested-clip-in-mask-image-based-clipping.svg svg/clip-path/nested-clip-in-mask-path-and-image-based-clipping.svg svg/clip-path/nested-clip-in-mask-path-based-clipping.svg * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyResource): Return the value of applyClippingToContext, instead of always true. (WebCore::RenderSVGResourceClipper::applyClippingToContext): Moved some code from createClipData, to avoid having to pass 5 arguments to createClipData. (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage): Renamed from createClipData. * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): Pass absoluteTargetRect to createImageBuffer. (WebCore::clipToTextMask): Ditto. * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): Ditto. (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): Pass content transformation to renderSubtreeToImageBuffer, to support nesting objectBoundingBox resources. * rendering/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): Adapt to calculateTransformationToOutermostSVGCoordinateSystem changes. AffineTransform is now passed as reference. (WebCore::RenderSVGResourcePattern::createTileImage): ImageBuffer content scaling is now handled by createImageBuffer. * rendering/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem): Renamed. Don't return an AffineTransform copy, but instead pass it as reference. (WebCore::SVGImageBufferTools::createImageBuffer): Always scale the ImageBuffer content, to compensate rounding effects (code was only present in patterns so far). Now also needs the 'absoluteTargetRect' parameter, not only 'clampedAbsoluteTargetRect'. (WebCore::SVGImageBufferTools::renderSubtreeToImageBuffer): Moved from SVGRenderSupport. (WebCore::SVGImageBufferTools::clipToImageBuffer): Pass ImageBuffer as OwnPtr reference, to allow to clear it under certain circumstances (see comment). (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer): Remove AffineTransform parameter, absoluteTargetRect is calculated before passing into this function. * rendering/SVGImageBufferTools.h: * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::prepareToRenderSVGContent): Important change, respect the RenderSVGResourceClipper::applyResource() return value! * rendering/SVGRenderSupport.h: * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::build): renderSubtreeToImage now lives in SVGImageBufferTools, adapt code. 2010-08-24 Andrei Popescu Reviewed by Jeremy Orlow. [IndexedDB] IDBTransaction is missing the implementation for objectStore method https://bugs.webkit.org/show_bug.cgi?id=44446 * storage/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::transaction): * storage/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::create): (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl): (WebCore::IDBTransactionBackendImpl::objectStore): * storage/IDBTransactionBackendImpl.h: * storage/IDBTransactionCoordinator.cpp: (WebCore::IDBTransactionCoordinator::createTransaction): * storage/IDBTransactionCoordinator.h: 2010-08-24 Andreas Kling Reviewed by Tor Arne Vestbø. Disallow setting Document.xmlVersion to unsupported versions https://bugs.webkit.org/show_bug.cgi?id=44494 Added XMLDocumentParser::supportsXMLVersion() - only returns true for "1.0" in both implementations. * dom/Document.cpp: (WebCore::Document::setXMLVersion): Throw NOT_SUPPORTED_ERR if XMLDocumentParser::supportsXMLVersion() returns false for the version. * dom/XMLDocumentParser.h: * dom/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::supportsXMLVersion): * dom/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::supportsXMLVersion): 2010-08-24 Laszlo Gombos Reviewed by Simon Hausmann. [Qt][Symbian] Make sure WebKit headers are included before platform headers on Symbian https://bugs.webkit.org/show_bug.cgi?id=31273 On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers are included before platform headers. On all other platforms continue to use INCLUDEPATH (as before). This patch also removed the workarounds that are put in place now that we have a better solution. No new tests as there is no new functionality. * WebCore.pro: 2010-08-24 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Support text-shadow blur https://bugs.webkit.org/show_bug.cgi?id=19728 Implement blur for text shadow using the shadow layer in r65782. * platform/graphics/qt/ContextShadow.cpp: (WebCore::ContextShadow::beginShadowLayer): * platform/graphics/qt/FontQt.cpp: (WebCore::drawTextCommon): 2010-08-23 Andreas Kling Reviewed by Tor Arne Vestbø. setAttributeNS() should throw NAMESPACE_ERR for prefixed qualifiedName with null namespace https://bugs.webkit.org/show_bug.cgi?id=44432 Test: fast/dom/setAttributeNS-prefix-and-null-namespace.html * dom/Element.cpp: (WebCore::Element::setAttributeNS): Throw NAMESPACE_ERR if namespace is null and the qualifiedName has a prefix. 2010-08-24 Adam Barth Build fix. leakPtr doesn't exist, contrary to my dreams. * storage/IDBKeyTree.h: (WebCore::::put): * storage/IDBPendingTransactionMonitor.cpp: (WebCore::IDBPendingTransactionMonitor::addPendingTransaction): 2010-08-24 Adam Barth Reviewed by Eric Seidel. Deploy adoptPtr in WebCore/storage https://bugs.webkit.org/show_bug.cgi?id=44491 There are still some naked news for a future patch. The next step is to make create methods. * storage/Database.cpp: (WebCore::DatabaseCreationCallbackTask::create): (WebCore::DerefContextTask::create): (WebCore::DeliverPendingCallbackTask::create): * storage/DatabaseSync.cpp: (WebCore::CloseSyncDatabaseOnContextThreadTask::create): * storage/DatabaseTask.h: (WebCore::Database::DatabaseOpenTask::create): (WebCore::Database::DatabaseCloseTask::create): (WebCore::Database::DatabaseTransactionTask::create): (WebCore::Database::DatabaseTableNamesTask::create): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::populateOrigins): (WebCore::DatabaseTracker::addOpenDatabase): * storage/IDBKeyTree.h: (WebCore::::put): * storage/IDBPendingTransactionMonitor.cpp: (WebCore::IDBPendingTransactionMonitor::addPendingTransaction): * storage/LocalStorageTask.h: (WebCore::LocalStorageTask::createImport): (WebCore::LocalStorageTask::createSync): (WebCore::LocalStorageTask::createDeleteEmptyDatabase): (WebCore::LocalStorageTask::createTerminate): * storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::create): * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::openTransactionAndPreflight): * storage/SQLTransactionSync.cpp: (WebCore::SQLTransactionSync::SQLTransactionSync): (WebCore::SQLTransactionSync::begin): * storage/StorageNamespaceImpl.cpp: (WebCore::StorageNamespaceImpl::copy): 2010-08-24 Ilya Tikhonovsky Reviewed by Yury Semikhatsky. WebInspector: setAttachedWindow was modified at r65809 but it should be implemented another way. https://bugs.webkit.org/show_bug.cgi?id=44493 * inspector/Inspector.idl: * inspector/InspectorController.cpp: * inspector/InspectorController.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::setAttachedWindow): 2010-08-23 Eric Seidel Reviewed by Adam Barth. Use new HTML5 TreeBuilder for fragment parsing https://bugs.webkit.org/show_bug.cgi?id=44475 The HTML5 TreeBuilder is ready to be used for all parsing including fragments! This is the last change to move trunk off of the LegacyHTMLTreeBuilder. We'll go through and delete the thousands of lines of code supporting the old parser in a separate patch. This is covered by many layout tests. * html/HTMLTreeBuilder.cpp: 2010-08-23 Adam Barth Reviewed by Eric Seidel. HTMLScriptRunner::create https://bugs.webkit.org/show_bug.cgi?id=44474 * html/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): * html/HTMLScriptRunner.h: (WebCore::HTMLScriptRunner::create): 2010-08-23 Adam Barth Reviewed by Eric Seidel. HTMLTreeBuilder should use adoptPtr https://bugs.webkit.org/show_bug.cgi?id=44473 We should really use this pattern everywhere. * html/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::HTMLDocumentParser): * html/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::create): 2010-08-23 Patrick Gansterer Reviewed by Adam Roben. Set the ResourceResponse HTTP headers in RessourceHandleWin https://bugs.webkit.org/show_bug.cgi?id=44444 * platform/network/win/ResourceHandleWin.cpp: (WebCore::queryHTTPHeader): (WebCore::ResourceHandle::onRequestComplete): 2010-08-23 Patrick Gansterer Reviewed by Adam Roben. Support all available biBitCount values in BitmapInfo https://bugs.webkit.org/show_bug.cgi?id=43724 Add an enum with all possible values for biBitCount. Also remove explicit initialization of bmiHeader members, because that is already done in the constructor. * platform/win/BitmapInfo.cpp: Added property svn:eol-style. (WebCore::bitmapInfoForSize): (WebCore::BitmapInfo::create): (WebCore::BitmapInfo::createBottomUp): * platform/win/BitmapInfo.h: Added property svn:eol-style. (WebCore::BitmapInfo::): (WebCore::BitmapInfo::bytesPerLine): (WebCore::BitmapInfo::paddedBytesPerLine): (WebCore::BitmapInfo::paddedWidth): * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::paint): 2010-08-23 Kent Tamura Unreviewed, build fix for r65852. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded): * rendering/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement): (WebCore::InputFieldSpeechButtonElement::create): * rendering/TextControlInnerElements.h: 2010-08-23 Ryosuke Niwa Reviewed by Eric Seidel. MarkupAccumulator::appendStartMarkup should be broken down into pieces https://bugs.webkit.org/show_bug.cgi?id=44288 Extracted appendText, appendComment, appendProcessingInstruction, appendElement and appendCDATASection. Also simplified the conditionals in appendText. No new tests are added since this is a cleanup. * editing/markup.cpp: (WebCore::MarkupAccumulator::appendText): (WebCore::MarkupAccumulator::appendComment): (WebCore::MarkupAccumulator::appendProcessingInstruction): (WebCore::MarkupAccumulator::appendElement): (WebCore::MarkupAccumulator::appendCDATASection): (WebCore::MarkupAccumulator::appendStartMarkup): 2010-08-23 Simon Fraser Reviewed by Alexey Proskuryakov. TreeWalker is not calling acceptNode function in filter object https://bugs.webkit.org/show_bug.cgi?id=35296 Fix incorrect shadowing of the 'function' variable, which could result in badness when asking for arguments.callee. * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::acceptNode): 2010-08-23 Darin Adler Reviewed by Geoff Garen. Changed type of Node::parentNode to ContainerNode so we don't have to cast, since parent are all containers. * css/CSSStyleSelector.h: Changed m_parentNode to ContainerNode*. * dom/Document.h: Fixed the type of TreeShared in the Node constructor. Yes, it's here. * dom/Node.cpp: (WebCore::Node::eventParentNode): Removed now-unneeded typecast dance. (WebCore::eventTargetAsSVGElementInstance):Changed type to ContainerNode*. * dom/Node.h: Made Node inherit from TreeShared instead of from TreeShared. Removed bogus comment. Changed return type of parentNode and shadowParentNode functions to ContainerNode*. Fixed using to use TreeShared. * dom/Position.h: Include ContainerNode.h instead of Node.h. * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::findFosterSite): Removed now-unneeded typecast. * rendering/MediaControlElements.h: * rendering/SVGShadowTreeElements.h: * rendering/TextControlInnerElements.h: Changed return type of shadowParentNode functions to ContainerNode. * rendering/RenderMeter.cpp: (WebCore::RenderMeter::updatePartsState): Cast the node to HTMLElement* before passing it to the function that creates the shadow element. We know the node is a HTMLMeterElement, but the node function doesn't know that. * rendering/RenderProgress.cpp: (WebCore::RenderProgress::updatePartsState): Ditto. * rendering/RenderSlider.cpp: (WebCore::SliderThumbElement::SliderThumbElement): More of the same. (WebCore::SliderThumbElement::create): Ditto. (WebCore::RenderSlider::updateFromElement): Ditto. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::createSubtreeIfNeeded): Ditto. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded): Ditto. * rendering/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement): Ditto. (WebCore::SVGShadowTreeRootElement::shadowParentNode): Ditto. * rendering/ShadowElement.cpp: (WebCore::ShadowBlockElement::create): Ditto. (WebCore::ShadowBlockElement::ShadowBlockElement): Ditto. (WebCore::ShadowBlockElement::createForPart): Ditto. (WebCore::ShadowInputElement::create): Ditto. (WebCore::ShadowInputElement::ShadowInputElement): Ditto. * rendering/ShadowElement.h: (WebCore::ShadowElement::ShadowElement): Ditto. (WebCore::ShadowElement::shadowParent): Ditto. (WebCore::ShadowElement::shadowParentNode): Ditto. * rendering/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::TextControlInnerElement): Ditto. (WebCore::TextControlInnerElement::create): Ditto. (WebCore::TextControlInnerTextElement::TextControlInnerTextElement): Ditto. (WebCore::TextControlInnerTextElement::create): Ditto. (WebCore::SpinButtonElement::SpinButtonElement): Ditto. (WebCore::SpinButtonElement::create): Ditto. * svg/SVGElement.cpp: (WebCore::SVGElement::eventParentNode): Removed now-unneeded typecast. * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::title): Changed type to ContainerNode*. 2010-08-23 Martin Robinson Reviewed by Gustavo Noronha Silva. [GTK] The Mozilla theme drawing code incorrectly renders scrollbar backgrounds https://bugs.webkit.org/show_bug.cgi?id=44388 No new tests as this functionality is currently unused. When the the new scrollbar theme code lands for GTK+, this will be tested by scrollbar pixel tests. * platform/gtk/gtk2drawing.c: Expose a method to paint scrolled window backgrounds and disable incorrect rendering of scrollbar trough backgrounds. (moz_gtk_scrolled_window_paint): Added. (moz_gtk_scrollbar_trough_paint): Disable incorrect background render. * platform/gtk/gtkdrawing.h: Add scrolled window widget type in the enum. 2010-08-23 Martin Robinson Reviewed by Gustavo Noronha Silva. [GTK] The Mozilla theme drawing API should expose extra information about scrollbar geometry https://bugs.webkit.org/show_bug.cgi?id=44385 Expose the trough_under_steppers property in MozGtkScrollbarMetrics. No new tests as this does not change functionality. * platform/gtk/gtk2drawing.c: Set the trough_under_steppers member when accessing theme data. * platform/gtk/gtkdrawing.h: Add the trough_under_steppers member. 2010-08-23 Darin Adler Reviewed by Geoff Garen. Parser DOM tree manipulation functions do not need to be virtual. * dom/ContainerNode.h: Made parserAddChild, parserRemoveChild, and parserInsertBefore non-virtual. * dom/Node.cpp: Removed the parserAddChild, parserRemoveChild, and parserInsertBefore functions, which should never have been in the Node class. * dom/Node.h: Ditto. * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attach): Changed argument type to ContainerNode* because we never need to attach a child to a non-container node. (WebCore::HTMLConstructionSite::findFosterSite): Cast the result of the parent function to ContainerNode*. A parent is always guaranteed to be a container, but the parent function returns a Node* so that callers can use it without including ContainerNode's header. That seems like something we can easily fix later. * html/HTMLConstructionSite.h: Changed AttachmentSite::parent and the attach function to ContainerNode* instead of Node*. 2010-08-23 Adam Barth Reviewed by Eric Seidel. editing/pasteboard/bad-placeholder.html fails with --html5-treebuilder https://bugs.webkit.org/show_bug.cgi?id=44463 The problem here is that using the documentElement as the context puts the tree builder into the BeforeHead insertion mode, which strips leading spaces. This code is confused about what it wants, but it certainly doesn't want to be in that insertion mode. Looking through the callers, they'd much rather be in the InBody insertion mode. We can get them there by creating a fake body element as the context element. In the long term, all this code needs to be changed to move away from deprecatedCreateContextualFragment, which does a bunch of nasty stuff like removing certain kinds of elements. However, that's a battle for another day. * editing/markup.cpp: (WebCore::createFragmentFromMarkup): 2010-08-23 Adam Barth Reviewed by Eric Seidel. fast/xsl/default-html.html fails with HTML5 fragment parsing https://bugs.webkit.org/show_bug.cgi?id=44450 This patch is a step down a trail of tears. As far as I can tell, there's no spec for XSLTProcessor.transformToFragment. This patch attempts to infer the proper behavior from test cases and the Mozilla wiki. * xml/XSLTProcessor.cpp: (WebCore::createFragmentFromSource): 2010-08-23 Adam Barth Reviewed by Eric Seidel. editing/pasteboard/paste-visible-script.html is broken with --html5-treebuilder https://bugs.webkit.org/show_bug.cgi?id=44457 Turns out there are two more checks we need for fragment scripting permission. Not the most beautiful design, but it seems work. * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertScriptElement): * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndTag): 2010-08-23 Eric Seidel Reviewed by Adam Barth. fast/dom/script-innerHTML-x.xhtml fails when run with the HTML5 TreeBuilder in fragment mode https://bugs.webkit.org/show_bug.cgi?id=44447 This special handling for script/style used to exist in setInnerHTML. HTML5 moves this logic into the HTML and XML parsers instead of in setInnerHTML. In order to share this logic between WebKit's two XML parsers I had to clean up a bit of the libxml2 parser and add a new appendFragmentSource method. Covered by fast/dom/script-innerHTML-x.xhtml. * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::end): - Now that libxml2 is calling finish() for fragments (Qt already was) I went through and removed this unneeded style update after fragment parsing. (WebCore::XMLDocumentParser::parseDocumentFragment): - Yay for shared code! - This is where I added the style/script hack moved from setInnerHTML. * dom/XMLDocumentParser.h: - Fix indent. * dom/XMLDocumentParserLibxml2.cpp: - Removed parseDocumentFragment and moved necessary libxml-specific logic into appendFragmentSource. (WebCore::XMLDocumentParser::appendFragmentSource): * dom/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::appendFragmentSource): 2010-08-23 Kenneth Russell Reviewed by Dimitri Glazkov. Remove references to ArrayBuffer and ArrayBufferView from GraphicsContext3D https://bugs.webkit.org/show_bug.cgi?id=44455 Updated Safari, Qt and Chromium WebGL ports to avoid referencing ArrayBuffer and ArrayBufferView types from GraphicsContext3D. Ran all WebGL layout tests; no new regressions. Built and tested WebKit on Mac OS X; built Chromium on Mac OS X and Linux. * html/canvas/WebGLBuffer.cpp: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::bufferData): (WebCore::WebGLRenderingContext::bufferSubData): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::texSubImage2D): (WebCore::WebGLRenderingContext::simulateVertexAttrib0): * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::extractTextureData): * platform/graphics/GraphicsContext3D.h: * platform/graphics/chromium/GLES2Canvas.cpp: (WebCore::GLES2Canvas::getQuadVertices): * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::bufferSubData): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::bufferSubData): 2010-08-20 Stephen White Reviewed by Kenneth Russell. [CHROMIUM] Fix some failing layout tests w/ACCELERATED_2D_CANVAS https://bugs.webkit.org/show_bug.cgi?id=44346 LayoutTests/fast/canvas/canvas-incremental-repaint.html (top middle pane). Failing because we were not applying the CTM in clearRect(). Now using the fast path when the CTM is identity, and a fillRect() for the rest. LayoutTests/fast/canvas/canvas-strokeRect.html LayoutTests/fast/canvas/shadow-offset-[1-7].html Failing because we weren't switching to the software path when a shadow is present. Also refactor the two versions of fillRect(), and use TRIANGLE_STRIP strip instead of TRIANGLES, which lets us get rid of the element array and use drawArrays() instead of drawElements(). Covered by the above layout tests. * platform/graphics/chromium/GLES2Canvas.cpp: (WebCore::GLES2Canvas::GLES2Canvas): (WebCore::GLES2Canvas::~GLES2Canvas): Remove m_quadIndices (now unused). (WebCore::GLES2Canvas::clearRect): Use a glClear() fast path for the identity-CTM clear, and fillRect() for the rest. (WebCore::GLES2Canvas::fillRect): Refactor the two versions of fillRect(). (WebCore::GLES2Canvas::drawTexturedRect): (WebCore::GLES2Canvas::drawTexturedRectTile): Get rid of the ELEMENT_ARRAY_BUFFER bind. Use drawArrays() instead of drawElements(). (WebCore::GLES2Canvas::getQuadVertices): Re-order the vertices so they form a triangle strip. * platform/graphics/chromium/GLES2Canvas.h: Remove m_quadIndices (now unused). * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::fillRect): Check for a draw looper (shadow), and drop to the software path. 2010-08-23 Patrick Gansterer Reviewed by Adam Roben. Move filehandling into fileLoadTimer callback https://bugs.webkit.org/show_bug.cgi?id=43714 Also add mimetype detection for local files. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/win/ResourceHandleWin.cpp: (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::fileLoadTimer): 2010-08-23 Iain Merrick Reviewed by Steve Block. Update JNI bridge for V8 after renaming of JavaString::utf8(). https://bugs.webkit.org/show_bug.cgi?id=44419 This fixes the build on Android. No new functionality, so no new tests. * bridge/jni/v8/JNIBridgeV8.cpp: (JavaField::JavaField): * bridge/jni/v8/JNIBridgeV8.h: (JSC::Bindings::JavaField::type): * bridge/jni/v8/JavaClassV8.cpp: (JavaClass::JavaClass): * bridge/jni/v8/JavaNPObjectV8.cpp: (JSC::Bindings::JavaNPObjectGetProperty): * bridge/jni/v8/JavaStringV8.h: (JSC::Bindings::JavaStringImpl::utf8): 2010-08-23 Mihai Parparita Reviewed by David Hyatt. Assertion failure in FrameView::layout when modifying the DOM during pagehide with PageCache enabled https://bugs.webkit.org/show_bug.cgi?id=43152 Always unschedule any pending relayouts when changing the view, not just when we're not using the page cache. Otherwise touching the DOM during the pagehide handler can lead to layouts that will be done by the time the view has changed, which triggers an assert. Test: fast/loader/unschedule-relayout-after-unload.html * page/Frame.cpp: (WebCore::Frame::setView): move unscheduleRelayout outside page cache check. * page/FrameView.cpp: (WebCore::FrameView::layout): remove early return now that assert should be correct (and the referenced rdar:// got fixed). 2010-08-23 Abhishek Arya Reviewed by Dimitri Glazkov. Fix security origin calculation in createPattern. Need to use cachedImage->response().url() instead of cachedImage->url(). https://bugs.webkit.org/show_bug.cgi?id=44399. Test: http/tests/security/canvas-remote-read-remote-image-redirect.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createPattern): 2010-08-23 Simon Fraser Reviewed by Alexey Proskuryakov. TreeWalker is not calling acceptNode function in filter object https://bugs.webkit.org/show_bug.cgi?id=35296 We only accepted raw functions as the NodeFilter on TreeWalker. Fix this to look for an 'acceptNode' function on the filter object, and use that if present. Also throw an exception if the filter object does not have an acceptNode function. Test: fast/dom/TreeWalker/acceptNode-filter.html * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::acceptNode): 2010-08-23 Sheriff Bot Unreviewed, rolling out r65814. http://trac.webkit.org/changeset/65814 https://bugs.webkit.org/show_bug.cgi?id=44443 broke svg/custom/missing-xlink.svg (Requested by kling on #webkit). * dom/Element.cpp: (WebCore::Element::setAttributeNS): 2010-08-23 Jian Li Reviewed by Darin Fisher. Handle blob resource. https://bugs.webkit.org/show_bug.cgi?id=43941 To provide lower level blob reosurce handling for all possible ports, BlobResourceHandle derived from ResourceHandle is implemented. It provides both synchronous and asynchronous resource loading for blob URL. BlobResourceHandle needs to create a FileStreamProxy instance in order to asynchronous file stream operation. To achive this, a hook createAsyncFileStream is added to ResourceHandleClient interface. When ResourceLoader implements ths hook, it creates and returns FileStreamProxy. BlobResourceHandle.* is not added to chromium port since it will implement its own blob resource handling. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::createAsyncFileStream): Create and return FileStreamProxy. * loader/ResourceLoader.h: * page/SecurityOrigin.cpp: Add the support to get and validate the origin of blob URL. (WebCore::SecurityOrigin::create): (WebCore::SecurityOrigin::canLoad): * platform/network/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::appendStorageItems): Fix a bug that the length is not subtracted. * platform/network/BlobResourceHandle.cpp: Added. * platform/network/BlobResourceHandle.h: Added. * platform/network/HTTPParsers.cpp: (WebCore::parseRange): * platform/network/HTTPParsers.h: * platform/network/ResourceHandle.cpp: Hook up with asynchronous blob resource handling. (WebCore::ResourceHandle::create): * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::createAsyncFileStream): Add a hook. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::loadResourceSynchronously): Hook up with synchronous blob resource handling. 2010-08-23 Jian Li Reviewed by David Levin. Remove unneeded BlobRegistryImpl.* and WebBlobRegistryImpl.* from chromium project files. https://bugs.webkit.org/show_bug.cgi?id=44442 * WebCore.gypi: 2010-08-23 Adam Barth Reviewed by Eric Seidel. Many LayoutTests crash when run with --html5-treebuilder https://bugs.webkit.org/show_bug.cgi?id=44440 Our list of special tags is out of sync with the HTML5 spec. This patch adds HTML to the list, which fixs a ton of crashers when parsing fragments. We neet to sync up the list at some point, but we want to make sure we have test coverage for all those changes, so I've left that for a future patch. * html/HTMLTreeBuilder.cpp: 2010-08-23 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: Context menu in Scripts panel was broken. https://bugs.webkit.org/show_bug.cgi?id=44431 * inspector/InspectorFrontendHost.cpp: (WebCore::FrontendMenuProvider::contextMenuItemSelected): (WebCore::FrontendMenuProvider::contextMenuCleared): 2010-08-23 Andreas Kling Reviewed by Tor Arne Vestbø. setAttributeNS() should throw NAMESPACE_ERR for prefixed qualifiedName with null namespace https://bugs.webkit.org/show_bug.cgi?id=44432 Test: fast/dom/setAttributeNS-prefix-and-null-namespace.html * dom/Element.cpp: (WebCore::Element::setAttributeNS): Throw NAMESPACE_ERR if namespace is null and the qualifiedName has a prefix. 2010-08-23 Ryuan Choi Reviewed by Antonio Gomes. [EFL] rendering was broken when missing plugin. https://bugs.webkit.org/show_bug.cgi?id=43395 Implement RenderThemeEfl::systemFont to render "Missing plugin" when we don't have proper plugin. In this case, RenderEmbeddedObject::paintReplaced call systemFont and pass returned font to GraphicsContext. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::setDefaultFontSize): (WebCore::RenderThemeEfl::systemFont): * platform/efl/RenderThemeEfl.h: 2010-08-23 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: remove javascript breakpoint specific code from BreakpointSidebarPane https://bugs.webkit.org/show_bug.cgi?id=44327 * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype.restoredBreakpoint): (WebInspector.BreakpointManager.prototype._setBreakpoint): (WebInspector.BreakpointManager.prototype._removeBreakpoint): (WebInspector.BreakpointManager.prototype._setBreakpointOnBackend): (WebInspector.Breakpoint): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.BreakpointsSidebarPane): (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint): (WebInspector.BreakpointsSidebarPane.prototype._breakpointRemoved): (WebInspector.JSBreakpointItem): (WebInspector.JSBreakpointItem.prototype.compareTo): (WebInspector.JSBreakpointItem.prototype.element): (WebInspector.JSBreakpointItem.prototype._breakpointClicked): (WebInspector.JSBreakpointItem.prototype._checkboxClicked): (WebInspector.JSBreakpointItem.prototype._enableChanged): (WebInspector.JSBreakpointItem.prototype._textChanged): (WebInspector.JSBreakpointItem.prototype._removed): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype._breakpointAdded): (WebInspector.ScriptsPanel.prototype._breakpointRemoved): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.addBreakpoint): (WebInspector.SourceFrame.prototype._addBreakpointToSource): 2010-08-23 Ilya Tikhonovsky Reviewed by Yury Semikhatsky. WebInspector: inspector protocol should be switched from array based message format to object based message format. Almost all the protocol related things is generated by CodeGeneratorInspector.pm It was changed a bit. As result InspectorBackendStub.js wraps the calls into Request objects. InspectorBackendDispatcher.cpp unwraps these objects and calls corresponding agents. These two files and RemoteInspectorFrontend are generated by CodeGeneratorInspector.pm Dispatching part of WebInspector also was adjusted for handling Event objects produced by RemoteInspectorFrontend.cpp and Response objects produced by InspectorBackendDispatcher.cpp https://bugs.webkit.org/show_bug.cgi?id=44338 * inspector/CodeGeneratorInspector.pm: * inspector/Inspector.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::setAttachedWindow): * inspector/InspectorController.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::setAttachedWindow): * inspector/InspectorValues.h: (WebCore::InspectorObject::find): * inspector/front-end/Callback.js: (WebInspector.Callback.prototype.processResponse): * inspector/front-end/inspector.js: (WebInspector.dispatch): (WebInspector_syncDispatch): (WebInspector.dispatchMessageFromBackend): (WebInspector.reportProtocolError): 2010-08-19 Jeremy Orlow Reviewed by Steve Block. Remove IDBDatabase.description per spec changes https://bugs.webkit.org/show_bug.cgi?id=44264 There's now no longer any way to access the description from JS. The main premise of the manual test is now obsolete. Over time we'll be able to add to it again. While I'm at it, I cleaned up the format of the manual test to be easier to follow (code and usage wise). * manual-tests/indexed-database.html: * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::IDBDatabase): * storage/IDBDatabase.h: * storage/IDBDatabase.idl: 2010-08-23 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: element's css: pseudo-class locations https://bugs.webkit.org/show_bug.cgi?id=44344 Also contains a drive-by fix for 44301 (gray out read-only). * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update.computedStyleCallback): (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): (WebInspector.StylePropertiesSection): 2010-08-23 Sheriff Bot Unreviewed, rolling out r65803. http://trac.webkit.org/changeset/65803 https://bugs.webkit.org/show_bug.cgi?id=44416 windows build failed (Requested by loislo on #webkit). * inspector/CodeGeneratorInspector.pm: * inspector/Inspector.idl: * inspector/InspectorController.cpp: * inspector/InspectorController.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::setAttachedWindow): * inspector/InspectorValues.h: * inspector/front-end/Callback.js: (WebInspector.Callback.prototype.processResponse): * inspector/front-end/inspector.js: (WebInspector.dispatch.delayDispatch): (WebInspector.dispatch): (WebInspector_syncDispatch): (WebInspector.dispatchMessageFromBackend): (WebInspector.reportProtocolError): 2010-08-23 Ilya Tikhonovsky Reviewed by Yury Semikhatsky. WebInspector: inspector protocol should be switched from array based message format to object based message format. Almost all the protocol related things is generated by CodeGeneratorInspector.pm It was changed a bit. As result InspectorBackendStub.js wraps the calls into Request objects. InspectorBackendDispatcher.cpp unwraps these objects and calls corresponding agents. These two files and RemoteInspectorFrontend are generated by CodeGeneratorInspector.pm Dispatching part of WebInspector also was adjusted for handling Event objects produced by RemoteInspectorFrontend.cpp and Response objects produced by InspectorBackendDispatcher.cpp https://bugs.webkit.org/show_bug.cgi?id=44338 * inspector/CodeGeneratorInspector.pm: * inspector/Inspector.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::setAttachedWindow): * inspector/InspectorController.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::setAttachedWindow): * inspector/InspectorValues.h: (WebCore::InspectorObject::find): * inspector/front-end/Callback.js: (WebInspector.Callback.prototype.processResponse): * inspector/front-end/inspector.js: (WebInspector.dispatch): (WebInspector_syncDispatch): (WebInspector.dispatchMessageFromBackend): (WebInspector.reportProtocolError): 2010-08-23 Alejandro G. Castro Reviewed by Xan Lopez. Make the copy of the inspector files silent. * GNUmakefile.am: 2010-08-23 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] -webkit-text-stroke is broken due to Qt::TextBypassShaping https://bugs.webkit.org/show_bug.cgi?id=44403 Don't bypass the Harfbuzz shaping if we're drawing text with a stroke. For canvas, always use complex text shaping since stroke and fill are decoupled. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::measureText): (WebCore::CanvasRenderingContext2D::drawTextInternal): * platform/graphics/qt/FontQt.cpp: (WebCore::drawTextCommon): 2010-08-23 Mikhail Naganov Reviewed by Pavel Feldman. Extract profiler-related code and data from InspectorController into InspectorProfilerAgent. https://bugs.webkit.org/show_bug.cgi?id=44174 * CMakeLists.txt: * GNUmakefile.am: * WebCore.exp.in: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/ScriptProfiler.cpp: (WebCore::ScriptProfiler::isProfilerAlwaysEnabled): * bindings/js/ScriptProfiler.h: * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::isProfilerAlwaysEnabled): * bindings/v8/ScriptProfiler.h: * inspector/CodeGeneratorInspector.pm: * inspector/Inspector.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::populateScriptObjects): (WebCore::InspectorController::didCommitLoad): (WebCore::InspectorController::addProfile): (WebCore::InspectorController::addProfileFinishedMessageToConsole): (WebCore::InspectorController::addStartProfilingMessageToConsole): (WebCore::InspectorController::isRecordingUserInitiatedProfile): (WebCore::InspectorController::getCurrentUserInitiatedProfileName): (WebCore::InspectorController::startUserInitiatedProfiling): (WebCore::InspectorController::stopUserInitiatedProfiling): (WebCore::InspectorController::profilerEnabled): (WebCore::InspectorController::enableProfiler): (WebCore::InspectorController::disableProfiler): * inspector/InspectorController.h: (WebCore::InspectorController::profilerAgent): * inspector/InspectorProfilerAgent.cpp: Added. (WebCore::InspectorProfilerAgent::create): (WebCore::InspectorProfilerAgent::InspectorProfilerAgent): (WebCore::InspectorProfilerAgent::~InspectorProfilerAgent): (WebCore::InspectorProfilerAgent::addProfile): (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole): (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole): (WebCore::InspectorProfilerAgent::createProfileHeader): (WebCore::InspectorProfilerAgent::disable): (WebCore::InspectorProfilerAgent::enable): (WebCore::InspectorProfilerAgent::getCurrentUserInitiatedProfileName): (WebCore::InspectorProfilerAgent::getProfileHeaders): (WebCore::InspectorProfilerAgent::getProfile): (WebCore::InspectorProfilerAgent::removeProfile): (WebCore::InspectorProfilerAgent::resetState): (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling): (WebCore::InspectorProfilerAgent::stopUserInitiatedProfiling): (WebCore::InspectorProfilerAgent::toggleRecordButton): * inspector/InspectorProfilerAgent.h: Added. (WebCore::InspectorProfilerAgent::clearProfiles): (WebCore::InspectorProfilerAgent::enabled): (WebCore::InspectorProfilerAgent::isRecordingUserInitiatedProfile): (WebCore::InspectorProfilerAgent::setRemoteFrontend): (WebCore::InspectorProfilerAgent::startProfiling): (WebCore::InspectorProfilerAgent::stopProfiling): 2010-08-23 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Crash when purging the scratch buffer for the shadow https://bugs.webkit.org/show_bug.cgi?id=44384 WebCore::Timer can't be used in a static object bcause it relies on thread global data, which is invalid once the application instance is destroyed. To overcome the problem, use QObject's timer support for the ShadowBuffer class. * platform/graphics/qt/ContextShadow.cpp: (WebCore::): (WebCore::ShadowBuffer::ShadowBuffer): (WebCore::ShadowBuffer::schedulePurge): (WebCore::ShadowBuffer::timerEvent): 2010-08-23 Philippe Normand Reviewed by Xan Lopez. [GStreamer] don't expose the private player in GStreamerGWorld https://bugs.webkit.org/show_bug.cgi?id=44332 Only a pointer to our playbin2 element instance is required instead of the whole MediaPlayerPrivateGStreamer instance. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::GStreamerGWorld::createGWorld): (WebCore::GStreamerGWorld::GStreamerGWorld): (WebCore::GStreamerGWorld::~GStreamerGWorld): (WebCore::GStreamerGWorld::enterFullscreen): (WebCore::GStreamerGWorld::exitFullscreen): * platform/graphics/gstreamer/GStreamerGWorld.h: (WebCore::GStreamerGWorld::pipeline): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): 2010-08-22 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] GraphicsContext: Simplify getting the clip bounding rect https://bugs.webkit.org/show_bug.cgi?id=44396 Move the Qt 4.8 version check for QPainter::clipBoundingRect() into a GraphicsContextPlatformPrivate method. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::clipBoundingRect): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipOutEllipseInRect): 2010-08-22 Juha Savolainen Reviewed by Kenneth Rohde Christiansen. [Qt] Add QTouchEvents support for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=44330 This patch adds support for QTouchEvents in WebKit2. A new WebEvent-class is created for touchevents, WebTouchEvent. Also touchpoints needed a new class, WebPlatformTouchPoint. This is similar solution like in other events(like MouseEvent) on WebKit2. These classes are introduced in WebEvent.h Also there was a need to create an empty constructor to PlatformTouchPoint-class. * platform/PlatformTouchPoint.h: (WebCore::PlatformTouchPoint::PlatformTouchPoint): 2010-08-22 Daniel Bates Reviewed by Eric Seidel. Encapsulate document marker management into DocumentMarkerController https://bugs.webkit.org/show_bug.cgi?id=44383 Moves the document marker management code in Document.cpp into its own class called DocumentMarkerController. No functionality was changed, so no new tests. * Android.mk: Added DocumentMarkerController.cpp * CMakeLists.txt: Ditto. * GNUmakefile.am: Added DocumentMarkerController.cpp and DocumentMarkerController.h. * WebCore.exp.in: Substituted symbols __ZN7WebCore24DocumentMarkerController13removeMarkersENS_14DocumentMarker10MarkerTypeE and __ZN7WebCore24DocumentMarkerController23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE for __ZN7WebCore8Document13removeMarkersENS_14DocumentMarker10MarkerTypeE and __ZN7WebCore8Document23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE, respectively. * WebCore.gypi: Added DocumentMarkerController.cpp and DocumentMarkerController.h. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * dom/Document.cpp: (WebCore::Document::removedLastRef): Modified to call DocumentMarkerController::detach(). (WebCore::Document::~Document): Removed "deleteAllValues(m_markers)" as DocumentMarkerController is stored in OwnPtr; so it will be destroyed automatically on Document destruction. (WebCore::Document::textInserted): Modified to use marker controller. (WebCore::Document::textRemoved): Ditto. * dom/Document.h: (WebCore::Document::markers): Added. * dom/DocumentMarkerController.cpp: Added. (WebCore::placeholderRectForMarker): (WebCore::DocumentMarkerController::detach): (WebCore::DocumentMarkerController::addMarker): (WebCore::DocumentMarkerController::removeMarkers): (WebCore::DocumentMarkerController::copyMarkers): (WebCore::DocumentMarkerController::markerContainingPoint): (WebCore::DocumentMarkerController::markersForNode): (WebCore::DocumentMarkerController::renderedRectsForMarkers): (WebCore::DocumentMarkerController::repaintMarkers): (WebCore::DocumentMarkerController::setRenderedRectForMarker): (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect): (WebCore::DocumentMarkerController::shiftMarkers): (WebCore::DocumentMarkerController::setMarkersActive): * dom/DocumentMarkerController.h: Added. (WebCore::DocumentMarkerController::~DocumentMarkerController): * editing/Editor.cpp: (WebCore::Editor::ignoreSpelling): Modified to use marker controller. (WebCore::findFirstMisspellingInRange): Ditto. (WebCore::findFirstGrammarDetailInRange): Ditto. (WebCore::Editor::advanceToNextMisspelling): Ditto. (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Ditto. (WebCore::Editor::changeBackToReplacedString): Ditto. * editing/SplitTextNodeCommand.cpp: (WebCore::SplitTextNodeCommand::doApply): Ditto. (WebCore::SplitTextNodeCommand::doUnapply): Ditto. * page/Frame.cpp: (WebCore::Frame::markAllMatchesForText): Ditto. (WebCore::Frame::setMarkedTextMatchesAreHighlighted): Ditto. (WebCore::Frame::respondToChangedSelection): Ditto. * page/FrameView.cpp: (WebCore::FrameView::getTickmarks): Ditto. (WebCore::FrameView::paintContents): Ditto. * page/Page.cpp: (WebCore::Page::unmarkAllTextMatches): Ditto. * rendering/HitTestResult.cpp: (WebCore::HitTestResult::spellingToolTip): Ditto. (WebCore::HitTestResult::replacedString): Ditto. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto. (WebCore::InlineTextBox::paintTextMatchMarker): Ditto. (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto. (WebCore::InlineTextBox::paintDocumentMarkers): Ditto. * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::computeTextMatchMarkerRect): Ditto. 2010-08-22 Jian Li Reviewed by Darin Fisher. Add the blob URL member to FormData. https://bugs.webkit.org/show_bug.cgi?id=44387 This is in preparation to switch blob implementation to using BlobData model. When a blob is added to a FormData, it is represented as a blob URL in the list. * platform/network/FormData.cpp: (WebCore::FormData::appendBlob): * platform/network/FormData.h: (WebCore::FormDataElement::FormDataElement): (WebCore::FormDataElement::): (WebCore::operator==): 2010-08-22 Eric Seidel Reviewed by Adam Barth. HTML5 TreeBuilder builds wrong DOM for
https://bugs.webkit.org/show_bug.cgi?id=44390 The HTML5 spec has changed since Adam and I original wrote the HTMLTreeBuilder. Most important for this change was resolution of: http://www.w3.org/Bugs/Public/show_bug.cgi?id=9580 I also removed our "phrasing" tag support since that was also removed from the spec as part of other bug fixes. This is tested by tonyg's
test in adoption01.dat. * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement): (WebCore::HTMLTreeBuilder::processEndTag): 2010-08-22 Andreas Kling Reviewed by Ariya Hidayat. [Qt] TransparencyLayer: Always use anti-aliasing and smooth pixmap transform https://bugs.webkit.org/show_bug.cgi?id=44394 * platform/graphics/qt/TransparencyLayer.h: (WebCore::TransparencyLayer::TransparencyLayer): Set the Antialiasing and SmoothPixmapTransforms render hints for all TransparencyLayers. 2010-08-22 Andreas Kling Reviewed by Ariya Hidayat. [Qt] Gradient: Support inner radius larger than outer radius https://bugs.webkit.org/show_bug.cgi?id=44392 * platform/graphics/qt/GradientQt.cpp: (WebCore::Gradient::platformGradient): Reverse the (radial) gradient if r0 > r1. 2010-08-22 Ariya Hidayat Reviewed by Dirk Schulze. [Qt] Layer approach to support generic shadow handling https://bugs.webkit.org/show_bug.cgi?id=44380 The pair beginShadowLayer and endShadowLayer creates a temporary image where the caller can draw onto, using the returned QPainter. When endShadowLayer is called, the temporary image will be filtered, using the specified shadow color and blur radius, and drawn to the graphics context. * platform/graphics/GraphicsContext.h: * platform/graphics/qt/ContextShadow.cpp: (WebCore::ContextShadow::beginShadowLayer): (WebCore::ContextShadow::endShadowLayer): * platform/graphics/qt/ContextShadow.h: * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::contextShadow): 2010-08-21 Eric Carlson Reviewed by Dan Bernstein. Media engine should not be asked to open all urls https://bugs.webkit.org/show_bug.cgi?id=44370 * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): Do nothing with urls with a type attribute that would be rejected by canPlayType(). 2010-08-21 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Faster bounding rect for the shadow clip region https://bugs.webkit.org/show_bug.cgi?id=44369 Like in r65650, we should use the faster QPainter::clipBoundingRect when it is available. * platform/graphics/qt/ContextShadow.cpp: (WebCore::ContextShadow::drawShadowRect): 2010-08-20 Girish Ramakrishnan Reviewed by Ariya Hidayat. [Qt] When using the raster graphics system on Maemo5, allow Flash to render directly into the raster window surface. wmode=transparent is now supported as a result of this change. https://bugs.webkit.org/show_bug.cgi?id=44043 * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::paintUsingImageSurfaceExtension): 2010-08-20 Alexey Proskuryakov Reviewed by Brady Eidson. https://bugs.webkit.org/show_bug.cgi?id=38428 HTTP code 500 (and other non-4xx codes) wrongfully treated as success for subresources Test: http/tests/misc/script-500.html * loader/loader.cpp: (WebCore::Loader::Host::didReceiveData): Treat all HTTP codes >= 400 as error ones, since they are. 2010-08-20 Tony Gentilcore Reviewed by Adam Barth. Crash in WebCore::Node::createRendererIfNeeded() https://bugs.webkit.org/show_bug.cgi?id=44129 * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): Factor out core bit to insertBetween. (WebCore::ContainerNode::insertBetween): Factored out of insertBefore. (WebCore::ContainerNode::parserInsertBefore): Similar to insertBefore, but doesn't handle reparenting or dispatch DOM mutation events. (WebCore::ContainerNode::removeChild): Factor out core bit to removeBetween. (WebCore::ContainerNode::removeBetween): Facotred out of removeChild. (WebCore::ContainerNode::parserRemoveChild): Similar to removeChild, but doesn't handle reparenting or dispatch DOM mutation events. (WebCore::ContainerNode::addChildCommon): (WebCore::ContainerNode::parserAddChild): (WebCore::ContainerNode::legacyParserAddChild): * dom/ContainerNode.h: * dom/Node.cpp: (WebCore::Node::parserRemoveChild): (WebCore::Node::parserInsertBefore): * dom/Node.h: * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attach): (WebCore::HTMLConstructionSite::attachAtSite): Use new parserInsertBefore. * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::passTokenToLegacyParser): (WebCore::HTMLTreeBuilder::reparentChildren): (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): Was missing a key bit from the spec about removing the old parent if it exists. 2010-08-20 Kinuko Yasuda Unreviewed; build fix. Had included wrong version of build file. 2010-08-20 Martin Robinson Reviewed by Joseph Pecoraro. [GTK] Inspector extensions tests fail on GTK+ bots because onSelectionChanged is missing https://bugs.webkit.org/show_bug.cgi?id=44342 * GNUmakefile.am: Fix dependency tracking for copied web inspector files. 2010-08-20 Kinuko Yasuda Reviewed by Darin Fisher. Add Callback implementation for FileSystem API https://bugs.webkit.org/show_bug.cgi?id=44349 No new tests; tests will be added later. * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * storage/FileSystemCallbacks.cpp: Added. * storage/FileSystemCallbacks.h: Added. * storage/EntryCallback.h: Nits fix * storage/FileSystemCallback.h: Nits fix 2010-08-20 Andreas Kling Reviewed by Ariya Hidayat. [Qt] WebKit does not compile with --3d-canvas https://bugs.webkit.org/show_bug.cgi?id=44335 - PlatformGLObject => Platform3DObject - Implemented getAttachedShaders() - Implemented bufferData() and bufferSubData() for ArrayBuffer* - Removed reference to nonexistent variable in getImageData() * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3D::attachShader): (WebCore::GraphicsContext3D::getAttachedShaders): (WebCore::GraphicsContext3D::bindAttribLocation): (WebCore::GraphicsContext3D::bindBuffer): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::bindRenderbuffer): (WebCore::GraphicsContext3D::bindTexture): (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::bufferSubData): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::detachShader): (WebCore::GraphicsContext3D::framebufferRenderbuffer): (WebCore::GraphicsContext3D::framebufferTexture2D): (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::getActiveUniform): (WebCore::GraphicsContext3D::getAttribLocation): (WebCore::GraphicsContext3D::isBuffer): (WebCore::GraphicsContext3D::isFramebuffer): (WebCore::GraphicsContext3D::isProgram): (WebCore::GraphicsContext3D::isRenderbuffer): (WebCore::GraphicsContext3D::isShader): (WebCore::GraphicsContext3D::isTexture): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::shaderSource): (WebCore::GraphicsContext3D::useProgram): (WebCore::GraphicsContext3D::validateProgram): (WebCore::GraphicsContext3D::getProgramiv): (WebCore::GraphicsContext3D::getProgramInfoLog): (WebCore::GraphicsContext3D::getShaderiv): (WebCore::GraphicsContext3D::getShaderInfoLog): (WebCore::GraphicsContext3D::getShaderSource): (WebCore::GraphicsContext3D::getUniformfv): (WebCore::GraphicsContext3D::getUniformiv): (WebCore::GraphicsContext3D::getUniformLocation): (WebCore::GraphicsContext3D::getImageData): * platform/graphics/qt/GraphicsLayerQt.h: 2010-08-20 Dan Bernstein Reviewed by Dave Kilzer. #ifdef-out some Leopard-and-earlier code. * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): 2010-08-20 Kenneth Russell Unreviewed, speculative Chromium build fix. Forward declare IntSize in WebGLRenderingContext.h and include IntSize.h in .cpp. * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.h: 2010-08-20 Eric Carlson Reviewed by Dan Bernstein. Media element canPlayType("application/octet-stream") not handled correctly https://bugs.webkit.org/show_bug.cgi?id=44343 Test: media/media-can-play-octet-stream.html * platform/graphics/MediaPlayer.cpp: (WebCore::applicationOctetStream): New, accessor for static string used more than once. (WebCore::textPlain): Ditto. (WebCore::codecs): Ditto. (WebCore::chooseBestEngineForTypeAndCodecs): Special case "application/octet-stream". (WebCore::MediaPlayer::load): Use static static string methods. (WebCore::MediaPlayer::supportsType): Special case "application/octet-stream". 2010-08-20 Adrienne Walker Reviewed by Kenneth Russell. Implement HTMLVideoElement support for texImage2D and texSubImage2D https://bugs.webkit.org/show_bug.cgi?id=33852 Test: fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContext): (WebCore::WebGLRenderingContext::videoFrameToImage): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::texSubImage2D): (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache): (WebCore::WebGLRenderingContext::LRUImageBufferCache::imageBuffer): (WebCore::WebGLRenderingContext::LRUImageBufferCache::bubbleToFront): * html/canvas/WebGLRenderingContext.h: 2010-08-20 Dumitru Daniliuc Reviewed by Adam Barth. Removing an incorrect ASSERT. https://bugs.webkit.org/show_bug.cgi?id=44151 A failure in the preflight step of a transaction wrapper does not guarantee that the transaction is rolled back (and it shouldn't). Test: storage/change-version-no-crash-on-preflight-failure.html * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::openTransactionAndPreflight): 2010-08-20 David Leong Reviewed by Laszlo Gombos. [Qt] Update Symbian capabilities to remove AllFiles and DRM Add CONFIG(production) variation for set of DLL capabilities. DRM and AllFiles capabilities need to be audited for the sis package to be signed. No new tests. * WebCore.pro: Updated Symbian Capabilities. 2010-08-20 Joseph Pecoraro Reviewed by David Kilzer. Do Not Copy Subversion Related Files in Inspector Build Phase https://bugs.webkit.org/show_bug.cgi?id=44353 * WebCore.xcodeproj/project.pbxproj: remove .svn directories in the "Copy Inspector Resources" build phase. 2010-08-19 Ryosuke Niwa Reviewed by Adam Barth. style correction in markup.cpp https://bugs.webkit.org/show_bug.cgi?id=44318 Make markup.cpp pass check-webkit-style. No new tests are added since this is a cleanup. * editing/markup.cpp: (WebCore::MarkupAccumulator::appendAttributeValue): (WebCore::appendEscapedContent): (WebCore::MarkupAccumulator::appendStartMarkup): (WebCore::completeURLs): (WebCore::isElementPresentational): (WebCore::isSpecialAncestorBlock): (WebCore::shouldIncludeWrapperForFullySelectedRoot): (WebCore::createMarkup): (WebCore::fillContainerFromString): (WebCore::createFragmentFromText): (WebCore::createFragmentFromNodes): 2010-08-20 Tony Chang Reviewed by Adam Barth. crash when trying to access a stale Node pointer in FocusController::setFocusedNode https://bugs.webkit.org/show_bug.cgi?id=44226 Test: fast/events/focus-change-crash2.html * page/FocusController.cpp: (WebCore::FocusController::setFocusedNode): add a ref to prevent the focused node from being deleted 2010-08-20 Simon Fraser Reviewed by Dan Bernstein. backface-visibility and reflections don't play nicely together. On elements with a reflection and backface-visibility: hidden, set the doubleSided property on the reflection flattening layer so that backface-visibility works in all configurations. Test: compositing/reflections/backface-hidden-reflection.html * platform/graphics/mac/GraphicsLayerCA.mm: (WebCore::GraphicsLayerCA::updateBackfaceVisibility): Call setDoubleSided: on the structural layer for reflections. (WebCore::GraphicsLayerCA::ensureStructuralLayer): Fix a comment typo, and call updateBackfaceVisibility() when we gain a structural layer. 2010-08-20 Simon Fraser Reviewed by Dan Bernstein. Slider labels do not update as you move the sliders on this page https://bugs.webkit.org/show_bug.cgi?id=41020 When repainting after layout in a multicol element, we need to adjust the repaint rect for the columns. Test: fast/repaint/multicol-repaint.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): 2010-08-20 Jian Li Reviewed by David Levin. Move FileStreamClient to platform and add AsyncFileStream interface. https://bugs.webkit.org/show_bug.cgi?id=44224 * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/FileStreamProxy.cpp: Account for the change. (WebCore::FileStreamProxy::FileStreamProxy): (WebCore::FileStreamProxy::stop): * html/FileStreamProxy.h: Make it derive from AsyncFileStream.h. * platform/AsyncFileStream.h: Added. * platform/FileStreamClient.h: Renamed from WebCore/html/FileStreamClient.h. 2010-08-20 Abhishek Arya Reviewed by Darin Fisher. Prevent use of stale notification presenter pointer in notifications by instead using a notification center pointer and deriving the presenter from it. Notification presenter gets properly destroyed using disconnectFrame function inside notification center. Add null checks for notification presenter. https://bugs.webkit.org/show_bug.cgi?id=43645 Test: fast/notifications/notifications-window-close-crash.html * notifications/Notification.cpp: (WebCore::Notification::Notification): (WebCore::Notification::create): (WebCore::Notification::show): (WebCore::Notification::cancel): (WebCore::Notification::contextDestroyed): (WebCore::Notification::finishLoading): * notifications/Notification.h: (WebCore::Notification::detachPresenter): * notifications/NotificationCenter.h: (WebCore::NotificationCenter::createHTMLNotification): (WebCore::NotificationCenter::createNotification): 2010-08-20 Martin Robinson Reviewed by Xan Lopez. r64526 broke the GTK+-3 build https://bugs.webkit.org/show_bug.cgi?id=44254 No new tests, as this is covered by manual-tests/cursor.html. * platform/gtk/CursorGtk.cpp: (WebCore::createPixmapFromBits): Added this method which turns the inline data structures into GdkPixmaps using Cairo and GDK-Cairo. (WebCore::createNamedCursor): Modified this method to use the new helper. * platform/gtk/CursorGtk.h: Changed all inline data structures to be unsigned char arrays (which Cairo requires). The progress cursor is known in X11 icon themes as "left_ptr_watch." This change to the name preserves the old behavior of taking this icon from the theme when available. It seems that this worked in the past due to a fluke or failure of the previous code. 2010-08-20 Martin Robinson Reviewed by Dirk Schulze. [Cairo] Eliminate full-surface copy from canvas.drawImage(...) https://bugs.webkit.org/show_bug.cgi?id=44190 Covered by canvas layout tests. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::drawsUsingCopy): Return false now. (WebCore::ImageBuffer::clip): Add a link to the bug which tracks this feature. (WebCore::ImageBuffer::draw): Construct the bitmap image without the full-surface copy. (WebCore::ImageBuffer::drawPattern): Ditto. 2010-08-20 Alejandro G. Castro Reviewed by Xan Lopez. [REGRESSION] r65608 broke gtk distcheck https://bugs.webkit.org/show_bug.cgi?id=44333 Define the inspector.html as a noinst_DATA intead of using the dir suffix, which is used for installation. * GNUmakefile.am: 2010-08-19 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: implement breaking on DOM node subtree mutations. https://bugs.webkit.org/show_bug.cgi?id=42886 Add two entries to Web Inspector DOM element context menu: 1. "Stop on subtree modifications": will break on adding/removing of any element which is a child of the DOM element 2. "Remove breakpoints": will remove all breakpoints associated with the DOM element * English.lproj/localizedStrings.js: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::breakProgram): * bindings/js/ScriptDebugServer.h: * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::breakProgram): (WebCore::ScriptDebugServer::breakProgramCallback): (WebCore::ScriptDebugServer::handleV8DebugEvent): * bindings/v8/ScriptDebugServer.h: * inspector/Inspector.idl: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::~InspectorDOMAgent): (WebCore::InspectorDOMAgent::discardBindings): (WebCore::InspectorDOMAgent::setDOMBreakpoint): (WebCore::InspectorDOMAgent::removeDOMBreakpoint): (WebCore::InspectorDOMAgent::didInsertDOMNode): (WebCore::InspectorDOMAgent::didRemoveDOMNode): (WebCore::InspectorDOMAgent::hasBreakpoint): (WebCore::InspectorDOMAgent::pauseOnBreakpoint): (WebCore::InspectorDOMAgent::updateSubtreeBreakpoints): * inspector/InspectorDOMAgent.h: * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu): * inspector/front-end/Settings.js: 2010-08-20 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: discard InjectedScript reference on ScriptState when clearing injected scripts https://bugs.webkit.org/show_bug.cgi?id=44328 Otherwise if the reference is not cleared we may remove InjectedScript from the map on InjectedScriptHost but keep it on ScriptState and try to reuse it later. * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::discardInjectedScript): * bindings/v8/V8HiddenPropertyName.h: * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::discardInjectedScript): (WebCore::InjectedScriptHost::injectedScriptFor): * inspector/InjectedScript.h: (WebCore::InjectedScript::scriptState): * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::discardInjectedScripts): * inspector/InjectedScriptHost.h: 2010-08-20 Nikolas Zimmermann Reviewed by Dirk Schulze. Clippers are rasterized, when applied to scaled target object https://bugs.webkit.org/show_bug.cgi?id=44325 Use SVGImageBufferTools logic for RenderSVGResourceClipper, just like RenderSVGResourceMasker/Gradient, to avoid pixelation, when the clipper is applied to a scaled target object, or when the document is scaled. Test: svg/clip-path/clip-path-pixelation.svg * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): (WebCore::RenderSVGResourceClipper::createClipData): * rendering/RenderSVGResourceClipper.h: 2010-08-20 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] Initialize GDK before loading plugins https://bugs.webkit.org/show_bug.cgi?id=44324 Attempt to call gdk_init_check() before loading any plugins. This prevents various crashes and freezes in Adobe's Flash plugin. * plugins/qt/PluginPackageQt.cpp: (WebCore::initializeGdkIfPossible): (WebCore::PluginPackage::load): 2010-08-20 Dan Bernstein Reviewed by Mark Rowe. Follow-up to r41020. No change in behavior, thus no new tests. * platform/graphics/mac/FontPlatformDataMac.mm: (WebCore::FontPlatformData::FontPlatformData): Asserted that the NSFont parameter is not nil, and removed nil check. (WebCore::FontPlatformData::setFont): Asserted that the NSFont parameter is not nil and that this is not the deleted value, and removed code to handle those cases. 2010-08-19 Vincent Scheib Reviewed by David Levin. [chromium] TilingData::tilePositionY has typo of X where Y should be used https://bugs.webkit.org/show_bug.cgi?id=44195 Corrected error, and rewrote functions to use for loop instead of recursion. Unit Tests added to WebKit/chromium/tests/TilingDataTest.cpp * platform/graphics/chromium/TilingData.cpp: (WebCore::TilingData::tilePositionX): (WebCore::TilingData::tilePositionY): 2010-08-19 Mihai Parparita Reviewed by Brady Eidson. Assertion failure when going back inside frame during onload https://bugs.webkit.org/show_bug.cgi?id=44217 Fix assertion failure when doing a history.back() within the main frame during onload of a child frame. This would happen when HISTORY_ALWAYS_ASYNC was set to 0, because we would only compare the current frame document sequence numbers when determining if we're in the same document, instead of also recursing over child frames. Test: fast/history/history-back-within-subframe-hash.html * history/HistoryItem.cpp: (WebCore::HistoryItem::hasSameDocuments): * history/HistoryItem.h: * loader/RedirectScheduler.cpp: (WebCore::RedirectScheduler::scheduleHistoryNavigation): 2010-08-19 Balazs Kelemen Reviewed by Antonio Gomes. [Qt] Fix cursor change propagation https://bugs.webkit.org/show_bug.cgi?id=44250 No functional change so new tests. Propagate the setCursor callback to the PageClient via the HostWindow instead of preassuming the concrete type of the ChromeClient (what was generally wrong and actually incompatible with WebKit2). * platform/qt/WidgetQt.cpp: (WebCore::Widget::setCursor): 2010-08-19 Vangelis Kokkevis Reviewed by Kenneth Russell. [chromium] Rearranging the accelerated compositing code such that the layer rendering logic now lives in the layer classes rather than the compositor. This lifts the restriction of having one texture per layer and significantly cleans up the compositor code. This change mostly resulted in a lot of code moving around files. Noteworthy changes include: * Made LayerChromium a proper based class for layers that mostly handles the updates to the layer properties and superlayer / sublayer updates. * Introduced a new layer type, ContentLayerChromium, which handles layers that require a GraphicsContext to render their content. * ImageLayerChromium and VideoLayerChromium now derive from ContentLayerChromium as they share the same shader and draw function. * Removed TransformLayerChromium as its functionality is now replaced by the base LayerChromium class. * Re-arranged the order in which the members of LayerChromium are defined in the header file to form a more reasonable logical grouping. * Changed LayerRendererChromium to use the shader creation and drawing methods defined in the layer classes. As a result, a lot of GL code was removed from the implementation file. * Eliminated randomly dispersed calls to check for GL errors by a macro (GLC) which allows turning error testing on/off with a single define (DEBUG_GL_CALLS defined in LayerRendererChromium.h) * Replaced the previous layer render loop with two traversals of the layer hierarchy, the first to update transforms and opacity values and the second to render the layers. Eliminated global Z sorting of all layers as it was wrong. https://bugs.webkit.org/show_bug.cgi?id=44148 Test: Verified that pages using the compositor and compositor layout tests have not regressed. * WebCore.gypi: * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::SharedValues::SharedValues): (WebCore::CanvasLayerChromium::SharedValues::~SharedValues): (WebCore::CanvasLayerChromium::updateContents): (WebCore::CanvasLayerChromium::draw): * platform/graphics/chromium/CanvasLayerChromium.h: (WebCore::CanvasLayerChromium::SharedValues::canvasShaderProgram): (WebCore::CanvasLayerChromium::SharedValues::shaderSamplerLocation): (WebCore::CanvasLayerChromium::SharedValues::shaderMatrixLocation): (WebCore::CanvasLayerChromium::SharedValues::shaderAlphaLocation): (WebCore::CanvasLayerChromium::SharedValues::initialized): * platform/graphics/chromium/ContentLayerChromium.cpp: Added. (WebCore::ContentLayerChromium::SharedValues::SharedValues): (WebCore::ContentLayerChromium::SharedValues::~SharedValues): (WebCore::ContentLayerChromium::create): (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::~ContentLayerChromium): (WebCore::ContentLayerChromium::updateContents): (WebCore::ContentLayerChromium::updateTextureRect): (WebCore::ContentLayerChromium::draw): * platform/graphics/chromium/ContentLayerChromium.h: Added. (WebCore::ContentLayerChromium::drawsContent): (WebCore::ContentLayerChromium::SharedValues::contentShaderProgram): (WebCore::ContentLayerChromium::SharedValues::shaderSamplerLocation): (WebCore::ContentLayerChromium::SharedValues::shaderMatrixLocation): (WebCore::ContentLayerChromium::SharedValues::shaderAlphaLocation): (WebCore::ContentLayerChromium::SharedValues::initialized): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::GraphicsLayerChromium): (WebCore::GraphicsLayerChromium::updateLayerPreserves3D): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::ImageLayerChromium): (WebCore::ImageLayerChromium::updateContents): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::loadShader): (WebCore::LayerChromium::SharedValues::SharedValues): (WebCore::LayerChromium::SharedValues::~SharedValues): (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::~LayerChromium): (WebCore::LayerChromium::createShaderProgram): (WebCore::LayerChromium::toGLMatrix): (WebCore::LayerChromium::drawTexturedQuad): (WebCore::LayerChromium::drawDebugBorder): (WebCore::LayerChromium::prepareForDraw): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::getSublayers): (WebCore::LayerChromium::setPosition): (WebCore::LayerChromium::contentsDirty): (WebCore::LayerChromium::drawsContent): (WebCore::LayerChromium::updateContents): (WebCore::LayerChromium::draw): (WebCore::LayerChromium::SharedValues::quadVerticesVbo): (WebCore::LayerChromium::SharedValues::quadElementsVbo): (WebCore::LayerChromium::SharedValues::maxTextureSize): (WebCore::LayerChromium::SharedValues::borderShaderProgram): (WebCore::LayerChromium::SharedValues::borderShaderMatrixLocation): (WebCore::LayerChromium::SharedValues::borderShaderColorLocation): (WebCore::LayerChromium::SharedValues::initialized): (WebCore::LayerChromium::layerRenderer): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::~LayerRendererChromium): (WebCore::LayerRendererChromium::debugGLCall): (WebCore::LayerRendererChromium::useShader): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::createLayerTexture): (WebCore::LayerRendererChromium::updateLayersRecursive): (WebCore::LayerRendererChromium::drawLayersRecursive): (WebCore::LayerRendererChromium::drawLayer): (WebCore::LayerRendererChromium::checkTextureSize): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::projectionMatrix): (WebCore::LayerRendererChromium::layerSharedValues): (WebCore::LayerRendererChromium::contentLayerSharedValues): (WebCore::LayerRendererChromium::canvasLayerSharedValues): * platform/graphics/chromium/TransformLayerChromium.cpp: Removed. * platform/graphics/chromium/TransformLayerChromium.h: Removed. * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::updateContents): (WebCore::VideoLayerChromium::createTextureRect): * platform/graphics/chromium/VideoLayerChromium.h: 2010-08-19 David Kilzer BUILD FIX: Fix Mac build after Windows WebKit2 changes for Netscape Plug-ins * WebCore.exp.in: (WebCore::ScrollView::contentsToWindow): Added export. 2010-08-19 David Kilzer BUILD FIX #3: Fix compilation with NETSCAPE_PLUGIN_API disabled Still trying to make Qt Linux Release minimal buildbot happy. * plugins/PluginViewNone.cpp: Compile missing methods for Qt. 2010-08-19 David Kilzer BUILD FIX: Fix compilation with NETSCAPE_PLUGIN_API disabled Reviewed by Joseph Pecoraro. * plugins/PluginView.cpp: Added #if ENABLE(NETSCAPE_PLUGIN_API) and #endif macros around the source to fix the Qt Linux Release Minimal build. 2010-08-19 Stephen White Reviewed by Kenneth Russell. [CHROMIUM] Assert w/canvas image draw https://bugs.webkit.org/show_bug.cgi?id=44279 Don't use bitmap->pixelRef()->getPixels() directly; prefer bitmap->pixels() and an SkAutoLockPixels. Also, make sure to set the backing store state to Software when it was None. This handles missing draws when the first call is software. Finally, remove some spurious prepareForSoftwareDraw() calls in addPath() and beginPath(). It's really the fillPath() or strokePath() that matters. Covered by LayoutTests/fast/canvas/arc360.html and others. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::addPath): (WebCore::GraphicsContext::beginPath): Remove spurious prepareForSoftwareDraw() calls. * platform/graphics/skia/ImageSkia.cpp: (WebCore::drawBitmapGLES2): Lock SkBitmap's pixels, and use ->getPixels(). * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::prepareForSoftwareDraw): Switch backing store state to Software when it was None. 2010-08-19 David Kilzer Fix compilation with NETSCAPE_PLUGIN_API disabled Reviewed by Joseph Pecoraro. * WebCore.exp.in: (WebCore::HTMLPlugInElement::getNPObject): Moved from general section into ENABLE(NETSCAPE_PLUGIN_API) section. (WebCore::FrameView::windowClipRectForLayer): Moved from ENABLE(NETSCAPE_PLUGIN_API) section to general section since it's used by WebKit2. * plugins/PluginView.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) and #endif macros as needed to make iOS WebKit build with NETSCAPE_PLUGIN_API disabled. * plugins/PluginViewNone.cpp: Ditto. (WebCore::PluginView::platformGetValueStatic): 2010-08-17 Eric Seidel Reviewed by Adam Barth. Make DocumentParser safer to use https://bugs.webkit.org/show_bug.cgi?id=43055 Make DocumentParser and its subclasses RefCounted, and protect HTMLDocumentParser during parsing. It's possible for a parser to get deleted if certain actions (e.g., a document.write()) occur synchronously. The original version of this patch was written by Nate Chapin. DocumentParser doesn't actually have to be fully RefCounted, since the only two things which should ever hold a reference to it are Document and DocumentParser itself. However using RefCounted and RefPtr was easier/cleaner than inventing a custom ref() scheme. This deploys a new "detach()" method throughout the parsing framework. detach() causes the parser to disconnect from the document so that no further modifications will be made to the document while any possible DocumentParser stacks are unwound. The irony of this patch is that the new detach() system is never used, since Document always outlives the DocumentParser in all of our layout tests. There is an ASSERT in ~Document() to verify that the DocumentParser will not outlive the Document. However I expect that we will soon either find new test cases, or change the architecture in such a way that DocumentParser will outlive Document. At which point, the detach() plumbing will be crucial. Right now detach() serves as a safe-guard against use-after-free bugs for any case where DocumentParser does outlive the Document. This also fixes test cases attached to: https://bugs.webkit.org/show_bug.cgi?id=42099 Tests: fast/frames/document-write-in-iframe-onload.html fast/frames/set-parent-src-synchronously.html fast/parser/document-close-iframe-load.html fast/parser/document-close-nested-iframe-load.html fast/parser/iframe-sets-parent-to-javascript-url.html * dom/Document.cpp: - Added a new detachParser() call to be used anywhere we used to call m_parser.clear(). There is an ASSERT in ~DocumentParser which ensures that we get this right. (WebCore::Document::removedLastRef): (WebCore::Document::~Document): (WebCore::Document::createParser): (WebCore::Document::detachParser): (WebCore::Document::cancelParsing): (WebCore::Document::implicitOpen): - removed redundant m_parser.clear() (WebCore::Document::implicitClose): * dom/Document.h: * dom/DocumentParser.cpp: (WebCore::DocumentParser::~DocumentParser): - ASSERT that callers always call detach() before destruction. - This ASSERT might prove too cumbersome, but for now it's useful. (WebCore::DocumentParser::detach): * dom/DocumentParser.h: * dom/RawDataDocumentParser.h: * dom/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::finish): - Add a FIXME explaining part of the reason why stopParsing() and detach() are separate concepts. * dom/XMLDocumentParser.h: (WebCore::XMLDocumentParser::create): * dom/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::parseDocumentFragment): * dom/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::parseDocumentFragment): * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::detach): (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded): * html/HTMLConstructionSite.h: * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createParser): * html/HTMLDocument.h: * html/HTMLDocumentParser.cpp: - We need to protect(this) before calling into any code which might cause the parser to be destroyed. (WebCore::HTMLDocumentParser::~HTMLDocumentParser): (WebCore::HTMLDocumentParser::detach): (WebCore::HTMLDocumentParser::resumeParsingAfterYield): (WebCore::HTMLDocumentParser::pumpTokenizer): (WebCore::HTMLDocumentParser::insert): (WebCore::HTMLDocumentParser::append): (WebCore::HTMLDocumentParser::end): (WebCore::HTMLDocumentParser::finish): (WebCore::HTMLDocumentParser::notifyFinished): (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets): (WebCore::HTMLDocumentParser::parseDocumentFragment): * html/HTMLDocumentParser.h: (WebCore::HTMLDocumentParser::create): * html/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::detach): (WebCore::HTMLScriptRunner::executeParsingBlockingScript): (WebCore::HTMLScriptRunner::executeScript): (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets): (WebCore::HTMLScriptRunner::runScript): * html/HTMLScriptRunner.h: * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::detach): (WebCore::HTMLTreeBuilder::passTokenToLegacyParser): (WebCore::HTMLTreeBuilder::finished): * html/HTMLTreeBuilder.h: * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createParser): * html/HTMLViewSourceDocument.h: * html/HTMLViewSourceParser.cpp: (WebCore::HTMLViewSourceParser::HTMLViewSourceParser): * html/HTMLViewSourceParser.h: (WebCore::HTMLViewSourceParser::create): * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocumentParser::create): (WebCore::FTPDirectoryDocument::createParser): * loader/FTPDirectoryDocument.h: * loader/ImageDocument.cpp: (WebCore::ImageDocumentParser::create): (WebCore::ImageDocumentParser::ImageDocumentParser): (WebCore::ImageDocument::createParser): * loader/ImageDocument.h: * loader/MediaDocument.cpp: (WebCore::MediaDocumentParser::create): (WebCore::MediaDocument::createParser): * loader/MediaDocument.h: * loader/PluginDocument.cpp: (WebCore::PluginDocumentParser::create): (WebCore::PluginDocument::createParser): * loader/PluginDocument.h: * loader/SinkDocument.cpp: (WebCore::SinkDocumentParser::create): (WebCore::SinkDocument::createParser): * loader/SinkDocument.h: * loader/TextDocument.cpp: (WebCore::TextDocumentParser::create): (WebCore::TextDocument::createParser): (WebCore::createTextDocumentParser): * loader/TextDocument.h: 2010-08-19 David Kilzer Fix compilation of SelectElement.cpp with ARROW_KEYS_POP_MENU == 0 Reviewed by Simon Fraser. * dom/SelectElement.cpp: (WebCore::SelectElement::menuListDefaultEventHandler): Added UNUSED_PARAM() macro for htmlForm argument when ARROW_KEYS_POP_MENU defined as zero. 2010-08-19 Laszlo Gombos Reviewed by Simon Hausmann. [Qt] Disable XSLT for production configuration https://bugs.webkit.org/show_bug.cgi?id=37445 Introduce a new CONFIG option to maintain stable configuration for the QtWebKit port and disable XSLT for the stable configuration because of bug 37445. No new tests as there is no new functionality. * features.pri: 2010-08-18 Zhenyao Mo Reviewed by Kenneth Russell. Implement strict type checking in js bindings for WebGL functions https://bugs.webkit.org/show_bug.cgi?id=44202 Test: fast/canvas/webgl/bad-arguments-test.html * bindings/js/JSWebGLRenderingContextCustom.cpp: Add type check for wrapper types and DOMString and throw error in case of mismatch. (WebCore::JSWebGLRenderingContext::getAttachedShaders): (WebCore::JSWebGLRenderingContext::getProgramParameter): (WebCore::JSWebGLRenderingContext::getShaderParameter): (WebCore::JSWebGLRenderingContext::getUniform): (WebCore::dataFunctionf): (WebCore::dataFunctioni): (WebCore::dataFunctionMatrix): * bindings/scripts/CodeGeneratorJS.pm: Ditto. * bindings/scripts/CodeGeneratorV8.pm: Ditto. * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: Ditto. (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback): (WebCore::V8WebGLRenderingContext::getProgramParameterCallback): (WebCore::V8WebGLRenderingContext::getShaderParameterCallback): (WebCore::V8WebGLRenderingContext::getUniformCallback): (WebCore::vertexAttribAndUniformHelperf): (WebCore::uniformHelperi): (WebCore::uniformMatrixHelper): * html/canvas/WebGLRenderingContext.idl: Add attribute StrictTypeChecking for WebGL functions. 2010-08-19 Simon Fraser Reviewed by Sam Weinig. Clean up some selection code https://bugs.webkit.org/show_bug.cgi?id=44314 Change the concept of "layout" in SelectionController to "updateCaretRect", renaming methods accordingly. Move selection and printing methods in RenderView.h into groups. No behavioral changes. * editing/SelectionController.cpp: (WebCore::SelectionController::SelectionController): (WebCore::SelectionController::setSelection): (WebCore::SelectionController::modify): (WebCore::SelectionController::setCaretRectNeedsUpdate): (WebCore::SelectionController::updateCaretRect): (WebCore::SelectionController::localCaretRect): (WebCore::SelectionController::recomputeCaretRect): Test m_caretRectNeedsUpdate first. (WebCore::SelectionController::invalidateCaretRect): * editing/SelectionController.h: * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): * rendering/RenderView.h: (WebCore::RenderView::selectionStart): (WebCore::RenderView::selectionEnd): (WebCore::RenderView::printRect): (WebCore::RenderView::setPrintRect): 2010-08-19 Simon Fraser Fix Chromium build. * svg/SVGElement.cpp: (WebCore::SVGElement::attributeChanged): 2010-08-19 Simon Fraser Reviewed by Nikolas Zimmermann. HTMLElement::isContentEditable() can cause an updateStyleIfNeeded() to happen in the middle of layout https://bugs.webkit.org/show_bug.cgi?id=21834 If we're in the middle of layout, or painting, and something causes updateStyleIfNeeded() to get called, then we can end up entering recalcStyle() during layout or painting. This is bad because it can create/destry the renderers and RenderLayers which are in use by layout/painting. This is the cause of a number of random crashers, some of which show up more frequently in content which uses accelerated compositing. The changes here: 1. Add an assertion in Document::updateStyleIfNeeded() that we are not laying out or painting. 2. Remove calls to updateStyleIfNeeded() in editing and caret painting code 3. Pass along information to CTM and BBox-related SVG methods to indicate whether it's safe to update style. Tested by new assertions and existing tests. * dom/Document.cpp: (WebCore::Document::updateStyleIfNeeded): New assertion that we are not mid-layout or painting. (WebCore::command): Call updateStyleIfNeeded() to ensure that subsequent calls to isContentEditable() return the correct result. * dom/Element.cpp: (WebCore::Element::focus): Move the supportsFocus() call to after style has been updated. * editing/SelectionController.cpp: (WebCore::SelectionController::localCaretRect): (WebCore::SelectionController::caretRepaintRect): (WebCore::SelectionController::paintCaret): * editing/SelectionController.h: (WebCore::SelectionController::localCaretRectForPainting): When painting, use localCaretRectForPainting() which does not update style. Make localCaretRect() non-const so allowing it to update style without ugly casts. * html/HTMLElement.cpp: (WebCore::HTMLElement::isContentEditable): Don't call updateStyleIfNeeded() here. (WebCore::HTMLElement::isContentRichlyEditable): Ditto. (WebCore::HTMLElement::contentEditable): Ditto. * page/FrameView.h: (WebCore::FrameView::isMidLayout): New accessor, used for asserting. * rendering/RenderPath.cpp: (WebCore::fillAndStrokePath): Pass DisallowStyleUpdate to getScreenCTM since we are painting. * rendering/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke): This is only called when painting, so use DisallowStyleUpdate. * svg/SVGElement.cpp: (WebCore::SVGElement::attributeChanged): Changes to the style attribute should not have side effects, since a call to Element::getAttribute() is allowed to result in a call to setAttribute() for the style attribute. To avoid updateStyleIfNeeded() during painting, this must not cause SVG to do extra work. * svg/SVGLocatable.cpp: Pass StyleUpdateStrategy down to these methods to indicate whether it's OK to update style. (WebCore::SVGLocatable::getBBox): (WebCore::SVGLocatable::computeCTM): (WebCore::SVGLocatable::getTransformToElement): * svg/SVGLocatable.h: (WebCore::SVGLocatable::): * svg/SVGStyledLocatableElement.cpp: (WebCore::SVGStyledLocatableElement::getBBox): (WebCore::SVGStyledLocatableElement::getCTM): (WebCore::SVGStyledLocatableElement::getScreenCTM): * svg/SVGStyledLocatableElement.h: * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::getCTM): (WebCore::SVGStyledTransformableElement::getScreenCTM): (WebCore::SVGStyledTransformableElement::getBBox): * svg/SVGStyledTransformableElement.h: * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::getBBox): (WebCore::SVGTextElement::getCTM): (WebCore::SVGTextElement::getScreenCTM): * svg/SVGTextElement.h: 2010-08-19 Ryosuke Niwa Reviewed by Darin Adler. Range, EAnnotateForInterchange, and EAbsoluteURLs should be member variables of MarkupAccumulator https://bugs.webkit.org/show_bug.cgi?id=44229 No new tests are added since this is a clean up. * editing/markup.cpp: (WebCore::MarkupAccumulator::MarkupAccumulator): Added shouldResolveURLs, shouldAnnotate, and range. (WebCore::MarkupAccumulator::shouldResolveURLs): Private inline accessor for m_shouldResolveURLs. (WebCore::MarkupAccumulator::shouldAnnotate): Private inline accessor for m_shouldAnnotate. (WebCore::MarkupAccumulator::appendEndTag): Renamed local variable result to markup. (WebCore::MarkupAccumulator::appendStartTag): Removed range, annotate, shouldResolveURLs from the function arguments. (WebCore::MarkupAccumulator::wrapWithNode): Ditto. (WebCore::MarkupAccumulator::appendStartMarkup): Ditto. (WebCore::serializeNodes): Ditto and uses MarkupAccumulator. (WebCore::createMarkup): Uses MarkupAccumulator. (WebCore::serializeNodesWithNamespaces): Ditto. 2010-08-19 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: do not dump inspector errors into the inspected window console. https://bugs.webkit.org/show_bug.cgi?id=44272 * inspector/front-end/inspector.js: (WebInspector.reportProtocolError): 2010-08-19 Jeremy Orlow Chromium build fix. Use ASSERT_UNUSED on variables that aren't used besides by the ASSERT. * storage/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::removeObjectStore): (WebCore::IDBDatabaseBackendImpl::loadObjectStores): * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::get): (WebCore::IDBObjectStoreBackendImpl::put): (WebCore::IDBObjectStoreBackendImpl::remove): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::removeIndex): (WebCore::IDBObjectStoreBackendImpl::openCursor): (WebCore::IDBObjectStoreBackendImpl::loadIndexes): 2010-08-19 Andrey Kosyakov Reviewed by Pavel Feldman. Web Inspector: expose Panel.onSelectionChanged in extension API https://bugs.webkit.org/show_bug.cgi?id=44171 * inspector/front-end/ExtensionAPI.js: (injectedExtensionAPI.PanelImpl): (injectedExtensionAPI): 2010-08-19 Andrei Popescu Reviewed by Jeremy Orlow. [IndexedDB] Abort idle IDBTransactions when the JS context they were created in finishes execution. https://bugs.webkit.org/show_bug.cgi?id=44101 This change also introduces the TransactionCoordinator, which will be used to schedule transactions for execution. Test: storage/indexeddb/transaction-basics.html * WebCore.gypi: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertEventTargetToV8Object): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::runScript): (WebCore::V8Proxy::callFunction): (WebCore::V8Proxy::didLeaveScriptContext): * bindings/v8/V8Proxy.h: * dom/EventTarget.cpp: (WebCore::EventTarget::toIDBTransaction): * dom/EventTarget.h: * page/PageGroup.h: (WebCore::PageGroup::hasIDBFactory): * storage/IDBAbortEvent.cpp: Added. (WebCore::IDBAbortEvent::create): (WebCore::IDBAbortEvent::IDBAbortEvent): (WebCore::IDBAbortEvent::~IDBAbortEvent): * storage/IDBAbortEvent.h: Added. (WebCore::IDBAbortEvent::isIDBAbortEvent): * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::transaction): * storage/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::transaction): * storage/IDBDatabaseBackendImpl.h: (WebCore::IDBDatabaseBackendImpl::create): * storage/IDBDatabaseBackendInterface.h: * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl): (WebCore::IDBFactoryBackendImpl::open): (WebCore::IDBFactoryBackendImpl::abortPendingTransactions): * storage/IDBFactoryBackendImpl.h: * storage/IDBFactoryBackendInterface.h: * storage/IDBPendingTransactionMonitor.cpp: Added. (WebCore::IDBPendingTransactionMonitor::addPendingTransaction): (WebCore::IDBPendingTransactionMonitor::removePendingTransaction): (WebCore::IDBPendingTransactionMonitor::clearPendingTransactions): (WebCore::IDBPendingTransactionMonitor::pendingTransactions): * storage/IDBPendingTransactionMonitor.h: Added. * storage/IDBTransaction.cpp: (WebCore::IDBTransaction::IDBTransaction): (WebCore::IDBTransaction::onAbort): (WebCore::IDBTransaction::id): (WebCore::IDBTransaction::stop): (WebCore::IDBTransaction::timerFired): * storage/IDBTransaction.h: * storage/IDBTransactionBackendInterface.h: * storage/IDBTransactionCallbacks.h: Added. (WebCore::IDBTransactionCallbacks::~IDBTransactionCallbacks): * storage/IDBTransactionCoordinator.cpp: Added. (WebCore::IDBTransactionBackendImpl::~IDBTransactionBackendImpl): (WebCore::IDBTransactionBackendImpl::create): (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl): (WebCore::IDBTransactionBackendImpl::objectStore): (WebCore::IDBTransactionBackendImpl::mode): (WebCore::IDBTransactionBackendImpl::scheduleTask): (WebCore::IDBTransactionBackendImpl::abort): (WebCore::IDBTransactionBackendImpl::sqliteDatabase): (WebCore::IDBTransactionBackendImpl::id): (WebCore::IDBTransactionBackendImpl::setCallbacks): (WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator): (WebCore::IDBTransactionCoordinator::~IDBTransactionCoordinator): (WebCore::IDBTransactionCoordinator::createTransaction): (WebCore::IDBTransactionCoordinator::abort): * storage/IDBTransactionCoordinator.h: Added. (WebCore::IDBTransactionCoordinator::create): 2010-08-19 Pavel Feldman Reviewed by Yury Semikhatsky. Chromium DevTools: There is no need in resource-based InjectedScript.js source. Now that we populate front-end after its onload handler, we don't need to install injected script early. Exposing injected script source on the WebCore level here. https://bugs.webkit.org/show_bug.cgi?id=44029 * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::injectedScriptSource): 2010-08-18 Jeremy Orlow Reviewed by Steve Block. Implement persistance for IndexedDB ObjectStores https://bugs.webkit.org/show_bug.cgi?id=44164 Get rid of the in-memory storage of ObjectStores and instead use SQL backed memory. Existing tests give most of the coverage. Will update the manual test in the next patch (which will also re-work database.description). * manual-tests/indexed-database.html: Get rid of race where you can click before the page loads. * platform/sql/SQLiteStatement.cpp: Add two helper functions (WebCore::SQLiteStatement::bindInt): (WebCore::SQLiteStatement::isColumnNull): * platform/sql/SQLiteStatement.h: * storage/IDBCursorBackendImpl.cpp: * storage/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::createObjectStore): (WebCore::IDBDatabaseBackendImpl::removeObjectStore): (WebCore::IDBDatabaseBackendImpl::importObjectStores): * storage/IDBDatabaseBackendImpl.h: (WebCore::IDBDatabaseBackendImpl::sqliteDatabase): * storage/IDBFactoryBackendImpl.cpp: (WebCore::createTables): * storage/IDBIndexBackendImpl.cpp: (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl): (WebCore::IDBIndexBackendImpl::sqliteDatabase): * storage/IDBIndexBackendImpl.h: (WebCore::IDBIndexBackendImpl::create): * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl): (WebCore::whereClause): (WebCore::bindKey): (WebCore::IDBObjectStoreBackendImpl::get): (WebCore::IDBObjectStoreBackendImpl::put): (WebCore::IDBObjectStoreBackendImpl::remove): (WebCore::IDBObjectStoreBackendImpl::createIndex): (WebCore::IDBObjectStoreBackendImpl::removeIndex): (WebCore::IDBObjectStoreBackendImpl::openCursor): (WebCore::IDBObjectStoreBackendImpl::importIndexes): (WebCore::IDBObjectStoreBackendImpl::sqliteDatabase): * storage/IDBObjectStoreBackendImpl.h: (WebCore::IDBObjectStoreBackendImpl::create): (WebCore::IDBObjectStoreBackendImpl::database): 2010-08-19 Nikolas Zimmermann Reviewed by Dirk Schulze. Pattern is rasterized https://bugs.webkit.org/show_bug.cgi?id=41396 SVG pattern size changed when resizing browser https://bugs.webkit.org/show_bug.cgi?id=38704 Incorrect pattern tilling https://bugs.webkit.org/show_bug.cgi?id=41603 Apply same fixes to that recently received. Build the tile image in absolute coordinates, to avoid pixelation, when the target element is scaled. Also fixes problems when zooming into patterns. Clamp ImageBuffer sizes to RenderSVGRoots viewport, now that gradient/pattern and mask buffers are created in absolute coordinates -> no more huge image buffer allocations, that could fail. Drop overflow="visible" support for , which complicates the code a lot. Neither Opera nor Firefox support this, and SVG 1.1 2nd Edition says that the rendering behaviour is "undefined". Tests: svg/batik/paints/patternRegions-positioned-objects.svg svg/custom/pattern-incorrect-tiling.svg svg/custom/pattern-no-pixelation.svg svg/transforms/text-with-mask-with-svg-transform.svg * rendering/PaintInfo.h: (WebCore::PaintInfo::applyTransform): Don't alter the repaint rect if it's infinite (only affects SVG). (WebCore::PaintInfo::infiniteRect): Moved from RenderLayer into PaintInfo, as applyTransform() needs it. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): s/ClipRects::infiniteRect/PaintInfo::infiniteRect/ * rendering/RenderLayer.h: Moved infiniteRect() to PaintInfo. * rendering/RenderLayerBacking.cpp: (WebCore::clipBox): s/ClipRects::infiniteRect/PaintInfo::infiniteRect/ * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::clippedByAncestor): Ditto. * rendering/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): Clamp image buffer size, use new SVGImageBufferTools helper methods for that. (WebCore::clipToTextMask): Adapt to renames/code changes in SVGImageBufferTools. (WebCore::RenderSVGResourceGradient::applyResource): Ditto. * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): lamp image buffer size, use new SVGImageBufferTools helper methods for that. (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): Adapt to renames/code changes in SVGImageBufferTools. * rendering/RenderSVGResourceMasker.h: * rendering/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::applyResource): Rewrite to create tile image buffers in absolute coordinates, avoids pixelation artefacts. (WebCore::calculatePatternBoundaries): (WebCore::RenderSVGResourcePattern::buildTileImageTransform): (WebCore::RenderSVGResourcePattern::createTileImage): * rendering/RenderSVGResourcePattern.h: * rendering/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::transformationToOutermostSVGCoordinateSystem): Helper method, concating all localToParentTransforms() up until RenderSVGRoot is reached. (WebCore::SVGImageBufferTools::createImageBuffer): Simplified. (WebCore::SVGImageBufferTools::clipToImageBuffer): Rename absoluteTargetRect to clampedAbsoluteTargetRect. (WebCore::SVGImageBufferTools::roundedImageBufferSize): New helper method to centralize FloatSize -> IntSize rounding, when creating image buffers. (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer): New helper methods to clamp an image buffer rect against the viewport. * rendering/SVGImageBufferTools.h: * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::renderSubtreeToImage): Use PaintInfo::infiniteRect() as repaint rect, to avoid any culling. (WebCore::SVGRenderSupport::findTreeRootObject): Renamed from svgRootTreeObject, and expose it. (WebCore::SVGRenderSupport::layoutChildren): s/svgRootTreeObject/findTreeRootObject/. * rendering/SVGRenderSupport.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::setCurrentTranslate): Be sure to relayout on invalidation, otherwhise resources are not updated, and we have to update them, as they depend on the absolute transform. 2010-08-19 Alejandro G. Castro Reviewed by Dirk Schulze. [GTK] The size of the shadow image uses the standard deviation size instead of the blur radius https://bugs.webkit.org/show_bug.cgi?id=40793 The kernelSize variable was renamed to radius and recalculated considering the CSS3 specification http://www.w3.org/TR/css3-background/#the-box-shadow, and the visual result of other browsers. The HTML5 canvas shadow standard deviation calculation that was used, was not appropiate for the blur distance specified in the CSS3. * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/FontCairo.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::calculateShadowBufferDimensions): Changed the calculation, now we use the parameter in the style directly as recomended in the CSS3 standard. (WebCore::drawPathShadow): (WebCore::drawBorderlessRectShadow): (WebCore::GraphicsContext::createPlatformShadow): We get the standard deviation from the radius using the new function and we create the filter with that deviation. * platform/graphics/cairo/ImageCairo.cpp: (WebCore::BitmapImage::draw): * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::calculateStdDeviation): Added this function that gets the standard deviation from the blur radius. Required in the CSS3 case where we have this radio and we need the deviation to initialize the algorithm. * platform/graphics/filters/FEGaussianBlur.h: 2010-08-19 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] Avoid unnecessary string copy in TextCodecQt::decode() https://bugs.webkit.org/show_bug.cgi?id=44232 * platform/text/qt/TextCodecQt.cpp: (WebCore::TextCodecQt::decode): Use String::append(const UChar*, int) to avoid creating a temporary string. 2010-08-19 Philippe Normand Reviewed by Gustavo Noronha Silva. [GStreamer] GTK XOverlay support in GStreamerGWorld https://bugs.webkit.org/show_bug.cgi?id=39474 GStreamerGWorld now catches synchronous messages coming from the sinks and creates a GTK window where the video can be overlayed if fullscreen display is requested using enterFullscreen. * GNUmakefile.am: * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::gstGWorldSyncMessageCallback): (WebCore::GStreamerGWorld::GStreamerGWorld): (WebCore::GStreamerGWorld::~GStreamerGWorld): (WebCore::GStreamerGWorld::enterFullscreen): (WebCore::GStreamerGWorld::exitFullscreen): (WebCore::GStreamerGWorld::setWindowOverlay): * platform/graphics/gstreamer/GStreamerGWorld.h: (WebCore::GStreamerGWorld::pipeline): (WebCore::GStreamerGWorld::platformVideoWindow): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/PlatformVideoWindow.h: Added. (WebCore::PlatformVideoWindow::createWindow): (WebCore::PlatformVideoWindow::window): (WebCore::PlatformVideoWindow::videoWindowId): * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: Added. (PlatformVideoWindow::PlatformVideoWindow): 2010-08-19 Eric Uhrhane Reviewed by David Levin. Add idl and mock classes for FileWriter. https://bugs.webkit.org/show_bug.cgi?id=44075 No new tests, since there's no new functionality. New do-nothing classes, but the real IDL: * FileWriter.idl: * FileWriter.h: * FileWriter.cpp: The build file changes to include the above: * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Added FileWriter event names and required EventTarget changes. * dom/EventNames.h: * dom/EventTarget.cpp: (WebCore::EventTarget::toFileWriter): * dom/EventTarget.h: 2010-08-18 Andreas Kling Rubber-stamped by Ariya Hidayat. [Qt] Remove unused variable in GraphicsContext::fillRect() * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillRect): 2010-08-18 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Short lived shadow buffer for blur operation https://bugs.webkit.org/show_bug.cgi?id=44094 ContextShadow needs a scratch image as the buffer for the blur filter. Instead of creating and destroying the buffer for every operation, we create a buffer which will be automatically purged via a timer. * platform/graphics/qt/ContextShadow.cpp: (WebCore::): (WebCore::ShadowBuffer::ShadowBuffer): (WebCore::ShadowBuffer::scratchImage): (WebCore::ShadowBuffer::schedulePurge): (WebCore::ShadowBuffer::purgeBuffer): (WebCore::ContextShadow::drawShadowRect): 2010-08-18 Alexey Marinichev Reviewed by Darin Fisher. [chromium] scrolling issues when accelerated compositor is enabled https://bugs.webkit.org/show_bug.cgi?id=43992 Corrected scroll position not being updated, and an off-by-half error. Int cast and floorf are taken out because they produce incorrect transformation matrix. The information lost there is not immediately obvious because of rounding that happens when texture is mapped with GL_NEAREST filtering mode. These errors accumulate, and after some scrolling it becomes more apparent. To test the former, follow instructions in the bug. To test the latter, change GL_NEAREST to GL_LINEAR in LayerRendererChromium.cpp. Scrolling should work properly for all window sizes, without blurring images and shifting them to the left. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): 2010-08-18 Simon Hausmann Reviewed by Ariya Hidayat. [Qt] Implement GraphicsContext::clipOut more efficiently https://bugs.webkit.org/show_bug.cgi?id=43416 The current implementation of clipOut uses QPainter::clipRegion().boundingRect(), which is a very slow function because it converts the entire clip region - which may potentially contain a complex path - into a set of QRegion rectangles, just to throw away all that information and use the bounding rect. QTBUG-12618 implements a faster function in QPainter: QPainter::clipBoundingRect(). * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::clipOut): Use QPainter::clipBoundingRect() with Qt >= 4.8. (WebCore::GraphicsContext::clipOutEllipseInRect): Ditto. 2010-08-18 Martin Robinson Reviewed by Gustavo Noronha Silva. [GTK] Since the GSEAL changes moz_gtk_scrollbar_button_paint fiddles the widget allocation but doesn't preserve it https://bugs.webkit.org/show_bug.cgi?id=44211 No new tests as we do not currently use the scrollbar button painting code. Tests for this issue will be enabled when we have pixel tests for WebCore-drawn interior frame scrollbars. * platform/gtk/GtkVersioning.h: Add backward-compatible functions for getting and setting the widget allocation. * platform/gtk/gtk2drawing.c: (moz_gtk_scrollbar_button_paint): Use new backward-compatible functions for getting and setting the widget allocation. 2010-08-18 Ryosuke Niwa Reviewed by Darin Adler. Group functions in markup.cpp into MarkupAccumulatorWrapper https://bugs.webkit.org/show_bug.cgi?id=43936 Renamed MarkupAccumulatorWrapper to MarkupAccumulator and moved the MarkupAccumulatorWrapper to the top of markup.cpp. Made various functions private member functions of MarkupAccumulator. No new tests are added since this is a cleanup. * editing/markup.cpp: (WebCore::MarkupAccumulator::): (WebCore::MarkupAccumulator::MarkupAccumulator): (WebCore::MarkupAccumulator::appendString): (WebCore::MarkupAccumulator::appendStartTag): (WebCore::MarkupAccumulator::appendEndTag): (WebCore::MarkupAccumulator::wrapWithNode): (WebCore::MarkupAccumulator::wrapWithStyleNode): (WebCore::MarkupAccumulator::takeResults): (WebCore::MarkupAccumulator::appendAttributeValue): (WebCore::MarkupAccumulator::escapeContentText): (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue): (WebCore::MarkupAccumulator::stringValueForRange): (WebCore::MarkupAccumulator::ucharRange): (WebCore::MarkupAccumulator::appendUCharRange): (WebCore::MarkupAccumulator::renderedText): (WebCore::MarkupAccumulator::shouldAddNamespaceElement): (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute): (WebCore::MarkupAccumulator::appendNamespace): (WebCore::MarkupAccumulator::appendDocumentType): (WebCore::MarkupAccumulator::removeExteriorStyles): (WebCore::MarkupAccumulator::appendStartMarkup): (WebCore::MarkupAccumulator::shouldSelfClose): (WebCore::MarkupAccumulator::appendEndMarkup): (WebCore::serializeNodes): (WebCore::createMarkup): (WebCore::serializeNodesWithNamespaces): 2010-08-18 Beth Dakin Reviewed by Sam Weinig. Fix for https://bugs.webkit.org/show_bug.cgi?id=44207 Empty mfrac and empty munderover cause crashes -and corresponding- This is just a matter of adding null checks in the right places. * mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::baselinePosition): * mathml/RenderMathMLUnderOver.cpp: (WebCore::RenderMathMLUnderOver::baselinePosition): 2010-08-18 Jian Li Reviewed by David Levin. Move FileStream to platform. https://bugs.webkit.org/show_bug.cgi?id=44213 In addition to moving files over, FileStream has been changed to remove ExceptionCode dependency. Also update FileStreamProxy and FileRead to account for this change. * Android.mk: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/FileReader.cpp: (WebCore::FileReader::didOpen): * html/FileReader.h: * html/FileStream.cpp: Removed. * html/FileStream.h: Removed. * html/FileStreamClient.h: (WebCore::FileStreamClient::didTruncate): (WebCore::FileStreamClient::didOpen): * html/FileStreamProxy.cpp: (WebCore::didOpen): (WebCore::FileStreamProxy::openForReadOnFileThread): (WebCore::FileStreamProxy::openForWriteOnFileThread): (WebCore::FileStreamProxy::write): (WebCore::FileStreamProxy::writeOnFileThread): (WebCore::didTruncate): (WebCore::FileStreamProxy::truncateOnFileThread): * html/FileStreamProxy.h: * platform/FileStream.cpp: Renamed from WebCore/FileStream.cpp and updated. * platform/FileStream.h: Renamed from WebCore/FileStream.h and updated. 2010-08-18 Jian Li Reviewed by Darin Fisher. Chromium side implementation of blob data and blob registry. https://bugs.webkit.org/show_bug.cgi?id=43871 Wrap !PLATFORM(CHROMIUM) around blobRegistry() so that chromium uses the implementation in WebKit Chromium. * platform/network/BlobRegistryImpl.cpp: 2010-08-18 Martin Robinson Reviewed by Gustavo Noronha Silva. [GTK] Bots are showing lots of GTK_IS_CONTAINER critical warnings https://bugs.webkit.org/show_bug.cgi?id=40990 Instead of relying on the ScrollView's adjustment members to determine if a Scrollbar should be native or just a shell of the parent's scrollbar (main frame scrollbar), just check if this ScrollView has a parent. This will ensure the correct behavior when main frame scrollbar's are created after the ScrollView's containing adjustments go away. Lack of warnings during tests are the test for this fix. * platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollView::createScrollbar): Decide what type of scrollbar to make based on the result of the parent() method. * platform/gtk/ScrollbarGtk.cpp: (ScrollbarGtk::ScrollbarGtk): Allow for an m_adjustment which is null. (ScrollbarGtk::attachAdjustment): Ditto. (ScrollbarGtk::updateThumbPosition): Ditto. (ScrollbarGtk::updateThumbProportion): Ditto. 2010-08-18 Adam Barth Reviewed by David Levin. NOT_REACHED is reachable in SVGLength https://bugs.webkit.org/show_bug.cgi?id=44150 The author of this code was confused. This code is reachable. We just haven't implemented it yet. * svg/SVGLength.cpp: (WebCore::SVGLength::setValue): 2010-08-18 Balazs Kelemen Reviewed by Antonio Gomes. [Qt] Use LAZY_NATIVE_CURSOR https://bugs.webkit.org/show_bug.cgi?id=44062 No functional change so new tests. Change Cursor behaviour to match the LAZY_NATIVE_CURSOR policy. * platform/Cursor.h: Typedef PlatformCursor to be a QCursor* to be able create it dynamically. (WebCore::Cursor::Cursor): Remove the ifdef for Qt. * platform/qt/CursorQt.cpp: Remove the Cursors class since we have the static cursor instances for the common cursor types in Cursor.cpp. Move the logic that maps the cursor types to QCursor instances into ensurePlatformCursor. (WebCore::Cursor::Cursor): (WebCore::Cursor::~Cursor): (WebCore::Cursor::operator=): (WebCore::createCustomCursor): (WebCore::Cursor::ensurePlatformCursor): * platform/qt/WidgetQt.cpp: (WebCore::Widget::setCursor): Adjust to the PlatformCursor change. 2010-08-18 Andreas Kling Reviewed by Darin Adler. CSS: Make rgb() and rgba() fast paths case-insensitive https://bugs.webkit.org/show_bug.cgi?id=44107 Also inlined the string comparisons against "rgb(" and "rgba(" which is faster and avoids creating a temporary String object. * css/CSSParser.cpp: (WebCore::mightBeRGBA): (WebCore::mightBeRGB): (WebCore::CSSParser::parseColor): 2010-08-18 Jian Li Reviewed by Darin Fisher. Change BlobStorageData to reuse BlobData. https://bugs.webkit.org/show_bug.cgi?id=44188 Also addressed Darin's feedbacks for bug 44116. * html/ThreadableBlobRegistry.cpp: (WebCore::registerBlobURLTask): (WebCore::registerBlobURLFromTask): (WebCore::unregisterBlobURLTask): * platform/network/BlobData.cpp: (WebCore::BlobData::appendData): * platform/network/BlobData.h: (WebCore::BlobDataItem::BlobDataItem): * platform/network/BlobRegistry.h: * platform/network/BlobRegistryImpl.cpp: (WebCore::blobRegistry): (WebCore::BlobRegistryImpl::appendStorageItems): (WebCore::BlobRegistryImpl::registerBlobURL): * platform/network/BlobRegistryImpl.h: * platform/network/BlobStorageData.h: (WebCore::BlobStorageData::create): (WebCore::BlobStorageData::contentType): (WebCore::BlobStorageData::contentDisposition): (WebCore::BlobStorageData::items): (WebCore::BlobStorageData::BlobStorageData): 2010-08-18 David Hyatt Reviewed by Martin Robinson. https://bugs.webkit.org/show_bug.cgi?id=44193 Fix a typo in my previous canvas checkin. m_in->resultImage() was originally m_in2->resultImage(), and I accidentally changed it when swapping the order of the arguments. * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::apply): 2010-08-18 Stephen White Reviewed by Darin Fisher. [CHROMIUM] Eliminate a memcpy() from the canvas.drawImage(canvas, ...) path. https://bugs.webkit.org/show_bug.cgi?id=44115 This is the Skia followup to Dave Hyatt's patch in r65449. Covered by canvas layout tests. * platform/graphics/skia/BitmapImageSingleFrameSkia.h: Add a "copyPixels" argument to the create() static to indicate if the caller wants the pixels to be copied or ref'ed. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::drawsUsingCopy): We don't use the always-copy path anymore, so return false. (WebCore::ImageBuffer::copyImage): Force a copy here. (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): Create a temporary BitampImageSingleFrameSkia wrapped around the canvas's bitmap, and draw with it immediately. If drawing to our own canvas, copy the pixels, otherwise just shallow copy. * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia): Make the constructor take an SkBitmap to be wrapped. (WebCore::BitmapImageSingleFrameSkia::create): Implement the "copyPixels" flag: if true, do a deep copy, otherwise do a shallow copy. * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::NativeImageSkia): * platform/graphics/skia/NativeImageSkia.h: Implement a new constructor that shallow-copies the given SkBitmap. 2010-08-18 Mahesh Kulkarni Reviewed by Steve Block. [Qt] Request for permission before starting Geolocation service https://bugs.webkit.org/show_bug.cgi?id=42027 Handles starting location acquisition when request is granted for ports using "!CLIENT_BASED_GEOLOCATION and PREEMPT_GEOLOCATION_PERMISSION" policy Only Qt port as of today uses the above combination. Enable PREEMPT_GEOLOCATION_PERMISSION for qt port. Below tests cover these changes on platform using PREEMPT_GEOLOCATION_PERMISSION - fast/dom/Geolocation/delayed-permission-allowed.html - fast/dom/Geolocation/delayed-permission-denied.html - fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests.html - fast/dom/Geolocation/delayed-permission-denied-for-multiple-requests.html * WebCore.pro: * page/Geolocation.cpp: (WebCore::Geolocation::handlePendingPermissionNotifiers): 2010-08-18 Andreas Kling Reviewed by Darin Adler. CanvasStyle method naming cleanup https://bugs.webkit.org/show_bug.cgi?id=44184 Renamed the various create() overloads to reflect what they're constructing the CanvasStyle from. The unused CanvasStyle::create(grayLevel) and accompanying constructor were removed. Also renamed the isEquivalentColor overloads to isEquivalent{RGBA,CMYKA} * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::toHTMLCanvasStyle): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::toCanvasStyle): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::State::State): (WebCore::CanvasRenderingContext2D::setStrokeColor): (WebCore::CanvasRenderingContext2D::setFillColor): * html/canvas/CanvasStyle.cpp: (WebCore::CanvasStyle::createFromString): (WebCore::CanvasStyle::createFromStringWithOverrideAlpha): (WebCore::CanvasStyle::createFromGradient): (WebCore::CanvasStyle::createFromPattern): (WebCore::CanvasStyle::isEquivalentRGBA): (WebCore::CanvasStyle::isEquivalentCMYKA): * html/canvas/CanvasStyle.h: (WebCore::CanvasStyle::createFromRGBA): (WebCore::CanvasStyle::createFromGrayLevelWithAlpha): (WebCore::CanvasStyle::createFromRGBAChannels): (WebCore::CanvasStyle::createFromCMYKAChannels): 2010-08-18 Girish Ramakrishnan Reviewed by Kenneth Rohde Christiansen. [Qt] Implement Maemo5 local rendering NPAPI extension. See https://wiki.mozilla.org/Plugins:NokiaMaemoImageSurface for details. With the local rendering extension, Flash will paint into a 16-bit surface. For wmode=transparent, Flash expects the surface to contain the contents beneath it. As it is tricky to implement the content propagation across all graphics systems, transparent Flash is not supported. We just fill the surface with white and wmode=transparent behaves the same as wmode=opaque with a white background. https://bugs.webkit.org/show_bug.cgi?id=44043 * WebCore.pro: * plugins/PluginView.cpp: (WebCore::PluginView::setValue): (WebCore::PluginView::PluginView): * plugins/PluginView.h: * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::updatePluginWidget): (WebCore::PluginView::paintUsingImageSurfaceExtension): (WebCore::PluginView::paint): (WebCore::PluginView::platformGetValueStatic): 2010-08-18 Sheriff Bot Unreviewed, rolling out r65603. http://trac.webkit.org/changeset/65603 https://bugs.webkit.org/show_bug.cgi?id=44179 4 tests crash on Qt bot (Requested by Ossy on #webkit). * WebCore.pro: * page/Geolocation.cpp: (WebCore::Geolocation::handlePendingPermissionNotifiers): 2010-08-18 Ryuan Choi Unreviewed. Attempted build fix for EFL [EFL]REGRESSION(65530) need to fix build break https://bugs.webkit.org/show_bug.cgi?id=44154 * CMakeListsEfl.txt: 2010-08-18 Ilya Tikhonovsky Unreviewed qt build fix. * WebCore.pri: 2010-08-17 Ilya Tikhonovsky Reviewed by Yury Semikhatsky. Web Inspector: replace hand written InspectorBackendStub.js with generated one. New command-line flag was added to combine-javascript-resources. It specifies the location of generated scripts. https://bugs.webkit.org/show_bug.cgi?id=43791 * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * combine-javascript-resources: * inspector/CodeGeneratorInspector.pm: * inspector/front-end/InspectorBackendStub.js: Removed. * inspector/front-end/WebKit.qrc: 2010-08-18 Andrey Kosyakov Reviewed by Pavel Feldman. Web Inspector: extension panels do not occupy entire panel client area. https://bugs.webkit.org/show_bug.cgi?id=44167 * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onCreatePanel): (WebInspector.ExtensionServer.prototype._createClientIframe): 2010-08-18 Dirk Schulze Reviewed by Nikolas Zimmermann. Use SVGPathParser logic to traverse states of a Path https://bugs.webkit.org/show_bug.cgi?id=44009 Move the getPathSegAtLength logic from SVGPathSegList into a new SVGPathConsumer class: SVGPathTraversalStateBuilder. This allows us to get a SVGPathSeg at a given length for SVGPathByteStreams and SVGPathSegLists. It is also possible to use unaltered SVG path data, instead of just normalized path data. This is the final preparation to provide normalized and unaltered SVGPathSegLists on SVGPathElement. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * svg/SVGAllInOne.cpp: * svg/SVGPathBuilder.h: (WebCore::SVGPathBuilder::nextPathSegment): (WebCore::SVGPathBuilder::quitEarlier): * svg/SVGPathByteStreamBuilder.h: (WebCore::SVGPathByteStreamBuilder::nextPathSegment): (WebCore::SVGPathByteStreamBuilder::quitEarlier): * svg/SVGPathConsumer.h: * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::getPathSegAtLength): * svg/SVGPathElement.h: * svg/SVGPathElement.idl: * svg/SVGPathParser.cpp: (WebCore::SVGPathParser::parsePathDataFromSource): * svg/SVGPathParserFactory.cpp: (WebCore::globalSVGPathTraversalStateBuilder): (WebCore::SVGPathParserFactory::getSVGPathSegAtLengthFromSVGPathSegList): * svg/SVGPathParserFactory.h: * svg/SVGPathSegList.cpp: * svg/SVGPathSegList.h: * svg/SVGPathSegListBuilder.h: (WebCore::SVGPathSegListBuilder::nextPathSegment): (WebCore::SVGPathSegListBuilder::quitEarlier): * svg/SVGPathStringBuilder.h: (WebCore::SVGPathStringBuilder::nextPathSegment): (WebCore::SVGPathStringBuilder::quitEarlier): * svg/SVGPathTraversalStateBuilder.cpp: Added. New Consumer for SVGPathParser. (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder): (WebCore::SVGPathTraversalStateBuilder::moveTo): (WebCore::SVGPathTraversalStateBuilder::lineTo): (WebCore::SVGPathTraversalStateBuilder::curveToCubic): (WebCore::SVGPathTraversalStateBuilder::closePath): (WebCore::SVGPathTraversalStateBuilder::setDesiredLength): (WebCore::SVGPathTraversalStateBuilder::quitEarlier): (WebCore::SVGPathTraversalStateBuilder::nextPathSegment): (WebCore::SVGPathTraversalStateBuilder::pathSegmentIndex): * svg/SVGPathTraversalStateBuilder.h: Added. (WebCore::SVGPathTraversalStateBuilder::setCurrentTraversalState): (WebCore::SVGPathTraversalStateBuilder::cleanup): (WebCore::SVGPathTraversalStateBuilder::lineToHorizontal): (WebCore::SVGPathTraversalStateBuilder::lineToVertical): (WebCore::SVGPathTraversalStateBuilder::curveToCubicSmooth): (WebCore::SVGPathTraversalStateBuilder::curveToQuadratic): (WebCore::SVGPathTraversalStateBuilder::curveToQuadraticSmooth): (WebCore::SVGPathTraversalStateBuilder::arcTo): 2010-08-18 Mahesh Kulkarni Reviewed by Steve Block. [Qt] Request for permission before starting Geolocation service https://bugs.webkit.org/show_bug.cgi?id=42027 Handles starting location acquisition when request is granted for ports using "!CLIENT_BASED_GEOLOCATION and PREEMPT_GEOLOCATION_PERMISSION" policy Only Qt port as of today uses the above combination. Enable PREEMPT_GEOLOCATION_PERMISSION for qt port. Below tests cover these changes on platform using PREEMPT_GEOLOCATION_PERMISSION - fast/dom/Geolocation/delayed-permission-allowed.html - fast/dom/Geolocation/delayed-permission-denied.html - fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests.html - fast/dom/Geolocation/delayed-permission-denied-for-multiple-requests.html * WebCore.pro: * page/Geolocation.cpp: (WebCore::Geolocation::handlePendingPermissionNotifiers): 2010-08-18 Sheriff Bot Unreviewed, rolling out r65595. http://trac.webkit.org/changeset/65595 https://bugs.webkit.org/show_bug.cgi?id=44161 qt build failed (Requested by loislo on #webkit). * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/copyInspectorFiles.cmd: * WebCore.xcodeproj/project.pbxproj: * combine-javascript-resources: * inspector/CodeGeneratorInspector.pm: * inspector/front-end/InspectorBackendStub.js: Added. (WebInspector.InspectorBackendStub): (WebInspector.InspectorBackendStub.prototype._registerDelegate): (WebInspector.InspectorBackendStub.prototype.sendMessageToBackend): * inspector/front-end/InspectorBackendStub.qrc: Removed. * inspector/front-end/WebKit.qrc: 2010-08-18 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: make objectId of string type instead of object. https://bugs.webkit.org/show_bug.cgi?id=44160 * WebCore.xcodeproj/project.pbxproj: * inspector/front-end/InjectedScript.js: (injectedScriptConstructor.): * inspector/front-end/InjectedScriptAccess.js: (get InjectedScriptAccess.getForObjectId): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.getProperties): (WebInspector.RemoteObject.prototype.setPropertyValue): (WebInspector.RemoteObject.prototype.pushNodeToFrontend): 2010-08-17 Ilya Tikhonovsky Reviewed by Yury Semikhatsky. Web Inspector: replace hand written InspectorBackendStub.js by generated one. New command-line flag was added to combine-javascript-resources. It specifies the location of generated scripts. https://bugs.webkit.org/show_bug.cgi?id=43791 * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * combine-javascript-resources: * inspector/CodeGeneratorInspector.pm: * inspector/front-end/InspectorBackendStub.js: Removed. * inspector/front-end/WebKit.qrc: 2010-08-18 Shinichiro Hamaji Reviewed by Dimitri Glazkov. Printer font is different from screen font https://bugs.webkit.org/show_bug.cgi?id=43340 Not testable because PNG output in layoutTestController.setPrinting for chromium isn't implemented yet. * platform/graphics/FontDescription.h: Use screen font even for printing on Mac Chromium (WebCore::FontDescription::setUsePrinterFont): 2010-08-18 Renata Hodovan Reviewed by Dirk Schulze. Fix displaying problem of feTurbulence. https://bugs.webkit.org/show_bug.cgi?id=44111 Change the order of calculating turbulenceFunctionResult and clamping it. Furthermore remove the unnecessary rounding of m_seed. Add a new test for checking the change of seed's value. Test: svg/W3C-SVG-1.1/filters-turb-02-f.svg * svg/graphics/filters/SVGFETurbulence.cpp: (WebCore::FETurbulence::initPaint): (WebCore::FETurbulence::calculateTurbulenceValueForPoint): (WebCore::FETurbulence::apply): 2010-08-17 Gavin Barraclough Reviewed by Sam Weinig. Bug 44146 - Remove toDouble/toUInt32 methods from UString. These methods all implement JavaScript language specific behaviour, and as such are not suited to being on a generic string object. They are also inefficient and incorrectly used, refactor & cleanup. Uses of these methods really divide out into two cases. ToNumber: Uses of toDouble from JSString and from parseFloat are implementing ecma's ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble should largely just be moved out to a global jsToNumber function. ToNumber is capable of recognizing either decimal or hexadecimal numbers, but parseFloat should only recognize decimal values. This is currently handled by testing for hexadecimal before calling toDouble, which should unnecessary - instead we can just split out the two parts to the grammar into separate functions. Also, strtod recognizes a set of literals (nan, inf, and infinity - all with any capitalization) - which are not defined by any of the specs we are implementing. To handle this we need to perform additional work in toDouble to convert the unsupported cases of infinities back to NaNs. Instead we should simply remove support for this literals from strtod. This should provide a more desirable behaviour for all clients of strtod. Indexed properties: Uses of the toStrictUInt32 methods are were all converting property names to indices, and all uses of toUInt32 were incorrect; in all cases we should have been calling toUInt32. This error results in some incorrect behaviour in the DOM (accessing property "0 " of a NodeList should fail; it currently does not). Move this method onto Identifier (our canonical property name), and make it always perform a strict conversion. Add a layout test to check NodeList does convert indexed property names correctly. Test: fast/dom/NodeList/nodelist-item-with-index.html * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlot): (WebCore::JSDOMWindow::getOwnPropertyDescriptor): * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::callHTMLAllCollection): (WebCore::JSHTMLAllCollection::item): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::callHTMLCollection): (WebCore::JSHTMLCollection::item): * bindings/js/JSNodeListCustom.cpp: (WebCore::callNodeList): * bindings/scripts/CodeGeneratorJS.pm: * bridge/runtime_array.cpp: (JSC::RuntimeArray::getOwnPropertySlot): (JSC::RuntimeArray::getOwnPropertyDescriptor): (JSC::RuntimeArray::put): 2010-08-18 Adam Barth Reviewed by Adele Peterson. Null dereference in DOMSelection::deleteFromDocument https://bugs.webkit.org/show_bug.cgi?id=44153 deleteFromDocument checks selection->isNone() before calling selection->selection().toNormalizedRange(), but toNormalizedRange() notes that it needs to updateLayout(), which can make the selection isNone() again. In that case, we crash on a NULL pointer in deleteFromDocument. I don't know how to trigger that situation in a test, but cross_fuzz was able to hit it, so we should fix it. * page/DOMSelection.cpp: (WebCore::DOMSelection::deleteFromDocument): 2010-08-17 Girish Ramakrishnan Reviewed by Antonio Gomes. [Qt] On Maemo5, there is no libgdk-x11-2.0.so symlink. Look for libgdk-x11-2.0.so.0 instead on X11 and Maemo5. https://bugs.webkit.org/show_bug.cgi?id=44043 * plugins/qt/PluginViewQt.cpp: (WebCore::getPluginDisplay): 2010-08-17 Ariya Hidayat Reviewed by Antonio Gomes. [Qt] Remove unused ContextShadowParameter class in GraphicsContextQt https://bugs.webkit.org/show_bug.cgi?id=44142 The class is not needed anymore after r65425. We know have dedicated ContextShadow in its own file. * platform/graphics/qt/GraphicsContextQt.cpp: 2010-08-17 Jesus Sanchez-Palencia Reviewed by Darin Adler. Add NetworkingContext to avoid layer violations https://bugs.webkit.org/show_bug.cgi?id=42292 Preparation: Just add the files to the build system. * GNUmakefile.am: Added new files. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * loader/FrameNetworkingContext.h: Added. * platform/network/NetworkingContext.h: Added. Placeholders with tentative code that might be changed when landing the rest of it. 2010-08-17 Mihai Parparita Reviewed by Darin Fisher. Back button after Google search result click broken https://bugs.webkit.org/show_bug.cgi?id=44086 Test: fast/history/redirect-via-iframe.html isLoadingInAPISense doesn't quite map to onload (it also returns true if frames are loading, even after the parent frame has fired its onload handler). Instead, add a flag for the onload event being fired, and use that. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): * loader/DocumentLoader.h: (WebCore::DocumentLoader::handledOnloadEvents): (WebCore::DocumentLoader::wasOnloadHandled): * loader/FrameLoader.cpp: (WebCore::FrameLoader::handledOnloadEvents): * loader/RedirectScheduler.cpp: (WebCore::RedirectScheduler::mustLockBackForwardList): 2010-08-17 Steve Block Reviewed by Jeremy Orlow. Geolocation clearWatch() needs to protect against invalid IDs https://bugs.webkit.org/show_bug.cgi?id=44096 If the ID passed to clearWatch() is invalid, we early-out. Test: fast/dom/Geolocation/clear-watch-invalid-id-crash.html * page/Geolocation.cpp: (WebCore::Geolocation::Watchers::set): (WebCore::Geolocation::Watchers::remove): (WebCore::Geolocation::watchPosition): (WebCore::Geolocation::clearWatch): 2010-08-17 Stephen White Reviewed by David Levin. Allow non-Skia ports to compile with ENABLE(ACCELERATED_2D_CANVAS). https://bugs.webkit.org/show_bug.cgi?id=44130 No tests; if it compiles, it's good. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Fix a warning (treated as error). * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setGraphicsContext3D): (WebCore::GraphicsContext::syncSoftwareCanvas): * platform/graphics/GraphicsContext.h: Make setGraphicsContext3D() and syncSoftwareCanvas() stubbed out, but still present in non-Skia ports. This allows Chrome Mac to compile with ENABLE(ACCELERATED_2D_CANVAS) (although it isn't hooked up yet, it should at least compile). 2010-08-17 Brady Eidson Reviewed by Sam Weinig. Navigating back/forward during a modal dialog causes a crash when the modal dialog is dismissed. and https://bugs.webkit.org/show_bug.cgi?id=44131 No new tests. (Especially since DRT doesn't spin inner run loops at all, it would be a significant effort to give it the ability to perform the back/forward navigation in the background to reproduce this bug) Manual tests in place of layout tests: * manual-tests/back-forward-during-alert-1.html: Added. * manual-tests/back-forward-during-alert-2.html: Added. * page/Page.cpp: (WebCore::Page::goToItem): 2010-08-17 Ojan Vafai Reviewed by Tony Chang. selectionStart clobbered if textarea isn't focused https://bugs.webkit.org/show_bug.cgi?id=43814 If a text control is blurred, setting selectionStart/end should use the cached selection value, which is currently stored on the form control element. Test: fast/forms/text-control-select-blurred.html * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setSelectionStart): (WebCore::RenderTextControl::setSelectionEnd): 2010-08-17 Dmitry Titov Reviewed by David Levin. MessagePort.close() crashes if the owning context was destroyed. https://bugs.webkit.org/show_bug.cgi?id=43140 Test: fast/events/message-port-context-destroyed.html * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): (WebCore::MessagePort::start): (WebCore::MessagePort::close): (WebCore::MessagePort::contextDestroyed): Use isEntangled() method to gate various operations on MessagePort. This method also takes into account m_closed bit. * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::stopActiveDOMObjects): (WebCore::ScriptExecutionContext::closeMessagePorts): * dom/ScriptExecutionContext.h: Add closeMessagePorts() method that closes message ports at the same moments when other ActiveDOMObjects are stopped. 2010-08-17 Fady Samuel Reviewed by David Hyatt. Updated table cell hit testing and painting to use binary search instead of linear scan. Improved Table Hit Testing and Painting Performance https://bugs.webkit.org/show_bug.cgi?id=43933 Tests: fast/table/simple_paint.html tables/hittesting/filltable-emptycells.html tables/hittesting/filltable-levels.html tables/hittesting/filltable-outline.html tables/hittesting/filltable-rtl.html tables/hittesting/filltable-stress.html * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintObject): Dirty rect determined using binary search. (WebCore::RenderTableSection::nodeAtPoint): Cell hit determined using binary search 2010-08-17 Abhishek Arya Reviewed by Dave Hyatt. Only destroy empty anonymous block when it is columns or column span block in RenderBlock::removeChild. https://bugs.webkit.org/show_bug.cgi?id=44035 Test: fast/block/basic/empty-anonymous-block-remove-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): 2010-08-17 Darin Fisher Reviewed by Darin Adler. [Chromium] REGRESSION: Incorrect repaint on scrolling with position:fixed elements https://bugs.webkit.org/show_bug.cgi?id=42949 This is a partial revert of http://trac.webkit.org/changeset/63907 * page/FrameView.cpp: (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): (WebCore::FrameView::scrollPositionChanged): * platform/ScrollView.cpp: (WebCore::ScrollView::valueChanged): 2010-08-17 Sheriff Bot Unreviewed, rolling out r65528. http://trac.webkit.org/changeset/65528 https://bugs.webkit.org/show_bug.cgi?id=44123 "Broke a bunch of canvas tests on Chrome win/linux." (Requested by senorblanco on #webkit). * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (WebCore::BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::drawsUsingCopy): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::create): * platform/graphics/skia/NativeImageSkia.cpp: * platform/graphics/skia/NativeImageSkia.h: 2010-08-17 Martin Robinson Reviewed by David Hyatt. [Cairo] Remove unnecessary full-surface copies from ImageCairo and GraphicsContextCairo https://bugs.webkit.org/show_bug.cgi?id=44076 No new tests as functionality has not changed. * GNUmakefile.am: Added GRefPtrCairo to the sources list. * platform/graphics/cairo/GRefPtrCairo.cpp: Added. (WTF::refGPtr): Added specializations for cairo_t and cairo_surface_t. (WTF::derefGPtr): * platform/graphics/cairo/GRefPtrCairo.h: Added. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::createPlatformShadow): Access the image surface directly from the ImageBuffer instead of wrapping it in an Image. * platform/graphics/cairo/ImageCairo.cpp: (WebCore::Image::drawPattern): Create the temporary surface using cairo primitives instead of through the platform-independent WebCore code. 2010-08-17 Martin Robinson [GTK] Clean up WebCore/platform/graphics/gtk/ImageGtk.cpp https://bugs.webkit.org/show_bug.cgi?id=44069 No new tests as functionality has not changed. * GNUmakefile.am: Add WEBKITGTK_API_VERSION_STRING definition, which allows WebCore to use this as well. * platform/graphics/gtk/ImageGtk.cpp: (getWebKitDataDirectory): Added this helper. (WebCore::Image::loadPlatformResource): Use GOwnPtr for gchar pointers and use the new getWebKitDataDirectory helper. * platform/gtk/GOwnPtrGtk.cpp: Move the GtkIconInfo template specialization to this file. (WTF::GtkIconInfo): Added this forward declaration. * platform/gtk/GOwnPtrGtk.h: Declaration for new template specialization. 2010-08-17 Stephen White Reviewed by Darin Fisher. [CHROMIUM] Eliminate a memcpy() from the canvas.drawImage(canvas, ...) path. This is the Skia followup to Dave Hyatt's patch in r65449. https://bugs.webkit.org/show_bug.cgi?id=44115 Covered by canvas layout tests. * platform/graphics/skia/BitmapImageSingleFrameSkia.h: Add a "copyPixels" argument to the create() static to indicate if the caller wants the pixels to be copied or ref'ed. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::drawsUsingCopy): We don't use the always-copy path anymore, so return false. (WebCore::ImageBuffer::copyImage): Shouldn't get here anymore, so ASSERT_NOT_REACHED. (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): Create a temporary BitampImageSingleFrameSkia wrapped around the canvas's bitmap, and draw with it immediately. If drawing to our own canvas, copy the pixels, otherwise just shallow copy. * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia): Make the constructor take an SkBitmap to be wrapped. (WebCore::BitmapImageSingleFrameSkia::create): Implement the "copyPixels" flag: if true, do a deep copy, otherwise do a shallow copy. * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::NativeImageSkia): * platform/graphics/skia/NativeImageSkia.h: Implement a new constructor that shallow-copies the given SkBitmap. 2010-08-17 Jian Li Reviewed by Darin Fisher. Move BlobRegistry interface and implementation to platform/network https://bugs.webkit.org/show_bug.cgi?id=44116 Also move BlobData and BlobStorageData since they're part of BlobRegistry implementation. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/network/BlobData.cpp: Renamed from WebCore/platform/BlobData.cpp. * platform/network/BlobData.h: Renamed from WebCore/platform/BlobData.h. * platform/network/BlobRegistry.h: Renamed from WebCore/platform/BlobRegistry.h. * platform/network/BlobRegistryImpl.cpp: Renamed from WebCore/html/BlobRegistryImpl.cpp. * platform/network/BlobRegistryImpl.h: Renamed from WebCore/html/BlobRegistryImpl.h. * platform/network/BlobStorageData.h: Renamed from WebCore/html/BlobStorageData.h. 2010-08-17 Andreas Kling Reviewed by Ariya Hidayat. [Qt] Path: Fast approximation of stroke bounding rects https://bugs.webkit.org/show_bug.cgi?id=44014 In canvas's stroke(), use QPainterPath::controlPointRect() to calculate a slightly larger bounding rect in a fraction of the time. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): 2010-08-17 Girish Ramakrishnan Reviewed by Kenneth Rohde Christiansen. Set PluginQuirkRequiresDefaultScreenDepth for all Flash versions and not just Flash 10. https://bugs.webkit.org/show_bug.cgi?id=44043 * plugins/PluginPackage.cpp: (WebCore::PluginPackage::determineQuirks): 2010-08-17 Jian Li Reviewed by David Levin. Change FileStream implementation to prepare for blob resource handling. https://bugs.webkit.org/show_bug.cgi?id=43985 Change FileStream to support synchronous usage only. All the asychronous logics are moved to FileStreamProxy. Update the existing FileReader code to adapt to this change. * html/FileReader.cpp: Account for FileStreamProxy changes. (WebCore::FileReader::didStart): (WebCore::FileReader::didGetSize): (WebCore::FileReader::didOpen): (WebCore::FileReader::didRead): * html/FileReader.h: * html/FileStream.cpp: Remove m_client and make all calls synchronous only. (WebCore::FileStream::FileStream): (WebCore::FileStream::start): (WebCore::FileStream::stop): (WebCore::FileStream::getSize): (WebCore::FileStream::openForRead): (WebCore::FileStream::openForWrite): (WebCore::FileStream::close): (WebCore::FileStream::read): (WebCore::FileStream::write): (WebCore::FileStream::truncate): * html/FileStream.h: Add getSize() and make all calls synchronous by adding return values. (WebCore::FileStream::create): * html/FileStreamClient.h: Account for FileStreamProxy changes. (WebCore::FileStreamClient::didRead): (WebCore::FileStreamClient::didTruncate): (WebCore::FileStreamClient::didOpen): * html/FileStreamProxy.cpp: All the logics to handle asynchronous calls are wrapped here. (WebCore::FileStreamProxy::FileStreamProxy): (WebCore::FileStreamProxy::create): (WebCore::FileStreamProxy::fileThread): (WebCore::didStart): (WebCore::FileStreamProxy::startOnFileThread): (WebCore::FileStreamProxy::stop): (WebCore::derefProxyOnContext): (WebCore::FileStreamProxy::stopOnFileThread): (WebCore::didGetSize): (WebCore::FileStreamProxy::getSize): (WebCore::FileStreamProxy::getSizeOnFileThread): (WebCore::didOpen): (WebCore::FileStreamProxy::openForRead): (WebCore::FileStreamProxy::openForReadOnFileThread): (WebCore::FileStreamProxy::openForWrite): (WebCore::FileStreamProxy::openForWriteOnFileThread): (WebCore::FileStreamProxy::close): (WebCore::FileStreamProxy::closeOnFileThread): (WebCore::didRead): (WebCore::FileStreamProxy::read): (WebCore::FileStreamProxy::readOnFileThread): (WebCore::didWrite): (WebCore::FileStreamProxy::write): (WebCore::FileStreamProxy::writeOnFileThread): (WebCore::didTruncate): (WebCore::FileStreamProxy::truncate): (WebCore::FileStreamProxy::truncateOnFileThread): * html/FileStreamProxy.h: * html/FileThreadTask.h: Change all methods to return void since return value is not needed now. 2010-08-17 Dimitri Glazkov Returned WebCore.xcodeproj to default settings after http://trac.webkit.org/changeset/65468/trunk/WebCore/WebCore.xcodeproj/project.pbxproj. * WebCore.xcodeproj/project.pbxproj: Removed developmentRegion = English line. 2010-08-17 Dimitri Glazkov Reviewed by Eric Seidel. Eliminate extra traversal of the tree when determining ability to lazy-attach a Node. https://bugs.webkit.org/show_bug.cgi?id=43749 Land the actual change that I intended to land in http://trac.webkit.org/changeset/65508. Neither SVG nor inputs/counters shadow DOM are traveling down this path (they home-bake their attachment), so the check for shadow tree existence isn't needed. Gives a small, but consistent win in Dromaeo's DOM Modification test. * dom/Node.h: (WebCore::Node::canLazyAttach): Changed to always return true. 2010-08-17 Tor Arne Vestbø Reviewed by Eric Carlson. Restore intrinsic size of video elements after loading poster The element might already have the instrinsic size of the video, in which case we don't want to override it witht that of the image. * rendering/RenderVideo.cpp: call updateIntrinsicSize() to restore size 2010-08-17 Mahesh Kulkarni Reviewed by Steve Block. Geolocation preemptive permissions policy is buggy https://bugs.webkit.org/show_bug.cgi?id=42811 While waiting for permission, m_startRequestPermissionNotifier was used to consider only one pending request. This patch implements a set m_pendingForPermissionNotifiers to maintain set of pending requests. When user grants/denies permission all listeners will be notified. Also fixed issue with hasZeroTimeout() where startTimerIfNeeded() has to start irrespective of permission state Tests: fast/dom/Geolocation/delayed-permission-allowed-for-multiple-requests.html fast/dom/Geolocation/delayed-permission-denied-for-multiple-requests.html * WebCore.pro: * page/Geolocation.cpp: (WebCore::Geolocation::startRequest): (WebCore::Geolocation::setIsAllowed): (WebCore::Geolocation::startUpdating): (WebCore::Geolocation::handlePendingPermissionNotifiers): * page/Geolocation.h: 2010-08-11 Jeremy Orlow Beginnings of IndexedDB persistance + IDBDatabase.description fleshed out https://bugs.webkit.org/show_bug.cgi?id=43744 The beginnings of a SQLite backend for IndexedDB. Right now, only persists meta-data for the database. The rest is coming in future patches. Adds a manual test to verify persistance. Test: storage/indexeddb/database-description.html + a manual test * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * manual-tests/indexed-database.html: Added. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::databaseIdentifier): * platform/FileSystem.cpp: Added. (WebCore::): (WebCore::shouldEscapeUChar): (WebCore::encodeForFileName): * platform/FileSystem.h: * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::IDBDatabase): * storage/IDBDatabase.h: (WebCore::IDBDatabase::description): * storage/IDBDatabaseBackendImpl.cpp: (WebCore::extractMetaData): (WebCore::setMetaData): (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::setDescription): * storage/IDBDatabaseBackendImpl.h: (WebCore::IDBDatabaseBackendImpl::create): * storage/IDBFactory.h: * storage/IDBFactory.idl: * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl): (WebCore::IDBFactoryBackendImpl::~IDBFactoryBackendImpl): (WebCore::openSQLiteDatabase): (WebCore::createTables): (WebCore::IDBFactoryBackendImpl::open): * storage/IDBFactoryBackendImpl.h: (WebCore::IDBFactoryBackendImpl::create): 2010-08-17 Dimitri Glazkov Reviewed by Eric Seidel. Eliminate extra traversal of the tree when determining ability to lazy-attach a Node. https://bugs.webkit.org/show_bug.cgi?id=43749 Neither SVG nor inputs/counters shadow DOM are traveling down this path (they home-bake their attachment), so the check for shadow tree existence isn't needed. Gives a small, but consisten win in Dromaeo's DOM Modification test. * dom/Node.cpp: Removed canLazyAttach declaration. * dom/Node.h: (WebCore::Node::canLazyAttach): Changed to always return true. 2010-08-17 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: [CRASH] Console formatting crashes after cross-domain navigation. https://bugs.webkit.org/show_bug.cgi?id=44103 * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::injectedScriptFor): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::injectedScriptFor): * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::addToFrontend): 2010-08-17 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: upstream Chromium debugger step tests https://bugs.webkit.org/show_bug.cgi?id=44106 Tests: inspector/debugger-step-in.html inspector/debugger-step-out.html inspector/debugger-step-over.html * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::returnEvent): check that debugger is still attached after continue to ensure that current call frame is not 0. 2010-08-17 Ademar de Souza Reis Jr Reviewed by David Levin. Trivial fix removing the self-inclusion of a couple of header files. Self inclusion in Document.h and RenderTheme.h https://bugs.webkit.org/show_bug.cgi?id=44065 * dom/Document.h: * rendering/RenderTheme.h: 2010-08-17 No'am Rosenthal Reviewed by Ariya Hidayat. [Qt] Move the accelerated compositing build flag to the right place https://bugs.webkit.org/show_bug.cgi?id=43882 No new tests: build fix. * WebCore.pro: 2010-08-17 Sheriff Bot Unreviewed, rolling out r65500. http://trac.webkit.org/changeset/65500 https://bugs.webkit.org/show_bug.cgi?id=44108 Qt bots failed to compile. (Requested by loislo on #webkit). * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/copyInspectorFiles.cmd: * WebCore.xcodeproj/project.pbxproj: * combine-javascript-resources: * inspector/CodeGeneratorInspector.pm: * inspector/front-end/InspectorBackendStub.js: Added. (WebInspector.InspectorBackendStub): (WebInspector.InspectorBackendStub.prototype._registerDelegate): (WebInspector.InspectorBackendStub.prototype.sendMessageToBackend): * inspector/front-end/InspectorBackendStub.qrc: Removed. * inspector/front-end/WebKit.qrc: 2010-08-17 Ilya Tikhonovsky Reviewed by Yury Semikhatsky. Web Inspector: replace hand written InspectorBackendStub.js by generated one. New command-line flag was added to combine-javascript-resources. It specifies the location of generated scripts. https://bugs.webkit.org/show_bug.cgi?id=43791 * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * combine-javascript-resources: * inspector/CodeGeneratorInspector.pm: * inspector/front-end/InspectorBackendStub.js: Removed. * inspector/front-end/WebKit.qrc: 2010-08-17 Pavel Feldman Reviewed by Pavel Feldman. Web Inspector: get rid of node and scoped object-specific ids. https://bugs.webkit.org/show_bug.cgi?id=44097 * inspector/front-end/ConsoleView.js: * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._createTooltipForNode): * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/InjectedScript.js: (injectedScriptConstructor.): (injectedScriptConstructor): * inspector/front-end/InjectedScriptAccess.js: (InjectedScriptAccess): (InjectedScriptAccess.getForNode): (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName): (InjectedScriptAccess._installHandler): * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObjectId): (WebInspector.RemoteObject.resolveNode): * inspector/front-end/ScriptsPanel.js: 2010-08-17 Xan Lopez Reviewed by Gustavo Noronha. [GTK] Fix wrapping of core Events in the bindings https://bugs.webkit.org/show_bug.cgi?id=44095 Return the proper GObject type instead of hardcoding WebKitDOMEvent for all Event types. * bindings/gobject/GObjectEventListener.cpp: (WebCore::GObjectEventListener::handleEvent): * bindings/gobject/WebKitDOMBinding.cpp: (WebKit::kit): 2010-08-17 Xan Lopez Reviewed by Gustavo Noronha. Revert supposed build-fix which was in fact reverting a previous build fix which was correct (oh dear). * GNUmakefile.am: 2010-08-17 Tor Arne Vestbø Reviewed by Antonio Gomes. [Qt] Add media element support for preload=none * platform/graphics/qt/MediaPlayerPrivateQt.cpp: * platform/graphics/qt/MediaPlayerPrivateQt.h: 2010-08-17 Tor Arne Vestbø Reviewed by Antonio Gomes. [Qt] Pre-roll media when loading media elements This ensures we get correct size-hints from QtMultimedia, as well as the media states Buffering and Buffered instead of Loading and Loaded, which we use to transition into MediaPlayer::HaveEnoughData. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: * platform/graphics/qt/MediaPlayerPrivateQt.h: 2010-08-16 Tor Arne Vestbø Reviewed by Kenneth Rohde Christiansen. [Qt] Fix missing default controls for stand-alone media elements https://bugs.webkit.org/show_bug.cgi?id=35427 * css/mediaControlsQt.css: 2010-08-17 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Reduce the size of the shadow buffer to the clip region https://bugs.webkit.org/show_bug.cgi?id=44091 Instead of allocating the buffer image (for the blur support) as big as the rectangle which casts the shadow, we limit the size to the current clip region. * platform/graphics/qt/ContextShadow.cpp: (WebCore::ContextShadow::drawShadowRect): 2010-08-17 Philippe Normand Reviewed by Martin Robinson. [GStreamer] media/invalid-media-url-crash.html fails https://bugs.webkit.org/show_bug.cgi?id=42960 Implemented two ResourceHandleClient callbacks that need to notify downstream GStreamer elements of errors while accessing the resource. * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (StreamingClient::wasBlocked): (StreamingClient::cannotShowURL): 2010-08-16 Gavin Barraclough Rubber stamped by Sam Weinig Remove unnecessary includes from UString.h, add new includes as necessary. * dom/ScriptExecutionContext.h: * loader/appcache/ApplicationCache.cpp: 2010-08-16 Andreas Kling Reviewed by Darin Adler. CSS: Add fast-path for rgba() color parsing https://bugs.webkit.org/show_bug.cgi?id=42965 Test: fast/canvas/rgba-parsing.html * css/CSSParser.cpp: (WebCore::CSSParser::parseColor): Extended with support for rgba(). (WebCore::parseAlphaValue): Added, parses an alpha value using WTF::strtod() (if necessary) and clamps between 0 and 1. (WebCore::isTenthAlpha): 2010-08-16 Kinuko Yasuda Reviewed by Dumitru Daniliuc. Add idl and mock classes for FileSystem API's {File,Directory}Entry and related interfaces https://bugs.webkit.org/show_bug.cgi?id=43993 Adding DirectoryEntry, DirectoryReader, EntriesCallback and FileEntry as defined in HTML5 FileSystem API. http://dev.w3.org/2009/dap/file-system/file-dir-sys.html Also adding Makefile entries for idl and mock classes added in changeset 64414 (except for Android platforms). Tests will be added when we add underlying implementation. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * storage/DOMFileSystem.cpp: (WebCore::DOMFileSystem::root): * storage/DOMFileSystem.h: * storage/DOMFileSystem.idl: * storage/DirectoryEntry.cpp: Added. * storage/DirectoryEntry.h: Added. * storage/DirectoryEntry.idl: Added. * storage/DirectoryReader.cpp: Added. * storage/DirectoryReader.h: Added. * storage/DirectoryReader.idl: Added. * storage/EntriesCallback.h: Added. * storage/EntriesCallback.idl: Added. * storage/EntryArray.cpp: Added. * storage/EntryArray.h: Added. * storage/EntryArray.idl: Added. * storage/Entry.cpp: (WebCore::Entry::Entry): (WebCore::Entry::getMetadata): (WebCore::Entry::moveTo): (WebCore::Entry::copyTo): (WebCore::Entry::remove): (WebCore::Entry::getParent): * storage/Entry.h: (WebCore::Entry::isFile): (WebCore::Entry::isDirectory): * storage/Entry.idl: * storage/FileEntry.cpp: Added. * storage/FileEntry.h: Added. * storage/FileEntry.idl: Added. 2010-08-16 Andreas Kling Reviewed by Ariya Hidayat. [Qt] Path::closeSubpath() should only close the last subpath if it has >1 point https://bugs.webkit.org/show_bug.cgi?id=44061 Spec link: http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-closepath Test: fast/canvas/canvas-closePath-single-point.html * platform/graphics/Path.h: Add a Qt-only member to track the last subpath. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::closeSubpath): Only close the last subpath if it has more than 1 point. Otherwise behave as moveTo(first point in last subpath) (WebCore::Path::Path): (WebCore::Path::operator=): (WebCore::Path::moveTo): (WebCore::Path::transform): 2010-08-16 Nate Chapin Unreviewed, Chromium mac build fix (with help from jamesr). * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): 2010-08-16 Gavin Barraclough Reviewed by Sam Weinig Bug 44080 - String find/reverseFind methods need tidying up These methods have a couple of problems with their interface, and implementation. These methods take and int index, and return an int - however this is problematic since on 64-bit string indices may have a full 32-bit range. This spills out into surrounding code, which unsafely casts string indices from unsigned to int. Code checking the result of these methods check for a mix of "== -1", "< 0", and "== notFound". Clean this up by changing these methods to take an unsigned starting index, and return a size_t. with a failed match indicated by notFound. reverseFind also has a special meaning for the starting index argument, in that a negative index is interpreted as an offset back from the end of the string. Remove this functionality, in the (1!) case where it is used we should just calculate the offset by subtracting from the string's length. The implementation has a few problems too. The code is not in webkit style, in using assorted abbreviations in variable names, and implementations of similar find methods with differing argument types were unnecessarily inconsistent. When find is passed const char* data the string would be handled as latin1 (zero extended to UTF-16) for all characters but the first; this is sign extended. Case-insensitive find is broken for unicode strings; the hashing optimization is not unicode safe, and could result in false negatives. Unify UString find methods to match String. * css/CSSSelector.cpp: (WebCore::CSSSelector::RareData::parseNth): * css/CSSStyleDeclaration.cpp: (WebCore::CSSStyleDeclaration::setProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * dom/Document.cpp: (WebCore::Document::getImageMap): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::inputText): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextBox): * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertText): * editing/markup.cpp: (WebCore::fillContainerFromString): (WebCore::createFragmentFromText): * html/File.cpp: (WebCore::File::Init): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::setHost): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::performSearch): * loader/CrossOriginPreflightResultCache.cpp: (WebCore::parseAccessControlAllowList): * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::substituteMIMETypeFromPluginDatabase): * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::parseHeader): (WebCore::parseHeaders): * loader/icon/IconFetcher.cpp: (WebCore::parseIconLink): * page/DOMWindow.cpp: (WebCore::DOMWindow::parseModalDialogFeatures): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::createFromDatabaseIdentifier): * page/UserContentURLPattern.cpp: (WebCore::UserContentURLPattern::parse): * page/XSSAuditor.cpp: (WebCore::XSSAuditor::findInRequest): * platform/ContentType.cpp: (WebCore::ContentType::parameter): (WebCore::ContentType::type): * platform/KURL.cpp: (WebCore::KURL::lastPathComponent): (WebCore::KURL::setProtocol): (WebCore::decodeURLEscapeSequences): (WebCore::substituteBackslashes): (WebCore::mimeTypeFromDataURL): * platform/Length.cpp: (WebCore::newCoordsArray): (WebCore::newLengthArray): * platform/LinkHash.cpp: (WebCore::findSlashDotDotSlash): (WebCore::findSlashSlash): (WebCore::findSlashDotSlash): (WebCore::cleanPath): * platform/MIMETypeRegistry.cpp: (WebCore::MIMETypeRegistry::getMIMETypeForPath): * platform/SchemeRegistry.cpp: (WebCore::SchemeRegistry::shouldTreatURLAsLocal): * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::load): * platform/mac/DragImageMac.mm: (WebCore::createDragImageIconForCachedImage): * platform/network/CredentialStorage.cpp: (WebCore::protectionSpaceMapKeyFromURL): (WebCore::findDefaultProtectionSpaceForURL): * platform/network/HTTPParsers.cpp: (WebCore::skipWhiteSpace): (WebCore::skipToken): (WebCore::parseHTTPRefresh): (WebCore::filenameFromHTTPContentDisposition): (WebCore::findCharsetInMediaType): (WebCore::parseXSSProtectionHeader): (WebCore::extractReasonPhraseFromHTTPStatusLine): * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::isAttachment): (WebCore::parseCacheHeader): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::updateWidget): * storage/Entry.cpp: (WebCore::Entry::Entry): * svg/SVGFont.cpp: (WebCore::isCompatibleGlyph): * svg/SVGURIReference.cpp: (WebCore::SVGURIReference::getTarget): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::parseClockValue): (WebCore::SVGSMILElement::parseCondition): * xml/XPathFunctions.cpp: (WebCore::XPath::FunSubstringBefore::evaluate): (WebCore::XPath::FunSubstringAfter::evaluate): (WebCore::XPath::FunTranslate::evaluate): (WebCore::XPath::FunLang::evaluate): * xml/XPathParser.cpp: (WebCore::XPath::Parser::expandQName): 2010-08-16 Ryosuke Niwa Reviewed by Tony Chang. REGRESSION(r65208): editing/pasteboard/smart-paste-003.html and smart-paste-004.html crash on Windows Chromium https://bugs.webkit.org/show_bug.cgi?id=44070 The crash was caused by start or end node being removed in pushDownInlineStyleAroundNode. It made start and end orphaned, and caused s.node() to be detached from the document. Fixed the crash by using nodes passed to pushDownInlineStyleAroundNode for start and end if the original start and end are orphaned because pushDownInlineStyleAroundNode won't prune targetNode. Test: editing/pasteboard/smart-paste-003-trailing-whitespace.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeInlineStyle): 2010-08-16 James Robinson Compile fix. Remove ANGLEWebKitBridge classes from Chromium build. They are unused. * WebCore.gypi: 2010-08-16 Vincent Scheib Reviewed by Dimitri Glazkov. Canvas2D does not support images larger than system's GPU max texture size https://bugs.webkit.org/show_bug.cgi?id=43864 A new class "TilingData" has been created that provides logic for splitting a large image into a series of smaller tiles. GLES2Texture and CLES2Canvas are modified to use the TilingData to split images on texture upload and render one logical image as many smaller images. TilingData is tested via unit tests in WebKit/chromium/tests/TilingDataTest.cpp * WebCore.gypi: * platform/graphics/chromium/GLES2Canvas.cpp: (WebCore::GLES2Canvas::drawTexturedRect): (WebCore::GLES2Canvas::drawTexturedRectTile): * platform/graphics/chromium/GLES2Canvas.h: * platform/graphics/chromium/GLES2Texture.cpp: (WebCore::GLES2Texture::GLES2Texture): (WebCore::GLES2Texture::~GLES2Texture): (WebCore::GLES2Texture::create): (WebCore::copySubRect): (WebCore::GLES2Texture::load): (WebCore::GLES2Texture::bindTile): * platform/graphics/chromium/GLES2Texture.h: (WebCore::GLES2Texture::tiles): * platform/graphics/chromium/TilingData.cpp: Added. (WebCore::computeNumTiles): (WebCore::TilingData::TilingData): (WebCore::TilingData::tileXIndexFromSrcCoord): (WebCore::TilingData::tileYIndexFromSrcCoord): (WebCore::TilingData::tileBounds): (WebCore::TilingData::tileBoundsWithBorder): (WebCore::TilingData::tileBoundsNormalized): (WebCore::TilingData::tilePositionX): (WebCore::TilingData::tilePositionY): (WebCore::TilingData::tileSizeX): (WebCore::TilingData::tileSizeY): (WebCore::TilingData::overlappedTileIndices): (WebCore::TilingData::intersectDrawQuad): * platform/graphics/chromium/TilingData.h: Added. (WebCore::TilingData::maxTextureSize): (WebCore::TilingData::totalSizeX): (WebCore::TilingData::totalSizeY): (WebCore::TilingData::numTiles): (WebCore::TilingData::numTilesX): (WebCore::TilingData::numTilesY): (WebCore::TilingData::tileIndex): (WebCore::TilingData::tileXIndex): (WebCore::TilingData::tileYIndex): (WebCore::TilingData::TilingData): (WebCore::TilingData::assertTile): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::uploadSoftwareToHardware): 2010-08-16 David Hyatt Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=43507, stop ImageBuffer from copying its data when rendering after canvas changes happen. This patch renames ImageBuffer::image() to ImageBuffer::copyImage(). The new method always returns a new copy that is a current snapshot of the ImageBuffer. To draw an ImageBuffer, you now use new GraphicsContext calls: drawImageBuffer. Platforms can then optimize these calls to draw efficiently without having to copy the bits of the ImageBuffer into an Image. * WebCore.xcodeproj/project.pbxproj: * css/CSSCanvasValue.cpp: (WebCore::CSSCanvasValue::image): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::willDraw): (WebCore::HTMLCanvasElement::reset): (WebCore::HTMLCanvasElement::paint): (WebCore::HTMLCanvasElement::setSurfaceSize): (WebCore::HTMLCanvasElement::copiedImage): (WebCore::HTMLCanvasElement::clearCopiedImage): * html/HTMLCanvasElement.h: * html/canvas/CanvasPattern.cpp: (WebCore::CanvasPattern::CanvasPattern): * html/canvas/CanvasPattern.h: (WebCore::CanvasPattern::create): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): (WebCore::CanvasRenderingContext2D::createPattern): (WebCore::CanvasRenderingContext2D::drawTextInternal): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas): (WebCore::WebGLRenderingContext::reshape): (WebCore::WebGLRenderingContext::texImage2D): (WebCore::WebGLRenderingContext::texSubImage2D): * html/canvas/WebGLRenderingContext.h: (WebCore::WebGLRenderingContext::paintsIntoCanvasBuffer): * platform/graphics/GeneratedImage.cpp: (WebCore::GeneratedImage::drawPattern): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::clipToImageBuffer): * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer): * platform/graphics/Image.h: * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::width): (WebCore::ImageBuffer::height): * platform/graphics/Pattern.cpp: (WebCore::Pattern::Pattern): * platform/graphics/Pattern.h: (WebCore::Pattern::create): * platform/graphics/cairo/GraphicsContextCairo.cpp: * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::drawsUsingCopy): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::clip): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::drawsUsingCopy): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::clip): * platform/graphics/cg/ImageBufferData.h: * platform/graphics/filters/FEColorMatrix.cpp: (WebCore::FEColorMatrix::apply): * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::apply): * platform/graphics/filters/SourceAlpha.cpp: (WebCore::SourceAlpha::apply): * platform/graphics/filters/SourceGraphic.cpp: (WebCore::SourceGraphic::apply): * platform/graphics/mac/GraphicsContext3DMac.mm: * platform/graphics/qt/GraphicsContext3DQt.cpp: * platform/graphics/qt/GraphicsContextQt.cpp: * platform/graphics/qt/ImageBufferData.h: * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBufferData::ImageBufferData): (WebCore::ImageBuffer::drawsUsingCopy): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::clip): * platform/graphics/skia/GraphicsContextSkia.cpp: * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::drawsUsingCopy): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::clip): (WebCore::): * platform/graphics/wx/GraphicsContextWx.cpp: * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::drawsUsingCopy): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::clip): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::paint): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::applyClippingToContext): * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/RenderSVGResourceGradient.cpp: (WebCore::clipToTextMask): * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintProgressBar): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::build): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImageForCurrentFrame): * svg/graphics/SVGImage.h: * svg/graphics/filters/SVGFEMerge.cpp: (WebCore::FEMerge::apply): * svg/graphics/filters/SVGFEOffset.cpp: (WebCore::FEOffset::apply): * svg/graphics/filters/SVGFETile.cpp: (WebCore::FETile::apply): 2010-08-16 Paul Sawaya Reviewed by Chris Marrin. Added shader validation via ANGLE https://bugs.webkit.org/show_bug.cgi?id=42405 Added validation to WebGL via ANGLE * Configurations/WebCore.xcconfig: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/ANGLEWebKitBridge.cpp: Added. (WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge): (WebCore::ANGLEWebKitBridge::~ANGLEWebKitBridge): (WebCore::ANGLEWebKitBridge::validateShaderSource): * platform/graphics/ANGLEWebKitBridge.h: Added. (WebCore::): (WebCore::ANGLEWebKitBridge::setResources): * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::): * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::shaderSource): (WebCore::GraphicsContext3D::getShaderiv): (WebCore::GraphicsContext3D::getShaderInfoLog): (WebCore::GraphicsContext3D::getShaderSource): 2010-08-16 Kevin Ollivier [wx] Build fix, do not build WebCore as a convenience library as this leads to errors in the Win build w/export symbols and causes problems with DOM bindings debugging in gdb. * wscript: Removed. 2010-08-16 Ilya Tikhonovsky Reviewed by Adam Roben. Current implementation of WebCore post-build step on windows platform is error prone. It would be better to extract the script into external file. https://bugs.webkit.org/show_bug.cgi?id=44058 * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/copyForwardingHeaders.cmd: Added. * WebCore.vcproj/copyInspectorFiles.cmd: Added. 2010-08-16 Kevin Ollivier [wx] Fix typo in previous build fix. * platform/graphics/WOFFFileFormat.cpp: 2010-08-16 Alex Milowski Reviewed by David Levin. Added the configuration of the MathML related files. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2010-08-16 Pavel Feldman Not reviewed: fix Leopard Release inspector tests. * inspector/front-end/inspector.js: 2010-08-16 Marcus Bulach Reviewed by Jeremy Orlow. Implements IDBKeyPath extractor. https://bugs.webkit.org/show_bug.cgi?id=43276 Unit-test IDBKeyPathExtractorTest.cpp. LayoutTests will arrive as IndexedDB infrastructure is fleshed out. * bindings/v8/IDBBindingUtilities.cpp: (WebCore::getValueFrom): (WebCore::createIDBKeyFromSerializedValueAndKeyPath): * bindings/v8/IDBBindingUtilities.h: 2010-08-13 Gustavo Noronha Silva Reviewed by Kenneth Rohde Christiansen and Martin Robinson. [GTK] GTK+ drawing idle starved https://bugs.webkit.org/show_bug.cgi?id=43994 Tune down the priority of the shared timers to guarantee GTK+ has an opportunity to redraw. * platform/gtk/SharedTimerGtk.cpp: (WebCore::setSharedTimerFireTime): 2010-08-16 Leandro Pereira [EFL] Build fix after r65366. EFL port does not support automated tests yet. * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if they're empty. 2010-08-16 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: Make InjectedScript proto-based. https://bugs.webkit.org/show_bug.cgi?id=44028 * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): (injectedScriptConstructor.): 2010-08-16 Csaba Osztrogonác Reviewed by Adam Roben. Fix warning in WebCore/plugins/win/PluginPackageWin.cpp https://bugs.webkit.org/show_bug.cgi?id=43920 * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::fetchInfo): 2010-08-16 Pavel Feldman Not reviewed. Touch inspector file to force frontend deployment. * inspector/InspectorController.cpp: 2010-08-16 Kevin Ollivier [wx] Build fix for non-Win ports on Windows. * platform/graphics/WOFFFileFormat.cpp: 2010-08-16 Adam Langley Reviewed by Tony Chang. [chromium] Improve spacing support for complex text on Linux https://bugs.webkit.org/show_bug.cgi?id=39014 Previously, our complex text support ignored word-spacing, justification and letter-spacing. This fixes the first two issues and allows us to render Scribd's HTML5 documents much better. Test: fast/text/atsui-spacing-features.html * platform/graphics/chromium/FontLinux.cpp: (WebCore::TextRunWalker::TextRunWalker): (WebCore::TextRunWalker::setWordSpacingAdjustment): (WebCore::TextRunWalker::setLetterSpacingAdjustment): (WebCore::TextRunWalker::setPadding): (WebCore::TextRunWalker::setGlyphXPositions): (WebCore::TextRunWalker::isCodepointSpace): (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForComplexText): (WebCore::Font::offsetForPositionForComplexText): (WebCore::Font::selectionRectForComplexText): 2010-08-16 Csaba Osztrogonác Reviewed by Kenneth Rohde Christiansen. Fix warnings: unknown conversion type character 'l' in format https://bugs.webkit.org/show_bug.cgi?id=43359 * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::performURLImport): Replace %zu with %lu, because Windows doesn't understand z modifier. (WebCore::IconDatabase::pruneUnretainedIcons): Use %I64i intsead of %lli on Windows. * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: (WebCore::MediaPlayerPrivate::totalTimeChanged): Use %I64d intsead of %lld on Windows. * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::setMaximumSize): Use %I64i intsead of %lli on Windows. * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::setQuota): Use %I64u intsead of %llu on Windows. 2010-08-16 Csaba Osztrogonác Reviewed by Kenneth Rohde Christiansen. Fix warnings: unknown conversion type character 'l' in format https://bugs.webkit.org/show_bug.cgi?id=43359 * loader/FTPDirectoryParser.cpp: Use %I64u format specifier instead of %llu on Windows. (WebCore::parseOneFTPLine): 2010-08-16 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Shadow blur for rectangle fill https://bugs.webkit.org/show_bug.cgi?id=44025 The blur implementation follows the approximation of Gaussian blur with three successive box blurs, working on the alpha channel only. (see http://www.w3.org/TR/SVG/filters.html#feGaussianBlur). * WebCore.pro: Refer to ContexShadow.* files. * platform/graphics/qt/ContextShadow.cpp: Added. (WebCore::ContextShadow::ContextShadow): (WebCore::ContextShadow::clear): (WebCore::blurHorizontal): Box blurs in horizontal direction, working on QImage (in-place). (WebCore::shadowBlur): Main blur function which just calls the above blurHorizontal function twice, once with transposed image (equivalent as it would have done vertical box blurs). (WebCore::ContextShadow::drawShadowRect): * platform/graphics/qt/ContextShadow.h: Added. (WebCore::ContextShadow::): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::hasShadow): (WebCore::GraphicsContext::restorePlatformState): (WebCore::GraphicsContext::fillRect): Use ContextShadow for the shadow. (WebCore::GraphicsContext::setPlatformShadow): 2010-08-16 Andras Becsi Rubber-stamped by Gustavo Noronha Silva. [GTK] Build fix for MathML code generation. No new tests needed. * GNUmakefile.am: 2010-08-16 Sheriff Bot Unreviewed, rolling out r65414. http://trac.webkit.org/changeset/65414 https://bugs.webkit.org/show_bug.cgi?id=44055 GTL & QT tests failing. (Requested by pfeldman on #webkit). * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): (injectedScriptConstructor.): 2010-08-16 Ariya Hidayat Reviewed by Antonio Gomes. [Qt] Save and restore shadow state in GraphicsContextQt https://bugs.webkit.org/show_bug.cgi?id=44031 This is needed after r65362. Use a new class ContextShadowParameter to track and keep the shadow state. We use this rather than using GraphicsContextState to allow possible optimizations (right now only to determine the shadow type, but in future it might cover things like cached scratch image, persistent shader, etc). * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::ContextShadowParameter::): (WebCore::ContextShadowParameter::ContextShadowParameter): (WebCore::ContextShadowParameter::clear): (WebCore::GraphicsContextPlatformPrivate::hasShadow): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContext::savePlatformState): (WebCore::GraphicsContext::restorePlatformState): (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::setPlatformShadow): (WebCore::GraphicsContext::clearPlatformShadow): 2010-07-28 Marcus Bulach Reviewed by Adam Barth. Implement IDBKeyPath parser. https://bugs.webkit.org/show_bug.cgi?id=42976 IDBKeyPath is an internal class, exposed only for unit tests for now. It'll allow indexed database implementation to traverse a given key path and obtain the corresponding properties from a SerializedScriptValue. * WebCore.gypi: * storage/IDBKeyPath.cpp: Added. (WebCore::IDBKeyPath::create): (WebCore::IDBKeyPath::IDBKeyPath): (WebCore::IDBKeyPath::~IDBKeyPath): (WebCore::IDBKeyPath::hasNext): (WebCore::IDBKeyPath::next): (WebCore::IDBKeyPath::identifier): (WebCore::IDBKeyPath::hasIndex): (WebCore::IDBKeyPath::indexValue): (WebCore::IDBKeyPath::parserError): (WebCore::IDBKeyPath::parse): (WebCore::IDBKeyPath::Lexer::lex): (WebCore::isSafeIdentifierStartCharacter): (WebCore::isSafeIdentifierCharacter): (WebCore::IDBKeyPath::Lexer::lexIdentifier): (WebCore::IDBKeyPath::Lexer::lexNumber): * storage/IDBKeyPath.h: Added. (WebCore::IDBKeyPath::Token::Token): (WebCore::IDBKeyPath::): (WebCore::IDBKeyPath::Lexer::Lexer): (WebCore::IDBKeyPath::Lexer::next): (WebCore::IDBKeyPath::Lexer::currentToken): 2010-08-13 Steve Block Reviewed by Alexey Proskuryakov. Geolocation requests in progress when the frame is disconnected should invoke the error callback https://bugs.webkit.org/show_bug.cgi?id=43974 If requests are ongoing when the Frame is disconnected, we abort them with a fatal error. To do this, when Geolocation::disconnectFrame() is called we call cancelAllRequests() to set a fatal error on all ongoing requests. Once the requests have made their error callbacks, they are deleted. Note that we check at callback time that the script execution context for the callback is still valid, so it's safe to attempt these callbacks even after the Geolocation object's Frame has gone. This requires a change to allow multiple calls to GeoNotifier::setFatalError(). For repeated calls, we do not replace the existing error. This ensures that when permission has been denied and the frame is then disconnected, the error callback reports the permission error, as required by the spec. Tests: fast/dom/Geolocation/disconnected-frame.html fast/dom/Geolocation/disconnected-frame-permission-denied.html * page/Geolocation.cpp: (WebCore::Geolocation::GeoNotifier::setFatalError): (WebCore::Geolocation::disconnectFrame): (WebCore::Geolocation::startRequest): (WebCore::Geolocation::cancelAllRequests): * page/Geolocation.h: 2010-08-16 Pavel Feldman Reviewed by Joseph Pecoraro. Web Inspector: upstream frontend-side WebSocket transport. https://bugs.webkit.org/show_bug.cgi?id=43970 Chromium already has an alternate WebSocket-based communication channel with the backend. Upstreaming it in this change. We will agree on the URI of the remote service as the protocol matures. * inspector/front-end/inspector.js: (.WebInspector.socket.onmessage): (.WebInspector.socket.onerror): (.WebInspector.socket.onopen): (WebInspector.loaded): (WebInspector.doLoadedDone): (WebInspector_syncDispatch): 2010-08-16 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: Make InjectedScript proto-based. https://bugs.webkit.org/show_bug.cgi?id=44028 * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): (injectedScriptConstructor.): * inspector/front-end/inspector.js: (WebInspector.loaded): 2010-08-16 Pavel Feldman Reviewed by Joseph Pecoraro. Web Inspector: [REGRESSION] console's clear command does not work. https://bugs.webkit.org/show_bug.cgi?id=44027 Test: inspector/console-command-clear.html * inspector/Inspector.idl: * inspector/InspectorBackend.cpp: * inspector/InspectorBackend.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::clearConsoleMessages): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.requestClearMessages): * inspector/front-end/inspector.js: (WebInspector.consoleMessagesCleared): 2010-08-16 Jeremy Orlow Ugh, the #if ENABLE() was supposed to be added to Settings not GroupSettings. * page/GroupSettings.cpp: (WebCore::GroupSettings::GroupSettings): (WebCore::GroupSettings::setLocalStorageQuotaBytes): * page/GroupSettings.h: * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: 2010-08-16 Jeremy Orlow Last build fix? * page/PageGroup.cpp: (WebCore::PageGroup::PageGroup): 2010-08-16 Jeremy Orlow Ugh...another build fix. * page/GroupSettings.cpp: (WebCore::GroupSettings::GroupSettings): * page/GroupSettings.h: 2010-08-16 Jeremy Orlow Build fix. * GNUmakefile.am: 2010-08-16 Jeremy Orlow Build fix. * page/PageGroup.cpp: (WebCore::PageGroup::localStorage): 2010-08-13 Jeremy Orlow Some settings are linked to the PageGroup not the Page. Create a new class for those. https://bugs.webkit.org/show_bug.cgi?id=43794 Since persistient storage is shared between pages, there's no way to modify some settings related to it on a per page basis. As such, it's not technically correct for these settings to be on the Page's settings. Create a new class called GroupSettings, move group-wide local storage setting there (the other we can't), and add a new setting for IndexedDB's path (which is prompting this change). No behavior has changed, so no tests. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/GroupSettings.cpp: Added. (WebCore::GroupSettings::GroupSettings): (WebCore::GroupSettings::setLocalStorageQuotaBytes): (WebCore::GroupSettings::setLocalStorageDatabasePath): (WebCore::GroupSettings::setIndexedDBDatabasePath): * page/GroupSettings.h: Added. (WebCore::GroupSettings::create): (WebCore::GroupSettings::localStorageQuotaBytes): (WebCore::GroupSettings::localStorageDatabasePath): (WebCore::GroupSettings::indexedDBDatabasePath): * page/PageGroup.cpp: (WebCore::PageGroup::PageGroup): (WebCore::PageGroup::localStorage): * page/PageGroup.h: (WebCore::PageGroup::groupSettings): * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setSessionStorageQuota): * page/Settings.h: 2010-08-16 Adam Barth Reviewed by Alexey Proskuryakov. HTML5 fragment parsing doesn't load iframes https://bugs.webkit.org/show_bug.cgi?id=44038 Previously, this code assumed that every source iframe was actually attached to a render tree. It tried to "keep the iframe alive" as it moved documents. However, if the iframe wasn't attached to begin with, it was never "alive," so trying to keep a dead iframe alive lead to a ... zombie iframe. Test: fast/frames/adopt-from-created-document.html * dom/Document.cpp: (WebCore::Document::adoptNode): 2010-08-13 MORITA Hajime Reviewed by Tony Chang. https://bugs.webkit.org/show_bug.cgi?id=43778 Dropping should fire textInput event This change: - added TextEvent::m_isDrop to distinguish drop-initiated events. - added to dispatch TextEvent from DragController before making a side effect and cancel the side effect if the event prevents default Tests: editing/pasteboard/drop-text-events-sideeffect.html editing/pasteboard/drop-text-events.html * dom/TextEvent.cpp: (WebCore::TextEvent::createForDrop): Added. (WebCore::TextEvent::TextEvent): * dom/TextEvent.h: (WebCore::TextEvent::isDrop): Added. * editing/Editor.cpp: (WebCore::Editor::handleTextEvent): (WebCore::Editor::findEventTargetFrom): Extracted from findEventTargetFromSelection(). (WebCore::Editor::findEventTargetFromSelection): * editing/Editor.h: * page/DragController.cpp: (WebCore::DragController::dispatchTextInputEventFor): Added. (WebCore::DragController::concludeEditDrag): Added an event dispatch path. * page/DragController.h: 2010-08-15 Ariya Hidayat Unreviewed, rolling out r65393. http://trac.webkit.org/changeset/65393 https://bugs.webkit.org/show_bug.cgi?id=44031 Breaks some canvas tests. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::): (WebCore::GraphicsContextPlatformPrivate::hasShadow): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContext::savePlatformState): (WebCore::GraphicsContext::restorePlatformState): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::setPlatformShadow): (WebCore::GraphicsContext::clearPlatformShadow): 2010-08-15 Ariya Hidayat Reviewed by Antonio Gomes. [Qt] Save and restore shadow state in GraphicsContextQt https://bugs.webkit.org/show_bug.cgi?id=44031 This is needed after r65362. Use a new class ContextShadowParameter to track and keep the shadow state. We use this rather than using GraphicsContextState to allow possible optimizations (right now only to determine the shadow type, but in future it might cover things like cached scratch image, persistent shader, etc). * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::ContextShadowParameter::): (WebCore::ContextShadowParameter::ContextShadowParameter): (WebCore::ContextShadowParameter::clear): (WebCore::GraphicsContextPlatformPrivate::hasShadow): (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContext::savePlatformState): (WebCore::GraphicsContext::restorePlatformState): (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::setPlatformShadow): (WebCore::GraphicsContext::clearPlatformShadow): 2010-08-15 Ariya Hidayat Reviewed by Antonio Gomes. [Qt] Border should not cast shadows https://bugs.webkit.org/show_bug.cgi?id=44015 Shadows should be not casted except for brush fill (which is not what drawLine and drawRect are supposed to do). * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::drawRect): Remove shadow painting, (WebCore::GraphicsContext::drawLine): ditto. 2010-08-15 Ryuan Choi Reviewed by Antonio Gomes. [EFL] Build error on r65378 https://bugs.webkit.org/show_bug.cgi?id=44019 Change build script for HTMLEntityNames.json instead of HTMLEntityNames.gperf * CMakeLists.txt: 2010-08-15 Kevin Ollivier [wx] Build fix, add missing header. * platform/graphics/WOFFFileFormat.cpp: 2010-08-15 Kevin Ollivier [wx] Build fix, don't build PluginDataNone.cpp even on GTK as PluginDataWx.cpp compiles. * wscript: 2010-08-15 Adam Barth Reviewed by Eric Seidel. document.write() doesn't flush plain text https://bugs.webkit.org/show_bug.cgi?id=8961 Originally I thought we should buffer the character tokens until we've reached the end of the input stream, but that's not how the spec handles things (it emits the character tokens one-by-one). Tests: fast/tokenizer/flush-characters-in-document-write-evil.html fast/tokenizer/flush-characters-in-document-write.html * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::emitEndOfFile): (WebCore::HTMLTokenizer::nextToken): (WebCore::HTMLTokenizer::haveBufferedCharacterToken): - Renamed this function now that it's simplier. * html/HTMLTokenizer.h: 2010-08-15 Adam Barth Reviewed by Eric Seidel. Don't try to replace a non-existent document after executing JavaScript URLs https://bugs.webkit.org/show_bug.cgi?id=44024 Synchronous JavaScript execution is evil. Previously, the frame was deleted after executing the JavaScript URL, so we'd get confused when we tried to replace its document. Test: fast/frames/javascript-url-for-deleted-frame.html * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeIfJavaScriptURL): 2010-08-14 Sheriff Bot Unreviewed, rolling out r65374. http://trac.webkit.org/changeset/65374 https://bugs.webkit.org/show_bug.cgi?id=44018 broke a myriad of svg tests (Requested by kling on #webkit). * platform/graphics/qt/PathQt.cpp: (WebCore::Path::strokeBoundingRect): 2010-08-14 Eric Seidel Reviewed by Adam Barth. XSLTProcessor.transformToFragment should not pass contextElement to html/xml document parsers https://bugs.webkit.org/show_bug.cgi?id=44017 This fixes two tests which otherwise would fail when the HTML5 TreeBuilder is enabled for fragment parsing. This revealed a bug in HTMLTreeBuilder() which I fixed as well. * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): * xml/XSLTProcessor.cpp: (WebCore::createFragmentFromSource): 2010-08-14 Andreas Kling Reviewed by Ariya Hidayat. [Qt] Path: Fast approximation of stroke bounding rects https://bugs.webkit.org/show_bug.cgi?id=44014 * platform/graphics/qt/PathQt.cpp: (WebCore::Path::strokeBoundingRect): Use QPainterPath::controlPointRect() to calculate a slightly larger bounding rect in a fraction of the time. 2010-08-14 Eric Seidel Reviewed by Adam Barth. Move innerHTML off of Range::createContextualFragment https://bugs.webkit.org/show_bug.cgi?id=44011 This makes all the editing tests stop failing under the HTML5 TreeBuilder. In a previous patch Adam disabled some of the (wrong) code in createContextualFragment when in html5 treebuilder mode. The problem is that the editing code depends on createContextualFragment (as well as the Range DOM API), so we have to leave this code in until we can figure out if it's right or wrong behavior for the Range API. This patch moves innerHTML/outerHTML off of using createContextualFragment and instead calls DocumentFragment::parseHTML directly (which is much simpler). I expect Adam and I will end up turning on the HTML5 TreeBuilder in the next couple days, and most of the if branches I added here will go away for good. I renamed Element::createContextualFragment to deprecatedCreateContextualFragment, to indicate that it's a dead API. The editing code should move off of it and consider using DocumentFragment::parseHTML instead. * dom/Element.cpp: (WebCore::Element::deprecatedCreateContextualFragment): * dom/Element.h: * dom/Range.cpp: (WebCore::Range::createContextualFragment): * editing/markup.cpp: (WebCore::createFragmentFromMarkup): * html/HTMLElement.cpp: (WebCore::useLegacyTreeBuilder): (WebCore::HTMLElement::deprecatedCreateContextualFragment): (WebCore::HTMLElement::setInnerHTML): (WebCore::HTMLElement::setOuterHTML): * html/HTMLElement.h: 2010-08-14 Tasuku Suzuki Reviewed by Antonio Gomes. [Qt] Fix compilation with QT_NO_LINEEDIT https://bugs.webkit.org/show_bug.cgi?id=38324 * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): 2010-08-14 Rob Buis Reviewed by Dirk Schulze. IE SVG empty path test fails https://bugs.webkit.org/show_bug.cgi?id=44008 Change createLine to allow creating zero-length lines. This makes it possible to have markers and line-caps applied to zero-length lines. Test: svg/custom/marker-empty-path.svg * platform/graphics/Path.cpp: (WebCore::Path::createLine): 2010-08-14 Patrick Gansterer Reviewed by Kenneth Rohde Christiansen. [CMake] Move SQL files into a IF (ENABLE_DATABASE) section https://bugs.webkit.org/show_bug.cgi?id=43979 * CMakeLists.txt: 2010-08-14 Matthew Delaney Reviewed by Kenneth Rohde Christiansen. Canvas is not reset when setting canvas.width https://bugs.webkit.org/show_bug.cgi?id=43341 * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): Moved the call to hasCreatedImageBuffer up *before* the call to setSurface since setSurface sets hasCreatedImageBuffer to false every time. 2010-08-14 Patrick Gansterer Reviewed by Kenneth Rohde Christiansen. [CMake] Set target properties only if available https://bugs.webkit.org/show_bug.cgi?id=43978 * CMakeLists.txt: 2010-08-14 Dirk Schulze Unreviewed sort of Xcode project file. * WebCore.xcodeproj/project.pbxproj: 2010-08-14 Ariya Hidayat Reviewed by Simon Hausmann and Kenneth Rohde Christiansen. [Qt] Refactor shadow state handling in GraphicsContextQt https://bugs.webkit.org/show_bug.cgi?id=44006 * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::): Added shadow states as member variables. (WebCore::GraphicsContextPlatformPrivate::hasShadow): Convenient function to check whether there is shadow or not. (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContext::drawRect): Use shadow states instead of calling getShadow. (WebCore::GraphicsContext::drawLine): ditto. (WebCore::GraphicsContext::strokeArc): ditto. (WebCore::GraphicsContext::drawConvexPolygon): ditto. (WebCore::GraphicsContext::fillPath): ditto. (WebCore::GraphicsContext::strokePath): ditto. (WebCore::GraphicsContext::fillRect): Removes the use of helper function drawBorderlessRectShadow as the code already becomes a lot simpler. (WebCore::GraphicsContext::fillRoundedRect): Removes the use of helper function drawFilledShadowPath as the code already becomes a lot simpler. (WebCore::GraphicsContext::setPlatformShadow): Store shadow states and find out the shadow type (complexity) for future use. (WebCore::GraphicsContext::clearPlatformShadow): Reset shadow states. 2010-08-13 Adam Barth Reviewed by Eric Seidel. Rename some concepts in HTML entity search to be more self-documenting https://bugs.webkit.org/show_bug.cgi?id=44004 Start and end are now first and last, which lets us use some better names for the statics in HTMLEntityTable. * html/HTMLEntityParser.cpp: (WebCore::consumeHTMLEntity): * html/HTMLEntitySearch.cpp: (WebCore::HTMLEntitySearch::HTMLEntitySearch): (WebCore::HTMLEntitySearch::findFirst): (WebCore::HTMLEntitySearch::findLast): (WebCore::HTMLEntitySearch::advance): * html/HTMLEntitySearch.h: (WebCore::HTMLEntitySearch::isEntityPrefix): (WebCore::HTMLEntitySearch::mostRecentMatch): (WebCore::HTMLEntitySearch::fail): * html/HTMLEntityTable.h: 2010-08-13 Adam Barth Fix ASSERT in XML entity parsing. You can't advance the entity search if you've already discovered that your string is not an entity. * html/HTMLEntityParser.cpp: (WebCore::decodeNamedEntity): 2010-08-13 Eric Seidel Unreviewed. Attempt at fixing Chromium build. Add support for MathML entities https://bugs.webkit.org/show_bug.cgi?id=43949 * WebCore.gyp/WebCore.gyp: - I have no clue if this is right or not. 2010-08-13 Eric Seidel Unreviewed. Attempted build fix for Windows. Add support for MathML entities https://bugs.webkit.org/show_bug.cgi?id=43949 * DerivedSources.cpp: - Add HTMLEntityTable.cpp 2010-08-09 Adam Barth Reviewed by Eric Seidel. Add support for MathML entities https://bugs.webkit.org/show_bug.cgi?id=43949 Implementing the HTML5 entity parsing algorithm require refactoring how we search for entity names. Instead of using a perfect hash, we now use a sorted list. As we advance through the input, we walk down a binary search of the table looking for an entity. Using this data structure lets us keep track of whether the current string is a prefix of an existing entity, which we need for the algorithm. In a future patch, I plan to add some indices to the table, which should let us narrow down the range of interesting entries more quickly. The one nasty piece of the algorithm is if we walk too far down the input and we need to back up to a previous match. In this patch, we accomplish this by rewinding the input and consuming a known number of characters to resync the source. * WebCore.xcodeproj/project.pbxproj: * html/HTMLEntityParser.cpp: (WebCore::consumeHTMLEntity): * html/HTMLEntitySearch.cpp: Added. (WebCore::): (WebCore::HTMLEntitySearch::HTMLEntitySearch): (WebCore::HTMLEntitySearch::compare): (WebCore::HTMLEntitySearch::findStart): (WebCore::HTMLEntitySearch::findEnd): (WebCore::HTMLEntitySearch::advance): * html/HTMLEntitySearch.h: Added. (WebCore::HTMLEntitySearch::isEntityPrefix): (WebCore::HTMLEntitySearch::currentValue): (WebCore::HTMLEntitySearch::lastMatch): (WebCore::HTMLEntitySearch::): (WebCore::HTMLEntitySearch::fail): * html/HTMLEntityTable.h: Added. (WebCore::HTMLEntityTableEntry::lastCharacter): 2010-08-13 Tony Gentilcore Reviewed by Eric Seidel. Refactor HTMLScriptRunner to allow deferred scripts to share code https://bugs.webkit.org/show_bug.cgi?id=43736 No new tests because no functional change * html/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::sourceFromPendingScript): Make const to enforce the idea that it doesn't change m_parsingBlockingScript. (WebCore::HTMLScriptRunner::executeParsingBlockingScript): Rename to make it clear this deals with the parsing blocking script and refactor to use executePendingScriptAndDispatchEvent. (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): Factored out of executePendingScript, this can be used for executing any external script. (WebCore::HTMLScriptRunner::executeScript): This can be used for executing any inline or external script. ASSERTs moved to the two calling points. (WebCore::HTMLScriptRunner::executeParsingBlockingScripts): Moved method. (WebCore::HTMLScriptRunner::requestParsingBlockingScript): Factored out requestPendingScript. (WebCore::HTMLScriptRunner::requestPendingScript): Factored out from reqeustParsingBlockingScript. (WebCore::HTMLScriptRunner::runScript): * html/HTMLScriptRunner.h: 2010-08-13 Gavin Barraclough Windows build fix. * WebCore.xcodeproj/project.pbxproj: * platform/win/SharedBufferWin.cpp: 2010-08-13 Gavin Barraclough Rubber stamped by Sam Weinig. Switch String::/UString::ascii() to return a CString. * WebCore.xcodeproj/project.pbxproj: * bridge/c/c_class.cpp: (JSC::Bindings::CClass::methodsNamed): (JSC::Bindings::CClass::fieldNamed): * bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaField::valueFromInstance): (JavaField::setValueToInstance): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::methodsNamed): (JSC::Bindings::ObjcClass::fieldNamed): * bridge/objc/objc_instance.mm: (ObjcInstance::setValueOfUndefinedField): (ObjcInstance::getValueOfUndefinedField): * loader/icon/IconRecord.cpp: * platform/sql/SQLiteDatabase.cpp: * platform/sql/SQLiteStatement.cpp: * storage/SQLStatement.cpp: 2010-08-13 Mihai Parparita Reviewed by Dimitri Glazkov. Session history should skip over JS redirects https://bugs.webkit.org/show_bug.cgi?id=42861 Lock the back/forward list for location changes and form submits that happen before the onload event fires that are not the result of user gestures. Made form submission (at the ScheduledFormSubmission level) more similar to ScheduledURLNavigation by having it call clientRedirected too, fixing a long-standing FIXME. Test: fast/history/gesture-before-onload-location-href.html, fast/history/gesture-before-onload-form-submit.html and updated expectations for http/tests/history tests that used to fail. * loader/FormSubmission.cpp: (WebCore::FormSubmission::requestURL): (WebCore::FormSubmission::populateFrameLoadRequest): * loader/FormSubmission.h: * loader/RedirectScheduler.cpp: (WebCore::ScheduledFormSubmission::ScheduledFormSubmission): (WebCore::ScheduledFormSubmission::fire): (WebCore::ScheduledFormSubmission::didStartTimer): (WebCore::ScheduledFormSubmission::didStopTimer): (WebCore::RedirectScheduler::scheduleRedirect): (WebCore::RedirectScheduler::mustLockBackForwardList): (WebCore::RedirectScheduler::scheduleLocationChange): (WebCore::RedirectScheduler::scheduleFormSubmission): * loader/RedirectScheduler.h: 2010-08-13 Leandro Pereira [EFL] Unreviewed build fix. These changes were supposed to be landed on r65319, but due to some svn-apply/commit-queue bug it wasn't fully applied. A bug was filed by Patrick Gansterer (author of the changes in this commit): https://bugs.webkit.org/show_bug.cgi?id=43981 * CMakeLists.txt: Update calls to GENERATE_GPERF and GENERATE_GRAMMAR macros. 2010-08-13 Chris Fleizach AX: isNativeCheckbox does not work as advertised https://bugs.webkit.org/show_bug.cgi?id=43872 Re-adding this patch after it was erroneously rolled out. Test: platform/mac/accessibility/native-vs-nonnative-checkboxes.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isInputImage): (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): * dom/InputElement.h: * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isCheckbox): 2010-08-13 Sheriff Bot Unreviewed, rolling out r65331. http://trac.webkit.org/changeset/65331 https://bugs.webkit.org/show_bug.cgi?id=43980 This patch breaks some shadow tests on Qt Linux release (Requested by ariya on #webkit). * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::drawFilledShadowPath): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::drawBorderlessRectShadow): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::setPlatformShadow): (WebCore::GraphicsContext::clearPlatformShadow): 2010-08-13 Kinuko Yasuda Reviewed by David Levin. Update run-bindings-tests expectations https://bugs.webkit.org/show_bug.cgi?id=43944 The results have become out of sync after changeset 64552 and 65269. Test: WebKitTools/Scripts/run-bindings-tests * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: (webkit_dom_test_callback_callback_with_class1param): (webkit_dom_test_callback_callback_with_class2param): (webkit_dom_test_callback_callback_with_non_bool_return_type): * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_void_method_with_args): (webkit_dom_test_obj_int_method_with_args): (webkit_dom_test_obj_obj_method): (webkit_dom_test_obj_obj_method_with_args): (webkit_dom_test_obj_method_that_requires_all_args): (webkit_dom_test_obj_method_that_requires_all_args_and_throws): (webkit_dom_test_obj_serialized_value): (webkit_dom_test_obj_idb_key): (webkit_dom_test_obj_with_dynamic_frame_and_user_gesture): (webkit_dom_test_obj_with_dynamic_frame_and_user_gesture_asad): (webkit_dom_test_obj_with_script_state_obj): (webkit_dom_test_obj_with_script_state_obj_exception): (webkit_dom_test_obj_get_read_only_string_attr): (webkit_dom_test_obj_get_read_only_test_obj_attr): (webkit_dom_test_obj_get_string_attr): (webkit_dom_test_obj_set_string_attr): (webkit_dom_test_obj_get_test_obj_attr): (webkit_dom_test_obj_set_test_obj_attr): (webkit_dom_test_obj_get_xml_obj_attr): (webkit_dom_test_obj_set_xml_obj_attr): (webkit_dom_test_obj_get_reflected_string_attr): (webkit_dom_test_obj_set_reflected_string_attr): (webkit_dom_test_obj_get_reflected_url_attr): (webkit_dom_test_obj_set_reflected_url_attr): (webkit_dom_test_obj_get_reflected_non_empty_url_attr): (webkit_dom_test_obj_set_reflected_non_empty_url_attr): (webkit_dom_test_obj_get_reflected_custom_url_attr): (webkit_dom_test_obj_set_reflected_custom_url_attr): (webkit_dom_test_obj_get_reflected_custom_non_empty_url_attr): (webkit_dom_test_obj_set_reflected_custom_non_empty_url_attr): (webkit_dom_test_obj_get_string_attr_with_getter_exception): (webkit_dom_test_obj_set_string_attr_with_getter_exception): (webkit_dom_test_obj_get_string_attr_with_setter_exception): (webkit_dom_test_obj_set_string_attr_with_setter_exception): (webkit_dom_test_obj_get_script_string_attr): (webkit_dom_test_obj_get_hash): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): 2010-08-13 Ariya Hidayat Reviewed by Simon Hausmann. [Qt] Canvas and CSS: blur option in shadow not working https://bugs.webkit.org/show_bug.cgi?id=34479 Patch 1: Refactor shadow states handling. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContextPlatformPrivate::): Added shadow states as member variables. (WebCore::GraphicsContextPlatformPrivate::hasShadow): Convenient function to check whether there is shadow or not. (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContext::drawRect): Use shadow states instead of calling getShadow. (WebCore::GraphicsContext::drawLine): ditto. (WebCore::GraphicsContext::strokeArc): ditto. (WebCore::GraphicsContext::drawConvexPolygon): ditto. (WebCore::GraphicsContext::fillPath): ditto. (WebCore::GraphicsContext::strokePath): ditto. (WebCore::GraphicsContext::fillRect): Removes the use of helper function drawBorderlessRectShadow as the code already becomes a lot simpler. (WebCore::GraphicsContext::fillRoundedRect): Removes the use of helper function drawFilledShadowPath as the code already becomes a lot simpler. (WebCore::GraphicsContext::setPlatformShadow): Store shadow states and find out the shadow type (complexity) for future use. (WebCore::GraphicsContext::clearPlatformShadow): Reset shadow states. 2010-08-11 Zhenyao Mo Reviewed by Dimitri Glazkov. Regression in linking of programs https://bugs.webkit.org/show_bug.cgi?id=43820 Shaders and programs shouldn't be deleted until their attachments are removed, therefore, we need to track the attach/detach/useProgram. * html/canvas/WebGLObject.cpp: Track the object attachment count and whether it should really be deleted. (WebCore::WebGLObject::WebGLObject): (WebCore::WebGLObject::setObject): (WebCore::WebGLObject::deleteObject): * html/canvas/WebGLObject.h: Track the object attachment count and whether it should really be deleted. (WebCore::WebGLObject::onAttached): (WebCore::WebGLObject::onDetached): (WebCore::WebGLObject::getAttachmentCount): * html/canvas/WebGLProgram.cpp: Track the attached shaders. (WebCore::WebGLProgram::WebGLProgram): (WebCore::WebGLProgram::deleteObjectImpl): (WebCore::WebGLProgram::getAttachedShader): (WebCore::WebGLProgram::attachShader): (WebCore::WebGLProgram::detachShader): * html/canvas/WebGLProgram.h: Track the attached shaders. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::attachShader): Track the attachment of a shader to a program. (WebCore::WebGLRenderingContext::deleteProgram): Detach shaders. (WebCore::WebGLRenderingContext::detachShader): Track the attachment of a shader to a program. (WebCore::WebGLRenderingContext::validateWebGLObject): Also check if object == 0. (WebCore::WebGLRenderingContext::linkProgram): Using the cached attached shaders instead of query from driver. (WebCore::WebGLRenderingContext::useProgram): Track the attachment of a program to the current rendering pipeline. 2010-08-13 Steve Block Reviewed by Alexey Proskuryakov. Geolocation activity started after frame has been disconnected can cause crash https://bugs.webkit.org/show_bug.cgi?id=39879 New requests started after the Frame has been disconnected are ignored. We do not invoke the error callback as this would allow buggy or malicious pages to hose the CPU. Such a page could hold a reference to a Geolocation object from a since closed Page and register new requests from the error callback to create an infinite loop. Tests: fast/dom/Geolocation/disconnected-frame-already.html * page/Geolocation.cpp: 2010-08-13 Satish Sampath Reviewed by Jeremy Orlow. Support for multiple speech enabled elements in same page. https://bugs.webkit.org/show_bug.cgi?id=43922 * page/SpeechInput.cpp: Generates request ids as necessary when each speech enabled input element gets created/destroyed and multiplexes the listener callbacks to the appropriate input element based on the request id. (WebCore::SpeechInput::SpeechInput): (WebCore::SpeechInput::~SpeechInput): (WebCore::SpeechInput::registerListener): (WebCore::SpeechInput::unregisterListener): (WebCore::SpeechInput::didCompleteRecording): (WebCore::SpeechInput::didCompleteRecognition): (WebCore::SpeechInput::setRecognitionResult): (WebCore::SpeechInput::startRecognition): (WebCore::SpeechInput::stopRecording): (WebCore::SpeechInput::cancelRecognition): * page/SpeechInput.h: * page/SpeechInputClient.h: Now requires a one time set for the WebCore::SpeechInputListener and takes in a 'requestId' for all calls. * page/SpeechInputListener.h: Now returns the above mentioned requestId in all the listener callbacks for identifying which input element the event goes to. * platform/mock/SpeechInputClientMock.cpp: (WebCore::SpeechInputClientMock::SpeechInputClientMock): (WebCore::SpeechInputClientMock::setListener): (WebCore::SpeechInputClientMock::startRecognition): (WebCore::SpeechInputClientMock::stopRecording): (WebCore::SpeechInputClientMock::cancelRecognition): (WebCore::SpeechInputClientMock::timerFired): * platform/mock/SpeechInputClientMock.h: * rendering/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement): (WebCore::InputFieldSpeechButtonElement::~InputFieldSpeechButtonElement): (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::speechInput): (WebCore::InputFieldSpeechButtonElement::didCompleteRecording): (WebCore::InputFieldSpeechButtonElement::didCompleteRecognition): (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): * rendering/TextControlInnerElements.h: 2010-08-13 Eric Carlson Reviewed by David Kilzer. HTMLMediaElement::prepareForLoad should cancel current plug-in proxy media player https://bugs.webkit.org/show_bug.cgi?id=43923 * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::prepareForLoad): Tell mediaPlayer to cancel the current load if it already exists. 2010-08-12 Stephen White Reviewed by David Levin. [CHROMIUM] Use the BGRA format for canvas 2D accel upload and readbacks. https://bugs.webkit.org/show_bug.cgi?id=43804 Use the BGRA format from GraphicsContext3D, if supported. Also keep a texture around for uploads, rather than re-creating it each time. Covered by many layout tests (once we're running them). * platform/graphics/chromium/GLES2Texture.cpp: (WebCore::convertFormat): Move convertFormat() ahead of texture creation, so we can check for BGRA support. (WebCore::GLES2Texture::create): Use convertFormat() to determine the correct format and types to use; use the returned format also for internalFormat, since GLES2 insists they match. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setGraphicsContext3D): Clear the upload texture when a new context is set. (WebCore::PlatformContextSkia::uploadSoftwareToHardware): Use m_uploadTexture instead of creating a new one each time. (WebCore::PlatformContextSkia::readbackHardwareToSoftware): When the context supports it, use the BGRA format for readbacks instead of swizzling. * platform/graphics/skia/PlatformContextSkia.h: Add m_uploadTexture for consecutive uploads. 2010-08-13 Simon Hausmann Reviewed by Ariya Hidayat. [Qt] Clean up mobile feature useage https://bugs.webkit.org/show_bug.cgi?id=43968 * WebCore.pro: Replaced use of Nokia specific platform scopes with concrete feature names. 2010-08-13 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: rename InspectorValue::push and set to push{Value|Object|Array} and set{...}. https://bugs.webkit.org/show_bug.cgi?id=43966 * bindings/js/ScriptProfile.cpp: (WebCore::buildInspectorObjectFor): * bindings/js/ScriptValue.cpp: (WebCore::jsToInspectorValue): * bindings/v8/ScriptCallStack.cpp: (WebCore::ScriptCallStack::stackTrace): * bindings/v8/ScriptProfile.cpp: (WebCore::buildInspectorObjectFor): * bindings/v8/ScriptValue.cpp: (WebCore::v8ToInspectorValue): * inspector/CodeGeneratorInspector.pm: * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::addToFrontend): * inspector/Inspector.idl: * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache): (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources): * inspector/InspectorController.cpp: (WebCore::InspectorController::buildArrayForCookies): (WebCore::InspectorController::getDOMStorageEntries): (WebCore::InspectorController::getProfileHeaders): (WebCore::InspectorController::getProfile): * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getEventListenersForNode): (WebCore::InspectorDOMAgent::buildObjectForNode): (WebCore::InspectorDOMAgent::buildArrayForContainerChildren): (WebCore::InspectorDOMAgent::getStyles): (WebCore::InspectorDOMAgent::getAllStyles): (WebCore::InspectorDOMAgent::getRuleRanges): (WebCore::InspectorDOMAgent::buildObjectForAttributeStyles): (WebCore::InspectorDOMAgent::buildArrayForCSSRules): (WebCore::InspectorDOMAgent::buildArrayForPseudoElements): (WebCore::InspectorDOMAgent::buildObjectForStyle): (WebCore::InspectorDOMAgent::populateObjectWithStyleProperties): (WebCore::InspectorDOMAgent::buildArrayForDisabledStyleProperties): (WebCore::InspectorDOMAgent::buildObjectForStyleSheet): (WebCore::InspectorDOMAgent::buildObjectForRule): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::saveBreakpoints): * inspector/InspectorResource.cpp: (WebCore::InspectorResource::updateScriptObject): * inspector/InspectorStorageAgent.cpp: (WebCore::): (WebCore::InspectorStorageAgent::executeSQL): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::pushGCEventRecords): (WebCore::InspectorTimelineAgent::didInstallTimer): (WebCore::InspectorTimelineAgent::didRemoveTimer): (WebCore::InspectorTimelineAgent::didScheduleResourceRequest): (WebCore::InspectorTimelineAgent::willSendResourceRequest): (WebCore::InspectorTimelineAgent::didFinishLoadingResource): (WebCore::InspectorTimelineAgent::didMarkTimeline): (WebCore::InspectorTimelineAgent::addRecordToTimeline): (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): * inspector/InspectorValues.cpp: (WebCore::): (WebCore::InspectorValue::asValue): (WebCore::InspectorValue::asObject): (WebCore::InspectorValue::asArray): (WebCore::InspectorObject::asObject): (WebCore::InspectorArray::asArray): * inspector/InspectorValues.h: (WebCore::InspectorObject::setBool): (WebCore::InspectorObject::setNumber): (WebCore::InspectorObject::setString): (WebCore::InspectorObject::setValue): (WebCore::InspectorObject::setObject): (WebCore::InspectorObject::setArray): (WebCore::InspectorArray::pushValue): (WebCore::InspectorArray::pushObject): (WebCore::InspectorArray::pushArray): * inspector/ScriptBreakpoint.cpp: (WebCore::ScriptBreakpoint::inspectorObjectFromSourceBreakpoints): * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createGenericRecord): 2010-08-13 Sheriff Bot Unreviewed, rolling out r65204. http://trac.webkit.org/changeset/65204 https://bugs.webkit.org/show_bug.cgi?id=43965 Caused a lot of test crashes in Chromium (Requested by yutak on #webkit). * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isInputImage): (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): * dom/InputElement.h: * html/HTMLInputElement.h: 2010-08-13 Anton Muhin Reviewed by Nate Chapin. Reapplying http://trac.webkit.org/changeset/65284 after fixed include. [v8] Create callbacks for named access of elements from document object on fly. https://bugs.webkit.org/show_bug.cgi?id=43725 That should speed up access to methods on document as there is no need to consult with interceptor before invoking the method. This reapplies http://trac.webkit.org/changeset/60670 reverted with http://trac.webkit.org/changeset/63845. The main difference is in treatment of removed named elements: we don't remove an accessor any more, but leave it. Therefore any accessor should be able to treat the case when there is no expando property. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::namedItemAdded): (WebCore::ScriptController::namedItemRemoved): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::checkDocumentWrapper): (WebCore::V8DOMWindowShell::updateDocumentWrapperCache): (WebCore::getter): (WebCore::V8DOMWindowShell::namedItemAdded): (WebCore::V8DOMWindowShell::namedItemRemoved): * bindings/v8/V8DOMWindowShell.h: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::WrapInShadowObject): (WebCore::V8HTMLDocument::GetNamedProperty): (WebCore::V8HTMLDocument::allAccessorSetter): (WebCore::toV8): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::removeItemFromMap): 2010-08-13 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: remove openInInspectorWindow and evaluateAndStringify from InjectedScript. https://bugs.webkit.org/show_bug.cgi?id=43854 * inspector/Inspector.idl: * inspector/InspectorController.cpp: (WebCore::InspectorController::openInInspectedWindow): * inspector/InspectorController.h: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage.callback): (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage): * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): * inspector/front-end/InjectedScriptAccess.js: * inspector/front-end/InspectorBackendStub.js: (WebInspector.InspectorBackendStub): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick): 2010-08-13 Fumitoshi Ukai Reviewed by Alexey Proskuryakov. flaky websocket/tests/frame-length-overflow.html https://bugs.webkit.org/show_bug.cgi?id=43902 Add m_shouldDiscardReceivedData flag to indicate it will no longer receive data from network. * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::didReceiveData): (WebCore::WebSocketChannel::didFail): (WebCore::WebSocketChannel::processBuffer): - when frame length overflows, we couldn't process data any more. clear buffer and mark m_shouldDiscardReceivedData true to make sure it doesn't process the same buffer again. * websockets/WebSocketChannel.h: 2010-08-13 Dirk Schulze Reviewed by Nikolas Zimmermann. Use SVGPathByteStream to animate SVGPath https://bugs.webkit.org/show_bug.cgi?id=43929 Use SVGPathByteStream to perform animations of Paths. SVGPathBlender blends the starting point to the end point according to the current progress value. Cleanup SVGPathSegList, by removing the unnecessary legacy blending code. No new tests because no functional changes. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * svg/SVGAllInOne.cpp: * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::SVGAnimateElement): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): * svg/SVGAnimateElement.h: * svg/SVGPathBlender.cpp: Added. (WebCore::SVGPathBlender::SVGPathBlender): (WebCore::SVGPathBlender::~SVGPathBlender): (WebCore::SVGPathBlender::blendAnimatedFloat): (WebCore::SVGPathBlender::blendAnimatedFloatPoint): (WebCore::SVGPathBlender::blendMoveToSegment): (WebCore::SVGPathBlender::blendLineToSegment): (WebCore::SVGPathBlender::blendLineToHorizontalSegment): (WebCore::SVGPathBlender::blendLineToVerticalSegment): (WebCore::SVGPathBlender::blendCurveToCubicSegment): (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment): (WebCore::SVGPathBlender::blendCurveToQuadraticSegment): (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment): (WebCore::SVGPathBlender::blendArcToSegment): (WebCore::SVGPathBlender::blendAnimatedPath): (WebCore::SVGPathBlender::cleanup): * svg/SVGPathBlender.h: Added. * svg/SVGPathParserFactory.cpp: (WebCore::globalSVGPathBlender): (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream): * svg/SVGPathParserFactory.h: * svg/SVGPathSegList.cpp: (WebCore::SVGPathSegList::getPathSegAtLength): * svg/SVGPathSegList.h: (WebCore::SVGPathSegList::create): * svg/SVGPointList.cpp: (WebCore::adjustAnimatedValue): 2010-08-12 Nikolas Zimmermann Reviewed by Dirk Schulze. Window size changes + resources on absolute sized content leads to pixelation https://bugs.webkit.org/show_bug.cgi?id=43921 Avoid pixelation when using resources on absolute sized objects. Be sure to invalidate the used resources if window size changes. Otherwhise masks etc. will be scaled up and pixelate. As nice side-effect, this fixes run-webkit-tests --singly svg/W3C-SVG-1.1, which used to produce wrong results for the gradient tests, as the window size change from 800x600 for 480x360 (svg/W3C-SVG-1.1 specific DRT quirk) didn't invalidate the resources. Renamed invalidateClient -> removeClientFromCache and invalidateClients -> removeAllClientsFromCache. Add a boolean "markForInvalidation" parameter, that controls wheter the clients should be marked for repaint/boundaries invalidation/layout or wheter we only want to notify the parents that the resource changed, to avoid doing unncessary work in SVGRenderSupport::layoutChildren. Test: svg/custom/absolute-sized-content-with-resources.xhtml * rendering/RenderSVGGradientStop.cpp: (WebCore::RenderSVGGradientStop::styleDidChange): Don't do anything for StyleDifferenceEqual. * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::imageChanged): * rendering/RenderSVGResource.cpp: (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): * rendering/RenderSVGResource.h: * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::removeAllClientsFromCache): (WebCore::RenderSVGResourceClipper::removeClientFromCache): * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::layout): (WebCore::RenderSVGResourceContainer::idChanged): (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): (WebCore::RenderSVGResourceContainer::markClientForInvalidation): * rendering/RenderSVGResourceContainer.h: (WebCore::RenderSVGResourceContainer::): * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::removeAllClientsFromCache): (WebCore::RenderSVGResourceFilter::removeClientFromCache): (WebCore::RenderSVGResourceFilter::postApplyResource): * rendering/RenderSVGResourceFilter.h: * rendering/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::removeAllClientsFromCache): (WebCore::RenderSVGResourceGradient::removeClientFromCache): (WebCore::RenderSVGResourceGradient::applyResource): * rendering/RenderSVGResourceGradient.h: * rendering/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::layout): (WebCore::RenderSVGResourceMarker::removeAllClientsFromCache): (WebCore::RenderSVGResourceMarker::removeClientFromCache): * rendering/RenderSVGResourceMarker.h: * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::removeAllClientsFromCache): (WebCore::RenderSVGResourceMasker::removeClientFromCache): * rendering/RenderSVGResourceMasker.h: * rendering/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::removeAllClientsFromCache): (WebCore::RenderSVGResourcePattern::removeClientFromCache): (WebCore::RenderSVGResourcePattern::applyResource): * rendering/RenderSVGResourcePattern.h: * rendering/RenderSVGResourceSolidColor.h: (WebCore::RenderSVGResourceSolidColor::removeAllClientsFromCache): (WebCore::RenderSVGResourceSolidColor::removeClientFromCache): * rendering/SVGRenderSupport.cpp: (WebCore::invalidateResourcesOfChildren): Add new helper funtion recursively invalidating resources of a sub render tree. (WebCore::SVGRenderSupport::layoutChildren): Keep track of all objects that didn't need layout, as we still have to invalidate their resources, if window size changes. * rendering/SVGResources.cpp: (WebCore::SVGResources::removeClientFromCache): (WebCore::SVGResources::resourceDestroyed): * rendering/SVGResources.h: * rendering/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::clientLayoutChanged): 2010-08-13 Pavel Feldman Reviewed by Yury Semikhatsky. Chromium DevTools: [CRASH] Autocomplete on arrays causes crashes. https://bugs.webkit.org/show_bug.cgi?id=43955 * bindings/v8/ScriptValue.cpp: (WebCore::v8ToInspectorValue): 2010-08-13 Gavin Barraclough Reviewed by Sam Weinig Unify UString::UTF8String() & String::utf8() methods, remove UString::cost() & make atArrayIndex a free function. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlot): (WebCore::JSDOMWindow::getOwnPropertyDescriptor): * bridge/NP_jsobject.cpp: (_NPN_Enumerate): * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): * bridge/jni/JNIBridge.cpp: (JavaParameter::JavaParameter): (JavaMethod::JavaMethod): (JavaMethod::signature): (JavaMethod::methodID): * bridge/jni/JNIBridge.h: (JSC::Bindings::JavaString::utf8): (JSC::Bindings::JavaParameter::type): (JSC::Bindings::JavaMethod::returnType): * bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::setMember): (JavaJSObject::removeMember): (JavaJSObject::convertJObjectToValue): * bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaField::JavaField): (JavaField::valueFromInstance): (JavaField::setValueToInstance): * bridge/jni/jsc/JNIBridgeJSC.h: (JSC::Bindings::JavaField::type): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaStringImpl::utf8): * bridge/runtime_array.cpp: (JSC::RuntimeArray::getOwnPropertySlot): (JSC::RuntimeArray::getOwnPropertyDescriptor): (JSC::RuntimeArray::put): 2010-08-12 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: allow interrupting long running JS to execute inspector command https://bugs.webkit.org/show_bug.cgi?id=43900 * bindings/v8/ScriptDebugServer.cpp: (WebCore::): (WebCore::ScriptDebugServer::pause): (WebCore::ScriptDebugServer::interruptAndRun): (WebCore::ScriptDebugServer::runPendingTasks): (WebCore::ScriptDebugServer::handleV8DebugEvent): * bindings/v8/ScriptDebugServer.h: (WebCore::ScriptDebugServer::Task::~Task): 2010-08-12 Sheriff Bot Unreviewed, rolling out r65295. http://trac.webkit.org/changeset/65295 https://bugs.webkit.org/show_bug.cgi?id=43950 It broke 4 sputnik tests (Requested by Ossy on #webkit). * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlot): (WebCore::JSDOMWindow::getOwnPropertyDescriptor): * bridge/NP_jsobject.cpp: (_NPN_Enumerate): * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): * bridge/jni/JNIBridge.cpp: (JavaParameter::JavaParameter): (JavaMethod::JavaMethod): (JavaMethod::signature): (JavaMethod::methodID): * bridge/jni/JNIBridge.h: (JSC::Bindings::JavaString::UTF8String): (JSC::Bindings::JavaParameter::type): (JSC::Bindings::JavaMethod::returnType): * bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::setMember): (JavaJSObject::removeMember): (JavaJSObject::convertJObjectToValue): * bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaField::JavaField): (JavaField::valueFromInstance): (JavaField::setValueToInstance): * bridge/jni/jsc/JNIBridgeJSC.h: (JSC::Bindings::JavaField::type): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaStringImpl::UTF8String): * bridge/runtime_array.cpp: (JSC::RuntimeArray::getOwnPropertySlot): (JSC::RuntimeArray::getOwnPropertyDescriptor): (JSC::RuntimeArray::put): 2010-08-12 Pavel Feldman Not reviewed. Fixed typo in inspector js. Follow up to r65300. * inspector/front-end/inspector.js: (WebInspector.log.isLogAvailable): 2010-08-12 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: Make getPrototypes return objects, not names. https://bugs.webkit.org/show_bug.cgi?id=43934 * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): (injectedScriptConstructor.): * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.callback): * inspector/front-end/inspector.js: (WebInspector.log): 2010-08-12 James Robinson Unreviewed, rolling out r65284 and r65288. Broke chromium compile. https://bugs.webkit.org/show_bug.cgi?id=43725 http://trac.webkit.org/changeset/65284 http://trac.webkit.org/changeset/65288 * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::namedItemAdded): (WebCore::ScriptController::namedItemRemoved): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::updateDocumentWrapperCache): * bindings/v8/V8DOMWindowShell.h: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::namedPropertyDeleter): (WebCore::V8HTMLDocument::namedPropertyGetter): (WebCore::V8HTMLDocument::indexedPropertyGetter): (WebCore::V8HTMLDocument::allAccessorSetter): (WebCore::toV8): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::removeItemFromMap): 2010-08-12 Gavin Barraclough Reviewed by Sam Weinig Unify UString::UTF8String() & String::utf8() methods, remove UString::cost() & make atArrayIndex a free function. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlot): (WebCore::JSDOMWindow::getOwnPropertyDescriptor): * bridge/NP_jsobject.cpp: (_NPN_Enumerate): * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): * bridge/jni/JNIBridge.cpp: (JavaParameter::JavaParameter): (JavaMethod::JavaMethod): (JavaMethod::signature): (JavaMethod::methodID): * bridge/jni/JNIBridge.h: (JSC::Bindings::JavaString::utf8): (JSC::Bindings::JavaParameter::type): (JSC::Bindings::JavaMethod::returnType): * bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::setMember): (JavaJSObject::removeMember): (JavaJSObject::convertJObjectToValue): * bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaField::JavaField): (JavaField::valueFromInstance): (JavaField::setValueToInstance): * bridge/jni/jsc/JNIBridgeJSC.h: (JSC::Bindings::JavaField::type): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaStringImpl::utf8): * bridge/runtime_array.cpp: (JSC::RuntimeArray::getOwnPropertySlot): (JSC::RuntimeArray::getOwnPropertyDescriptor): (JSC::RuntimeArray::put): 2010-08-12 Gavin Barraclough Speculative build fix for chromium bindings (someone added the old include style!). * bindings/v8/V8DOMWindowShell.h: 2010-08-12 MORITA Hajime Reviewed by Tony Chang. [Refactoring] TextEvent class has to many flags https://bugs.webkit.org/show_bug.cgi?id=43893 Turned TextEvent::m_isLineBreak, TextEvent::m_isBacktab, TextEvent::m_isPaste into single TextEvent::m_inputType enumeration. No functional change. No new tests. * dom/TextEvent.cpp: (WebCore::TextEvent::selectInputType): (WebCore::TextEvent::create): (WebCore::TextEvent::createForPlainTextPaste): (WebCore::TextEvent::createForFragmentPaste): (WebCore::TextEvent::TextEvent): * dom/TextEvent.h: (WebCore::TextEvent::): (WebCore::TextEvent::isLineBreak): (WebCore::TextEvent::isBackTab): (WebCore::TextEvent::isPaste): * page/EventHandler.cpp: (WebCore::EventHandler::handleTextInputEvent): 2010-08-12 Kenneth Russell Reviewed by David Levin. Delete obsolete CanvasNumberArray https://bugs.webkit.org/show_bug.cgi?id=38619 Deleted unreferenced code. Built WebKit and Chromium to test. * Android.derived.jscbindings.mk: * Android.derived.v8bindings.mk: * Android.jscbindings.mk: * Android.mk: * bindings/js/JSCanvasNumberArrayCustom.cpp: Removed. * html/canvas/CanvasNumberArray.cpp: Removed. * html/canvas/CanvasNumberArray.h: Removed. * html/canvas/CanvasNumberArray.idl: Removed. 2010-08-12 Anton Muhin Reviewed by Nate Chapin. [v8] Create callbacks for named access of elements from document object on fly. https://bugs.webkit.org/show_bug.cgi?id=43725 That should speed up access to methods on document as there is no need to consult with interceptor before invoking the method. This reapplies http://trac.webkit.org/changeset/60670 reverted with http://trac.webkit.org/changeset/63845. The main difference is in treatment of removed named elements: we don't remove an accessor any more, but leave it. Therefore any accessor should be able to treat the case when there is no expando property. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::namedItemAdded): (WebCore::ScriptController::namedItemRemoved): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::checkDocumentWrapper): (WebCore::V8DOMWindowShell::updateDocumentWrapperCache): (WebCore::getter): (WebCore::V8DOMWindowShell::namedItemAdded): (WebCore::V8DOMWindowShell::namedItemRemoved): * bindings/v8/V8DOMWindowShell.h: * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::instantiateV8Object): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::WrapInShadowObject): (WebCore::V8HTMLDocument::GetNamedProperty): (WebCore::V8HTMLDocument::allAccessorSetter): (WebCore::toV8): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::removeItemFromMap): 2010-08-12 Dimitri Glazkov Reviewed by Adam Barth. Ensure that parser doesn't attach children that have been removed by JavaScript event handlers. https://bugs.webkit.org/show_bug.cgi?id=43813 This patch re-fixes bug 40742 in a way that keeps allowing HTMLLinkElement to lazy-attach. * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attach): Added parent check. * html/HTMLLinkElement.cpp: Basically undoes changes introduced by r61424. * html/HTMLLinkElement.h: Ditto. 2010-08-12 Justin Schuh Reviewed by Dumitru Daniliuc. Clear PluginData's page pointer on page refresh https://bugs.webkit.org/show_bug.cgi?id=43888 Test: plugins/access-after-page-destroyed.html * page/Page.cpp: (WebCore::Page::refreshPlugins): 2010-08-12 Zhenyao Mo Reviewed by Dimitri Glazkov. getParameter(STENCIL_VALUE_MASK) (and others) returns the wrong value https://bugs.webkit.org/show_bug.cgi?id=31842 * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUnsignedLongParameter): Casting from int to unsigned long correctly. 2010-08-12 Pavel Feldman Reviewed by Joseph Pecoraro. Web Inspector: mimic FireBug's array detection. https://bugs.webkit.org/show_bug.cgi?id=30974 * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): 2010-08-12 Zhenyao Mo Reviewed by Dimitri Glazkov. regression in generateMipmap https://bugs.webkit.org/show_bug.cgi?id=43873 * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::generateMipmapLevelInfo): should set m_needToUseBlackTexture to false if generateMipmapLevelInfo runs through successfully. 2010-08-12 Ariya Hidayat Reviewed by David Hyatt. [Qt] Split TransparencyLayer into its own header file. https://bugs.webkit.org/show_bug.cgi?id=43935 * WebCore.pro: Include TransparencyLayer.h. * platform/graphics/qt/GraphicsContextQt.cpp: * platform/graphics/qt/TransparencyLayer.h: Added. (WebCore::TransparencyLayer::TransparencyLayer): (WebCore::TransparencyLayer::operator=): 2010-08-12 François Sausset Reviewed by Beth Dakin. Horizontal padding should be 0 on mrow elements. https://bugs.webkit.org/show_bug.cgi?id=43908 Updated tests in /mathml * css/mathml.css: (mrow, mfenced): (mfenced): 2010-08-12 Aaron Boodman Reviewed by David Hyatt. Make the cascade level of "user" styles configurable https://bugs.webkit.org/show_bug.cgi?id=43457 * WebCore.exp.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): * dom/Document.cpp: (WebCore::Document::pageGroupUserSheets): * page/PageGroup.cpp: (WebCore::PageGroup::addUserStyleSheetToWorld): * page/PageGroup.h: * page/UserStyleSheet.h: (WebCore::UserStyleSheet::): (WebCore::UserStyleSheet::UserStyleSheet): (WebCore::UserStyleSheet::level): 2010-08-12 Jian Li Fix qt build break. * html/ThreadableBlobRegistry.cpp: (WebCore::postTaskToMainThread): 2010-08-12 Jian Li Reviewed by David Levin. Add ThreadableBlobRegistry to support calling BlobRegistry methods in main thread. https://bugs.webkit.org/show_bug.cgi?id=43874 * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::addBlob): (WebCore::ScriptExecutionContext::removeBlob): (WebCore::ScriptExecutionContext::createPublicBlobURL): (WebCore::ScriptExecutionContext::revokePublicBlobURL): * dom/ScriptExecutionContext.h: * html/Blob.cpp: (WebCore::Blob::Blob): (WebCore::Blob::~Blob): (WebCore::Blob::contextDestroyed): * html/Blob.h: * html/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::registerBlobURL): (WebCore::BlobRegistryImpl::unregisterBlobURL): (WebCore::BlobRegistryImpl::getBlobDataFromURL): * html/ThreadableBlobRegistry.cpp: Added. * html/ThreadableBlobRegistry.h: Added. 2010-08-12 Csaba Osztrogonác Reviewed by Darin Adler. generate-bindings.pl should generate warning free code https://bugs.webkit.org/show_bug.cgi?id=43353 * bindings/scripts/CodeGeneratorJS.pm: Suggested parentheses added around && within || 2010-08-11 Ryosuke Niwa Reviewed by Kent Tamura. merge MarkupAccumulator and MarkupAccumulatorWrapper https://bugs.webkit.org/show_bug.cgi?id=43834 Removed MarkupAccumulator and added serializeNodesWithNamespaces to use MarkupAccumulatorWrapper in both versions of createMarkup. Accumulation of nodes done manually in serializeNodes is now done by MarkupAccumulatorWrapper as done in the original MarkupAccumulator. No new tests added since this is a cleanup. * editing/markup.cpp: (WebCore::MarkupAccumulatorWrapper::MarkupAccumulatorWrapper): Takes vector of nodes and set it to m_nodes. (WebCore::MarkupAccumulatorWrapper::insertOpenTag): Adds node to m_nodes. (WebCore::MarkupAccumulatorWrapper::wrapWithNode): Adds node to m_nodes. (WebCore::serializeNodes): Adding node to nodes is moved into MarkupAccumulatorWrapper. (WebCore::createMarkup): Instantiates MarkupAccumulatorWrapper. (WebCore::serializeNodesWithNamespaces): Renamed from MarkupAccumulator::appendMarkup. 2010-08-12 Dirk Schulze Unreviewed sort of Xcode project file. * WebCore.xcodeproj/project.pbxproj: 2010-08-12 Ben Murdoch Reviewed by Pavel Feldman. InspectorController.h missing InspectorObject forward declaration https://bugs.webkit.org/show_bug.cgi?id=43913 Build fix so no new tests. * inspector/InspectorController.h: Adds the necessary forward declaration. 2010-08-12 Hui Huang Reviewed by Eric Seidel. m_windowRect is not updated because parent of PluginView is not set when updatePluginWidget is called. plugin gets wrong window size on setwindow. https://bugs.webkit.org/show_bug.cgi?id=43635 * plugins/symbian/PluginViewSymbian.cpp: (WebCore::PluginView::setParent): 2010-08-12 Pavel Feldman Not reviewed, re-apply r65241 and 65243. Web Inspector: brush up object proxies, introduce remote object model. https://bugs.webkit.org/show_bug.cgi?id=43847 * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.CssInHeadRule.prototype.doRun): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.doEvalInWindow): (WebInspector.ConsoleView.prototype._enterKeyPressed.printResult): (WebInspector.ConsoleView.prototype._enterKeyPressed): (WebInspector.ConsoleView.prototype._format): (WebInspector.ConsoleView.prototype._formatarray): (WebInspector.ConsoleView.prototype._formatAsArrayEntry): (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleCommandResult): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.performSearch): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._createTooltipForNode): * inspector/front-end/EventListenersSidebarPane.js: (): * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): (injectedScriptConstructor.): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertiesSection.prototype.update): (WebInspector.ObjectPropertiesSection.prototype.updateProperties): (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate): (WebInspector.ObjectPropertyTreeElement.prototype.update): (WebInspector.ObjectPropertyTreeElement.prototype.applyExpression): * inspector/front-end/ObjectProxy.js: Removed. * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.callback): * inspector/front-end/RemoteObject.js: Added. (WebInspector.RemoteObjectId): (WebInspector.RemoteObject): (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.fromNode): (WebInspector.RemoteObject.fromPayload): (WebInspector.RemoteObject.type): (WebInspector.RemoteObject.prototype.get objectId): (WebInspector.RemoteObject.prototype.get type): (WebInspector.RemoteObject.prototype.get description): (WebInspector.RemoteObject.prototype.get hasChildren): (WebInspector.RemoteObject.prototype.isError): (WebInspector.RemoteObject.prototype.getPropertyValueDescriptions): (WebInspector.RemoteObject.prototype.getOwnProperties): (WebInspector.RemoteObject.prototype.getProperties.remoteObjectBinder): (WebInspector.RemoteObjectProperty): * inspector/front-end/ScopeChainSidebarPane.js: (WebInspector.ScopeChainSidebarPane.prototype.update): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame.updatingCallbackWrapper): (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame): (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._showPopup.evaluateCallback): (WebInspector.SourceFrame.prototype._showPopup): (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update): (WebInspector.WatchExpressionTreeElement.prototype.update): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): * inspector/front-end/utilities.js: (): 2010-08-11 Stephen White Reviewed by David Levin. Add support for BGRA pixel format to GraphicsContext3D. https://bugs.webkit.org/show_bug.cgi?id=43858 Although this has been standard in desktop GL since 1.2, it's an extension in GL ES 2.0, so a query function is provided to check for support. Since they differ on semantics (GL ES 2.0 requires TexImage2D()'s format and internalFormat to match, while desktop GL will not accept BGRA as an internalFormat), the stub implementation returns false until these quirks have been implemented and tested on each port. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::supportsBGRA): Add implementation for non-chromium platforms which returns false. * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::): Add query function (supportsBGRA()) and the BGRA_EXT token. 2010-08-12 Pavel Feldman Not reviewed. Rolling out r65241 and 65243 for breaking inspector tests. 2010-08-12 Pavel Feldman Not reviewed. Adding the file missing in r65241. * inspector/front-end/RemoteObject.js: Added. (WebInspector.RemoteObjectId): (WebInspector.RemoteObject): (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.fromNode): (WebInspector.RemoteObject.fromPayload): (WebInspector.RemoteObject.type): (WebInspector.RemoteObject.prototype.get objectId): (WebInspector.RemoteObject.prototype.get type): (WebInspector.RemoteObject.prototype.get description): (WebInspector.RemoteObject.prototype.get hasChildren): (WebInspector.RemoteObject.prototype.isError): (WebInspector.RemoteObject.prototype.getPropertyValueDescriptions): (WebInspector.RemoteObject.prototype.getOwnProperties): (WebInspector.RemoteObject.prototype.getProperties.remoteObjectBinder): (WebInspector.RemoteObjectProperty): 2010-08-12 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: brush up object proxies, introduce remote object model. https://bugs.webkit.org/show_bug.cgi?id=43847 * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.CssInHeadRule.prototype.doRun): (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.doEvalInWindow): (WebInspector.ConsoleView.prototype._enterKeyPressed.printResult): (WebInspector.ConsoleView.prototype._enterKeyPressed): (WebInspector.ConsoleView.prototype._format): (WebInspector.ConsoleView.prototype._formatnode): (WebInspector.ConsoleView.prototype._formatarray): (WebInspector.ConsoleView.prototype._formatAsArrayEntry): (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleCommandResult): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._createTooltipForNode): * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): (injectedScriptConstructor.): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertiesSection.prototype.update): (WebInspector.ObjectPropertiesSection.prototype.updateProperties): (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate): (WebInspector.ObjectPropertyTreeElement.prototype.update): (WebInspector.ObjectPropertyTreeElement.prototype.applyExpression): * inspector/front-end/ObjectProxy.js: Removed. * inspector/front-end/PropertiesSidebarPane.js: (WebInspector.PropertiesSidebarPane.prototype.update.callback): * inspector/front-end/RemoteObject.js: Added. (WebInspector.RemoteObjectId): (WebInspector.RemoteObject): (WebInspector.RemoteObject.fromPrimitiveValue): (WebInspector.RemoteObject.fromErrorMessage): (WebInspector.RemoteObject.fromNode): (WebInspector.RemoteObject.fromPayload): (WebInspector.RemoteObject.type): (WebInspector.RemoteObject.prototype.get objectId): (WebInspector.RemoteObject.prototype.get type): (WebInspector.RemoteObject.prototype.get description): (WebInspector.RemoteObject.prototype.get hasChildren): (WebInspector.RemoteObject.prototype.isError): (WebInspector.RemoteObject.prototype.getPropertyValueDescriptions): (WebInspector.RemoteObject.prototype.getOwnProperties): (WebInspector.RemoteObject.prototype.getProperties.remoteObjectBinder): (WebInspector.RemoteObjectProperty): * inspector/front-end/ScopeChainSidebarPane.js: (WebInspector.ScopeChainSidebarPane.prototype.update): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame.updatingCallbackWrapper): (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame): (WebInspector.ScriptsPanel.prototype.doEvalInCallFrame): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._showPopup.evaluateCallback): (WebInspector.SourceFrame.prototype._showPopup): (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update): (WebInspector.WatchExpressionTreeElement.prototype.update): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.log.logMessage): (WebInspector.log): * inspector/front-end/utilities.js: 2010-08-12 Ben Murdoch Reviewed by Steve Block. V8 code generator does not add V8BindingMacros.h include in all places it is needed https://bugs.webkit.org/show_bug.cgi?id=43907 Adds the V8BindingMacros.h header before using the STRING_TO_V8PARAMETER_EXCEPTION_BLOCK macro. Build fix so no new tests. * bindings/scripts/CodeGeneratorV8.pm: include the header at the right time. 2010-08-12 Jeremy Orlow Revert for now https://bugs.webkit.org/show_bug.cgi?id=43794 * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.exp.in: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/GroupSettings.cpp: Removed. * page/GroupSettings.h: Removed. * page/PageGroup.cpp: (WebCore::PageGroup::PageGroup): (WebCore::PageGroup::localStorage): * page/PageGroup.h: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setLocalStorageQuota): (WebCore::Settings::setLocalStorageDatabasePath): * page/Settings.h: (WebCore::Settings::localStorageQuota): (WebCore::Settings::localStorageDatabasePath): 2010-08-12 Nikolas Zimmermann Not reviewed. Follow up to Jeremys fix, just remove the context parameter, it's not needed anymore. * rendering/RenderSVGResourceGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::applyResource): * rendering/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::createImageBuffer): * rendering/SVGImageBufferTools.h: 2010-08-12 Jeremy Orlow Build fix. * rendering/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::createImageBuffer): 2010-08-12 Nikolas Zimmermann Reviewed by Dirk Schulze. SVG masking performance very slow https://bugs.webkit.org/show_bug.cgi?id=43622 Create ImageBuffers only as large as the final rendered size on screen. Only gradient on text on CG handled this correctly so far. Refactored the code into a new SVGImageBufferTools class, and use the code from RenderSVGResourceMasker -> makes the IE9 demo SVG dice usable. Clippers, Patterns and Filters remain to be converted. Test: svg/zoom/page/zoom-mask-with-percentages.svg * Android.mk: Add SVGImageBufferTools.* to build. * CMakeLists.txt: Ditto. * GNUmakefile.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * rendering/RenderSVGAllInOne.cpp: Ditto. * rendering/RenderSVGResourceGradient.cpp: Refactored CG gradient specific "create image buffer in absolute coordinates" code into SVGImageBufferTools class. (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): (WebCore::RenderSVGResourceGradient::applyResource): * rendering/RenderSVGResourceMasker.cpp: Use new SVGImageBufferTools class, to avoid pixelation when zooming and to create image buffers as big as the final rendered size on screen, not more. (WebCore::RenderSVGResourceMasker::invalidateClients): (WebCore::RenderSVGResourceMasker::applyResource): (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage): (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect): (WebCore::RenderSVGResourceMasker::resourceBoundingBox): * rendering/RenderSVGResourceMasker.h: * rendering/SVGImageBufferTools.cpp: Added. (WebCore::SVGImageBufferTools::absoluteTransformFromContext): (WebCore::SVGImageBufferTools::createImageBuffer): (WebCore::SVGImageBufferTools::clipToImageBuffer): * rendering/SVGImageBufferTools.h: Added. (WebCore::SVGImageBufferTools::SVGImageBufferTools): (WebCore::SVGImageBufferTools::~SVGImageBufferTools): 2010-08-10 Jeremy Orlow Reviewed by Adam Barth. Some settings are linked to the PageGroup not the Page. Create a new class for those. https://bugs.webkit.org/show_bug.cgi?id=43794 Since persistient storage is shared between pages, there's no way to modify some settings related to it on a per page basis. As such, it's not technically correct for these settings to be on the Page's settings. Create a new class called GroupSettings, move the 2 group-wide local storage settings there, and add a new setting for IndexedDB's path (which is prompting this change). No behavior has changed, so no tests. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.exp.in: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/PageGroup.cpp: (WebCore::PageGroup::PageGroup): (WebCore::PageGroup::localStorage): * page/PageGroup.h: (WebCore::PageGroup::groupSettings): * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setSessionStorageQuota): * page/Settings.h: 2010-08-12 Benjamin Poulain Reviewed by Simon Hausmann. [Qt] Decode images directly to QPixmap https://bugs.webkit.org/show_bug.cgi?id=40797 Use the new API of Qt 4.7 to decode data from the image reader directly to QPixmap. This allow us to use JDCT_IFAST when decoding jpeg images to pixmap, and to decode animated GIF images, while still using in-place conversion of color space. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::setData): (WebCore::ImageDecoderQt::internalHandleCurrentImage): 2010-07-14 Marcus Bulach Reviewed by darin@apple.com. Removes DontCheckEnums from some IDLs and fixes the corresponding enums. https://bugs.webkit.org/show_bug.cgi?id=42278 This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=42250: it fixes some IDL/.h and enables generating compile-time checks for enums. Tests: idls should generate valid code. * dom/Node.h: (WebCore::Node::): * dom/Node.idl: * dom/OverflowEvent.h: (WebCore::OverflowEvent::): * dom/OverflowEvent.idl: * html/FileReader.cpp: (WebCore::FileReader::readyState): * html/FileReader.h: (WebCore::FileReader::): * html/FileReader.idl: 2010-08-12 Alejandro G. Castro Reviewed by David Levin. The #if clause enabling a feature should avoid the all includes of the feature https://bugs.webkit.org/show_bug.cgi?id=43866 Modified the position of the guard to avoid including all the headers if the feature controlling the guard is not enabled. * dom/make_names.pl: 2010-08-12 Sheriff Bot Unreviewed, rolling out r65221. http://trac.webkit.org/changeset/65221 https://bugs.webkit.org/show_bug.cgi?id=43896 Broke snow leopard build. (Requested by dave_levin on #webkit). * platform/graphics/GraphicsContext3D.cpp: * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::): 2010-08-11 Stephen White Reviewed by David Levin. Add support for BGRA pixel format to GraphicsContext3D. https://bugs.webkit.org/show_bug.cgi?id=43858 Although this has been standard in desktop GL since 1.2, it's an extension in GL ES 2.0, so a query function is provided to check for support. Since they differ on semantics (GL ES 2.0 requires TexImage2D()'s format and internalFormat to match, while desktop GL will not accept BGRA as an internalFormat), the stub implementation returns false until these quirks have been implemented and tested on each port. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::supportsBGRA): Add implementation for non-chromium platforms which returns false. * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::): Add query function (supportsBGRA()) and the BGRA_EXT token. 2010-08-11 Satish Sampath Reviewed by Kent Tamura. Handle clicks and recognition events for the speech input button https://bugs.webkit.org/show_bug.cgi?id=43857 * rendering/RenderInputSpeech.cpp: (WebCore::RenderInputSpeech::paintInputFieldSpeechButton): Selects the image based on current state. * rendering/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement): (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::set_state): Switch to a new state and update the UI. (WebCore::InputFieldSpeechButtonElement::didCompleteRecording): (WebCore::InputFieldSpeechButtonElement::didCompleteRecognition): * rendering/TextControlInnerElements.h: (WebCore::InputFieldSpeechButtonElement::): (WebCore::InputFieldSpeechButtonElement::state): 2010-08-11 Fumitoshi Ukai Reviewed by Alexey Proskuryakov. REGRESSION(65135): format specifier warnings https://bugs.webkit.org/show_bug.cgi?id=43876 * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::appendToBuffer): cast size_t to unsigned long for %lu. (WebCore::WebSocketChannel::processBuffer): cast size_t to unsigned long for %lu. 2010-08-11 Kevin Ollivier [wx] Build fix, don't generate WebDOMEventTarget.h/.cpp as we use the ones in bindings/cpp. * DerivedSources.make: 2010-08-11 Tony Gentilcore Reviewed by Adam Barth. Make PendingScript copyable so that it can be stored in containers https://bugs.webkit.org/show_bug.cgi?id=43875 This will be useful for storing PendingScripts in a Vector or Deque for async and defer scripts. No new tests because no functional changes. * dom/PendingScript.h: (WebCore::PendingScript::PendingScript): (WebCore::PendingScript::operator=): 2010-08-11 Victoria Kirst Reviewed by David Levin. Fixing a regression in the UI for Mac default audio/video controls. https://bugs.webkit.org/show_bug.cgi?id=43750 * rendering/RenderThemeChromiumMac.h: * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderContainer): (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): (WebCore::RenderThemeChromiumMac::volumeSliderOffsetFromMuteButton): 2010-08-11 Adam Barth Reviewed by Eric Seidel. HTML TreeBuilder hits ASSERT in fragment case with insertAdjacentHTML and colgroup https://bugs.webkit.org/show_bug.cgi?id=43758 This patch conditionalizes some LegacyHTMLTreeBuilder-specific code in HTMLElement::createContextualFragment that interferes with the new HTMLTreeBuilder. Doing that exposes the above ASSERT, which I've fixed in this patch too. Fixing that ASSERT involved a small refactoring in ExternalCharacterTokenBuffer. * html/HTMLElement.cpp: (WebCore::HTMLElement::createContextualFragment): * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingWhitespace): (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeadingWhitespace): (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeadingNonWhitespace): (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeading): (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeading): (WebCore::HTMLTreeBuilder::processCharacterBuffer): 2010-08-11 Adam Barth Reviewed by Eric Seidel. Conditionalize wrong fragment parsing code to pass more HTML5lib tests https://bugs.webkit.org/show_bug.cgi?id=43877 This code exists to support the LegacyHTMLTreeBuilder. Unfortunately, it causes problems for the new HTMLTreeBuilder (which is more self-contained). * dom/Element.cpp: (WebCore::Element::createContextualFragment): 2010-08-11 Ryosuke Niwa Reviewed by Tony Chang. Can't unbold text in div in font-weight span https://bugs.webkit.org/show_bug.cgi?id=26871 The bug was caused by removeInlineStyle not being able to include styled inline nodes around the start. Solved this problem by pushing down all inline styles instead of just text-decorations. This approach allows removeInlineStyle to remove styled ancestors properly and generates compact markups. Test: editing/style/push-down-inline-styles.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeCSSStyle): No longer removes attributes or node when mode == RemoveNone. (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle): Calls shouldRemoveInlineStyleFromElement to determine the highest ancestor whose style needs to be pushed down. (WebCore::ApplyStyleCommand::extractInlineStyleToPushDown): Renamed from extractTextDecorationStyle. Extracts all inline CSS properties specified instead of just text decorations. (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Renamed from applyTextDecorationStyle. Applies inline styles using addInlineStyleIfNeeded or adds inline CSS values. (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Renamed from pushDownTextDecorationStyleAroundNode. (WebCore::ApplyStyleCommand::removeInlineStyle): Calls pushDownTextDecorationStyleAroundNode. * editing/ApplyStyleCommand.h: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Prevents moveParagraph from preserving the style of an empty paragraph when merged with the previous paragraph because we don't use that style anyways. 2010-08-11 Julien Chaffraix Reviewed by Ariya Hidayat. Remove dead code in CSSStyleSelector. https://bugs.webkit.org/show_bug.cgi?id=43805 * css/CSSStyleSelector.cpp: Remove some debugging code that was compiled out. 2010-08-11 Chris Fleizach Reviewed by Beth Dakin. AX: isNativeCheckbox does not work as advertised https://bugs.webkit.org/show_bug.cgi?id=43872 Test: platform/mac/accessibility/native-vs-nonnative-checkboxes.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isInputImage): Only say it's an input image if its role has not been overriden (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): * dom/InputElement.h: Add methods to query if it's a checkbox or radio button type element. * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isCheckbox): 2010-08-11 Kenneth Russell Reviewed by David Levin. Remove obsolete WebGLArray type names https://bugs.webkit.org/show_bug.cgi?id=43885 Deleted aliases to obsolete WebGLArray type names. Updated affected layout tests, synchronizing them with the versions in the Khronos repository where appropriate. Ran all layout tests. * bindings/js/JSDOMWindowCustom.cpp: * page/DOMWindow.idl: 2010-08-11 Steve Block Reviewed by David Levin. [chromium] Geolocation breaks the compile if ENABLE_GEOLOCATION is set to 0 https://bugs.webkit.org/show_bug.cgi?id=43753 This change guards the entire contents of the V8 custom bindings files with ENABLE(GEOLOCATION) to match JSC. No new tests, build fix only. * bindings/v8/custom/V8CustomPositionCallback.cpp: * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: * bindings/v8/custom/V8GeolocationCustom.cpp: 2010-08-11 Kwang Yul Seo Reviewed by David Levin. Include in GraphicsContextSkia.cpp https://bugs.webkit.org/show_bug.cgi?id=43843 wtf/UnusedParam.h must be included because UNUSED_PARAM macro is used. * platform/graphics/skia/GraphicsContextSkia.cpp: 2010-08-11 Nico Weber Reviewed by David Levin. [chromium/mac]: Fix colors in compositing mode https://bugs.webkit.org/show_bug.cgi?id=43823 The textures are drawn by opengl, which doesn't do any color space correction -- it assumes everything is in the device color space already. Hence, when drawing into the memory that will be uploaded as opengl texture, use the device color space. * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::updateTextureContents): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::updateTextureContents): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::setRootLayerCanvasSize): 2010-08-11 Kenneth Russell Reviewed by Dimitri Glazkov. Remove obsolete texImage2D and texSubImage2D entry points https://bugs.webkit.org/show_bug.cgi?id=40320 No new tests; covered by existing WebGL tests. * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContext.idl: 2010-08-11 Gavin Barraclough Windows build fix. * platform/win/BString.cpp: (WebCore::BString::BString): 2010-08-11 Gavin Barraclough Qt build fix II. * WebCore.xcodeproj/project.pbxproj: * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): 2010-08-11 Gavin Barraclough Qt build fix. * WebCore.xcodeproj/project.pbxproj: * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): 2010-08-11 Steve Block Reviewed by Jeremy Orlow. Need EmptyDeviceOrientationClient and EmptyDeviceMotionClient for use with SVGImage https://bugs.webkit.org/show_bug.cgi?id=43848 Tested by existing DeviceOrientation tests. * loader/EmptyClients.h: (WebCore::EmptyDeviceMotionClient::setController): (WebCore::EmptyDeviceMotionClient::startUpdating): (WebCore::EmptyDeviceMotionClient::stopUpdating): (WebCore::EmptyDeviceMotionClient::currentDeviceMotion): (WebCore::EmptyDeviceOrientationClient::setController): (WebCore::EmptyDeviceOrientationClient::startUpdating): (WebCore::EmptyDeviceOrientationClient::stopUpdating): (WebCore::EmptyDeviceOrientationClient::lastOrientation): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): 2010-08-11 Rob Buis Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=42042 An empty value for xml:lang isn't considered Revert last line change of my patch ; it happens to behave correctly and same as before, but makes the use case of empty values unneededly slower. No new tests. (No change in behavior) * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): 2010-08-11 Kevin Ollivier [wx, WebDOM] Build fix. Fix callback params and WebCore::String -> WTF::String fixes. * bindings/cpp/WebDOMCustomVoidCallback.cpp: Added. (WebDOMCustomVoidCallback::WebDOMCustomVoidCallback): (WebDOMCustomVoidCallback::~WebDOMCustomVoidCallback): (WebDOMCustomVoidCallback::handleEvent): (toWebCore): * bindings/cpp/WebDOMCustomVoidCallback.h: Added. (WebDOMCustomVoidCallback::create): * bindings/cpp/WebDOMHTMLDocumentCustom.cpp: (documentWrite): * bindings/cpp/WebDOMString.cpp: (WebDOMString::equals): * bindings/scripts/CodeGeneratorCPP.pm: * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: (WebDOMTestCallback::callbackWithClass1Param): (WebDOMTestCallback::callbackWithClass2Param): (WebDOMTestCallback::callbackWithNonBoolReturnType): * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/V8/V8TestInterface.h: * bindings/scripts/test/V8/V8TestObj.h: * wscript: 2010-08-11 Gavin Barraclough Rubber stamps by Darin Adler & Sam Weinig. Bug 43867 - Some UString cleanup Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String. Move string concatenation methods to a new header to simplify down UString.h. Remove is8Bit(). * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::hasCSSPropertyNamePrefix): (WebCore::cssPropertyName): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::setPort): * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::dispatchDidParseSource): * bindings/js/ScriptString.h: (WebCore::ScriptString::size): * bindings/js/ScriptValue.cpp: (WebCore::jsToInspectorValue): * bindings/objc/WebScriptObject.mm: (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bridge/jni/jni_jsobject.mm: (JavaJSObject::convertValueToJObject): * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertArrayInstanceToJavaArray): (JSC::Bindings::convertValueToJValue): * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): 2010-08-10 David Hyatt Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=43806, add ability to paginate screen content. Add a new boolean to Document to indicate that content should be paginated. This is checked when doing page breaks and in a couple of other cases. * dom/Document.cpp: (WebCore::Document::Document): * dom/Document.h: (WebCore::Document::paginatedForScreen): (WebCore::Document::setPaginatedForScreen): (WebCore::Document::paginated): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintChildren): (WebCore::RenderBlock::calcColumnWidth): * rendering/RenderBox.cpp: (WebCore::RenderBox::calcHeight): * rendering/RenderView.cpp: (WebCore::RenderView::paint): 2010-08-11 Adam Barth Windows build fix. Turns out we need to unconditionally include HTMLEntityNames.cpp now that LegacyHTMLDocumentParser doesn't exist. * html/HTMLEntityParser.cpp: 2010-08-11 Eric Carlson Reviewed by Darin Adler. Inserting a element should immediately set networkState to NETWORK_NO_SOURCE. https://bugs.webkit.org/show_bug.cgi?id=42897 A element inserted as a child of a media element with a networkState of NETWORK_EMPTY should cause the networkState to immediately change to NETWORK_NO_SOURCE. * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Remove unused variable m_processingLoad. (WebCore::HTMLMediaElement::prepareForLoad): Set m_networkState to NETWORK_NO_SOURCE. (WebCore::HTMLMediaElement::loadInternal): Remove unused variable m_processingLoad. (WebCore::HTMLMediaElement::selectMediaResource): No need to change m_networkState, it was done in prepareForLoad. * html/HTMLMediaElement.h: * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::insertedIntoTree): Renamed from insertedIntoDocument because we want to do this setup whether or not the parent media element is in the document. * html/HTMLSourceElement.h: 2010-08-11 Adam Barth Rubber-stamped by Eric Seidel. Delete LegacyHTMLDocumentParser and LegacyPreloadScanner https://bugs.webkit.org/show_bug.cgi?id=43836 These classes are bit-rotting disturbingly quickly. We removed the last dependencies on these classes and so we can remove them. We might need to preserve some of their particular quirks to handle some legacy applications, but our current thinking is to do that with individual settings that affect the new parser. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::parseHTML): * dom/DocumentParser.h: * dom/XMLDocumentParserLibxml2.cpp: * dom/XMLDocumentParserQt.cpp: * html/HTMLConstructionSite.cpp: * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createParser): * html/HTMLEntityParser.cpp: (WebCore::decodeNamedEntity): * html/HTMLEntityParser.h: * html/HTMLFormControlElement.cpp: * html/HTMLTreeBuilder.cpp: * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createParser): * html/LegacyHTMLDocumentParser.cpp: Removed. * html/LegacyHTMLDocumentParser.h: Removed. * html/LegacyHTMLTreeBuilder.cpp: * html/LegacyPreloadScanner.cpp: Removed. * html/LegacyPreloadScanner.h: Removed. * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser): (WebCore::FTPDirectoryDocumentParser::appendEntry): (WebCore::FTPDirectoryDocumentParser::createTDForFilename): (WebCore::processFilesizeString): (WebCore::wasLastDayOfMonth): (WebCore::processFileDateString): (WebCore::FTPDirectoryDocumentParser::parseAndAppendOneLine): (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): (WebCore::FTPDirectoryDocumentParser::createBasicDocument): (WebCore::FTPDirectoryDocumentParser::append): (WebCore::FTPDirectoryDocumentParser::finish): * page/XSSAuditor.cpp: (WebCore::XSSAuditor::decodeHTMLEntities): * page/XSSAuditor.h: * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::prepend): 2010-08-11 Chris Jerdonek Reviewed by Adam Barth. Refactored FrameLoader::createWindow() out of the FrameLoader class since FrameLoader should not be responsible for creating windows. https://bugs.webkit.org/show_bug.cgi?id=39156 No new functionality, so no new tests. * bindings/generic/BindingDOMWindow.h: (WebCore::::createWindow): - Updated the call to FrameLoader's createWindow(). * bindings/js/JSDOMWindowCustom.cpp: (WebCore::createWindow): - Updated the call to FrameLoader's createWindow(). * loader/FrameLoader.cpp: (WebCore::createWindowFromFrameLoader): - Made FrameLoader::createWindow() non-member, non-friend and changed it to accept Frame* parameters instead of FrameLoader*. * loader/FrameLoader.h: - Updated the header file to reflect the above change to FrameLoader.cpp. 2010-08-11 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: small refactoring for CodeGeneratorInspector. all "notify" methods are generating in InspectorFrontend the other methods are generating in InspectorBackend. https://bugs.webkit.org/show_bug.cgi?id=43849 * inspector/CodeGeneratorInspector.pm: 2010-08-11 Gustavo Noronha Silva Reviewed by Xan Lopez. [GTK] Misc improvements to the scrolling code https://bugs.webkit.org/show_bug.cgi?id=41926 Refactor code that uses deprecated ways of dealing with the adjustments to use the GtkVersioning infrastructure. * GNUmakefile.am: * platform/gtk/GtkVersioning.cpp: Added. * platform/gtk/GtkVersioning.h: * platform/gtk/ScrollViewGtk.cpp: * platform/gtk/ScrollbarGtk.cpp: (ScrollbarGtk::detachAdjustment): (ScrollbarGtk::updateThumbPosition): (ScrollbarGtk::updateThumbProportion): 2010-08-11 Nate Chapin Chromium mac build fix (variables weren't being initialized). * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::apply): Initalize dxLeft, dxRight, dyLeft, dyRight. 2010-08-11 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: apply correct fix to storage panel status bar buttons. https://bugs.webkit.org/show_bug.cgi?id=43846 * inspector/front-end/DatabaseTableView.js: (WebInspector.DatabaseTableView.prototype.get statusBarItems): * inspector/front-end/StoragePanel.js: (WebInspector.StoragePanel.prototype._genericViewSetup): 2010-08-11 Kevin Ollivier Reviewed by Adam Barth. Override operator= for C++ DOM binding classes with private structs and update C++ DOM bindings test results. https://bugs.webkit.org/show_bug.cgi?id=43735 * bindings/cpp/WebDOMEventTarget.cpp: (WebDOMEventTarget::operator=): * bindings/cpp/WebDOMEventTarget.h: * bindings/scripts/CodeGeneratorCPP.pm: * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: (WebDOMTestCallback::operator=): * bindings/scripts/test/CPP/WebDOMTestCallback.h: * bindings/scripts/test/CPP/WebDOMTestInterface.cpp: (WebDOMTestInterface::operator=): * bindings/scripts/test/CPP/WebDOMTestInterface.h: * bindings/scripts/test/CPP/WebDOMTestObj.cpp: (WebDOMTestObj::operator=): * bindings/scripts/test/CPP/WebDOMTestObj.h: 2010-08-11 Julie Parent Reviewed by Justin Garcia. Crash in replaceSelectionCommand with RTL text. https://bugs.webkit.org/show_bug.cgi?id=41485 For text with mixed directionality, sort the text boxes before computing gaps, since that code assumes the boxes are in order. Test: editing/execCommand/insert-image-on-top-of-directional-text.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteInsignificantText): Sort boxes like we do in TextIterator before computing gaps. * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): Use new compareByStart rather than compareBoxStart. No functional change. * rendering/InlineTextBox.h: (WebCore::InlineTextBox::compareByStart): Moved compareBoxStart from TextIterator here so it can be used in multiple places. 2010-08-11 Fumitoshi Ukai Unreviewed build fix of Leopard Intel Debug (Build) * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processBuffer): use %lu, instead of %ul 2010-08-11 Alejandro G. Castro Reviewed by Dirk Schulze. Fixes to the gaussian blur algorithm https://bugs.webkit.org/show_bug.cgi?id=41605 Added the recomendations of SVG regarding the kernel size calculation for the approximation of the gaussian blur. http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement. Modified also some variable names to clarify algorithm, reviewed the situation where both standard deviations are 0. * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::FEGaussianBlur): (WebCore::FEGaussianBlur::stdDeviationX): (WebCore::FEGaussianBlur::setStdDeviationX): (WebCore::FEGaussianBlur::stdDeviationY): (WebCore::FEGaussianBlur::setStdDeviationY): (WebCore::boxBlur): (WebCore::FEGaussianBlur::kernelPosition): Added the SVG kernel position recomendation. (WebCore::FEGaussianBlur::apply): (WebCore::FEGaussianBlur::externalRepresentation): * platform/graphics/filters/FEGaussianBlur.h: 2010-08-11 Kristian Monsen Reviewed by Steve Block. Compile fix for Android, added include for Reviewed by Alexey Proskuryakov. Fix length calculation to be more robust. https://bugs.webkit.org/show_bug.cgi?id=43777 Test: websocket/tests/frame-length-overflow.html * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::appendToBuffer): len is size_t. - add sanity check for integer wraps. (WebCore::WebSocketChannel::skipBuffer): len is size_t. (WebCore::WebSocketChannel::processBuffer): length is size_t. - add sanity check for integer wraps. * websockets/WebSocketChannel.h: change m_bufferSize and len to size_t. 2010-08-10 Eric Seidel Reviewed by Adam Barth. Fix three ASSERTs hit with the HTML5 TreeBuilder in fragment mode https://bugs.webkit.org/show_bug.cgi?id=43762 In fixing the insertAdjacentHTML I had to make small changes to the error logic, which ended up bringing us closer to HTML5. Test: fast/dom/HTMLElement/insertAdjacentHTML-errors.html * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attach): - This ASSERT was just wrong, the child should not be attached in the case the parent is not attached. * html/HTMLElement.cpp: (WebCore::contextElementForInsertion): - This is part of HTML5, needed to know what to call the HTML or XML parsers with. The previous code always passed "this" which is wrong in the case of beforeBegin or afterEnd insertion. (WebCore::HTMLElement::insertAdjacentHTML): - Use the right contextElement now that we know how to compute it. * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndTagForInCell): - This ASSERT is direct from the spec, but it's wrong, so I've filed a spec bug. 2010-08-11 Adam Barth Attempt to fix Windows build. * platform/win/COMPtr.h: (WTF::): 2010-08-11 Adam Barth Reviewed by Eric Seidel. Port view-source to new parser https://bugs.webkit.org/show_bug.cgi?id=43746 This patch switches the view-source mode for frames over to using the new HTML parsing infrastructure. This patch is an architectural change to how we parser view source documents. Previously, the LegacyHTMLDocumentParser would output a "guide string" that consided of the inter-attribute whitespace and various "control" characters. The HTMLViewSourceDocument would then interpret this guide string to approximately reconstruct the source of the original document and colorize various syntatic constructs. Unfortunately, that approach is inherently low-fidelity. It's not really feasible to reconstruct the input document from the token stream. The old view source mode also had a number of hacks in the old parser (e.g., to turn of decoding of HTML entities). Instead of trying to reconstruct the original document from the token stream, we use the segmentation information given by the tokens to colorize the input document itself. Each token now caries information about where in the input stream it came from and where various subcomponents (e.g., attribute names and values) are located. This approach is higher fidelity because we use this segmentation information to colorize the original input instead of attempting to reconstruct the original input. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLDocumentParser.cpp: * html/HTMLToken.h: (WebCore::HTMLToken::clear): (WebCore::HTMLToken::startIndex): (WebCore::HTMLToken::length): (WebCore::HTMLToken::end): * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createParser): (WebCore::HTMLViewSourceDocument::addSource): (WebCore::HTMLViewSourceDocument::processDoctypeToken): (WebCore::HTMLViewSourceDocument::processTagToken): (WebCore::HTMLViewSourceDocument::processCommentToken): (WebCore::HTMLViewSourceDocument::processCharacterToken): (WebCore::HTMLViewSourceDocument::addRange): * html/HTMLViewSourceDocument.h: * html/HTMLViewSourceParser.cpp: Added. (WebCore::HTMLViewSourceParser::~HTMLViewSourceParser): (WebCore::HTMLViewSourceParser::insert): (WebCore::HTMLViewSourceParser::pumpTokenizer): (WebCore::HTMLViewSourceParser::append): (WebCore::HTMLViewSourceParser::sourceForToken): (WebCore::HTMLViewSourceParser::updateTokenizerState): (WebCore::HTMLViewSourceParser::finish): (WebCore::HTMLViewSourceParser::finishWasCalled): * html/HTMLViewSourceParser.h: Added. (WebCore::HTMLViewSourceParser::HTMLViewSourceParser): (WebCore::HTMLViewSourceParser::document): * html/LegacyHTMLDocumentParser.cpp: (WebCore::LegacyHTMLDocumentParser::processToken): (WebCore::LegacyHTMLDocumentParser::processDoctypeToken): 2010-08-11 Yoshiki Hayashi Reviewed by Shinichiro Hamaji. Make form controls, textarea, legend and datagrid treat width: auto as specified in stretching vertical flexbox. Otherwise it's treated as intrinsic as before. https://bugs.webkit.org/show_bug.cgi?id=17918 Test: fast/flexbox/vertical-box-form-controls.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): * rendering/RenderBox.cpp: (WebCore::RenderBox::sizesToIntrinsicWidth): 2010-08-10 Darin Adler Reviewed by Sam Weinig. Add leakRef and clear to all RefPtr variants https://bugs.webkit.org/show_bug.cgi?id=42389 * platform/win/COMPtr.h: Changed all uses of "template <...>" to instead do "template<...>". Defined many of the inlined functions outside the class definition, to avoid style checker warnings about multiple statements on a single line and for slightly better clarity of the class definition itself. Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we don't have to rename all callers at once. Added a clear function. Changed the hash table code so it doesn't need to call releaseRef, and so it uses the hash table deleted value hooks already present within the class. 2010-08-10 Ariya Hidayat [Qt] Fix build warning: remove reference to html/BlobRegistryImp.h * WebCore.pro: 2010-08-10 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=43803 Only the last Korean character can be shown if font style is enabled while typing (43803) Test: platform/mac/editing/input/bold-node.html * editing/Editor.cpp: (WebCore::Editor::setComposition): It is not clear to me what the "baseNode == extentNode" check is about in this function , but let's try to make it more likely that it passes. 2010-08-10 Hayato Ito Reviewed by Kent Tamura. Make CSSSelector::specificity() non-recursive. https://bugs.webkit.org/show_bug.cgi?id=43784 This change is one of the required changes to fix the following master bug: https://bugs.webkit.org/show_bug.cgi?id=42806 No functional change, thus no tests. * css/CSSSelector.cpp: (WebCore::CSSSelector::specificity): (WebCore::CSSSelector::specificityForOneSelector): (WebCore::CSSSelector::specificityForPage): * css/CSSSelector.h: 2010-08-10 Matthew Delaney Reviewed by Darin Adler. 2d.path.clip.empty.html test is failing https://bugs.webkit.org/show_bug.cgi?id=43161 * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::clip): Catching the empty path case from being sent directly to CGContextClip - which would ignore it. Instead, using CGContextClip with a CGRectZero to achieve the desired behavior of reducing the clipping region to nothing. 2010-08-10 Gyuyoung Kim Reviewed by Antonio Gomes. [EFL] Add video files to enable video in WebKit EFL https://bugs.webkit.org/show_bug.cgi?id=43790 Add files regarding html5 video to CMakeList.txt for WebKit Efl. But, this patch is not run html5 video on WebKit EFL yet. * CMakeLists.txt: Add files related to html5video. * platform/efl/LocalizedStringsEfl.cpp: Add functions for html5 video. (WebCore::localizedMediaControlElementString): (WebCore::localizedMediaControlElementHelpText): (WebCore::localizedMediaTimeDescription): * platform/graphics/MediaPlayer.cpp: (WebCore::installedMediaEngines): Disable MediaPlayerPrivate::r egisterMediaEngine for WebKit EFL. 2010-08-10 Patrick Gansterer Reviewed by Nikolas Zimmermann. Add a toRenderSVGImage function https://bugs.webkit.org/show_bug.cgi?id=43789 Add a function for casting to RenderSVGImage and use it. * rendering/RenderSVGImage.h: (WebCore::toRenderSVGImage): * rendering/RenderTreeAsText.cpp: (WebCore::write): * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeSVGImage): * rendering/SVGRenderTreeAsText.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::attach): 2010-08-10 Adam Barth Reviewed by Eric Seidel. Clients of HTMLTokenizer should be able to see where characters went in the token https://bugs.webkit.org/show_bug.cgi?id=43766 When viewing the source of a document, we want to colorize different parts of the input depending on how they were tokenized. In this patch, we expose the internal segmentation of a token by recording the start and end offsets for each attribute name and each attribute value. * html/HTMLToken.h: (WebCore::HTMLToken::addNewAttribute): (WebCore::HTMLToken::beginAttributeName): (WebCore::HTMLToken::endAttributeName): (WebCore::HTMLToken::beginAttributeValue): (WebCore::HTMLToken::endAttributeValue): (WebCore::HTMLToken::appendToAttributeName): (WebCore::HTMLToken::appendToAttributeValue): (WebCore::AtomicHTMLToken::AtomicHTMLToken): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::nextToken): 2010-08-10 Dumitru Daniliuc Reviewed by David Levin. Do not post a sync task to the DB thread if it's terminating. https://bugs.webkit.org/show_bug.cgi?id=43676 * bindings/generic/ActiveDOMCallback.cpp: The context can sometimes be NULL. Check if it's NULL instead of asserting that it's not. (WebCore::ActiveDOMCallback::ActiveDOMCallback): * dom/ActiveDOMObject.cpp: (WebCore::ActiveDOMObject::ActiveDOMObject): * storage/Database.cpp: Do not post a sync task to the DB thread if the DB thread is terminating. Also, when a task is destroyed, ASSERT that it was completed, or that it had no synchronizer. (WebCore::Database::openAndVerifyVersion): (WebCore::Database::markAsDeletedAndClose): (WebCore::Database::tableNames): * storage/DatabaseTask.cpp: (WebCore::DatabaseTaskSynchronizer::DatabaseTaskSynchronizer): (WebCore::DatabaseTask::~DatabaseTask): (WebCore::DatabaseTask::performTask): * storage/DatabaseTask.h: (WebCore::DatabaseTaskSynchronizer::hasCheckedForTermination): (WebCore::DatabaseTaskSynchronizer::setHasCheckedForTermination): (WebCore::DatabaseTask::hasSynchronizer): (WebCore::DatabaseTask::hasCheckedForTermination): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::terminationRequested): (WebCore::DatabaseThread::scheduleTask): (WebCore::DatabaseThread::scheduleImmediateTask): * storage/DatabaseThread.h: 2010-08-10 Gavin Barraclough Qt build fix. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): 2010-08-10 Jian Li Fix more build break. * bindings/v8/SerializedScriptValue.cpp: (WebCore::ZigZag::Reader::readBlob): (WebCore::ZigZag::Reader::readFile): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::revokeBlobURL): * dom/ScriptExecutionContext.h: * html/Blob.cpp: (WebCore::Blob::slice): 2010-08-10 Gavin Barraclough Rubber stamped by Sam Weinig Bug 43817 - Remove UString::Rep UString::Rep has for a long time been replaced by UStringImpl (Rep remaining as a typedef). UStringImpl has since been removed too (unified with StringImpl). Remove Rep, rename rep() to impl() and m_rep to m_impl. Also add impl() method to Identifier, and rename its UString member from _ustring to m_string. * bindings/js/JSDOMBinding.cpp: (WebCore::findAtomicString): * bindings/js/JSDOMBinding.h: (WebCore::ustringToString): (WebCore::identifierToString): (WebCore::ustringToAtomicString): (WebCore::identifierToAtomicString): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValueData::SerializedScriptValueData): * bridge/IdentifierRep.cpp: (WebCore::IdentifierRep::get): * bridge/c/c_class.cpp: (JSC::Bindings::CClass::methodsNamed): (JSC::Bindings::CClass::fieldNamed): * bridge/jni/jsc/JavaClassJSC.cpp: (JavaClass::JavaClass): (JavaClass::methodsNamed): (JavaClass::fieldNamed): * bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaStringImpl::~JavaStringImpl): (JSC::Bindings::JavaStringImpl::init): (JSC::Bindings::JavaStringImpl::UTF8String): (JSC::Bindings::JavaStringImpl::uchars): (JSC::Bindings::JavaStringImpl::length): (JSC::Bindings::JavaStringImpl::uString): * bridge/jsc/BridgeJSC.h: 2010-08-10 Jian Li Fix qt build break. * html/BlobRegistryImpl.cpp: * html/BlobRegistryImpl.h: * html/BlobURL.cpp: * html/BlobURL.h: * platform/BlobRegistry.h: 2010-08-10 Jian Li Reviewed by David Levin. Add the support to register the blob data. https://bugs.webkit.org/show_bug.cgi?id=43600 This is the first step towards adding Blob URL support. The blob has an internal URL (used by FileReader) and public URLs (used by Blob.url). The URL and its associated data are managed by BlobRegistry interface. This patch does not remove the usage of BlobItem. It will be removed when all the blob data support is hooked up and the new tests will be added then. * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedBlob::create): (WebCore::SerializedBlob::url): (WebCore::SerializedBlob::type): (WebCore::SerializedBlob::size): (WebCore::SerializedBlob::SerializedBlob): (WebCore::SerializedFile::create): (WebCore::SerializedFile::path): (WebCore::SerializedFile::url): (WebCore::SerializedFile::type): (WebCore::SerializedFile::SerializedFile): (WebCore::SerializedFileList::item): (WebCore::SerializedFileList::SerializedFileList): (WebCore::SerializedScriptValueData::SerializedScriptValueData): (WebCore::SharedSerializedData::asBlob): (WebCore::SharedSerializedData::asFile): (WebCore::SerializingTreeWalker::convertIfTerminal): (WebCore::DeserializingTreeWalker::convertIfTerminal): (WebCore::TeardownTreeWalker::convertIfTerminal): * bindings/js/SerializedScriptValue.h: (WebCore::SerializedScriptValueData::): (WebCore::SerializedScriptValueData::asString): (WebCore::SerializedScriptValueData::asBlob): (WebCore::SerializedScriptValueData::asFile): * bindings/v8/SerializedScriptValue.cpp: (WebCore::ZigZag::Writer::writeBlob): (WebCore::ZigZag::Writer::writeFile): (WebCore::ZigZag::Writer::writeFileList): (WebCore::ZigZag::Writer::doWriteUintHelper): (WebCore::ZigZag::Writer::doWriteUint32): (WebCore::ZigZag::Writer::doWriteUint64): (WebCore::ZigZag::Serializer::writeBlob): (WebCore::ZigZag::Serializer::writeFile): (WebCore::ZigZag::Reader::readBlob): (WebCore::ZigZag::Reader::readFile): (WebCore::ZigZag::Reader::readFileList): (WebCore::ZigZag::Reader::doReadUintHelper): (WebCore::ZigZag::Reader::doReadUint32): (WebCore::ZigZag::Reader::doReadUint64): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::trackBlobURL): (WebCore::ScriptExecutionContext::revokeBlobURL): * dom/ScriptExecutionContext.h: * html/Blob.cpp: (WebCore::Blob::Blob): (WebCore::Blob::~Blob): (WebCore::Blob::createPublicURL): * html/Blob.h: (WebCore::Blob::create): (WebCore::Blob::url): * html/BlobRegistryImpl.cpp: Added. * html/BlobRegistryImpl.h: Added. * html/BlobStorageData.h: Added. * html/BlobURL.cpp: Added. * html/BlobURL.h: Added. * html/File.cpp: (WebCore::File::File): * html/File.h: (WebCore::File::create): * platform/BlobData.cpp: Added. * platform/BlobData.h: Added. * platform/BlobRegistry.h: Added. 2010-08-10 Adam Barth Reviewed by Eric Seidel. SegmentedString should keep track of how many characters it consumes https://bugs.webkit.org/show_bug.cgi?id=43765 The easiest way to keep track of how many characters we've consumed would be to increment a counter every time we advance, but that's too slow. Instead, we keep track lazily and update our summary durning the slow case of advance (which is sufficiently rare). There's some subtly to how this works w.r.t. "unconsuming" characters by pushing them back on the front of the segmented string. This isn't really a "right answer" here because the notion of unconsuming input isn't present in the API. This patch makes some assumptions about how clients of this class use its API. In a future patch, we might want to rename some of the method names to make this more explicit. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::operator=): (WebCore::SegmentedString::append): (WebCore::SegmentedString::prepend): (WebCore::SegmentedString::advanceSubstring): * platform/text/SegmentedString.h: (WebCore::SegmentedSubstring::numberOfCharactersConsumed): (WebCore::SegmentedString::SegmentedString): (WebCore::SegmentedString::numberOfCharactersConsumed): 2010-08-10 Gavin Barraclough Rubber stamped by Sam Weinig. Bug 43816 - Remove UStringImpl The class was actually removed a long time ago, replaced by StringImpl. UStringImpl is just a typedef onto StringImpl. Remove this. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMBinding.cpp: (WebCore::findAtomicString): 2010-08-09 Stephen White Reviewed by David Levin. Prefer the medium-quality (bilinear) image resampling for 2D canvas on Chromium. https://bugs.webkit.org/show_bug.cgi?id=43646 This is what the accelerated path is going to do, so do it in the software path as well. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer): * platform/graphics/GraphicsContext.h: 2010-08-10 Chris Fleizach Reviewed by Dave Hyatt. Removing an element from an anonymous block causes crash https://bugs.webkit.org/show_bug.cgi?id=42309 There was a case where a continuation was added as a child, but if you asked that child who is your parent, it would return the wrong answer. The specific scenario was when a sibling of an element who was the start of a continuation was present. Retrieving the parent object had then follow the sibling chain and then follow the originating continuation chain. Test: accessibility/removed-anonymous-block-child-causes-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::nextSibling): Fix erroneous comment (WebCore::nextContinuation): (WebCore::AccessibilityRenderObject::renderParentObject): Handle unhandled continuation case. (WebCore::AccessibilityRenderObject::addChildren): ASSERT that the parentObject() is the same when adding a new child. 2010-08-10 Abhishek Arya Reviewed by David Hyatt. Take checks for ruby base existence out of the ASSERTs. https://bugs.webkit.org/show_bug.cgi?id=43795 Test: fast/ruby/ruby-remove-no-base.html * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::addChild): (WebCore::RenderRubyRun::removeChild): 2010-08-06 Zhenyao Mo Reviewed by Dimitri Glazkov. texture functions should gen INVALID_OPERATION if no texture is bound https://bugs.webkit.org/show_bug.cgi?id=42907 * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::copyTexImage2D): Check if a texture is bound to target. (WebCore::WebGLRenderingContext::copyTexSubImage2D): Ditto. (WebCore::WebGLRenderingContext::generateMipmap): Ditto. (WebCore::WebGLRenderingContext::getTexParameter): Ditto. (WebCore::WebGLRenderingContext::texImage2DBase): Ditto. (WebCore::WebGLRenderingContext::texParameter): Ditto. (WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto. (WebCore::WebGLRenderingContext::validateTextureBinding): Check if target is valid and if a texture is bound to it. * html/canvas/WebGLRenderingContext.h: Declare validateTextureBinding(). 2010-08-10 Patrick Gansterer Reviewed by Sam Weinig. [WINCE] Implement Path::currentPoint() https://bugs.webkit.org/show_bug.cgi?id=42927 * platform/graphics/wince/PathWince.cpp: (WebCore::Path::currentPoint): 2010-08-10 Ariya Hidayat [Qt] Warning fix, remove reference to platform/text/StringImpl.h * WebCore.pro: 2010-08-10 Alice Liu Chromium build fix attempt. not reviewed * platform/text/TextBoundaries.cpp: use correct stringimplh include 2010-08-10 Jian Li Chromium build fix. * platform/graphics/chromium/FontPlatformDataChromiumWin.h: * platform/graphics/chromium/FontPlatformDataLinux.cpp: 2010-08-10 Johnny Ding Reviewed by Adam Barth. Change the ScriptController::processingUserGesture to static method and use dynamic(JSC binding)/entered(V8 binding) frame to check the user gesture. https://bugs.webkit.org/show_bug.cgi?id=42827. Test: fast/events/popup-blocked-from-iframe-script.html * WebCore.order: * bindings/js/JSDOMBinding.cpp: (WebCore::processingUserGesture): * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setLocation): (WebCore::createWindow): (WebCore::domWindowAllowPopUp): (WebCore::JSDOMWindow::open): (WebCore::JSDOMWindow::showModalDialog): * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::setLocation): * bindings/js/JSLocationCustom.cpp: (WebCore::navigateIfAllowed): (WebCore::JSLocation::reload): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): * bindings/js/ScriptController.h: * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): (WebCore::ScriptController::anyPageIsProcessingUserGesture): * bindings/v8/ScriptController.h: * bindings/v8/specialization/V8BindingState.cpp: (WebCore::::processingUserGesture): * loader/FrameLoader.cpp: (WebCore::FrameLoader::isProcessingUserGesture): 2010-08-10 Gavin Barraclough Chromium build fix * platform/graphics/chromium/FontPlatformDataLinux.h: 2010-08-10 Gavin Barraclough Rubber stamped by Sam Weinig. Bug 43786 - Move AtomicStringHash from WebCore to WTF Also remove deprecated string headers from WebCore/platform/text. * ForwardingHeaders/wtf/text/AtomicStringHash.h: Added. * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: * bindings/cpp/WebDOMHTMLCollectionCustom.cpp: * bindings/js/JSCSSStyleDeclarationCustom.cpp: * bindings/js/JSClipboardCustom.cpp: * bindings/js/JSDOMApplicationCacheCustom.cpp: * bindings/js/JSDOMMimeTypeArrayCustom.cpp: * bindings/js/JSDOMPluginArrayCustom.cpp: * bindings/js/JSDOMPluginCustom.cpp: * bindings/js/JSDOMStringMapCustom.cpp: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDataGridColumnListCustom.cpp: * bindings/js/JSHTMLAllCollectionCustom.cpp: * bindings/js/JSHTMLCollectionCustom.cpp: * bindings/js/JSMessagePortCustom.cpp: * bindings/js/JSNodeListCustom.cpp: * bindings/scripts/CodeGeneratorCPP.pm: * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/V8/V8TestInterface.h: * bindings/scripts/test/V8/V8TestObj.h: * bindings/v8/ScriptDebugServer.h: * bindings/v8/V8Binding.cpp: * bindings/v8/V8Binding.h: * bridge/jni/v8/JavaClassV8.h: * css/CSSFontFaceSource.h: * css/CSSFontSelector.cpp: * css/CSSFontSelector.h: * css/CSSNamespace.h: * css/CSSParser.cpp: * css/CSSParser.h: * css/CSSParserValues.h: * css/CSSStyleSelector.h: * css/CSSVariablesDeclaration.h: * css/MediaFeatureNames.h: * css/MediaQueryExp.h: * css/WebKitCSSKeyframesRule.h: * dom/CustomEvent.h: * dom/Document.cpp: * dom/Event.cpp: * dom/Event.h: * dom/EventNames.h: * dom/EventTarget.h: * dom/InputElement.h: * dom/MessagePort.cpp: * dom/MessagePort.h: * dom/NameNodeList.h: * dom/NodeRareData.h: * dom/QualifiedName.h: * dom/ScriptElement.cpp: * dom/SpaceSplitString.h: * dom/TagNodeList.h: * dom/XMLDocumentParser.h: * editing/EditorCommand.cpp: * history/mac/HistoryItemMac.mm: * html/BlobBuilder.cpp: * html/DataGridColumn.h: * html/DataGridColumnList.cpp: * html/HTMLDocument.h: * html/HTMLInputElement.cpp: * html/HTMLTokenizer.cpp: * html/HTMLTokenizer.h: * html/LegacyPreloadScanner.cpp: * html/LegacyPreloadScanner.h: * inspector/InspectorCSSStore.h: * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: * inspector/InspectorDOMAgent.h: * inspector/InspectorDebuggerAgent.h: * inspector/InspectorValues.h: * loader/Cache.h: * loader/CrossOriginAccessControl.cpp: * loader/CrossOriginPreflightResultCache.h: * loader/DocLoader.h: * loader/ImageLoader.h: * loader/appcache/ApplicationCache.h: * loader/appcache/ApplicationCacheStorage.h: * loader/appcache/DOMApplicationCache.h: * loader/icon/IconDatabase.h: * loader/icon/IconRecord.h: * loader/loader.h: * notifications/Notification.h: * page/FrameTree.h: * page/Page.cpp: * page/PageGroup.h: * page/SecurityOrigin.h: * page/Settings.h: * page/WindowFeatures.cpp: * page/animation/AnimationBase.h: * page/animation/AnimationControllerPrivate.h: * page/animation/CompositeAnimation.h: * platform/Cookie.h: * platform/KURL.cpp: * platform/KURLGoogle.cpp: * platform/KURLHash.h: * platform/Length.cpp: * platform/LinkHash.cpp: * platform/LinkHash.h: * platform/MIMETypeRegistry.cpp: * platform/MIMETypeRegistry.h: * platform/SchemeRegistry.h: * platform/ThreadGlobalData.cpp: * platform/ThreadGlobalData.h: * platform/cf/BinaryPropertyList.cpp: * platform/chromium/SearchPopupMenuChromium.cpp: * platform/efl/ClipboardEfl.cpp: * platform/efl/CookieJarEfl.cpp: * platform/efl/PlatformKeyboardEventEfl.cpp: * platform/graphics/FontCache.cpp: * platform/graphics/FontFamily.h: * platform/graphics/MediaPlayer.h: * platform/graphics/cg/ImageSourceCGWin.cpp: * platform/graphics/chromium/FontCacheChromiumWin.cpp: * platform/graphics/chromium/FontCacheLinux.cpp: * platform/graphics/chromium/FontUtilsChromiumWin.cpp: * platform/graphics/chromium/LayerChromium.h: * platform/graphics/filters/Filter.h: * platform/graphics/mac/FontPlatformData.h: * platform/graphics/mac/GraphicsLayerCA.h: * platform/graphics/qt/FontCacheQt.cpp: * platform/graphics/win/FontCacheWin.cpp: * platform/graphics/win/FontPlatformDataCGWin.cpp: * platform/graphics/win/FontPlatformDataCairoWin.cpp: * platform/graphics/win/FontPlatformDataWin.cpp: * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: * platform/graphics/win/WKCACFLayer.h: * platform/graphics/wince/FontPlatformData.cpp: * platform/graphics/wx/FontPlatformData.h: * platform/gtk/ClipboardGtk.cpp: * platform/gtk/DataObjectGtk.h: * platform/haiku/ClipboardHaiku.cpp: * platform/haiku/CookieJarHaiku.cpp: * platform/haiku/SearchPopupMenuHaiku.cpp: * platform/mac/SearchPopupMenuMac.mm: * platform/mac/ThreadCheck.mm: * platform/network/CredentialStorage.cpp: * platform/network/HTTPHeaderMap.h: * platform/network/cf/DNSCFNet.cpp: * platform/network/curl/CookieJarCurl.cpp: * platform/qt/ClipboardQt.cpp: * platform/text/AtomicString.h: Removed. * platform/text/AtomicStringHash.h: Removed. * platform/text/AtomicStringImpl.h: Removed. * platform/text/AtomicStringKeyedMRUCache.h: * platform/text/StringBuilder.cpp: * platform/text/StringHash.h: Removed. * platform/text/StringImpl.h: Removed. * platform/text/TextCodecLatin1.cpp: * platform/text/TextCodecUTF16.cpp: * platform/text/TextCodecUserDefined.cpp: * platform/text/cf/HyphenationCF.cpp: * platform/text/cf/StringImplCF.cpp: * platform/text/mac/HyphenationMac.mm: * platform/text/mac/StringImplMac.mm: * platform/text/transcoder/FontTranscoder.h: * platform/text/wince/TextCodecWinCE.cpp: * platform/win/BString.cpp: * platform/win/ClipboardWin.cpp: * platform/win/SearchPopupMenuWin.cpp: * platform/wince/SearchPopupMenuWince.cpp: * platform/wx/ClipboardWx.cpp: * plugins/DOMMimeTypeArray.cpp: * plugins/DOMPlugin.cpp: * plugins/DOMPluginArray.cpp: * plugins/PluginDatabase.h: * plugins/PluginPackage.h: * plugins/PluginStream.h: * rendering/RenderApplet.h: * rendering/RenderText.cpp: * rendering/style/BindingURI.h: * rendering/style/ContentData.cpp: * rendering/style/CounterContent.h: * rendering/style/CounterDirectives.h: * rendering/style/KeyframeList.h: * rendering/style/StyleRareInheritedData.h: * storage/AbstractDatabase.cpp: * storage/DatabaseAuthorizer.h: * storage/DatabaseTracker.h: * storage/IDBDatabaseBackendImpl.h: * storage/IDBFactoryBackendImpl.h: * storage/IDBObjectStoreBackendImpl.h: * storage/OriginQuotaManager.h: * storage/OriginUsageRecord.h: * storage/SQLTransactionCoordinator.h: * storage/StorageAreaSync.h: * storage/StorageMap.h: * storage/StorageNamespaceImpl.cpp: * storage/chromium/QuotaTracker.h: * svg/SVGAltGlyphElement.h: * svg/SVGDocumentExtensions.cpp: * svg/SVGDocumentExtensions.h: * svg/SVGFitToViewBox.cpp: * svg/SVGLangSpace.h: * svg/animation/SMILTimeContainer.h: * svg/graphics/filters/SVGFilterBuilder.h: * websockets/WebSocket.h: * websockets/WebSocketChannel.cpp: * websockets/WebSocketHandshake.cpp: * websockets/WebSocketHandshakeResponse.cpp: * wml/WMLPageState.h: * workers/AbstractWorker.h: * workers/DefaultSharedWorkerRepository.h: * workers/Worker.h: * workers/WorkerContext.h: * xml/XMLHttpRequest.h: * xml/XMLHttpRequestUpload.cpp: * xml/XMLHttpRequestUpload.h: * xml/XPathExpressionNode.h: * xml/XPathNamespace.h: * xml/XPathParser.cpp: * xml/XSLTProcessor.h: 2010-08-10 Pavel Feldman Not reviewed. Adding changes that escaped from r65072. Web Inspector: move database processing to native layer. https://bugs.webkit.org/show_bug.cgi?id=43788 * inspector/front-end/InspectorBackendStub.js: (WebInspector.InspectorBackendStub): * inspector/front-end/StoragePanel.js: (WebInspector.StoragePanel.prototype._genericViewSetup): 2010-08-10 Gustavo Noronha Silva Reviewed by Xan Lopez. [GTK] Inputs of type 'search' have weird looking checkboxes instead of search/clear icons https://bugs.webkit.org/show_bug.cgi?id=43760 Draw appropriate GTK+ stock images for search/clear icons in search entries. * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::paintSearchFieldResultsButton): (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration): (WebCore::RenderThemeGtk::paintSearchFieldCancelButton): 2010-08-10 Pavel Feldman Not reviewed. Qt build fix, follow up for r65072. * inspector/InspectorController.cpp: (WebCore::InspectorController::releaseFrontendLifetimeAgents): 2010-08-10 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: move database processing to native layer. https://bugs.webkit.org/show_bug.cgi?id=43788 * English.lproj/localizedStrings.js: * WebCore.gypi: * bindings/js/JSInjectedScriptHostCustom.cpp: * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: * inspector/CodeGeneratorInspector.pm: * inspector/InjectedScript.cpp: (WebCore::InjectedScript::dispatch): * inspector/InjectedScript.h: * inspector/InjectedScriptHost.cpp: * inspector/InjectedScriptHost.h: * inspector/InjectedScriptHost.idl: * inspector/Inspector.idl: * inspector/InspectorBackend.cpp: (WebCore::InspectorBackend::dispatchOnInjectedScript): (WebCore::InspectorBackend::executeSQL): * inspector/InspectorBackend.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::releaseFrontendLifetimeAgents): * inspector/InspectorController.h: * inspector/InspectorDebuggerAgent.h: * inspector/InspectorStorageAgent.cpp: Added. (WebCore::): (WebCore::InspectorStorageAgent::InspectorStorageAgent): (WebCore::InspectorStorageAgent::~InspectorStorageAgent): (WebCore::InspectorStorageAgent::executeSQL): (WebCore::InspectorStorageAgent::clearFrontend): * inspector/InspectorStorageAgent.h: Added. (WebCore::InspectorStorageAgent::create): (WebCore::InspectorStorageAgent::frontend): * inspector/front-end/Database.js: (WebInspector.Database.prototype.executeSql): (WebInspector.sqlTransactionSucceeded): (WebInspector.sqlTransactionFailed): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._queryFinished): (WebInspector.DatabaseQueryView.prototype._queryError): * inspector/front-end/DatabaseTableView.js: (WebInspector.DatabaseTableView.prototype._queryFinished): * inspector/front-end/InjectedScript.js: * inspector/front-end/InjectedScriptAccess.js: (InjectedScriptAccess._installHandler.InjectedScriptAccess.prototype.methodName): (InjectedScriptAccess._installHandler): * inspector/front-end/StoragePanel.js: (WebInspector.StoragePanel.prototype.dataGridForResult): 2010-08-10 Steve Block Reviewed by Jeremy Orlow. [V8] DeviceMotionEvent can not be used from JavaScript https://bugs.webkit.org/show_bug.cgi?id=43785 This is tested by the existing tests fast/dom/DeviceMotion/create-event.html and fast/dom/DeviceMotion/optional-event-properties.html. * bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8): 2010-08-10 Balazs Kelemen Reviewed by Antonio Gomes. [Qt] Build WebKit2 into a static lib https://bugs.webkit.org/show_bug.cgi?id=43621 Just build changes so no new tests. * WebCore.pri: Moved feature detection logic into features.pri since we need this in WebKit2.pro as well. * WebCore.pro: Moved the specification of the WebKit2 build to WebKit2.pro. Link against the static lib. * features.pri: Added. 2010-08-10 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector, Chromium: reloading of inspected page hits assert in InspectorController::enableDebuggerFromFrontend() https://bugs.webkit.org/show_bug.cgi?id=43780 * inspector/CodeGeneratorInspector.pm: * inspector/InspectorController.cpp: (WebCore::InspectorController::enableDebuggerFromFrontend): * inspector/InspectorController.h: (WebCore::InspectorController::hasFrontend): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::create): (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsState): (WebCore::InspectorDebuggerAgent::didParseSource): (WebCore::InspectorDebuggerAgent::failedToParseSource): (WebCore::InspectorDebuggerAgent::didPause): (WebCore::InspectorDebuggerAgent::didContinue): * inspector/InspectorDebuggerAgent.h: 2010-08-10 Tor Arne Vestbø Reviewed by Simon Hausmann. Make sure NPAPI plugins get an initial setNPWindow on Mac https://bugs.webkit.org/show_bug.cgi?id=43782 * plugins/mac/PluginViewMac.mm: 2010-08-10 Dirk Schulze Reviewed by Nikolas Zimmermann. Use SVGPathParser to create SVG paths and to perform path animations https://bugs.webkit.org/show_bug.cgi?id=43696 Removed toString() functions in all SVGPathSeg* objects as well as toPath() in SVGPathSegList. These hacks were used to create a SVG path data string or a platform path from a SVGPathSegList. Use the new SVGPathParser instead. Doesn't affect any tests. * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::applyResultsToTarget): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::toPathData): * svg/SVGPathParserFactory.cpp: (WebCore::SVGPathParserFactory::buildPathFromSVGPathSegList): (WebCore::SVGPathParserFactory::buildStringFromByteStream): (WebCore::SVGPathParserFactory::buildStringFromSVGPathSegList): * svg/SVGPathParserFactory.h: * svg/SVGPathSeg.cpp: * svg/SVGPathSeg.h: * svg/SVGPathSegArc.cpp: * svg/SVGPathSegArc.h: * svg/SVGPathSegClosePath.h: (WebCore::SVGPathSegClosePath::pathSegTypeAsLetter): * svg/SVGPathSegCurvetoCubic.h: * svg/SVGPathSegCurvetoCubicSmooth.h: * svg/SVGPathSegCurvetoQuadratic.h: * svg/SVGPathSegLinetoHorizontal.h: * svg/SVGPathSegLinetoVertical.h: * svg/SVGPathSegList.cpp: (WebCore::SVGPathSegList::getPathSegAtLength): * svg/SVGPathSegList.h: 2010-08-10 Sheriff Bot Unreviewed, rolling out r65056. http://trac.webkit.org/changeset/65056 https://bugs.webkit.org/show_bug.cgi?id=43773 "Clearly I missed something. I'm too tired to try and fix now. Will re-land in the morning." (Requested by eseidel on #webkit). * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attach): * html/HTMLElement.cpp: (WebCore::HTMLElement::insertAdjacentHTML): * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndTagForInCell): 2010-08-10 Yoshiki Hayashi Reviewed by Kent Tamura. Iterate over :first-letter so that it will be included in innerText. https://bugs.webkit.org/show_bug.cgi?id=39863 Test: fast/dom/inner-text-first-letter.html * editing/TextIterator.cpp: (WebCore::TextIterator::TextIterator): (WebCore::TextIterator::advance): (WebCore::TextIterator::handleTextNode): (WebCore::TextIterator::handleTextBox): (WebCore::TextIterator::emitText): * editing/TextIterator.h: 2010-08-10 Kent Tamura Reviewed by Darin Adler. Fix crashes by SelectionController::modify(). https://bugs.webkit.org/show_bug.cgi?id=43032 Test: editing/selection/selection-modify-crash.html * editing/visible_units.cpp: (WebCore::endOfDocument): Add NULL-check for document()->documentElement(). 2010-08-10 Dirk Schulze Reviewed by Nikolas Zimmermann. Add missing SVGPathSegList source for SVGPathParser https://bugs.webkit.org/show_bug.cgi?id=43691 Added SVGPathSegListSource to parse normalized or unaltered SVGPathSegLists and transform them to either a SVG path string, or a SVGPathByteStream. This will be needed to synchronize all SVGPathSegLists and the SVG path string of the 'd' attribute. Refactored SVGPathSource code, to read concrete path segments instead of type/flag/coordinates from the data sources. This is a further abstraction and seperates the reading of content from the parsing and interpreting. Doesn't affect any tests. * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * svg/SVGAllInOne.cpp: * svg/SVGPathByteStreamSource.cpp: (WebCore::SVGPathByteStreamSource::parseSVGSegmentType): (WebCore::SVGPathByteStreamSource::nextCommand): (WebCore::SVGPathByteStreamSource::parseMoveToSegment): (WebCore::SVGPathByteStreamSource::parseLineToSegment): (WebCore::SVGPathByteStreamSource::parseLineToHorizontalSegment): (WebCore::SVGPathByteStreamSource::parseLineToVerticalSegment): (WebCore::SVGPathByteStreamSource::parseCurveToCubicSegment): (WebCore::SVGPathByteStreamSource::parseCurveToCubicSmoothSegment): (WebCore::SVGPathByteStreamSource::parseCurveToQuadraticSegment): (WebCore::SVGPathByteStreamSource::parseCurveToQuadraticSmoothSegment): (WebCore::SVGPathByteStreamSource::parseArcToSegment): * svg/SVGPathByteStreamSource.h: (WebCore::SVGPathByteStreamSource::moveToNextToken): * svg/SVGPathParser.cpp: (WebCore::SVGPathParser::parseMoveToSegment): (WebCore::SVGPathParser::parseLineToSegment): (WebCore::SVGPathParser::parseLineToHorizontalSegment): (WebCore::SVGPathParser::parseLineToVerticalSegment): (WebCore::SVGPathParser::parseCurveToCubicSegment): (WebCore::SVGPathParser::parseCurveToCubicSmoothSegment): (WebCore::SVGPathParser::parseCurveToQuadraticSegment): (WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment): (WebCore::SVGPathParser::parseArcToSegment): * svg/SVGPathSegListSource.cpp: Added. (WebCore::SVGPathSegListSource::SVGPathSegListSource): (WebCore::SVGPathSegListSource::~SVGPathSegListSource): (WebCore::SVGPathSegListSource::hasMoreData): (WebCore::SVGPathSegListSource::parseSVGSegmentType): (WebCore::SVGPathSegListSource::nextCommand): (WebCore::SVGPathSegListSource::parseMoveToSegment): (WebCore::SVGPathSegListSource::parseLineToSegment): (WebCore::SVGPathSegListSource::parseLineToHorizontalSegment): (WebCore::SVGPathSegListSource::parseLineToVerticalSegment): (WebCore::SVGPathSegListSource::parseCurveToCubicSegment): (WebCore::SVGPathSegListSource::parseCurveToCubicSmoothSegment): (WebCore::SVGPathSegListSource::parseCurveToQuadraticSegment): (WebCore::SVGPathSegListSource::parseCurveToQuadraticSmoothSegment): (WebCore::SVGPathSegListSource::parseArcToSegment): * svg/SVGPathSegListSource.h: Added. (WebCore::SVGPathSegListSource::create): (WebCore::SVGPathSegListSource::moveToNextToken): * svg/SVGPathSource.h: * svg/SVGPathStringSource.cpp: (WebCore::SVGPathStringSource::parseMoveToSegment): (WebCore::SVGPathStringSource::parseLineToSegment): (WebCore::SVGPathStringSource::parseLineToHorizontalSegment): (WebCore::SVGPathStringSource::parseLineToVerticalSegment): (WebCore::SVGPathStringSource::parseCurveToCubicSegment): (WebCore::SVGPathStringSource::parseCurveToCubicSmoothSegment): (WebCore::SVGPathStringSource::parseCurveToQuadraticSegment): (WebCore::SVGPathStringSource::parseCurveToQuadraticSmoothSegment): (WebCore::SVGPathStringSource::parseArcToSegment): * svg/SVGPathStringSource.h: 2010-08-09 Ilya Tikhonovsky Reviewed by Yury Semikhatsky. Web Inspector: small refactoring for CodeGeneratorInspector. A number of push calls were replaced by embedded text. Just for improve code readability. https://bugs.webkit.org/show_bug.cgi?id=43770 * inspector/CodeGeneratorInspector.pm: 2010-08-09 Eric Seidel Reviewed by Adam Barth. Fix three ASSERTs hit with the HTML5 TreeBuilder in fragment mode https://bugs.webkit.org/show_bug.cgi?id=43762 In fixing the insertAdjacentHTML I had to make small changes to the error logic, which ended up bringing us closer to HTML5. Test: fast/dom/HTMLElement/insertAdjacentHTML-errors.html * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attach): - This ASSERT was just wrong, the child should not be attached in the case the parent is not attached. * html/HTMLElement.cpp: (WebCore::contextElementForInsertion): - This is part of HTML5, needed to know what to call the HTML or XML parsers with. The previous code always passed "this" which is wrong in the case of beforeBegin or afterEnd insertion. (WebCore::HTMLElement::insertAdjacentHTML): - Use the right contextElement now that we know how to compute it. * html/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processEndTagForInCell): - This ASSERT is direct from the spec, but it's wrong, so I've filed a spec bug. 2010-08-09 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: remove InspectorFrontend class and use RemoteInspectorFrontend instead. https://bugs.webkit.org/show_bug.cgi?id=43726 * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorController.cpp: (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::close): (WebCore::InspectorController::disconnectFrontend): * inspector/InspectorController.h: * inspector/InspectorFrontend.cpp: Removed. * inspector/InspectorFrontend.h: Removed. 2010-08-09 Ilya Tikhonovsky Reviewed by Pavel Feldman. Web Inspector: Remove obsolete JS wrappers for did* methods. https://bugs.webkit.org/show_bug.cgi?id=43738 * inspector/CodeGeneratorInspector.pm: * inspector/Inspector.idl: * inspector/front-end/BreakpointManager.js: * inspector/front-end/Callback.js: * inspector/front-end/ConsoleView.js: * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMStorage.js: * inspector/front-end/Database.js: * inspector/front-end/InjectedScriptAccess.js: * inspector/front-end/ProfilesPanel.js: * inspector/front-end/ResourcesPanel.js: * inspector/front-end/ScriptView.js: * inspector/front-end/ScriptsPanel.js: * inspector/front-end/inspector.js: (WebInspector.reportProtocolError): 2010-08-09 Gavin Barraclough Qt build fix attempt VIII. * dom/QualifiedName.cpp: (WebCore::QualifiedName::toString): * dom/XMLDocumentParserQt.cpp: (WebCore::handleElementNamespaces): 2010-08-09 Gavin Barraclough Qt build fix attempt VII. * dom/QualifiedName.cpp: (WebCore::QualifiedName::toString): * dom/XMLDocumentParserQt.cpp: (WebCore::handleElementNamespaces): 2010-08-09 Gavin Barraclough Qt build fix attempt VI. * dom/QualifiedName.cpp: (WebCore::QualifiedName::toString): * dom/XMLDocumentParserQt.cpp: (WebCore::handleElementNamespaces): 2010-08-09 Gavin Barraclough Qt build fix attempt V. * dom/QualifiedName.cpp: (WebCore::QualifiedName::toString): * dom/XMLDocumentParserQt.cpp: (WebCore::handleElementNamespaces): 2010-08-09 Gavin Barraclough Qt build fix attempt IV. * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): * dom/QualifiedName.cpp: (WebCore::QualifiedName::toString): * dom/XMLDocumentParserQt.cpp: (WebCore::handleElementNamespaces): 2010-08-09 Gavin Barraclough Speculative chromium build fix. * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::charactersAreAllASCII): 2010-08-09 Gavin Barraclough Qt build fix III. * css/CSSSelector.cpp: 2010-08-09 Adam Barth Reviewed by Eric Seidel. Remove error-prone external SegementedSubstring contructor https://bugs.webkit.org/show_bug.cgi?id=43752 There's a lot of code that assumes that SegmentedString takes ownership of its substrings. For example, when the HTML parser pauses and resumes asynchronously, it could explode if SegmentedString didn't own its substrings. Prior to this patch, there was a constructor that let SegmentedSubstring use an external string buffer. It turns out it was only used in a handful of places, but I'd rather pay the memcpy of these small strings than risk having them used after free. * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::documentWrite): * html/LegacyHTMLDocumentParser.cpp: (WebCore::LegacyHTMLDocumentParser::parseNonHTMLText): (WebCore::LegacyHTMLDocumentParser::scriptHandler): (WebCore::LegacyHTMLDocumentParser::parseComment): * platform/text/SegmentedString.h: (WebCore::SegmentedString::SegmentedString): 2010-08-09 Gavin Barraclough Speculative Qt build fix. * css/CSSSelector.cpp: 2010-08-09 Gavin Barraclough Speculative gtk build fix. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::handlePostReadFile): 2010-08-06 Gavin Barraclough Rubber stamped by Sam Weinig Bug 43594 - Add string forwards to Forward.h This allows us to remove forward declarations for these classes from WebCore/WebKit (a step in moving these class from WebCore:: to WTF::). * WebCore.xcodeproj/project.pbxproj: * accessibility/AXObjectCache.h: * accessibility/AccessibilityARIAGrid.h: * accessibility/AccessibilityListBoxOption.h: * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilityTable.h: * bindings/cpp/WebDOMCString.h: * bindings/cpp/WebDOMString.h: * bindings/gobject/ConvertToUTF8String.h: * bindings/js/DOMWrapperWorld.h: * bindings/js/JSDOMBinding.h: * bindings/js/JSDOMWindowBase.h: * bindings/js/JSMessagePortCustom.h: * bindings/js/JavaScriptCallFrame.h: * bindings/js/ScriptController.h: * bindings/js/ScriptProfile.h: * bindings/js/ScriptSourceProvider.h: * bindings/js/ScriptString.h: * bindings/js/WorkerScriptController.h: * bindings/objc/DOMImplementationFront.h: * bindings/v8/ScheduledAction.h: * bindings/v8/ScriptController.h: * bindings/v8/V8DOMWindowShell.h: * bindings/v8/V8Proxy.h: * bindings/v8/V8Utilities.h: * bindings/v8/custom/V8CustomXPathNSResolver.h: * bridge/c/c_utility.h: * css/CSSFontSelector.h: * css/CSSHelper.h: * css/CSSOMUtils.h: * css/CSSPrimitiveValue.h: * css/MediaList.h: * css/StyleBase.h: * css/StyleSheetList.h: * css/WebKitCSSKeyframesRule.h: * dom/CheckedRadioButtons.h: * dom/DOMImplementation.h: * dom/DocumentMarker.h: * dom/DynamicNodeList.h: * dom/EventTarget.h: * dom/MessagePort.h: * dom/MessagePortChannel.h: * dom/NameNodeList.h: * dom/Node.h: * dom/NodeList.h: * dom/OptionGroupElement.h: * dom/ScriptExecutionContext.h: * dom/SelectElement.h: * dom/ViewportArguments.h: * dom/make_names.pl: * editing/HTMLInterchange.h: * editing/htmlediting.h: * editing/markup.h: * html/CollectionCache.h: * html/DOMFormData.h: * html/DataGridColumnList.h: * html/DateComponents.h: * html/FileStream.h: * html/FileStreamProxy.h: * html/FormDataList.h: (WebCore::FormDataList::appendData): * html/HTMLCollection.h: * html/HTMLElementStack.h: * html/HTMLFormattingElementList.h: * html/HTMLParserQuirks.h: * html/HTMLQuoteElement.h: * html/HTMLScriptRunnerHost.h: * html/StepRange.h: * html/canvas/CanvasGradient.h: * html/canvas/CanvasNumberArray.h: * html/canvas/CanvasPattern.h: * inspector/InjectedScript.h: * inspector/InspectorCSSStore.h: * inspector/InspectorClient.h: * inspector/InspectorFrontendClient.h: * inspector/InspectorValues.h: * inspector/ScriptDebugListener.h: * loader/CachedResourceClient.h: * loader/CrossOriginAccessControl.h: * loader/DocumentThreadableLoader.h: * loader/FrameLoaderClient.h: * loader/RedirectScheduler.h: * loader/SubframeLoader.h: * loader/appcache/DOMApplicationCache.h: * loader/archive/ArchiveFactory.h: * loader/icon/IconDatabaseClient.h: * notifications/NotificationPresenter.h: * page/Chrome.h: * page/ChromeClient.h: * page/Console.h: * page/ContextMenuClient.h: * page/DOMSelection.h: * page/EditorClient.h: * page/EventHandler.h: * page/FrameView.h: * page/GeolocationPositionCache.h: * page/History.h: * page/Location.h: * page/Navigator.h: * page/NavigatorBase.h: * page/PluginHalterClient.h: * page/PrintContext.h: * page/SpeechInput.h: * page/SpeechInputListener.h: * page/animation/AnimationController.h: * platform/CookieJar.h: * platform/CrossThreadCopier.h: * platform/DragImage.h: * platform/FileSystem.h: * platform/Language.h: * platform/Length.h: * platform/LinkHash.h: * platform/LocalizationStrategy.h: * platform/LocalizedStrings.h: * platform/Logging.h: * platform/Pasteboard.h: * platform/PopupMenuClient.h: * platform/SearchPopupMenu.h: * platform/Widget.h: * platform/cf/BinaryPropertyList.h: * platform/chromium/ChromiumBridge.h: * platform/chromium/ClipboardUtilitiesChromium.h: * platform/cocoa/KeyEventCocoa.h: * platform/graphics/Color.h: * platform/graphics/FontCache.h: * platform/graphics/FontData.h: * platform/graphics/FontSelector.h: * platform/graphics/GraphicsTypes.h: * platform/graphics/Icon.h: * platform/graphics/ImageBuffer.h: * platform/graphics/ImageSource.h: * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: * platform/graphics/Path.h: * platform/graphics/StringTruncator.h: * platform/graphics/cairo/FontCustomPlatformData.h: * platform/graphics/cairo/FontPlatformData.h: * platform/graphics/cg/FontPlatformData.h: * platform/graphics/cg/ImageSourceCG.h: * platform/graphics/chromium/FontCustomPlatformData.h: * platform/graphics/chromium/FontPlatformDataChromiumWin.h: * platform/graphics/chromium/FontPlatformDataLinux.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/haiku/FontCustomPlatformData.h: * platform/graphics/mac/FontCustomPlatformData.h: * platform/graphics/mac/FontPlatformData.h: * platform/graphics/qt/FontCustomPlatformData.h: * platform/graphics/qt/FontPlatformData.h: * platform/graphics/win/FontCustomPlatformData.h: * platform/graphics/win/FontCustomPlatformDataCairo.h: * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: * platform/graphics/wince/FontPlatformData.h: * platform/graphics/wince/MediaPlayerPrivateWince.h: * platform/graphics/wince/MediaPlayerProxy.h: * platform/graphics/wx/FontCustomPlatformData.h: * platform/graphics/wx/FontPlatformData.h: * platform/mac/PasteboardHelper.h: * platform/network/DNS.h: * platform/network/FormData.h: * platform/network/FormDataBuilder.h: * platform/network/HTTPParsers.h: * platform/text/Hyphenation.h: * platform/text/LineEnding.h: * platform/text/TextCodec.h: * platform/text/TextEncoding.h: * platform/text/TextStream.h: * platform/win/BString.h: * platform/win/ClipboardUtilitiesWin.h: * platform/win/WCDataObject.h: * platform/win/WebCoreTextRenderer.h: * plugins/DOMMimeType.h: * plugins/DOMMimeTypeArray.h: * plugins/DOMPlugin.h: * plugins/DOMPluginArray.h: * rendering/CounterNode.h: * rendering/HitTestResult.h: * rendering/RenderObjectChildList.h: * rendering/RenderText.h: * rendering/RenderTreeAsText.h: * rendering/TextControlInnerElements.h: * rendering/style/ContentData.h: * rendering/style/RenderStyle.h: * storage/DatabaseAuthorizer.h: * storage/DatabaseTrackerClient.h: * storage/SQLTransaction.h: * storage/SQLTransactionSync.h: * storage/Storage.h: * storage/chromium/DatabaseObserver.h: * svg/SVGAnimatedTemplate.h: * svg/SVGDocumentExtensions.h: * svg/SVGGlyphElement.h: * svg/SVGHKernElement.h: * svg/SVGNumberList.h: * svg/SVGPointList.h: * svg/SVGPreserveAspectRatio.h: * svg/SVGStylable.h: * svg/SVGTests.h: * svg/SVGTransformList.h: * svg/SVGTransformable.h: * svg/SVGVKernElement.h: * websockets/ThreadableWebSocketChannel.h: * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocket.h: * websockets/WebSocketChannel.h: * websockets/WebSocketHandshakeResponse.h: * wml/WMLErrorHandling.h: * wml/WMLPageState.h: * wml/WMLVariables.h: * workers/DefaultSharedWorkerRepository.h: * workers/SharedWorkerRepository.h: * workers/Worker.h: * workers/WorkerContextProxy.h: * workers/WorkerLoaderProxy.h: * workers/WorkerLocation.h: * workers/WorkerMessagingProxy.h: * workers/WorkerReportingProxy.h: * workers/WorkerThread.h: * xml/DOMParser.h: * xml/XMLHttpRequestUpload.h: * xml/XPathEvaluator.h: * xml/XPathExpression.h: * xml/XPathNSResolver.h: * xml/XPathResult.h: * xml/XPathUtil.h: 2010-08-09 Nat Duca Reviewed by Dimitri Glazkov. [chromium] Blue line visible at the right hand side of the window with accelerated compositor https://bugs.webkit.org/show_bug.cgi?id=43748 Correct the ortho projection matrix for the root layer, which was too large by 0.5px in both width and height. For even view sizes, this would cause the viewport to appear 1 pixel too small. Fixing this requires removal of several 0.5 correction factors that were previously added to compensate for the too-large viewport. Finally, compute the translation for the root layer quad using floating point rather than integer arithmetic. This avoids us losing a key half-pixel of translation when the width of the window is odd. To test, size window to even/odd dimensions. No blue line should be visible. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): 2010-08-09 Ryosuke Niwa Reviewed by Justin Garcia. fontColorChangesComputedStyle, fontSizeChangesComputedStyle, and fontFaceChangesComputedStyle should be removed https://bugs.webkit.org/show_bug.cgi?id=43465 Removed fontColorChangesComputedStyle, fontSizeChangesComputedStyle, and fontFaceChangesComputedStyle because StyleChange's applyFontColor, applyFontFace, and applyFontSize all return false if there was no difference between the new font color, font size, font face and that of the computed style. Also added a work-around for the bug 28282 in getPropertiesNotInComputedStyle with a test so that the above change will not add a redundant font or span element. Test: editing/style/fore-color-by-name.html * editing/ApplyStyleCommand.cpp: (WebCore::getRGBAFontColor): Added. (WebCore::StyleChange::extractTextStyles): Calls getRGBAFontColor. (WebCore::getPropertiesNotInComputedStyle): Removes color property manually by checking the RGBA values. (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): See above. 2010-08-09 Kenneth Russell Reviewed by David Levin. Fix compilation of VideoLayerChromium on Mac OS X with compositor https://bugs.webkit.org/show_bug.cgi?id=43757 No new tests; build fix only (associated functionality not implemented yet). * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::updateTextureContents): (WebCore::VideoLayerChromium::createTextureRect): (WebCore::VideoLayerChromium::updateTextureRect): * platform/graphics/chromium/VideoLayerChromium.h: 2010-08-09 Ariya Hidayat Reviewed by Kenneth Rohde Christiansen. [Qt] Need to implement GraphicsContextQt::clipConvexPolygon() https://bugs.webkit.org/show_bug.cgi?id=41310 Based on the prototype code by Simon Hausmann. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::clipConvexPolygon): * rendering/RenderObject.h: 2010-08-09 Chris Fleizach Reviewed by David Kilzer. AX: Placeholder value for text fields not exposed like it should be https://bugs.webkit.org/show_bug.cgi?id=43598 * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::placeholderValue): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeNames]): (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): 2010-08-09 Ryosuke Niwa Reviewed by Justin Garcia. Undo fails in RemoveCSSPropertyCommand when the corresponding style attribute is removed https://bugs.webkit.org/show_bug.cgi?id=43639 The bug was caused when RemoveCSSPropertyCommand is called with CSSMutableStyleDeclaration of some styled element, and the style attribute of the element is removed subsequently. When the attribute removal is undone, new instance of CSSMutableStyleDeclaration is created and RemoveCSSPropertyCommand's m_style became detached from the element. Modified RemoveCSSPropertyCommand to store the styled element directly instead of its CSSMutableStyleDeclaration. Test: editing/undo/remove-css-property-and-remove-style.html * WebCore.order: * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeCSSStyle): Calls removeCSSProperty. (WebCore::ApplyStyleCommand::extractTextDecorationStyle): Calls removeCSSProperty. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::removeCSSProperty): Takes StyledElement instead of CSSMutableStyleDeclaration. * editing/CompositeEditCommand.h: * editing/RemoveCSSPropertyCommand.cpp: (WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Takes StyledElement instead of CSSMutableStyleDeclaration. (WebCore::RemoveCSSPropertyCommand::doApply): See above. (WebCore::RemoveCSSPropertyCommand::doUnapply): See above. * editing/RemoveCSSPropertyCommand.h: (WebCore::RemoveCSSPropertyCommand::create): See above. 2010-08-09 Ryosuke Niwa Reviewed by Tony Chang. Use getIdentifierValue to obtain direction and unicode-bidi properties in ApplyStyleCommand https://bugs.webkit.org/show_bug.cgi?id=43699 Deployed getIdentifierValue in various parts of ApplyStyleCommand where direction and unicode-bidi properties were obtained manually. No new tests since this is a cleanup. * editing/ApplyStyleCommand.cpp: (WebCore::getIdentifierValue): Takes CSSStyleDeclaration instead of CSSMutableStyleDeclaration. (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi): Calls getIdentifierValue. (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): Calls getIdentifierValue. (WebCore::ApplyStyleCommand::applyInlineStyle): Calls getIdentifierValue. * editing/ApplyStyleCommand.h: 2010-08-09 Adam Barth Reviewed by Eric Seidel. Remove trailing whitespace in HTMLViewSourceDocument.cpp https://bugs.webkit.org/show_bug.cgi?id=43741 No behavior change. The whitespace was distracting me while porting this class to the new parser. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createContainingTable): (WebCore::HTMLViewSourceDocument::addViewSourceToken): (WebCore::HTMLViewSourceDocument::addLine): (WebCore::HTMLViewSourceDocument::addText): (WebCore::HTMLViewSourceDocument::addLink): 2010-08-09 Eric Seidel Reviewed by Adam Barth. Use the HTML5 TreeBuilder for Fragment Parsing https://bugs.webkit.org/show_bug.cgi?id=43586 The bulk of this change is just a transcription of the HTML5 spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#fragment-case DocumentParser() now sets the right tokenizer state before handling fragments. Since default code path uses the HTML5 tokenizer with the legacy tree builder, this fixes 2 tokenizer-state tests for the html5lib. This fixes 2 more tree-builder tests when the html5 treebuilder is enabled too. * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::parseHTML): - HTML5 implementation of fragment parsing requires the context element (parent) pointer. The legacy implementation handles all parsing branches which require the context element outside of the parser itself, which likely produces "wrong" results. We'll remove those branches when we turn on the HMTL5 fragment parser. (WebCore::DocumentFragment::parseXML): - Rename "parent" to "contextElement" to match the HTML path (and the HTML5 spec). * dom/DocumentFragment.h: * dom/Element.cpp: (WebCore::Element::createContextualFragment): - Pass the contextElement (this). * html/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::setForm): - Needed by for the fragment case. (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody): - I'm not sure this method should exist, it only has one caller. but for now, I've moved the fragment case FIXME out to the one caller and implemented it. * html/HTMLConstructionSite.h: * html/HTMLDocumentParser.cpp: (WebCore::HTMLNames::tokenizerStateForContextElement): - Part of the fragment case handling for the HTML5 parser. (WebCore::HTMLDocumentParser::HTMLDocumentParser): - Set the Tokenizer state based on the contextElement. (WebCore::HTMLDocumentParser::parseDocumentFragment): - Take a contextElement argument. * html/HTMLDocumentParser.h: * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerHTML): - Added a FIXME before the branches the old parser used to avoid ever needing to pass a context element when parsing HTML fragments. (WebCore::HTMLElement::insertAdjacentHTML): - Pass the context element. * html/HTMLTokenizer.h: * html/HTMLTreeBuilder.cpp: - I added a new helper class FragmentParsingContext to simplify the two HTMLTreeBuilder constructors and hide the existence of m_dummyDocumentForFragmentParse. - I also removed m_isParsingFragment and replaced it with an isParsingFragment() function. (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext): (WebCore::HTMLTreeBuilder::FragmentParsingContext::document): (WebCore::HTMLTreeBuilder::FragmentParsingContext::~FragmentParsingContext): (WebCore::HTMLTreeBuilder::passTokenToLegacyParser): (WebCore::HTMLTreeBuilder::processStartTagForInBody): - I had to implement two notImplemented() states in order to get most of the layout tests to pass when using the HTML5 parser fragment case. (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup): (WebCore::HTMLTreeBuilder::processStartTagForInTable): (WebCore::HTMLTreeBuilder::processStartTag): (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately): (WebCore::HTMLTreeBuilder::processEndTagForInTableBody): (WebCore::HTMLTreeBuilder::processEndTagForInRow): (WebCore::HTMLTreeBuilder::processEndTagForInCell): (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption): (WebCore::HTMLTreeBuilder::processTrEndTagForInRow): (WebCore::HTMLTreeBuilder::processTableEndTagForInTable): (WebCore::HTMLTreeBuilder::processEndTag): (WebCore::HTMLTreeBuilder::processCharacterBuffer): (WebCore::HTMLTreeBuilder::processEndOfFile): (WebCore::HTMLTreeBuilder::finished): - The HTML5 parsing algorithm fragment case uses a dummy document to handle all the parsing and then moves all the children from the dummy document over into a DocumentFragment when the parse is done. We could avoid this adopt step by making the TreeBuilder a bit more complicated, but I'm not sure that's necessary (yet). * html/HTMLTreeBuilder.h: (WebCore::HTMLTreeBuilder::isParsingFragment): (WebCore::HTMLTreeBuilder::FragmentParsingContext::fragment): (WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElement): (WebCore::HTMLTreeBuilder::FragmentParsingContext::scriptingPermission): * xml/XSLTProcessor.cpp: (WebCore::createFragmentFromSource): 2010-08-09 Dumitru Daniliuc Reviewed by Adam Barth. Auto-generate most HTML5 DB bindings. https://bugs.webkit.org/show_bug.cgi?id=43382 * Android.jscbindings.mk: Remove {JS|V8}Database{Sync}Custom.cpp and the custom implementations of openDatabase{Sync}(). * Android.v8bindings.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDatabaseCustom.cpp: Removed. * bindings/js/JSDatabaseSyncCustom.cpp: Removed. * bindings/js/JSWorkerContextCustom.cpp: * bindings/v8/custom/V8DOMWindowCustom.cpp: * bindings/v8/custom/V8DatabaseCustom.cpp: Removed. * bindings/v8/custom/V8DatabaseSyncCustom.cpp: Removed. * bindings/v8/custom/V8WorkerContextCustom.cpp: * bindings/scripts/CodeGeneratorGObject.pm: Change the code generators to check that each value can be converted to the respective argument type. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::~JSTestCallback): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionIdbKey): (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture): (WebCore::jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::voidMethodWithArgsCallback): (WebCore::TestObjInternal::intMethodWithArgsCallback): (WebCore::TestObjInternal::objMethodWithArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjInternal::idbKeyCallback): (WebCore::TestObjInternal::customArgsAndExceptionCallback): (WebCore::TestObjInternal::withDynamicFrameAndArgCallback): (WebCore::TestObjInternal::withDynamicFrameAndOptionalArgCallback): (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback): (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback): (WebCore::TestObjInternal::methodWithOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjInternal::methodWithCallbackAndOptionalArgCallback): (WebCore::TestObjInternal::overloadedMethod1Callback): (WebCore::TestObjInternal::overloadedMethod2Callback): (WebCore::TestObjInternal::overloadedMethod3Callback): (WebCore::TestObjInternal::overloadedMethod4Callback): (WebCore::): (WebCore::ConfigureV8TestObjTemplate): * bindings/v8/custom/V8BindingMacros.h: * bindings/v8/V8Binding.h: Minor changes required to support the auto-generated bindings. (WebCore::V8Parameter::V8Parameter): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::V8SQLTransaction::executeSqlCallback): * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: (WebCore::V8SQLTransactionSync::executeSqlCallback): * page/DOMWindow.idl: * storage/Database.cpp: (WebCore::Database::transaction): (WebCore::Database::readTransaction): (WebCore::Database::runTransaction): * storage/Database.h: * storage/Database.idl: * storage/DatabaseSync.cpp: (WebCore::DatabaseSync::transaction): (WebCore::DatabaseSync::readTransaction): (WebCore::DatabaseSync::runTransaction): * storage/DatabaseSync.h: * storage/DatabaseSync.idl: * workers/WorkerContext.idl: 2010-08-09 Adam Barth Reviewed by Eric Seidel. Move HTMLViewSourceDocument from legacyParserAddChild to parserAddChild https://bugs.webkit.org/show_bug.cgi?id=43740 This removes the DTD checks, which aren't needed for view source documents. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createContainingTable): (WebCore::HTMLViewSourceDocument::addSpanWithClassName): (WebCore::HTMLViewSourceDocument::addLine): (WebCore::HTMLViewSourceDocument::addText): (WebCore::HTMLViewSourceDocument::addLink): 2010-08-09 Dan Bernstein Reviewed by Simon Fraser. Fixed an uninitialized member variable in the Color(CGColorRef) constructor. * platform/graphics/cg/ColorCG.cpp: (WebCore::Color::Color): Initialize m_valid to true if the color is not 0. 2010-08-09 James Robinson Chromium compile fix, unreviewed. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::~PlatformContextSkia): (WebCore::PlatformContextSkia::setGraphicsContext3D): 2010-08-09 James Robinson Reviewed by Dimitri Glazkov. [chromium] Add a PrepareTextureCallback to the chromium canvas layer compositor to upload mixed-mode results before compositing https://bugs.webkit.org/show_bug.cgi?id=43656 When compositing an accelerated canvas that is using both hardware and software drawing, we need a callback before compositing the layer to make sure that we upload any software drawn results to the texture. This will go away as soon as implement all draw calls in hardware. To test, run any canvas demo that runs in mixed mode and verifies that the software results always show up. * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::updateTextureContents): * platform/graphics/chromium/CanvasLayerChromium.h: (WebCore::CanvasLayerChromium::setPrepareTextureCallback): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PrepareTextureCallbackImpl::create): (WebCore::PrepareTextureCallbackImpl::willPrepareTexture): (WebCore::PrepareTextureCallbackImpl::PrepareTextureCallbackImpl): (WebCore::PlatformContextSkia::setGraphicsContext3D): 2010-08-09 Zhenyao Mo Reviewed by David Levin. sizeInBytes should be removed https://bugs.webkit.org/show_bug.cgi?id=43693 * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::sizeInBytes): Don't generate GL errors. Generate them in the callers instead. (WebCore::WebGLRenderingContext::vertexAttribPointer): Generate GL error if sizeInBytes fails. * html/canvas/WebGLRenderingContext.h: Make sizeInBytes private helper. * html/canvas/WebGLRenderingContext.idl: Remove sizeInBytes. 2010-08-09 Eric Carlson Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=43702