2010-05-13 Simon Fraser Reviewed by Dave Hyatt. Fix scrolling in composited iframes https://bugs.webkit.org/show_bug.cgi?id=39088 When propagating compositing out of iframes, we have to update the position of the iframe content layers on scrolling. Test: compositing/iframes/scrolling-iframe.html * page/FrameView.cpp: (WebCore::FrameView::scrollPositionChanged): Call updateContentLayerScrollPosition() when scrolling. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Renamed setRootPlatformLayerClippingBox() to updateContentLayerOffset(). * rendering/RenderLayerCompositor.h: * rendering/RenderLayerCompositor.cpp: Rename m_clippingLayer to m_clipLayer to go better with m_scrollLayer. (WebCore::RenderLayerCompositor::updateContentLayerOffset): Renamed from setRootPlatformLayerClippingBox(). Set the size of the clipping layer from the FrameView now, so that scrollbars are not clipped out. Update the scroll layer position too. (WebCore::RenderLayerCompositor::updateContentLayerScrollPosition): Set the position of the scroll layer when the ScrollView is scrolled. (WebCore::RenderLayerCompositor::rootPlatformLayer): m_clippingLayer rename. (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): m_clippingLayer rename. Also create m_scrollLayer at the same time as the clip layer, and clean it up as necessary. (WebCore::RenderLayerCompositor::destroyRootPlatformLayer): m_clippingLayer rename, and clean up the m_scrollLayer too. (WebCore::RenderLayerCompositor::detachRootPlatformLayer): m_clippingLayer rename 2010-05-13 Sam Weinig Reviewed by Anders Carlsson. Follow up to: Fix for https://bugs.webkit.org/show_bug.cgi?id=38221 Memory issues due to the changes in 36556 (increased CSSPrimitiveValue size). Part of Fix failing tests on Leopard. Initialize m_hasCachedCSSText in CSSPrimitiveValue::init methods. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::init): (WebCore::CSSPrimitiveValue::cssText): Add extra assertion. 2010-05-13 Kent Tamura Reviewed by Darin Adler. Can't submit a form with https://bugs.webkit.org/show_bug.cgi?id=39065 Test: fast/forms/interactive-validation-required-checkbox.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): Update the validity cache when a checkbox state is changed. 2010-05-13 Kenneth Russell Reviewed by Dimitri Glazkov. Alias WebGLArray type names to TypedArray type names https://bugs.webkit.org/show_bug.cgi?id=39036 Exposed the existing WebGLArray constructor functions on the DOMWindow under the naming convention in the TypedArray spec. The implementations will be renamed in a subsequent bug, and the aliases to the WebGLArray type names eventually removed. Ran all layout tests (including WebGL) in Safari, and WebGL tests in Chromium. Test: revised array-unit-tests.html to test both type names. Revised global prototype and constructor tests to ignore new types. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::arrayBufferEnabled): (WebCore::RuntimeEnabledFeatures::int8ArrayEnabled): (WebCore::RuntimeEnabledFeatures::uint8ArrayEnabled): (WebCore::RuntimeEnabledFeatures::int16ArrayEnabled): (WebCore::RuntimeEnabledFeatures::uint16ArrayEnabled): (WebCore::RuntimeEnabledFeatures::int32ArrayEnabled): (WebCore::RuntimeEnabledFeatures::uint32ArrayEnabled): (WebCore::RuntimeEnabledFeatures::floatArrayEnabled): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::arrayBuffer): (WebCore::JSDOMWindow::int8Array): (WebCore::JSDOMWindow::uint8Array): (WebCore::JSDOMWindow::int32Array): (WebCore::JSDOMWindow::uint32Array): (WebCore::JSDOMWindow::int16Array): (WebCore::JSDOMWindow::uint16Array): (WebCore::JSDOMWindow::floatArray): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::ArrayBufferAccessorGetter): (WebCore::V8DOMWindow::Int8ArrayAccessorGetter): (WebCore::V8DOMWindow::Uint8ArrayAccessorGetter): (WebCore::V8DOMWindow::Int16ArrayAccessorGetter): (WebCore::V8DOMWindow::Uint16ArrayAccessorGetter): (WebCore::V8DOMWindow::Int32ArrayAccessorGetter): (WebCore::V8DOMWindow::Uint32ArrayAccessorGetter): (WebCore::V8DOMWindow::FloatArrayAccessorGetter): * page/DOMWindow.idl: 2010-05-13 David Hyatt Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=39084 Improve :visited style resolution to reduce its memory footprint and to make some speed adjustments and simplifications. (1) Tie the caching of link state on CSSStyleSelector to the element. Just clear out the element when style resolution finishes for the unvisited case to avoid caching across external calls. The internal calls share the cache just fine by doing this. (2) Delete the RenderStyle if the link is unvisited. This shouldn't take long enough to make us vulnerable to timing attacks, and it makes sure the overall footprint stays the way it used to be for unvisited links. (3) Limit the set of properties that can be applied to :visited links to only the colors it supports. This stops images from being loadable from :visited rules. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::init): (WebCore::CSSStyleSelector::SelectorChecker::determineLinkState): (WebCore::CSSStyleSelector::initElement): (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::isValidVisitedLinkProperty): (WebCore::CSSStyleSelector::applyProperty): * css/CSSStyleSelector.h: * rendering/style/RenderStyle.cpp: (WebCore::colorIncludingFallback): 2010-05-13 Sam Weinig Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=38221 Memory issues due to the changes in 36556 (increased CSSPrimitiveValue size). Part of - Use an external cache to speedup cssText for CSSPrimitiveValue instead of an extra member variable. * css/CSSPrimitiveValue.cpp: (WebCore::cssTextCache): (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::cssText): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 2010-05-13 Enrica Casucci Reviewed by Dave Hyatt. Adding block elements to a block and removing them changes the height of the element. https://bugs.webkit.org/show_bug.cgi?id=38874 The initial height of an empty editable block is different from the height of the same block after we add block elements and remove them. Test: editing/deleting/delete-block-contents-004.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): resetting m_childrenInline flag to true when layout a block with no children. 2010-05-13 Brady Eidson Reviewed by Darin Adler. Repro crash at www.sears.com (infinite recursion in beforeunload handler) and https://bugs.webkit.org/show_bug.cgi?id=38928 Test: fast/loader/recursive-before-unload-crash.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::shouldClose): Copied from Frame, with the pageDismissal flag set. * loader/FrameLoader.h: * page/Frame.cpp: (WebCore::Frame::shouldClose): Forward to the new FrameLoader::shouldClose(). * page/Frame.h: (WebCore::Frame::existingDOMWindow): 2010-05-13 Sheriff Bot Unreviewed, rolling out r59376. http://trac.webkit.org/changeset/59376 https://bugs.webkit.org/show_bug.cgi?id=39080 Broke window prototype tests (Requested by jamesr on #webkit). * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::webGLFloatArray): * bindings/v8/custom/V8DOMWindowCustom.cpp: * page/DOMWindow.idl: 2010-05-13 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: A disabled style property cannot be deleted. https://bugs.webkit.org/show_bug.cgi?id=39057 * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::applyStyleText): 2010-05-12 Kenneth Russell Reviewed by Dimitri Glazkov. Alias WebGLArray type names to TypedArray type names https://bugs.webkit.org/show_bug.cgi?id=39036 Exposed the existing WebGLArray constructor functions on the DOMWindow under the naming convention in the TypedArray spec. The implementations will be renamed in a subsequent bug, and the aliases to the WebGLArray type names eventually removed. Ran all WebGL layout tests in Safari and Chromium. Test: revised array-unit-tests.html to test both type names. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::arrayBufferEnabled): (WebCore::RuntimeEnabledFeatures::int8ArrayEnabled): (WebCore::RuntimeEnabledFeatures::uint8ArrayEnabled): (WebCore::RuntimeEnabledFeatures::int16ArrayEnabled): (WebCore::RuntimeEnabledFeatures::uint16ArrayEnabled): (WebCore::RuntimeEnabledFeatures::int32ArrayEnabled): (WebCore::RuntimeEnabledFeatures::uint32ArrayEnabled): (WebCore::RuntimeEnabledFeatures::floatArrayEnabled): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::arrayBuffer): (WebCore::JSDOMWindow::int8Array): (WebCore::JSDOMWindow::uint8Array): (WebCore::JSDOMWindow::int32Array): (WebCore::JSDOMWindow::uint32Array): (WebCore::JSDOMWindow::int16Array): (WebCore::JSDOMWindow::uint16Array): (WebCore::JSDOMWindow::floatArray): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::ArrayBufferAccessorGetter): (WebCore::V8DOMWindow::Int8ArrayAccessorGetter): (WebCore::V8DOMWindow::Uint8ArrayAccessorGetter): (WebCore::V8DOMWindow::Int16ArrayAccessorGetter): (WebCore::V8DOMWindow::Uint16ArrayAccessorGetter): (WebCore::V8DOMWindow::Int32ArrayAccessorGetter): (WebCore::V8DOMWindow::Uint32ArrayAccessorGetter): (WebCore::V8DOMWindow::FloatArrayAccessorGetter): * page/DOMWindow.idl: 2010-05-13 Brady Eidson Reviewed by John Sullivan. Part of and https://bugs.webkit.org/show_bug.cgi?id=38928 No new tests. (No change in behavior) m_unloadEventBeingDispatched was already overloaded to include both unload and pagehide events. In general, these are "page dismissal" events, and might also include beforeunload, so let's rename the flag! * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::loadWithDocumentLoader): (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::pageHidden): * loader/FrameLoader.h: 2010-05-13 Joseph Pecoraro Reviewed by Pavel Feldman. Web Inspector: Event Markers should be hidden in Resource's "Size" Graph https://bugs.webkit.org/show_bug.cgi?id=39074 Added Show / Hide event dividers functionality to the timeline grid, and included delegation functions in AbstractTimelinePanel. * inspector/front-end/AbstractTimelinePanel.js: delegate to the inner grid (WebInspector.AbstractTimelinePanel.prototype.hideEventDividers): (WebInspector.AbstractTimelinePanel.prototype.showEventDividers): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.populateSidebar): save a reference to the size graph item to know when its selected (WebInspector.ResourcesPanel.prototype._graphSelected): if the size graph is selected hide the dividers, otherwise show them * inspector/front-end/TimelineGrid.js: (WebInspector.TimelineGrid.prototype.hideEventDividers): set the container to display: none (WebInspector.TimelineGrid.prototype.showEventDividers): set the container to display: block 2010-05-13 Chang Shu Reviewed by Kenneth Rohde Christiansen. Based on the spec and Philip Taylor's test suite, strokeStyle and fillStyle attributes must initially have the string value #000000. The link to the spec: http://philip.html5.org/tests/canvas/suite/tests/spec.html#testrefs.2d.colours.default https://bugs.webkit.org/show_bug.cgi?id=39068 The complete test suite is in the process of checking in. https://bugs.webkit.org/show_bug.cgi?id=20553 * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::State::State): 2010-05-13 Yury Semikhatsky Unreviewed, rolling out r59360. http://trac.webkit.org/changeset/59360 https://bugs.webkit.org/show_bug.cgi?id=38667 It broke Chromium Win build * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane): (WebInspector.CallStackSidebarPane.prototype._placardSelected): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype._keyDown): * inspector/front-end/HelpScreen.js: Removed. * inspector/front-end/KeyboardShortcut.js: (WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.elementsToRestoreScrollPositionsFor): * inspector/front-end/ShortcutsHelp.js: Removed. * inspector/front-end/SidebarPane.js: (WebInspector.SidebarPane.prototype._onTitleKeyDown): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.removeSection): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._handleKeyDown): * inspector/front-end/WebKit.qrc: * inspector/front-end/helpScreen.css: Removed. * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.loaded): (WebInspector.documentKeyDown): (WebInspector._searchKeyDown): (WebInspector.startEditing.keyDownEventListener): (WebInspector.startEditing): * inspector/front-end/utilities.js: 2010-05-13 Antti Koivisto Reviewed by Kenneth Rohde Christiansen. https://bugs.webkit.org/show_bug.cgi?id=39063 [Qt] Tiled backing store checker pattern does not paint correctly when scaling factor is not 1 Use the dirty rect that has been adjusted for scaling instead of the original one. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::paint): 2010-05-13 Chang Shu Reviewed by Kenneth Rohde Christiansen. Based on Philip Taylor's test suite, resetting the canvas state resets the current path. https://bugs.webkit.org/show_bug.cgi?id=38934 The complete test suite is in the process of checking in. https://bugs.webkit.org/show_bug.cgi?id=20553 * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::reset): 2010-05-13 Andrey Kosyakov Reviewed by Pavel Feldman. Added help screen with keyboard shortcuts. https://bugs.webkit.org/show_bug.cgi?id=38667 * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane): (WebInspector.CallStackSidebarPane.prototype._placardSelected): (WebInspector.CallStackSidebarPane.prototype.registerShortcuts): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView): (WebInspector.ConsoleView.prototype._registerShortcuts): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._registerShortcuts): * inspector/front-end/HelpScreen.js: Added. * inspector/front-end/KeyboardShortcut.js: (WebInspector.KeyboardShortcut.makeDescriptor): (WebInspector.KeyboardShortcut.shortcutToString): (WebInspector.KeyboardShortcut._modifiersToString): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.ScriptsPanel.prototype._registerShortcuts): * inspector/front-end/ShortcutsHelp.js: Added. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.removeSection): (WebInspector.StylesSidebarPane.prototype.registerShortcuts): * inspector/front-end/WebKit.qrc: * inspector/front-end/helpScreen.css: Added. 2010-05-13 Yoshiki Hayashi Reviewed by Darin Adler. Fix a bug in handleRunInChild where only the first child run-in block is inserted because removeChildNode clears next sibling. https://bugs.webkit.org/show_bug.cgi?id=25047 Test: fast/css/run-in-children.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::handleRunInChild): 2010-05-13 Alejandro G. Castro Reviewed by Xan Lopez. In case there is no expose event we render the theme in a pixmap and copy it to the cairo context. This is slow but it is used just in case we are printing nowadays. [GTK] Theme does not render when printing https://bugs.webkit.org/show_bug.cgi?id=38896 * platform/gtk/RenderThemeGtk.cpp: (WebCore::paintMozillaGtkWidget): 2010-05-12 Yuzo Fujishima Reviewed by Darin Adler. Fix Bug 35014 - Modifying UA rules from page JS crashes Added a NULL check. https://bugs.webkit.org/show_bug.cgi?id=35014 Test: fast/css/modify-ua-rules-from-javascript.html * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc): 2010-05-12 Dumitru Daniliuc Reviewed by Adam Barth. Add the parent class for Database and DatabaseSync. https://bugs.webkit.org/show_bug.cgi?id=39041 * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * storage/AbstractDatabase.cpp: Added. * storage/AbstractDatabase.h: Added. 2010-05-12 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] GraphicsLayer: depth-test causes flicker in certain situations This patch removes the simplistic 2D depth test as it leads to flickering side effects. https://bugs.webkit.org/show_bug.cgi?id=38370 Tested by http://webkit.org/blog-files/3d-transforms/morphing-cubes.html * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::updateTransform): 2010-05-12 Simon Fraser Reviewed by Mark Rowe. Fix layer dump to avoid spurious platform differences https://bugs.webkit.org/show_bug.cgi?id=39045 Only dump the children transform on layers that are not the root layer. The children transform on the root layer is used on Leopard to implement geometry flipping, so avoid this supurious difference in test output. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::dumpProperties): 2010-05-12 Sheriff Bot Unreviewed, rolling out r59270. http://trac.webkit.org/changeset/59270 https://bugs.webkit.org/show_bug.cgi?id=39044 Caused a crash on some pages - bug 39042 (Requested by smfr on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): 2010-05-12 Simon Fraser Reviewed by David Hyatt. Composited plug-ins can cause missed painting https://bugs.webkit.org/show_bug.cgi?id=39033 Fixed missed painting (and assertions in debug builds) related to compositing propagating out of iframes that contain plug-ins. When an iframe enters or leaves compositing mode, RenderLayerCompositor uses setNeedsStyleRecalc(SyntheticStyleChange) to trigger the parent document to re-evaluate whether the iframe itself should be composited. However, for iframes containing plug-ins, this can happen at inappropriate times. For example, when a browser tab is brought frontmost, plug-ins are instantiated for the first time (via -viewDidMoveToWindow), which triggers a setNeedsStyleRecalc() on the object element. Soon after, the -viewWillDraw machinery does layout from the top down. During layout of the iframe, the iframe enters compositing mode, and does a setNeedsStyleRecalc() on the iframe element in its parent document. This leaves the FrameView as needsLayout(), so the FrameView::paintContents() asserts and bails. The fix is to avoid doing a setNeedsStyleRecalc() on the root while inside a recalcStyle on the iframe. We do this by switching the iframe into compositing mode eagerly as soon as we know the plug-in needs it. A secondary fix is to ensure that if a document has composited iframes, when that document becomes composited, we connect compositing layers between the iframes and the parent document. Tests: compositing/iframes/connect-compositing-iframe-delayed.html compositing/iframes/iframe-src-change.html * WebCore.base.exp: Export FrameView::enterCompositingMode() * page/FrameView.h: New method, enterCompositingMode(), that we can call from WebKit plug-in code. * page/FrameView.cpp: (WebCore::FrameView::enterCompositingMode): * rendering/RenderLayerCompositor.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::enableCompositingMode): When we switch into compositing mode, we force a style recaclc on any iframes to get them into compositing layers, so they can hook up with their content layers if necessary. (WebCore::RenderLayerCompositor::didMoveOnscreen): Only call attachRootPlatformLayer() if we really need to. (WebCore::RenderLayerCompositor::willMoveOffscreen): Only call detachRootPlatformLayer() if we really need to. (WebCore::RenderLayerCompositor::detachRootPlatformLayer): Whitespace. (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): Fetch iframe elements, and send a synthetic style recalc on them. 2010-05-12 Anders Carlsson Reviewed by Simon Fraser. Shrink the size of FillLayer by moving a member variable. https://bugs.webkit.org/show_bug.cgi?id=39035 * rendering/style/FillLayer.cpp: (WebCore::FillLayer::FillLayer): * rendering/style/FillLayer.h: 2010-05-12 Sam Weinig Reviewed by Anders Carlsson. A bunch of nice micro-optimizations for ~1% speedup on PLT. - Add fastGetAttribute. The same as getAttribute except can only be called when it is known not to be style attribute or one of the SVG animatable attributes. - Inline some functions from Font. - Return the same string from deprecatedParseURL if there is nothing to strip. - Use a member variable instead of a virtual function to determine whether a ScheduledNavigation is a location change. * WebCore.base.exp: * css/CSSHelper.cpp: (WebCore::deprecatedParseURL): * css/CSSStyleSelector.cpp: (WebCore::linkAttribute): (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * dom/Element.cpp: (WebCore::Element::getAttribute): * dom/Element.h: (WebCore::Element::fastHasAttribute): (WebCore::Element::fastGetAttribute): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::formControlName): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::value): * loader/RedirectScheduler.cpp: (WebCore::ScheduledNavigation::ScheduledNavigation): (WebCore::ScheduledNavigation::isLocationChange): (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): (WebCore::ScheduledRedirect::ScheduledRedirect): (WebCore::ScheduledLocationChange::ScheduledLocationChange): (WebCore::ScheduledRefresh::ScheduledRefresh): (WebCore::ScheduledHistoryNavigation::ScheduledHistoryNavigation): (WebCore::ScheduledFormSubmission::ScheduledFormSubmission): (WebCore::RedirectScheduler::locationChangePending): * platform/graphics/Font.cpp: * platform/graphics/Font.h: (WebCore::Font::~Font): (WebCore::Font::primaryFont): (WebCore::Font::fontDataAt): (WebCore::Font::fontDataForCharacters): (WebCore::Font::isFixedPitch): (WebCore::Font::fontSelector): * platform/graphics/FontFallbackList.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::imageMap): 2010-05-12 David Hyatt Reviewed by Sam Weinig. Make InlineBoxes use an IntRect for dimensions, and eliminate the dynamic computation of height() every time. * WebCore.xcodeproj/project.pbxproj: * editing/visible_units.cpp: (WebCore::previousLinePosition): (WebCore::nextLinePosition): * rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::paint): (WebCore::EllipsisBox::selectionRect): (WebCore::EllipsisBox::paintSelection): (WebCore::EllipsisBox::nodeAtPoint): * rendering/EllipsisBox.h: (WebCore::EllipsisBox::EllipsisBox): * rendering/InlineBox.cpp: (WebCore::InlineBox::adjustPosition): (WebCore::InlineBox::canAccommodateEllipsis): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): (WebCore::InlineBox::isSVGRootInlineBox): (WebCore::InlineBox::x): (WebCore::InlineBox::y): (WebCore::InlineBox::width): (WebCore::InlineBox::height): (WebCore::InlineBox::bottom): (WebCore::InlineBox::right): (WebCore::InlineBox::setX): (WebCore::InlineBox::setY): (WebCore::InlineBox::setWidth): (WebCore::InlineBox::setHeight): (WebCore::InlineBox::location): (WebCore::InlineBox::size): (WebCore::InlineBox::setLocation): (WebCore::InlineBox::setSize): (WebCore::InlineBox::move): (WebCore::InlineBox::frameRect): (WebCore::InlineBox::setFrameRect): (WebCore::InlineBox::baselinePosition): (WebCore::InlineBox::lineHeight): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesVertically): (WebCore::InlineFlowBox::computeVerticalOverflow): (WebCore::InlineFlowBox::nodeAtPoint): (WebCore::InlineFlowBox::paintBoxDecorations): (WebCore::InlineFlowBox::paintMask): (WebCore::InlineFlowBox::paintTextDecorations): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::visibleOverflowRect): (WebCore::InlineFlowBox::topLayoutOverflow): (WebCore::InlineFlowBox::bottomLayoutOverflow): (WebCore::InlineFlowBox::leftLayoutOverflow): (WebCore::InlineFlowBox::rightLayoutOverflow): (WebCore::InlineFlowBox::layoutOverflowRect): (WebCore::InlineFlowBox::topVisualOverflow): (WebCore::InlineFlowBox::bottomVisualOverflow): (WebCore::InlineFlowBox::leftVisualOverflow): (WebCore::InlineFlowBox::rightVisualOverflow): (WebCore::InlineFlowBox::visualOverflowRect): (WebCore::InlineFlowBox::setHorizontalOverflowPositions): (WebCore::InlineFlowBox::setVerticalOverflowPositions): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionRect): (WebCore::InlineTextBox::placeEllipsisBox): (WebCore::InlineTextBox::nodeAtPoint): (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::paintSelection): (WebCore::InlineTextBox::paintCompositionBackground): (WebCore::InlineTextBox::paintDecoration): (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): (WebCore::InlineTextBox::paintTextMatchMarker): (WebCore::InlineTextBox::computeRectForReplacementMarker): (WebCore::InlineTextBox::paintCompositionUnderline): (WebCore::InlineTextBox::offsetForPosition): (WebCore::InlineTextBox::positionForOffset): * rendering/InlineTextBox.h: (WebCore::InlineTextBox::setSpaceAdd): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForPointWithInlineChildren): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::computeVerticalPositionsForLine): (WebCore::RenderBlock::layoutInlineChildren): * rendering/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createInlineFlowBox): * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::createTextBox): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::createRootInlineBox): * rendering/RenderText.cpp: (WebCore::RenderText::positionForPoint): (WebCore::RenderText::firstRunX): (WebCore::RenderText::firstRunY): * rendering/RenderTreeAsText.cpp: (WebCore::writeTextRun): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::placeEllipsis): (WebCore::RootInlineBox::addHighlightOverflow): (WebCore::RootInlineBox::closestLeafChildForXPos): * rendering/SVGInlineFlowBox.h: (WebCore::SVGInlineFlowBox::SVGInlineFlowBox): * rendering/SVGInlineTextBox.h: (WebCore::SVGInlineTextBox::selectionTop): (WebCore::SVGInlineTextBox::selectionHeight): * rendering/SVGRootInlineBox.h: (WebCore::SVGRootInlineBox::SVGRootInlineBox): (WebCore::SVGRootInlineBox::isSVGRootInlineBox): * rendering/TrailingFloatsRootInlineBox.h: Removed. 2010-05-12 Dumitru Daniliuc Reviewed by Dimitri Glazkov. Removing the unnecessary dirfd parameter. https://bugs.webkit.org/show_bug.cgi?id=38869 * platform/chromium/ChromiumBridge.h: * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp: 2010-05-12 Enrica Casucci Reviewed by Dave Hyatt. Adding block elements to a block and removing them changes the height of the element. https://bugs.webkit.org/show_bug.cgi?id=38874 The initial height of an empty editable block is different from the height of the same block after we add block elements and remove them. Test: editing/deleting/delete-block-contents-004.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): m_childrenInline was set to true only when the Renderer is created and never reset to true when all the block elements contained are removed. 2010-05-11 Dumitru Daniliuc Reviewed by Dimitri Glazkov. Do not check if a database needs to be vacuumed after a read-only transaction. https://bugs.webkit.org/show_bug.cgi?id=38972 * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::postflightAndCommit): 2010-05-12 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. [Qt] Detect debug mode consistently https://bugs.webkit.org/show_bug.cgi?id=38863 No new tests as there is no new functionality. * WebCore.pro: 2010-05-12 James Robinson Patch by Dan Bernstein. Reviewed by David Hyatt. Fix marking the layout root's parent as needing layout https://bugs.webkit.org/show_bug.cgi?id=37760 If an element gets marked as needing layout due to the recalcStyle() call in FrameView::layout(), the m_layoutSchedulingEnabled flag will be set to false. It's possible at this point that a parent of the existing FrameView::m_layoutRoot will be marked as needing layout. This patch updates FrameView::scheduleRelayoutOfSubtree to account for this case. Manual test only due to subtle timing issues. * manual-tests/layoutroot_detach.xml: Added. * page/FrameView.cpp: (WebCore::FrameView::scheduleRelayoutOfSubtree): 2010-05-12 Eric Seidel Unreviewed, rolling out r59245. http://trac.webkit.org/changeset/59245 https://bugs.webkit.org/show_bug.cgi?id=38874 Broke at least one test on multiple platforms * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): 2010-05-12 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=38752 Strange behaviour after js insertion into a page pointing directly to an object (image, swf, etc) Test: fast/images/extra-image-in-image-document.html * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): Reset setAutoLoadImages after manually feeding an image - there may be more coming. 2010-05-12 yael aharon Reviewed by Dan Bernstein. HTMLLabelElement::control() should return HTMLFormControlElement, not HTMLElement https://bugs.webkit.org/show_bug.cgi?id=38991 No new tests since no new functionality was introduced. * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::control): * html/HTMLLabelElement.h: 2010-05-12 David Hyatt Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=38891 First-letter had a number of bugs that were exposed by my attempt to optimize the setting of styles when updating first-letter. The code that drills down to find the first-letter child stopped if it hit an element that didn't need layout. This means it could return random incorrect results (and cause the first-letter object to not be found). In addition when the first-letter was floated/positioned, the text child was not correctly returned, but the container itself was returned instead. Finally, the updating code was leaving the box that wrapped the first letter text with a stale style. The old code happened to work because it made new styles for the text elements instead of using the enclosing box style. The regression was caused by my change to make the text children simply share style with their parent (thus making the bug that the parent had the wrong style become more prominent). No new tests, since there's a timing component to reproducing the issue. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): 2010-05-12 Enrica Casucci Reviewed by Dave Hyatt. Adding block elements to a block and removing them changes the height of the element. https://bugs.webkit.org/show_bug.cgi?id=38874 The initial height of an empty editable block is different from the height of the same block after we add block elements and remove them. Test: editing/deleting/delete-block-contents-004.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeChild): m_childrenInline was set to true only when the Renderer is created and never reset to true when all the block elements contained are removed. 2010-05-12 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: disabling style property on container breaks styles inspection for given node. https://bugs.webkit.org/show_bug.cgi?id=39005 Tests: inspector/styles-disable-inherited.html inspector/styles-disable-then-enable.html * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._containsInherited): (WebInspector.StylesSidebarPane.prototype._arrayContainsInheritedProperty): 2010-05-12 Abhishek Arya Reviewed by Darin Adler. HTML Entity Escape the contents of a textarea node when accessed via the innerHTML and outerHTML node properties. https://bugs.webkit.org/show_bug.cgi?id=38922 Test: fast/innerHTML/innerHTML-special-elements.html * editing/markup.cpp: (WebCore::appendStartMarkup): 2010-05-12 Beth Dakin Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=38871 REGRESSION: Crash clicking background NPR tab after few minutes of sitting idle -and corresponding- Move m_mediaCanStartListeners HashSet to Document away from Page. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::addMediaCanStartListener): (WebCore::Document::removeMediaCanStartListener): (WebCore::Document::takeAnyMediaCanStartListener): * dom/Document.h: * page/Page.cpp: (WebCore::Page::takeAnyMediaCanStartListener): * page/Page.h: (WebCore::Page::canStartMedia): 2010-05-11 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: Sometimes ResourceRequest records aren't connected to the initiator. https://bugs.webkit.org/show_bug.cgi?id=38925 * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didScheduleResourceRequest): * inspector/InspectorTimelineAgent.h: (WebCore::): * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createScheduleResourceRequestData): * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._findParentRecord): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): * loader/loader.cpp: (WebCore::Loader::load): 2010-05-12 Kent Tamura Reviewed by Darin Adler. placeholder text should be stripped from line breaks https://bugs.webkit.org/show_bug.cgi?id=36291 According to http://dev.w3.org/html5/spec/forms.html#attr-input-placeholder , we need to remove CR and LF from the placeholder attribute values. Introduce HTMLTextFormControlElement::strippedPlaceholder(), which returns stripped value, and replace getAttribute(placeholderAttr) with it. Test: fast/forms/placeholder-stripped.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::strippedPlaceholder): (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty): (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible): Use strippedPlaceholder(). * html/HTMLFormControlElement.h: * platform/text/CharacterNames.h: Add carriageReturn. * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::updateFromElement): Use strippedPlaceholder(). * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): Use strippedPlaceholder(). 2010-05-10 Rodrigo Belem Reviewed by Kenneth Christiansen , Simon Hausmann and Gustavo Noronha. [Qt, Gtk] Allows build-webkit script to receive an install prefix as parameter https://bugs.webkit.org/show_bug.cgi?id=26224 This patch adds the ability, in the QtWebkit build system, to change the installation path. * WebCore.pro: 2010-05-12 Jer Noble Reviewed by Darin Adler. Bug 38689: #34005 will break fullscreen video playback https://bugs.webkit.org/show_bug.cgi?id=38689 The PlatformMedia struct now contains a type field indicating which type it contains. The struct now contains a union of all possible return types, allowing the type of media returned by MediaPlayerPrivate instances to be determined at runtime. * platform/graphics/MediaPlayer.h: (WebCore::PlatformMedia::): (WebCore::): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::platformMedia): * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::platformMedia): * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::platformMedia): 2010-05-12 Young Han Lee Reviewed by Darin Adler. Add missing ENABLE(SVG) guards. https://bugs.webkit.org/show_bug.cgi?id=38892 * rendering/RenderSVGResourceClipper.cpp: * rendering/RenderSVGResourceMarker.cpp: * rendering/RenderSVGResourceMasker.cpp: 2010-05-12 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: align sidebar checkboxes on windows. https://bugs.webkit.org/show_bug.cgi?id=38986 * inspector/front-end/StylesSidebarPane.js: * inspector/front-end/inspector.css: (.sidebar-pane-subtitle): (body.platform-windows .sidebar-pane-subtitle): 2010-05-10 yael aharon Reviewed by Darin Adler. Support control attribute of HTMLLabelElement https://bugs.webkit.org/show_bug.cgi?id=38688 Added support for the control attribute of HTMLLabelElement and changed the logic of determining which control is associated with the label to conform to HTML5 spec. Added a manual test for testing the logic of selecting the control to get focused, activated or hovered when the label gets focused, activated or is hovered. Test: fast/dom/HTMLLabelElement/click-label.html Test: fast/dom/HTMLLabelElement/focus-label.html Test: fast/dom/HTMLLabelElement/label-control.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::labelForElement): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::isLabelable): * html/HTMLFormControlElement.h: * html/HTMLLabelElement.cpp: (WebCore::nodeAsLabelableFormControl): (WebCore::HTMLLabelElement::control): (WebCore::HTMLLabelElement::setActive): (WebCore::HTMLLabelElement::setHovered): (WebCore::HTMLLabelElement::defaultEventHandler): (WebCore::HTMLLabelElement::focus): (WebCore::HTMLLabelElement::accessKeyAction): * html/HTMLLabelElement.h: * html/HTMLLabelElement.idl: * manual-tests/dom/form-control-for-label.html: Added. 2010-05-12 Steve Block Reviewed by David Levin. Android's writeToFile() is buggy https://bugs.webkit.org/show_bug.cgi?id=38908 No new tests, build fix only. * platform/android/FileSystemAndroid.cpp: Remove Android's version of writeToFile(). * platform/posix/FileSystemPOSIX.cpp: Use POSIX version of writeToFile() on Android. (WebCore::writeToFile): 2010-05-10 Philippe Normand Reviewed by David Levin. [GStreamer] incoherent #ifdef in GOwnPtrGStreamer.h https://bugs.webkit.org/show_bug.cgi?id=38839 Fixed #ifdef/curly braces coherence. * platform/graphics/gstreamer/GOwnPtrGStreamer.cpp: (WTF::GstElement): 2010-05-10 Philippe Normand Reviewed by Dirk Schulze. [GStreamer] un-needed cairo.h include https://bugs.webkit.org/show_bug.cgi?id=38837 Cairo not used in the sink anymore. So it's not needed to include the header. * platform/graphics/gstreamer/VideoSinkGStreamer.h: 2010-05-12 Zoltan Herczeg Reviewed by Nikolas Zimmermann. Build fix for Windows and Chromium builds. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * svg/graphics/filters/SVGFELighting.cpp: (WebCore::FELighting::LightingData::upLeftPixelValue): (WebCore::FELighting::LightingData::upPixelValue): (WebCore::FELighting::LightingData::upRightPixelValue): (WebCore::FELighting::LightingData::leftPixelValue): (WebCore::FELighting::LightingData::centerPixelValue): (WebCore::FELighting::LightingData::rightPixelValue): (WebCore::FELighting::LightingData::downLeftPixelValue): (WebCore::FELighting::LightingData::downPixelValue): (WebCore::FELighting::LightingData::downRightPixelValue): (WebCore::FELighting::setPixel): 2010-05-12 Zoltan Herczeg Reviewed by Nikolas Zimmermann. Implementing SVG filters: feDiffuseLighting and feSpecularLighting https://bugs.webkit.org/show_bug.cgi?id=32197 https://bugs.webkit.org/show_bug.cgi?id=32199 The patch implements the SVG filters feDiffuseLighting and feSpecularLighting including the impementation of their possible light sources according to the Scalable Vector Graphics (SVG) 1.1 Specification. Only two features are missing: supporting images with height or width set to 1, and kernelUnitLength other than (1,1). Since the two lighting filters have a similar body, a common base class called FELighting is introduced, and contains the code for both filters. The implementation employs single precision floating point arithmetic (fixed precision integer arithmetic seemed too difficult). Indentation is removed of the modified header files in svg/graphics/filters * GNUmakefile.am: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/FloatPoint3D.cpp: * platform/graphics/FloatPoint3D.h: (WebCore::FloatPoint3D::FloatPoint3D): constructors changed to inline (WebCore::operator*): dot product * svg/SVGFESpotLightElement.cpp: (WebCore::SVGFESpotLightElement::lightSource): * svg/graphics/filters/SVGDistantLightSource.h: (WebCore::DistantLightSource::create): (WebCore::DistantLightSource::azimuth): (WebCore::DistantLightSource::elevation): (WebCore::DistantLightSource::DistantLightSource): * svg/graphics/filters/SVGFEDiffuseLighting.cpp: (WebCore::FEDiffuseLighting::FEDiffuseLighting): (WebCore::FEDiffuseLighting::create): * svg/graphics/filters/SVGFEDiffuseLighting.h: * svg/graphics/filters/SVGFELighting.cpp: Added. (WebCore::FELighting::FELighting): (WebCore::FELighting::LightingData::upLeftPixelValue): (WebCore::FELighting::LightingData::upPixelValue): (WebCore::FELighting::LightingData::upRightPixelValue): (WebCore::FELighting::LightingData::leftPixelValue): (WebCore::FELighting::LightingData::centerPixelValue): (WebCore::FELighting::LightingData::rightPixelValue): (WebCore::FELighting::LightingData::downLeftPixelValue): (WebCore::FELighting::LightingData::downPixelValue): (WebCore::FELighting::LightingData::downRightPixelValue): (WebCore::FELighting::setPixel): (WebCore::FELighting::drawLighting): (WebCore::FELighting::apply): * svg/graphics/filters/SVGFELighting.h: Added. (WebCore::FELighting::uniteChildEffectSubregions): (WebCore::FELighting::): * svg/graphics/filters/SVGFESpecularLighting.cpp: (WebCore::FESpecularLighting::FESpecularLighting): (WebCore::FESpecularLighting::create): * svg/graphics/filters/SVGFESpecularLighting.h: * svg/graphics/filters/SVGLightSource.cpp: (WebCore::PointLightSource::initPaintingData): (WebCore::PointLightSource::updatePaintingData): (WebCore::SpotLightSource::initPaintingData): (WebCore::SpotLightSource::updatePaintingData): (WebCore::DistantLightSource::initPaintingData): (WebCore::DistantLightSource::updatePaintingData): * svg/graphics/filters/SVGLightSource.h: (WebCore::): (WebCore::LightSource::LightSource): (WebCore::LightSource::~LightSource): (WebCore::LightSource::type): * svg/graphics/filters/SVGPointLightSource.h: (WebCore::PointLightSource::create): (WebCore::PointLightSource::position): (WebCore::PointLightSource::PointLightSource): * svg/graphics/filters/SVGSpotLightSource.h: (WebCore::SpotLightSource::create): (WebCore::SpotLightSource::position): (WebCore::SpotLightSource::direction): (WebCore::SpotLightSource::specularExponent): (WebCore::SpotLightSource::limitingConeAngle): (WebCore::SpotLightSource::SpotLightSource): 2010-05-12 Xan Lopez Reviewed by Nikolas Zimmermann. Add missing AM_V_GEN directives to generation rules so that they remain silent when requested. * GNUmakefile.am: 2010-05-12 Lucas De Marchi Reviewed by Jeremy Orlow. [EFL] It does not make sense to use ScrollbarEfl::ScrollbarEfl, so use ScrollbarEfl (GCC 4.5 seems to be pickier about this). Revision 59030 fixed cases for RenderThemeEfl, but missed this for ScrollbarEfl. http://webkit.org/b/38904 No new tests required. * platform/efl/ScrollbarEfl.cpp: (scrollbarEflEdjeMessage): 2010-05-12 MORITA Hajime Reviewed by Kent Tamura. [Chromium] Support HTML5 element on Windows. https://bugs.webkit.org/show_bug.cgi?id=37308 Extended ChromiumBridge to handle progress bar painting, and added delegations to it. No new tests. Test cases should be shared with existing ones for progress element. Expectaions will be added after PROGRESS_TAG is enabled on Chromium tree. * platform/chromium/ChromiumBridge.h: * rendering/RenderProgress.cpp: (WebCore::RenderProgress::animationProgress): (WebCore::RenderProgress::isDeterminate): * rendering/RenderProgress.h: (WebCore::RenderProgress::position): * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::animationRepeatIntervalForProgressBar): (WebCore::RenderThemeChromiumWin::animationDurationForProgressBar): (WebCore::RenderThemeChromiumWin::adjustProgressBarStyle): (WebCore::RenderThemeChromiumWin::paintProgressBar): * rendering/RenderThemeChromiumWin.h: 2010-05-12 Marcus Bulach Reviewed by Steve Block. Removes Geolocation::setPosition and uses positionChanged() to capture lastPosition(). This brings CLIENT_BASED_GEOLOCATION more inline with the non-client based. https://bugs.webkit.org/show_bug.cgi?id=38195 * page/Geolocation.cpp: (WebCore::Geolocation::lastPosition): (WebCore::Geolocation::requestPermission): (WebCore::Geolocation::positionChangedInternal): (WebCore::Geolocation::positionChanged): (WebCore::Geolocation::geolocationServicePositionChanged): * page/Geolocation.h: * page/GeolocationController.cpp: (WebCore::GeolocationController::positionChanged): (WebCore::GeolocationController::lastPosition): * page/GeolocationController.h: 2010-05-12 Marcus Bulach Reviewed by Steve Block. Attaches the geolocation bridge later on startUpdating(). This prevents a page requesting permission when it has just accessed navigator.geolocation (without calling navigator.geolocation.getCurrentPosition/watchPosition). Note: when Geolocation::haveSuitableCachedPosition(), WebGeolocationServiceBridgeImpl::startUpdating() is not called, so we attach the bridge if needed at requestGeolocationPermissionForFrame(). https://bugs.webkit.org/show_bug.cgi?id=38323 http://crbug.com/42789 * platform/chromium/GeolocationServiceChromium.h: 2010-05-12 Robin Qiu Reviewed by Dirk Schulze. Fix a bug in SVGPathSegList::getPathSegAtLength(). This bug is just a misktake: almost all of the code is OK, but the parameter is not used at all, therefore, this function always returns "1". And make a modification to return the last path segment if the distance exceeds the actual path length. https://bugs.webkit.org/show_bug.cgi?id=37515 Test: svg/dom/svgpath-getPathSegAtLength.html * svg/SVGPathSegList.cpp: (WebCore::SVGPathSegList::getPathSegAtLength): 2010-05-11 David Hyatt Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=38976, fast/css/pseudo-cache-stale.html has incorrect results. Make sure to trigger a relayout of any objects whose first-line styles change dynamically. * dom/Element.cpp: (WebCore::Element::pseudoStyleCacheIsInvalid): 2010-05-11 Joseph Pecoraro Reviewed by Timothy Hatcher. Web Inspector: Shorthand Properties Getting Deleted When Editing https://bugs.webkit.org/show_bug.cgi?id=38958 * inspector/front-end/DOMAgent.js: (WebInspector.CSSStyleDeclaration.prototype.styleTextWithShorthands): was getting regular values instead of shorthand values 2010-05-11 Tony Chang Reviewed by Darin Fisher. [chromium] Remove subframe scrollbar routing (r58937) https://bugs.webkit.org/show_bug.cgi?id=38894 * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::passMousePressEventToSubframe): 2010-05-11 Simon Fraser Reviewed by Maciej Stachowiak. Body not redrawn, and filled with garbage on some composited pages https://bugs.webkit.org/show_bug.cgi?id=38951 When the root layer becomes composited (for example, because a negative z-index descendant in its stacking context becomes composited), then it has to be made large enough to fill the viewport, because the page background draws into it. Test: compositing/geometry/composited-html-size.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::calculateCompositedBounds): 2010-05-11 Anders Carlsson Reviewed by Mark Rowe. https://bugs.webkit.org/show_bug.cgi?id=38961 Move some member variables around to reduce class sizes. If a class inherits (directly or indirectly) from FastAllocBase, we don't want the first member variable of that class to also inherit (directly or indirectly) from FastAllocBase as this will add padding to the class and thus increasing its size. * css/CSSParserValues.h: * css/CSSSelector.h: (WebCore::CSSSelector::CSSSelector): (WebCore::CSSSelector::RareData::RareData): * platform/graphics/FontCache.cpp: (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): 2010-05-11 Dumitru Daniliuc Reviewed by Adam Barth. Adding a function needed by the V8 code generator to turn on/off the binding for WorkerContext::openDatabaseSync(). https://bugs.webkit.org/show_bug.cgi?id=38960 * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled): * bindings/generic/RuntimeEnabledFeatures.h: 2010-05-11 MORITA Hajime Reviewed by Dirk Schulze. CSS SVG font doesn't recognize URL without element reference https://bugs.webkit.org/show_bug.cgi?id=37144 CachedFont::getSVGFontById() did assume that element reference (ID) is given. So fixed to handle an empty or missing element reference. In which case, the first font element is returned if available. Test: svg/custom/svg-fonts-with-no-element-reference.html * loader/CachedFont.cpp: (WebCore::CachedFont::getSVGFontById): 2010-05-11 Jer Noble No Review. Fix the Windows Debug Build: the correct VCProj variable to use when linking against JavaScriptCore is $(WebKitDLLConfigSuffix), not $(WebKitConfigSuffix), which expands to an empty string rather than "_debug". * WebCore.vcproj/QTMovieWin.vcproj: 2010-05-11 Jer Noble Darin Adler. 19 media tests are crashing on Windows Release https://bugs.webkit.org/show_bug.cgi?id=38950 rdar://problem/7971658 Link against JavaScriptCore.lib instead of WTF.lib, so the free and malloc used by QTMovieWin is always the free and malloc in JavaScriptCore.dll. * WebCore.vcproj/QTMovieWin.vcproj: 2010-05-11 Darin Adler Reviewed by Beth Dakin. Another refactoring patch in preparation for a fix to https://bugs.webkit.org/show_bug.cgi?id=38871 REGRESSION: Crash clicking background NPR tab after few minutes of sitting idle * dom/Document.cpp: (WebCore::Document::addMediaCanStartListener): Added. (WebCore::Document::removeMediaCanStartListener): Added. * dom/Document.h: Added add/removeMediaCanStartListener. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::~HTMLMediaElement): Call removeMediaCanStartListener on the document instead of the page. (WebCore::HTMLMediaElement::willMoveToNewOwnerDocument): Call removeMediaCanStartListener on the current document. (WebCore::HTMLMediaElement::didMoveToNewOwnerDocument): Call addMediaCanStartListener on the new document. (WebCore::HTMLMediaElement::loadInternal): Call addMediaCanStartListener on the document instead of the page. * plugins/PluginView.cpp: (WebCore::PluginView::startOrAddToUnstartedList): Call addMediaCanStartListener on the document instead of the page. (WebCore::PluginView::~PluginView): Call removeMediaCanStartListener on the document instead of the page, and do it in line instead of calling a function. * plugins/PluginView.h: Removed unused removeFromUnstartedListIfNecessary. 2010-05-11 Brian Weinstein Reviewed by Steve Falkenburg and Jon Honeycutt. Patch by Gavin Barraclough. REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF. https://bugs.webkit.org/show_bug.cgi?id=38930 Add the WTF strings into the WebCore vcproj, from their copied location in $(WebKitOutputDir). No new tests because no change in behavior. * WebCore.vcproj/WebCore.vcproj: 2010-05-11 Beth Dakin Reviewed by Darin Adler. Small re-factoring patch in preparation for fixing https:// bugs.webkit.org/show_bug.cgi?id=38871 REGRESSION: Crash clicking background NPR tab after few minutes of sitting idle * page/Page.cpp: (WebCore::Page::takeAnyMediaCanStartListener): (WebCore::Page::setCanStartMedia): * page/Page.h: 2010-05-11 Alexey Proskuryakov Reviewed by Brady Eidson. https://bugs.webkit.org/show_bug.cgi?id=37989 Safari (still) doesn't always send basic credentials preemptively Test: http/tests/xmlhttprequest/basic-auth-default.html After fetching credentials from WebCore storage, put them back right away. This will add default credentials for the directory, since this may be the first time we learn about its associated protection space. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): (WebCore::WebCoreSynchronousLoader::didReceiveChallenge): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): 2010-05-11 Kevin Watters Reviewed by Kevin Ollivier. [wx] Create an NSFont on Mac builds that do not have built-in methods to do so. https://bugs.webkit.org/show_bug.cgi?id=38931 * platform/graphics/wx/FontPlatformData.h: (WebCore::FontPlatformData::nsFont): * platform/graphics/wx/FontPlatformDataWxMac.mm: (DegToRad): (OSXCreateNSFont): (WebCore::FontPlatformData::cacheNSFont): * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::platformWidthForGlyph): 2010-05-11 Avi Drissman Reviewed by Darin Fisher. [Chromium] Pipe RTL info into WebPopupMenuInfo https://bugs.webkit.org/show_bug.cgi?id=38749 * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupContainer::menuStyle): * platform/chromium/PopupMenuChromium.h: 2010-05-11 Mark Rowe Fix the world. In r59162 a change was made to WebCore's FeatureDefines.xcconfig that enabled FILE_READER and FILE_WRITER. The author and reviewer of that patch ignored the carefully-worded warning at the top of that file asking that changes to the file be kept in sync across JavaScriptCore, WebCore and WebKit, as well as being kept in sync with build-webkit. This led to WebCore and WebKit having different views of Document's vtable and results in crashes in Safari shortly after launch when virtual function calls resulted in the wrong function in WebCore being called. We fix this by bringing the FeatureDefines.xcconfig files in to sync. Based on the ChangeLog message and other changes in r59162 it appears that enabling FILE_WRITER was unintentional so that particular change has been reverted. * Configurations/FeatureDefines.xcconfig: 2010-05-11 Dimitri Glazkov Reviewed by Darin Adler. REGRESSION(r58520): Implicit submission on forms with button type="submit" no longer works https://bugs.webkit.org/show_bug.cgi?id=38913 * Widened the check for a successful submit button to include all HTMLFormControlElements. * Clarified implicit submission code by: - introducing HTMLFormControlElement::canTriggerImplicitSubmission flag, - getting rid of static casting and checking for tag names. * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::canTriggerImplicitSubmission): Added. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submitImplicitly): Renamed parameters for clarity, refactored code to use canTriggerImplicitSubmission. * html/HTMLFormElement.h: Renamed parameter for clarity. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Used canTriggerImplicitSubmission() instead of isTextField() for clarity. * html/HTMLInputElement.h: (WebCore::HTMLInputElement::canTriggerImplicitSubmission): Added. * html/HTMLIsIndexElement.h: (WebCore::HTMLIsIndexElement::canTriggerImplicitSubmission): Added. 2010-05-11 Sheriff Bot Unreviewed, rolling out r59171. http://trac.webkit.org/changeset/59171 https://bugs.webkit.org/show_bug.cgi?id=38933 "Broke the world" (Requested by bweinstein on #webkit). * WebCore.vcproj/WebCore.vcproj: 2010-05-11 Brian Weinstein Reviewed by Steve Falkenburg. Patch by Gavin Barraclough. REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF. https://bugs.webkit.org/show_bug.cgi?id=38930 Add the WTF strings into the WebCore vcproj, from their copied location in $(WebKitOutputDir). No new tests because no change in behavior. * WebCore.vcproj/WebCore.vcproj: 2010-05-11 Jian Li Unreviewed. Fix compiling erron on snow leopard. * html/FileThreadTask.h: (WebCore::createFileThreadTask): 2010-05-11 Jian Li Reviewed by Dmitry Titov. Expose FileReader interface. https://bugs.webkit.org/show_bug.cgi?id=38609 Test: fast/files/file-reader.html * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventTarget.cpp: (WebCore::toJS): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertEventTargetToV8Object): * html/FileError.idl: * html/FileReader.idl: Added. * page/DOMWindow.idl: 2010-05-11 Xan Lopez Reviewed by Gustavo Noronha. [gtk] critical warning in soup_message_set_first_party() when cancelling a navigation https://bugs.webkit.org/show_bug.cgi?id=38653 Check if willSendRequest cancelled the request before setting the first party for the cookies in the message, otherwise we'll get a critical warning. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::restartedCallback): 2010-05-11 Jer Noble Reviewed by Adele Peterson. REGRESSION (r59001): 11 media tests are failing on Windows (38847) rdar://problem/7962997 https://bugs.webkit.org/show_bug.cgi?id=38847 QTMovieWin was too much refactored; the cacheMovieScale() function should have been left in QTMovie (instead of being moved into QTMovieGWorld). This fixes the video-size-intrinsic-scale test. QTMovieTask::updateTaskTimer() was ignoring the maxInterval parameter unless QTGetTimeUntilNextTask() returned an error, which caused the next timer to be scheduled for extremely far in the future, breaking some of the layout tests. QTMovieTask::fireTaskClients() now makes a local copy of the task list before calling clients, in case one of them removes themselves from the task list and invalidates our iterating pointer. * platform/graphics/win/QTMovie.cpp: (QTMoviePrivate::task): (QTMoviePrivate::createMovieController): (QTMoviePrivate::cacheMovieScale): * platform/graphics/win/QTMovieGWorld.cpp: (QTMovieGWorldPrivate::movieLoadStateChanged): * platform/graphics/win/QTMovieTask.cpp: (QTMovieTask::updateTaskTimer): (QTMovieTask::fireTaskClients): 2010-05-11 Patrick Gansterer Reviewed by Adam Roben. Port SharedBuffer to WinCE. https://bugs.webkit.org/show_bug.cgi?id=37222 Use only functions which are available on Win32 and WinCE. * platform/win/SharedBufferWin.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): 2010-05-11 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. [Qt] fast/text/find-hidden-text.html https://bugs.webkit.org/show_bug.cgi?id=32922 Use the real page step for populating the QStyleOption otherwhise the size can be negative, which can break the QStyle used. * platform/qt/ScrollbarThemeQt.cpp: (WebCore::styleOptionSlider): 2010-05-11 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: make styles rendering more user-friendly. https://bugs.webkit.org/show_bug.cgi?id=36747 * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._update): (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules): (WebInspector.ComputedStyleSidebarPane): (WebInspector.StylePropertiesSection): (WebInspector.StylePropertiesSection.prototype.collapse): (WebInspector.StylePropertiesSection.prototype.startEditingSelector): * inspector/front-end/inspector.css: (#elements-content): (#elements-sidebar): (.styles-sidebar-separator): (.styles-section): (.styles-section .header): (.styles-section .header .title): (.styles-section .header .subtitle): (.styles-section .header .subtitle a): (.styles-section .properties): (.styles-section.no-affect .properties li): (.styles-section.no-affect .properties li.editing): (.styles-section.expanded .properties): (.styles-section .properties li): (.styles-section .properties li.parent): (.styles-section .properties ol): (.styles-section .properties ol.expanded): (.styles-section .properties li.parent::before): (.styles-section .properties li.parent.expanded::before): (.styles-section .properties li .info): (.styles-section:hover .properties .enabled-button): (.styles-section .properties li.disabled .enabled-button): (.styles-section .properties .enabled-button): (.styles-section .properties .overloaded, .styles-section .properties .disabled): (.styles-section.computed-style .properties .disabled): (.styles-section .properties .implicit, .styles-section .properties .inherited): (.styles-section .properties .inherited): (.styles-section.show-inherited .properties .inherited): 2010-05-11 Nikolas Zimmermann Reviewed by Dirk Schulze. Move buildLayoutInformationForTextBox() from SVGRootInlineBox in SVGInlineTextBox where it belongs https://bugs.webkit.org/show_bug.cgi?id=38799 Cleanup SVGRootInlineBox/SVGInlineTextBox. Move buildLayoutInformationForTextBox to SVGInlineTextBox. Move lots of helper methods into new SVGTextLayoutUtilities class. Adapted all callsites. Fixed bug in kerning handling, hkern was applyable to vertical text as well. Covered by two new tests. Tests: svg/text/text-hkern-on-vertical-text.svg svg/text/text-vkern-on-horizontal-text.svg * Android.mk: Add SVGTextLayoutUtilities.cpp/h to build. * GNUmakefile.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::calculateGlyphWidth): Use textRenderer()->characters() instead of textRenderer()->text()->characters() as shortcut. (WebCore::SVGInlineTextBox::svgCharacterHitsPosition): Fix style issue, no else if after a return branch. (WebCore::SVGInlineTextBox::paintSelection): Use !color.alpha() instead of color.alpha() == 0. (WebCore::SVGInlineTextBox::buildLayoutInformation): Moved from SVGRootInlineBox::buildLayoutInformationForTextBox. * rendering/SVGInlineTextBox.h: Fix indention. (WebCore::SVGInlineTextBox::selectionTop): Inlined. (WebCore::SVGInlineTextBox::selectionHeight): Inlined. * rendering/SVGRenderTreeAsText.cpp: Include SVGTextLayoutUtilities.h * rendering/SVGRootInlineBox.cpp: Move almost all static text layout helper functions in SVGTextLayoutUtilities (WebCore::calculateTextLengthCorrectionForTextChunk): Fixed style issue in long if conditions spanning multiple lines. (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): Use different topLeftPositionOfCharacterRange() taking start/end iterators. (WebCore::SVGRootInlineBox::buildLayoutInformation): Use the moved SVGInlineTextBox::buildLayoutInformation() method. (WebCore::SVGRootInlineBox::buildTextChunks): Fixed small style issue, remove unneeded parenthesis. (WebCore::SVGRootInlineBox::layoutTextChunks): Fix style issue in debugging code. * rendering/SVGRootInlineBox.h: Rename 'LastGlyphInfo' to 'SVGLastGlyphInfo' and move to SVGTextLayoutUtilities. (WebCore::SVGRootInlineBox::svgTextChunks): Inlined for speed. * rendering/SVGTextLayoutUtilities.cpp: Added. (WebCore::isVerticalWritingMode): (WebCore::dominantBaselineToShift): (WebCore::alignmentBaselineToShift): (WebCore::glyphOrientationToAngle): (WebCore::glyphOrientationIsMultiplyOf180Degrees): (WebCore::applyGlyphAdvanceAndShiftRespectingOrientation): (WebCore::topLeftPositionOfCharacterRange): (WebCore::cummulatedWidthOfInlineBoxCharacterRange): (WebCore::cummulatedHeightOfInlineBoxCharacterRange): (WebCore::svgTextRunForInlineTextBox): (WebCore::calculateCSSKerning): (WebCore::applySVGKerning): * rendering/SVGTextLayoutUtilities.h: Added. (WebCore::): (WebCore::SVGTextPaintInfo::SVGTextPaintInfo): (WebCore::SVGLastGlyphInfo::SVGLastGlyphInfo): 2010-05-11 Zoltan Herczeg Reviewed by Dirk Schulze. RenderSVGImage::imageChanged should invalidate the SVG filter cache https://bugs.webkit.org/show_bug.cgi?id=38838 Test: svg/filters/filteredImage.svg * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::imageChanged): 2010-05-10 Simon Fraser Fix asserting GTK build. r59137 changed the behavior of RenderObject::repaintUsingContainer(). I mistakenly thought that non-compositing builds would always pass a 0 repaintContainer, but actually the RenderView is passed in this case. So use this to repaint if ACCELERATED_COMPOSITING is turned off. * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintUsingContainer): 2010-05-10 Simon Fraser Fix warning on Windows about unreachable code. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingIFrame): 2010-05-10 Simon Fraser Reviewed by Anders Carlsson Allow compositing layers to be connected across iframe boundaries on Mac https://bugs.webkit.org/show_bug.cgi?id=38856 RenderObject::repaintUsingContainer() incorrectly did a view-based repaint if the repaint container was the RenderView. Instead, we need to check to see if the RenderView's layer is composited, and, if so, whether it's painting into the window or not. This can occur when iframes are composited. The bug is timing-sensitive, involving compositing in iframes, and I was not able to concoct a good testcase. * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintUsingContainer): 2010-05-10 Simon Fraser Reviewed by Anders Carlsson Allow compositing layers to be connected across iframe boundaries on Mac https://bugs.webkit.org/show_bug.cgi?id=38856 Changes to allow compositing layers for iframes to switch between being hosted by the iframe's layer-backed NSView, and parented in the GraphicsLayer tree of the enclosing document. Tests: compositing/iframes/connect-compositing-iframe.html compositing/iframes/connect-compositing-iframe2.html compositing/iframes/connect-compositing-iframe3.html * page/FrameView.h: * page/FrameView.cpp: (WebCore::FrameView::hasCompositedContent): New convenience method. (WebCore::FrameView::setIsOverlapped): If we're composited, poke the owner document in case it wants to re-evaluate compositing decisions. (WebCore::FrameView::isOverlapped): Just expose the existing flag. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::shouldBeNormalFlowOnly): (WebCore::RenderLayer::isSelfPaintingLayer): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): If this is an iframe, we need to ensure that the layers for the iframe content are hooked up. (WebCore::RenderLayerBacking::updateDrawsContent): When an iframe toggles between different attachments, the 'drawsContent' behavior of its root layer changes, so needs to be updated. * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::updateCompositingLayers): Call destroyRootPlatformLayer() instead of detachRootPlatformLayer() and manually zeroing out the OwnPtrs. (WebCore::RenderLayerCompositor::updateBacking): If a RenderIFrame changes compositing mode, we need to ensure that its content compositor attachment is updated. (WebCore::RenderLayerCompositor::repaintOnCompositingChange): The existing code had a bug that caused repaints for RenderViews (which have no parent) to bail. We only want to bail for non-RenderViews that are not attached. (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Factored the iframe-connecting code into a new method, parentIFrameContentLayers(). (WebCore::RenderLayerCompositor::parentIFrameContentLayers): New method to share the code that hooks up the iframe's compositing layers to the parent. (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingIFrame): Add logic to propagate compositing out of iframes on Mac in two situations: 1) when the FrameView is overlapped, and 2) if the parent document is already composited. (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): Clean up the logic here to better deal with dynamic changes of the attachment type. (WebCore::RenderLayerCompositor::destroyRootPlatformLayer): Clean up and null out the clipping layer here. (WebCore::RenderLayerCompositor::attachRootPlatformLayer): Call rootLayerAttachmentChanged(). (WebCore::RenderLayerCompositor::detachRootPlatformLayer): Ditto. Also unparent the clipping and platform layers. (WebCore::RenderLayerCompositor::updateRootLayerAttachment): Call ensureRootPlatformLayer() to re-evaluate the layer attachment. (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged): We need to update the drawsContent() status of the RenderView's layer's backing, because it changes depending on the attachment. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): Do overlap testing if the frameView can do fast repaints (as before), but also now when the frameView has composited content. 2010-05-10 Simon Fraser Reviewed by Anders Carlsson Allow compositing layers to be connected across iframe boundaries on Mac https://bugs.webkit.org/show_bug.cgi?id=38856 Rename the static shouldPropagateCompositingToIFrameParent() to shouldPropagateCompositingToEnclosingIFrame(), to pave the way for runtime switches in the propagation behavior. We have to make sure we call it on the correct RenderLayerCompositor (that belonging to the iframe's content document). * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintingGoesToWindow): Now that we know the root layer attachment, we can simplify this method. * rendering/RenderLayerCompositor.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::enableCompositingMode): No need for the setNeedsStyleRecalc() here, because the ensureRootPlatformLayer() or destroyRootPlatformLayer() will have already done it. (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Use the root layer attachment to determine whether to parent the iframe's layers. (WebCore::RenderLayerCompositor::didMoveOnscreen): Method name change. (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingIFrame): Name change. (WebCore::RenderLayerCompositor::requiresCompositingForIFrame): We need to consult the iframe contents document's compositor to ask whether propagation is appropriate. (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): Name change. 2010-05-10 Simon Fraser Reviewed by Anders Carlsson Allow compositing layers to be connected across iframe boundaries on Mac https://bugs.webkit.org/show_bug.cgi?id=38856 Use an enum for the type of root layer attachment on a RenderLayerCompositor, so we can determine if the attachment is via the ChromeClient, via an enclosing iframe, or unattached. * rendering/RenderLayerCompositor.h: New RootLayerAttachment enum. (WebCore::RenderLayerCompositor::rootLayerAttachment): getter for the current attachment. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): Init m_rootLayerAttachment. (WebCore::RenderLayerCompositor::~RenderLayerCompositor): Assert that is unattached. (WebCore::RenderLayerCompositor::updateCompositingLayers): Call destroyRootPlatformLayer instead of willMoveOffscreen, when there are no layers left. Also clear out the clipping layer. (WebCore::RenderLayerCompositor::didMoveOnscreen): Call attachRootPlatformLayer. (WebCore::RenderLayerCompositor::willMoveOffscreen): Call ensureRootPlatformLayer with the appropriate attachment. (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): Only create the m_rootPlatformLayer if we don't have one already, but be sure to always set the root layer geometry orientation. Also only create the m_clippingLayer if we need to. (WebCore::RenderLayerCompositor::destroyRootPlatformLayer): Call detachRootPlatformLayer(). (WebCore::RenderLayerCompositor::attachRootPlatformLayer): Code moved from didMoveOnscreen, but switching on attachment. (WebCore::RenderLayerCompositor::detachRootPlatformLayer): Code moved from willMoveOffscreen, but switching on attachment. 2010-05-10 Simon Fraser Reviewed by Anders Carlsson Allow compositing layers to be connected across iframe boundaries on Mac https://bugs.webkit.org/show_bug.cgi?id=38856 Clean up the geometry logic when propagating compositing out of iframes. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateRootLayerPosition): Geometry on m_rootPlatformLayer no longer needs to be special when there's a clipping layer. (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): Don't set the clipping layer to have flipped geometry ever, and only set the root layer to have flipped geometry if it is not being hosted in an iframe. Also no need to set a custom anchor point on the clipping layer. 2010-05-10 Simon Fraser Reviewed by Anders Carlsson Allow compositing layers to be connected across iframe boundaries on Mac https://bugs.webkit.org/show_bug.cgi?id=38856 Clean up some methods related to composited iframes. No behavioral changes. * rendering/RenderLayerBacking.h: Move innerRenderLayerCompositor() to be a static method: RenderLayerCompositor::iframeContentsCompositor(). * rendering/RenderLayerBacking.cpp: Remove innerRenderLayerCompositor(). (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Call iframeContentsCompositor(). * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::enableCompositingMode): Call enclosingIFrameElement() (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): iframeContentsCompositor() is now a static method in this class. Also check that the iframe contents are in compositing mode (slightly clearer than relying on rootPlatformLayer() returning null). (WebCore::RenderLayerCompositor::iframeContentsCompositor): Moved from RenderLayerBacking. (WebCore::RenderLayerCompositor::didMoveOnscreen): Use enclosingIFrameElement() method. (WebCore::RenderLayerCompositor::willMoveOffscreen): Ditto. (WebCore::RenderLayerCompositor::enclosingIFrameElement): New method. (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): Call enclosingIFrameElement(). * rendering/RenderLayerCompositor.h: New method, iframeContentsCompositor(). 2010-05-10 Dumitru Daniliuc Reviewed by Brady Eidson. Cleaning up and fixing the existing JSC DB bindings. https://bugs.webkit.org/show_bug.cgi?id=34994 * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::openDatabase): * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::createTransaction): (WebCore::JSDatabase::transaction): (WebCore::JSDatabase::readTransaction): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): 2010-05-10 Fumitoshi Ukai Reviewed by Alexey Proskuryakov. WebSocket needs to suspend/resume as Active DOM object. https://bugs.webkit.org/show_bug.cgi?id=38171 Implement suspend()/resume() in WebSocket and WebSocketChannel. While WebSocketChannel is suspended, it only adds received data in m_buffer or record the handle was closed, and report no event to WebSocket. When resumed, it will process buffer or handle closing. Since suspend/resume would be called while processing JavaScript event handler (e.g. before/after alert()), WebSocketChannel method that would fire an event need to be reentrant. So, WebSocketChannel::processBuffer() call WebSocket to fire an event at most once and skips buffer before the calling, so that next call of processBuffer() would process the next frame. * websockets/ThreadableWebSocketChannel.h: * websockets/ThreadableWebSocketChannelClientWrapper.h: (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect): Mark channel is opened, and process pending events if not suspended. (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage): Push message back in pending queue, and process pending events if not suspended. (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): Mark channel is closed, and process pending events if not suspended. (WebCore::ThreadableWebSocketChannelClientWrapper::suspend): Mark suspended. (WebCore::ThreadableWebSocketChannelClientWrapper::resume): Unmark suspended, and process pending events. (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingEvents): * websockets/WebSocket.cpp: (WebCore::WebSocket::canSuspend): (WebCore::WebSocket::suspend): (WebCore::WebSocket::resume): (WebCore::WebSocket::didClose): * websockets/WebSocket.h: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::connect): (WebCore::WebSocketChannel::send): (WebCore::WebSocketChannel::bufferedAmount): (WebCore::WebSocketChannel::close): (WebCore::WebSocketChannel::suspend): (WebCore::WebSocketChannel::resume): When resumed, it will process buffer and handle closing if handle was already closed while suspended. (WebCore::WebSocketChannel::didClose): If suspended, record unhandled bufferedAmount and set m_closed true, so that closing will be processed when resumed. (WebCore::WebSocketChannel::didReceiveData): Add received data in buffer and process buffer while it is not suspended. (WebCore::WebSocketChannel::processBuffer): Process handshake header or one frame message. Return true if there are more data to be processed. Return false otherwise (e.g. incomplete handshake header or incomplete frame). * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::suspend): (WebCore::WorkerThreadableWebSocketChannel::resume): (WebCore::WorkerThreadableWebSocketChannel::Peer::suspend): (WebCore::WorkerThreadableWebSocketChannel::Peer::resume): (WebCore::WorkerThreadableWebSocketChannel::mainThreadSuspend): (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend): (WebCore::WorkerThreadableWebSocketChannel::mainThreadResume): (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume): * websockets/WorkerThreadableWebSocketChannel.h: 2010-05-07 Dumitru Daniliuc Reviewed by Brady Eidson. Implement the JSC bindings for the sync DB API. https://bugs.webkit.org/show_bug.cgi?id=34994 * bindings/js/JSDatabaseSyncCustom.cpp: (WebCore::JSDatabaseSync::changeVersion): (WebCore::createTransaction): * bindings/js/JSSQLTransactionSyncCustom.cpp: (WebCore::JSSQLTransactionSync::executeSql): 2010-05-10 Dean Jackson Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=36566 The animation-fill-mode property was missing from a few places where the animation shorthand is set up. Test: animations/animation-shorthand-removed.html * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::getPropertyValue): Make sure animation-fill-mode is included in the animation shorthand * css/CSSPropertyLonghand.cpp: (WebCore::initShorthandMap): 2010-05-10 Sam Weinig Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=38583 Crash in Element::normalizeAttributes. Test: fast/dom/Element/normalize-crash.html * dom/Element.cpp: (WebCore::Element::normalizeAttributes): Copy attributes to a vector before iterating. * dom/NamedAttrMap.cpp: (WebCore::NamedNodeMap::copyAttributesToVector): Added. * dom/NamedAttrMap.h: 2010-05-10 Jian Li Reviewed by Adam Barth. [V8] Fix V8 code generator script to generate the correct code for converting ScriptString. https://bugs.webkit.org/show_bug.cgi?id=38873 Updated the bindings test result. Note that the result is also updated to reflect other script generator changes not introduced by this patch. * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/JS/JSTestCallback.cpp: (WebCore::JSTestCallback::JSTestCallback): (WebCore::JSTestCallback::~JSTestCallback): * bindings/scripts/test/JS/JSTestCallback.h: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::scriptStringAttrAttrGetter): 2010-05-10 Mark Rowe Fix the 32-bit WebKit2 build. * WebCore.base.exp: 2010-05-07 Jon Honeycutt Crash closing window containing Flash plug-in https://bugs.webkit.org/show_bug.cgi?id=38797 Reviewed by Eric Seidel. Test: plugins/geturlnotify-during-document-teardown.html * plugins/PluginView.cpp: (WebCore::PluginView::load): Null check the DocumentLoader; it's possible for this to be null while the Document is being torn down and before the plug-in is destroyed. 2010-05-10 Alexey Proskuryakov Reviewed by Darin Adler. Based on a patch by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=28697 WebKit crash on WebCore::Node::nodeIndex() It's not OK to call ContainerNode::willRemoveChild() in a loop, because Range code assumes that it can adjust start and end position to any node except for the one being removed - so these notifications cannot be batched. Test: fast/dom/Range/remove-all-children-crash.html * dom/ContainerNode.cpp: (WebCore::willRemoveChild): Removed unused ExceptionCode. (WebCore::willRemoveChildren): New function, used in removeChildren() case. (WebCore::ContainerNode::removeChild): ExceptionCode return was always 0, don't bother with it. (WebCore::ContainerNode::removeChildren): Call willRemoveChildrenFromNode. (WebCore::dispatchChildRemovalEvents): Moved some logic out into willRemoveChildrenFromNode and willRemoveChild. * dom/Document.cpp: (WebCore::Document::nodeChildrenWillBeRemoved): New function, used in removeChildren() case. * dom/Document.h: (WebCore::Document::nodeChildrenWillBeRemoved): New function, used in removeChildren() case. * dom/Range.h: * dom/Range.cpp: (WebCore::boundaryNodeChildrenWillBeRemoved): New function, used in removeChildren() case. (WebCore::Range::nodeChildrenWillBeRemoved): Ditto. 2010-05-10 Dumitru Daniliuc Reviewed by Adam Barth. Implement the V8 bindings for the sync DB API. https://bugs.webkit.org.show_bug.cgi?id=34994 * bindings/v8/custom/V8DatabaseSyncCustom.cpp: (WebCore::V8DatabaseSync::changeVersionCallback): (WebCore::createTransaction): * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: (WebCore::V8SQLTransactionSync::executeSqlCallback): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::V8WorkerContextCustom::openDatabaseSyncCallback): 2010-05-10 Dumitru Daniliuc Reviewed by Adam Barth. Clean up and fix the existing V8 DB bindings. https://bugs.webkit.org/show_bug.cgi?id=34994 * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::openDatabaseCallback): * bindings/v8/custom/V8DatabaseCustom.cpp: (WebCore::V8Database::changeVersionCallback): (WebCore::createTransaction): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::V8SQLTransaction::executeSqlCallback): 2010-05-10 Kevin Ollivier [wx] Build fix for wx 2.8 after complex text changes. * platform/graphics/wx/FontPlatformDataWxMac.mm: (WebCore::FontPlatformData::nsFont): * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::platformWidthForGlyph): 2010-05-10 John Gregg [chromium] Try to fix the chromium build after r59085 by including MathExtras.h before using isnan(). https://bugs.webkit.org/show_bug.cgi?id=38860 * html/canvas/WebGLIntegralTypedArrayBase.h: 2010-05-10 Kevin Ollivier [wx] Build fix for wx trunk after complex text changes. * platform/graphics/wx/FontPlatformDataWx.cpp: (WebCore::FontPlatformData::FontPlatformData): 2010-05-10 Tony Gentilcore Reviewed by Adam Barth. Provide mechanism to cache metadata for a resource https://bugs.webkit.org/show_bug.cgi?id=37874 No new tests because no new functionality. * WebCore.gypi: * loader/CachedMetadata.h: Added. (WebCore::CachedMetadata::create): (WebCore::CachedMetadata::deserialize): (WebCore::CachedMetadata::serialize): (WebCore::CachedMetadata::~CachedMetadata): (WebCore::CachedMetadata::dataTypeID): (WebCore::CachedMetadata::data): (WebCore::CachedMetadata::size): (WebCore::CachedMetadata::readUnsigned): (WebCore::CachedMetadata::appendUnsigned): (WebCore::CachedMetadata::CachedMetadata): * loader/CachedResource.cpp: (WebCore::CachedResource::setSerializedCachedMetadata): (WebCore::CachedResource::setCachedMetadata): (WebCore::CachedResource::cachedMetadata): * loader/CachedResource.h: * loader/ResourceLoader.h: (WebCore::ResourceLoader::didReceiveCachedMetadata): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveCachedMetadata): * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: (WebCore::SubresourceLoaderClient::didReceiveCachedMetadata): * loader/loader.cpp: (WebCore::Loader::Host::didReceiveCachedMetadata): * loader/loader.h: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::cacheMetadata): * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::didReceiveCachedMetadata): 2010-05-09 Kenneth Russell Reviewed by Dimitri Glazkov. Refactor WebGLArray types to share more code https://bugs.webkit.org/show_bug.cgi?id=37712 Refactored WebGLArray types for maximal code sharing. Added WebGLTypedArrayBase and WebGLIntegralTypedArrayBase template superclasses. Changed overridden virtuals to have minimal visibility (private instead of public). Fixed const correctness of a few methods. There are no changes to the public APIs of the WebGLArray classes; the JavaScript bindings are unchanged. No new tests; existing tests cover this functionality. Ran all WebGL layout tests in Safari and Chromium on Mac OS X. * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLArray.h: (WebCore::WebGLArray::buffer): (WebCore::WebGLArray::baseAddress): (WebCore::WebGLArray::byteOffset): * html/canvas/WebGLByteArray.cpp: (WebCore::WebGLByteArray::create): (WebCore::WebGLByteArray::WebGLByteArray): (WebCore::WebGLByteArray::slice): * html/canvas/WebGLByteArray.h: (WebCore::WebGLByteArray::isByteArray): * html/canvas/WebGLFloatArray.cpp: (WebCore::WebGLFloatArray::create): (WebCore::WebGLFloatArray::WebGLFloatArray): (WebCore::WebGLFloatArray::slice): * html/canvas/WebGLFloatArray.h: (WebCore::WebGLFloatArray::set): (WebCore::WebGLFloatArray::item): (WebCore::WebGLFloatArray::isFloatArray): * html/canvas/WebGLIntArray.cpp: (WebCore::WebGLIntArray::create): (WebCore::WebGLIntArray::WebGLIntArray): (WebCore::WebGLIntArray::slice): * html/canvas/WebGLIntArray.h: (WebCore::WebGLIntArray::isIntArray): * html/canvas/WebGLIntegralTypedArrayBase.h: Added. (WebCore::WebGLIntegralTypedArrayBase::set): (WebCore::WebGLIntegralTypedArrayBase::item): (WebCore::WebGLIntegralTypedArrayBase::WebGLIntegralTypedArrayBase): * html/canvas/WebGLShortArray.cpp: (WebCore::WebGLShortArray::create): (WebCore::WebGLShortArray::WebGLShortArray): (WebCore::WebGLShortArray::slice): * html/canvas/WebGLShortArray.h: (WebCore::WebGLShortArray::isShortArray): * html/canvas/WebGLTypedArrayBase.h: Added. (WebCore::WebGLTypedArrayBase::data): (WebCore::WebGLTypedArrayBase::set): (WebCore::WebGLTypedArrayBase::length): (WebCore::WebGLTypedArrayBase::WebGLTypedArrayBase): (WebCore::WebGLTypedArrayBase::create): (WebCore::WebGLTypedArrayBase::sliceImpl): (WebCore::WebGLTypedArrayBase::byteLength): * html/canvas/WebGLUnsignedByteArray.cpp: (WebCore::WebGLUnsignedByteArray::create): (WebCore::WebGLUnsignedByteArray::WebGLUnsignedByteArray): (WebCore::WebGLUnsignedByteArray::slice): * html/canvas/WebGLUnsignedByteArray.h: (WebCore::WebGLUnsignedByteArray::isUnsignedByteArray): * html/canvas/WebGLUnsignedIntArray.cpp: (WebCore::WebGLUnsignedIntArray::create): (WebCore::WebGLUnsignedIntArray::WebGLUnsignedIntArray): (WebCore::WebGLUnsignedIntArray::slice): * html/canvas/WebGLUnsignedIntArray.h: (WebCore::WebGLUnsignedIntArray::isUnsignedIntArray): * html/canvas/WebGLUnsignedShortArray.cpp: (WebCore::WebGLUnsignedShortArray::create): (WebCore::WebGLUnsignedShortArray::WebGLUnsignedShortArray): (WebCore::WebGLUnsignedShortArray::slice): * html/canvas/WebGLUnsignedShortArray.h: (WebCore::WebGLUnsignedShortArray::isUnsignedShortArray): 2010-05-10 Kenneth Russell Reviewed by Dimitri Glazkov. Refactor WebGLArray types to share more code https://bugs.webkit.org/show_bug.cgi?id=37712 Refactored WebGLArray types for maximal code sharing. Added WebGLTypedArrayBase and WebGLIntegralTypedArrayBase template superclasses. Changed overridden virtuals to have minimal visibility (private instead of public). Fixed const correctness of a few methods. There are no changes to the public APIs of the WebGLArray classes; the JavaScript bindings are unchanged. No new tests; existing tests cover this functionality. Ran all WebGL layout tests in Safari and Chromium on Mac OS X. * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLArray.h: (WebCore::WebGLArray::buffer): (WebCore::WebGLArray::baseAddress): (WebCore::WebGLArray::byteOffset): * html/canvas/WebGLByteArray.cpp: (WebCore::WebGLByteArray::create): (WebCore::WebGLByteArray::WebGLByteArray): (WebCore::WebGLByteArray::slice): * html/canvas/WebGLByteArray.h: (WebCore::WebGLByteArray::isByteArray): * html/canvas/WebGLFloatArray.cpp: (WebCore::WebGLFloatArray::create): (WebCore::WebGLFloatArray::WebGLFloatArray): (WebCore::WebGLFloatArray::slice): * html/canvas/WebGLFloatArray.h: (WebCore::WebGLFloatArray::set): (WebCore::WebGLFloatArray::item): (WebCore::WebGLFloatArray::isFloatArray): * html/canvas/WebGLIntArray.cpp: (WebCore::WebGLIntArray::create): (WebCore::WebGLIntArray::WebGLIntArray): (WebCore::WebGLIntArray::slice): * html/canvas/WebGLIntArray.h: (WebCore::WebGLIntArray::isIntArray): * html/canvas/WebGLIntegralTypedArrayBase.h: Added. (WebCore::WebGLIntegralTypedArrayBase::set): (WebCore::WebGLIntegralTypedArrayBase::item): (WebCore::WebGLIntegralTypedArrayBase::WebGLIntegralTypedArrayBase): * html/canvas/WebGLShortArray.cpp: (WebCore::WebGLShortArray::create): (WebCore::WebGLShortArray::WebGLShortArray): (WebCore::WebGLShortArray::slice): * html/canvas/WebGLShortArray.h: (WebCore::WebGLShortArray::isShortArray): * html/canvas/WebGLTypedArrayBase.h: Added. (WebCore::WebGLTypedArrayBase::data): (WebCore::WebGLTypedArrayBase::set): (WebCore::WebGLTypedArrayBase::length): (WebCore::WebGLTypedArrayBase::WebGLTypedArrayBase): (WebCore::WebGLTypedArrayBase::create): (WebCore::WebGLTypedArrayBase::sliceImpl): (WebCore::WebGLTypedArrayBase::byteLength): * html/canvas/WebGLUnsignedByteArray.cpp: (WebCore::WebGLUnsignedByteArray::create): (WebCore::WebGLUnsignedByteArray::WebGLUnsignedByteArray): (WebCore::WebGLUnsignedByteArray::slice): * html/canvas/WebGLUnsignedByteArray.h: (WebCore::WebGLUnsignedByteArray::isUnsignedByteArray): * html/canvas/WebGLUnsignedIntArray.cpp: (WebCore::WebGLUnsignedIntArray::create): (WebCore::WebGLUnsignedIntArray::WebGLUnsignedIntArray): (WebCore::WebGLUnsignedIntArray::slice): * html/canvas/WebGLUnsignedIntArray.h: (WebCore::WebGLUnsignedIntArray::isUnsignedIntArray): * html/canvas/WebGLUnsignedShortArray.cpp: (WebCore::WebGLUnsignedShortArray::create): (WebCore::WebGLUnsignedShortArray::WebGLUnsignedShortArray): (WebCore::WebGLUnsignedShortArray::slice): * html/canvas/WebGLUnsignedShortArray.h: (WebCore::WebGLUnsignedShortArray::isUnsignedShortArray): 2010-05-10 Brent Fulgham Build fix, not reviewed. Correct post-build copy command for WinCairo port to make sure cairo headers are available for WebKit.dll build. * WebCore.vcproj/WebCore.vcproj: 2010-05-10 Dirk Schulze Reviewed by Nikolas Zimmermann. Further optimization for SVG's repaintRect calculation https://bugs.webkit.org/show_bug.cgi?id=38820 This is a further optimization to get smaller repaintRects on SVG objects in combination with masker or clipper resources. Masker takes the unite of all stroke boundaries of it's childs. Both, clipper and masker, store this union to avoid multiple calls of the childs and the unite calculations now. The unite rect can be transformed to any targets objectBoundingBox, if the content unit of the resource is set to objectBoundingBoxMode. This speeds up the use of resources with multiple target objects. No behavior changes, the smaller repaintRects cause updates for DRT results. * rendering/RenderSVGResource.h: * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::invalidateClients): (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect): (WebCore::RenderSVGResourceClipper::resourceBoundingBox): * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::resourceBoundingBox): * rendering/RenderSVGResourceFilter.h: * rendering/RenderSVGResourceGradient.h: (WebCore::RenderSVGResourceGradient::resourceBoundingBox): * rendering/RenderSVGResourceMarker.h: (WebCore::RenderSVGResourceMarker::resourceBoundingBox): * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::invalidateClients): (WebCore::RenderSVGResourceMasker::createMaskImage): (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect): (WebCore::RenderSVGResourceMasker::resourceBoundingBox): * rendering/RenderSVGResourceMasker.h: * rendering/RenderSVGResourcePattern.h: (WebCore::RenderSVGResourcePattern::resourceBoundingBox): * rendering/RenderSVGResourceSolidColor.h: (WebCore::RenderSVGResourceSolidColor::resourceBoundingBox): 2010-05-11 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: Cosmetic changes. 1) Inner Function Call event of Timer Fire should be merged into parent even if it is not the only child. 2) Standard tooltips for resource links are clashing with Popover. 3) Recalculate Style caller info are duplicating in Details Popover (Caller and Details rows). https://bugs.webkit.org/show_bug.cgi?id=38732 * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): * inspector/front-end/inspector.js: (WebInspector.linkifyURLAsNode): 2010-05-10 Csaba Osztrogonác Rubber-stamped by Simon Hausmann. [Qt] Roll-out r59020 and r59021, because the Qt part of these changes haven't been landed in Qt trunk yet. Should be rolled-in again after the merge. https://bugs.webkit.org/show_bug.cgi?id=32967 * platform/network/qt/ResourceRequestQt.cpp: (WebCore::ResourceRequest::toNetworkRequest): 2010-05-10 Markus Goetz Reviewed by Simon Hausmann. Qt after 4.6.3 has its integrated DNS cache. Therefore some code is not necessary anymore. https://bugs.webkit.org/show_bug.cgi?id=38834 * platform/network/qt/DnsPrefetchHelper.h: (WebCore::DnsPrefetchHelper::lookup): (WebCore::DnsPrefetchHelper::lookedUp): 2010-05-10 Chris Jerdonek Reviewed by Darin Adler. Asserted that Node::setDocument() is not being used to change the document of a node. https://bugs.webkit.org/show_bug.cgi?id=38821 * dom/Node.cpp: (WebCore::Node::setDocument): Added an ASSERT at the beginning of the function. * dom/Node.h: Documented that Node::setDocument() should not be used to change the document of a node until after the node has been removed from its prior document. 2010-05-10 Dirk Schulze Reviewed by Darin Adler. SVG FilterEffects need more detailed DRT information https://bugs.webkit.org/show_bug.cgi?id=38683 All SVG Filter effects get dumped now. The structure of the DRT output changed. The last effect is shown first, followed by the previous effects. No changed behaior, so no new test added. * platform/graphics/filters/FEBlend.cpp: (WebCore::operator<<): (WebCore::FEBlend::externalRepresentation): * platform/graphics/filters/FEBlend.h: * platform/graphics/filters/FEColorMatrix.cpp: (WebCore::operator<<): (WebCore::FEColorMatrix::externalRepresentation): * platform/graphics/filters/FEColorMatrix.h: * platform/graphics/filters/FEComponentTransfer.cpp: (WebCore::operator<<): (WebCore::FEComponentTransfer::externalRepresentation): * platform/graphics/filters/FEComponentTransfer.h: * platform/graphics/filters/FEComposite.cpp: (WebCore::operator<<): (WebCore::FEComposite::externalRepresentation): * platform/graphics/filters/FEComposite.h: (WebCore::): (WebCore::FEComposite::uniteChildEffectSubregions): * platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::externalRepresentation): * platform/graphics/filters/FEGaussianBlur.h: (WebCore::FEGaussianBlur::uniteChildEffectSubregions): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::externalRepresentation): * platform/graphics/filters/FilterEffect.h: * platform/graphics/filters/SourceAlpha.cpp: (WebCore::SourceAlpha::externalRepresentation): * platform/graphics/filters/SourceAlpha.h: * platform/graphics/filters/SourceGraphic.cpp: (WebCore::SourceGraphic::externalRepresentation): * platform/graphics/filters/SourceGraphic.h: * rendering/RenderTreeAsText.cpp: (WebCore::writeIndent): * rendering/RenderTreeAsText.h: * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeSVGResourceContainer): * svg/graphics/filters/SVGFEConvolveMatrix.cpp: (WebCore::operator<<): (WebCore::FEConvolveMatrix::externalRepresentation): * svg/graphics/filters/SVGFEConvolveMatrix.h: * svg/graphics/filters/SVGFEDiffuseLighting.cpp: (WebCore::FEDiffuseLighting::externalRepresentation): * svg/graphics/filters/SVGFEDiffuseLighting.h: * svg/graphics/filters/SVGFEDisplacementMap.cpp: (WebCore::operator<<): (WebCore::FEDisplacementMap::externalRepresentation): * svg/graphics/filters/SVGFEDisplacementMap.h: * svg/graphics/filters/SVGFEFlood.cpp: (WebCore::FEFlood::externalRepresentation): * svg/graphics/filters/SVGFEFlood.h: * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::externalRepresentation): * svg/graphics/filters/SVGFEImage.h: * svg/graphics/filters/SVGFEMerge.cpp: (WebCore::FEMerge::externalRepresentation): * svg/graphics/filters/SVGFEMerge.h: * svg/graphics/filters/SVGFEMorphology.cpp: (WebCore::operator<<): (WebCore::FEMorphology::externalRepresentation): * svg/graphics/filters/SVGFEMorphology.h: * svg/graphics/filters/SVGFEOffset.cpp: (WebCore::FEOffset::externalRepresentation): * svg/graphics/filters/SVGFEOffset.h: * svg/graphics/filters/SVGFESpecularLighting.cpp: (WebCore::FESpecularLighting::externalRepresentation): * svg/graphics/filters/SVGFESpecularLighting.h: * svg/graphics/filters/SVGFETile.cpp: (WebCore::FETile::externalRepresentation): * svg/graphics/filters/SVGFETile.h: * svg/graphics/filters/SVGFETurbulence.cpp: (WebCore::operator<<): (WebCore::FETurbulence::externalRepresentation): * svg/graphics/filters/SVGFETurbulence.h: 2010-05-10 Jeremy Orlow Reviewed by Nate Chapin. Change IndexedDB to use events instead of callbacks https://bugs.webkit.org/show_bug.cgi?id=38594 Switch IndexedDB over to an event based model to match what Mozilla (and probably MS?) are doing. This also gets rid of a lot of template mess at the expense of a little extra boiler plate code (for each type that IDBResult.result could be). This change also introduces JSC bindings that match the level of functionality the V8 bindings have. Still not testable, but that shoudl change shortly. * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventCustom.cpp: * bindings/js/JSIDBRequestCustom.cpp: Added. (WebCore::JSIDBRequest::result): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::convertEventTargetToV8Object): * bindings/v8/custom/V8CustomIDBCallbacks.h: Removed. * bindings/v8/custom/V8IDBRequestCustom.cpp: Added. (WebCore::V8IDBRequest::resultAccessorGetter): * bindings/v8/custom/V8IndexedDatabaseRequestCustom.cpp: Removed. * dom/EventTarget.cpp: (WebCore::EventTarget::toIDBRequest): * dom/EventTarget.h: * storage/IDBCallbacks.h: * storage/IDBDatabaseRequest.h: (WebCore::IDBDatabaseRequest::createObjectStore): * storage/IDBRequest.cpp: Added. (WebCore::IDBRequest::IDBRequest): (WebCore::IDBRequest::~IDBRequest): (WebCore::IDBRequest::idbDatabaseResult): (WebCore::IDBRequest::serializedScriptValueResult): (WebCore::IDBRequest::onError): (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::abort): (WebCore::IDBRequest::scriptExecutionContext): (WebCore::IDBRequest::stop): (WebCore::IDBRequest::suspend): (WebCore::IDBRequest::resume): (WebCore::IDBRequest::eventTargetData): (WebCore::IDBRequest::ensureEventTargetData): (WebCore::IDBRequest::timerFired): (WebCore::IDBRequest::onEventCommon): * storage/IDBRequest.h: Added. (WebCore::IDBRequest::create): (WebCore::IDBRequest::): (WebCore::IDBRequest::resultType): (WebCore::IDBRequest::readyState): (WebCore::IDBRequest::error): (WebCore::IDBRequest::toIDBRequest): (WebCore::IDBRequest::refEventTarget): (WebCore::IDBRequest::derefEventTarget): * storage/IDBRequest.idl: Added. * storage/IndexedDatabase.h: * storage/IndexedDatabaseImpl.cpp: (WebCore::IndexedDatabaseImpl::open): * storage/IndexedDatabaseImpl.h: * storage/IndexedDatabaseRequest.cpp: (WebCore::IndexedDatabaseRequest::open): * storage/IndexedDatabaseRequest.h: * storage/IndexedDatabaseRequest.idl: 2010-05-10 Ilya Tikhonovsky Not reviewed: rollback the commit r59062 * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): * inspector/front-end/inspector.js: (WebInspector.linkifyURLAsNode): 2010-05-10 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: Cosmetic changes. 1) Inner Function Call event of Timer Fire should be merged into parent even if it is not the only child. 2) Standard tooltips for resource links are clashing with Popover. 3) Recalculate Style caller info are duplicating in Details Popover (Caller and Details rows). https://bugs.webkit.org/show_bug.cgi?id=38732 * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): * inspector/front-end/inspector.js: (WebInspector.linkifyURLAsNode): 2010-05-08 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: If some record is not in visible area then it's expand element also is not visible even if it has children in visible area. https://bugs.webkit.org/show_bug.cgi?id=38643 * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._refreshRecords): 2010-05-07 Sam Weinig Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=38557 r58526 introduced a ~30% regression on Dromaeo JS lib This fix does two things. - Don't use QualifiedName as the key to a HashMap, use a RefPtr instead. We should remove the HashTraits for QualifiedName and that will happen in a follow up patch. - Only mark cached NodeLists on Documents instead of all Nodes. This is okay since the marking of NodeLists is an optimization to keep NodeList wrappers alive and is not mandated by any spec. * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::markChildren): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::markChildren): * dom/Node.cpp: (WebCore::Node::removeCachedTagNodeList): (WebCore::Node::getElementsByTagNameNS): * dom/NodeRareData.h: 2010-05-08 Antonio Gomes Unreviewed attempt to fix Windows build. * page/SpatialNavigation.h: (WebCore::fudgeFactor): 2010-05-03 Antonio Gomes Reviewed by Kenneth Christiansen. Spatial Navigation: create a getter for the "fudgeFactor" https://bugs.webkit.org/show_bug.cgi?id=38488 A couple of places in the Spatial Navigation code make use of a "fudge factor" to improve precision by working around outline focus metrics and such. Patch adds a helper method for unify getter operations of this value, instead of having it declared locally in the various methods it is used. No behaviour change. * page/SpatialNavigation.cpp: (WebCore::scrollIntoView): (WebCore::deflateIfOverlapped): * page/SpatialNavigation.h: (WebCore::fudgeFactor): 2010-05-08 Stuart Morgan Reviewed by Darin Adler. Change the npapi.h header guards to match the npapi-headers repository copy. https://bugs.webkit.org/show_bug.cgi?id=38666 * bridge/npapi.h: 2010-05-08 Stuart Morgan Reviewed by Darin Fisher. Resolve most of the whitespace/comment/order differences in npapi.h and npruntime.h relative to the npapi-headers repository versions. No changes to the substance of the code. https://bugs.webkit.org/show_bug.cgi?id=38666 * bridge/npapi.h: (_NPPrint::): (_NPCocoaEvent::): * bridge/npruntime.h: 2010-05-08 Laszlo Gombos Reviewed by Darin Adler. Fix guard around IndexedDatabase https://bugs.webkit.org/show_bug.cgi?id=38710 No new tests, there is no new functionality. * page/PageGroup.h: 2010-05-08 Luiz Agostini Reviewed by Simon Hausmann. [Qt] Platform plugin https://bugs.webkit.org/show_bug.cgi?id=38438 Select popups delegate private API. To provide select popup delegates a plugin that implements QWebKitPlatformPlugin must be found in QCoreApplication::libraryPaths. * WebCore.pro: 2010-05-08 Leandro Pereira Reviewed by Gustavo Noronha Silva. [EFL] It does not make sense to use RenderThemeEfl::RenderThemeEfl, so use RenderThemeEfl (GCC 4.5 seems to be pickier about this). http://webkit.org/b/38770 * platform/efl/RenderThemeEfl.cpp: (WebCore::renderThemeEflColorClassSelectionActive): (WebCore::renderThemeEflColorClassSelectionInactive): (WebCore::renderThemeEflColorClassFocusRing): (WebCore::renderThemeEflColorClassButtonText): (WebCore::renderThemeEflColorClassComboText): (WebCore::renderThemeEflColorClassEntryText): (WebCore::renderThemeEflColorClassSearchText): (WebCore::RenderThemeEfl::adjustCheckboxStyle): (WebCore::RenderThemeEfl::adjustRadioStyle): (WebCore::RenderThemeEfl::adjustButtonStyle): (WebCore::RenderThemeEfl::adjustMenuListStyle): (WebCore::RenderThemeEfl::adjustTextFieldStyle): (WebCore::RenderThemeEfl::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeEfl::adjustSearchFieldStyle): 2010-05-08 Leandro Pereira Reviewed by Gustavo Noronha Silva. ResourceHandleSoup should depend only on GLib, not on GTK+. http://webkit.org/b/38763 * platform/network/soup/ResourceHandleSoup.cpp: Include glib.h instead of gtk/gtk.h. 2010-05-08 Eric Seidel Unreviewed, rolling out r59023. http://trac.webkit.org/changeset/59023 https://bugs.webkit.org/show_bug.cgi?id=37874 Caused Chromium Windows build to fail to link. * WebCore.gypi: * loader/CachedMetadata.h: Removed. * loader/CachedResource.cpp: * loader/CachedResource.h: * loader/ResourceLoader.h: * loader/SubresourceLoader.cpp: * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: * loader/loader.cpp: * loader/loader.h: * platform/network/ResourceHandle.cpp: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.h: 2010-05-08 Ilya Tikhonovsky Reviewed by Timothy Hatcher. WebInspector: Autocompletion in console is not usable because it is not add to the entered text the common prefix of suggestions. As example if you entered $0.getE then getElementByClassName will be suggested as gray text. If you press tab then getElementByClassName be suggested again and lementByClassName becomes selected as black text with selection background. Really after pressing the TAB the next suggestion should be selected (getElementByTagName) and only flexible part of suggestions should be selected. In this case it should be TagName because getElementBy is the common part for all getE prefix suggestions. https://bugs.webkit.org/show_bug.cgi?id=38753 * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype._completionsReady): 2010-05-08 Tony Gentilcore Reviewed by Darin Fisher. Provide mechanism to store cached metadata on a CachedResource. https://bugs.webkit.org/show_bug.cgi?id=37874 No new tests because no new functionality. * WebCore.gypi: * loader/CachedMetadata.h: Added. (WebCore::CachedMetadata::~CachedMetadata): (WebCore::CachedMetadata::data): (WebCore::CachedMetadata::size): (WebCore::CachedMetadata::create): (WebCore::CachedMetadata::deserialize): (WebCore::CachedMetadata::serialize): (WebCore::CachedMetadata::dataTypeID): (WebCore::CachedMetadata::readUnsigned): (WebCore::CachedMetadata::appendUnsigned): (WebCore::CachedMetadata::CachedMetadata): * loader/CachedResource.cpp: (WebCore::CachedResource::setSerializedCachedMetadata): (WebCore::CachedResource::setCachedMetadata): (WebCore::CachedResource::cachedMetadata): * loader/CachedResource.h: * loader/ResourceLoader.h: (WebCore::ResourceLoader::didReceiveCachedMetadata): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveCachedMetadata): * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: (WebCore::SubresourceLoaderClient::didReceiveCachedMetadata): * loader/loader.cpp: (WebCore::Loader::Host::didReceiveCachedMetadata): * loader/loader.h: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::cacheMetadata): * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::didReceiveCachedMetadata): 2010-05-08 Michael Nordman Reviewed by Dmitry Titov. Have WorkerScriptLoader provide access to the ResourceResponse for the loaded script through the WorkerScriptLoaderClient interface. https://bugs.webkit.org/show_bug.cgi?id=38605 No new tests. There are no script visible changes. * workers/WorkerScriptLoader.cpp: Call the client with the response. (WebCore::WorkerScriptLoader::didReceiveResponse): * workers/WorkerScriptLoaderClient.h: Define a new method to receive the response. (WebCore::WorkerScriptLoaderClient::didReceiveResponse): 2010-05-08 Robert Hogan Reviewed by Simon Hausmann. [Qt] Fix http/tests/xmlhttprequest/cross-origin-no-authorization.html and http/tests/xmlhttprequest/cross-origin-authorization.html QHttpNetworkRequest adds Authorization and Cookie headers to XHRs without knowing if this is valid behaviour or not. In order to allow Qt to decide whether Cookie/Authorization headers should be added to an XHR QtWebKit needs to use an attribute added to QNetworkRequest. These new attributes are: QNetworkRequest::CookieLoadControlAttribute, QNetworkRequest::CookieSaveControlAttribute,and QNetworkRequest::AuthenticationReuseControlAttribute. QtWebKit will set QNetworkRequest::AuthenticationReuseControlAttribute to false unless withCredentials is set to true in the XHR. QtWebkit will set CookieLoad/SaveControlAttribute to false unless withCredentials is set to true in the XHR. Qt will pass the values onto QHttpNetworkRequest and this will permit the Qt network access processing to decide whether or not to add either or both of the Cookie/Authorisation headers, and whether to save cookies returned from such requests. By default the attribute will always be true so unless QtWebKit sets it to false normal header processing is unaffected. The Qt part of these changes was merged at: http://gitorious.org/qt/qt/merge_requests/592 https://bugs.webkit.org/show_bug.cgi?id=32967 * platform/network/qt/ResourceRequestQt.cpp: (WebCore::ResourceRequest::toNetworkRequest): 2010-05-08 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInsector: Record expand UI element should be extracted from TimelineRecordGraphRow as separate class for future reuse. https://bugs.webkit.org/show_bug.cgi?id=38726 * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._refreshRecords): (WebInspector.TimelineRecordGraphRow): (WebInspector.TimelineRecordGraphRow.prototype.update): (WebInspector.TimelineExpandableElement): (WebInspector.TimelineExpandableElement.prototype._update): (WebInspector.TimelineExpandableElement.prototype._dispose): 2010-05-05 Robert Hogan Reviewed by Alexey Proskuryakov. [Qt] Fix encoding of status message in Plugin API https://bugs.webkit.org/show_bug.cgi?id=35144 Spotted by Alexey Proskuryakov. * plugins/PluginView.cpp: (WebCore::PluginView::status): 2010-05-08 Dirk Schulze Unreviewed win build fix. JS bindings were missing in DerivedSources.cpp * DerivedSources.cpp: 2010-05-08 Dirk Schulze Uneviewed fix of Win bot Added JS bindings to Win build system. * WebCore.vcproj/WebCore.vcproj: 2010-05-08 Dirk Schulze Unreviewed try to fix Win bot. SVGFont's VKern implementation missing https://bugs.webkit.org/show_bug.cgi?id=38663 * bindings/scripts/CodeGeneratorJS.pm: 2010-05-08 Dirk Schulze Reviewed by Nikolas Zimmermann. SVGFont's VKern implementation missing https://bugs.webkit.org/show_bug.cgi?id=38663 Implementation of vkern, needed by SVGFont. Also added DOM and JS bindings for vkern and hkern. Made some clean-up in SVGParserUtilities and SVGFontElement. SVGHKernElement and SVGVKernElement share most of the code now. Test: svg/text/text-vkern.svg * Android.derived.jscbindings.mk: * Android.derived.v8bindings.mk: * Android.mk: * DerivedSources.make: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/DOMWindow.idl: * rendering/SVGRootInlineBox.cpp: (WebCore::applySVGKerning): (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): * svg/SVGAllInOne.cpp: * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::invalidateGlyphCache): (WebCore::SVGFontElement::ensureGlyphCache): (WebCore::matches): (WebCore::kerningForPairOfStringsAndGlyphs): (WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs): (WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs): * svg/SVGFontElement.h: (WebCore::SVGKerningPair::SVGKerningPair): (WebCore::SVGFontElement::rendererIsNeeded): * svg/SVGHKernElement.cpp: (WebCore::SVGHKernElement::buildHorizontalKerningPair): * svg/SVGHKernElement.h: * svg/SVGParserUtilities.cpp: (WebCore::parseGlyphName): (WebCore::parseKerningUnicodeString): * svg/SVGParserUtilities.h: * svg/SVGVKernElement.cpp: Added. (WebCore::SVGVKernElement::SVGVKernElement): (WebCore::SVGVKernElement::~SVGVKernElement): (WebCore::SVGVKernElement::insertedIntoDocument): (WebCore::SVGVKernElement::removedFromDocument): (WebCore::SVGVKernElement::buildVerticalKerningPair): * svg/SVGVKernElement.h: Added. (WebCore::SVGVKernElement::rendererIsNeeded): * svg/SVGVKernElement.idl: Added. * svg/svgtags.in: 2010-05-08 Jer Noble Unreviewed, just fixing windows build. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: Add #if USE(ACCELERATED_COMPOSITING) guards around GraphicsLayer areas of the code. Include GraphicsLayer.h directly. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: As above. * platform/graphics/win/QTMovieVisualContext.cpp: Remove the #include of d3d9types.h. 2010-05-08 Eric Seidel Unreviewed, just reverting commit. REGRESSION(59000): r59000 contained all sorts of changes it should not have, needs revert. https://bugs.webkit.org/show_bug.cgi?id=38798 Test: fast/js/global-resolve-through-eval.html * bindings/js/JSCallbackData.h: (WebCore::JSCallbackData::JSCallbackData): (WebCore::JSCallbackData::~JSCallbackData): (WebCore::DeleteCallbackDataTask::create): (WebCore::DeleteCallbackDataTask::performTask): (WebCore::DeleteCallbackDataTask::isCleanupTask): (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask): * bindings/js/JSCustomVoidCallback.cpp: (WebCore::JSCustomVoidCallback::JSCustomVoidCallback): (WebCore::JSCustomVoidCallback::~JSCustomVoidCallback): * bindings/js/JSCustomVoidCallback.h: * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::): * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownFinishTask::performTask): (WebCore::WorkerThreadShutdownStartTask::performTask): 2010-05-07 Zoltan Herczeg Reviewed by Dirk Schulze Fixed the inverse function of f(x) = ((x + 0.055) / 1.055) ^ 2.4 https://bugs.webkit.org/show_bug.cgi?id=38735 It is ((x ^ (1 / 2.4)) * 1.055) - 0.055 Chromium pixel tests cover the issue. * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::transformColorSpace): 2010-05-04 Jer Noble Reviewed by Eric Carlson Safari pegs CPU and drops tons of frames using HTML5 Vimeo player The original functionality of QTMovieWin has been split between QTMovieGWorld, and a new class: QTMovie. QTMovie contains all the "controller" parts (changing the rate, seeking, etc) while QTMovieGWorld retains all the drawing code. QTMovieGWorld now takes a QTMovie, and as such QTMovie is now retainable. QTMovieGWorld registers itself as a client of QTMovie, so that it can receive load-state notifications, and thus QTMovie must now support multiple clients. Movie tasking timer support has been moved into its own class (QTMovieTask) and will be addressed in a future patch. Most of the functions listed below only changed so much as their class name changed. * platform/graphics/win/QTMovie.cpp: Copied from WebCore/platform/graphics/win/QTMovieWin.cpp. (QTMoviePrivate::QTMoviePrivate): (QTMoviePrivate::~QTMoviePrivate): (QTMoviePrivate::startTask): (QTMoviePrivate::endTask): (QTMoviePrivate::task): (QTMoviePrivate::createMovieController): (QTMovie::QTMovie): (QTMovie::~QTMovie): (QTMovie::addClient): (QTMovie::removeClient): (QTMovie::play): (QTMovie::pause): (QTMovie::rate): (QTMovie::setRate): (QTMovie::duration): (QTMovie::currentTime): (QTMovie::setCurrentTime): (QTMovie::setVolume): (QTMovie::setPreservesPitch): (QTMovie::dataSize): (QTMovie::maxTimeLoaded): (QTMovie::loadState): (QTMovie::getNaturalSize): (QTMovie::load): (QTMovie::disableUnsupportedTracks): (QTMovie::isDisabled): (QTMovie::setDisabled): (QTMovie::hasVideo): (QTMovie::hasAudio): (QTMovie::hasClosedCaptions): (QTMovie::setClosedCaptionsVisible): (QTMovie::countSupportedTypes): (QTMovie::getSupportedType): (QTMovie::initializeQuickTime): (QTMovie::getMovieHandle): * platform/graphics/win/QTMovie.h: Copied from WebCore/platform/graphics/win/QTMovieWin.h. * platform/graphics/win/QTMovieGWorld.cpp: Copied from WebCore/platform/graphics/win/QTMovieWin.cpp. (QTMovieGWorldPrivate::QTMovieGWorldPrivate): (QTMovieGWorldPrivate::~QTMovieGWorldPrivate): (QTMovieGWorldPrivate::cacheMovieScale): (movieDrawingCompleteProc): (QTMovieGWorldPrivate::registerDrawingCallback): (QTMovieGWorldPrivate::unregisterDrawingCallback): (QTMovieGWorldPrivate::drawingComplete): (QTMovieGWorldPrivate::updateGWorld): (QTMovieGWorldPrivate::createGWorld): (QTMovieGWorldPrivate::clearGWorld): (QTMovieGWorldPrivate::setSize): (QTMovieGWorldPrivate::updateMovieSize): (QTMovieGWorldPrivate::deleteGWorld): (QTMovieGWorldPrivate::movieEnded): (QTMovieGWorldPrivate::movieLoadStateChanged): (QTMovieGWorldPrivate::movieTimeChanged): (QTMovieGWorld::QTMovieGWorld): (QTMovieGWorld::~QTMovieGWorld): (QTMovieGWorld::setSize): (QTMovieGWorld::setVisible): (QTMovieGWorld::getCurrentFrameInfo): (QTMovieGWorld::paint): (QTMovieGWorld::setDisabled): (QTMovieGWorld::isDisabled): (QTMovieGWorld::fullscreenWndProc): (QTMovieGWorld::enterFullscreen): (QTMovieGWorld::exitFullscreen): (QTMovieGWorld::setMovie): (QTMovieGWorld::movie): * platform/graphics/win/QTMovieGWorld.h: Copied from WebCore/platform/graphics/win/QTMovieWin.h. * platform/graphics/win/QTMovieTask.cpp: Added. (QTMovieTask::QTMovieTask): (QTMovieTask::~QTMovieTask): (QTMovieTask::sharedTask): (QTMovieTask::updateTaskTimer): (QTMovieTask::fireTaskClients): (QTMovieTask::addTaskClient): (QTMovieTask::removeTaskClient): (QTMovieTask::setTaskTimerFuncs): * platform/graphics/win/QTMovieTask.h: Added. 2010-05-04 Jer Noble Reviewed by Eric Carlson Safari pegs CPU and drops tons of frames using HTML5 Vimeo player MediaPlayerPrivateQuickTimeVisualContext has been added as a supported MediaPlayer implementation. MediaPlayerPrivateQuickTimeWin has been left as a fallback MediaPlayer implementation for those media types which do not support visual contexts (currently, none). * platform/graphics/MediaPlayer.cpp: (WebCore::installedMediaEngines): 2010-05-04 Jer Noble Reviewed by Maciej Stachowiak Safari pegs CPU and drops tons of frames using HTML5 Vimeo player MediaPlayerPrivateTaskTimer has been broken out from MediaPlayerPrivateQuickTimeWin::TaskTimer so that multiple clients can share its implementation. It works with the new QTMovieTaskTimer to provide timer support to QTMovieTaskTimer clients. * platform/graphics/win/MediaPlayerPrivateTaskTimer.cpp: Added. (WebCore::MediaPlayerPrivateTaskTimer::initialize): (WebCore::MediaPlayerPrivateTaskTimer::setDelay): (WebCore::MediaPlayerPrivateTaskTimer::stopTaskTimer): (WebCore::MediaPlayerPrivateTaskTimer::fired): * platform/graphics/win/MediaPlayerPrivateTaskTimer.h: Added. 2010-05-04 Jer Noble Reviewed by Eric Carlson Safari pegs CPU and drops tons of frames using HTML5 Vimeo player MediaPlayerPrivateQuickTimeVisualContext is a new MediaPlayerPrivate implementation which uses QTMovieVisualContext instead of QTMovieWin to render video frames. Much like MediaPlayerPrivateQuickTimeWin, MPPQTVisualContext breaks out QTMovie and QTMovieVisualContext, and uses the newly shared MediaPlayerPrivateTaskTimer. It also uses aggregation (in the form of friend classes) instead of multiple inheritence to implement its various client callbacks, so as not to expose its own clients to the QTMovie classes. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Copied from WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp. * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h: Copied from WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h. 2010-05-04 Jer Noble Reviewed by Maciej Stachowiak Safari pegs CPU and drops tons of frames using HTML5 Vimeo player MediaPlayerPrivateQuickTimeWin has been modified to support the new bifurcated QTMovie/QTMovieWin classes. It's private TaskTimer class has been broken out into a new top-level class (MediaPlayerPrivateTaskTimer) which will be addressed in a future patch. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::load): (WebCore::MediaPlayerPrivate::paused): (WebCore::MediaPlayerPrivate::setSize): (WebCore::MediaPlayerPrivate::setVisible): (WebCore::MediaPlayerPrivate::paint): (WebCore::mimeTypeCache): (WebCore::MediaPlayerPrivate::isAvailable): (WebCore::MediaPlayerPrivate::movieEnded): (WebCore::MediaPlayerPrivate::movieLoadStateChanged): (WebCore::MediaPlayerPrivate::movieTimeChanged): (WebCore::MediaPlayerPrivate::movieNewImageAvailable): (WebCore::MediaPlayerPrivate::paintContents): * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: 2010-05-04 Jer Noble Reviewed by Anders Carlsson Safari pegs CPU and drops tons of frames using HTML5 Vimeo player QTCFDictionary defines functions which help serialize and unserialize CFDictionaries. This is necessary because QuickTime links against a non-debug CoreFoundation in our debug build, and passing non-debug CFDictionaries to a debug CF will cause a crash. QTMovieTask is a new class containing the tasking functionality broken out from QTMovieWin. This is necessary now that the tasking functionality is needed in multiple files/classes. QTPixelBuffer is a C++ wrapper for CVPixelBuffers, necessary because like the CF case above, QuickTime has its own implementation of CoreVideo and its CV types cannot be used with the AAS version of CoreVideo. QTMovieVisualContext is the new drawing implementation, parallel to QTMovieWin. It currently uses a software rendering path, but can be extended in the future to support hardware rendering. * platform/graphics/win/QTCFDictionary.cpp: Added. * platform/graphics/win/QTCFDictionary.h: Added. * platform/graphics/win/QTMovieTask.cpp: Added. * platform/graphics/win/QTMovieTask.h: Added. * platform/graphics/win/QTMovieVisualContext.cpp: Added. * platform/graphics/win/QTMovieVisualContext.h: Added. * platform/graphics/win/QTPixelBuffer.cpp: Added. * platform/graphics/win/QTPixelBuffer.h: Added. 2010-05-07 Eric Uhrhane Reviewed by Dmitry Titov. JSCallbackData is deleted on the Main thread, not the Context thread. https://bugs.webkit.org/show_bug.cgi?id=38623 No new tests; you'll only see a problem after the worker-access-to-DB code goes in. Without this fix, the GTK bots assert, but it's timing-sensitive and not truly platform-specific. * bindings/js/JSCallbackData.h: (WebCore::JSCallbackData::JSCallbackData): (WebCore::JSCallbackData::~JSCallbackData): Store the allocating thread, then assert that we're on it at deletion. (WebCore::DeleteCallbackDataTask): This is the task that can get posted to the context thread for cleanup. * bindings/js/JSCustomVoidCallback.cpp: * bindings/js/JSCustomVoidCallback.h: This callback isn't autogenerated, so we have to do the cleanup manually. * bindings/scripts/CodeGeneratorJS.pm: Add the proper cleanup to all autogenerated callbacks. * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownFinishTask::performTask): (WebCore::WorkerThreadShutdownStartTask::performTask): WorkerContext::clearScript can't be called until the posted deletion tasks have completed; move the call from shutdown start to shutdown finish. 2010-05-07 Eric Seidel Reviewed by Adam Barth. Fix JSC binding generation to match webkit style https://bugs.webkit.org/show_bug.cgi?id=38173 Add spaces around "|" to match webkit style. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestObj.cpp: 2010-05-07 Dumitru Daniliuc Reviewed by Brady Eidson. Adding the IDL files for the sync DB API and the stubs for the JS and V8 bindings. https://bugs.webkit.org/show_bug.cgi?id=34994 * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSDatabaseSyncCustom.cpp: Added. (WebCore::JSDatabaseSync::changeVersion): (WebCore::createTransaction): (WebCore::JSDatabaseSync::transaction): (WebCore::JSDatabaseSync::readTransaction): * bindings/js/JSSQLTransactionSyncCustom.cpp: Added. (WebCore::JSSQLTransactionSync::executeSql): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::openDatabaseSync): * bindings/v8/custom/V8BindingMacros.h: Added. * bindings/v8/custom/V8DatabaseSyncCustom.cpp: Added. (WebCore::V8DatabaseSync::changeVersionCallback): (WebCore::createTransaction): (WebCore::V8DatabaseSync::transactionCallback): (WebCore::V8DatabaseSync::readTransactionCallback): * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: Added. (WebCore::V8SQLTransactionSync::executeSqlCallback): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::V8WorkerContext::openDatabaseSyncCallback): * storage/Database.idl: * storage/DatabaseCallback.h: * storage/DatabaseCallback.idl: * storage/DatabaseSync.cpp: (WebCore::DatabaseSync::changeVersion): (WebCore::DatabaseSync::transaction): * storage/DatabaseSync.h: * storage/DatabaseSync.idl: Added. * storage/SQLError.idl: * storage/SQLResultSet.idl: * storage/SQLResultSetRowList.idl: * storage/SQLTransaction.idl: * storage/SQLTransactionSync.idl: Added. * storage/SQLTransactionSyncCallback.h: * storage/SQLTransactionSyncCallback.idl: Added. * workers/WorkerContext.cpp: (WebCore::WorkerContext::openDatabaseSync): * workers/WorkerContext.h: * workers/WorkerContext.idl: 2010-05-07 Beth Dakin Reviewed by Simon Fraser. Fix for REGRESSION: Can't focus and type in GMail due to bad repainting -and corresponding- https://bugs.webkit.org/show_bug.cgi?id=38782 This patch reverts back to pre-r58797 behavior when shouldPropagateCompositingToIFrameParent() is false. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintingGoesToWindow): 2010-05-07 Sheriff Bot Unreviewed, rolling out r58963. http://trac.webkit.org/changeset/58963 https://bugs.webkit.org/show_bug.cgi?id=38773 Broke Chromium layout tests. (Requested by dcheng on #webkit). * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::asURL): 2010-05-07 Martin Robinson Reviewed by Gustavo Noronha Silva. https://bugs.webkit.org/show_bug.cgi?id=38769 ClipboardGtk should write the URL label in the text portion of the DataObject No tests as this code path is currently unused in the GTK+ port. * platform/gtk/ClipboardGtk.cpp: (WebCore::ClipboardGtk::writeURL): Write the label to the text portion of the DataObject, instead of the URL. 2010-05-07 Nikolas Zimmermann Reviewed by Dirk Schulze. RenderSVGResourceClipper assigns a temporary mutated RenderStyle but does not correctly preserve the old style https://bugs.webkit.org/show_bug.cgi?id=38767 Fix small logic error leading to a problem in RenderSVGResourceClipper. It assigns a new temporary RenderStyle to the target object, but fails to reset it correctly to the old style. Fixes all svg/clip-path errors on the windows bots. * rendering/RenderSVGResourceClipper.cpp: (WebCore::RenderSVGResourceClipper::createClipData): 2010-05-07 Daniel Cheng Reviewed by Jian Li. [chromium] DragDataChromium::asURL() shouldn't do file validity checks https://bugs.webkit.org/show_bug.cgi?id=38711 The renderer is sandboxed in Chromium, so these calls will give us no meaningful information. The loader will do the right thing if we pass it a file URL that points to an invalid file. No new tests. * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::asURL): 2010-05-07 Simon Fraser Reviewed by Dan Bernstein. Fix debug-only render tree output to show object addresses in hex. * rendering/RenderTreeAsText.cpp: (WebCore::writeRenderObject): (WebCore::write): 2010-05-07 Alexey Proskuryakov Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=38546 Node.focus() fails to move focus from subframe properly Test: fast/frames/take-focus-from-iframe.html * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setFocus): Don't clear focus if this frame doesn't have it. This can happen if page's and HTMLFrameElement's ideas of focused frame get out of sync temporarily. 2010-05-07 Nikolas Zimmermann Reviewed by Dirk Schulze. svg/custom/use-instanceRoot-as-event-target.xhtml crashes randomly https://bugs.webkit.org/show_bug.cgi?id=37798 When creating JSEventListeners through attributes (onclick, etc..) or add/removeEventListener calls on a SVGElementInstance, do NOT pass the element instance itself as JS wrapper object but the correspondingElement(). SVGElementInstance redirects all event listener registrations to the correspondingElement(), as they share an event listener list, per SVG spec. The old code was very dangerous, leading to random assertions, when garbage collection teared down the JSSVGElementInstance and event listeners fired, whose listeners were registered with it, but residing in the correspondingElement() event listener list. Removes the need for CustomToJS code for JSSVGElementInstance, which was wrong anyways. We hoped to keep the event listeers alive by just creating a js wrapper of the correspondingElement(), that could only work as long as garbage collection didn't tear it down, just luck. Also remove the CustomPushEventHandlerScope marker, as it is only used for JSLazyEventListeners and only works for JSNode derived objects, it was a no-op for SVGElementInstance, thus removed it. Should fix all random crashes/assertions seen with svg/custom/use-instanceRoot-as-event-target.xhtml See bug report for a detailed crash analysis. * bindings/js/JSSVGElementInstanceCustom.cpp: Remove custom toJS()/pushEventHandlerScope() handling, not necessary anymore. (WebCore::JSSVGElementInstance::markChildren): * bindings/scripts/CodeGeneratorJS.pm: For JSSVGElementInstance pass the correspondingElement() as JS wrapper object, not itself. * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Be sure to trigger a style update here, so dirty shadow trees for get rebuild. Otherwhise DOM may be out-of-sync. (WebCore::SVGElementInstance::eventTargetData): Add ASSERT_NOT_REACHED(), all event listener calls are forwarded to the correspondingElement(). (WebCore::SVGElementInstance::ensureEventTargetData): Ditto. * svg/SVGElementInstance.idl: Remove CustomToJS, CustomPushEventHandlerScope markers. 2010-05-06 Kenneth Russell Reviewed by Dimitri Glazkov. WebCore::WebGLUnsignedIntArrayInternal::getCallback ReadAV@Arbitrary (deef89ee3d0345edebeaf13cf974c47c) https://bugs.webkit.org/show_bug.cgi?id=38039 Web IDL now allows indexed getters and setters to be unnamed. Per discussion in WebGL working group and recent update to spec, removed the buggy get() and single-element set() methods from the JavaScript bindings to the WebGL array types. Refactored set() implementation in JSC bindings to share more code and modified V8 binding to look more like it. Added unit tests for indexed getter with out-of-range indices and verifying removal of get and single-element set methods. Updated existing WebGL array tests. Tests: fast/canvas/webgl/array-get-and-set-method-removal.html fast/canvas/webgl/array-get-out-of-bounds.html * bindings/js/JSWebGLArrayHelper.h: (WebCore::setWebGLArrayHelper): * bindings/js/JSWebGLByteArrayCustom.cpp: (WebCore::JSWebGLByteArray::set): * bindings/js/JSWebGLFloatArrayCustom.cpp: (WebCore::JSWebGLFloatArray::set): * bindings/js/JSWebGLIntArrayCustom.cpp: (WebCore::JSWebGLIntArray::set): * bindings/js/JSWebGLShortArrayCustom.cpp: (WebCore::JSWebGLShortArray::set): * bindings/js/JSWebGLUnsignedByteArrayCustom.cpp: (WebCore::JSWebGLUnsignedByteArray::set): * bindings/js/JSWebGLUnsignedIntArrayCustom.cpp: (WebCore::JSWebGLUnsignedIntArray::set): * bindings/js/JSWebGLUnsignedShortArrayCustom.cpp: (WebCore::JSWebGLUnsignedShortArray::set): * bindings/v8/custom/V8WebGLArrayCustom.h: (WebCore::setWebGLArrayHelper): * bindings/v8/custom/V8WebGLByteArrayCustom.cpp: (WebCore::V8WebGLByteArray::setCallback): * bindings/v8/custom/V8WebGLFloatArrayCustom.cpp: (WebCore::V8WebGLFloatArray::setCallback): * bindings/v8/custom/V8WebGLIntArrayCustom.cpp: (WebCore::V8WebGLIntArray::setCallback): * bindings/v8/custom/V8WebGLShortArrayCustom.cpp: (WebCore::V8WebGLShortArray::setCallback): * bindings/v8/custom/V8WebGLUnsignedByteArrayCustom.cpp: (WebCore::V8WebGLUnsignedByteArray::setCallback): * bindings/v8/custom/V8WebGLUnsignedIntArrayCustom.cpp: (WebCore::V8WebGLUnsignedIntArray::setCallback): * bindings/v8/custom/V8WebGLUnsignedShortArrayCustom.cpp: (WebCore::V8WebGLUnsignedShortArray::setCallback): * html/canvas/WebGLByteArray.h: * html/canvas/WebGLByteArray.idl: * html/canvas/WebGLFloatArray.h: * html/canvas/WebGLFloatArray.idl: * html/canvas/WebGLIntArray.h: * html/canvas/WebGLIntArray.idl: * html/canvas/WebGLShortArray.h: * html/canvas/WebGLShortArray.idl: * html/canvas/WebGLUnsignedByteArray.h: * html/canvas/WebGLUnsignedByteArray.idl: * html/canvas/WebGLUnsignedIntArray.h: * html/canvas/WebGLUnsignedIntArray.idl: * html/canvas/WebGLUnsignedShortArray.h: * html/canvas/WebGLUnsignedShortArray.idl: 2010-05-07 Pavel Feldman Not reviewed: chromium dev tools tests fix. Add a more strict check prior to accessing constructor property in Web Inspector frontend. * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): 2010-05-07 Pavel Feldman Reviewed by Joseph Pecoraro. Web Inspector: On Linux/Windows panel history is traversed while iterating over words in text prompt. https://bugs.webkit.org/show_bug.cgi?id=38740 * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt): * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): 2010-05-07 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: come up with InjectedScript._className that works for both JSC and V8. https://bugs.webkit.org/show_bug.cgi?id=38755 * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): 2010-05-07 Joseph Pecoraro Reviewed by Adam Barth. document.write is not synchronous after page load https://bugs.webkit.org/show_bug.cgi?id=38146 If there are no pending scripts, a document.write call should be synchronous. This matches other browsers and the HTML5 spec. Forcing the tokenizer to be synchronous in Document::write does not affect external scripts written by the write call. This should only change behavior of document.write after the page is done loading. Difficult to test reliably due to HTMLTokenizing relying on processing time. I made a manual test because the test requires processing very large strings synchronously and therefore can take some time. Test: WebCore/manual-tests/dom/document-write-synchronous-after-page-load.html * dom/Document.cpp: (WebCore::SynchronousHTMLTokenizerGuard::SynchronousHTMLTokenizerGuard): if the provided tokenizer is an HTMLTokenizer make it synchronous (WebCore::SynchronousHTMLTokenizerGuard::~SynchronousHTMLTokenizerGuard): if the provided tokenizer was an HTMLTokenizer return its synchronous state (WebCore::Document::write): temporarily set the tokenizer to synchronous during document.write * dom/Tokenizer.h: (WebCore::Tokenizer::asHTMLTokenizer): default implementation returns 0, to be overridden by HTMLTokenizer * html/HTMLTokenizer.h: allow access to to the force synchronous state (WebCore::HTMLTokenizer::forceSynchronous): accessor (WebCore::HTMLTokenizer::asHTMLTokenizer): override the default to return itself * manual-tests/dom/document-write-synchronous-after-page-load.html: Added. 2010-05-07 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Fix rendering of -webkit-user-select: none -webkit-user-select: none is implemented by filling the area with an invalid default-constructed Color. In most ports passing an invalid color down to the graphics backend seems to produce transparent fills. In Qt the behavior of painting with an invalid QColor is undefined, and in practice it results in painting black opaque areas. One way to fix this would be to use Qt::transparent when converting an undefined Color to a QColor, but Qt does not have short circuits for fully transparent painting, and we actually end up in slow code paths due to the transparency. So, we're better of doing the short circuit in WebKit. https://bugs.webkit.org/show_bug.cgi?id=38523 * platform/graphics/qt/GraphicsContextQt.cpp: 2010-05-07 Ben Murdoch Reviewed by Darin Adler. Potential crash in EventHandler::handleTouchEvent https://bugs.webkit.org/show_bug.cgi?id=38646 Fix a ref counting bug that can cause a crash if the m_originatingouchPointTargets hashmap holds the last ref to an EventTarget when the user lifts their finger. This is very hard to reproduce in a consistent way and clearly a simple logic error in the code, therefore no new tests. * page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent): Don't let the RefPtr we get back from the hasmap go out of scope so soon as it could delete the wrapped ptr if the hashmap held the last ref (and we use the raw ptr that the RefPtr wraps later in the WebCore::Touch constructor). 2010-05-07 Gustavo Noronha Silva Rubber-stamped by Kenneth Rohde Christiansen. [GTK] Fails to build on GTK+ < 2.14 https://bugs.webkit.org/show_bug.cgi?id=38746 Build fix only. Do basically the same as gtk_adjustment_configure would do if we are bellow GTK+ 2.14. * platform/gtk/ScrollViewGtk.cpp: (WebCore::AdjustmentConfigure): 2010-05-07 Gustavo Noronha Silva Rubber-stamped by Xan Lopez. Crash with MgOpenModerna font, with non-UTF-8 character https://bugs.webkit.org/show_bug.cgi?id=37795 NULL-check the font platform data, for now, to avoid the crash. Could not yet figure out a way to get a test written that does not involve adding the font to the tree, but there are doubts about licensing. * platform/graphics/cairo/FontCacheCairo.cpp: (WebCore::FontCache::getFontDataForCharacters): 2010-05-07 MORITA Hajime Reviewed by Eric Seidel. [Chromium] RenderThemeChromiumMac.mm should share the code with RenderThemeMac.mm https://bugs.webkit.org/show_bug.cgi?id=37204 Made RenderThemeChromiumMac subclass of RenderThemeMac, instead of RenderTheme. Added some method to RenderThemeMac for overriding on RenderThemeChromiumMac. No new tests; Should have no behavioural change. * WebCore.gyp/WebCore.gyp: * rendering/RenderThemeChromiumMac.h: * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor): (WebCore::RenderThemeChromiumMac::documentViewFor): (WebCore::RenderThemeChromiumMac::adjustMediaSliderThumbSize): (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaVolumeSliderThumb): * rendering/RenderThemeMac.h: (WebCore::RenderThemeMac::updateActiveState): Added for overriding * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::usesTestModeFocusRingColor): Added for overriding (WebCore::RenderThemeMac::documentViewFor): Added for overriding (WebCore::RenderThemeMac::paintMenuList): (WebCore::RenderThemeMac::setPopupButtonCellState): (WebCore::RenderThemeMac::paintSliderThumb): (WebCore::RenderThemeMac::paintSearchField): (WebCore::RenderThemeMac::setSearchCellState): (WebCore::RenderThemeMac::paintSearchFieldCancelButton): (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): (WebCore::RenderThemeMac::paintSearchFieldResultsButton): (WebCore::RenderThemeMac::adjustSliderThumbSize): (WebCore::RenderThemeMac::adjustMediaSliderThumbSize): Added for overriding (WebCore::RenderThemeMac::extraMediaControlsStyleSheet): 2010-05-06 Fumitoshi Ukai Reviewed by Alexey Proskuryakov. JavaScriptCore/wtf/RandomNumber.h should provide using WTF::* https://bugs.webkit.org/show_bug.cgi?id=38719 * platform/graphics/wince/FontCustomPlatformData.cpp: (WebCore::createUniqueFontName): Remove WTF:: prefix from randomNumber() * platform/network/FormDataBuilder.cpp: (WebCore::FormDataBuilder::generateUniqueBoundaryString): Ditto. 2010-04-27 Tony Chang Reviewed by Eric Seidel. [chromium] clicking a scrollbar in an iframe shouldn't lose the selection https://bugs.webkit.org/show_bug.cgi?id=38189 Test: fast/events/mousedown-in-subframe-scrollbar.html * page/chromium/EventHandlerChromium.cpp: (WebCore::EventHandler::passMousePressEventToSubframe): If clicking on a scrollbar, pass the event directly to the scrollbar. This matches mac which passes the event to the NSScroller. 2010-05-06 Simon Fraser Reviewed by Dan Bernstein. Compositing layers that are clipped out by an overflow:scroll parent fail to get created on reveal https://bugs.webkit.org/show_bug.cgi?id=38712 When compositing layer creation is testing layer overlap, we need to re-run the algorithm when an overflow:scroll element scrolls, to create new layers for revealed elements. Test: compositing/layer-creation/overflow-scroll-overlap.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): First, move the compositing updates until after the call to updateWidgetPositions(), so that this order is similar to what we done when a FrameView scrolls. This change has no known side effects. Second, if compositingConsultsOverlap() is true, we need to actually do a compositing layer update to compute whether revealed/hidden layers should be created/destroyed. 2010-05-06 Maciej Stachowiak Not reviewed, build fix. Try again - with quotes this time. *facepalm* * dom/Notation.cpp: 2010-05-06 Maciej Stachowiak Not reviewed, build fix. Speculative fix for Qt and Gtk. * dom/Notation.cpp: 2010-05-06 Maciej Stachowiak Not reviewed, build fix. Fix an assert that I failed to update in my earlier change. * dom/CharacterData.h: (WebCore::CharacterData::CharacterData): 2010-05-06 Alexey Proskuryakov Reviewed by Geoff Garen. https://bugs.webkit.org/show_bug.cgi?id=38697 REGRESSION (r58299): Replying on reddit.com no longer works * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Don't recognize :first, :left and :right. The aren't allowed in all contexts, and properly implementing them is out of scope for this regression fix. 2010-05-06 Jian Li Reviewed by Adam Barth. Improve code generator scripts to support converting ScriptString. https://bugs.webkit.org/show_bug.cgi?id=38699 Change both JSC and V8 generators to introduce "ConvertScriptString" attribute to allow converting from ScriptString. Also updated the bindings test result. These changes are necessary in order to avoid adding custom binding codes when we add the FileReader interface. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_get_script_string_attr): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::): (WebCore::jsTestObjScriptStringAttr): * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj scriptStringAttr]): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::scriptStringAttrAttrGetter): (WebCore::): 2010-05-06 Jian Li Reviewed by Adam Barth. Improve code generator scripts to pass additional ScriptExecutionContext argument to the constructor. https://bugs.webkit.org/show_bug.cgi?id=38687 Change both JSC and V8 generators to introduce "CallWith=ScriptExecutionContext" attribute to allow passing the additional ScriptExecutionContext argument to the constructor. Also add another test IDL file to test interface-level features. These changes are necessary in order to avoid adding custom binding codes when we add the FileReader interface. * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Added. * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: Added. * bindings/scripts/test/JS/JSTestInterface.cpp: Added. * bindings/scripts/test/JS/JSTestInterface.h: Added. * bindings/scripts/test/ObjC/DOMTestInterface.h: Added. * bindings/scripts/test/ObjC/DOMTestInterface.mm: Added. * bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h: Added. * bindings/scripts/test/TestInterface.idl: Added. * bindings/scripts/test/V8/V8TestInterface.cpp: Added. * bindings/scripts/test/V8/V8TestInterface.h: Added. * bindings/v8/V8Proxy.h: (WebCore::V8Proxy::constructDOMObjectWithScriptExecutionContext): 2010-05-06 Maciej Stachowiak Build fix, not reviewed. Speculative Windows and Debug build fixes for the last change. * dom/Node.h: (WebCore::Node::inDocument): (WebCore::Node::setFlag): 2010-05-06 James Robinson Reviewed by Eric Seidel. Fix warnings emitted by gcc 4.4.1 on linux in chromium-specific platform graphics files. https://bugs.webkit.org/show_bug.cgi?id=38158 Fixes: - replace NULL with 0 - remove unusued locals - add parens around ambiguous looking compound predicates like (a || b && c) This also adds a check for x >= 0 to FontLinux.cpp's in this statement: if (x < walker.width()) This is more documentation than anything else since walker.width() returns an unsigned the current behavior is that x is promoted to unsigned and as long as x + walker.width() is less than 2^31 all negative values of x end up wrapping around and not being < walker.width(). This behavior is tested by fast/text/international/khmer-selection.html * platform/graphics/chromium/FontLinux.cpp: (WebCore::adjustTextRenderMode): (WebCore::TextRunWalker::TextRunWalker): (WebCore::TextRunWalker::length): (WebCore::TextRunWalker::width): (WebCore::TextRunWalker::getTextRun): (WebCore::TextRunWalker::getNormalizedTextRun): (WebCore::Font::offsetForPositionForComplexText): * platform/graphics/chromium/FontPlatformDataLinux.cpp: (WebCore::FontPlatformData::setupPaint): * platform/graphics/chromium/HarfbuzzSkia.cpp: (WebCore::getOutlinePoint): * platform/graphics/skia/GraphicsContext3DSkia.cpp: (WebCore::GraphicsContext3D::getImageData): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::isCoordinateSkiaSafe): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::strokeRect): 2010-05-06 Ada Chan Reviewed by David Kilzer. https://bugs.webkit.org/show_bug.cgi?id=38695 Check the result from widget() for NULL before accessing it. * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::calcHeight): (WebCore::RenderIFrame::calcWidth): 2010-05-06 Maciej Stachowiak Reviewed by Darin Adler. further fixes towards REGRESSION (r57292): 1% PLT regression from visited link information leak fix https://bugs.webkit.org/show_bug.cgi?id=38682 Looks like a 1-2% speedup on PLT. - Reorder CSS properties. - Remove short circuit tag check in matchRulesForList which costs more than it saves. - Inline initForStyleResolve. - Optimize applyDeclarations to avoid switch and take fewer branches in the inner loop. - Change the way Node handles flags - replace bitfield with a uint32_t and explicit masking, to make it cheaper to initialize the bits and give faster access. - Added new Node flags to check for isStyledElement, isHTMLElement, isSVGElement, isComment, and devirtualize those methods. - Inline constructors for Node, Element, Text, CharacterData, StyledElement, etc since they are very simple and lots of nodes get constructed. * css/CSSPropertyNames.in: Move a few of the properties up front so we can check for them with < instead of switch statements * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchRulesForList): Remove unnecessary preflight check for tag match before checking selector. This check very rarely short circuits anything, since most rules with a tag end up in the appropriate tag bucket. So doing the check cost more time than the time saved. (WebCore::CSSStyleSelector::initForStyleResolve): Inline. Create RenderStyle in a better way. (WebCore::CSSStyleSelector::applyDeclarations): Get rid of switch statement and use <= to check for the high priority properties. Convert to template to avoid checking "applyFirst" each time through the loop. (WebCore::CSSStyleSelector::styleForElement): Adjust for new applyDeclarations() signature. (WebCore::CSSStyleSelector::keyframeStylesForAnimation): ditto (WebCore::CSSStyleSelector::pseudoStyleForElement): ditto * css/CSSStyleSelector.h: Adjust for new applyDeclarations() signature. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): Inline constructor. * rendering/style/RenderStyle.h: Make constructor private so it can be inline. * dom/Node.h: (WebCore::): See high-level description of changes above. Redid the way boolean flags work. (WebCore::Node::isElementNode): (WebCore::Node::isContainerNode): (WebCore::Node::isTextNode): (WebCore::Node::isHTMLElement): (WebCore::Node::isSVGElement): (WebCore::Node::isStyledElement): (WebCore::Node::isCommentNode): (WebCore::Node::hasID): (WebCore::Node::hasClass): (WebCore::Node::active): (WebCore::Node::inActiveChain): (WebCore::Node::inDetach): (WebCore::Node::hovered): (WebCore::Node::attached): (WebCore::Node::setAttached): (WebCore::Node::needsStyleRecalc): (WebCore::Node::styleChangeType): (WebCore::Node::childNeedsStyleRecalc): (WebCore::Node::isLink): (WebCore::Node::setHasID): (WebCore::Node::setHasClass): (WebCore::Node::setChildNeedsStyleRecalc): (WebCore::Node::clearChildNeedsStyleRecalc): (WebCore::Node::setInDocument): (WebCore::Node::clearInDocument): (WebCore::Node::setInActiveChain): (WebCore::Node::clearInActiveChain): (WebCore::Node::setIsLink): (WebCore::Node::clearIsLink): (WebCore::Node::setActive): (WebCore::Node::setHovered): (WebCore::Node::inDocument): (WebCore::Node::): (WebCore::Node::getFlag): (WebCore::Node::setFlag): (WebCore::Node::clearFlag): (WebCore::Node::hasRareData): (WebCore::Node::isParsingChildrenFinished): (WebCore::Node::setIsParsingChildrenFinished): (WebCore::Node::clearIsParsingChildrenFinished): (WebCore::Node::isStyleAttributeValid): (WebCore::Node::setIsStyleAttributeValid): (WebCore::Node::clearIsStyleAttributeValid): (WebCore::Node::isSynchronizingStyleAttribute): (WebCore::Node::setIsSynchronizingStyleAttribute): (WebCore::Node::clearIsSynchronizingStyleAttribute): (WebCore::Node::areSVGAttributesValid): (WebCore::Node::setAreSVGAttributesValid): (WebCore::Node::clearAreSVGAttributesValid): (WebCore::Node::isSynchronizingSVGAttributes): (WebCore::Node::setIsSynchronizingSVGAttributes): (WebCore::Node::clearIsSynchronizingSVGAttributes): (WebCore::Node::hasRareSVGData): (WebCore::Node::setHasRareSVGData): (WebCore::Node::clearHasRareSVGData): (WebCore::Node::initialRefCount): * dom/Node.cpp: (WebCore::Node::trackForDebugging): Adjusted for changes in flag handling. (WebCore::Node::ensureRareData): ditto (WebCore::Node::setStyleChange): ditto (WebCore::Node::setNeedsStyleRecalc): ditto (WebCore::Node::lazyAttach): ditto (WebCore::Node::attach): ditto (WebCore::Node::detach): ditto (WebCore::Node::insertedIntoDocument): ditto (WebCore::Node::removedFromDocument): ditto * dom/CharacterData.cpp: * dom/CharacterData.h: (WebCore::CharacterData::CharacterData): Inline the constructor (moved from .cpp) * dom/Comment.cpp: (WebCore::Comment::Comment): Tell the base class that we're a comment. * dom/Comment.h: Remove isCommentNode override. * dom/ContainerNode.cpp: (WebCore::ContainerNode::detach): Adjusted for changes in flag handling. (WebCore::ContainerNode::removedFromDocument): ditto * dom/Document.cpp: (WebCore::Document::Document): Adjusted for changes in flag handling. (WebCore::Document::recalcStyle): ditto (WebCore::Document::setFocusedNode): ditto * dom/Document.h: (WebCore::Node::Node): Inline the Node constructor - goes here because it uses Document. * dom/DocumentFragment.cpp: include Document.h due to above change * dom/EditingText.cpp: ditto * dom/EntityReference.cpp: ditto * dom/Element.cpp: (WebCore::Element::getAttribute): Adjusted for changes in flag handling. (WebCore::Element::setAttribute): ditto (WebCore::Element::hasAttributes): ditto (WebCore::Element::recalcStyle): ditto (WebCore::Element::finishParsingChildren): ditto * dom/Element.h: (WebCore::Element::Element): Inline (moved from .cpp) (WebCore::Element::isFinishedParsingChildren): (WebCore::Element::beginParsingChildren): (WebCore::Element::attributes): Adjusted for changes in flag handling. * dom/StyledElement.cpp: (WebCore::StyledElement::updateStyleAttribute): Adjust for changes to flag handling. (WebCore::StyledElement::mapToEntry): ditto (WebCore::StyledElement::parseMappedAttribute): ditto (WebCore::StyledElement::copyNonAttributeProperties): ditto * dom/StyledElement.h: (WebCore::StyledElement::StyledElement): Inline (moved from.cpp) (WebCore::StyledElement::invalidateStyleAttribute): Adjust for changes in flag handling. * dom/Text.h: (WebCore::Text::Text): Inline (moved from .cpp) * dom/Text.cpp: * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::HTMLAnchorElement): Adjust for changes in flag handling. (WebCore::HTMLAnchorElement::parseMappedAttribute): ditto * html/HTMLElement.cpp: (WebCore::HTMLElement::create): Tell base class we're an HTML element. * html/HTMLElement.h: ditto above; remove isHTMLElement override. * html/HTMLFormControlElement.h: Tell base class we're an HTML element. * html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): ditto * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::HTMLProgressElement): ditto * mathml/MathMLElement.cpp: (WebCore::MathMLElement::MathMLElement): Tell base class we're a styled element. * rendering/MediaControlElements.cpp: (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): Adjust for changes in flag handling. (WebCore::MediaControlElement::MediaControlElement): ditto (WebCore::MediaControlInputElement::MediaControlInputElement): ditto * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::updateFromElement): ditto * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateHoverActiveState): ditto * rendering/RenderProgress.cpp: (WebCore::RenderProgress::updateValuePartState): ditto * rendering/RenderSlider.cpp: (WebCore::RenderSlider::updateFromElement): ditto * rendering/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeRootElement::SVGShadowTreeRootElement): ditto * rendering/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::attachInnerElement): ditto * svg/SVGAnimatedProperty.h: (WebCore::SVGAnimatedPropertyTearOff::setBaseVal): ditto (WebCore::SVGAnimatedPropertyTearOff::setAnimVal): ditto * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): Tell base class we're an svg element. (WebCore::SVGElement::ensureRareSVGData): Adjust for flag handling changes. (WebCore::SVGElement::updateAnimatedSVGAttribute): ditto * svg/SVGElement.h: (WebCore::SVGElement::invalidateSVGAttributes): ditto * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::svgAttributeChanged): ditto * wml/WMLAnchorElement.cpp: (WebCore::WMLAnchorElement::WMLAnchorElement): ditto * wml/WMLElement.cpp: (WebCore::WMLElement::WMLElement): Tell base class we're a styled element. 2010-05-06 Adam Barth Unreviewed. Fix indent. Sorry, my OCD was acting up. * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): 2010-05-06 Pavel Feldman Reviewed by Joseph Pecoraro. Web Inspector: store selected Headers / Content tab on explicit switch and/or explicit navigate only. https://bugs.webkit.org/show_bug.cgi?id=38660 * inspector/front-end/ResourceView.js: (WebInspector.ResourceView): (WebInspector.ResourceView.prototype._selectHeadersTab): (WebInspector.ResourceView.prototype.selectContentTab): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showResource): 2010-05-06 Luiz Agostini Rubber-stamped by Simon Hausmann. [Qt] use QT_MOBILE_THEME in Symbian https://bugs.webkit.org/show_bug.cgi?id=38440 Putting QT_MOBILE_THEME into use for Symbian. * WebCore.pro: 2010-05-06 Laszlo Gombos Unreviewed, build fix WinCE for QtWebKit. [Qt] Compilation with Plugins disabled is broken https://bugs.webkit.org/show_bug.cgi?id=31407 Rename platform/qt/TemporaryLinkStubs.cpp to avoid name collition on Windows. Thanks for Ismail "cartman" Donmez for help. No new tests, as there is no new functionality. * WebCore.gypi: * WebCore.pro: * platform/qt/TemporaryLinkStubs.cpp: Removed. * platform/qt/TemporaryLinkStubsQt.cpp: Copied from WebCore/platform/qt/TemporaryLinkStubs.cpp. 2010-05-06 Simon Hausmann Reviewed by Kenneth Rohde Christiansen. [Qt] REGRESSION: Loading of external CSS and JS files over network fails in some cases https://bugs.webkit.org/show_bug.cgi?id=36755 Enable the direct connection between QtNetwork and QtWebKit only for Qt versions greater than 4.6.2, due to a bug in Qt that's been fixed after 4.6.2. * platform/network/qt/QNetworkReplyHandler.cpp: 2010-05-06 Gustavo Noronha Silva Reviewed by Xan Lopez. Rework where we get page step and line step from, so we do not depend on scrollbars existing. Caught by API test I forgot to run. * platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollView::setGtkAdjustments): 2010-05-06 Gustavo Noronha Silva Reviewed by Xan Lopez. [GTK] Adjustment resetting uses wrong values, and misses page_size and steps https://bugs.webkit.org/show_bug.cgi?id=38657 Fix resetting adjustment values. In the page cache case, we were confusing page_size and upper, leading to stray scrollbars sometimes. * platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollView::setGtkAdjustments): 2010-05-06 Darin Adler Reviewed by Beth Dakin. Page::setCanStartMedia does not properly handle the case where a media listener is removed https://bugs.webkit.org/show_bug.cgi?id=38602 We can't find any real case where this causes a crash at this time, but we want to harden the code anyway. Thus there are no new regression tests. * page/Page.cpp: (WebCore::Page::removeMediaCanStartListener): Removed incorrect assertion. (WebCore::Page::setCanStartMedia): Change algorithm so we notify listeners one at a time and don't notify any listener that has already been removed from the set. 2010-05-05 Ojan Vafai Reviewed by Darin Adler. shift+click on an existing selection doesn't work right https://bugs.webkit.org/show_bug.cgi?id=36542 NSTextView behavior is to move the end of the selection closest to the shift-click. Win/Linux behavior is to always move the focus end of the selection. Test: editing/selection/shift-click.html * page/EventHandler.cpp: (WebCore::textDistance): (WebCore::EventHandler::handleMousePressEventSingleClick): 2010-05-06 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: implement panels history traversal on Cmd+Left/Right. https://bugs.webkit.org/show_bug.cgi?id=38649 * inspector/front-end/inspector.js: (WebInspector.set currentPanel): (WebInspector.loaded): (WebInspector.documentKeyDown): (WebInspector.PanelHistory): (WebInspector.PanelHistory.prototype.canGoBack): (WebInspector.PanelHistory.prototype.goBack): (WebInspector.PanelHistory.prototype.canGoForward): (WebInspector.PanelHistory.prototype.goForward): (WebInspector.PanelHistory.prototype.setPanel): 2010-05-03 Evan Martin Reviewed by Eric Seidel. [chromium] use glyphDataForCharacter so we hit the glyphdata cache https://bugs.webkit.org/show_bug.cgi?id=38500 Calling fontDataForCharacters() while rendering text is expensive. Examining the relevant Mac code in WebKit revealed that calling the similarly-named glyphDataForCharacters() results in caching the font data on a per-glyph basis. Since we now choose a font based on the first character in a run, we need to be careful that all the glyphs within the run use the same font. This is also similar to the WebKit Mac code. We need to remove all of the script run bits eventually and this is a step in that direction. Tests: fast/text/international/danda-space.html spacing changes slightly (now matches Firefox better) and fast/text/international/thai-baht-space.html now picks the correct (serif) font for the digits. * platform/graphics/chromium/FontLinux.cpp: (WebCore::TextRunWalker::nextScriptRun): (WebCore::TextRunWalker::setupFontForScriptRun): 2010-05-06 Martin Robinson Reviewed by Gustavo Noronha Silva. [GTK] Enable DOM clipboard and drag-and-drop access https://bugs.webkit.org/show_bug.cgi?id=30623 Convert dragging portion of drag-and-drop to use DataObjectGtk. No new tests, because functionality has not changed. * page/gtk/EventHandlerGtk.cpp: (WebCore::EventHandler::createDraggingClipboard): Pass the DataObjectGtk as a parameter here. * platform/gtk/ClipboardGtk.h: (WebCore::ClipboardGtk::create): Take the DataObject as a parameter instead of creating it here. (WebCore::ClipboardGtk::helper): Added. (WebCore::ClipboardGtk::dataObject): Added. * platform/gtk/PasteboardHelper.h: Make targetListForDataObject a public method. 2010-05-06 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Do not show content tab for resources not supporting content preview. https://bugs.webkit.org/show_bug.cgi?id=38635 * English.lproj/localizedStrings.js: * inspector/front-end/FontView.js: (WebInspector.FontView.prototype.hasContentTab): * inspector/front-end/ImageView.js: (WebInspector.ImageView.prototype.hasContentTab): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView): (WebInspector.ResourceView.prototype._selectTab): (WebInspector.ResourceView.prototype.hasContentTab): * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype.hasContentTab): 2010-05-06 Antonio Gomes Reviewed by Kenneth Christiansen. Spatial Navigation: adapt the logic of {deep}findFocusableNodeInDirection to do traversal starting from Node* not Document* https://bugs.webkit.org/show_bug.cgi?id=37803 Instead of receiving a Document pointer as incoming parameter, patch modifies findFocusableNodeInDirection and deepFindFocusableNodeInDirection methods to receive a Node pointer as start for content traversal. This way we can make good use of deepFindFocusableNodeInDirection to traverse other scrollable container like scrollable div's, and not only frames or iframes. Patch also makes use of 'while' instead of 'for' to loop control, that gives move flexibility to the incremental step: e.g. if a scrollable div was processed, the incremental step in the loop does not have to do node->traverseNextNode() but node->traverseNextSibling(). No behavior change. It is a preparation for supporting scrollable containers in Spatial Navigation. * page/FocusController.cpp: (WebCore::FocusController::advanceFocusDirectionally): (WebCore::FocusController::findFocusableNodeInDirection): (WebCore::FocusController::deepFindFocusableNodeInDirection): * page/FocusController.h: 2010-05-06 Csaba Osztrogonác Unreviewed WinCE buildfix after r58842. Preprocessor doesn't understand "true", changed to "1" * platform/graphics/MediaPlayer.cpp: 2010-05-06 Mikhail Naganov Reviewed by Pavel Feldman. Temporarily disable 'console.profiles' until we can distinguish functions from different frames https://bugs.webkit.org/show_bug.cgi?id=38638 * bindings/v8/custom/V8ConsoleCustom.cpp: (WebCore::V8Console::profilesAccessorGetter): 2010-05-06 Steve Block Reviewed by Eric Seidel. MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE https://bugs.webkit.org/show_bug.cgi?id=38544 No new tests, build fix only. * DerivedSources.make: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::ScriptController): * bindings/js/ScriptController.h: * bindings/js/ScriptControllerMac.mm: (WebCore::ScriptController::createScriptInstanceForWidget): * bridge/jni/JNIBridge.cpp: * bridge/jni/JNIBridge.h: * bridge/jni/JNIUtility.cpp: * bridge/jni/JNIUtility.h: * bridge/jni/jni_jsobject.h: * bridge/jni/jni_jsobject.mm: * bridge/jni/jni_objc.mm: * bridge/jni/jsc/JNIBridgeJSC.cpp: * bridge/jni/jsc/JNIBridgeJSC.h: * bridge/jni/jsc/JNIUtilityPrivate.cpp: * bridge/jni/jsc/JNIUtilityPrivate.h: * bridge/jni/jsc/JavaClassJSC.cpp: * bridge/jni/jsc/JavaClassJSC.h: * bridge/jni/jsc/JavaInstanceJSC.cpp: * bridge/jni/jsc/JavaInstanceJSC.h: * loader/FrameLoaderClient.h: 2010-05-05 Alejandro G. Castro Reviewed by Xan Lopez. Fixed the gobject introspection compilation with the new DOM bindings, we needed to add DOM objects. * GNUmakefile.am: 2010-05-06 Adam Barth Reviewed by Eric Seidel. drop support for sessionStorage in sandbox iframes https://bugs.webkit.org/show_bug.cgi?id=38151 This patch causes us to throw a security exception when a sandboxed iframe attempts to access sessionStorage, matching our behavior for localStorage. The letter of the spec asks us to create a separate storage area for each unique origin. We might want to do that in a future patch, but throwing a security error seems like a safe move now. * page/DOMWindow.cpp: (WebCore::DOMWindow::sessionStorage): (WebCore::DOMWindow::localStorage): * page/DOMWindow.h: * page/DOMWindow.idl: * page/SecurityOrigin.h: (WebCore::SecurityOrigin::canAccessSessionStorage): * storage/StorageEventDispatcher.cpp: (WebCore::StorageEventDispatcher::dispatch): 2010-05-06 Andy Estes Reviewed by Maciej Stachowiak. Allow forms submitting to target="_blank" to open popups if the submission originated from a user gesture. https://bugs.webkit.org/show_bug.cgi?id=37335 Test: fast/events/popup-allowed-from-gesture-initiated-form-submit.html * bindings/js/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): If no DOM event is being processed, consult UserGestureIndicator to determine return value. * bindings/js/ScriptController.h: Moved the logic of processingUserGestureEvent() into processingUserGesture(). 2010-05-06 Xan Lopez Rubber-stamped by Eric Seidel. [GTK] Refactor GenerateProperties in CodeGenerationGObject.pm https://bugs.webkit.org/show_bug.cgi?id=38577 Thinko caught while refactoring, $custom variable was not initialized. * bindings/scripts/CodeGeneratorGObject.pm: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): 2010-05-06 Xan Lopez Rubber-stamped by Eric Seidel. [GTK] Refactor GenerateProperties in CodeGenerationGObject.pm https://bugs.webkit.org/show_bug.cgi?id=38577 Refactor GenerateProperty out of GenerateProperties. This is in preparation for EventListeren attributes, which won't generate normal GObject properties. * bindings/scripts/CodeGeneratorGObject.pm: 2010-05-06 Pavel Feldman Reviewed by Joseph Pecoraro. Web Inspector: follow up to linkify event listeners. https://bugs.webkit.org/show_bug.cgi?id=38257 * bindings/js/ScriptEventListener.cpp: (WebCore::eventListenerHandlerLocation): * bindings/v8/ScriptEventListener.cpp: (WebCore::eventListenerHandlerLocation): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.linkifyNodeReference): * inspector/front-end/EventListenersSidebarPane.js: 2010-05-05 Charles Wei Reviewed by George Staikos https://bugs.webkit.org/show_bug.cgi?id=37848 This patch adds WCSS -wap-input-format and -wap-input-required support to WebKit Tests: fast/wcss/wap-input-format.xhtml fast/wcss/wap-input-required.xhtml * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseWCSSInputProperty): * css/CSSParser.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/WCSSPropertyNames.in: * dom/InputElement.cpp: (WebCore::InputElement::sanitizeValue): (WebCore::InputElement::handleBeforeTextInsertedEvent): (WebCore::InputElementData::InputElementData): (WebCore::formatCodes): (WebCore::cursorPositionToMaskIndex): (WebCore::InputElement::isConformToInputMask): (WebCore::InputElement::validateInputMask): * dom/InputElement.h: (WebCore::InputElementData::inputFormatMask): (WebCore::InputElementData::setInputFormatMask): (WebCore::InputElementData::maxInputCharsAllowed): (WebCore::InputElementData::setMaxInputCharsAllowed): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setWapInputFormat): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::data): * wml/WMLInputElement.h: (WebCore::WMLInputElement::data): 2010-05-05 MORITA Hajime Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=38150 Refactoring: webkitEditableContentChangedEvent should be handled by the owner of appropriate the renderer. Moved a part of code chunk in HTMLFormControlElementWithState::defaultEventHandler() which accesses the renderer from foreign node, to TextControlInnerTextElement::defaultEventHandler() which owns the renderer. No new tests. No behavioral change. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElementWithState::defaultEventHandler): * html/HTMLFormControlElement.h: * html/HTMLInputElement.h: * html/HTMLTextAreaElement.h: * rendering/TextControlInnerElements.cpp: (WebCore::TextControlInnerTextElement::defaultEventHandler): 2010-05-05 Joseph Pecoraro Reviewed by Timothy Hatcher. Web Inspector: Line Numbers should be Aligned with the Source Code Line https://bugs.webkit.org/show_bug.cgi?id=38593 If there is a message bubble, such as an error message, in a source view the line number should be in line with the source code line, not centered between the source and bubble. * inspector/front-end/textViewer.css: (.webkit-line-number): added vertical-align: top 2010-05-05 Dan Bernstein Fix the decelerated compositing build. * page/FrameView.cpp: (WebCore::FrameView::isEnclosedInCompositingLayer): * page/FrameView.h: 2010-05-05 Gavin Barraclough Reviewed by Darin Adler. Bug 38604 - workers-gc2 crashing on Qt This appears to be due to a couple of issues. (1) When the atomic string table is deleted it does not clear the 'inTable' bit on AtomicStrings - it implicitly assumes that all AtomicStrings have already been deleted at this point (otherwise they will crash in their destructor when they try to remove themselves from the atomic string table). (2) We don't fix the ordering in which WTF::WTFThreadData and WebCore::ThreadGlobalData are destructed. We should make sure that ThreadGlobalData is cleaned up before worker threads terminate and WTF::WTFThreadData is destroyed, and we should clear the inTable bit of members on atomic string table destruction. WTF changes (fix issue 2, above) - clean up the thread data on worker termination. * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::~ThreadGlobalData): (WebCore::ThreadGlobalData::destroy): * platform/ThreadGlobalData.h: * workers/WorkerThread.cpp: (WebCore::WorkerThread::workerThread): 2010-05-05 Dan Bernstein Reviewed by Simon Fraser. Iframes in composited layers don’t repaint correctly (affects Yahoo! Mail with Flash Player 10.1) https://bugs.webkit.org/show_bug.cgi?id=38427 Test: compositing/iframes/iframe-in-composited-layer.html * WebCore.base.exp: Export FrameView::isEnclosedInCompositingLayer(). * page/FrameView.cpp: (WebCore::FrameView::isEnclosedInCompositingLayer): Added this predicate. * page/FrameView.h: 2010-05-05 Chris Marrin Reviewed by Simon Fraser. Got composited iframes showing up on Mac again https://bugs.webkit.org/show_bug.cgi?id=38565 This was broken by http://trac.webkit.org/changeset/58798. That change connected iframes through the parent document to the root of the layer tree. That is correct for Windows, but not for Mac. So the places where the linkage is made were wrapped in shouldPropagateCompositingToIFrameParent() calls, which is always false for Mac. Test: compositing/iframes/composited-iframe-alignment.html * rendering/RenderLayerCompositor.cpp:Avoid doing composited iframe linkage on Mac (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): (WebCore::RenderLayerCompositor::didMoveOnscreen): (WebCore::RenderLayerCompositor::willMoveOffscreen): (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): 2010-05-05 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=38260 Fix whitespace removing in deprecatedParseURL(). Broken all the way since r4 (yes, that's a revision number). Test: http/tests/security/xss-DENIED-javascript-with-spaces.html * css/CSSHelper.cpp: (WebCore::deprecatedParseURL): Fixed loop conditions for remaining length. 2010-05-05 Chris Fleizach Reviewed by Beth Dakin. Many AXUnknown showing up in the hierarchy https://bugs.webkit.org/show_bug.cgi?id=38607 The RenderTableSection should not be an accessible element. Test: platform/mac/accessibility/parent-of-table-row-is-table.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): 2010-05-05 Csaba Osztrogonác Reviewed by Simon Hausmann. [Qt]Disable Qt Multimedia backend for HTML 5 Audio and Video elements Fall back to the Phonon backend until the release situation has been cleared up. https://bugs.webkit.org/show_bug.cgi?id=38612 Buildfix for QT_VERSION >= 0x040700 after r58810. * platform/graphics/MediaPlayer.cpp: 2010-05-05 Jian Li Reviewed by David Levin. XMLHttpRequestUpload events do not fire when sending a raw file or FormData object. https://bugs.webkit.org/show_bug.cgi?id=37771 Test: http/tests/local/formdata/upload-events.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): 2010-05-05 Csaba Osztrogonác Reviewed by Simon Hausmann. [Qt] Qt port should use its own QUuid class to create UUID string. https://bugs.webkit.org/show_bug.cgi?id=38581 * platform/UUID.cpp: (WebCore::createCanonicalUUIDString): Added PLATFORM(QT) case. 2010-05-05 Alexey Proskuryakov Roll out r58830 for breaking tests. Was: https://bugs.webkit.org/show_bug.cgi?id=38546 Node.focus() fails to move focus from subframe properly * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setFocus): 2010-05-05 Jian Li Reviewed by Adam Barth. Implement FileReader class. https://bugs.webkit.org/show_bug.cgi?id=38157 This patch only contains the implementation of FileReader class as defined in the File API spec: http://www.w3.org/TR/file-upload/#dfn-filereader. New test will be added when a IDL is exposed and the FILE_READER is turned on. * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/EventNames.h: * dom/EventTarget.cpp: (WebCore::EventTarget::toFileReader): * dom/EventTarget.h: * html/FileError.h: (WebCore::FileError::FileError): * html/FileReader.cpp: Added. * html/FileReader.h: Added. * html/FileStream.cpp: (WebCore::FileStream::FileStream): (WebCore::FileStream::openForRead): (WebCore::FileStream::close): (WebCore::FileStream::read): * html/FileStream.h: 2010-05-05 Steve Falkenburg Reviewed by Maciej Stachowiak. REGRESSION(r57969) Image decoder is repeatedly destroyed/created in CoreGraphics-based Windows WebKit https://bugs.webkit.org/show_bug.cgi?id=38595 * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::setData): 2010-05-05 Alexey Proskuryakov Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=38546 Node.focus() fails to move focus from subframe properly Test: fast/frames/take-focus-from-iframe.html * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setFocus): Don't clear focus if this frame doesn't have it. This can happen if page's and HTMLFrameElement's ideas of focused frame get out of sync temporarily. 2010-05-05 Alexey Proskuryakov Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=26824 EventHandler can operate on a wrong frame if focus changes during keyboard event dispatch. EventHandler object is tied to a frame, so it's wrong for it to continue processing a keyboard event if focused frame changes between keydown and keypress. * manual-tests/focus-change-between-key-events.html: Added. * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Bail out early if focused frame changes while dispatching keydown. Also made similar changes for Windows to maintain matching behavior, even though EventHandler was re-entered anyway due to WM_KEYDOWN and WM_CHAR being separate events. 2010-05-05 Steve Block Reviewed by Adam Barth. MediaError.h is missing PassRefPtr.h include https://bugs.webkit.org/show_bug.cgi?id=38575 No new tests, build fix only. * html/MediaError.h: 2010-05-05 Alexander Pavlov Reviewed by Pavel Feldman. Web Inspector: Audits panel: Resource counters get reset when switching panels while reloading page https://bugs.webkit.org/show_bug.cgi?id=38579 * inspector/front-end/AuditLauncherView.js: (WebInspector.AuditLauncherView.prototype.updateResourceTrackingState): (WebInspector.AuditLauncherView.prototype._updateResourceProgress): 2010-05-05 Pavel Feldman Reviewed by Joseph Pecoraro. Web Inspector: Doubleclick on line number should not trigger source editing. https://bugs.webkit.org/show_bug.cgi?id=38588 * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._handleDoubleClick): 2010-05-05 Martin Robinson Reviewed by Gustavo Noronha. [GTK] Enable DOM clipboard and drag-and-drop access https://bugs.webkit.org/show_bug.cgi?id=30623 Add support in the PasteboardHelper for images, in preparation for drag-and-drop data. No new tests as functionality has not changed. * platform/gtk/PasteboardHelper.cpp: (WebCore::PasteboardHelper::fillSelectionData): Add support for images here. (WebCore::PasteboardHelper::targetListForDataObject): Add support for images here. 2010-05-05 Stuart Morgan Reviewed by Darin Fisher. Add a "focused" parameter to Widget::setFocus, and updates Document so that Widget is informed of focus loss as well as focus gain. Changes all existing setFocus implementations so that they ignore the 'false' case, so no behavior is changed until individual platforms are updated to handle the new case (if they want to). https://bugs.webkit.org/show_bug.cgi?id=37961 * dom/Document.cpp: (WebCore::Document::setFocusedNode): * platform/Widget.h: * platform/android/WidgetAndroid.cpp: (WebCore::Widget::setFocus): * platform/chromium/WidgetChromium.cpp: (WebCore::Widget::setFocus): * platform/efl/WidgetEfl.cpp: (WebCore::Widget::setFocus): * platform/gtk/WidgetGtk.cpp: (WebCore::Widget::setFocus): * platform/haiku/WidgetHaiku.cpp: (WebCore::Widget::setFocus): * platform/mac/WidgetMac.mm: (WebCore::Widget::setFocus): * platform/qt/WidgetQt.cpp: (WebCore::Widget::setFocus): * platform/win/WidgetWin.cpp: (WebCore::Widget::setFocus): * platform/wx/WidgetWx.cpp: (WebCore::Widget::setFocus): * plugins/PluginView.h: * plugins/PluginViewNone.cpp: (WebCore::PluginView::setFocus): * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::setFocus): * plugins/mac/PluginViewMac.cpp: (WebCore::PluginView::setFocus): * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::setFocus): * plugins/symbian/PluginViewSymbian.cpp: (WebCore::PluginView::setFocus): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::setFocus): 2010-05-05 Steve Block Reviewed by Pavel Feldman. Move V8 ScriptDebugServer::topStackFrame() to ScriptCallStack https://bugs.webkit.org/show_bug.cgi?id=38531 ScriptCallStack::create() uses ScriptDebugServer::topStackFrame(), but ScriptDebugServer is guarded with ENABLE(JAVASCRIPT_DEBUGGER). This prevents ScriptCallStack from being built on platforms that do not define ENABLE(JAVASCRIPT_DEBUGGER). No new tests, build fix only. * bindings/v8/ScriptCallStack.cpp: (WebCore::ScriptCallStack::callLocation): (WebCore::ScriptCallStack::createUtilityContext): Helper for topStackFrame, moved from ScriptDebugServer (WebCore::ScriptCallStack::topStackFrame): Moved from ScriptDebugServer * bindings/v8/ScriptCallStack.h: (WebCore::ScriptCallStack::utilityContext): Helper for topStackFrame, moved from ScriptDebugServer * bindings/v8/ScriptDebugServer.cpp: * bindings/v8/ScriptDebugServer.h: 2010-05-05 Csaba Osztrogonác Rubber-stamped by Simon Hausmann. [Qt] REGRESSION(r56869): WinCE build is broken https://bugs.webkit.org/show_bug.cgi?id=36929 * WebCore.pro: LIBS += -lOle32 added. 2010-05-05 Simon Hausmann Reviewed by Tor Arne Vestbø. [Qt] Disable Qt Multimedia backend for HTML 5 Audio and Video elements Fall back to the Phonon backend until the release situation has been cleared up. * WebCore.pro: 2010-05-05 Ilya Tikhonovsky Reviewed by Pavel Feldman. WebInspector: Clickable links to resources should be used as 'details' part for the all suitable kinds of records. https://bugs.webkit.org/show_bug.cgi?id=38542 * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelineRecordListRow): (WebInspector.TimelineRecordListRow.prototype.update): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): (WebInspector.TimelinePanel.PopupContentHelper): (WebInspector.TimelinePanel.PopupContentHelper.prototype._createCell): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendTextRow): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendElementRow): (WebInspector.TimelinePanel.PopupContentHelper.prototype._appendLinkRow): 2010-05-05 Nikolas Zimmermann Not reviewed. Add missing files generated by "run-bindings-test", after the DOMTestCallback.idl addition. * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: Added. (WebKit::kit): (webkit_dom_test_callback_callback_with_class1param): (webkit_dom_test_callback_callback_with_class2param): (webkit_dom_test_callback_callback_with_non_bool_return_type): (WebKit::wrapTestCallback): (WebKit::core): (webkit_dom_test_callback_finalize): (webkit_dom_test_callback_set_property): (webkit_dom_test_callback_get_property): (webkit_dom_test_callback_class_init): (webkit_dom_test_callback_init): * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: Added. * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: Added. * bindings/scripts/test/ObjC/DOMTestCallback.h: Added. * bindings/scripts/test/ObjC/DOMTestCallback.mm: Added. (-[DOMTestCallback dealloc]): (-[DOMTestCallback finalize]): (-[DOMTestCallback callbackWithClass1Param:]): (-[DOMTestCallback callbackWithClass2Param:strArg:]): (-[DOMTestCallback callbackWithNonBoolReturnType:]): (-[DOMTestCallback customCallback:class6Param:]): (core): (kit): * bindings/scripts/test/ObjC/DOMTestCallbackInternal.h: Added. 2010-05-05 Joseph Pecoraro Reviewed by Pavel Feldman. Web Inspector: FontView needs Cleanup https://bugs.webkit.org/show_bug.cgi?id=38567 FontView was missing some of the newer practices for initialization that other Resource Views had. Also its width calculations could result in a single character wrapping. This is general cleanup. * inspector/front-end/FontView.js: (WebInspector.FontView): move initialization into contentTabSelected (WebInspector.FontView.prototype.contentTabSelected): handle initialization like other Resource Views (WebInspector.FontView.prototype.updateFontPreviewSize): use a narrower width to prevent text from widowing 2010-05-05 Dirk Schulze Reviewed by Nikolas Zimmermann. SVG hit testing is *way* too slow https://bugs.webkit.org/show_bug.cgi?id=19312 Use the cached stroke and fill boundaries in RenderPath as a heuristik to speed up SVG's hit testing. No new tests added. * rendering/RenderPath.cpp: (WebCore::RenderPath::fillContains): (WebCore::RenderPath::strokeContains): 2010-05-04 Dumitru Daniliuc Reviewed by Adam Barth. Auto-generate all Database callbacks. https://bugs.webkit.org/show_bug.cgi?id=38503 * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSCustomSQLStatementCallback.cpp: Removed. * bindings/js/JSCustomSQLStatementCallback.h: Removed. * bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSSQLStatementErrorCallback::handleEvent): * bindings/js/JSCustomSQLStatementErrorCallback.h: Removed. * bindings/js/JSCustomSQLTransactionCallback.cpp: Removed. * bindings/js/JSCustomSQLTransactionCallback.h: Removed. * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: Removed. * bindings/js/JSCustomSQLTransactionErrorCallback.h: Removed. * bindings/js/JSDatabaseCallback.cpp: Removed. * bindings/js/JSDatabaseCallback.h: Removed. * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::createTransaction): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/test/JS/JSTestCallback.cpp: * bindings/v8/custom/V8CustomSQLStatementCallback.cpp: Removed. * bindings/v8/custom/V8CustomSQLStatementCallback.h: Removed. * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: (WebCore::V8SQLStatementErrorCallback::handleEvent): * bindings/v8/custom/V8CustomSQLStatementErrorCallback.h: Removed. * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp: Removed. * bindings/v8/custom/V8CustomSQLTransactionCallback.h: Removed. * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp: Removed. * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.h: Removed. * bindings/v8/custom/V8DatabaseCallback.cpp: Removed. * bindings/v8/custom/V8DatabaseCallback.h: Removed. * bindings/v8/custom/V8DatabaseCustom.cpp: (WebCore::V8Database::changeVersionCallback): (WebCore::createTransaction): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::V8SQLTransaction::executeSqlCallback): * storage/DatabaseCallback.h: * storage/DatabaseCallback.idl: Added. * storage/SQLStatement.cpp: (WebCore::SQLStatement::performCallback): * storage/SQLStatementCallback.h: * storage/SQLStatementCallback.idl: Added. * storage/SQLStatementErrorCallback.idl: Added. * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::deliverTransactionCallback): * storage/SQLTransactionCallback.h: * storage/SQLTransactionCallback.idl: Added. * storage/SQLTransactionErrorCallback.h: * storage/SQLTransactionErrorCallback.idl: Added. 2010-05-04 Chris Marrin Reviewed by Simon Fraser. Made composited iframes work on Windows https://bugs.webkit.org/show_bug.cgi?id=32446 This completes the work in http://trac.webkit.org/changeset/57919 to create compositing layers in the parent document when an iframe has a compositing layer. The parent document has a layer for the iframe element and builds a layer tree to the page root. The layer tree for the iframe document is then parented to the iframe element's GraphicsLayer. The RenderLayerCompositor for the iframe document (which owns the root of the layer tree) now has a clippingLayer which is the parent of the layer tree root so it can be clipped to the parent iframe's bounds, taking into account borders, padding, etc. in the parent iframe element. I also got rid of a no longer used function: RenderLayerCompositor::parentInRootLayer Test: compositing/iframes/composited-parent-iframe.html * rendering/RenderLayerBacking.cpp:Make calls to RenderLayerCompositor to set the clipping bounds for iframe content * rendering/RenderLayerCompositor.cpp:Hook the iframe content to the parent iframe element * rendering/RenderLayerCompositor.h: 2010-05-03 Alexey Proskuryakov Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=38497 Make sure that http URLs always have a host in SecurityOrigin This is a hardening fix, and behavior really depends on what an underlying networking layer does. So, no test. * page/SecurityOrigin.cpp: (WebCore::schemeRequiresAuthority): List schemes that need an authority for successful loading. (WebCore::SecurityOrigin::SecurityOrigin): Never let e.g. http origins with empty authorities have the same security origin. 2010-05-04 Zhenyao Mo Reviewed by Dimitri Glazkov. getFramebufferAttachmentParameter should return the original WebGLTexture/WebGLRenderbuffer instead of creating new ones sharing names. https://bugs.webkit.org/show_bug.cgi?id=38236 * html/canvas/CanvasObject.h: Add type check functions. (WebCore::CanvasObject::isBuffer): (WebCore::CanvasObject::isFramebuffer): (WebCore::CanvasObject::isProgram): (WebCore::CanvasObject::isRenderbuffer): (WebCore::CanvasObject::isShader): (WebCore::CanvasObject::isTexture): * html/canvas/WebGLBuffer.h: Add type check functions. (WebCore::WebGLBuffer::isBuffer): * html/canvas/WebGLFramebuffer.h: Add type check functions. (WebCore::WebGLFramebuffer::isFramebuffer): * html/canvas/WebGLProgram.h: Add type check functions. (WebCore::WebGLProgram::isProgram): * html/canvas/WebGLRenderbuffer.cpp: remove constructor using existing name. * html/canvas/WebGLRenderbuffer.h: Add type check functions; remove constructor using existing name. (WebCore::WebGLRenderbuffer::isRenderbuffer): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Return original Texture/Renderbuffer instead of creating new ones. (WebCore::WebGLRenderingContext::findTexture): Find a WebGLTexture using a name. (WebCore::WebGLRenderingContext::findRenderbuffer): Find a WebGLRenderbuffer using a name. * html/canvas/WebGLRenderingContext.h: Add find* functions. * html/canvas/WebGLShader.h: Add type check functions. (WebCore::WebGLShader::isShader): * html/canvas/WebGLTexture.cpp: remove constructor using existing name. * html/canvas/WebGLTexture.h: Add type check functions; remove constructor using existing name. (WebCore::WebGLTexture::isTexture): 2010-05-04 Luiz Agostini Reviewed by Simon Hausmann. [Qt] QT_MOBILE_THEME compile time flag https://bugs.webkit.org/show_bug.cgi?id=38439 Replacing preprocessor conditional used in RenderThemeQt from Q_WS_MAEMO_5 to USE(QT_MOBILE_THEME). * WebCore.pro: * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::RenderThemeQt): (WebCore::RenderThemeQt::qStyle): (WebCore::RenderThemeQt::extraDefaultStyleSheet): (WebCore::RenderThemeQt::adjustMenuListButtonStyle): (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists): * platform/qt/RenderThemeQt.h: 2010-05-04 Joseph Pecoraro Reviewed by Dan Bernstein. SVG fonts trigger GlyphPage::fill with null font https://bugs.webkit.org/show_bug.cgi?id=38530 SVG fonts do not use the glyph page cache. This change detects when attempting to fill a GlyphPage with an SVG font and indicates that the glyphs were not available. * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::fill): helper method which handles attempts to fill a GlyphPage with SVG or non-SVG fonts (WebCore::GlyphPageTreeNode::initializePage): use the helper where appropriate 2010-05-04 Kent Tamura Reviewed by David Levin (and unofficially by Enrica Casucci). REGRESSION(r54368): Text drag-and-drop from input/textarea doesn't work if the text is like a URL https://bugs.webkit.org/show_bug.cgi?id=38374 Since r54368, documentFragmentFromDragData() creates an element with no anchor text for URL-like text dragged from input/textarea element. If such text is dropped to input/textarea element, the text is not inserted. To fix this problem, use the original text or the URL as an anchor text. Test: editing/pasteboard/drag-drop-url-text.html * page/DragController.cpp: (WebCore::documentFragmentFromDragData): 2010-05-04 Steve Block Reviewed by Darin Adler. JavaInstanceJSC.cpp and JNIUtilityPrivate.cpp need to include jni_jsobject.h for jlong_to_pt() and ptr_to_jlong() https://bugs.webkit.org/show_bug.cgi?id=38525 No new tests, build fix only. * bridge/jni/jni_jsobject.h: Guard Mac-specific code with PLATFORM(MAC) * bridge/jni/jsc/JNIUtilityPrivate.cpp: Include jni_jsobject.h * bridge/jni/jsc/JavaInstanceJSC.cpp: Include jni_jsobject.h 2010-05-04 Steve Block Reviewed by Darin Adler. New FileSystemPOSIX functions cause linker errors on Android https://bugs.webkit.org/show_bug.cgi?id=38521 No new tests, build fix only. * platform/android/FileSystemAndroid.cpp: Remove closeFile, which is provided in FileSystemPOSIX.cpp * platform/posix/FileSystemPOSIX.cpp: Guard writeToFile with !PLATFORM(ANDROID) 2010-05-04 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: restore main and sidebar scroller positions when switching between panels. https://bugs.webkit.org/show_bug.cgi?id=38522 * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.elementsToRestoreScrollPositionsFor): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.show): (WebInspector.Panel.prototype.hide): (WebInspector.Panel.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.Panel.prototype._storeScrollPositions): (WebInspector.Panel.prototype._restoreScrollPositions): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.elementsToRestoreScrollPositionsFor): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.elementsToRestoreScrollPositionsFor): 2010-05-04 Steven Lai Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=37900 cloneNode() does not preserve z-index with more than six digits Tests: fast/dom/HTMLInputElement/clone-input-checked.html fast/dom/clone-node-z-index.html * dom/Element.cpp: undid the order change of calling copyNonAttributeProperties() before setAttributes() (WebCore::Element::cloneElementWithoutChildren): uncheck the previous radio button in the same radio button group only when the checked radio box is appended to the dom tree * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateCheckedRadioButtons): (WebCore::HTMLInputElement::attach): (WebCore::HTMLInputElement::setChecked): * html/HTMLInputElement.h: 2010-04-29 John Gregg Reviewed by Dmitry Titov. notifications should have dir and replaceId attributes. Note that tests are only enabled in Chromium, skipped elsewhere since notifications aren't implemented. https://bugs.webkit.org/show_bug.cgi?id=38336 Tests: fast/notifications/notifications-replace.html fast/notifications/notifications-rtl.html * notifications/Notification.h: (WebCore::Notification::dir): (WebCore::Notification::setDir): (WebCore::Notification::replaceId): (WebCore::Notification::setReplaceId): * notifications/Notification.idl: 2010-05-04 Alejandro G. Castro Reviewed by Xan Lopez. Fixed error defining the float/double minimum in the object properties, the smallest value of a float/double is -G_MAXDOUBLE/-G_MAXFLOAT. * bindings/scripts/CodeGeneratorGObject.pm: 2010-05-03 Joseph Pecoraro Reviewed by Dan Bernstein. REGRESSION: Text clipped in absolutely positioned search inputs https://bugs.webkit.org/show_bug.cgi?id=38468 Previously I incorrectly added x() and y() to the tx and ty positioning. This clips a search input like a text input, respecting the vertically centered text. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): only the Y changes, so change setLocation to setY (WebCore::RenderTextControlSingleLine::controlClipRect): 2010-05-04 Alexander Pavlov Reviewed by Timothy Hatcher. Web Inspector: REGRESSION: Up/Down, PgUp/PgDown keys do not change numeric style properties https://bugs.webkit.org/show_bug.cgi?id=38516 * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype): 2010-05-04 Ben Murdoch Reviewed by Simon Hausmann. Crash in handleTouchEvent: using dangling node ptrs in hashmap https://bugs.webkit.org/show_bug.cgi?id=38514 When navigating away from a page, if you have your finger still pressed and then lift it on the new page we see a crash if the node got deleted as we still have a dangling pointer in the m_originatingTouchPointTargets hashmap and try to use it as the receiver to dispatch a touchend event. Test: fast/events/touch/touch-stale-node-crash.html * page/EventHandler.cpp: (WebCore::EventHandler::clear): Clear the hashmap of touch targets. 2010-05-04 Joseph Pecoraro Reviewed by Pavel Feldman. Web Inspector: Drawer Misbehaving when Docking / Undocking in Console Panel https://bugs.webkit.org/show_bug.cgi?id=38510 * inspector/front-end/inspector.js: (WebInspector.set attached): resize the drawer after docking/undocking 2010-05-04 Laszlo Gombos Unreviewed, build fix for Symbian. [Symbian] Build fix after r58598. Use C99 integer types for the Symbian plugin implementation. No new tests, as there is no new functionality. * plugins/symbian/PluginPackageSymbian.cpp: (WebCore::PluginPackage::NPVersion): * plugins/symbian/PluginViewSymbian.cpp: (WebCore::PluginView::handlePostReadFile): 2010-05-04 Nikolas Zimmermann Reviewed by Dirk Schulze. Split SVGCharacterLayoutInfo in smaller pieces https://bugs.webkit.org/show_bug.cgi?id=38513 Split SVGCharacterLayoutInfo into SVGCharacterLayoutInfo/SVGCharacterData and SVGTextChunkLayoutInfo. This is a preparation for more work in the text area. * Android.mk: Add SVGCharacterData.(cpp|h) and SVGTextChunkLayoutInfo.h to build. * GNUmakefile.am: Ditto. * WebCore.gypi: Ditto. * WebCore.pro: Ditto * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * rendering/SVGCharacterData.cpp: Copied from rendering/SVGCharacterLayoutInfo.cpp. * rendering/SVGCharacterData.h: Copied from rendering/SVGCharacterLayoutInfo.h. (WebCore::SVGChar::SVGChar): * rendering/SVGCharacterLayoutInfo.cpp: (WebCore::SVGCharacterLayoutInfo::isInitialLayout): Introduced new helper function to share code between addLayoutInformation/addStackContent. (WebCore::SVGCharacterLayoutInfo::addLayoutInformation): Use new helper function. (WebCore::SVGCharacterLayoutInfo::addStackContent): Ditto * rendering/SVGCharacterLayoutInfo.h: * rendering/SVGRootInlineBox.h: Include new files. * rendering/SVGTextChunkLayoutInfo.h: Copied from rendering/SVGCharacterLayoutInfo.h. 2010-05-04 Xan Lopez Reviewed by Holger Freyther. [GTK] GObject DOM bindings https://bugs.webkit.org/show_bug.cgi?id=33590 Use helper functions from CodeGenerator.pm to figure out whether a type is "fundamental" or not (basically whether it's anything other than a string or a non-pointer type). * bindings/scripts/CodeGeneratorGObject.pm: 2010-04-30 Alexander Pavlov Reviewed by Yury Semikhatsky. Web Inspector: REGRESSION: Disabled style properties are absent in Styles sidebar after WebInspector is re-opened https://bugs.webkit.org/show_bug.cgi?id=38255 Moved stylesheet-related mappings into a separate object stored in InspectorController rather than InspectorDOMAgent (which gets reset on every frontend [dis]connect). * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorCSSStore.cpp: Added. (WebCore::InspectorCSSStore::InspectorCSSStore): (WebCore::InspectorCSSStore::~InspectorCSSStore): (WebCore::InspectorCSSStore::reset): * inspector/InspectorCSSStore.h: Added. * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::setFrontend): (WebCore::InspectorController::didCommitLoad): * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::discardBindings): (WebCore::InspectorDOMAgent::applyStyleText): (WebCore::InspectorDOMAgent::setStyleText): (WebCore::InspectorDOMAgent::setStyleProperty): (WebCore::InspectorDOMAgent::toggleStyleEnabled): (WebCore::InspectorDOMAgent::setRuleSelector): (WebCore::InspectorDOMAgent::addRule): (WebCore::InspectorDOMAgent::bindStyle): (WebCore::InspectorDOMAgent::bindRule): (WebCore::InspectorDOMAgent::buildObjectForStyle): (WebCore::InspectorDOMAgent::buildObjectForRule): * inspector/InspectorDOMAgent.h: (WebCore::InspectorDOMAgent::create): (WebCore::InspectorDOMAgent::cssStore): 2010-05-04 Mikhail Naganov Reviewed by Pavel Feldman. Display "Recording..." item when recording an user-initiated CPU profile. https://bugs.webkit.org/show_bug.cgi?id=38043 * English.lproj/localizedStrings.js: * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.addProfileHeader): (WebInspector.ProfilesPanel.prototype.removeProfileHeader): (WebInspector.ProfilesPanel.prototype.showProfile): * inspector/front-end/inspector.js: (WebInspector.setRecordingProfile): 2010-05-04 Tucker Jay Reviewed by Holger Freyther. Animated GIF images does not animate 10x as expected by default. https://bugs.webkit.org/show_bug.cgi?id=36818 Added test case to existing manual test to test the fixed functionality. * manual-tests/qt/qt-10loop-anim.gif: Added. * manual-tests/qt/qt-gif-test.html: * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::repetitionCount): 2010-05-04 Dirk Schulze Unreviewed sort of XCodes project file. * WebCore.xcodeproj/project.pbxproj: 2010-05-03 Steven Lai Reviewed by Brady Eidson. Reverted hashchange() event back to async. (This change does not update HashChangeEvent to its new proposed interface) https://bugs.webkit.org/show_bug.cgi?id=36201 rdar://problem/7780794 rdar://problem/7761278 (partial fix) Tests: fast/loader/hashchange-event-async.html * dom/Document.cpp: reverted hashchange() event back to async (WebCore::Document::enqueueHashchangeEvent): 2010-05-03 Holger Hans Peter Freyther Rubber-stamped by Xan Lopez. [Cairo,WX] Stop leaking a FontPlatformData. https://bugs.webkit.org/show_bug.cgi?id=37500 Stephan Aßmus pointed out that the pango font backend is leaking memory and fixed it. The WX font backend and the Cairo/Fontconfig backend have the same snippet of code and are leaking memory as well. This commit is fixing that. * platform/graphics/cairo/SimpleFontDataCairo.cpp: (WebCore::SimpleFontData::smallCapsFontData): * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::smallCapsFontData): 2010-05-03 James Robinson Reviewed by Eric Seidel. Clean up a few compiler warnings https://bugs.webkit.org/show_bug.cgi?id=38073 * html/TextMetrics.h: (WebCore::TextMetrics::width): * rendering/style/StyleRareInheritedData.h: * rendering/style/StyleRareNonInheritedData.h: 2010-05-02 Dumitru Daniliuc Reviewed by Adam Barth. Add the ability to auto-generate callbacks to all code generators. https://bugs.webkit.org/show_bug.cgi?id=38414 * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/JS/JSTestCallback.cpp: Added. (WebCore::JSTestCallback::JSTestCallback): (WebCore::JSTestCallback::~JSTestCallback): (WebCore::JSTestCallback::callbackWithClass1Param): (WebCore::JSTestCallback::callbackWithClass2Param): * bindings/scripts/test/JS/JSTestCallback.h: Added. (WebCore::JSTestCallback::create): * bindings/scripts/test/V8/JSTestCallback.cpp: Added. (WebCore::V8TestCallback::V8TestCallback): (WebCore::V8TestCallback::~V8TestCallback): (WebCore::V8TestCallback::callbackWithClass1Param): (WebCore::V8TestCallback::callbackWithClass2Param): * bindings/scripts/test/V8/V8TestCallback.h: Added. (WebCore::V8TestCallback::create): * bindings/scripts/test/TestCallback.idl: Added. 2010-05-03 Kevin Watters Reviewed by Kevin Ollivier. [wx] Build and use Mac's ComplexTextController to support complex text in wx. https://bugs.webkit.org/show_bug.cgi?id=38482 * platform/graphics/FloatSize.h: * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::advanceAt): (WebCore::GlyphBuffer::add): * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::getNSFont): * platform/graphics/mac/ComplexTextController.cpp: * platform/graphics/mac/ComplexTextController.h: * platform/graphics/wx/FontCacheWx.cpp: (WebCore::FontCache::getFontDataForCharacters): (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/wx/FontPlatformData.h: (toCTFontRef): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::allowsLigatures): * platform/graphics/wx/FontPlatformDataWx.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::cgFont): * platform/graphics/wx/FontPlatformDataWxMac.mm: Added. (WebCore::FontPlatformData::nsFont): (WebCore::FontPlatformData::cacheNSFont): * platform/graphics/wx/FontWx.cpp: (WebCore::Font::canReturnFallbackFontsForComplexText): (WebCore::Font::selectionRectForComplexText): (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForComplexText): (WebCore::Font::offsetForPositionForComplexText): * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::containsCharacters): (WebCore::SimpleFontData::platformWidthForGlyph): * platform/wx/wxcode/fontprops.h: * platform/wx/wxcode/mac/carbon/fontprops.mm: (wxFontContainsCharacters): (GetTextExtent): * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: (WebCore::drawTextWithSpacing): * platform/wx/wxcode/win/fontprops.cpp: (wxFontContainsCharacters): * wscript: 2010-05-03 Abhishek Arya Reviewed by Adam Barth. Add support for controlling clipboard access from javascript. Clipboard access from javascript is disabled by default. https://bugs.webkit.org/show_bug.cgi?id=27751 Test: editing/execCommand/clipboard-access.html * WebCore.base.exp: * editing/EditorCommand.cpp: (WebCore::supportedCopyCut): (WebCore::supportedPaste): (WebCore::createCommandMap): * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setJavaScriptCanAccessClipboard): * page/Settings.h: (WebCore::Settings::javaScriptCanAccessClipboard): 2010-05-03 Alexey Proskuryakov Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=38285 REGRESSION: Javascript command window.open does not work in empty tab Cannot be tested, because new windows created in DRT always have an opener, and thus inherit its security origin. Only new windows and tabs created by browser chrome had this problem. * loader/FrameLoader.cpp: (WebCore::FrameLoader::init): Moved updateSandboxFlags() call to the beginning, so that an initial document would get correct flags. 2010-05-03 Noam Rosenthal Reviewed by Darin Adler. WebGL compile issue. Added ExceptionCode.h to JSWebGLArrayBufferConstructor.cpp, for some reason it was missing. https://bugs.webkit.org/show_bug.cgi?id=38453 No new tests: compile fix. * bindings/js/JSWebGLArrayBufferConstructor.cpp: 2010-05-03 Eric Seidel Unreviewed, rolling out r58685. http://trac.webkit.org/changeset/58685 https://bugs.webkit.org/show_bug.cgi?id=38461 Broke a test on Gtk * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::updateStates): 2010-05-03 Yael Aharon Reviewed by Darin Adler. Use HTML5 number parsing in HTMLProgressElement https://bugs.webkit.org/show_bug.cgi?id=38434 Use parseToDoubleForNumberType instead of toDouble. Throw an exception when the number is NaN or Infinity. * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::value): (WebCore::HTMLProgressElement::setValue): (WebCore::HTMLProgressElement::max): (WebCore::HTMLProgressElement::setMax): * html/HTMLProgressElement.h: * html/HTMLProgressElement.idl: 2010-05-03 Jens Alfke Reviewed by Darin Fisher. [chromium] Add "willSendSubmitEvent" hook to WebFrameClient and FrameLoaderClient https://bugs.webkit.org/show_bug.cgi?id=38397 No tests (functionality is exposed only through native WebKit API.) * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::prepareSubmit): Call frame loader's dispatchWillSendSubmitEvent * loader/EmptyClients.h: * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::dispatchWillSendSubmitEvent): New empty method 2010-05-03 Philippe Normand Reviewed by Eric Carlson. [GStreamer] forgotten call to durationChanged in updateStates() https://bugs.webkit.org/show_bug.cgi?id=38461 Notify MediaPlayer if duration is known after playback started. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::updateStates): 2010-05-03 Ryuan Choi Reviewed by Darin Adler. fixing build break due to clearWatch() when Geolocation feature is disabled. https://bugs.webkit.org/show_bug.cgi?id=38091 no test because this is a build fix only * page/Geolocation.cpp: (WebCore::Geolocation::clearWatch): 2010-05-03 Stephan Aßmus Reviewed by Holger Freyther. [Gtk] Fix leaking the FontPlatformData instance used to create the the small caps font data. https://bugs.webkit.org/show_bug.cgi?id=37500 No new tests needed. * platform/graphics/gtk/SimpleFontDataPango.cpp: (WebCore::SimpleFontData::smallCapsFontData): - Use a stack allocated FontPlatformData instead of a heap allocated one that is never freed. 2010-05-03 Jarkko Sakkinen Reviewed by Simon Hausmann. [Qt] GraphicsLayer: support webGL https://bugs.webkit.org/show_bug.cgi?id=35388 Added support GraphicsContext3D to GraphicsLayer. Added paint method to GraphicsContext3D for Qt platform that uses drawTexture() when QGLWidget is used as viewport of QGraphicsWebView. Fine-tuned texture and handling and image to texture conversion to work also when drawTexture() blitting is used. * platform/graphics/GraphicsContext3D.h: * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): (WebCore::GraphicsContext3D::beginPaint): (WebCore::GraphicsContext3D::paint): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::texSubImage2D): (WebCore::GraphicsContext3D::getImageData): * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::): (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl): (WebCore::GraphicsLayerQtImpl::paint): (WebCore::GraphicsLayerQtImpl::flushChanges): (WebCore::GraphicsLayerQt::setContentsToGraphicsContext3D): (WebCore::GraphicsLayerQt::setGraphicsContext3DNeedsDisplay): * platform/graphics/qt/GraphicsLayerQt.h: 2010-05-03 Janne Koskinen Reviewed by Simon Hausmann. [Qt] Fix qtlibraryinfix not to contain space List catenation with += adds whitespace cutting the infix from the final target. * WebCore.pro: 2010-05-03 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Fix rendering of