2009-02-19 Mark Rowe Merge r41091. 2009-02-19 Anders Carlsson Reviewed by Kevin Decker. - Fix for On Tiger, create an autorelease pool before creating the NSGraphicsContext and drain it immediately after the call to -[NSView displayRectIgnoringOpacity:inContext:]. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::paint): 2009-02-18 Mark Rowe Merge r41071. 2009-02-18 Dan Bernstein Reviewed by Brady Eidson. - WebCore part of fixing Crash in iChat at CSSStyleSelector::adjustRenderStyle The crash results from re-entry into CSSMutableStyleDeclaration::setCssText, which in turn is caused by the first style change causing a cached image to load from the memory cache, causing load delegate dispatch, and iChat's delegate method calling back into WebKit. The workaround is to use defer delegate callbacks for memory cache. In this case, deferring callbacks during image load event dispatch was found to be sufficient. The crash is a regression. See also the discussion in . * WebCore.base.exp: Added Settings::setNeedsIChatMemoryCacheCallsQuirk(). * dom/Document.cpp: (WebCore::Document::dispatchImageLoadEventsNow): If the quirk is enabled, defer memory cache callbacks during image load event dispatch. * page/Settings.cpp: (WebCore::Settings::Settings): Initialize m_needsIChatMemoryCacheCallsQuirk. (WebCore::Settings::setNeedsIChatMemoryCacheCallsQuirk): Added this setter. * page/Settings.h: (WebCore::Settings::needsIChatMemoryCacheCallsQuirk): Added this getter. 2009-02-16 Mark Rowe Merge r41027. 2009-02-16 Dan Bernstein Reviewed by Geoffrey Garen. - fix REGRESSION (r39634): Unable to select an item in stocks widget with the mouse Test: platform/mac/fast/events/pointer-events-dashboard.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Do not apply the pointer-events property in Dashboard backwards compatibility mode, in order to work around misuse of that property by the Stocks widget. 2009-02-11 Mark Rowe Merge r40847. 2009-02-10 Jon Honeycutt REGRESSION(r37204): Page is not repainted during and after pan scrolling Reviewed by Steve Falkenburg. * platform/ScrollView.cpp: (WebCore::ScrollView::scrollContents): Don't repaint the pan scroll icon rect immediately; we will paint after the view has been scrolled. 2009-02-11 Mark Rowe Merge r40808. 2009-02-09 Dan Bernstein Reviewed by Dave Hyatt. - fix REGRESSION: Font rendering in Wikipedia input field is incorrect (default GDI text mode) * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::widthForGDIGlyph): Make sure that the DC is in the advanced graphics mode before calling GetCharWidthI(), because otherwise that function returns incorrect results for the default UI font at a certain size. 2009-02-11 Mark Rowe Merge r40778. 2009-02-08 David Hyatt Fix for https://bugs.webkit.org/show_bug.cgi?id=23839 Make sure that generated content is properly handled when content is moved from a block run-in to an inline run-in. Reviewed by Sam Weinig Added fast/runin/002.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::handleRunInChild): 2009-02-11 Mark Rowe Merge r40729. 2009-02-06 Dan Bernstein Reviewed by Darin Adler. - fix FontCache::releaseFontData() called on a small caps font that is not in the cache Most platforms do not retrieve the small caps font from the FontCache, but cross-platform code in ~SimpleFontData() assumes the the small caps font data did come from the cache and therefore calls releaseFontData() on it. * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::~SimpleFontData): Reordered to call platformDestroy() before releasing the small caps font and pruning the glyph page tree. This allows platformDestroy() to reset m_smallCapsFontData to 0 if it was not obtained from the cache. * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::platformDestroy): Set m_smallCapsFontData to 0 after deleting it. * platform/graphics/gtk/SimpleFontDataGtk.cpp: (WebCore::SimpleFontData::platformDestroy): Ditto. * platform/graphics/gtk/SimpleFontDataPango.cpp: (WebCore::SimpleFontData::platformDestroy): Ditto. * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::platformCommonDestroy): Ditto. * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::platformDestroy): Ditto. 2009-02-06 Mark Rowe Merge r40712. 2009-02-05 Maciej Stachowiak and Brady Eidson Reviewed by Dan Bernstein and Geoff Garen. - WebCore code to track per-day and per-week visit counts in history The basic idea is as follows: we track daily visits for up to 13 days, and weekly visits for up to 5 weeks past the end of the current daily visits. As soon as the number of daily counts goes over 13, we squish them down into weeks, and then prune the excess weeks. * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): Remove bogus whitespace. (WebCore::timeToDay): Helper function: convert time to days from the epoch. (WebCore::HistoryItem::padDailyCountsForNewVisit): Insert 0 counts if a site is visited after a span of days. (WebCore::HistoryItem::collapseDailyVisitsToWeekly): Core day/week upgrade algorithm as described above. (WebCore::HistoryItem::recordVisitAtTime): Use above helpers to record all info about a visit to this history item. (WebCore::HistoryItem::setLastVisitedTime): Updated. (WebCore::HistoryItem::visited): Updated. (WebCore::HistoryItem::recordInitialVisit): New function to handle recording data about the very first visit, replacing the prior practice of explicitly setting visit count to 1. (WebCore::HistoryItem::adoptVisitCounts): Take ownership of daily and weekly visit count vectors. (WebCore::HistoryItem::mergeAutoCompleteHints): Added a comment noting that this function doesn't work properly now (though this shouldn't matter much in practice.) * history/HistoryItem.h: (WebCore::HistoryItem::dailyVisitCounts): Accessor for daily counts. (WebCore::HistoryItem::weeklyVisitCounts): Ditto for weekly counts. * WebCore.base.exp: Add new symbols and sort. 2009-02-06 Mark Rowe Merge r40629. 2009-02-04 David Hyatt Fix for https://bugs.webkit.org/show_bug.cgi?id=23734, blank content on blogs.msdn.com. Add debugging code that will catch the incorrect dirtying of a table section immediately if it happens during calcRowHeight or layoutRows. This should make it possible to discover future bugs where table sections don't paint. The bug in blogs.msdn.com, which was caused by a bad setNeedsLayout in RenderLayer::updateScrollInfoAtferLayout. Make sure to do only a local setNeedsLayout inside that function. Reviewed by Beth Dakin * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollInfoAfterLayout): * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): * rendering/RenderObject.h: (WebCore::RenderObject::isSetNeedsLayoutForbidden): (WebCore::RenderObject::setNeedsLayoutIsForbidden): (WebCore::RenderObject::setNeedsLayout): (WebCore::RenderObject::setChildNeedsLayout): (WebCore::RenderObject::markContainingBlocksForLayout): * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowHeight): (WebCore::RenderTableSection::layoutRows): 2009-02-06 Mark Rowe Merge r40623. 2009-02-04 David Kilzer CrashTracer: [REGRESSION] 53 crashes in Safari at com.apple.WebCore: WebCore::LegacyWebArchive::create + 2706 Reviewed by Mark Rowe. * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): Fix it correctly this time. Check for the value returned from WebCore::IconDatabase::iconForPageURL(), not WebCore::Image::data(). 2009-02-06 Mark Rowe Merge r40537. 2009-02-03 David Kilzer CrashTracer: [REGRESSION] 53 crashes in Safari at com.apple.WebCore: WebCore::LegacyWebArchive::create + 2706 Reviewed by Adam Roben. * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): Null check the value returned from WebCore::IconDatabase::iconForPageURL(). 2009-02-06 Mark Rowe Merge r40606. 2009-02-03 David Hyatt Move the isRenderInline checks for clientWidth/Height and scrollWidth/Height to the DOM element versions of the functions. Since internal render tree usage doesn't ever (incorrectly) call these functions on RenderInlines, this manages to get virtual function calls out of contentWidth/Height and availableWidth/Height. Reviewed by Mark Rowe * dom/Element.cpp: (WebCore::Element::clientWidth): (WebCore::Element::clientHeight): (WebCore::Element::scrollWidth): (WebCore::Element::scrollHeight): * rendering/RenderBox.cpp: (WebCore::RenderBox::clientWidth): (WebCore::RenderBox::clientHeight): (WebCore::RenderBox::scrollWidth): (WebCore::RenderBox::scrollHeight): 2009-02-06 Mark Rowe Merge r40502. 2009-02-02 David Hyatt Make sure scrollWidth/Height just return 0 for inline flows. Reviewed by Beth Dakin * rendering/RenderBox.cpp: (WebCore::RenderBox::scrollWidth): (WebCore::RenderBox::scrollHeight): 2009-02-03 Mark Rowe Merge r40516. 2009-02-02 Geoffrey Garen Build fix. * plugins/PluginView.cpp: (WebCore::PluginView::performRequest): 2009-02-03 Mark Rowe Merge r40514. 2009-02-02 Geoffrey Garen Build fix. * WebCore.base.exp: 2009-02-03 Mark Rowe Merge r40508. 2009-02-02 Geoffrey Garen Reviewed by Sam Weinig. Track redirects in global history. * WebCore.base.exp: Renamed some exports. * bindings/js/JSDOMWindowBase.cpp: (WebCore::createWindow): (windowProtoFuncOpen): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setLocation): * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::setLocation): * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::submit): * bindings/js/JSLocationCustom.cpp: (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::assign): Treat any navigation that is not initiated by the user as a redirect from the perspective of global history. * history/HistoryItem.cpp: (WebCore::HistoryItem::addRedirectURL): Store the last URL in the redirect chain. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): * loader/DocumentLoader.h: (WebCore::DocumentLoader::urlForHistoryReflectsServerRedirect): (WebCore::DocumentLoader::urlForHistoryReflectsClientRedirect): (WebCore::DocumentLoader::setURLForHistoryReflectsClientRedirect): Sadly, added yet another way to track redirect state during loading, since none of the others did what I wanted, and I didn't want to cause behavior changes in existing code. * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Stubbed out a client function to keep things building. * loader/FrameLoader.cpp: (WebCore::isBackForwardLoadType): (WebCore::FrameLoader::restoreDocumentState): Renamed FrameLoadTypeRedirect => FrameLoadTypeRedirectWithLockedBackForwardList, to distinguish from all the other meanings of "redirect" in the loading code. (WebCore::FrameLoader::scheduleHTTPRedirection): Treat any HTTP refresh redirect as a redirect from the perspective of global history. (WebCore::FrameLoader::loadURLIntoChildFrame): Updated for rename and extra parameter. (WebCore::FrameLoader::startRedirectionTimer): Removed unused parameter. (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): (WebCore::FrameLoader::loadURL): (WebCore::FrameLoader::load): Updated for rename and extra parameter. (WebCore::FrameLoader::loadWithNavigationAction): Track redirect status in the DocumentLoader, so it's accessible to WebKit's global history code. (WebCore::FrameLoader::clientRedirected): Ignore lockHistory, since it only has meaning to global history, and m_quickRedirectComing pertains to other kinds of history. (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::loadEmptyDocumentSynchronously): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): (WebCore::FrameLoader::loadItem): Updated for extra parameter and rename. (WebCore::FrameLoader::updateHistory*): Notify WebKit about redirect navigations even if they don't create new history items, so we can track the redirect in the existing history item. * loader/FrameLoader.h: See above. * loader/FrameLoaderClient.h: New client interface used by FrameLoader::updateHistory* to record a redirect even if it doesn't create a new history item of its own. * loader/FrameLoaderTypes.h: See above. (WebCore::): * page/DragController.cpp: (WebCore::DragController::performDrag): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): Updated for extra parameter. 2009-02-03 Mark Rowe Merge r40380. 2009-01-29 Sam Weinig Reviewed by Mark Rowe. First step in tracking the urls a HistoryItem was redirected through. * WebCore.base.exp: * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): (WebCore::HistoryItem::addRedirectURL): (WebCore::HistoryItem::redirectURLs): (WebCore::HistoryItem::setRedirectURLs): * history/HistoryItem.h: 2009-02-03 Mark Rowe Merge r40432. 2009-01-30 Geoffrey Garen Reviewed by Sam Weinig. Split "lockHistory" into "lockHistory" and "lockBackForwardList" in preparation for setting them differently during a redirect. * WebCore.base.exp: * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::submit): * bindings/js/JSLocationCustom.cpp: (WebCore::navigateIfAllowed): (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::assign): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): * html/HTMLFormElement.h: * loader/FrameLoader.cpp: (WebCore::FormSubmission::FormSubmission): (WebCore::ScheduledRedirection::ScheduledRedirection): (WebCore::isBackForwardLoadType): (WebCore::FrameLoader::createWindow): (WebCore::FrameLoader::changeLocation): (WebCore::FrameLoader::urlSelected): (WebCore::FrameLoader::submitFormAgain): (WebCore::FrameLoader::submitForm): (WebCore::FrameLoader::restoreDocumentState): (WebCore::FrameLoader::scheduleHTTPRedirection): (WebCore::FrameLoader::scheduleLocationChange): (WebCore::FrameLoader::scheduleRefresh): (WebCore::FrameLoader::redirectionTimerFired): (WebCore::FrameLoader::loadURLIntoChildFrame): (WebCore::FrameLoader::startRedirectionTimer): (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): (WebCore::FrameLoader::transitionToCommitted): (WebCore::FrameLoader::clientRedirected): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): (WebCore::FrameLoader::loadItem): * loader/FrameLoader.h: * loader/FrameLoaderTypes.h: (WebCore::): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): 2009-02-03 Mark Rowe Merge r40424. 2009-01-30 Geoffrey Garen Reviewed by Darin Adler. More scaffolding for redirect tracking. No behavior change yet. * bindings/js/JSHTMLFormElementCustom.cpp: (WebCore::JSHTMLFormElement::submit): Added scaffolding necessary for redirect checking in a form submission through JS. (Currently, we just specify "no redirect.") * bindings/js/ScriptController.h: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::processingUserGesture): (WebCore::ScriptController::processingUserGestureEvent): (WebCore::ScriptController::isJavaScriptAnchorNavigation): Refactored user gesture check to make it more clear. (WebCore::ScriptController::pageIsProcessingUserGesture): Added a helper for checking if there's a user gesture in any frame on the page (a more relaxed rule than our popup blocking rule, which requires the user gesture to occur in the frame that's executing JavaScript.) * html/HTMLFormElement.h: * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): Added scaffolding necessary for redirect checking in a form submission through the DOM. (Currently, we just specify "no redirect.") * html/HTMLFormElement.idl: Made submit custom so it can participate in redirect checking. * loader/FrameLoader.h: * loader/FrameLoader.cpp: (WebCore::FormSubmission::FormSubmission): Clarified some names, and added a "lockHistory" parameter to form submissions, to match other navigations. (WebCore::FrameLoader::submitFormAgain): (WebCore::FrameLoader::submitForm): Use the lockHistory parameter. (WebCore::FrameLoader::userGestureHint): Refactored this function for clarity, and added a FIXME for a change I was too scared to make myself. (Really, we should just get rid of this function.) (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): Refactored to pass a FrameLoadType to form posts, too, so they can participate in redirect tracking. (WebCore::FrameLoader::loadPostRequest): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): (WebCore::FrameLoader::loadItem): Use the lockHistory parameter. 2009-02-03 Mark Rowe Merge r40376. 2009-01-29 Geoffrey Garen Reviewed by Oliver Hunt. Cleaned up some naming in ScheduledRedirection. * loader/FrameLoader.cpp: (WebCore::ScheduledRedirection::ScheduledRedirection): 2009-02-03 Mark Rowe Merge r40373. 2009-01-29 Geoffrey Garen Reviewed by Oliver Hunt. Removed an unused case of "lockHistory" to help make the other cases clearer. * page/FrameLoadRequest.h: (WebCore::FrameLoadRequest::FrameLoadRequest): 2009-02-03 Mark Rowe Merge r40353. 2009-01-28 Geoffrey Garen Reviewed by Sam Weinig. Merged FrameLoadTypeReloadAllowingStaleData with FrameLoadTypeReload. Technically, selecting View->Text Encoding->[Non-Default Encoding] on a page with frames may now be slightly slower than it used to be. Oh well. * loader/FrameLoader.cpp: (WebCore::isBackForwardLoadType): (WebCore::FrameLoader::restoreDocumentState): Subbed in FrameLoadTypeReload. (WebCore::FrameLoader::loadURLIntoChildFrame): No need to account for non-back-forward navigations anymore. (WebCore::FrameLoader::canCachePage): (WebCore::FrameLoader::logCanCachePageDecision): (WebCore::FrameLoader::reloadWithOverrideEncoding): (WebCore::FrameLoader::transitionToCommitted): (WebCore::FrameLoader::loadItem): Subbed in FrameLoadTypeReload. * loader/FrameLoader.h: Renamed reloadAllowingStaleData => reloadWithOverrideEncoding, since that's what it actually does. 2009-02-03 Mark Rowe Merge r40558. 2009-02-03 Anders Carlsson Reviewed by Kevin Decker. - Fix for On Tiger, create an autorelease pool before creating the NSGraphicsContext and drain it immediately after the call to -[NSView displayRectIgnoringOpacity:inContext:]. * platform/mac/WidgetMac.mm: (WebCore::Widget::paint): 2009-02-03 Mark Rowe Merge r40541. 2009-02-03 Dan Bernstein Reviewed by Brady Eidson. - fix REGRESSION (r40508): Window opened with window.open has no initial history item (global and back/forward) Test: fast/history/window-open.html * bindings/js/JSDOMWindowBase.cpp: (WebCore::createWindow): Pass the missing lockBackForwardList parameter to FrameLoader::changeLocation(). 2009-02-03 Mark Rowe Merge r40472. 2009-02-01 Dan Bernstein Reviewed by John Sullivan. - fix REGRESSION (r40432): iframes added to global history at haaretz.co.il Fixes http/tests/navigation/multiple-back-forward-entries.html r40432 added a parameter to FrameLoader::scheduleLocationChange() and failed to update all call sites. * bindings/js/JSDOMWindowBase.cpp: (WebCore::createWindow): Pass the lockBackForwardHistory parameter, giving it the same value as the lockHistory parameter. (windowProtoFuncOpen): Ditto. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setLocation): Ditto. * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::setLocation): Ditto. * loader/FrameLoader.cpp: (WebCore::FrameLoader::requestFrame): Ditto. 2009-02-03 Mark Rowe Merge r40397. 2009-01-29 Stephanie Lewis RS by Oliver Hunt. Update the order files. * WebCore.order: 2009-02-03 Mark Rowe Merge r40368. 2009-01-29 Alexey Proskuryakov Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=23620 Crash in appcache/resource-redirect.html on Tiger There was a bug in the test case - it didn't send a Location header, and on Tiger, this resulted in a failure callback being sent. It turned out that proper redirects weren't caught at all. Tests: http/tests/appcache/manifest-redirect-2.html http/tests/appcache/resource-redirect-2.html * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didFail): Fixed this function to not crash if didReceiveResponse() wasn't called for this request. (WebCore::ApplicationCacheGroup::didReceiveResponse): Fixed to check for redirects correctly. (WebCore::ApplicationCacheGroup::didReceiveManifestResponse): Ditto. 2009-02-03 Mark Rowe Merge r40366. 2009-01-29 Adam Roben Fix Bug 23623: Windowed Flash instances aren't captured when a WebView receives a WM_PRINTCLIENT message Flash doesn't seem to respond to WM_PRINTCLIENT, so we change WM_PRINTCLIENT messages into WM_PAINT messages and hook into the BeginPaint/EndPaint APIs to return the HDC we received from WM_PRINTCLIENT. This causes the plugin to paint into the WM_PRINTCLIENT HDC via its normal WM_PAINT handler. This technique came from . No test possible. Reviewed by Darin Adler. * platform/graphics/GraphicsContext.h: Added [set]ShouldIncludeChildWindows on Windows. * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: Added m_shouldIncludeChildWindows. (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Initialize the new member. * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::setShouldIncludeChildWindows): (WebCore::GraphicsContext::shouldIncludeChildWindows): Added simple setter and getter. * plugins/PluginView.cpp: (WebCore::PluginView::PluginView): Initialize the new member. * plugins/PluginView.h: Added m_wmPrintHDC and various functions required for making WM_PRINTCLIENT work. * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::hookedBeginPaint): (WebCore::PluginView::hookedEndPaint): (WebCore::hook): (WebCore::setUpOffscreenPaintingHooks): Added. Code was modified from code available on fengyuan.com. (WebCore::PluginView::wndProc): Turn WM_PRINTCLIENT messages into WM_PAINT messages and save off the HDC that we're supposed to paint into. (WebCore::PluginView::paintWindowedPluginIntoContext): Added. Gets an HDC from the GraphicsContext, translates it into client coordinates, gets the plugin to draw into the HDC by sending a WM_PRINTCLIENT message, and returns the HDC to the GraphicsContext. (WebCore::PluginView::paint): If we're trying to paint a windowed plugin into the GraphicsContext, call paintWindowedPluginIntoContext. (WebCore::PluginView::init): Call setUpOffscreenPaintingHooks to make our WM_PRINTCLIENT trick work. 2009-02-03 Mark Rowe Merge r40358. 2009-01-29 Alexey Proskuryakov Release build fix. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::selectCache): Got rid of a variable that wasn't used in release builds. 2009-02-03 Mark Rowe Merge r40356. 2009-01-29 Alexey Proskuryakov Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=23476 HTTP redirect should make application cache updating fail Tests: http/tests/appcache/manifest-redirect.html http/tests/appcache/resource-redirect.html * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didReceiveResponse): (WebCore::ApplicationCacheGroup::didReceiveManifestResponse): Fail if response code isn't 2xx. 2009-02-03 Mark Rowe Merge r40355. 2009-01-29 Alexey Proskuryakov Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=23592 Update appcache manifest signature parsing Test: http/tests/appcache/wrong-signature-2.html * loader/appcache/ManifestParser.cpp: (WebCore::parseManifest): Allow comments on signature line. Removed code that replaced nulls with 0xFFFD characters, because there is no such requirement in the spec. 2009-02-03 Mark Rowe Merge r40354. 2009-01-28 Alexey Proskuryakov Reviewed by Anders Carlsson. https://bugs.webkit.org/show_bug.cgi?id=23584 Update application cache code for the latest round of spec changes The changes mostly affect the update process - events are sent at a different time, and caches are associated with documents earlier. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::mainReceivedError): Changed an always passing test to an assertion. (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache): Caches are now associated with DocumentLoader before being complete, but they only affect loading after being completed. (WebCore::DocumentLoader::getApplicationCacheFallbackResource): Ditto. * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::setGroup): Allow setting the group to the same one, to simplify ApplicationCacheGroup code. (WebCore::ApplicationCache::isComplete): A new method that tells whether the cache is complete, as defined in HTML5. * loader/appcache/ApplicationCache.h: Added isComplete(). * loader/appcache/ApplicationCacheGroup.h: (WebCore::ApplicationCacheUpdateOption): Per HTML5, cache updating should work differently when invoked with or without a browsing context (Frame). A Frame is currently always needed for updating in WebKit, so a new argument to update() tells whether we should pretend that there isn't one. (WebCore::ApplicationCacheGroup::cacheIsBeingUpdated): A helper for ApplicationCache::isComplete(). (WebCore::ApplicationCacheGroup::CompletionType): Cache update algorithm now waits for ne main resources to finish loading in more cases. A member variable of this type is used to distinguish between different cases when waiting. (WebCore::ApplicationCacheGroup::m_cacheCandidates): The new algorithm doesn't track cache candidates. Caches are associated with documents much earlier, but the ones whose main resources have not been loaded from a cache are being tracked in a pending master entry list. * loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::update): An explicit call to update() invokes the algorithm without a browsing context. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): (WebCore::ApplicationCacheGroup::~ApplicationCacheGroup): (WebCore::ApplicationCacheGroup::selectCache): (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL): (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): (WebCore::ApplicationCacheGroup::failedLoadingMainResource): (WebCore::ApplicationCacheGroup::stopLoading): (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): (WebCore::ApplicationCacheGroup::cacheDestroyed): (WebCore::ApplicationCacheGroup::setNewestCache): (WebCore::ApplicationCacheGroup::update): (WebCore::ApplicationCacheGroup::didReceiveResponse): (WebCore::ApplicationCacheGroup::didFinishLoading): (WebCore::ApplicationCacheGroup::didFail): (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): (WebCore::ApplicationCacheGroup::cacheUpdateFailed): (WebCore::ApplicationCacheGroup::manifestNotFound): (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): (WebCore::ApplicationCacheGroup::startLoadingEntry): (WebCore::ApplicationCacheGroup::deliverDelayedMainResources): (WebCore::ApplicationCacheGroup::addEntry): (WebCore::ApplicationCacheGroup::associateDocumentLoaderWithCache): (WebCore::CallCacheListenerTask::create): (WebCore::CallCacheListenerTask::performTask): (WebCore::CallCacheListenerTask::CallCacheListenerTask): (WebCore::ApplicationCacheGroup::postListenerTask): Rewrote the update algorithm. 2009-02-03 Mark Rowe Merge r40343. 2009-01-28 David Hyatt Back out my change to scrollWidth/Height from an earlier checkin since it broke stuff. The current behavior is not correct, but this will need to be investigated before being changed again. * rendering/RenderBox.cpp: (WebCore::RenderBox::scrollWidth): (WebCore::RenderBox::scrollHeight): 2009-02-03 Mark Rowe Merge r40335. 2009-01-28 Dan Bernstein Reviewed by Darin Adler. - fix REGRESSION (r34544): Custom icon does not appear in address field on first visit to any site * loader/icon/IconLoader.cpp: (WebCore::IconLoader::finishLoading): Changed to set the icon data only after establishing a mapping from the page URL(s) to the icon. Doing things the other way around resulted in the data not being cached in the icon-URL to IconRecord map (because there was no interested page at the time) and subsequently having to be fetched asynchronously from the database when the page-to-icon mapping was established. 2009-02-03 Mark Rowe Merge r40332. 2009-01-28 Sam Weinig Reviewed by Geoff Garen. Add forwarding header. * ForwardingHeaders/debugger/DebuggerActivation.h: Added. 2009-02-03 Mark Rowe Merge r40313. 2009-01-28 David Hyatt Fix for REGRESSION: CrashTracer: [USER] 12 crashes in Safari at com.apple.WebCore • WebCore::RenderBlock::removeFloatingObject + 59 My tightening up of markAllDescendantsWithFloatsForLayout exposed a buggy check in that code that could lead to a bad cast. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout): 2009-02-03 Mark Rowe Merge r40305. 2009-01-27 Darin Adler Reviewed by Sam Weinig. REGRESSION (r40234): Launching iTunes from a link displays a "Safari can't find the Internet plug-in" sheet in Safari rdar://problem/6533678 * rendering/RenderPartObject.cpp: (WebCore::havePlugin): Put the check for empty string in here. (WebCore::serviceTypeForClassId): Only return activeXType() if we have a plug-in that can handle that type. While it might be logical to return an Active X type for any with a classId in it, even if we don't have a plug-in that implements Active X, existing clients, such as Safari, don't expect that. 2009-02-03 Mark Rowe Merge r40304. 2009-01-27 Dan Bernstein Reviewed by Steve Falkenburg. - fix Text looks bad when font smoothing is forced off * platform/graphics/win/FontCGWin.cpp: (WebCore::Font::drawGlyphs): Changed to use GDI rather than Core Graphics if the client has turned font smoothing off. 2009-01-27 Brady Eidson Reviewed by Dan Bernstein Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage * WebCore.base.exp: * history/CachedPage.cpp: * history/CachedPage.h: (WebCore::CachedPage::cachedMainFrame): * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::savePlatformDataToCachedFrame): (WebCore::EmptyFrameLoaderClient::transitionToCommittedFromCachedFrame): * loader/FrameLoader.cpp: (WebCore::FrameLoader::restoreDocumentState): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::transitionToCommitted): (WebCore::FrameLoader::cachePageForHistoryItem): * loader/FrameLoaderClient.h: 2009-01-26 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=23360 Add variants of all the methods that compute dirty rects for repainting with versions that compute those rects relative to some container RenderBox that acts as a painting root. * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): (WebCore::RenderBox::outlineBoundsForRepaint): (WebCore::RenderBox::localToContainerQuad): (WebCore::RenderBox::clippedOverflowRectForRepaint): (WebCore::RenderBox::computeRectForRepaint): * rendering/RenderBox.h: * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::computeRectForRepaint): * rendering/RenderForeignObject.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::clippedOverflowRectForRepaint): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::containerForRepaint): (WebCore::RenderObject::repaint): (WebCore::RenderObject::repaintRectangle): (WebCore::RenderObject::rectWithOutlineForRepaint): (WebCore::RenderObject::clippedOverflowRectForRepaint): (WebCore::RenderObject::computeRectForRepaint): (WebCore::RenderObject::localToContainerQuad): * rendering/RenderObject.h: (WebCore::RenderObject::localToAbsoluteQuad): (WebCore::RenderObject::absoluteClippedOverflowRect): (WebCore::RenderObject::computeAbsoluteRepaintRect): (WebCore::RenderObject::absoluteOutlineBounds): (WebCore::RenderObject::outlineBoundsForRepaint): * rendering/RenderPath.cpp: (WebCore::RenderPath::clippedOverflowRectForRepaint): (WebCore::RenderPath::outlineBoundsForRepaint): * rendering/RenderPath.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::clippedOverflowRectForRepaint): * rendering/RenderReplaced.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::clippedOverflowRectForRepaint): (WebCore::RenderSVGContainer::outlineBoundsForRepaint): * rendering/RenderSVGContainer.h: * rendering/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::clippedOverflowRectForRepaint): * rendering/RenderSVGHiddenContainer.h: * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::clippedOverflowRectForRepaint): * rendering/RenderSVGImage.h: * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint): * rendering/RenderSVGRoot.h: * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::clippedOverflowRectForRepaint): * rendering/RenderSVGText.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::clippedOverflowRectForRepaint): (WebCore::RenderTableCell::computeRectForRepaint): (WebCore::RenderTableCell::localToContainerQuad): * rendering/RenderTableCell.h: * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::clippedOverflowRectForRepaint): * rendering/RenderTableCol.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::clippedOverflowRectForRepaint): * rendering/RenderTableRow.h: * rendering/RenderText.cpp: (WebCore::RenderText::clippedOverflowRectForRepaint): * rendering/RenderText.h: * rendering/RenderView.cpp: (WebCore::RenderView::localToContainerQuad): (WebCore::RenderView::computeRectForRepaint): * rendering/RenderView.h: 2009-01-26 Simon Fraser Reviewed by David Hyatt Back out r40285, because it was checked in with no bug number, no testcase, is rendering change that did not get thorough review, and broke the Mac build. * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): * page/EventHandler.h: * rendering/HitTestRequest.h: (WebCore::HitTestRequest::HitTestRequest): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): 2009-01-26 Brady Eidson Reviewed by Darin Adler -Make the recently added back/forward cache logging much better by actually walking the entire frame tree and indenting the resulting output. -Fix a null-termination bug in HistoryItem tree logging * history/HistoryItem.cpp: (WebCore::HistoryItem::showTreeWithIndent): * loader/FrameLoader.cpp: (WebCore::pageCacheLogPrefix): (WebCore::pageCacheLog): (WebCore::FrameLoader::logCanCachePageDecision): (WebCore::FrameLoader::logCanCacheFrameDecision): * loader/FrameLoader.h: 2009-01-26 Adam Treat Reviewed by Nikolas Zimmermann. Allow option of hit testing frame content without clipping to the visible viewport. * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): * page/EventHandler.h: * rendering/HitTestRequest.h: (WebCore::HitTestRequest::HitTestRequest): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): 2009-01-26 Sam Weinig Reviewed by Dan Bernstein. Fix for https://bugs.webkit.org/show_bug.cgi?id=18141 Acid3 tests 77 and 78 fail on reload due to SVG font race Match Opera's behavior of loading SVGFonts as soon as tag is inserted into the document and not at the first use of the font as is done for CSS web fonts. This fixes a race condition noticeable by some in the Acid3 test that happened because the onload event handler for an iframe containing a with an external reference was not delayed by the pending load of the font. Test: http/tests/misc/SVGFont-delayed-load.html * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::~SVGFontFaceUriElement): (WebCore::SVGFontFaceUriElement::parseMappedAttribute): Call loadFont if the href attribute changes. (WebCore::SVGFontFaceUriElement::insertedIntoDocument): Call loadFont. (WebCore::SVGFontFaceUriElement::loadFont): Force a load of the font specified in href attribute. * svg/SVGFontFaceUriElement.h: 2009-01-26 Timothy Hatcher Change Web Archive serialization back to the binary property list format. Web archives saved with Safari 4 cannot be read by Safari 3 Reviewed by Brady Eidson. * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::rawDataRepresentation): 2009-01-26 Anders Carlsson Fix 64-bit build. * WebCore.LP64.exp: 2009-01-26 Dmitry Titov Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=23511 Move DOMTimer from bindings/js to page/. This was prepared by moving all JSC dependencies from DOMTimer to ScheduledAction earlier, and helps unfork the Chromuim version of the DOMTimer. * GNUmakefile.am: * WebCore.pro: * WebCore.scons: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/DOMTimer.cpp: Removed. * bindings/js/DOMTimer.h: Removed. * page/DOMTimer.cpp: Copied from WebCore/bindings/js/DOMTimer.cpp. * page/DOMTimer.h: Copied from WebCore/bindings/js/DOMTimer.h. 2009-01-26 David Hyatt Eliminate rightmostPosition, lowestPosition and leftmostPosition from RenderFlow. Move the code into RenderBlock's methods. Reviewed by Eric Seidel * rendering/RenderBlock.cpp: (WebCore::RenderBlock::lowestPosition): (WebCore::RenderBlock::rightmostPosition): (WebCore::RenderBlock::leftmostPosition): * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: 2009-01-26 Darin Fisher Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=23553 Upstream changes from jcampan to fix chromium bugs 6692 and 6694. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::setLoopSelectionNavigation): (WebCore::PopupListBox::PopupListBox): (WebCore::PopupContainer::setLoopSelectionNavigation): (WebCore::PopupListBox::handleKeyEvent): (WebCore::PopupListBox::paintRow): (WebCore::PopupListBox::clearSelection): (WebCore::PopupListBox::selectNextRow): (WebCore::PopupListBox::selectPreviousRow): * platform/chromium/PopupMenuChromium.h: 2009-01-26 Brady Eidson Reviewed by Sam Weinig Remove some historical CachedPage time stamp fluff. * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): * history/CachedPage.h: (WebCore::CachedPage::timeStamp): * loader/FrameLoader.cpp: (WebCore::FrameLoader::cachePageForHistoryItem): 2009-01-26 David Hyatt Move absoluteClippedOverflowRect, linesBoundingBox and borderBoundingBox from RenderFlow to RenderInline. Reviewed by Eric Seidel * rendering/RenderBox.cpp: (WebCore::RenderBox::containingBlockHeightForPositioned): * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::linesBoundingBox): (WebCore::RenderInline::absoluteClippedOverflowRect): * rendering/RenderInline.h: (WebCore::RenderInline::borderBoundingBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): * rendering/RenderTreeAsText.cpp: (WebCore::operator<<): 2009-01-26 Dimitri Glazkov Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=22650 Implement support for "Immutable" attribute to CodeGeneratorJS.pm, thus allowing to explicitly mark methods as immutable (i.e. returning a new instance rather than a reference to an existing instance). * bindings/js/JSSVGMatrixCustom.cpp: Removed custom methods. * bindings/scripts/CodeGeneratorJS.pm: Added check for Immutable attribute when generating function call. * svg/SVGMatrix.idl: Replaced Custom attribute with Immutable on methods. 2009-01-26 David Hyatt Eliminate isInlineFlow() now that a RenderBlock can never be an inline flow. isInlineFlow() is now equivalent to isRenderInline(), so all calls to isInlineFlow() have been replaced with isRenderInline(). Reviewed by Eric Seidel * dom/Text.cpp: (WebCore::Text::rendererIsNeeded): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesHorizontally): (WebCore::shouldDrawTextDecoration): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::hitTestContents): (WebCore::InlineMinMaxIterator::next): (WebCore::RenderBlock::calcInlinePrefWidths): * rendering/RenderBlock.h: (WebCore::RenderBlock::isBlockFlow): * rendering/RenderBox.cpp: (WebCore::RenderBox::clientWidth): (WebCore::RenderBox::clientHeight): (WebCore::RenderBox::nodeAtPoint): (WebCore::RenderBox::imageChanged): (WebCore::RenderBox::offsetForPositionedInContainer): (WebCore::RenderBox::containingBlockWidthForPositioned): (WebCore::RenderBox::containingBlockHeightForPositioned): * rendering/RenderBox.h: (WebCore::RenderBox::width): (WebCore::RenderBox::height): (WebCore::RenderBox::size): (WebCore::RenderBox::frameRect): * rendering/RenderContainer.cpp: (WebCore::RenderContainer::updateBeforeAfterContentForContainer): * rendering/RenderFlow.cpp: (WebCore::RenderFlow::dirtyLinesFromChangedChild): (WebCore::RenderFlow::createInlineBox): (WebCore::RenderFlow::paintLines): (WebCore::RenderFlow::hitTestLines): (WebCore::RenderFlow::absoluteClippedOverflowRect): (WebCore::RenderFlow::lowestPosition): (WebCore::RenderFlow::rightmostPosition): (WebCore::RenderFlow::leftmostPosition): * rendering/RenderFlow.h: (WebCore::RenderFlow::borderBoundingBox): * rendering/RenderInline.h: (WebCore::RenderInline::isRenderInline): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): (WebCore::RenderLayer::intersectsDamageRect): (WebCore::RenderLayer::boundingBox): * rendering/RenderListItem.cpp: (WebCore::getParentOfFirstLineBox): * rendering/RenderObject.cpp: (WebCore::RenderObject::getAbsoluteRepaintRectWithOutline): (WebCore::RenderObject::styleWillChange): (WebCore::RenderObject::firstLineStyle): * rendering/RenderObject.h: * rendering/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createInlineBox): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::createInlineBox): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::nodeAtPoint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): * rendering/RenderText.cpp: (WebCore::isInlineFlowOrEmptyText): * rendering/RenderTreeAsText.cpp: (WebCore::operator<<): * rendering/bidi.cpp: (WebCore::bidiNext): (WebCore::bidiFirst): (WebCore::appendRunsForObject): (WebCore::RenderBlock::createLineBoxes): (WebCore::RenderBlock::computeHorizontalPositionsForLine): (WebCore::RenderBlock::layoutInlineChildren): (WebCore::inlineFlowRequiresLineBox): (WebCore::requiresLineBox): (WebCore::RenderBlock::skipTrailingWhitespace): (WebCore::RenderBlock::skipLeadingWhitespace): (WebCore::RenderBlock::findNextLineBreak): 2009-01-26 David Hyatt Drop support for display:compact. (1) display:compact is no longer part of CSS2.1. (2) Shipping Safari has completely broken compact support with severely broken rendering (all of the compact text just piles on top of the text in the inserted block and on top of itself as well). (3) This has been broken in WebKit for years (ever since blocks converted to painting lines directly) without anyone even noticing. Reviewed by Eric Seidel * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesHorizontally): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::handleSpecialChild): (WebCore::RenderBlock::handleRunInChild): (WebCore::RenderBlock::layoutBlockChildren): (WebCore::RenderBlock::paint): (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::positionForCoordinates): (WebCore::shouldCheckLines): (WebCore::getHeightForLineCount): (WebCore::RenderBlock::renderName): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::sizesToIntrinsicWidth): * rendering/RenderBox.h: (WebCore::RenderBox::width): (WebCore::RenderBox::height): (WebCore::RenderBox::size): (WebCore::RenderBox::frameRect): * rendering/RenderFlow.cpp: (WebCore::RenderFlow::paintLines): (WebCore::RenderFlow::hitTestLines): (WebCore::RenderFlow::absoluteClippedOverflowRect): (WebCore::RenderFlow::linesBoundingBox): * rendering/RenderObject.h: (WebCore::RenderObject::isInline): * rendering/bidi.cpp: (WebCore::RenderBlock::computeHorizontalPositionsForLine): (WebCore::RenderBlock::layoutInlineChildren): * rendering/bidi.h: (WebCore::BidiRun::BidiRun): 2009-01-26 Adam Langley Reviewed by Nikolas Zimmermann. gtk2drawing: fix compiler warnings g_object_set_data expects a gpointer as the last argument. Cast the TRUE/FALSE values to avoid a warning. gtk_tree_view_column_new doesn't return a GtkWidget. * platform/gtk/gtk2drawing.c: (setup_widget_prototype): (moz_gtk_get_combo_box_inner_button): (moz_gtk_get_combo_box_button_inner_widgets): (ensure_combo_box_widgets): (moz_gtk_get_combo_box_entry_inner_widgets): (moz_gtk_get_combo_box_entry_arrow): (ensure_combo_box_entry_widgets): (ensure_toolbar_widget): (ensure_menu_bar_item_widget): (ensure_menu_popup_widget): (ensure_menu_item_widget): (ensure_image_menu_item_widget): (ensure_menu_separator_widget): (ensure_check_menu_item_widget): (ensure_tree_header_cell_widget): (moz_gtk_entry_paint): 2009-01-26 David Hyatt Change display:run-in handling so that we no longer reuse RenderBlock as though it is an inline flow. Instead we create a new RenderInline, move the RenderBlock's children underneath it, and then set the inline as the new element's renderer. Reviewed by Dan Bernstein * rendering/RenderBlock.cpp: (WebCore::RenderBlock::handleRunInChild): * rendering/RenderInline.cpp: (WebCore::RenderInline::renderName): 2009-01-26 Dimitri Glazkov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=23480 Add missing method stubs to BackForwardListChromium. * history/BackForwardListChromium.cpp: (WebCore::BackForwardList::backItem): (WebCore::BackForwardList::forwardItem): 2009-01-25 Darin Adler Try to fix Tiger buildbot. * WebCore.xcodeproj/project.pbxproj: Turn off cast-qual for WebDashboardRegion.m. * page/mac/WebDashboardRegion.m: (typeName): Added. (-[WebDashboardRegion description]): Use typeName. (-[WebDashboardRegion isEqual:]): Added comment. 2009-01-25 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=23535 Strengthen debug checks in KURL Covered (and prompted) by existing tests. * platform/KURL.cpp: (WebCore::checkEncodedString): Check that the first character of the URL is an allowed first scheme character, not just that it isn't a slash. (WebCore::KURL::KURL): Assert that parsing didn't affect the string (which must be the case because of parsing being idempotent). * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::create): Added a check for the URL being valid - if it is not, an empty security origin is created. (WebCore::SecurityOrigin::createFromString): Parse the string as URL, do not just convert it - it is not guaranteed to be properly encoded. * dom/Document.cpp: (WebCore::Document::updateBaseURL): As documentURI is an arbitrary string, it needs to be parsed into an URL, not just converted into one. * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createPattern): Create the security origin with createFromString() instead of create(). I do not know where the string comes from and whether it might not be properly encoded, but this change can't hurt, and makes the code slightly more clear. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::accessControlCheck): Create the security origin with createFromString() instead of create(). The string comes from an HTTP response header, so it may not be a properly encoded URL. * loader/DocLoader.cpp: (WebCore::DocLoader::requestResource): Do not try to request using invalid URLs. * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): Updated to call SecurityOrigin::createFromString() (no change in behavior). 2009-01-25 Mark Rowe Rubber-stamped by Dan Bernstein. Improve the consistency of settings in our .xcconfig files. * Configurations/Base.xcconfig: Enable GCC_OBJC_CALL_CXX_CDTORS to match other projects, and handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS. 2009-01-25 David Hyatt Fix for https://bugs.webkit.org/show_bug.cgi?id=23524, lots of missing content in table sections. The new table code created a bug involving markAllDescendantsWithFloatsForLayout, namely that it could end up marking ancestors of a block as needing layout when that block was still in the process of doing a layout. The fix is to add a parameter to markAllDescendantsWithFloatsForLayout that says whether or not we are "mid-layout." If this flag is set, then the method will make sure to do only local dirtying of objects to avoid accidentally marking a clean ancestor as needing layout again. Ultimately the second parameter to setNeedsLayout and setChildNeedsLayout should just be removed, with a check of whether or not we are mid-layout being done by those methods instead. Reviewed by Oliver Hunt Added fast/repaint/dynamic-table-vertical-alignment-change.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::clearFloatsIfNeeded): (WebCore::RenderBlock::layoutBlockChildren): (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout): * rendering/RenderBlock.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::removeFromObjectLists): * rendering/RenderObject.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): 2009-01-25 Darin Adler Reviewed by Mark Rowe. Bug 23352: Turn on more compiler warnings in the Mac build https://bugs.webkit.org/show_bug.cgi?id=23352 Turn on the following warnings: -Wcast-qual -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-noreturn -Wpacked -Wrendundant-decls * Configurations/Base.xcconfig: Added the new warnings. Switched to -Wextra instead of -W for clarity since we don't have to support the older versions of gcc that require the old -W syntax. Since we now use -Wformat=2, removed -Wformat-security. Also removed -Wno-format-y2k since we can have that one on now. 2009-01-25 Dan Bernstein Reviewed by Oliver Hunt. - fix REGRESSION (r39566): NewsFire crashes in string hashing code when opening a Digg RSS article Test: fast/loader/null-request-after-willSendRequest.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadItem): Null-check the request returned from the client's willSendRequest method. 2009-01-25 David Hyatt Fix for REGRESSION (r40180): Scroll wheel events over text scroll the page instead of the ancestor overflow (23525) Make sure that we always call scroll() on the nearest enclosing RenderBox. No test case is possible here, since wheel scrolling is currently untestable (the offset varies from machine to machine). Reviewed by Dan Bernstein * page/EventHandler.cpp: (WebCore::scrollAndAcceptEvent): (WebCore::EventHandler::scrollOverflow): * rendering/RenderObject.cpp: (WebCore::RenderObject::enclosingBox): * rendering/RenderObject.h: 2009-01-25 Darin Adler Reviewed by Dan Bernstein. Bug 23538: REGRESSION (r39969): Garbage text instead of blank content rendered when plug-ins are disabled https://bugs.webkit.org/show_bug.cgi?id=23538 rdar://problem/6523719 I'm not sure how to make a regression test for this, since it depends on plug-ins being disabled. The main problem here is that when plug-ins were disabled, the code ignored the classId attribute and the element entirely. That resulted in a page treating a Flash document as plain HTML rather than doing fallback. * rendering/RenderPartObject.cpp: (WebCore::createClassIdToTypeMap): Added. Broke this out into a separate function so we could get rid of an inelegant if statement. (WebCore::activeXType): Added. To avoid repeating the MIME type for ActiveX and possibly having a typo. (WebCore::havePlugin): Added. Helper function to make sure we don't forget the null check. (WebCore::serviceTypeForClassId): Give this function a return value since that's a more natural way to return a string than an "out" parameter. Fixed the logic to only prefer the ActiveX type over the type guessed from the classId when there actually is an ActiveX plug-in to use. The old function assumed there was one, which I presume right for Chrome on Windows when plug-ins are enabled, but wrong in many other cases, and wrong all the time for all clients on Mac. We don't want to assume either way. Use the new havePlugin function so we handle the case where pluginData is 0. (WebCore::shouldUseEmbedDescendant): Renamed. Simplified the comment. Changed to use serviceTypeForClassId instead of the old version that used an out parameter. Always use the if there isn't a plug-in that knows how to handle elements. (WebCore::RenderPartObject::updateWidget): Removed null checks of pluginData. The two functions that use this data still need to be called; they still do something even if no plug-ins are present. And they have now been corrected to handle 0 properly. 2009-01-25 Darin Adler * rendering/RenderMenuList.cpp: Fix build by adding back needed include. 2009-01-25 Darin Adler Reviewed by Sam Weinig. Bug 23352: Turn on more compiler warnings in the Mac build https://bugs.webkit.org/show_bug.cgi?id=23352 Fourth patch: Deal with the last few stray warnings. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::firstLineBlock): Handle the const_cast a little better. Also make the local variable be a RenderBlock so the cast is closer to the code that guarantees it's correct. * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeStyle): Put the enum into a local variable that's a built-in type before using it with TextStream, so we don't get a warning due to -Wsign-promo. 2009-01-25 Darin Adler Reviewed by Sam Weinig. Bug 23522: use checked casts for render tree https://bugs.webkit.org/show_bug.cgi?id=23522 Step one: RenderText. Also change set of RenderFlow* to be a ListHashSet as the comment in the header indicated. * dom/CharacterData.cpp: (WebCore::CharacterData::setData): Use toRenderText. (WebCore::CharacterData::appendData): Ditto. (WebCore::CharacterData::insertData): Ditto. (WebCore::CharacterData::deleteData): Ditto. (WebCore::CharacterData::replaceData): Ditto. * dom/ContainerNode.cpp: (WebCore::ContainerNode::getUpperLeftCorner): Ditto. (WebCore::ContainerNode::getLowerRightCorner): Ditto. * dom/Position.cpp: (WebCore::nextRenderedEditable): Ditto. (WebCore::previousRenderedEditable): Ditto. (WebCore::Position::renderedOffset): Ditto. Also use function members instead of data members of InlineTextBox. (WebCore::Position::upstream): Ditto. (WebCore::Position::downstream): Ditto. (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight): Ditto. (WebCore::Position::inRenderedText): Ditto. (WebCore::Position::isRenderedCharacter): Ditto. (WebCore::searchAheadForBetterMatch): Ditto. (WebCore::Position::getInlineBoxAndOffset): Ditto. * dom/Range.cpp: Added include of VisiblePosition.h now that it's no longer included in RenderObject.h. * dom/Text.cpp: (WebCore::Text::splitText): Use toRenderText. (WebCore::Text::recalcStyle): Ditto. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteInsignificantText): Ditto. * editing/SelectionController.cpp: (WebCore::SelectionController::debugRenderer): Ditto. * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextNode): Ditto. (WebCore::TextIterator::handleTextBox): Ditto. (WebCore::TextIterator::emitText): Ditto. (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): Ditto. * editing/VisiblePosition.cpp: Added include of FloatQuad.h now that it's no longer included in RenderObject.h. * inspector/InspectorController.cpp: Ditto. * page/Frame.cpp: Ditto. * rendering/RenderBox.cpp: Ditto. * rendering/RenderInline.cpp: Ditto. * rendering/RenderPath.cpp: Ditto. * rendering/RenderSVGContainer.cpp: Ditto. * rendering/RenderSVGImage.cpp: Ditto. * rendering/RenderSVGInlineText.cpp: Ditto. * rendering/RenderSVGTSpan.cpp: Ditto. * rendering/RenderSVGText.cpp: Ditto. * rendering/RenderSVGTextPath.cpp: Ditto. * rendering/RenderTableCell.cpp: Ditto. * rendering/RenderView.cpp: Ditto. * editing/visible_units.cpp: (WebCore::startPositionForLine): Use function members instead of data members of InlineTextBox. (WebCore::endPositionForLine): Ditto. (WebCore::startOfParagraph): Use toRenderText. (WebCore::endOfParagraph): Ditto. * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Use toRenderText. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesHorizontally): Ditto. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::deleteLine): Ditto. (WebCore::InlineTextBox::extractLine): Ditto. (WebCore::InlineTextBox::attachLine): Ditto. (WebCore::InlineTextBox::placeEllipsisBox): Ditto. (WebCore::InlineTextBox::paintDecoration): Ditto. (WebCore::InlineTextBox::paintCompositionUnderline): Ditto. (WebCore::InlineTextBox::offsetForPosition): Ditto. (WebCore::InlineTextBox::positionForOffset): Ditto. * rendering/InlineTextBox.h: Made most members private. Use toRenderText. * rendering/RenderArena.cpp: (WebCore::RenderArena::allocate): Use static_cast instead of C-style cast. (WebCore::RenderArena::free): Ditto. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addContinuationWithOutline): Use ListHashSet instead of RenderFlowSequencedSet. (WebCore::RenderBlock::paintContinuationOutlines): Ditto. (WebCore::stripTrailingSpace): Ditto. (WebCore::RenderBlock::calcInlinePrefWidths): Ditto. (WebCore::RenderBlock::updateFirstLetter): Ditto. * rendering/RenderContainer.cpp: (WebCore::RenderContainer::addChild): Use toRenderText. * rendering/RenderFlow.cpp: (WebCore::RenderFlow::dirtyLinesFromChangedChild): Use ListHashSet instead of RenderFlowSequencedSet. (WebCore::RenderFlow::paintLines): Ditto. * rendering/RenderMenuList.cpp: Removed some unneeded includes. * rendering/RenderMenuList.h: Added now-needed forward declaration of RenderText. Made more members private. * rendering/RenderObject.cpp: Updated includes. (WebCore::RenderObject::isEditable): Use toRenderText. (WebCore::RenderObject::positionForPoint): Made non-inline so we wouldn't have to include VisiblePosition.h in the header just for this. * rendering/RenderObject.h: Removed unneeded includes and forward declarations. Changed special vertical position values to be constants rather than an enum. Eliminated RenderFlowSequencedSet, and changed clients to use ListHashSet. * rendering/RenderText.cpp: (WebCore::RenderText::findNextInlineTextBox): Use function members instead of data members of InlineTextBox. (WebCore::RenderText::positionForCoordinates): Ditto. (WebCore::isInlineFlowOrEmptyText): Use toRenderText. (WebCore::RenderText::previousCharacter): Use function members instead of data members of InlineTextBox. (WebCore::RenderText::position): Ditto. (WebCore::RenderText::caretMinOffset): Ditto. (WebCore::RenderText::caretMaxOffset): Ditto. (WebCore::RenderText::caretMaxRenderedOffset): Ditto. * rendering/RenderText.h: Added definition of toRenderText. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::textWithHardLineBreaks): Use toRenderText. * rendering/RenderTreeAsText.cpp: (WebCore::operator<<): Use toRenderText and toRenderBox. (WebCore::writeTextRun): Ditto. (WebCore::write): Ditto. * rendering/bidi.cpp: (WebCore::InlineIterator::increment): Use toRenderText. (WebCore::InlineIterator::current): Ditto. (WebCore::checkMidpoints): Ditto. (WebCore::RenderBlock::computeHorizontalPositionsForLine): Ditto. (WebCore::RenderBlock::layoutInlineChildren): Ditto. (WebCore::RenderBlock::determineStartPosition): Ditto. (WebCore::shouldSkipWhitespaceAfterStartObject): Ditto. (WebCore::RenderBlock::findNextLineBreak): Ditto. 2009-01-25 Thiago Macieira Reviewed by Simon Hausmann. Fix gcc compiler warning (deprecated conversion from constant string to char*) "" cannot be stored in a char* * plugins/PluginStream.cpp: (WebCore::PluginStream::destroyStream): 2009-01-24 Alexey Proskuryakov Reviewed by Darin Adler. REGRESSION: 1.1% PLT regression from 33577 and 33578 (encoding fixes) Changed single argument KURL constructors back to always expect an already encoded string, eliminating extra conversions. This is a rather unstable situation, as it is often unclear whether a given string is safe to convert to KURL without resolving. I think that going forward, the solution is to try to keep encoded URLs as KURL instances, and not as strings. * platform/KURL.h: Updated comments. * platform/KURL.cpp: (WebCore::KURL::KURL): In debug builds, verify that the passed string is ASCII-only. The intention is to verify that it is already parsed and encoded by KURL or equivalent code, but since encoding is scheme-dependent, such a verification would be quite complicated. Don't encode the string as UTF-8, as it supposed to be ASCII-only. Removed a hack that made strings beginning with "/" turn into "file:" URLs. I didn't find any reason for it to exist, but I saw several cases where this code path was taken inadvertently (see examples in LayoutTests/ChangeLog). (WebCore::KURL::setProtocol): Using a user-provided string without validation or encoding is clearly wrong here (e.g., the "protocol" can be set to a full URL, effectively replacing the old one), and an already encoded string is expected by parse(). In debug builds, non-ASCII input will make an assertion in parse() fail. Added a FIXME. (WebCore::KURL::setHost): Ditto. (WebCore::KURL::setPort): Ditto. (WebCore::KURL::setHostAndPort): Ditto. (WebCore::KURL::setUser): Ditto. (WebCore::KURL::setPass): Ditto. (WebCore::KURL::setRef): Ditto. (WebCore::KURL::setQuery): Ditto. (WebCore::KURL::setPath): Ditto. (WebCore::KURL::parse): Verify that the passed string is already encoded. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseMappedAttribute): (WebCore::HTMLLinkElement::process): * html/HTMLLinkElement.h: Changed to avoid using invalid URLs (this was causing problems on DNS prefetch tests, see LayoutTests/ChangeLog). * loader/FrameLoader.cpp: (WebCore::FrameLoader::init): Create an empty KURL without indirection for a small speedup. (WebCore::FrameLoader::requestFrame): Resolve and encode javascript URLs properly, now that String to KURL conversion requires the string to be already encoded. * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): Resolve and encode the origin. HTML5 seems a little unclear on how this should work (it talks about "either parsing it as a URL, or resolving it", and then somehow compares unaltered targetOrigin string to a security origin object), so I just made the code as close to what we already had as possible. 2009-01-24 Darin Adler Try to fix Qt build. * WebCore.pro: Added JSTextCustom.cpp. 2009-01-23 Chris Marrin Reviewed by David Hyatt. https://bugs.webkit.org/show_bug.cgi?id=23467 Change styleAvailable functionality to be a linked list rather than scanning every CompositeAnimation for Animations that are waiting for styleAvailable. This has potential for large performance improvement in cases where there are many animations firing at once. But it will also help in my next fix, which is to synchronize software and accelerated animations. I also changed slightly when the beginAnimationUpdate and endAnimationUpdate calls are made. But this has no real effect on performance or behavior. * dom/Document.cpp: (WebCore::Document::recalcStyle): (WebCore::Document::updateRendering): * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::AnimationBase): (WebCore::AnimationBase::~AnimationBase): (WebCore::AnimationBase::updateStateMachine): * page/animation/AnimationBase.h: (WebCore::AnimationBase::next): (WebCore::AnimationBase::setNext): (WebCore::AnimationBase::styleAvailable): * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): (WebCore::AnimationControllerPrivate::addToStyleAvailableWaitList): (WebCore::AnimationControllerPrivate::removeFromStyleAvailableWaitList): (WebCore::AnimationControllerPrivate::styleAvailable): (WebCore::AnimationController::AnimationController): (WebCore::AnimationController::endAnimationUpdate): (WebCore::AnimationController::addToStyleAvailableWaitList): (WebCore::AnimationController::removeFromStyleAvailableWaitList): * page/animation/AnimationController.h: * page/animation/CompositeAnimation.cpp: (WebCore::CompositeAnimationPrivate::addToStyleAvailableWaitList): (WebCore::CompositeAnimationPrivate::removeFromStyleAvailableWaitList): (WebCore::CompositeAnimation::addToStyleAvailableWaitList): (WebCore::CompositeAnimation::removeFromStyleAvailableWaitList): * page/animation/CompositeAnimation.h: 2009-01-24 Alexey Proskuryakov Reviewed by Darin Adler. REGRESSION: URL encoding problems on http://www.cineman.ch Test: http/tests/xmlhttprequest/encode-request-url-2.html * platform/KURL.cpp: (WebCore::appendASCII): Added a helper function. (WebCore::KURL::KURL): Explicitly encode the URL to call two-argument parse() with better specified behavior. (WebCore::KURL::init): Ditto. This avoids trying to round-trip an URL encoded into a byte stream, but not yet transformed to ASCII-only using percent escapes. Since different parts of the byte stream can use different encodings, round-tripping is not possible. (WebCore::KURL::parse): Reverted an earlier change that made the single-argument version of this function convert the string to utf-8. I think that on the remanining code paths, it is correct to assume that the string is all ASCII, but I'm not yet confident enough to drop a FIXME warning. 2009-01-24 Jan Michael Alonzo Gtk build fix after r40170 * GNUmakefile.am: Removed editing/RemoveNodeAttributeCommand.cpp and editing/RemoveNodeAttributeCommand.h 2009-01-23 Adam Treat Fix the Qt build after r40205. * WebCore.pro: 2009-01-23 Brady Eidson Reviewed by Darin Adler In CachedPage, break off per-Frame pieces of data into a CachedFrame object. * GNUmakefile.am: * WebCore.base.exp: * WebCore.pro: * WebCore.scons: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * history/CachedFrame.cpp: Added. (WebCore::cachedFrameCounter): (WebCore::CachedFrame::CachedFrame): (WebCore::CachedFrame::~CachedFrame): (WebCore::CachedFrame::restore): (WebCore::CachedFrame::clear): (WebCore::CachedFrame::setCachedFramePlatformData): (WebCore::CachedFrame::cachedFramePlatformData): * history/CachedFrame.h: Added. (WebCore::CachedFrame::document): (WebCore::CachedFrame::documentLoader): (WebCore::CachedFrame::view): (WebCore::CachedFrame::mousePressNode): (WebCore::CachedFrame::url): (WebCore::CachedFrame::domWindow): * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): (WebCore::CachedPage::restore): (WebCore::CachedPage::clear): (WebCore::CachedPage::setCachedFramePlatformData): (WebCore::CachedPage::cachedFramePlatformData): * history/CachedPage.h: (WebCore::CachedPage::document): (WebCore::CachedPage::documentLoader): (WebCore::CachedPage::view): (WebCore::CachedPage::mousePressNode): (WebCore::CachedPage::url): (WebCore::CachedPage::domWindow): * loader/FrameLoader.cpp: (WebCore::FrameLoader::cachePageForHistoryItem): Setting the DocumentLoader independently of creating a CachedPage was a historical relic. Take the opportunity to clean that up. 2009-01-23 David Hyatt Add ASSERTs to catch anyone trying to obtain the width/height of an inline flow. Fix up all the places that triggered the ASSERT (since all of these places are effectively regressions from my landing that devirtualized width()/height()). Reviewed by Adele * dom/Position.cpp: (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight): * editing/DeleteButtonController.cpp: (WebCore::isDeletableElement): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::isKeyboardFocusable): * rendering/RenderBox.cpp: (WebCore::RenderBox::clientWidth): (WebCore::RenderBox::clientHeight): (WebCore::RenderBox::scrollWidth): (WebCore::RenderBox::scrollHeight): (WebCore::RenderBox::absoluteOutlineBounds): * rendering/RenderBox.h: (WebCore::RenderBox::width): (WebCore::RenderBox::height): (WebCore::RenderBox::size): (WebCore::RenderBox::frameRect): (WebCore::RenderBox::borderBoundingBox): * rendering/RenderFlow.h: (WebCore::RenderFlow::borderBoundingBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::styleWillChange): * rendering/RenderScrollbarPart.h: * wml/WMLAElement.cpp: (WebCore::WMLAElement::isKeyboardFocusable): 2009-01-23 Darin Adler Reviewed by Anders Carlsson. Bug 23352: Turn on more compiler warnings in the Mac build https://bugs.webkit.org/show_bug.cgi?id=23352 Second patch: Slightly less simple cases of various warnings. * bridge/jni/jni_runtime.h: (JSC::Bindings::JavaString::_commonInit): Use reinterpret_cast here and avoid casting away const. * dom/XMLTokenizerLibxml2.cpp: (WebCore::PendingCallbacks::appendStartElementNSCallback): Use static_cast instead of reinterpret_cast; this is casting the result of malloc, and the idiom is to use static_cast, which works because we're casting from void*. (WebCore::PendingCallbacks::PendingStartElementNSCallback::call): Use const_cast instead C-style casts. * xml/XSLTUnicodeSort.cpp: (inlineXSLTTransformError): Tweak soft linking of xsltTransformError to use a macro instead of redefining the function. 2009-01-23 Darin Adler Reviewed by Anders Carlsson. Bug 23475: fast/text/find-backwards.html fails with ICU disabled SearchBuffer https://bugs.webkit.org/show_bug.cgi?id=23475 * editing/TextIterator.cpp: (WebCore::SearchBuffer::search): Set the character start flag to false to ensure we won't ever return the same result twice. There are other ways we could accomplish this, mentioned in the comment, but this one was the smallest and cleanest I could think of. 2009-01-23 Darin Adler Reviewed by Anders Carlsson. Bug 23510: REGRESSION (r40171): CDATASection objects not getting proper JavaScript wrappers https://bugs.webkit.org/show_bug.cgi?id=23510 That patch fixed the optimization that's supposed to give a faster path for allocating the wrappers for DOM Text objects. But CDATASection is the one subclass of Text objects. * GNUmakefile.am: Added JSCDATASectionCustom.cpp. * WebCore.scons: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCoreSources.bkl: Ditto. * bindings/js/JSCDATASectionCustom.cpp: Copied from bindings/js/JSTextCustom.cpp. (WebCore::toJSNewlyCreated): Changed to do CDATASection, not Text. * bindings/scripts/CodeGeneratorJS.pm: Added another toJSNewlyCreated function for CDATASection. We don't want to have to check when creating a wrapper for a Text object whether it's a CDATASection object or not, so we need to do this overload at compile time. 2009-01-23 Nikolas Zimmermann Reviewed by Eric Seidel. Add a base class for WML form control elements: WMLFormControlElement (as it's designed in HTML as well). WMLFormControlElement inherits from WMLElement and FormControlElement (just like the HTMLFormControlElement equivalent). WMLInputElement / WMLOptionElement / WMLOptGroupElement are supposed to inherit from the new WMLFormControlElement class. Now WMLInputElement & WMLOptGroupElement only inherit from WMLElement and FormControlElement, but WMLOptionElement inherits from WMLEventHandlingElement (which in turn inherits from WMLElement) and FormControlElement. In order to introduce a shared base class, WMLEventHandlingElement is no longer allowed to inherit from WMLElement directly. Instead it should turn into another base class, just like FormControlElement. Add a base class for form control elements 'with state': FormControlElementWithState, serving as base class for HTMLFormControlElementWithState and WMLFormControlElementWithState. -> Make Document operate on FormControlElementWithState objects instead of HTMLFormControlElementWithState objects, to support save/restore control state for non HTMLFormControlElements. Rename isGenericFormElement() to isFormControlElement(), and move it to Element.h Add new virtual function isFormControlElementWithState() to Element.h. * GNUmakefile.am: * WebCore.order: * WebCore.pro: * WebCore.scons: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * dom/Document.cpp: (WebCore::Document::formElementsState): * dom/Document.h: (WebCore::Document::registerFormElementWithState): (WebCore::Document::unregisterFormElementWithState): * dom/Element.h: (WebCore::Element::isFormControlElement): (WebCore::Element::isFormControlElementWithState): * dom/FormControlElement.cpp: (WebCore::toFormControlElement): * dom/FormControlElement.h: * dom/FormControlElementWithState.cpp: Added. (WebCore::FormControlElementWithState::registerFormControlElementWithState): (WebCore::FormControlElementWithState::unregisterFormControlElementWithState): (WebCore::FormControlElementWithState::finishParsingChildren): (WebCore::toFormControlElementWithState): * dom/FormControlElementWithState.h: Added. (WebCore::FormControlElementWithState::~FormControlElementWithState): (WebCore::FormControlElementWithState::FormControlElementWithState): * html/HTMLElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState): (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState): (WebCore::HTMLFormControlElementWithState::willMoveToNewOwnerDocument): (WebCore::HTMLFormControlElementWithState::didMoveToNewOwnerDocument): * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::isFormControlElement): (WebCore::HTMLFormControlElementWithState::isFormControlElementWithState): (WebCore::HTMLFormControlElementWithState::toFormControlElement): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formElementIndex): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::correspondingControl): * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::formElement): * page/Frame.cpp: (WebCore::Frame::searchForLabelsBeforeElement): (WebCore::scanForForm): (WebCore::Frame::currentForm): * page/mac/FrameMac.mm: (WebCore::Frame::searchForLabelsBeforeElement): * wml/WMLCardElement.cpp: (WebCore::WMLCardElement::WMLCardElement): (WebCore::WMLCardElement::parseMappedAttribute): (WebCore::WMLCardElement::insertedIntoDocument): * wml/WMLCardElement.h: * wml/WMLDoElement.cpp: (WebCore::WMLDoElement::insertedIntoDocument): * wml/WMLElement.h: (WebCore::WMLElement::isWMLElement): * wml/WMLEventHandlingElement.cpp: (WebCore::WMLEventHandlingElement::WMLEventHandlingElement): (WebCore::WMLEventHandlingElement::registerDoElement): (WebCore::toWMLEventHandlingElement): * wml/WMLEventHandlingElement.h: * wml/WMLFormControlElement.cpp: Added. (WebCore::WMLFormControlElement::WMLFormControlElement): (WebCore::WMLFormControlElement::~WMLFormControlElement): (WebCore::WMLFormControlElementWithState::WMLFormControlElementWithState): (WebCore::WMLFormControlElementWithState::~WMLFormControlElementWithState): * wml/WMLFormControlElement.h: Added. (WebCore::WMLFormControlElement::isFormControlElement): (WebCore::WMLFormControlElement::valueMatchesRenderer): (WebCore::WMLFormControlElement::setValueMatchesRenderer): (WebCore::WMLFormControlElement::name): (WebCore::WMLFormControlElementWithState::isFormControlElementWithState): (WebCore::WMLFormControlElementWithState::toFormControlElement): * wml/WMLInputElement.cpp: (WebCore::WMLInputElement::WMLInputElement): (WebCore::WMLInputElement::type): * wml/WMLInputElement.h: * wml/WMLOnEventElement.cpp: (WebCore::WMLOnEventElement::registerTask): * wml/WMLOptGroupElement.cpp: (WebCore::WMLOptGroupElement::WMLOptGroupElement): (WebCore::WMLOptGroupElement::type): * wml/WMLOptGroupElement.h: * wml/WMLOptionElement.cpp: (WebCore::WMLOptionElement::WMLOptionElement): (WebCore::WMLOptionElement::type): * wml/WMLOptionElement.h: * wml/WMLTemplateElement.cpp: (WebCore::WMLTemplateElement::WMLTemplateElement): (WebCore::WMLTemplateElement::parseMappedAttribute): * wml/WMLTemplateElement.h: 2009-01-23 Chris Fleizach Reviewed by Darin Adler. Bug 23509: Crash at -[WebCoreAXObject doAXNextSentenceEndTextMarkerForTextMarker:] https://bugs.webkit.org/show_bug.cgi?id=23509 Add null checking in makeRange instead of AX code * editing/VisiblePosition.cpp: (WebCore::makeRange): * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::nextSentenceEndPosition): (WebCore::AccessibilityObject::previousSentenceStartPosition): 2009-01-23 Adam Treat Fix the Gtk build too after removal of RenderBox::toConstRenderBox * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::baselinePosition): 2009-01-23 Adam Treat Fix the Qt build after rename of RenderBox::toConstRenderBox -> toRenderBox * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::baselinePosition): 2009-01-23 Adam Treat Fix the Qt build after r40168. * WebCore.pro: 2009-01-23 Brady Eidson Rubberstamped by Darin Adler Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role. * GNUmakefile.am: * WebCore.base.exp: * WebCore.order: * WebCore.xcodeproj/project.pbxproj: * history/CachedFramePlatformData.h: Copied from WebCore/history/CachedPagePlatformData.h. (WebCore::CachedFramePlatformData::~CachedFramePlatformData): * history/CachedPagePlatformData.h: Removed. * history/CachedPage.cpp: (WebCore::CachedPage::clear): (WebCore::CachedPage::setCachedFramePlatformData): (WebCore::CachedPage::cachedFramePlatformData): * history/CachedPage.h: 2009-01-23 Kevin Watters Reviewed by Kevin Ollivier. Fix drawing in situations where sub-portions of the bitmap are to be drawn to the screen. * platform/graphics/wx/ImageWx.cpp: (WebCore::BitmapImage::draw): 2009-01-23 Kevin Ollivier Build fixes for recent changes. * WebCoreSources.bkl: * plugins/PluginView.cpp: (WebCore::PluginView::invalidateWindowlessPluginRect): 2009-01-23 Eric Carlson Reviewed by Adele Peterson Fix for https://bugs.webkit.org/show_bug.cgi?id=23407 Implement QTMovieWin::hasVideo so the controller on an audio-only