2009-07-27 Mark Rowe Merge r46449. Reviewed by Darin Adler. REGRESSION: Microsoft Messenger crashes during file send/receive due to use of WebKit on non-main thread Add a method for detecting if we're being used within Microsoft Messenger. * WebCore.base.exp: Export applicationIsMicrosoftMessenger and sort existing entries. * platform/mac/RuntimeApplicationChecks.h: * platform/mac/RuntimeApplicationChecks.mm: (WebCore::applicationIsMicrosoftMessenger): 2009-07-23 Mark Rowe Merge r46246. 2009-07-22 Oliver Hunt Reviewed by Adele Peterson. Null deref in JSObject::mark due to null xhr wrapper https://bugs.webkit.org/show_bug.cgi?id=27565 Make event target binding for appcache and xhr behave in the same way as it does for all other events. No test as I couldn't make a testcase which was remotely reliable. * bindings/js/JSEventTarget.cpp: (WebCore::toJS): 2009-07-20 Mark Rowe Merge r46039. 2009-07-17 Brady Eidson Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=26496 Let WebCore always enforce the connection-per-host limit itself. * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): 2009-07-16 Mark Rowe Merge r45979. 2009-07-16 Brady Eidson Reviewed by Antti Koivisto. Patch by Brady Eidson and Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=26496 Microsoft Outlook Web Access fails because XHR stream connection blocks script loading/revalidation After refreshing a page and when all CachedResources on that page are in validation mode, they got an exemption from the connection-per-host limit. Removing that exemption makes the test case load smoothly after reloads. * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): Remove the resourceIsCacheValidator exemption to the connection-per-host limit. 2009-07-15 Steve Falkenburg Merge r45892. 2009-07-14 Steve Falkenburg Reorganize JavaScriptCore headers into: API: include/JavaScriptCore/ Private: include/private/JavaScriptCore/ Reviewed by Darin Adler. * WebCore.vcproj/QTMovieWin.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/build-generated-files.sh: 2009-07-14 Mark Rowe Merge r45850. 2009-07-13 Simon Fraser Reviewed by Dan Bernstein. Image rendered as layer contents looks different from image rendered via CG. Fix a visible color profile difference between between images rendered via Core Graphics and those rendered via a compositing layer, by assigning the GenericRGB profile to untagged images (which come through as having the DeviceRGB profile) when they are set as layer contents. Test: compositing/color-matching/image-color-matching.html * platform/graphics/mac/GraphicsLayerCA.mm: (WebCore::GraphicsLayerCA::setContentsToImage): 2009-07-14 Mark Rowe Merge r45836. 2009-07-13 Sam Weinig Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=27234 Add null page check in HTMLDocument::hasFocus. Test: fast/dom/HTMLDocument/hasFocus-frameless-crash.html * html/HTMLDocument.cpp: (WebCore::HTMLDocument::hasFocus): Add page null check. (WebCore::HTMLDocument::createTokenizer): Cleanup page null check. 2009-07-14 Mark Rowe Merge r45832. 2009-07-13 Dan Bernstein Reviewed by Darin Adler. spellcheck="false" is ignored * editing/Editor.cpp: (WebCore::markMisspellingsOrBadGrammar): Moved code to check the spellcheck attribute from here... (WebCore::Editor::spellCheckingEnabledInFocusedNode): ...to here. (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Bail out if spell chcking is disabled by the spellcheck attribute. * editing/Editor.h: 2009-07-12 Mark Rowe Merge r45758. 2009-07-11 Eric Carlson Reviewed by Antti Koivisto. HTMLMediaElement.canPlayType "maybe" and "probably" reversed https://bugs.webkit.org/show_bug.cgi?id=27186 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::supportsType): Return "probably" if type has codecs parameter. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::supportsType): Ditto. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::supportsType): Ditto. 2009-07-12 Mark Rowe Merge r45755. 2009-07-11 Brady Eidson Reviewed by Mark Rowe. A worker-thread inspired follow-up for: https://bugs.webkit.org/show_bug.cgi?id=26496 and REGRESSION: XHR stream connection blocks iFrame loading and resource downloading * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::loadRequestAsynchronously): Don't perform the XHR compensation when the XHR is running on a worker thread. Accessing the global Cache data structures from a non-main thread is not currently supported. 2009-07-12 Mark Rowe Merge r45744. 2009-07-10 Eric Carlson Reviewed by Simon Fraser. . Update SnowLeopard media controller layout. * css/mediaControlsQT.css: Update for new layout. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::movieLoadType): Added to replace isStreaming. * html/HTMLMediaElement.h: Declare movieLoadType, remove isStreaming. * rendering/MediaControlElements.cpp: (WebCore::MediaControlStatusDisplayElement::update): Use movieLoadType instead of isStreaming. (WebCore::MediaControlTimelineContainerElement::rendererIsNeeded): MediaControlElement is the base class, not HTMLInputElement. (WebCore::MediaControlStatusDisplayElement::rendererIsNeeded): Ditto. (WebCore::MediaControlRewindButtonElement::rendererIsNeeded): Don't display rewind button for live streams. (WebCore::MediaControlReturnToRealtimeButtonElement::rendererIsNeeded): MediaControlInputElement is the base class, not HTMLInputElement. * rendering/MediaControlElements.h: * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::getMediaUIPartStateFlags): New, return wkDrawMediaUIPart flags. (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): Use getMediaUIPartStateFlags. 2009-07-12 Mark Rowe Merge r45734. 2009-07-10 Brady Eidson Style cleanup over my last patch. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::~XMLHttpRequest): 2009-07-12 Mark Rowe Merge r45733. 2009-07-10 Kevin McCullough Reviewed by Geoffrey Garen. * inspector/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::dynamicGlobalObject): * inspector/JavaScriptCallFrame.h: New helper method, used below. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::detach): In the special case where we detach from a window currently executing JavaScript, manually tear down our representation of the JavaScript call stack, since we won't get any more callbacks from JavaScriptCore to automatically tear it down. It's too bad that WebCore is responsible for this kind of tracking -- in the future, it would be nice if more of the breakpoint handling was inside of JavaScriptCore. 2009-07-12 Mark Rowe Merge r45732. 2009-07-10 Brady Eidson Reviewed by Antti Koivisto. https://bugs.webkit.org/show_bug.cgi?id=26496 and REGRESSION: XHR stream connection blocks iFrame loading and resource downloading With this test we ended up going over the maximum-connections-per-host limit that CFNetwork expected. When that happened, the first request that was over the limit ended up in a bizarre state where it wasn't fully serviced until after the long running XHR was complete. Loader and Loader::Host work together to try to not exceed the max-connection limit but non-cache resources - such as XHR - could still end up causing this limit to be exceeded. This fix adds a workaround specifically for XHR while we hash out a more thorough solution that will handle this at the resource handle level. * loader/loader.cpp: (WebCore::Loader::nonCacheRequestInFlight): (WebCore::Loader::nonCacheRequestComplete): (WebCore::Loader::Host::Host): (WebCore::Loader::Host::nonCacheRequestInFlight): (WebCore::Loader::Host::nonCacheRequestComplete): (WebCore::Loader::Host::servePendingRequests): Take nonCacheRequestsInFlight into account. * loader/loader.h: (WebCore::Loader::Host::processingResource): Take nonCacheRequestsInFlight into account. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): (WebCore::XMLHttpRequest::~XMLHttpRequest): (WebCore::XMLHttpRequest::loadRequestAsynchronously): Bump the nonCacheRequestInFlight count. (WebCore::XMLHttpRequest::didFail): Decrement that count if the Loader was notified. (WebCore::XMLHttpRequest::didFinishLoading): Ditto. 2009-07-12 Mark Rowe Merge r45728. 2009-07-10 Beth Dakin Reviewed by Anders Carlsson. The rest of the fix for REGRESSION (TOT): In Mail, a crash occurs at WebCore::Widget::afterMouseDown() after clicking To Do's close box Make the Widget* in passMouseDownEventToWidget() a RefPtr. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passMouseDownEventToWidget): 2009-07-12 Mark Rowe Merge r45721. 2009-07-10 Steve Falkenburg REGRESSION: Error about missing SwMenuX.dll opening pages with Shockwave Use altered search path while loading plug-ins. This modifies the DLL search order to look in the directory containing the plug-in even if a call to SetDllDirectory was previously made. Use of SetDllDirectory removes the current directory from the search path, breaking the previous strategy for locating any dependent DLLs of the plug-in. Reviewed by Jon Honeycutt. * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::load): Use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH 2009-07-12 Mark Rowe Merge r45715. 2009-07-10 Simon Fraser Reviewed by John Sullivan. Fix crash when changing the zoom level in http://iphone.akamai.com/ RenderLayerBacking's paintIntoLayer() method called updateLayerListsIfNeeded(), which could potentially destroy that compositing layer, causing a crash. Prevent this from happening by not doing a compositing update from paintIntoLayer(). The existing updateLayerListsIfNeeded() was renamed to updateCompositingAndLayerListsIfNeeded(), and still does the compositing update. The new updateLayerListsIfNeeded() does not touch compositing layers, and is still called from paintIntoLayer(). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::updateLayerListsIfNeeded): (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded): * rendering/RenderLayer.h: 2009-07-12 Mark Rowe Merge r45710. 2009-07-10 Dan Bernstein Reviewed by Simon Fraser. - fix https://bugs.webkit.org/show_bug.cgi?id=27137 REGRESSION (r44311): Reproducible crash due to infinite recursion into FrameLoader::gotoAnchor() -> FrameView::layout() Test: fast/loader/goto-anchor-infinite-layout.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::gotoAnchor): Moved the code to update layout, find the renderer to scroll to, and scroll from here to methods on FrameView, and replaced it with a call to FrameView::maintainScrollPositionAtAnchor(). (WebCore::FrameLoader::completed): Call maintainScrollPositionAtAnchor() instead of setLockedToAnchor(). * page/FrameView.cpp: (WebCore::FrameView::FrameView): Removed initialization of m_lockedToAnchor. (WebCore::FrameView::reset): Reset m_maintainScrollPositionAnchor instead of m_lockedToAnchor. (WebCore::FrameView::layout): Removed the code related to scrolling to the anchor from here, because scrolling can trigger events which invalidate the layout, and as such, belongs with the post-layout tasks. (WebCore::FrameView::maintainScrollPositionAtAnchor): Added. When called with a node scrolls the view to the top of that node and maintains it scrolled to the top of the node during subsequent layouts, until this function is called with 0 or other things trigger scrolling. (WebCore::FrameView::scrollRectIntoViewRecursively): Reset m_maintainScrollPositionAnchor. (WebCore::FrameView::setScrollPosition): Ditto. (WebCore::FrameView::scrollToAnchor): Added. Scrolls to the top of m_maintainScrollPositionAnchor, if it is set. (WebCore::FrameView::performPostLayoutTasks): Call scrollToAnchor(). (WebCore::FrameView::setWasScrolledByUser): Reset m_maintainScrollPositionAnchor. * page/FrameView.h: Removed lockedToAnchor(), setLockedToAnchor(), and m_lockedToAnchor. Added maintainScrollPositionAtAnchor() and m_maintainScrollPositionAnchor. 2009-07-10 Beth Dakin Roll text metrics change out * css/html.css: * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): * platform/graphics/SimpleFontData.h: * platform/graphics/mac/SimpleFontDataMac.mm: * platform/graphics/win/SimpleFontDataCGWin.cpp: * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::initGDIFont): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::calcPrefWidths): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::createInnerTextStyle): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::preferredContentWidth): 2009-07-11 Mark Rowe Disable channel messaging * Configurations/FeatureDefines.xcconfig: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/build-generated-files.sh: 2009-07-11 Mark Rowe Disable datagrid * Configurations/FeatureDefines.xcconfig: * WebCore.vcproj/WebCoreCommon.vsprops: * WebCore.vcproj/build-generated-files.sh: 2009-07-10 Simon Hausmann Reviewed by Holger Freyther. Enable HTML 5 Messaging to fix message channel Qt DRT failures in fast/events. * WebCore.pro: 2009-07-09 Roland Steiner Reviewed by Maciej Stachowiak. added InlineBox::isLeaf() firstLeafChild()/lastLeafChild() not virtual and not callable on InlineBox anymore. firstLeafChild()/lastLeafChild() will no longer return a node outside of the given subtree. Removed firstLeafChildAfterBox()/lastLeafChildBeforeBox() Removed potentially quadratic behavior if all nodes before/after a given box are empty InlineFlowBoxes Currently, these methods are called on RootInlineBox objects only, so above changes should not have any observable effect (only the removal of the square performance behavior could apply, but the conditions for that are probably of a rather theoretical nature). * rendering/InlineBox.cpp: (WebCore::InlineBox::nextLeafChild): (WebCore::InlineBox::prevLeafChild): * rendering/InlineBox.h: (WebCore::InlineBox::isLeaf): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::firstLeafChild): (WebCore::InlineFlowBox::lastLeafChild): * rendering/InlineFlowBox.h: (WebCore::InlineFlowBox::firstChild): (WebCore::InlineFlowBox::lastChild): (WebCore::InlineFlowBox::isLeaf): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::closestLeafChildForXPos): 2009-07-09 Roland Steiner Reviewed by Maciej Stachowiak. Added InlineBox::baselinePosition() and lineHeight() methods (adapted remaining code accordingly to use those methods) No change in functionality. * rendering/InlineBox.h: (WebCore::InlineBox::baselinePosition): (WebCore::InlineBox::lineHeight): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::adjustMaxAscentAndDescent): (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesVertically): 2009-07-09 Oliver Hunt Reviewed by Maciej Stachowiak. Bug 27142 - canPlayType() should return empty string for unsupported content Return "" instead of "no" for unsupport media types. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlayType): 2009-07-09 Roland Steiner Reviewed by Maciej Stachowiak. Implement the part of HTML5 spec that deals with parsing of and tags in that their end tags are optional if followed by /. Also specify a new accessibility role "annotation" for and . Affected code parts are not enclosed in #IF ENABLE(RUBY), since the parsing is not affected by whether ruby is rendered properly or not (in fact, it may be more profound without ruby layouting, since the contents of are not hidden). Test: fast/ruby/parse-rp.html * accessibility/AccessibilityObject.h: (WebCore::): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::roleValue): * html/HTMLElement.cpp: (WebCore::HTMLElement::endTagRequirement): (WebCore::HTMLElement::tagPriority): (WebCore::inlineTagList): * html/HTMLParser.cpp: (WebCore::HTMLParser::rpCreateErrorCheck): (WebCore::HTMLParser::rtCreateErrorCheck): (WebCore::HTMLParser::getNode): * html/HTMLParser.h: * html/HTMLTagNames.in: 2009-07-09 Dmitry Titov Not reviewed, fix for previous commit. The change http://trac.webkit.org/changeset/45695 did not correctly enabled GTL and QT build flags. This caused layout tests failure. This is speculative fix for those failures. * GNUmakefile.am: added ENABLE_CHANNEL_MESSAGING flag. * WebCore.pro: ditto. * page/DOMWindow.idl: touched to cause recompile. * workers/WorkerContext.idl: ditto. 2009-07-09 Drew Wilson Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=26903 Turned on CHANNEL_MESSAGING by default because the MessageChannel API is now implemented for Web Workers and is reasonably stable. Tests: fast/events/message-channel-gc-2.html fast/events/message-channel-gc-3.html fast/events/message-channel-gc-4.html fast/events/message-channel-gc.html fast/events/message-channel-listener-circular-ownership.html fast/events/message-port-clone.html fast/events/message-port-constructor-for-deleted-document.html fast/events/message-port-deleted-document.html fast/events/message-port-deleted-frame.html fast/events/message-port-inactive-document.html fast/events/message-port-no-wrapper.html fast/events/message-port.html fast/workers/worker-cloneport.html fast/workers/worker-messageport-gc.html fast/workers/worker-messageport.html * Configurations/FeatureDefines.xcconfig: Turned on ENABLE_CHANNEL_MESSAGING. * WebCore/WebCore.vcproj/WebCoreCommon.vsprops: ditto. * WebCore/WebCore.vcproj/build-generated-files.sh: ditto. * WebCore/page/DOMWindow.idl: touch the file to cause re-generation of headers. * WebCore/workers/WorkerContext.idl: ditto. 2009-07-09 Pierre d'Herbemont Reviewed by Simon Fraser. Full page zoom breaks remaining and elapsed time display in the