2009-06-24 Mark Rowe <mrowe@apple.com> Merge r44877. 2009-06-19 Geoffrey Garen <ggaren@apple.com> Reviewed by Maciej Stachowiak. An additional fix for Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected <https://bugs.webkit.org/show_bug.cgi?id=26532> | <rdar://problem/6625385> Use "NativeFunctionWrapper" instead of "PrototypeFunction" in cross-frame accessors, so the type of object you get to wrap a function is the same, regardless of whether the access to the function is cross-frame. This is faster and more idiomatic than what we had before. It also would have avoided Bug 26532 because it would have prevented a conflicting PrototypeFunction from being allocated to wrap postMessage, where a NativeFunctionWrapper had been allocated previously. * bindings/js/JSDOMBinding.cpp: (WebCore::objectToStringFunctionGetter): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::nonCachingStaticFunctionGetter): * bindings/js/JSHistoryCustom.cpp: (WebCore::nonCachingStaticBackFunctionGetter): (WebCore::nonCachingStaticForwardFunctionGetter): (WebCore::nonCachingStaticGoFunctionGetter): * bindings/js/JSLocationCustom.cpp: (WebCore::nonCachingStaticReplaceFunctionGetter): (WebCore::nonCachingStaticReloadFunctionGetter): (WebCore::nonCachingStaticAssignFunctionGetter): 2009-06-24 Mark Rowe <mrowe@apple.com> Merge r44941. 2009-06-22 Alexey Proskuryakov <ap@webkit.org> Reviewed by John Sullivan. <rdar://problem/6956606> REGRESSION (S4Beta -> Final): After the password is input, Japanese can't be input. WebKit uses a per-frame input context for most editable fields, and application's global context for password fields, manually controlling secure input state and the list of available input methods. We were setting TSMDocument property to disable non-Roman input methods after focus changed to a password field, but before selection was updated. This resulted in the property being applied to a wrong TSMDocument in some cases, because TSMGetActiveDocument() uses input context cached by +[NSApplication updateWindows], we change context based on selection, not on focus. * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry): Since there is only one context that we use for password fields - the global one - there is no need to get the active one. 2009-06-24 Mark Rowe <mrowe@apple.com> Merge r44940. 2009-06-22 David Levin <levin@chromium.org> Reviewed by David Hyatt and Eric Seidel. REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction. https://bugs.webkit.org/show_bug.cgi?id=26326 Test: scrollbars/scrollbar-crash-on-refresh.html * dom/Document.cpp: (WebCore::Document::detach): Gives the FrameView a change to do any necessary cleanup on Document::detach() which is where the renderArena gets detroyed. * page/FrameView.cpp: (WebCore::FrameView::detachCustomScrollbars): Gets rid of any custom scrollbars (if the docment supplied them). * page/FrameView.h: * platform/Scrollbar.h: (WebCore::Scrollbar::isCustomScrollbar): * rendering/RenderObject.cpp: (WebCore::RenderObject::destroy): Removed the check for document()->frame(). If frame() is 0 in this code, then the call to animation() is also incorrect (since it does document()->frame()->animation()). * rendering/RenderScrollbar.h: (WebCore::RenderScrollbar::isCustomScrollbar): 2009-06-24 Mark Rowe <mrowe@apple.com> Merge r44908. 2009-06-19 Alice Liu <alice.liu@apple.com> Fix https://bugs.webkit.org/show_bug.cgi?id=26568 Repro crash animating GIF if previously used in a closed window's back/forward list Also filed as <rdar://problem/6978362> Reviewed by Maciej Stachowiak. Can't test this bug with an automated layout test since it requires b/f caching * manual-tests/animated-gif-bfcache-crash.html: Added. * manual-tests/resources/containsAnimatedGif.html: Added. Adding checks for hostWindow() since there is no guarantee that the Page is alive * platform/ScrollView.cpp: (WebCore::ScrollView::scrollRectIntoViewRecursively): (WebCore::ScrollView::contentsToScreen): (WebCore::ScrollView::screenToContents): (WebCore::ScrollView::wheelEvent): 2009-06-24 Mark Rowe <mrowe@apple.com> Merge r44906. 2009-06-20 Sam Weinig <sam@webkit.org> Reviewed by Adam Barth. Fix for https://bugs.webkit.org/show_bug.cgi?id=26554 Shadowing of top and parent * page/DOMWindow.idl: 2009-06-23 Mark Rowe <mrowe@apple.com> Merge r44799. 2009-06-18 Chris Evans <scarybeasts@gmail.com> Reviewed by Adam Barth. Fix 8-digit long hex entities. Fixes bug 26454 https://bugs.webkit.org/show_bug.cgi?id=26454 Test: fast/parser/eightdigithexentity.html * html/HTMLTokenizer.cpp: fix off-by-ones. 2009-06-23 Mark Rowe <mrowe@apple.com> Merge r44749. 2009-06-16 Antti Koivisto <antti@apple.com> Reviewed by Brady Eidson. <rdar://problem/6660037> CrashTracer: [USER] 46 crashes in Safari at com.apple.WebCore • WebCore::CachedCSSStyleSheet::addClient + 53 When revalidating a resource, calling addClient() on one client might cause another to get removed. - made CachedResource::addClient() non-virtual and added virtual didAddClient() - in CachedResource::switchClientsToRevalidatedResource() add all clients to the client set of the revalidated resource first - check if the client is still in the set before invoking didAddClient() for it No test case, I didn't manage to construct one. You need some combination of 304 revalidation, stylesheets that reference each other via @imports and reloading. * WebCore.base.exp: * loader/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::didAddClient): * loader/CachedCSSStyleSheet.h: * loader/CachedFont.cpp: (WebCore::CachedFont::didAddClient): * loader/CachedFont.h: * loader/CachedImage.cpp: (WebCore::CachedImage::didAddClient): * loader/CachedImage.h: * loader/CachedResource.cpp: (WebCore::CachedResource::addClient): (WebCore::CachedResource::addClientToSet): (WebCore::CachedResource::switchClientsToRevalidatedResource): * loader/CachedResource.h: * loader/CachedScript.cpp: (WebCore::CachedScript::didAddClient): * loader/CachedScript.h: * loader/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::didAddClient): * loader/CachedXSLStyleSheet.h: 2009-06-23 Mark Rowe <mrowe@apple.com> Merge r44519. 2009-06-08 Brady Eidson <beidson@apple.com> Reviewed by Antti Koivisto <rdar://problem/6727495> Repro crash in WebCore::Loader::Host::servePendingRequests() and dupes. Test: http/tests/loading/deleted-host-in-resource-load-delegate-callback.html Loader::Host objects were manually managed via new/delete. There's a variety of circumstances where a Host might've been deleted while it was still in the middle of a resource load delegate callback. Changing them to be RefCounted then adding protectors in the callbacks makes this possibility disappear. At the same time, remove ProcessingResource which was an earlier fix for this same problem that wasn't fully implemented. * loader/loader.cpp: (WebCore::Loader::Loader): (WebCore::Loader::load): (WebCore::Loader::servePendingRequests): (WebCore::Loader::resumePendingRequests): (WebCore::Loader::cancelRequests): (WebCore::Loader::Host::didFinishLoading): (WebCore::Loader::Host::didFail): (WebCore::Loader::Host::didReceiveResponse): (WebCore::Loader::Host::didReceiveData): * loader/loader.h: (WebCore::Loader::Host::create): 2009-06-23 Mark Rowe <mrowe@apple.com> Merge r44266. 2009-05-29 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin. Bug 26024: AX: possible to fail assertion because AXPostNotification calls accessibilityIsIgnored https://bugs.webkit.org/show_bug.cgi?id=26024 AX notifications are posted after a one shot timer so that notifications are not performed mid-layout. Consolidated postNotification and postNotificationToElement into one method. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): (WebCore::AXObjectCache::notificationPostTimerFired): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AXObjectCache.h: (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::postPlatformNotification): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::postPlatformNotification): * dom/Document.cpp: (WebCore::Document::implicitClose): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): * editing/mac/SelectionControllerMac.mm: (WebCore::SelectionController::notifyAccessibilityForSelectionChange): * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setInnerTextValue): 2009-06-23 Mark Rowe <mrowe@apple.com> Merge r44124. 2009-05-25 Adam Barth <abarth@webkit.org> Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=26004 The origin for postMessage should follow lexical scope, not dynamic scope. Yes, this is a super-obscure corner case. Test: http/tests/security/postMessage/origin-follows-lexical-scope.html * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::postMessage): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-06-10 Mark Rowe <mrowe@apple.com> Merge r44591. 2009-06-10 Dan Bernstein <mitz@apple.com> Reviewed by Anders Carlsson. - fix <rdar://problem/6958664> REGRESSION (r42665): When I drag to pan a Google map in iPhoto Places, it drags a map tile instead Calling stopLoadRequest() from notifyFinished() removed the ScriptElementData from the CachedScript's client set, which could make it eligible for purging. The fix is to call removeClient() only after executing the script, which protects it from being purged while it is in the document's queue of scripts to execute soon. * dom/ScriptElement.cpp: (WebCore::ScriptElementData::execute): Call removeClient() here. (WebCore::ScriptElementData::notifyFinished): Instead of calling stopLoadRequest(), which calls removeClient(), just reset m_cachedScript. 2009-05-28 Mark Rowe <mrowe@apple.com> Merge r44218. 2009-05-27 Dan Bernstein <mitz@apple.com> Reviewed by Sam Weinig. - fix <rdar://problem/6927761> <isindex> placeholder text is unstylable and initially not visible Test: fast/forms/isindex-placeholder.html * css/html4.css: Added a default style for <isindex> placeholder text. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): Changed to call the new protected function updatePlaceholderVisibility(). * html/HTMLInputElement.h: (WebCore::HTMLInputElement::updatePlaceholderVisibility): Added this protected function to allow HTMLIsIndexElement::parseMappedAttribute() to invoke InputElement::updatePlaceholderVisibility(). * html/HTMLIsIndexElement.cpp: (WebCore::HTMLIsIndexElement::parseMappedAttribute): Call updatePlaceholderVisibility() when parsing the placeholder attribute. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::createInnerTextStyle): If there is no placeholder pseudo-element style, use the normal style. 2009-05-28 Mark Rowe <mrowe@apple.com> Merge r44241. 2009-05-28 Adam Roben <aroben@apple.com> Don't try to use the new combobox parts on Vista in Classic mode Fixes: <rdar://problem/6929277> REGRESSION (r42289+r42350): Windows Classic theme: drop down lists in Preferences get a line/square <rdar://problem/6929298> REGRESSION (r42289): Windows Classic: drop down lists are black with a circle on many sites Reviewed by Steve Falkenburg. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::paintMenuList): Only use the new combobox parts when we have a theme (i.e., when we're not in Classic mode). When we don't have a theme, fall back to the pre-r42289 code. 2009-05-28 Dan Bernstein <mitz@apple.com> Reviewed by Beth Dakin. - Windows build fix after r44178 * platform/graphics/win/SimpleFontDataCGWin.cpp: * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::initGDIFont): 2009-05-27 Mark Rowe <mrowe@apple.com> Merge r44189. 2009-05-27 John Sullivan <sullivan@apple.com> fixed <rdar://problem/6925482> repro crash in WebCore::DragController::dragExited dropping bookmarks (at least) over Top Sites (at least) Reviewed by Kevin Decker * page/DragController.cpp: (WebCore::DragController::dragExited): nil check m_documentUnderMouse and take the "local file" case if it's nil 2009-05-27 Mark Rowe <mrowe@apple.com> Merge r44181. 2009-05-26 Sam Weinig <sam@webkit.org> Reviewed by Brady Eidson. Fix for <rdar://problem/6916371> iWeb 'Announce' button does nothing after publishing to MobileMe Add ability to force content sniffing for all urls (including file: urls) * WebCore.base.exp: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::shouldContentSniffURL): (WebCore::ResourceHandle::forceContentSniffing): * platform/network/ResourceHandle.h: 2009-05-27 Mark Rowe <mrowe@apple.com> Merge r44170. 2009-05-26 Anders Carlsson <andersca@apple.com> Reviewed by Dan Bernstein. <rdar://problem/6901751> REGRESSION (r35515): Tiger crash painting the selection on registration page of car2go.com Don't use the WKCGContextIsSafeToClip function; it wasn't working correctly. Instead, just disable the improved selection drawing on Tiger. * WebCore.Tiger.exp: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipOutEllipseInRect): (WebCore::GraphicsContext::clipPath): (WebCore::GraphicsContext::addInnerRoundedRectClip): (WebCore::GraphicsContext::strokeRect): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::fillSelectionGaps): 2009-05-26 Beth Dakin <bdakin@apple.com> Rubber-stamped by Dan Bernstein and Darin Adler. Fix for <rdar://problem/6922919> Revert back to Safari 3 text control metrics calculations We're rolling this change out of the branch because we think it needs more bake time. * css/html4.css: * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::lineGap): * platform/graphics/mac/SimpleFontDataMac.mm: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::calcPrefWidths): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::createInnerTextStyle): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::preferredContentWidth): 2009-05-25 Mark Rowe <mrowe@apple.com> Merge r44136. 2009-05-25 Anders Carlsson <andersca@apple.com> Reviewed by Sam Weinig. - WebCore side of <rdar://problem/6914001>. Add a new m_allowPopupsFromPlugin flag. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::processingUserGesture): * bindings/js/ScriptController.h: (WebCore::ScriptController::setAllowPopupsFromPlugin): (WebCore::ScriptController::allowPopupsFromPlugin): 2009-05-25 Mark Rowe <mrowe@apple.com> Merge r44075. 2009-05-22 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. <rdar://problem/6916082> Incorrect handling of % as CSS value. Test: fast/css/percent-character-as-value.html * css/CSSGrammar.y: Make a stray % character reliably cause CSS parsing to succeed, but the CSS value to be ignored because of incorrect type. A type of 0 has this effect. 2009-05-25 Mark Rowe <mrowe@apple.com> Merge r44066. 2009-05-22 Jon Honeycutt <jhoneycutt@apple.com> <rdar://problem/6915957> REGRESSION: Hang when leaving page with VLC plug-in Reviewed by Steve Falkenburg. * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::determineQuirks): Look for the VLC plug-in's new name. 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r44031. 2009-05-21 Stephanie Lewis <slewis@apple.com> Reviewed by Mark Rowe. <rdar://problem/6913680> Update image caching options. Disable extra ImageIO cache because we already handle caching decoded image data. * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::imageSourceOptions): 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r44011. 2009-05-21 Dan Bernstein <mitz@apple.com> Reviewed by John Sullivan. - speculative fix for <rdar://problem/6890716> crash at FontCache::purgeInactiveFontData + 199 * platform/graphics/FontCache.cpp: (WebCore::FontCache::purgeInactiveFontData): Deleting a SimpleFontData can cause releaseFontData() to be called, which modifies gInactiveFontData. Therefore, avoid deleting SimpleFontData instances while iterating over gInactiveFontData and delete them afterwards. 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r44010. 2009-05-21 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. Test for <rdar://problem/6910832> | https://bugs.webkit.org/show_bug.cgi?id=25907 Incorrect URL returned to the DOM while the user drags a file * page/DragController.cpp: (WebCore::DragController::dragExited): (WebCore::DragController::tryDHTMLDrag): Don't base our decision on KURL, since that only looks at the text of the document's URL. Do base our decision on the securityOrigin(), which knows more about the document's actual origin. 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43993. 2009-05-21 Sam Weinig <sam@webkit.org> Reviewed by Brady Eidson and Mark Rowe. Fix for <rdar://problem/6901522> REGRESSION: Office 2008: Preview with browser is not shown, and Finder window is in the front of Safari If the NSURLRequest is annotated with a "ForceHTMLMIMEType" property, force the MIME type to be text/html. * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43880. 2009-05-19 Antti Koivisto <antti@apple.com> I can't figure out how to make this not timing dependent, making it manual test instead. * manual-tests/preload-scanner-entities.html: Added. 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43964. 2009-05-21 Dan Bernstein <mitz@apple.com> Reviewed by Anders Carlsson. - WebCore part of <rdar://problem/6901751> REGRESSION (r35515): Tiger crash painting the selection on registration page of car2go.com A bug in old versions of Core Graphics causes memory corruption to occur when clipping under certain conditions. Make the clipping functions fail silently under those conditions. Test: fast/block/float/selection-gap-clip-out-tiger-crash.html * WebCore.Tiger.exp: Added wkCGContextIsSafeToClip * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::safeCGContextClip): Added a wrapper around CGContextClip that, on Tiger, bails out if wkCGContextIsSafeToClip() returns false. (WebCore::safeCGContextEOClip): Ditto for CGContextEOClip. (WebCore::safeCGContextClipToRect): Ditto for CGContextClipToRect. (WebCore::GraphicsContext::fillPath): Changed to call the safe variants of CGContextClip, CGContextEOClip and CGContextClipToRect. (WebCore::GraphicsContext::strokePath): Ditto. (WebCore::GraphicsContext::fillRect): Ditto. (WebCore::GraphicsContext::clip): Ditto. (WebCore::GraphicsContext::clipOut): Ditto. (WebCore::GraphicsContext::clipOutEllipseInRect): Ditto. (WebCore::GraphicsContext::clipPath): Ditto. (WebCore::GraphicsContext::addInnerRoundedRectClip): Ditto. (WebCore::GraphicsContext::strokeRect): Ditto. * platform/mac/WebCoreSystemInterface.h: Added wkCGContextIsSafeToClip. * platform/mac/WebCoreSystemInterface.mm: Added wkCGContextIsSafeToClip. 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43951. 2009-05-20 Stephanie Lewis <slewis@apple.com> Update the order files. <rdar://problem/6881750> Generate new order files. * WebCore.order: 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43942. 2009-05-20 Sam Weinig <sam@webkit.org> Reviewed by Oliver Hunt. Fix for <rdar://problem/6905475> Office 2008: Entourage: Crash when you switch to "My Day" view The host function callback callObjCFallbackObject was not annotated with JSC_HOST_CALL which meant that when it was called by the JIT, which expects the JSC_HOST_CALL calling convention, the arguments are not in the expected places. * bridge/objc/objc_runtime.mm: (JSC::Bindings::callObjCFallbackObject): Added missing JSC_HOST_CALL annotation on callObjCFallbackObject. 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43949. 2009-05-20 Mark Rowe <mrowe@apple.com> Reviewed by Gavin Barraclough. Fix some assertion failures in plug-in tests on the Windows debug build bot. * plugins/PluginStream.cpp: (WebCore::PluginStream::startStream): Switch to using protocolIsJavaScript. * plugins/PluginView.cpp: (WebCore::scriptStringIfJavaScriptURL): Ditto. 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43929. 2009-05-20 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler. Fix <rdar://problem/6904941> and https://bugs.webkit.org/show_bug.cgi?id=25300 KURL parsing changes back in r30243 and r30815 made javascript urls that use the form "javascript://" be detected as invalid hierarchical URLs. When a KURL is marked as invalid, you can no longer ask it a question such as "is your protocol javascript?" Therefore FrameLoader wouldn't recognize them as javascript URLs and instead try to navigated to them. URL parsing rules aside, such URLs are in use in the wild (Microsoft's Virtual Earth being a high profile example) and actually represent valid javascript. Whenever checking for javascript urls, the new protocolIsJavaScript() should be used as it functions on a String which doesn't have to pass KURLs parsing rules. Test: fast/loader/javascript-url-hierarchical-execution.html * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::setValue): Use protocolIsJavaScript(). * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setLocation): Ditto. (WebCore::createWindow): Ditto. (WebCore::JSDOMWindow::open): Ditto. * bindings/js/JSElementCustom.cpp: (WebCore::allowSettingSrcToJavascriptURL): Ditto. * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::allowSettingJavascriptURL): Ditto. * bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc): Ditto. * bindings/js/JSLocationCustom.cpp: (WebCore::navigateIfAllowed): Ditto. (WebCore::JSLocation::reload): Ditto. * editing/markup.cpp: (WebCore::appendQuotedURLAttributeValue): Ditto. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseMappedAttribute): Ditto. * loader/FrameLoader.cpp: (WebCore::FrameLoader::requestFrame): Ditto. (WebCore::FrameLoader::submitForm): Ditto. (WebCore::FrameLoader::executeIfJavaScriptURL): Ditto. * platform/KURL.cpp: (WebCore::KURL::init): Use protocolIsJavaScript(). (WebCore::KURL::protocolIs): ASSERT that the protocol being asked about is not javascript. Such checks should go through protocolIsJavaScript() instead. (WebCore::encodeRelativeString): Use protocolIsJavaScript(). (WebCore::protocolIsJavaScript): * platform/KURL.h: 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43878. 2009-05-19 Brady Eidson <beidson@apple.com> Reviewed by Antti Koivisto. <rdar://problem/6886382> REGRESSION (Safari 4PB -> ToT): HTTP cache revalidation broken. This was caused in http://trac.webkit.org/changeset/41425, which fixed an image caching bug in QuickLooks (rdar://problem/6619630). We need to respect the DocumentLoader's request cache policy when deciding the cache policy for subresources, but the check (originally removed in r39304 and added back in in the same place in r41424) needs to be tweaked and relocated a bit. * loader/FrameLoader.cpp: (WebCore::FrameLoader::subresourceCachePolicy): Renamed from cachePolicy(). Move checking the DocumentLoader's request to a more appropriate place. Add code to handle the recently added FIXME regarding POSTs. Add a new FIXME describing a great way to make this code cleaner in the future. * loader/FrameLoader.h: * loader/DocLoader.cpp: (WebCore::DocLoader::cachePolicy): Calls the newly renamed subresourceCachePolicy(). 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43876. 2009-05-19 Antti Koivisto <antti@apple.com> Reviewed by Darin Adler. <rdar://problem/6902674> REGRESSION: Query parameters are sometimes incorrect in URL (23135) Push characters back in correct order when entity parsing fails after 3 characters. Test: fast/tokenizer/preload-scanner-entities.html * html/PreloadScanner.cpp: (WebCore::PreloadScanner::consumeEntity): 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43869. 2009-05-19 Timothy Hatcher <timothy@apple.com> <rdar://problem/6889218> REGRESSION: Some iChat transcript resources are not loaded because willSendRequest doesn't happen immediately Reviewed by Antti Koivisto. * WebCore.base.exp: Export Loader::servePendingRequests(). 2009-05-21 Mark Rowe <mrowe@apple.com> Merge r43866. 2009-05-19 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler and Brady Eidson. REGRESSION (r42446?): UA Profiler in http://stevesouders.com/ua/ stalls The problem was that Document::removeAllEventListeners() was called for a wrong document when a CachedFrame was destroyed. Cannot be tested automatically, because DRT doesn't have a b/f cache. * dom/Document.cpp: (WebCore::Document::domWindow): Make sure that this doesn't return an unrelated window even if document's m_frame pointer is stale. * history/CachedFrame.cpp: (WebCore::CachedFrame::clear): Added a FIXME about strange behavior. 2009-05-18 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. <rdar://problem/6881160> REGRESSION (r41425): Unable to create battle.net account due to CAPTCHA failure. The problem was that after loading and displaying a CAPTCHA image, it was loaded from the server again due to preloading. So, the server expected the last loaded (invisible) CAPTCHA text to be typed and posted back. I don't know how to make tests for preloading. * loader/DocLoader.cpp: (WebCore::DocLoader::checkForPendingPreloads): There is never a reason to preload after loading for real - and if cache policy is CachePolicyReload, that actually results in another load from network layer. * loader/FrameLoader.cpp: (WebCore::FrameLoader::cachePolicy): It's not good for cachePolicy() to lie, but I don't know how to re-do r41425 properly. Added a FIXME. 2009-05-18 Ariya Hidayat <ariya.hidayat@nokia.com> Reviewed by Simon Hausmann. Done together with Balazs Kelemen <kelemen.balazs@stud.u-szeged.hu>. https://bugs.webkit.org/show_bug.cgi?id=24551 [Qt] Reuse FontPlatformData for the same FontDescription. This effectively prevents growing heap usage for loading every web page. * platform/graphics/qt/FontCacheQt.cpp: (WebCore::qHash): Necessary for FontPlatformDataCache. (WebCore::FontCache::getCachedFontPlatformData): Reuse the instance if it exists, otherwise create a new one and insert it in the cache. 2009-05-18 Balazs Kelemen <kelemen.balazs@stud.u-szeged.hu> Reviewed by Ariya Hidayat. https://bugs.webkit.org/show_bug.cgi?id=24551 [Qt] Fix the leak in FontFallbackList::fontDataAt() function. When creating a new instance of SimpleFontData, put it in the font list so that it can deleted later on. * platform/graphics/qt/FontFallbackListQt.cpp: (WebCore::FontFallbackList::invalidate): (WebCore::FontFallbackList::releaseFontData): (WebCore::FontFallbackList::fontDataAt): 2009-05-15 Jan Michael Alonzo <jmalonzo@webkit.org> Reviewed by Xan Lopez. [Gtk] Various autotools build refactoring and fixes https://bugs.webkit.org/show_bug.cgi?id=25286 Style fixes * GNUmakefile.am: 2009-05-17 George Staikos <george.staikos@torchmobile.com> Not reviewed - build fix. Fix typo: constr -> const. * wml/WMLInputElement.h: (WebCore::WMLInputElement::setPlaceholder): 2009-05-17 Darin Adler <darin@apple.com> Fix done by Simon Fraser (reviewed by me). <rdar://problem/6893775> Page with screen-only stylesheet with overflow and height transitions has bad layout and overlapping garbled text when printing * manual-tests/print-with-height-transition-in-screen-stylesheet.html: Added. * page/animation/AnimationController.cpp: (WebCore::AnimationController::updateAnimations): Don't run transitions when printing. 2009-05-17 Darin Adler <darin@apple.com> Reviewed by Simon Fraser. <rdar://problem/6870241> REGRESSION: Programmatically selected popup menu item not shown * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setSelectedIndex): Added a call to updateFromElement and also a type check on the selected index to avoid a bad cast to HTMLOptionElement. * manual-tests/select-option-in-onload.html: Added. 2009-05-17 Simon Fraser <simon.fraser@apple.com> Reviewed by Anders Carlsson Rename local variables for readability. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBorder): 2009-05-17 Darin Adler <darin@apple.com> Reviewed by Mark Rowe. Bug 25840: fix some warnings seen on the GTK bot https://bugs.webkit.org/show_bug.cgi?id=25840 * platform/ScrollView.cpp: (WebCore::ScrollView::platformScrollbarModes): Initialize results here. This is really just to quiet warnings. I think this code is unreachable. Someone could put ASSERT_NOT_REACHED() in here too at some point. * plugins/PluginStream.cpp: (WebCore::PluginStream::startStream): Use proper printf format for int here, %d, not %lu. This could cause a real problem when compiled 64-bit, so it's good to fix. * rendering/RenderTextControl.cpp: (WebCore::getNextSoftBreak): Initialize breakOffset to 0 here. This is really just to quiet the warning, but still seems like a good idea. 2009-05-17 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. Bug 25769: Fix accessibility warnings on GTK https://bugs.webkit.org/show_bug.cgi?id=25769 * page/AccessibilityTable.cpp: (WebCore::AccessibilityTable::columnCount): Get rid of excess const. (WebCore::AccessibilityTable::rowCount): Ditto. * page/AccessibilityTable.h: Ditto. 2009-05-17 Kai Brüning <kai@granus.net> Reviewed by Darin Adler. bug 25822: DOM normalize does not remove empty text node between element nodes https://bugs.webkit.org/show_bug.cgi?id=25822 Test: fast/dom/Node/normalize.html * dom/Node.cpp: (WebCore::Node::normalize): Changed to remove any empty text nodes. 2009-05-16 Dave Moore <davemoore@google.com> Reviewed by Darin Adler. Allow Strings to be created with one malloc node with no copying https://bugs.webkit.org/show_bug.cgi?id=25779 Add new methods to String and StringImpl, refactoring existing methods in StringImpl to use new createUninitialized() method. * platform/text/PlatformString.h: (WebCore::String::createUninitialized): * platform/text/StringImpl.cpp: (WebCore::StringImpl::createUninitialized): (WebCore::StringImpl::create): * platform/text/StringImpl.h: 2009-05-16 Mark Rowe <mrowe@apple.com> Reviewed by Darin Adler. <rdar://problem/6827041> WebCore should stop throwing away the CGImageSourceRef to dramatically improve animated GIF decoding performance Recent versions of ImageIO discard previously decoded image frames if the client application no longer holds references to them, so there's no need to throw away the decoder unless we're explicitly asked to destroy all of the frames. This drops peak CPU usage when displaying <http://www.aintitcool.com/files/HoD2.gif> from over 90% to below 3%. * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::clear): 2009-05-16 Dan Bernstein <mitz@apple.com> Reviewed by Alexey Proskuryakov. - fix <rdar://problem/6873305> Two distinct characters are not displayed correctly with 2 of the font selections from the stickies widget Test: platform/mac/editing/pasteboard/text-precomposed.html Ensure that "text/plain" data retrieved from the clipboard is always precomposed. This makes Clipboard::getData() and Pasteboard::documentFragment() consistent with Pasteboard::plainText() and -[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]. * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::getData): * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::documentFragment): 2009-05-16 Mark Rowe <mrowe@apple.com> Build fix. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForFamily): Declare valueForFamily as static. 2009-05-15 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. <rdar://problem/6883872> REGRESSION (r43243): computed style for font-family is returning only the generic font, if any generic font is in the family list Test: fast/css/getComputedStyle/computed-style-font-family.html * css/CSSComputedStyleDeclaration.cpp: Sorted computedProperties alphabetically. Added CSSPropertyClip and CSSPropertyWordBreak. (WebCore::identifierForFamily): Added. Maps internal font family names to identifiers. (WebCore::valueForFamily): Added. Creates either an identifier or a string as appropriate. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Implemented the font-family property as specified in the CSS standard. Fixed clip to return "auto" when there is no clip set instead of nothing at all. Gave inheritableProperties and numInheritableProperties internal linkage since there was no reason for them to have external linkage. 2009-05-15 Adam Barth <abarth@webkit.org> Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=25741 Append instead of throwing when insertItemBefore gets an out-of-bound index. Test: svg/dom/svglist-insertItemBefore-appends.html * svg/SVGList.h: (WebCore::SVGList::insertItemBefore): 2009-05-15 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=25829 Fix -webkit-background-clip:text when the renderer had a non (0,0) x, y offset. Test: fast/backgrounds/background-clip-text.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): 2009-05-15 Dan Bernstein <mitz@apple.com> Reviewed by Sam Weinig. - fix <rdar://problem/6888244> REGRESSION: Using the Up or Down keyboard arrows, I can't navigate caret between To Do items in a Note message Test: editing/selection/move-by-line-004.html * editing/visible_units.cpp: (WebCore::enclosingNodeWithNonInlineRenderer): Added this helper function. (WebCore::previousLinePosition): When advancing to the next candidate node, stop when leaving the closest ancestor of the original node that is not an inline. The code, incorrectly, was trying to exit the closest ancestor of that type which was editable, and therefore missing other blocks in the same editable root. (WebCore::nextLinePosition): Ditto. 2009-05-15 Fridrich Strba <fridrich.strba@bluewin.ch> Reviewed by Jan Alonzo. Converting filename to uri by concatenating strings is broken on Windows. So, don't do it for that platform. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::startGio): 2009-05-15 Nate Chapin <japhet@google.com> Reviewed by Dimitri Glazkov. Upstream V8 bindings for HTMLOptionsCollection and HTMLSelectElementCollection. https://bugs.webkit.org/show_bug.cgi?id=25739 * bindings/v8/V8Collection.cpp: Added. (WebCore::toOptionsCollectionSetter): Moved from v8_custom.cpp. * bindings/v8/V8Collection.h: Added prototype for toOptionsCollectionSetter(). * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::INDEXED_PROPERTY_SETTER): Moved from v8_custom.cpp. * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp: Added. (WebCore::NAMED_PROPERTY_GETTER): Moved from v8_custom.cpp. (WebCore::INDEXED_PROPERTY_SETTER): Moved from v8_custom.cpp. 2009-05-15 David Kilzer <ddkilzer@apple.com> <rdar://problem/6649936> Add *.exp export files to WebCore Xcode project Reviewed by Darin Adler and Timothy Hatcher. * WebCore.xcodeproj/project.pbxproj: Added Exports group, moved WebCore.base.exp into the group, and added 10 other *.exp files in WebCore. 2009-05-15 Dimitri Glazkov <dglazkov@chromium.org> Unreviewed, build fix. https://bugs.webkit.org/show_bug.cgi?id=25826 Change type to only have custom getter in JCS. * html/HTMLInputElement.idl: Changed CustomGetter attribute to JSCCustomGetter. 2009-05-15 Antti Koivisto <antti@apple.com> Reviewed by Dave Kilzer. Add a settings entry to en/disable web font support https://bugs.webkit.org/show_bug.cgi?id=25239 * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): 2009-05-15 Sam Weinig <sam@webkit.org> Reviewed by Steve Falkenburg. Remove dead youtube site specific hack that was commented out. * bindings/js/JSNavigatorCustom.cpp: * page/Navigator.idl: 2009-05-15 Sam Weinig <sam@webkit.org> Reviewed by Beth Dakin. Fix for https://bugs.webkit.org/show_bug.cgi?id=25826 <rdar://problem/6884742> REGRESSION: In Gmail's Edit Link dialog, I can't type in the Link To: field (due to <input type=url> support) Added a site specific quirk for mail.google.com which returns "text" when getting the type of an <input type=url> * bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::needsGmailQuirk): (WebCore::JSHTMLInputElement::type): * html/HTMLInputElement.idl: 2009-05-14 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25810 Upstream V8 DOM Wrapper map declarations. No behavior change, so no tests. * bindings/v8/V8DOMMap.h: (WebCore::WeakReferenceMap::WeakReferenceMap): Added. (WebCore::WeakReferenceMap::~WeakReferenceMap): Added. (WebCore::WeakReferenceMap::get): Added. (WebCore::WeakReferenceMap::set): Added. (WebCore::WeakReferenceMap::forget): Added. (WebCore::WeakReferenceMap::contains): Added. (WebCore::WeakReferenceMap::impl): Added. (WebCore::DOMWrapperMap::DOMWrapperMap): Added. 2009-05-15 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=25773 Rename GraphicsLayer::graphicsContextsFlipped() to GraphicsLayer::compositingCoordinatesOrientation() in order to clarify the usage. Clean up code around the GraphicsLayer "contents" layer that makes use of this flag, by removing the setHasContentsLayer() method, and just using setContentsLayer(), which can then always do the flipping if necessary. Only affects ACCELERATED_COMPOSITING builds. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::): * platform/graphics/mac/GraphicsLayerCA.h: (WebCore::GraphicsLayerCA::contentsLayer): * platform/graphics/mac/GraphicsLayerCA.mm: (WebCore::GraphicsLayer::compositingCoordinatesOrientation): (WebCore::GraphicsLayerCA::setBackgroundColor): (WebCore::GraphicsLayerCA::clearBackgroundColor): (WebCore::GraphicsLayerCA::setContentsToImage): (WebCore::GraphicsLayerCA::clearContents): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): (WebCore::GraphicsLayerCA::setContentsLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): 2009-05-15 Chris Marrin <cmarrin@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25765 Avoid calling setNeedsStyleRecalc() when we are putting an animated page in the cache. This avoids the assert and subsequent problems with a dirty page going into the cache. * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::endAnimation): 2009-05-15 Francisco Tolmasky <francisco@280north.com> BUG 25467: JavaScript debugger should use function.displayName as the function's name in the call stack <https://bugs.webkit.org/show_bug.cgi?id=25467> Reviewed by Adam Roben. * inspector/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::functionName): Use calculatedFunctionName which takes into account displayName * inspector/front-end/CallStackSidebarPane.js: Remove "|| anonymous function" since it is handled internally just like in profiles (WebInspector.CallStackSidebarPane.prototype.update): 2009-05-15 Alexey Proskuryakov <ap@webkit.org> Windows build fix (and a matching Mac change, to avoid unnecessarily diverging the implementations). * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::start): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): Check strings with isEmpty(), not relying on any implicit conversions. 2009-05-15 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler, Brady Eidson and Eric Carlson. <rdar://problem/6875643> REGRESSION: Unable to download file with FTP URL that includes username and password (Lightwave 9.6 for Mac from Newtek site) CFNetwork only invokes didReceiveAuthenticationChallenge for HTTP requests. Credentials for other protocols (including FTP) should be included as part of the URL. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::start): (WebCore::WebCoreSynchronousLoader::load): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Put credentials in URL for non-HTTP requests. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest): Bail out quickly if the URL is non-HTTP. Cross-origin requests require specific HTTP headers to be received, so they cannot work with other protocols. 2009-05-15 Ariya Hidayat <ariya.hidayat@nokia.com> Reviewed by Holger Freyther. [Qt] In the image decoder, remove the raw image data represented as QImage once the image is converted to QPixmap and inserted in the pixmap cache. This effectively reduces the heap usage when running on graphics system other than raster (i.e the case where QImage != QPixmap). * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::imageAtIndex): Nullified the image on purpose. * platform/graphics/qt/ImageDecoderQt.h: Made m_imageList mutable. 2009-05-15 Ariya Hidayat <ariya.hidayat@nokia.com> Reviewed by Holger Freyther. [Qt] Refactor alpha channel detection the image decoder. Sets the boolean flag as soon as the image is being read. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::ImageDecoderQt): Initialized m_hasAlphaChannel. (WebCore::ImageDecoderQt::setData): Set the flag when appropriate. (WebCore::ImageDecoderQt::supportsAlpha): Simplified. (WebCore::ImageDecoderQt::reset): Resetted the flag. * platform/graphics/qt/ImageDecoderQt.h: Added m_hasAlphaChannel. 2009-05-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Darin Adler. Finish support for disabling the JavaScript Debugger and Profiler at compile time in WebCore https://bugs.webkit.org/show_bug.cgi?id=24917 * bindings/js/JSInspectorControllerCustom.cpp: ENABLE_JAVASCRIPT_DEBUGGER guard * bindings/js/JSJavaScriptCallFrameCustom.cpp: Ditto. * inspector/JavaScriptCallFrame.cpp: Ditto. * inspector/JavaScriptCallFrame.h: Ditto. * inspector/JavaScriptCallFrame.idl: Ditto. * inspector/JavaScriptDebugListener.h: Ditto. * inspector/JavaScriptDebugServer.cpp: Ditto. * inspector/JavaScriptDebugServer.h: Ditto. * inspector/JavaScriptProfile.cpp: Ditto. * inspector/JavaScriptProfile.h: Ditto. * inspector/JavaScriptProfileNode.cpp: Ditto. * inspector/JavaScriptProfileNode.h: Ditto. * page/Console.cpp: Use guard ENABLE(JAVASCRIPT_DEBUGGER) instead of USE(JSC) * page/Console.h: Ditto. * page/Console.idl: Use guard ENABLE(JAVASCRIPT_DEBUGGER) instead of !defined(V8_BINDING) 2009-05-15 Jungshik Shin <jshin@chromium.org> Reviewed by Dimitri Glazkov http://bugs.webkit.org/show_bug.cgi?id=25464 Improve the font fallback for characters belonging to 'common' scripts in ChromiumWin port. Make characters like Danda, Double Danda (punctuation marks in North Indian scripts) and currency signs (e.g. Thai Baht) rendered correctly in Chromium on Win. Tests: fast/text/international/danda-space.html fast/text/international/thai-baht-space.html * platform/graphics/chromium/FontUtilsChromiumWin.cpp: (WebCore::FontMap::getScriptBasedOnUnicodeBlock): (WebCore::FontMap::getScript): (WebCore::getFallbackFamily): 2009-05-15 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=25731 [Qt] Cleanup - move files exclusive to XPATH and XSLT under the appropriate build section * WebCore.pro: 2009-05-14 Evan Martin <evan@chromium.org> Reviewed by Eric Seidel and Darin Fisher. Fix a font-related leak in Chromium's Skia backend found by Valgrind. https://bugs.webkit.org/show_bug.cgi?id=25760 * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): Use caches instead of "new" on every call. 2009-05-14 Rahul Kuchhal <kuchhal@chromium.org> Reviewed by Eric Seidel. Initialize m_spreadMethod in the second constructor too. Not sure if a test case can be written, so no test case. https://bugs.webkit.org/show_bug.cgi?id=25814 No test possible: spreadMethod() is only used by SVG, doesn't seem possible to hit this case, since several other SVG tests already should be calling spreadMethod(). * platform/graphics/Gradient.cpp: (WebCore::Gradient::Gradient): 2009-05-14 Simon Fraser <simon.fraser@apple.com> No review. Fix Windows build after renaming MediaControlElements to MediaControlElementType. * rendering/RenderMediaControls.cpp: (WebCore::RenderMediaControls::paintMediaControlsPart): * rendering/RenderMediaControls.h: 2009-05-14 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler <rdar://problem/6739671> Movie controller’s play button does not change into a pause button Fix a controls repaint issue when the playing state of a video changes by educating the MediaControlInputElements about the state they are currently displaying, and making them repaint when that state changes. This applies to the play/pause and mute/unmute buttons, which both have two states. * rendering/MediaControlElements.cpp: (WebCore::MediaControlInputElement::MediaControlInputElement): (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Pass in and initialize the MediaControlElementType. (WebCore::MediaControlInputElement::update): Update the display type too (WebCore::MediaControlInputElement::setDisplayType): (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): (WebCore::MediaControlMuteButtonElement::updateDisplayType): Choose muted vs. unmuted display. (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): (WebCore::MediaControlPlayButtonElement::updateDisplayType): Choose play vs. paused display. * rendering/MediaControlElements.h: Renamed the MediaControlElements enum to MediaControlElementType. (WebCore::MediaControlInputElement::updateDisplayType): Add a MediaControlElementType member variable with a setter to allow the element to know what type it is displaying. 2009-05-14 Dean Jackson <dino@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25197 Add support for aspect-ratio and orientation media queries. Tests: fast/media/mq-aspect-ratio.html fast/media/mq-orientation.html * css/MediaFeatureNames.h: * css/MediaQueryEvaluator.cpp: (WebCore::orientationMediaFeatureEval): (WebCore::aspect_ratioMediaFeatureEval): (WebCore::min_aspect_ratioMediaFeatureEval): (WebCore::max_aspect_ratioMediaFeatureEval): * css/MediaQueryExp.h: (WebCore::MediaQueryExp::isViewportDependent): 2009-05-14 Kevin McCullough <kmccullough@apple.com> - Resubmitting previous patch, correctly this time. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::splitTreeToNode): * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::outdentParagraph): 2009-05-14 Kevin McCullough <kmccullough@apple.com> - Rolling out to fix a bug and the build * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::splitTreeToNode): * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::outdentParagraph): 2009-05-14 Kevin McCullough <kmccullough@apple.com> Reviewed by Dan Bernstein. <rdar://problem/6510362> In some situations message content is messed up when indentation is decreased * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::splitTreeToNode): Calling recursively here served to do nothing because this function will return if the second argument is the parent of the first. Not only does this now work as intended, but is necessary for the rest of this fix. * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::outdentParagraph): To determine if we are the last node in a <blockquote>, and can therefore remove the <blockquote> we need the endOfEnclosingBlock to extend to the end of the <blockquote> not just the next block, which could be a <div>, for example. - Also If a <blockquote> is removed, but it's the child of another <blockquote> then its children are now children of the top <blockquote>. In this case we want to split the parent <blockquote> because the next paragraph assumes that it is the first node in its <blockquote> and if that is not true, various bugs arise. 2009-05-14 Brady Eidson <beidson@apple.com> Build fix. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::setDefaultMIMEType): 2009-05-14 Brady Eidson <beidson@apple.com> Reviewed by Adam Roben. Fix http/tests/xmlhttprequest/cache-override.html on Windows * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::setDefaultMIMEType): Modify the previous response so it maintains all of its data. (WebCore::didReceiveResponse): Call setDefaultMIMEType() when needed. (WebCore::WebCoreSynchronousLoader::load): Ditto. 2009-05-14 Paul Godavari <paul@chromium.org> Reviewed by Dimitri Glazkov. Bug: Mac Chromium popup menus are not positioned correctly on scrolled pages: https://bugs.webkit.org/show_bug.cgi?id=25772 Fix Mac Chromium popup menu placement by taking into account any scrolling in the current window. This mirrors the positioning done in PopupContainer::show(), which is used on Chromium Windows and linux. Also fixed indenting for this method. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupContainer::showExternal): 2009-05-14 Drew Wilson <atwilson@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25774 Upstream V8MessagePortCustom.cpp from the chromium repository. * bindings/v8/custom/V8MessagePortCustom.cpp: Added. (WebCore::ACCESSOR_GETTER): (WebCore::ACCESSOR_SETTER): (WebCore::CALLBACK_FUNC_DECL): 2009-05-14 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=25777 StyleGeneratedImage::imageSize() needs to take zooming into account for fixed-size images (i.e. canvas) so that canvas-as-image-background renders correctly with zooming. Test: fast/canvas/canvas-bg-zoom.html * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::imageSize): 2009-05-14 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. Patch originally by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25796 <rdar://problem/6886654> Shouldn't set referer and origin in Loader::Host::servePendingRequests(). Test: http/tests/security/credentials-in-referer.html * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): This will be done in SubresourceLoader::create() anyway. 2009-05-14 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. Bug 25797: Pages with image maps are not properly read with Voiceover https://bugs.webkit.org/show_bug.cgi?id=25797 * page/AccessibilityImageMapLink.h: (WebCore::AccessibilityImageMapLink::isEnabled): 2009-05-14 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler. <rdar://problem/6887762> and https://bugs.webkit.org/show_bug.cgi?id=25790 Nuke the bogus ASSERT and add a legitimate ASSERT with a little help from a new accessor. * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::shouldContentSniff): * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): (WebCore::didReceiveResponse): 2009-05-14 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25791 Bug 25791: HTMLMediaElement: implement 'startTime' attribute Support the recently added HTMLMediaElement 'startTime' attribute. This is a read-only value that only the media engine can know, so we just need to add the attribute to HTMLMediaElement and add methods to MediaPlayer and MediaPlayerPrivateInterface so the engine can make it available. Test: media/media-startTime.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::startTime): New. * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::startTime): New. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::startTime): New. 2009-05-14 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> Reviewed by Ariya Hidayat. Only create a QWidget wrapper for the plugin in the case it is not in the Qt window mapper, and thus receiving events from the Qt event system. Native Qt based plugins running in process, will already be in the window mapper, and thus creating a wrapper, stops them from getting events from Qt, as they are redirected to the wrapper. * plugins/qt/PluginContainerQt.cpp: (PluginContainerQt::on_clientIsEmbedded): 2009-05-14 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25784 Leaks seen on HTTP tests We should change ResourceHandleMac.mm to use smart pointers some day, but this is a minimal fix. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::loadResourceSynchronously): Release mutable request copy made for disabling content sniffing, matching the normal code path. (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Release m_user and m_pass before overwriting. (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto. 2009-05-14 Yury Semikhatsky <yurys@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25418 Remove new lines from event handler wrapper to make line numbers in the wrapped script conside with the lines in the original script. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::getListenerFunction): (WebCore::V8LazyEventListener::getWrappedListenerFunction): 2009-05-14 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Alexey Proskuryakov. Remove a JSC-specific include that is already added by including ScriptController. No change in behavior, so no tests. * dom/Document.cpp: Removed JSDOMBinding include. 2009-05-14 Alexey Proskuryakov <ap@webkit.org> Reviewed by Brady Eidson. <rdar://problem/4072827> Downloaded non-ASCII file name becomes garbled Hopefully, a final stroke. When updating ResourceRequest from a platform request, a wrong CFString function was used, so a user-friendly name was stored in encoding fallback array. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdateResourceRequest): * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): 2009-05-14 Ben Murdoch <benm@google.com> Reviewed by Darin Adler. Add more ENABLE_DATABASE guards. https://bugs.webkit.org/show_bug.cgi?id=25616 See also https://bugs.webkit.org/show_bug.cgi?id=24776 (original set of guards) * bindings/js/JSSQLResultSetRowListCustom.cpp: * bindings/v8/custom/V8CustomSQLStatementCallback.cpp: * bindings/v8/custom/V8CustomSQLStatementCallback.h: * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: * bindings/v8/custom/V8CustomSQLStatementErrorCallback.h: * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp: * bindings/v8/custom/V8CustomSQLTransactionCallback.h: * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp: * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.h: * bindings/v8/custom/V8DatabaseCustom.cpp: * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: * bindings/v8/custom/V8SQLTransactionCustom.cpp: * storage/Database.cpp: * storage/DatabaseDetails.h: * storage/OriginUsageRecord.cpp: * storage/OriginUsageRecord.h: * storage/SQLError.h: * storage/SQLError.idl: * storage/SQLResultSet.cpp: * storage/SQLResultSet.h: * storage/SQLResultSet.idl: * storage/SQLResultSetRowList.cpp: * storage/SQLResultSetRowList.h: * storage/SQLResultSetRowList.idl: * storage/SQLStatementCallback.h: * storage/SQLStatementErrorCallback.h: * storage/SQLTransactionCallback.h: * storage/SQLTransactionErrorCallback.h: 2009-05-11 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25787 Gtk was the last platform to not unregister plugins when the plugin is stopped. Catch up with r43550. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::stop): 2009-05-14 Adam Roben <aroben@apple.com> Make WebCore.vcproj's pre-build event work again * WebCore.vcproj/WebCore.vcproj: Removed empty override of the pre-build event that was accidentally left in when the pre-build event was moved to WebCoreCommon.vsprops. 2009-05-14 Darin Adler <darin@apple.com> * manual-tests/right-click-crash.html: Added. 2009-05-14 Mark Rowe <mrowe@apple.com> Rubber-stamped by Darin Adler. <rdar://problem/6681868> When building with Xcode 3.1.3 should be using gcc 4.2 The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode. Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not. * Configurations/Base.xcconfig: 2009-05-13 Anders Carlsson <andersca@apple.com> Fix build. * WebCore.NPAPI.exp: 2009-05-13 Eric Seidel <eric@webkit.org> Reviewed by Oliver Hunt. Fix invalid memory write seen in HTMLCanvasElement by Valgrind https://bugs.webkit.org/show_bug.cgi?id=25759 I can't think of any way to catch this with a layout test, so no test. * css/CSSCanvasValue.cpp: (WebCore::CSSCanvasValue::canvasDestroyed): * css/CSSCanvasValue.h: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::~HTMLCanvasElement): * html/HTMLCanvasElement.h: 2009-05-13 Dan Bernstein <mitz@apple.com> Reviewed by Anders Carlsson. - fix <rdar://problem/5483015> Replies in Mail are drawn first without the user style sheet and then redrawn with the style sheet Test: platform/mac/fast/loader/user-stylesheet-fast-path.html * page/mac/FrameMac.mm: (WebCore::Frame::setUserStyleSheetLocation): For data URLs with base64-encoded UTF-8 data, just decode the style sheet here an apply it synchronously instead of invoking an asynchronous loader. 2009-05-13 Chris Fleizach <cfleizach@apple.com> Bug 25755: Implement ARIA grid role https://bugs.webkit.org/show_bug.cgi?id=25755 Fix build bustage from last checkin. * page/AccessibilityAriaGrid.cpp: (WebCore::AccessibilityAriaGrid::addChild): 2009-05-13 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin. Bug 25755: Implement ARIA grid role https://bugs.webkit.org/show_bug.cgi?id=25755 Test: accessibility/aria-tables.html * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * page/AXObjectCache.cpp: (WebCore::AXObjectCache::nodeIsAriaType): (WebCore::AXObjectCache::getOrCreate): * page/AXObjectCache.h: * page/AccessibilityAriaGrid.cpp: Added. (WebCore::AccessibilityAriaGrid::AccessibilityAriaGrid): (WebCore::AccessibilityAriaGrid::~AccessibilityAriaGrid): (WebCore::AccessibilityAriaGrid::create): (WebCore::AccessibilityAriaGrid::addChild): (WebCore::AccessibilityAriaGrid::addChildren): (WebCore::AccessibilityAriaGrid::cellForColumnAndRow): * page/AccessibilityAriaGrid.h: Added. (WebCore::AccessibilityAriaGrid::isAriaTable): * page/AccessibilityAriaGridCell.cpp: Added. (WebCore::AccessibilityAriaGridCell::AccessibilityAriaGridCell): (WebCore::AccessibilityAriaGridCell::~AccessibilityAriaGridCell): (WebCore::AccessibilityAriaGridCell::create): (WebCore::AccessibilityAriaGridCell::parentTable): (WebCore::AccessibilityAriaGridCell::rowIndexRange): (WebCore::AccessibilityAriaGridCell::columnIndexRange): * page/AccessibilityAriaGridCell.h: Added. * page/AccessibilityAriaGridRow.cpp: Added. (WebCore::AccessibilityAriaGridRow::AccessibilityAriaGridRow): (WebCore::AccessibilityAriaGridRow::~AccessibilityAriaGridRow): (WebCore::AccessibilityAriaGridRow::create): (WebCore::AccessibilityAriaGridRow::parentTable): (WebCore::AccessibilityAriaGridRow::headerObject): * page/AccessibilityAriaGridRow.h: Added. * page/AccessibilityList.cpp: (WebCore::AccessibilityList::accessibilityIsIgnored): * page/AccessibilityList.h: * page/AccessibilityObject.h: (WebCore::): * page/AccessibilityRenderObject.cpp: (WebCore::RoleEntry::): * page/AccessibilityTable.cpp: (WebCore::AccessibilityTable::AccessibilityTable): (WebCore::AccessibilityTable::isTableExposableThroughAccessibility): * page/AccessibilityTable.h: (WebCore::AccessibilityTable::isAriaTable): * page/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::parentTable): (WebCore::AccessibilityTableCell::isTableCell): (WebCore::AccessibilityTableCell::titleUIElement): * page/AccessibilityTableCell.h: * page/AccessibilityTableColumn.cpp: (WebCore::AccessibilityTableColumn::setParentTable): (WebCore::AccessibilityTableColumn::headerObject): * page/AccessibilityTableRow.cpp: (WebCore::AccessibilityTableRow::isTableRow): (WebCore::AccessibilityTableRow::parentTable): * page/AccessibilityTableRow.h: * page/mac/AccessibilityObjectWrapper.mm: (RoleEntry::): 2009-05-13 David Levin <levin@chromium.org> Reviewed by Dimitri Glazkov. Bug 25763: Need to move v8 custom binding to the custom directory. https://bugs.webkit.org/show_bug.cgi?id=25763 No test due to no change in behavior. * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp: Renamed from WebCore/bindings/v8/V8CanvasPixelArrayCustom.cpp. 2009-05-13 Nate Chapin <japhet@google.com> Reviewed by Dimitri Glazkov. Fix LayoutTests/fast/dom/Element/attr-param-typechecking.html crashing with V8. https://bugs.webkit.org/show_bug.cgi?id=25758 * bindings/v8/custom/V8ElementCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): return the result of throwError() if it is called. 2009-05-13 Jeremy Moskovich <jeremy@chromium.org> Reviewed by Dave Hyatt. Fix a number of bugs relating to RTL and text-overflow:ellipsis. Also refactor the relevant code to make it a little clearer. This CL fixes 3 fundamental issues: - Corrects behavior if the truncated InlineTextBox's directionality is different from the overall flow direction - bug 25135. - Make decoration drawing in InlineFlowbox RTL-aware - bug 24206. - Full truncation on InlineBoxes in RTL flow - bug 24186 - Add tests for the above + reorder/cleanup tests for easier interpretation of outcome. The code for placing ellipsis has been refactored to use left/right notation rather than a single variable whose meaning could differ based on flow directionality. To support differing inline directionality vs flow directionality, different variables are now used in InlineTextBox::placeEllipsisBox to track the two. The drawing mode for underlines in standards mode now correctly handles RTL truncation and relevant test where added. https://bugs.webkit.org/show_bug.cgi?id=24186 https://bugs.webkit.org/show_bug.cgi?id=25135 https://bugs.webkit.org/show_bug.cgi?id=24206 Tests: fast/css/text-overflow-ellipsis-bidi.html fast/css/text-overflow-ellipsis-strict.html * rendering/InlineBox.cpp: (WebCore::InlineBox::placeEllipsisBox): * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintTextDecorations): (WebCore::InlineFlowBox::placeEllipsisBox): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::placeEllipsisBox): (WebCore::InlineTextBox::paint): * rendering/InlineTextBox.h: * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::placeEllipsis): (WebCore::RootInlineBox::placeEllipsisBox): * rendering/RootInlineBox.h: * rendering/bidi.cpp: (WebCore::RenderBlock::checkLinesForTextOverflow): 2009-05-13 Dmitry Titov <dimich@chromium.org> Rubber-stamped by Mark Rowe. https://bugs.webkit.org/show_bug.cgi?id=25746 Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4. * dom/XMLTokenizerLibxml2.cpp: (WebCore::matchFunc): (WebCore::openFunc): (WebCore::createStringParser): (WebCore::createMemoryParser): * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::close): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread): * storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::LocalStorageThread): (WebCore::LocalStorageThread::start): (WebCore::LocalStorageThread::localStorageThread): (WebCore::LocalStorageThread::scheduleImport): (WebCore::LocalStorageThread::scheduleSync): (WebCore::LocalStorageThread::terminate): * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::start): 2009-05-13 David Hyatt <hyatt@apple.com> Reviewed by Beth Dakin. Fix for <rdar://problem/6872894> REGRESSION (r41896-42143): First letter cut off in styled select menus Make sure to do rounded clipping for overflow and controls relative to the border box and not to the overflow/control clip rect (which is typically clipped to the padding or content box). Doing so was causing rounded clips to be incorrectly applied to padding and content. Added fast/overflow/border-radius-clipping.html * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): 2009-05-13 Darin Adler <darin@apple.com> Revert the parser arena change. It was a slowdown, not a speedup. Better luck next time (I'll break it up into pieces). 2009-05-13 David Hyatt <hyatt@apple.com> Reviewed by Beth Dakin and Darin Adler. Fix for <rdar://problem/6869687> REGRESSION (r41203): Facebook friend suggestions disappear on update. Make sure that renderers are marked for layout if a style change causes them to switch from having a self-painting layer to a non-self-painting layer (and vice versa). Move misplaced layer repainting code that was in RenderBox up into RenderBoxModelObject so that inlines with layers repaint properly on opacity changes, etc. Added fast/repaint/opacity-change-on-overflow-float.html. * rendering/RenderBox.cpp: (WebCore::RenderBox::styleWillChange): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleWillChange): (WebCore::RenderBoxModelObject::styleDidChange): * rendering/RenderBoxModelObject.h: 2009-05-13 Dimitri Glazkov <dglazkov@chromium.org> Not reviewed, build fix. Move an include, needed by Debugger under the corresponding guard. * inspector/InspectorController.cpp: Moved parser/SourceCode under JAVASCRIPT_DEBUGGER guard. 2009-05-13 David Levin <levin@chromium.org> Reviewed by Darin Adler. Bug 25394: REGRESSION: crash in DocumentLoader::addResponse due to bad |this| pointer https://bugs.webkit.org/show_bug.cgi?id=25394 Test: http/tests/xmlhttprequest/frame-unload-abort-crash.html * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): Add another check to subresource loader to avoid doing any loads in frames when the loaders are being stopped. 2009-05-13 Stephan Haller <nomad@froevel.de> Reviewed by Gustavo Noronha. Wrong handling of file upload if no file selected https://bugs.webkit.org/show_bug.cgi?id=25649 Fixed returned path if path is empty * WebCore/platform/gtk/FileSystemGtk.cpp: 2009-05-13 Dan Bernstein <mitz@apple.com> Reviewed by Dave Hyatt. - fix <rdar://problem/6805567> REGRESSION (r42348): Notes flicker white when loading Tests: fast/frames/content-opacity-1.html fast/frames/content-opacity-2.html * page/FrameView.cpp: (WebCore::FrameView::reset): Reset m_contentIsOpaque to false. (WebCore::FrameView::useSlowRepaints): Use slow repaints if the content is not known to be opaque. (WebCore::FrameView::setContentIsOpaque): Added. Sets m_contentIsOpaque and enables or disables fast repaints accordingly. * page/FrameView.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Removed the document()->haveStylesheetsLoaded() condition in determining whether the root is opaque. This is what was causing the bug, as iframes were considered to be opaque, and thus painted an opaque white background, whenever they were pending a style sheet load. Changed to call FrameView::setContentIsOpaqe() instead of setUseSlowRepaints(), which allows the frame to go back to fast repaints if the content becomes opaque. Corrected the check for background color opacity: any alpha value other than 255--not just zero--is not opaque. 2009-05-13 Ariya Hidayat <ariya.hidayat@nokia.com> Reviewed by Sam Weinig. [Qt] Fix "lighther" composition mode. QPainter::CompositionMode_Plus is the right match. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::toQtCompositionMode): 2009-05-13 Darin Adler <darin@apple.com> Reviewed by Cameron Zwarich. Bug 25674: syntax tree nodes should use arena allocation https://bugs.webkit.org/show_bug.cgi?id=25674 * bindings/js/JSDOMBinding.h: Removed include of JSFunction.h. We don't want the entire DOM binding to depend on that file. * bindings/js/JSAudioConstructor.cpp: Added include of Error.h. Before we inherited this automatically because JDDOMBinding.h included JSFunction.h, but that was excessive. * bindings/js/JSDOMWindowCustom.cpp: Ditto. * bindings/js/JSHTMLInputElementCustom.cpp: Ditto. * bindings/js/JSImageConstructor.cpp: Ditto. * bindings/js/JSLazyEventListener.cpp: Ditto, but for JSFunction.h. * bindings/js/JSMessageChannelConstructor.cpp: Ditto. * bindings/js/JSOptionConstructor.cpp: Ditto. * bindings/js/JSWorkerConstructor.cpp: Ditto. * bindings/js/JSXMLHttpRequestConstructor.cpp: Ditto. * bridge/jni/jni_jsobject.mm: Ditto, but for SourceCode.h. * inspector/InspectorController.cpp: Ditto. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::recompileAllJSFunctions): Moved mose of this function into the base class in JavaScriptCore, so the details of compilation don't have to be exposed. 2009-05-13 Douglas R. Davidson <ddavidso@apple.com> Reviewed by Darin Adler. <rdar://problem/6879145> Generate a contextual menu item allowing autocorrections to easily be changed back. Refrain from re-correcting items that have already been autocorrected once. * dom/DocumentMarker.h: * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): (WebCore::Editor::changeBackToReplacedString): * editing/Editor.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): * page/mac/WebCoreViewFactory.h: * platform/ContextMenu.cpp: (WebCore::ContextMenu::populate): (WebCore::ContextMenu::checkOrEnableIfNeeded): * platform/ContextMenuItem.h: * platform/LocalizedStrings.h: * platform/mac/LocalizedStringsMac.mm: (WebCore::contextMenuItemTagChangeBack): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::replacedString): * rendering/HitTestResult.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::computeRectForReplacementMarker): (WebCore::InlineTextBox::paintDocumentMarkers): * rendering/InlineTextBox.h: 2009-05-13 Holger Hans Peter Freyther <zecke@selfish.org> Rubber Stamped by Oliver Hunt. [GTK] Fix Gtk+/X11 build on OSX Including the CoreFoundation header here and X11 headers later will result in different definitions of Boolean. The CoreFoundation include does not seem to be necessary here and my mac build was successfull without it. I will remove it for now. If the build bots disagree this will be replaced by a #if PLATFORM(CF). * platform/FileSystem.h: 2009-05-13 Holger Hans Peter Freyther <zecke@selfish.org> Rubber Stamped by Gustavo Noronha. [GTK] Move the #ifdef around for a buildfix for Gtk+ on OSX When building Gtk+ on OSX we ended up declaring setNPWindowIfNeeded twice. Fix that by moving the #if PLATFORM(GTK) up and using elif instead of else. * plugins/PluginView.h: 2009-05-13 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Xan Lopez. https://bugs.webkit.org/show_bug.cgi?id=25685 [GTK] Middle click paste form the pasteboard The kit wants to paste from at least two different clipboards. By introducing getCurrentTarget to the PasteboardHelper interface we can make this decision in the kit. Use the new method in PasteboardGtk to get the right GdkClipboard for the paste operation. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::documentFragment): (WebCore::Pasteboard::plainText): * platform/gtk/PasteboardHelper.h: 2009-05-13 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. <rdar://problem/6438177> QTMoviePreferredTransformAttribute only supported on SnowLeopard <rdar://problem/6872468> QTMovieOpenForPlaybackAttribute only supported on SnowLeopard QTMoviePreferredTransformAttribute and QTMovieOpenForPlaybackAttribute are not supported on Tiger or Leopard. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setNetworkState): Remove invalid ASSERT. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::createQTMovie): Only request QTMoviePreferredTransformAttribute when !BUILDING_ON_TIGER and !BUILDING_ON_LEOPARD. (WebCore::MediaPlayerPrivate::cacheMovieScale): Only ask for QTMovieOpenForPlaybackAttribute when !BUILDING_ON_TIGER and !BUILDING_ON_LEOPARD, 2009-05-12 Roland Steiner <rolandsteiner@google.com> Reviewed by Eric Seidel. Bug 25738: Skia: CSS border style not cleared for SVG object https://bugs.webkit.org/show_bug.cgi?id=25738 If no dashing is set, this change reverts to solid stroke (previously the code bailed and left the old setting, whatever it was) Test case listed in above bug entry. (Additional complications due to each platform rendering dotted lines differently - c.f. https://bugs.webkit.org/show_bug.cgi?id=25737) * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setLineDash): 2009-05-11 Erik Arvidsson <arv@chromium.org> Reviewed by Eric Seidel. Bug 21903: Adds DOM bindings for the placeholder property of the HTMLInputElement. https://bugs.webkit.org/show_bug.cgi?id=21903 Test: fast/forms/placeholder-dom-property.html * dom/InputElement.cpp: (WebCore::InputElement::updatePlaceholderVisibility): * dom/InputElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::placeholder): (WebCore::HTMLInputElement::setPlaceholder): * html/HTMLInputElement.h: * html/HTMLInputElement.idl: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): * wml/WMLInputElement.h: (WebCore::WMLInputElement::placeholder): (WebCore::WMLInputElement::setPlaceholder): 2009-05-12 Adam Barth <abarth@webkit.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25706 Change V8 bindings to match JSC bindings with respect to using the lexical or dynamic global object. Tests: http/tests/security/aboutBlank/security-context-grandchildren-lexical.html http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-03-19 Oliver Hunt <oliver@apple.com> Reviewed by Darin Adler. <rdar://problem/6702386> Incorrect bound check in SVGList::insertItemBefore SVGList::insertItemBefore would not perform a bounds check on the index it was provided, potentially leading to a buffer overflow. Test: svg/dom/svglist-exception-on-out-bounds-error.html * svg/SVGList.h: (WebCore::SVGList::insertItemBefore): 2009-05-12 Paul Godavari <paul@chromium.org> Reviewed by Dimitri Glazkov. Bug 25708: Cannot choose menu items in popups with many entries in Chromium https://bugs.webkit.org/show_bug.cgi?id=25708 This change sets the window size for popups on Mac to include all items in the menu. This is required for hit testing on Mac, where we use native controls to manage the popups and don't want to artificially limit the valid hit testing region to a limited scroll window. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::layout): 2009-05-12 Stephen White <senorblanco@chromium.org> Reviewed by Dimitri Glazkov. Fixes to build with latest skia: SkTypeface::Create() is now SkTypeface::CreateFromName(); computeBounds() has been reworked as getBounds(). The changes are placed behind an #ifdef for now, so that we can roll back the skia version in Chromium if necessary without having to roll back this change. https://bugs.webkit.org/show_bug.cgi?id=25705 * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/skia/PathSkia.cpp: (WebCore::Path::boundingRect): (WebCore::boundingBoxForCurrentStroke): * platform/graphics/skia/SkiaUtils.cpp: (WebCore::SkPathContainsPoint): 2009-05-12 Nate Chapin <japhet@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25732 Update V8ElementCustom.cpp to match the current API of V8Proxy. (WebCore::ACCESSOR_SETTER): Change retrieveActiveFrame() to retrieveFrameForEnteredContext(). 2009-05-12 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25694 HTMLParser::createHead() ASSERT: Creating an element, calling document.open() and writing to the document NULL ptr Test: fast/parser/implicit-head-in-fragment-crash.html * html/HTMLParser.cpp: (WebCore::HTMLParser::bodyCreateErrorCheck): Do not try to implicitly create <head> when parsing a fragment. 2009-05-12 Soren Gjesse <sgjesse@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25687 Missing check for valid function in V8 bindings for toString function for event listeners. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::getWrappedListenerFunction): Added empty handle checks. 2009-05-11 Yael Aharon <yael.aharon@nokia.com> Reviewed by Holger Freyther. Change Qt port to match the mac and windows ports, and unregister plugins when plugins are stopped. Not doing that can cause assersion failure. https://bugs.webkit.org/show_bug.cgi?id=25702 * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::stop): 2009-05-11 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Holger Freyther. Bug 25714: [Qt] Decouple HTML5 Database support from the SQLite/generic database support in the Qt port <https://bugs.webkit.org/show_bug.cgi?id=25714> * WebCore.pro: 2009-05-11 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin. Bug 25713: AX: Control Elements not identified in HTML content https://bugs.webkit.org/show_bug.cgi?id=25713 Test: accessibility/onclick-handlers.html * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::mouseButtonListener): 2009-05-11 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. <rdar://problem/6276843> REGRESSION: TextIterator generates an extra newline for ranges that start outside of body * editing/TextIterator.cpp: (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Check startPos for null, not just currPos. 2009-05-11 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. Bug 25700: Regression:WebKit:cmd-left and cmd-right use to go to the beginning and end of a line in Mail https://bugs.webkit.org/show_bug.cgi?id=25700 Keyboard selection movement handlers need to also watch for the Cmd key when Accessibility is enabled. Note: This code is only used when accessibility is enabled. * page/EventHandler.cpp: (WebCore::EventHandler::handleKeyboardSelectionMovement): 2009-05-11 David Kilzer <ddkilzer@apple.com> Bug 25087: Test for ENABLE_FOO macros consistently in IDL files <https://bugs.webkit.org/show_bug.cgi?id=25087> Reviewed by Timothy Hatcher. Change tests for ENABLE macros to check for both existence and value: - Negative: #if !defined(ENABLE_FOO) || !ENABLE_FOO - Positive: #if defined(ENABLE_FOO) && ENABLE_FOO * css/CSSCharsetRule.idl: * css/CSSPrimitiveValue.idl: * css/RGBColor.idl: * dom/Attr.idl: * dom/DOMCoreException.idl: * dom/DOMImplementation.idl: * dom/Document.idl: * dom/Element.idl: * dom/Event.idl: * dom/EventException.idl: * dom/KeyboardEvent.idl: * dom/MessagePort.idl: * dom/MouseEvent.idl: * dom/Node.idl: * dom/ProcessingInstruction.idl: * dom/Range.idl: * dom/RangeException.idl: * dom/WheelEvent.idl: * html/CanvasPixelArray.idl: * html/HTMLAnchorElement.idl: * html/HTMLAppletElement.idl: * html/HTMLAreaElement.idl: * html/HTMLBaseFontElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLFrameElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLImageElement.idl: * html/HTMLInputElement.idl: * html/HTMLLinkElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLSelectElement.idl: * html/HTMLStyleElement.idl: * html/ImageData.idl: * inspector/InspectorController.idl: * loader/appcache/DOMApplicationCache.idl: * page/Console.idl: * page/Coordinates.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/Geoposition.idl: * page/History.idl: * page/Location.idl: * page/Navigator.idl: * svg/SVGElementInstance.idl: * svg/SVGException.idl: * workers/WorkerContext.idl: * xml/XMLHttpRequestException.idl: * xml/XPathException.idl: 2009-05-11 Norbert Leser <norbert.leser@nokia.com> Reviewed by Darin Adler. Bug 24538: class/struct mixup in forward declarations https://bugs.webkit.org/show_bug.cgi?id=24538 * inspector/InspectorResource.h: * loader/CachedFont.h: * loader/appcache/ApplicationCache.h: * rendering/RenderBlock.h: * rendering/RootInlineBox.h: * rendering/SVGInlineTextBox.h: * svg/SVGGlyphElement.h: * svg/SVGHKernElement.h: 2009-05-11 Norbert Leser <norbert.leser@nokia.com> Reviewed by Darin Adler. Bug 24539: Unresolved CSSMutableStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=24539 The Symbian tools can't compile and link this without this include. It's not clear why this is different from other toolsets or why it affects only this header file, but adding the include for now. * editing/RemoveCSSPropertyCommand.h: Added include of CSSMutableStyleDeclaration.h. 2009-05-11 Alice Liu <alice.liu@apple.com> Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=25701 REGRESSION(r38788 & r42020): styled searchfields look wrong on Windows, affects Facebook Test: fast/forms/search-styled.html * css/themeWin.css: Remove the overriding of -webkit-appearance for searchfields. This will cause background images to not be honored when styling searchfields * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::adjustSearchFieldStyle): * rendering/RenderThemeWin.h: Re-instate final adjustments to searchfield styling that were removed in r42020 2009-05-11 Brady Eidson <beidson@apple.com> Fix Windows build * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): 2009-05-11 Nate Chapin <japhet@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25626 Update V8ElementCustom.cpp to match the current API of Node. * bindings/v8/custom/V8ElementCustom.cpp: (WebCore::ACCESSOR_SETTER): Changed a couple of method names to match current names. (WebCore::ACCESSOR_GETTER): Changed a method name to match current name. 2009-05-11 Brady Eidson <beidson@apple.com> Fix Windows build * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): (WebCore::WebCoreSynchronousLoader::load): 2009-05-11 Brady Eidson <beidson@apple.com> Fix Windows build * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): 2009-05-11 Nate Chapin <japhet@google.com> Reviewed by Dimitri Glazkov. V8CustomBinding.cpp is missing a header file https://bugs.webkit.org/show_bug.cgi?id=25644 * bindings/v8/custom/V8CustomBinding.cpp: Added #include "V8Proxy.h". 2009-05-11 Aaron Boodman <aa@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25634 Change V8Proxy::retrieveActiveFrame() call sites to V8Proxy::retrieveFrameForEnteredContext(). Also, change instances of ScriptController::retrieveActiveFrame() to V8::retrieveFrameForEnteredContext() for consistency. See http://codereview.chromium.org/113085 for the corresponding Chromium change. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8Custom::WindowSetLocation): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::navigateIfAllowed): (WebCore::ACCESSOR_SETTER): (WebCore::CALLBACK_FUNC_DECL): 2009-05-11 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler. <rdar://problem/5972751> Local image files (BMP, ico) can be misidentified as HTML. First part of the fix - Disable content sniffing for file resources which never should've been happening anyways. Second part of the fix - If the networking layer doesn't give us back a MIME type default to "application/octet-stream". * platform/MIMETypeRegistry.cpp: (WebCore::defaultMIMEType): "application/octet-stream" * platform/MIMETypeRegistry.h: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::create): If content sniffing is true, double check with "shouldContentSniffRequest()" which might override it to false. (WebCore::ResourceHandle::shouldContentSniffURL): Return false for file:// urls, true for everything else. * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): Create a copy of the CFURLRequest with the default MIME type instead of null. (WebCore::didReceiveResponse): If the MIME type for the response is null, create a copy with the default MIME type. (WebCore::WebCoreSynchronousLoader::load): Use shouldContentSniffRequest() to make synchronous loads have the same sniffing policy as asynchronous loads. Also, correct a null MIME type by creating a copy with the default type. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::loadResourceSynchronously): Use shouldContentSniffRequest() to make synchronous loads have the same sniffing policy as asynchronous loads. (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Set up the [NSURLResponse MIMEType] swizzling if it hasn't been set up yet. (_web_NSURLResponse_MIMEType): Either return the actual MIME type of the response, or the default MIME type if it's nil. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::loadRequestAsynchronously): Remove the workaround added in r29370 as it will now be covered by the new mechanism. 2009-05-11 David Kilzer <ddkilzer@apple.com> Fix typo "APPLICATION_CAHE_DYNAMIC_ENTRIES" to "APPLICATION_CACHE_DYNAMIC_ENTRIES" This was added in r39816 to disable dynamic entries. They are still disabled after fixing the typo since this feature define is never set anywhere. * bindings/js/JSDOMApplicationCacheCustom.cpp: * loader/appcache/DOMApplicationCache.idl: 2009-05-11 Dmitry Titov <dimich@chromium.org> Reviewed by Alexey Proskuryakov and Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=25348 Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap. Most of the change is in WTF. Unless noted, all the following files changed to use the new ThreadIdentifier::isValid() method instead of just doing 'if(m_threadID)' kind of checks, since ThreadIdentifier is now a class rather then an integer. Also, there is no need to initialize threadID in constructors to 0 now. * dom/XMLTokenizerLibxml2.cpp: (WebCore::libxmlLoaderThread): use DEFINE_STATIC_LOCAL and accessor function for static thread id, since now ThreadIdentifier needs construction and we avoid having global initializers. (WebCore::matchFunc): use the new accessor function. (WebCore::openFunc): ditto. (WebCore::createStringParser): ditto. (WebCore::createMemoryParser): ditto. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::close): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread): remove m_threadID from debug output. * storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::start): (WebCore::LocalStorageThread::scheduleImport): (WebCore::LocalStorageThread::scheduleSync): (WebCore::LocalStorageThread::terminate): * workers/WorkerThread.cpp: (WebCore::WorkerThread::start): (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::start): 2009-05-11 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler. Remove unused header that declared one function which was never defined anywhere. * WebCore.vcproj/WebCore.vcproj: * platform/network/cf/ResourceResponseCFNet.cpp: Change to include ResourceResponse.h (which really means platform/network/cf/ResourceResponse.h) * platform/network/cf/ResourceResponseCFNet.h: Removed. 2009-05-11 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=25213 Fix assert during Inspector destruction. * inspector/InspectorController.cpp: (WebCore::InspectorController::inspectedPageDestroyed): Moved closing inspector above removing InspectorController object to fix JS errors, added clearing inspector page ptr. 2009-05-11 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Holger Freyther. [Qt] Make sure that public APIs are properly exported on all Qt platforms https://bugs.webkit.org/show_bug.cgi?id=25601 * WebCore.pro: Define QT_MAKEDLL for all non-static builds, not just for win 2009-05-11 Csaba Osztrogonac <oszi@inf.u-szeged.hu> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=24284 * WebCore.pro: duplicated values removed from INCLUDEPATH 2009-05-11 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Eric Seidel. Build fix Symbian; clean Up WebKit/Qt if ENABLE_NETSCAPE_PLUGIN_API=0 https://bugs.webkit.org/show_bug.cgi?id=24688 * WebCore.pro: Use platform independent plugin stubs if ENABLE_NETSCAPE_PLUGIN_API=0 * platform/qt/TemporaryLinkStubs.cpp: Remove stub functions for plugins 2009-05-10 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. - fix a crash when deactivating a document that had adopted a <form> element Test: fast/dom/HTMLFormElement/document-deactivation-callback-crash.html * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::didMoveToNewOwnerDocument): Corrected the logic here: <form> elements should be registered for document activation callbacks if and only if autocomplete is off. 2009-05-10 Alexey Proskuryakov <ap@webkit.org> Reviewed by Dan Bernstein. <rdar://problem/6867598> REGRESSION (r42483): Have to enter credentials twice when trying to view protected MobileMe video Add a temporary workaround. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): Added an m_useSiteSpecificQuirks boolean (Mac-only). A Frame pointer is only available when starting a request, so we need to store this data for later use. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): Initialize m_useSiteSpecificQuirks. (WebCore::ResourceHandle::receivedCredential): Use per-session credentials with gallery.me.com. 2009-05-10 Alexey Proskuryakov <ap@webkit.org> Reviewed by Dan Bernstein. <rdar://problem/6870383> Have to enter credentials twice when downloading from a protected page * platform/network/cf/AuthenticationCF.cpp: * platform/network/cf/AuthenticationCF.h: (WebCore::WebCoreCredentialStorage::set): (WebCore::WebCoreCredentialStorage::get): * platform/network/cf/ResourceHandleCFNet.cpp: Move WebCore credential storage to AuthenticationCF, so that WebKit could use it (macthing an earlier Mac change). 2009-05-10 Alexey Proskuryakov <ap@webkit.org> Reviewed by Dan Bernstein. Match newer XMLHttpRequest draft and make withCredential setter raise an exception when called at a wrong time. No test, because we are waiting for a newer version of system frameworks to test the attribute. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setWithCredentials): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: Raise INVALID_STATE_ERR if the state is not OPENED, or if the send() flag is true. 2009-05-10 Dan Bernstein <mitz@apple.com> Reviewed by Dave Kilzer. - fix https://bugs.webkit.org/show_bug.cgi?id=25602 REGRESSION: fast/overflow/overflow-focus-ring.html seems double-drawn on ToT Test: fast/layers/self-painting-outline.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): Paint the layer's own outline only if it is a self-painting layer. 2009-05-09 Dan Bernstein <mitz@apple.com> Reviewed by Geoffrey Garen and Mark Rowe. - fix https://bugs.webkit.org/show_bug.cgi?id=25666 Assertion failure in Node::setDocument() (willMoveToNewOwnerDocumentWasCalled) when adopting a <form> element Test: fast/dom/HTMLFormElement/adopt-assertion.html * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::willMoveToNewOwnerDocument): Overrides of this method are required to call the base class implementation. Do it. (WebCore::HTMLFormElement::didMoveToNewOwnerDocument): Ditto. 2009-03-29 Kevin Ollivier <kevino@theolliviers.com> Reviewed by Maciej Stachowiak. WebCore::DocumentLoader::mainReceivedError now asserts if error.isNull(), so make sure CURL does not create empty ResourceError() objects. https://bugs.webkit.org/show_bug.cgi?id=24927 * platform/network/curl/ResourceHandleManager.cpp: (WebCore::ResourceHandleManager::downloadTimerCallback): 2009-05-09 Gustavo Noronha Silva <gns@gnome.org> Build fix, adding missing files to make dist. * GNUmakefile.am: 2009-05-08 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=25656 Reduce the inline capacity of CSSParserValueList's m_values vector to reduce the size of CSSParserValueList from 544 to 160 bytes in 64-bit. * css/CSSParserValues.h: 2009-05-08 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> Not reviewed. Used sort-Xcode-project-file to sort the XCode project file - it hasn't been done for a while. * WebCore.xcodeproj/project.pbxproj: 2009-05-08 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. - fix <rdar://problem/6864786> REGRESSION: Crash below ApplyStyleCommand::applyInlineStyleToRange when reviewing a patch in Bugzilla Test: editing/style/apply-through-end-of-document.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyleToRange): Added a null check for the case of a range extending through the end of the document, in which pastEndNode is 0. 2009-05-08 Douglas R. Davidson <ddavidso@apple.com> Reviewed by Beth Dakin. <rdar://problem/6857446> REGRESSION (Safari 3-4): Contraction base marked as misspelled even though contraction is a word Make sure spelling underline does not persist on words like <doesn't>. * editing/TypingCommand.cpp: (WebCore::TypingCommand::typingAddedToOpenCommand): 2009-05-08 Kevin Watters <kevinwatters@gmail.com> Reviewed by Kevin Ollivier. Make sure the path's refdata isn't deleted before we're done with the object. https://bugs.webkit.org/show_bug.cgi?id=25652 * platform/graphics/wx/PathWx.cpp: (WebCore::Path::~Path): (WebCore::Path::Path): (WebCore::Path::translate): 2009-05-08 Kevin Watters <kevinwatters@gmail.com> Reviewed by Darin Adler. Fix for memory leak on Mac. https://bugs.webkit.org/show_bug.cgi?id=25650 * platform/wx/wxcode/mac/carbon/fontprops.cpp: (wxFontProperties::wxFontProperties): 2009-05-08 Beth Dakin <bdakin@apple.com> Reviewed by Dan Bernstein. <rdar://problem/6857446> REGRESSION (r37591): Cannot print or preview from maps.yandex.ru We need to fall into the stretchesToViewHeight() quirk when we are printing and we are the root and the root has percentage height OR when we are the body and the root has percentage height. Otherwise we have a height of 0 and can run into painting troubles. * rendering/RenderBox.cpp: (WebCore::RenderBox::calcHeight): 2009-05-08 Douglas Davidson <ddavidso@apple.com> Reviewed by Darin Adler. Fixes for <rdar://problem/6852771>. Prevent text checking replacement immediately after an apostrophe and automatic link addition except immediately after typing. * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): 2009-05-08 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25627 Bug 25627: HTMLMediaElement: some errors should fire on <source> elements Update for HTML5 spec change to fire 'error' events on <source> element when there is a failure while processing/loading a <source>. Test: media/video-source-error.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enqueueEvent): Remove white-space. (WebCore::HTMLMediaElement::loadInternal): Call cancelPendingEventsAndCallbacks instead of just calling m_pendingEvents.clear() as we now also need to cancel pending errors on all <source> element. (WebCore::HTMLMediaElement::selectMediaResource): Call isSafeToLoadURL() here instead of in loadResource() as we need to report errors differently depending on the type of failure. Use KURL instead of String. (WebCore::HTMLMediaElement::loadNextSourceChild): nextSourceChild -> selectNextSourceChild. Fail silently when there are no more <source> canditates because that is what spec mandates. Keep url as KURL instead of converting to String. (WebCore::HTMLMediaElement::loadResource): ASSERT that the URL is safe to load as we now assume the safety check now done before this function. Takes KURL instead of String. (WebCore::HTMLMediaElement::isSafeToLoadURL): New, checks to see if a url is safe to load, logs failure if not. (WebCore::HTMLMediaElement::noneSupported): MEDIA_ERR_NONE_SUPPORTED -> MEDIA_ERR_SRC_NOT_SUPPORTED (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): New, clear all events pending on the media and all source elements. (WebCore::HTMLMediaElement::setNetworkState): Fire an error on the source element when the the failure happened while processing one. Only call nonSupported() when the failure happened while processing media element 'src' attribute. (WebCore::HTMLMediaElement::havePotentialSourceChild): nextSourceChild -> selectNextSourceChild. Deal with selectNextSourceChild returning a KURL instead of a String. (WebCore::HTMLMediaElement::selectNextSourceChild): Renamed from nextSourceChild, add optional param to control whether or not errors are fired on a source element when it will not be used. Check safety of url here instead of waiting until loadResource(). Return a KURL instead of a String. (WebCore::HTMLMediaElement::initialURL): nextSourceChild -> selectNextSourceChild. Keep url as a KURL instead of a String. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::): * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::HTMLSourceElement): Initialize timer related variables. (WebCore::HTMLSourceElement::scheduleErrorEvent): New, start one-shot timer to fire an error event ASAP. (WebCore::HTMLSourceElement::cancelPendingErrorEvent): New, cancel pending error event. (WebCore::HTMLSourceElement::errorEventTimerFired): New, fire error event if it has not been cancelled. * html/HTMLSourceElement.h: * html/MediaError.h: (WebCore::MediaError::): MEDIA_ERR_NONE_SUPPORTED -> MEDIA_ERR_SRC_NOT_SUPPORTED * html/MediaError.idl: Ditto 2009-05-08 Dan Bernstein <mitz@apple.com> Reviewed by Maciej Stachowiak. - fix <rdar://problem/6859955> Undoing typed text after selecting all leaves non-text areas highlighted Test: fast/repaint/selection-clear.html When RenderView::clearSelection() is called from SelectionController::nodeWillBeRemoved(), selected renderers may already be marked for layout, which means that they can no longer compute their selection repaint info. Instead, an empty IntRect (or GapRects) is returned, leading to incomplete repaint. The fix is not to rely on individual renderers when clearing the selection, but instead, cache the bounding rectangle of the selected blocks' GapRects when setting the selection, and invalidate that entire rectangle when clearing it. * rendering/RenderView.cpp: (WebCore::RenderView::setSelection): Added a parameter saying whether the repainting of selected blocks should include both previously-selected areas and newly-selected areas or only newly-selected areas. The default is both. Also compute m_cachedSelectionBounds to be the bounding rectangle of the new selection's BlockSelectionInfos' GapRects. (WebCore::RenderView::clearSelection): Repaint m_cachedSelectionBounds, and tell setSelection() that it should not paint areas that were in the old selection's BlockSelectionInfos' GapRects. * rendering/RenderView.h: (WebCore::RenderView::): 2009-05-08 Alexey Proskuryakov <ap@webkit.org> Reviewed by Maciej Stachowiak. <rdar://problem/6868773> NPN_GetAuthenticationInfo does not work with non-permanent credentials * WebCore.base.exp: * platform/network/mac/AuthenticationMac.h: (WebCore::WebCoreCredentialStorage::set): (WebCore::WebCoreCredentialStorage::get): * platform/network/mac/AuthenticationMac.mm: * platform/network/mac/ResourceHandleMac.mm: Moved WebCoreCredentialStorage to AuthenticationMac, so that it could be used from WebKit. 2009-05-08 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed by Simon Hausmann. Fix the Qt build, add missing JSC_HOST_CALL macros to the runtime call methods. * bridge/qt/qt_runtime.h: 2009-05-08 Jan Michael Alonzo <jmalonzo@webkit.org> Reviewed by Mark Rowe. Add missing strings to localizedStrings.js https://bugs.webkit.org/show_bug.cgi?id=25635 Add the strings "Delete", "Key", "Refresh" and "Value". * English.lproj/localizedStrings.js: 2009-05-08 Robert Hogan <robert@roberthogan.net> Reviewed, tweaked and landed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=24992 [Qt] crash at http://browserspy.dk/browser.php This cannot be easily tested in DRT, because it relies on interaction with QApplication, but the added assertions guard against re-introducing this issue. * loader/FrameLoader.cpp: (WebCore::FrameLoader::didOpenURL): Don't make client calls while the frame is being constructed, because the intermediate state without a document is something we don't want to expose. * page/Frame.cpp: (WebCore::Frame::setJSStatusBarText): Assert that the frame has a document, which is an approximation of it being in a consistent state for client calls. (WebCore::Frame::setJSDefaultStatusBarText): Ditto. 2009-05-07 Mark Rowe <mrowe@apple.com> Rubber-stamped by Oliver Hunt. Fix <https://bugs.webkit.org/show_bug.cgi?id=25640>. Bug 25640: Crash on quit in r43384 nightly build on Leopard w/ Safari 4 beta installed Roll out r43366 as it removed symbols that Safari 4 Beta uses. * dom/XMLTokenizerLibxml2.cpp: (WebCore::matchFunc): (WebCore::openFunc): (WebCore::createStringParser): (WebCore::createMemoryParser): * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::close): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread): * storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::LocalStorageThread): (WebCore::LocalStorageThread::start): (WebCore::LocalStorageThread::localStorageThread): (WebCore::LocalStorageThread::scheduleImport): (WebCore::LocalStorageThread::scheduleSync): (WebCore::LocalStorageThread::terminate): * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::start): 2009-05-08 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. Unify scrolling code via adjustments and keys. Use the WebCore defined constants, since that's what people are most used to at this point. * platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollView::platformHandleHorizontalAdjustment): (WebCore::ScrollView::platformHandleVerticalAdjustment): 2009-05-07 David Levin <levin@chromium.org> Reviewed by NOBODY. Suggested by Oliver Hunt. Rolling back http://trac.webkit.org/changeset/43385 because we have to use mac artwork for the underline on OSX. * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::createPatternColor): (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::setCGStrokeColor): (WebCore::spellingPatternColor): (WebCore::grammarPatternColor): (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): 2009-05-07 John Grabowski <jrg@chromium.org> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25573 Unify use of CG-common routine for drawLineForMisspellingOrBadGrammar. Cleanup for WebKit, but required for Chromium happiness. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::spellingPatternColor): (WebCore::grammarPatternColor): (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): * platform/graphics/mac/GraphicsContextMac.mm: * platform/graphics/win/GraphicsContextCGWin.cpp: 2009-05-07 Darin Adler <darin@apple.com> Reviewed by Simon Fraser. Bug 25575: Registered mutation event listener crashes HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=25575 Test: fast/media/video-controls-with-mutation-event-handler.html * rendering/MediaControlElements.cpp: (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Don't call setAttribute. * rendering/RenderMedia.cpp: (WebCore::RenderMedia::createTimeline): Call setAttribute here. 2009-05-07 Simon Fraser <simon.fraser@apple.com> Rubber Stamped by Dave Hyatt Shuffle the data members to minimize padding. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::RenderTableSection): * rendering/RenderTableSection.h: 2009-05-07 Simon Fraser <simon.fraser@apple.com> Rubber Stamped by Dave Hyatt Shuffle the data members to make Events 8 bytes smaller in 64-bit. * dom/Event.cpp: (WebCore::Event::Event): * dom/Event.h: 2009-05-07 Eric Seidel <eric@webkit.org> Reviewed by Beth Dakin. Fix regression caused by r41469, add test case to prevent it from happening again. https://bugs.webkit.org/show_bug.cgi?id=25252 hasLayer() was true during removeOnlyThisLayer()/ updateLayerPositions() which caused updateLayerPosition()'s walk up the render tree to include offsets from the layer we were about to remove. I'm not 100% convinced that this wasn't a bug in updateLayerPosition() or in RenderBoxModelObject::styleDidChange, because the layer in question is not the containing block for the block which gets laid out wrong. But this restores the previous behavior and adds a test. So the next time someone is in here re- factoring, they will at least know if they break something. Test: fast/layers/remove-only-this-layer-update.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::destroyLayer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::removeOnlyThisLayer): * rendering/RenderObject.cpp: (WebCore::RenderObject::destroy): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::destroy): 2009-05-07 Dmitry Titov <dimich@chromium.org> Attempt to fix GTK build. * platform/graphics/GlyphPageTreeNode.h: add #include <string.h> to ensure memcpy and memset are defined. 2009-05-07 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. Improve native call performance Add calling convention declarations where necessary, and update bindings script to generate them as well. * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::callHTMLCollection): * bindings/js/JSNodeListCustom.cpp: (WebCore::callNodeList): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::callPlugin): * bindings/js/JSQuarantinedObjectWrapper.h: * bindings/scripts/CodeGeneratorJS.pm: * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): * bridge/runtime_object.cpp: (JSC::callRuntimeObject): 2009-05-07 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> Reviewed by Dave Hyatt. Fixes: https://bugs.webkit.org/show_bug.cgi?id=25617 Fix memory/performance regression because of too much form control related abstraction just for WMLs sake. Remove FormControlElement and FormControlElementWithState base classes, as the overhead is too high for the gain. HTML has no benefit of that kind of abstraction, so we're going to move the functionality to Element directly. The functions now living in FormControlElement(WithState) lived in Node/Element/HTMLFormControlElement before. This patches moves all of them in a central place in Element.h, as virtual functions with an inline default implementation. To avoid confusion like isEnabled() living on Node, before the creation of the FormControlElement abstraction layer, all methods are renamed to clarify where they belong to. All renames are listed here: From FormControlElement: - isEnabled() -> isEnabledFormControl() - isReadOnly() -> isReadOnlyFormControl() - isTextControl() -> isTextFormControl() - valueMatchesRenderer() -> formControlValueMatchesRenderer() - setValueMatchesRenderer() -> setFormControlValueMatchesRenderer() - name() -> formControlName() - type() -> formControlType() From FormControlElementWithState: - saveState() -> saveFormControlState() - restoreState() -> restoreFormControlState() A lot of Element -> FormControlElement(WithState) casting is gone again, so it's not only a memory, but also a performance progression. No testcases affected, no new tests needed. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * dom/Document.cpp: (WebCore::Document::formElementsState): * dom/Document.h: (WebCore::Document::registerFormElementWithState): (WebCore::Document::unregisterFormElementWithState): * dom/Element.h: (WebCore::Element::isFormControlElement): (WebCore::Element::isEnabledFormControl): (WebCore::Element::isReadOnlyFormControl): (WebCore::Element::isTextFormControl): (WebCore::Element::formControlValueMatchesRenderer): (WebCore::Element::setFormControlValueMatchesRenderer): (WebCore::Element::formControlName): (WebCore::Element::formControlType): (WebCore::Element::saveFormControlState): (WebCore::Element::restoreFormControlState): * dom/FormControlElement.cpp: Removed. * dom/FormControlElement.h: Removed. * dom/FormControlElementWithState.cpp: Removed. * dom/FormControlElementWithState.h: Removed. * dom/InputElement.cpp: (WebCore::InputElement::setValueFromRenderer): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::formControlType): * html/HTMLButtonElement.h: * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::formControlType): * html/HTMLFieldSetElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::attach): (WebCore::HTMLFormControlElement::formControlName): (WebCore::HTMLFormControlElement::willValidate): (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState): (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState): (WebCore::HTMLFormControlElementWithState::willMoveToNewOwnerDocument): (WebCore::HTMLFormControlElementWithState::didMoveToNewOwnerDocument): (WebCore::HTMLFormControlElementWithState::finishParsingChildren): * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::isTextFormControl): (WebCore::HTMLFormControlElement::isEnabledFormControl): (WebCore::HTMLFormControlElement::formControlValueMatchesRenderer): (WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer): (WebCore::HTMLFormControlElement::isReadOnlyFormControl): (WebCore::HTMLFormControlElement::type): (WebCore::HTMLFormControlElement::name): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::formControlName): (WebCore::HTMLInputElement::formControlType): (WebCore::HTMLInputElement::saveFormControlState): (WebCore::HTMLInputElement::restoreFormControlState): (WebCore::HTMLInputElement::parseMappedAttribute): (WebCore::HTMLInputElement::detach): (WebCore::HTMLInputElement::setValue): (WebCore::HTMLInputElement::setFileListFromRenderer): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::readOnly): (WebCore::HTMLInputElement::isTextFormControl): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::formControlType): * html/HTMLKeygenElement.h: * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::formControlType): * html/HTMLLegendElement.h: * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::formControlType): * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::formControlType): * html/HTMLOptionElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::formControlType): (WebCore::HTMLSelectElement::saveFormControlState): (WebCore::HTMLSelectElement::restoreFormControlState): * html/HTMLSelectElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): (WebCore::HTMLTextAreaElement::formControlType): (WebCore::HTMLTextAreaElement::saveFormControlState): (WebCore::HTMLTextAreaElement::restoreFormControlState): (WebCore::HTMLTextAreaElement::updateValue): (WebCore::HTMLTextAreaElement::setValue): * html/HTMLTextAreaElement.h: (WebCore::HTMLTextAreaElement::readOnly): (WebCore::HTMLTextAreaElement::isTextFormControl): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isEnabled): (WebCore::AccessibilityRenderObject::canSetFocusAttribute): * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemIsEnabled): * rendering/RenderTextControl.cpp: (WebCore::updateUserModifyProperty): (WebCore::RenderTextControl::setInnerTextValue): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::subtreeHasChanged): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isEnabled): (WebCore::RenderTheme::isReadOnlyControl): * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::adjustMenuListStyle): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustMenuListStyle): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::adjustMenuListStyle): * wml/WMLFormControlElement.cpp: * wml/WMLFormControlElement.h: (WebCore::WMLFormControlElement::isReadOnlyFormControl): (WebCore::WMLFormControlElement::isTextFormControl): (WebCore::WMLFormControlElement::formControlValueMatchesRenderer): (WebCore::WMLFormControlElement::setFormControlValueMatchesRenderer): * wml/WMLInputElement.cpp: (WebCore::WMLInputElement::WMLInputElement): (WebCore::WMLInputElement::isKeyboardFocusable): (WebCore::WMLInputElement::isMouseFocusable): (WebCore::WMLInputElement::dispatchBlurEvent): (WebCore::WMLInputElement::formControlType): (WebCore::WMLInputElement::formControlName): (WebCore::WMLInputElement::setValue): (WebCore::WMLInputElement::saveFormControlState): (WebCore::WMLInputElement::restoreFormControlState): (WebCore::WMLInputElement::parseMappedAttribute): (WebCore::WMLInputElement::detach): (WebCore::WMLInputElement::appendFormData): (WebCore::WMLInputElement::init): * wml/WMLInputElement.h: (WebCore::WMLInputElement::isTextFormControl): * wml/WMLOptGroupElement.cpp: (WebCore::WMLOptGroupElement::formControlType): * wml/WMLOptGroupElement.h: * wml/WMLOptionElement.cpp: (WebCore::WMLOptionElement::formControlType): * wml/WMLOptionElement.h: 2009-05-07 Dmitry Titov <dimich@chromium.org> Reviewed by Alexey Proskuryakov and Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=25348 Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap. Most of the change is in WTF. Unless noted, all the following files changed to use the new ThreadIdentifier::isValid() method instead of just doing 'if(m_threadID)' kind of checks, since ThreadIdentifier is now a class rather then an integer. Also, there is no need to initialize threadID in constructors to 0 now. * dom/XMLTokenizerLibxml2.cpp: (WebCore::libxmlLoaderThread): use DEFINE_STATIC_LOCAL and accessor function for static thread id, since now ThreadIdentifier needs construction and we avoid having global initializers. (WebCore::matchFunc): use the new accessor function. (WebCore::openFunc): ditto. (WebCore::createStringParser): ditto. (WebCore::createMemoryParser): ditto. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::close): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread): remove m_threadID from debug output. * storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::start): (WebCore::LocalStorageThread::scheduleImport): (WebCore::LocalStorageThread::scheduleSync): (WebCore::LocalStorageThread::terminate): * workers/WorkerThread.cpp: (WebCore::WorkerThread::start): (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::start): 2009-05-07 Simon Fraser <simon.fraser@apple.com> Rubber Stamped by Dave Hyatt Shuffle the data members to minimize padding. * dom/ClassNames.h: 2009-05-07 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler <rdar://problem/6864062> Shrink GlyphPage from 4112 to 2576 bytes in 64-bit https://bugs.webkit.org/show_bug.cgi?id=25605 Shrink GlyphPage by splitting the array of GlyphData, which has lots of padding, into separate Glyph and SimpleFontData* arrays. * platform/graphics/Font.h: glyphDataForCharacter has to return a GlyphData by value now. * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): Return GlyphData by value. * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): Better encapsulation of GlyphPage, using the new methods. * platform/graphics/Font.h: * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): * platform/graphics/GlyphPageTreeNode.h: (WebCore::GlyphData::GlyphData): (WebCore::GlyphPage::indexForCharacter): (WebCore::GlyphPage::glyphDataForCharacter): (WebCore::GlyphPage::glyphDataForIndex): (WebCore::GlyphPage::glyphAt): (WebCore::GlyphPage::fontDataForCharacter): (WebCore::GlyphPage::setGlyphDataForCharacter): (WebCore::GlyphPage::setGlyphDataForIndex): (WebCore::GlyphPage::copyFrom): (WebCore::GlyphPage::clear): 2009-05-07 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25625 Implement Image/Option constructors in V8 bindings. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::NAMED_PROPERTY_GETTER): Removed old JS-based code. * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: Added. * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: Added. 2009-05-07 Brady Eidson <beidson@apple.com> I hate myself for doing this, but need to fix that ChangeLog entry. * ChangeLog: 2009-05-07 Brady Eidson <beidson@apple.com> Rubberstamped by Darin Adler * html/HTMLParser.cpp: Use the correct style of BUILDING_ON_* for WebCore. * html/HTMLParser.h: Ditto 2009-05-07 David Hyatt <hyatt@apple.com> Restore intrinsic margins to all form controls on Mac and Windows. Some of this regressed in 43007 when textareas were given explicit margins. Some of it had already regressed earlier whenever intrinsic margins were turned off in themeWin.css. Reviewed by Beth Dakin. * css/html4.css: * css/themeWin.css: 2009-05-07 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler and Alexey Proskuryakov. <rdar://problem/6863795> Exception occurs in Mail when attempting to create signatures due to <head> element creation * dom/Document.cpp: (WebCore::Document::implicitClose): Check shouldCreateImplicitHead() before creating it. * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Check shouldCreateImplicitHead() before creating it. (WebCore::HTMLParser::bodyCreateErrorCheck): Ditto. (WebCore::shouldCreateImplicitHead): For Tiger/Leopard when running under Mail, the implicit <head> shouldn't be created. * html/HTMLParser.h: (WebCore::shouldCreateImplicitHead): Inline implementation for non-Tiger/Leopard platforms 2009-05-07 Antony Sargent <asargent@chromium.org> Reviewed by Darin Fisher. Fix a memory leak in V8EventListenerList::remove. https://bugs.webkit.org/show_bug.cgi?id=25618 No new functionality so no new tests. * bindings/v8/V8EventListenerList.cpp: (WebCore::V8EventListenerList::remove): 2009-05-07 Darin Fisher <darin@chromium.org> Fix Chromium build bustage. * bindings/v8/custom/V8HTMLFormElementCustom.cpp: Add missing HTMLCollection.h include. 2009-05-07 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin. Bug 25598: AX: if a radio button has a label and a title, the label is not exposed https://bugs.webkit.org/show_bug.cgi?id=25598 Test: accessibility/radio-button-title-label.html * page/AccessibilityObject.h: (WebCore::AccessibilityObject::exposesTitleUIElement): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::exposesTitleUIElement): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): * page/AccessibilityRenderObject.h: 2009-05-07 Darin Fisher <darin@chromium.org> Fix Chromium build bustage. * bindings/v8/custom/V8HTMLFormElementCustom.cpp: (WebCore::INDEXED_PROPERTY_GETTER): ":" should be "::" 2009-05-07 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=25610 [GTK] text.caretOffset is reportedly always 0 Use the right function to get the caret offset in an element. selectionStart() would only work for text controls (there's even an ASSERT when calculating the selected text range). Instead just get the selection and get the offset of the start position. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-05-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed by Simon Hausmann. [Qt] Fix support for antialiased CSS border-radius WebKit implements border-radius by drawing a double-size border, and then letting the clip constrain the border to the right width and position. This requires support for antialiased clipping, as well as painting, to get a nice smooth border. Qt only does antialiased clipping if the anti-alias flag is set at the time of clipping, so we have to enable this in the method addInnerRoundedRectClip(), as well as when we draw the border. Currently the raster-engine is the only Qt paint engine to support anti-aliased clipping, but the OpenGL and Mac paint engines could potentially support this in the future. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::addInnerRoundedRectClip): 2009-05-07 Adam Langley <agl@google.com> Reviewed by Eric Seidel. Render empty optgroup elements. https://bugs.webkit.org/show_bug.cgi?id=24900 Currently, optgroup elements which are empty are not rendered. The HTML specification gives no guidance on this situation. However, the test for being empty is that they have no children, thus this will not render: <optgroup label="test"></optgroup> while this /will/ render (because of the text node child): <optgroup label="test"> </optgroup> This patch will cause both cases to render which matches IE's and Firefox's behaviour. The difference only appears when opening the select element and does not appear in the render tree. Thus, a manual layout-test is required. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::recalcListItems): * manual-tests/optgroup-empty-and-nested.html: Added. 2009-05-06 Julie Parent <jparent@google.com> Reviewed by Eric Seidel. Bug 25608: Unused m_frame in ChromiumClipboard. https://bugs.webkit.org/show_bug.cgi?id=25608 * platform/chromium/ClipboardChromium.h: No tests added as this is only removing dead code, no functional changes. 2009-05-06 Dan Bernstein <mitz@apple.com> Reviewed by Simon Fraser and Justin Garcia. - fix another part of <rdar://problem/6703873> Triple-click quoted line and type Return creates an extra quoted blank line Test: editing/inserting/6703873-2.html * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): Corrected the logic for determining the first node that should go into the new blockquote given the split position: if it is at the end of a container, use the next node after the container. Otherwise, use the child at the position's offset. 2009-05-06 Kevin Ollivier <kevino@theolliviers.com> wx build fix, fixes for wx trunk builds. * platform/graphics/wx/ImageWx.cpp: (WebCore::BitmapImage::draw): * platform/wx/RenderThemeWx.cpp: * platform/wx/wxcode/mac/carbon/fontprops.cpp: (wxFontProperties::wxFontProperties): 2009-05-06 Albert J. Wong <ajwong@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25597 Fix API drift compile errors that occurred while this was ifdef-ed out. The two big issues were that RenderObject::element() became RenderObject::node() and some of the wk* drawing functions had an extra theme parameter added to the argument list. * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton): (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton): (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton): (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): 2009-05-06 Jian Li <jianli@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25385 Upstream changes to V8 bindings for supporting nested workers. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::ToV8Object): (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::getEventListener): (WebCore::ACCESSOR_SETTER WorkerOnmessage): (WebCore::CALLBACK_FUNC_DECL WorkerAddEventListener): 2009-05-06 Dave Moore <davemoore@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25513 The V8 bindings convert every javascript property to its associated css style name. It then calls functions that convert that name to an id. This makes getting or setting css styles on elements slow. The patch fixes this by caching the results of the transformation, mapping a javascript property name to its css property id. It then calls the already public webkit methods that take the id in place of the string property names. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: 2009-05-06 Nate Chapin <japhet@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25591 Upstream V8HTMLFormElement from the Chromium repository. * bindings/v8/custom/V8HTMLFormElementCustom.cpp: (WebCore::INDEXED_PROPERTY_GETTER HTMLFormElement): Upstreamed from Chromium repository (WebCore::NAMED_PROPERTY_GETTER HTMLFormElement): Changed empty element return case to return notHandledByInterceptor(); (WebCore::CALLBACK_FUNC_DECL HTMLFormElementSubmit): Upstreamed from Chromium repository 2009-05-06 Albert J. Wong <ajwong@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25595 Upstream V8CanvasPixelArrayCustom from chromium port tree. * bindings/v8/V8CanvasPixelArrayCustom.cpp: Added. 2009-05-06 Simon Fraser <simon.fraser@apple.com> Rubber-stampted by Eric Seidel Add braces to clarify logic flow in RenderObject::adjustStyleDifference. Only affects ACCELERATED_COMPOSITING builds. * rendering/RenderObject.cpp: (WebCore::RenderObject::adjustStyleDifference): 2009-05-06 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein <rdar://problem/6862550> Reduce size of RenderText in 64-bit Rearrange data members of RenderText so that an int comes first, to minimize padding. * rendering/RenderText.cpp: (WebCore::RenderText::RenderText): * rendering/RenderText.h: 2009-05-06 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein <rdar://problem/6862823> Reduce size of RenderStyle in 64-bit Rearrange data members of RenderStyle to minimize padding when building for 64-bit. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::): 2009-05-06 Darin Fisher <darin@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25596 Fixes Chromium build bustage caused by r43317 (making RefCountedBase::m_refCount private) * page/chromium/AccessibilityObjectWrapper.h: (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper): 2009-05-06 Hin-Chung Lam <hclam@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25593 Refactor for MediaPlayerPrivate for Chromium port. Remove the implementation of MediaPlayerPrivateInferface from it. * platform\graphics\chromium\MediaPlayerPrivateChromium.h: 2009-05-06 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt, Dan Bernstein <rdar://problem/6860197> Reduce the size of FontFallbackList in 64-bit Re-order the data members of FontFallbackList to save 8 bytes when building 64-bit. * platform/graphics/FontFallbackList.cpp: (WebCore::FontFallbackList::FontFallbackList): * platform/graphics/FontFallbackList.h: 2009-05-06 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler, Dan Bernstein <rdar://problem/6860068> Reduce size of InlineBox in 64-bit Re-order the data members of InlineBox to save 8 bytes when building 64-bit. * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2009-05-06 David Levin <levin@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25588 Adding the custom v8 bindings Document.location. * bindings/v8/custom/V8DocumentLocationCustom.cpp: Added. 2009-05-06 Kevin McCullough <kmccullough@apple.com> -Clarified a comment * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): 2009-05-06 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> Not reviewed. Fix WML enabled builds by including "MappedAttribute.h" in several places. * wml/WMLAElement.cpp: * wml/WMLAccessElement.cpp: * wml/WMLBRElement.cpp: * wml/WMLCardElement.cpp: * wml/WMLDoElement.cpp: * wml/WMLElement.cpp: * wml/WMLFieldSetElement.cpp: * wml/WMLGoElement.cpp: * wml/WMLImageElement.cpp: * wml/WMLInputElement.cpp: * wml/WMLMetaElement.cpp: * wml/WMLOnEventElement.cpp: * wml/WMLOptGroupElement.cpp: * wml/WMLOptionElement.cpp: * wml/WMLPElement.cpp: * wml/WMLPostfieldElement.cpp: * wml/WMLSetvarElement.cpp: * wml/WMLTableElement.cpp: * wml/WMLTemplateElement.cpp: * wml/WMLTimerElement.cpp: 2009-05-06 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=25526 [Gtk] Additional support is needed for caret browsing Emit AtkText::text-selection-changed when the selection changes and the current selection is of Range (ie, the start and end positions are different) type. This seems to match what Gecko does. * editing/gtk/SelectionControllerGtk.cpp: (WebCore::SelectionController::notifyAccessibilityForSelectionChange): 2009-05-05 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=25526 [Gtk] Additional support is needed for caret browsing Emit AtkText::text-caret-moved when selection changes. * GNUmakefile.am: * editing/SelectionController.h: * editing/gtk/SelectionController.cpp: Added. (WebCore::SelectionController::notifyAccessibilityForSelectionChange): 2009-05-06 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Gustavo Noronha. Use mozilla cursors for the previously not implemented cursors. The manual-tests/cursor.html is looking complete now. * platform/gtk/CursorGtk.cpp: (WebCore::cellCursor): (WebCore::noDropCursor): (WebCore::progressCursor): (WebCore::noneCursor): (WebCore::notAllowedCursor): (WebCore::grabCursor): (WebCore::grabbingCursor): * platform/gtk/CursorGtk.h: 2009-05-06 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Xan Lopez. Properly indent the header file. * platform/gtk/CursorGtk.h: 2009-05-06 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Gustavo Noronha. Use the mozilla copyright header. Use MPL1.1/GPL2.0 and LGPL2.1 as the license compared to LGPL2.0. * platform/gtk/CursorGtk.h: 2009-05-06 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Gustavo Noronha. Move PluginView::invalidateRegion from the TemporaryLinkStubs to PluginViewGtk.cpp and implement it with a call to Widget::invalidate() just like mac is doing. Optimisations would have to be window system specific. * platform/gtk/TemporaryLinkStubs.cpp: * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::invalidateRegion): 2009-05-06 Jan Michael Alonzo <jmalonzo@webkit.org> Reviewed by Holger Freyther. Misc fixes to InspectorClientGtk. * GNUmakefile.am: Add localizedStrings.js to webinspector_DATA. This prevents copious amounts "Localized string not found" errors in the console 2009-05-06 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Ariya Hidayat. Fix the Qt build on Windows. * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::shouldIncludeChildWindows): Implemented dummy accessor. 2009-05-06 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Tor Arne Vestbø. Tweak WebCore.pro for being able to override the generated sources dir for the generated_files target. * WebCore.pro: 2009-05-06 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Holger Freyther. Fix the Qt/Windows build, use iface instead of interface to avoid conflict with VS2005 headers. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState): 2009-05-06 Joerg Bornemann <joerg.bornemann@trolltech.com> Reviewed by Simon Hausmann. We need to include StringExtras.h on Windows CE to access the strdup function. * plugins/PluginStream.cpp: 2009-05-06 Soren Gjesse <sgjesse@chromium.org> Reviewed by Eric Seidel. Changed the toString behaviour for non document dom node event handlers in the V8 bindings. https://bugs.webkit.org/show_bug.cgi?id=25544 In the V8 bindings non document dom node event handlers are wrapped in a number of with blocks and uses an inner function. This causes the default toString on such a handler to return all this wrapper code. As some web sites use the source of an event handler to create new functions this wrapper code causes compatibility problems. Create a specific toString function for these handlers which will return a function source compatible with the source returned by the JSC bindings and other browsers. Test: fast/events/event-function-toString.html * bindings/v8/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::V8LazyEventListener): (WebCore::V8LazyEventListener::getListenerFunction): (WebCore::V8LazyEventListenerToString): (WebCore::V8LazyEventListener::getWrappedListenerFunction): * bindings/v8/V8LazyEventListener.h: (WebCore::V8LazyEventListener::create): 2009-05-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed by Simon Hausmann. Build QtWebKit as a framework on Mac This implies both debug and release build by default, unless one of the --debug or --release config options are passed to the build-webkit script. Frameworks can be disabled by passing CONFIG+=webkit_no_framework to the build-webkit script. To be able to build both debug and release targets in parallel we have to use separate output directories for the generated sources, which is not optimal, but required to avoid race conditions. An optimization would be to only require this spit-up on Mac. * WebCore.pro: 2009-05-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed by Simon Hausmann. [Qt] Use $$GENERATED_SOURCES_DIR as output when running bison A couple of the generators left the bison output file in the source tree, and then moved it into $$GENERATED_SOURCES_DIR, which did not work well when building release and debug configurations in parallel. * WebCore.pro: 2009-05-06 Dan Bernstein <mitz@apple.com> Reviewed by Justin Garcia. - fix an assertion failure in RemoveNodeCommand() when deleting a <br> between a block and a mail blockquote Test: editing/deleting/removeNodeCommand-assert.html * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Pass the start block to prune() instead of passing m_upstreamStart.node(), because the latter may have been removed already. 2009-05-05 Eric Seidel <eric@webkit.org> No review, roll out only. Roll out r23072 since it broke layout tests * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): 2009-05-05 Ben Murdoch <benm@google.com> Reviewed by Eric Seidel. Add #if ENABLE(DATABASE) guards around database code so toggling ENABLE_DATABASE off does not break builds. https://bugs.webkit.org/show_bug.cgi?id=24776 No functional changes, thus no tests. * bindings/js/JSCustomSQLStatementCallback.cpp: * bindings/js/JSCustomSQLStatementCallback.h: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: * bindings/js/JSCustomSQLStatementErrorCallback.h: * bindings/js/JSCustomSQLTransactionCallback.cpp: * bindings/js/JSCustomSQLTransactionCallback.h: * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: * bindings/js/JSCustomSQLTransactionErrorCallback.h: * bindings/js/JSDatabaseCustom.cpp: * bindings/js/JSSQLTransactionCustom.cpp: * loader/EmptyClients.h: * page/ChromeClient.h: * storage/ChangeVersionWrapper.cpp: * storage/ChangeVersionWrapper.h: * storage/Database.cpp: (WebCore::Database::databaseInfoTableName): * storage/Database.h: * storage/Database.idl: * storage/DatabaseTask.cpp: * storage/DatabaseTask.h: * storage/DatabaseThread.cpp: * storage/DatabaseThread.h: * storage/DatabaseTracker.cpp: * storage/DatabaseTracker.h: * storage/DatabaseTrackerClient.h: * storage/OriginQuotaManager.cpp: * storage/OriginQuotaManager.h: * storage/SQLStatement.cpp: * storage/SQLStatement.h: * storage/SQLTransaction.cpp: * storage/SQLTransaction.h: * storage/SQLTransaction.idl: 2009-05-05 Jeremy Moskovich <jeremy@chromium.org> Reviewed by Eric Seidel. Add some documentation to InlineBox::x(),y(). https://bugs.webkit.org/show_bug.cgi?id=25378 * rendering/InlineBox.h: 2009-05-05 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Eric Seidel. Disable all the SVG features for WebKit/Qt if ENABLE_SVG=0 https://bugs.webkit.org/show_bug.cgi?id=24693 * WebCore.pro: 2009-05-05 Sankar Aditya Tanguturi <sankaraditya@gmail.com> Reviewed by Eric Seidel. Anonymous blocks should not be exposed in accessibility tree. Part of https://bugs.webkit.org/show_bug.cgi?id=23072 Tests: accessibility/ignore-anonymous-block.html platform/win/accessibility/document-role.html * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):Return true for Anonymous blocks. Matching Firefox 2.0.0.14 2009-05-05 Jungshik Shin <jshin@chromium.org> Reviewed by Alexey Proskuryakov. http://bugs.webkit.org/show_bug.cgi?id=25487 For euc-kr and other 8bit Korean encodings (similar to euc-kr/windows-949), make document.charset return EUC-KR instead of windows-949. The latter is not recognized by Korean web servers. Add domName method to TextEncoding to deal with cases where our internal encoding name does not match what's widely recognized by web servers. Currently, the only case is 'windows-949' (internal name) vs 'EUC-KR'. Test: fast/encoding/euckr-name.html * dom/Document.cpp: (WebCore::Document::encoding): Call TextEncoding.domName() instead of TextEncoding.name(). * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::domName): For the canonical name 'windows-949', return 'EUC-KR'. Otherwise, just return the canonical name. * platform/text/TextEncoding.h: 2009-05-05 Adam Langley <agl@google.com> Reviewed by Darin Adler. Rendering fix for <select> elements. https://bugs.webkit.org/show_bug.cgi?id=25558 When switching a <select> element from display:none to default display, we would fail to invalidate the parent's pref widths in some situations: When attaching the element, RenderMenuList::updateOptionsWidth would call setNeedsLayoutAndPrefWidthsRecalc before the parent pointer was set. This would mark the pref widths as dirty, but not for any parent objects. When RenderObjectChildList::appendChildNode later calls setNeedsLayoutAndPrefWidthsRecalc again, with a valid parent pointer, nothing would be done because the pref widths were already dirty for. the RenderMenuList. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateOptionsWidth): 2009-05-05 Antony Sargent <asargent@chromium.org> Reviewed by Dimitri Glazkov. Switch V8EventListenerList to use HashTable<T>. https://bugs.webkit.org/show_bug.cgi?id=25496 This avoids some tricky issues with event listener removal in the current implementation and has slightly better performance. No new functionality so no new tests. * bindings/v8/V8EventListenerList.cpp: Added V8EventListenerListIterator. * bindings/v8/V8EventListenerList.h: (WebCore::V8EventListenerList::size): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): 2009-05-05 Darin Fisher <darin@chromium.org> Fixing build bustage. Add some missing includes to fix the Chromium build. * bindings/v8/custom/V8DOMWindowCustom.cpp: * bindings/v8/custom/V8HTMLDocumentCustom.cpp: 2009-05-05 Darin Fisher <darin@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25570 history.{back,forward,go} should always be dispatched asynchronously, even when the history navigation would just result in scrolling the page. This matches the behavior of other browsers like IE and FF. Test: fast/history/back-forward-is-asynchronous.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::scheduleHistoryNavigation): 2009-05-05 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Add an ASSERT(useTransforms) to mapLocalToContainer implementations in SVG. https://bugs.webkit.org/show_bug.cgi?id=25532 https://bugs.webkit.org/show_bug.cgi?id=25568 Adding this ASSERT exposed a bug in SVGPaintServerPattern::setup which was causing transformed SVG text when filled/stroked with a pattern using patternUnits=objectBoundingBox to draw incorrectly. I fixed the incorrect drawing (by removing the broken code) and added two test cases to test the fix: * svg/transforms/text-with-pattern-inside-transformed-html.xhtml * svg/transforms/text-with-pattern-with-svg-transform.svg * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::mapLocalToContainer): * svg/graphics/SVGPaintServerPattern.cpp: (WebCore::SVGPaintServerPattern::setup): 2009-05-05 Greg Bolsinga <bolsinga@apple.com> Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=25554 Support HTML5 text control input types: email, number, tel, url Test: fast/html/text-field-input-types.html * bindings/objc/DOMHTML.mm: (-[DOMHTMLInputElement _isTextField]): Call HTMLInputElement::isTextField directly. * html/HTMLInputElement.cpp: Use the new types where appropriate. (WebCore::HTMLInputElement::setInputType): (WebCore::HTMLInputElement::type): (WebCore::HTMLInputElement::saveState): (WebCore::HTMLInputElement::restoreState): (WebCore::HTMLInputElement::accessKeyAction): (WebCore::HTMLInputElement::rendererIsNeeded): (WebCore::HTMLInputElement::createRenderer): (WebCore::HTMLInputElement::appendFormData): (WebCore::HTMLInputElement::valueWithDefault): (WebCore::HTMLInputElement::storesValueSeparateFromAttribute): (WebCore::HTMLInputElement::defaultEventHandler): * html/HTMLInputElement.h: Ditto. (WebCore::HTMLInputElement::): (WebCore::HTMLInputElement::isTextField): 2009-04-01 miggilin <mr.diggilin@gmail.com> Reviewed by Kevin Ollivier. Mouse wheel scrolling and keyboard shortcut support for wx. https://bugs.webkit.org/show_bug.cgi?id=24797 * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/wx/KeyboardEventWx.cpp: (WebCore::windowsKeyCodeForKeyEvent): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/wx/ScrollViewWx.cpp: (WebCore::ScrollView::platformSetScrollPosition): 2009-05-05 Kevin Ollivier <kevino@theolliviers.com> wx build fix for Windows, add missing include. https://bugs.webkit.org/show_bug.cgi?id=24798 * platform/wx/wxcode/win/non-kerned-drawing.cpp: 2009-05-05 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin. Bug 25574: AXImageMap children links don't respond properly to accessibilityHitTest: https://bugs.webkit.org/show_bug.cgi?id=25574 Enable accessibility hit-testing for image map links. Allow image map links to return AXURLs and AXAccessKey information. Test: platform/mac/accessibility/imagemap-hittest.html * page/AccessibilityImageMapLink.cpp: (WebCore::AccessibilityImageMapLink::url): * page/AccessibilityImageMapLink.h: * page/AccessibilityObject.h: (WebCore::AccessibilityObject::minValueForRange): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): (WebCore::AccessibilityRenderObject::doAccessibilityHitTest): * page/AccessibilityRenderObject.h: * page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeNames]): 2009-05-05 Kevin McCullough <kmccullough@apple.com> Reviewed by Dan Bernstein. <rdar://problem/6552129> Select a quote line and paste elsewhere, you get that line and an extra quoted blank line <rdar://problem/6609308> Triple-click a quoted header line, copy, paste onto an empty line makes an extra quoted line - When pasting a blockquote with a newline, make sure we put the newline outside of the blockquote so that it is not quoted. * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): 2009-05-05 Jan Michael Alonzo <jmalonzo@webkit.org> Reviewed by Xan Lopez. Call moz_gtk_shutdown on RenderThemeGtk destruction. * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::~RenderThemeGtk): * platform/gtk/RenderThemeGtk.h: 2009-05-05 Darin Adler <darin@apple.com> Reviewed by Steve Falkenburg. <rdar://problem/6858340> REGRESSION: can't drag local HTML files into Safari because CFURLCreateWithFileSystemPath inserts "localhost" * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::urlFromPath): Remove localhost. 2009-05-05 Peter Kasting <pkasting@google.com> Reviewed by Brady Eidson. Safety-check m_documentLoader before dereferencing. While it seems unlikely this could fail (as Safari 3 shipped without this), technically almost any call can change or reset m_documentLoader. * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedFirstData): 2009-05-05 Dan Bernstein <mitz@apple.com> - Tiger build fix * css/CSSComputedStyleDeclaration.cpp: (WebCore::toCSSIdentifier): 2009-05-05 Peter Kasting <pkasting@google.com> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25303 No need to ref the internal buffer inside the Skia ImageDecoder. * platform/image-decoders/skia/ImageDecoder.h: (WebCore::RGBA32Buffer::RGBA32Buffer): (WebCore::RGBA32Buffer::operator=): (WebCore::RGBA32Buffer::clear): (WebCore::RGBA32Buffer::copyBitmapData): (WebCore::RGBA32Buffer::bitmap): (WebCore::RGBA32Buffer::setSize): (WebCore::RGBA32Buffer::width): (WebCore::RGBA32Buffer::height): (WebCore::RGBA32Buffer::hasAlpha): (WebCore::RGBA32Buffer::setStatus): (WebCore::RGBA32Buffer::setHasAlpha): (WebCore::RGBA32Buffer::setRGBA): 2009-05-05 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. - fix https://bugs.webkit.org/show_bug.cgi?id=24192 <rdar://problem/5760774> Replying to a Mail message that contains fixed width text can change the size of the text Covered by existing tests: editing/pasteboard/5027857.html editing/pasteboard/paste-pre-002.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword): Added. If the font-size is keyword-based, returns the keyword value instead of the pixel size. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): If font-family is a generic family, return the generic family instead of the the internal string -webkit-[serif|sans-serif|cursive|fantasy |monospace]. (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties): For the font-size property, prefer a keyword value over a pixel size. * css/CSSComputedStyleDeclaration.h: * editing/ApplyStyleCommand.cpp: (WebCore::StyleChange::currentlyHasStyle): For the font-size property, call getFontSizeCSSValuePreferringKeyword(). * platform/graphics/FontDescription.h: (WebCore::FontDescription::keywordSize): Changed the return type to unsigned. (WebCore::FontDescription::setKeywordSize): Changed the parameter type to unsigned. (WebCore::FontDescription::m_keywordSize): Changed the type of this 4-bit field to unsigned, because it takes values as high as 8. 2009-05-05 Oliver Hunt <oliver@apple.com> Reviewed by Maciej Stachowiak. Fix http/tests/misc/DOMContentLoaded-event.html The native call performance improvement removed a few places where we unintentionally performed a toThisObject conversion. This patch updates the bindings codegen to not rely on this bug. * bindings/scripts/CodeGeneratorJS.pm: 2009-05-05 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Xan Lopez and Gustavo Noronha. Implement WebCore::directoryName for Gtk+. * platform/gtk/FileSystemGtk.cpp: (WebCore::directoryName): 2009-05-05 Eric Seidel <eric@webkit.org> Reviewed by Adam Roben. Fix mappedAttributes() access without NULL check https://bugs.webkit.org/show_bug.cgi?id=25553 SVGStyledElement::getPresentationAttribute was using mappedAttributes() without checking for NULL. HTMLInputElement::setInputType also doesn't NULL check, but I was not able to get it to crash with a test case so I just added an ASSERT. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setInputType): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::getPresentationAttribute): 2009-05-05 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Xan Lopez. Implement WebCore::imageTitle for Gtk+. * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::imageTitle): 2009-05-05 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. Bug 25559: Improve native function call performance <https://bugs.webkit.org/show_bug.cgi?id=25559> Add forwarding header necessary for compilation, and fix debugger to correctly account for change in JSFunction behaviour. * ForwardingHeaders/jit/JITCode.h: Added. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::recompileAllJSFunctions): 2009-05-05 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Ariya Hidayat. Make convertValueToQVariant more robust against null JSValues. Don't require the caller to do the null check. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): 2009-05-05 Eric Seidel <eric@webkit.org> No review, just a revert. Roll out http://trac.webkit.org/changeset/43213 as it caused 4 tests to crash. * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::mapLocalToContainer): 2009-05-04 Alexey Proskuryakov <ap@webkit.org> Reviewed by Dave Hyatt. <rdar://problem/6576889> REGRESSION (r35185): Cannot watch Flash movies on omg.yahoo.com The problem was caused by missing <head> element - we used to create it when moving a misplaced <style> element, but we now handle those in place. Other browsers always create a <head> element. There is no guarantee that a <head> element always exists - first, it can be removed with removeChild or innerHTML, and also, we don't currently create it for frameset documents, or for manually created ones (e.g. ImageDocument). Test: fast/parser/head-element-for-yahoo-player.html * dom/Document.cpp: (WebCore::Document::implicitClose): Create a <head> element for about:blank. A removed comment talked about rdar://3758785, but that problem doesn't re-occur even if this code is removed completely. * html/HTMLHtmlElement.cpp: (WebCore::HTMLHtmlElement::checkDTD): No longer allow <script> elements as children of <html>. This isn't directly related to this bug, but it was easier to fix both at once (IE and Firefox both don't allow such mispositioned <script> elements). * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Move <script> to <head> if <body> hasn't been created yet. Create a <head> it a <body> is created implicitly to contain some other element. (WebCore::HTMLParser::bodyCreateErrorCheck): Ensure that a <head> exists when <body> is explicitly present in source. (WebCore::HTMLParser::createHead): Do the work even if <html> element hasn't been created yet. 2009-05-04 Jakub Wieczorek <faw217@gmail.com> Reviewed by Simon Hausmann. As Qtish implementation of MIMETypeRegistry::getMIMETypeForExtension() returns the application/octet-stream mimetype when it can't associate extension with any mimetype, it can happen that the application/octet-stream mimetype will hit the list of supported image formats. For instance, it is possible when QImageReader or QImageWriter support an extension that is not in the extensions map. Make sure that this mimetype is not treated as displayable image type. * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes): (WebCore::initializeSupportedImageMIMETypesForEncoding): 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. ASSERT(useTransforms) in SVG mapLocalToContainer implementations https://bugs.webkit.org/show_bug.cgi?id=25532 * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::mapLocalToContainer): 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Remove m_absoluteBounds hack from RenderSVGText https://bugs.webkit.org/show_bug.cgi?id=25532 No functional changes (SVGs inside CSS transformed HTML should theoretically repaint better) * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): * rendering/RenderSVGText.h: 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Remove the vestigial calculateLocalTransform() https://bugs.webkit.org/show_bug.cgi?id=25532 RenderSVGContainer is now the only render which needs this function, but it no longer returns the unused bool. calculateLocalTransform() previously was called by the DOM before transform updates were part of layout(). * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::layout): * rendering/RenderForeignObject.h: (WebCore::RenderForeignObject::localTransform): * rendering/RenderPath.cpp: (WebCore::RenderPath::layout): * rendering/RenderPath.h: * rendering/RenderSVGContainer.cpp: * rendering/RenderSVGContainer.h: (WebCore::RenderSVGContainer::calculateLocalTransform): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::layout): * rendering/RenderSVGImage.h: * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): * rendering/RenderSVGText.h: * rendering/RenderSVGTransformableContainer.cpp: (WebCore::RenderSVGTransformableContainer::calculateLocalTransform): * rendering/RenderSVGTransformableContainer.h: 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Move more code into SVGRenderBase https://bugs.webkit.org/show_bug.cgi?id=25532 clippedOverflowRectForRepaint, computeRectForRepaint and mapLocalToContainer are now all shared via SVGRenderBase. RenderForeignObject should also be sharing this code, but I've left it alone for now, as changing that would likely cause test changes. No test changes. It's possible that transformed <svg:image> elements will now show up with better metrics in the inspector. * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::clippedOverflowRectForRepaint): (WebCore::RenderSVGImage::computeRectForRepaint): (WebCore::RenderSVGImage::mapLocalToContainer): * rendering/RenderSVGImage.h: * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint): (WebCore::RenderSVGModelObject::computeRectForRepaint): (WebCore::RenderSVGModelObject::mapLocalToContainer): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::clippedOverflowRectForRepaint): (WebCore::RenderSVGText::computeRectForRepaint): (WebCore::RenderSVGText::mapLocalToContainer): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::clippedOverflowRectForRepaint): (WebCore::SVGRenderBase::computeRectForRepaint): (WebCore::SVGRenderBase::mapLocalToContainer): * rendering/SVGRenderSupport.h: 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Add SVGRenderBase to share logic between SVG renderers https://bugs.webkit.org/show_bug.cgi?id=25532 I've added an SVGRenderBase base class which is shared by all of the SVG renders now. This patch is just moving code there are no functional changes in this patch. Currently I've left these functions in SVGRenderSupport.h In a later patch I will rename SVGRenderSupport.* to SVGRenderBase.* clampImageBufferSizeToViewport now takes a FrameView* which makes some code easier to read. * rendering/RenderSVGBlock.h: * rendering/RenderSVGImage.h: * rendering/RenderSVGModelObject.h: * rendering/RenderSVGRoot.h: * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::prepareToRenderSVGContent): (WebCore::SVGRenderBase::finishRenderSVGContent): (WebCore::clampImageBufferSizeToViewport): (WebCore::SVGRenderBase::computeContainerBoundingBox): (WebCore::SVGRenderBase::filterBoundingBoxForRenderer): * rendering/SVGRenderSupport.h: * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBoxPaintWalker::chunkStartCallback): (WebCore::SVGRootInlineBoxPaintWalker::chunkEndCallback): (WebCore::SVGRootInlineBox::paint): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::drawMaskerContent): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::buildPattern): * svg/graphics/SVGPaintServerGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): 2009-05-05 Simon Hausmann <simon.hausmann@nokia.com> Unreviewed SVG build fix. Include MappedAttribute.h after r43187. * svg/SVGComponentTransferFunctionElement.cpp: * svg/SVGFEBlendElement.cpp: * svg/SVGFEColorMatrixElement.cpp: * svg/SVGFEComponentTransferElement.cpp: * svg/SVGFECompositeElement.cpp: * svg/SVGFEDiffuseLightingElement.cpp: * svg/SVGFEDisplacementMapElement.cpp: * svg/SVGFEGaussianBlurElement.cpp: * svg/SVGFEImageElement.cpp: * svg/SVGFELightElement.cpp: * svg/SVGFEMergeNodeElement.cpp: * svg/SVGFEOffsetElement.cpp: * svg/SVGFESpecularLightingElement.cpp: * svg/SVGFETileElement.cpp: * svg/SVGFETurbulenceElement.cpp: * svg/SVGFilterElement.cpp: * svg/SVGFilterPrimitiveStandardAttributes.cpp: 2009-05-04 Brady Eidson <beidson@apple.com> Reviewed by Sam 'The Belly' Weinig <rdar://problem/6828894> - Facebook photo uploader applet broken on Leopard only In r41568 we started adding a default codebase attribute to <applet> tags if they didn't specify one themselves. Leopard's Java plug-in mishandles this case and fails to load code for the applet. The spirit of r41568 can be maintained by removing the "default codebase" piece and only performing the canLoad() check if a codebase was actually set on the applet tag. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createRenderer): Don't create a default codebase attribute. * loader/FrameLoader.cpp: (WebCore::FrameLoader::createJavaAppletWidget): Only perform the canLoad() check if the codebase was set. 2009-05-04 Adam Roben <aroben@apple.com> Windows build fix * html/HTMLCollection.h: * html/HTMLFormElement.h: Declare CollectionCache as a struct, not a class, to match its definition. 2009-05-04 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin, Oliver Hunt. Bug 25557: REGRESSION: Canvas elements are ignored instead of being exposed as AXImage https://bugs.webkit.org/show_bug.cgi?id=25557 Test: accessibility/canvas.html * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): (WebCore::AccessibilityRenderObject::roleValue): 2009-05-04 Brady Eidson <beidson@apple.com> Fix an ancient Changelog entry where Sam Weinig flat out lied and confused my exploration of a bug. * ChangeLog 2009-05-04 Kai Brüning <kai@granus.net> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=24883 24883: Bad success test in parseXMLDocumentFragment in XMLTokenizerLibxml2.cpp Fixed test whether all the chunk has been processed to correctly count utf8 bytes. Test: fast/innerHTML/innerHTML-nbsp.xhtml * dom/XMLTokenizerLibxml2.cpp: (WebCore::parseXMLDocumentFragment): 2009-05-04 Darin Adler <darin@apple.com> Reviewed by Eric Seidel. Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h, and NamedMappedAttrMap.h include of MappedAttribute.h https://bugs.webkit.org/show_bug.cgi?id=24924 Make compiles faster, and debugging info smaller. * GNUmakefile.am: Added new source files. * WebCore.pro: Ditto. * WebCore.scons: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCoreSources.bkl: Ditto. * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::toJS): Updated for new collection type names. * dom/Document.cpp: (WebCore::Document::createAttribute): Added. No longer inline. (WebCore::Document::images): Updated for new collection type names. (WebCore::Document::applets): Ditto. (WebCore::Document::embeds): Ditto. (WebCore::Document::plugins): Ditto. (WebCore::Document::objects): Ditto. (WebCore::Document::scripts): Ditto. (WebCore::Document::links): Ditto. (WebCore::Document::forms): Ditto. (WebCore::Document::anchors): Ditto. (WebCore::Document::all): Ditto. (WebCore::Document::windowNamedItems): Ditto. (WebCore::Document::documentNamedItems): Ditto. (WebCore::Document::nameCollectionInfo): Ditto. * dom/Document.h: Changed around includes and forward declarations. Updated for changes to collection types. * dom/NamedMappedAttrMap.h: Removed include of MappedAttribute.h. * html/CollectionCache.cpp: Copied from WebCore/html/HTMLCollection.cpp. Contains the class that used to be HTMLCollection::CollectionInfo. * html/CollectionCache.h: Copied from WebCore/html/HTMLCollection.h. Ditto. * html/CollectionType.h: Copied from WebCore/html/HTMLCollection.h. Has the enum that used to be HTMLCollection::Type. * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): Update for collection type change. (WebCore::HTMLCollection::create): Ditto. (WebCore::HTMLCollection::resetCollectionInfo): Ditto. (WebCore::HTMLCollection::itemAfter): Ditto. * html/HTMLCollection.h: Ditto. * html/HTMLElement.cpp: (WebCore::HTMLElement::children): Updated for new collection type names. * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::formCollectionInfo): Ditto. (WebCore::HTMLFormCollection::HTMLFormCollection): Ditto. * html/HTMLFormCollection.h: Ditto. * html/HTMLFormElement.h: Ditto. * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::areas): Ditto. * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::HTMLNameCollection): Ditto. * html/HTMLNameCollection.h: (WebCore::HTMLNameCollection::create): Ditto. * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::collectionInfo): Ditto. * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::tBodies):Ditto. * html/HTMLTableRowElement.cpp: (WebCore::HTMLTableRowElement::cells):Ditto. * html/HTMLTableRowsCollection.cpp: (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): Ditto. * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::rows): Ditto. * bindings/js/JSDOMWindowBase.cpp: Added newly-needed includes. * bindings/js/JSHTMLFrameSetElementCustom.cpp: Ditto. * css/CSSStyleSelector.cpp: Ditto. * dom/Element.cpp: Ditto. * dom/InputElement.cpp: Ditto. * dom/NamedAttrMap.cpp: Ditto. * dom/NamedMappedAttrMap.cpp: Ditto. * dom/Node.cpp: Ditto. * dom/StyledElement.cpp: Ditto. * dom/StyledElement.h: Ditto. * editing/ApplyStyleCommand.cpp: Ditto. * editing/DeleteSelectionCommand.cpp: Ditto. * editing/Editor.cpp: Ditto. * editing/EditorCommand.cpp: Ditto. * editing/InsertParagraphSeparatorCommand.cpp: Ditto. * editing/ReplaceSelectionCommand.cpp: Ditto. * editing/markup.cpp: Ditto. * html/CanvasRenderingContext2D.cpp: Ditto. * html/HTMLAnchorElement.cpp: Ditto. * html/HTMLAppletElement.cpp: Ditto. * html/HTMLAreaElement.cpp: Ditto. * html/HTMLBRElement.cpp: Ditto. * html/HTMLBaseElement.cpp: Ditto. * html/HTMLBodyElement.cpp: Ditto. * html/HTMLButtonElement.cpp: Ditto. * html/HTMLCanvasElement.cpp: Ditto. * html/HTMLDivElement.cpp: Ditto. * html/HTMLEmbedElement.cpp: Ditto. * html/HTMLFontElement.cpp: Ditto. * html/HTMLFormControlElement.cpp: Ditto. * html/HTMLFormElement.cpp: Ditto. * html/HTMLFrameElement.cpp: Ditto. * html/HTMLFrameElementBase.cpp: Ditto. * html/HTMLFrameSetElement.cpp: Ditto. * html/HTMLHRElement.cpp: Ditto. * html/HTMLIFrameElement.cpp: Ditto. * html/HTMLImageElement.cpp: Ditto. * html/HTMLInputElement.cpp: Ditto. * html/HTMLIsIndexElement.cpp: Ditto. * html/HTMLKeygenElement.cpp: Ditto. * html/HTMLLIElement.cpp: Ditto. * html/HTMLLinkElement.cpp: Ditto. * html/HTMLMarqueeElement.cpp: Ditto. * html/HTMLMetaElement.cpp: Ditto. * html/HTMLOListElement.cpp: Ditto. * html/HTMLObjectElement.cpp: Ditto. * html/HTMLOptionElement.cpp: Ditto. * html/HTMLParagraphElement.cpp: Ditto. * html/HTMLParamElement.cpp: Ditto. * html/HTMLPlugInElement.cpp: Ditto. * html/HTMLPreElement.cpp: Ditto. * html/HTMLScriptElement.cpp: Ditto. * html/HTMLSelectElement.cpp: Ditto. * html/HTMLStyleElement.cpp: Ditto. * html/HTMLTableCaptionElement.cpp: Ditto. * html/HTMLTableCellElement.cpp: Ditto. * html/HTMLTableColElement.cpp: Ditto. * html/HTMLTablePartElement.cpp: Ditto. * html/HTMLTextAreaElement.cpp: Ditto. * html/HTMLTokenizer.cpp: Ditto. * html/HTMLUListElement.cpp: Ditto. * html/HTMLVideoElement.cpp: Ditto. * html/HTMLViewSourceDocument.cpp: Ditto. * loader/ImageDocument.cpp: Ditto. * page/Frame.cpp: Ditto. * rendering/RenderTreeAsText.cpp: Ditto. * svg/SVGAElement.cpp: Ditto. * svg/SVGAnimateMotionElement.cpp: Ditto. * svg/SVGAnimateTransformElement.cpp: Ditto. * svg/SVGAnimationElement.cpp: Ditto. * svg/SVGCircleElement.cpp: Ditto. * svg/SVGClipPathElement.cpp: Ditto. * svg/SVGCursorElement.cpp: Ditto. * svg/SVGElement.cpp: Ditto. * svg/SVGEllipseElement.cpp: Ditto. * svg/SVGExternalResourcesRequired.cpp: Ditto. * svg/SVGFitToViewBox.cpp: Ditto. * svg/SVGFontFaceElement.cpp: Ditto. * svg/SVGFontFaceUriElement.cpp: Ditto. * svg/SVGForeignObjectElement.cpp: Ditto. * svg/SVGGlyphElement.cpp: Ditto. * svg/SVGGradientElement.cpp: Ditto. * svg/SVGImageElement.cpp: Ditto. * svg/SVGLangSpace.cpp: Ditto. * svg/SVGLineElement.cpp: Ditto. * svg/SVGLinearGradientElement.cpp: Ditto. * svg/SVGMarkerElement.cpp: Ditto. * svg/SVGMaskElement.cpp: Ditto. * svg/SVGPathElement.cpp: Ditto. * svg/SVGPatternElement.cpp: Ditto. * svg/SVGPolyElement.cpp: Ditto. * svg/SVGRadialGradientElement.cpp: Ditto. * svg/SVGRectElement.cpp: Ditto. * svg/SVGSVGElement.cpp: Ditto. * svg/SVGScriptElement.cpp: Ditto. * svg/SVGStopElement.cpp: Ditto. * svg/SVGStyleElement.cpp: Ditto. * svg/SVGStyledElement.cpp: Ditto. * svg/SVGStyledTransformableElement.cpp: Ditto. * svg/SVGTests.cpp: Ditto. * svg/SVGTextContentElement.cpp: Ditto. * svg/SVGTextElement.cpp: Ditto. * svg/SVGTextPathElement.cpp: Ditto. * svg/SVGTextPositioningElement.cpp: Ditto. * svg/SVGURIReference.cpp: Ditto. * svg/SVGUseElement.cpp: Ditto. * svg/SVGViewElement.cpp: Ditto. * svg/animation/SVGSMILElement.cpp: Ditto. * xml/XPathStep.cpp: Ditto. 2009-05-04 Pavel Feldman <pfeldman@chromium.org> Reviewed by Timothy Hatcher. Do not instantiate hidden WebInspector panels. Otherwise they are hitting unimplemented InspectorController methods. https://bugs.webkit.org/show_bug.cgi?id=25520 * inspector/front-end/inspector.js: (WebInspector.loaded): 2009-05-04 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler. <rdar://problem/6839881> With "Mail Contents of This Page" in Safari images don't appear in the Tiger Mail compose window DocumentLoader::subresource() is the implementation for the WebKit API [WebDataSource subresourceForURL:] and has particularly sticky behavior. If the DocumentLoader represents a WebArchive, this method should return ArchiveResources from that archive. However, we prefer CachedResources over ArchiveResources because they might represent fresher data than what was originally loaded from the WebArchive. In some instances, CachedResources are created and associated with the DocumentLoader but not immediately run through the loading delegate machinery. This was always a possibility, but the Preload Scanner made this significantly more likely. When this happens and someone asks the WebDataSource for a subresource, it would prefer the CachedResource over an ArchiveResource it has even if the CachedResource hasn't been loaded yet. The CachedResource has nil data, so no WebResource is returned, and the client thinks the subresource doesn't exist even though it does. This broke Tiger Mail and probably various other WebKit applications but has a fairly straightforward fix. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::subresource): If there is a CachedResource but it hasn't been loaded yet, fallback to the ArchiveResource. 2009-05-04 Eric Carlson <eric.carlson@apple.com> Reviewed by Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=25545 Bug 25545: HTMLMediaElement: display anamorphic video correctly Tell QuickTime to use clean aperture mode so movies with non-square pixels are sized and displayed correctly. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::createQTMovie): Ask QuickTime to use clean aperture mode. * platform/graphics/win/QTMovieWin.cpp: (QTMovieWin::load): Ditto. Add ASSERT to ensure that static movie property array isn't filled beyond capacity. 2009-05-03 Mark Rowe <mrowe@apple.com> Reviewed by Darin Adler. Fix <https://bugs.webkit.org/show_bug.cgi?id=25332>. Bug 25332: Plug-in inserted in to DOM of PluginDocument fails to load Only the first plug-in in a PluginDocument can use the main resource data. For all subsequent plug-ins, such as the plug-in that ClickToFlash inserts when swapping itself out for the real Flash plug-in, we need to load the resource data in the same manner as for other embedded plug-ins. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadPlugin): 2009-05-04 Simon Hausmann <simon.hausmann@nokia.com> Rubber-stamped by Ariya Hidayat. Update the qrc file for the Web Inspector in the Qt build with missing files. * inspector/front-end/WebKit.qrc: 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by George Staikos. Move absoluteRects and absoluteQuads into RenderSVGInline and remove absoluteTransform() usage https://bugs.webkit.org/show_bug.cgi?id=25532 * rendering/RenderSVGInline.cpp: (WebCore::RenderSVGInline::absoluteRects): (WebCore::RenderSVGInline::absoluteQuads): * rendering/RenderSVGInline.h: * rendering/RenderSVGTSpan.cpp: * rendering/RenderSVGTSpan.h: * rendering/RenderSVGTextPath.cpp: * rendering/RenderSVGTextPath.h: 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by George Staikos. Move RenderSVGText off of localToAbsolute() https://bugs.webkit.org/show_bug.cgi?id=25532 * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::absoluteRects): (WebCore::RenderSVGText::absoluteQuads): 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by George Staikos. Remove broken absoluteTransform() code from RenderSVGInlineText https://bugs.webkit.org/show_bug.cgi?id=25532 This improved SVG text focus rings. This also improved SVG.getScreenCTM() results. SVGSVGElement::getScreenCTM was passing "true" for the second argument in localToAbsolute, which is "fixed" it meant to pass "true" for the third argument (useTransforms). That change alone caused no layout test changes, however before I fixed this, it was hitting ASSERT(!fixed) in RenderSVGRoot::mapLocalToContainer mapLocalToContainer implementations really should be shared, but I'll do that in a later patch. * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::styleDidChange): (WebCore::RenderSVGInlineText::absoluteQuads): (WebCore::RenderSVGInlineText::computeRepaintRectForRange): (WebCore::RenderSVGInlineText::computeRepaintQuadForRange): * rendering/RenderSVGInlineText.h: * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): * rendering/RenderSVGRoot.h: * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::mapLocalToContainer): * rendering/RenderSVGText.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::getScreenCTM): 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by George Staikos. Remove dead code from RenderPath https://bugs.webkit.org/show_bug.cgi?id=25532 * rendering/RenderPath.cpp: * rendering/RenderPath.h: 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by George Staikos. Share layout code between RenderSVGViewportContainer and RenderSVGContainer https://bugs.webkit.org/show_bug.cgi?id=25532 * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): * rendering/RenderSVGContainer.h: (WebCore::RenderSVGContainer::calcViewport): * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::applyViewportClip): * rendering/RenderSVGViewportContainer.h: 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by George Staikos. Remove redundant disableLayoutState() calls https://bugs.webkit.org/show_bug.cgi?id=25532 * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::layout): * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::layout): 2009-05-03 Eric Seidel <eric@webkit.org> Reviewed by George Staikos. Simplify RenderForeignObject::paint and fix a repaint bug. Paint now calls applyTransformToPaintInfo which correctly transforms the damage rect. https://bugs.webkit.org/show_bug.cgi?id=16939 * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::paint): 2009-05-03 Hironori Bono <hbono@chromium.org> Reviewed by Eric Seidel. Test: editing/spelling/spellcheck-attribute.html Bug 14552: Add a way to disable spell checking for specific element https://bugs.webkit.org/show_bug.cgi?id=14552 For compatibility with Firefox, this code ascends the DOM tree when an element does not have its "spellcheck" attribute. * editing/Editor.cpp: (WebCore::markMisspellingsOrBadGrammar): Retrieve the value of the "spellcheck" attribute of an element before calling a spell checker or a grammar checker. * html/HTMLAttributeNames.in: Add a "spellcheck" attribute. 2009-05-03 Sam Weinig <sam@webkit.org> Roll JSC API number marshaling back in one last time (I hope). 2009-05-03 Sam Weinig <sam@webkit.org> Roll JSC API number marshaling back out. It still breaks windows. 2009-05-03 Sam Weinig <sam@webkit.org> Roll JSC API number marshaling back in. 2009-05-02 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. - another fix for <rdar://problem/6617298> Typing delete on an unquoted blank line unquotes the preceding, quoted blank line Test: editing/deleting/type-delete-after-quote-2.html * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Initialize m_startsAtEmptyLine. (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete): When the selection starts at an empty line, do not prevent the merging of blocks. This is what allows the text after the line break to be merged into the block containing the line break. Also set m_startsAtEmptyLine to true. (WebCore::DeleteSelectionCommand::mergeParagraphs): If m_startsAtEmptyLine is true, create a placeholder BR to serve as the merge destination. * editing/DeleteSelectionCommand.h: 2009-05-02 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. Simplified null-ish JSValues. Replaced calls to noValue() with calls to JSValue() (which is what noValue() returned). Removed noValue(). Removed "JSValue()" initialiazers, since default construction happens... by default. * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::open): (WebCore::JSDOMWindow::showModalDialog): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::evaluate): * bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluate): * bindings/js/ScriptValue.h: (WebCore::ScriptValue::ScriptValue): (WebCore::ScriptValue::hasNoValue): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): * bridge/jni/jni_instance.cpp: (JavaInstance::invokeMethod): * bridge/jni/jni_runtime.cpp: (JavaField::dispatchValueFromInstance): (JavaField::dispatchSetValueToInstance): * bridge/runtime.h: (JSC::Bindings::Instance::invokeConstruct): 2009-05-02 Antti Koivisto <antti@apple.com> Reviewed by Dan Bernstein. <rdar://problem/6631735> Crash in WebCore::CSSStyleSelector::applyProperty(int, WebCore::CSSValue*) (RenderStyle.h:454) Avoid re-entering style selector from load delegates by not issuing resource loads synchronously during attach(). * dom/ContainerNode.cpp: (WebCore::ContainerNode::suspendPostAttachCallbacks): (WebCore::ContainerNode::resumePostAttachCallbacks): (WebCore::ContainerNode::attach): * dom/Element.cpp: (WebCore::Element::attach): * loader/loader.cpp: (WebCore::Loader::Loader): (WebCore::Loader::servePendingRequests): (WebCore::Loader::suspendPendingRequests): (WebCore::Loader::resumePendingRequests): (WebCore::Loader::Host::servePendingRequests): * loader/loader.h: (WebCore::Loader::isSuspendingPendingRequests): 2009-05-02 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. Bug 25352: REGRESSION(r42322): style isn't applied at bmwusa.com https://bugs.webkit.org/show_bug.cgi?id=25352 rdar://problem/6823239 Test: http/tests/mime/standard-mode-loads-stylesheet-with-text-css-and-invalid-type.html * platform/network/HTTPParsers.cpp: (WebCore::extractMIMETypeFromMediaType): Allow comma as a separator. 2009-05-02 Darin Adler <darin@apple.com> Reviewed by Brady Eidson. Bug 25491: WebFrame leak when a subframe removes itself https://bugs.webkit.org/show_bug.cgi?id=25491 rdar://problem/6833859 Test: fast/loading/subframe-removes-itself.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): When isStopping is true, treat load as complete, even if isLoadingInAPISense is still returning true. 2009-05-01 Sam Weinig <sam@webkit.org> Roll out JavaScriptCore API number marshaling. * bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::isEqual): * inspector/JavaScriptProfile.cpp: (WebCore::getHeadCallback): * inspector/JavaScriptProfileNode.cpp: (WebCore::getChildren): (WebCore::getParent): (WebCore::getHead): 2009-05-01 Sam Weinig <sam@webkit.org> Fix build. * workers/WorkerContext.idl: 2009-05-01 Sam Weinig <sam@webkit.org> Reviewed by Oliver Hunt. Cleanup workers code a bit. * bindings/js/JSWorkerContextBase.cpp: (WebCore::toJS): * bindings/js/JSWorkerContextBase.h: * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::customGetOwnPropertySlot): * workers/WorkerContext.h: (WebCore::WorkerContext::toWorkerContext): (WebCore::WorkerContext::self): (WebCore::WorkerContext::setOnmessage): (WebCore::WorkerContext::onmessage): * workers/WorkerContext.idl: 2009-05-01 Sam Weinig <sam@webkit.org> Reviewed by Darin Adler. A little clean up. * loader/FrameLoader.cpp: (WebCore::FrameLoader::createJavaAppletWidget): 2009-05-01 Sam Weinig <sam@webkit.org> Fix the build. * bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::isEqual): * inspector/JavaScriptProfile.cpp: (WebCore::getHeadCallback): * inspector/JavaScriptProfileNode.cpp: (WebCore::getChildren): (WebCore::getParent): (WebCore::getHead): 2009-05-01 Brady Eidson <beidson@apple.com> Reviewed by Oliver Hunt and Sam "Jon 'The Belly' Honeycutt" Weinig Fix <rdar://problem/6848867> Addition of DOCTYPE node breaks Tiger Mail * bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument firstChild]): Add a Tiger Mail version of this method that skips DOCTYPE nodes. 2009-05-01 Geoffrey Garen <ggaren@apple.com> Rubber Stamped by Sam Weinig. Renamed JSValuePtr => JSValue. * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::setValue): * bindings/js/JSCDATASectionCustom.cpp: (WebCore::toJSNewlyCreated): * bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJS): * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter): (WebCore::JSCSSStyleDeclaration::customPut): * bindings/js/JSCSSValueCustom.cpp: (WebCore::toJS): * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::toJS): (WebCore::toHTMLCanvasStyle): (WebCore::JSCanvasRenderingContext2D::strokeStyle): (WebCore::JSCanvasRenderingContext2D::setStrokeStyle): (WebCore::JSCanvasRenderingContext2D::fillStyle): (WebCore::JSCanvasRenderingContext2D::setFillStyle): (WebCore::JSCanvasRenderingContext2D::setFillColor): (WebCore::JSCanvasRenderingContext2D::setStrokeColor): (WebCore::JSCanvasRenderingContext2D::strokeRect): (WebCore::JSCanvasRenderingContext2D::drawImage): (WebCore::JSCanvasRenderingContext2D::drawImageFromRect): (WebCore::JSCanvasRenderingContext2D::setShadow): (WebCore::JSCanvasRenderingContext2D::createPattern): (WebCore::JSCanvasRenderingContext2D::putImageData): (WebCore::JSCanvasRenderingContext2D::fillText): (WebCore::JSCanvasRenderingContext2D::strokeText): * bindings/js/JSClipboardCustom.cpp: (WebCore::JSClipboard::types): (WebCore::JSClipboard::clearData): (WebCore::JSClipboard::getData): (WebCore::JSClipboard::setData): (WebCore::JSClipboard::setDragImage): * bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::profiles): * bindings/js/JSCoordinatesCustom.cpp: (WebCore::JSCoordinates::altitude): (WebCore::JSCoordinates::altitudeAccuracy): (WebCore::JSCoordinates::heading): (WebCore::JSCoordinates::speed): * bindings/js/JSCustomPositionCallback.cpp: (WebCore::JSCustomPositionCallback::handleEvent): * bindings/js/JSCustomPositionErrorCallback.cpp: (WebCore::JSCustomPositionErrorCallback::handleEvent): * bindings/js/JSCustomSQLStatementCallback.cpp: (WebCore::JSCustomSQLStatementCallback::handleEvent): * bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): * bindings/js/JSCustomSQLTransactionCallback.cpp: (WebCore::JSCustomSQLTransactionCallback::handleEvent): * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): * bindings/js/JSCustomVoidCallback.cpp: (WebCore::JSCustomVoidCallback::handleEvent): (WebCore::toVoidCallback): * bindings/js/JSCustomVoidCallback.h: * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::create): (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSCustomXPathNSResolver.h: * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::hasItem): (WebCore::JSDOMApplicationCache::add): (WebCore::JSDOMApplicationCache::remove): (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): * bindings/js/JSDOMBinding.cpp: (WebCore::jsStringOrNull): (WebCore::jsOwnedStringOrNull): (WebCore::jsStringOrUndefined): (WebCore::jsStringOrFalse): (WebCore::valueToStringWithNullCheck): (WebCore::valueToStringWithUndefinedOrNullCheck): (WebCore::reportException): (WebCore::reportCurrentException): (WebCore::setDOMException): (WebCore::objectToStringFunctionGetter): * bindings/js/JSDOMBinding.h: (WebCore::getDOMObjectWrapper): (WebCore::getDOMNodeWrapper): (WebCore::toJS): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::findJSEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener): (WebCore::JSDOMGlobalObject::createJSAttributeEventListener): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMStringListCustom.cpp: (WebCore::JSDOMStringList::getByIndex): (WebCore::JSDOMStringList::item): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::childFrameGetter): (WebCore::JSDOMWindowBase::indexGetter): (WebCore::JSDOMWindowBase::namedItemGetter): (WebCore::JSDOMWindowBase::getOwnPropertySlot): (WebCore::JSDOMWindowBase::put): (WebCore::JSDOMWindowBase::setReturnValueSlot): (WebCore::toJS): (WebCore::toJSDOMWindow): * bindings/js/JSDOMWindowBase.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::lookupGetter): (WebCore::JSDOMWindow::lookupSetter): (WebCore::JSDOMWindow::history): (WebCore::JSDOMWindow::location): (WebCore::JSDOMWindow::setLocation): (WebCore::JSDOMWindow::crypto): (WebCore::JSDOMWindow::event): (WebCore::JSDOMWindow::image): (WebCore::JSDOMWindow::option): (WebCore::JSDOMWindow::audio): (WebCore::JSDOMWindow::webKitPoint): (WebCore::JSDOMWindow::webKitCSSMatrix): (WebCore::JSDOMWindow::xmlHttpRequest): (WebCore::JSDOMWindow::xsltProcessor): (WebCore::JSDOMWindow::messageChannel): (WebCore::JSDOMWindow::worker): (WebCore::createWindow): (WebCore::JSDOMWindow::open): (WebCore::JSDOMWindow::showModalDialog): (WebCore::JSDOMWindow::postMessage): (WebCore::JSDOMWindow::setTimeout): (WebCore::JSDOMWindow::setInterval): (WebCore::JSDOMWindow::atob): (WebCore::JSDOMWindow::btoa): (WebCore::JSDOMWindow::addEventListener): (WebCore::JSDOMWindow::removeEventListener): (WebCore::toDOMWindow): * bindings/js/JSDOMWindowCustom.h: (WebCore::nonCachingStaticFunctionGetter): (WebCore::JSDOMWindow::customPut): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::put): (WebCore::JSDOMWindowShell::putWithAttributes): (WebCore::JSDOMWindowShell::lookupGetter): (WebCore::JSDOMWindowShell::lookupSetter): (WebCore::toJS): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure): * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::JSDatabase::transaction): * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::location): (WebCore::JSDocument::setLocation): (WebCore::toJS): * bindings/js/JSElementCustom.cpp: (WebCore::JSElement::setAttribute): (WebCore::JSElement::setAttributeNode): (WebCore::JSElement::setAttributeNS): (WebCore::JSElement::setAttributeNodeNS): (WebCore::toJSNewlyCreated): * bindings/js/JSEventCustom.cpp: (WebCore::JSEvent::clipboardData): (WebCore::toJS): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSEventTarget.cpp: (WebCore::toJS): (WebCore::toEventTarget): * bindings/js/JSEventTarget.h: * bindings/js/JSEventTargetBase.h: * bindings/js/JSGeolocationCustom.cpp: (WebCore::createPositionOptions): (WebCore::JSGeolocation::getCurrentPosition): (WebCore::JSGeolocation::watchPosition): * bindings/js/JSHTMLAllCollection.h: (WebCore::JSHTMLAllCollection::createStructure): * bindings/js/JSHTMLAppletElementCustom.cpp: (WebCore::JSHTMLAppletElement::customPut): (WebCore::JSHTMLAppletElement::nameGetter): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::getNamedItems): (WebCore::callHTMLCollection): (WebCore::JSHTMLCollection::nameGetter): (WebCore::JSHTMLCollection::item): (WebCore::JSHTMLCollection::namedItem): (WebCore::toJS): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): (WebCore::JSHTMLDocument::all): (WebCore::JSHTMLDocument::setAll): (WebCore::JSHTMLDocument::open): (WebCore::JSHTMLDocument::write): (WebCore::JSHTMLDocument::writeln): * bindings/js/JSHTMLEmbedElementCustom.cpp: (WebCore::JSHTMLEmbedElement::customPut): (WebCore::JSHTMLEmbedElement::nameGetter): * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::nameGetter): (WebCore::JSHTMLFormElement::submit): * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::JSHTMLFrameElement::setSrc): (WebCore::JSHTMLFrameElement::setLocation): * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): * bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc): * bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::JSHTMLInputElement::selectionStart): (WebCore::JSHTMLInputElement::setSelectionStart): (WebCore::JSHTMLInputElement::selectionEnd): (WebCore::JSHTMLInputElement::setSelectionEnd): (WebCore::JSHTMLInputElement::setSelectionRange): * bindings/js/JSHTMLObjectElementCustom.cpp: (WebCore::JSHTMLObjectElement::customPut): (WebCore::JSHTMLObjectElement::nameGetter): * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::length): (WebCore::JSHTMLOptionsCollection::setLength): (WebCore::JSHTMLOptionsCollection::indexSetter): (WebCore::JSHTMLOptionsCollection::add): (WebCore::JSHTMLOptionsCollection::remove): * bindings/js/JSHTMLSelectElementCustom.cpp: (WebCore::JSHTMLSelectElement::remove): (WebCore::selectIndexSetter): (WebCore::JSHTMLSelectElement::indexSetter): * bindings/js/JSHTMLSelectElementCustom.h: * bindings/js/JSHistoryCustom.cpp: (WebCore::nonCachingStaticBackFunctionGetter): (WebCore::nonCachingStaticForwardFunctionGetter): (WebCore::nonCachingStaticGoFunctionGetter): (WebCore::JSHistory::customPut): * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): * bindings/js/JSInspectedObjectWrapper.cpp: (WebCore::JSInspectedObjectWrapper::wrap): (WebCore::JSInspectedObjectWrapper::prepareIncomingValue): * bindings/js/JSInspectedObjectWrapper.h: (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue): * bindings/js/JSInspectorCallbackWrapper.cpp: (WebCore::JSInspectorCallbackWrapper::wrap): (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue): * bindings/js/JSInspectorCallbackWrapper.h: (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue): * bindings/js/JSInspectorControllerCustom.cpp: (WebCore::JSInspectorController::highlightDOMNode): (WebCore::JSInspectorController::addResourceSourceToFrame): (WebCore::JSInspectorController::addSourceToFrame): (WebCore::JSInspectorController::getResourceDocumentNode): (WebCore::JSInspectorController::search): (WebCore::JSInspectorController::databaseTableNames): (WebCore::JSInspectorController::inspectedWindow): (WebCore::JSInspectorController::setting): (WebCore::JSInspectorController::setSetting): (WebCore::JSInspectorController::wrapCallback): (WebCore::JSInspectorController::currentCallFrame): (WebCore::JSInspectorController::profiles): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::evaluate): (WebCore::JSJavaScriptCallFrame::thisObject): (WebCore::JSJavaScriptCallFrame::type): (WebCore::JSJavaScriptCallFrame::scopeChain): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): * bindings/js/JSLocationCustom.cpp: (WebCore::nonCachingStaticReplaceFunctionGetter): (WebCore::nonCachingStaticReloadFunctionGetter): (WebCore::nonCachingStaticAssignFunctionGetter): (WebCore::JSLocation::customPut): (WebCore::JSLocation::setHref): (WebCore::JSLocation::setProtocol): (WebCore::JSLocation::setHost): (WebCore::JSLocation::setHostname): (WebCore::JSLocation::setPort): (WebCore::JSLocation::setPathname): (WebCore::JSLocation::setSearch): (WebCore::JSLocation::setHash): (WebCore::JSLocation::replace): (WebCore::JSLocation::reload): (WebCore::JSLocation::assign): (WebCore::JSLocation::toString): (WebCore::JSLocationPrototype::customPut): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::startConversation): (WebCore::JSMessagePort::addEventListener): (WebCore::JSMessagePort::removeEventListener): * bindings/js/JSMimeTypeArrayCustom.cpp: (WebCore::JSMimeTypeArray::nameGetter): * bindings/js/JSNamedNodeMapCustom.cpp: (WebCore::JSNamedNodeMap::nameGetter): * bindings/js/JSNamedNodesCollection.cpp: (WebCore::JSNamedNodesCollection::lengthGetter): (WebCore::JSNamedNodesCollection::indexGetter): * bindings/js/JSNamedNodesCollection.h: (WebCore::JSNamedNodesCollection::createStructure): * bindings/js/JSNavigatorCustom.cpp: (WebCore::needsYouTubeQuirk): (WebCore::JSNavigator::appVersion): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::insertBefore): (WebCore::JSNode::replaceChild): (WebCore::JSNode::removeChild): (WebCore::JSNode::appendChild): (WebCore::JSNode::addEventListener): (WebCore::JSNode::removeEventListener): (WebCore::createWrapper): (WebCore::toJSNewlyCreated): (WebCore::toJS): * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::JSNodeFilterCondition): (WebCore::JSNodeFilterCondition::acceptNode): * bindings/js/JSNodeFilterCondition.h: (WebCore::JSNodeFilterCondition::create): * bindings/js/JSNodeFilterCustom.cpp: (WebCore::JSNodeFilter::acceptNode): (WebCore::toNodeFilter): * bindings/js/JSNodeIteratorCustom.cpp: (WebCore::JSNodeIterator::nextNode): (WebCore::JSNodeIterator::previousNode): * bindings/js/JSNodeListCustom.cpp: (WebCore::callNodeList): (WebCore::JSNodeList::nameGetter): * bindings/js/JSPluginArrayCustom.cpp: (WebCore::JSPluginArray::nameGetter): * bindings/js/JSPluginCustom.cpp: (WebCore::JSPlugin::nameGetter): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::runtimeObjectGetter): (WebCore::runtimeObjectPropertyGetter): (WebCore::runtimeObjectCustomPut): (WebCore::callPlugin): * bindings/js/JSPluginElementFunctions.h: * bindings/js/JSQuarantinedObjectWrapper.cpp: (WebCore::JSQuarantinedObjectWrapper::asWrapper): (WebCore::JSQuarantinedObjectWrapper::cachedValueGetter): (WebCore::JSQuarantinedObjectWrapper::transferExceptionToExecState): (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot): (WebCore::JSQuarantinedObjectWrapper::put): (WebCore::JSQuarantinedObjectWrapper::construct): (WebCore::JSQuarantinedObjectWrapper::hasInstance): (WebCore::JSQuarantinedObjectWrapper::call): * bindings/js/JSQuarantinedObjectWrapper.h: (WebCore::JSQuarantinedObjectWrapper::createStructure): * bindings/js/JSRGBColor.cpp: (WebCore::getJSRGBColor): (jsRGBColorRed): (jsRGBColorGreen): (jsRGBColorBlue): * bindings/js/JSRGBColor.h: (WebCore::JSRGBColor::createStructure): * bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): (WebCore::JSSVGElementInstance::removeEventListener): (WebCore::toJS): * bindings/js/JSSVGLengthCustom.cpp: (WebCore::JSSVGLength::value): (WebCore::JSSVGLength::convertToSpecifiedUnits): * bindings/js/JSSVGMatrixCustom.cpp: (WebCore::JSSVGMatrix::inverse): (WebCore::JSSVGMatrix::rotateFromVector): * bindings/js/JSSVGPathSegCustom.cpp: (WebCore::toJS): * bindings/js/JSSVGPathSegListCustom.cpp: (WebCore::JSSVGPathSegList::clear): (WebCore::JSSVGPathSegList::initialize): (WebCore::JSSVGPathSegList::getItem): (WebCore::JSSVGPathSegList::insertItemBefore): (WebCore::JSSVGPathSegList::replaceItem): (WebCore::JSSVGPathSegList::removeItem): (WebCore::JSSVGPathSegList::appendItem): * bindings/js/JSSVGPointListCustom.cpp: (WebCore::finishGetter): (WebCore::finishSetter): (WebCore::finishSetterReadOnlyResult): (WebCore::JSSVGPointList::clear): (WebCore::JSSVGPointList::initialize): (WebCore::JSSVGPointList::getItem): (WebCore::JSSVGPointList::insertItemBefore): (WebCore::JSSVGPointList::replaceItem): (WebCore::JSSVGPointList::removeItem): (WebCore::JSSVGPointList::appendItem): * bindings/js/JSSVGTransformListCustom.cpp: (WebCore::finishGetter): (WebCore::finishSetter): (WebCore::finishSetterReadOnlyResult): (WebCore::JSSVGTransformList::clear): (WebCore::JSSVGTransformList::initialize): (WebCore::JSSVGTransformList::getItem): (WebCore::JSSVGTransformList::insertItemBefore): (WebCore::JSSVGTransformList::replaceItem): (WebCore::JSSVGTransformList::removeItem): (WebCore::JSSVGTransformList::appendItem): * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::nameGetter): (WebCore::JSStorage::deleteProperty): (WebCore::JSStorage::customPut): * bindings/js/JSStyleSheetCustom.cpp: (WebCore::toJS): * bindings/js/JSStyleSheetListCustom.cpp: (WebCore::JSStyleSheetList::nameGetter): * bindings/js/JSTextCustom.cpp: (WebCore::toJSNewlyCreated): * bindings/js/JSTreeWalkerCustom.cpp: (WebCore::JSTreeWalker::parentNode): (WebCore::JSTreeWalker::firstChild): (WebCore::JSTreeWalker::lastChild): (WebCore::JSTreeWalker::nextSibling): (WebCore::JSTreeWalker::previousSibling): (WebCore::JSTreeWalker::previousNode): (WebCore::JSTreeWalker::nextNode): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::self): (WebCore::JSWorkerContext::setSelf): (WebCore::JSWorkerContext::xmlHttpRequest): (WebCore::JSWorkerContext::importScripts): (WebCore::JSWorkerContext::addEventListener): (WebCore::JSWorkerContext::removeEventListener): (WebCore::JSWorkerContext::setTimeout): (WebCore::JSWorkerContext::setInterval): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::addEventListener): (WebCore::JSWorker::removeEventListener): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::open): (WebCore::JSXMLHttpRequest::setRequestHeader): (WebCore::JSXMLHttpRequest::send): (WebCore::JSXMLHttpRequest::getResponseHeader): (WebCore::JSXMLHttpRequest::overrideMimeType): (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): (WebCore::JSXMLHttpRequest::responseText): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener): * bindings/js/JSXSLTProcessorCustom.cpp: (WebCore::JSXSLTProcessor::importStylesheet): (WebCore::JSXSLTProcessor::transformToFragment): (WebCore::JSXSLTProcessor::transformToDocument): (WebCore::JSXSLTProcessor::setParameter): (WebCore::JSXSLTProcessor::getParameter): (WebCore::JSXSLTProcessor::removeParameter): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): (WebCore::ScheduledAction::ScheduledAction): (WebCore::ScheduledAction::executeFunctionInContext): * bindings/js/ScheduledAction.h: * bindings/js/ScriptCallStack.cpp: (WebCore::ScriptCallStack::ScriptCallStack): (WebCore::ScriptCallStack::initialize): * bindings/js/ScriptCallStack.h: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::jsObjectForPluginElement): * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::appendArgument): (WebCore::ScriptFunctionCall::call): (WebCore::ScriptFunctionCall::construct): * bindings/js/ScriptFunctionCall.h: * bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::get): * bindings/js/ScriptValue.h: (WebCore::ScriptValue::ScriptValue): (WebCore::ScriptValue::jsValue): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject evaluateWebScript:]): (-[WebScriptObject valueForKey:]): (-[WebScriptObject webScriptValueAtIndex:]): (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bindings/objc/WebScriptObjectPrivate.h: * bridge/NP_jsobject.cpp: (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Evaluate): (_NPN_GetProperty): (_NPN_HasMethod): (_NPN_Construct): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::invokeMethod): (JSC::Bindings::CInstance::invokeDefaultMethod): (JSC::Bindings::CInstance::invokeConstruct): (JSC::Bindings::CInstance::defaultValue): (JSC::Bindings::CInstance::stringValue): (JSC::Bindings::CInstance::numberValue): (JSC::Bindings::CInstance::booleanValue): (JSC::Bindings::CInstance::valueOf): * bridge/c/c_instance.h: * bridge/c/c_runtime.cpp: (JSC::Bindings::CField::valueFromInstance): (JSC::Bindings::CField::setValueToInstance): * bridge/c/c_runtime.h: * bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant): (JSC::Bindings::convertNPVariantToValue): * bridge/c/c_utility.h: * bridge/jni/jni_instance.cpp: (JavaInstance::stringValue): (JavaInstance::numberValue): (JavaInstance::booleanValue): (JavaInstance::invokeMethod): (JavaInstance::defaultValue): (JavaInstance::valueOf): * bridge/jni/jni_instance.h: * bridge/jni/jni_jsobject.h: * bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::getSlot): (JavaJSObject::convertValueToJObject): (JavaJSObject::convertJObjectToValue): * bridge/jni/jni_objc.mm: (JSC::Bindings::dispatchJNICall): * bridge/jni/jni_runtime.cpp: (JavaArray::convertJObjectToArray): (JavaField::dispatchValueFromInstance): (JavaField::valueFromInstance): (JavaField::dispatchSetValueToInstance): (JavaField::setValueToInstance): (JavaArray::setValueAt): (JavaArray::valueAt): * bridge/jni/jni_runtime.h: * bridge/jni/jni_utility.cpp: (JSC::Bindings::convertArrayInstanceToJavaArray): (JSC::Bindings::convertValueToJValue): * bridge/jni/jni_utility.h: * bridge/objc/WebScriptObject.h: * bridge/objc/objc_class.h: * bridge/objc/objc_class.mm: (JSC::Bindings::ObjcClass::fallbackObject): * bridge/objc/objc_instance.h: * bridge/objc/objc_instance.mm: (ObjcInstance::invokeMethod): (ObjcInstance::invokeDefaultMethod): (ObjcInstance::setValueOfUndefinedField): (ObjcInstance::getValueOfUndefinedField): (ObjcInstance::defaultValue): (ObjcInstance::stringValue): (ObjcInstance::numberValue): (ObjcInstance::booleanValue): (ObjcInstance::valueOf): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcField::valueFromInstance): (JSC::Bindings::convertValueToObjcObject): (JSC::Bindings::ObjcField::setValueToInstance): (JSC::Bindings::ObjcArray::setValueAt): (JSC::Bindings::ObjcArray::valueAt): (JSC::Bindings::ObjcFallbackObjectImp::put): (JSC::Bindings::callObjCFallbackObject): (JSC::Bindings::ObjcFallbackObjectImp::defaultValue): * bridge/objc/objc_utility.h: * bridge/objc/objc_utility.mm: (JSC::Bindings::convertValueToObjcValue): (JSC::Bindings::convertNSStringToString): (JSC::Bindings::convertObjcValueToValue): * bridge/runtime.h: (JSC::Bindings::Class::fallbackObject): (JSC::Bindings::Instance::setValueOfUndefinedField): (JSC::Bindings::Instance::invokeDefaultMethod): (JSC::Bindings::Instance::invokeConstruct): (JSC::Bindings::Instance::put): * bridge/runtime_array.cpp: (JSC::RuntimeArray::lengthGetter): (JSC::RuntimeArray::indexGetter): (JSC::RuntimeArray::put): * bridge/runtime_array.h: (JSC::RuntimeArray::createStructure): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::lengthGetter): (JSC::callRuntimeMethod): * bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure): * bridge/runtime_object.cpp: (JSC::RuntimeObjectImp::fallbackObjectGetter): (JSC::RuntimeObjectImp::fieldGetter): (JSC::RuntimeObjectImp::methodGetter): (JSC::RuntimeObjectImp::put): (JSC::RuntimeObjectImp::defaultValue): (JSC::callRuntimeObject): (JSC::callRuntimeConstructor): * bridge/runtime_object.h: (JSC::RuntimeObjectImp::createStructure): * inspector/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::evaluate): * inspector/JavaScriptCallFrame.h: * inspector/JavaScriptProfile.cpp: (WebCore::toJS): * inspector/JavaScriptProfile.h: * inspector/JavaScriptProfileNode.cpp: (WebCore::toJS): * inspector/JavaScriptProfileNode.h: 2009-05-01 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25485 Only use visitedURL in Qt. This is a follow-up change to http://trac.webkit.org/changeset/43052, which broke Chromium build. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState): Moved guards around to provide separate code paths for Qt and non-Qt ports. Also restored original order of execution. 2009-05-01 Anders Carlsson <andersca@apple.com> Reviewed by Adele Peterson. <rdar://problem/6839222> CrashTracer: Lots of crashes in Safari in hash table remove function inside DocumentLoader::removeSubresourceLoader After calling m_client->didFail(), check if the subresource loader has reached its terminal state. If that's the case, return early to avoid calling removeSubresourceLoader on a null document loader. I don't think this is allowed to happen which is why I've added the ASSERT. * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didCancel): 2009-05-01 Timothy Hatcher <timothy@apple.com> Disallow the deletion UI for elements that have any overflow clipping. Also disallow the UI for the body element it isn't practical to delete, and the deletion UI would be clipped. <rdar://problem/6840161> Deletion UI can be clipped by some elements (with overflow: hidden) Reviewed by Darin Adler. * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): 2009-05-01 Timothy Hatcher <timothy@apple.com> Decrease the minimum height for deleteable elements to 16px, and increase the minimum width to 48px. This allows deleting shorter items like navigation bars. <rdar://problem/6840735> Deletion UI does not show up for short elements (22px or less) Reviewed by Adele Peterson. * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): 2009-05-01 Timothy Hatcher <timothy@apple.com> Clean up the comments and logic in the code for picking a deleteable element for the deletion UI. Reviewed by Adele Peterson. * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): 2009-05-01 Kevin McCullough <kmccullough@apple.com> Reviewed by Adele Peterson and Darin Adler. <rdar://problem/4815598> Stuck in double spacing mode after pasting a paragraph with padding/margin (or table mode !) A lot of the issues in this bug were resolved on Mail's side by using WebKit to convert to plain text. This is the final issue, that floating style stays on copied nodes causing them to float when they are pasted which is not what the user intended. * editing/markup.cpp: (WebCore::removeExteriorStyles): (WebCore::): (WebCore::appendStartMarkup): (WebCore::getStartMarkup): (WebCore::createMarkup): 2009-05-01 Pavel Feldman <pfeldman@chromium.org> Reviewed by Timothy Hatcher. Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest. This is the only resource-related information that is available in InspectorController and is missing in the FrameLoaderClient. https://bugs.webkit.org/show_bug.cgi?id=25347 * WebCore.xcodeproj/project.pbxproj: Made ScriptSource private. * dom/Document.cpp: Made a call to a client along with the call to the InspectorController. (WebCore::Document::resourceRetrievedByXMLHttpRequest): * loader/EmptyClients.h: Added stub implementation. (WebCore::EmptyFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest): * loader/FrameLoader.cpp: Call initiating dispatches. (WebCore::FrameLoader::resourceRetrievedByXMLHttpRequest): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: 2009-04-30 Beth Dakin <bdakin@apple.com> Reviewed by Oliver Hunt. Fix for <rdar://problem/6841106> REGRESSION: Crash drag selecting To Do's in a Mail note (excessive recursion in mouse drag tracking) Oliver's recent change to dragging seems to have revealed a long- time bug in passSubframeEventToSubframe where we did not set m_sendingEventToSubview to true before calling handleMouseMoveEvent() in the NSMouseMoved case. This patch fixes that and adds ASSERTions around all of the places where m_sendingEventToSubview is set to true and then false to make sure we are not trampling its state. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::eventLoopHandleMouseDragged): (WebCore::EventHandler::eventLoopHandleMouseUp): (WebCore::EventHandler::passSubframeEventToSubframe): (WebCore::EventHandler::passWheelEventToWidget): 2009-04-30 Eric Carlson <eric.carlson@apple.com> Reviewed by Simon Fraser. MediaDocument falls back to plug-in unnecessarily https://bugs.webkit.org/show_bug.cgi?id=25504 <rdar://problem/6844702> Don't allow harmless media types to cause a MediaDocument to fall back to PluginDocument. Test: media/video-document-types.html * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): add timecode, timecode 64, odsm, and sdsm to allowed track types. * platform/graphics/win/QTMovieWin.cpp: (QTMovieWin::disableUnsupportedTracks): Ditto. 2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Eric Seidel. Add CHROMIUM guard to unfork Document.cpp * dom/Document.cpp: (WebCore::Document::setFocusedNode): Added guard. 2009-04-30 David Kilzer <ddkilzer@apple.com> Use OwnPtr<HTMLParserQuirks> for m_parserQuirks Reviewed by Geoff Garen. * html/HTMLParser.cpp: (WebCore::HTMLParser::~HTMLParser): Removed unneeded code. * html/HTMLParser.h: Made m_parserQuirks an OwnPtr. 2009-04-30 David Kilzer <ddkilzer@apple.com> Provide a mechanism to create a quirks delegate for HTMLParser Reviewed by David Hyatt. No tests since there is no change in behavior. HTMLParserQuirks.h defines an abstract base class that may be extended as needed. The ChromeClient::createHTMLParserQuirks() factory method should be used to return an HTMLParserQuirks subclassed object when needed. * WebCore.xcodeproj/project.pbxproj: Added HTMLParserQuirks.h. * html/HTMLParser.cpp: (WebCore::HTMLParser::HTMLParser): Initialize m_parserQuirks using ChromeClient::createHTMLParserQuirks(). (WebCore::HTMLParser::~HTMLParser): Delete m_parserQuirks if set. (WebCore::HTMLParser::reset): Call HTMLParserQuirks::reset() if m_parserQuirks is set. (WebCore::HTMLParser::insertNode): Call HTMLParserQuirks::shouldInsertNode() if m_parserQuirks is set, and return early if it returns false. (WebCore::HTMLParser::popBlock): Call HTMLParserQuirks::shouldPopBlock() if m_parserQuirks is set, and return early if it returns false. * html/HTMLParser.h: Added m_parserQuirks. * html/HTMLParserQuirks.h: Added. (WebCore::HTMLParserQuirks::HTMLParserQuirks): (WebCore::HTMLParserQuirks::~HTMLParserQuirks): * loader/EmptyClients.h: (WebCore::EmptyChromeClient::createHTMLParserQuirks): Added. * page/ChromeClient.h: (WebCore::ChromeClient::createHTMLParserQuirks): Added. 2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25492 Add JSC guards around node wrapper cache calls. These are not used by V8. Also, remove JSDOMBinding include, which is brought in by ScriptController. * dom/Document.cpp: (WebCore::Document::~Document): Added JSC guard. * dom/Node.cpp: (WebCore::Node::setDocument): Ditto and removed JSDOMBinding include. 2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25493 Remove debugger/profiler custom method stubs, catching V8 bindings up to http://trac.webkit.org/changeset/43072. * bindings/v8/custom/V8InspectorControllerCustom.cpp: Removed method stubs. 2009-04-30 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler <rdar://problem/6839338> VoiceOver does not take into account transforms when drawing outlines Use transform-aware quad methods when computing the boundingBoxRect for an AccessibilityRenderObject. The code follows RenderObject::absoluteBoundingBoxRect(). Test: accessibility/transformed-element.html * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundingBoxRect): 2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> Unreviewed, Chromium build fix. Catch up to ScriptObject changes from http://trac.webkit.org/changeset/42512. * bindings/v8/ScriptObject.cpp: (WebCore::ScriptGlobalObject::get): Renamed from getObject. (WebCore::ScriptGlobalObject::remove): Added. * bindings/v8/ScriptObject.h: Ditto. 2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> Unreviewed, build fix. https://bugs.webkit.org/show_bug.cgi?id=25470 Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler. * WebCore.pro: Fix copy-paste error. 2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> Unreviewed, build fix. https://bugs.webkit.org/show_bug.cgi?id=25470 Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler. * GNUmakefile.am: Add ENABLE_JAVASCRIPT_DEBUGGER definitions. * WebCore.pro: Ditto. 2009-04-02 Eric Seidel <eric@webkit.org> Reviewed by Darin Adler. Change Position to pre-compute the AnchorType and store it. Also store a "legacy editing mode" bit on the Position. https://bugs.webkit.org/show_bug.cgi?id=24763 The old Postion(node, offset) constructor creates legacy positions but there are new constructors to create explicitly anchored positions which the next patch will use. Once we fix all the "position-fixup" functions (like rangeCompliantEquivalent) to only affect legacy positions, we will be able to distinguish between [table, 1] and [table, after] in the code correctly! * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: * dom/Position.cpp: (WebCore::Position::Position): (WebCore::Position::moveToPosition): (WebCore::Position::moveToOffset): (WebCore::Position::anchorTypeForLegacyEditingPosition): (WebCore::Position::element): * dom/Position.h: (WebCore::Position::): (WebCore::Position::Position): (WebCore::Position::anchorType): (WebCore::Position::deprecatedEditingOffset): 2009-04-30 Sam Weinig <sam@webkit.org> Reviewed by Alexey Proskuryakov. Fix bug where the WorkerLocation and WorkerNavigator wrappers would be collected even if the WorkerContext is still alive. Test: fast/workers/worker-context-gc.html * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::mark): * workers/WorkerContext.cpp: (WebCore::WorkerContext::WorkerContext): (WebCore::WorkerContext::completeURL): (WebCore::WorkerContext::location): * workers/WorkerContext.h: (WebCore::WorkerContext::optionalNavigator): (WebCore::WorkerContext::optionalLocation): 2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=25470 Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler. * Configurations/FeatureDefines.xcconfig: Added ENABLE_JAVASCRIPT_DEBUGGER. * WebCore.vcproj/build-generated-files.sh: Ditto. * bindings/js/JSConsoleCustom.cpp: Added ENABLE(JAVASCRIPT_DEBUGGER) guard. * bindings/js/JSDOMWindowBase.cpp: Ditto. * bindings/js/JSInspectorControllerCustom.cpp: Ditto. * inspector/InspectorController.cpp: Moved profiler/debugger methods under ENABLE(JAVASCRIPT_DEBUGGER) flag. * inspector/InspectorController.h: Ditto. * inspector/InspectorController.idl: Added ENABLE(JAVASCRIPT_DEBUGGER) guard. * page/Console.cpp: Replaced USE(JSC) with ENABLE(JAVASCRIPT_DEBUGGER) guard. 2009-04-30 Dimitri Glazkov <dglazkov@chromium.org> Unreviewed, build fix. https://bugs.webkit.org/show_bug.cgi?id=25275 This patch snuck in a re-definition of a local. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::NAMED_PROPERTY_GETTER): Removed re-definition. 2009-04-30 Sam Weinig <sam@webkit.org> Reviewed by Mark Rowe. Fix a leak introduced yesterday. Don't allocate a ScheduledAction if the toString()ing throws an exception. * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): 2009-04-30 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25379 <rdar://problem/6809460> REGRESSION (r41772): Selecting a bank in American Express Pay Bill fails Test: fast/forms/multiple-selected-options-innerHTML.html This problem was caused by an inconsistency at when Node::instertedIntoTree() is called. For normal HTML parsing, it is called immediately after an element is inserted, but for innerHTML, it is only called after the whole subtree is inserted into a document. It may make sense to harmonize these cases one day, but for now, I only made the minimal changes necessary to fix the bug. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::insertedIntoTree): * html/HTMLSelectElement.h: Recalculate list items when a SELECT element is inserted. OPTION elements cannot decide which one to keep selected themselves, because their logic assumes normal parsing, with insertedIntoTree() called after each element is inserted. 2009-04-30 Pavel Feldman <pfeldman@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25342 Add MessageSource and MessageLevel parameters to the ChromeClient::addMessageToConsole. Chromium async/out-of-process version of WebInspector is currently not based on InspectorController. The reason was that we did not want to interfere with the unforking effort, yet wanted to experiment. So we came up with these agents concept that basically mimic InspectorController, but separating 'agent' nature from the 'transport'. Now that InspectorController is unforked, I am planning to bring these concepts into the WebKit land and use what we have in Chromium as a proof of concept / experimental playground. * loader/EmptyClients.h: added MessageSource and MessageLevel parameters. (WebCore::EmptyChromeClient::addMessageToConsole): ditto * page/ChromeClient.h: ditto * page/Console.cpp: Used new method signature. (WebCore::Console::addMessage): ditto 2009-04-30 Dan Bernstein <mitz@apple.com> Reviewed by Simon Fraser. - fix https://bugs.webkit.org/show_bug.cgi?id=25476 <rdar://problem/6841919> REGRESSION (r42987): Welcome to Safari 4 animation is jittery Reverted r42987. * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::draw): 2009-04-30 Brady Eidson <beidson@apple.com> Reviewed by Maciej Stachowiak <rdar://problem/3785248> http://www.greekembassy.org/ gets in an infinite reload loop https://bugs.webkit.org/show_bug.cgi?id=21193 Some websites use for attributes in script elements to specify events that the script should be run for. One example is greekembassy.org which has the following in their <head>: <script for=window event=onresize> location.reload(false); </script> Since we don't support the full for attribute syntax, we would just blissfully ignore the condition and execute the code unconditionally. This caused breakage on multiple real-world sites besides greekembassy.org. https://bugs.webkit.org/show_bug.cgi?id=16915 and <rdar://problem/4471751> track adding full support for the for attribute in scripts. In the meantime it's best to not execute them unconditionally. Test: fast/dom/HTMLScriptElement/script-for-attribute-unexpected-execution.html * dom/ScriptElement.cpp: (WebCore::ScriptElementData::shouldExecuteAsJavaScript): After all other checks have passed, only return true if there is no for attribute in the script element. * dom/ScriptElement.h: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::forAttributeValue): Return the attribute value, if any. * html/HTMLScriptElement.h: * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::forAttributeValue): Return an empty string (like the other attribute getters do for SVGScriptElement) * svg/SVGScriptElement.h: 2009-04-30 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Darin Adler. The Qt API exposes a global history patch CSSStyleSelector to make API consumers work again https://bugs.webkit.org/show_bug.cgi?id=20952 The QtWebKit port made the mistake of exposing a global history. This broke with the addition of PageGroup and LinkHash. This needs to be repaired for Qt4.5. Add a function to LinkHash.cpp that is resolving a URL. Use this function from within CSSStyleSelector to forward the url to the QWebHistoryInterface API. It is sad that there is a path within visitedLinkHash which is now doing a memcpy, it is sad to add a PLATFORM(QT) define to CSSStyleSelector and using QtWebKit types within WebCore is a layering violation as well. PageGroup::setShouldTrackVisitedLinks is currently not enabled. For Qt4.6 a second version of the QWebHistoryInterface is going to be added which will fix things up. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState): * platform/LinkHash.cpp: (WebCore::visitedURL): (WebCore::visitedLinkHash): * platform/LinkHash.h: 2009-04-30 Simon Hausmann <simon.hausmann@nokia.com> Fix the Qt build. * platform/graphics/SimpleFontData.cpp: Don't use initCharWidths() for the Qt build. * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::platformCharWidthInit): Instead initialize the average and max char widths from QFontMetrics. 2009-04-30 Ariya Hidayat <ariya.hidayat@nokia.com> Unreview build fix after r43037. Use MarkedArgumentBuffer instead of ArgList. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtConnectionObject::execute): 2009-04-29 Sam Weinig <sam@webkit.org> Reviewed by Oliver Hunt. Fix for https://bugs.webkit.org/show_bug.cgi?id=25440 setTimeout should stringify non-string/non-function first arguments Test: fast/dom/Window/setTimeout-string-argument.html * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setTimeout): (WebCore::JSDOMWindow::setInterval): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::setTimeout): (WebCore::JSWorkerContext::setInterval): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): * bindings/js/ScheduledAction.h: 2009-04-29 Dan Bernstein <mitz@apple.com> Reviewed by Simon Fraser. - WebCore part of <rdar://problem/6609509> Select All and then Delete should put Mail editing back into the same state as a new message Test: editing/deleting/in-visibly-empty-root.html * WebCore.base.exp: Exported VisibleSelection::isAll(bool). * editing/SelectionController.h: (WebCore::SelectionController::isAll): Added. Calls through to VisibleSelection. * editing/TypingCommand.cpp: (WebCore::TypingCommand::makeEditableRootEmpty): Added. Removes all children of the root editable element the selection is in, other than a placeholder. Returns true iff it did anything. (WebCore::TypingCommand::deleteKeyPressed): When there is only a single visible position in the root editable element, but it has children other than a placeholder, remove those children. * editing/TypingCommand.h: * editing/VisiblePosition.h: Added a StayInEditableContent enum and a FIXME. * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::isAll): Added. Returns whether the selection encompasses all visible positions, either in the document or in the editable root. * editing/VisibleSelection.h: 2009-04-29 Sam Weinig <sam@webkit.org> Fix style nit. * editing/visible_units.cpp: (WebCore::getLeafBoxesInLogicalOrder): 2009-04-29 David Hyatt <hyatt@apple.com> Reviewed by Dan Bernstein. For now just drop the deferred layout on the floor, since it causes an infinite hang in mail. Even trying to schedule a relayout for later leaves you in a state where you hit the needsLayout painting assertions. Basically what Mail is doing is crazy, and we can't support it other than to just drop the last layout and not do it (which is basically what was happening before). * page/FrameView.cpp: (WebCore::FrameView::setContentsSize): (WebCore::FrameView::needsLayout): 2009-04-29 Douglas Davidson <ddavidso@apple.com> Reviewed by Justin Garcia. <rdar://problem/6836921> Mail exhibits issues with text checking, e.g. menu items not always validated correctly Updates to the text checking code to enable text checking even if spellchecking is turned off and fix an off-by-one error in selection handling. * editing/Editor.cpp: (WebCore::Editor::markMisspellingsAfterTypingToPosition): (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): (WebCore::Editor::markMisspellingsAndBadGrammar): * editing/Editor.h: * editing/TypingCommand.cpp: (WebCore::TypingCommand::markMisspellingsAfterTyping): 2009-04-29 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. Clean up ArgList to be a trivial type Start using MarkedArgumentBuffer to create argument lists for function calls * bindings/js/JSClipboardCustom.cpp: (WebCore::JSClipboard::types): * bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::profiles): * bindings/js/JSCustomPositionCallback.cpp: (WebCore::JSCustomPositionCallback::handleEvent): * bindings/js/JSCustomPositionErrorCallback.cpp: (WebCore::JSCustomPositionErrorCallback::handleEvent): * bindings/js/JSCustomSQLStatementCallback.cpp: (WebCore::JSCustomSQLStatementCallback::handleEvent): * bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): * bindings/js/JSCustomSQLTransactionCallback.cpp: (WebCore::JSCustomSQLTransactionCallback::handleEvent): * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): * bindings/js/JSCustomVoidCallback.cpp: (WebCore::JSCustomVoidCallback::handleEvent): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSInspectorControllerCustom.cpp: (WebCore::JSInspectorController::profiles): (WebCore::JSInspectorController::search): (WebCore::JSInspectorController::databaseTableNames): (WebCore::JSInspectorController::setting): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::scopeChain): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): * bindings/js/JSNodeFilterCondition.cpp: (WebCore::JSNodeFilterCondition::acceptNode): * bindings/js/JSQuarantinedObjectWrapper.cpp: (WebCore::JSQuarantinedObjectWrapper::construct): (WebCore::JSQuarantinedObjectWrapper::call): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::ScheduledAction): (WebCore::ScheduledAction::executeFunctionInContext): * bindings/js/ScriptFunctionCall.h: * bindings/objc/WebScriptObject.mm: (getListFromNSArray): (-[WebScriptObject callWebScriptMethod:withArguments:]): * bridge/NP_jsobject.cpp: (getListFromVariantArgs): (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Construct): * bridge/jni/jni_jsobject.h: * bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::getListFromJArray): 2009-04-29 Eric Seidel <eric@webkit.org> No review, build fix only. Fix m_offset uses added while I wasn't looking. * editing/visible_units.cpp: (WebCore::logicalStartPositionForLine): (WebCore::logicalEndPositionForLine): 2009-04-29 Xiaomei Ji <xji@chromium.org> Reviewed by Dan Bernstein. Fix https://bugs.webkit.org/show_bug.cgi?id=24168 RTL: Home/End key does not behave correctly in mixed bidi text in RTL document Test: editing/selection/home-end.html * editing/SelectionController.cpp: (WebCore::SelectionController::modifyExtendingForward): Change calling endOfLine() to logicalEndOfLine() when granularity is LineBoundary. (WebCore::SelectionController::modifyMovingForward): Change calling endOfLine() to logicalEndOfLine() when granularity is LineBoundary (WebCore::SelectionController::modifyExtendingBackward): Change calling startOfLine() to logicalStartOfLine() when granularity is LineBoundary. (WebCore::SelectionController::modifyMovingBackward): Change calling startOfLine() to logicalStartOfLine() when granularity is LineBoundary. * editing/visible_units.cpp: (WebCore::getLeafBoxesInLogicalOrder): Added. Reconstruct leaf boxes in logical order. (WebCore::getLogicalStartBoxAndNode): Added. (WebCore::getLogicalEndBoxAndNode): Added. (WebCore::logicalStartPositionForLine): Added. Similar to startPositionForLine. (WebCore::logicalStartOfLine): Added. Similar to startOfLine. (WebCore::logicalEndPositionForLine): Added. Similar to endPositionForLine. (WebCore::inSameLogicalLine): Added. (WebCore::logicalEndOfLine): Added. Similar to endOfLine. * editing/visible_units.h: 2009-04-29 Eric Seidel <eric@webkit.org> Reviewed by Darin Adler. Make m_offset private and change all callers to use deprecatedEditingOffset(). https://bugs.webkit.org/show_bug.cgi?id=25472 Per Darin's suggestion, this was just a simple search replace of .m_offset with .deprecatedEditingOffset(). There was one change in InsertParagraphSeparatorCommand::doApply to use Position::moveToOffset(0) instead of .m_offset = 0; * dom/Position.cpp: (WebCore::Position::rendersInDifferentPosition): (WebCore::Position::leadingWhitespacePosition): * dom/Position.h: (WebCore::Position::deprecatedEditingOffset): (WebCore::Position::moveToOffset): (WebCore::operator==): * dom/PositionIterator.h: (WebCore::PositionIterator::PositionIterator): * dom/Range.cpp: (WebCore::Range::create): (WebCore::Range::compareBoundaryPoints): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): (WebCore::ApplyStyleCommand::applyInlineStyleToRange): (WebCore::ApplyStyleCommand::removeInlineStyle): (WebCore::ApplyStyleCommand::nodeFullySelected): (WebCore::ApplyStyleCommand::nodeFullyUnselected): (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded): (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded): (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded): (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded): (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical): (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical): (WebCore::ApplyStyleCommand::joinChildTextNodes): * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::insertNodeAt): (WebCore::CompositeEditCommand::positionOutsideTabSpan): (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit): (WebCore::CompositeEditCommand::deleteInsignificantText): (WebCore::CompositeEditCommand::moveParagraphs): (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): * editing/DeleteSelectionCommand.cpp: (WebCore::updatePositionForNodeRemoval): (WebCore::updatePositionForTextRemoval): (WebCore::DeleteSelectionCommand::handleGeneralDelete): (WebCore::DeleteSelectionCommand::fixupWhitespace): * editing/Editor.cpp: (WebCore::Editor::setComposition): (WebCore::Editor::advanceToNextMisspelling): (WebCore::Editor::getCompositionSelection): * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::performTrivialReplace): (WebCore::InsertTextCommand::input): (WebCore::InsertTextCommand::insertTab): * editing/MoveSelectionCommand.cpp: (WebCore::MoveSelectionCommand::doApply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): * editing/SelectionController.cpp: (WebCore::SelectionController::debugRenderer): * editing/TextIterator.cpp: (WebCore::TextIterator::rangeFromLocationAndLength): * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed): (WebCore::TypingCommand::forwardDeleteKeyPressed): * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::characterAfter): (WebCore::VisiblePosition::debugPosition): (WebCore::makeRange): (WebCore::setStart): (WebCore::setEnd): * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::toNormalizedRange): (WebCore::makeSearchRange): (WebCore::VisibleSelection::debugPosition): (WebCore::VisibleSelection::showTreeForThis): * editing/htmlediting.cpp: (WebCore::comparePositions): (WebCore::rangeCompliantEquivalent): * editing/visible_units.cpp: (WebCore::previousBoundary): (WebCore::nextBoundary): (WebCore::startPositionForLine): (WebCore::startOfLine): (WebCore::endPositionForLine): (WebCore::nextLinePosition): (WebCore::startOfParagraph): (WebCore::endOfParagraph): (WebCore::logicalStartPositionForLine): (WebCore::logicalEndPositionForLine): * page/AccessibilityObject.cpp: (WebCore::updateAXLineStartForVisiblePosition): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::indexForVisiblePosition): * page/DOMSelection.cpp: (WebCore::DOMSelection::anchorOffset): (WebCore::DOMSelection::focusOffset): (WebCore::DOMSelection::baseOffset): (WebCore::DOMSelection::extentOffset): * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): * page/mac/AccessibilityObjectWrapper.mm: (textMarkerForVisiblePosition): (visiblePositionForTextMarker): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::indexForVisiblePosition): * rendering/RenderTreeAsText.cpp: (WebCore::writeSelection): 2009-04-29 Eric Seidel <eric@webkit.org> No review, rolling out a patch. Revert http://trac.webkit.org/changeset/43019 New tests failed because I removed the tabs from them when landing (since we avoid tabs in WebKit files). I couldn't tell if the new results were correct with spaces or not. * editing/SelectionController.cpp: (WebCore::SelectionController::modifyExtendingForward): (WebCore::SelectionController::modifyMovingForward): (WebCore::SelectionController::modifyExtendingBackward): (WebCore::SelectionController::modifyMovingBackward): * editing/visible_units.cpp: * editing/visible_units.h: 2009-04-29 David Hyatt <hyatt@apple.com> Reviewed by Dan Bernstein. Fix for <rdar://problem/6828164>, Mail hits the !root->needsLayout() assert because it re-marks the FrameView for layout when the FrameView is resized. This bug was exposed by the elimination of the separate WebKit layout flag on Mac. FrameView now defers setNeedsLayouts during size changes. Once all of the size changes are finished (including re-entrant ones from WebDynamicScrollbarsView and ScrollView::updateScrollbars) we then do a layout if necessary. * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::FrameView::setContentsSize): (WebCore::FrameView::layout): (WebCore::FrameView::needsLayout): (WebCore::FrameView::setNeedsLayout): * page/FrameView.h: 2009-04-29 Eric Seidel <eric@webkit.org> No review, rolling out a patch. Revert 43020 as it caused accessibility/lists.html to fail and no one is around to tell me if it's a progression or not. * page/AccessibilityObject.h: (WebCore::): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::roleValue): (WebCore::AccessibilityRenderObject::canSetFocusAttribute): * page/mac/AccessibilityObjectWrapper.mm: (RoleEntry::): 2009-04-29 Sankar Aditya Tanguturi <sankaraditya@gmail.com> Reviewed by Jon Honeycutt. Add a new accessibility role for list items. Part of http://bugs.webkit.org/show_id.cgi?id=20013 Tests: platform/win/accessibility/listitem-role.html * page/AccessibilityObject.h: (WebCore::): Add ListItemRole to accessibilityRole enum. * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::roleValue):Return listItemRole when rendered object is a list item. (WebCore::AccessibilityRenderObject::canSetFocusAttribute): Return true for ListItemRole, matching firefox. * page/mac/AccessibilityObjectWrapper.mm: (RoleEntry::): Map ListItemRole with NSAccessibilityGroupRole in MAC. 2009-04-29 Xiaomei Ji <xji@chromium.org> Reviewed by Dan Bernstein. Fix https://bugs.webkit.org/show_bug.cgi?id=24168 RTL: Home/End key does not behave correctly in mixed bidi text in RTL document Test: editing/selection/home-end.html * editing/SelectionController.cpp: (WebCore::SelectionController::modifyExtendingForward): Change calling endOfLine() to logicalEndOfLine() when granularity is LineBoundary. (WebCore::SelectionController::modifyMovingForward): Change calling endOfLine() to logicalEndOfLine() when granularity is LineBoundary (WebCore::SelectionController::modifyExtendingBackward): Change calling startOfLine() to logicalStartOfLine() when granularity is LineBoundary. (WebCore::SelectionController::modifyMovingBackward): Change calling startOfLine() to logicalStartOfLine() when granularity is LineBoundary. * editing/visible_units.cpp: (WebCore::getLeafBoxesInLogicalOrder): Added. Reconstruct leaf boxes in logical order. (WebCore::getLogicalStartBoxAndNode): Added. (WebCore::getLogicalEndBoxAndNode): Added. (WebCore::logicalStartPositionForLine): Added. Similar to startPositionForLine. (WebCore::logicalStartOfLine): Added. Similar to startOfLine. (WebCore::logicalEndPositionForLine): Added. Similar to endPositionForLine. (WebCore::inSameLogicalLine): Added. (WebCore::logicalEndOfLine): Added. Similar to endOfLine. * editing/visible_units.h: 2009-04-29 Mike Belshe <mike@belshe.com> Reviewed by Eric Seidel. Update location while page is loading. https://bugs.webkit.org/show_bug.cgi?id=21597 Tested by: - fast/dom/location-new-window-no-crash - fast/dom/Window/window-open-pending-url * page/Location.cpp: 2009-04-29 Feng Qian <feng@chromium.org> Reviewed by Darin Adler. Add Android port files to WebCore/platform. https://bugs.webkit.org/show_bug.cgi?id=23296 * platform/android: Added. * platform/android/ClipboardAndroid.cpp: Added. * platform/android/ClipboardAndroid.h: Added. 2009-04-29 Feng Qian <feng@chromium.org> Reviewed by Darin Adler. Add Android-specific files to the WebCore/page directory. https://bugs.webkit.org/show_bug.cgi?id=23295 * page/android: Added. * page/android/DragControllerAndroid.cpp: Added. * page/android/EventHandlerAndroid.cpp: Added. * page/android/InspectorControllerAndroid.cpp: Added. 2009-04-29 Pavel Feldman <pfeldman@chromium.org> Reviewed by Timothy Hatcher. Extract PageGroupLoadDeferrer from Chrome.cpp * GNUmakefile.am: added PageGroupLoadDeferrer * WebCore.pro: ditto * WebCore.scons: ditto * WebCore.vcproj/WebCore.vcproj: ditto * WebCore.xcodeproj/project.pbxproj: ditto * WebCoreSources.bkl: ditto * page/Chrome.cpp: PageGroupLoadDeferrer impl moved to a separate class. * page/PageGroupLoadDeferrer.cpp: Added. (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): * page/PageGroupLoadDeferrer.h: Added. 2009-04-24 Ojan Vafai <ojan@chromium.org> Reviewed by Dan Bernstein. Make textarea and text input metrics more closely match IEs. This involves: -set text input width to size*avgCharWidth + maxCharWidth - avgCharWidth -set textarea width to cols*avgCharWidth -Make default CSS match IEs -Correctly initializing m_avgCharWidth and m_maxCharWidth for each platform and SVG. Those values for textarea and inputs were derived by doing a ton of manual testing of IE's width values for various textareas and fonts. On Windows we match IE exactly except for a couple fonts of the ~12 tested. To get the average and max character width of a font, we do the following for each platform: -Win: TextMetrics expose avgCharWidth and maxCharWidth -SVG: avgCharWidth = width of an '0', fallback on width of a space glyph, then m_xHeight maxCharWidth = width of a 'W' for roman fonts, fallback on m_ascent -Linux: avgCharWidth = width of an '0', fallback on m_xHeight maxCharWidth = max of avgCharWidth and m_ascent -Mac: Calculate the avgCharWidth and grab the maxCharWidth off the font. If either one is non-positive, then calculate the value using the Linux approach. Tests: fast/forms/text-control-intrinsic-widths.html fast/forms/textarea-metrics.html svg/custom/svg-fonts-in-text-controls.html * css/html4.css: * css/themeWin.css: * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): (WebCore::SimpleFontData::initCharWidths): * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::maxCharWidth): (WebCore::SimpleFontData::avgCharWidth): * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/gtk/SimpleFontDataGtk.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/gtk/SimpleFontDataPango.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/win/SimpleFontDataCairoWin.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::initGDIFont): * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::calcPrefWidths): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::createInnerTextStyle): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::preferredContentWidth): 2009-04-29 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler. * bindings/objc/DOMCSS.mm: (kitClass): Added CSS_INITIAL to the switch statement, and changed to use the WebCore type and not the binding type. 2009-04-29 John Abd-El-Malek <jam@google.com> Reviewed by Dimitri Glazkov. Reverted my previous change to add resetChromiumPluginCache(). https://bugs.webkit.org/show_bug.cgi?id=25318 * plugins/chromium/PluginDataChromium.cpp: 2009-04-29 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler. <rdar://problem/6573742> - Problem dragging standalone images from Safari to Mail Roll out trac.webkit.org/changeset/35867 which fixed <rdar://problem/6153432> Cloned <rdar://problem/6153432> to <rdar://problem/6839881> to find a better fix for that Tiger Mail bug. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::subresource): Remove the preload referenced check. 2009-04-29 Alpha Lam <hclam@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25430 Provide style sheet for UI controls of media elements for Chromium port. * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::extraMediaControlsStyleSheet): 2009-04-29 John Abd-El-Malek <jam@chromium.org> Reviewed by Darin Adler. Expose sudden termination to Chromium port. https://bugs.webkit.org/show_bug.cgi?id=25457 * platform/SuddenTermination.h: * platform/chromium/ChromiumBridge.h: * platform/chromium/SuddenTerminationChromium.cpp: Added. (WebCore::disableSuddenTermination): (WebCore::enableSuddenTermination): 2009-04-29 Sam Weinig <sam@webkit.org> Reviewed by Dimitri Glazkov. Remove unused EventListeners. * page/DOMWindow.idl: 2009-04-29 Yury Semikhatsky <yurys@chromium.org> Reveal current execution line once SourceFrame content is loaded. https://bugs.webkit.org/show_bug.cgi?id=25448 Reviewed by Timothy Hatcher. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._loaded): 2009-04-29 Ariya Hidayat <ariya.hidayat@nokia.com> Reviewed by Simon Fraser. [Qt] Initialize GraphicsContext's and ImageBuffer's QPainter to match the default values of canvas attributes. * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBufferData::ImageBufferData): 2009-04-28 Simon Hausmann <simon.hausmann@nokia.com> Fix the Qt build. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::findMethodIndex): Removed exec param from at() call. (JSC::Bindings::QtRuntimeConnectionMethod::call): Ditto. 2009-04-28 Geoffrey Garen <ggaren@apple.com> Rubber stamped by Beth Dakin. Missed one. * bindings/scripts/CodeGeneratorJS.pm: 2009-04-28 Geoffrey Garen <ggaren@apple.com> Rubber stamped by Beth Dakin. Removed scaffolding supporting dynamically converting between 32bit and 64bit value representations. * bindings/js/JSAudioConstructor.cpp: (WebCore::constructAudio): * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::setFillColor): (WebCore::JSCanvasRenderingContext2D::setStrokeColor): (WebCore::JSCanvasRenderingContext2D::strokeRect): (WebCore::JSCanvasRenderingContext2D::drawImage): (WebCore::JSCanvasRenderingContext2D::drawImageFromRect): (WebCore::JSCanvasRenderingContext2D::setShadow): (WebCore::JSCanvasRenderingContext2D::createPattern): (WebCore::JSCanvasRenderingContext2D::putImageData): (WebCore::JSCanvasRenderingContext2D::fillText): (WebCore::JSCanvasRenderingContext2D::strokeText): * bindings/js/JSClipboardCustom.cpp: (WebCore::JSClipboard::clearData): (WebCore::JSClipboard::getData): (WebCore::JSClipboard::setData): (WebCore::JSClipboard::setDragImage): * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::hasItem): (WebCore::JSDOMApplicationCache::add): (WebCore::JSDOMApplicationCache::remove): (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): * bindings/js/JSDOMStringListCustom.cpp: (WebCore::JSDOMStringList::item): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::open): (WebCore::JSDOMWindow::showModalDialog): (WebCore::JSDOMWindow::postMessage): (WebCore::JSDOMWindow::setTimeout): (WebCore::JSDOMWindow::setInterval): (WebCore::JSDOMWindow::atob): (WebCore::JSDOMWindow::btoa): (WebCore::JSDOMWindow::addEventListener): (WebCore::JSDOMWindow::removeEventListener): * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::JSDatabase::transaction): * bindings/js/JSElementCustom.cpp: (WebCore::JSElement::setAttribute): (WebCore::JSElement::setAttributeNode): (WebCore::JSElement::setAttributeNS): (WebCore::JSElement::setAttributeNodeNS): * bindings/js/JSGeolocationCustom.cpp: (WebCore::JSGeolocation::getCurrentPosition): (WebCore::JSGeolocation::watchPosition): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::callHTMLCollection): (WebCore::JSHTMLCollection::item): (WebCore::JSHTMLCollection::namedItem): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::documentWrite): * bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::JSHTMLInputElement::setSelectionRange): * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::add): * bindings/js/JSHTMLSelectElementCustom.cpp: (WebCore::JSHTMLSelectElement::remove): * bindings/js/JSImageConstructor.cpp: (WebCore::constructImage): * bindings/js/JSInspectorControllerCustom.cpp: (WebCore::JSInspectorController::highlightDOMNode): (WebCore::JSInspectorController::addResourceSourceToFrame): (WebCore::JSInspectorController::addSourceToFrame): (WebCore::JSInspectorController::getResourceDocumentNode): (WebCore::JSInspectorController::search): (WebCore::JSInspectorController::databaseTableNames): (WebCore::JSInspectorController::setting): (WebCore::JSInspectorController::setSetting): (WebCore::JSInspectorController::wrapCallback): * bindings/js/JSJavaScriptCallFrameCustom.cpp: (WebCore::JSJavaScriptCallFrame::evaluate): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::replace): (WebCore::JSLocation::assign): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::startConversation): (WebCore::JSMessagePort::addEventListener): (WebCore::JSMessagePort::removeEventListener): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::insertBefore): (WebCore::JSNode::replaceChild): (WebCore::JSNode::removeChild): (WebCore::JSNode::appendChild): (WebCore::JSNode::addEventListener): (WebCore::JSNode::removeEventListener): * bindings/js/JSNodeFilterCustom.cpp: (WebCore::JSNodeFilter::acceptNode): * bindings/js/JSNodeListCustom.cpp: (WebCore::callNodeList): * bindings/js/JSOptionConstructor.cpp: (WebCore::constructHTMLOptionElement): * bindings/js/JSQuarantinedObjectWrapper.cpp: (WebCore::JSQuarantinedObjectWrapper::construct): (WebCore::JSQuarantinedObjectWrapper::call): * bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): (WebCore::JSSVGElementInstance::removeEventListener): * bindings/js/JSSVGLengthCustom.cpp: (WebCore::JSSVGLength::convertToSpecifiedUnits): * bindings/js/JSSVGMatrixCustom.cpp: (WebCore::JSSVGMatrix::rotateFromVector): * bindings/js/JSSVGPathSegListCustom.cpp: (WebCore::JSSVGPathSegList::initialize): (WebCore::JSSVGPathSegList::getItem): (WebCore::JSSVGPathSegList::insertItemBefore): (WebCore::JSSVGPathSegList::replaceItem): (WebCore::JSSVGPathSegList::removeItem): (WebCore::JSSVGPathSegList::appendItem): * bindings/js/JSSVGPointListCustom.cpp: (WebCore::JSSVGPointList::initialize): (WebCore::JSSVGPointList::getItem): (WebCore::JSSVGPointList::insertItemBefore): (WebCore::JSSVGPointList::replaceItem): (WebCore::JSSVGPointList::removeItem): (WebCore::JSSVGPointList::appendItem): * bindings/js/JSSVGTransformListCustom.cpp: (WebCore::JSSVGTransformList::initialize): (WebCore::JSSVGTransformList::getItem): (WebCore::JSSVGTransformList::insertItemBefore): (WebCore::JSSVGTransformList::replaceItem): (WebCore::JSSVGTransformList::removeItem): (WebCore::JSSVGTransformList::appendItem): * bindings/js/JSWebKitCSSMatrixConstructor.cpp: (WebCore::constructWebKitCSSMatrix): * bindings/js/JSWebKitPointConstructor.cpp: (WebCore::constructWebKitPoint): * bindings/js/JSWorkerConstructor.cpp: (WebCore::constructWorker): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::importScripts): (WebCore::JSWorkerContext::addEventListener): (WebCore::JSWorkerContext::removeEventListener): (WebCore::JSWorkerContext::setTimeout): (WebCore::JSWorkerContext::setInterval): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::addEventListener): (WebCore::JSWorker::removeEventListener): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::open): (WebCore::JSXMLHttpRequest::setRequestHeader): (WebCore::JSXMLHttpRequest::send): (WebCore::JSXMLHttpRequest::getResponseHeader): (WebCore::JSXMLHttpRequest::overrideMimeType): (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener): * bindings/js/JSXSLTProcessorCustom.cpp: (WebCore::JSXSLTProcessor::importStylesheet): (WebCore::JSXSLTProcessor::transformToFragment): (WebCore::JSXSLTProcessor::transformToDocument): (WebCore::JSXSLTProcessor::setParameter): (WebCore::JSXSLTProcessor::getParameter): (WebCore::JSXSLTProcessor::removeParameter): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): (WebCore::ScheduledAction::ScheduledAction): * bindings/js/ScheduledAction.h: * bindings/js/ScriptCallFrame.cpp: (WebCore::ScriptCallFrame::ScriptCallFrame): * bindings/js/ScriptCallFrame.h: * bindings/js/ScriptCallStack.cpp: (WebCore::ScriptCallStack::ScriptCallStack): (WebCore::ScriptCallStack::initialize): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::invokeMethod): (JSC::Bindings::CInstance::invokeDefaultMethod): (JSC::Bindings::CInstance::invokeConstruct): * bridge/jni/jni_instance.cpp: (JavaInstance::invokeMethod): * bridge/objc/objc_instance.mm: (ObjcInstance::invokeMethod): (ObjcInstance::invokeDefaultMethod): 2009-04-28 David Carson <dacarson@apple.com> Reviewed by David Hyatt. Restore alignment to device pixel boundaries. https://bugs.webkit.org/show_bug.cgi?id=25458 Adjust the adjusted destination rect to be device pixel aligned. * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::draw): 2009-04-28 Sam Weinig <sam@webkit.org> Reviewed by Anders Carlsson. Move unimplemented captureEvents and releaseEvents from JSDOMWindow to DOMWindow. * bindings/js/JSDOMWindowCustom.cpp: * page/DOMWindow.cpp: (WebCore::DOMWindow::captureEvents): (WebCore::DOMWindow::releaseEvents): * page/DOMWindow.h: * page/DOMWindow.idl: 2009-04-28 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25420 <rdar://problem/6829570> REGRESSION: XMLHttpRequest allows loading from another origin Test: http/tests/xmlhttprequest/detaching-frame-2.html This was caused by faulty DOMWindow::document(), which could return a new document from the window's frame after navigation. * bindings/js/JSDOMWindowCustom.h: (WebCore::JSDOMWindowBase::allowsAccessFromPrivate): Removed an obsolete check that allowed access when document was null. Contrary to what a comment said, that can happen for a window that is no longer in frame, not to one whose document is not constructed yet. * bindings/js/JSXMLHttpRequestConstructor.cpp: (WebCore::constructXMLHttpRequest): Bail out if context was not found. This currently happens due to a shortcoming in DOMWindow::document() - when it is fixed, the XMLHttpRequest object in included regression test will be constructed successfully, but won't be sent, because its context will be frameless. * page/DOMWindow.cpp: (WebCore::DOMWindow::document): Check that the window in frame hasn't been replaced yet. Added FIXME comments about how this may be better fixed in the future. * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::document): (WebCore::constructAudio): * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::document): (WebCore::constructImage): * bindings/js/JSMessageChannelConstructor.cpp: (WebCore::JSMessageChannelConstructor::construct): * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::document): (WebCore::constructHTMLOptionElement): Make matching changes to other constructors that hold a reference to global object. 2009-04-28 Kevin Ollivier <kevino@theolliviers.com> wxMSW build fix. Switch JSCore build back to static. * config.h: 2009-04-28 Pierre d'Herbemont <pdherbemont@apple.com> Reviewed by Simon Fraser. <rdar://problem/6834830> Make sure we cover the two possible values reported by event.total that are playback engine specific. * media/progress-event-total-expected.txt: Match the new test. * media/progress-event-total.html: Test the two values. 2009-04-28 Timothy Hatcher <timothy@apple.com> Rename -[DOMRange lineBoxRects] to -[DOMRange textRects] and change how it collects the individual rects, making sure to only include RenderText. <rdar://problem/6810061> Reviewed by Sam Weinig. * bindings/objc/DOM.mm: (-[DOMNode textRects]): Added. Make a Range and call textRects. (-[DOMNode lineBoxRects]): Call textRects method. (-[DOMRange textRects]): Call Range::textRects. (-[DOMRange lineBoxRects]): Call textRects method. * bindings/objc/DOMPrivate.h: Add the new methods and a comment about lineBoxRects being deprecated. * dom/Range.cpp: (WebCore::Range::boundingBox): Call textRects (renamed from addLineBoxRects). (WebCore::Range::textRects): Renamed from addLineBoxRects. Iterate over the nodes instead of the RenderObjects to correctly account for offsets. Also only call absoluteRectsForRange on RenderText. * dom/Range.h: Renamed addLineBoxRects to textRects. * page/Frame.cpp: (WebCore::Frame::selectionTextRects): Call textRects (renamed from addLineBoxRects). * rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteRectsForRange): Remove if conditions that made this function very specific for the lineBoxRects API. These functions are still used by the InspectorController, and this change improves what the Inspector shows. (WebCore::RenderObject::absoluteQuadsForRange): Ditto. 2009-04-28 Timothy Hatcher <timothy@apple.com> Remove the topLevel boolean argument from absolute{Rects,Quads}. This argument was default to true and no one ever passed false. Reviewed by Sam Weinig. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::absoluteRects): (WebCore::RenderBlock::absoluteQuads): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteRects): (WebCore::RenderBox::absoluteQuads): * rendering/RenderBox.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::absoluteRects): (WebCore::RenderInline::absoluteQuads): * rendering/RenderInline.h: * rendering/RenderObject.h: (WebCore::RenderObject::absoluteRects): (WebCore::RenderObject::absoluteQuads): * rendering/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::absoluteRects): (WebCore::RenderSVGHiddenContainer::absoluteQuads): * rendering/RenderSVGHiddenContainer.h: * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::absoluteRects): (WebCore::RenderSVGImage::absoluteQuads): * rendering/RenderSVGImage.h: * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::absoluteRects): (WebCore::RenderSVGInlineText::absoluteQuads): * rendering/RenderSVGInlineText.h: * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::absoluteRects): (WebCore::RenderSVGModelObject::absoluteQuads): * rendering/RenderSVGModelObject.h: * rendering/RenderSVGTSpan.cpp: (WebCore::RenderSVGTSpan::absoluteRects): (WebCore::RenderSVGTSpan::absoluteQuads): * rendering/RenderSVGTSpan.h: * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::absoluteRects): (WebCore::RenderSVGText::absoluteQuads): * rendering/RenderSVGText.h: * rendering/RenderSVGTextPath.cpp: (WebCore::RenderSVGTextPath::absoluteQuads): * rendering/RenderSVGTextPath.h: * rendering/RenderText.cpp: (WebCore::RenderText::absoluteRects): * rendering/RenderText.h: * rendering/RenderView.cpp: (WebCore::RenderView::absoluteRects): (WebCore::RenderView::absoluteQuads): * rendering/RenderView.h: 2009-04-28 Eric Carlson <eric.carlson@apple.com> Reviewed by Simon Fraser. <rdar://problem/6794691> Media documents and <video controls> never show controls on Windows RenderThemeWin doesn't implement the media element controller rendering methods, so media controls stopped rendering when we switched from RenderThemeSafari. Rather than having copies of the code in both places, the logic is in a new class that is called from both. * WebCore.vcproj/WebCore.vcproj: Add RenderMediaControls.cpp. * rendering/RenderMediaControls.cpp: Added. (WebCore::determineState): Translate renderer state to ThemeControlState. (WebCore::RenderMediaControls::adjustMediaSliderThumbSize): Adjust slider thumb. (WebCore::parentMediaElement): Return the HTMLMediaElement parent of a controller element. (WebCore::RenderMediaControls::paintMediaControlsPart): Paint a media controller part. * rendering/RenderMediaControls.h: Added. * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintSliderTrack): Remove the MediaSliderPart case, it is never called for the media slider. (WebCore::RenderThemeSafari::adjustSliderThumbSize): Call RenderMediaControls function. (WebCore::RenderThemeSafari::paintMediaFullscreenButton): Ditto. (WebCore::RenderThemeSafari::paintMediaMuteButton): Ditto. (WebCore::RenderThemeSafari::paintMediaPlayButton): Ditto. (WebCore::RenderThemeSafari::paintMediaSeekBackButton): Ditto. (WebCore::RenderThemeSafari::paintMediaSeekForwardButton): Ditto. (WebCore::RenderThemeSafari::paintMediaSliderTrack): Ditto. (WebCore::RenderThemeSafari::paintMediaSliderThumb): Ditto. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::adjustSliderThumbSize): Ditto. (WebCore::RenderThemeWin::paintMediaFullscreenButton): Ditto. (WebCore::RenderThemeWin::paintMediaMuteButton): Ditto. (WebCore::RenderThemeWin::paintMediaPlayButton): Ditto. (WebCore::RenderThemeWin::paintMediaSeekBackButton): Ditto. (WebCore::RenderThemeWin::paintMediaSeekForwardButton): Ditto. (WebCore::RenderThemeWin::paintMediaSliderTrack): Ditto. (WebCore::RenderThemeWin::paintMediaSliderThumb): Ditto. * rendering/RenderThemeWin.h: 2009-04-28 Beth Dakin <bdakin@apple.com> Reviewed by Sam Weinig. Fix for <rdar://problem/6419515> REGRESSION (r31037): Positioned images with % height are collapsed when printing * rendering/RenderBox.cpp: (WebCore::RenderBox::calcHeight): Make sure we don't ignore printing here! 2009-04-28 Adele Peterson <adele@apple.com> Reviewed by Darin Adler. Fix for <rdar://problem/6617298> Typing delete on an unquoted blank line unquotes the preceding, quoted blank line Test: editing/deleting/type-delete-after-quote.html When a selection is deleted that contains a whole number paragraphs plus a line break, we refrain from merging paragraphs after the delete, since it is unclear to most users that such a selection actually ends at the start of the next paragraph. However, when a user hits delete with a caret selection, they actually do expect the start of that paragraph to be merged into the paragraph before it. We can tell that we're in this state because the TypingCommand creates the selection to delete but it doesn't change the endingSelection. So we can tell that if we started with a caret selection, then we're not in this special case where we have to protect the user from unexpected behavior from deleting a range they selected. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::initializePositionData): 2009-04-28 Xan Lopez <xlopez@igalia.com> Unreviewed: fix distcheck build, add missing header to file list. * GNUmakefile.am: 2009-04-27 Eric Seidel <eric@webkit.org> Reviewed by Sam Weinig. Fix foreignObject transform order https://bugs.webkit.org/show_bug.cgi?id=25433 Transforms were being applied in the wrong order. When mapping from local to parent, first apply the viewport transform then map from the viewport box to the parent box. * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::localToParentTransform): 2009-04-27 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Simplify nodeAtPoint for SVG https://bugs.webkit.org/show_bug.cgi?id=25432 Added a new nodeAtFloatPoint method which takes a FloatPoint instead of the *super confusing* x/y tx/ty pairs that HTML uses. Mostly this is just lots of minus-lines as the new code is *much* simpler. I made all the SVG renderers use the new nodeAtFloatPoint and ASSERT_NOT_REACHED for the nodeAtPoint HTML/CSS int x/y version. Eventually the rest of CSS/HTML render objects will follow suit and move to nodeAtFloatPoint (possibly renamed back to nodeAtPoint), but changing them over was well outside the scope of this change. SVG hit testing is not actually floating point precise yet, since its still passed in an integer x/y. Certain transform hit-test edge cases are likely fixed by moving to FloatPoint here, but I didn't try to find one. This should not cause functional changes for common-case hit testing, thus no tests changed, nor should new tests be needed. * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::translationForAttributes): (WebCore::RenderForeignObject::paint): (WebCore::RenderForeignObject::computeRectForRepaint): (WebCore::RenderForeignObject::localToParentTransform): (WebCore::RenderForeignObject::layout): (WebCore::RenderForeignObject::nodeAtFloatPoint): * rendering/RenderForeignObject.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::nodeAtFloatPoint): * rendering/RenderObject.h: * rendering/RenderPath.cpp: (WebCore::RenderPath::nodeAtFloatPoint): * rendering/RenderPath.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::nodeAtFloatPoint): * rendering/RenderSVGContainer.h: (WebCore::RenderSVGContainer::pointIsInsideViewportClip): * rendering/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::nodeAtFloatPoint): * rendering/RenderSVGHiddenContainer.h: * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint): (WebCore::RenderSVGImage::nodeAtFloatPoint): * rendering/RenderSVGImage.h: (WebCore::RenderSVGImage::localToParentTransform): (WebCore::RenderSVGImage::localTransform): * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::nodeAtFloatPoint): * rendering/RenderSVGModelObject.h: * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtFloatPoint): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::nodeAtFloatPoint): * rendering/RenderSVGText.h: * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::pointIsInsideViewportClip): * rendering/RenderSVGViewportContainer.h: 2009-04-28 Eric Carlson <eric.carlson@apple.com> - fix the Tiger build * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::cacheMovieScale): 2009-04-28 Sam Weinig <sam@webkit.org> Reviewed by Beth Dakin. Consolidate ScheduleAction creation into ScheduledAction::create. Autogenerate JSWorkerContext.clearTimeout and clearInterval. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setTimeout): (WebCore::JSDOMWindow::setInterval): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::setTimeout): (WebCore::JSWorkerContext::setInterval): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::create): (WebCore::ScheduledAction::ScheduledAction): (WebCore::ScheduledAction::execute): * bindings/js/ScheduledAction.h: * workers/WorkerContext.cpp: (WebCore::DOMWindow::setTimeout): (WebCore::DOMWindow::clearTimeout): (WebCore::DOMWindow::setInterval): (WebCore::DOMWindow::clearInterval): * workers/WorkerContext.h: * workers/WorkerContext.idl: 2009-04-28 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler <rdar://problem/6643219> Crashes after moving nodes between documents with Safari 4 Beta installed When moving Nodes between documents we weren't properly updating style declarations. Certain operations, such as creating webarchives, would tickle this bug. Tests: webarchive/adopt-attribute-styled-body-webarchive.html webarchive/adopt-attribute-styled-node-webarchive.html webarchive/adopt-inline-styled-node-webarchive.html * dom/Node.cpp: Add a debug-only mechanism to insure that anyone who overrides (did/will)MoveToNewOwnerDocument calls their parent-class implementation after they've done their own work. (WebCore::setWillMoveToNewOwnerDocumentWasCalled): (WebCore::setDidMoveToNewOwnerDocumentWasCalled): (WebCore::Node::setDocument): (WebCore::Node::willMoveToNewOwnerDocument): (WebCore::Node::didMoveToNewOwnerDocument): * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): Add a comment explaining why we don't need to walk the nameAttrMap to update style declarations. (WebCore::StyledElement::didMoveToNewOwnerDocument): Update the parent pointer for the inline style declaration. * dom/StyledElement.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::didMoveToNewOwnerDocument): Update the parent pointer for the link declaration. * html/HTMLBodyElement.h: 2009-04-28 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. <rdar://problem/6834876> Don't use BlockExceptions macros until QTKit supports QTMoviePreferredTransformAttribute * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::cacheMovieScale): use @try and @catch instead of BEGIN_BLOCK_OBJC_EXCEPTIONS and END_BLOCK_OBJC_EXCEPTIONS for builds of QTKit that throw an exception on QTMovieCurrentSizeAttribute but don't support QTMoviePreferredTransformAttribute 2009-04-28 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. * rendering/RenderText.cpp: (WebCore::RenderText::RenderText): Streamline code path to avoid a bit of reference count churn and remove a strange unneeeded PassRefPtr typecast. Also added a comment. (WebCore::RenderText::setTextInternal): Ditto. 2009-04-27 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Simplify how SVG containers paint https://bugs.webkit.org/show_bug.cgi?id=25431 Moved filterBoundingBox() from RenderSVGModelObject to SVGRenderSupport to share with other classes. Gave RenderSVGText a modern clippedOverflowRectForRepaint and computeRectForRepaint. RenderSVGText now applies transforms at paint() time instead of during chunk draw time this should be much more efficient. Fixed the order in which RenderSVGViewportContainer applied transforms and clips. We now clip to the viewport first and apply all transforms at once. Also since the viewport logic is now only inside RenderSVGViewportContainer (instead of inside RenderSVGContainer) we always know we have a viewport. We now use only viewportSize instead of viewport() since RenderSVGViewportContainers can't have x/y offsets. We now correctly transform the PaintInfo::rect (damage rect) when applying transforms. This allowed us to apply the transform during text paint() instead of at chunk paint time. Previously we had to apply the transform during chunk paint time because RenderBlock (superclass of RenderSVGBlock) would check intersection with the damageRect before telling any of the inlines to draw. Now that we adjust the damage rect correctly we pass the intersection check correctly! (This probably fixed some <text> redraw bugs but since I still have a bunch of those to fix, I've not tried to write additional tests to cover these potential fixes yet.) SVGRootInlineBox no longer needs to deal with transforms at chunk paint time, yay! * rendering/RenderPath.cpp: (WebCore::RenderPath::repaintRectInLocalCoordinates): (WebCore::RenderPath::paint): * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::paint): (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates): * rendering/RenderSVGContainer.h: (WebCore::RenderSVGContainer::applyViewportClip): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::layout): (WebCore::RenderSVGImage::repaintRectInLocalCoordinates): (WebCore::RenderSVGImage::clippedOverflowRectForRepaint): (WebCore::RenderSVGImage::computeRectForRepaint): * rendering/RenderSVGImage.h: * rendering/RenderSVGModelObject.cpp: * rendering/RenderSVGModelObject.h: * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): (WebCore::RenderSVGRoot::selfWillPaint): (WebCore::RenderSVGRoot::paint): (WebCore::RenderSVGRoot::viewportSize): (WebCore::RenderSVGRoot::calcViewport): (WebCore::RenderSVGRoot::localToBorderBoxTransform): (WebCore::RenderSVGRoot::parentOriginToBorderBox): (WebCore::RenderSVGRoot::borderOriginToContentBox): (WebCore::RenderSVGRoot::localToRepaintContainerTransform): (WebCore::RenderSVGRoot::localToParentTransform): (WebCore::RenderSVGRoot::computeRectForRepaint): (WebCore::RenderSVGRoot::nodeAtPoint): * rendering/RenderSVGRoot.h: * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::clippedOverflowRectForRepaint): (WebCore::RenderSVGText::computeRectForRepaint): (WebCore::RenderSVGText::paint): (WebCore::RenderSVGText::repaintRectInLocalCoordinates): * rendering/RenderSVGText.h: (WebCore::RenderSVGText::localToParentTransform): (WebCore::RenderSVGText::localTransform): * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::applyViewportClip): * rendering/RenderSVGViewportContainer.h: * rendering/SVGRenderSupport.cpp: (WebCore::filterBoundingBoxForRenderer): (WebCore::applyTransformToPaintInfo): * rendering/SVGRenderSupport.h: * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBoxPaintWalker::chunkStartCallback): (WebCore::SVGRootInlineBox::paint): 2009-04-28 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. Bug 25453: AX: fall back to PLACEHOLDER attr if form element is not labeled https://bugs.webkit.org/show_bug.cgi?id=25453 Test: accessibility/placeholder.html * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): 2009-04-28 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. Bug 25452: AX: Don't create addition space AXStaticText element for every bold or link tag https://bugs.webkit.org/show_bug.cgi?id=25452 Test: accessibility/ignore-spacer-elements.html * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): 2009-04-28 Mark Rowe <mrowe@apple.com> Reviewed by Sam Weinig. Work around <rdar://problem/6833240> by relying on static initialization to zero the entire struct. This removes the need for us to explicitly initialize all of the members, which have a tendency to change in meaning and number between versions of libxml2. * dom/XMLTokenizerLibxml2.cpp: (WebCore::): (WebCore::sharedXHTMLEntity): (WebCore::getXHTMLEntity): 2009-04-28 Steve Falkenburg <sfalken@apple.com> Fix linker warning by specifying /NODEFAULTLIB:LIBCMT for QTMovieWin. Reviewed by Mark Rowe. * WebCore.vcproj/QTMovieWin.vcproj: 2009-04-28 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. Bug 25449: AX: Respect the alt tag of ARIA button as AXDescription https://bugs.webkit.org/show_bug.cgi?id=25449 Test: accessibility/img-aria-button-alt-tag.html * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityDescription): 2009-04-28 Dan Bernstein <mitz@apple.com> Reviewed by John Sullivan. - formatting cleanup * rendering/RenderBox.cpp: (WebCore::RenderBox::calcHeight): Corrected indentation and added braces around a multi-line "else" clause. 2009-04-28 Eric Carlson <eric.carlson@apple.com> Reviewed by Adam Roben <rdar://problem/6769968> media/video-size-intrinsic-scale.html fails on Windows https://bugs.webkit.org/show_bug.cgi?id=25094 Display movies saved with a non-identity matrix at the correct size. * platform/graphics/win/QTMovieWin.cpp: (QTMovieWinPrivate::QTMovieWinPrivate): Initialize m_widthScaleFactor and m_heightScaleFactor. (QTMovieWinPrivate::cacheMovieScale): New, calculate difference between initial size and natural size so naturalSize() accounts for non-identity movie matrix. (QTMovieWinPrivate::task):Call cacheMovieScale when load state reaches kMovieLoadStateLoaded for the first time. kMovieLoadState -> QTMovieLoadState. (QTMovieWinPrivate::drawingComplete): kMovieLoadState -> QTMovieLoadState. (QTMovieWinPrivate::createGWorld): Don't bother creating gworld until load state reaches kMovieLoadStateLoaded because we do not try to draw it before that point. (QTMovieWinPrivate::setSize): Do not change movie box before reaching kMovieLoadStateLoaded because we need to get the movie's initial size in cacheMovieScale. (QTMovieWin::getNaturalSize): Multiply width and height by initial scale. 2009-04-28 Sam Weinig <sam@webkit.org> Reviewed by Dan Bernstein. Move timer code from JSDOMWindow to DOMWindow. clearTimeout and clearInterval can now be autogenerated. * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowBase.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::createScheduledAction): (WebCore::JSDOMWindow::setTimeout): (WebCore::JSDOMWindow::setInterval): * page/DOMWindow.cpp: (WebCore::DOMWindow::setTimeout): (WebCore::DOMWindow::clearTimeout): (WebCore::DOMWindow::setInterval): (WebCore::DOMWindow::clearInterval): * page/DOMWindow.h: * page/DOMWindow.idl: 2009-04-28 Kevin Watters <kevinwatters@gmail.com> Reviewed by Kevin Ollivier. Small optimization, don't get the widget's handle twice in one method. https://bugs.webkit.org/show_bug.cgi?id=25446 * platform/wx/WidgetWx.cpp: (WebCore::Widget::setFocus): (WebCore::Widget::show): (WebCore::Widget::hide): (WebCore::Widget::frameRect): (WebCore::Widget::setFrameRect): (WebCore::Widget::invalidateRect): (WebCore::Widget::paint): 2009-04-28 Kevin Watters <kevinwatters@gmail.com> Reviewed by Kevin Ollivier. ScrollView copy and paste typo fix. https://bugs.webkit.org/show_bug.cgi?id=25445 * platform/wx/ScrollViewWx.cpp: (WebCore::ScrollView::platformSetScrollbarModes): 2009-04-28 John Sullivan <sullivan@apple.com> <rdar://problem/6820221> REGRESSION: 2-byte character names of images are displayed as %-encoded ASCII Reviewed by Adam Roben * loader/ImageDocument.cpp: (WebCore::ImageTokenizer::finish): decode the filename before processing it as part of the image name that's passed to the client 2009-04-28 Maciej Stachowiak <mjs@apple.com> Not reviewed, build fix. - fix initialization order to match declaration order to fix release build * page/Settings.cpp: (WebCore::Settings::Settings): 2009-04-28 Xan Lopez <xlopez@igalia.com> Reviewed by Justin Garcia. https://bugs.webkit.org/show_bug.cgi?id=16135 [GTK] Support caret browsing Based on a patch by Alp Toker. Implement basic support for caret browsing, active only when the corresponding setting is enabled. * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): * page/FocusController.cpp: (WebCore::FocusController::advanceFocus): (WebCore::clearSelectionIfNeeded): (WebCore::FocusController::setFocusedNode): * page/Frame.cpp: (WebCore::Frame::setFocusedNodeIfNeeded): (WebCore::Frame::setSelectionFromNone): (WebCore::Frame::respondToChangedSelection): * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintCaret): 2009-04-27 Eric Roman <eroman@chromium.org> Reviewed by Darin Fisher. Fix a compile breakage. <https://bugs.webkit.org/show_bug.cgi?id=25384> * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-04-27 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. <rdar://problem/6822344> Use of QTMovieCurrentSizeAttribute generates exception and will crash QTMovieCurrentSizeAttribute generates an exception with some versions of QTKit, so calculate a multiplier to scale from natural size to current size when a movie is opened and use that to return the correct value from the naturalSize() method. * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_scaleFactor. (WebCore::MediaPlayerPrivate::naturalSize): Return naturalSize transformed by initial scale. (WebCore::MediaPlayerPrivate::cacheMovieScale): New, calculate difference between initial size and natural size so naturalSize() accounts for non-identity movie matrix. (WebCore::MediaPlayerPrivate::updateStates): Call cacheMovieScale when load state reaches QTMovieLoadStateLoaded for the first time. 2009-04-27 Beth Dakin <bdakin@apple.com> Reviewed by Dave Hyatt. Fix for <rdar://problem/6709057> REGRESSION (4PB-TOT): http://www.winway.com/main3/support/faq.aspx selector doesn't look right or work The problem here is that we had a self-painting layer nested inside a non-self-painting layer. We ended up ignoring the self-painting layer both during painting and hit-testing. This patch corrects that. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): 2009-04-27 Ada Chan <adachan@apple.com> If it has been set to allow any HTTPS certificates for this host, set kCFStreamSSLAllowsExpiredCertificates to true to allow expired certificate, and set kCFStreamSSLValidatesCertificateChain false to skip certificate chain validation. (<rdar://problem/6382059>) Reviewed by John Sullivan. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest): 2009-04-27 Simon Fraser <simon.fraser@apple.com> Reviewed by Adele Peterson <rdar://problem/6822225> Full page zooming of <video> element in the browser window doesn't work well Fix a 'size changed' notification thrash that caused standalone video elements to continually resize after full page zooming, by using the movie's natual size (which is independent of zooming), rather than its current size (which is not). Note that this regresses <https://bugs.webkit.org/show_bug.cgi?id=25029>, so we have to disable the media/video-size-intrinsic-scale.html test. However, we have to stop using QTMovieCurrentSizeAttribute anyway; this will be addressed, and the test re-enabled via <rdar://problem/6822344>. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::naturalSize): 2009-04-27 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler <rdar://problem/6642221> REGRESSION: With the Movie widget, movie trailer fails to load if movie had been previously viewed Fix the Dashboard quirk for display:none plug-ins by moving the code from HTMLObjectElement to HTMLEmebedElement. It has to be in HTMLEmbedElement because the content we care about uses <embed>. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::rendererIsNeeded): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::rendererIsNeeded): 2009-04-27 Sam Weinig <sam@webkit.org> Reviewed by Geoffrey Garen. Move more window event related code into DOMWindow. * dom/Document.cpp: (WebCore::Document::implicitClose): (WebCore::Document::setWindowAttributeEventListener): (WebCore::Document::dispatchWindowEvent): (WebCore::Document::dispatchLoadEvent): * dom/Document.h: * dom/Element.cpp: * dom/Element.h: * dom/Node.cpp: * dom/Node.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::parseMappedAttribute): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): (WebCore::DOMWindow::postMessageTimerFired): (WebCore::DOMWindow::dispatchEvent): (WebCore::DOMWindow::dispatchEventWithDocumentAsTarget): (WebCore::DOMWindow::dispatchLoadEvent): (WebCore::DOMWindow::dispatchUnloadEvent): (WebCore::DOMWindow::dispatchBeforeUnloadEvent): * page/DOMWindow.h: * page/Frame.cpp: (WebCore::Frame::shouldClose): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseMappedAttribute): 2009-04-27 Douglas R. Davidson <ddavidso@apple.com> Implement the editing mechanisms and add context menu items for <rdar://problem/6724106> WebViews need to implement text checking Reviewed by Justin Garcia. * editing/Editor.cpp: * editing/Editor.h: * editing/TypingCommand.cpp: * loader/EmptyClients.h: * page/ContextMenuController.cpp: * page/EditorClient.h: * page/mac/WebCoreViewFactory.h: * platform/ContextMenu.cpp: * platform/ContextMenuItem.h: * platform/LocalizedStrings.h: * platform/mac/LocalizedStringsMac.mm: 2009-04-27 Sam Weinig <sam@webkit.org> Reviewed by Geoffrey Garen. Fix for <rdar://problem/6772944> REGRESSION (r42223): PLT 2% slower, i-Bench 3% slower Be slightly less eager in collecting after page close/navigation by increasing the time before collection from 0 seconds to .5 seconds. 3% speedup on the PLT. * bindings/js/GCController.cpp: (WebCore::GCController::garbageCollectSoon): 2009-04-27 David Kilzer <ddkilzer@apple.com> Consolidate runtime application checks for Apple Mail and Safari Reviewed by Mark Rowe and Darin Adler. * WebCore.base.exp: Added exports. * WebCore.xcodeproj/project.pbxproj: Added RuntimeApplicationChecks.{h|mm} source files to the project. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks): Removed local checkedSafari and isSafari variables and switched to use applicationIsSafari(). * platform/mac/RuntimeApplicationChecks.h: Added. * platform/mac/RuntimeApplicationChecks.mm: Added. (WebCore::applicationIsAppleMail): Runtime application check for Apple Mail. (WebCore::applicationIsSafari): Runtime application check for Safari. 2009-04-27 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. Bug 25374: AX: No AXValue change sent when text is auto-inserted https://bugs.webkit.org/show_bug.cgi?id=25374 First patch caused some regression tests to fail. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setInnerTextValue): 2009-04-16 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Based on a patch by Alp Toker. Cover more WebCore role -> ATK role conversions. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-18 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Do not call ATK setters in the getters, just return the value. Among other things calling the setter will emit the notify signal, which is wrong. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-16 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Based on a patch by Alp Toker. Implement AtkImage interface. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-27 Gustavo Noronha Silva <gns@gnome.org> Unreviewed debug build fix. * platform/gtk/gtk2drawing.c: (moz_gtk_toggle_paint): 2009-04-27 Dimitri Glazkov <dglazkov@chromium.org> Build fix. https://bugs.webkit.org/show_bug.cgi?id=25382 Remove direct reference to CallFrame.h include to pacify Win build. * bindings/js/JSDOMBinding.h: Removed ScriptState.h include. * bindings/js/ScriptState.h: Replaced CallFrame.h with JSDOMBinding.h 2009-04-27 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin. Bug 25374: AX: No AXValue change sent when text is auto-inserted https://bugs.webkit.org/show_bug.cgi?id=25374 When an input's text value is changed through the DOM, no AXValueChange notification is being sent. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setInnerTextValue): 2009-04-27 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25382 Move scriptStateFromNode to ScriptState. * bindings/js/JSDOMBinding.cpp: Moved scriptStateFromNode to ScriptState. * bindings/js/JSDOMBinding.h: Ditto. * bindings/js/ScriptState.cpp: (WebCore::scriptStateFromNode): Added. * bindings/js/ScriptState.h: Ditto. * bindings/v8/ScriptState.cpp: (WebCore::scriptStateFromNode): Added. * bindings/v8/ScriptState.h: Ditto. * dom/NodeFilter.h: Removed JSDOMBinding header include. * dom/NodeIterator.h: Ditto. * dom/TreeWalker.h: Ditto. 2009-04-27 Chris Fleizach <cfleizach@apple.com> Reviewed by Beth Dakin. Bug 25428: 5 crashes in DumpRenderTree at com.apple.WebCore • -[AccessibilityObjectWrapper accessibilityAttributeValue:] + 830 https://bugs.webkit.org/show_bug.cgi?id=25428 When marking children as changed in accessibility, we cannot rely on the accessibility parent chain existing. Instead, the render chain needs to be consulted. * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::childrenChanged): 2009-04-27 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25399 <rdar://problem/6633943> REGRESSION: Many crashes reported accessing Lexis/Nexis database, beneath WebCore::Cache::evict The crash happened because a cached resource handle was removed from a document's cached resources map twice recursively, so a destructor was called for a value in a deleted bucket. The first call was from Cache::evict, and when destroying CachedResourceHandle destroyed CachedResource, DocLoader::removeCachedResource() was called again, with HashMap being in an inconsistent state. I couldn't fully reconstruct the loading sequence to make a test. * loader/Cache.cpp: (WebCore::Cache::revalidateResource): Assert that the resource being revalidated is in cache (it makes no sense to revalidate one that isn't). (WebCore::Cache::evict): Don't remove the resource from document's map. Removing a resource from the cache in no way implies that documents no longer use the old version. This fixes the crash, and also fixes many cases of resource content being unavailable in Web Inspector. * loader/CachedResource.h: (WebCore::CachedResource::setInCache): When bringing a revalidated resource back to cache, reset m_isBeingRevalidated to maintain the invariant of resources being revalidated never being in cache. This fixes another assertion I saw on LexisNexis search: in rare cases, switchClientsToRevalidatedResource() results in the same resource being requested again, but we were only enforcing CachedResource invariants after calling this function. (WebCore::CachedResource::unregisterHandle): Assert that the counter doesn't underflow. * loader/DocLoader.cpp: (WebCore::DocLoader::removeCachedResource): Assert that the passed resource is removed, not some other resource that happens to have the same URL (this used to fail on LexisNexis search before this patch). * loader/ImageDocument.cpp: (WebCore::ImageTokenizer::write): Replaced ASSERT_NOT_REACHED with notImplemented(). This method can be legally called via document.write(), and should work. LexisNexis takes this code path, but apparently has a fallback for Safari, so it doesn't affect site functionality. * loader/CachedResource.cpp: (WebCore::CachedResource::clearResourceToRevalidate): Don't assert that m_resourceToRevalidate is being revalidated - this may no longer be true, because we now reset this member in CachedResource::setInCache(). 2009-04-27 Dan Bernstein <mitz@apple.com> Reviewed by Sam Weinig. - make BidiContext a RefCounted class, starting with a refcount of 1, and share the root BidiContexts. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawBidiText): Use BidiContext::create(). * platform/text/BidiContext.cpp: (WebCore::BidiContext::create): Added. For the four "root" contexts, returns a reference to a shared static BidiContext. * platform/text/BidiContext.h: (WebCore::BidiContext::BidiContext): * platform/text/BidiResolver.h: (WebCore::::commitExplicitEmbedding): Use BidiContext::create(). * rendering/bidi.cpp: (WebCore::RenderBlock::determineStartPosition): Ditto. 2009-04-27 Jan Michael Alonzo <jmalonzo@webkit.org> Rubber-stamped by Gustavo Noronha. Build fix for r42893: change GDK_exclaim to GDK_exclam * platform/chromium/KeyCodeConversionGtk.cpp: (WebCore::windowsKeyCodeForKeyEvent): * platform/gtk/KeyEventGtk.cpp: (WebCore::windowsKeyCodeForKeyEvent): 2009-04-27 Fumitoshi Ukai <ukai@google.com> Reviewed by Xan Lopez. Fix wrong key code conversion. Missing conversion for GDK_exlaim ('!'). Parens are opposite: GDK_parenleft is open paren '(' and GDK_parenright is close paren ')'. https://bugs.webkit.org/show_bug.cgi?id=25367 * platform/chromium/KeyCodeConversionGtk.cpp: (WebCore::windowsKeyCodeForKeyEvent): * platform/gtk/KeyEventGtk.cpp: (WebCore::windowsKeyCodeForKeyEvent): 2009-04-27 Jan Michael Alonzo <jmalonzo@webkit.org> Reviewed by Gustavo Noronha. [Gtk] gtkdrawing update https://bugs.webkit.org/show_bug.cgi?id=25408 Update to the 25 Apr 2009 version of gtk2drawing.c and gtkdrawing.h from Mozilla (http://hg.mozilla.org/mozilla-central) * platform/gtk/gtk2drawing.c: (setup_widget_prototype): (moz_gtk_get_combo_box_entry_arrow): (ensure_toolbar_widget): (ensure_tree_header_cell_widget): (moz_gtk_init): (moz_gtk_button_get_inner_border): (moz_gtk_toggle_paint): (moz_gtk_caret_paint): (moz_gtk_entry_paint): (moz_gtk_tree_header_cell_paint): (moz_gtk_combo_box_paint): (moz_gtk_toolbar_separator_paint): (moz_gtk_menu_separator_paint): (moz_gtk_get_widget_border): (moz_gtk_get_tab_scroll_arrow_size): (moz_gtk_get_toolbar_separator_width): (moz_gtk_get_menu_separator_height): (moz_gtk_widget_paint): (moz_gtk_shutdown): * platform/gtk/gtkdrawing.h: 2009-04-27 Ariya Hidayat <ariya.hidayat@nokia.com> Reviewed by Tor Arne Vestbø. https://bugs.webkit.org/show_bug.cgi?id=18475 [Qt] Widget painting should follow the layout direction (LTR, RTL) of the element style, not the application layout direction. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::applyTheme): 2009-04-26 Sam Weinig <sam@webkit.org> Reviewed by Dan Bernstein. Fix for https://bugs.webkit.org/show_bug.cgi?id=25412 The Window object should be an EventTarget Test: fast/dom/Window/dispatchEvent.html * bindings/js/JSEventTarget.cpp: (WebCore::toJS): Add DOMWindow case. (WebCore::toEventTarget): Ditto. * dom/EventTarget.cpp: (WebCore::EventTarget::toDOMWindow): Added. * dom/EventTarget.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::scriptExecutionContext): Added. Returns the document. (WebCore::DOMWindow::dispatchEvent): Added. * page/DOMWindow.h: (WebCore::DOMWindow::toDOMWindow): (WebCore::DOMWindow::refEventTarget): (WebCore::DOMWindow::derefEventTarget): * page/DOMWindow.idl: 2009-04-26 Sam Weinig <sam@webkit.org> Reviewed by Eric Seidel. Remove scons-based build system. * WebCore.scons: Removed. 2009-04-26 Darin Adler <darin@apple.com> Suggested by Darin Fisher. Improve the fix for bug 25355: Crash when Creating New Tab or New Window when set to open Same Page https://bugs.webkit.org/show_bug.cgi?id=25355 rdar://problem/6823543 * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadItem): Allow shouldScroll to be true even if m_currentHistoryItem is 0. Not sure if when this case can really arise in practice, but it's good to match the original logic more closely. 2009-04-25 Dirk Schulze <krit@webkit.org> Reviewed by Oliver Hunt. A width or height of zero for the destination or source rect of an image causes a not invertible pattern matrix. This crahes newer versions of Cairo and give some graphic gliches in Canvas. With this patch we check if there is something to draw and return if not. * platform/graphics/cairo/ImageCairo.cpp: (WebCore::BitmapImage::draw): 2009-04-25 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=25390 Fix point mapping and hit testing through transforms and perspective with ENABLE_3D_RENDERING. Previously the code did the more efficient move(), rather than getTransformFromContainer(), when the object had no transform. However, this skipped the application of perspective when the immediate child of the perspective element had no transform itself. Test: transforms/3d/point-mapping/3d-point-mapping-3.html * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): (WebCore::RenderBox::mapAbsoluteToLocalPoint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::createLocalTransformState): Call shouldUseTransformFromContainer() to determine if we need to go through the more expensive getTransformFromContainer() code path. * rendering/RenderObject.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::shouldUseTransformFromContainer): New method that indicates whether we need use getTransformFromContainer() when mapping points through renderers, and hit testing. 2009-04-25 Adele Peterson <adele@apple.com> Reviewed by Oliver Hunt. Fix for <rdar://problem/6712771> REGRESSION(34681): Text is no longer underlined after delete https://bugs.webkit.org/show_bug.cgi?id=25396 Test: editing/deleting/delete-br-013.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveParagraphs): Only preserve an empty paragraph's style when moving paragraphs around if the selection is still in an empty paragraph after the move occurs. This was causing the empty paragraph's style to overwrite the previous paragraph's style during a delete of an empty paragraph. 2009-04-25 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. <rdar://problem/6808171> REGRESSION (3-4): Standalone media documents don't properly display non-linear media If a media engine claims it can support the MIME type, WebCore now creates a <video> element for document mode media files instead of an <embed> element. Because WebCore's QuickTime backed media players do not support every kind of media the QuickTime plug-in supports, and because it is not always possible to tell what type of media is in a file without opening and parsing it, some types of media that used to be displayed properly by a plug-in are no longer supported properly. To fix this, if the media engine sees that it can not completely support a media file it now informs the media document, which replaces the <video> element with an <embed>. r42301 landed support for OSX. This patch modifies those changes slighly and adds support for Windows. * loader/MediaDocument.cpp: (WebCore::MediaDocument::MediaDocument): Initialize m_replaceMediaElementTimer. (WebCore::MediaDocument::mediaElementSawUnsupportedTracks): Don't replace the <video> element immediately. (WebCore::MediaDocument::replaceMediaElementTimerFired): Renamed from replaceVideoWithEmbed. Set body margin-width and margin-height to 0 as that is what a PluginDocument uses. * loader/MediaDocument.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::loadStateChanged): Don't do anything if m_hasUnsupportedTracks. (WebCore::MediaPlayerPrivate::rateChanged): Ditto. (WebCore::MediaPlayerPrivate::timeChanged): Ditto. (WebCore::MediaPlayerPrivate::didEnd): Ditto. (WebCore::MediaPlayerPrivate::repaint): Ditto. (WebCore::MediaPlayerPrivate::paint): Ditto. (WebCore::MediaPlayerPrivate::sawUnsupportedTracks): Set m_hasUnsupportedTracks before callback. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_totalTrackCount and m_hasUnsupportedTracks. (WebCore::MediaPlayerPrivate::updateStates): Call sawUnsupportedTracks if the movie has unsupported media type(s) or if it fails completely. (WebCore::MediaPlayerPrivate::sawUnsupportedTracks): New, disable the movie object and tell the media player client we won't play this movie correctly. (WebCore::MediaPlayerPrivate::didEnd): Don't do anything if m_hasUnsupportedTracks. (WebCore::MediaPlayerPrivate::setSize): Ditto. (WebCore::MediaPlayerPrivate::setVisible): Ditto. (WebCore::MediaPlayerPrivate::paint): Ditto. (WebCore::MediaPlayerPrivate::movieEnded): Ditto. (WebCore::MediaPlayerPrivate::movieLoadStateChanged): Ditto. (WebCore::MediaPlayerPrivate::movieTimeChanged): Ditto. (WebCore::MediaPlayerPrivate::movieNewImageAvailable): Ditto. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: * platform/graphics/win/QTMovieWin.cpp: (QTMovieWinPrivate::task): Stop the task timer if we were disabled during the load state change callback. (QTMovieWinPrivate::drawingComplete): Don't do anything if disabled. (QTMovieWin::QTMovieWin): Initialize m_disabled. (QTMovieWin::disableUnsupportedTracks): Return total number of tracks. (QTMovieWin::setDisabled): New, set m_disabled flag. * platform/graphics/win/QTMovieWin.h: 2009-04-25 Jan Michael Alonzo <jmalonzo@webkit.org> Reviewed by Xan Lopez. [GTK] Error reporting https://bugs.webkit.org/show_bug.cgi?id=18344 Fix the SOUP resource handle to report SOUP_HTTP_ERROR for Soup errors and G_IO_ERROR for gio errors. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::finishedCallback): (WebCore::ResourceHandle::startHttp): (WebCore::ResourceHandle::start): (WebCore::readCallback): (WebCore::openCallback): (WebCore::queryInfoCallback): (WebCore::ResourceHandle::startGio): 2009-04-25 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by Mark Rowe. Only set the new URL once for the request. Doing it a second time after the call to willSendRequest was causing crashes when redirected requests got cancelled. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::restartedCallback): 2009-04-24 Kevin Ollivier <kevino@theolliviers.com> wx build fix. Adding ScriptEventListener.cpp. * WebCoreSources.bkl: 2009-04-24 Sergio GarcÃa-Cuevas <sergio_gcg@telefonica.net> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=17267 [GTK] Primary selection/clipboard support Copy the link location to the primary selection as well as the clipboard selection when using the "copy link selection" context menu entry. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeURL): * platform/gtk/PasteboardHelper.h: 2009-04-24 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25383 Changing SVG size via JS does not update CSS width/height Add an ugly hack to fix CSS width/height updates from JS. We can't easily call setAttribute when width/height changes as that would cause infinite recursion (as we'd try to set the animation storage from the attributes) For now, when we get notification that JS changed width/height we copy what parseMappedAttribute does and update the CSS values as well. A better fix for this would be: https://bugs.webkit.org/show_bug.cgi?id=25383 * svg/SVGSVGElement.cpp: (WebCore::updateCSSForAttribute): (WebCore::SVGSVGElement::svgAttributeChanged): 2009-04-24 Kevin McCullough <kmccullough@apple.com> Reviewed by Dan Bernstein. We should not show the deletion UI for blockquotes in mail but they do show now that we only check for one visible border. * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): 2009-04-24 Dan Bernstein <mitz@apple.com> - address Hyatt's review comments on the last patch * rendering/RenderLayer.cpp: (WebCore::performOverlapTests): (WebCore::RenderLayer::paintLayer): 2009-04-24 Dan Bernstein <mitz@apple.com> Reviewed by Dave Hyatt. - fix https://bugs.webkit.org/show_bug.cgi?id=5909 <rdar://problem/5863349> overlapping element leaves trail when scrolling iframe * WebCore.xcodeproj/project.pbxproj: Added OverlapTestRequestClient.h. * page/FrameView.cpp: (WebCore::FrameView::reset): Initialize m_isOverlapped. (WebCore::FrameView::useSlowRepaints): Also check m_isOverlapped. (WebCore::FrameView::removeSlowRepaintObject): Use useSlowRepaints() so overlapping is taken into account. (WebCore::FrameView::setIsOverlapped): Added. Sets m_isOverlapped and enables or disables copy-on-scroll accordingly. * page/FrameView.h: Added setIsOverlapped() and m_isOverlapped. * rendering/OverlapTestRequestClient.h: Added. During foreground painting, an OverlapTestRequestClient can make a request to test if any subsequently- painted layers overlap a rect. The test result is delivered to the requestClient via setOverlapTestResult(). (WebCore::OverlapTestRequestClient::~OverlapTestRequestClient): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paint): Pass an OverlapTestRequestMap to paintLayer(). When done painting, inform any remaining requestClients that they are not overlapped. (WebCore::RenderLayer::paintLayer): Take an OverlapTestRequestMap and pass it down to child and reflection layers. Inform requestClients if this layer overlaps their requested rects. * rendering/RenderLayer.h: * rendering/RenderObject.h: (WebCore::RenderObject::PaintInfo::PaintInfo): Added an OverlapTestRequestMap member. * rendering/RenderReplica.cpp: (WebCore::RenderReplica::paint): For now, pass a 0 OverlapTestRequestMap to paintLayer(). * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): For FrameViews, request an overlap test with the frame. (WebCore::RenderWidget::setOverlapTestResult): Call FrameView::setIsOverlapped() with the result of the overlap test. * rendering/RenderWidget.h: Made RenderWidget an OverlapTestRequestClient. 2009-04-24 David Hyatt <hyatt@apple.com> Reviewed by Simon Fraser, Dan Bernstein. Speed up the PLT by devirtualizing the height() function on InlineBox. virtualizing it in order to make the height() computation dynamic caused a ~0.5% slowdown. This patch does the following to get the speed back: (a) Devirtualizes isText and forces inline box creators to set the bit as needed. This actually resulted in simplified code, since ListMarkerBox could then be removed. (b) Reduces the height() call count. In some cases the code was repeatedly calling height(), which used to be fine when the function was just an inline member variable access. The call sites have been patched to cut down on extra height() calls now that it is more expensive. (c) Devirtualize height() except on SVG boxes. For all non-SVG, the height() function on InlineBox handles the computation. For SVG boxes, a new bit has been set on InlineBoxes (isSVG()) that indicates that the virtual svgBoxHeight() function should be called to retrieve the height instead. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * rendering/InlineBox.cpp: (WebCore::InlineBox::height): * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): (WebCore::InlineBox::isSVG): (WebCore::InlineBox::setIsSVG): (WebCore::InlineBox::isText): (WebCore::InlineBox::setIsText): (WebCore::InlineBox::svgBoxHeight): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesVertically): (WebCore::InlineFlowBox::paintBoxDecorations): (WebCore::InlineFlowBox::paintMask): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: * rendering/InlineTextBox.h: * rendering/ListMarkerBox.cpp: Removed. * rendering/ListMarkerBox.h: Removed. * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::createInlineBox): * rendering/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createFlowBox): * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::createTextBox): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::createRootBox): * rendering/RenderText.cpp: (WebCore::RenderText::createInlineTextBox): * rendering/RootInlineBox.cpp: * rendering/RootInlineBox.h: * rendering/SVGInlineFlowBox.h: (WebCore::SVGInlineFlowBox::svgBoxHeight): * rendering/SVGInlineTextBox.h: (WebCore::SVGInlineTextBox::svgBoxHeight): * rendering/SVGRootInlineBox.h: (WebCore::SVGRootInlineBox::svgBoxHeight): 2009-04-24 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25370 Introduce ScriptEventListener to refactor away direct references to JSLazyEventListener in WebCore code. * GNUmakefile.am: Added ScriptEventListener to project. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSDOMGlobalObject.cpp: Removed unused JSLazyEventListener include. * bindings/js/JSLazyEventListener.cpp: Moved createAttributeEventListener helpers to ScriptEventListener. * bindings/js/JSLazyEventListener.h: Ditto. * bindings/js/ScriptController.cpp: Removed unused JSLazyEventListener include. * bindings/js/ScriptEventListener.cpp: Added. * bindings/js/ScriptEventListener.h: Added. * bindings/v8/ScriptEventListener.cpp: Added. * bindings/v8/ScriptEventListener.h: Added. * dom/Document.cpp: Renamed JSLazyEventListener include to ScriptEventListener. * html/HTMLBodyElement.cpp: Ditto. * html/HTMLButtonElement.cpp: Ditto. * html/HTMLElement.cpp: Ditto. * html/HTMLFormElement.cpp: Ditto. * html/HTMLFrameElementBase.cpp: Ditto. * html/HTMLFrameSetElement.cpp: Ditto. * html/HTMLImageElement.cpp: Ditto. * html/HTMLInputElement.cpp: Ditto. * html/HTMLObjectElement.cpp: Ditto. * html/HTMLScriptElement.cpp: Ditto. * html/HTMLSelectElement.cpp: Ditto. * html/HTMLTextAreaElement.cpp: Ditto. * svg/SVGElement.cpp: Ditto. * svg/SVGSVGElement.cpp: Ditto. 2009-04-24 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. Bug 25355: Crash when Creating New Tab or New Window when set to open Same Page https://bugs.webkit.org/show_bug.cgi?id=25355 rdar://problem/6823543 * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadItem): Added a null check. 2009-04-24 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Fix RenderSVGImage to dump with full bounds and style information. https://bugs.webkit.org/show_bug.cgi?id=25377 No functional changes, we're just now including more info in render tree dumps. * rendering/RenderObject.h: (WebCore::RenderObject::isSVGImage): * rendering/RenderSVGImage.h: (WebCore::RenderSVGImage::isSVGImage): * rendering/RenderTreeAsText.cpp: (WebCore::write): * rendering/SVGRenderTreeAsText.cpp: (WebCore::operator<<): (WebCore::write): * rendering/SVGRenderTreeAsText.h: 2009-04-24 David Levin <levin@chromium.org> Reviewed by NOBODY (chromium build fix). Rename "isInline" => "isAttribute" in v8 bindings (jsc was done in r42699). * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::V8AbstractEventListener): (WebCore::V8AbstractEventListener::invokeEventHandler): * bindings/v8/V8AbstractEventListener.h: * bindings/v8/V8EventListenerList.cpp: (WebCore::V8EventListenerList::add): (WebCore::V8EventListenerList::remove): (WebCore::V8EventListenerList::clear): * bindings/v8/V8LazyEventListener.h: (WebCore::V8LazyEventListener::virtualisAttribute): * bindings/v8/custom/V8CustomEventListener.cpp: (WebCore::V8EventListener::V8EventListener): * bindings/v8/custom/V8CustomEventListener.h: (WebCore::V8EventListener::create): (WebCore::V8EventListener::virtualisAttribute): 2009-04-24 Nate Chapin <japhet@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25343 Fix Chromium/Skia bug where -webkit-box-shadow with 0,0 offset ignores blur. * WebCore\platform\graphics\skia\GraphicsContextSkia.cpp (WebCore::GraphicsContext::setPlatformShadow): Add check against blur before clearing looper. 2009-04-24 Eric Roman <eroman@chromium.org> Reviewed by Darin Adler. Initialize TextIterator::m_textLength to 0. This assures that TextIterator::length() will return 0 for cases when TextIterator's constructor returns early (because there is nothing to iterate over in the range). <https://bugs.webkit.org/show_bug.cgi?id=25335> Test: editing/selection/doubleclick-whitespace-img-crash.html * editing/TextIterator.cpp: (WebCore::TextIterator::TextIterator): 2009-04-24 Fumitoshi Ukai <ukai@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25329 Add indexed access method in v8 binding of ClientRectList. * bindings/v8/custom/V8ClientRectListCustom.cpp: Added. 2009-04-24 Fumitoshi Ukai <ukai@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25257 Use null for unspecified event listener attributes of XMLHttpRequest and XMLHttpRequestUpload in v8 binding. cf. http://www.whatwg.org/specs/web-apps/current-work/#event-handler-attributes An event handler attribute, unless otherwise specified, can either have the value null or be set to a Function object. Initially, an event handler attribute must be set to null. Test: fast/xmlhttprequest/xmlhttprequest-default-attributes.html * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::ACCESSOR_GETTER): Changed to use v8::Null(). * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: (WebCore::ACCESSOR_GETTER): Ditto. 2009-04-24 Darin Adler <darin@apple.com> Reviewed by Adam Roben. <rdar://problem/6663836> CrashTracer: crashes in Safari at com.apple.WebCore • WebCore::reportException + 1513 * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): Added a null check. 2009-04-24 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=23219 Add support for transtions and animations of background-position, -webkit-background-size, -webkit-mask-position and -webkit-mask-size. Tests: transitions/background-transitions.html transitions/mask-transitions.html * page/animation/AnimationBase.cpp: (WebCore::blendFunc): Add a blend func for LengthSize. (WebCore::ensurePropertyMap): Add wrappers for the new properties. (WebCore::addShorthandProperties): Add a shorthand property for CSSPropertyBackgroundPosition to map to CSSPropertyBackgroundPositionX and CSSPropertyBackgroundPositionY, add CSSPropertyWebkitMask for CSSPropertyWebkitMaskPosition, and add CSSPropertyWebkitMaskPosition for CSSPropertyWebkitMaskPositionX and CSSPropertyWebkitMaskPositionY. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setBackgroundXPosition): (WebCore::InheritedFlags::setBackgroundYPosition): (WebCore::InheritedFlags::setBackgroundSize): (WebCore::InheritedFlags::setMaskXPosition): (WebCore::InheritedFlags::setMaskYPosition): (WebCore::InheritedFlags::setMaskSize): Add setters for the properties that can be animated now. 2009-04-24 Adele Peterson <adele@apple.com> Reviewed by Darin Adler. Fix for <rdar://problem/5089327> Newline gets stripped when pasting whole lines in certain markup Test: editing/pasteboard/paste-blockquote-after-blockquote.html When we have matching quote levels, its ok to merge the starts of the inserted and existing blocks more frequently. But we should only merge here if the selection start was inside a mail blockquote. This prevents against removing a blockquote from newly pasted quoted content that was pasted into an unquoted position. If that unquoted position happens to be right after another blockquote, we don't want to merge and risk stripping a valid block (and newline) from the pasted content. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::shouldMergeStart): Also added an early return to always return false when we're already moving paragraphs. (WebCore::ReplaceSelectionCommand::doApply): Removed redundant check for when we're moving paragraphs. * editing/ReplaceSelectionCommand.h: 2009-04-23 Francisco Tolmasky <francisco@280north.com> BUG 24604: WebKit profiler reports incorrect total times <https://bugs.webkit.org/show_bug.cgi?id=24604> Reviewed by Timothy Hatcher and Kevin McCullough. Made it so that most of the profiler functions now match the behavior of Shark. Most notably, in the heavy view, child nodes now represent the statistics of the root node. Each root node of heavy view displays flattened statistics for a particular function that ran during the profile, and each child of these root nodes represents a callpath that lead to it. Thus, the statistics for each of these child nodes should show how much of the root nodes values came from it. For example, if you had the following to stacks take place during the profile: A ->calls 1 times-> B ->calls 2 times-> C D ->calls 4 times-> C The tree for the C root node would look like this: C -> B -> A -> D The number of calls values would look like this: C (6) -> B (2) -> A(2) -> D (4) What this means is that "2 of the total 6 C calls came from B", "2 of the total C calls came from A", and "4 of the total C calls came from D". Notice that the "A ->calls 2 time->" is completely ignored. This becomes particularly tricky during recursive calls, because each child note can represent multiple possible paths. This is the reason that we would get things like 40000% previously with recursion. This is also the way gprof works, and as close as we can get to Shark's behavior (Shark is not instrumented so it can't know exactly how many calls came from where, etc). * English.lproj/localizedStrings.js: Added "Average" for average times in the profile. * inspector/JavaScriptProfile.cpp: (WebCore::ProfileClass): * inspector/JavaScriptProfileNode.cpp: (WebCore::getParent): (WebCore::getHead): (WebCore::getCallUID): (WebCore::ProfileNodeClass): * inspector/front-end/BottomUpProfileDataGridTree.js: Added. (WebInspector.BottomUpProfileDataGridTree): (WebInspector.BottomUpProfileDataGridTree.prototype.focus): (WebInspector.BottomUpProfileDataGridNode): (WebInspector.BottomUpProfileDataGridNode.prototype._takePropertiesFromProfileDataGridNode): (WebInspector.BottomUpProfileDataGridNode.prototype._keepOnlyChild): (WebInspector.BottomUpProfileDataGridNode.prototype._exclude): (WebInspector.BottomUpProfileDataGridNode.prototype._merge): (WebInspector.BottomUpProfileDataGridNode.prototype._populate): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype.insertChild): (WebInspector.DataGrid.prototype.removeChild): (WebInspector.DataGrid.prototype.removeChildren): (WebInspector.DataGridNode.prototype.set hasChildren): (WebInspector.DataGridNode.prototype.get hasChildren): * inspector/front-end/ProfileDataGridTree.js: Added. (WebInspector.ProfileDataGridNode): (WebInspector.ProfileDataGridNode.prototype.get data.formatMilliseconds): (WebInspector.ProfileDataGridNode.prototype.get data): (WebInspector.ProfileDataGridNode.prototype.createCell): (WebInspector.ProfileDataGridNode.prototype.select): (WebInspector.ProfileDataGridNode.prototype.deselect): (WebInspector.ProfileDataGridNode.prototype.expand): (WebInspector.ProfileDataGridNode.prototype.insertChild): (WebInspector.ProfileDataGridNode.prototype.removeChild): (WebInspector.ProfileDataGridNode.prototype.removeChildren): (WebInspector.ProfileDataGridNode.prototype.findChild): (WebInspector.ProfileDataGridNode.prototype.get averageTime): (WebInspector.ProfileDataGridNode.prototype.get averagePercent): (WebInspector.ProfileDataGridNode.prototype.get selfPercent): (WebInspector.ProfileDataGridNode.prototype.get totalPercent): (WebInspector.ProfileDataGridNode.prototype._save): (WebInspector.ProfileDataGridNode.prototype._restore): (WebInspector.ProfileDataGridNode.prototype._merge): (WebInspector.ProfileDataGridTree): (WebInspector.ProfileDataGridTree.prototype.get expanded): (WebInspector.ProfileDataGridTree.prototype.appendChild): (WebInspector.ProfileDataGridTree.prototype.insertChild): (WebInspector.ProfileDataGridTree.prototype.removeChildren): (WebInspector.ProfileDataGridTree.prototype.findChild.WebInspector.ProfileDataGridNode.prototype.findChild.sort.WebInspector.ProfileDataGridNode.prototype.sort._save): (WebInspector.ProfileDataGridTree.propertyComparator.comparator): (WebInspector.ProfileDataGridTree.propertyComparator.else.comparator): (WebInspector.ProfileDataGridTree.propertyComparator): * inspector/front-end/ProfileView.js: (WebInspector.ProfileView): (WebInspector.ProfileView.prototype.set profile): (WebInspector.ProfileView.prototype.get bottomUpProfileDataGridTree): (WebInspector.ProfileView.prototype.get topDownProfileDataGridTree): (WebInspector.ProfileView.prototype.get currentTree): (WebInspector.ProfileView.prototype.set currentTree): (WebInspector.ProfileView.prototype.get topDownTree): (WebInspector.ProfileView.prototype.get bottomUpTree): (WebInspector.ProfileView.prototype.refresh): (WebInspector.ProfileView.prototype.refreshVisibleData): (WebInspector.ProfileView.prototype.refreshShowAsPercents): (WebInspector.ProfileView.prototype.performSearch.matchesQuery): (WebInspector.ProfileView.prototype.performSearch): (WebInspector.ProfileView.prototype._changeView): (WebInspector.ProfileView.prototype._focusClicked): (WebInspector.ProfileView.prototype._excludeClicked): (WebInspector.ProfileView.prototype._resetClicked): (WebInspector.ProfileView.prototype._sortProfile): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.showProfile): (WebInspector.ProfilesPanel.prototype.showView): (WebInspector.ProfilesPanel.prototype.searchMatchFound): * inspector/front-end/TopDownProfileDataGridTree.js: Added. (WebInspector.TopDownProfileDataGridNode): (WebInspector.TopDownProfileDataGridNode.prototype._populate): (WebInspector.TopDownProfileDataGridNode.prototype._exclude): (WebInspector.TopDownProfileDataGridTree): (WebInspector.TopDownProfileDataGridTree.prototype.focus): (WebInspector.TopDownProfileDataGridTree.prototype.exclude): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: * inspector/front-end/inspector.html: 2009-04-23 Eric Seidel <eric@webkit.org> Reviewed by Sam Weinig. Use static functions (and a couple templates) to further reduce the amount of copy/paste code in SVGRenderTreeAsText No test changes, only code cleanup. * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeNameValuePair): (WebCore::writeNameAndQuotedValue): (WebCore::writeIfNotEmpty): (WebCore::writeIfNotDefault): (WebCore::writeStyle): (WebCore::writePositionAndStyle): (WebCore::operator<<): 2009-04-23 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. SVGRenderTreeAsText cleanup/code sharing. No test changes, only code cleanup. * rendering/RenderText.cpp: (WebCore::RenderText::firstRunOrigin): * rendering/RenderText.h: * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeStandardPrefix): (WebCore::writeChildren): (WebCore::write): (WebCore::writeRenderResources): 2009-04-23 Beth Dakin <bdakin@apple.com> Reviewed by Darin Adler. WebCore part of fix for <rdar://problem/6333461> REGRESSION (r36864-r36869): Dragging stocks widget scrollbar drags the whole widget * platform/Scrollbar.h: (WebCore::Scrollbar::isScrollbar): * platform/Widget.h: (WebCore::Widget::isScrollbar): 2009-04-23 Kevin McCullough <kmccullough@apple.com> Reviewed by Adam Roben. <rdar://problem/6808109> "Deletion UI" is not available for many portions of HTML content This patch makes the deletion UI show up in some new situations: 1) If a block's background color is different from its parent's 2) If a block has a background image. 3) If a block has a single visible border. However the block must now not only be at least a minimum width and height, but also exceed a minimum area. In practice this has led to much better element selection. * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): 2009-04-23 Kevin Ollivier <kevino@theolliviers.com> wx build fix. Adding XMLTokenizerScope.cpp to the build. * WebCoreSources.bkl: 2009-04-23 Adele Peterson <adele@apple.com> Reviewed by Darin Adler. Fix for <rdar://problem/6788905> REGRESSION (41928?): hang in Position::upstream https://bugs.webkit.org/show_bug.cgi?id=25312 I was unable to reproduce the problem, but I'm pretty sure this will fix it. * rendering/RenderObject.cpp: (WebCore::RenderObject::createVisiblePosition): Since VisiblePosition doesn't ensure the offset is good, we shouldn't pass max int as an offset. 2009-04-23 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25313 Missing scroll bars in GMail. Test: fast/overflow/overflow-y-scroll.html * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): Added check for the ScrollbarAlwaysOn scroll mode. 2009-04-23 Dan Bernstein <mitz@apple.com> Reviewed by Justin Garcia. - fix <rdar://problem/6081309> Mail crash when pressing down arrow in some messages in WebCore::canHaveChildrenForEditing Test: editing/selection/extend-by-line-anonymous-content-crash.html * editing/visible_units.cpp: (WebCore::previousLinePosition): Null-check node. If p is not an editable position, then closestLeafChildForXPos() may have returned a non-editable box, and in particular one belonging to anonymous content. If node is 0, fall back on RenderObject::positionForPoint, which finds the closest position in non-anonymous content. (WebCore::nextLinePosition): Ditto. * rendering/RenderObject.cpp: (WebCore::RenderObject::createVisiblePosition): Fixed a typo. 2009-04-23 Alexey Proskuryakov <ap@webkit.org> Reviewed by Adele Peterson. <rdar://problem/6791439> REGRESSION: Get an error page instead of login page navigating back in gmail Test: http/tests/history/back-to-post.php * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest): Apply a new cache policy if it changed after the platform request was first created. While at it, also made sure to update timeout. 2009-04-23 Zan Dobersek <zandobersek@gmail.com> Reviewed by Gustavo Noronha. When creating a new drawable object, collect system's information about the best depth it can provide and use it in a new colormap that the new drawable requires. * platform/graphics/gtk/ImageGtk.cpp: (WebCore::BitmapImage::getGdkPixbuf): 2009-04-23 Zan Dobersek <zandobersek@gmail.com> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=15654 GdkPixbuf support for ImageCairo Add support for converting a Cairo surface to a GdkPixbuf. * platform/graphics/BitmapImage.h: * platform/graphics/Image.h: (WebCore::Image::getGdkPixbuf): * platform/graphics/gtk/ImageGtk.cpp: (WebCore::BitmapImage::getGdkPixbuf): 2009-04-23 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> Reviewed by Simon Hausmann. Make windowed plugins (on X11, Qt) behave nicer with wheel scrolling. Basically, what we want is to send wheel events to the plugin *only* when it has focus, or else send it to the parent frame. This is a work around, and basically what we do, is to steal the wheel events from the plugin, modify the window ID, and put the event back into the Qt event loop. * plugins/qt/PluginContainerQt.cpp: (PluginClientWrapper::PluginClientWrapper): (PluginClientWrapper::~PluginClientWrapper): (PluginClientWrapper::x11Event): (PluginContainerQt::PluginContainerQt): (PluginContainerQt::~PluginContainerQt): (PluginContainerQt::on_clientClosed): (PluginContainerQt::on_clientIsEmbedded): (PluginContainerQt::redirectWheelEventsToParent): (PluginContainerQt::x11Event): (PluginContainerQt::focusInEvent): * plugins/qt/PluginContainerQt.h: 2009-04-22 Brady Eidson <beidson@apple.com> Reviewed by Maciej Stachowiak <rdar://problem/6786961> - "Are you sure you want to resubmit this form?" nag displays twice. For most loads, we were consulting the navigation policy delegate twice. Once from FrameLoader before the load started and once from MainResourceLoader in its willSendRequest callback. In the past we tried removing MainResourceLoader's call altogether. This caused a regression where urls that redirect to a url handled by an external application would no longer work in Safari. It probably also broke other WebKit apps in subtle ways. Changing MainResourceLoader to make the check only on redirects fixes both bugs. We now only call the policy delegate once for most standard loads, but we do correctly call it a second time for redirects. Tests: http/tests/misc/policy-delegate-called-twice.html http/tests/misc/redirect-to-external-url.html * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::willSendRequest): Call the navigation policy delegate only for redirects. 2009-04-22 Sam Weinig <sam@webkit.org> Reviewed by Mark Rowe. Fix for <rdar://problem/6800695> Add a hack to only allow navigating (via a link from a http page) to feed: urls (same for feeds: and feedsearch:) that map to http: or https: via their nested protocol. This includes both feed://example.com and feed:http://example.com. * loader/FrameLoader.cpp: (WebCore::isFeedWithNestedProtocolInHTTPFamily): (WebCore::FrameLoader::loadFrameRequest): 2009-04-22 Sam Weinig <sam@webkit.org> Reviewed by Anders Carlsson. Autogenerate the XMLHttpRequest constructor getter/setter for the WorkerContext and remove the now no longer needed JSWorkerContextBase.lut.h file. * DerivedSources.make: Remove JSWorkerContextBase.lut.h * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSWorkerContextBase.cpp: * bindings/js/JSWorkerContextBase.h: Remove code to support hand written code for XMLHttpRequest constructor lookup and shadowing. * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::customGetOwnPropertySlot): Remove JSC prefixes. (WebCore::JSWorkerContext::xmlHttpRequest): Added. Custom implementation of cached constructor lookup. * workers/WorkerContext.idl: Make the XMLHttpRequestConstructor accessor not V8 specific. 2009-04-22 Darin Adler <darin@apple.com> * page/Navigator.idl: Touch this file to fix build since Geolocation configuration was recently turned off. 2009-04-22 Justin Garcia <justin.garcia@apple.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25322 Can't delete empty paragraph after a block image Empty paragraph removal would have been handled by mergeParagraphs, but we stopped short because of some code that avoided problems that would arise from Positions that would go bad during deletion. We have several checks that prevent us from using bad Positions, this one in particular was added to avoid bad Positions that result from text removal. So, I removed the check and started correctly updating m_downstreamEnd during text removal so that it doesn't go bad. m_upstreamStart doesn't need to be updated during text removal, since only text after it will ever be removed. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::deleteTextFromNode): (WebCore::DeleteSelectionCommand::handleGeneralDelete): (WebCore::DeleteSelectionCommand::mergeParagraphs): 2009-04-22 Oliver Hunt <oliver@apple.com> Reviewed by Darin Adler. <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves Make mouseUp target the correct frame when the original mousedown made the drag non-capturing. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passSubframeEventToSubframe): 2009-04-22 Oliver Hunt <oliver@apple.com> Reviewed by Darin Adler. <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves This is the first step of allowing drag events to match the behaviour of mouse move events when the default action of the initial mouse down is prevented. Remaining issue is that the final mouse up event still targets the original root frame. Test: fast/events/mouse-drag-from-frame-to-other-frame.html * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passSubframeEventToSubframe): 2009-04-22 Simon Fraser <simon.fraser@apple.com> Reviewed by Adele Peterson <rdar://problem/6702882> QT movie's video fails to be displayed after switching between tabs <rdar://problem/6754957> Resizing Web browser window and hitting play will cause video blocks and artifacting When in a media document, MediaPlayerPrivateQTKit uses a QTMovieView which may get layer backing under some circumstances. However, drawing the view via displayRectIgnoringOpacity:inContext: bypasses any layer setup that AppKit normally performs. So when in the media document, we draw via displayRectIgnoringOpacity:. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::paint): 2009-04-22 Timothy Hatcher <timothy@apple.com> Fix a crash in Mail when forwarding a specific HTML email. Caused by the fix for <rdar://problem/6512520> (r42096). Unable to create a test case that works outside of Mail. <rdar://problem/6796069> Reviewed by Ada Chan. * editing/markup.cpp: (WebCore::createMarkup): Null check pastEnd before trying to call Range::compareBoundaryPoints. 2009-04-22 Sam Weinig <sam@webkit.org> Rubber-stamped by Darin Adler. Fix for <rdar://problem/6816957> Turn off Geolocation by default * Configurations/FeatureDefines.xcconfig: 2009-04-22 Eric Seidel <eric@webkit.org> Rubber-stamped by David Hyatt. Change RenderSVGImage to dump as RenderSVGImage instead of RenderImage * rendering/RenderSVGImage.h: (WebCore::RenderSVGImage::renderName): 2009-04-21 Timothy Hatcher <timothy@apple.com> Fix a crash on Gmail when they remove a "before unload" event listener when it was never added to the pending map in the first place. <rdar://problem/6814144> Reviewed by Darin Adler. * page/DOMWindow.cpp: (WebCore::allowsPendingBeforeUnloadListeners): Renamed from shouldAddPendingBeforeUnloadListener. (WebCore::DOMWindow::addEventListener): Call allowsPendingBeforeUnloadListeners now. (WebCore::DOMWindow::removeEventListener): Call allowsPendingBeforeUnloadListeners before removing the before unload listener. (WebCore::DOMWindow::clearAttributeEventListener): Ditto. 2009-04-22 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> Reviewed by Ariya Hidayat. Made windowed plugins move/resize synchronized with the painting, so that windowed plugins are not moved before the rest of the parent frame during scrolling. * plugins/qt/PluginContainerQt.cpp: (PluginContainerQt::PluginContainerQt): (PluginContainerQt::requestGeometry): (PluginContainerQt::adjustGeometry): * plugins/qt/PluginContainerQt.h: * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::updatePluginWidget): (WebCore::PluginView::paint): 2009-04-22 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Ariya Hidayat. Fix various bugs in the X11 Qt plugin focus handling. Notify the focus controller on activation/deactivation of the plugin and set focus on the plugin's element when it receives the window system focus. * WebCore.pro: Added PluginContainerQt to the Qt build. * plugins/PluginView.cpp: (WebCore::PluginView::focusPluginElement): New helper function, moved from PluginViewWin. * plugins/PluginView.h: (WebCore::PluginView::parentFrame): Added parent frame accessor. * plugins/qt/PluginContainerQt.cpp: Added. (PluginContainerQt::PluginContainerQt): (PluginContainerQt::focusInEvent): Set the focus controller active on focus in events. (PluginContainerQt::focusOutEvent): Deactivate the focus controller when loosing the focus. * plugins/qt/PluginContainerQt.h: Added. * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::init): Allocate a PluginContainerQt instead of QX11EmbedContainer. * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::handleMouseEvent): Moved the code to set focus on the plugin element to PluginView::focusPluginElement. 2009-04-22 Tamas Szirbucz <szirbucz.tamas@stud.u-szeged.hu> Reviewed by Ariya Hidayat. https://bugs.webkit.org/show_bug.cgi?id=25023 Delete reply in QNetworkReplyHandler::abort() to avoid leak. * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandler::abort): 2009-04-21 Jon Honeycutt <jhoneycutt@apple.com> Allow the UI delegate to control cursor-setting. Reviewed by Ada Chan. * page/Chrome.cpp: (WebCore::Chrome::setCursor): Pass the call to the client. * page/Chrome.h: * page/ChromeClient.h: (WebCore::ChromeClient::setCursor): Stubbed; returns false. * platform/Cursor.h: Define PlatformCursorHandle for each platform. * platform/win/WidgetWin.cpp: Reordered some includes. Added an include of Page.h. (WebCore::Widget::setCursor): Fixed a typo in the comment about ignoreNextSetCursor. Get the Page, and call its Chrome's setCursor() method with the passed cursor. Fall back to SetCursor() if the Page is not available. * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::handleMouseEvent): Remove an unused variable. Cleaned up some whitespace. 2009-04-21 John Abd-El-Malek <jam@google.com> Reviewed by Dimitri Glazkov. Add a method to purge the Chromium plugin list cache. https://bugs.webkit.org/show_bug.cgi?id=25318 * plugins/chromium/PluginDataChromium.cpp: (WebCore::resetChromiumPluginCache): 2009-04-21 Mark Rowe <mrowe@apple.com> Reviewed by Darin Adler. Fix <https://bugs.webkit.org/show_bug.cgi?id=25164> / <rdar://problem/6786319>. We need to ensure that XMLTokenizer sets the current DocLoader before calling in to any libxml2 methods that may trigger a load. The presence of a DocLoader indicates that the load was originated by WebCore's use of libxml2 and that we should enforce the same-origin policy on it. XMLTokenizer::initializeParserContext, XMLTokenizer::doWrite and XMLTokenizer::doEnd were three methods that were not setting the current DocLoader when they should have. The XMLTokenizerScope class is introduced to simplify the pattern of saving, setting and restoring the current DocLoader and libxml2 error handlers. The DocLoader and error handlers are saved and set when the scope is allocated, and restored to their previous values when the scope is exited. Test: http/tests/security/xss-DENIED-xml-external-entity.xhtml * GNUmakefile.am: * WebCore.pro: * WebCore.scons: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/XMLTokenizer.cpp: * dom/XMLTokenizer.h: * dom/XMLTokenizerLibxml2.cpp: (WebCore::matchFunc): (WebCore::shouldAllowExternalLoad): (WebCore::openFunc): (WebCore::XMLTokenizer::doWrite): (WebCore::XMLTokenizer::initializeParserContext): (WebCore::XMLTokenizer::doEnd): (WebCore::xmlDocPtrForString): * dom/XMLTokenizerScope.cpp: (WebCore::XMLTokenizerScope::XMLTokenizerScope): (WebCore::XMLTokenizerScope::~XMLTokenizerScope): * dom/XMLTokenizerScope.h: * xml/XSLStyleSheet.cpp: (WebCore::XSLStyleSheet::parseString): * xml/XSLTProcessor.cpp: 2009-04-21 Sam Weinig <sam@webkit.org> Reviewed by Dan Bernstein. Fix for <rdar://problem/5874009> Add port 3659 (apple-sasl / PasswordServer) to the list of blocked ports. * platform/network/ResourceHandle.cpp: (WebCore::portAllowed): 2009-04-21 Justin Garcia <justin.garcia@apple.com> Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=25320 Crash when changing block styles in a root that contains no visible content (but contains nodes with renderers) * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): If the enclosing block is the root editable element and it contains no visible content, create a new block but don't try and move content into it, since there's nothing for moveParagraphs to move. 2009-04-21 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. Bug 25162: REGRESSION (r41176-r41242): Drag-selection above/below the line does not select to beginning/end https://bugs.webkit.org/show_bug.cgi?id=25162 rdar://problem/6764354 * page/Settings.cpp: (WebCore::Settings::Settings): Initialize editing behavior to Mac-style for PLATFORM(MAC). Later we may want to change this default to encompass other versions running on Mac. * page/Settings.h: Added EditingBehavior, setEditingBehavior, editingBehavior, and m_editingBehavior. Also moved m_maximumDecodedImageSize out of the middle of all the bit fields. * platform/graphics/IntPoint.h: Added a constructor to turn an IntSize into an IntPoint. I'm not sure the distinction here is serving us well at the moment. When converting from global to local coordinates you want to do IntPoint - IntPoint and have the result be another IntPoint, not an IntSize. And so on. * rendering/RenderBlock.cpp: (WebCore::positionForPointRespectingEditingBoundaries): Changed to use pointers more and separate coordinates less. (WebCore::RenderBlock::positionForPointWithInlineChildren): Turned into a member function. Added separate cases to support the Mac and Windows behavior. (WebCore::RenderBlock::positionForPoint): Updated for the change above. Also moved the computation of pointInContents closer to the place it's used. * rendering/RenderBlock.h: Updated for the new private member function. 2009-04-17 Timothy Hatcher <timothy@apple.com> Change pending unload and beforeunload counts to store the listeners in a single data structure that can be quickly iterated for dispatch. <rdar://problem/6383352&6383379&6383940> Reviewed by Darin Adler. * WebCore.base.exp: Change what symbols are exported. * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Remove count updating code and move an if inside a block already checking m_frame->document(). * page/Chrome.cpp: Remove disableSuddenTermination/enableSuddenTermination. * page/Chrome.h: Ditto. * page/ChromeClient.h: Ditto. * page/DOMWindow.cpp: (WebCore::pendingUnloadEventListenerMap): Create a static map. (WebCore::pendingBeforeUnloadEventListenerMap): Ditto. (WebCore::addPendingEventListener): Add the event listener to the map. (WebCore::removePendingEventListener): Remove the event listener from the map. (WebCore::removePendingEventListeners): Remove all listeners for the window. (WebCore::dispatchWindowEventToListeners): Dispatch the event to the given listeners. (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): Send the beforeunload event. (WebCore::DOMWindow::pendingUnloadEventListeners): Return a count of pending listeners. (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Send the unload event. (WebCore::DOMWindow::~DOMWindow): Remove the window from both event listener maps. (WebCore::DOMWindow::addEventListener): Call addPendingEventListener when needed. (WebCore::DOMWindow::removeEventListener): Call removePendingEventListener when needed. (WebCore::DOMWindow::removeAllEventListeners): Call removePendingEventListeners. (WebCore::DOMWindow::removeInlineEventListenerForType): Call removePendingEventListener when needed. * page/DOMWindow.h: (WebCore::DOMWindow::frame): Changed to be const. * page/EventHandler.cpp: (WebCore::EventHandler::EventHandler): Remove count tracking code. * page/EventHandler.h: Ditto. * page/Page.cpp: (WebCore::Page::Page): Ditto. * page/Page.h: Ditto. 2009-04-21 Justin Garcia <justin.garcia@apple.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=19644 Text copied with Select All pastes with a indent but shouldn't <rdar://problem/6102483> Pasting the content of an HTML message in Mail causes addition nested <div> elements to be added To improve selectall/copy/paste fidelity of certain pages, we began wrapping copied content with a div that held properties and attributes from the fully selected body. To fix the above issues, only do this if if the body has certain properties or attributes. We'll begin adding to this list as necessary. For now it's just background colors and images. Tested copy/paste of nytimes, wired, arstechnica, and several others. Massive nesting can still happen, it will just be much less common. * editing/markup.cpp: (WebCore::createMarkup): 2009-04-21 Peter Kasting <pkasting@google.com> Reviewed by David Hyatt. https://bugs.webkit.org/show_bug.cgi?id=25250 Allow platforms to snap the scroll thumb back to the drag origin during a drag. Implement functions for Safari/Win and Chromium/Win to do this snapping at distances approximating the native ones. * platform/Scrollbar.cpp: (WebCore::Scrollbar::Scrollbar): (WebCore::Scrollbar::setValue): (WebCore::Scrollbar::scroll): (WebCore::Scrollbar::moveThumb): (WebCore::Scrollbar::setCurrentPos): (WebCore::Scrollbar::mouseMoved): (WebCore::Scrollbar::mouseDown): * platform/Scrollbar.h: * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::shouldSnapBackToDragOrigin): * platform/chromium/ScrollbarThemeChromium.h: * platform/chromium/ScrollbarThemeChromiumLinux.cpp: (WebCore::ScrollbarThemeChromium::shouldSnapBackToDragOrigin): * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromium::shouldSnapBackToDragOrigin): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::shouldCenterOnThumb): (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin): * platform/win/ScrollbarThemeWin.h: 2009-04-21 Adam Roben <aroben@apple.com> Windows build fix * bindings/js/JSLazyEventListener.cpp: (WebCore::eventParameterName): Remove unreachable code when SVG is enabled. 2009-04-21 Kevin Ollivier <kevino@theolliviers.com> !ENABLE(SVG) build fix. * bindings/js/JSLazyEventListener.cpp: (WebCore::eventParameterName): 2009-04-21 Dave Moore <davemoore@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25309 Better use AtomicStrings when calling from the V8 bindings into WebCore code. * bindings/v8/custom/V8DOMWindowCustom.cpp: * bindings/v8/custom/V8HTMLCollectionCustom.cpp: * bindings/v8/custom/V8HTMLFormElementCustom.cpp: * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp: 2009-04-21 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. Bug 25304: AX: Safari not identifying a secure text field https://bugs.webkit.org/show_bug.cgi?id=25304 Secure text fields need to be able to return AXTitleUIElements. Test: accessibility/secure-textfield-title-ui.html * page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeNames]): 2009-04-21 Dan Bernstein <mitz@apple.com> - fix the Tiger build * page/mac/EventHandlerMac.mm: (method_setImplementation): 2009-04-21 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=25271 Fix the build with disabled DOM storage or disabled database support. * bindings/js/ScriptObjectQuarantine.cpp: * bindings/js/ScriptObjectQuarantine.h: 2009-04-21 Holger Hans Peter Freyther <zecke@selfish.org> Unreviewed build fix. Compile fix for r42633. const qualifier does not work on a static method. * dom/Document.h: (WebCore::Document::isSVGDocument): 2009-04-21 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler and John Sullivan. - fix <rdar://problem/5914146> Crash at -[NSScrollView scrollWheel:] -[NSScrollView scrollWheel:] runs a nested event-tracking run loop in a mode that allows WebCore timers to fire and NSURLConnection callbacks to be dispatched, which can release the NSScrollView and cause it to be deallocated (one example is a DOM timer callback that removes a subframe from the document). This leads to a crash in -scrollView:. The fix is to replace the implementation of -[NSScrollView scrollWheel:] with one that optionally retains the receiver for the duration of the call. * page/mac/EventHandlerMac.mm: (WebCore::nsScrollViewScrollWheelShouldRetainSelf): Added. (WebCore::setNSScrollViewScrollWheelShouldRetainSelf): Added. Replaces the implementation of -[NSScrollView scrollWheel:] with the self-retaining one, and sets a static boolean that tells it whether to retain the receiver around the call to the original implementation. (WebCore::selfRetainingNSScrollViewScrollWheel): Added. If setNSScrollViewScrollWheelShouldRetainSelf(true) was called and this function is executing on the main thread, it retains the NSScrollView, invokes the original -[NSScrollView scrollWheel:], then releases the view. Otherwise it just calls through to the original implementation. (WebCore::EventHandler::passWheelEventToWidget): Added calls to setNSScrollViewScrollWheelShouldRetainSelf() around the call to -scrollWheel:. 2009-04-21 Geoffrey Garen <ggaren@apple.com> Reviewed by Mark Rowe. Tiger crash fix: Put VM tags in their own header file, and fixed up the #ifdefs so they're not used on Tiger. * ForwardingHeaders/wtf/VMTags.h: Copied from WebCore/ForwardingHeaders/wtf/HashTraits.h. 2009-04-21 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Based on a patch by Alp Toker. Implement AtkComponent interface. * page/gtk/AccessibilityObjectWrapperAtk.cpp: (core): 2009-04-21 Xan Lopez <xlopez@igalia.com> Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Only implement AtkAction interface if we actually have an action. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-20 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25290 REGRESSION(r41732): Crash when constructing XMLHttpRequest in a detached document Test: fast/dom/xmlhttprequest-constructor-in-detached-document.html * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): * bindings/js/JSAudioConstructor.h: * bindings/js/JSDOMGlobalObject.h: (WebCore::getDOMConstructor): * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor): * bindings/js/JSImageConstructor.h: * bindings/js/JSMessageChannelConstructor.cpp: (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): * bindings/js/JSMessageChannelConstructor.h: * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor): * bindings/js/JSOptionConstructor.h: * bindings/js/JSXMLHttpRequestConstructor.cpp: (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): * bindings/js/JSXMLHttpRequestConstructor.h: Avoid accessing JSDOMGlobalObject via ScriptExecutionContext, since it may not work during frame teardown. 2009-04-20 Geoffrey Garen <ggaren@apple.com> Rubber stamped by Darin Adler and Sam Weinig. Renamed "*InlineEventListener*" => "*AttributeEventListener*", and "isInline" => "isAttribute". * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::createJSAttributeEventListener): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::~JSEventListener): (WebCore::JSEventListener::handleEvent): (WebCore::JSEventListener::virtualisAttribute): * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): (WebCore::JSEventListener::isAttribute): * bindings/js/JSLazyEventListener.cpp: (WebCore::createAttributeEventListener): * bindings/js/JSLazyEventListener.h: * bindings/scripts/CodeGeneratorJS.pm: * dom/Element.cpp: (WebCore::Element::setWindowAttributeEventListener): * dom/Element.h: * dom/EventListener.h: (WebCore::EventListener::isAttribute): (WebCore::EventListener::virtualisAttribute): * dom/Node.cpp: (WebCore::Node::clearAttributeEventListener): (WebCore::Node::setAttributeEventListener): (WebCore::Node::getAttributeEventListener): (WebCore::Node::onabort): (WebCore::Node::setOnabort): (WebCore::Node::onblur): (WebCore::Node::setOnblur): (WebCore::Node::onchange): (WebCore::Node::setOnchange): (WebCore::Node::onclick): (WebCore::Node::setOnclick): (WebCore::Node::oncontextmenu): (WebCore::Node::setOncontextmenu): (WebCore::Node::ondblclick): (WebCore::Node::setOndblclick): (WebCore::Node::onerror): (WebCore::Node::setOnerror): (WebCore::Node::onfocus): (WebCore::Node::setOnfocus): (WebCore::Node::oninput): (WebCore::Node::setOninput): (WebCore::Node::onkeydown): (WebCore::Node::setOnkeydown): (WebCore::Node::onkeypress): (WebCore::Node::setOnkeypress): (WebCore::Node::onkeyup): (WebCore::Node::setOnkeyup): (WebCore::Node::onload): (WebCore::Node::setOnload): (WebCore::Node::onmousedown): (WebCore::Node::setOnmousedown): (WebCore::Node::onmousemove): (WebCore::Node::setOnmousemove): (WebCore::Node::onmouseout): (WebCore::Node::setOnmouseout): (WebCore::Node::onmouseover): (WebCore::Node::setOnmouseover): (WebCore::Node::onmouseup): (WebCore::Node::setOnmouseup): (WebCore::Node::onmousewheel): (WebCore::Node::setOnmousewheel): (WebCore::Node::onbeforecut): (WebCore::Node::setOnbeforecut): (WebCore::Node::oncut): (WebCore::Node::setOncut): (WebCore::Node::onbeforecopy): (WebCore::Node::setOnbeforecopy): (WebCore::Node::oncopy): (WebCore::Node::setOncopy): (WebCore::Node::onbeforepaste): (WebCore::Node::setOnbeforepaste): (WebCore::Node::onpaste): (WebCore::Node::setOnpaste): (WebCore::Node::ondragenter): (WebCore::Node::setOndragenter): (WebCore::Node::ondragover): (WebCore::Node::setOndragover): (WebCore::Node::ondragleave): (WebCore::Node::setOndragleave): (WebCore::Node::ondrop): (WebCore::Node::setOndrop): (WebCore::Node::ondragstart): (WebCore::Node::setOndragstart): (WebCore::Node::ondrag): (WebCore::Node::setOndrag): (WebCore::Node::ondragend): (WebCore::Node::setOndragend): (WebCore::Node::onreset): (WebCore::Node::setOnreset): (WebCore::Node::onresize): (WebCore::Node::setOnresize): (WebCore::Node::onscroll): (WebCore::Node::setOnscroll): (WebCore::Node::onsearch): (WebCore::Node::setOnsearch): (WebCore::Node::onselect): (WebCore::Node::setOnselect): (WebCore::Node::onselectstart): (WebCore::Node::setOnselectstart): (WebCore::Node::onsubmit): (WebCore::Node::setOnsubmit): (WebCore::Node::onunload): (WebCore::Node::setOnunload): * dom/Node.h: * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::parseMappedAttribute): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseMappedAttribute): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::parseMappedAttribute): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseMappedAttribute): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::parseMappedAttribute): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::mouseButtonListener): * page/DOMWindow.cpp: (WebCore::DOMWindow::setAttributeEventListener): (WebCore::DOMWindow::clearAttributeEventListener): (WebCore::DOMWindow::getAttributeEventListener): (WebCore::DOMWindow::onabort): (WebCore::DOMWindow::setOnabort): (WebCore::DOMWindow::onblur): (WebCore::DOMWindow::setOnblur): (WebCore::DOMWindow::onchange): (WebCore::DOMWindow::setOnchange): (WebCore::DOMWindow::onclick): (WebCore::DOMWindow::setOnclick): (WebCore::DOMWindow::ondblclick): (WebCore::DOMWindow::setOndblclick): (WebCore::DOMWindow::onerror): (WebCore::DOMWindow::setOnerror): (WebCore::DOMWindow::onfocus): (WebCore::DOMWindow::setOnfocus): (WebCore::DOMWindow::onkeydown): (WebCore::DOMWindow::setOnkeydown): (WebCore::DOMWindow::onkeypress): (WebCore::DOMWindow::setOnkeypress): (WebCore::DOMWindow::onkeyup): (WebCore::DOMWindow::setOnkeyup): (WebCore::DOMWindow::onload): (WebCore::DOMWindow::setOnload): (WebCore::DOMWindow::onmousedown): (WebCore::DOMWindow::setOnmousedown): (WebCore::DOMWindow::onmousemove): (WebCore::DOMWindow::setOnmousemove): (WebCore::DOMWindow::onmouseout): (WebCore::DOMWindow::setOnmouseout): (WebCore::DOMWindow::onmouseover): (WebCore::DOMWindow::setOnmouseover): (WebCore::DOMWindow::onmouseup): (WebCore::DOMWindow::setOnmouseup): (WebCore::DOMWindow::onmousewheel): (WebCore::DOMWindow::setOnmousewheel): (WebCore::DOMWindow::onreset): (WebCore::DOMWindow::setOnreset): (WebCore::DOMWindow::onresize): (WebCore::DOMWindow::setOnresize): (WebCore::DOMWindow::onscroll): (WebCore::DOMWindow::setOnscroll): (WebCore::DOMWindow::onsearch): (WebCore::DOMWindow::setOnsearch): (WebCore::DOMWindow::onselect): (WebCore::DOMWindow::setOnselect): (WebCore::DOMWindow::onsubmit): (WebCore::DOMWindow::setOnsubmit): (WebCore::DOMWindow::onunload): (WebCore::DOMWindow::setOnunload): (WebCore::DOMWindow::onbeforeunload): (WebCore::DOMWindow::setOnbeforeunload): (WebCore::DOMWindow::onwebkitanimationstart): (WebCore::DOMWindow::setOnwebkitanimationstart): (WebCore::DOMWindow::onwebkitanimationiteration): (WebCore::DOMWindow::setOnwebkitanimationiteration): (WebCore::DOMWindow::onwebkitanimationend): (WebCore::DOMWindow::setOnwebkitanimationend): (WebCore::DOMWindow::onwebkittransitionend): (WebCore::DOMWindow::setOnwebkittransitionend): * page/DOMWindow.h: * svg/SVGElement.cpp: (WebCore::SVGElement::parseMappedAttribute): * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::onabort): (WebCore::SVGElementInstance::setOnabort): (WebCore::SVGElementInstance::onblur): (WebCore::SVGElementInstance::setOnblur): (WebCore::SVGElementInstance::onchange): (WebCore::SVGElementInstance::setOnchange): (WebCore::SVGElementInstance::onclick): (WebCore::SVGElementInstance::setOnclick): (WebCore::SVGElementInstance::oncontextmenu): (WebCore::SVGElementInstance::setOncontextmenu): (WebCore::SVGElementInstance::ondblclick): (WebCore::SVGElementInstance::setOndblclick): (WebCore::SVGElementInstance::onerror): (WebCore::SVGElementInstance::setOnerror): (WebCore::SVGElementInstance::onfocus): (WebCore::SVGElementInstance::setOnfocus): (WebCore::SVGElementInstance::oninput): (WebCore::SVGElementInstance::setOninput): (WebCore::SVGElementInstance::onkeydown): (WebCore::SVGElementInstance::setOnkeydown): (WebCore::SVGElementInstance::onkeypress): (WebCore::SVGElementInstance::setOnkeypress): (WebCore::SVGElementInstance::onkeyup): (WebCore::SVGElementInstance::setOnkeyup): (WebCore::SVGElementInstance::onload): (WebCore::SVGElementInstance::setOnload): (WebCore::SVGElementInstance::onmousedown): (WebCore::SVGElementInstance::setOnmousedown): (WebCore::SVGElementInstance::onmousemove): (WebCore::SVGElementInstance::setOnmousemove): (WebCore::SVGElementInstance::onmouseout): (WebCore::SVGElementInstance::setOnmouseout): (WebCore::SVGElementInstance::onmouseover): (WebCore::SVGElementInstance::setOnmouseover): (WebCore::SVGElementInstance::onmouseup): (WebCore::SVGElementInstance::setOnmouseup): (WebCore::SVGElementInstance::onmousewheel): (WebCore::SVGElementInstance::setOnmousewheel): (WebCore::SVGElementInstance::onbeforecut): (WebCore::SVGElementInstance::setOnbeforecut): (WebCore::SVGElementInstance::oncut): (WebCore::SVGElementInstance::setOncut): (WebCore::SVGElementInstance::onbeforecopy): (WebCore::SVGElementInstance::setOnbeforecopy): (WebCore::SVGElementInstance::oncopy): (WebCore::SVGElementInstance::setOncopy): (WebCore::SVGElementInstance::onbeforepaste): (WebCore::SVGElementInstance::setOnbeforepaste): (WebCore::SVGElementInstance::onpaste): (WebCore::SVGElementInstance::setOnpaste): (WebCore::SVGElementInstance::ondragenter): (WebCore::SVGElementInstance::setOndragenter): (WebCore::SVGElementInstance::ondragover): (WebCore::SVGElementInstance::setOndragover): (WebCore::SVGElementInstance::ondragleave): (WebCore::SVGElementInstance::setOndragleave): (WebCore::SVGElementInstance::ondrop): (WebCore::SVGElementInstance::setOndrop): (WebCore::SVGElementInstance::ondragstart): (WebCore::SVGElementInstance::setOndragstart): (WebCore::SVGElementInstance::ondrag): (WebCore::SVGElementInstance::setOndrag): (WebCore::SVGElementInstance::ondragend): (WebCore::SVGElementInstance::setOndragend): (WebCore::SVGElementInstance::onreset): (WebCore::SVGElementInstance::setOnreset): (WebCore::SVGElementInstance::onresize): (WebCore::SVGElementInstance::setOnresize): (WebCore::SVGElementInstance::onscroll): (WebCore::SVGElementInstance::setOnscroll): (WebCore::SVGElementInstance::onsearch): (WebCore::SVGElementInstance::setOnsearch): (WebCore::SVGElementInstance::onselect): (WebCore::SVGElementInstance::setOnselect): (WebCore::SVGElementInstance::onselectstart): (WebCore::SVGElementInstance::setOnselectstart): (WebCore::SVGElementInstance::onsubmit): (WebCore::SVGElementInstance::setOnsubmit): (WebCore::SVGElementInstance::onunload): (WebCore::SVGElementInstance::setOnunload): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseMappedAttribute): 2009-04-20 Geoffrey Garen <ggaren@apple.com> Approved by Mark Rowe, Cameron Zwarich, Oliver Hunt, and Ojan Vafai. Used svn merge to roll out revisions 42678, 42690, 42694, 42697 because they broke the Tiger and Windows buildbots. * css/html4.css: * css/themeWin.css: * platform/graphics/SimpleFontData.cpp: * platform/graphics/SimpleFontData.h: * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: * platform/graphics/chromium/SimpleFontDataLinux.cpp: * platform/graphics/gtk/SimpleFontDataGtk.cpp: * platform/graphics/gtk/SimpleFontDataPango.cpp: * platform/graphics/mac/SimpleFontDataMac.mm: * platform/graphics/qt/SimpleFontDataQt.cpp: * platform/graphics/win/SimpleFontDataCGWin.cpp: * platform/graphics/win/SimpleFontDataCairoWin.cpp: * platform/graphics/win/SimpleFontDataWin.cpp: * platform/graphics/wx/SimpleFontDataWx.cpp: * rendering/RenderTextControl.cpp: * rendering/RenderTextControlMultiLine.cpp: * rendering/RenderTextControlSingleLine.cpp: 2009-04-20 Geoffrey Garen <ggaren@apple.com> Reviewed by Adam Roben. One last loose end, discovered using COLLECT_ON_EVERY_ALLOCATION, for https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::mark): Don't ASSERT that an ElementInstance's correspondingElement has a JS wrapper. If a GC falls exactly between the allocation of the ElementInstance wrapper and the correspondingElement wrapper, the correspondingElement won't have a wrapper at the time we mark the ElementInstance's wrapper. 2009-04-20 Brady Eidson <beidson@apple.com> Rubberstamped by Mark Rowe Clean builds are broken on case-sensitive filesystems. Let's fix, shall we? * platform/graphics/SimpleFontData.cpp: Remove "String.h" include. Ojan probably intended to include "PlatformString.h" which was unnecessary because it is pulled in through other headers. This wasn't a build failure on case-insensitive file systems because those systems would find the system <string.h>, averting the warning. 2009-04-20 Geoffrey Garen <ggaren@apple.com> Reviewed by Darin Adler. Last patch for https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions Converted "lazy" event listeners to be unprotected, just like all the others. * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::~JSEventListener): (WebCore::JSEventListener::jsFunction): (WebCore::JSEventListener::markJSFunction): (WebCore::JSEventListener::handleEvent): (WebCore::JSEventListener::virtualIsInline): * bindings/js/JSEventListener.h: (WebCore::JSEventListener::isInline): Merged JSAbstractEventListener into JSEventListener. Now that the only difference between JSEventListener and JSLazyEventListener is that JSLazyEventListener compiles lazily, there's no need for an abstract base class. * bindings/js/JSLazyEventListener.cpp: Converted JSLazyEventListener to inherit from JSEventListener and match its un-GC-protected behavior. (WebCore::JSLazyEventListener::JSLazyEventListener): ditto (WebCore::JSLazyEventListener::parseCode): ditto (WebCore::createInlineEventListener): When creating a lazy event listener, ensure that the related node has a JS wrapper to mark the listener. Since the parser makes these listeners, it's possible that no JS reference has been made to the node yet. * bindings/js/JSLazyEventListener.h: ditto * dom/EventListener.h: (WebCore::EventListener::clearJSFunction): Removed an usused function. 2009-04-20 Justin Garcia <justin.garcia@apple.com> Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=25299 Don't bound caret to root line box if it is still inside its containing block Can't yet write tests for behavior of non-standard caret widths. * rendering/RenderText.cpp: (WebCore::RenderText::localCaretRect): 2009-04-20 Steve Falkenburg <sfalken@apple.com> Separate JavaScriptCore.dll from WebKit.dll. Slight performance improvement or no change on benchmarks. Allows us to break a circular dependency between CFNetwork and WebKit on Windows, and simplifies standalone JavaScriptCore builds. Reviewed by Oliver Hunt. * config.h: Specify __declspec(dllexport/dllimport) appropriately when exporting data. 2009-04-20 Anders Carlsson <andersca@apple.com> Reviewed by Sam Weinig. <rdar://problem/6722845> In the Cocoa event model, NPWindow's window field should be null * bridge/npapi.h: (_NPCocoaEvent::): Add a CGContextRef member to the draw struct. Add an NPCoordinateSpace enum. * plugins/npfunctions.h: Add a prototype for NPN_ConvertPoint. 2009-04-10 Ojan Vafai <ojan@chromium.org> Reviewed by Dan Bernstein. Make textarea and text input metrics more closely match IEs. https://bugs.webkit.org/show_bug.cgi?id=15312 This involves: -set text input width to size*avgCharWidth + maxCharWidth - avgCharWidth -set textarea width to cols*avgCharWidth -Make default CSS match IEs -Correctly initializing m_avgCharWidth and m_maxCharWidth for each platform and SVG. Those values for textarea and inputs were derived by doing a ton of manual testing of IE's width values for various textareas and fonts. To get the average and max character width of a font, we do the following for each platform: -Win: TextMetrics expose avgCharWidth and maxCharWidth -SVG: avgCharWidth = width of an '0', fallback on width of a space glyph, then m_xHeight maxCharWidth = width of a 'W' for roman fonts, fallback on m_ascent -Linux: avgCharWidth = width of an '0', fallback on m_xHeight maxCharWidth = max of avgCharWidth and m_ascent -Mac: look in the OS/2 table for avgCharWidth and grab the maxCharWidth off the font. If either one is not there, then calculate the value using the Linux approach. Linux ports could probably dig into the OS/2 table as well, but I'll leave that up to them to implement. Tests: fast/forms/text-control-intrinsic-widths.html fast/forms/textarea-metrics.html svg/custom/svg-fonts-in-text-controls.html * css/html4.css: * css/themeWin.css: * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): (WebCore::SimpleFontData::initCharWidths): * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::maxCharWidth): (WebCore::SimpleFontData::avgCharWidth): * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/gtk/SimpleFontDataGtk.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/gtk/SimpleFontDataPango.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/win/SimpleFontDataCairoWin.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::initGDIFont): * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::platformCharWidthInit): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::calcPrefWidths): * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::createInnerTextStyle): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::preferredContentWidth): 2009-04-17 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Remove m_absoluteBounds hack from SVG renderers and move outlineBoundsForRepaint into RenderSVGModelObject https://bugs.webkit.org/show_bug.cgi?id=25276 This also exposed a buggy paint check in RenderSVGContainer::layout() we should repaint if we are self painting OR if our kids changed, not AND. Writing real outlineBoundsForRepaint required writing a mapLocalToContainer() function No functional changes, thus no tests. * rendering/RenderPath.cpp: (WebCore::RenderPath::localToParentTransform): (WebCore::RenderPath::layout): * rendering/RenderPath.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): * rendering/RenderSVGContainer.h: * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::mapLocalToContainer): (WebCore::RenderSVGModelObject::outlineBoundsForRepaint): * rendering/RenderSVGModelObject.h: * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): (WebCore::RenderSVGRoot::paint): (WebCore::RenderSVGRoot::localToParentTransformWithoutCSSParentOffset): (WebCore::RenderSVGRoot::localToParentTransform): (WebCore::RenderSVGRoot::computeRectForRepaint): * rendering/RenderSVGRoot.h: * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::layout): 2009-04-20 Simon Fraser <simon.fraser@apple.com> Reviewed by Eric Seidel https://bugs.webkit.org/show_bug.cgi?id=25282 outlineBoundsForRepaint() should compute a quad relative to the repaintContainer. This fixes the repaint issues originally fixed in https://bugs.webkit.org/show_bug.cgi?id=12885 for elements in compositing layers. Failure was only apparent when building with ACCELERATED_COMPOSITING enabled. Tests: compositing/repaint/content-into-overflow.html compositing/repaint/overflow-into-content.html * rendering/RenderBox.cpp: (WebCore::RenderBox::outlineBoundsForRepaint): 2009-04-20 Sam Weinig <sam@webkit.org> Rubber-stamped by Tim Hatcher. Add licenses for xcconfig files. * Configurations/Base.xcconfig: * Configurations/DebugRelease.xcconfig: * Configurations/FeatureDefines.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebCore.xcconfig: 2009-04-20 Eric Roman <eroman@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25261 Implement the V8 binding for DOMWindow.event similarly to JSC, by using the custom getter boilerplate from the IDL file. Also, stub out DOMWindow.crypto which is defined by the idl. * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::invokeEventHandler): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::ACCESSOR_GETTER): 2009-04-20 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by Xan Lopez. https://bugs.webkit.org/show_bug.cgi?id=25243 Crash when data:// loads are cancelled Properly handle cancellation of the load for data:// loads. This fixes crashing in the followin test: plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::parseDataUrl): 2009-04-19 Dan Bernstein <mitz@apple.com> - maybe fix release builds * dom/ScriptElement.cpp: (WebCore::ScriptElementData::notifyFinished): 2009-04-19 Dan Bernstein <mitz@apple.com> - not fix release builds * dom/Document.cpp: (WebCore::Document::executeScriptSoonTimerFired): 2009-04-19 Dan Bernstein <mitz@apple.com> Reviewed by Mark Rowe. - fix <rdar://problem/6734365> REGRESSION eBay "Save this search" link does nothing the second time search results are opened Test: fast/dom/HTMLScriptElement/nested-execution.html Instead of executing scripts as soon as they finish loading, which may happen synchronously during execution of another script, defer their execution until the next run loop iteration, using a queue that is similar to the HTML5 notion of the "list of scripts that will execute as soon as possible", and in my testing was consistent with how Firefox behaved. * dom/Document.cpp: (WebCore::Document::Document): Initialize m_executeScriptSoonTimer. (WebCore::Document::~Document): deref() script elements in m_scriptsToExecuteSoon. (WebCore::Document::executeScriptSoonTimerFired): Added. Executes the scripts in m_scriptsToExecuteSoon and deref()s them. (WebCore::Document::executeScriptSoon): Added. Appends to m_scriptsToExecuteSoon and ref()s the script element, which keeps the ScriptElementData alive as well. * dom/Document.h: * dom/ScriptElement.cpp: (WebCore::ScriptElementData::ScriptElementData): Initialize m_requested. (WebCore::ScriptElementData::requestScript): Set m_requested to true, to prevent further load requests. (WebCore::ScriptElementData::execute): Added. Moved the code from notifyFinished() which should not execute synchronously here, to be called by the Document on a 0-interval timer. (WebCore::ScriptElementData::notifyFinished): Moved the code to dispatch events and evaluate the script, which should not execute synchronously, out of here. (WebCore::ScriptElementData::ignoresLoadRequest): Changed to test for m_requested instead of m_cachedScript, because the latter is cleared before the script is evaluated. * dom/ScriptElement.h: 2009-04-19 Oliver Hunt <oliver@apple.com> Reviewed by Antti Koivisto and Darin Adler. <rdar://problem/6127705> Excessive memory consumption on image load failure When we fail to decode an image we clear most of the image data, but not the input data itself, which can be backed by a CFData object that itself holds onto a few hundred Kbs of memory. This patch merely ensures that this buffer gets cleared. * loader/CachedImage.cpp: (WebCore::CachedImage::error): 2009-04-19 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. Add hooks so sudden termination will not cause loss of icons or local storage. rdar://problem/5951701 * loader/icon/IconDatabase.cpp: Marked various constants static to give them internal linkage. (WebCore::IconDatabase::IconDatabase): Added initial value for m_syncTimer. Removed unneeded initial value for m_defaultIconRecord. Changed assertion to work cross-platform. (WebCore::IconDatabase::wakeSyncThread): Added disableSuddenTermination, so we won't terminate until the sync thread has done its thing. (WebCore::IconDatabase::scheduleOrDeferSyncTimer): Added disableSuddenTermination, so we won't terminate if we have an outstanding sync timer. (WebCore::IconDatabase::syncTimerFired): Added enableSuddenTermination, to balance the one in scheduleOrDeferSyncTimer. (WebCore::IconDatabase::syncThreadMainLoop): Added enableSuddenTermination, to balance the one in wakeSyncThread. (WebCore::IconDatabase::deleteAllPreparedStatements): Use clear() instead of set(0). * loader/icon/IconDatabase.h: Use a Timer instead of an OwnPtr<Timer>. * storage/LocalStorageArea.cpp: (WebCore::LocalStorageArea::scheduleFinalSync): Added disableSuddenTermination. (WebCore::LocalStorageArea::scheduleItemForSync): Ditto. (WebCore::LocalStorageArea::scheduleClear): Ditto. (WebCore::LocalStorageArea::syncTimerFired): Added a disableSuddenTermination if we schedule a performSync callback for later and an unconditional enableSuddenTermination to balance the ones in the schedule calls above. (WebCore::LocalStorageArea::sync): Factored out the work of the sync function so it can continue to use early return idiom. (WebCore::LocalStorageArea::performSync): Added a call to enableSuddenTermination. * storage/LocalStorageArea.h: Added declaration of the sync function. 2009-04-19 David Kilzer <ddkilzer@apple.com> Make FEATURE_DEFINES completely dynamic Reviewed by Darin Adler. Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME variables for each feature, making it possible to remove all knowledge of FEATURE_DEFINES from build-webkit. * Configurations/FeatureDefines.xcconfig: Extract a variable from FEATURE_DEFINES for each feature setting. 2009-04-18 Geoffrey Garen <ggaren@apple.com> Reviewed by Alexey Proskuryakov. More fix for https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions Removed a little more complexity from event handler creation and destruction. Removed the jsProtectedEventListeners, jsProtectedInlineEventListeners, and jsInlineEventListeners maps, and all the code for managing them. ProtectedEventListeners don't exist anymore, so they're easy to nix. Inline EventListeners do still exist, but there's no reason to track them in a map. The map exists to enable 'removeEventListener' to associate a unique JSEventListener with a given JavaScript function. But the 'removeEventListener' API only works with non-inline event listeners! * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::findJSEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener): (WebCore::JSDOMGlobalObject::createJSInlineEventListener): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::clearJSFunctionInline): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::~JSLazyEventListener): (WebCore::JSLazyEventListener::parseCode): * bindings/scripts/CodeGeneratorJS.pm: 2009-04-18 Dan Bernstein <mitz@apple.com> - try to fix the Windows build * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::characterAfter): 2009-04-18 Dan Bernstein <mitz@apple.com> - revert the previous change, which was to a file that the Windows port does not even use * icu/unicode/utf16.h: 2009-04-18 Dan Bernstein <mitz@apple.com> Reviewed by Geoffrey Garen. - try to fix the Windows build * icu/unicode/utf16.h: 2009-04-18 Simon Fraser <simon.fraser@apple.com> Reviewed by Antti Koivisto. https://bugs.webkit.org/show_bug.cgi?id=25066 When a <video> element gained a RenderLayer via opacity, reflection etc., the layer hierarchy was not correctly updated because RenderMedia skipped a level when asked for its children; it skipped m_controlsShadowRoot's renderer, which actually has a layer. Test: fast/layers/video-layer.html * rendering/MediaControlElements.cpp: (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): Don't manually call setParent() on the renderer. It will happen later as a result of addChild(). * rendering/RenderMedia.cpp: (WebCore::RenderMedia::createControlsShadowRoot): Add m_controlsShadowRoot's renderer as a child. * rendering/RenderMedia.h: (WebCore::RenderMedia::children): Now maintain a RenderObjectChildList, m_children, and remove the unneeded removeChild() method. Make the two children() methods inline. * rendering/RenderObject.cpp: (WebCore::RenderObject::moveLayers): Assert if moveLayers() is called with an oldParent that is not the layer's actual parent (which would have revealed this bug). 2009-04-18 Geoffrey Garen <ggaren@apple.com> Reviewed by Cameron Zwarich. Fixed a layout test failure, caused by my last check-in (fast/dom/script-element-gc.html). * bindings/js/JSDOMBinding.cpp: (WebCore::isObservableThroughDOM): * html/HTMLScriptElement.h: (WebCore::HTMLScriptElement::haveFiredLoadEvent): Treat script elements just like image elements: if a script element is loading, mark its JS wrapper, even if the element is not in the document. 2009-04-18 Jian Li <jianli@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25170 Upstream V8WorkerCustom.cpp and V8WorkerContextCustom.cpp for V8 bindings. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::findOrCreateEventListener): * bindings/v8/WorkerContextExecutionProxy.h: * bindings/v8/custom/V8WorkerContextCustom.cpp: Added. * bindings/v8/custom/V8WorkerCustom.cpp: Added. 2009-04-18 Jian Li <jianli@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/post_bug.cg://bugs.webkit.org/show_bug.cgi?id=25167 Change createHiddenXHRDependency and removeHiddenXHRDependency so that they can be used by other custom code in V8 bindings. * bindings/v8/V8Utilities.cpp: Renamed from WebCore/bindings/v8/V8XMLHttpRequestUtilities.cpp. (WebCore::createHiddenDependency): (WebCore::removeHiddenDependency): * bindings/v8/V8Utilities.h: Renamed from WebCore/bindings/v8/V8XMLHttpRequestUtilities.h. * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::ACCESSOR_SETTER): (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: (WebCore::ACCESSOR_SETTER): (WebCore::CALLBACK_FUNC_DECL): 2009-04-18 Drew Wilson <amw@apple.com> <rdar://problem/6781407> VisiblePosition.characterAfter should return UChar32 Reviewed by Dan Bernstein. No test case since there is no change in behavior. * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::characterAfter): Now handles surrogate pairs correctly and returns a UChar32. * editing/VisiblePosition.h: (WebCore::VisiblePosition::characterBefore): Now returns a UChar32. * editing/visible_units.cpp: (WebCore::endOfFirstWordBoundaryContext): Renamed firstNonComplexContextLineBreak() to this. Changed it to use the generic requiresContextForWordBoundary() instead of hasLineBreakingPropertyComplexContext(). (WebCore::startOfLastWordBoundaryContext): Replaces lastNonComplexContextLineBreak(), but returns the offset of the character after the last character that does not require context for word breaking. Also changed to use requiresContextForWordBoundary(). (WebCore::previousBoundary): Updated for the above changes in names and semantics, and changed to use requiresContextForWordBoundary(). (WebCore::nextBoundary): Ditto. (WebCore::startWordBoundary): Ditto. (WebCore::endWordBoundary): Ditto. (WebCore::previousWordPositionBoundary): Ditto. (WebCore::nextWordPositionBoundary): Ditto. * platform/text/TextBoundaries.h: (WebCore::requiresContextForWordBoundary): Added. * platform/text/mac/TextBoundaries.mm: 2009-04-18 Geoffrey Garen <ggaren@apple.com> Reviewed by Cameron Zwarich. Fixed <rdar://problem/6797442> | https://bugs.webkit.org/show_bug.cgi?id=25285 REGRESSION (r42569): Profiles cannot be selected in inspector profiler EventListeners are shared; RegisteredEventListeners are not. Therefore, when a node wrapper needs to invalidate the node's JS event listeners, it should invalidate its RegisteredEventListeners, not its EventListeners. Otherwise, it might invalidate an EventListener shared by another node. * dom/RegisteredEventListener.h: (WebCore::invalidateEventListeners): ditto 2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com> Reviewed by Mark Rowe. <rdar://problem/6781295> video.buffered and video.seekable are not the same. video.buffered should return only what is buffered and not what is seekable * WebCore.base.exp: Added wkQTMovieMaxTimeSeekable. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::maxTimeSeekable): Return wkQTMovieMaxTimeSeekable. * platform/mac/WebCoreSystemInterface.h: Add wkQTMovieMaxTimeSeekable. * platform/mac/WebCoreSystemInterface.mm: Ditto. 2009-04-18 Pierre d'Herbemont <pdherbemont@apple.com> Reviewed by Adele Peterson. <rdar://problem/6747241> work around QTKit no longer reaching QTMovieLoadStateComplete * WebCore.base.exp: Export wkQTMovieMaxTimeLoadedChangeNotification. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::createQTMovie): observe QTMovieMaxTimeLoadedChangeNotification. (WebCore::MediaPlayerPrivate::updateStates): compare duuration() with maxTimeLoaded() instead of using QTMovieLoadStateComplete to determine if a movie are fully loaded. * platform/mac/WebCoreSystemInterface.h: Add wkQTMovieMaxTimeLoadedChangeNotification. * platform/mac/WebCoreSystemInterface.mm: Ditto. 2009-04-18 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com> Reviewed by George Staikos. Make WML work again, most regressions test were failing. * dom/Document.cpp: Be sure to create WML elements in WML namespace. Otherwhise hasTagName() comparisions fail. (WebCore::Document::createElement): * wml/WMLCardElement.cpp: Add ASSERT(hasTagName(cardTag)) to catch errors like this in future. (WebCore::WMLCardElement::WMLCardElement): * wml/WMLTagNames.in: Wrap comment in #if 0/#endif blocks, to silence the generation script. 2009-04-17 Justin Garcia <justin.garcia@apple.com> Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=25277 If there is no line wrapping, a caret can leave its containing block but it shouldn't leave its root line box Also added code to handle a caret wider than one pixel. Added fast/inline/25277.html and fast/inline/25277-2.html * rendering/RenderText.cpp: (WebCore::RenderText::localCaretRect): Distribute a caret's width to either side of the offset, so that a caret between two characters doesn't hang over one character more than the other. If there is no wrapping, the caret can leave its containing block, but not its root line box. 2009-04-17 Geoffrey Garen <ggaren@apple.com> Reviewed by Oliver Hunt. More fix for https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions Some refactoring of "inline" event listeners. Renames: dispatchEventForType => dispatchEvent setWindowInlineEventListenerForTypeAndAttribute => setWindowInlineEventListener removeInlineEventListenerForType => clearInlineEventListener setInlineEventListenerForType => setInlineEventListener inlineEventListenerForType => getInlineEventListener * bindings/js/JSLazyEventListener.cpp: (WebCore::eventParameterName): (WebCore::JSLazyEventListener::JSLazyEventListener): (WebCore::createInlineEventListener): * bindings/js/JSLazyEventListener.h: Added two helper functions for creating "inline" event listeners. These replace Document::createEventListener, and abstract the creation of JS event listeners for DOM attributes out of the DOM. Removed legacy JSProtectedEventListener constructor code for adding the event listener's function to a map, since lazy event listeners don't have functions at construction time. * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Document.h: (WebCore::Document::isSVGDocument): * dom/Element.cpp: (WebCore::Element::setWindowInlineEventListener): * dom/Element.h: Updated for renames. Nixed Document::createEventListener, mentioned above. Moved setWindowInlineEventListenerForTypeAndAttribute to Element, for simplicity. * dom/InputElement.cpp: (WebCore::InputElement::setValueFromRenderer): * dom/Node.cpp: (WebCore::Node::dispatchFocusEvent): (WebCore::Node::dispatchBlurEvent): (WebCore::Node::dispatchEvent): (WebCore::Node::clearInlineEventListener): (WebCore::Node::setInlineEventListener): (WebCore::Node::getInlineEventListener): (WebCore::Node::onabort): (WebCore::Node::setOnabort): (WebCore::Node::etc.): * dom/Node.h: Updated for renames. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): Updated for renames. Updated these files for renames, and to use the new createInlineEventListener helper function: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::parseMappedAttribute): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::onChange): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::prepareSubmit): (WebCore::HTMLFormElement::reset): (WebCore::HTMLFormElement::parseMappedAttribute): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseMappedAttribute): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::parseMappedAttribute): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::dispatchLoadEvent): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): (WebCore::HTMLInputElement::onSearch): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadInternal): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseMappedAttribute): (WebCore::HTMLScriptElement::dispatchLoadEvent): (WebCore::HTMLScriptElement::dispatchErrorEvent): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::parseMappedAttribute): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::notifyFinished): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::mouseButtonListener): * page/DOMWindow.cpp: * page/DOMWindow.h: (WebCore::DOMWindow::eventListeners): * page/EventHandler.cpp: (WebCore::EventHandler::canMouseDownStartSelect): (WebCore::EventHandler::canMouseDragExtendSelect): (WebCore::EventHandler::sendScrollEvent): * page/Page.cpp: (WebCore::networkStateChanged): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::valueChanged): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::selectionChanged): * svg/SVGElement.cpp: (WebCore::SVGElement::parseMappedAttribute): * svg/SVGElementInstance.cpp: * svg/SVGImageLoader.cpp: (WebCore::SVGImageLoader::dispatchLoadEvent): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseMappedAttribute): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::dispatchErrorEvent): * wml/WMLInputElement.cpp: (WebCore::WMLInputElement::defaultEventHandler): 2009-04-17 David Kilzer <ddkilzer@apple.com> Simplify FEATURE_DEFINES definition Reviewed by Darin Adler. This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME variables to their own FeatureDefines.xcconfig file. It also extracts a new ENABLE_GEOLOCATION variable so that FEATURE_DEFINES only needs to be defined once. * Configurations/FeatureDefines.xcconfig: Added. * Configurations/WebCore.xcconfig: Removed definition of ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES. Added include of FeatureDefines.xcconfig. * WebCore.xcodeproj/project.pbxproj: Added FeatureDefines.xcconfig file. * bindings/scripts/CodeGeneratorObjC.pm: When creating a list of command-line macro definitions, split on one-or-more spaces instead of a single space since the FEATURE_DEFINES macro may now contain more than one space between macros if some macros aren't defined. 2009-04-17 Brady Eidson <beidson@apple.com> Reviewed by Mark Rowe <rdar://problem/6786999> Tiger WebKit shouldn't try to POST on back/forward without nagging. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::willLoadFromCache): 2009-04-17 Darin Adler <darin@apple.com> Reviewed by Timothy Hatcher. Added sudden termination functions that can be called without involving the page or client. * GNUmakefile.am: Added SuddenTermination.h. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. Also added SuddenTermination.mm. * platform/SuddenTermination.h: Added. * platform/mac/SuddenTermination.mm: Added. 2009-04-17 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Move more code into RenderSVGModelObject needsLayer() already returns false from RenderSVGModelObject lineHeight and baselinePosition are from days of RenderPath having RenderBox parents. I also added comments to explain how focus rings work (now that I understand) I got rid of two more uses of m_absoluteBounds (nearly dead!) * rendering/RenderPath.cpp: * rendering/RenderPath.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::paint): (WebCore::RenderSVGContainer::addFocusRingRects): * rendering/RenderSVGContainer.h: * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::absoluteRects): (WebCore::RenderSVGModelObject::absoluteQuads): * rendering/RenderSVGModelObject.h: 2009-04-16 Peter Kasting <pkasting@google.com> Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=25238 Invalidate the hovered scrollbar part when resetting the pressed part, since once there is no pressed part we can draw a hovered state. * platform/Scrollbar.cpp: (WebCore::Scrollbar::setHoveredPart): (WebCore::Scrollbar::setPressedPart): 2009-04-16 Darin Fisher <darin@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25223 REGRESSION: Back button after form submission to the same URL fails to navigate. Test: http/tests/navigation/post-goback-same-url.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadItem): Check if the page we are leaving has FormData. 2009-04-17 Nikolas Zimmermann <nikolas.zimmerman@torchmobile.com> Not reviewed. Fix WML enabled builds. * rendering/RenderTableRow.cpp: Remove dead code, which is no longer necessary. (WebCore::RenderTableRow::addChild): * wml/WMLInputElement.cpp: Apply same fix HTMLInputElement received. Covert RenderObject's to RenderTextControl where needed. (WebCore::WMLInputElement::defaultEventHandler): 2009-04-17 Pierre d'Herbemont <pdherbemont@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=24849 Add support for the media element 'played' attribute. This involves support of "normalized TimeRanges" as described by the spec. Test: media/video-played.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Renamed m_currentTimeDuringSeek->m_lastSeekTime. Added m_playing and m_playedTimeRanges. (WebCore::HTMLMediaElement::loadInternal): Reset m_playing, m_lastSeekTime, and m_playedTimeRanges (WebCore::HTMLMediaElement::seek): Set current time to m_playedTimeRanges (WebCore::HTMLMediaElement::currentTime): m_currentTimeDuringSeek -> m_lastSeekTime (WebCore::HTMLMediaElement::played): Returns m_playedTimeRanges. (WebCore::HTMLMediaElement::updatePlayState): Add the new played time ranges when pausing. Set the m_playing flag. * html/HTMLMediaElement.h: * html/TimeRanges.cpp: (TimeRanges::add): Merge range(s) if overlap. * html/TimeRanges.h: Add various helpers (below). (WebCore::TimeRanges::Range::isPointInRange): Added. (WebCore::TimeRanges::Range::isOverlappingRange): Ditto. (WebCore::TimeRanges::Range::unionWithOverlappingRange): Ditto. (WebCore::TimeRanges::Range::isBeforeRange): Ditto. 2009-04-17 Darin Adler <darin@apple.com> Reviewed by Antti Koivisto. Bug 25210: don't use ObjC methods to wrap/unwrap DOM objects with ObjC https://bugs.webkit.org/show_bug.cgi?id=25210 * WebCore.base.exp: Export the core and kit function overloads that are used in WebKit. Also resorted this file. * WebCore.xcodeproj/project.pbxproj: Re-added DOMHTMLCanvasElement.h to fix a strange problem with the file type. * bindings/objc/DOM.mm: Removed the many extraneous includes. Added new includes so we can use and implement the new core and kit functions. Import DOMInternal.h first so it can do its public/private magic. (-[DOMNode _rootObject]): Changed to use early-return style. (kitClass): Added. Tells the wrapper generator what kind of node class to create to wrap DOM nodes. This has the code that used to be in the _wrapNode method. (kit): Added. Takes an EventTarget and makes the appropriate type of wrapper, dpending on whether it's a Node or an SVGElementInstance. This replace methods that used to be on both of those classes. (-[DOMNode boundingBox]): Changed to use early return, and the core function. (-[DOMNode lineBoxRects]): Ditto. (-[DOMNode renderedImage]): Ditto. (-[DOMRange boundingBox]): Ditto. (-[DOMRange lineBoxRects]): Ditto. (-[DOMElement image]): Ditto. (-[DOMElement _font]): Ditto. (-[DOMElement _imageTIFFRepresentation]): Ditto. (-[DOMElement _getURLAttribute:]): Ditto. (-[DOMElement isFocused]): Ditto. (kit): Hand-wrote the version of this for NodeFilter, since it's a protocol, not a class in the binding. (core): Ditto. (-[DOMNodeFilter acceptNode:]): Use core. * bindings/objc/DOMAbstractView.mm: (-[DOMAbstractView document]): Use kit. (-[DOMAbstractView _disconnectFrame]): Call removeDOMWrapper, which is no longer in the WebCore namespace, since it's headed for WebKit in the future. (core): Hand-wrote the version of this for DOMAbstractView.mm, since we store a pointer to the Frame, not the DMWindow. (kit): Ditto. * bindings/objc/DOMCSS.mm: (kitClass): Added. Tells the wrapper generator what kind of node class to create to wrap CSS objects. This has the code that used to be in the _wrapStyleSheet, _wrapCSSRule, and _wrapCSSValue methods. * bindings/objc/DOMEvents.mm: (kitClass): Added. Tells the wrapper generator what kind of node class to create to wrap event objects. This has the code that used to be in the _wrapEvent methods. * bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]): Use kit and core. (-[DOMHTMLDocument createDocumentFragmentWithText:]): Ditto. (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto. (-[DOMHTMLInputElement _rectOnScreen]): Ditto. (-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Ditto. (-[DOMHTMLInputElement _selectedRange]): Ditto. (-[DOMHTMLInputElement _setAutofilled:]): Ditto. (-[DOMHTMLSelectElement _activateItemAtIndex:]): Ditto. (-[DOMHTMLInputElement _isEdited]): Ditto. (-[DOMHTMLTextAreaElement _isEdited]): Ditto. (kitClass): Added. Gives HTMLOptionCollection objects an appropriate wrapper. * bindings/objc/DOMInternal.h: Removed most of the imports. There's no reason to have this header include all the other internal DOM headers. Removed unneeded interfaces, including the redeclaration of _init in DOMObject, since it's already inherited from WebScriptObject. Moved all the functions out of the WebCore namespace since this code is destined for WebKit, which doesn't use a namespace. Added kit and core functions for the two classes that live in this header. * bindings/objc/DOMInternal.mm: (-[WebScriptObject _initializeScriptDOMNodeImp]): Use core. * bindings/objc/DOMObject.h: Made the _internal field be private instead of protected. This also allows the "#define private public" trick to be used to make the field accessible inside the bindings code. * bindings/objc/DOMObject.mm: (-[DOMObject dealloc]): Updated for namespace change. (-[DOMObject sheet]): Use core and kit functions. * bindings/objc/DOMRGBColor.mm: (-[DOMRGBColor dealloc]): Updated for namespace change. (-[DOMRGBColor red]): Use kit function. (-[DOMRGBColor green]): Ditto. (-[DOMRGBColor blue]): Ditto. (-[DOMRGBColor alpha]): Ditto. (core): Added. Replaces the _RGBColor method. (kit): Added. Replaces the _wrapRGBColor method. * bindings/objc/DOMSVGPathSegInternal.mm: (kitClass): Added. Replaces the _wrapSVGPathSeg method. * bindings/objc/DOMUtility.mm: (JSC::createDOMWrapper): Use kit function. (createDOMWrapper): Ditto. * bindings/objc/DOMXPath.mm: (core): Added. Replaces the _xpathNSResolver method. (kit): Added. Replaces the _wrapXPathNSResolver method. * bindings/objc/ObjCEventListener.mm: (WebCore::ObjCEventListener::find): Changed to use early return. (WebCore::ObjCEventListener::handleEvent): Use kit function. * bindings/objc/ObjCNodeFilterCondition.mm: (WebCore::ObjCNodeFilterCondition::acceptNode): Use kit function. * bindings/objc/WebScriptObject.mm: (+[WebScriptObject scriptObjectForJSObject:originRootObject:rootObject:]): Updated for namespace change. * bindings/scripts/CodeGeneratorObjC.pm: Changed spelling of "license" to U.S. spelling. Removed GetObjCTypeMaker, GetObjCTypeGetterName, GetInternalTypeGetterSignature, and GetInternalTypeMakerSignature. Changed includes to conform to new scheme. Generate core and kit functions instead of methods and calls to those functions. Added a new attribute, Polymorphic, to indicate classes that have derived subclasses. Removed the old ObjCCustomInternalImpl attribute. * css/CSSRule.idl: Use Polymorphic attribute, so core and kit functions will be generated, with kit calling kitClass. This requires less hand- written code than the old ObjCCustomInternalImpl. * css/CSSValue.idl: Ditto. * css/StyleSheet.idl: Ditto. * dom/Event.idl: Ditto. * dom/Node.idl: Ditto. * html/HTMLCollection.idl: Ditto. * svg/SVGPathSeg.idl: Ditto. * editing/TextAffinity.h: Moved kit and core functions out of the WebCore namespace since this code is destined for WebKit, which doesn't use a namespace * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::declareAndWriteDragImage): Use kit function. * platform/mac/DragDataMac.mm: (WebCore::DragData::asFragment): Use core function. * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeSelection): Use kit function. * svg/SVGElementInstance.idl: Removed now-unneeded ObjCCustomInternalImpl function. This can be generated in a standard way now. * svg/SVGViewSpec.idl: Ditto. 2009-04-17 Brady Eidson <beidson@apple.com> Reviewed by Maciej Stachowiak <rdar://problem/5753299> "Private Browsing" doesn't affect HTML 5 Database storage If the Page is in private browsing mode when a statement is queued up, flag that statement as read-only. It would be better to set the read-only flag on the database thread when it actually executes, but that would either require making Settings access a lock-protected operation or involve a synchronous callback to the WebCore thread, neither of which seem worth it. If it becomes an issue in practice, we can revisit this later. Test: storage/private-browsing-readonly.html * storage/Database.cpp: (WebCore::Database::setAuthorizerReadOnly): * storage/Database.h: * storage/DatabaseAuthorizer.cpp: For all action types that would alter the database, deny when in read-only mode. (WebCore::DatabaseAuthorizer::reset): (WebCore::DatabaseAuthorizer::createTable): (WebCore::DatabaseAuthorizer::dropTable): (WebCore::DatabaseAuthorizer::allowAlterTable): (WebCore::DatabaseAuthorizer::createIndex): (WebCore::DatabaseAuthorizer::dropIndex): (WebCore::DatabaseAuthorizer::createTrigger): (WebCore::DatabaseAuthorizer::dropTrigger): (WebCore::DatabaseAuthorizer::createVTable): (WebCore::DatabaseAuthorizer::dropVTable): (WebCore::DatabaseAuthorizer::allowDelete): (WebCore::DatabaseAuthorizer::allowInsert): (WebCore::DatabaseAuthorizer::allowUpdate): (WebCore::DatabaseAuthorizer::setReadOnly): * storage/DatabaseAuthorizer.h: * storage/SQLStatement.cpp: (WebCore::SQLStatement::create): Add a m_readOnly flag. (WebCore::SQLStatement::SQLStatement): Ditto. (WebCore::SQLStatement::execute): If m_readOnly is set, tell the authorizer to change to read-only mode. * storage/SQLStatement.h: * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::executeSQL): Flag the statement as read-only if the Page is currently in private browsing mode. 2009-04-17 Eric Seidel <eric@webkit.org> Reviewed by Antti Koivisto. Move RenderPath and RenderSVGContainer onto a unified clippedOverflowRectForRepaint https://bugs.webkit.org/show_bug.cgi?id=25268 Lots of minus lines. Now we're sharing more sane code (which will respect -webkit-transforms! and scroll offsets correctly) Which means this fixes: https://bugs.webkit.org/show_bug.cgi?id=20769 and https://bugs.webkit.org/show_bug.cgi?id=21968 too! We're no longer expanding the paint rect "for anti-aliasing", since I can't find a case where that's required. If it is, repaintRectInLocalCoordinates() should be fixed to handle those cases instead of here. This fixes svg/custom/scroll-hit-test (now that we respect scroll offsets when repainting) as well as improves our focus ring drawing seen in svg/custom/focus-ring focus rings are now closer to transformed content by a couple pixels (they were needlessly outset by the antialiasing hack) Also, it fixes the dumped rects for markers, causing a progression in svg/custom/marker-overflow-clip * rendering/RenderPath.cpp: (WebCore::RenderPath::repaintRectInLocalCoordinates): (WebCore::RenderPath::setPath): * rendering/RenderPath.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates): * rendering/RenderSVGContainer.h: * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint): (WebCore::RenderSVGModelObject::computeRectForRepaint): * rendering/RenderSVGModelObject.h: * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computeRectForRepaint): * rendering/RenderSVGRoot.h: 2009-04-17 Chris Fleizach <cfleizach@apple.com> Reviewed by Darin Adler. Bug 25259: AX: VoiceOver cmd-cntl-space does not follow the google.com->more link https://bugs.webkit.org/show_bug.cgi?id=25259 When a node becomes visible or hidden, accessibility needs to be told to update. Test: accessibility/visible-elements.html * rendering/RenderObject.cpp: (WebCore::RenderObject::styleWillChange): 2009-04-17 Kevin Ollivier <kevino@theolliviers.com> wx build fix, added missing header. * platform/graphics/wx/TransformationMatrixWx.cpp: 2009-04-17 Simon Hausmann <simon.hausmann@nokia.com> Unreviewed build fix. Fix the build with enabled SVG filters * rendering/RenderSVGModelObject.cpp: Include SVGResourceFilter.h. 2009-04-16 Eric Roman <eroman@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25196 Add a missing V8DOMMap include. * bindings/v8/WorkerScriptController.cpp: Included V8DOMMap.h. 2009-04-16 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25260 Finish V8 custom bindings for InspectorController. * bindings/v8/custom/V8InspectorControllerCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): Added. 2009-04-16 Kevin Watters <kevinwatters@gmail.com> Reviewed by Kevin Ollivier. Switch to wxGraphicsBitmap when using wxGraphicsContext so that we're not doing unnecessary conversions internally when drawing bitmaps. https://bugs.webkit.org/show_bug.cgi?id=25248 * platform/graphics/ImageSource.h: * platform/graphics/wx/ImageSourceWx.cpp: (WebCore::ImageSource::createFrameAtIndex): * platform/graphics/wx/ImageWx.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImage::drawPattern): 2009-04-16 Justin Garcia <justin.garcia@apple.com> Reviewed by Dan Bernstein. Performing a block style change in an editable root that contains only a br adds a newline https://bugs.webkit.org/show_bug.cgi?id=25256 * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Fix a bad check for an root block that didn't handle a root that contained a placeholder. 2009-04-16 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Fix computeContainerBoundingBox to respect viewport translations https://bugs.webkit.org/show_bug.cgi?id=25254 Previously computeContainerBoundingBox was just adding the viewportTranslation. Which, although it has a confusing name, only contains the scale and translation for the viewBox/preserveAspectRatio adjustment. It does not contain the translation for the x/y offset of the viewport. localToParentTransform() does contain this offset, so we use that instead of the previous hacky code. * rendering/RenderSVGContainer.h: * rendering/RenderSVGViewportContainer.h: * rendering/SVGRenderSupport.cpp: (WebCore::computeContainerBoundingBox): 2009-04-16 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Add a localToParentTransform() method which includes the full transform between local and parent local coordinates. https://bugs.webkit.org/show_bug.cgi?id=25226 Moved m_localTransform up into RenderSVGTransformableContainer and added a comment to RenderSVGViewportContainer to make it more clear that it does not have a localTransform(). This patch reveals two more failed design decisions: 1. Use of RenderBox::absoluteTransform() to mean "absoluteTransform() including only my localTransform()" callers are probably using it incorrectly anyway and are just masking bugs in the confused code. 2. computeContainerBoundingBox does not include viewport translations in its computed bounding box, so bounding boxes will be off for parents of inner <svg> elements. I'll fix this an updated the results in a separate change. No functional changes, thus no tests. * rendering/RenderObject.cpp: (WebCore::RenderObject::localToParentTransform): (WebCore::RenderObject::absoluteTransform): * rendering/RenderObject.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): * rendering/RenderSVGContainer.h: (WebCore::RenderSVGContainer::viewportTransform): * rendering/RenderSVGHiddenContainer.cpp: * rendering/RenderSVGHiddenContainer.h: (WebCore::RenderSVGHiddenContainer::absoluteTransform): * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::localToParentTransform): (WebCore::RenderSVGRoot::absoluteTransform): * rendering/RenderSVGRoot.h: * rendering/RenderSVGTransformableContainer.cpp: (WebCore::RenderSVGTransformableContainer::localToParentTransform): (WebCore::RenderSVGTransformableContainer::localTransform): * rendering/RenderSVGTransformableContainer.h: * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::localToParentTransform): (WebCore::RenderSVGViewportContainer::absoluteTransform): * rendering/RenderSVGViewportContainer.h: * rendering/SVGRenderSupport.cpp: (WebCore::computeContainerBoundingBox): 2009-04-16 Adam Langley <agl@google.com> Reviewed by Darin Fisher. Fix Chromium's rendering of <option> elements inside of <optgroups>. https://bugs.webkit.org/show_bug.cgi?id=25244 Test (will included as a manual test by https://bugs.webkit.org/show_bug.cgi?id=24900): <select> <optgroup label="Should be bold"> <option>Should not be bold</option> </optgroup> </select> * css/themeWin.css: adding comments * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::getRowFont): use menuStyle() rather than the item's style 2009-04-16 Eric Roman <eroman@chromium.org> Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=25218 Make DOMWindow::inlineEventListenerForType not have the "inline" keyword. As this method gets used outside of DOMWindow. * page/DOMWindow.cpp: (WebCore::DOMWindow::inlineEventListenerForType): 2009-04-16 Greg Bolsinga <bolsinga@apple.com> Reviewed by Antti Koivisto. Fix <rdar://problem/6766969> When deferred repaints are enabled and being reset and there is a active timer, stop the timer and do the deferred repaints immediately. * page/FrameView.cpp: (WebCore::FrameView::resetDeferredRepaintDelay): 2009-04-16 Xan Lopez <xlopez@igalia.com> Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=25241 Remove superfluous NotImplemented.h includes. * html/CanvasRenderingContext2D.cpp: * html/CanvasStyle.cpp: * page/AccessibilityRenderObject.cpp: * platform/chromium/ScrollbarThemeChromiumLinux.cpp: * platform/graphics/GraphicsContext.cpp: * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/cairo/PathCairo.cpp: * platform/graphics/chromium/SimpleFontDataLinux.cpp: * platform/graphics/gtk/FontGtk.cpp: * platform/graphics/gtk/IconGtk.cpp: * platform/graphics/qt/IconQt.cpp: * platform/graphics/qt/ImageQt.cpp: * platform/graphics/qt/ImageSourceQt.cpp: * platform/graphics/skia/ImageBufferSkia.cpp: * platform/graphics/skia/ImageSkia.cpp: * platform/graphics/win/ColorSafari.cpp: * platform/graphics/win/FontWin.cpp: * platform/graphics/win/GraphicsContextCGWin.cpp: * platform/graphics/win/GraphicsContextCairoWin.cpp: * platform/graphics/win/SimpleFontDataCairoWin.cpp: * platform/graphics/wx/ImageWx.cpp: * platform/graphics/wx/TransformationMatrixWx.cpp: * platform/gtk/PlatformScreenGtk.cpp: * platform/gtk/PopupMenuGtk.cpp: * platform/gtk/ScrollViewGtk.cpp: * platform/gtk/ScrollbarGtk.cpp: * platform/network/cf/ResourceHandleCFNet.cpp: * platform/posix/FileSystemPOSIX.cpp: * platform/qt/DragDataQt.cpp: * platform/qt/FileSystemQt.cpp: * platform/qt/Localizations.cpp: * platform/qt/PopupMenuQt.cpp: * platform/win/EditorWin.cpp: * platform/win/PasteboardWin.cpp: * platform/wx/KeyboardEventWx.cpp: * platform/wx/PopupMenuWx.cpp: * platform/wx/SharedTimerWx.cpp: * plugins/gtk/PluginViewGtk.cpp: * plugins/mac/PluginPackageMac.cpp: * plugins/qt/PluginPackageQt.cpp: * plugins/win/PluginViewWin.cpp: * rendering/RenderThemeChromiumLinux.cpp: * svg/graphics/SVGImage.cpp: 2009-04-16 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. More fix for https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions Some cleanup in event handling code. * bindings/js/JSDOMGlobalObject.cpp: * bindings/js/JSDOMGlobalObject.h: Removed findJSProtectedEventListener and findJSProtectedEventListener because they are now unused. * bindings/js/JSEventListener.cpp: * bindings/js/JSEventListener.h: (WebCore::JSEventListener::clearGlobalObject): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::JSLazyEventListener): (WebCore::JSLazyEventListener::~JSLazyEventListener): (WebCore::JSLazyEventListener::globalObject): * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::clearGlobalObject): Nixed JSProtectedEventListener, and merged it with JSLazyEventListener, the only remaining event listener that still GC-protects its function and global object. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::ScriptController): * bindings/js/ScriptController.h: (WebCore::ScriptController::setEventHandlerLineNumber): (WebCore::ScriptController::eventHandlerLineNumber): Renamed handlerLineno => handlerLineNumber, because anything less would be uncivilized. Removed createInlineEventListener because it mostly did irrelevent work, so it just got in the way of understanding how event handler creation works. * dom/Document.cpp: (WebCore::Document::createEventListener): * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::startElementNs): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::processToken): Ditto. 2009-04-16 Beth Dakin <bdakin@apple.com> Reviewed by Dave Hyatt. Fix for https://bugs.webkit.org/show_bug.cgi?id=20765 Website crashes on load due to messy HTML in search form -and corresponding- <rdar://problem/6210633> Before this patch, <form>s were allowed to sit inside tables without being wrapped by anonymous table parts. There was also a concept that such a form could be "demoted" and would not be allowed to have any children. This patch has the HTML parser mark form elements that have been demoted as such, and then the demoted forms are not given renderers. I also removed the code that allowed forms to sit in tables without anonymous table sections. So now any forms that do manage to get a renderer inside a table will also be wrapped with appropriate table parts. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::HTMLFormElement): (WebCore::HTMLFormElement::rendererIsNeeded): * html/HTMLFormElement.h: (WebCore::HTMLFormElement::setDemoted): (WebCore::HTMLFormElement::isDemoted): * html/HTMLParser.cpp: (WebCore::HTMLParser::insertNode): * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::addChild): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild): 2009-04-16 Xiaomei Ji <xji@chromium.org> Reviewed by Simon Fraser. Fix https://bugs.webkit.org/show_bug.cgi?id=24527 caret does not paint the first time you focus on a 0px right padding RTL div Test: fast/forms/caret-rtl.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): When calculating x-axis if alignment is alignRight, we need to subtract the caretWidth so that the caret at IntRect(x, y, caretWidth, height) is inside the block. 2009-04-16 Justin Garcia <justin.garcia@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25228 SelectionController::absoluteCaretBounds returns an inflated caret (the caret repaint rect) Return the bounds of the transformed caret, not the transformed repaint rect for the caret (which is inflated). * editing/SelectionController.cpp: (WebCore::SelectionController::localCaretRect): (WebCore::SelectionController::absoluteBoundsForLocalRect): (WebCore::SelectionController::caretRepaintRect): (WebCore::SelectionController::recomputeCaretRect): * editing/SelectionController.h: 2009-04-16 Pierre d'Herbemont <pdherbemont@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25187 Bug 25187: <video> may not be rendered upon certain racy conditions Always create the video renderer when the load state reaches QTMovieLoadStateLoaded and the element is visible, not just when the movie has just been opened. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::updateStates): Make sure we do not make false assumption on the state changes order. Create the renderer if none is present, when movie is loaded instead. 2009-04-16 Eric Seidel <eric@webkit.org> Reviewed by Geoffrey Garen. Add filterBoundingBox() to RenderSVGModelObject to share a tiny bit of code RenderSVGModelObject has much more interesting code it can share, but I'm just trying to get the commits out of my local branch and into the repository in any order I can. :) This one was small. This will be used by the unified RenderSVGModelObject clippedOverflowRectForRepaint patch coming soon. * rendering/RenderPath.cpp: (WebCore::RenderPath::clippedOverflowRectForRepaint): * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::clippedOverflowRectForRepaint): * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::filterBoundingBox): * rendering/RenderSVGModelObject.h: 2009-04-16 Geoffrey Garen <ggaren@apple.com> Reviewed by Eric Seidel and Adam Roben. More fix for https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions Simplified some EventHandler creation code. Removed a pile of code whose sole purpose was to allow SVG event handlers to supply a parameter named "evt" instead of the normal "event", and replaced it with a single parameter to JSLazyEventListener's constructor specifying the parameter name to use. * bindings/js/JSDOMWindowBase.h: * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::JSLazyEventListener): (WebCore::JSLazyEventListener::parseCode): * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::createInlineEventListener): * bindings/js/ScriptController.h: * dom/Document.cpp: (WebCore::Document::createEventListener): 2009-04-15 Eric Seidel <eric@webkit.org> Reviewed by David Hyatt. Split out objectBoundingBox and repaintRectInLocalCoordinates from relativeBBox in preparation for simplifying (and fixing) repaint logic in the SVG rendering tree. https://bugs.webkit.org/show_bug.cgi?id=25224 objectBoundingBox() matches the SVG 1.1 concept of a "bounding box" repaintRectInLocalCoordinates() should return the a rect covering all painted content. However, repaintRectInLocalCoordinates() still only returns the "stroke bounding box" in this patch. In a future patch, repaintRectInLocalCoordinates will be fixed to return a rect covering all painted content. In order to avoid changing several hundred layout test results, I've left the behavior as-is for now. The returned rect is used by various repaintRectInLocalCoordinates implementations and sometimes adjusted to include all painted content, but not always, and the places where the adjustments are made are sometimes wrong. Again, will be fixed in an upcoming patch. This patch discovered a bug in Font::drawTextUsingSVGFont, which is probably causing bounding-box relative gradients on SVGFont glyphs to not paint correctly. I chose not to try and fix the bug in this patch and instead left a FIXME. This patch also discovered that at least tspan.getBBox() is broken. This along with the foreignObject.getBBox() change will be tested (and fixed) in a later patch. https://bugs.webkit.org/show_bug.cgi?id=25225 No change in behavior (besides the above mentioned foreignObject.getBBox()), thus no tests. * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::objectBoundingBox): this is a behavior improvement for getBBox() test case coming in a later patch (WebCore::RenderForeignObject::repaintRectInLocalCoordinates): only really used for layout test results, might some day be used for repaint. * rendering/RenderForeignObject.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::objectBoundingBox): new methods, ASSERT if used but not implemented. (WebCore::RenderObject::repaintRectInLocalCoordinates): * rendering/RenderObject.h: * rendering/RenderPath.cpp: (WebCore::RenderPath::objectBoundingBox): (WebCore::RenderPath::repaintRectInLocalCoordinates): (WebCore::RenderPath::clippedOverflowRectForRepaint): (WebCore::RenderPath::lineHeight): (WebCore::RenderPath::baselinePosition): (WebCore::RenderPath::paint): (WebCore::RenderPath::addFocusRingRects): * rendering/RenderPath.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::paint): (WebCore::RenderSVGContainer::objectBoundingBox): (WebCore::RenderSVGContainer::repaintRectInLocalCoordinates): * rendering/RenderSVGContainer.h: * rendering/RenderSVGGradientStop.h: (WebCore::RenderSVGGradientStop::objectBoundingBox): (WebCore::RenderSVGGradientStop::repaintRectInLocalCoordinates): * rendering/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::objectBoundingBox): (WebCore::RenderSVGHiddenContainer::repaintRectInLocalCoordinates): * rendering/RenderSVGHiddenContainer.h: * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::objectBoundingBox): (WebCore::RenderSVGImage::repaintRectInLocalCoordinates): (WebCore::RenderSVGImage::calculateAbsoluteBounds): (WebCore::RenderSVGImage::addFocusRingRects): * rendering/RenderSVGImage.h: * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paint): (WebCore::RenderSVGRoot::objectBoundingBox): (WebCore::RenderSVGRoot::repaintRectInLocalCoordinates): * rendering/RenderSVGRoot.h: * rendering/RenderSVGTSpan.h: (WebCore::RenderSVGTSpan::objectBoundingBox): (WebCore::RenderSVGTSpan::repaintRectInLocalCoordinates): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::clippedOverflowRectForRepaint): (WebCore::RenderSVGText::absoluteRects): (WebCore::RenderSVGText::absoluteQuads): (WebCore::RenderSVGText::objectBoundingBox): (WebCore::RenderSVGText::repaintRectInLocalCoordinates): * rendering/RenderSVGText.h: * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::viewportTransform): * rendering/SVGRenderSupport.cpp: (WebCore::computeContainerBoundingBox): * rendering/SVGRenderSupport.h: * rendering/SVGRenderTreeAsText.cpp: (WebCore::operator<<): * svg/SVGFont.cpp: (WebCore::Font::drawTextUsingSVGFont): * svg/SVGLocatable.cpp: (WebCore::SVGLocatable::getBBox): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::buildPattern): * svg/graphics/SVGPaintServerGradient.cpp: (WebCore::createMaskAndSwapContextForTextGradient): (WebCore::clipToTextMask): (WebCore::SVGPaintServerGradient::setup): * svg/graphics/SVGPaintServerPattern.cpp: (WebCore::SVGPaintServerPattern::setup): 2009-04-16 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. - fix <rdar://problem/6032139> Table cell widths calculated incorrectly on table that uses table-layout:fixed, colspans, and a mix of percentage and pixel widths Test: fast/table/fixed-granular-cols.html The incorrect widths resulted from incorrect handling of the case where the <col> elements are more granular than the table cells. * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): When processing <col> elements, append effective columns or split existing effective columns as needed. 2009-04-16 Alexey Proskuryakov <ap@webkit.org> <rdar://problem/6795285> Infinite recursion in ResourceHandle::receivedRequestToContinueWithoutCredential Rolled out <http://trac.webkit.org/projects/webkit/changeset/42536> - the two instances of authentication challenge are different, after all. Added a FIXME comment about a possible future improvement. * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::clearAuthentication): * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): (WebCore::ResourceHandle::receivedCredential): (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): (WebCore::ResourceHandle::receivedCancellation): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): (WebCore::ResourceHandle::didCancelAuthenticationChallenge): (WebCore::ResourceHandle::receivedCredential): (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): (WebCore::ResourceHandle::receivedCancellation): 2009-04-15 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. More fix for https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions Also fixed <rdar://problem/6792909> WebInspector crashes when reloading a page with breakpoints set * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::clearJSFunctionInline): (WebCore::JSEventListener::markJSFunction): * bindings/js/JSEventListener.h: Actually clear our function and global object pointers when our client instructs us to. (Oops!) Also, mark our global object while we still intend to use it. * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::mark): (WebCore::toJS): * bindings/scripts/CodeGeneratorJS.pm: * svg/SVGElementInstance.idl: For every SVGElementInstance wrapper, ensure that the corresponding element also has a wrapper, to keep its event listeners alive. 2009-04-15 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25201 Add ScriptFunctionCall/ScriptObject for V8. * bindings/v8/ScriptFunctionCall.cpp: Added. * bindings/v8/ScriptFunctionCall.h: Added. * bindings/v8/ScriptObject.cpp: Added. * bindings/v8/ScriptObject.h: Added. * bindings/v8/ScriptObjectQuarantine.cpp: Added. * bindings/v8/ScriptObjectQuarantine.h: Added. * bindings/v8/ScriptScope.cpp: Added. * bindings/v8/ScriptScope.h: Added. * bindings/v8/ScriptState.h: (WebCore::ScriptState::ScriptState): Added new constructors. (WebCore::ScriptState::frame): Added Frame ptr accessor. * bindings/v8/ScriptString.h: (WebCore::ScriptString::ScriptString): Added default constructor. * bindings/v8/ScriptValue.h: (WebCore::ScriptValue::isEqual): Added. 2009-04-15 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Unreviewed build fix. Add RenderSVGModelObject.* to GTK+'s build. * GNUmakefile.am: 2009-04-15 Steve Falkenburg <sfalken@apple.com> <rdar://problem/6785760> WebCore should use a maximum of 6 connections per host, not 4 Reviewed by Adam Roben. * platform/network/ResourceRequestBase.cpp: * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::initializeMaximumHTTPConnectionCountPerHost): 2009-04-15 Sam Weinig <sam@webkit.org> Reviewed by Mark Rowe. Add special casing to bindings generator so that custom functions starting with xml or xslt conform to WebKit style guidelines. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::xmlHttpRequest): (WebCore::JSDOMWindow::xsltProcessor): * bindings/scripts/CodeGenerator.pm: 2009-04-15 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Add minimal RenderSVGModelObject and make RenderPath and RenderSVGContainer use it. https://bugs.webkit.org/show_bug.cgi?id=25221 RenderSVGModelObject is the base rendering class for things which live in the SVG rendering tree. Not all SVG renders are RenderSVGModelObjects yet. More patches coming. This is just adding the class, future patches will pull more logic out of RenderPath and RenderSVGContainer into RenderSVGModelObject. * WebCore.pro: * WebCore.scons: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * rendering/RenderPath.cpp: (WebCore::RenderPath::RenderPath): * rendering/RenderPath.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::RenderSVGContainer): * rendering/RenderSVGContainer.h: * rendering/RenderSVGModelObject.cpp: Added. (WebCore::RenderSVGModelObject::RenderSVGModelObject): * rendering/RenderSVGModelObject.h: Added. (WebCore::RenderSVGModelObject::requiresLayer): * rendering/RenderTreeAsText.cpp: * rendering/SVGRenderTreeAsText.cpp: 2009-04-15 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Remove more dead code from RenderSVGHiddenContainer. lineHeight and baselinePosition used to be on RenderSVGContainer (of which this is a subclass) because RenderSVGContainer used to be a RenderBox and always the renderer for <svg> Now <svg> uses RenderSVGRoot when needing a RenderBox (inside HTML) and RenderSVGViewportContainer (when inside SVG content) so there is no need for RenderSVGHiddenContainer to have these HTML-specific methods. * rendering/RenderSVGHiddenContainer.cpp: * rendering/RenderSVGHiddenContainer.h: 2009-04-15 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Remove unneeded (broken) code from SVG renderers https://bugs.webkit.org/show_bug.cgi?id=25214 Mostly due to my historical confusions about the render tree and some methods not being removed after classes were split. RenderSVGRoot is an RenderBox and should just use all the standard RenderBox methods for inspector and repaint rects. RenderSVGContainer is *not* a RenderBox (any more) and thus doesn't need lineHeight or width/height or calcBounds. RenderSVGViewportContainer had some broken code which tried to see if the click was inside the container at all, but it was using width/height metrics based off of the containing block (from calcWidth) which is wrong (since its real width/height are from its containing viewport not containing block). * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::RenderSVGContainer): (WebCore::RenderSVGContainer::layout): * rendering/RenderSVGContainer.h: * rendering/RenderSVGRoot.cpp: * rendering/RenderSVGRoot.h: * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::layout): (WebCore::RenderSVGViewportContainer::nodeAtPoint): 2009-04-15 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser and Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=25217 Simplify nearestViewportElement and farthestViewportElement using isViewportElement and a for loop Add ASSERT(element) to all these functions since they should never be passed a null element. * svg/SVGLocatable.cpp: (WebCore::isViewportElement): (WebCore::SVGLocatable::nearestViewportElement): (WebCore::SVGLocatable::farthestViewportElement): (WebCore::SVGLocatable::getBBox): (WebCore::SVGLocatable::getCTM): (WebCore::SVGLocatable::getScreenCTM): 2009-04-15 Sam Weinig <sam@webkit.org> Reviewed by Anders Carlsson. Remove support for the ObjCIvar extended attribute from the Objective-C bindings generator. It is not used anymore. * bindings/scripts/CodeGeneratorObjC.pm: 2009-04-15 Justin Garcia <justin.garcia@apple.com> Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=25204 Create a fast path for ReplaceSelectionCommand that merges text nodes During simple pastes, where we're just pasting a text node into a run of text, we would split the current text and insert the new node in between. This is slow and we hit this bug: https://bugs.webkit.org/show_bug.cgi?id=6148 in the layout and rendering code where adjacent text nodes don't shape correctly in Arabic. This change creates a fast path for ReplaceSelectionCommand that inserts text directly into the text node that holds the selection (very similar to the fast path we wrote for InsertTextCommand). * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): (WebCore::ReplaceSelectionCommand::performTrivialReplace): * editing/ReplaceSelectionCommand.h: * editing/TextIterator.cpp: 2009-04-15 Adam Langley <agl@google.com> Reviewed by Darin Fisher. Move VDMX parsing into the Chromium Linux port. https://bugs.webkit.org/show_bug.cgi?id=25116 VDMX tables are optional tables in TrueType fonts which contain the exact pixel height of a given font at a given pel size. In order to match Windows font metrics we have to use these numbers. Previously, the parsing was performed in Skia. As part of the merge with upstream Skia, an interface for getting table data from a font has been added to Skia and we're moving the parsing into WebKit. This does not change any layout tests. * platform/graphics/chromium/FontPlatformDataLinux.cpp: (WebCore::FontPlatformData::uniqueID): * platform/graphics/chromium/FontPlatformDataLinux.h: * platform/graphics/chromium/FontTrueTypeLinux.cpp: Added. * platform/graphics/chromium/FontTrueTypeLinux.h: Added. * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformWidthForGlyph): 2009-04-15 Stephen White <senorblanco@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25180 Restore stroked outlines to PlatformContextSkia::drawRect(). These were removed inadvertently in r41805, aka https://bugs.webkit.org/show_bug.cgi?id=24662. SkRect is { left, top, right, bottom }, not { left, top, width, height }. * platform/graphics/skia/PlatformContextSkia.cpp: (PlatformContextSkia::drawRect): 2009-04-15 Dan Bernstein <mitz@apple.com> Reviewed by Dave Hyatt. - fix <rdar://problem/6777374> Generated content with display: run-in causes a crash Test: fast/runin/generated.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::handleRunInChild): Check if the run-in block is generated, and if so, make the RenderInline anonymous instead of passing a 0 node to the RenderInline constructor. If the run-in itself is generated, do move :before and :after children from the block into the inline, as they will not be regenerated. Changed nested ifs into early returns. 2009-04-15 Eric Roman <eroman@chromium.org> Reviewed by Geoffrey Garen. https://bugs.webkit.org/show_bug.cgi?id=25192 Expose DOMWindow::removeInlineEventListenerForType and DOMWindow::inlineEventListenerForType as public. * page/DOMWindow.h: 2009-04-14 Eric Roman <eroman@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25198 Wrap RegisteredEventListener's markEventListeners and invalidateEventListeners in a USE(JSC), since it doesn't compile with V8 bindings. * dom/RegisteredEventListener.h: 2009-04-15 Eric Roman <eroman@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25194 Fix a caller of Settings::javaScriptCanOpenWindowsAutomatically() to use the new name. * bindings/v8/custom/V8DOMWindowCustom.cpp: 2009-04-14 Alexey Proskuryakov <ap@webkit.org> Rubber-stamped by Darin Adler. Don't keep platform objects for authentication challenge in ResourceHandleInternal. We already have a copy in AuthenticationChallenge object. * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::clearAuthentication): * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): (WebCore::ResourceHandle::receivedCredential): (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): (WebCore::ResourceHandle::receivedCancellation): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): (WebCore::ResourceHandle::didCancelAuthenticationChallenge): (WebCore::ResourceHandle::receivedCredential): (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): (WebCore::ResourceHandle::receivedCancellation): 2009-04-14 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. Nixed some now-defunct autogeneration code. * bindings/scripts/CodeGeneratorJS.pm: 2009-04-14 Eric Carlson <eric.carlson@apple.com> Reviewed by Alexey Proskuryakov. Fix <rdar://problem/6755724> <audio> and <video> elements can reference local file:/// URLs from remote in Safari Tests: http/tests/security/local-video-poster-from-remote.html http/tests/security/local-video-source-from-remote.html http/tests/security/local-video-src-from-remote.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): Don't pass url to media engine unless loader->canLoad() says it is OK. 2009-04-14 Sam Weinig <sam@webkit.org> Reviewed by Darin Adler. Part of <rdar://problem/6150868> Fix incorrect handling of content that needs to go into the head element once the head element has been removed. Test: fast/parser/head-content-after-head-removal.html * html/HTMLParser.cpp: (WebCore::HTMLParser::HTMLParser): Remove unneeded initializer of m_head. (WebCore::HTMLParser::handleError): Update since m_head is now a RefPtr. (WebCore::HTMLParser::createHead): Ditto. * html/HTMLParser.h: Make m_head a RefPtr. 2009-04-14 Geoffrey Garen <ggaren@apple.com> Used svn merge -r42529:42528 to roll out my last patch because it broke the build. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::findJSProtectedEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener): (WebCore::JSDOMGlobalObject::jsProtectedEventListeners): (WebCore::JSDOMGlobalObject::jsProtectedInlineEventListeners): * bindings/js/JSDOMGlobalObject.h: 2009-04-14 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. Nixed some now-dead code related to protected event listeners. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): * bindings/js/JSDOMGlobalObject.h: 2009-04-14 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. More fix for https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions Stop using protected event listeners on SVGElementInstance. * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::mark): Mark our event listeners, since they're not protected anymore. (WebCore::JSSVGElementInstance::addEventListener): (WebCore::JSSVGElementInstance::removeEventListener): Make unprotected event listeners, since we mark them now. * bindings/scripts/CodeGeneratorJS.pm: Autogenerate event listener invalidation for SVGElementInstance. * svg/SVGElementInstance.h: (WebCore::SVGElementInstance::eventListeners): Added an accessor, for the sake of autogenerated code. * svg/SVGElementInstance.idl: Removed the ProtectedEventListener attribute from event listener properties. Added a CustomMarkFunction attribute, since we need to mark our event listeners. 2009-04-14 Steve Falkenburg <sfalken@apple.com> Windows build fix. * WebCore.vcproj/WebCore.vcproj: 2009-04-14 Steve Falkenburg <sfalken@apple.com> Add header guards to WebCore forwarding headers. Speeds up WebCore debug build on Windows by 12% on my system, since Visual Studio appears to not optimize for standard header guards in included files. Rubber stamped by Ada Chan. * ForwardingHeaders/debugger/Debugger.h: * ForwardingHeaders/debugger/DebuggerActivation.h: * ForwardingHeaders/debugger/DebuggerCallFrame.h: * ForwardingHeaders/interpreter/CallFrame.h: * ForwardingHeaders/interpreter/Interpreter.h: * ForwardingHeaders/masm/X86Assembler.h: * ForwardingHeaders/parser/Parser.h: * ForwardingHeaders/parser/SourceCode.h: * ForwardingHeaders/parser/SourceProvider.h: * ForwardingHeaders/pcre/pcre.h: * ForwardingHeaders/profiler/Profile.h: * ForwardingHeaders/profiler/ProfileNode.h: * ForwardingHeaders/profiler/Profiler.h: * ForwardingHeaders/runtime/ArgList.h: * ForwardingHeaders/runtime/ArrayPrototype.h: * ForwardingHeaders/runtime/BooleanObject.h: * ForwardingHeaders/runtime/CallData.h: * ForwardingHeaders/runtime/Collector.h: * ForwardingHeaders/runtime/CollectorHeapIterator.h: * ForwardingHeaders/runtime/Completion.h: * ForwardingHeaders/runtime/ConstructData.h: * ForwardingHeaders/runtime/DateInstance.h: * ForwardingHeaders/runtime/Error.h: * ForwardingHeaders/runtime/FunctionConstructor.h: * ForwardingHeaders/runtime/FunctionPrototype.h: * ForwardingHeaders/runtime/Identifier.h: * ForwardingHeaders/runtime/InitializeThreading.h: * ForwardingHeaders/runtime/InternalFunction.h: * ForwardingHeaders/runtime/JSArray.h: * ForwardingHeaders/runtime/JSByteArray.h: * ForwardingHeaders/runtime/JSFunction.h: * ForwardingHeaders/runtime/JSGlobalData.h: * ForwardingHeaders/runtime/JSGlobalObject.h: * ForwardingHeaders/runtime/JSLock.h: * ForwardingHeaders/runtime/JSNumberCell.h: * ForwardingHeaders/runtime/JSObject.h: * ForwardingHeaders/runtime/JSString.h: * ForwardingHeaders/runtime/JSValue.h: * ForwardingHeaders/runtime/Lookup.h: * ForwardingHeaders/runtime/ObjectPrototype.h: * ForwardingHeaders/runtime/Operations.h: * ForwardingHeaders/runtime/PropertyMap.h: * ForwardingHeaders/runtime/PropertyNameArray.h: * ForwardingHeaders/runtime/Protect.h: * ForwardingHeaders/runtime/PrototypeFunction.h: * ForwardingHeaders/runtime/StringObject.h: * ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h: * ForwardingHeaders/runtime/StringPrototype.h: * ForwardingHeaders/runtime/Structure.h: * ForwardingHeaders/runtime/SymbolTable.h: * ForwardingHeaders/runtime/UString.h: * ForwardingHeaders/wrec/WREC.h: * ForwardingHeaders/wtf/ASCIICType.h: * ForwardingHeaders/wtf/AlwaysInline.h: * ForwardingHeaders/wtf/Assertions.h: * ForwardingHeaders/wtf/ByteArray.h: * ForwardingHeaders/wtf/CurrentTime.h: * ForwardingHeaders/wtf/Deque.h: * ForwardingHeaders/wtf/DisallowCType.h: * ForwardingHeaders/wtf/FastMalloc.h: * ForwardingHeaders/wtf/Forward.h: * ForwardingHeaders/wtf/GetPtr.h: * ForwardingHeaders/wtf/HashCountedSet.h: * ForwardingHeaders/wtf/HashFunctions.h: * ForwardingHeaders/wtf/HashMap.h: * ForwardingHeaders/wtf/HashSet.h: * ForwardingHeaders/wtf/HashTable.h: * ForwardingHeaders/wtf/HashTraits.h: * ForwardingHeaders/wtf/ListHashSet.h: * ForwardingHeaders/wtf/ListRefPtr.h: * ForwardingHeaders/wtf/Locker.h: * ForwardingHeaders/wtf/MainThread.h: * ForwardingHeaders/wtf/MathExtras.h: * ForwardingHeaders/wtf/MessageQueue.h: * ForwardingHeaders/wtf/Noncopyable.h: * ForwardingHeaders/wtf/NotFound.h: * ForwardingHeaders/wtf/OwnArrayPtr.h: * ForwardingHeaders/wtf/OwnPtr.h: * ForwardingHeaders/wtf/PassRefPtr.h: * ForwardingHeaders/wtf/Platform.h: * ForwardingHeaders/wtf/PtrAndFlags.h: * ForwardingHeaders/wtf/RandomNumber.h: * ForwardingHeaders/wtf/RefCounted.h: * ForwardingHeaders/wtf/RefCountedLeakCounter.h: * ForwardingHeaders/wtf/RefPtr.h: * ForwardingHeaders/wtf/RetainPtr.h: * ForwardingHeaders/wtf/StdLibExtras.h: * ForwardingHeaders/wtf/StringExtras.h: * ForwardingHeaders/wtf/ThreadSpecific.h: * ForwardingHeaders/wtf/Threading.h: * ForwardingHeaders/wtf/TypeTraits.h: * ForwardingHeaders/wtf/UnusedParam.h: * ForwardingHeaders/wtf/Vector.h: * ForwardingHeaders/wtf/VectorTraits.h: * ForwardingHeaders/wtf/dtoa.h: * ForwardingHeaders/wtf/unicode/Collator.h: * ForwardingHeaders/wtf/unicode/UTF8.h: * ForwardingHeaders/wtf/unicode/Unicode.h: * ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h: 2009-04-14 Sam Weinig <sam@webkit.org> Reviewed by Adele Peterson. Use a template function to generalize the way we create non-caching JS function getters. * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDOMWindowCustom.h: (WebCore::nonCachingStaticFunctionGetter): (WebCore::JSDOMWindow::customGetOwnPropertySlot): 2009-04-14 Benjamin C Meyer <benjamin.meyer@torchmobile.com> Reviewed by George Staikos. https://bugs.webkit.org/show_bug.cgi?id=25099 When creating a QNetworkRequest make sure to populate the CacheLoadControlAttribute with the value set by the ResourceRequest::cachePolicy() so that the cache will be used as WebKit expects. * WebKit/qt/tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::requestCache): * platform/network/qt/ResourceRequestQt.cpp: (WebCore::ResourceRequest::toNetworkRequest): 2009-04-14 Timothy Hatcher <timothy@apple.com> Fix a world leak caused by opening the Web Inspector. This was a regression caused by the InspectorController becoming refcounted. <rdar://problem/6782944> Reviewed by Darin Adler. * bindings/js/ScriptObject.cpp: (WebCore::ScriptGlobalObject::get): Renamed to better match the other functions. (WebCore::ScriptGlobalObject::remove): Added. Deletes the property. * bindings/js/ScriptObject.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::~InspectorController): Do less work at destruction time since the object lifetime is tied to JS GC. Assert that inspectedPageDestroyed cleared everything needed. (WebCore::InspectorController::inspectedPageDestroyed): Do most of the work that ~InspectorController was doing. (WebCore::InspectorController::scriptObjectReady): Renamed getObject. 2009-04-14 Antony Sargent <asargent@chromium.org> Reviewed by Dimitri Glazkov. This is some cleanup motivated by the crash in http://crbug.com/9775 , which happens because of calling window.open inside a window.onload handler. These changes are just part of the fix, along with some asserts to help prevent breakage on future changes. https://bugs.webkit.org/show_bug.cgi?id=25132 * bindings/v8/V8EventListenerList.cpp: (WebCore::V8EventListenerList::add): (WebCore::V8EventListenerList::remove): (WebCore::V8EventListenerList::clear): * bindings/v8/V8EventListenerList.h: (WebCore::V8EventListenerList::size): 2009-04-14 Evan Martin <evan@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25142 Fix a race that can occur between flex and the perl script that parses its output. * css/maketokenizer: Consume all input. 2009-04-14 Rohit Rao <rohitrao@google.com> Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=25184 Do not change the text color for selected text in Mac Chromium. * rendering/RenderThemeChromiumMac.h: (WebCore::RenderThemeChromiumMac::supportsSelectionForegroundColors): Now returns false, matching the behavior of Safari on Mac. 2009-04-14 Justin Garcia <justin.garcia@apple.com> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25172 Extra partial layout during the first keypress in an empty block Determining if a placeholder needs to be removed requires the creation of a VisiblePosition which was triggering layout before we were finished modifying the DOM for the insert operation. Find out if we need to remove a placeholder near the start of the operation, and if we do remember where it's located. Then, later, remove it along with all of the other DOM operations we perform. Renamed lineBreakExistsAtPosition to lineBreakExistsAtVisiblePosition and added a lineBreakExistsAtPosition that takes in a Position. In InsertTextCommand, we can use the latter, since we normalize manually. removePlaceholderAt now takes in a Position that it assumes has already been checked for a placeholder. No test added as this only effects performance. * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::removePlaceholderAt): (WebCore::CompositeEditCommand::moveParagraphs): (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary): * editing/CompositeEditCommand.h: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): (WebCore::DeleteSelectionCommand::doApply): * editing/FormatBlockCommand.cpp: (WebCore::FormatBlockCommand::doApply): * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): * editing/htmlediting.cpp: (WebCore::lineBreakExistsAtVisiblePosition): (WebCore::lineBreakExistsAtPosition): * editing/htmlediting.h: 2009-04-14 Adam Roben <aroben@apple.com> Remove support for profile-guided optimization on Windows Rubber-stamped by Steve Falkenburg. * WebCore.vcproj/WebCore.vcproj: Removed the Release_PGO configuration. 2009-04-14 Dmitry Titov <dimich@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25163 Upstream fix for releasing v8 objects on worker thread termination in Chromium. * bindings/v8/V8DOMMap.cpp: (WebCore::domDataList): Now uses Vector instead of HashMap. (WebCore::domDataListMutex): (WebCore::ThreadSpecificDOMData::ThreadSpecificDOMData): remove usage of currentThread(); (WebCore::ThreadSpecificDOMData::~ThreadSpecificDOMData): ditto. (WebCore::NonMainThreadSpecificDOMData::~NonMainThreadSpecificDOMData): moved call to removeAllDOMObjectsInCurrentThread() to ~WorkerScriptController. (WebCore::handleWeakObjectInOwningThread): (WebCore::derefDelayedObjects): (WebCore::removeAllDOMObjectsInCurrentThread): not static anymore. * bindings/v8/V8DOMMap.h: * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::dispose): removed code that avoided dual-dereference of WorkerContext. (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): this ref() is countered in removeAllDOMObjectsInCurrentThread(), when the WorkerContext is removed from the v8 map. * bindings/v8/WorkerScriptController.cpp: (WebCore::WorkerScriptController::~WorkerScriptController): 2009-04-14 Adam Roben <aroben@apple.com> Fix Bug 25183: Split up WebCore.vcproj's settings into vsprops files <https://bugs.webkit.org/show_bug.cgi?id=25183> WebCore.vcproj now uses a set of .vsprops files to store most of its settings. Reviewed by Darin Adler. * WebCore.vcproj/WebCore.vcproj: Moved settings from here into the new .vsprops files. * WebCore.vcproj/WebCoreCFNetwork.vsprops: Added. Contains settings for ports that build against CFNetwork. * WebCore.vcproj/WebCoreCG.vsprops: Added. Contains settings for ports that build against CoreGraphics. * WebCore.vcproj/WebCoreCURL.vsprops: Added. Contains settings for ports that build against libcurl. * WebCore.vcproj/WebCoreCairo.vsprops: Added. Contains settings for ports that build against Cairo. * WebCore.vcproj/WebCoreCommon.vsprops: Added. Contains settings shared by all ports. * WebCore.vcproj/WebCoreMediaQT.vsprops: Added. Contains settings for ports that use QTMovieWin to implement the MediaPlayerPrivate interface. * WebCore.vcproj/WebCorePthreads.vsprops: Added. Contains settings for ports that build against pthreads. 2009-04-14 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. http/tests/xmlhttprequest/basic-auth.html fails on Tiger. Turns out that NSURLCredentialPersistenceNone doesn't work on Tiger, so we have to use session persistence. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Route the credential through receivedCredential(), ensuring that the Tiger-specific need to use session credentials is honored. (WebCore::ResourceHandle::receivedCredential): On Tiger, change PersistenceNone to PersistenceForSession, because the former doesn't work. 2009-04-14 Adele Peterson <adele@apple.com> Reviewed by Darin Adler. Fix for <rdar://problem/6703873> Triple-click quoted line and type Return creates an extra quoted blank line Test: editing/inserting/6703873.html * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): If the startNode's original parent is now empty, we can remove it. Its already been cloned and copied with the startNode, so we only need to keep it around if it actually holds some original content, otherwise it will look like an extra empty container in the document. 2009-04-14 Xan Lopez <xlopez@igalia.com> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Add a proper implementation of AtkText::get_text and AtkText::get_character_count, which takes into account non TextControl text. With this the 'Text' field in Accerciser's Interface Viewer is filled correctly. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-14 Xan Lopez <xlopez@igalia.com> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Remove some dead code and g_return_if_fail from static functions. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-14 Xan Lopez <xlopez@igalia.com> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Also implement text interface for StaticTextRole, which covers most of the text in web pages. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-14 Alexey Proskuryakov <ap@webkit.org> Another Windows build fix. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::WebCoreSynchronousLoader::load): 2009-04-14 Alexey Proskuryakov <ap@webkit.org> Windows build fix. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::WebCoreSynchronousLoader::willSendRequest): (WebCore::WebCoreSynchronousLoader::didReceiveChallenge): 2009-04-13 Alexey Proskuryakov <ap@webkit.org> Reviewed by Sam Weinig. <rdar://problem/6698851> Implement XMLHttpRequest withCredentials attribute * WebCore.xcodeproj/project.pbxproj: Made ThreadableLoader.h private, as enum definitions from it are now used in otehr private headers. * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: Added withCredentials attribute. When it is false (default), neither credentials nor cookies are sent with cross origin requests, When it is true, those are sent, but the server needs to allow handling results via Access-Control-Allow-Credentials header. It was always possible to send a cross-site request with credentials via IFRAME or IMG, so this just adds a way to read results, as long as the server reports that it's allowed. Having the default set to false ensures that requests won't fail unexpectedly because of stored credentials and cookies for other resources in the target protection space. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::loadRequestSynchronously): Allow stored credentials for same origin requests, and for cross origin ones that have withCredentials attribute set. Such code already existed for cookies (but it's simpler, because we could just set a ResourceRequest flag). (WebCore::XMLHttpRequest::loadRequestAsynchronously): Ditto. * platform/network/ResourceHandle.h: Added willSendRequest() - just like for other callbacks, is is easier to have code in the class. Also, loadResourceSynchronously() now takes a StoredCredentials option, matching async case. * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::receivedCredential): Removed. This method could never be called, and no client used it. (WebCore::ResourceHandleClient::receivedRequestToContinueWithoutCredential): Ditto. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): Split username and password out of request URL. We want to always get a callback for credentials to manage them in WebCore, so network back-end shouldn't see them too early. * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::removeCredentials): * platform/network/ResourceRequestBase.h: Added a removeCredentials() method that removes login and password parts from request URL. * platform/network/mac/ResourceHandleMac.mm: (WebCoreCredentialStorage): Added a simple storage class for per-session credentials. (WebCore::ResourceHandle::loadResourceSynchronously): Pass allowStoredCredentials through. (WebCore::ResourceHandle::willSendRequest): On a redirect, credentials should be replaced. (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Try credentials from the URL and per-session credentials. Code was partially moved from Obj-C callback. (WebCore::ResourceHandle::receivedCredential): Intercept per-session credentials and store them in WebCore storage. (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Don't store the redirected URL - we only needed credentials, which are now stored separately. (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]): Removed code that was setting credentials from URL. First, the code is now in ResourceHandle, and also, it wasn't actually needed in Leopard release before this patch, see <rdar://problem/5298142>. (-[WebCoreSynchronousLoader dealloc]): Release credentials. Note that unlike ResourceHandle, this class still needs to track URL for checking whether a redirect is allowed. This is not a great solution, and we should unify client code to use the same checks in sync and async cases. (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Just like in async case, put credentials aside to ensure that network back-end asks for them. (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Use credentials from URL, or from WebCore storage. (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Don't use stored credentials when not allowed to. (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Put credentials aside to ensure that network back-end asks for them. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::WebCoreCredentialStorage::set): (WebCore::WebCoreCredentialStorage::get): (WebCore::willSendRequest): (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::willSendRequest): (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): (WebCore::ResourceHandle::receivedCredential): (WebCore::ResourceHandle::loadResourceSynchronously): (WebCore::WebCoreSynchronousLoader::willSendRequest): (WebCore::WebCoreSynchronousLoader::didReceiveChallenge): (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage): (WebCore::WebCoreSynchronousLoader::load): Same changes as in Mac case. * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): * platform/network/qt/ResourceHandleQt.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): Trying not to break the build. * dom/XMLTokenizerLibxml2.cpp: (WebCore::openFunc): * xml/XSLTProcessor.cpp: (WebCore::docLoaderFunc): Unconditionally allow stored credentials for these, as they only support same origin loads. * workers/WorkerContext.cpp: (WebCore::WorkerContext::importScripts): WorkerContext.importScripts() can be cross-origin, but sending credentials with it is no worse than sending them with <script src=...>, so this is also unconditionally allowed. * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Pass through storedCredentials. (WebCore::DocumentThreadableLoader::create): Ditto. (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Save storedCredentials and sameOrigin flags foruse in callbacks. (WebCore::DocumentThreadableLoader::willSendRequest): Assert that loaders aren't all confused. (WebCore::DocumentThreadableLoader::didSendData): Ditto. (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto. (WebCore::DocumentThreadableLoader::didReceiveData): Ditto. (WebCore::DocumentThreadableLoader::didFinishLoading): Ditto. (WebCore::DocumentThreadableLoader::didFail): Ditto. (WebCore::DocumentThreadableLoader::getShouldUseCredentialStorage): Don't use credential storage if that's not allowed by the code that invoked DocumentThreadableLoader. (WebCore::DocumentThreadableLoader::didReceiveAuthenticationChallenge): Simulate a failure and cancel the request if we are about to ask the user for credentials for a cross-origin request, which is forbidden by CORS (and would have been very confusing if allowed). (WebCore::DocumentThreadableLoader::receivedCancellation): Assert that loaders aren't all confused. * loader/DocumentThreadableLoader.h: Updated for the new flags (storedCredentials and sameOrigin) that affect the loader. Eventually, we need to move all CORS logic from XHR here. * loader/ThreadableLoader.h: (StoredCredentials): Added another flag that affects loader behavior. We should combine all of these into a structure, and use it for sync requests, too. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously): * loader/FrameLoader.h: * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoader::create): (WebCore::ThreadableLoader::loadResourceSynchronously): * loader/WorkerThreadableLoader.cpp: (WebCore::WorkerThreadableLoader::WorkerThreadableLoader): (WebCore::WorkerThreadableLoader::loadResourceSynchronously): (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): * loader/WorkerThreadableLoader.h: (WebCore::WorkerThreadableLoader::create): Pass through storedCredentials. 2009-04-13 David Hyatt <hyatt@apple.com> Reviewed by Cameron Zwarich. Remove an outdated comment in ScrollView.h * platform/ScrollView.h: 2009-04-13 Eric Carlson <eric.carlson@apple.com> Reviewed by Mark Rowe. https://bugs.webkit.org/show_bug.cgi?id=25177 QTTrack's -media method always return NULL in 64-bit QTKit, so MediaPlayerPrivate::disableUnsupportedTracks should use QTTrackMediaTypeAttribute to get a track's type. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): 2009-04-13 Geoffrey Garen <ggaren@apple.com> Reviewed by Cameron Zwarich. More fix for https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions Stop using protected event listeners on the window object. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::mark): Mark our event listeners, since they're no longer protected. (WebCore::JSDOMWindow::addEventListener): (WebCore::JSDOMWindow::removeEventListener): Create unprotected event listeners, since we mark them now. * bindings/js/JSEventListener.h: Made some functions public so DOMWindow could call them. * bindings/js/JSNodeCustom.cpp: Moved markEventListeners to a header, so it could be shared. * bindings/scripts/CodeGeneratorJS.pm: Generate event listener marking and invalidating code for the DOMWindow. * dom/RegisteredEventListener.h: (WebCore::markEventListeners): (WebCore::invalidateEventListeners): Added helper functions. * page/DOMWindow.idl: Make the window's event listener attributes not protected. 2009-04-13 Eric Carlson <eric.carlson@apple.com> Reviewed by Mark Rowe. https://bugs.webkit.org/show_bug.cgi?id=25155 OS X standalone media documents should not switch from <video> to <embed> when QTKit load state is QTMovieLoadStateLoading as that happens frequently when a loading with a slow network connection or when a movie is not saved fast-start. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::updateStates): Don't open movie with plug-in when QTKit's loadstate is QTMovieLoadStateLoading, wait until it drops below QTMovieLoadStateError. 2009-04-13 Dmitry Titov <dimich@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24453 REGRESSION: If setTimeout is called on a iframe's window, the DOM changes to the main document that timer callback makes are not flushed. * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): Use Document::updateStyleForAllDocuments() instead of document->updateStyleIfNeeded() since timers may affect documents other then their own. 2009-04-13 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by David Hyatt. Check document for nullity to avoid crashing on GTK+, when creating the WebView. * page/FrameView.cpp: (WebCore::FrameView::needsLayout): 2009-04-13 Ada Chan <adachan@apple.com> Forgot to capitalize the "US". * platform/text/win/TextBreakIteratorInternalICUWin.cpp: (WebCore::currentTextBreakLocaleID): 2009-04-13 Ada Chan <adachan@apple.com> <rdar://problem/6564956> URL field double-click selects entire domain, rather than single word or entire URL Revert back to the old word breaking behavior by using en_US_POSIX locale. Reviewed by Steve Falkenburg. * platform/text/win/TextBreakIteratorInternalICUWin.cpp: (WebCore::currentTextBreakLocaleID): 2009-04-13 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. * platform/cf/BinaryPropertyList.cpp: Added comment. * platform/cf/BinaryPropertyList.h: Fixed mistakes in comments. 2009-04-13 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. Bug 25158: hit testing doesn't work right in some cases involving anonymous blocks https://bugs.webkit.org/show_bug.cgi?id=25158 rdar://problem/6769693 Test: editing/selection/click-after-nested-block.html * rendering/RenderBlock.cpp: (WebCore::isChildHitTestCandidate): Added. Helper so the two loops in positionForPoint can share code. (WebCore::RenderBlock::positionForPoint): Removed unneeded special case for first child box. Changed special case for last child box to propertly handle the various types of child box that are not hit test candidates (the same ones already handled by the hit test loop below), adding in a loop so we find the last candidate. 2009-04-13 David Hyatt <hyatt@apple.com> Reviewed by Sam Weinig. Fix for https://bugs.webkit.org/show_bug.cgi?id=25125. Rework scrolling so that a layout happens first when it's already needed so that the code doesn't end up making bad decisions based off invalid document sizes. * WebCore.base.exp: * page/FrameView.h: (WebCore::FrameView::visibleContentsResized): * platform/ScrollView.cpp: (WebCore::ScrollView::ScrollView): (WebCore::ScrollView::updateScrollbars): * platform/ScrollView.h: 2009-04-13 Adam Roben <aroben@apple.com> Add SharedBuffer::wrapCFData This is the CF-equivalent of wrapNSData. Reviewed by Brady Eidson. * platform/SharedBuffer.h: * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::wrapCFData): 2009-04-13 Dan Bernstein <mitz@apple.com> - build fix * page/EventHandler.cpp: (WebCore::documentPointForWindowPoint): 2009-04-13 Antti Koivisto <antti@apple.com> Reviewed by Darin Adler. <rdar://problem/6740294> Increase the connection count per host Try to use six connections per host if possible. * WebCore.base.exp: * loader/loader.cpp: (WebCore::Loader::Loader): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/network/ResourceRequestBase.cpp: (WebCore::initMaximumHTTPConnectionCountPerHost): * platform/network/ResourceRequestBase.h: * platform/network/mac/ResourceRequestMac.mm: (WebCore::initMaximumHTTPConnectionCountPerHost): 2009-04-13 Justin Garcia <justin.garcia@apple.com> Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=25153 Can't place the caret into text field that scrolls the window on focus We refetch the target node in the shadow node case, and when we do so the window coordinate for the mouse event may be invalid because of scrolling that the focus handler did. Cache the document point (that we derived from the window coordinate) and use that any time we refetch. * page/EventHandler.cpp: (WebCore::documentPointForWindowPoint): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::prepareMouseEvent): 2009-04-13 Sam Weinig <sam@webkit.org> Reviewed by Geoffrey Garen. Rename JavaScriptCanOpenWindowsAutomatically to javaScriptCanOpenWindowsAutomatically to conform to our style guidelines. * page/DOMWindow.cpp: (WebCore::DOMWindow::allowPopUp): * page/Settings.h: (WebCore::Settings::javaScriptCanOpenWindowsAutomatically): 2009-04-13 Geoffrey Garen <ggaren@apple.com> Mac build fix: Made another header private. * WebCore.xcodeproj/project.pbxproj: 2009-04-13 Jian Li <jianli@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25121 Upstream changes to handle error messages from V8 when running worker script. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::reportFatalErrorInV8): (WebCore::handleConsoleMessage): (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy): (WebCore::WorkerContextExecutionProxy::dispose): (WebCore::WorkerContextExecutionProxy::initV8IfNeeded): (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): (WebCore::WorkerContextExecutionProxy::evaluate): * bindings/v8/WorkerContextExecutionProxy.h: 2009-04-13 Geoffrey Garen <ggaren@apple.com> Build fix: Made setInlineEventListenerForType not inline, since Document calls it now. Made RegisteredEventListener.h a private header on Mac, so WebKit can use it. * page/DOMWindow.cpp: (WebCore::DOMWindow::setInlineEventListenerForType): 2009-04-13 Dan Bernstein <mitz@apple.com> Reviewed by Sam Weinig. - fix <rdar://problem/6404439> REGRESSION: Overlapping text and other layout issues in View Sample feature of MYOB FIrstEdge v3 * page/Navigator.cpp: (WebCore::shouldHideFourDot): Added "tdqm_loader.js" to the list of JavaScript files this quirk applies to. 2009-04-13 Sam Weinig <sam@webkit.org> Reviewed by Oliver Hunt. Move open and showModalDialog functions out of JSDOMWindowBase and into JSDOMWindow by partially generating them. This slightly changes the behavior of getting window.showModalDialog when the embedding app does not support it to return undefined regardless of shadowing. This should not be an issue in a practice, but will be addressed when we add a generic way to handle runtime specialization of property access. * DerivedSources.make: Remove JSDOMWindowBase.lut.h * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSDOMWindowBase.cpp: (WebCore::): (WebCore::JSDOMWindowBase::getOwnPropertySlot): Move canShowModalDialog check from here to JSDOMWindow::customGetOwnPropertySlot. (WebCore::JSDOMWindowBase::put): Remove dead code. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::createWindow): (WebCore::JSDOMWindow::open): (WebCore::JSDOMWindow::showModalDialog): * bindings/js/JSDOMWindowCustom.h: (WebCore::JSDOMWindow::customGetOwnPropertySlot): * page/DOMWindow.cpp: (WebCore::DOMWindow::parseModalDialogFeatures): Move from JSDOMWindowBase. (WebCore::DOMWindow::allowPopUp): Ditto. (WebCore::DOMWindow::canShowModalDialog): Ditto. (WebCore::DOMWindow::canShowModalDialogNow): Ditto. * page/DOMWindow.h: * page/DOMWindow.idl: 2009-04-13 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. Moved storage for window event listeners into the window object. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::addEventListener): (WebCore::JSDOMWindow::removeEventListener): Add / remove window event listeners to / from the window object. * dom/Document.cpp: (WebCore::Document::removeAllEventListeners): (WebCore::Document::clear): (WebCore::Document::setWindowInlineEventListenerForTypeAndAttribute): Moved a bunch of code to the DOMWindow class, and left behind a few calls through to DOMWindow, to support legacy clients. (Eventually, these will go away, too.) * dom/Document.h: ditto. * dom/Node.cpp: (WebCore::Node::dispatchGenericEvent): (WebCore::Node::dispatchWindowEvent): Dipatch window events on the window object, not the document. * dom/Node.h: * dom/RegisteredEventListener.h: Moved RegisteredEventListenerVector declaration, since it's required in more places now. * history/CachedFrame.cpp: (WebCore::CachedFrame::clear): Updated for rename. Also, remove event listeners before detaching and clearing the document's window pointer, since the the document needs its window pointer in order to tell the window to clear its event listeners. * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::canCachePageContainingThisFrame): (WebCore::FrameLoader::logCanCacheFrameDecision): Updated for rename, and movement of window event listeners into the window. * loader/ImageDocument.cpp: (WebCore::ImageDocument::createDocumentStructure): Updated for movement of window event listeners into the window. * page/DOMWindow.cpp: (WebCore::DOMWindow::handleEvent): (WebCore::DOMWindow::addEventListener): (WebCore::DOMWindow::removeEventListener): (WebCore::DOMWindow::removeAllEventListeners): (WebCore::DOMWindow::hasEventListener): (WebCore::DOMWindow::setInlineEventListenerForType): (WebCore::DOMWindow::removeInlineEventListenerForType): (WebCore::DOMWindow::inlineEventListenerForType): (WebCore::DOMWindow::addPendingFrameUnloadEventCount): (WebCore::DOMWindow::removePendingFrameUnloadEventCount): (WebCore::DOMWindow::addPendingFrameBeforeUnloadEventCount): (WebCore::DOMWindow::removePendingFrameBeforeUnloadEventCount): * page/DOMWindow.h: Moved a bunch of code to the DOMWindow class, from the Document. * page/Frame.cpp: (WebCore::Frame::shouldClose): Updated for movement of window event listeners into the window. 2009-04-13 Greg Bolsinga <bolsinga@apple.com> Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=25149 The Geolocation timer needs to start after the UA has granted permission. * bindings/js/JSGeolocationCustom.cpp: Use PassRefPtr<PositionOptions> (WebCore::JSGeolocation::getCurrentPosition): (WebCore::JSGeolocation::watchPosition): * page/Geolocation.cpp: Add a RefPtr<PositionOptions> so it can be used later when the timer is started. Change PositionOptions* to PassRefPtr<PositionOptions> where needed. (WebCore::Geolocation::GeoNotifier::GeoNotifier): (WebCore::Geolocation::GeoNotifier::startTimer): (WebCore::Geolocation::getCurrentPosition): (WebCore::Geolocation::watchPosition): (WebCore::Geolocation::setIsAllowed): Start the timer is the UA allows (WebCore::Geolocation::startTimer): (WebCore::Geolocation::startTimersForOneShots): (WebCore::Geolocation::startTimersForWatchers): (WebCore::Geolocation::startTimers): * page/Geolocation.h: (WebCore::Geolocation::GeoNotifier::create): 2009-04-13 Pamela Greene <pam@chromium.org> Reviewed by Darin Fisher. Fix Chromium (V8) build by renaming methods to match changes in http://trac.webkit.org/changeset/42377. https://bugs.webkit.org/show_bug.cgi?id=25141 * bindings/v8/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): updateRendering() -> updateStyleIfNeeded() * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::handleEvent): updateDocumentsRendering() -> updateStyleForAllDocuments() 2009-04-13 Darin Fisher <darin@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25136 CRASH in DocumentLoader::removeSubresourceLoader due to null m_frame Test: fast/frames/frame-unload-crash.html * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::updateLoading): Added null check of m_frame. 2009-04-13 Sam Weinig <sam@webkit.org> Reviewed by Tim Hatcher. Put the MessagePort constructor back in ENABLE_CHANNEL_MESSAGING. * page/DOMWindow.idl: 2009-04-13 Greg Bolsinga <bolsinga@apple.com> Fix GTK build break. * platform/gtk/GeolocationServiceGtk.cpp: (WebCore::GeolocationServiceGtk::updatePosition): 2009-04-13 David Hyatt <hyatt@apple.com> Reviewed by Darin Adler and Dan Bernstein. Assertion in updateStyleForAllDocuments. Make sure to unscheduleStyleRecalc when an object goes into the page cache. Disallow scheduling of style recalcs on a document that is already in the page cache. Schedule a style recalc if needed when an object comes out of the page cache. * dom/Document.cpp: (WebCore::Document::scheduleStyleRecalc): (WebCore::Document::setInPageCache): 2009-04-13 Timothy Hatcher <timothy@apple.com> Correctly sort (program) scripts in the Scripts panel popup menu. Reviewed by Ada Chan. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Refactor the code and sort "(program)" options by the sourceID to maintain some order. * inspector/front-end/utilities.js: (indexOfObjectInListSortedByFunction): Fix a bug where identical objects would cause an incorrect return value that confuses insertionIndexForObjectInListSortedByFunction. Just set 'first' and break so the correct result will be returned. 2009-04-13 Greg Bolsinga <bolsinga@apple.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24770 Add custom code for Coordinates that returns null when required by the Geolocation spec. http://dev.w3.org/geo/api/spec-source.html#coordinates * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCoordinatesCustom.cpp: Added. (WebCore::JSCoordinates::altitude): returns null if the value cannot be provided. (WebCore::JSCoordinates::altitudeAccuracy): Ditto (WebCore::JSCoordinates::heading): Ditto (WebCore::JSCoordinates::speed): Ditto * page/Coordinates.h: (WebCore::Coordinates::create): Add 'canProvide' parameters and values (WebCore::Coordinates::canProvideAltitude): (WebCore::Coordinates::canProvideAltitudeAccuracy): (WebCore::Coordinates::canProvideHeading): (WebCore::Coordinates::canProvideSpeed): (WebCore::Coordinates::Coordinates): * page/Coordinates.idl: specify custom getters * platform/mac/GeolocationServiceMac.mm: Set the values correctly if they cannot be provided. (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]): 2009-04-13 Adele Peterson <adele@apple.com> Reviewed by Darin Adler. Fix for <rdar://problem/5510537> Typing return at start of block quote yields empty quoted line Test: editing/inserting/5510537.html * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): If the break insertion position is at the beginning of the topmost quote, then just insert the <br> before the blockquote. Otherwise, if the break insertion position is at the beginning of any quote, adjust the position so the break comes before the current quote level so we don't end up with an empty line in that quote in addition to the new line we're adding with the <br>. 2009-04-11 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. Fix problem when encoding history files with duplicate integer arrays near the end of the file. This results in an assertion failure, and if assertions are turned off, corrupted output. When writing an integer array it's important not to add an object reference to the aggregate buffer. The writing of the array does not depend on the aggregate buffer. But, more importantly, it's possible this instance integer array is a duplicate and won't be written out. If so, there's no guarantee there's enough space in the aggregate buffer to store the object references (the references will be ignored). In some cases the aggregate buffer can then overrun the data being written; normally this is prevented by the fact that the data being written will include a copy of the aggregate buffer. Also removed a bit of unneeded dead code to handle the integer -1. * platform/cf/BinaryPropertyList.cpp: (WebCore::BinaryPropertyListPlan::BinaryPropertyListPlan): Removed unneeded m_integerNegativeOneObjectReference, since property lists support only non-negative integers. (WebCore::BinaryPropertyListPlan::writeInteger): Removed support for m_integerNegativeOneObjectReference. (WebCore::BinaryPropertyListPlan::integerObjectReference): Ditto. (WebCore::BinaryPropertyListSerializer::writeIntegerWithoutAddingAggregateObjectReference): Added. Factored out most of writeInteger, for use in writeIntegerArray, without calling addAggregateObjectReference. (WebCore::BinaryPropertyListSerializer::writeInteger): Changed to call the new writeIntegerWithoutAddingAggregateObjectReference function. (WebCore::BinaryPropertyListSerializer::writeIntegerArray): Call the new writeIntegerWithoutAddingAggregateObjectReference function and therefore remove the code to save and restore m_currentAggregateBufferByte, which is no longer needed. 2009-04-13 Holger Hans Peter Freyther <zecke@selfish.org> Unreviewed Qt build fix. * platform/graphics/qt/FontQt.cpp: (WebCore::Font::floatWidthForComplexText): 2009-04-12 Sam Weinig <sam@webkit.org> Reviewed by Mark Rowe. Move the event and crypto attributes and the captureEvents and releaseEvents functions out of JSDOMWindowBase by partially generating them. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::currentEvent): Make const. * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::crypto): Not implemented. (WebCore::JSDOMWindow::event): (WebCore::JSDOMWindow::captureEvents): Not implemented. (WebCore::JSDOMWindow::releaseEvents): Ditto. * page/DOMWindow.idl: 2009-04-12 Sam Weinig <sam@webkit.org> Reviewed by Mark Rowe. Move more attributes out of JSDOMWindowBase by partially generating them. - Expose the MessagePort constructor. * bindings/js/JSDOMGlobalObject.h: (WebCore::getDOMConstructor): * bindings/js/JSDOMWindowBase.cpp: (setJSDOMWindowBaseEvent): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::image): (WebCore::JSDOMWindow::option): (WebCore::JSDOMWindow::audio): (WebCore::JSDOMWindow::webKitPoint): (WebCore::JSDOMWindow::webKitCSSMatrix): (WebCore::JSDOMWindow::xMLHttpRequest): (WebCore::JSDOMWindow::xSLTProcessor): (WebCore::JSDOMWindow::messageChannel): (WebCore::JSDOMWindow::worker): * page/DOMWindow.idl: 2009-04-12 Timothy Hatcher <timothy@apple.com> A resource's filename is not correct after a redirect in the Inspector. Reviewed by Dan Bernstein. * inspector/InspectorResource.cpp: (WebCore::InspectorResource::updateScriptObject): Fix a typo in the lastPathComponent property name. 2009-04-12 Adele Peterson <adele@apple.com> Reviewed by Darin Adler. Test: editing/inserting/6609479-1.html Follow-up to <rdar://problem/6609479>. Before my last change, a Mail blockquote would've been broken up earlier, and you would've been guaranteed that the inserted content was at the start of a paragraph. Now we need to check for that explicitly, and only merge the start of the inserted content if it is at the start of a paragraph. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::shouldMergeStart): 2009-04-11 Adele Peterson <adele@apple.com> Reviewed by Dan Bernstein. Fix for <rdar://problem/6609479> Pressing return inside a table cell that's inside quoted content will split the table Test: editing/inserting/6609479.html Don't break a blockquote if pasting or inserting into a table. * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): 2009-04-11 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. - fix <rdar://problem/6643103> Unscaled values from body.scrollHeight Test: fast/css/zoom-body-scroll.html Adjust scroll{Left,Top,Width,Height} values for zoom in getters and setters. * html/HTMLBodyElement.cpp: (WebCore::adjustForZoom): (WebCore::HTMLBodyElement::scrollLeft): (WebCore::HTMLBodyElement::setScrollLeft): (WebCore::HTMLBodyElement::scrollTop): (WebCore::HTMLBodyElement::setScrollTop): (WebCore::HTMLBodyElement::scrollHeight): (WebCore::HTMLBodyElement::scrollWidth): 2009-04-10 Timothy Hatcher <timothy@apple.com> Allow page navigation and reload while stopped at a breakpoint. <rdar://problem/6781108> Having a breakpoint active prevents page reload Reviewed by Darin Adler. * inspector/InspectorController.cpp: (WebCore::InspectorController::didContinue): Call the resumedScript function. * inspector/InspectorController.h: Added didContinue. * inspector/JavaScriptDebugListener.h: Ditto. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::pauseIfNeeded): Call didContinue on the listeners. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.debuggerResumed): Update the interface and state. * inspector/front-end/inspector.js: (WebInspector.resumedScript): Call ScriptsPanel.debuggerResumed. * loader/FrameLoader.cpp: (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Call resumeDebugger. 2009-04-10 Sam Weinig <sam@webkit.org> Reviewed by Adele Peterson. Remove unused include for JSLock. * page/mac/FrameMac.mm: 2009-04-10 Sam Weinig <sam@webkit.org> Reviewed by Darin Adler. Add back the keepAlive timer for after the script execution to protect the callers of evaluate, as was part of the original intent of timer. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluate): * page/mac/FrameMac.mm: 2009-04-10 Chris Marrin <cmarrin@apple.com> Reviewed by Simon Fraser. Fixed https://bugs.webkit.org/show_bug.cgi?id=25137 If we reload, the animation controller sticks around and has a stale animation time. So the needed delay is computed wrong. I added a reset of the animation timer on load. I did not do a test case because this only happens on reload so I couldn't make an automated test. I tried using an iframe and using reload() but that doesn't tickle the bug. * dom/Document.cpp: (WebCore::Document::implicitOpen): 2009-04-10 Grace Kloba <klobag@gmail.com> Reviewed by Darin Adler. Move WORKERS header files inside ENABLE(WORKERS). So if WORKERS is not enabled and the generated files are not generated, the build is still working. * bindings/js/JSDOMGlobalObject.cpp: * bindings/js/JSMessageChannelConstructor.cpp: * bindings/js/ScheduledAction.cpp: 2009-04-10 Darin Adler <darin@apple.com> Reviewed by Brady Eidson. <rdar://problem/6773515> crash in push_heap inside WebCore when printing The crash was due to manipulating a timer on a different thread than the one it was created on. This adds some diagnostics so we'll catch that kind of mistake immediately. * platform/Timer.cpp: (WebCore::TimerBase::TimerBase): Store the thread identifier in debug versions. (WebCore::TimerBase::start): Assert it's the same thread the timer was created on. (WebCore::TimerBase::stop): Ditto. (WebCore::TimerBase::isActive): Ditto. (WebCore::TimerBase::setNextFireTime): Ditto. * platform/Timer.h: Added the thread identifier data member. 2009-04-10 Chris Marrin <cmarrin@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=25108 If you remove a class with a transition while that transition is running the animation timer will continue to fire after the transition is finished. This has no visual indication, but it does drain the processor. And in some cases it might even cause a glitch in future animations. Unfortunately there is no way to test this without putting in printfs. This happens because the animation logic is never traversed after a transition is removed, so we never get a chance to cleanup. So I added cleanup in the logic that fires the dispatch of the last style change when the animation finishes. Test: transitions/remove-transition-style.html * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::updateTransitions): (WebCore::CompositeAnimation::animate): (WebCore::CompositeAnimation::cleanupFinishedAnimations): * page/animation/CompositeAnimation.h: 2009-04-10 Sam Weinig <sam@webkit.org> Reviewed by Geoffrey Garen. Fix for <rdar://problem/6648858> CrashTracer: [REGRESSION(Safari 4)] 60 crashes in Safari at com.apple.WebCore • WebCore::ScriptController::evaluate + 241 The Frame (and therefore ScriptController) were being destroyed during JavaScript execution causing the JSDOMWindowShell to become null. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluate): Use a RefPtr to protect the Frame instead of the keep-alive timer, since a nested event loop used from with-in JavaScript execution could cause the timer to fire before returning. 2009-04-10 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=25133 Fix an error in InspectorController's bindings, clean up a few header includes, make empty object construction in ScriptObject less ambiguous. * bindings/js/JSInspectorControllerCustom.cpp: (WebCore::JSInspectorController::setSetting): Send correct argument from the bindings. * bindings/js/ScriptObject.cpp: (WebCore::ScriptObject::createNew): Added. * bindings/js/ScriptObject.h: Removed constructor, added decl for createNew. * inspector/ConsoleMessage.cpp: Remove unused header. * inspector/ConsoleMessage.h: Ditto. * inspector/InspectorResource.cpp: (WebCore::createHeadersObject): Changed to use ScriptObject::createNew. 2009-04-10 Chris Marrin <cmarrin@apple.com> Reviewed by Simon Fraser. Fixed https://bugs.webkit.org/show_bug.cgi?id=25134 This both fixes a bug where I was not sending in the right time to continue the animation and was not recomputing current time when coming out of suspend. * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::updateStateMachine): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::suspendAnimations): (WebCore::AnimationControllerPrivate::resumeAnimations): 2009-04-10 Adam Roben <aroben@apple.com> Give Windows's <select> popup menus drop shadows Rubber-stamped by Steve Falkenburg. No test possible. * platform/win/PopupMenuWin.cpp: (WebCore::registerPopup): Use the CS_DROPSHADOW window class style. 2009-04-10 Timothy Hatcher <timothy@apple.com> Fix a bug in the Web Inspector where it would show scripts from previous pages when toggling the debugger off and back on. https://bugs.webkit.org/show_bug.cgi?id=25095 rdar://problem/6769970 Reviewed by John Sullivan. * bindings/js/ScriptCachedFrameData.cpp: (WebCore::ScriptCachedFrameData::ScriptCachedFrameData): Null out the debugger for the scriptController. This balances the attachDebugger that was already in ScriptCachedFrameData::restore. (WebCore::ScriptCachedFrameData::restore): Clean up an if statement. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::clearWindowShell): Clear the debugger from the current window before setting the new window. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::recompileAllJSFunctions): Only accumulate source providers for code associated this as the debugger. 2009-04-10 Pierre d'Herbemont <pdherbemont@apple.com> Reviewed by Adele Peterson. <rdar://problem/6646998> Avoid starting QTKitServer if possible When possible avoid asking QTKit for the MIME types that require QTKitServer when running 64-bit. * WebCore.base.exp: Added new entry point. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::addFileTypesToCache): Add an NSArray of types to the cache. (WebCore::mimeCommonTypesCache): Add all "common" QTKit types to the cache. (WebCore::mimeModernTypesCache): Add only "modern" QTKit types to the cache (this list does not start QTKitServer if it is not already running). (WebCore::MediaPlayerPrivate::getSupportedTypes): Refactored. (WebCore::MediaPlayerPrivate::supportsType): Look in list of "modern" types first to avoid starting QTKitServer if possible. * platform/mac/WebCoreSystemInterface.h: Add wkQTIncludeOnlyModernMediaFileTypes. * platform/mac/WebCoreSystemInterface.mm: Ditto. 2009-04-10 Adam Roben <aroben@apple.com> Turn on window animations for <select> popup menus We turned these off back when <select> popup menus were partially transparent. Now that they're opaque, there's no reason not to animate them. Reviewed by Steve Falkenburg. No test possible. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenu::show): Remove the #ifdef that was disabling the window animation. 2009-04-10 Dan Bernstein <mitz@apple.com> Reviewed by Sam Weinig. - fix a regression from r42379 which made zero-width characters affect line height Test: fixes fast/text/wide-zero-width-space.html * platform/graphics/mac/FontMacATSUI.mm: (WebCore::overrideLayoutOperation): Add to the fallback font list set here, and only if the glyph is not zero-width... (WebCore::ATSULayoutParameters::initialize): ...instead of doing it here. This matches WidthIterator's behavior. 2009-04-10 Darin Fisher <darin@chromium.org> Fixing build bustage caused by warnings being treated as errors. 1- A local variable was only be used inside a debug assertion, which caused grief for the release build. 2- Missing initializer for member 'DocumentMarker::activeMatch' * dom/Document.cpp: (WebCore::Document::addMarker): (WebCore::Document::setMarkersActive): 2009-04-10 Finnur Thorarinsson <finnur.webkit@gmail.com> Reviewed by John Sullivan. Fixing: https://bugs.webkit.org/show_bug.cgi?id=25117 (TextMatches don't have a concept of active match) For the ports that use the DocumentMarker as highlighting for FindInPage it is useful to have a flag that specifies which marker is active, so it can be drawn in a different color. This allows me to remove the hack to use the SelectionController to highlight the active match (in the ChromiumWin port). * dom/Document.cpp: (WebCore::Document::setMarkersActive): * dom/Document.h: * dom/DocumentMarker.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintTextMatchMarker): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::platformActiveTextSearchHighlightColor): (WebCore::RenderTheme::platformInactiveTextSearchHighlightColor): * rendering/RenderTheme.h: * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor): (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor): (WebCore::RenderThemeChromiumWin::platformActiveTextSearchHighlightColor): (WebCore::RenderThemeChromiumWin::platformInactiveTextSearchHighlightColor): * rendering/RenderThemeChromiumWin.h: 2009-04-10 Pamela Greene <pam@chromium.org> Reviewed by Dimitri Glazkov. Build fix for Chromium. https://bugs.webkit.org/show_bug.cgi?id=12440 * page/chromium/FrameChromium.cpp: (WebCore::computePageRectsForFrame): change docWidth() to overflowWidth() 2009-04-09 David Hyatt <hyatt@apple.com> Reviewed by Oliver Hunt Add a timer for style recalc (similar to the one used for scheduling layouts). For now in order to reduce the risk of regressions, I have left in all the synchronous machinery for updating style following DOM events and JavaScript timeouts. Eventually these calls will be removed. Where the timer will really kick in and be useful is for clients that do style changes from Objective-C DOM bindings or that execute JavaScript to manipulate style from the JavaScriptCore C API. * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::appendChild): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): (WebCore::Document::scheduleStyleRecalc): (WebCore::Document::unscheduleStyleRecalc): (WebCore::Document::styleRecalcTimerFired): (WebCore::Document::updateStyleForAllDocuments): (WebCore::Document::detach): * dom/Document.h: * dom/Node.cpp: (WebCore::Node::setNeedsStyleRecalc): (WebCore::Node::lazyAttach): 2009-04-09 Oliver Hunt <oliver@apple.com> Reviewed by Gavin Barraclough. <rdar://problem/6586787> JS debugger does not work in 64-bit Don't truncate the source id in JSCallFrame * inspector/JavaScriptCallFrame.h: 2009-04-09 Adam Roben <aroben@apple.com> Start compiling HistoryPropertyList on Windows Reviewed by Darin Adler. * WebCore.vcproj/WebCore.vcproj: Added HistoryPropertyList and its dependencies to the project. Copy headers from history/cf to $WebKitOutputDir. * history/cf/HistoryPropertyList.cpp: Added StringExtras.h so that this file will compile on Windows. 2009-04-09 Dan Bernstein <mitz@apple.com> Reviewed by Dave Hyatt. - fix <rdar://problem/6166612> Text boxes' metrics should be based on the actual fonts used in them, not just the primary font Covered by many existing layout tests * platform/graphics/Font.cpp: (WebCore::Font::floatWidth): Added a fallbackFonts parameter. If the platform supports collecting fallback fonts in its complex font path and fallbackFonts is not null, all fallback fonts used for the text run will be added to it. * platform/graphics/Font.h: (WebCore::Font::width): Ditto. * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): Removed an unnecessary namespace qualifier. (WebCore::Font::floatWidthForSimpleText): Added a fallbackFonts parameter, which is passed down to WidthIterator. * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::WidthIterator): Added a fallbackFonts parameter and used it to initialize the m_fallbackFonts member. (WebCore::WidthIterator::advance): Track the fonts being used and add any fallback fonts to the m_fallbackFonts set. Make sure to only add non-small-caps fonts. * platform/graphics/WidthIterator.h: * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::canReturnFallbackFontsForComplexText): Added an implementation that returns false, meaning this platform's implementation of floatWidthForComplexText() does not populate the fallbackFonts set. (WebCore::Font::floatWidthForComplexText): Updated for the new prototype. * platform/graphics/chromium/FontLinux.cpp: Ditto. * platform/graphics/gtk/FontGtk.cpp: Ditto. * platform/graphics/mac/CoreTextController.cpp: (WebCore::CoreTextController::CoreTextController): Added a fallbackFonts parameter and used it to initialize the m_fallbackFonts member. (WebCore::CoreTextController::collectCoreTextRunsForCharacters): Add fallback fonts to m_fallbackFonts. * platform/graphics/mac/CoreTextController.h: * platform/graphics/mac/FontMac.mm: (WebCore::Font::canReturnFallbackFontsForComplexText): Added an implementation that returns true, indicating that the Mac implementations of floatWidthForComplexText() populate the fallbackFonts set. * platform/graphics/mac/FontMacATSUI.mm: (WebCore::ATSULayoutParameters::ATSULayoutParameters): Added a fallbackFonts parameter and used it to initialize the m_fallbackFonts member. (WebCore::ATSULayoutParameters::initialize): Add fallback fonts to m_fallbackFonts. (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts parameter, which is passed down to ATSULayoutParameters. * platform/graphics/mac/FontMacCoreText.cpp: (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts parameter, which is passed down to CoreTextController. * platform/graphics/win/FontWin.cpp: (WebCore::Font::canReturnFallbackFontsForComplexText): Added an implementation that returns true, indicating that the UniscribeController-based implementations of floatWidthForComplexText() populate the fallbackFonts set. (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts parameter, which is passed down to UniscribeController. * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::UniscribeController): Added a fallbackfonts parameter and used it to initialize m_fallbackFonts. (WebCore::UniscribeController::advance): Add fallback fonts to m_fallbackFonts. * platform/graphics/win/UniscribeController.h: * platform/graphics/wx/FontWx.cpp: (WebCore::Font::canReturnFallbackFontsForComplexText): Added an implementation that returns false, meaning this platform's implementation of floatWidthForComplexText() does not populate the fallbackFonts set. (WebCore::Font::floatWidthForComplexText): Updated for the new prototype. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::computeLogicalBoxHeights): For an InlineTextBox with multiple fonts, compute a common baseline and line height by considering all fonts' ascents and descents (and line spacing, if applicable). * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::setFallbackFonts): Added. Temporarily stores the set of fallback fonts in a vector. (WebCore::InlineTextBox::takeFallbackFonts): Added. Returns the fallback fonts previously stored and removes them from storage. * rendering/InlineTextBox.h: * rendering/RenderText.cpp: (WebCore::RenderText::RenderText): Initialized the m_knownNotToUseFallbackFonts to false. (WebCore::RenderText::styleDidChange): Reset m_knownNotToUseFallbackFonts to false if the style difference is such that affects layout. (WebCore::RenderText::widthFromCache): Added a fallbackFonts parameter, which is passed down to Font::width(). (WebCore::RenderText::trimmedPrefWidths): Updated for the change to widthFromCache(). (WebCore::RenderText::calcPrefWidths): Made this call a private version of calcPrefWidths() that takes a fallbackFonts parameter and set the m_knownNotToUseFallbackFonts to true if the set comes back empty. The private version passes the fallbackFonts set to widthFromCache(). (WebCore::RenderText::setText): Reset m_knownNotToUseFallbackFonts to false. (WebCore::RenderText::createFallbackFontMetricsBox): Added. (WebCore::RenderText::width): Added a fallbackFonts parameter, which is passed down to calcPrefWidths(), widthFromCache() and Font::width(). Set m_knownNotToUseFallbackFonts to true when appropriate. * rendering/RenderText.h: * rendering/bidi.cpp: (WebCore::RenderBlock::constructLine): Added an assertion and a continue statement to remove one level of indentation. (WebCore::RenderBlock::computeHorizontalPositionsForLine): Temporarily store the set of fallback fonts in the InlineTextBox. (WebCore::RenderBlock::computeVerticalPositionsForLine): Added an assertion. 2009-04-09 David Hyatt <hyatt@apple.com> Reviewed by Adam Roben Rename all of the changed()/setChanged()/setDocumentChanged() methods to mention style recalc explicitly instead. * bindings/js/JSCustomPositionCallback.cpp: (WebCore::JSCustomPositionCallback::handleEvent): * bindings/js/JSCustomPositionErrorCallback.cpp: (WebCore::JSCustomPositionErrorCallback::handleEvent): * bindings/js/JSCustomSQLStatementCallback.cpp: (WebCore::JSCustomSQLStatementCallback::handleEvent): * bindings/js/JSCustomSQLStatementErrorCallback.cpp: (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): * bindings/js/JSCustomSQLTransactionCallback.cpp: (WebCore::JSCustomSQLTransactionCallback::handleEvent): * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent): * bindings/js/JSCustomVoidCallback.cpp: (WebCore::JSCustomVoidCallback::handleEvent): * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScriptControllerMac.mm: (WebCore::updateStyleIfNeededForBindings): (WebCore::ScriptController::initJavaJSBindings): * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::removeProperty): (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc): (WebCore::CSSMutableStyleDeclaration::setProperty): (WebCore::CSSMutableStyleDeclaration::setStringProperty): (WebCore::CSSMutableStyleDeclaration::setImageProperty): (WebCore::CSSMutableStyleDeclaration::parseDeclaration): (WebCore::CSSMutableStyleDeclaration::addParsedProperties): (WebCore::CSSMutableStyleDeclaration::setCssText): (WebCore::CSSMutableStyleDeclaration::merge): (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet): * css/CSSMutableStyleDeclaration.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::allVisitedStateChanged): (WebCore::CSSStyleSelector::SelectorChecker::visitedStateChanged): * css/CSSVariablesDeclaration.cpp: (WebCore::CSSVariablesDeclaration::removeVariable): (WebCore::CSSVariablesDeclaration::setVariable): (WebCore::CSSVariablesDeclaration::setNeedsStyleRecalc): * css/CSSVariablesDeclaration.h: * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::appendChild): (WebCore::ContainerNode::detach): (WebCore::ContainerNode::setFocus): (WebCore::ContainerNode::setActive): (WebCore::ContainerNode::setHovered): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): (WebCore::Document::scheduleStyleRecalc): (WebCore::Document::unscheduleStyleRecalc): (WebCore::Document::recalcStyle): (WebCore::Document::updateStyleIfNeeded): (WebCore::Document::updateStyleForAllDocuments): (WebCore::Document::updateLayout): (WebCore::Document::implicitClose): (WebCore::Document::prepareMouseEvent): (WebCore::Document::setFocusedNode): (WebCore::Document::setCSSTarget): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::recalcStyle): (WebCore::checkForSiblingStyleChanges): * dom/InputElement.cpp: (WebCore::InputElement::parseMaxLengthAttribute): * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::receivedTarget): * dom/Node.cpp: (WebCore::Node::Node): (WebCore::Node::setNeedsStyleRecalc): (WebCore::Node::lazyAttach): (WebCore::Node::dispatchGenericEvent): * dom/Node.h: (WebCore::Node::needsStyleRecalc): (WebCore::Node::childNeedsStyleRecalc): (WebCore::Node::setChildNeedsStyleRecalc): * dom/OptionElement.cpp: (WebCore::OptionElement::setSelectedState): * dom/ScriptElement.cpp: (WebCore::ScriptElementData::evaluateScript): * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): (WebCore::StyledElement::classAttributeChanged): (WebCore::StyledElement::parseMappedAttribute): * dom/Text.cpp: (WebCore::Text::recalcStyle): * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::insertErrorMessageBlock): * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::enable): * editing/Editor.cpp: (WebCore::Editor::setBaseWritingDirection): * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved): (WebCore::SelectionController::layout): (WebCore::SelectionController::focusedOrActiveStateChanged): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseMappedAttribute): * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): (WebCore::HTMLElement::isContentEditable): (WebCore::HTMLElement::isContentRichlyEditable): (WebCore::HTMLElement::contentEditable): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::parseMappedAttribute): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::parseMappedAttribute): (WebCore::HTMLFrameSetElement::recalcStyle): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): (WebCore::HTMLInputElement::setChecked): (WebCore::HTMLInputElement::setIndeterminate): (WebCore::HTMLInputElement::setValue): (WebCore::HTMLInputElement::setAutofilled): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::finishParsingChildren): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): (WebCore::HTMLObjectElement::finishParsingChildren): (WebCore::HTMLObjectElement::childrenChanged): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::recalcStyle): (WebCore::HTMLSelectElement::restoreState): (WebCore::HTMLSelectElement::setRecalcListItems): (WebCore::HTMLSelectElement::reset): (WebCore::HTMLSelectElement::typeAheadFind): * html/HTMLTableElement.cpp: (WebCore::setTableCellsChanged): (WebCore::HTMLTableElement::parseMappedAttribute): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setValue): * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::executeScript): (WebCore::FrameLoader::gotoAnchor): * page/DOMWindow.cpp: (WebCore::DOMWindow::alert): (WebCore::DOMWindow::confirm): (WebCore::DOMWindow::prompt): * page/EventHandler.cpp: (WebCore::EventHandler::hoverTimerFired): * page/FrameView.cpp: (WebCore::FrameView::layout): (WebCore::FrameView::needsLayout): * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::setNeedsStyleRecalc): (WebCore::AnimationBase::updateStateMachine): * page/animation/AnimationBase.h: * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): (WebCore::AnimationControllerPrivate::clear): (WebCore::AnimationControllerPrivate::updateAnimationTimer): (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): (WebCore::AnimationControllerPrivate::startupdateStyleIfNeededDispatcher): (WebCore::AnimationControllerPrivate::addEventToDispatch): (WebCore::AnimationControllerPrivate::addNodeChangeToDispatch): (WebCore::AnimationControllerPrivate::animationTimerFired): (WebCore::AnimationControllerPrivate::pauseAnimationAtTime): (WebCore::AnimationControllerPrivate::pauseTransitionAtTime): (WebCore::AnimationControllerPrivate::addToStartTimeResponseWaitList): (WebCore::AnimationController::cancelAnimations): * page/animation/AnimationControllerPrivate.h: * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::sendTransitionEvent): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::endAnimation): (WebCore::KeyframeAnimation::sendAnimationEvent): * rendering/RenderObject.cpp: (WebCore::RenderObject::updateDragState): * rendering/RenderView.cpp: (WebCore::RenderView::selectionBounds): * svg/SVGAElement.cpp: (WebCore::SVGAElement::svgAttributeChanged): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::svgAttributeChanged): * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::setNeedsUpdate): * svg/SVGForeignObjectElement.cpp: (WebCore::addCSSPropertyAndNotifyAttributeMap): * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::parseMappedAttribute): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::parseMappedAttribute): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): (WebCore::SVGUseElement::childrenChanged): (WebCore::SVGUseElement::recalcStyle): * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::updateAnimations): * wml/WMLAElement.cpp: (WebCore::WMLAElement::parseMappedAttribute): * wml/WMLInputElement.cpp: (WebCore::WMLInputElement::setValue): (WebCore::WMLInputElement::parseMappedAttribute): * wml/WMLNoopElement.cpp: (WebCore::WMLNoopElement::insertedIntoDocument): 2009-04-09 Brett Wilson <brettw@chromium.org> Reviewed by Darin Fisher. When there is a shadow set but it specifies "no shadow", clear the shadow shader. This will prevent Chromium from thinking there's a shadow and using the Skia codepath rather than Windows. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setPlatformShadow): 2009-04-09 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Crash when accessing svg.viewport on a detached SVGSVGElement https://bugs.webkit.org/show_bug.cgi?id=25105 * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::isOutermostSVG): return "true" that we are the "outermost" SVG element if we have no parent. (The spec is unclear as to what behavior we should have in this case, and I doubt anyone cares for now). 2009-04-09 Jian Li <jianli@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25084 Upstream changes to V8 bindings for XHR so that it can work under either DOMWindow or WorkerContext. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::dispose): (WebCore::WorkerContextExecutionProxy::retrieve): (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): (WebCore::WorkerContextExecutionProxy::findOrCreateEventListenerHelper): (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener): (WebCore::WorkerContextExecutionProxy::findOrCreateObjectEventListener): * bindings/v8/WorkerContextExecutionProxy.h: * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::getEventListener): (WebCore::ACCESSOR_SETTER): (WebCore::CALLBACK_FUNC_DECL): 2009-04-09 Darin Adler <darin@apple.com> Reviewed by Anders Carlsson and Sam Weinig. Part of <rdar://problem/5438063> Saving history containing 100,000 entries causes pauses of 2s while browsing Longer term solution is to change the design so Safari doesn't read and write all of history. This patch is step one: Do the serializing, which is done on the main thread, much faster. * WebCore.base.exp: Added new entry points. * WebCore.xcodeproj/project.pbxproj: Added new source files. * history/cf: Added. * history/cf/HistoryPropertyList.cpp: Added. * history/cf/HistoryPropertyList.h: Added. Code to write history files. In the future we'll also have code for reading here too. * platform/cf/BinaryPropertyList.cpp: Added. * platform/cf/BinaryPropertyList.h: Added. Code to write binary property list files. 2009-04-09 Simon Fraser <simon.fraser@apple.com> Reviewed by Antti Koivisto https://bugs.webkit.org/show_bug.cgi?id=25122 If deferred repainting is active, we need to ensure that there are no repaints pending at the end of layoutIfNeededRecursive, which is called just before painting via -viewWillDraw. * page/FrameView.cpp: (WebCore::FrameView::layoutIfNeededRecursive): 2009-04-09 John Grabowski <jrg@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25117 Fix Mac Chromium form controls. * rendering/RenderThemeChromiumMac.mm: When rendering native controls in Mac Chromium, use a clean NSGraphicsContext. Properly save and restore native graphics context. (WebCore::RenderThemeChromiumMac::paintCheckbox): (WebCore::RenderThemeChromiumMac::paintRadio): (WebCore::RenderThemeChromiumMac::paintMenuList): (WebCore::RenderThemeChromiumMac::paintSearchFieldCancelButton): (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsDecoration): (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsButton): 2009-04-09 Drew Wilson <atwilson@google.com> Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=25030 Refactor MessagePort code to enable Chrome to use a MessagePortProxy object instead of a real MessagePort for the entangledPort, since it could theoretically live in a separate process. The goal of this refactoring is to remove all assumptions that the object representing the entangled port is actually of type MessagePort. All operations that were previously directly modifying private MessagePort member variables in the entangled port (i.e. entangle(), postMessage()) have been changed to invoke functions in the MessagePortProxy interface instead which will allow the Chrome bindings to proxy these calls to another process. No new layout tests, as this is just a refactoring with no bug fixes or new functionality. * GNUmakefile.am: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::mark): * dom/MessagePort.cpp: (WebCore::MessagePort::clone): (WebCore::MessagePort::postMessage): (WebCore::MessagePort::deliverMessage): (WebCore::MessagePort::startConversation): (WebCore::MessagePort::close): (WebCore::MessagePort::entangle): (WebCore::MessagePort::unentangle): * dom/MessagePort.h: (WebCore::MessagePort::entangledPort): * dom/MessagePortProxy.h: Added. (WebCore::MessagePortProxy::~MessagePortProxy): 2009-04-08 Sam Weinig <sam@webkit.org> Reviewed by Geoffrey "Big Boy" Garen. Fix for <rdar://problem/5745677> Possible to stop load during an unload event Also fixes https://bugs.webkit.org/show_bug.cgi?id=20605 Tests: fast/events/stop-load-in-unload-handler-using-document-write.html fast/events/stop-load-in-unload-handler-using-window-stop.html Don't allow calling methods that would stop the new load inside the unload event. * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::stopAllLoaders): * loader/FrameLoader.h: 2009-04-09 David Kilzer <ddkilzer@apple.com> Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings Rolled r42345 back in. The build failure was caused by an internal script which had not been updated the same way that build-webkit was updated. * Configurations/WebCore.xcconfig: * DerivedSources.make: * bindings/objc/DOM.mm: (WebCore::createElementClassMap): (+[DOMNode _wrapNode:WebCore::]): * bindings/objc/DOMCSS.mm: (+[DOMCSSValue _wrapCSSValue:WebCore::]): * bindings/objc/DOMEvents.mm: (+[DOMEvent _wrapEvent:WebCore::]): * bindings/objc/DOMInternal.h: * bindings/objc/ExceptionHandlers.mm: (WebCore::raiseDOMException): * html/HTMLEmbedElement.idl: * html/HTMLFrameElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLObjectElement.idl: 2009-04-09 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=25109 Eliminate CompositeAnimationPrivate, which was a needless level of abstraction. Remove the methods like addToStyleAvailableWaitList() that simply turn around and call the animation controller. Rename animationControllerPriv() to animationController(). Rename willNeedService() to timeToNextService(). * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::~AnimationBase): (WebCore::AnimationBase::updateStateMachine): (WebCore::AnimationBase::timeToNextService): (WebCore::AnimationBase::beginAnimationUpdateTime): * page/animation/AnimationBase.h: * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::updateAnimationTimer): * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimation::~CompositeAnimation): (WebCore::CompositeAnimation::clearRenderer): (WebCore::CompositeAnimation::updateTransitions): (WebCore::CompositeAnimation::updateKeyframeAnimations): (WebCore::CompositeAnimation::animate): (WebCore::CompositeAnimation::getAnimatedStyle): (WebCore::CompositeAnimation::setAnimating): (WebCore::CompositeAnimation::timeToNextService): (WebCore::CompositeAnimation::getAnimationForProperty): (WebCore::CompositeAnimation::cleanupFinishedAnimations): (WebCore::CompositeAnimation::suspendAnimations): (WebCore::CompositeAnimation::resumeAnimations): (WebCore::CompositeAnimation::overrideImplicitAnimations): (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations): (WebCore::CompositeAnimation::isAnimatingProperty): (WebCore::CompositeAnimation::pauseAnimationAtTime): (WebCore::CompositeAnimation::pauseTransitionAtTime): (WebCore::CompositeAnimation::numberOfActiveAnimations): * page/animation/CompositeAnimation.h: (WebCore::CompositeAnimation::animationController): (WebCore::CompositeAnimation::isSuspended): (WebCore::CompositeAnimation::hasAnimations): (WebCore::CompositeAnimation::CompositeAnimation): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::sendTransitionEvent): (WebCore::ImplicitAnimation::timeToNextService): * page/animation/ImplicitAnimation.h: * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::sendAnimationEvent): (WebCore::KeyframeAnimation::timeToNextService): * page/animation/KeyframeAnimation.h: 2009-04-09 Alexey Proskuryakov <ap@webkit.org> Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings. It broke Mac build, and I don't know how to fix it. * Configurations/WebCore.xcconfig: * DerivedSources.make: * bindings/objc/DOM.mm: (WebCore::createElementClassMap): (+[DOMNode _wrapNode:WebCore::]): * bindings/objc/DOMCSS.mm: (+[DOMCSSValue _wrapCSSValue:WebCore::]): * bindings/objc/DOMEvents.mm: (+[DOMEvent _wrapEvent:WebCore::]): * bindings/objc/DOMInternal.h: * bindings/objc/ExceptionHandlers.mm: (WebCore::raiseDOMException): * html/HTMLEmbedElement.idl: * html/HTMLFrameElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLObjectElement.idl: 2009-04-09 Xan Lopez <xlopez@igalia.com> Unreviewed build fix. RenderView::docWidth() was made private by r42334. That commit changes its usage for overflowWidth(), so do that here too. * page/PrintContext.cpp: (WebCore::PrintContext::computePageRects): 2009-04-09 Xan Lopez <xlopez@igalia.com> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Based on a patch by Alp Toker. Implement AtkObject::ref_state_set. Still quite a few states not implemented. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-09 Xan Lopez <xlopez@igalia.com> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Based on a patch by Alp Toker. Move fallback object creation to its own function, as it will be used in several places. * page/gtk/AccessibilityObjectWrapperAtk.cpp: (fallbackObject): 2009-04-09 Xan Lopez <xlopez@igalia.com> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Based on a patch by Alp Toker. Move AccessibilityObject methods to their file. * page/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::wrapper): (WebCore::AccessibilityObject::setWrapper): * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-09 Xan Lopez <xlopez@igalia.com> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=21546 [GTK] ATK accessibility enhancements Rework accessibility type generation code, based on Mozilla a11y implementation. Have one base a11y type, and generate derived types that implement only the necessary interfaces at runtime, based on the specific object we are wrapping. This allows to save a lot of code while covering all possible cases. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-04-09 Eric Seidel <eric@webkit.org> Reviewed by Oliver Hunt. Fix document.implementation.createDocument(null, "a:b") not to crash! https://bugs.webkit.org/show_bug.cgi?id=25096 Test: fast/dom/DOMImplementation/createDocument-namespace-err.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::addChild): add ASSERT() to give a better crash next time * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): check the exception code before using the result 2009-04-08 Adam Roben <aroben@apple.com> Make <select>s in application chrome documents match the Vista system dialog look Reviewed by Dave Hyatt. * rendering/RenderThemeWin.cpp: (WebCore::documentIsInApplicationChromeMode): Added this simple helper function. (WebCore::RenderThemeWin::getThemeData): In application chrome mode, the drop down button never uses any look but the "normal" look. (WebCore::RenderThemeWin::paintMenuList): In application chrome mode, use the "readonly" style to match system dialogs. 2009-04-08 Adam Roben <aroben@apple.com> Fix <rdar://6592515> Crash closing tab with Top Sites or Cover Flow showing after clicking "Go Back" in phishing alert RenderButton's m_timer is not stopped when its Document enters the page cache. When the WebView was torn down, the timer would fire after the Frame's Page had been destroyed, leading to a crash. This patch just makes the timer do nothing when it fires. Making the timer not fire when in the page cache is covered by bug 25110. Reviewed by Dave Hyatt. No test possible. * rendering/RenderButton.cpp: (WebCore::RenderButton::timerFired): Do nothing when we're in the page cache. 2009-04-09 David Hyatt <hyatt@apple.com> Reviewed by Adam Roben Fix bugs where we would mistakenly turn off blitting for iframes if an external paint caused the checks to be triggered too early in the loading process of the frame. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): 2009-04-08 Simon Fraser <simon.fraser@apple.com> Reviewed by Cameron Zwarich https://bugs.webkit.org/show_bug.cgi?id=25106 Fix signature of virtual function on AnimationBase so that it matches those in the derived classes, by removing unused parameter. * page/animation/AnimationBase.h: (WebCore::AnimationBase::endAnimation): 2009-04-08 David Kilzer <ddkilzer@apple.com> <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings Reviewed by Darin Adler and Maciej Stachowiak. Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so that SVG DOM Objective-C bindings may be optionally disabled. * Configurations/WebCore.xcconfig: Added ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in FEATURE_DEFINES and EXCLUDED_SOURCE_FILE_NAMES. When SVG DOM Objective-C bindings are disabled, two generated header files no longer exist and none of the generated DOMSVG*.mm files should be compiled. * DerivedSources.make: All of the WebCore.SVG*.exp files contain SVG DOM Objective-C bindings classes, so exclude them unless ENABLE_SVG_DOM_OBJC_BINDINGS is set. * bindings/objc/DOM.mm: Switched from using ENABLE(SVG) to using ENABLE(SVG_DOM_OBJC_BINDINGS). (WebCore::createElementClassMap): (+[DOMNode _wrapNode:WebCore::]): * bindings/objc/DOMCSS.mm: Ditto. (+[DOMCSSValue _wrapCSSValue:WebCore::]): * bindings/objc/DOMEvents.mm: Ditto. (+[DOMEvent _wrapEvent:WebCore::]): * bindings/objc/DOMInternal.h: Ditto. * bindings/objc/ExceptionHandlers.mm: Added use of ENABLE(SVG_DOM_OBJC_BINDINGS). (WebCore::raiseDOMException): * html/HTMLEmbedElement.idl: Excluded -getSVGDocument method in generated Objective-C DOM classes if SVG DOM Objective-C bindings are disabled. * html/HTMLFrameElement.idl: Ditto. * html/HTMLIFrameElement.idl: Ditto. * html/HTMLObjectElement.idl: Ditto. 2009-04-08 Dan Bernstein <mitz@apple.com> Reviewed by Sam Weinig. - limit the workaround for <rdar://problem/5781372> to Mac OS X versions that need it * platform/mac/WebFontCache.mm: (fixUpWeight): Changed this function to be a no-op post-Leopard. 2009-04-08 Dan Bernstein <mitz@apple.com> Reviewed by Dave Hyatt. - fix <rdar://problem/6771547> Appending to a RenderText causes all its lines to be dirtied Test: fast/repaint/text-append-dirty-lines.html * rendering/RenderText.cpp: (WebCore::RenderText::setTextWithOffset): If no text boxes intersected with or came after the new text, dirty the last root box, since the new text may begin there. Having at least one dirty line prevents the incorrect dirtying of all lines later during layoutInlineChildren(). 2009-04-08 Darin Fisher <darin@chromium.org> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25100 Fixes a Chromium-specific crash in WebCore::ImageBuffer::context that occurs when rendering semi-transparent RTL text. Test: fast/text/complex-text-opacity.html * platform/graphics/chromium/FontChromiumWin.cpp: Handle RTL when computing text bounds. (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds): 2009-04-08 David Hyatt <hyatt@apple.com> Reviewed by Beth Dakin Fix a porting error in my previous patch. A != was supposed to be an ==. * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): 2009-04-08 David Hyatt <hyatt@apple.com> Reviewed by Adam Roben and Darin Adler Fix for https://bugs.webkit.org/show_bug.cgi?id=12440, repaints inconsistent for fixed positioned elements. Rewrite the updateScrollers method to be more correct in its results. Test: fast/block/positioning/fixed-positioning-scrollbar-bug.html * dom/Document.cpp: (WebCore::Document::recalcStyle): (WebCore::Document::implicitClose): * page/FrameView.cpp: (WebCore::FrameView::createScrollbar): (WebCore::FrameView::layout): (WebCore::FrameView::adjustPageHeight): * page/FrameView.h: * page/win/FrameWin.cpp: (WebCore::computePageRectsForFrame): * platform/ScrollView.cpp: (WebCore::ScrollView::ScrollView): (WebCore::ScrollView::updateScrollbars): * platform/ScrollView.h: * rendering/RenderView.cpp: (WebCore::RenderView::layout): (WebCore::RenderView::docHeight): (WebCore::RenderView::docWidth): * rendering/RenderView.h: 2009-04-08 Sam Weinig <sam@webkit.org> Reviewed by Anders Carlsson. Fix for <rdar://problem/6226200> Implement Microsoft's X-FRAME-OPTIONS anti-framing defense Tests: http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html http/tests/security/XFrameOptions/x-frame-options-deny.html http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html * dom/Document.cpp: (WebCore::Document::processHttpEquiv): Stop the current load and redirect to about:blank if an X-FRAME-OPTIONS <meta> tag http-equiq dictates we should. * loader/FrameLoader.cpp: (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions): Add logic to parse the X-FRAME-OPTIONS parameter. * loader/FrameLoader.h: * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::didReceiveResponse): Stop the current load if framed and a X-FRAME-OPTIONS header and its parameter dictate that we should. 2009-04-08 Adam Roben <aroben@apple.com> Fix http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect.html on Windows Reviewed by Sam Weinig. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): Mimic the ResourceHandleMac code by propagating the CFError's error code for kCFErrorDomainCFNetwork errors to the ResourceResponse. 2009-04-08 Anders Carlsson <andersca@apple.com> Try to fix the PPC build. * plugins/npfunctions.h: 2009-04-08 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. <rdar://problem/5908616> tokenizer resizer should handle edge cases consistently * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::enlargeBuffer): Handle edge cases the same way as a failed fastMalloc. (WebCore::HTMLTokenizer::enlargeScriptBuffer): Ditto. 2009-04-08 David Hyatt <hyatt@apple.com> Reviewed by Darin Adler Make sure that cloneNode works with SVG attributes that require synchronization. This fixes issues with <use> element shadow tree cloning where the clones can end up not obtaining the correct attribute values. A subsequent patch of mine will expose this problem and cause it to be covered by existing layout tests, so no test is required at this time for this problem. * dom/Element.cpp: (WebCore::Element::cloneElementWithoutChildren): 2009-04-08 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=25093 REGRESSION: some scripts are showing in the Inspector with only "true" as the source. * inspector/InspectorController.cpp: (WebCore::InspectorController::didParseSource): Fixed conversion issue. (WebCore::InspectorController::failedToParseSource): Ditto. 2009-04-08 Adam Barth <abarth@webkit.org> Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=24904 Verify the MIME type of stylesheets (in standards mode) by looking at the Content-Type header directly. This bypasses any content sniffing that might be confusing the issue. Test: http/tests/mime/standard-mode-loads-stylesheet-without-content-type-header.html * loader/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::canUseSheet): 2009-04-08 Eric Carlson <eric.carlson@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25041 <rdar://problem/6697754> Bug 25041: HTMLMediaElement: OSX autoplay broken by r41907 OSX media player should set readyState to HAVE_ENOUGH_DATA when the movie's load state reaches QTMovieLoadStatePlaythroughOK, not when the entire file has been downloaded, so autoplay can begin when it should. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::updateStates): Set readState to HAVE_ENOUGH_DATA when QTMovie load state reaches QTMovieLoadStatePlaythroughOK. (WebCore::MediaPlayerPrivate::paint): Add braces missed in r42203. 2009-04-08 Alexey Proskuryakov <ap@webkit.org> Reviewed by David Kilzer. Based on a patch by Grace Kloba. https://bugs.webkit.org/show_bug.cgi?id=24656 cacheControlContainsNoCache() in ResourceResponseBase.h is wrong * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::parseCacheControlDirectives): Removed misused code for parsing directive values, fixing parsing of directives that we care about. * platform/network/ResourceResponseBase.h: (WebCore::ResourceResponseBase::cacheControlContainsNoCache): Fixed a copy/paste mistake, m_cacheControlContainsMustRevalidate was returned instead of m_cacheControlContainsNoCache. 2009-04-08 Adam Roben <aroben@apple.com> Make text fields match the system look on Vista Reviewed by Dave Hyatt. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::getThemeData): Use the new-to-Vista EP_EDITBORDER_NOSCROLL part for text fields. 2009-04-07 Alexey Proskuryakov <ap@webkit.org> Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=24957 REGRESSION: Google calendar widget no longer shows upcoming events Test: http/tests/xmlhttprequest/authorization-header.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData): Removed Authorization from the list of forbidden headers. 2009-04-07 miggilin <mr.diggilin@gmail.com> Reviewed by Kevin Ollivier. Remove no longer needed debug warning and Windows-specific codepaths (as we now use the Safari/Win port's timer there) https://bugs.webkit.org/show_bug.cgi?id=25070 * platform/wx/SharedTimerWx.cpp: (WebCore::setSharedTimerFireTime): 2009-04-07 Adam Roben <aroben@apple.com> Fix many <video> regression tests on Windows Reviewed by Dave Hyatt. * platform/graphics/win/QTMovieWin.cpp: (QTMovieWin::getNaturalSize): Call GetMovieNaturalBoundsRect, which returns the movie's natural bounds (duh), rather than GetMovieBox, which returns the movie's current displayed size/position. 2009-04-07 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler and Sam Weinig <rdar://problem/5968249> "Private Browsing" doesn't affect HTML 5 LocalStorage The expected behavior for persistent storage when private browsing mode is undefined by the spec. For now we're going with a "read-only when in private browsing" policy until we can get feedback and/or get the behavior specified in the spec. Note that I purposefully made the change to restrict SessionStorage to read-only, also, with the understanding that the spec allows for SessionStorage to persist across relaunches, even though our implementation currently doesn't do this. * dom/DOMCoreException.idl: Add some new ExceptionCodes defined in HTML5, one of which is needed for LocalStorage changes (QUOTA_EXCEEDED_ERR) * dom/ExceptionCode.cpp: * dom/ExceptionCode.h: * storage/StorageArea.cpp: (WebCore::StorageArea::internalSetItem): If private browsing is enabled, throw the QUOTA_EXCEEDED_ERR exception as the spec allows. (WebCore::StorageArea::internalRemoveItem): If private browsing is enabled, silently fail to remove the item. (WebCore::StorageArea::internalClear): If private browsing is enabled, silently fail to clear the area. 2009-04-07 Dean Jackson <dino@apple.com> Reviewed by Simon Fraser. <rdar://problem/6148255> Standalone media documents can not always handle everything using a <video> element. In these cases switch to an <embed> element that uses the QuickTime plugin, in the hope that it will have more luck. Typical media types that trigger this are streamed media and QTVR. Equivalent Windows fix to come once reviewed. Note also that this area of code needs a cleanup: https://bugs.webkit.org/show_bug.cgi?id=25085 * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): * html/HTMLMediaElement.h: * loader/MediaDocument.cpp: (WebCore::MediaDocument::mediaElementSawUnsupportedTracks): (WebCore::MediaDocument::replaceVideoWithEmbed): * loader/MediaDocument.h: - removes the <video> element and puts in an <embed> * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerSawUnsupportedTracks): - new internal method for flagging a problem * platform/graphics/mac/MediaPlayerPrivateQTKit.h: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::updateStates): - looks for the types of content we don't handle (WebCore::MediaPlayerPrivate::rateChanged): (WebCore::MediaPlayerPrivate::sizeChanged): (WebCore::MediaPlayerPrivate::timeChanged): (WebCore::MediaPlayerPrivate::didEnd): (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): (WebCore::MediaPlayerPrivate::sawUnsupportedTracks): - inform the MediaClient that we have a potential problem 2009-04-07 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. - fix <rdar://problem/6767428> Resurrect +[WebFontCache fontWithFamily:traits:size:] for clients that call it directly WebFontCache is a class in the WebCore framework and is not WebKit API, but apparently (perhaps mistakenly) some clients call this private interface. This change resurrects the interface and gives it reasonable behavior (however, note that WebCore will not call the old interface, so hacks that override it will have no effect on WebKit clients). * platform/mac/WebFontCache.h: * platform/mac/WebFontCache.mm: (+[WebFontCache fontWithFamily:traits:size:]): Added. Call through to +fontWithFamily:traits:weight:size:. 2009-04-07 David Hyatt <hyatt@apple.com> Reviewed by Adam Roben Fix ScrollView's algorithm that determines whether or not to show scrollbars. There was a bug with the method mainly because RenderView will size itself to the viewport's size, making it impossible to really know the document's "true" size. In order to solve this problem ScrollView now has a minimumContentsSize method. This method returns the document size excluding the RenderView from the calculation. This width/height is now cached on RenderView in m_docWidth/m_docHeight member variables. * WebCore.base.exp: * page/FrameView.cpp: (WebCore::FrameView::adjustPageHeight): (WebCore::FrameView::minimumContentsSize): * page/FrameView.h: * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): * platform/ScrollView.h: (WebCore::ScrollView::minimumContentsSize): * rendering/RenderView.cpp: (WebCore::RenderView::layout): (WebCore::RenderView::calcDocHeight): (WebCore::RenderView::calcDocWidth): * rendering/RenderView.h: (WebCore::RenderView::docWidth): (WebCore::RenderView::docHeight): 2009-04-07 Dimitri Glazkov <dglazkov@chromium.org> Build fix, not reviewed. * WebCore.xcodeproj/project.pbxproj: Made ScriptObject.h private. 2009-04-07 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=25063 Refactor InspectorController to use ScriptObject/State. * GNUmakefile.am: Added ScriptState.cpp. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCoreSources.bkl: Ditto. * bindings/js/JSInspectorControllerCustom.cpp: (WebCore::JSInspectorController::addSourceToFrame): Fixed argument index typo. * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::call): Added reportExceptions parameter. (WebCore::ScriptFunctionCall::construct): Ditto. * bindings/js/ScriptFunctionCall.h: Ditto. * bindings/js/ScriptObject.cpp: (WebCore::handleException): Added exception-reporting heloper. (WebCore::ScriptObject::set): Changed to use handleException. (WebCore::ScriptGlobalObject::set): Ditto, * bindings/js/ScriptObject.cpp: Added ScriptGlobalObject. (WebCore::ScriptGlobalObject::set): Added. (WebCore::ScriptGlobalObject::getObject): Added. * bindings/js/ScriptObject.h: Added ScriptGlobalObject decls. (WebCore::ScriptGlobalObject::ScriptGlobalObject): Added. * bindings/js/ScriptState.cpp: Added. * bindings/js/ScriptState.h: Added scriptStateFromPage decl. * inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::addToConsole): Changed to not report exceptions to avoid re-entrancy. * inspector/InspectorController.cpp: Refactored to use ScriptState/Object. * inspector/InspectorController.h: Ditto. 2009-04-07 Adam Langley <agl@google.com> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25083 Skia was previously calculating the leading value incorrectly, leading us to add fHeight to get the height of a line of text. Now that Skia is calculating fLeading correctly, we can remove fHeight. This doesn't affect any layout tests. * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::platformInit): 2009-04-07 Brian Weinstein <bweinstein@gmail.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24851 This fix removes the status code from the status message in a ResourceResponse, which allows a few more tests in http to pass. * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit): 2009-04-07 Adam Langley <agl@google.com> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25081 Skia is changing from reporting the XRange to reporting the XMin and XMax. Obviously these are equivalent, but other users of the metrics need the two numbers to be separate. This doesn't affect any layout tests. * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::platformInit): 2009-04-07 Adam Roben <aroben@apple.com> Make the look of <select>s match the system look on Vista Reviewed by Dave Hyatt. * rendering/RenderThemeWin.cpp: Added new constants. (WebCore::RenderThemeWin::getThemeData): On Vista, use the CP_DROPDOWNBUTTONRIGHT part for drop down buttons. (WebCore::RenderThemeWin::paintMenuList): On Vista, use the CP_BORDER part to draw the border of <select>s. (WebCore::RenderThemeWin::paintMenuListButton): On Vista, outset the drop down button to make its border coincide with the <select>'s border. 2009-04-07 Adam Roben <aroben@apple.com> Move isRunningOnVistaOrLater to a shared location Rubber-stamped in advance by Dave Hyatt. * WebCore.vcproj/WebCore.vcproj: Added SystemInfo.{cpp,h}, and let VS have its way with the rest of the file. * platform/win/ScrollbarThemeWin.cpp: Moved isRunningOnVistaOrLater from here... * platform/win/SystemInfo.cpp: Added. (WebCore::isRunningOnVistaOrLater): ...to here. * platform/win/SystemInfo.h: Added. 2009-04-07 Paul Godavari <paul@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=24692 Enable PopupMenuChromium to handle HTML select popups using native cocoa controls on the Mac, all other platforms are unchanged. We also split out the storage container for the popup menu items so that ChromeClientChromium can access them for forwarding to the embedding host (Chromium.app or test_shell). * page/chromium/ChromeClientChromium.h: * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::items): (WebCore::PopupContainer::PopupContainer): (WebCore::PopupContainer::~PopupContainer): (WebCore::PopupContainer::showPopup): (WebCore::PopupContainer::showExternal): (WebCore::PopupContainer::menuItemHeight): (WebCore::popupData): (WebCore::PopupListBox::pointToRowIndex): (WebCore::PopupListBox::getRowBounds): (WebCore::PopupListBox::isSelectableItem): (WebCore::PopupListBox::updateFromElement): (WebCore::PopupListBox::layout): (WebCore::PopupListBox::clear): (WebCore::PopupMenu::show): * platform/chromium/PopupMenuChromium.h: (WebCore::PopupItem::): (WebCore::PopupItem::PopupItem): 2009-04-07 Geoffrey Garen <ggaren@apple.com> Reviewed by Oliver Hunt. Added some double-checking to event handler marking. Now, when the wrapper that's responsible for marking an event handler's JavaScript function gets collected, it clears the event handler's JavaScript function so we won't dereference it after it's collected. In theory, we would never dereference a JavaScript event handler after its node's wrapper was collected anyway, but it's nice to be safe. * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::mark): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::jsFunction): (WebCore::JSEventListener::invalidateJSFunction): (WebCore::JSEventListener::markJSFunction): * bindings/js/JSEventListener.h: * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::mark): * bindings/js/JSNodeCustom.cpp: (WebCore::markEventListeners): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::mark): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::mark): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::mark): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::mark): * bindings/scripts/CodeGeneratorJS.pm: * dom/EventListener.h: (WebCore::EventListener::invalidateJSFunction): (WebCore::EventListener::markJSFunction): (WebCore::markIfNotNull): 2009-04-07 David Levin <levin@chromium.org> Build fix. r44280 undid the change in r42268 that made CookieJar.h private. This redoes the change. * WebCore.xcodeproj/project.pbxproj: 2009-04-07 Jian Li <jianli@chromium.org> Reviewed by Darin Fisher. Upstream changes to WorkerContextExecutionProxy for enabling V8 preemption. https://bugs.webkit.org/show_bug.cgi?id=25034 * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::evaluate): 2009-04-07 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. - fix <rdar://problem/6764359> Thai word selection misbehaves for the last sentence in the document Test: editing/selection/thai-word-at-document-end.html * editing/visible_units.cpp: - Added a BoundarySearchContextAvailability enum used to indicate whether the caller to a boundary search function may be able to provide additional text in the search direction and call again. - Added a named type for the boundary search function signature. Changed the signature to take a context availability parameter and a boolean out parameter indicating whether more context is needed to perform the search. (WebCore::previousBoundary): If the beginning of the range was reached but the last search wanted more context, perform the search again, this time indicating that there is no earlier text. (WebCore::nextBoundary): Similarly, in the other direction. (WebCore::startWordBoundary): Check whether more context may be available and ask for more context if needed. (WebCore::endWordBoundary): Ditto. (WebCore::previousWordPositionBoundary): Ditto. (WebCore::nextWordPositionBoundary): Ditto. (WebCore::startSentenceBoundary): Updated signature. (WebCore::endSentenceBoundary): Ditto. (WebCore::previousSentencePositionBoundary): Ditto. (WebCore::nextSentencePositionBoundary): Ditto. 2009-04-07 Geoffrey Garen <ggaren@apple.com> Rubber stamped by Sam Weinig. A little renaming: function => jsFunction listener => jsFunction * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent): (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::~JSEventListener): (WebCore::JSEventListener::jsFunction): (WebCore::JSEventListener::mark): (WebCore::JSProtectedEventListener::JSProtectedEventListener): (WebCore::JSProtectedEventListener::~JSProtectedEventListener): (WebCore::JSProtectedEventListener::jsFunction): * bindings/js/JSEventListener.h: (WebCore::JSProtectedEventListener::create): * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::jsFunction): (WebCore::JSLazyEventListener::parseCode): * dom/EventListener.h: (WebCore::EventListener::jsFunction): 2009-04-07 Brady Eidson <beidson@apple.com> Reviewed by Darin Adler While working on <rdar://problem/5968249>, noticed some glaring problems with LocalStorage. * page/DOMWindow.cpp: (WebCore::DOMWindow::localStorage): Return the cached m_localStorage object if it exists to avoid creating multiple representations for the same underlying StorageArea. * page/DOMWindow.h: (WebCore::DOMWindow::optionalLocalStorage): Return m_localStorage, not m_sessionStorage. 2009-04-07 Darin Adler <darin@apple.com> Roll out incorrect build fix. * WebCore.NPAPI.exp: Reverted. 2009-04-07 Darin Adler <darin@apple.com> Another build fix. * WebCore.NPAPI.exp: Added new functions. 2009-04-07 Anders Carlsson <andersca@apple.com> Another build fix. * plugins/npfunctions.h: 2009-04-07 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Unreviewed build fix. Fix non-Mac builds. * bridge/npapi.h: 2009-04-07 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=25082 Clean up repaint logic when RenderLayers become and stop being composited. * rendering/RenderLayer.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::rendererContentChanged): (WebCore::RenderLayer::repaintIncludingNonCompositingDescendants): New compositing-only method that repaints a layer and all its non-composited descendants. Takes a repaintContainer for performance; all the repaints necessarily share the same repaintContainer. * rendering/RenderLayerCompositor.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateLayerCompositingState): Rather than use calculateCompositedBounds() to compute the repaint rect (which gave the wrong answer when the composited layer tree was in flux), use the new repaintOnCompositingChange() method. (WebCore::RenderLayerCompositor::repaintOnCompositingChange): Call repaintIncludingNonCompositingDescendants(), and if necessary make sure that the view/layer drawing synchronization happens. (WebCore::RenderLayerCompositor::computeCompositingRequirements): Do a repaintOnCompositingChange() when a layer is going to be composited. This is a good place because we haven't started to change the compositing tree. (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): After we've finished updating all the descendant layers, we can do a repaint for layers that ceased compositing. 2009-04-07 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=25069 Clean up the accelerated compositing code that determines the format of the GraphicsLayer hierarchy, being more explicit about which parts have to happen before and after descendant layers have been updated. Also remove some unhelpful caching of state. * dom/Document.cpp: (WebCore::Document::recalcStyle): Only call updateCompositingLayers() if we know we're not going to be doing a layout soon. * platform/graphics/mac/GraphicsLayerCA.mm: (WebCore::GraphicsLayerCA::setDrawsContent): Toggling drawsContent from false to true should do a setNeedsDisplay(). * rendering/RenderLayer.cpp: (WebCore::RenderLayer::styleChanged): updateLayerCompositingState() no longer updates the layer geometry, so do that here if we're not going to rebuild layers anyway. Also, updateLayerCompositingState() no longer does a setContentsNeedDisplay, so do that if the style change indicates that a repaint is required. * rendering/RenderLayerBacking.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::RenderLayerBacking): (WebCore::RenderLayerBacking::updateAfterLayout): The 'drawing optimizations' logic has been rolled into updateGraphicsLayerConfiguration() and updateGraphicsLayerGeometry(). (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Group that code that decides what GraphicsLayers are needed into this method, which deals with clipping layers and 'direct compositing': images that can be rendered via the compositor. (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Call setDrawsContent() if updateGraphicsLayerConfiguration() didn't already figure it out for image layers. (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Remove the m_simpleCompositingLayerStatusDirty cache indicator, since we just computed it every time anyway. * rendering/RenderLayerCompositor.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateLayerCompositingState): updateGraphicsLayers() was renamed to updateGraphicsLayerConfiguration(), which calls clippedByAncestor() etc. itself rather than having everything passed in. Repaints are taken care of by styleChanged() and setDrawsContent(). (WebCore::RenderLayerCompositor::calculateCompositedBounds): !layer->isComposited() && layer->transform() is a synonym for paintsWithTransform(). (WebCore::RenderLayerCompositor::setCompositingParent): No need to call updateGraphicsLayerGeometry() here, because we're going to rebuild layers anyway. (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Add comments, and test layerBacking instead of layer->isComposited(). 2009-04-07 Anders Carlsson <andersca@apple.com> Fix build. * WebCore.base.exp: 2009-04-07 Anders Carlsson <andersca@apple.com> Reviewed by Sam Weinig. <rdar://problem/6667001> NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo() * WebCore.base.exp: Add symbols needed by WebKit. * WebCore.xcodeproj/project.pbxproj: Make CookieJar a private header. * bridge/npapi.h: Add function definitions. * plugins/npfunctions.h: Fix the NPN_SetValueForURLProcPtr signature. 2009-04-07 Adam Roben <aroben@apple.com> Fix <rdar://6520933> REGRESSION (3.2.1-ToT): Scroll bar disappears in WebView and Bookmarks view after switching theme or turning on High Contrast mode Reviewed by Dave Hyatt. * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::themeChanged): Null out scrollbarTheme after closing it so that we'll re-open the theme next time we paint. 2009-04-07 Adam Roben <aroben@apple.com> Small cleanup/correctness fix in ScrollbarThemeWin Reviewed by Dave Hyatt. * platform/win/ScrollbarThemeWin.cpp: Removed the now-unused haveTheme boolean. (WebCore::checkAndInitScrollbarTheme): Check IsThemeActive() before calling OpenThemeData. This seems to be what MSDN recommends. (WebCore::ScrollbarThemeWin::themeChanged): Null-check scrollbarTheme before closing it, rather than indirectly null-checking it via checking haveTheme. 2009-04-07 Dan Bernstein <mitz@apple.com> Reviewed by John Sullivan. - when -webkit-line-break: after-white-space is specified but the text does not auto-wrap, do not shrink the trailing space to fit in the available width Test: fast/text/whitespace/nowrap-line-break-after-white-space.html - when shrinking such trailing space, do not shrink below zero Covered by existing tests * rendering/bidi.cpp: (WebCore::RenderBlock::computeHorizontalPositionsForLine): (WebCore::RenderBlock::layoutInlineChildren): 2009-04-07 Eric Seidel <eric@webkit.org> Reviewed by Darin Adler. Move RangeBoundaryPoint off of Position, per Darin's suggestion https://bugs.webkit.org/show_bug.cgi?id=24966 Rename setToChild to setToBeforeChild (since that's what the method does) * dom/Position.h: (WebCore::Position::offsetInContainerNode): * dom/Range.cpp: (WebCore::Range::insertNode): (WebCore::Range::selectNodeContents): (WebCore::boundaryNodeWillBeRemoved): * dom/Range.h: (WebCore::Range::startPosition): (WebCore::Range::endPosition): * dom/RangeBoundaryPoint.h: (WebCore::RangeBoundaryPoint::RangeBoundaryPoint): (WebCore::RangeBoundaryPoint::container): (WebCore::RangeBoundaryPoint::childBefore): (WebCore::RangeBoundaryPoint::position): (WebCore::RangeBoundaryPoint::offset): (WebCore::RangeBoundaryPoint::clear): (WebCore::RangeBoundaryPoint::set): (WebCore::RangeBoundaryPoint::setOffset): (WebCore::RangeBoundaryPoint::setToBeforeChild): (WebCore::RangeBoundaryPoint::setToStartOfNode): (WebCore::RangeBoundaryPoint::setToEndOfNode): (WebCore::RangeBoundaryPoint::childBeforeWillBeRemoved): (WebCore::RangeBoundaryPoint::invalidateOffset): 2009-04-07 Eric Seidel <eric@webkit.org> Reviewed by Darin Adler. Add containerNode(), computeOffsetInContainerNode(), computeNodeBeforePosition() and computeNodeAfterPosition(). https://bugs.webkit.org/show_bug.cgi?id=24763 These functions will replace uses of rangeCompliantPosition() in future patches. No changes in behavior, thus no tests. * dom/Position.cpp: (WebCore::Position::containerNode): (WebCore::Position::computeOffsetInContainerNode): (WebCore::Position::computeNodeBeforePosition): (WebCore::Position::computeNodeAfterPosition): (WebCore::Position::anchorType): * dom/Position.h: (WebCore::Position::): 2009-04-06 Sam Weinig <sam@webkit.org> Reviewed by Mark Rowe. Bottleneck dispatching mutation events in a new dispatchMutationEvent function. * dom/CharacterData.cpp: (WebCore::CharacterData::dispatchModifiedEvent): * dom/ContainerNode.cpp: (WebCore::dispatchChildInsertionEvents): (WebCore::dispatchChildRemovalEvents): * dom/Node.cpp: (WebCore::Node::dispatchSubtreeModifiedEvent): (WebCore::Node::dispatchMutationEvent): * dom/Node.h: 2009-04-06 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25059 Remove references to dominantScript, getGenericFontForScript. * platform/graphics/chromium/FontCacheChromiumWin.cpp: Removed references to getGenericFontForScript. (WebCore::FontCache::getLastResortFallbackFont): Removed calls to dominantScript. * platform/graphics/chromium/FontCacheLinux.cpp: Ditto. * rendering/RenderThemeChromiumLinux.cpp: (WebCore::defaultGUIFont): Removed Document* arg. (WebCore::RenderThemeChromiumLinux::systemFont): Ditto. * rendering/RenderThemeChromiumLinux.h: Ditto. * rendering/RenderThemeChromiumMac.h: Ditto. * rendering/RenderThemeChromiumMac.mm: Ditto. (WebCore::RenderThemeChromiumMac::systemFont): Ditto. * rendering/RenderThemeChromiumWin.cpp: (WebCore::defaultGUIFont): Ditto. (WebCore::RenderThemeChromiumWin::systemFont): Ditto. * rendering/RenderThemeChromiumWin.h: Ditto. 2009-04-06 Geoffrey Garen <ggaren@apple.com> Reviewed by Darin Adler. Fixed https://bugs.webkit.org/show_bug.cgi?id=21260 Unbounded memory growth when churning elements with anonymous event handler functions The problem was that a protected event listener's scope chain would end up with a reference to the Node protecting it, causing a cycle. The solution is to stop protecting event listeners and rely on marking instead. This patch converts most Node event listeners to use marking instead of GC protection. * bindings/js/JSDOMBinding.cpp: (WebCore::isObservableThroughDOM): (WebCore::markDOMNodesForDocument): Refactored the test for whether a Node needs marking, and added a case for marking the node in order to mark its event listeners. * bindings/js/JSNodeCustom.cpp: (WebCore::markEventListeners): (WebCore::JSNode::addEventListener): (WebCore::JSNode::removeEventListener): (WebCore::JSNode::mark): Added code to mark a Node's event listeners when marking the Node. Changed code using protected event listeners to use event listeners. * dom/Node.idl: Changed code using protected event listeners to use event listeners. 2009-04-06 Sam Weinig <sam@webkit.org> Reviewed by Darin Adler. Remove unchecked bool return values for some dispatch event functions. * dom/Node.cpp: (WebCore::Node::dispatchSubtreeModifiedEvent): (WebCore::Node::dispatchUIEvent): (WebCore::Node::dispatchWebKitAnimationEvent): (WebCore::Node::dispatchWebKitTransitionEvent): (WebCore::Node::dispatchProgressEvent): * dom/Node.h: 2009-04-06 Darin Fisher <darin@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25058 Fix chromium build bustage caused by r42216 * bindings/scripts/CodeGeneratorJS.pm: * page/DOMWindow.idl: 2009-04-06 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Rubber-stamped by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=20575 No localization in WebKitGtk * platform/gtk/FileChooserGtk.cpp: Remove usage of glib/gi18n.h, since there are not translatable strings. * platform/gtk/LocalizedStringsGtk.cpp: Use the glib i18n header that is specific for libraries. 2009-04-06 Mike Belshe <mike@belshe.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24978 Use custom implementations of a few Node methods so that we don't over-aggressively create JS wrappers here. * bindings/v8/custom/V8NodeCustom.cpp: Added custom implementations. * dom/Node.idl: Removed JSC-specifier, making impl custom for V8 as well. 2009-04-06 Dave Moore <davemoore@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25031 Make the V8 element collections check for named properties *before* checking if there are any elements with the same name. Otherwise it is both incorrect and slow. Test: fast/dom/HTMLSelectElement/length-not-overridden.html Both of these interceptors were attempting to find an element in the collection that had a name or id of the property name before checking for a JS property with that name. * bindings/v8/V8Collection.h: (WebCore::collectionNamedPropertyGetter): (WebCore::nodeCollectionNamedPropertyGetter): 2009-04-06 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=25052 Pull the call to updateGraphicsLayerGeometry() out of updateGraphicsLayers(), because we need to call it at the end of rebuildCompositingLayerTree() once we've determined which descendant layers are composited, otherwise calculateCompositedBounds() can give the wrong answer. Now that updateLayerCompositingState() doesn't end up calling updateGraphicsLayerGeometry(), call that explicitly from styleChanged(), if we know a layer update is not pending, and similarly from updateAfterLayout(). Test: compositing/overflow/overflow-positioning.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::styleChanged): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateAfterLayout): (WebCore::RenderLayerBacking::updateGraphicsLayers): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): 2009-04-06 Mike Belshe <mike@belshe.com> Reviewed by Alexey Proskuryakov. Add accessors to AtomicString which take String/const char* arguments so that we don't accidentally thrash the AtomicString table. https://bugs.webkit.org/show_bug.cgi?id=24979 * platform/text/AtomicString.h: 2009-04-03 Holger Hans Peter Freyther <zecke@selfish.org> Reviewed by Simon Hausmann. Make col and row work in WebCore/manual-tests/cursor.html. The issue was spotted in the WebKit inspector. * platform/gtk/CursorGtk.cpp: (WebCore::columnResizeCursor): (WebCore::rowResizeCursor): 2009-04-06 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed by Simon Hausmann. [Qt] Don't show and hide the platformPluginWidget, as it's our QWebView * plugins/mac/PluginViewMac.cpp: (WebCore::PluginView::show): (WebCore::PluginView::hide): (WebCore::PluginView::setParentVisible): 2009-04-06 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Tor Arne Vestbø. Add new files to the Qt build. Export helper function from the Qt JSC binding, needed in WebKit/qt. * WebCore.pro: Add new files. * bridge/qt/qt_runtime.h: Declare convertQVariantToValue. 2009-04-06 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Tor Arne Vestbø. Changed ScriptFunctionCall's last argument from a const char* as the function name to a String. Internally the function name is stored as a WebCore::String and the Qt port wants to use this constructor programmatically where the function name is also a WebCore::String. * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::ScriptFunctionCall): * bindings/js/ScriptFunctionCall.h: 2009-04-06 Mike Belshe <mike@belshe.com> Reviewed by Eric Seidel. HTMLCanvasElement crash when ImageBuffer creation fails. https://bugs.webkit.org/show_bug.cgi?id=23212 Check for NULL before using the ImageBuffer as we might be low on memory and creation may have failed. Test case creation blocked by: https://bugs.webkit.org/show_bug.cgi?id=25055 * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer): 2009-04-05 Geoffrey Garen <ggaren@apple.com> [Originally] Reviewed by Sam Weinig. Rolled back in r42214 with crashes fixed. [Removed irrelevant ExecState* parameter from event handler registration code.] [No change in behavior.] * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener): (WebCore::JSDOMGlobalObject::findJSEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::addEventListener): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::addEventListener): (WebCore::JSMessagePort::removeEventListener): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::addEventListener): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::addEventListener): (WebCore::JSWorkerContext::removeEventListener): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::addEventListener): (WebCore::JSWorker::removeEventListener): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener): * bindings/scripts/CodeGeneratorJS.pm: 2009-04-05 Erik L. Bunce <elbunce@xendom.com> Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=25050 Fix an assert failure when dropping an 'empty' text/uri-list on a QWebView. * platform/qt/DragDataQt.cpp: (WebCore::DragData::asURL): 2009-04-05 Simon Hausmann <hausmann@webkit.org> Fix the Qt build. * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMethod::createPrototype): Take the JSGlobalObject as second argument. 2009-04-04 Kevin Ollivier <kevino@theolliviers.com> Build fixes for wxMac/Tiger. * platform/wx/wxcode/mac/carbon/fontprops.cpp: (wxFontProperties::wxFontProperties): * rendering/break_lines.cpp: (WebCore::nextBreakablePosition): * webcore-wx.bkl: 2009-04-04 Simon Fraser <simon.fraser@apple.com> Reviewed by Cameron Zwarich https://bugs.webkit.org/show_bug.cgi?id=24648 Ensure that mapPoint(const IntPoint&) calls the FloatPoint version to avoid infinite recursion. No test because mapPoint(const IntPoint&) isn't ever called on Mac, so I can't reproduce. * platform/graphics/transforms/TransformationMatrix.h: (WebCore::TransformationMatrix::mapPoint): 2009-04-04 Dan Bernstein <mitz@apple.com> Reviewed by Mark Rowe. - fix <rdar://problem/6757862> REGRESSION: Cannot use the mouse to place the insertion point inside a Thai character Test: fast/text/international/thai-offsetForPosition-inside-character.html * platform/graphics/mac/CoreTextController.cpp: (WebCore::CoreTextController::offsetForPosition): Changed to use cursorMovementIterator instead of characterBreakIterator, allowing this function to return a valid cursor position even if it is not at a character boundary. 2009-04-04 Dan Bernstein <mitz@apple.com> Reviewed by Mark Rowe. - fix an assertion failure when clicking at the beginning of a glyph cluster at the beginning of a text run Test: fast/text/offsetForPosition-cluster-at-zero.html * platform/graphics/mac/CoreTextController.cpp: (WebCore::CoreTextController::offsetForPosition): Corrected the bound check on firstGlyphBeforeCluster, letting it be 0 or -1, but not less than -1. 2009-04-03 Brian Weinstein <bweinstein@gmail.com> Allows 16 HTML/CSS standard colors to be shown as swatch backgrounds when the names are given. https://bugs.webkit.org/show_bug.cgi?id=25044 Reviewed by Timothy Hatcher. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype.updateTitle): 2009-04-03 Sam Weinig <sam@webkit.org> Reviewed by Darin Adler. <rdar://problem/6330929> https://bugs.webkit.org/show_bug.cgi?id=21456 Don't update the document pointer for all inactive windows on navigations. This change causes us to differ slightly from Firefox when accessing the document from within a closure tied to a navigated context, but as all browsers differ on this edge case, I don't foresee compatibility issues. Test: http/tests/security/cross-frame-access-document-direct.html * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::~JSDOMWindowBase): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::clearWindowShell): (WebCore::ScriptController::initScript): (WebCore::ScriptController::updateDocument): * bindings/js/ScriptController.h: 2009-04-03 Chris Marrin <cmarrin@apple.com> Reviewed by Simon Fraser. Test: transitions/bad-transition-shorthand-crash.html Fixed https://bugs.webkit.org/show_bug.cgi?id=24787. We were starting transitions with 0 duration and delay, which is useless. With accelerated compositing on, this went through a code path that tried to use m_toStyle, which never got set because the transitions was short circuited before it had a chance to. So I both protect against using that null pointer and avoid starting the transition in the first place. * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimationPrivate::updateTransitions): * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::blendPropertyValueInStyle): 2009-04-03 Timothy Hatcher <timothy@apple.com> Fixes a bug where you could not type any more in the Web Inspector's search field after the first match is selected in the Resources panel. https://bugs.webkit.org/show_bug.cgi?id=23982 rdar://problem/6592367 Reviewed by Darin Adler. * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype._jumpToSearchResult): Use the window object of the frame to set the selection, not the main window. 2009-04-03 Sam Weinig <sam@webkit.org> Reviewed by Anders Carlsson. Fix for https://bugs.webkit.org/show_bug.cgi?id=22081 <rdar://problem/6346030> Don't allow overriding the return value of window.location. Tests: fast/dom/Window/Location/location-override-toString-on-proto-using-defineGetter.html fast/dom/Window/Location/location-override-toString-on-proto-using-with.html fast/dom/Window/Location/location-override-toString-on-proto.html fast/dom/Window/Location/location-override-toString-using-defineGetter.html fast/dom/Window/Location/location-override-toString-using-with.html fast/dom/Window/Location/location-override-toString.html fast/dom/Window/Location/location-override-valueOf-on-proto-using-defineGetter.html fast/dom/Window/Location/location-override-valueOf-on-proto-using-with.html fast/dom/Window/Location/location-override-valueOf-on-proto.html fast/dom/Window/Location/location-override-valueOf-using-defineGetter.html fast/dom/Window/Location/location-override-valueOf-using-with.html fast/dom/Window/Location/location-override-valueOf.html fast/dom/Window/Location/window-override-location-using-defineGetter.html fast/dom/Window/Location/window-override-window-using-defineGetter.html fast/dom/Window/Location/window-shadow-location-using-js-object-with-toString.html fast/dom/Window/Location/window-shadow-location-using-string.html fast/dom/Window/Location/window-shadow-window-using-js-object-with-location-field.html * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::defineGetter): * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::customPut): (WebCore::JSLocation::defineGetter): (WebCore::JSLocationPrototype::customPut): (WebCore::JSLocationPrototype::defineGetter): * bindings/scripts/CodeGeneratorJS.pm: * page/Location.idl: 2009-04-03 Geoffrey Garen <ggaren@apple.com> Rolled out r42214 since it seems to have caused crashes on the buildbot. * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener): (WebCore::JSDOMGlobalObject::findJSEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::addEventListener): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::addEventListener): (WebCore::JSMessagePort::removeEventListener): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::addEventListener): (WebCore::JSNode::removeEventListener): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::addEventListener): (WebCore::JSWorkerContext::removeEventListener): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::addEventListener): (WebCore::JSWorker::removeEventListener): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener): * bindings/scripts/CodeGeneratorJS.pm: 2009-04-03 Sam Weinig <sam@webkit.org> Reviewed by Oliver Hunt. Fix for <rdar://problem/6476356> https://bugs.webkit.org/show_bug.cgi?id=23148 - Use the window object the Location and History objects are directly associated with instead of the lexical global object to pick the object prototype to serve as the base of the their respective prototype chains. - Re-factor as necessary to allow passing the correct global object to the createPrototype functions. Tests: http/tests/security/cross-frame-access-history-prototype.html http/tests/security/cross-frame-access-location-prototype.html * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): * bindings/js/JSDOMBinding.cpp: (WebCore::getCachedDOMStructure): (WebCore::cacheDOMStructure): * bindings/js/JSDOMBinding.h: (WebCore::getDOMStructure): (WebCore::getDOMPrototype): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::history): (WebCore::JSDOMWindow::location): * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::location): * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor): * bindings/js/JSMessageChannelConstructor.cpp: (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor): * bindings/js/JSNamedNodesCollection.h: (WebCore::JSNamedNodesCollection::createPrototype): * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor): * bindings/js/JSRGBColor.h: (WebCore::JSRGBColor::createPrototype): * bindings/js/JSWebKitCSSMatrixConstructor.cpp: (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor): * bindings/js/JSWebKitPointConstructor.cpp: (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor): * bindings/js/JSWorkerConstructor.cpp: (WebCore::JSWorkerConstructor::JSWorkerConstructor): * bindings/js/JSXMLHttpRequestConstructor.cpp: (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): * bindings/js/JSXSLTProcessorConstructor.cpp: (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor): * bindings/scripts/CodeGeneratorJS.pm: * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createPrototype): * bridge/runtime_array.h: (JSC::RuntimeArray::createPrototype): * bridge/runtime_method.h: (JSC::RuntimeMethod::createPrototype): * bridge/runtime_object.h: (JSC::RuntimeObjectImp::createPrototype): * page/DOMWindow.idl: 2009-04-03 Jian Li <jianli@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25009 Upstream changes to WorkerContextExecutionProxy for V8 bindings in order to use V8EventListenerList as container. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy): (WebCore::WorkerContextExecutionProxy::dispose): (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener): (WebCore::WorkerContextExecutionProxy::RemoveEventListener): * bindings/v8/WorkerContextExecutionProxy.h: 2009-04-03 Geoffrey Garen <ggaren@apple.com> Reviewed by Sam Weinig. Removed irrelevant ExecState* parameter from event handler registration code. No change in behavior. * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener): (WebCore::JSDOMGlobalObject::findJSEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::addEventListener): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::addEventListener): (WebCore::JSMessagePort::removeEventListener): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::addEventListener): (WebCore::JSNode::removeEventListener): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::addEventListener): (WebCore::JSWorkerContext::removeEventListener): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::addEventListener): (WebCore::JSWorker::removeEventListener): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener): * bindings/scripts/CodeGeneratorJS.pm: 2009-04-03 Dan Bernstein <mitz@apple.com> Reviewed by Simon Fraser. - fix <rdar://problem/6634771> Under full-page zoom, cannot scroll MobileMe contact list Test: fast/css/zoom-in-length-round-trip.html * dom/Element.cpp: (WebCore::adjustForLocalZoom): For zoom factors greater than 1, ensure that the returned value is equal to the original unscaled value. (WebCore::adjustForAbsoluteZoom): Ditto. 2009-04-03 Chris Marrin <cmarrin@apple.com> Reviewed by David Hyatt. Fixed https://bugs.webkit.org/show_bug.cgi?id=24941 This fix essentially does a -viewWillDraw call for layout. It adds a CFRunLoopObserver which performs layout just before drawing on the Mac platform. This makes sure layout is complete before rendering and avoids a flash. * page/ChromeClient.h: (WebCore::ChromeClient::scheduleViewUpdate): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::setCompositingLayersNeedUpdate): (WebCore::RenderLayerCompositor::scheduleViewUpdate): * rendering/RenderLayerCompositor.h: 2009-04-02 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=24648 Optimize mapPoint(), mapRect() and mapQuad() for identity matrix and translations. * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::mapPoint): (WebCore::TransformationMatrix::mapRect): (WebCore::TransformationMatrix::mapQuad): * platform/graphics/transforms/TransformationMatrix.h: (WebCore::TransformationMatrix::mapPoint): 2009-04-02 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=25018 Add containsPoint() and containsQuad() methods to FloatQuad. * platform/graphics/FloatQuad.cpp: (WebCore::dot): (WebCore::isPointInTriangle): (WebCore::FloatQuad::containsPoint): (WebCore::FloatQuad::containsQuad): * platform/graphics/FloatQuad.h: 2009-04-03 Kevin Decker <kdecker@apple.com> Reviewed by Darin. * loader/ProgressTracker.cpp: Included DocumentLoader.h (WebCore::ProgressTracker::incrementProgress): Limit the 50%-clamp rule to documents that use WebCore's layout system. 2009-04-03 Eric Carlson <eric.carlson@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25029 <rdar://problem/6336092> REGRESSION: movie does not resize correctly Test: media/video-size-intrinsic-scale.html * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::naturalSize): Use QTMovieCurrentSizeAttribute instead of QTMovieNaturalSizeAttribute so we return the correct size for movies saved with a non-default matrix. (WebCore::MediaPlayerPrivate::setSize): Don't resize the QTMovieView because [QTMovieView setFrame] also resizes the movie itself, and as the renderer calls setSize immediately when a movie reports a size change (QTMovieSizeDidChangeNotification) we can get into a feedback loop observing the size change and resetting the size, and this can cause QuickTime to miss correctly setting a movie's size when the media size changes after opening (as happens with an rtsp movie once the server sends the track sizes). Instead, remember the size passed to paint() and resize the view when it changes. (WebCore::MediaPlayerPrivate::paint): Resize the view when passed a new size. * platform/graphics/win/QTMovieWin.cpp: (QTMovieWin::getNaturalSize): Use GetMovieBox instead of GetMovieNaturalBoundsRect so we return the correct size for movies saved with non-default matrix. 2009-04-03 Darin Fisher <darin@chromium.org> Reviewed by Darin Adler. Restore FrameLoader::policyDocumentLoader to fix the Chromium build. https://bugs.webkit.org/show_bug.cgi?id=25028 * loader/FrameLoader.h: (WebCore::FrameLoader::policyDocumentLoader): 2009-04-02 Michael Nordman <michaeln@google.com> Reviewed by Alexey Proskuryakov. Use long long, not int64, when working in webcore (sorry). https://bugs.webkit.org/show_bug.cgi?id=25011 No change in functionality, so no tests. * platform/network/chromium/ResourceResponse.h: (WebCore::ResourceResponse::getAppCacheID): (WebCore::ResourceResponse::setAppCacheID): 2009-04-03 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by Holger Freyther. Remove pre-processor checks for GTK+ >= 2.10, since we now require at least that version. * platform/graphics/gtk/FontPlatformDataGtk.cpp: (WebCore::FontPlatformData::FontPlatformData): * platform/gtk/ContextMenuItemGtk.cpp: (WebCore::gtkStockIDFromContextMenuAction): * platform/gtk/KeyEventGtk.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::contextMenuItemTagSelectAll): * platform/gtk/MouseEventGtk.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::documentFragment): * platform/gtk/WheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2009-04-02 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=25021 Fix repainting an element with a reflection and transform after layout. Telling the reflection to repaint directly is wrong, because, with LayoutState enabled, it only takes the reflection's transform into account, not that of the element. We can fix this, and keep the benefits of LayoutState, by computing the reflected repaint rect, and repainting that using the original renderer. Test: fast/repaint/reflection-repaint-test.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): 2009-04-02 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=23307 When repainting during layout (when LayoutState is enabled), we need to apply the transform to the dirty rect, before applying x(), y() and the offset storted in the LayoutState. Also bypass LayoutState in mapLocalToContainer() if we have a repaintContainer, since LayoutState is always root-relative. Test: fast/repaint/transform-layout-repaint.html * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): (WebCore::RenderBox::computeRectForRepaint): 2009-04-02 Mark Rowe <mrowe@apple.com> Fix the Mac build after r42191. * WebCore.base.exp: 2009-04-02 Mark Rowe <mrowe@apple.com> Fix Windows build after r42190. * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Update to use the new name of the constant. 2009-04-02 Darin Adler <darin@apple.com> Reviewed by Brady Eidson. <rdar://problem/6625840> Previous Page isn't loaded after hitting back button at http://www.breakingnews.ie/ Test: http/tests/navigation/onload-navigation-iframe-2.html * html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::HTMLFrameElement): Removed unneeded createdByParser flag. * html/HTMLFrameElement.h: Ditto. * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Ditto. * html/HTMLFrameElementBase.h: Ditto. * html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): Ditto. * html/HTMLFrameOwnerElement.h: Ditto. * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::HTMLIFrameElement): Ditto. * html/HTMLIFrameElement.h: Ditto. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::HTMLPlugInElement): Ditto. * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): Removed unneeded check of the createdByParser flag. The original change that introduced this, http://trac.webkit.org/changeset/25410, does not make it clear why this check was needed. And it seems it is not needed. 2009-04-02 Adele Peterson <adele@apple.com> Reviewed by Darin Adler. Add a way to get a list of focusable nodes. * dom/Document.cpp: (WebCore::Document::setFocusedNode): (WebCore::Document::getFocusableNodes): * dom/Document.h: 2009-04-02 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. <rdar://problem/6654255> crash due to null FrameView in EventHandler Lots of code was added to EventHandler that used view() and page() without null checking, but both of those can become null due to the frame lifetime. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): (WebCore::EventHandler::eventMayStartDrag): (WebCore::EventHandler::handleAutoscroll): (WebCore::EventHandler::autoscrollTimerFired): (WebCore::EventHandler::setPanScrollCursor): (WebCore::EventHandler::allowDHTMLDrag): (WebCore::EventHandler::hitTestResultAtPoint): (WebCore::EventHandler::stopAutoscrollTimer): (WebCore::EventHandler::selectCursor): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::dispatchDragEvent): (WebCore::EventHandler::prepareMouseEvent): (WebCore::EventHandler::dispatchMouseEvent): (WebCore::EventHandler::handleWheelEvent): (WebCore::EventHandler::hoverTimerFired): (WebCore::EventHandler::keyEvent): (WebCore::EventHandler::dragHysteresisExceeded): (WebCore::EventHandler::shouldDragAutoNode): (WebCore::EventHandler::handleDrag): (WebCore::EventHandler::handleTextInputEvent): (WebCore::EventHandler::addPendingFrameUnloadEventCount): (WebCore::EventHandler::removePendingFrameUnloadEventCount): (WebCore::EventHandler::clearPendingFrameUnloadEventCount): (WebCore::EventHandler::addPendingFrameBeforeUnloadEventCount): (WebCore::EventHandler::removePendingFrameBeforeUnloadEventCount): (WebCore::EventHandler::clearPendingFrameBeforeUnloadEventCount): Added null checks for view() and page(). Made minor code cleanups. 2009-04-02 David Hyatt <hyatt@apple.com> Reviewed by Oliver Hunt. Fix regression in <object> layout test. Make sure that even though a 404 image loads, that <object> still considers it an error for the purposes of firing onerror. * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::dispatchLoadEvent): 2009-04-02 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=25010 Refactor InspectorController to replace all JS function invocations with ScriptFunctionCall. * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::appendArgument): Added int, UString, and JSValuePtr methods. (WebCore::ScriptFunctionCall::call): Added simplified, exception-eating method. * bindings/js/ScriptFunctionCall.h: Decls for above. * bindings/js/ScriptObjectQuarantine.cpp: Added helper for Node and DOMWindow. (WebCore::getQuarantinedScriptObject): * bindings/js/ScriptObjectQuarantine.h: Decls for above. * inspector/InspectorController.cpp: (WebCore::callSimpleFunction): Made into a static. (WebCore::InspectorController::focusNode): Refactored to use ScriptFunctionCall. (WebCore::InspectorController::toggleRecordButton): Ditto. (WebCore::InspectorController::startGroup): Ditto. (WebCore::InspectorController::setAttachedWindow): Ditto. (WebCore::InspectorController::inspectedWindowScriptObjectCleared): Ditto. (WebCore::InspectorController::addScriptProfile): Ditto. (WebCore::InspectorController::didParseSource): Ditto. (WebCore::InspectorController::failedToParseSource): Ditto. (WebCore::InspectorController::didPause): Ditto. * inspector/InspectorController.h: Removed callFunction and callSimpleFunction decls. 2009-04-02 Jian Li <jianli@chromium.org> Reviewed by Darin Fisher. Upstream changes to V8WorkerContextEventListener for V8 bindings. https://bugs.webkit.org/show_bug.cgi?id=25007 * bindings/v8/V8ObjectEventListener.h: * bindings/v8/V8WorkerContextEventListener.cpp: 2009-04-02 Jian Li <jianli@chromium.org> Reviewed by Darin Fisher. Upstream V8WorkerContextObjectEventListener for V8 bindings. https://bugs.webkit.org/show_bug.cgi?id=25005 * bindings/v8/V8WorkerContextObjectEventListener.cpp: Added. * bindings/v8/V8WorkerContextObjectEventListener.h: Added. 2009-04-02 Jian Li <jianli@chromium.org> Reviewed by Darin Fisher. Upstream V8EventListenerList for V8 bindings. https://bugs.webkit.org/show_bug.cgi?id=25004 * bindings/v8/V8EventListenerList.cpp: Added. * bindings/v8/V8EventListenerList.h: Added. 2009-04-02 Michael Nordman <michaeln@google.com> Reviewed by Darin Fisher. Chromium's ResourceRequest and ResourceResponse structs need some new data members. https://bugs.webkit.org/show_bug.cgi?id=24897 These fields are needed to facilitate Chromium's implementation of the HTML5 ApplicationCache feature. We need to know what frame (or context) is doing the requesting, and from what cache the resulting resource was retrieved. No change in functionality, so no tests. * platform/network/chromium/ResourceRequest.h: (WebCore::ResourceRequest::ResourceRequest): (WebCore::ResourceRequest::appCacheContextID): (WebCore::ResourceRequest::setAppCacheContextID): * platform/network/chromium/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): (WebCore::ResourceResponse::getAppCacheID): (WebCore::ResourceResponse::setAppCacheID): 2009-04-02 David Hyatt <hyatt@apple.com> Reviewed by Darin Adler Fix for https://bugs.webkit.org/show_bug.cgi?id=24643. Make sure images just ignore HTTP error codes and keep loading anyway. Only <object> checks http error codes and falls back. Everyone else just ignores it and displays the image anyway. Added http/tests/misc/image-error.html * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::notifyFinished): * loader/CachedImage.cpp: (WebCore::CachedImage::CachedImage): * loader/CachedImage.h: (WebCore::CachedImage::httpStatusCodeError): (WebCore::CachedImage::httpStatusCodeErrorOccurred): * loader/CachedResource.h: (WebCore::CachedResource::httpStatusCodeError): * loader/loader.cpp: (WebCore::Loader::Host::didReceiveData): 2009-04-02 Jian Li <jianli@chromium.org> Reviewed by Dimitri Glazkov. Add XHR constructor in WorkerContext.idl for V8 bindings. https://bugs.webkit.org/show_bug.cgi?id=24962 * workers/WorkerContext.idl: 2009-04-02 Ben Murdoch <benm@google.com> Fix Bug 19743: Release build fails on 32-bit Windows <https://bugs.webkit.org/show_bug.cgi?id=19743> Combines all the HTML element cpp files into one to help reduce the size of WebCore.lib so we can build in release mode on 32bit Windows. Reviewed by Adam Roben. * WebCore.vcproj/WebCore.vcproj: Excluded all the separate HTML*Element.cpp files from the build. Added HTMLElementsAllInOne.cpp to the build. * html/HTMLElementsAllInOne.cpp: Added. 2009-04-02 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=24999 Optimize hit testing with transforms. * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): (WebCore::RenderBox::mapAbsoluteToLocalPoint): getTransformFromContainer() change to return the matrix by reference. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::update3DTransformedDescendantStatus): The method failed to set m_3DTransformedDescendantStatusDirty to false, so did the work every time. (WebCore::RenderLayer::createLocalTransformState): Only call the expensive getTransformFromContainer() if there is a transform, otherwise we just have a translation. * rendering/RenderObject.cpp: (WebCore::RenderObject::getTransformFromContainer): * rendering/RenderObject.h: Change transformFromContainer() to getTransformFromContainer(), and return the matrix by reference to reduce copying. New enum values for arguments for readability. * rendering/TransformState.cpp: (WebCore::TransformState::move): (WebCore::TransformState::applyTransform): (WebCore::HitTestingTransformState::translate): New method that adds a translation to the accumulated matrix, optionally without flattening. Cheaper than applyTransform(). (WebCore::HitTestingTransformState::applyTransform): (WebCore::HitTestingTransformState::flatten): (WebCore::HitTestingTransformState::flattenWithTransform): Add flattenWithTransform(), which is a helper that allows us to avoid doing the inverse() twice. * rendering/TransformState.h: (WebCore::TransformState::): (WebCore::TransformState::move): (WebCore::HitTestingTransformState::): New method on HitTestingTransformState that adds a translation to the accumulated matrix, optionally without flattening. Cheaper than applyTransform(). New enum values for arguments for readability. 2009-04-02 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=24648 Optimize common code paths in TransformationMatrix. * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::translate): (WebCore::TransformationMatrix::translate3d): Optimize to avoid matrix copy. (WebCore::TransformationMatrix::isInvertible): Test for identity and translation matrices before computing the determinant. (WebCore::TransformationMatrix::inverse): Optimize for identity matrix and translations. * platform/graphics/transforms/TransformationMatrix.h: (WebCore::TransformationMatrix::isIdentityOrTranslation): Utility method. 2009-04-02 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=24930 [Gtk] ISO files content is displayed inside the webview instead of being downloaded Also sniff content of types declared as text/plain. This is justified by the fact that it is common to have Apache HTTP servers configured to send text/plain as Content-Type by default. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::gotHeadersCallback): 2009-04-02 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by Alexey Proskuryakov. Protect the handle when notifying the client that the response was received also in gotChunkCallback, or we crash in didReceiveData when the load is cancelled in didReceiveResponse. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::gotChunkCallback): 2009-04-02 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=25001 Crash when content type parameters have no value Handle the case where a Content-Type header parameter has no value (i.e. no = character), to work-around a bug in libsoup. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::fillResponseFromMessage): 2009-04-02 Yael Aharon <yael.aharon@nokia.com> Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=24490 Enable web workers in Qt. * WebCore.pro: 2009-04-01 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. Based on work of Julien Chaffraix. https://bugs.webkit.org/show_bug.cgi?id=22475 REGRESSION: Async XMLHttpRequest never finishes on nonexistent files anymore https://bugs.webkit.org/show_bug.cgi?id=24886 XHR requests opened when offline never return Tests: fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html http/tests/xmlhttprequest/state-after-network-error.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::callReadyStateChangeListener): Only dispatch load event if this wasn't an error. (WebCore::XMLHttpRequest::abort): Fixed formatting. (WebCore::XMLHttpRequest::genericError): Change state to DONE and dispatch readystatechange. The comment saying that this doesn't match Firefox was added in r33559 without explanation or tests, and I don't think that it's accurate. Also, Firefox and Safari 3 both change state to HEADERS_RECEIVED before DONE on error - this doesn't match the spec, and I doubt that any code depends on this, so I went with the spec here. 2009-04-01 Steve Falkenburg <sfalken@apple.com> https://bugs.webkit.org/show_bug.cgi?id=24997 Race conditions in icon database threading code m_syncThreadRunning set was mistakenly eliminated in r27717. This reintroduces it. Reviewed by Oliver Hunt. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): Set m_syncThreadRunning. 2009-04-01 Antti Koivisto <antti@apple.com> Reviewed by Darin Adler. <rdar://problem/6748609> Use ActiveDOMObject to suspend marquees Make marquees ActiveDOMObjects, get rid of the special suspension code. * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::HTMLMarqueeElement): (WebCore::HTMLMarqueeElement::canSuspend): (WebCore::HTMLMarqueeElement::suspend): (WebCore::HTMLMarqueeElement::resume): * html/HTMLMarqueeElement.h: * page/Frame.cpp: (WebCore::Frame::clearTimers): * rendering/RenderLayer.cpp: * rendering/RenderLayer.h: (WebCore::RenderLayer::marquee): 2009-04-01 Dean Jackson <dino@apple.com> Reviewed by Darin Adler Make constant values static in previous commit, as suggested by Darin. * rendering/RenderVideo.cpp: 2009-04-01 Dean Jackson <dino@apple.com> Reviewed by Simon Fraser https://bugs.webkit.org/show_bug.cgi?id=24993 Standalone media should have a smaller instrinsic height. * rendering/RenderVideo.cpp: (WebCore::RenderVideo::RenderVideo): 2009-04-01 Darin Adler <darin@apple.com> Reviewed by Geoff Garen. Bug 22378: Crash submitting a form when parsing an XHTML document https://bugs.webkit.org/show_bug.cgi?id=22378 rdar://problem/6388377 Tests: fast/loader/submit-form-while-parsing-1.xhtml fast/loader/submit-form-while-parsing-2.html * WebCore.base.exp: Updated. * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): Renamed m_subItems to m_children. Used uncheckedAppend because we reserveInitialCapacity. (WebCore::HistoryItem::addChildItem): Renamed m_subItems to m_children. Added an assertion that this is only used to add items that don't have duplicate frame names. (WebCore::HistoryItem::setChildItem): Added. Replaces an existing item if any, preserving the isTargetItem flag. (WebCore::HistoryItem::childItemWithTarget): Renamed from childItemWithName for consistency with the other functions here that all call the frame name the "target". Also updated for rename of m_subItems to m_children. (WebCore::HistoryItem::findTargetItem): Renamed from recurseToFindTargetItem. Removed unneeded size check. (WebCore::HistoryItem::targetItem): Changed to always return the top item if no item has the isTargetItem flag set. The old version would instead return 0 in some cases, but return the top item if it had no children. (WebCore::HistoryItem::children): Renamed m_subItems to m_children. (WebCore::HistoryItem::hasChildren): Ditto. (WebCore::HistoryItem::showTreeWithIndent): Ditto. * history/HistoryItem.h: Name changes. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): Create and pass a FormState instead of attaching "recorded form values" and "form about to be submitted" to the frame loader. Parameter work fine for this; there's no need to store state on the FrameLoader. * loader/FormState.cpp: (WebCore::FormState::FormState): Adopt a vector instead of copying a hash map. (WebCore::FormState::create): Ditto. * loader/FormState.h: Update to use a vector that we adopt instead of hash map that we copy for auto-fill text field values. * loader/FrameLoader.cpp: (WebCore::ScheduledRedirection::ScheduledRedirection): Added a new case for form submissions and turned the "wasDuringLoad" state into a separate boolean instead of using a special redirection type to track it. (WebCore::FrameLoader::createWindow): Updated for name and argument change of loadFrameRequest. (WebCore::FrameLoader::urlSelected): Ditto. (WebCore::FrameLoader::submitForm): Removed the "deferred form submission" machinery, replacing it with the "scheduled redirection" mechanism, shared with other kinds of redirection and navigation. Moved frame targeting here so we can schedule the redirection on the right frame. Moved the multiple form submission protection here. Moved the code to implement the rule that m_navigationDuringLoad was used for here too. (WebCore::FrameLoader::didOpenURL): Use the new wasDuringLoad flag instead of the locationChangeDuringLoad type to detect location change during a load. (WebCore::FrameLoader::executeScript): Removed call to now-obsolete function, submitFormAgain. (WebCore::FrameLoader::scheduleLocationChange): Moved the code to stop loading out of this function into scheduleRedirection, so it can be shared with the new scheduleFormSubmission function. (WebCore::FrameLoader::scheduleFormSubmission): Added. Almost the same as scheduleLocationChange, but with the arguments for a form submission. (WebCore::FrameLoader::scheduleRefresh): Updated for the change to the duringLoad flag. (WebCore::FrameLoader::isLocationChange): Added case for formSubmission and removed case for locationChangeDuringLoad. (WebCore::FrameLoader::redirectionTimerFired): Ditto. Also removed unneeded completeURL call and just use KURL constructor to match the other cases. (WebCore::FrameLoader::provisionalLoadStarted): Removed the code to set up the m_navigationDuringLoad, which is no longer needed. The new version of this is in the submitForm function and sets the lockHistory boolean. (WebCore::FrameLoader::scheduleRedirection): Moved the code to stop a load in here that used to be in scheduleLocationChange. (WebCore::FrameLoader::startRedirectionTimer): Added case for formSubmission and removed case for locationChangeDuringLoad. (WebCore::FrameLoader::stopRedirectionTimer): Ditto. (WebCore::FrameLoader::completed): Removed call to now-obsolete function, submitFormAgain. (WebCore::FrameLoader::loadFrameRequest): Renamed from loadFrameRequestWithFormAndValues. Replaced form element and form values argument with a single FormState argument. Changed frame targeting code to use the source frame in the case of a form submission to better match the actual target frame. (WebCore::FrameLoader::loadURL): Don't search for existing frames in the form submission case since we already did that in the submitForm function. (WebCore::FrameLoader::clientRedirected): Changed to work with the m_isExecutingJavaScriptFormAction data member directly instead of taking it as a function parameter. (WebCore::FrameLoader::loadPostRequest): Don't search for existing frames in the form submission case since we already did that in the submitForm function. (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Moved comment in here that was misplaced elsewhere in the file. (WebCore::FrameLoader::findFrameForNavigation): Changed to use the early return idiom. (WebCore::FrameLoader::recursiveGoToItem): Updated for HistoryItem changes. (WebCore::FrameLoader::childFramesMatchItem): Ditto. (WebCore::FrameLoader::updateHistoryForStandardLoad): Removed the m_navigationDuringLoad logic; that's now handled by setting lockHistory to true in the submitForm function. (WebCore::FrameLoader::updateHistoryForRedirectWithLockedBackForwardList): Use the new setChildItem function so we don't get multiple items for the same frame name in the history item tree in the back/forward list. * loader/FrameLoader.h: Renamed loadFrameRequestWithFormAndValues to loadFrameRequest and made it take a form state object instead of the form element and form values. Removed the unused functions loadEmptyDocumentSynchronously, provisionalDocumentLoader, notifyIconChnaged, and updateBaseURLForEmptyDocument. Changed the submitForm function to take a form state argument. Eliminated the clearRecordedFormValues, setFormAboutToBeSubmitted, and recordFormValue functions, which are replaced by the form state arguments to submitForm and loadFrameRequest. Removed the isJavaScriptFormAction argument from the clientRedirected function; instead it looks at a data member directly. Eliminated the submitFormAgain and overload of the submitForm function; these are now subsumed into the remaining submitForm function and the scheduleFormSubmission function. Removed unused and obsolete data members m_navigationDuringLoad, m_deferredFormSubmission, m_formAboutToBeSubmitted and m_formValuesAboutToBeSubmitted. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): Updated for name and argument change of loadFrameRequest. * page/Frame.cpp: (WebCore::Frame::~Frame): Removed call to the now-unneeded clearRecordedFormValues function. 2009-04-01 Dimitri Glazkov <dglazkov@chromium.org> Unreviewed, fixing previous commit. https://bugs.webkit.org/show_bug.cgi?id=24994 Revert V8DOMMap.cpp change which accidentally snuck into the previous commit. * bindings/v8/V8DOMMap.cpp: Revert change in previous commit. 2009-04-01 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=24994 Fix miscellaneous merge/upstreaming divergencies in Chromium port. * bindings/v8/V8Collection.h: Added an include. * platform/KURLGoogle.cpp: (WebCore::KURL::baseAsString): Added to match KURL.cpp. * platform/chromium/ClipboardChromium.cpp: Added an include. 2009-04-01 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=24989 Refactor InspectorResource to use ScriptObject/FunctionCall. * bindings/js/JSInspectorControllerCustom.cpp: (WebCore::JSInspectorController::addResourceSourceToFrame): Tweaked to use a more appropriate type conversion. (WebCore::JSInspectorController::getResourceDocumentNode): Tweaked to accommodate for InspectorResource refactoring. * bindings/js/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::appendArgument): Added long long type to match existing jsNumber call signature. * bindings/js/ScriptFunctionCall.h: Declaration for above. * bindings/js/ScriptObject.cpp: (WebCore::createEmptyObject): Added. (WebCore::ScriptObject::ScriptObject): (WebCore::ScriptObject::set): Added a bunch of property setters. * bindings/js/ScriptObject.h: Declarations for above. * inspector/InspectorController.cpp: Moved all InspectorResource-managing code to InspectorResource.cpp (WebCore::InspectorController::populateScriptObjects): Changed to use refactored InspectorResource. (WebCore::InspectorController::resetScriptObjects): Ditto. (WebCore::InspectorController::pruneResources): Ditto. (WebCore::InspectorController::didCommitLoad): Ditto. (WebCore::InspectorController::addResource): Ditto. (WebCore::InspectorController::removeResource): Ditto. (WebCore::InspectorController::didLoadResourceFromMemoryCache): Ditto. (WebCore::InspectorController::identifierForInitialRequest): Ditto. (WebCore::InspectorController::willSendRequest): Ditto. (WebCore::InspectorController::didReceiveResponse): Ditto. (WebCore::InspectorController::didReceiveContentLength): Ditto. (WebCore::InspectorController::didFinishLoading): Ditto. (WebCore::InspectorController::didFailLoading): Ditto, (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest): Ditto. (WebCore::InspectorController::scriptImported): Ditto. * inspector/InspectorController.h: Removed InspectorResource-managing code decls and tweaked some signatures to use ScriptString and long long for identifier. * inspector/InspectorController.idl: Changed to use long long for identifier. * inspector/InspectorResource.cpp: Refactored to use ScriptObject/FunctionCall. (WebCore::InspectorResource::InspectorResource): Ditto. (WebCore::InspectorResource::~InspectorResource): Ditto. (WebCore::InspectorResource::createCached): Added. (WebCore::InspectorResource::updateRequest): Added. (WebCore::InspectorResource::updateResponse): Added. (WebCore::createHeadersObject): Added. (WebCore::InspectorResource::createScriptObject): Added. (WebCore::InspectorResource::updateScriptObject): Added. (WebCore::InspectorResource::releaseScriptObject): Added. (WebCore::InspectorResource::type): Tweaked to use ScriptString. (WebCore::InspectorResource::setXMLHttpResponseText): Added. (WebCore::InspectorResource::sourceString): Tweaked to use ScriptString. (WebCore::InspectorResource::startTiming): Added. (WebCore::InspectorResource::markResponseReceivedTime): Added. (WebCore::InspectorResource::endTiming): Added. (WebCore::InspectorResource::markFailed): Added. (WebCore::InspectorResource::addLength): Added. * inspector/InspectorResource.h: Added decls for newly refactored-in methods. (WebCore::InspectorResource::create): Added. (WebCore::InspectorResource::isSameLoader): Added. (WebCore::InspectorResource::markMainResource): Added. (WebCore::InspectorResource::identifier): Added. (WebCore::InspectorResource::requestURL): Added. (WebCore::InspectorResource::frame): Added. (WebCore::InspectorResource::mimeType): Added. (WebCore::InspectorResource::Changes::Changes): Added new class to track resource changes. (WebCore::InspectorResource::Changes::hasChange): Added. (WebCore::InspectorResource::Changes::set): Added. (WebCore::InspectorResource::Changes::clear): Added. (WebCore::InspectorResource::Changes::setAll): Added. (WebCore::InspectorResource::Changes::clearAll): Added. 2009-04-01 Tony Chang <tony@chromium.org> Reviewed by Darin Fisher. Ensure the right click doesn't deselect text under it. This was happening in the Chromium and GTK+ ports because they don't select the text under the cursor on right click. This was regressed in r41715, https://bugs.webkit.org/show_bug.cgi?id=19737 https://bugs.webkit.org/show_bug.cgi?id=24946 Test: fast/events/context-no-deselect.html * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseReleaseEvent): 2009-04-01 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=24991 Need to use toRenderBoxModelObject(), not toRenderBox(), to test for layer() when getting the transform. * rendering/RenderObject.cpp: (WebCore::RenderObject::transformFromContainer): 2009-03-31 Darin Adler <darin@apple.com> Rolled out that last change until I can investigate the regression test failures it seems to have caused. * dom/PositionIterator.cpp: (WebCore::PositionIterator::decrement): * dom/PositionIterator.h: (WebCore::PositionIterator::PositionIterator): 2009-03-31 Darin Adler <darin@apple.com> Reviewed by Eric Seidel. Bug 24621: PositionIterator doesn't iterate "after last child" positions when going backwards https://bugs.webkit.org/show_bug.cgi?id=24621 * dom/PositionIterator.cpp: (WebCore::PositionIterator::decrement): Make sure that when the parent has no children, we don't ever use Position::uncheckedPreviousOffset. This is consistent with the forward iterator, but also should never arise because of the fix below. * dom/PositionIterator.h: (WebCore::PositionIterator::PositionIterator): Fixed so m_offset will always be 0 when the passed-in node has no children. Like the change above, this is consistent with the rest of the class, although in the long run I think it's a bit strange to treat a <p> element with no children differently than a <p> element with children. 2009-03-31 Eric Carlson <eric.carlson@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=24965 Bug 24965: HTMLMediaElement: network state changes can be missed * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setNetworkState): Always update m_networkState when the state changes, even when no event needs to be fired. 2009-03-31 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24964 Bug 24964: HTMLMediaElement: 'waiting' event may fire twice * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setReadyState): Only fire 'waiting' event once when ready state drops below HAVE_FUTURE_DATA. 2009-03-31 Eric Carlson <eric.carlson@apple.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24846 Bug 24846: HTMLMediaElement should implement 'autobuffer' attribute Add 'autobuffer' attrubute to media element. 'autobuffer' is a hint that the author recommends downloading the entire resource optimistically, so the attribute is made available to the media engine to use if it is able. Test: media/video-dom-autobuffer.html * html/HTMLAttributeNames.in: Add autobuffer. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseMappedAttribute): New. (WebCore::HTMLMediaElement::autobuffer): Ditto. (WebCore::HTMLMediaElement::setAutobuffer): Ditto. * html/HTMLMediaElement.h: Declare autobuffer and setAutobuffer. * html/HTMLMediaElement.idl: Add autobuffer. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::MediaPlayer): Initialize m_autobuffer. (WebCore::MediaPlayer::autobuffer): New. (WebCore::MediaPlayer::setAutobuffer): Ditto. * platform/graphics/MediaPlayer.h: Declare m_autobuffer, autobuffer and setAutobuffer * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::setAutobuffer): Declare setAutobuffer. 2009-03-31 Craig Schlenter <craig.schlenter@gmail.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24550 Check return value of vasprintf. This should keep gcc 4.3.3 happy rather than have it complain about attribute warn_unused_result. * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::error): 2009-03-31 Dean Jackson <dino@apple.com> Style guide violation! * loader/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): 2009-03-31 Dean Jackson <dino@apple.com> Fix Tiger build. * loader/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): 2009-03-31 Jian Li <jianli@chromium.org> Reviewed by Darin Fisher. Upstream V8DOMMap for v8 bindings. https://bugs.webkit.org/show_bug.cgi?id=24951 * bindings/v8/V8DOMMap.cpp: Added. * bindings/v8/V8DOMMap.h: Added. 2009-03-31 Dean Jackson <dino@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=24955 Spacebar didn't play/pause in standalone MediaDocument * loader/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): 2009-03-31 Alpha Lam <hclam@chromium.org> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=24901 Added the following methods to MediaPlayerPrivate for Chromium port. void sizeChanged(); void rateChanged(); void durationChanged(); The above changes are to reflect changes in MediaPlayer.cpp. More details can be found in the original changeset. http://trac.webkit.org/changeset/41907 * platform/graphics/chromium/MediaPlayerPrivateChromium.h: 2009-03-31 Rafael Weinstein <rafaelw@chromium.org> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=24947 Special-case drawing text-shadow on win32, to let GDI draw in cases when both fill & shadow color are opaque and the shadow has no blur. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::Font::drawComplexText): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::windowsCanHandleDrawTextShadow): (WebCore::windowsCanHandleTextDrawing): * platform/graphics/skia/SkiaFontWin.h: 2009-03-31 Jeremy Moskovich <jeremy@chromium.org> Reviewed by Darin Fisher. r42055 removed some functions in FrameLoader used by Chrome, this CL backs out some of those changes to unbreak the Chrome build. https://bugs.webkit.org/show_bug.cgi?id=24949 * WebCore.base.exp: * loader/FrameLoader.cpp: * loader/FrameLoader.h: 2009-03-31 Jeremy Moskovich <jeremy@chromium.org> Reviewed by Darin Adler. Build fixes for Chromium. https://bugs.webkit.org/show_bug.cgi?id=24945 * dom/Document.h: * platform/chromium/ClipboardChromium.cpp: (WebCore::imageToMarkup): 2009-03-31 Simon Hausmann <simon.hausmann@nokia.com> Fix the Qt build. * dom/XMLTokenizerQt.cpp: (WebCore::XMLTokenizer::XMLTokenizer): Use NamedNodeMap instead of NamedAttrMap. 2009-03-30 Steve Falkenburg <sfalken@apple.com> Don't create CFDataRef with a fixed size. Fixes synchronous XMLHTTPRequests on Windows. Reviewed by Ada Chan. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::WebCoreSynchronousLoader::didReceiveData): 2009-03-30 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. Bug 24594: PolicyDelegate NavigationAction is WebNavigationTypeOther instead of WebNavigationTypeReload https://bugs.webkit.org/show_bug.cgi?id=24594 rdar://problem/6682110 Test: fast/loader/reload-policy-delegate.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadWithDocumentLoader): Set the triggering action here where we know it's the policy loader and can use m_policyLoadType rather than letting it get set inside checkNavigationPolicy. 2009-03-30 Timothy Hatcher <timothy@apple.com> <rdar://problem/5838871> CrashTracer: 1483 crashes Quicklooking in Finder (painting without up to date layout) Reviewed by Dan Bernstein. * page/FrameView.cpp: (WebCore::FrameView::paintContents): Add an early return when painting is attempted when layout is needed. 2009-03-30 Greg Bolsinga <bolsinga@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=24938 Sort alphabetically. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2009-03-30 Greg Bolsinga <bolsinga@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=24938 Build fixes for building --3d-rendering and --no-svg * rendering/RenderLayerBacking.cpp: 2009-03-30 Greg Bolsinga <bolsinga@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=24938 Build fixes when building --no-svg * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add missing CSS properties * css/CSSCursorImageValue.cpp: (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Handle unused param * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Add missing CSS properties * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Add missing CSS properties * dom/Node.cpp: (WebCore::updateSVGElementInstancesAfterEventListenerChange): Handle unused param * platform/graphics/Font.cpp: (WebCore::Font::floatWidth): Handle unused param * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): Handle unused param 2009-03-30 Darin Adler <darin@apple.com> Reviewed by Adam Roben. Bug 24916: REGRESSION: NavigationAction policy dispatch broken https://bugs.webkit.org/show_bug.cgi?id=24916 * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadURL): Rearrange the code so that the "event" PassRefPtr is not used twice. This also optimizes the case where a frame name is specified, but it's the name of the frame being loaded. Also called release in all the final uses of FormState. 2009-03-30 Darin Adler <darin@apple.com> Reviewed by Adam Roben. Bug 24937: NamedNodeMap and NamedAttrMap should not be separate classes https://bugs.webkit.org/show_bug.cgi?id=24937 Also should fix the Windows COM bindings build. * bindings/scripts/CodeGeneratorJS.pm: Removed special case for NamedNodeMap. * bindings/scripts/CodeGeneratorObjC.pm: Ditto. * dom/NamedAttrMap.h: Renamed class from NamedAttrMap to NamedNodeMap and removed NamedNodeMap base class. Made the NamedNodeMap functions all public and non-virtual. Removed virtualLength. * dom/NamedNodeMap.h: Replaced file with just an include of NamedAttrMap.h. As a follow up we will rename the NamedAttrMap files and remove this file. * bindings/js/JSNamedNodesCollection.cpp: Renamed from NamedAttrMap to NamedNodeMap. * dom/Attr.h: Ditto. * dom/Attribute.h: Ditto. * dom/Document.cpp: (WebCore::Document::importNode): Ditto. * dom/Element.cpp: (WebCore::Element::attributes): Ditto. (WebCore::Element::setAttributeMap): Ditto. (WebCore::Element::createAttributeMap): Ditto. (WebCore::Element::insertedIntoDocument): Ditto. (WebCore::Element::removedFromDocument): Ditto. (WebCore::Element::openTagStartToString): Ditto. (WebCore::Element::removeAttributeNode): Ditto. (WebCore::Element::getAttributeNode): Ditto. (WebCore::Element::getAttributeNodeNS): Ditto. (WebCore::Element::hasAttribute): Ditto. (WebCore::Element::hasAttributeNS): Ditto. (WebCore::Element::normalizeAttributes): Ditto. * dom/Element.h: Ditto. * dom/NamedAttrMap.cpp: (WebCore::NamedNodeMap::detachAttributesFromElement): Ditto. (WebCore::NamedNodeMap::~NamedNodeMap): Ditto. (WebCore::NamedNodeMap::isMappedAttributeMap): Ditto. (WebCore::NamedNodeMap::getNamedItem): Ditto. (WebCore::NamedNodeMap::getNamedItemNS): Ditto. (WebCore::NamedNodeMap::removeNamedItem): Ditto. (WebCore::NamedNodeMap::removeNamedItemNS): Ditto. (WebCore::NamedNodeMap::setNamedItem): Ditto. (WebCore::NamedNodeMap::item): Ditto. (WebCore::NamedNodeMap::getAttributeItem): Ditto. (WebCore::NamedNodeMap::clearAttributes): Ditto. (WebCore::NamedNodeMap::detachFromElement): Ditto. (WebCore::NamedNodeMap::setAttributes): Ditto. (WebCore::NamedNodeMap::addAttribute): Ditto. (WebCore::NamedNodeMap::removeAttribute): Ditto. (WebCore::NamedNodeMap::mapsEquivalent): Ditto. * dom/NamedMappedAttrMap.cpp: (WebCore::NamedMappedAttrMap::clearAttributes): Ditto. * dom/NamedMappedAttrMap.h: (WebCore::NamedMappedAttrMap::NamedMappedAttrMap): Ditto. * dom/Node.cpp: (WebCore::Node::dumpStatistics): Ditto. (WebCore::Node::isEqualNode): Ditto. (WebCore::Node::isDefaultNamespace): Ditto. (WebCore::Node::lookupNamespaceURI): Ditto. (WebCore::Node::lookupNamespacePrefix): Ditto. (WebCore::Node::compareDocumentPosition): Ditto. * dom/Node.h: Ditto. * dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::XMLTokenizer): Ditto. * editing/ApplyStyleCommand.cpp: (WebCore::isSpanWithoutAttributesOrUnstyleStyleSpan): Ditto. (WebCore::isEmptyFontTag): Ditto. (WebCore::areIdenticalElements): Ditto. * editing/markup.cpp: (WebCore::appendStartMarkup): Ditto. (WebCore::completeURLs): Ditto. * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Ditto. * rendering/RenderPartObject.cpp: (WebCore::RenderPartObject::updateWidget): Ditto. * svg/SVGAnimatedProperty.h: (WebCore::synchronizeProperty): Ditto. * xml/XPathFunctions.cpp: (WebCore::XPath::FunLang::evaluate): Ditto. * xml/XPathStep.cpp: (WebCore::XPath::Step::nodesInAxis): Ditto. 2009-03-30 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=24750 [GTK] requests download instead of displaying page Use soup facilities to append parameters to the content type, to make that more robust; * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::fillResponseFromMessage): 2009-03-30 David Kilzer <ddkilzer@apple.com> <rdar://problem/6735683> Move SECTORDER_FLAGS from Xcode project to WebCore.xcconfig Reviewed by Timothy Hatcher, Mark Rowe and Darin Adler. * Configurations/Base.xcconfig: Moved Production definition of SECTORDER_FLAGS to here from Xcode project file. * Configurations/DebugRelease.xcconfig: Override SECTORDER_FLAGS in Base.xcconfig to the empty string since it is not used for Debug and Release configurations. * WebCore.xcodeproj/project.pbxproj: Removed SECTORDER_FLAGS. 2009-03-30 Adam Roben <aroben@apple.com> Windows build fix after recent Node.idl changes * bindings/scripts/CodeGeneratorCOM.pm: Touched this to force sources of classes that derive from Node to rebuild. 2009-03-30 Adam Roben <aroben@apple.com> Windows build fix * svg/graphics/SVGImage.cpp: Added a missing #include. 2009-03-30 Mads Ager <ager@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24879 Add frame accessor to Screen, Console, and BarInfo objects. Add type accessor to BarInfo objects. In the V8 JavaScript bindings, we need access to the frame and type for already created Screen, Console, and BarInfo objects in order to keep their wrappers alive across GCs. * page/BarInfo.cpp: (WebCore::BarInfo::frame): Added. (WebCore::BarInfo::type): Added. * page/BarInfo.h: * page/Console.cpp: (WebCore::Console::frame): Added. * page/Console.h: * page/Screen.cpp: (WebCore::Screen::frame): Added. * page/Screen.h: 2009-03-29 Darin Adler <darin@apple.com> Requested by Antti Koivisto. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::subresource): Tweaked code to be a little clearer and added a better comment. 2009-03-29 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. Bug 23445: Copying certain hidden text causes a crash https://bugs.webkit.org/show_bug.cgi?id=23445 rdar://problem/6512520 Test: editing/pasteboard/copy-display-none.html * editing/markup.cpp: (WebCore::createMarkup): Added a check for the case where adjusting the start node moves the start of the selection past the end of the range entirely. If we try to iterate we'll never hit the end of the range and will probably crash iterating the rest of the document. 2009-03-29 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. Bug 24672: ASSERTION FAILURE: !m_purgeableData in WebCore::CachedResource::data() saving a WebArchive https://bugs.webkit.org/show_bug.cgi?id=24672 rdar://problem/6574263 I couldn't create a test case for this. In fact, the case in the bug doesn't exist any more, but there is an Apple-internal website I was able to use to reproduce and fix. * loader/CachedResource.h: Made makePurgeable public. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::subresource): Call makePurgeable to make the resource non-purgeable so we can get its data if it hasn't yet been purged. 2009-03-29 Darin Adler <darin@apple.com> Fix build again. * loader/EmptyClients.h: Fix typo in name of FormState.h. 2009-03-29 Darin Adler <darin@apple.com> Try to fix the release build. * history/CachedPage.cpp: Make include unconditional, not debug-only. 2009-03-29 Greg Bolsinga <bolsinga@apple.com> Undo that last build fix, since it turned out the file wasn't deleted. * WebCore.xcodeproj/project.pbxproj: 2009-03-29 Greg Bolsinga <bolsinga@apple.com> Fix build break by removing references to deleted header files. * WebCore.xcodeproj/project.pbxproj: 2009-03-29 Darin Adler <darin@apple.com> Try to fix the Windows build. * loader/EmptyClients.h: Added include of FormState.h. * loader/MainResourceLoader.cpp: Ditto. 2009-03-29 Dmitry Titov <dimich@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24926 Fix Chromium build break. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::CALLBACK_FUNC_DECL(DOMWindowShowModalDialog)): renamed 'features' into 'windowFeatures'. 2009-03-29 Darin Adler <darin@apple.com> Another attempt to fix the Qt build. * WebCore.pro: Added CheckedRadioButtons.cpp. 2009-03-29 Darin Adler <darin@apple.com> Reviewed by Cameron Zwarich. Bug 24921: remove include of HTMLFormElement.h from Document.h https://bugs.webkit.org/show_bug.cgi?id=24921 * GNUmakefile.am: Added CheckedRadioButtons source files. * WebCore.scons: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCoreSources.bkl: Ditto. * bindings/objc/PublicDOMInterfaces.h: Changed type of parentElement to Element. * dom/CheckedRadioButtons.cpp: Copied from WebCore/html/HTMLFormElement.cpp. Removed all the code except for CheckedRadioButtons, and moved that out to be a namespace-level class instead of a member of HTMLFormElement. * dom/CheckedRadioButtons.h: Copied from WebCore/html/HTMLFormElement.h. Removed all the code except for CheckedRadioButtons, and moved that out to be a namespace-level class instead of a member of HTMLFormElement. * dom/Document.h: Removed unneeded includes, including HTMLFormElement.h. Added include of CheckedRadioButtons.h. Changed uses of CheckedRadioButtons class to use a namespace-level class instead of a member of HTMLFormElement. * dom/Node.idl: Changed the type of parentElement from Node to Element for two reasons. 1) Node was incorrect, since parentElement returns an Element. 2) The bindings won't compile any more unless they know parentElement's return value is an Element due to include changes. * html/HTMLFormElement.cpp: Moved definitions of the functions in the CheckedRadioButtons class to the new CheckedRadioButtons.cpp. * html/HTMLFormElement.h: Moved definition of the CheckedRadioButtons class to the new CheckedRadioButtons.h. * html/HTMLInputElement.cpp: (WebCore::checkedRadioButtons): Changed use of CheckedRadioButtons class to use a namespace-level class instead of a member of HTMLFormElement. * page/Chrome.cpp: (WebCore::Chrome::createWindow): Tweaked formatting. * css/CSSGrammar.y: Added newly-needed include. * dom/Range.cpp: Ditto. * editing/BreakBlockquoteCommand.cpp: Ditto. * editing/CompositeEditCommand.cpp: Ditto. * editing/InsertLineBreakCommand.cpp: Ditto. * editing/ModifySelectionListLevel.cpp: Ditto. * editing/RemoveFormatCommand.cpp: Ditto. * editing/TextIterator.cpp: Ditto. * editing/VisiblePosition.cpp: Ditto. * loader/DocLoader.cpp: Ditto. * page/AccessibilityRenderObject.cpp: Ditto. * page/Page.cpp: Ditto. * rendering/RenderBlock.cpp: Ditto. * rendering/RenderLayer.cpp: Ditto. * rendering/RenderObject.h: Ditto. * storage/LocalStorageArea.cpp: Ditto. * storage/SessionStorageArea.cpp: Ditto. 2009-03-29 Darin Adler <darin@apple.com> Reviewed by Dan Bernstein. <rdar://problem/6015407> attr parsing should allow only identifiers Test: fast/css/attr-parsing.html * css/CSSParser.cpp: (WebCore::CSSParser::parseContent): Allow only CSS_IDENT, and filter out identifiers that start with "-". * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText): Added a case for CSS_ATTR so the test case works. This has the pleasant side effect of fixing a bug too. 2009-03-29 Alexey Proskuryakov <ap@webkit.org> <rdar://problem/6492712> Cross-origin redirects are not handled correctly. Forgot to save the file after applying changes for review comments. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willSendRequest): (WebCore::didReceiveResponse): (WebCore::didReceiveData): (WebCore::didSendBodyData): (WebCore::didFinishLoading): (WebCore::didFail): (WebCore::willCacheResponse): (WebCore::didReceiveChallenge): (WebCore::WebCoreSynchronousLoader::willSendRequest): (WebCore::WebCoreSynchronousLoader::didReceiveResponse): (WebCore::WebCoreSynchronousLoader::didReceiveData): (WebCore::WebCoreSynchronousLoader::didFinishLoading): (WebCore::WebCoreSynchronousLoader::didFail): (WebCore::WebCoreSynchronousLoader::didReceiveChallenge): 2009-03-28 Alexey Proskuryakov <ap@webkit.org> Reviewed by Darin Adler. <rdar://problem/6492712> Cross-origin redirects are not handled correctly. Test: http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): (WebCore::ResourceHandle::loadResourceSynchronously): (WebCore::WebCoreSynchronousLoader::willSendRequest): (WebCore::WebCoreSynchronousLoader::didReceiveResponse): (WebCore::WebCoreSynchronousLoader::didReceiveData): (WebCore::WebCoreSynchronousLoader::didFinishLoading): (WebCore::WebCoreSynchronousLoader::didFail): (WebCore::WebCoreSynchronousLoader::didReceiveChallenge): (WebCore::WebCoreSynchronousLoader::load): Match Mac behavior more closely - we shouldn't rely on underlying library handling of synchronous requests. * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::willSendRequest): -[NSURLConnection cancel] doesn't fully cancel the connection if called from willSendRequest delegate method for a redirect. * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Match async behavior more closely. 2009-03-28 Darin Adler <darin@apple.com> Reviewed by Mark Rowe. Bug 24914: empty-string assertion crash when running storage tests https://bugs.webkit.org/show_bug.cgi?id=24914 * storage/Database.cpp: (WebCore::Database::performOpenAndVerify): Don't store empty version strings in the map, since empty strings are per-thread. 2009-03-28 Dmitry Titov <dimich@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24910 Fixes for Chromium build. * bindings/v8/V8LazyEventListener.h: renamed IsInline() into virtualIsInline() * bindings/v8/custom/V8CustomEventListener.h: ditto. * dom/EventListener.h: used #if USE(JSC) to fix the build on non-JSC platform. 2009-03-28 Dimitri Glazkov <dglazkov@chromium.org> Not reviewed, correcting landing error. https://bugs.webkit.org/show_bug.cgi?id=24812 Custom bindings should be in v8/custom, not v8. * bindings/v8/V8HTMLDocumentCustom.cpp: Removed. * bindings/v8/custom/V8HTMLDocumentCustom.cpp: Moved from parent dir. 2009-03-28 Mike Belshe <mike@belshe.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24616 Add V8 custom bindings for DOMWindow. * bindings/v8/custom/V8DOMWindowCustom.cpp: Added. 2009-03-28 Mike Belshe <mike@belshe.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24812 Add V8 custom bindings for HTMLDocument. * bindings/v8/V8HTMLDocumentCustom.cpp: Added. 2009-03-27 Mark Rowe <mrowe@apple.com> Reviewed by Sam Weinig. Fix two SVG test failures in 64-bit. getSubStringLength's arguments were declared as unsigned in the IDL and as signed long in the implementation. This led to a value of -1 in JavaScript being converted to MAX_UINT in the bindings. In 32-bit this was identical to -1 when interpeted as signed long, but in 64-bit it was still equal to MAX_UINT. The solution for this is to use the IsIndex attribute on arguments that the SVG spec declares as "unsigned long" but requires an exception be thrown when a negative value is passed. This results in the JS bindings handling the check for a negative value and lets the implementation treat the arguments purely as unsigned values. * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::getNumberOfChars): (WebCore::SVGTextContentElement::getSubStringLength): (WebCore::SVGTextContentElement::getStartPositionOfChar): (WebCore::SVGTextContentElement::getEndPositionOfChar): (WebCore::SVGTextContentElement::getExtentOfChar): (WebCore::SVGTextContentElement::getRotationOfChar): (WebCore::SVGTextContentElement::getCharNumAtPosition): (WebCore::SVGTextContentElement::selectSubString): * svg/SVGTextContentElement.h: * svg/SVGTextContentElement.idl: 2009-03-27 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. Get mailto code out of FrameLoader. * html/HTMLFormElement.cpp: (WebCore::transferMailtoPostFormDataToURL): Added. Factored out the mailto logic so HTMLFormElement::submit isn't full of ugly bits. This includes the part of the logic that involves transformeing the URL that was previously inside FrameLoader. (WebCore::HTMLFormElement::submit): Call transferMailtoPostFormDataToURL and also release the data for slightly less refcount churn. * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): Removed all the special casing for mailto, since HTMLFormElement now properly prepares both the URL and the form data. 2009-03-27 Dan Bernstein <mitz@apple.com> Reviewed by Mark Rowe. - fix <rdar://problem/6724514> A bit of OpenTypeUtilities cleanup * platform/graphics/chromium/FontCustomPlatformData.cpp: (WebCore::EOTStream::EOTStream): Changed to use EOTHeader. (WebCore::createFontCustomPlatformData): Ditto. * platform/graphics/opentype/OpenTypeUtilities.cpp: (WebCore::EOTHeader::EOTHeader): Added. Initializes the buffer size to the size of an EOTPrefix. (WebCore::EOTHeader::updateEOTSize): Added. Updates the size field in the prefix. (WebCore::EOTHeader::appendBigEndianString): Changed the static appendBigEndianStringToEOTHeader() into this member function. (WebCore::EOTHeader::appendPaddingShort): Added. (WebCore::getEOTHeader): Changed to use EOTHeader. * platform/graphics/opentype/OpenTypeUtilities.h: (WebCore::EOTHeader::size): (WebCore::EOTHeader::data): (WebCore::EOTHeader::prefix): * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::EOTStream::EOTStream): Changed to use EOTHeader. (WebCore::createFontCustomPlatformData): Ditto. 2009-03-27 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. To prepare for work on a form loading fix, remove some unused functions, consolidate some functions, and make many more functions private in FrameLoader. * WebCore.base.exp: Remove some unused entry points, update another. * dom/Document.cpp: (WebCore::Document::detach): Clear m_frame directly instead of using clearFramePointer. * dom/Document.h: Ditto. * loader/FrameLoader.cpp: (WebCore::FrameLoader::urlSelected): Consolidate the two functions of this name into a single function. Also changed the event argument to be PassRefPtr<Event>. (WebCore::FrameLoader::submitForm): Changed the event argument to be PassRefPtr<Event>. (WebCore::FrameLoader::scheduleLocationChange): Call completeURL explicitly so we can remove the version of changeLocation that does completeURL for us. (WebCore::FrameLoader::redirectionTimerFired): Ditto. (WebCore::FrameLoader::loadURLIntoChildFrame): Set m_provisionalHistoryItem directly so we don't need a setProvisionalHistoryItem function. (WebCore::FrameLoader::canCachePageContainingThisFrame): Get at m_quickRedirectComing directly so we don't need a isQuickRedirectComing function. (WebCore::FrameLoader::logCanCacheFrameDecision): Ditto. (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): Changed the event argument to be PassRefPtr<Event>. (WebCore::FrameLoader::loadURL): Move the logic of the continueLoadWithData function here because this is the only caller. If we want to make the resulting function smaller we should refactor some other way. Also streamlined the user-chosen encoding logic, but did not change what it does. (WebCore::FrameLoader::finishedLoadingDocument): Changed the event argument to be PassRefPtr<Event>. (WebCore::FrameLoader::loadPostRequest): Ditto. (WebCore::FrameLoader::receivedMainResourceError): Moved the logic from the didNotOpenURL function here, since this was the only caller. * loader/FrameLoader.h: Removed include of FormState.h and used a forward declaration instead. Removed unneeded forward declation of Element. Moved many functions into the private section, and removed some other unused or uneeded functions. 2009-03-27 Xiaomei Ji <xji@chromium.org> Reviewed by Dan Bernstein. Fix https://bugs.webkit.org/show_bug.cgi?id=24303 Using keyboard select RTL text, Highlights goes to opposite direction from Firefox and IE. Test: editing/selection/extend-selection.html * editing/SelectionController.cpp: (WebCore::SelectionController::directionOfEnclosingBlock): Added (WebCore::SelectionController::modifyExtendingRight): Added. Currenctly implemented for character and word granularity, all other granularities are treated as "forward". (WebCore::SelectionController::modifyExtendingForward): Renamed modifyExtendingRightForward() to this. (WebCore::SelectionController::modifyExtendingLeft): Added. Currenctly implemented for character and word granularity, all other granularities are treated as "backward". (WebCore::SelectionController::modifyExtendingBackward): Renamed modifyExtendingLeftBackward() to this. (WebCore::SelectionController::modify): Change to call either the left/right or backward/forward methods depending on the 'dir' argument for extends. * editing/SelectionController.h: 2009-03-27 John Abd-El-Malek <jam@google.com> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=24836 Fix navigator.plugins.refresh(false) in Chromium. * plugins/chromium/PluginDataChromium.cpp: (WebCore::PluginData::refresh): 2009-03-27 Timothy Hatcher <timothy@apple.com> Make scrollLeft, scrollTop, scrollWidth, and scrollHeight virtual to fix the broken layout tests from my last commit. Reviewed by Mark Rowe. * dom/Element.cpp: (WebCore::Element::scrollLeft): (WebCore::Element::scrollTop): (WebCore::Element::scrollWidth): (WebCore::Element::scrollHeight): * dom/Element.h: * html/HTMLBodyElement.h: 2009-03-27 Mark Rowe <mrowe@apple.com> Reviewed by Sam Weinig. Fix <https://bugs.webkit.org/show_bug.cgi?id=24876>. Bug 24876: fast/forms/select-max-length.html times out in debug builds due to HTMLSelectElement::setLength being O(N^2) * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setLength): Repeatedly calling remove to remove elements causes us to recalculate the list items after each node is removed, leading to O(N^2) behaviour. By inlining the batch removal in to setLength we can avoid this gratuitous recalcuation. 2009-03-27 Dirk Schulze <krit@webkit.org> Reviewed by Eric Seidel. We don't support images for GtkCursors yet. We need a placeholder to avoid crashes. I took crosshair to have a common behavior with firefox. [GTK] SVG - Crash on setting the cursor icon https://bugs.webkit.org/show_bug.cgi?id=24565 * platform/gtk/CursorGtk.cpp: (WebCore::Cursor::Cursor): 2009-03-27 Timothy Hatcher <timothy@apple.com> Remove redundant attributes and functions from IDL files that have the same attributes and functions defined in the super class. Reviewed by Simon Fraser. * WebCore.xcodeproj/project.pbxproj: Remove DOMHTMLBodyElementPrivate.h. * bindings/objc/PublicDOMInterfaces.h: Remove focus and blur from DOMHTMLElement. * html/HTMLBodyElement.idl: Remove scrollLeft, scrollTop, scrollWidth and scrollHeight. * html/HTMLElement.idl: Remove blur and focus. 2009-03-27 Adam Roben <aroben@apple.com> Don't include substitute data URLs in global history redirect chains <rdar://6690169> Reviewed by Darin Adler. This might be testable if: - support were added to DRT for providing substitute data on failed loads - support were added to DRT for dumping redirect chains I tried doing the above and was still unable to make a test. * loader/FrameLoader.cpp: (WebCore::FrameLoader::updateHistoryForStandardLoad): (WebCore::FrameLoader::updateHistoryForRedirectWithLockedBackForwardList): Call updateGlobalHistoryRedirectLinks only if the load succeeded (i.e., there is no unreachableURL). Previous the FrameLoaderClient implementations were unconditionally calling updateGlobalHistoryRedirectLinks from within updateGlobalHistory. 2009-03-27 Peter Kasting <pkasting@google.com> Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=24861 Chromium port did not render decorations for <input type="search">. This copies RenderThemeWin.*. * css/themeChromiumWin.css: Removed. * rendering/RenderThemeChromiumLinux.cpp: (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet): (WebCore::RenderThemeChromiumLinux::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeChromiumLinux::paintSearchFieldCancelButton): (WebCore::RenderThemeChromiumLinux::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsDecoration): (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsButton): * rendering/RenderThemeChromiumLinux.h: (WebCore::RenderThemeChromiumLinux::paintSearchField): * rendering/RenderThemeChromiumWin.cpp: (WebCore::): (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet): (WebCore::RenderThemeChromiumWin::adjustSearchFieldCancelButtonStyle): (WebCore::RenderThemeChromiumWin::paintSearchFieldCancelButton): (WebCore::RenderThemeChromiumWin::adjustSearchFieldDecorationStyle): (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsDecorationStyle): (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsDecoration): (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsButtonStyle): (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsButton): * rendering/RenderThemeChromiumWin.h: (WebCore::RenderThemeChromiumWin::paintSearchField): 2009-03-27 David Hyatt <hyatt@apple.com> Reviewed by Simon Fraser If an object has a self-painting layer, don't count it as part of a block's visual overflow. This fix has only been made for block-level children. The inline-level case is still broken (and covered by an existing bug). Added fast/block/positioning/negative-rel-position.html * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesVertically): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChildren): (WebCore::RenderBlock::lowestPosition): (WebCore::RenderBlock::rightmostPosition): (WebCore::RenderBlock::leftmostPosition): 2009-03-27 Anders Carlsson <andersca@apple.com> Reviewed by Darin Adler. <rdar://problem/6642221> REGRESSION: With the Movie widget, movie trailer fails to load if movie had been previously viewed Add a dashboard specific workaround so that we always create renderers for object elements, even if display:none is set. I've filed <rdar://problem/6731022> against the Movies widget. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::rendererIsNeeded): 2009-03-25 Timothy Hatcher <timothy@apple.com> Expose new DOM methods as public Objective-C API. <rdar://problem/5837350> Expose new DOM classes and methods as public API (match the additions to the JavaScript DOM) Reviewed by Mark Rowe and Darin Adler. * WebCore.xcodeproj/project.pbxproj: * bindings/objc/DOMHTML.h: * bindings/objc/DOMPrivate.h: * bindings/objc/PublicDOMInterfaces.h: 2009-03-27 Zack Rusin <zack@kde.org> Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=24280 Fix propagation of fill rules when rendering paths in the Qt build. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::toQtFillRule): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): 2009-03-27 Zack Rusin <zack@kde.org> Reviewed by Tor Arne Vestbø. https://bugs.webkit.org/show_bug.cgi?id=24275 Fix text field theming in the Qt build with the KDE 4 Oxygen style by adjusting the size vertically and horizontally to set padding on the element equal to the width of the style painted border. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::RenderThemeQt): (WebCore::RenderThemeQt::computeSizeBasedOnStyle): (WebCore::RenderThemeQt::adjustTextFieldStyle): (WebCore::RenderThemeQt::paintTextField): * platform/qt/RenderThemeQt.h: 2009-03-27 Laszlo Gombos <laszlo.1.gombos@nokia.com> Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=24852 Build fix for GNU mode RVCT compilation * html/PreloadScanner.cpp: 2009-03-27 Erik L. Bunce <elbunce@xendom.com> Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=24868 Make text of the writing direction items more user friendly. * platform/qt/Localizations.cpp: (WebCore::contextMenuItemTagLeftToRight): (WebCore::contextMenuItemTagRightToLeft): 2009-03-27 Erik L. Bunce <elbunce@xendom.com> Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=24274 Fixed the Qt 4.4 Mac build with netscape plugins enabled. * plugins/mac/PluginViewMac.cpp: 2009-03-26 Mark Rowe <mrowe@apple.com> Try and fix the Qt build. * platform/text/TextEncodingDetectorNone.cpp: (WebCore::detectTextEncoding): 2009-03-26 Eric Carlson <eric.carlson@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=24874 24874: HTMLMediaElement: 'duration' defaults to NaN, deal with it The 'duration' attribute is NaN when no media is available, so the media element should take care when comparing with duration(). * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Don't compare with duration when it is NaN. (WebCore::HTMLMediaElement::endedPlayback): Ditto. 2009-03-26 Mark Rowe <mrowe@apple.com> Fix the build. * platform/text/TextEncodingDetectorICU.cpp: * platform/text/TextEncodingDetectorNone.cpp: 2009-03-26 Jungshik Shin <jshin@chromium.org> Reviewed by Cameron Zwarich. 1. Fix the crash in setHintEncoding 2. Fix build failures on Tiger and Qt. UnusedParam.h was not included by TextEncodingDetector{None,ICU}.cpp in the patch landed in r42023 for http://bugs.webkit.org/show_bug.cgi?id=16482 * loader/TextResourceDecoder.h: (WebCore::TextResourceDecoder::setHintEncoding): * platform/text/TextEncodingDetectorICU.cpp: * platform/text/TextEncodingDetectorNone.cpp: 2009-03-26 Simon Fraser <simon.fraser@apple.com> Build fix when ACCELERATED_COMPOSITING is turned on. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::canUseDirectCompositing): 2009-03-26 Eric Seidel <eric@webkit.org> No additional review, committing previously reviewed files for build fix only. Add files I missed when commiting Jungshik's patch in r42022. https://bugs.webkit.org/show_bug.cgi?id=16482 * icu/unicode/ucsdet.h: Added. * platform/text/TextEncodingDetector.h: Added. * platform/text/TextEncodingDetectorICU.cpp: Added. (WebCore::detectTextEncoding): * platform/text/TextEncodingDetectorNone.cpp: Added. (WebCore::detectTextEncoding): 2009-03-26 Jungshik Shin <jshin@chromium.org> Reviewed by Alexey Proskuryakov. Add an encoding detector 'hook' to TextResourceDecoder. - add |usesEncodingDetector| to Settings. It's off by default. - add a new encoding source type |EncodingFromParent| to distinguish cases when the encoding is inherited from the parent frame from cases when it's actually auto-detected. - add TextEncodingDetector* to platform/text. Currently, the only implementation uses ICU. Stub is added for ports that do not use ICU and a build on Tiger. Mac OS Tiger comes with ICU 3.2 that does not support encoding detector. - add ucsdet.h to icu/unicode for ports using ICU. Layout tests will be added once bug 20534 is fixed and a WebPreference can be controlled in test_shell. With UsesEncodingDetector off, there is no change to test. http://bugs.webkit.org/show_bug.cgi?id=16482 * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCore/GNUmakefile.am * WebCore/WebCore.pro * WebCore/WebCore.scons * WebCore/WebCoreSources.bkl * WebCore.base.exp * icu/unicode/ucsdet.h * loader/FrameLoader.cpp: (WebCore::FrameLoader::write): turn on/off encoding detector depending on Settings and set hintEncoding of TextResourceDecoder to the parent frame encoding if necessary and the security policy allows refering to the parent frame encoding. * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::TextResourceDecoder): (WebCore::TextResourceDecoder::checkForCSSCharset): add check for EncodingFromParentFrame (WebCore::TextResourceDecoder::checkForHeadCharset): ditto (WebCore::TextResourceDecoder::shouldAutoDetect): (WebCore::TextResourceDecoder::decode): call encoding detector if shouldAutoDetect returns true. (WebCore::TextResourceDecoder::flush): if encoding is not determined by now, call encoding detector if shouldAutoDetect returns true. * loader/TextResourceDecoder.h: (WebCore::TextResourceDecoder::): (WebCore::TextResourceDecoder::create): (WebCore::TextResourceDecoder::setHintEncoding): (WebCore::TextResourceDecoder::source): * page/Settings.cpp: add m_usesEncodingDetector (WebCore::Settings::Settings): (WebCore::Settings::setUsesEncodingDetector): * page/Settings.h: (WebCore::Settings::usesEncodingDetector): * platform/text/TextEncodingDetector.h: Added. * platform/text/TextEncodingDetectorICU.cpp: Added. (WebCore::detectTextEncoding): * platform/text/TextEncodingDetectorNone.cpp: Added. (WebCore::detectTextEncoding): 2009-03-26 Darin Adler <darin@apple.com> Reviewed by Geoff Garen. Removed code that casts EventListener down to derived classes without type checking. A crash could happen if you added event listeners with Objective-C and then manipulated the class with JavaScript. * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::mark): Removed all the casts and used the markIfNotNull function and mark functions on EventListener instead. * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::mark): Ditto. * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::mark): Ditto. * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::mark): Ditto. * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::mark): Ditto. * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::mark): Ditto. * bindings/js/JSEventListener.cpp: (WebCore::JSAbstractEventListener::handleEvent): Used function, the new name for what used to be called listenerObj. (WebCore::JSAbstractEventListener::virtualIsInline): Renamed since this doesn't need to be virtual for callers who have a pointer to this class, not the base class. (WebCore::JSEventListener::function): Renamed from listenerObj. (WebCore::JSProtectedEventListener::function): Ditto. * bindings/js/JSEventListener.h: Removed unneeded forward class declarations. Made all virtual functions private since there's no need to call any of them on a particular derived class, only on EventListener. Explicitly declare JSEventListener::mark as virtual since it's now overriding a function in the EventListener base class. Made JSProtectedEventListener::m_globalObject protected so the JSLazyEventListener derived class can use it directly instead of using a virtual function to get the pointer. * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Use m_globalObject instead of globalObject since the latter is a virtual function and there's no need to pay virtual function overhead. (WebCore::JSLazyEventListener::function): Renamed from listenerObj. * bindings/js/JSLazyEventListener.h: Moved forward declaration of the Node class here from JSEventListener.h. * bindings/scripts/CodeGeneratorJS.pm: Removed now-unneeded cast to JSEventListener when getting the script object from a listener. * dom/EventListener.h: Added virtual function and mark functions so we can extract the JavaScript function object or mark a JavaScript event listener in a type safe manner. 2009-03-26 Peter Kasting <pkasting@google.com> Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=24859 Use CSS file instead of code to adjust search field styling. * css/themeWin.css: * rendering/RenderThemeWin.cpp: * rendering/RenderThemeWin.h: 2009-03-26 Darin Adler <darin@apple.com> Reviewed by Geoff Garen. Split JSLazyEventListener out into its own separate source file. We'll be removing JSAbstractEventListener and JSProtectedEventListener soon, so leave those in the same file with JSEventListener. * GNUmakefile.am: Added JSLazyEventListener. * WebCore.pro: Ditto. * WebCore.scons: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCoreSources.bkl: Ditto. * bindings/js/JSEventListener.cpp: Removed the JSLazyEventListener part. Removed unneeded includes. Removed incorrect ASSERT_CLASS_FITS_IN_CELL, since JSAbstractEventListener is not derived from JSCell. * bindings/js/JSEventListener.h: Removed the JSLazyEventListener part and the now-unneeded include of PlatformString.h. * bindings/js/JSLazyEventListener.cpp: Copied from bindings/js/JSEventListener.cpp. Kept only the JSLazyEventListener part. (WebCore::eventParameterName): Made this have internal linkage by adding "static". Also moved the default case out of the switch statement so we will get a warning if we omit any cases in the future. * bindings/js/JSLazyEventListener.h: Copied from bindings/js/JSEventListener.h. Kept only the JSLazyEventListener part. * bindings/js/ScriptController.cpp: Removed unneeded includes and sorted the remanining ones. Include JSLazyEventListener.h instead of JSEventListener.h. 2009-03-26 Darin Adler <darin@apple.com> Reviewed by Geoff Garen. Renamed JSUnprotectedEventListener to JSEventListener. And related renames. Soon Geoff will make all JavaScript event listeners use mark instead of protect, so there's no need to emphasize "unprotected". * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::mark): (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::findJSEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener): (WebCore::JSDOMGlobalObject::jsEventListeners): (WebCore::JSDOMGlobalObject::jsInlineEventListeners): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.h: * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::~JSEventListener): (WebCore::JSEventListener::listenerObj): (WebCore::JSEventListener::globalObject): (WebCore::JSEventListener::clearGlobalObject): (WebCore::JSEventListener::mark): * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::mark): (WebCore::JSMessagePort::addEventListener): (WebCore::JSMessagePort::removeEventListener): * bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::mark): (WebCore::JSWorkerContext::addEventListener): (WebCore::JSWorkerContext::removeEventListener): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::mark): (WebCore::JSWorker::addEventListener): (WebCore::JSWorker::removeEventListener): * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::mark): (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): * bindings/js/JSXMLHttpRequestUploadCustom.cpp: (WebCore::JSXMLHttpRequestUpload::mark): (WebCore::JSXMLHttpRequestUpload::addEventListener): (WebCore::JSXMLHttpRequestUpload::removeEventListener): * bindings/scripts/CodeGeneratorJS.pm: All just renaming. 2009-03-26 Darin Adler <darin@apple.com> Reviewed by Geoff Garen. Renamed JSEventListener to JSProtectedEventListener. And related renames. Soon Geoff will make all JavaScript event listeners use mark instead of protect, and so this class will be be obsolete. We will rename JSUnrpotectedEventListener to JSEventListener in the next check-in, since that one will remain. * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::findJSProtectedEventListener): (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener): (WebCore::JSDOMGlobalObject::jsProtectedEventListeners): (WebCore::JSDOMGlobalObject::jsProtectedInlineEventListeners): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.h: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::addEventListener): (WebCore::JSDOMWindow::removeEventListener): * bindings/js/JSEventListener.cpp: (WebCore::JSProtectedEventListener::JSProtectedEventListener): (WebCore::JSProtectedEventListener::~JSProtectedEventListener): (WebCore::JSProtectedEventListener::listenerObj): (WebCore::JSProtectedEventListener::globalObject): (WebCore::JSProtectedEventListener::clearGlobalObject): (WebCore::JSLazyEventListener::JSLazyEventListener): (WebCore::JSLazyEventListener::parseCode): * bindings/js/JSEventListener.h: (WebCore::JSProtectedEventListener::create): * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::addEventListener): (WebCore::JSNode::removeEventListener): * bindings/js/JSSVGElementInstanceCustom.cpp: (WebCore::JSSVGElementInstance::addEventListener): (WebCore::JSSVGElementInstance::removeEventListener): * bindings/scripts/CodeGeneratorJS.pm: All just renaming. 2009-03-26 Dan Bernstein <mitz@apple.com> Reviewed by Anders Carlsson. - fix <rdar://problem/6725042> BidiResolver::createBidiRunsForLine can create runs extending beyond the end No test because Safari does not use this version of createBidiRunsForLine() with the end iterator not pointing to the end of the text run. * platform/text/BidiResolver.h: (WebCore::BidiResolver::appendRun): Cap the end of the run at the end of the line and set the reachedEndOfLine flag. This mirrors the logic in the specialized version of appendRun() in bidi.cpp, which is why the problem did not show up in HTML. Also avoid creating empty runs. 2009-03-26 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=24864 Change the terminology from "inner content layer" to "direct compositing" for cases where we can push an image directly over to the compositing system, without having to draw it. Clean up much of the code which looks at style to determine if this is possible, and fix some bugs when backgrounds change dynamically. * rendering/RenderLayerBacking.cpp: (WebCore::hasBorderOutlineOrShadow): (WebCore::hasBoxDecorations): (WebCore::hasBoxDecorationsWithBackgroundImage): (WebCore::RenderLayerBacking::canBeSimpleContainerCompositingLayer): (WebCore::RenderLayerBacking::canUseDirectCompositing): (WebCore::RenderLayerBacking::detectDrawingOptimizations): (WebCore::RenderLayerBacking::rendererContentChanged): (WebCore::RenderLayerBacking::updateImageContents): * rendering/RenderLayerBacking.h: 2009-03-26 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=23914 Tests: compositing/overflow/ancestor-overflow.html compositing/overflow/parent-overflow.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): * rendering/RenderLayer.h: (WebCore::ClipRects::infiniteRect): New static method that returns a large rect that is used by the clipping logic. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Use parentClipRects(), rather than calculateRects(), to compute the overflow rect that we'll use to create a masking layer for composited clipping. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::clippedByAncestor): Use parentClipRects() to see whether there's a layer between us and our compositing ancestor which applies clipping. (WebCore::RenderLayerCompositor::clipsCompositingDescendants): A layer which imposes clipping to its children doesn't have to be a stacking context; it might be a normal flow layer; in either case, we can rely on the hasCompositingDescendant() bit. 2009-03-26 Steve Falkenburg <sfalken@apple.com> https://bugs.webkit.org/show_bug.cgi?id=24837 Escape key should dismiss select menu Reviewed by Adam Roben. * platform/win/PopupMenuWin.cpp: (WebCore::PopupWndProc): 2009-03-26 Kevin Ollivier <kevino@theolliviers.com> Reviewed by Alexey Proskuryakov. Make sure the script uses LF line endings even on Windows. https://bugs.webkit.org/show_bug.cgi?id=24805 * WebCore/make-generated-sources.sh: Change svn:eol-style to LF 2009-03-26 Eli Fidler <eli.fidler@torchmobile.com> Reviewed by George Staikos. Remove warnings all over the place by making operator precedence explicit in cases like x && y || z. No functional change. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseShadow): * dom/Document.cpp: (WebCore::Document::shouldScheduleLayout): * dom/Node.cpp: (WebCore::Node::isBlockFlowOrBlockTable): * dom/Node.h: (WebCore::Node::document): * dom/Position.cpp: (WebCore::Position::next): (WebCore::Position::upstream): (WebCore::Position::downstream): (WebCore::Position::getInlineBoxAndOffset): * dom/PositionIterator.cpp: (WebCore::PositionIterator::atStart): * dom/Range.cpp: (WebCore::Range::intersectsNode): * editing/Editor.cpp: (WebCore::Editor::setBaseWritingDirection): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): * editing/TextIterator.cpp: (WebCore::TextIterator::advance): (WebCore::SimplifiedBackwardsTextIterator::advance): * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::leftVisuallyDistinctCandidate): (WebCore::VisiblePosition::rightVisuallyDistinctCandidate): (WebCore::VisiblePosition::canonicalPosition): * editing/htmlediting.cpp: (WebCore::isMailBlockquote): (WebCore::lineBreakExistsAtPosition): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute): * loader/FTPDirectoryDocument.cpp: (WebCore::processFileDateString): * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::checkForHeadCharset): * page/AccessibilityObject.cpp: (WebCore::updateAXLineStartForVisiblePosition): * page/EventHandler.cpp: (WebCore::EventHandler::sendContextMenuEvent): * page/animation/AnimationBase.cpp: (WebCore::PropertyWrapperGetter::equals): (WebCore::PropertyWrapperShadow::equals): * platform/ContextMenu.cpp: (WebCore::ContextMenu::populate): * platform/ScrollView.cpp: (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount): * platform/text/Base64.cpp: (WebCore::base64Encode): * platform/text/BidiResolver.h: (WebCore::::raiseExplicitEmbeddingLevel): (WebCore::::createBidiRunsForLine): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::placeEllipsisBox): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChild): (WebCore::RenderBlock::repaintOverhangingFloats): (WebCore::RenderBlock::fillInlineSelectionGaps): (WebCore::RenderBlock::positionForPoint): (WebCore::RenderBlock::calcInlinePrefWidths): (WebCore::RenderBlock::hasLineIfEmpty): * rendering/RenderBox.cpp: (WebCore::RenderBox::imageChanged): (WebCore::RenderBox::localCaretRect): (WebCore::RenderBox::positionForPoint): (WebCore::RenderBox::shrinkToAvoidFloats): * rendering/RenderObject.h: (WebCore::objectIsRelayoutBoundary): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::clippedOverflowRectForRepaint): * rendering/RenderText.cpp: (WebCore::RenderText::calcPrefWidths): * rendering/bidi.cpp: (WebCore::RenderBlock::determineStartPosition): (WebCore::textWidth): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): * rendering/style/StyleInheritedData.cpp: (WebCore::cursorDataEquivalent): * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::shadowDataEquivalent): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::shadowDataEquivalent): (WebCore::StyleRareNonInheritedData::animationDataEquivalent): (WebCore::StyleRareNonInheritedData::transitionDataEquivalent): 2009-03-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=24804 [GTK] 401 responses cause rogue content to be loaded Our soup code handles 401 responses itself, so we should not feed the headers and data of those responses to the loader. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::gotHeadersCallback): (WebCore::gotChunkCallback): 2009-03-25 Geoffrey Garen <ggaren@apple.com> Reviewed by Oliver Hunt and Darin Adler. Fixed <rdar://problem/6603167> Crash in WebKit!JSC::JSGlobalObject::resetPrototype during Stress test (#3 & #7 WER crashes for Safari 4 Beta) The problem was that allocation of the global object would, for just a moment, leave the global object's prototype unprotected from GC. This bug doesn't apply to non-global DOM objects because their prototypes are cached and marked by the global object. No test case because the crashing condition is hard to deterministically produce in a normal build, and in a Windows Release build with COLLECT_ON_EVERY_ALLOCATION set to 1, existing tests crash/hang. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): Protect the global object's prototype from GC during construction, since the global object does not yet point to it, and therefore won't mark it. 2009-03-25 Dean Jackson <dino@apple.com> Reviewed by Simon Fraser https://bugs.webkit.org/show_bug.cgi?id=23361 When using hardware compositing, some images can be directly rendered by the hardware - no need to draw them into a separate context, therefore saving memory. Only images with certain style properties can be directly composited - basically anything that is not a simple image requires the usual rendering path (eg. if the image has borders). Test: compositing/direct-image-compositing.html * manual-tests/resources/simple_image.png: Added. * manual-tests/simple-image-compositing.html: Added. * platform/graphics/Image.h: (WebCore::Image::startAnimation): - move this to public * rendering/RenderImage.cpp: (WebCore::RenderImage::imageChanged): - poke compositing layer if image has changed (WebCore::RenderImage::notifyFinished): - let the compositing layer know that it can render the image * rendering/RenderImage.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::rendererContentChanged): * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::canUseInnerContentLayer): (WebCore::RenderLayerBacking::detectDrawingOptimizations): (WebCore::RenderLayerBacking::rendererContentChanged): * rendering/RenderLayerBacking.h: - code to hook up direct compositing of images where possible 2009-03-25 David Levin <levin@chromium.org> Reviewed by Dimitri Glazkov. Chromium build fix. Fix #include in V8NodeFilterCondition.cpp due to the rename of V8NodeFilter to V8NodeFilterCondition. * bindings/v8/V8NodeFilterCondition.cpp: 2009-03-25 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=24817 When the slider range is zero, avoid a divide by zero, which caused the thumb to be positioned off in the weeds, which broke painting. Test: media/video-empty-source.html * rendering/RenderSlider.cpp: (WebCore::SliderRange::proportionFromValue): (WebCore::SliderRange::valueFromProportion): (WebCore::sliderPosition): (WebCore::RenderSlider::setValueForPosition): 2009-03-24 Eric Seidel <eric@webkit.org> Reviewed by Darin Adler. Remove dead code and style cleanup https://bugs.webkit.org/show_bug.cgi?id=24684 * html/CanvasStyle.cpp: (WebCore::CanvasStyle::CanvasStyle): Coverty was annoyed that we didn't initialize all of our members. I agree, but I didn't want to paste all 8 members each time, so I just cleaned up the existing constructors and left them. * page/FocusController.cpp: (WebCore::FocusController::setFocusedNode): "node" was checked just above and is already known to be non-null * rendering/RenderLayer.cpp: (WebCore::RenderLayer::insertOnlyThisLayer): We were already using parentLayer w/o a NULL check above, so just add an explicit ASSERT and use it w/o NULL check (WebCore::RenderLayer::resize): element is already ASSERTed above, no need to null check it here * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addCell): currentCell.cell was just assigned to the value "cell" which is known to be non-null, no need to null check again. 2009-03-24 Eric Seidel <eric@webkit.org> Reviewed by Darin Adler. Move ASSERT(foo) to before where foo-> is used https://bugs.webkit.org/show_bug.cgi?id=24684 * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): Move ASSERTs to the top of the function, code was using "node" before ASSERT(node), once I moved ASSERT(node) to the top of the function it made sense to move the rest of them there too. * rendering/SVGRenderSupport.cpp: (WebCore::prepareToRenderSVGContent): move ASSERT(object) to *before* we use "object" :) 2009-03-24 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Make TextTokenizer ASSERT that the buffer was freed https://bugs.webkit.org/show_bug.cgi?id=24684 * loader/TextDocument.cpp: (WebCore::TextTokenizer::TextTokenizer): (WebCore::TextTokenizer::~TextTokenizer): (WebCore::TextTokenizer::finish): Make it clear by adding a ~TextTokenizer that finish() will always be called and the memory never leaked. 2009-03-24 Eric Seidel <eric@webkit.org> Reviewed by Darin Adler. Fix case where lBreak.obj->isBR() when lBreak.obj was NULL https://bugs.webkit.org/show_bug.cgi?id=24684 I don't have a test case where we were taking the wrong path here However, adding an ASSERT(lBreak.obj) before this usage caused multiple bidi tests to fail, so lBreak.obj can be null here. * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): lBreak.obj can be null, so we can't call ->isBR() on it unconditionally. 2009-03-24 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Style cleanup and dead code removal in dom, editing https://bugs.webkit.org/show_bug.cgi?id=24684 * dom/ContainerNode.cpp: (WebCore::ContainerNode::getUpperLeftCorner): (WebCore::ContainerNode::getLowerRightCorner): (WebCore::ContainerNode::getRect): Coverty was (rightly) confused as to what the hell "o" was being used for and whether or not it would ever be NULL. I added some ASSERTS so that people (and machines) would be less confused about the logic in getUpperLeftCorner/getLowerRightCorner * dom/Document.cpp: (WebCore::Document::recalcStyle): Remove dead code, this block already checked that change == Force * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeInlineStyle): Coverty correctly identified that traversePreviousNodePostOrder can return NULL, thus prev will be null, and we don't really explicitly handle it (like we probably should) It's OK though, because we end up creating a null position object, which may not have been what we intended, but we certainly don't crash. * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): Remove dead code, insertionPosition.node() is already checked to be non-null above. * editing/markup.cpp: (WebCore::appendStartMarkup): removed dead code, annotate is already known to be true at this point in the file !annotate was checked above, and break; was called. 2009-03-24 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. CSS dead code removal and cleanup from Coverty errors https://bugs.webkit.org/show_bug.cgi?id=24684 * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Every other place in the code we check settings() for NULL, so I made these places check too, even though we should never be resolving style against a document which has no frame (which I believe is the only time settings() can be null) * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::styleSheetChanged): Removing dead code, "root" can never be null here. * css/SVGCSSStyleSelector.cpp: (WebCore::colorFromSVGColorCSSValue): (WebCore::CSSStyleSelector::applySVGProperty): Extra returns in the old macros caused dead code. Removing the old macros and use modern ones instead. :) Extra null checks to value were not needed. Added an ASSERT at the top of the function to make it clear that value will never be NULL. Added colorFromSVGColorCSSValue to clean up the code a little. 2009-03-24 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Font fallback cleanup and added ASSERT for GlyphPageTreeNode https://bugs.webkit.org/show_bug.cgi?id=24684 * css/CSSFontSelector.cpp: (WebCore::compareFontFaces): Coverty was concerned that it was possible to index off the end of weightFallbackRuleSets I can't read the code well enough to tell, so I tried to make the code clearer and added an ASSERT. * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): Coverty believes we can crash here due to j being larger than GlyphPage::size. I think to is already known to be < GlyphPage::size due to the min() statement above, but not being sure I added an ASSERT. 2009-03-24 Eric Seidel <eric@webkit.org> Reviewed by Simon Fraser. Coverty inspired fixes in Animations/Transforms https://bugs.webkit.org/show_bug.cgi?id=24684 * page/animation/AnimationBase.h: Fix animate() signatures to match so that the virtual methods actually override one another. :) * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::removeFromStartTimeResponseWaitList): Attempt to fix this method, prevAnimation was never set to anything but NULL, as far as I can tell the author originally intended to update it at the end of the loop, which is what I changed this code to do. * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::animate): Make method signature match AnimationBase::animate * page/animation/ImplicitAnimation.h: * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::animate): Make method signature match AnimationBase::animate * page/animation/KeyframeAnimation.h: * platform/graphics/transforms/PerspectiveTransformOperation.cpp: (WebCore::PerspectiveTransformOperation::blend): if (blendToIdentity) already returned above. * platform/graphics/transforms/RotateTransformOperation.cpp: (WebCore::RotateTransformOperation::blend): if (blendToIdentity) already returned above. 2009-03-25 Eli Fidler <eli.fidler@torchmobile.com> Reviewed by George Staikos. Fix compiler warnings regarding assignments in if statements. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::createFormData): * plugins/PluginPackage.cpp: (WebCore::PluginPackage::compare): 2009-03-25 Dan Bernstein <mitz@apple.com> Reviewed by Dave Hyatt. - fix <rdar://problem/6472150> repro crash in RenderBlock::rightmostPosition(bool, bool) const at mercotte.fr using menus Test: fast/inline/continuation-positioned-reparenting.html * rendering/RenderInline.cpp: (WebCore::RenderInline::splitFlow): When repurposing the existing container as the "pre" block, clear its positioned objects list, because positioned descendants may end up in a different block after the split. 2009-03-24 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=24784 Length values in transform operations need to take zoom into account. Test: fast/transforms/transforms-with-zoom.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::createTransformOperations): 2009-03-25 David Hyatt <hyatt@apple.com> Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=24809, background-clip/origin don't use the correct values. Add support for the new values (while preserving the old values for backwards compatibility). Changed some existing test cases to use the new values. * css/CSSParser.cpp: (WebCore::CSSParser::parseFillProperty): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFillBox): * css/CSSValueKeywords.in: 2009-03-25 Brett Wilson <brettw@dhcp-172-22-71-191.mtv.corp.google.com> Reviewed by Dimitri Glazkov. Fix complex text opacity on the Chromium Windows port. https://bugs.webkit.org/show_bug.cgi?id=24757 Test: fast/text/complex-text-opacity.html * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds): (WebCore::Font::drawGlyphs): (WebCore::Font::drawComplexText): 2009-03-25 David Hyatt <hyatt@apple.com> Reviewed by Eric Seidel Fix for bug 23198, border images should not clip to border radii. The border-image should just ignore the border-radius, since the assumption is that any desired rounding will be built into the border-image itself. Note that I do not agree with this change, but I am matching the spec. Added fast/borders/border-image-border-radius.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): 2009-03-25 Gustavo Noronha Silva <gns@gnome.org> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=24750 [GTK] requests download instead of displaying page Fix the Content-Type headers we get from soup, so that we set a proper media type on the ResourceResponse. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::fillResponseFromMessage): 2009-03-25 Gustavo Noronha Silva <gns@gnome.org> Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=24600 [GTK] responses with status code >= 400 should not be given special treatment Do not special case requests that have HTTP responses >= 400. Redirects are handled automatically by libsoup, but the rest of the responses should be treated like any other. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::): (WebCore::gotHeadersCallback): (WebCore::gotChunkCallback): (WebCore::finishedCallback): 2009-03-25 Darin Adler <darin@apple.com> Reviewed by John Sullivan. Tidy up LegacyWebArchive a bit. And don't include favicons in web archives when they are being used only for selections, not an entire document. * WebCore.base.exp: Remove exported function that's not used in WebKit. * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::createPropertyListRepresentation): Made a static member function so it can share private things with other member functions. Added some FIXME comments to a branch of code I think is dead. Changed boolean argument into a named one. Renamed to match other similar functions. (WebCore::LegacyWebArchive::createResourceResponseFromPropertyListData): Ditto. (WebCore::LegacyWebArchive::createResource): Ditto. (WebCore::LegacyWebArchive::create): Merged the create and init functions. (WebCore::LegacyWebArchive::rawDataRepresentation): Added some assertions because we should never fail to write (we can fail to read). (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Made a static member function as above. (WebCore::LegacyWebArchive::createFromSelection): Ditto. (WebCore::LegacyWebArchive::create): Iterate the vector with indices rather than iterators. Only include the favicon if the first node is the document since we don't want to include the favicon when copying and pasting. * loader/archive/cf/LegacyWebArchive.h: Made one of the create functions private. Made the Mac-specific functions be static member functions. Made other helpers be static member functions. Removed the nit function. * loader/archive/cf/LegacyWebArchiveMac.mm: (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Updated comment and made this a static member function. (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto. Also made it so we only type cast in one place. 2009-03-25 Darin Adler <darin@apple.com> Reviewed by David Hyatt. Bug 24740: crash in RenderSlider::setPositionFromValue when calling pause() after setting <video> to display: none https://bugs.webkit.org/show_bug.cgi?id=24740 rdar://problem/6679873 Bug 12104: Native Slider: When the thumb's height is specified as a percentage, it is not centered properly https://bugs.webkit.org/show_bug.cgi?id=12104 Test: media/video-display-none-crash.html The problem here was that RenderSlider was trying to position its thumb in a way that requires it to call updateLayout inside rendering code. The right way to position a child renderer is to do layout, so I had to write a layout function. And then fix a few other small problems shown by the same test case. * rendering/RenderSlider.cpp: Made defaultTrackLength have internal linkage. Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML prefix for public DOM classes, not elements used as implementation details. Made SliderThumbElement function members private and got rid of unneeded default argument value for shadowParent. (WebCore::SliderRange::SliderRange): Added. Parses precision, max, and min attributes. (WebCore::SliderRange::clampValue): Added. Does standard clamping based on the above. (WebCore::SliderRange::valueFromElement): Added. Reads the value from the element in a way that clamps to the range. (WebCore::sliderPosition): Added. Computes the slider position: a double. (WebCore::SliderThumbElement::SliderThumbElement): Removed unneeded explicit initialization of m_initialClickPoint. (WebCore::SliderThumbElement::defaultEventHandler): Call setValueForPosition instead of calling setCurrentPosition and valueChanged. (WebCore::RenderSlider::RenderSlider): Remove unneeded explicit initialization of m_thumb. (WebCore::RenderSlider::styleDidChange): Remove unneeded second argument to createThumbStyle. (WebCore::RenderSlider::createThumbStyle): Remove unneeded second argument. Get rid of code setting the position to relative and setting the left and top. We now handle positioning in a custom layout function. (WebCore::RenderSlider::layout): Rewrote to handle positioning of the thumb as layout. (WebCore::RenderSlider::updateFromElement): Added code to immediately update the value in the element if it's out of range. This clamping used to be done as a side effect of setPositionFromValue. Also, this has nothing to do with the renderer, so at some point it could be moved into HTMLInputElement. Removed call to setPositionFromValue and instead just rely on the call to setNeedsLayout. Fix the setNeedsLayout call to be a normal setNeedsLayout(true), not a setNeedsLayout(true, false), because we do want this to be propagated to the parent -- it's not called during layout. (WebCore::RenderSlider::setValueForPosition): Refactor to use the new SliderRange class. Also don't call setCurrentPosition; instead just call setNeedsLayout. (WebCore::RenderSlider::currentPosition): Use the actual position of the renderer rather than the style to find the position; that means this needs to be done after layout is done. Also removed unneeded runtime checks and replaced them with assertions, after checking all callers to see they already guarantee this. (WebCore::RenderSlider::trackSize): Removed unneeded runtime checks and replaced them with assertions, after checking all callers to see they already guarantee this. (WebCore::RenderSlider::inDragMode): Added a null check for m_thumb so this won't crash if called early on a brand new RenderSlider. * rendering/RenderSlider.h: Made all functions private except for forwardEvent and inDragMode. Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML prefix for public DOM classes, not elements used as implementation details. Made the mouseEventIsInThumb function non-virtual. Removed the return value and argument from setPositionFromValue. Removed valueChanged and setCurrentPosition. Removed the oldStyle argument to createThumbStyle (see above). Made SliderThumbElement a friend so it can use some private member functions. 2009-03-25 Eli Fidler <eli.fidler@torchmobile.com> Reviewed by George Staikos. Fix ambiguous else cases by adding braces to nested if()s with elses. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): * page/EventHandler.cpp: (WebCore::EventHandler::updateDragAndDrop): * rendering/RenderListMarker.cpp: (WebCore::toArmenianUnder10000): * rendering/TextControlInnerElements.cpp: (WebCore::TextControlInnerTextElement::defaultEventHandler): 2009-03-24 Eli Fidler <eli.fidler@torchmobile.com> Reviewed by George Staikos. Move variable into proper platform block to quiet warning. * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawTextInternal): 2009-03-24 Eric Carlson <eric.carlson@apple.com> Reviewed by Antti Koivisto. Fix for <rdar://problem/6719375> Deal with QTKit loadstate changes when playing streaming movies * WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setNetworkState): Deal with media engine reviving after having network state of NETWORK_NO_SOURCE. * WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::updateStates): Reset m_readyState at each state change since some types of movies currently cause QTKit's load state to bounce around. QTMovieLoadStatePlaythroughOK corresponds to HaveFutureData, not HaveEnoughData. 2009-03-24 Adele Peterson <adele@apple.com> Reviewed by Darin Adler. Fix for https://bugs.webkit.org/show_bug.cgi?id=24707 <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed): After breaking out of an empty mail blockquote, we still want continue with the deletion so actual content will get deleted, and not just the quote style. 2009-03-24 Darin Adler <darin@apple.com> Reviewed by Brady Eidson. <rdar://problem/6624662> REGRESSION (r39904): can't save certain web pages as web archive (ones without favicons!) * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): Added a null check. 2009-03-24 Adam Langley <agl@google.com> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=24685 The Skia drawLine function takes subpixel values and attempts to draw a line with subpixel precision. This is complex and slow for drawing scrollbars which use only vertical and horizontal lines. This changes the Chromium Linux scrollbar code to use drawIRect. * platform/chromium/ScrollbarThemeChromiumLinux.cpp: (WebCore::ScrollbarThemeChromium::invalidateOnMouseEnterExit): (WebCore::drawVertLine): (WebCore::drawHorizLine): (WebCore::drawBox): (WebCore::ScrollbarThemeChromium::paintTrackPiece): (WebCore::ScrollbarThemeChromium::paintThumb): 2009-03-24 David Kilzer <ddkilzer@apple.com> Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly <https://bugs.webkit.org/show_bug.cgi?id=23310> Reviewed by Darin Adler. Test: fast/frames/iframe-no-src-set-location.html * dom/Document.cpp: (WebCore::Document::completeURL): If m_baseURL is empty or is about:blank and we have a parent document, use the parent document's URL for the base when completing a new URL. 2009-03-24 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=24659 When hit-testing 3d-transformed layers, it doesn't make sense to project the hitTestRect into the coordinate space of the layer, and doing so can result in pathalogical quads that break hit testing. In that case, simply use the same bounds as used for painting, which are the composited bounds for this layer. Test: transforms/3d/hit-testing/rotated-hit-test.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTestLayer): 2009-03-24 Simon Fraser <simon.fraser@apple.com> Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=24436 When compositing is enabled, painting and hit testing end up using different clipping roots, because, for painting, every composited layer is a clipping root, but for hit testing only layers with transforms are. To fix this, we use temporary clip rects for hit testing, if the page is in compositing mode. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::parentClipRects): (WebCore::RenderLayer::calculateRects): * rendering/RenderLayer.h: 2009-03-24 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=24782 Fix regression with CSS clip rects with non-length values, by reverting to the original code, but passing the zoom multiplier through convertToLength(). Also make stylistic change in createTransformOperations(), renaming 'inStyle' to 'style. Tested by existing tests. * css/CSSStyleSelector.cpp: (WebCore::convertToLength): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::createTransformOperations): 2009-03-24 David Hyatt <hyatt@apple.com> Reviewed by Simon Fraser https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents to a border-radius. This patch makes non-self-painting overflow layers and control clips work with border-radius. RenderLayers that should be clipped by overflow ancestors with border-radius are still broken. Added fast/clip/overflow-border-radius-clip.html * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): 2009-03-24 David Hyatt <hyatt@apple.com> Reviewed by Simon Fraser https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents. This first patch makes overflow:hidden properly clip the foreground contents of overflow:hidden replaced elements. Common replaced elements now default to overflow:hidden in the UA stylesheet (this is what the spec specifically recommends be done). Added fast/replaced/border-radius-clip.html * css/html4.css: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): 2009-03-24 Adele Peterson <adele@apple.com> RS by Mark Rowe. Only build these Mail quirks checks in on the Mac. * dom/Document.cpp: (WebCore::disableRangeMutation): * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList): 2009-03-24 Brent Fulgham <bfulgham@webkit.org> Build fix, no review. Remove ResourceLoaderCFNet.cpp from build list for Cairo Releas and Debug targets. * WebCore.vcproj/WebCore.vcproj: 2009-03-24 Eric Carlson <eric.carlson@apple.com> Fix layout tests broken by r41907. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setReadyState): Don't set "was playing" based on the new ready state 2009-03-24 Dmitry Titov <dimich@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24689 Fix Chromium compilation errors. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener): (WebCore::WorkerContextExecutionProxy::RemoveEventListener): 2009-03-24 Yury Semikhatsky <yurys@chromium.org> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24759 Add missing methods Element.prototype.removeMatchingStyleClasses and Node.prototype.enclosingNodeOrSelfWithNodeNameInArray to SourceFrame content iframe. These methods are called by Element.prototype.removeStyleClass and Node.prototype.enclosingNodeOrSelfWithNodeName. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._loaded): 2009-03-24 Mark Mentovai <mark@chromium.org> Reviewed by Mark Rowe. https://bugs.webkit.org/show_bug.cgi?id=24653 WebKit should be buildable without prefix header injection. Adds missing #includes and forward declarations as needed. * editing/SmartReplaceCF.cpp: * platform/graphics/mac/ColorMac.mm: * platform/graphics/mac/FontCacheMac.mm: * platform/graphics/mac/FontCustomPlatformData.h: * platform/graphics/mac/FontMac.mm: * platform/graphics/mac/FontMacATSUI.mm: * platform/graphics/mac/FontPlatformData.h: * platform/graphics/mac/FontPlatformDataMac.mm: * platform/graphics/mac/GraphicsContextMac.mm: * platform/graphics/mac/SimpleFontDataMac.mm: * platform/mac/FoundationExtras.h: * platform/mac/LocalCurrentGraphicsContext.h: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: * platform/mac/WebCoreTextRenderer.h: * platform/mac/WebCoreTextRenderer.mm: * platform/mac/WebFontCache.h: * platform/mac/WebFontCache.mm: * platform/text/PlatformString.h: * platform/text/mac/ShapeArabic.c: * platform/text/mac/StringMac.mm: * rendering/RenderThemeChromiumMac.h: 2009-03-24 Dan Bernstein <mitz@apple.com> Reviewed by Darin Adler. - fix <rdar://problem/6107874> by capping the nesting depth of "block-level" elements generated by the parser Test: fast/parser/block-nesting-cap.html * html/HTMLParser.cpp: (WebCore::HTMLParser::HTMLParser): (WebCore::HTMLParser::insertNode): (WebCore::HTMLParser::pushBlock): (WebCore::HTMLParser::popOneBlockCommon): (WebCore::HTMLParser::freeBlock): * html/HTMLParser.h: 2009-03-23 Greg Bolsinga <bolsinga@apple.com> Reviewed by David Kilzer. https://bugs.webkit.org/show_bug.cgi?id=24771 DOMTimeStamps are based upon 1970. * platform/mac/GeolocationServiceMac.mm: (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]): 2009-03-23 Eric Seidel <eric@webkit.org> Build fix, no review. * rendering/RenderObject.cpp: (WebCore::RenderObject::createVisiblePosition): change .container to .isNotNull() 2009-03-23 Eric Seidel <eric@webkit.org> Reviewed by Darin Adler. Rename Position::container to m_anchorNode and make it private https://bugs.webkit.org/show_bug.cgi?id=24760 More code cleanup for Position. Change all uses of m_container to node() Eventually most uses of node() should change to anchorNode() to designate that it's the node the Position is anchored to, but not necessarily the container of the position (it could be the before/after neighbor). Remove any code which sets m_container, and change it to use a new Position::moveToPosition function which takes a node and offset. It never makes sense to change the node and leave the offset. * dom/Position.h: (WebCore::Position::Position): (WebCore::Position::clear): (WebCore::Position::anchorNode): (WebCore::Position::node): (WebCore::Position::moveToPosition): (WebCore::Position::moveToOffset): (WebCore::Position::isNull): (WebCore::Position::isNotNull): (WebCore::operator==): * dom/Range.cpp: (WebCore::Range::create): (WebCore::Range::compareBoundaryPoints): * dom/RangeBoundaryPoint.h: (WebCore::RangeBoundaryPoint::container): (WebCore::RangeBoundaryPoint::set): (WebCore::RangeBoundaryPoint::setOffset): (WebCore::RangeBoundaryPoint::setToChild): (WebCore::RangeBoundaryPoint::setToStart): (WebCore::RangeBoundaryPoint::setToEnd): 2009-03-17 Eric Seidel <eric@webkit.org> Reviewed by David Hyatt. document.write() should be able to make a document strict mode https://bugs.webkit.org/show_bug.cgi?id=24336 Remove an implicit write of "<html>" on the first document.write call this was added as part of a KDE import http://trac.webkit.org/changeset/798 with no layout test or explanation. I can't think of any reason why an implicit <html> write is necessary (or correct), so I'm removing it and adding a test for the correct behavior. The parser will add any necessary HTMLHTMLElements during the write() anyway. Our behavior is now tested by fast/dom/Document/document-write-doctype and matches IE, FF fails this new test. Mozilla bug filed: https://bugzilla.mozilla.org/show_bug.cgi?id=483908 * dom/Document.cpp: (WebCore::Document::write): 2009-03-23 Sam Weinig <sam@webkit.org> Reviewed by Dan Bernstein. Fix for <rdar://problem/6140966> Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: * loader/CrossOriginPreflightResultCache.cpp: (WebCore::CrossOriginPreflightResultCache::empty): * loader/CrossOriginPreflightResultCache.h: 2009-03-23 Darin Adler <darin@apple.com> Reviewed by Adele Peterson. Bug 24726: hit testing doesn't work right when the click is on anonymous content https://bugs.webkit.org/show_bug.cgi?id=24726 rdar://problem/6696992 Test: editing/selection/hit-test-anonymous.html * rendering/RenderBR.cpp: (WebCore::RenderBR::positionForPoint): Call createVisiblePosition instead of creating a VisiblePosition directly. It will handle finding non-anonymous content nearby if node() is 0. * rendering/RenderBlock.cpp: (WebCore::positionForPointRespectingEditingBoundaries): Ditto. (WebCore::positionForPointWithInlineChildren): Ditto. (WebCore::RenderBlock::positionForPoint): Ditto. * rendering/RenderBox.cpp: (WebCore::RenderBox::positionForPoint): Ditto. * rendering/RenderObject.cpp: (WebCore::RenderObject::positionForPoint): Ditto. (WebCore::RenderObject::createVisiblePosition): Added. * rendering/RenderObject.h: Added createVisiblePosition. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::positionForPoint): Call createVisiblePosition. * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::positionForPoint): Ditto. * rendering/RenderText.cpp: (WebCore::RenderText::positionForPoint): Ditto. 2009-03-23 Adele Peterson <adele@apple.com> Reviewed by Darin Adler & Dave Hyatt. Fix for <rdar://problem/6621310> REGRESSION(35185): Apple Travel HTML emails missing some style after Safari 4 upgrade Leopard Mail doesn't expect <style> to be in the body. This change reverts back to the old behavior of moving <style> to <head> for that version of Mail. * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList): 2009-03-23 Adele Peterson <adele@apple.com> Reviewed by Mark Rowe & Dave Hyatt. Merge some of the individual Mail quirks into two settings that we can check for future quirks. * WebCore.base.exp: * dom/Document.cpp: (WebCore::disableRangeMutation): (WebCore::Document::nodeChildrenChanged): (WebCore::Document::nodeWillBeRemoved): (WebCore::Document::textInserted): (WebCore::Document::textRemoved): (WebCore::Document::textNodesMerged): (WebCore::Document::textNodeSplit): * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setNeedsLeopardMailQuirks): (WebCore::Settings::setNeedsTigerMailQuirks): * page/Settings.h: (WebCore::Settings::needsLeopardMailQuirks): (WebCore::Settings::needsTigerMailQuirks): 2009-03-23 Ada Chan <adachan@apple.com> https://bugs.webkit.org/show_bug.cgi?id=24762 Support text-indent in <option> elements on windows platform. Reviewed by Adele Peterson. * css/themeWin.css: * platform/PopupMenuStyle.h: We don't honor font specified on <option> elements right now. Make this explicit via windows themed default stylesheet. (WebCore::PopupMenuStyle::PopupMenuStyle): Also store text-indent and text-direction. (WebCore::PopupMenuStyle::textIndent): (WebCore::PopupMenuStyle::textDirection): * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenu::paint): Adjust the text's x-coordinate if text-indent is supported for options and text-indent is specified with LTR direction. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateOptionsWidth): Take text-indent into account if theme supports text-indent for options. (WebCore::RenderMenuList::itemStyle): Use new PopupMenuStyle constructor on windows. (WebCore::RenderMenuList::menuStyle): Ditto. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::menuStyle): Ditto. * rendering/RenderTheme.h: (WebCore::RenderTheme::popupOptionSupportsTextIndent): Added. Default is false since we are only supporting it in windows for now. * rendering/RenderThemeWin.h: (WebCore::RenderThemeWin::popupOptionSupportsTextIndent): Returns true for windows. 2009-03-23 Sam Weinig <sam@webkit.org> Reviewed by Anders Carlsson. Fix for https://bugs.webkit.org/show_bug.cgi?id=24699 REGRESSION: Java Applets broken <rdar://problem/6707494> Fix loading Java applets without a codeBase. Only pass the base (up to the the last path component) of the baseURL to the plug-in. * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createRenderer): * platform/KURL.cpp: (WebCore::KURL::baseAsString): * platform/KURL.h: 2009-03-23 Darin Adler <darin@apple.com> Reviewed by Sam Weinig. * platform/KURL.h: Removed now-incorrect comments. None of the parts include the separator characters any more, now that query doesn't include the "?", so the comments explaining which do and do not are no-longer helpful. 2009-03-23 David Levin <levin@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24764 Renamed files V8NodeFilter -> V8NodeFilterCondition to reflect class names. Also fixed some headers that got mangled in search/replace operations. No change in behavior, so no test. * bindings/v8/V8NodeFilter.h: Removed. * bindings/v8/V8NodeFilterCondition.cpp: Renamed from WebCore/bindings/v8/V8NodeFilter.cpp. * bindings/v8/V8NodeFilterCondition.h: Added. * bindings/v8/custom/V8ClipboardCustom.cpp: * bindings/v8/custom/V8DocumentCustom.cpp: * bindings/v8/custom/V8ElementCustom.cpp: * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: * bindings/v8/custom/V8NavigatorCustom.cpp: 2009-03-23 Darin Fisher <darin@chromium.org> Reviewed by Antti Koivisto. https://bugs.webkit.org/show_bug.cgi?id=24741 Adds a unique across-browser-sessions identifier to FormData, which may be used by ResourceHandle as a secondary cache key to enable cached form submissions. At issue: two otherwise identical form submissions may result in completely independent responses, which may each be appropriate to store and reuse from cache. * html/HTMLFormElement.cpp: Added call to FormData::setIdentifier so that we only enable cached form submissions for those generated by HTML. This way we do not bother with POSTs generated by XMLHttpRequest. (WebCore::generateFormDataIdentifier): (WebCore::HTMLFormElement::createFormData): * platform/network/FormData.cpp: Initialize m_identifier to 0, which means the unspecified identifier. So by default there is no identifier and nothing changes. (WebCore::FormData::FormData): * platform/network/FormData.h: Added m_identifier with setter and getter. (WebCore::FormData::setIdentifier): (WebCore::FormData::identifier): 2009-03-23 Simon Fraser <simon.fraser@apple.com> Reviewed by Antti Koivisto https://bugs.webkit.org/show_bug.cgi?id=24733 Fix media controller with full-page zoom. Previously, the media controller shadow nodes never saw style changes on the RenderMedia, so did not respond to zooming at all. Now, we update the style on the shadow renderers whenever RenderMedia gets a style change. Also fix the video thumb in the theme to be scaled properly. Test: media/video-controls-zoomed.html * rendering/MediaControlElements.cpp: (WebCore::MediaControlShadowRootElement::updateStyle): (WebCore::MediaTextDisplayElement::MediaTextDisplayElement): (WebCore::MediaTextDisplayElement::updateStyle): (WebCore::MediaControlInputElement::MediaControlInputElement): (WebCore::MediaControlInputElement::updateStyle): * rendering/MediaControlElements.h: * rendering/RenderMedia.cpp: (WebCore::RenderMedia::styleDidChange): * rendering/RenderMedia.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustSliderThumbSize): 2009-03-23 Mike Belshe <mike@belshe.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24739 Rework StringImpl::create methods to try to allocate a single buffer rather than allocating both the StringImpl class and a separate data buffer. * platform/text/StringImpl.cpp: * platform/text/StringImpl.h: 2009-03-23 Darin Adler <darin@apple.com> Reviewed by Antti Koivisto. Based on a patch by Nico Weber <nicolasweber@gmx.de> Bug 24755: LayoutTests/http/tests/misc/url-in-utf16le.html regression https://bugs.webkit.org/show_bug.cgi?id=24755 * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::isUTF7Encoding): Added. Checks if the current encoding is UTF7 without loading extended codecs. (WebCore::TextEncoding::encodingForFormSubmission): Use isUTF7Encoding() instead of comparing with UTF7Encoding(). Eliminate the explicit check of noExtendedTextEncodingNameUsed() because that's now handled by the functions that this function calls instead. * platform/text/TextEncoding.h: Added isUTF7Encoding function. Also tweaked formatting a bit. 2009-03-20 Peter Kasting <pkasting@google.com> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=24720 RenderThemeChromium should draw something for Slider parts instead of dropping them on the floor. * platform/chromium/ChromiumBridge.h: * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize): (WebCore::RenderThemeChromiumWin::paintSliderTrack): (WebCore::RenderThemeChromiumWin::determineSliderThumbState): (WebCore::RenderThemeChromiumWin::getThemeData): * rendering/RenderThemeChromiumWin.h: (WebCore::RenderThemeChromiumWin::paintSliderThumb): 2009-03-23 Glen Murphy <glen@chromium.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=24657 Fix Skia drawing of highly scaled bitmaps; the conversion to IntRect produced visible layout test failures in highly scaled coordinate systems. Test: svg/custom/image-small-width-height.svg * WebCore\platform\graphics\skia\ImageSkia.cpp: 2009-03-23 David Kilzer <ddkilzer@apple.com> Provide JavaScript exception information after slow script timeout Reviewed by Oliver Hunt. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluate): Changed to report exceptions for the Interrupted completion type as well. 2009-03-23 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=24736 Fix three mostly-unrelated problems with full-page zoom: * dom/Document.cpp: (WebCore::Document::elementFromPoint): Document::elementFromPoint() needs to take full-page zoom into account. * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::receivedTarget): Take full-page zoom into account when computing offsetX/offsetY. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Don't use offsetX/offsetY when hit testing list boxes; offsets were broken with full-page zoom, and using pageX/pageY is easier because we don't have to worry about the event target, and we already have a point in absolute coordinates. Tests: fast/forms/listbox-hit-test-zoomed.html fast/forms/search-zoomed.html fast/forms/slider-zoomed.html 2009-03-23 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=24753 The rect for CSS 'clip' needs to have zooming applied to it. Test: fast/css/clip-zooming.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2009-03-23 Eric Carlson <eric.carlson@apple.com> Reviewed by Adam Roben. <rdar://problem/6704282> https://bugs.webkit.org/show_bug.cgi?id=24719 QTMovieWinTimer logic inversion Fix logic inversion in the Win32 timer used by QTMovieWin that caused it to always use SetTimer, even when the intervals was below USER_TIMER_MINIMUM. A side effect of this was that a movie timer would sometimes be blocked for significant amounts of time because WM_TIMER messages are not processed when the thread's message queue has any higher priority messages, and WebCore/Win's timer uses PostMessage for low interval timers. Also change SetTimer call to use HWND and custom message instead of timer function since the timer already has an HWND for processing PostMessage. Not possible to make a test for this because it is so timing dependant. * platform/graphics/win/QTMovieWinTimer.cpp: (TimerWindowWndProc): (setSharedTimerFireDelay): 2009-03-23 Eric Carlson <eric.carlson@apple.com> Reviewed by Adele Peterson. https://bugs.webkit.org/show_bug.cgi?id=24588 Update media element implementation to current HTML5 spec New tests: media/media-constants.html media/video-seek-no-src-exception.html media/video-source-add-src.html media/video-src-invalid-remove.html media/video-src-plus-source.html media/video-timeupdate-during-playback.html * dom/EventNames.h: Remove obsolute events, add new ones. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize new member vars. (WebCore::HTMLMediaElement::attributeChanged): Trigger load() only when we don't have a source. (WebCore::HTMLMediaElement::removedFromDocument): Deal with state name changes. (WebCore::HTMLMediaElement::scheduleProgressEvent): New, create a progress event and add it to the event queue to be dispatch when the timer fires. (WebCore::HTMLMediaElement::scheduleEvent): New, create a generic event and add it to the event queue to be dispatch when the timer fires. (WebCore::HTMLMediaElement::enqueueEvent): Add an event to the queue and ticke the asynch event timer. (WebCore::HTMLMediaElement::asyncEventTimerFired): Dispatch all pending events. (WebCore::HTMLMediaElement::loadTimerFired): Either trigger the initial load or try to load the next <source> url. (WebCore::HTMLMediaElement::load): Minor style change. (WebCore::HTMLMediaElement::loadInternal): The first part of the spec load algorithm, cleanup the current load (if any) and set up state for a new load. (WebCore::HTMLMediaElement::selectMediaResource): Deal with no 'src' or <source>, post 'loadstart' event, and initiate load from 'src' if present. (WebCore::HTMLMediaElement::loadNextSourceChild): Initiate load from next <source> url, or trigger noneSupported() if no more to consider. (WebCore::HTMLMediaElement::loadResource): Instantiate a new MediaPlayer and ask it to load a url. (WebCore::HTMLMediaElement::startProgressEventTimer): Start the repeating progress event timer. (WebCore::HTMLMediaElement::noneSupported): Post error event and set up state when no valid media url was found. (WebCore::HTMLMediaElement::mediaEngineError): Post error event and set up state when no valid media engine failed with a decode error or a network error. (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged): (WebCore::HTMLMediaElement::setNetworkState): Updated for new spec network states. (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged): (WebCore::HTMLMediaElement::setReadyState): Updated for new spec ready state. (WebCore::HTMLMediaElement::progressEventTimerFired): Bail if the network is not active. (WebCore::HTMLMediaElement::seek): Return INVALID_STATE_ERR exception if state is too low or if player hasn't been set up yet. This is necessary becase load() is async. Clear the flag we use to guard against sending 'ended' more than once. (WebCore::HTMLMediaElement::duration): Don't bother calling media engine before it has metadata. (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Remove exception param, 0 is no longer an invalid rate. (WebCore::HTMLMediaElement::setPlaybackRate): Remove exception param, 0 is no longer an invalid rate. Cache rate being set so we can use it later if media engine isn't ready now. (WebCore::HTMLMediaElement::play): Remove exception param, play() before load() now just starts loading asynchronously. (WebCore::HTMLMediaElement::playInternal): Remove exception param. Fire 'waiting' or 'playing' event depending on current state. (WebCore::HTMLMediaElement::pause): Remove exception param, pause() before load() now just starts loading asynchronously. (WebCore::HTMLMediaElement::pauseInternal): Remove exception param. (WebCore::HTMLMediaElement::setVolume): dispatchEventAsync -> scheduleEvent (WebCore::HTMLMediaElement::setMuted): dispatchEventAsync -> scheduleEvent (WebCore::HTMLMediaElement::togglePlayState): Remove exception param. (WebCore::HTMLMediaElement::beginScrubbing): pause() doesn't take an exception param. (WebCore::HTMLMediaElement::startPlaybackProgressTimer): New, starts timer that fires 4 times per second when the movie is playing to timeupdate so we can post 'timeupdate' events. (WebCore::HTMLMediaElement::playbackProgressTimerFired): Timer proc. (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Bottleneck around scheduling a 'timeupdate' event because we both fire them them when the spec says we should and when the media engine says that time has jumped, but we don't want to fire more than one at a given movie time. We also use this bottleneck to keep track of the last time one was posted so we won't fire too often during playback. (WebCore::HTMLMediaElement::canPlay): readyState now tracks whether or not we have metadata. (WebCore::HTMLMediaElement::havePotentialSourceChild): New, checks to see if there are a <source> element with a 'src' attribute that we have not tried to load yet. (WebCore::HTMLMediaElement::nextSourceChild): New, returns the url and content type of the next <source> element that we haven't tried to load. (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Schedule 'seeked' event when seeking completes. Set a flag when we post the 'ended' event, clear it when time changed and we aren't at the end since some media engines call this proc more than once when playback reaches the end and stops, but we don't want to post 'ended' more than once. (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): New, added so media engine can inform when the movie duration changes and we can post 'durationchanged' event. (WebCore::HTMLMediaElement::mediaPlayerRateChanged): New, added so media engine can inform when the rate changed and we can updated our cached rate. This is useful because we only want to know post periodic 'timeupdate' events when the movie is actually playing, and because we want to know the actual playback rate when it differs from what we tried to set. (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): New, added so media engine can inform when a movie's intrinsic size changes and we can inform the renderer. (WebCore::HTMLMediaElement::potentiallyPlaying): Renamed from activelyPlaying since the spec now uses "actively playing" for this concept. Update logic for new state names and un-comment calls to stoppedDueToErrors() and pausedForUserInteraction() since the spec says those condiditons are part of the answer. (WebCore::HTMLMediaElement::endedPlayback): Update logic for new state names. (WebCore::HTMLMediaElement::stoppedDueToErrors): New, spec says this logic should be part of the determination of "potentially playing". (WebCore::HTMLMediaElement::pausedForUserInteraction): New, placeholder for when (if) user agent supports this spec concept. (WebCore::HTMLMediaElement::updatePlayState): Stop timer used to fire periodic 'timeupdate' events when we pauses the movie. Set the media engine rate before calling play() in case it wasn't set up when the rate was changed. (WebCore::HTMLMediaElement::stopPeriodicTimers): New, stop the progress event and 'timeupate' event timers. (WebCore::HTMLMediaElement::userCancelledLoad): New, logic pulled out of documentWillBecomeInactive and updated for the current spec. (WebCore::HTMLMediaElement::documentWillBecomeInactive): Moved some logic to userCancelledLoad. (WebCore::HTMLMediaElement::documentDidBecomeActive): Update comments. (WebCore::HTMLMediaElement::initialURL): Update for refactoring of code that determines the initial url. * html/HTMLMediaElement.h: Change ReadyState and NetworkState enums to match names in the spec, update for changes in .cpp. (WebCore::HTMLMediaElement::): * html/HTMLMediaElement.idl: Update ready state and network state constants for spec changes. defaultPlaybackRate, playbackRate, play(), and pause() no longer raise exceptions. * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::insertedIntoDocument): Update for network state name changes. * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::updatePosterImage): Update for ready state name changes. * html/MediaError.h: (WebCore::MediaError::): add MEDIA_ERR_NONE_SUPPORTED. * html/MediaError.idl: add MEDIA_ERR_NONE_SUPPORTED. * loader/MediaDocument.cpp: (WebCore::MediaDocument::defaultEventHandler): play() and pause() don't take an exception. * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::readyState): Update for newtork state name changes. (WebCore::MediaPlayer::sizeChanged): New, so engine can report intrinsic size changes. (WebCore::MediaPlayer::rateChanged): New, so engine can report rate changes. (WebCore::MediaPlayer::durationChanged): New, so engine can report duration changes. * platform/graphics/MediaPlayer.h: Update NetworkState and ReadyState enum names to match spec states. (WebCore::MediaPlayerClient::mediaPlayerDurationChanged): New. (WebCore::MediaPlayerClient::mediaPlayerRateChanged): New. (WebCore::MediaPlayerClient::mediaPlayerSizeChanged): New. (WebCore::MediaPlayer::): * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes. (WebCore::MediaPlayerPrivate::load): Ditto. (WebCore::MediaPlayerPrivate::updateStates): Ditto. (WebCore::MediaPlayerPrivate::loadingFailed): Ditto. * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Update for network/ready state name changes. Remove endPointTimer, it is no longer necessary. Add m_enabledTrackCount and m_duration. (WebCore::MediaPlayerPrivate::metaDataAvailable): * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer or m_endTime. Initialize m_enabledTrackCount and m_duration. Update for network/ready state name changes. (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes. (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer. (WebCore::MediaPlayerPrivate::pause): Ditto. (WebCore::MediaPlayerPrivate::currentTime): No more m_endTime. (WebCore::MediaPlayerPrivate::seek): Ditto. (WebCore::MediaPlayerPrivate::doSeek): Ditto, plus don't call setRate(0) when the rate is already zero. (WebCore::MediaPlayerPrivate::setEndTime): No more m_endTime. (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes. Return different errors depending on what causes a failure. Watch for and report duration changes. (WebCore::MediaPlayerPrivate::rateChanged): Report rate changes. (WebCore::MediaPlayerPrivate::sizeChanged): Report size changes. (WebCore::MediaPlayerPrivate::didEnd): No more endpoint timer. (WebCore::MediaPlayerPrivate::setVisible): Update for network/ready state name changes. (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): Don't return number of unsupported tracks, store in m_enabledTrackCount so we can use it to help determine causes of failure. * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes. (WebCore::MediaPlayerPrivate::load): Ditto. (WebCore::MediaPlayerPrivate::duration): Ditto. (WebCore::MediaPlayerPrivate::updateStates): Ditto. (WebCore::MediaPlayerPrivate::naturalSize): Ditto. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer. Update for network/ready state name changes. (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes. No more m_endPointTimer. (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer. (WebCore::MediaPlayerPrivate::pause): Ditto. (WebCore::MediaPlayerPrivate::setEndTime): Ditto. (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes. (WebCore::MediaPlayerPrivate::didEnd): No more m_endPointTimer. * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: * rendering/MediaControlElements.cpp: (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Update for network/ready state name changes. (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto. 2009-03-22 Kevin Ollivier <kevino@theolliviers.com> wxGTK build fix. Add missing header. * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: 2009-03-22 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=24665 Image-map code in RenderImage could result in RenderImage::nodeAtPoint() setting HitTestResult::innerNode(), but returning false, which violates hit testing rules. Use a temporary HitTestResult so that we only fill in result when we know we've hit. * rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): 2009-03-22 Simon Fraser <simon.fraser@apple.com> Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=24743 Fix hit testing regression from r41840. We need to pass the temporary HitTestResult when testing sublayers, then only copy to 'result' when the layer is known to have been hit. Test: fast/layers/zindex-hit-test.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTestLayer): 2009-03-20 Simon Fraser <simon.fraser@apple.com> Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=24733 Fix hit testing on video controls after full page zoom by fixing wider issue with event->pageX(), pageY() with zooming. pageX and pageY are "fixed" to be invariant under zooming (for JavaScript), so we keep an actual page point around in MouseEvent::absoluteLocation() to avoid the need to factor in zooming everywhere. * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::initCoordinates): (WebCore::MouseRelatedEvent::computePageLocation): * dom/MouseRelatedEvent.h: (WebCore::MouseRelatedEvent::absoluteLocation): (WebCore::MouseRelatedEvent::setAbsoluteLocation): Member var, and getter and setter for absoluteLocation. New method, computePageLocation(), to compute the actual page point, and call it when creating and initting mouse-related events. * dom/Node.cpp: (WebCore::Node::dispatchMouseEvent): (WebCore::Node::dispatchWheelEvent): Keep non-adjusted pageX and pageY around, and call setAbsoluteLocation() on the event to replace a potentially rounded point. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Clean up slider handling code. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Add FIXME comment for use of offsetX/offsetY. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::handleContextMenuEvent): Use absoluteLocation() when hit testing for context menus. * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::userResize): Use absoluteLocation() when resizing frames. * rendering/RenderMedia.cpp: (WebCore::RenderMedia::forwardEvent): Use absoluteLocation() when hit testing media controls. * rendering/RenderSlider.cpp: (WebCore::HTMLSliderThumbElement::defaultEventHandler): (WebCore::RenderSlider::mouseEventIsInThumb): Use absoluteLocation() when handling slider events. (WebCore::RenderSlider::forwardEvent): Factor some code out of HTMLInputElement::defaultEventHandler(). * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::forwardEvent): Use absoluteLocation() when hit testing search field buttons, which fixees bugs in the search field with zooming. 2009-03-21 David Levin <levin@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24727 Add V8XMLHttpRequest*. * bindings/v8/V8XMLHttpRequestUtilities.cpp: Added. * bindings/v8/V8XMLHttpRequestUtilities.h: Added. * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: Added. * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: Added. * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: Added. 2009-03-21 David Levin <levin@chromium.org> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24725 Add V8NodeFilter. * bindings/v8/V8NodeFilter.cpp: Added. * bindings/v8/V8NodeFilter.h: Added. 2009-03-21 Dan Bernstein <mitz@apple.com> Rubber-stamped by Kevin Decker - remove some redundant #include statements * bindings/js/JSDOMWindowBase.cpp: 2009-03-20 Dan Bernstein <mitz@apple.com> Reviewed by Mark Rowe. - fix <rdar://problem/6574185> REGRESSION (3.2.2-TOT): hang in text drawing code * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): Changed glyph stroking to fill and stroke each glyph as a separate path, instead of all glyphs as a single path. This matches what CGContextShowGlyphsWithAdvances() does, and has comparable performance. 2009-03-20 Dean Jackson <dino@apple.com> Reviewed by Simon Fraser Build fix for ENABLE(3D_RENDERING) * rendering/RenderObject.h: (WebCore::makeMatrixRenderable): 2009-03-20 Dave Moore <davemoore@google.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24705 A bug in the V8 bindings is preventing chromium from setting the href on the location object...any attempt throws a security error, not just for javascript protocol * page/Location.idl: 2009-03-20 Craig Schlenter <craig.schlenter@gmail.com> Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=24608 Include stdio.h needed for printf on gcc 4.4.0 * platform/KURLGoogle.cpp: 2009-03-20 Mike Belshe <mike@belshe.com> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=24577 Don't let comments at the end of an event handler break the event handler. No change in behavior, so no test. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::getWrappedListenerFunction): 2009-03-20 Norbert Leser <norbert.leser@nokia.com> Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=24535 Fixes miss