2009-07-20 Geoffrey Garen Reviewed by Sam Weinig. Removed some trivial differences between the branch and r45633, to facilitate the merge. * bindings/js/ScriptEventListener.cpp: * bridge/c/c_instance.cpp: * inspector/front-end/Images/resourcesSilhouette.png: Added. * rendering/RenderDataGrid.cpp: (WebCore::RenderDataGrid::paintObject): * rendering/RenderDataGrid.h: 2009-07-08 Alexey Proskuryakov Reviewed (an earlier version) by Geoff Garen. https://bugs.webkit.org/show_bug.cgi?id=27090 Remove lockBackForwardList argument from HTMLFormElement::submit() No change in behavior, so no tests. * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::submit): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): * html/HTMLFormElement.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): (WebCore::FrameLoader::scheduleFormSubmission): * loader/FrameLoader.h: Don't pass lockBackForwardList around when it's known to be false. 2009-07-08 Marc-Antoine Ruel Reviewed by Adam Barth. Fix V8 idl codegen to use unique constant names Embed the interface name in the global constant names so coagulating all the .cc files into one compile unit works with V8 bindings. Nothing added; Still compiles and pass tests. * bindings/scripts/CodeGeneratorV8.pm: 2009-07-08 Brent Fulgham Build fix: Add missing #includes for Windows (cURL) build. The and headers were not being included in Windows cURL builds. * platform/network/ResourceHandleInternal.h: * platform/network/curl/ResourceHandleManager.h: 2009-07-08 Shinichiro Hamaji Reviewed by David Kilzer. WebKit needs a style linting tool https://bugs.webkit.org/show_bug.cgi?id=25884 Fix bunch of style issues in WebCore/rendering. This patch is created to demonstrate cpplint.py. No testcase because it's just a style fixes. * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): (WebCore::AutoTableLayout::layout): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeEllipsisBox): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintTextMatchMarker): * rendering/MediaControlElements.cpp: (WebCore::MediaControlTimelineElement::defaultEventHandler): * rendering/MediaControlElements.h: * rendering/RenderArena.cpp: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::startDelayUpdateScrollInfo): (WebCore::RenderBlock::finishDelayUpdateScrollInfo): (WebCore::RenderBlock::updateScrollInfoAfterLayout): (WebCore::RenderBlock::positionNewFloats): (WebCore::RenderBlock::newLine): (WebCore::RenderBlock::floatBottom): (WebCore::RenderBlock::leftBottom): (WebCore::RenderBlock::rightBottom): * rendering/RenderBox.cpp: (WebCore::RenderBox::calcReplacedWidthUsing): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::layoutLegend): * rendering/RenderFlexibleBox.cpp: (WebCore::FlexBoxIterator::FlexBoxIterator): (WebCore::FlexBoxIterator::reset): (WebCore::FlexBoxIterator::first): (WebCore::FlexBoxIterator::next): (WebCore::RenderFlexibleBox::layoutVerticalBox): * rendering/RenderFrameSet.cpp: (WebCore::borderStartEdgeColor): * rendering/RenderFrameSet.h: * rendering/RenderImage.cpp: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateVisibilityStatus): (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::calculateRects): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::panScroll): * rendering/RenderMarquee.cpp: (WebCore::RenderMarquee::updateMarqueeStyle): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::updateControls): * rendering/RenderObject.cpp: (WebCore::RenderObject::drawLineForBoxSide): (WebCore::RenderObject::localCaretRect): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::adjustRectsForAspectRatio): * rendering/RenderSlider.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::outerBorderBottom): * rendering/RenderTableCol.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::itemIsSeparator): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::supportsHover): * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::supportsFocusRing): * rendering/SVGCharacterLayoutInfo.cpp: (WebCore::SVGCharacterLayoutInfo::addStackContent): * rendering/SVGCharacterLayoutInfo.h: * rendering/TextControlInnerElements.h: * rendering/bidi.cpp: (WebCore::RenderBlock::computeHorizontalPositionsForLine): 2009-07-07 Oliver Hunt Reviewed by Maciej Stachowiak. Reduce complexity of lifetime management in DynamicNodeList caches Switch the Cache object used by DynamicNodeList into a normal refcounted object rather than having a weird flag controlled refcounting system, where positive refcount did not automatically imply the cache object would actually still be live. * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeList::DynamicNodeList): (WebCore::DynamicNodeList::~DynamicNodeList): (WebCore::DynamicNodeList::Caches::Caches): (WebCore::DynamicNodeList::Caches::create): * dom/DynamicNodeList.h: * dom/Node.cpp: (WebCore::Node::childNodes): (WebCore::Node::getElementsByTagNameNS): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): (WebCore::NodeListsNodeData::invalidateCaches): (WebCore::NodeListsNodeData::isEmpty): * dom/NodeRareData.h: (WebCore::NodeListsNodeData::NodeListsNodeData): 2009-07-07 Simon Fraser Reviewed by Dan Bernstein. -webkit-perspective should be a Length https://bugs.webkit.org/show_bug.cgi?id=27066 -webkit-perspective should not take a magic valueless number, but should be a normal Length value which responds to zooming. Treat valueless numbers as pixels for backward compatibility. Test: transforms/3d/general/perspective-units.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2009-07-07 Pierre d'Herbemont Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=27047 We need to make sure that when we reattach, we also reattach the children in every MediaControlElement. Else we may end up having no remaining or elapsed time. We have to handle that, because we are using a special shadow tree in the DOM, and that we are ourselves handling attaching/detaching the renderer. The strategy here is to try to implement ::attach(), and try to reuse as much code as we can from the super class, including children attachement. Test: media/controls-after-reload.html * rendering/MediaControlElements.cpp: (WebCore::MediaControlElement::styleForElement): Code factoring. (WebCore::MediaControlElement::rendererIsNeeded): Code factoring. (WebCore::MediaControlElement::attach): Implement attach and call super class so that children are also attached. (WebCore::MediaControlElement::updateStyle): Use attach() (WebCore::MediaControlInputElement::styleForElement): Code factoring. (WebCore::MediaControlInputElement::rendererIsNeeded): Code factoring. (WebCore::MediaControlInputElement::attach): See above. (WebCore::MediaControlInputElement::updateStyle): Use attach() * rendering/MediaControlElements.h: * rendering/RenderMedia.cpp: (WebCore::RenderMedia::updateControls): Directly run attach() on the m_panel, which is a root node for our shadow tree. 2009-07-07 Simon Fraser Reviewed by Dan Bernstein. Repaint issue after layer drops out of composited mode. RenderLayers cache repaint rects in the form of m_repaintRect and m_outlineBox, and expect these to stay valid from one style change to the next. These rects are relative to the repaint container, so if a layer stops being composited, we need to recompute them. Test: compositing/repaint/layer-repaint-rects.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeRepaintRects): * rendering/RenderLayer.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBacking): 2009-07-07 Dan Bernstein Reviewed by Dave Hyatt and Darin Adler. - fix https://bugs.webkit.org/show_bug.cgi?id=26963 Reproducible crash at FontCache::getFontData() when a custom font is used in a pseudo-style Test: fast/css/pseudo-cache-stale.html * dom/Element.cpp: (WebCore::Element::pseudoStyleCacheIsInvalid): Added. Given the old style and the new style, goes over cached pseudo-styles in the old style and re-resolves the same style types off the new style. If any of the new pseudo-styles is different from the currently cached corresponding style, returns true. Otherwise, returns false. (WebCore::Element::recalcStyle): Validate the pseudo-style cache before deciding to keep the existing style. * dom/Element.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::uncachedFirstLineStyle): Added this version that returns an uncached first-line style based off the given style. (WebCore::RenderObject::getUncachedPseudoStyle): Added the 'ownStyle' parameter. * rendering/RenderObject.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getPseudoStyleCache): Added. Returns the cached pseudo-styles in the passed-in vector. * rendering/style/RenderStyle.h: 2009-07-07 Dan Bernstein Reviewed by Simon Fraser. - fix https://bugs.webkit.org/show_bug.cgi?id=27042 Incomplete painting of newly created floats Tests: fast/repaint/float-in-new-block-with-layout-delta.html fast/repaint/float-new-in-block.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChildren): If the child has never been laid out before, paint its overhanging floats in addition to itself. * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added and initialized a boolean everHadLayout member. * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): Paint floats that have never been laid out before and did not move from (0, 0). 2009-07-07 Brady Eidson Contributions from both Darin Adler and Brady Eidson. Reviewed by Darin Adler. REGRESSION (r42158): Back-forward navigation does not work correctly on nytimes.com In r42158 we lost some exclusions to making back/forward items for subframe navigations when a main frame navigation was still in progress. This patch makes things even better than it used to be by: - Locking back/forward history at the time the navigation is scheduled, not after the load has committed. - Locking back/forward history if *any* ancestor frame is still loading instead of just the main frame. Test: fast/loader/subframe-navigate-during-main-frame-load.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): Move out the history locking logic into a standalone function so it can be used from multiple sites. (WebCore::mustLockBackForwardList): Returns true if any ancestor frame is still loading. (WebCore::FrameLoader::scheduleLocationChange): Respect mustLockBackForwardList() in addition to the passed in lockBackForwardList flag. (WebCore::FrameLoader::scheduleFormSubmission): Ditto. 2009-07-07 Nate Chapin Reviewed by Darin Fisher. Upstream DOMObjectsInclude.h from src.chromium.org. https://bugs.webkit.org/show_bug.cgi?id=27035 * bindings/v8/DOMObjectsInclude.h: Added. 2009-07-07 Nate Chapin Reviewed by David Levin. Relanding r45559, which was rolled back at r45574. https://bugs.webkit.org/show_bug.cgi?id=26857 * bindings/scripts/CodeGeneratorV8.pm: Updated a function name in auto-generated bindings. * bindings/v8/V8Binding.cpp: Moved from src.chromium.org. * bindings/v8/V8Binding.h: Contents moved from src.chromium.org. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::getListenerFunction): * bindings/v8/V8Proxy.cpp: (WebCore::handleConsoleMessage): (WebCore::V8Proxy::compileScript): (WebCore::V8Proxy::sourceName): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::handleConsoleMessage): * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::NAMED_PROPERTY_SETTER): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp: (WebCore::ACCESSOR_SETTER): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: (WebCore::removeElement): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::SetTimeoutOrInterval): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-07-07 Gregory Hughes Reviewed by Darin Adler. AX: Some webpages do not send AXLoadComplete https://bugs.webkit.org/show_bug.cgi?id=26995 When sending the AXLayoutComplete notification it is possible that the AXObjectCache was cleared, resulting in no valid object to send the notification to. This fix ensures that an AX object is created and cached if one does not already exist. Not able to add a test because notifications get sent after the layout test is completed. * dom/Document.cpp: (WebCore::Document::implicitClose): 2009-07-06 Pierre d'Herbemont Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=27015 Make sure that the CSS properties letter-spacing, word-spacing, line-height, text-transform, text-indent, text-shadow, text-decoration and color do not affect the media element controls, that display text. Controls that display text are only present in when the theme MediaControllerThemeQT is being used. Test: media/controls-styling.html * css/mediaControlsQT.css: * rendering/MediaControlElements.cpp: (WebCore::MediaControlElement::updateStyle): Special case for text-decoration. text-decoration can't be overriden from CSS, because text-decoration is additive for historical reasons. 2009-07-07 Albert Wong Not reviewed, Chromium build fix. Add in missing header + fix syntax issue that crept into last patch. https://bugs.webkit.org/show_bug.cgi?id=27027 * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton): 2009-07-07 Simon Fraser Reviewed by Dave Hyatt. Make use of geometry information to decide which layers become composited. In addition to looking at painting order, also, optionally, take layer overlap into account when deciding which RenderLayers need to be composited. No testcase because DRT doesn't dump which layers are composited. * page/FrameView.h: * page/FrameView.cpp: (WebCore::FrameView::updateCompositingLayers): Removed the unused CompositingUpdate parameter, and just do an early return when there is no view. * rendering/RenderLayer.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::rendererContentChanged): (WebCore::RenderLayer::dirtyZOrderLists): (WebCore::RenderLayer::dirtyNormalFlowList): (WebCore::RenderLayer::styleChanged): (WebCore::RenderLayer::mustOverlapCompositedLayers): (WebCore::RenderLayer::setMustOverlapCompositedLayers): Change "overlay" to "overlap" for consistency with the use of "overlap" elsewhere. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateAfterLayout): compositingLayersNeedUpdate() renamed to compositingLayersNeedRebuild(). (WebCore::RenderLayerBacking::startAnimation): (WebCore::RenderLayerBacking::startTransition): Tell the compositor that we started an accelerated animation or transition. * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::compositingLayersNeedRebuild): Renamed, since it's explicitly about changes in hierarchy now. (WebCore::RenderLayerCompositor::setCompositingConsultsOverlap): (WebCore::RenderLayerCompositor::compositingConsultsOverlap): New getter and setter for whether compositing should take overlap into account. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): Add m_compositingConsultsOverlap, re-order some member variables. (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingEnabledFlag): Whitespace cleanup and method rename. (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild): Method and variable renaming. (WebCore::RenderLayerCompositor::updateCompositingLayers): Now we have to run through the layer hierarchy every time if looking at overlap, because changes in layout can now alter compositing behavior. We minimize work by tracking whether we actually need to change the layer hierarchy via needLayerRebuild. (WebCore::RenderLayerCompositor::updateBacking): 3D transforms turn off overlap mode. (WebCore::RenderLayerCompositor::layerWasAdded): (WebCore::RenderLayerCompositor::layerWillBeRemoved): Method rename. (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::overlapsCompositedLayers): Utility methods to add a layer to the overlapMap (computing the absolute bounding box only if we haven't already done so), and testing the map entries. (WebCore::RenderLayerCompositor::computeCompositingRequirements): If a layer would composite only because it comes after other compositing layers in the painting order, then consult the overlap map to determine whether it overlaps, and thus actually needs to composite. Add layers to the map when they must be composited. (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Only do re-parenting work if the updateHierarchy flag is set. (WebCore::RenderLayerCompositor::didStartAcceleratedAnimation): When we start an accelerated transition or animation, we stop looking at overlap because we can no longer guarantee correct front-to-back ordering while the accelerated animation is running. (WebCore::RenderLayerCompositor::needsToBeComposited): Method renames. * rendering/RenderView.cpp: (WebCore::RenderView::setMaximalOutlineSize): Add comment indicating that this could be optimized. 2009-07-07 Anton Muhin Reviewed by Darin Fisher. Speed up creation of V8 wrappers for DOM nodes. https://bugs.webkit.org/show_bug.cgi?id=26882 This patch doesn't require new tests as it a set of refactorings to speed up wrapper creation. * bindings/v8/V8Proxy.cpp: * bindings/v8/V8Proxy.h: 2009-07-07 Jan Michael Alonzo Reviewed by Gustavo Noronha. [GTK] textarea height property works only if other property are defined https://bugs.webkit.org/show_bug.cgi?id=18984 Let WebCore handle textarea's metrics instead of readjusting it RenderthemeGtk. Test: fast/forms/textarea-metrics.html * platform/gtk/RenderThemeGtk.cpp: * platform/gtk/RenderThemeGtk.h: 2009-07-07 Ben Murdoch Reviewed by Antti Koivisto. HTML5 Database becomes locked if a transaction is in progress when the page is refreshed. https://bugs.webkit.org/show_bug.cgi?id=25711 Fix for https://bugs.webkit.org/show_bug.cgi?id=25711 where web storage databases could become locked until the browser is shut down if the page is refreshed whilst a transaction is in progress. Test: storage/database-lock-after-reload.html * storage/Database.cpp: (WebCore::Database::Database): (WebCore::Database::close): add code to inform the database thread we've closed the database. (WebCore::Database::performOpenAndVerify): add code to inform the database thread we've opened a database. * storage/Database.h: (WebCore::Database::opened): return true iff the underlying sqlite database has been opened but not closed. * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::databaseThread): Before the database thread terminates, close any databases that ran transactions in this thread. (WebCore::DatabaseThread::recordDatabaseOpen): Records a database that executed a transaction in this thread. (WebCore::DatabaseThread::recordDatabaseClosed): Removes a database from the set of open databases. * storage/DatabaseThread.h: (WebCore::DatabaseThread::getThreadID): return the thread id for the database thread. 2009-07-07 Jiahua Huang Reviewed by Jan Alonzo. [Gtk] Paste of rich text from firefox results garbled markup https://bugs.webkit.org/show_bug.cgi?id=26791 Fix problem with UTF-16 clipboard pasted. * manual-tests/gtk/paste-richtext-from-firefox.html: Added. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::documentFragment): 2009-07-07 Yury Semikhatsky Reviewed by Timothy Hatcher. Change 'Continue debug' shortcut from F5 to F8 for consistency with Firebug. https://bugs.webkit.org/show_bug.cgi?id=23849 * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): 2009-07-06 Albert J. Wong Reviewed by Maciej Stachowiak. Update RenderThemeChromiumMac for wkDrawMediaUIPart and wkDrawMediaSlider API change. Fix compile RenderThemeChromiumMac.mm due to API changes from r45572 https://bugs.webkit.org/show_bug.cgi?id=27018 This is mainly an API change update to fix the chromium compile. It also has a small fix of a typo in RenderThemeMac.mm. Compilation against the head of chromium trunk passed. Since this is a compile fix, that should be sufficient. * rendering/RenderThemeChromiumMac.mm: (WebCore::): (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton): (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton): (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton): (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): * rendering/RenderThemeMac.mm: (WebCore::): 2009-07-06 David Kilzer Bug 27002: Build fix when DASHBOARD_SUPPORT is disabled with -Wunused-parameter Reviewed by Geoff Garen. * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard): Mark gradient as an unused parameter when DASHBOARD_SUPPORT is disabled. 2009-07-06 David Kilzer Bug 27001: Fix improper use of PassRefPtr to RefPtr Reviewed by Geoff Garen. PassRefPtr<> should only be used for arguments to functions that take ownership of the object, or as return values from functions that relinquish ownership of the object. * editing/Editor.cpp: (WebCore::Editor::increaseSelectionListLevelOrdered): Changed stack-allocated PassRefPtr to RefPtr and call release() on returned object. (WebCore::Editor::increaseSelectionListLevelUnordered): Ditto. 2009-07-06 Eric Carlson Reviewed by Simon Fraser. Make new media controller UI default on SnowLeopard * rendering/RenderThemeMac.mm: (WebCore::mediaControllerTheme): New media controller UI is enabled by default on SnowLeopard. 2009-07-06 Nate Chapin Unreviewed, build fix. Roll out r45559 to fix Chromium canary. https://bugs.webkit.org/show_bug.cgi?id=26857 * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/V8Binding.cpp: Removed. * bindings/v8/V8Binding.h: (WebCore::toInt32): (WebCore::toWebCoreString): (WebCore::fromWebCoreString): (WebCore::toWebCoreStringWithNullCheck): (WebCore::isUndefinedOrNull): (WebCore::v8Boolean): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::getListenerFunction): * bindings/v8/V8Proxy.cpp: (WebCore::handleConsoleMessage): (WebCore::V8Proxy::compileScript): (WebCore::V8Proxy::sourceName): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::handleConsoleMessage): * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::NAMED_PROPERTY_SETTER): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp: (WebCore::ACCESSOR_SETTER): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: (WebCore::removeElement): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::SetTimeoutOrInterval): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-07-06 Eric Carlson Reviewed by Darin Adler. Media controller can’t be used to scrub when movie is narrow — track is too narrow Do not show media controller time display elements when the a movie is too narrow. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield. * rendering/MediaControlElements.cpp: (WebCore::MediaControlTimeDisplayElement::MediaControlTimeDisplayElement): Give current time and time remaining controls a common base class. (WebCore::MediaControlTimeDisplayElement::setVisible): New method, hide and show the element. * rendering/MediaControlElements.h: * rendering/RenderMedia.cpp: (WebCore::RenderMedia::RenderMedia): Initialize m_previousVisible. (WebCore::RenderMedia::layout): Show/hide the time display elements as the movie width changes. (WebCore::RenderMedia::createCurrentTimeDisplay): (WebCore::RenderMedia::createTimeRemainingDisplay): Base class is now MediaControlTimeDisplayElement, not MediaControlElement. (WebCore::RenderMedia::shouldShowTimeDisplayControls): New, decide if time display elements should be visible or not. * rendering/RenderMedia.h: * rendering/RenderThemeMac.mm: (WebCore::): (WebCore::RenderThemeMac::paintMediaFullscreenButton): (WebCore::RenderThemeMac::paintMediaMuteButton): (WebCore::RenderThemeMac::paintMediaPlayButton): (WebCore::RenderThemeMac::paintMediaSeekBackButton): (WebCore::RenderThemeMac::paintMediaSeekForwardButton): (WebCore::RenderThemeMac::paintMediaSliderTrack): (WebCore::RenderThemeMac::paintMediaSliderThumb): (WebCore::RenderThemeMac::paintMediaRewindButton): (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): (WebCore::RenderThemeMac::paintMediaControlsBackground): (WebCore::RenderThemeMac::paintMediaCurrentTime): (WebCore::RenderThemeMac::paintMediaTimeRemaining): The 'state' parameter to wkDrawMediaUIPart is now an unsigned bitfield. 2009-07-06 David Kilzer Bug 27000: Minor clean up to runtime_root.{cpp|h} Reviewed by Geoff Garen. * bridge/runtime_root.cpp: Added blank line between license and the first #include statement. * bridge/runtime_root.h: Added comment to #endif. 2009-07-06 Roland Steiner Reviewed by Maciej Stachowiak. generalize the special height treatment for SVG (to be re-used for ruby): renamed InlineBox::m_isSVG to m_hasVirtualHeight renamed InlineBox::isSVG() to hasVirtualHeight() renamed InlineBox::setIsSVG() to setHasVirtualHeight() * rendering/InlineBox.cpp: (WebCore::InlineBox::height): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): (WebCore::InlineBox::isText): (WebCore::InlineBox::setIsText): (WebCore::InlineBox::isSVGRootInlineBox): (WebCore::InlineBox::hasVirtualHeight): (WebCore::InlineBox::setHasVirtualHeight): (WebCore::InlineBox::virtualHeight): * rendering/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createFlowBox): * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::createTextBox): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::createRootBox): * rendering/SVGInlineFlowBox.h: (WebCore::SVGInlineFlowBox::virtualHeight): * rendering/SVGInlineTextBox.h: (WebCore::SVGInlineTextBox::virtualHeight): * rendering/SVGRootInlineBox.h: (WebCore::SVGRootInlineBox::virtualHeight): 2009-07-06 Alice Liu Reviewed by Darin Adler. REGRESSION(r45285): focus rings are black on windows safari https://bugs.webkit.org/show_bug.cgi?id=26821 Add a mechanism for setting a custom focus ring color, and relocate the determination of focus ring color to base class RenderTheme. No new tests. Already-existing tests run in pixel mode would have caught this regression * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Move the responsibility of determining focus color to base class RenderTheme. * rendering/RenderTheme.cpp: (WebCore::customFocusRingColor): Added static local. (WebCore::RenderTheme::setCustomFocusRingColor): Added (WebCore::RenderTheme::focusRingColor): Use custom color over platform color. * rendering/RenderTheme.h: (WebCore::RenderTheme::platformFocusRingColor): default implementation, black color * rendering/RenderThemeSafari.cpp: (WebCore::RenderTheme::themeForPage): Circumstances that lead to returning the RenderThemeWin are the same under which we want to use the focus ring color from SafariTheme. (WebCore::RenderThemeSafari::platformFocusRingColor): Renamed from focusRingColor * rendering/RenderThemeSafari.h: Renaming focusRingColor to platformFocusRingColor in these files: * rendering/RenderThemeChromiumMac.h: * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::platformFocusRingColor): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::platformFocusRingColor): * rendering/RenderThemeChromiumSkia.h: * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::platformFocusRingColor): Cleanup leftover from removal of WebCore::Color in r45285 in these files: * WebCore.order: * platform/graphics/Color.h: 2009-07-06 Shinichiro Hamaji Reviewed by David Hyatt. Bug 15135: REGRESSION (r19843-r19850): Changing a flexbox's contents makes its container scroll to the top https://bugs.webkit.org/show_bug.cgi?id=15135 Delay updateing scroll bar of descendants of flexbox until their positions are determined. In this way we can prevent descendants of flexible boxes from changing positions of their scrollbars using tentative positions. Test: fast/flexbox/repaint-scrollbar.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::startDelayUpdateScrollInfo): (WebCore::RenderBlock::finishDelayUpdateScrollInfo): (WebCore::RenderBlock::updateScrollInfoAfterLayout): (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::layoutOnlyPositionedObjects): * rendering/RenderBlock.h: * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBox): (WebCore::RenderFlexibleBox::layoutVerticalBox): 2009-07-06 Hironori Bono Reviewed by Maciej Stachowiak. Make unconfirmed IME text affect textarea's value. This matches input and contentEditable elements as well IE and Firefox. This fixes https://bugs.webkit.org/show_bug.cgi?id=25061. Input elements would go down this code path because it would always get a null compositionNode from frame->editor(). Special casing compositionNodes is wrong because we explicitly want unconfirmed IME input in the textarea's value (assuming we want to match IE and Firefox here). This change is originally created by Ojan Vafai and I just changed its manual tests with an automated test on his behalf. Test: platform/mac/editing/input/text-control-ime-input.html * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::text): (WebCore::RenderTextControl::textWithHardLineBreaks): 2009-07-06 Anders Carlsson Reviewed by Adele Peterson. Add the ability for wheel events to latch to a node. * WebCore.base.exp: * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): (WebCore::EventHandler::clear): (WebCore::EventHandler::handleWheelEvent): * page/EventHandler.h: * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::wheelEvent): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2009-07-06 Nate Chapin Reviewed by Dimitri Glazkov. Fix a bunch of layout test crahses in Chromium caused by a bad usage of DEFINE_STATIC_LOCAL. https://bugs.webkit.org/show_bug.cgi?id=26997 * bindings/v8/V8Binding.cpp: (WebCore::v8ValueToWebCoreString): Use a regular static declaration instead of DEFINE_STATIC_LOCAL. 2009-07-06 Pavel Feldman Reviewed by Timothy Hatcher. WebInspector: suggest global properties based on async evaluation. https://bugs.webkit.org/show_bug.cgi?id=26976 Before this change, empty string was evaluated to the global object (or scope chain object) synchronously. This is now fixed and global object is evaluated using the same control flow. * inspector/front-end/Console.js: (WebInspector.Console.prototype.completions): (WebInspector.Console.prototype._evalInInspectedWindow): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._variablesInScope): 2009-07-06 Ojan Vafai Reviewed by Eric Seidel. Fix crash when indenting in an empty table cell. https://bugs.webkit.org/show_bug.cgi?id=26872 The crash is that we would call splitTreeToNode where the node and the nodeToSplitTo were the same node. Test: editing/execCommand/indent-empty-table-cell.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::splitTreeToNode): Added an assert in that node and nodeToSplitTo are different nodes to make this assumption explicit. * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::isAtUnsplittableElement): (WebCore::IndentOutdentCommand::indentRegion): * editing/IndentOutdentCommand.h: 2009-07-06 Nate Chapin Reviewed by David Levin. Upstream V8Binding and update some function names. https://bugs.webkit.org/show_bug.cgi?id=26857 * bindings/scripts/CodeGeneratorV8.pm: Update function names in auto-generated files. * bindings/v8/V8Binding.cpp: Upstreamed from src.chromium.org. * bindings/v8/V8Binding.h: Upstreamed from src.chromium.org. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::getListenerFunction): * bindings/v8/V8Proxy.cpp: (WebCore::handleConsoleMessage): (WebCore::V8Proxy::compileScript): (WebCore::V8Proxy::sourceName): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::handleConsoleMessage): * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::NAMED_PROPERTY_SETTER): * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8CustomXPathNSResolver.cpp: (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp: (WebCore::ACCESSOR_SETTER): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: (WebCore::removeElement): * bindings/v8/custom/V8SQLTransactionCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8WorkerContextCustom.cpp: (WebCore::SetTimeoutOrInterval): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-07-06 Gustavo Noronha Silva Reviewed by Jan Alonzo. Use soup's content sniffing https://bugs.webkit.org/show_bug.cgi?id=26982 Drop our hackish content sniffing code, and use the new libsoup feature to do that job for us. Testing this is in a cross-platform way is not obvious or possible while we are using platform-specific code for sniffing. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::gotHeadersCallback): (WebCore::contentSniffedCallback): (WebCore::gotChunkCallback): (WebCore::ResourceHandle::startHttp): 2009-07-05 Antonio Gomes Reviewed by Darin Adler. REGRESSION (r40499): fast/dom/cssTarget-crash.html fails https://bugs.webkit.org/show_bug.cgi?id=20342 Re-added code removed by commit r40499. Without this, both Qt and Mac were crashing while running the test. Note that this does not entirely fix the bug. It fixes the WebCore crash, but the test no longer seems to work due to loader changes. So this patch does not reenable the test. The test probably has to be rewritten. * dom/ContainerNode.cpp: (WebCore::ContainerNode::removedFromDocument): Re-added code to set the CSS target of the document to 0. 2009-07-05 Chris Marrin Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=26943 When one transition finishes slightly before another the longer one will fire a second time. This is because the second ImplicitAnmation object is culled too early, before its final RenderStyle is in place. This is done by cleanupFinishedAnimations() so I got rid of that method completely and now cleanup each transition or animation at the point where I am setting the final style, or when I detect that the transition or animation has been terminated early (which happens when you remove it from the style). Test: transitions/extra-transition.html * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::updateTransitions): (WebCore::CompositeAnimation::updateKeyframeAnimations): (WebCore::CompositeAnimation::animate): * page/animation/CompositeAnimation.h: * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::getTimeToNextEvent): Avoid a divide by zero if m_animation->duration() is zero, which can happen if the duration is changed to zero while the animation is running. 2009-07-05 Simon Fraser Revert the previous commit because it broke the animations/transition-and-animation-1.html testcase. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::getTimeToNextEvent): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::updateTransitions): (WebCore::CompositeAnimation::updateKeyframeAnimations): (WebCore::CompositeAnimation::animate): (WebCore::CompositeAnimation::cleanupFinishedAnimations): * page/animation/CompositeAnimation.h: 2009-07-05 Chris Marrin Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=26943 When one transition finishes slightly before another the longer one will fire a second time. This is because the second ImplicitAnmation object is culled too early, before its final RenderStyle is in place. This is done by cleanupFinishedAnimations() so I got rid of that method completely and now cleanup each transition or animation at the point where I am setting the final style, or when I detect that the transition or animation has been terminated early (which happens when you remove it from the style). Test: transitions/extra-transition.html * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::updateTransitions): (WebCore::CompositeAnimation::updateKeyframeAnimations): (WebCore::CompositeAnimation::animate): * page/animation/CompositeAnimation.h: * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::getTimeToNextEvent): Avoid a divide by zero if m_animation->duration() is zero, which can happen if the duration is changed to zero while the animation is running. 2009-07-05 Lars Knoll Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=26843 Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian. The Metrowerks compiler on the Symbian platform moves the globally defined Hashtables into read-only memory, despite one of the members being mutable. This causes crashes at run-time due to write access to read-only memory. Avoid the use of const with this compiler by introducing the JSC_CONST_HASHTABLE macro. Based on idea by Norbert Leser. * bindings/scripts/CodeGeneratorJS.pm: Use JSC_CONST_HASHTABLE for hash tables define in the bindings. 2009-07-05 Rob Buis Reviewed by Maciej Stachowiak. Bug 26897 - Dynamic SVG images do not display correctly https://bugs.webkit.org/show_bug.cgi?id=26897 Use repaint() to fix a rendering problem with a SVG image embedded in xhtml. Test: svg/custom/createImageElement2.xhtml * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::imageChanged): 2009-07-05 Xan Lopez Reviewed by Jan Alonzo. https://bugs.webkit.org/show_bug.cgi?id=26960 [Gtk] caret offset not updated when selecting text Report the caret offset from the end of the selection so it works correctly for multi-char selections too (ie, anything that is not the zero width caret). * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_text_get_caret_offset): 2009-07-05 Holger Hans Peter Freyther Unreviewed link fix for Qt. Fix Qt link error by adding two new localized strings In r45474 two new strings got added to LocalizedStrings.h add the definition of them to Qt. * platform/qt/Localizations.cpp: (WebCore::mediaElementLoadingStateText): (WebCore::mediaElementLiveBroadcastStateText): 2009-07-03 Darin Adler Reviewed by Adele Peterson. REGRESSION (r44670-r44680): Typing is suprisingly slow in password field on reddit.com https://bugs.webkit.org/show_bug.cgi?id=26959 rdar://problem/7029882 The code to handle iteration boundaries was malfunctioning when the boundary was at the edge of a shadow tree. This happens all the time with elements. It's not immediately obvious how to make a regression test for this since the symptom was a performance problem, not incorrect behavior. I'll add a test if I figure out a way to make one. * editing/TextIterator.cpp: (WebCore::parentCrossingShadowBoundaries): Renamed from parentOrShadowParent. (WebCore::depthCrossingShadowBoundaries): Updated for name change. (WebCore::nextInPreOrderCrossingShadowBoundaries): Added. (WebCore::previousInPostOrderCrossingShadowBoundaries): Added. (WebCore::setUpFullyClippedStack): Updated for name change. (WebCore::TextIterator::TextIterator): Updated for name change. Use nextInPreOrderCrossingShadowBoundaries instead of Range::pastLastNode to fix the bug. (WebCore::TextIterator::advance): Updated for name change. (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Tweaked formatting. (WebCore::SimplifiedBackwardsTextIterator::advance): Ditto. Changed code that initializes m_pastStartNode to use previousInPostOrderCrossingShadowBoundaries. (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Tweaked formatting. (WebCore::SimplifiedBackwardsTextIterator::exitNode): Ditto. 2009-07-03 Simon Fraser Reviewed by Sam Weinig. Background audio stops playing when JS GC runs https://bugs.webkit.org/show_bug.cgi?id=26956 Ensure we keep the Audio object around while it is playing, so that it doesn't get collected. Not testable because there's no way to know whether the audio keeps playing without holding a reference to it. * bindings/js/JSDOMBinding.cpp: (WebCore::isObservableThroughDOM): 2009-07-02 Xan Lopez Reviewed by Jan Alonzo. https://bugs.webkit.org/show_bug.cgi?id=26814 [Gtk] Caret-moved events are not issued for the correct offset when text is selected forward Report the caret offset from the end of the selection, otherwise we'll report the same offset when moving the caret while modififying the selection (eg, with Shift + Right). * editing/gtk/SelectionControllerGtk.cpp: (WebCore::SelectionController::notifyAccessibilityForSelectionChange): 2009-07-02 Xan Lopez Reviewed by Jan Alonzo. https://bugs.webkit.org/show_bug.cgi?id=26815 [Gtk] text-selection-changed events are not issued for the correct object when the selection spans multiple objects Get the focused node from the end of the selection, not the start, so we can detect when we cross object boundaries. * editing/gtk/SelectionControllerGtk.cpp: (WebCore::SelectionController::notifyAccessibilityForSelectionChange): 2009-07-02 Pierre d'Herbemont Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=26947 Fix the media controls hit tests. They may lose click events. Test cases already covered in the video-controls-zoomed tests. Don't trust wkHitTestMediaUIPart for the tests. We are accurate enough. * rendering/RenderThemeMac.h: Remove hitTestMediaControlPart. * rendering/RenderThemeMac.mm: Remove hitTestMediaControlPart. 2009-07-02 Roland Steiner Reviewed by Eric Seidel. RenderBlock and RenderInline have confusingly named object creation methods: RenderBlock::createRootBox/createRootInlineBox RenderInline::createFlowBox/createInlineFlowBox where the 2nd method in both cases just calls the first and then appends the created object. I therefore renamed those methods to something IMHO more informative: createRootBox() -> createRootInlineBox() createRootInlineBox() -> createAndAppendRootInlineBox(); createFlowBox() -> createInlineFlowBox(); createInlineFlowBox() -> createAndAppendInlineFlowBox(); https://bugs.webkit.org/show_bug.cgi?id=26828 * rendering/RenderBlock.cpp: (WebCore::RenderBlock::createRootInlineBox): (WebCore::RenderBlock::createAndAppendRootInlineBox): * rendering/RenderBlock.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::createInlineFlowBox): (WebCore::RenderInline::createAndAppendInlineFlowBox): * rendering/RenderInline.h: * rendering/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createInlineFlowBox): * rendering/RenderSVGInline.h: * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::createRootInlineBox): * rendering/RenderSVGText.h: * rendering/bidi.cpp: (WebCore::createInlineBoxForRenderer): 2009-07-02 Pavel Feldman Reviewed by Timothy Hatcher. WebInspector: Fix typo in the resource panel enabler caption. https://bugs.webkit.org/show_bug.cgi?id=26753 * English.lproj/localizedStrings.js: * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel): 2009-07-02 Erik Arvidsson Reviewed by Adam Roben. [Win] HTML5 Drag and drop, dragend is not fired when pressing Esc https://bugs.webkit.org/show_bug.cgi?id=26699 * manual-tests/drag-escape.html: Added. * page/EventHandler.cpp: (WebCore::EventHandler::dragSourceEndedAt): 2009-07-02 Pierre d'Herbemont Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=26944 Make sure we support full page zoom in video controls. This is tracked by a the video-controls-zoom test case. * css/mediaControlsQT.css: Make sure we don't have any inherited margin. * rendering/MediaControlElements.cpp: (WebCore::MediaControlElement::updateStyle): Propagate the style to the innertext. * rendering/RenderThemeMac.mm: Adjust the painting rect. (WebCore::getUnzoomedRectAndAdjustCurrentContext): (WebCore::RenderThemeMac::paintMediaSliderTrack): (WebCore::RenderThemeMac::paintMediaCurrentTime): (WebCore::RenderThemeMac::paintMediaTimeRemaining): 2009-07-02 Pierre d'Herbemont Fix the Gtk build after r45474. The localized strings should have been added there. * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::mediaElementLoadingStateText): (WebCore::mediaElementLiveBroadcastStateText): 2009-07-02 Pierre d'Herbemont Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=26939 Media controller is rendered badly at http://www.mozilla.com/en-US/firefox/video/firefox-3.5.html We fix two things: - We use px instead of em, because px is used everywhere else and because 0.09em hit the font size limit. - We use -webkit-box instead of inline-block because in strict mode inline-block has a different behavior. Test: media/controls-strict.html * css/mediaControlsQT.css: 2009-07-02 David Hyatt Reviewed by Dan Bernstein. TextIterator should use hasOverflowClip when checking for overflow instead of looking at the style. https://bugs.webkit.org/show_bug.cgi?id=26942 * editing/TextIterator.cpp: (WebCore::fullyClipsContents): 2009-07-02 Sam Weinig Reviewed by Dave Hyatt. Fix for Remove local .xhtml file workaround * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit): Work around is no longer necessary. 2009-07-02 Anders Carlsson Reviewed by Dan Bernstein. Sort, add functions used by WebKit. * WebCore.base.exp: 2009-07-02 Brady Eidson Rubberstamped by Sam Weinig. More of Safari 4.0 doesn't recognize text/plain files if their extension is unknown. * platform/network/mac/WebCoreURLResponse.mm: (webNSURLResponseMIMEType): Give Tiger a chance to query the UTI machinery. 2009-07-02 Adam Langley Reviewed by Eric Seidel. Chromium Linux: fix complex text rendering with line break characters. https://bugs.webkit.org/show_bug.cgi?id=26935 If the CSS white-space property is inhibiting line breaking, we might find end-of-line characters rendered via the complex text path. Fonts don't provide glyphs for these code points so, if we find one, we simulate the space glyph being interposed in this case. Because the input is variable-length per code point, we walk the input in step with the output. Covered by: LayoutTests/fast/text/international/bidi-linebreak-002.html LayoutTests/fast/text/international/bidi-linebreak-003.html LayoutTests/fast/text/international/hindi-whitespace.html * platform/graphics/chromium/HarfbuzzSkia.cpp: (WebCore::stringToGlyphs): 2009-07-02 Victor Wang Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=26521 Expose file size to chromium. Implement getFileSize() for Chromium. * platform/chromium/ChromiumBridge.h: * platform/chromium/FileSystemChromium.cpp: (WebCore::getFileSize): 2009-07-02 Nate Chapin Unreviewed, build fix. * bindings/v8/V8SVGPODTypeWrapper.h: Lost a space in nested template argument list. 2009-07-02 Simon Fraser Build fix: add missing #include. * platform/mac/ThemeMac.mm: 2009-07-02 Simon Fraser Reviewed by Dave Hyatt. ThemeMac::paintRadio() throws Obj-C exceptions when zoomed Add BEGIN_BLOCK_OBJC_EXCEPTIONS/END_BLOCK_OBJC_EXCEPTIONS guards around code that can possibly throw Objective-C exceptions when drawing Mac form controls. * platform/mac/ThemeMac.mm: (WebCore::paintCheckbox): (WebCore::paintRadio): (WebCore::paintButton): (WebCore::ThemeMac::inflateControlPaintRect): 2009-07-02 Nate Chapin Reviewed by David Levin. Upstream V8SVGPODTypeWrapper. https://bugs.webkit.org/show_bug.cgi?id=26907 * bindings/scripts/CodeGeneratorV8.pm: Update function being renamed in V8SVGPODTypeWrapper.h. * bindings/v8/V8SVGPODTypeWrapper.h: Upstreamed from src.chromium.org. 2009-07-02 Dumitru Daniliuc Reviewed by Dimitri Glazkov. Adds an abstraction layer between the DB classes and the file system, which allows us to add our own logic for storing, opening, deleting, etc. databases. The patch was tested using the tests in WebCore/storage. https://bugs.webkit.org/show_bug.cgi?id=26054 * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::open): Delegating the job of opening DB files to SQLiteFileSystem to allow use of custom VFSs. * platform/sql/SQLiteFileSystem.cpp: Added. * platform/sql/SQLiteFileSystem.h: Added. * platform/win/FileSystemWin.cpp: (WebCore::directoryName): Implemented. * storage/Database.cpp: (WebCore::Database::databaseSize): The code that returns the size of a DB file moved to SQLiteFileSystem. * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::DatabaseTracker): Added the ability to register a custom SQLite VFS. (WebCore::DatabaseTracker::trackerDatabasePath): DB file-related operations moved to SQLiteFileSystem. (WebCore::DatabaseTracker::openTrackerDatabase): DB file-related operations moved to SQLiteFileSystem. (WebCore::DatabaseTracker::originPath): DB file-related operations moved to SQLiteFileSystem. (WebCore::DatabaseTracker::fullPathForDatabase): DB file-related operations moved to SQLiteFileSystem. (WebCore::DatabaseTracker::usageForDatabase): DB file-related operations moved to SQLiteFileSystem. (WebCore::DatabaseTracker::deleteOrigin): DB file-related operations moved to SQLiteFileSystem. (WebCore::DatabaseTracker::deleteDatabaseFile): DB file-related operations moved to SQLiteFileSystem. * storage/OriginUsageRecord.cpp: (WebCore::OriginUsageRecord::diskUsage): DB file-related operations moved to SQLiteFileSystem. 2009-07-02 David Hyatt Reviewed by Simon Fraser. Always clip replaced elements to border radii. https://bugs.webkit.org/show_bug.cgi?id=26933 Make sure to always clip replaced elements to border radii, even when overflow is visible. Stop defaulting those elements to overflow:hidden in the UA sheet, since it is now no longer necessary. Covered by existing tests (since the UA default changing keeps the behavior exactly the same). * css/html.css: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): 2009-07-02 Jeremy Orlow Reviewed by Simon Fraser. convertFromScrollbarToContainingView and friends should be in ScrollView https://bugs.webkit.org/show_bug.cgi?id=26929 This is breaking Chromium's build because PopupMenuChromium inherits from ScrollView, but these functions are pure virtual in it. I could put it directly in PopupMenuChromium, but that seems a bit silly since the functions are fairly generic. Passes existing layout tests. * page/FrameView.cpp: Remove the 4 functions Hyatt just added (IntRect WebCore::FrameView::convertFromScrollbarToContainingView): (IntRect WebCore::FrameView::convertFromContainingViewToScrollBar): (IntPoint WebCore::FrameView::convertFromScrollbarToContainingView): (IntPoint WebCore::FrameView::convertFromContainingViewToScrollBar): * page/FrameView.h: ditto * platform/ScrollView.cpp: Move the 4 functions from FrameView here (IntRect WebCore::ScrollView::convertFromScrollbarToContainingView): (IntRect WebCore::ScrollView::convertFromContainingViewToScrollBar): (IntPoint WebCore::ScrollView::convertFromScrollbarToContainingView): (IntPoint WebCore::ScrollView::convertFromContainingViewToScrollBar): * platform/ScrollView.h: ditto 2009-07-02 Dirk Pranke Reviewed by Darin Fisher. Fix https://bugs.webkit.org/show_bug.cgi?id=26088 - TransparencyWin doesn't handle errors well at all; revise it to fail silently (drawing nothing), and bulletproof FontChromiumWin to handle the failure accordingly. Tests: fast/text/text-large-negative-letter-spacing-with-opacity.html fast/text/text-letter-spacing.html * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::Font::drawGlyphs): (WebCore::Font::drawComplexText): * platform/graphics/chromium/TransparencyWin.cpp: (WebCore::TransparencyWin::TransparencyWin): (WebCore::TransparencyWin::setupLayerForNoLayer): (WebCore::TransparencyWin::setupLayerForOpaqueCompositeLayer): (WebCore::TransparencyWin::setupLayerForWhiteLayer): (WebCore::TransparencyWin::setupTransformForKeepTransform): (WebCore::TransparencyWin::setupTransformForScaleTransform): (WebCore::TransparencyWin::initializeNewContext): (WebCore::TransparencyWin::compositeOpaqueComposite): (WebCore::TransparencyWin::compositeTextComposite): (WebCore::TransparencyWin::makeLayerOpaque): * platform/graphics/chromium/TransparencyWin.h: (WebCore::TransparencyWin::platformContext): 2009-07-02 Eric Carlson Change #import to #include to fix non-ObjC builds. * rendering/MediaControlElements.cpp: 2009-07-02 Anders Carlsson Build fix. * platform/network/mac/WebCoreURLResponse.mm: (mimeTypeFromUTITree): 2009-07-02 David Hyatt Reviewed by Simon Fraser. Fix for bug 22119, clicks in the scrollbars of transformed content don't work. Add new conversion methods for going across parent/child widget boundaries that can be implemented by the FrameView and ScrollbarClient to be transform-aware. Test cases added in platform/mac/fast/forms and platform/mac/fast/overflow. * WebCore.base.exp: * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseMoveEvent): * page/FrameView.cpp: (WebCore::FrameView::convertFromScrollbarToContainingView): (WebCore::FrameView::convertFromContainingViewToScrollbar): (WebCore::FrameView::convertFromRenderer): (WebCore::FrameView::convertToRenderer): (WebCore::FrameView::convertToContainingView): (WebCore::FrameView::convertFromContainingView): * page/FrameView.h: * platform/ScrollView.h: * platform/Scrollbar.cpp: (WebCore::Scrollbar::convertToContainingView): (WebCore::Scrollbar::convertFromContainingView): * platform/Scrollbar.h: * platform/ScrollbarClient.h: (WebCore::ScrollbarClient::convertFromScrollbarToContainingView): (WebCore::ScrollbarClient::convertFromContainingViewToScrollbar): * platform/Widget.cpp: (WebCore::Widget::convertFromContainingWindow): (WebCore::Widget::convertToContainingWindow): (WebCore::Widget::convertFromRootToContainingWindow): (WebCore::Widget::convertFromContainingWindowToRoot): (WebCore::Widget::convertToContainingView): (WebCore::Widget::convertFromContainingView): * platform/Widget.h: * platform/graphics/IntPoint.h: (WebCore::IntPoint::move): * platform/mac/WidgetMac.mm: (WebCore::Widget::convertFromRootToContainingWindow): (WebCore::Widget::convertFromContainingWindowToRoot): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::isPointInOverflowControl): * rendering/RenderDataGrid.cpp: (WebCore::RenderDataGrid::convertFromScrollbarToContainingView): (WebCore::RenderDataGrid::convertFromContainingViewToScrollbar): * rendering/RenderDataGrid.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::convertFromScrollbarToContainingView): (WebCore::RenderLayer::convertFromContainingViewToScrollbar): (WebCore::RenderLayer::scrollbarOffset): (WebCore::RenderLayer::hitTestOverflowControls): * rendering/RenderLayer.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::isPointInOverflowControl): (WebCore::RenderListBox::convertFromScrollbarToContainingView): (WebCore::RenderListBox::convertFromContainingViewToScrollbar): * rendering/RenderListBox.h: 2009-07-02 Dan Bernstein Reviewed by Dave Hyatt and Simon Fraser. - fix SPOD playing video in a div with a box shadow Test: fast/box-shadow/transform-fringing.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBoxShadow): Clip out the box even if it has an opaque background, but in that case, inset the clip path by 1 pixel, to avoid antialiasing artifacts. Do not inset the clip rect by 1 pixel if the CTM is purely a translation. Move the shadow-casting path away in the non-rounded-rect case (it was already being done in the rounded-rect case), to avoid a black fringe when the CTM is not purely a translation. 2009-07-02 Brady Eidson Reviewed by Sam Weinig. Safari 4.0 doesn't recognize text/plain files if their extension is unknown. Walk the CoreTypes UTI tree for extensions with unknown MIME types, using the first MIME type found. For many types of text files (such as source code files) this ends up being text/plain. * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Tweak the logging output. * platform/network/mac/WebCoreURLResponse.h: * platform/network/mac/WebCoreURLResponse.mm: (mimeTypeFromUTITree): (webNSURLResponseMIMEType): Use mimeTypeFromUTITree() to find a UTI-based MIME type for this file's extension. (-[NSURLResponse _webcore_reportedMIMEType]): Return the actual MIME type that CFNetwork gave us. 2009-07-02 Pierre d'Herbemont Reviewed by Simon Fraser. Add a rewind button and hide the timeline for live broadcasts when in MediaUI mode. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add the new pseudo element. * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Ditto. * css/CSSSelector.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto. * css/CSSValueKeywords.in: Ditto. * css/mediaControls.css: Ditto. * css/mediaControlsQT.css: Ditto. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::rewind): New. (WebCore::HTMLMediaElement::returnToRealTime): New. (WebCore::HTMLMediaElement::isStreaming): New. * html/HTMLMediaElement.h: * page/mac/WebCoreViewFactory.h: Declare mediaElementLoadingStateText and mediaElementLiveBroadcastStateText. * platform/LocalizedStrings.h: Add localized media state messages. * platform/ThemeTypes.h: Add the new pseudo element. * platform/mac/LocalizedStringsMac.mm: (WebCore::mediaElementLoadingStateText): Add localized media state. (WebCore::mediaElementLiveBroadcastStateText): Ditto. * platform/mac/WebCoreSystemInterface.h: Change BOOL param wkDrawMediaUIPart to an int to support multiple states. * platform/mac/WebCoreSystemInterface.mm: Ditto. * rendering/MediaControlElements.cpp: (WebCore::MediaControlElement::MediaControlElement): Deal with new elements. (WebCore::MediaControlElement::attachToParent): Ditto. (WebCore::MediaControlElement::update): Ditto. (WebCore::MediaControlElement::updateStyle): Ditto. (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto. (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): Ditto. (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto. (WebCore::MediaControlStatusDisplayElement::update): Ditto. (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto. (WebCore::MediaControlInputElement::MediaControlInputElement): Ditto. (WebCore::MediaControlInputElement::attachToParent): Ditto. (WebCore::MediaControlInputElement::updateStyle): Ditto. (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto. (WebCore::MediaControlRewindButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): Ditto. (WebCore::MediaControlTimelineElement::defaultEventHandler): Ditto. (WebCore::MediaControlTimelineElement::update): Ditto. (WebCore::MediaControlFullscreenButtonElement::rendererIsNeeded): Ditto. * rendering/MediaControlElements.h: Ditto. * rendering/RenderMedia.cpp: (WebCore::RenderMedia::styleDidChange): Deal with the new elements. (WebCore::RenderMedia::createPanel): Ditto. (WebCore::RenderMedia::createRewindButton): Ditto. (WebCore::RenderMedia::createReturnToRealtimeButton): Ditto. (WebCore::RenderMedia::createStatusDisplay): Ditto. (WebCore::RenderMedia::createTimelineContainer): Ditto. (WebCore::RenderMedia::createCurrentTimeDisplay): Ditto. (WebCore::RenderMedia::createTimeRemainingDisplay): Ditto. (WebCore::RenderMedia::updateControls): Ditto. (WebCore::RenderMedia::forwardEvent): Ditto. * rendering/RenderMedia.h: * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Deal with the new elements. * rendering/RenderTheme.h: (WebCore::RenderTheme::paintMediaRewindButton): Deal with the new elements. (WebCore::RenderTheme::paintMediaReturnToRealtimeButton): Ditto. (WebCore::RenderTheme::paintMediaControlsBackground): Ditto. * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMediaRewindButton): Deal with the new elements. (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto. (WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto. * rendering/style/RenderStyleConstants.h: Add constants for the new elements. 2009-07-01 John Abd-El-Malek Reviewed by Darin Fisher. Small refactoring of MessagePortChannel so that PlatformMessagePortChannel may be defined at the WebKit layer. https://bugs.webkit.org/show_bug.cgi?id=26905 * dom/MessageChannel.cpp: (WebCore::MessageChannel::MessageChannel): * dom/MessagePortChannel.cpp: * dom/MessagePortChannel.h: * dom/default/PlatformMessagePortChannel.cpp: (WebCore::MessagePortChannel::createChannel): (WebCore::MessagePortChannel::create): (WebCore::MessagePortChannel::MessagePortChannel): (WebCore::MessagePortChannel::~MessagePortChannel): 2009-07-01 Simon Fraser Reviewed by Dan Bernstein.