2009-02-03 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=23365 Hook up accelerated compositing layers the native view system on Mac. * WebCore.base.exp: Export new Page methods. * page/ChromeClient.h: (WebCore::ChromeClient::attachRootGraphicsLayer): (WebCore::ChromeClient::setNeedsOneShotDrawingSynchronization): New methods for attaching/detaching the root GraphicsLayer, and synchronizing layer changes with window drawing. * page/FrameView.h: * page/FrameView.cpp: (WebCore::FrameView::updateCompositingLayers): (WebCore::FrameView::setNeedsOneShotDrawingSynchronization): (WebCore::FrameView::didMoveOnscreen): (WebCore::FrameView::willMoveOffscreen): New methods to update the compositing layer hierarchy, and pass-throughs to the RenderLayerCompositor. (WebCore::FrameView::layout): Update compositing layers after layout() and updateLayerPositions(). * page/Page.cpp: (WebCore::Page::didMoveOnscreen): (WebCore::Page::willMoveOffscreen): * page/Page.h: New methods to allow the native view system to tell the Page when it starts to be presented on-screen, and when it will be hidden. * rendering/RenderLayerCompositor.h: * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateLayerCompositingState): (WebCore::RenderLayerCompositor::didMoveOnscreen): (WebCore::RenderLayerCompositor::willMoveOffscreen): (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): Rename 'attached' methods to 'moveOnscreen/moveOffscreen' to match the calls through from Page, FrameView. (WebCore::RenderLayerCompositor::layerWillBeRemoved): Dont' try to repaint or update layers if the document is being torn down. * rendering/RenderView.cpp: (WebCore::RenderView::didMoveOnscreen): (WebCore::RenderView::willMoveOffscreen): * rendering/RenderView.h: New methods. 2009-02-03 Dirk Schulze Reviewed by Holger Hans Peter Freyther. Fixed getImageData and putImageData and respect pre- multiplied colors. Cairo's ImageBuffer::getImageData() does not handle alpha=0 case correctly https://bugs.webkit.org/show_bug.cgi?id=21575 * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::getImageData): (WebCore::ImageBuffer::putImageData): 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 Adam Treat Fix the Qt build after r40536. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertQVariantToValue): 2009-02-03 Dan Bernstein - fix -Wmissing-prototypes builds * loader/WorkerThreadableLoader.cpp: (WebCore::workerContextDidSendData): Marked this function static. (WebCore::workerContextDidReceiveResponse): Ditto. (WebCore::workerContextDidReceiveData): Ditto. (WebCore::workerContextDidFinishLoading): Ditto. (WebCore::workerContextDidFail): Ditto. (WebCore::workerContextDidGetCancelled): Ditto. (WebCore::workerContextDidReceiveAuthenticationCancellation): Ditto. 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-03 Simon Hausmann Reviewed by Tor Arne Vestbø. Fix conversion of QByteArray to JavaScript and back. Instead of converting it to a String (data loss!) we now map it to JSByteArray. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::): (JSC::Bindings::valueRealType): Added JSByteArray as converstion type. (JSC::Bindings::convertValueToQVariant): Convert from JSByteArray to QVariant(QByteArray). (JSC::Bindings::convertQVariantToValue): Convert from QVariant::ByteArray to jsByteArray. 2009-02-03 Alexey Proskuryakov Build fix. * GNUmakefile.am: Removed WorkerTask.{h,cpp}. 2009-02-03 Dmitry Titov Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=22718 Implement WindowTimers interface in Workers. This patch moves timeoutID from Document to ScriptExecutionContext and exposes JS methods setTimeout/setInterval/clearTimeout/clearInterval inside of a Worker. Also added a test for those methods. Test: fast/workers/worker-timeout.html * bindings/js/JSWorkerContextCustom.cpp: (WebCore::setTimeoutOrInterval): Creates ScheduledAction and calls WorkerContext::installTimeout to actually add a timer. (WebCore::JSWorkerContext::setTimeout): (WebCore::JSWorkerContext::clearTimeout): (WebCore::JSWorkerContext::setInterval): (WebCore::JSWorkerContext::clearInterval): Added methods exposed to JS. * dom/Document.cpp: * dom/Document.h: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::addTimeout): (WebCore::ScriptExecutionContext::removeTimeout): (WebCore::ScriptExecutionContext::findTimeout): * dom/ScriptExecutionContext.h: The timerID map moves from Document to ScriptExecutionContext, to be available to Document and to WorkerContext. * dom/WorkerContext.cpp: (WebCore::WorkerContext::installTimeout): Adds a DOMTimeout. (WebCore::WorkerContext::removeTimeout): Removes a DOMTimeout. * dom/WorkerContext.h: * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): (WebCore::DOMTimer::~DOMTimer): (WebCore::DOMTimer::removeById): Code change here reflects move of timeoutID map to the ScriptExecutionContext. Some checks and casts are no longer needed. 2009-02-03 Dmitry Titov Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=23560 Implement SharedTimer for Workers. * dom/WorkerRunLoop.cpp: Added private class WorkerSharedTimer that implements SharedTimer interface for worker threads. (WebCore::WorkerSharedTimer::WorkerSharedTimer): (WebCore::WorkerSharedTimer::setFiredFunction): (WebCore::WorkerSharedTimer::setFireTime): (WebCore::WorkerSharedTimer::stop): (WebCore::WorkerSharedTimer::isActive): (WebCore::WorkerSharedTimer::fireTime): (WebCore::WorkerSharedTimer::fire): (WebCore::WorkerRunLoop::WorkerRunLoop): Initializes a WorkerSharedTimer instance. (WebCore::WorkerRunLoop::~WorkerRunLoop): The destructor is here so compiler is ok with having OwnPtr in .h file w/o defining WorkerSharedTimer. (WebCore::WorkerRunLoop::run): Set/reset shared timer interface on ThreadTimers, use MessageQueue::waitForMessageTimed() if timer is active. * dom/WorkerRunLoop.h: Add member of type OwnPtr 2009-02-03 Steve Falkenburg Build fix. * WebCore.vcproj/WebCore.vcproj: 2009-02-03 Alexey Proskuryakov Windows build fix. * dom/CrossThreadCopier.h: Changed forward declarations to use struct instead of class where appropriate. 2009-02-02 David Levin Reviewed by Alexey Proskuryakov. Bug 23636: Make the async api of ThreadableLoader functional for the worker context. Enable the async portion of ThreadableLoader for workers. No observable change in behavior, so no test. * GNUmakefile.am: * WebCore.pro: * WebCore.scons: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * dom/CrossThreadCopier.h: * dom/GenericWorkerTask.h: * dom/WorkerThread.cpp: * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoader::create): * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didFinishLoading): * loader/ThreadableLoaderClientWrapper.h: Added. (WebCore::ThreadableLoaderClientWrapper::create): (WebCore::ThreadableLoaderClientWrapper::clearClient): (WebCore::ThreadableLoaderClientWrapper::didSendData): (WebCore::ThreadableLoaderClientWrapper::didReceiveResponse): (WebCore::ThreadableLoaderClientWrapper::didReceiveData): (WebCore::ThreadableLoaderClientWrapper::didFinishLoading): (WebCore::ThreadableLoaderClientWrapper::didFail): (WebCore::ThreadableLoaderClientWrapper::didGetCancelled): (WebCore::ThreadableLoaderClientWrapper::didReceiveAuthenticationCancellation): (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper): * loader/WorkerThreadableLoader.cpp: Added. (WebCore::WorkerThreadableLoader::WorkerThreadableLoader): (WebCore::WorkerThreadableLoader::~WorkerThreadableLoader): (WebCore::WorkerThreadableLoader::cancel): (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): (WebCore::WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge): (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy): (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy): (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel): (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel): (WebCore::WorkerThreadableLoader::MainThreadBridge::clearClientWrapper): (WebCore::workerContextDidSendData): (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData): (WebCore::workerContextDidReceiveResponse): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): (WebCore::workerContextDidReceiveData): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): (WebCore::workerContextDidFinishLoading): (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading): (WebCore::workerContextDidFail): (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): (WebCore::workerContextDidGetCancelled): (WebCore::WorkerThreadableLoader::MainThreadBridge::didGetCancelled): (WebCore::workerContextDidReceiveAuthenticationCancellation): (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation): * loader/WorkerThreadableLoader.h: Added. (WebCore::WorkerThreadableLoader::create): (WebCore::WorkerThreadableLoader::refThreadableLoader): (WebCore::WorkerThreadableLoader::derefThreadableLoader): 2009-02-02 David Levin Reviewed by Alexey Proskuryakov. Bug 23636: Make the async api of ThreadableLoader functional for the worker context. No observable change in behavior, so no test. * WebCore.xcodeproj/project.pbxproj: * dom/Worker.cpp: * dom/Worker.h: * dom/WorkerContext.cpp: (WebCore::WorkerContext::addMessage): (WebCore::WorkerContext::postTask): (WebCore::WorkerContext::postTaskToWorkerObject): * dom/WorkerContext.h: * dom/WorkerMessagingProxy.cpp: (WebCore::MessageWorkerContextTask::performTask): (WebCore::WorkerMessagingProxy::postMessageToWorkerContext): (WebCore::WorkerMessagingProxy::postTaskToWorkerContext): Expose postTaskToWorkerContext for use by the worker object thread. (WebCore::WorkerMessagingProxy::postTaskToWorkerObject): Change the name of postTaskToParentContext to postTaskToWorkerObject for consistency with postMessageToWorkerObject. * dom/WorkerMessagingProxy.h: * dom/WorkerRunLoop.cpp: (WebCore::WorkerRunLoop::run): (WebCore::WorkerRunLoop::postTask): * dom/WorkerRunLoop.h: * dom/WorkerTask.cpp: Removed. * dom/WorkerTask.h: Removed. Removed WorkerTask and replaced with the existing ScriptExecutionContext::Task. The resulted in the class going away along with an adapter that made a ScriptExecutionContext::Task look like a WorkerTask. * dom/WorkerThread.cpp: * dom/WorkerThread.h: 2009-02-02 David Levin Reviewed by Alexey Proskuryakov. Bug 23618: Templated worker tasks should be more error proof to use. Add the generic worker tasks templates needed for the WorkerThreadableLoader. No observable change in behavior, so no test. * GNUmakefile.am: * WebCore.pro: * WebCore.scons: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * dom/CrossThreadCopier.cpp: Added. * dom/CrossThreadCopier.h: Added. (WebCore::CrossThreadCopierPassThrough::copy): * dom/GenericWorkerTask.h: Stop doing the WorkerMessagingProxy::askedToTerminate call automatically in performTask because was not obvious that it would be done and not always needed. (WebCore::GenericWorkerTask1::create): (WebCore::GenericWorkerTask1::GenericWorkerTask1): (WebCore::GenericWorkerTask1::performTask): (WebCore::GenericWorkerTask2::create): (WebCore::GenericWorkerTask2::GenericWorkerTask2): (WebCore::GenericWorkerTask2::performTask): (WebCore::GenericWorkerTask3::create): (WebCore::GenericWorkerTask3::GenericWorkerTask3): (WebCore::GenericWorkerTask3::performTask): (WebCore::GenericWorkerTask4::create): (WebCore::GenericWorkerTask4::GenericWorkerTask4): (WebCore::GenericWorkerTask4::performTask): (WebCore::GenericWorkerTask5::create): (WebCore::GenericWorkerTask5::GenericWorkerTask5): (WebCore::GenericWorkerTask5::performTask): (WebCore::GenericWorkerTask6::create): (WebCore::GenericWorkerTask6::GenericWorkerTask6): (WebCore::GenericWorkerTask6::performTask): (WebCore::GenericWorkerTask7::create): (WebCore::GenericWorkerTask7::GenericWorkerTask7): (WebCore::GenericWorkerTask7::performTask): (WebCore::createCallbackTask): * dom/WorkerContext.cpp: (WebCore::addMessageTask): (WebCore::WorkerContext::addMessage): * dom/WorkerMessagingProxy.h: (WebCore::WorkerMessagingProxy::askedToTerminate): 2009-02-02 Sam Weinig Reviewed by David "The Barnabas Jones" Hyatt. Move removeChildNode, appendChildNode and insertChildNode from RenderContainer into RenderObjectChildList. Make moveChildNode static in RenderBlock, as that was the only user. * rendering/RenderBlock.cpp: (WebCore::moveChild): (WebCore::RenderBlock::makeChildrenNonInline): (WebCore::RenderBlock::removeChild): (WebCore::RenderBlock::handleRunInChild): * rendering/RenderContainer.cpp: (WebCore::RenderContainer::addChild): (WebCore::RenderContainer::removeChild): * rendering/RenderContainer.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::splitInlines): (WebCore::RenderInline::splitFlow): (WebCore::RenderInline::childBecameNonInline): * rendering/RenderObject.cpp: (WebCore::RenderObject::handleDynamicFloatPositionChange): * rendering/RenderObject.h: (WebCore::RenderObject::createsAnonymousWrapper): * rendering/RenderObjectChildList.cpp: (WebCore::updateListMarkerNumbers): (WebCore::RenderObjectChildList::removeChildNode): (WebCore::RenderObjectChildList::appendChildNode): (WebCore::RenderObjectChildList::insertChildNode): * rendering/RenderObjectChildList.h: * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::addChild): (WebCore::RenderSVGContainer::removeChild): * rendering/RenderSVGContainer.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::removeChild): * rendering/RenderTable.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::removeChild): * rendering/RenderTableSection.h: 2009-02-02 Alexey Proskuryakov Reviewed by Darin Alder. https://bugs.webkit.org/show_bug.cgi?id=23697 Leaks seen on Worker tests * dom/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal): Zero out m_workerThread, so that the proxy could be deleted once workerObjectDestroyed() is called. 2009-02-02 David Hyatt Move positionForCoordinates up from RenderContainer into RenderBox. Reviewed by Sam Weinig * rendering/RenderBox.cpp: (WebCore::RenderBox::positionForCoordinates): * rendering/RenderBox.h: * rendering/RenderContainer.cpp: * rendering/RenderContainer.h: 2009-02-02 Hiroaki Nakamura Reviewed by Adam Roben. Fixes https://bugs.webkit.org/show_bug.cgi?id=15813 Modify pre-build step to properly handle the errorlevel shell command. * WebCore.vcproj/WebCore.vcproj: Change errorlevel handling for all targets so prefast is only enabled in builds where /analyze is available. 2009-02-02 David Hyatt Refactor the handling of before/after content and generated content. Move most of the functions from RenderContainer into RenderObjectChildList. Reviewed by Sam Weinig * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateBeforeAfterContent): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::isAfterContent): * rendering/RenderBox.h: * rendering/RenderButton.cpp: (WebCore::RenderButton::updateBeforeAfterContent): * rendering/RenderContainer.cpp: * rendering/RenderContainer.h: * rendering/RenderCounter.cpp: (WebCore::destroyCounterNodeChildren): * rendering/RenderInline.cpp: (WebCore::RenderInline::styleDidChange): (WebCore::RenderInline::addChildIgnoringContinuation): (WebCore::RenderInline::splitInlines): * rendering/RenderObject.h: * rendering/RenderObjectChildList.cpp: (WebCore::beforeAfterContainer): (WebCore::findBeforeAfterParent): (WebCore::invalidateCountersInContainer): (WebCore::RenderObjectChildList::invalidateCounters): (WebCore::RenderObjectChildList::updateBeforeAfterContent): * rendering/RenderObjectChildList.h: 2009-02-02 Dmitry Titov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=23661 Fix Chromium build. * history/HistoryItem.h: need to include * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::adjustMenuListStyle): isEnabled() is now on FormControlElement. 2009-02-02 Geoffrey Garen Build fix. * plugins/PluginView.cpp: (WebCore::PluginView::performRequest): 2009-02-02 Geoffrey Garen Build fix. * WebCore.base.exp: 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-02 David Hyatt Make calcPrefWidths non-abstract on RenderBox and just give it RenderContainer's implementation. Remove RenderSVGContainer's implementation, since it was never called. Reviewed by Beth Dakin * rendering/RenderBox.cpp: (WebCore::RenderBox::minPrefWidth): * rendering/RenderBox.h: (WebCore::RenderBox::calcPrefWidths): * rendering/RenderContainer.h: (WebCore::RenderContainer::moveChildNode): * rendering/RenderSVGContainer.h: 2009-02-02 Anders Carlsson Reviewed by Sam Weinig. Add jsObjectForPluginElement to ScriptController, and have createScriptObjectForPluginElement call it. * WebCore.LP64.exp: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::createScriptObjectForPluginElement): (WebCore::ScriptController::jsObjectForPluginElement): * bindings/js/ScriptController.h: 2009-02-02 Darin Fisher Reviewed by Eric Seidel (and Ojan Vafai). https://bugs.webkit.org/show_bug.cgi?id=23696 Select element doesn't show new value when focus is switched in onchange event. Fix PopupMenuChromium to hide itself before calling valueChanged. This better matches the behavior of the other ports. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::create): (WebCore::PopupContainer::PopupContainer): (WebCore::PopupContainer::showPopup): (WebCore::PopupContainer::hidePopup): (WebCore::PopupListBox::abandon): (WebCore::PopupListBox::acceptIndex): (WebCore::PopupMenu::show): (WebCore::PopupMenu::hide): 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-02 Darin Adler Reviewed by Dave Hyatt. Bug 23676: Speed up uses of reserveCapacity on new vectors by adding a new reserveInitialCapacity https://bugs.webkit.org/show_bug.cgi?id=23676 * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::cssPropertyName): * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration): (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText): * css/CSSStyleDeclaration.cpp: (WebCore::CSSStyleDeclaration::copyPropertiesInSet): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::sortMatchedRules): * dom/Document.cpp: (WebCore::Document::formElementsState): * dom/NamedAttrMap.h: (WebCore::NamedAttrMap::reserveInitialCapacity): * editing/TextIterator.cpp: (WebCore::CharacterIterator::string): (WebCore::SearchBuffer::SearchBuffer): (WebCore::plainTextToMallocAllocatedBuffer): * editing/markup.cpp: (WebCore::joinMarkups): * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): * html/HTMLTokenizer.cpp: (WebCore::Token::addAttribute): * loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::items): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::toString): * page/mac/AccessibilityObjectWrapper.mm: (convertToVector): * platform/graphics/FontCache.cpp: (WebCore::FontCache::purgeInactiveFontData): (WebCore::FontCache::invalidate): * platform/network/FormData.cpp: (WebCore::FormData::deepCopy): * platform/network/HTTPHeaderMap.cpp: (WebCore::HTTPHeaderMap::copyData): * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::copyData): * platform/network/mac/FormDataStreamMac.mm: (WebCore::formCreate): * xml/XPathNodeSet.cpp: (WebCore::XPath::NodeSet::sort): Use reserveInitialCapacity instead of of reserveCapacity in all these call sites, which are working on new vectors that are guaranteed not to be empty. 2009-02-26 Jon Honeycutt Build fix after r40486. Rubber-stamped by Ada Chan. * dom/Document.h: Chnaged HitTestRequest to a class from a struct. * page/EventHandler.h: Ditto. * rendering/EllipsisBox.h: Ditto. * rendering/InlineBox.h: Ditto. * rendering/InlineFlowBox.h: Ditto. * rendering/RenderLayer.h: Ditto. 2009-02-02 Darin Adler Reviewed by Anders Carlsson. Bug 23694: REGRESSION: Running svg/custom tests crashes, randomly, depending on the order of tests https://bugs.webkit.org/show_bug.cgi?id=23694 * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertedIntoDocument): Added back the call through to EventTargetNode. (WebCore::ContainerNode::removedFromDocument): Ditto. * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::insertedIntoDocument): Changed this to not call through to Node. (WebCore::EventTargetNode::removedFromDocument): Ditto. * dom/Node.cpp: (WebCore::Node::insertedIntoDocument): Updated comment. (WebCore::Node::removedFromDocument): Ditto. 2009-02-02 Anders Carlsson Reviewed by Dan Bernstein. More plug-in cleanup. * WebCore.NPAPI.exp: Add new symbols. * bindings/objc/DOM.mm: * bindings/objc/DOMPrivate.h: Remove methods that WebKit doesn't use anymore. 2009-02-02 Jay Campan Reviewed by Eric Seidel. Clean up PopupMenuChromium a little. https://bugs.webkit.org/show_bug.cgi?id=23653 No functional changes, only code cleanup, thus no tests. * platform/chromium/PopupMenuChromium.cpp: (WebCore::): (WebCore::PopupListBox::PopupListBox): (WebCore::PopupContainer::create): (WebCore::PopupContainer::PopupContainer): (WebCore::PopupContainer::showPopup): (WebCore::PopupListBox::handleKeyEvent): (WebCore::PopupListBox::isSelectableItem): (WebCore::PopupListBox::selectNextRow): (WebCore::PopupListBox::selectPreviousRow): (WebCore::PopupMenu::show): * platform/chromium/PopupMenuChromium.h: 2009-02-02 Anders Carlsson Reviewed by Dan Bernstein. Change createPlugin to take a HTMLPlugInElement, and createJavaAppletWidget to take a HTMLAppletElement. * WebCore.xcodeproj/project.pbxproj: * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::createPlugin): (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget): * loader/FrameLoader.cpp: (WebCore::toPlugInElement): (WebCore::FrameLoader::loadPlugin): (WebCore::FrameLoader::loadItem): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: 2009-02-02 Genevieve Mak Reviewed by George Staikos. https://bugs.webkit.org/show_bug.cgi?id=23508 Returns Blank Page for all "about" protocols * loader/MainResourceLoader.cpp: Fix shouldLoadAsEmptyDocument() to return a blank page for an empty url or about:blank only (for now, exclusively for Torch Mobile platform). 2009-02-02 Brent Fulgham Reviewed by George Staikos. Fixes https://bugs.webkit.org/show_bug.cgi?id=23691. Correct build break caused by @r40366 by moving the common code implmentations from GraphicsContextCGWin.cpp into the base Windows class (GraphicsContextWin.cpp). Also move inTransparencyLayer since it is identical in both children. * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Added member m_shouldIncludeChildWindows to Windows version, similar to GraphicsContextPlatformPrivateCG.h. * platform/graphics/win/GraphicsContextCGWin.cpp: Remove the implementations of shouldIncludeChildWindows, setShouldIncludeChildWindows, and inTransparencyLayer. * platform/graphics/win/GraphicsContextCairoWin.cpp: Remove the implementation of inTransparencyLayer. * platform/graphics/win/GraphicsContextWin.cpp: Move common code from GraphicsContextCGWin.cpp and GraphicsContextCairoWin.cpp. (WebCore::GraphicsContext::inTransparencyLayer): (WebCore::GraphicsContext::setShouldIncludeChildWindows): (WebCore::GraphicsContext::shouldIncludeChildWindows): 2009-02-02 Darin Adler Try to fix Wx build, and maybe Chromium build too. * WebCore.scons: Added IdentifierRep.cpp. * WebCoreSources.bkl: Ditto. 2009-02-02 Darin Adler Try to fix Wx build. * html/HTMLAreaElement.cpp: Added missing include of "Path.h". 2009-02-02 Adam Treat Reviewed by Nikolas Zimmermann. https://bugs.webkit.org/show_bug.cgi?id=23587 Refactor HitTestRequest to eliminate all the ugly boolean arguments and use an enum bitflag instead. Cleanup all the code that constructs the various HitTestRequests to make the code more readable. * dom/Document.cpp: (WebCore::Document::elementFromPoint): (WebCore::Document::prepareMouseEvent): * editing/SelectionController.cpp: (WebCore::SelectionController::contains): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::visiblePositionForPoint): (WebCore::AccessibilityRenderObject::doAccessibilityHitTest): * page/EventHandler.cpp: (WebCore::EventHandler::eventMayStartDrag): (WebCore::EventHandler::updateSelectionForMouseDrag): (WebCore::EventHandler::hitTestResultAtPoint): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::handleMouseReleaseEvent): (WebCore::EventHandler::updateDragAndDrop): (WebCore::EventHandler::handleWheelEvent): (WebCore::EventHandler::sendContextMenuEvent): (WebCore::EventHandler::hoverTimerFired): (WebCore::EventHandler::handleDrag): * page/EventHandler.h: * rendering/HitTestRequest.h: (WebCore::HitTestRequest::): (WebCore::HitTestRequest::HitTestRequest): (WebCore::HitTestRequest::readOnly): (WebCore::HitTestRequest::active): (WebCore::HitTestRequest::mouseMove): (WebCore::HitTestRequest::mouseUp): (WebCore::HitTestRequest::ignoreClipping): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::nodeAtPoint): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::updateHoverActiveState): 2009-02-02 George Staikos Reviewed by Niko Zimmermann. Fix WML build by including the inlined renderStyle(). * wml/WMLOptGroupElement.cpp: * wml/WMLOptionElement.cpp: 2009-02-02 Darin Adler Reviewed by Niko Zimmermann. Bug 23686: REGRESSION (r40475): Failure in fast/xpath/4XPath/Core/test_core_functions.html https://bugs.webkit.org/show_bug.cgi?id=23686 rdar://problem/6547971 Also fix other XPath tests that are crashing. * xml/XPathFunctions.cpp: (WebCore::XPath::FunLang::evaluate): Fix order of arguments when creating QualifiedName. * xml/XPathStep.cpp: (WebCore::XPath::Step::nodesInAxis): Use createAttrIfNeeded() rather than attr() since we need to make Attr nodes here. Yuck! 2009-02-02 Yichao Yin Reviewed by Niko Zimmermann. Test: wml/input-format.html * wml/WMLInputElement.cpp: (WebCore::WMLInputElement::WMLInputElement): (WebCore::formatCodes): (WebCore::WMLInputElement::dispatchBlurEvent): (WebCore::WMLInputElement::parseMappedAttribute): (WebCore::WMLInputElement::attach): (WebCore::WMLInputElement::defaultEventHandler): (WebCore::WMLInputElement::init): (WebCore::WMLInputElement::validateInputMask): (WebCore::WMLInputElement::isConformedToInputMask): (WebCore::WMLInputElement::cursorPositionToMaskIndex): * wml/WMLInputElement.h: 2009-02-02 Brent Fulgham Build fix only, no review. Fixes https://bugs.webkit.org/show_bug.cgi?id=23685. Correct build break caused by @r40473. * page/win/FrameWin.cpp: Correct access for adjustPageHeight. (WebCore::computePageRectsForFrame): 2009-02-02 Nikolas Zimmermann Not reviewed. Fix WML enabled builds. FrameLoader::urlSelected() got a new parameter: lockBackForwardList. Pass 'false', as HTMLAnchorElement does. * wml/WMLAElement.cpp: (WebCore::WMLAElement::defaultEventHandler): 2009-02-02 Alexey Proskuryakov Reviewed by Darin Adler. Reloading a AppCache page doesn't ever hit the server Not easily testable. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::createResourceHandle): A new method that creates a resource handle in a manner that is closer to what CachedResource does. We now make conditional requests for better performance, and set max-age to ensure that stale responses are not used. (WebCore::ApplicationCacheGroup::update): Use the new createResourceHandle() method. (WebCore::ApplicationCacheGroup::didReceiveResponse): If the response code for the resource is 304, take it from the newest cache. (WebCore::ApplicationCacheGroup::didFail): Pre-compute request URL. (WebCore::ApplicationCacheGroup::didReceiveManifestResponse): Don't create a resource for the manifest if the response code was 304 - it won't be needed. (WebCore::ApplicationCacheGroup::didReceiveManifestData): Replaced an assertion that m_manifestResource is not null with a check. (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): Treat null m_manifestResource as an indication that the response was 304. (WebCore::ApplicationCacheGroup::startLoadingEntry): Use createResourceHandle(). * loader/appcache/ApplicationCacheGroup.h: Added createResourceHandle(). 2009-02-01 Darin Adler Reviewed by Dave Hyatt. Bug 23674: Speed up some things based on profiling the page load test https://bugs.webkit.org/show_bug.cgi?id=23674 * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): Use the newly named cssTarget instead of the old name, getCSSTarget. (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto. * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertedIntoDocument): Moved code from Node in here rather than calling through to EventTargetNode::insertedIntoDocument. (WebCore::ContainerNode::removedFromDocument): Ditto. (WebCore::ContainerNode::insertedIntoTree): Tweaked a bit. (WebCore::ContainerNode::removedFromTree): Ditto. * dom/ContainerNode.h: Moved the constructor definition here and made it inline. * dom/Document.cpp: (WebCore::Document::removeAllEventListenersFromAllNodes): Iterate the document element and its contents only to avoid the document type node. This allows us to remove the virtual function call to isEventTargetNode from the loop. (WebCore::Document::setCSSTarget): Changed argument to be an Element rather than Node. * dom/Document.h: Changed CSS target to be an Element rather than a Node. Renamed getCSSTarget to cssTarget. * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::removeAllEventListenersSlowCase): Renamed and turned the rare data check into an assertion. * dom/EventTargetNode.h: Made the fast case of removeAllEventListeners be inline. Also moved the constructor definition here and made it inline. And added toEventTargetNode, matching the design of the render tree checked casts. Later we can migrate all callers from EventTargetNodeCast to toEventTargetNode. * dom/NamedAttrMap.cpp: (WebCore::NamedAttrMap::detachAttributesFromElement): Added. Factored out from clearAttributes, so we could use this loop in cases where we're not clearing the attributes. (WebCore::NamedAttrMap::~NamedAttrMap): Call detachAttributesFromElement instead of clearAttributes here. (WebCore::NamedAttrMap::clearAttributes): Call detachAttributesFromElement here. (WebCore::NamedAttrMap::detachFromElement): Call detachAttributesFromElement instead of clearAttributes. We don't need to clear the attributes array just because the element is going away, so don't. (WebCore::NamedAttrMap::virtualLength): Added. * dom/NamedAttrMap.h: Made all the virtual functions inherited from NamedNodeMap be private. These are all unnecessarily inefficient for use outside the DOM. Changed length to be a non-virtual function. This was a fairly hot function. * dom/NamedMappedAttrMap.cpp: (WebCore::NamedMappedAttrMap::setClass): Changed to use element() function now that the m_element data member is private. * dom/NamedMappedAttrMap.h: Made a few functions private. Made the hasMappedAttributes function non-virtual. * dom/NamedNodeMap.h: Made length a non-virtual inline function that calls a virtual function, name virtualLength. This lets NamedAttrMap::length be a non-virtual function. * dom/Node.cpp: (WebCore::Node::insertedIntoDocument): Removed call to insertedIntoTree, since it's only non-empty in subclasses of ContainerNode. (WebCore::Node::removedFromDocument): Ditto. Also removed setCSSTarget. Since a CSS target has to be an Element, this can be moved down to ContainerNode (or it could be moved down to Element for that matter). * dom/QualifiedName.cpp: (WebCore::QualifiedName::QualifiedName): Removed double initialization of m_impl. * dom/QualifiedName.h: Moved the destructor, copy constructor, assignment operator, and setPrefix function definitions into the header and made them inline. * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::mapMouseEvent): Updated since the stored region is now an OwnPtr. (WebCore::HTMLAreaElement::accessKey): Use AtomicString. (WebCore::HTMLAreaElement::setAccessKey): Ditto. (WebCore::HTMLAreaElement::alt): Ditto. (WebCore::HTMLAreaElement::setAlt): Ditto. (WebCore::HTMLAreaElement::coords): Ditto. (WebCore::HTMLAreaElement::setCoords): Ditto. (WebCore::HTMLAreaElement::setHref): Ditto. (WebCore::HTMLAreaElement::shape): Ditto. (WebCore::HTMLAreaElement::setShape): Ditto. (WebCore::HTMLAreaElement::setTarget): Ditto. * html/HTMLAreaElement.h: Use AtomicString in the getter and setter DOM operations. Change the region data member to be an OwnPtr instead of a Path to optimize the common case where an area element is parsed but never hit-tested. This could also have been done by changing the Path class's null case to be more efficient, but this seems fine. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createContainingTable): Use addAttribute instead of insertAttribute. (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Ditto. (WebCore::HTMLViewSourceDocument::addLine): Ditto. (WebCore::HTMLViewSourceDocument::addLink): Ditto. * loader/FrameLoader.cpp: (WebCore::FrameLoader::gotoAnchor): Use cssTarget under its new name instead of its old name getCSSTarget. * platform/graphics/GlyphWidthMap.cpp: (WebCore::GlyphWidthMap::locatePageSlowCase): Refactored from locatePage. * platform/graphics/GlyphWidthMap.h: Made most of this class inline. Changed m_pages to use OwnPtr. * platform/text/PlatformString.h: Remove include no longer needed since StringImpl.h includes it. * platform/text/StringImpl.cpp: (WebCore::StringImpl::createStrippingNullCharactersSlowCase): Refactored from createStrippingNullCharacters. * platform/text/StringImpl.h: Moved the definition of createStrippingNullCharacters here and made it inline. * rendering/RenderObject.cpp: (WebCore::RenderObject::firstLineStyleSlowCase): Refactored from firstLineStyle. * rendering/RenderObject.h: Moved the definition of the firstLineStyle function here and made it inline. Moved the definition of the documentBeingDestroyed function here and made it inline. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::getCTM): Use getAttributeItem instead of getNamedItem here since it accomplishes the same thing but is more efficient. (WebCore::SVGSVGElement::getScreenCTM): Ditto. * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::getPresentationAttribute): Ditto. * xml/XPathFunctions.cpp: (WebCore::XPath::FunLang::evaluate): Use getAttributeItem instead of getNamedItemNS. * xml/XPathStep.cpp: (WebCore::XPath::Step::nodesInAxis): Use attributeItem instead of item here. 2009-02-02 Holger Hans Peter Freyther Reviewed by Darin Adler. Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView https://bugs.webkit.org/show_bug.cgi?id=23428 FrameView::forceLayout could be killed but the comment might contain a value over the the plain FrameView::layout... Adjust the WebCore/WebKit consumers of these methods. * WebCore.base.exp: * page/Frame.cpp: (WebCore::Frame::setPrinting): * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::forceLayout): (WebCore::FrameView::forceLayoutWithPageWidthRange): (WebCore::FrameView::adjustPageHeight): * page/FrameView.h: * page/PrintContext.cpp: (WebCore::PrintContext::computePageRects): 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-01-31 Dan Bernstein Reviewed by Oliver Hunt. - fix Eliminate some RenderText::width() overhead from findNextLineBreak() On the PLT, this results in 0.36x the number of virtual function calls to RenderText::width() and 0.69x the number of calls to Font::isFixedPitch(), but makes 1.0004x the number of calls to Font::width(). * rendering/RenderText.cpp: (WebCore::RenderText::width): Replaced bounds checks on 'from' and 'len' with an assertion. * rendering/bidi.cpp: (WebCore::textWidth): Added this inlined helper function which calls Font::width() directly in the non-fixed-pitch, non-full-range case, and otherwise calls RenderText::width(). (WebCore::RenderBlock::findNextLineBreak): Cache whether the font has fixed pitch (in which case RenderText::width() will be called in order to take advantage of the widthFromCache() optimization for fixed-pitch fonts). Replaced all calls to RenderText::width() with calls to the textWidth() helper function. 2009-01-31 David Hyatt Inline all of the setNeedsLayout method and its associated functions. Also inline setChildNeedsLayout and setNeedsPositionedMovementLayout. Reviewed by Dan Bernstein * rendering/RenderObject.cpp: (WebCore::RenderObject::setLayerNeedsFullRepaint): * rendering/RenderObject.h: (WebCore::RenderObject::setNeedsLayout): (WebCore::RenderObject::setChildNeedsLayout): (WebCore::RenderObject::setNeedsPositionedMovementLayout): (WebCore::objectIsRelayoutBoundary): (WebCore::RenderObject::markContainingBlocksForLayout): 2009-01-31 Darin Adler Fix Mac build. * loader/FrameLoader.cpp: Moved FrameLoaderClient::hasHTMLView in here. We need it to not be an inline. Sadly, FrameLoaderClient.cpp was prematurely deleted and I don't want to bring it back just to fix the build. * loader/FrameLoaderClient.h: Rearrange virtual functions and corrected a possibly-confusing comment. 2009-01-31 Adam Treat Reviewed by David Hyatt. https://bugs.webkit.org/show_bug.cgi?id=23664 Remove unused dead code from RenderTable class. The dead code includes two enums and the associated member variables as well as one getter function. * rendering/RenderTable.cpp: (WebCore::RenderTable::RenderTable): * rendering/RenderTable.h: 2009-01-31 David Hyatt More removal of code from RenderContainer. Move removeLeftoverAnonymousBlock down into RenderBlock. Move destroyLeftoverChildren into the RenderObjectChildList. Convert all containers to use the RenderObjectChildList. Reviewed by Sam Weinig * WebCore.xcodeproj/project.pbxproj: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::destroy): (WebCore::RenderBlock::addChild): (WebCore::RenderBlock::removeLeftoverAnonymousBlock): (WebCore::RenderBlock::layoutPositionedObjects): (WebCore::RenderBlock::childBecameNonInline): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::layout): * rendering/RenderBox.h: (WebCore::RenderBox::firstChildBox): (WebCore::RenderBox::lastChildBox): * rendering/RenderContainer.cpp: (WebCore::RenderContainer::addChild): (WebCore::RenderContainer::removeChildNode): (WebCore::RenderContainer::updateBeforeAfterContentForContainer): (WebCore::RenderContainer::appendChildNode): (WebCore::RenderContainer::insertChildNode): (WebCore::RenderContainer::positionForCoordinates): (WebCore::RenderContainer::addLineBoxRects): (WebCore::RenderContainer::collectAbsoluteLineBoxQuads): * rendering/RenderContainer.h: (WebCore::RenderContainer::virtualChildren): (WebCore::RenderContainer::children): * rendering/RenderInline.cpp: (WebCore::RenderInline::destroy): * rendering/RenderInline.h: (WebCore::RenderInline::layout): * rendering/RenderMedia.cpp: (WebCore::RenderMedia::destroy): (WebCore::RenderMedia::children): * rendering/RenderMedia.h: (WebCore::RenderMedia::virtualChildren): * rendering/RenderObject.cpp: (WebCore::RenderObject::destroy): (WebCore::RenderObject::layout): * rendering/RenderObject.h: (WebCore::RenderObject::firstChild): (WebCore::RenderObject::lastChild): (WebCore::RenderObject::virtualChildren): (WebCore::RenderObject::canHaveChildren): * rendering/RenderObjectChildList.cpp: Added. (WebCore::RenderObjectChildList::destroyLeftoverChildren): * rendering/RenderObjectChildList.h: * rendering/RenderReplaced.h: (WebCore::RenderReplaced::canHaveChildren): * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::RenderSVGContainer): (WebCore::RenderSVGContainer::destroy): (WebCore::RenderSVGContainer::removeChildNode): (WebCore::RenderSVGContainer::appendChildNode): (WebCore::RenderSVGContainer::insertChildNode): * rendering/RenderSVGContainer.h: (WebCore::RenderSVGContainer::virtualChildren): (WebCore::RenderSVGContainer::children): 2009-01-31 David Hyatt Fix for https://bugs.webkit.org/show_bug.cgi?id=11363 Remove the hacks in table code around the DeleteButtonController and fix tables so that positioned children don't get wrapped in anonymous objects. With the removal of a non-positioned DeleteButtonController renderer, table layout can be tightened up to only lay out table sections. Table section layout is tightened up to ignore non-table rows. When a table has multiple captions, only the real one will do a layout now. The other ones will be properly ignored. Reviewed by Oliver Hunt * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::createDeletionUI): * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): (WebCore::RenderTable::layout): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layout): * rendering/RenderTableSection.h: 2009-01-31 Adam Treat Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=23663 Add a void toRenderBox() method which catches unnecessary casts at compile time and also fix the four cases where this was happening. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::determineHorizontalPosition): * rendering/RenderBox.h: * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBox): * rendering/RenderInline.cpp: (WebCore::RenderInline::updateHitTestResult): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): 2009-01-30 Adam Barth Reviewed by Sam Weinig. Add a pref to disable web security. * WebCore.base.exp: * dom/Document.cpp: (WebCore::Document::initSecurityContext): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::SecurityOrigin): (WebCore::SecurityOrigin::canAccess): (WebCore::SecurityOrigin::canRequest): (WebCore::SecurityOrigin::grantUniversalAccess): * page/SecurityOrigin.h: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setWebSecurityEnabled): * page/Settings.h: (WebCore::Settings::isWebSecurityEnabled): 2009-01-30 Holger Hans Peter Freyther Build fix. Move the inline virtual destructor after a non-inline virtual function so that the symbol for the vtable is not marked as a weakly exported symbol. This trick was previously used at revision 36122 in JSObject.h * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::~FrameLoaderClient): 2009-01-30 Oliver Hunt Reviewed by Stephanie Lewis Inline SimpleFontData::widthForGlyph for a minor page load improvement. * platform/graphics/SimpleFontData.cpp: * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::widthForGlyph): 2009-01-30 Holger Hans Peter Freyther Build fix for WX and maybe even Windows. * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: 2009-01-30 Holger Hans Peter Freyther Reviewed by Darin Adler. Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler Carry out the move and catch up in two call sites. * WebCore.base.exp: * page/EventHandler.cpp: (WebCore::EventHandler::sendResizeEvent): (WebCore::EventHandler::sendScrollEvent): * page/EventHandler.h: * page/Frame.cpp: * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): (WebCore::FrameView::valueChanged): 2009-01-30 Holger Hans Peter Freyther Reviewed by Darin Adler. Move Frame::isFrameSet to Document::isFrameSet Changed the FrameLoader callsite. I assume that as this point m_frame.document() might return a null pointer. Change the condition to either not having a document or not having a frame set. This should be semantically equivalent to the old code. Make Document::body() const to be able to call it from within Document::isFrameSet. Leave the isHTMLDocument() check as this is a stronger condition than simply having a HTMLElement in the DOM. * WebCore.base.exp: * dom/Document.cpp: (WebCore::Document::isFrameSet): (WebCore::Document::body): * dom/Document.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::shouldScrollToAnchor): * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::createFromSelection): * page/Frame.cpp: * page/Frame.h: 2009-01-30 Aurelian Maga Reviewed by Holger Freyther. [GTK] Logic fixes and build fixes https://bugs.webkit.org/show_bug.cgi?id=22022 Catch up with the internal GeoLocation API and fix the logic of the previous version. * platform/gtk/GeolocationServiceGtk.cpp: (WebCore::GeolocationServiceGtk::startUpdating): (WebCore::GeolocationServiceGtk::updateLocationInformation): (WebCore::GeolocationServiceGtk::position_changed): 2009-01-30 Holger Hans Peter Freyther Reviewed by Nikolas Zimmermann. [GTK] Implement GeolocationService using the Geoclue library https://bugs.webkit.org/show_bug.cgi?id=22022 Untested implementation of the GeolocationService using the geoclue library. Velocity handling is completely missing and the accuracy handling might be wrong. * platform/gtk/GeolocationServiceGtk.cpp: (WTF::GeoclueAccuracy): (WebCore::GeolocationServiceGtk::GeolocationServiceGtk): (WebCore::GeolocationServiceGtk::~GeolocationServiceGtk): (WebCore::GeolocationServiceGtk::startUpdating): (WebCore::GeolocationServiceGtk::stopUpdating): (WebCore::GeolocationServiceGtk::suspend): (WebCore::GeolocationServiceGtk::resume): (WebCore::GeolocationServiceGtk::lastPosition): (WebCore::GeolocationServiceGtk::lastError): (WebCore::GeolocationServiceGtk::updateLocationInformation): (WebCore::GeolocationServiceGtk::updatePosition): (WebCore::GeolocationServiceGtk::position_changed): (WebCore::GeolocationServiceGtk::setError): * platform/gtk/GeolocationServiceGtk.h: 2009-01-30 Mark Rowe Build fix. Declare preferredSize as static. * platform/text/cf/StringImplCF.cpp: (WebCore::StringWrapperCFAllocator::preferredSize): 2009-01-30 Darin Adler Reviewed by Mark Rowe. Bug 23622: create CFString and NSString objects from WebCore::String without copying the characters https://bugs.webkit.org/show_bug.cgi?id=23622 * platform/text/cf/StringImplCF.cpp: (WebCore::StringWrapperCFAllocator::allocator): Added. Returns the allocator. (WebCore::StringWrapperCFAllocator::retain): Added. Callback for allocator. (WebCore::StringWrapperCFAllocator::release): Ditto. (WebCore::StringWrapperCFAllocator::copyDescription): Ditto. (WebCore::StringWrapperCFAllocator::allocate): Ditto. (WebCore::StringWrapperCFAllocator::reallocate): Ditto. (WebCore::StringWrapperCFAllocator::deallocate): Ditto. (WebCore::StringWrapperCFAllocator::preferredSize): Ditto. (WebCore::StringWrapperCFAllocator::create): Added. Creates the allocator, but returns 0 if garbage collection is enabled. (WebCore::StringImpl::createCFString): Use StringWrapperCFAllocator if possible. * platform/text/mac/StringImplMac.mm: (WebCore::StringImpl::operator NSString *): Use CFString and toll-free bridging, rather than using NSString directly. This lets NSString benefit from the above. 2009-01-30 Darin Adler * page/Frame.cpp: (WebCore::Frame::createView): Fix debug build by removing get() from assert. 2009-01-30 Holger Hans Peter Freyther Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=22056 Kill FrameLoaderClient.cpp, move the code over to Frame::createView FrameLoaderClient is supposed to be an interface, move the to be shared code to Frame which is a controller and is allowed to create a FrameView. * GNUmakefile.am: * WebCore.base.exp: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * loader/FrameLoaderClient.cpp: Removed. * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::~FrameLoaderClient): * page/Frame.cpp: (WebCore::Frame::createView): * page/Frame.h: 2009-01-30 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=23357 New files to support accelerated compositing at the RenderLayer level. * WebCore.xcodeproj/project.pbxproj: New files added to project, and run through the sort script. * rendering/RenderLayerBacking.cpp: Added. * rendering/RenderLayerBacking.h: Added. New object to store compositing-related data for a single RenderLayer. * rendering/RenderLayerCompositor.cpp: Added. * rendering/RenderLayerCompositor.h: Added. Per-RenderView controller object for compositing hierarchy maintenance. 2009-01-30 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=23356 Add new files related to accelerated compositing: * WebCore.xcodeproj/project.pbxproj: Add the files to the project. Also add ColorCG.cpp, for the Color(CGColorRef) constructor. * platform/graphics/GraphicsLayer.cpp: Added. * platform/graphics/GraphicsLayer.h: Added. GraphicsLayer is a platform abstraction for a hardware-backed layer. * platform/graphics/GraphicsLayerClient.h: Added. Client of GraphicsLayer, allowing GraphicsLayer to call out to WebCore code. * platform/graphics/mac/GraphicsLayerCA.h: Added. * platform/graphics/mac/GraphicsLayerCA.mm: Added. Mac Core Animation implementation of GraphicsLayer. * platform/graphics/mac/WebLayer.h: Added. * platform/graphics/mac/WebLayer.mm: Added. * platform/graphics/mac/WebTiledLayer.h: Added. * platform/graphics/mac/WebTiledLayer.mm: Added. Subclasses of CALayer and CATiledLayer -- helpers for the GraphicsLayerCA implementation. 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-01-30 Sam Weinig Reviewed by Dan Bernstein. Fix for ASSERTION FAILED: RenderBlock.h:519: !o || o->isRenderBlock() Test: fast/block/float/crash-replaced-display-block.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChildren): Move RenderBlock only code into isRenderBlock if-statement. 2009-01-30 Chris Fleizach Reviewed by Oliver Hunt. Bug 23656: AX hierarchy for iFrames is incorrect https://bugs.webkit.org/show_bug.cgi?id=23656 The AX hierarchy when an iFrame was present was incorrect. A different scroll area was returned when going down compared to when going up. * page/mac/AccessibilityObjectWrapper.mm: (convertToNSArray): 2009-01-30 Adam Treat Fix Qt build to include new class IdentifierRep introduced in revision 40412. * WebCore.pro: 2009-01-30 Anders Carlsson Reviewed by Sam Weinig. Make IdentifierRep.h a private header, and add symbols needed by WebKit to WebCore.LP64.exp. * WebCore.LP64.exp: * WebCore.xcodeproj/project.pbxproj: 2009-01-30 Sam Weinig Commit files I forgot to in the previous commit. * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::layoutCount): * page/Frame.cpp: (WebCore::Frame::contentRenderer): (WebCore::Frame::forceLayoutWithPageWidthRange): * page/FrameView.cpp: (WebCore::FrameView::layout): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintUsingContainer): (WebCore::RenderObject::repaint): (WebCore::RenderObject::repaintRectangle): (WebCore::RenderObject::view): (WebCore::RenderObject::scheduleRelayout): (WebCore::RenderObject::maximalOutlineSize): * rendering/SVGRenderSupport.cpp: (WebCore::clampImageBufferSizeToViewport): * svg/SVGLength.cpp: (WebCore::SVGLength::PercentageOfViewport): 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-01-30 Holger Hans Peter Freyther Reviewed by Mark Rowe. [Gtk+] Use AccessibilityObject::stringValue for the AtkObject name https://bugs.webkit.org/show_bug.cgi?id=21546 The API documentation at http://library.gnome.org/devel/atk/stable/AtkText.html states that: "AtkObjects whose text content is simple, unattributed, and very brief may expose that content via atk_object_get_name instead" As we are currently not able to always provide a AtkTextInterface implementation this will make the whole content available to accerciser, and other tools. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-01-30 Holger Hans Peter Freyther Unreviewed build fix. Include string.h for strdup. * bridge/IdentifierRep.h: 2009-01-30 Sam Weinig Reviewed by Dan Bernstein. Add toRenderView methods for casting RenderObjects to RenderViews. The methods will assert if the object is not a RenderView. * dom/Document.cpp: (WebCore::Document::renderView): * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved): (WebCore::SelectionController::recomputeCaretRect): (WebCore::SelectionController::invalidateCaretRect): (WebCore::SelectionController::focusedOrActiveStateChanged): * editing/mac/SelectionControllerMac.mm: (WebCore::SelectionController::notifyAccessibilityForSelectionChange): * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): (WebCore::RenderBox::repaintLayerRectsForImage): (WebCore::RenderBox::availableHeightUsing): * rendering/RenderView.h: (WebCore::toRenderView): 2009-01-30 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=23360 Really use the container-relative repaint rect methods for repaint during layout * rendering/RenderObject.h: (WebCore::RenderObject::LayoutRepainter::LayoutRepainter): 2009-01-30 Anders Carlsson Reviewed by Darin Adler. Get rid of PrivateIdentifier and use IdentifierRep instead. * bridge/NP_jsobject.cpp: (_NPN_Invoke): (_NPN_GetProperty): (_NPN_SetProperty): (_NPN_RemoveProperty): (_NPN_HasProperty): (_NPN_HasMethod): * bridge/c/c_instance.cpp: (JSC::Bindings::CInstance::getPropertyNames): * bridge/c/c_utility.cpp: (JSC::Bindings::convertNPStringToUTF16): * bridge/c/c_utility.h: * bridge/npruntime.cpp: (_NPN_GetStringIdentifier): (_NPN_GetStringIdentifiers): (_NPN_GetIntIdentifier): (_NPN_IdentifierIsString): (_NPN_UTF8FromIdentifier): (_NPN_IntFromIdentifier): 2009-01-30 Anders Carlsson Reviewed by Sam Weinig and Darin Adler. Make IdentifierRep a real class, add necessary class methods. * bridge/IdentifierRep.cpp: (WebCore::identifierSet): Returns a set of all identifiers. (WebCore::IdentifierRep::isValid): Return whether an identifier is valid, meaning that it's present in the set of identifiers. * bridge/IdentifierRep.h: (WebCore::IdentifierRep::isString): (WebCore::IdentifierRep::number): (WebCore::IdentifierRep::string): (WebCore::IdentifierRep::IdentifierRep): (WebCore::IdentifierRep::): 2009-01-30 Anders Carlsson Reviewed by Sam Weinig. Add IdentifierRep which will be used by both plug-in implementations. * GNUmakefile.am: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bridge/IdentifierRep.cpp: Added. (WebCore::IdentifierRep::IdentifierRep): (WebCore::IdentifierRep::): (WebCore::intIdentifierMap): (WebCore::identifierRep): (WebCore::stringIdentifierMap): * bridge/IdentifierRep.h: Added. * bridge/c/c_utility.h: * platform/text/PlatformString.h: * platform/text/String.cpp: (WebCore::String::fromUTF8WithLatin1Fallback): 2009-01-30 Sam Weinig Reviewed by David Hyatt. Add toRenderInline methods for casting RenderObjects to RenderInlines. The methods will assert if the object is not a RenderInline. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::removeLineBoxFromRenderObject): (WebCore::InlineFlowBox::extractLineBoxFromRenderObject): (WebCore::InlineFlowBox::attachLineBoxToRenderObject): (WebCore::InlineFlowBox::rendererLineBoxes): (WebCore::InlineFlowBox::determineSpacingForFlowBoxes): (WebCore::InlineFlowBox::paint): * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::addFocusRingRects): * rendering/RenderBox.cpp: (WebCore::RenderBox::offsetFromContainer): (WebCore::RenderBox::computeRectForRepaint): (WebCore::RenderBox::containingBlockWidthForPositioned): (WebCore::RenderBox::containingBlockHeightForPositioned): (WebCore::RenderBox::calcAbsoluteHorizontalValues): (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): * rendering/RenderContainer.cpp: (WebCore::RenderContainer::updateBeforeAfterContentForContainer): * rendering/RenderInline.cpp: (WebCore::RenderInline::inlineContinuation): (WebCore::nextContinuation): (WebCore::RenderInline::splitInlines): * rendering/RenderInline.h: (WebCore::toRenderInline): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): (WebCore::RenderLayer::boundingBox): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): * rendering/RenderText.h: * rendering/RenderTreeAsText.cpp: (WebCore::operator<<): * rendering/bidi.cpp: (WebCore::RenderBlock::createLineBoxes): (WebCore::RenderBlock::layoutInlineChildren): 2009-01-30 Darin Fisher Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=23647 Fix PLATFORM(SKIA)'s ImageSource::clear method to match other ports * platform/graphics/skia/ImageSourceSkia.cpp: (WebCore::ImageSource::clear): 2009-01-30 David Hyatt Add toRenderBlock methods for casting RenderObjects to RenderBlocks. The methods will assert if the object is not a RenderBlock. Also add a toRenderBlock method that takes a RenderBlock but returns void and that is unimplemented. This method will catch anyone trying to do a cast when the object is already a RenderBlock. Making this change caught a bad cast in RenderBlock::layoutBlockChildren, so that is also fixed by this patch with a containsFloats() check. Reviewed by Darin Adler * dom/PositionIterator.cpp: (WebCore::PositionIterator::isCandidate): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): * editing/Editor.cpp: (WebCore::Editor::hasBidiSelection): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::anchorElement): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleWillChange): (WebCore::RenderBlock::removeChild): (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::clearFloatsIfNeeded): (WebCore::RenderBlock::layoutBlockChildren): (WebCore::RenderBlock::fillBlockSelectionGaps): (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout): (WebCore::RenderBlock::firstLineBlock): (WebCore::getLineAtIndex): (WebCore::getHeightForLineCount): (WebCore::RenderBlock::lineCount): (WebCore::RenderBlock::adjustForBorderFit): (WebCore::RenderBlock::clearTruncation): * rendering/RenderBlock.h: (WebCore::toRenderBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::offsetFromContainer): (WebCore::RenderBox::computeRectForRepaint): (WebCore::RenderBox::calcReplacedHeightUsing): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBox): (WebCore::RenderFlexibleBox::layoutVerticalBox): * rendering/RenderInline.cpp: (WebCore::RenderInline::inlineContinuation): (WebCore::nextContinuation): (WebCore::RenderInline::positionForCoordinates): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollInfoAfterLayout): * rendering/RenderListItem.cpp: (WebCore::getParentOfFirstLineBox): (WebCore::RenderListItem::positionListMarker): * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): (WebCore::RenderObject::computeRectForRepaint): (WebCore::RenderObject::removeFromObjectLists): (WebCore::RenderObject::getTextDecorationColors): * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): (WebCore::RenderTable::recalcSections): * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::styleDidChange): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::block): * rendering/bidi.cpp: (WebCore::RenderBlock::createLineBoxes): 2009-01-30 Brady Eidson Reviewed by Sam Weinig - Let CachedFrame handle the suspending/resuming of active DOM objects itself instead of relying on some outside force. - Clear the previous history item inside FrameLoader instead of relying on multiple FrameLoaderClients to do it. * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Suspend active DOM objects here. (WebCore::CachedFrame::restore): Resume those DOM objects here. * history/CachedFrame.h: (WebCore::CachedFrame::domWindow): * loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): Let CachedFrame creation handle the suspending of active DOM objects. (WebCore::FrameLoader::open): Let CachedFrame::restore() handle resuming those DOM objects. (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Call frameLoadCompleted() instead of performing a client call by itself. (WebCore::FrameLoader::frameLoadCompleted): 2009-01-30 Alexey Proskuryakov Reviewed by Darin Adler. Application Cache is kept after a private browsing session * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::selectCache): (WebCore::ApplicationCacheGroup::update): Cache update will not be started if private browsing is enabled. Existing cache version from disk database will be used. * loader/appcache/ApplicationCacheGroup.h: Made postListenerTask() static, in order to call it when refusing to update from selectCache(). * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::addDynamicEntry): (WebCore::ApplicationCache::removeDynamicEntry): Added reminders about private browsing to unimplemented methods. 2009-01-30 Laszlo Gombos Reviewed by Simon Hausmann. Bug 23580: GNU mode RVCT compilation support * html/PreloadScanner.cpp: Use COMPILER(GCC) instead of __GNUC__. 2009-01-30 David Levin Reviewed by Alexey Proskuryakov. Bug 23616: Various "template helpers" should be consolidated from isolated files in JavaScriptCore. Added forwarding header. * ForwardingHeaders/wtf/TypeTraits.h: Added. 2009-01-30 David Levin Reviewed by Alexey Proskuryakov. Bug 23599: ResourceError needs to be copyable for use in another thread. Add ResourceErrorBase::copy method. (Not yet used.) * platform/network/ResourceErrorBase.cpp: (WebCore::ResourceErrorBase::copy): * platform/network/ResourceErrorBase.h: 2009-01-29 Stephanie Lewis RS by Oliver Hunt. Update the order files. * WebCore.order: 2009-01-29 Dmitry Titov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=23488 Make TimerBase thread-aware (for Workers). Added new class ThreadTimers - it keeps a heap of all timers for a thread (previously kept in a static global). Pointer to instance of ThreadTimers is stored in GlobalThreadData. Most static methods of TimerBase went to ThreadTimers. The TimerBase functionality did not change (it maintains the timer heap which computes the nearest firing). Added new abstract class SharedTimer, so worker threads can provide their own implementation (will be implemented on WorkerRunLoop). * GNUmakefile.am: * WebCore.pro: * WebCore.scons: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: Added new ThreadTimers.cpp to build files. * platform/SharedTimer.h: (WebCore::SharedTimer::~SharedTimer): (WebCore::MainThreadSharedTimer::setFiredFunction): (WebCore::MainThreadSharedTimer::setFireTime): (WebCore::MainThreadSharedTimer::stop): Added abstract SharedTimer and MainThreadSharedTimer which redirects to the existing port-supplied functions. * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): (WebCore::ThreadGlobalData::~ThreadGlobalData): * platform/ThreadGlobalData.h: (WebCore::ThreadGlobalData::threadTimers): Added ThreadTimers to ThreadGlobalData. * platform/ThreadTimers.cpp: Added. (WebCore::mainThreadSharedTimer): Static getter for a MainThreadSharedTimer singleton. (WebCore::ThreadTimers::ThreadTimers): (WebCore::ThreadTimers::setSharedTimer): (WebCore::ThreadTimers::updateSharedTimer): (WebCore::ThreadTimers::collectFiringTimers): (WebCore::ThreadTimers::fireTimers): (WebCore::ThreadTimers::sharedTimerFired): (WebCore::ThreadTimers::sharedTimerFiredInternal): (WebCore::ThreadTimers::fireTimersInNestedEventLoop): ThreadTimers implementation. Most of the code is moved from previous static functions on TimerBase. Need a new class so each thread may get ts own copy of the timer heap. * platform/ThreadTimers.h: Added. (WebCore::ThreadTimers::timerHeap): (WebCore::ThreadTimers::timersReadyToFire): * platform/Timer.cpp: (WebCore::timerHeap): (WebCore::timersReadyToFire): (WebCore::TimerHeapElement::TimerHeapElement): (WebCore::TimerHeapElement::checkConsistency): (WebCore::TimerHeapElement::operator=): (WebCore::TimerHeapIterator::checkConsistency): (WebCore::TimerBase::TimerBase): (WebCore::TimerBase::~TimerBase): (WebCore::TimerBase::isActive): (WebCore::TimerBase::checkHeapIndex): (WebCore::TimerBase::heapDelete): (WebCore::TimerBase::heapDeleteMin): (WebCore::TimerBase::heapInsert): (WebCore::TimerBase::heapPopMin): (WebCore::TimerBase::setNextFireTime): (WebCore::TimerBase::fireTimersInNestedEventLoop): Now instead of static timer heap these use accessor functions that pull thread-specific heap instance. * platform/Timer.h: static methods moved to ThreadTimers. 2009-01-29 David Hyatt Beginning of work to eliminate RenderContainer and make containership "pluggable" into any spot in the render tree. The first step is to create the new object that will handle children: RenderObjectChildList and move RenderContainer's member variables into it. Subsequent patches will begin moving RenderContainer's functionality into RenderObjectChildList. Reviewed by Eric Seidel * WebCore.xcodeproj/project.pbxproj: * rendering/RenderContainer.cpp: (WebCore::RenderContainer::RenderContainer): (WebCore::RenderContainer::destroyLeftoverChildren): (WebCore::RenderContainer::addChild): (WebCore::RenderContainer::removeChildNode): (WebCore::RenderContainer::updateBeforeAfterContentForContainer): (WebCore::RenderContainer::appendChildNode): (WebCore::RenderContainer::insertChildNode): (WebCore::RenderContainer::layout): (WebCore::RenderContainer::removeLeftoverAnonymousBlock): (WebCore::RenderContainer::positionForCoordinates): (WebCore::RenderContainer::addLineBoxRects): (WebCore::RenderContainer::collectAbsoluteLineBoxQuads): * rendering/RenderContainer.h: (WebCore::RenderContainer::firstChild): (WebCore::RenderContainer::lastChild): (WebCore::RenderContainer::firstChildBox): (WebCore::RenderContainer::lastChildBox): * rendering/RenderObjectChildList.h: Added. (WebCore::RenderObjectChildList::RenderObjectChildList): (WebCore::RenderObjectChildList::firstChild): (WebCore::RenderObjectChildList::lastChild): (WebCore::RenderObjectChildList::setFirstChild): (WebCore::RenderObjectChildList::setLastChild): 2009-01-29 Jungshik Shin Reviewed by Alexey Proskuryakov. http://bugs.webkit.org/show_bug.cgi?id=23598 Replace smart-quotes in UTF-8 with ASCII double-quotes to avoid the compilation error on CJK Windows * wml/WMLTableElement.cpp: (WebCore::WMLTableElement::parseMappedAttribute): 2009-01-29 Darin Fisher Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=23627 Fix the PLATFORM(SKIA) build. * svg/graphics/SVGPaintServer.cpp: (WebCore::SVGPaintServer::teardown): 2009-01-29 Scott Violet Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=23625 Skia platform doesn't render text to a canvas or support clipping to an image buffer Fixes two bugs in Skia rendering to a canvas: . Text was not rendered at all. This is because we never properly fixed up the alpha values. The fix is to create a layer when rendering text to a layer. . We were not honoring clipping to an image buffer. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clipToImageBuffer): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): * platform/graphics/skia/PlatformContextSkia.cpp: (PlatformContextSkia::PlatformContextSkia): (PlatformContextSkia::setDrawingToImageBuffer): (PlatformContextSkia::isDrawingToImageBuffer): (PlatformContextSkia::beginLayerClippedToImage): (PlatformContextSkia::restore): (PlatformContextSkia::applyClipFromImage): * platform/graphics/skia/PlatformContextSkia.h: 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-01-29 Dirk Schulze Reviewed by Nikolas Zimmermann, Eric Seidel. Just transform the pattern directly instead of transforming the context fixes this problem. Texts or strokes are no longer affected by transformations. SVG pattern transformation/BoundingBox can cause ugly stroke thickness or text positions https://bugs.webkit.org/show_bug.cgi?id=23472 Test: svg/custom/pattern-with-transformation.svg * platform/graphics/Pattern.h: (WebCore::Pattern::setPatternSpaceTransform): * platform/graphics/cairo/PatternCairo.cpp: (WebCore::Pattern::createPlatformPattern): * platform/graphics/cg/PatternCG.cpp: (WebCore::Pattern::createPlatformPattern): * platform/graphics/qt/PatternQt.cpp: (WebCore::Pattern::createPlatformPattern): * svg/graphics/SVGPaintServerPattern.cpp: (WebCore::SVGPaintServerPattern::setup): 2009-01-29 David Hyatt Move the line box list member out of RenderFlow and down into RenderBlock and RenderInline. Eliminate RenderFlow from the tree. Reviewed by Sam Weinig * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * html/HTMLAnchorElement.cpp: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::rendererLineBoxes): (WebCore::InlineFlowBox::determineSpacingForFlowBoxes): * rendering/InlineFlowBox.h: * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::RenderBlock): (WebCore::RenderBlock::destroy): (WebCore::RenderBlock::styleWillChange): (WebCore::RenderBlock::styleDidChange): (WebCore::RenderBlock::dirtyLineBoxes): (WebCore::RenderBlock::removeChild): (WebCore::RenderBlock::setSelectionState): (WebCore::RenderBlock::avoidsFloats): (WebCore::RenderBlock::positionForCoordinates): (WebCore::RenderBlock::calcInlinePrefWidths): (WebCore::RenderBlock::baselinePosition): (WebCore::RenderBlock::getBaselineOfFirstLineBox): (WebCore::RenderBlock::getBaselineOfLastLineBox): (WebCore::RenderBlock::rectWithOutlineForRepaint): (WebCore::RenderBlock::hoverAncestor): (WebCore::RenderBlock::updateDragState): * rendering/RenderBlock.h: (WebCore::RenderBlock::lineBoxes): (WebCore::RenderBlock::firstLineBox): (WebCore::RenderBlock::lastLineBox): * rendering/RenderBox.cpp: (WebCore::RenderBox::offsetFromContainer): (WebCore::RenderBox::computeRectForRepaint): (WebCore::RenderBox::containingBlockWidthForPositioned): (WebCore::RenderBox::calcAbsoluteHorizontalValues): (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): * rendering/RenderBox.h: * rendering/RenderFlow.cpp: Removed. * rendering/RenderFlow.h: Removed. * rendering/RenderInline.cpp: (WebCore::RenderInline::RenderInline): (WebCore::RenderInline::destroy): (WebCore::RenderInline::styleDidChange): (WebCore::RenderInline::addChildIgnoringContinuation): (WebCore::RenderInline::cloneInline): (WebCore::RenderInline::splitInlines): (WebCore::RenderInline::offsetLeft): (WebCore::RenderInline::offsetTop): (WebCore::RenderInline::positionForCoordinates): (WebCore::RenderInline::rectWithOutlineForRepaint): (WebCore::RenderInline::updateDragState): (WebCore::RenderInline::relativePositionedInlineOffset): * rendering/RenderInline.h: (WebCore::RenderInline::lineBoxes): (WebCore::RenderInline::firstLineBox): (WebCore::RenderInline::lastLineBox): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPosition): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::rendererLineBoxes): * rendering/RootInlineBox.h: * rendering/bidi.cpp: (WebCore::RenderBlock::createLineBoxes): * wml/WMLAElement.cpp: 2009-01-29 Geoffrey Garen Reviewed by Oliver Hunt. Cleaned up some naming in ScheduledRedirection. * loader/FrameLoader.cpp: (WebCore::ScheduledRedirection::ScheduledRedirection): 2009-01-29 Anders Carlsson Reviewed by Dan Bernstein. Update to use new API. * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): 2009-01-29 Alexey Proskuryakov Reviewed by Nikolas Zimmermann. https://bugs.webkit.org/show_bug.cgi?id=23619 ASSERT(!error.isNull()) in DocumentLoader::mainReceivedError() when an SVG image load is cancelled Covered by existing tests (as a random crash). * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::cancelledError): (WebCore::EmptyFrameLoaderClient::blockedError): (WebCore::EmptyFrameLoaderClient::cannotShowURLError): (WebCore::EmptyFrameLoaderClient::interruptForPolicyChangeError): (WebCore::EmptyFrameLoaderClient::cannotShowMIMETypeError): (WebCore::EmptyFrameLoaderClient::fileDoesNotExistError): (WebCore::EmptyFrameLoaderClient::pluginWillHandleLoadError): Create non-null errors. 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-01-29 David Hyatt Move all of the contination insertion code from RenderFlow to RenderInline. addChildToFlow is renamed to addChildIgnoringContinuation, and it has been moved to RenderContainer so that it can still be called on either blocks or inlines. The base class implementation in RenderContainer is what RenderBlock uses. RenderInline subclasses it to do all the work it used to do in addChildToFlow. RenderBlock's old addChildToFlow can just become addChild. This simplification is possible because addChild was actually never being called on anonymous block continuations. The code dealing with anonymous table parts in the old addChildWithContinuation method can now be removed as a result with no harmful side effects. Falling through to the base class and ignoring a block continuation makes the right thing happen. addChildWithContinuation moved to RenderInline and has been renamed to addChildToContinuation. Reviewed by Eric Seidel * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChild): * rendering/RenderBlock.h: * rendering/RenderContainer.h: (WebCore::RenderContainer::addChildIgnoringContinuation): * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::styleDidChange): (WebCore::RenderInline::addChild): (WebCore::nextContinuation): (WebCore::RenderInline::continuationBefore): (WebCore::RenderInline::addChildIgnoringContinuation): (WebCore::RenderInline::splitInlines): (WebCore::RenderInline::splitFlow): (WebCore::RenderInline::addChildToContinuation): (WebCore::RenderInline::childBecameNonInline): * rendering/RenderInline.h: (WebCore::RenderInline::continuation): (WebCore::RenderInline::setContinuation): 2009-01-29 Brady Eidson Reviewed by Oliver Hunt hyundaiusa.com closes window or tab during load Test: fast/loader/subframe-self-close.html * page/DOMWindow.cpp: (WebCore::DOMWindow::close): Only allow mainframes to close the window. 2009-01-29 Nikolas Zimmermann Reviewed by David Hyatt. Fixes: https://bugs.webkit.org/show_bug.cgi?id=23539 Remove several virtual functions from Node & Element related to form control / input elements, that shouldn't reside there, but move to approriate locations, in the new form control / input element abstract base classes. Remove the isControl() method from Node, as it's redundant - isFormControlElement() provides the same information. Move isEnabled( / isReadOnlyControl() / isTextControl() from Node to FormControlElement. Move isAutofilled() / isChecked() / isIndeterminate() from Node to InputElement. Move isInputTypeHidden() / isPasswordField() from Element to InputElement. Querying these methods requires using the toInputElement/toFormControlElement casting helper functions to cast Element pointers to InputElement/FormControlElement pointers. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::adjustRenderStyle): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * dom/Element.h: (WebCore::Element::isFormControlElementWithState): * dom/FormControlElement.h: * dom/InputElement.h: * dom/Node.h: * editing/TextIterator.cpp: (WebCore::TextIterator::advance): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::attach): * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::isTextControl): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::CheckedRadioButtons::removeButton): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isAutofilled): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isPasswordField): (WebCore::AccessibilityRenderObject::isIndeterminate): (WebCore::AccessibilityRenderObject::isChecked): (WebCore::AccessibilityRenderObject::isControl): (WebCore::AccessibilityRenderObject::isEnabled): (WebCore::AccessibilityRenderObject::canSetFocusAttribute): * page/mac/AccessibilityObjectWrapper.mm: (textMarkerForVisiblePosition): * platform/ContextMenu.cpp: (WebCore::ContextMenu::populate): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemIsEnabled): * rendering/RenderTextControl.cpp: (WebCore::updateUserModifyProperty): (WebCore::RenderTextControl::adjustInnerTextStyle): (WebCore::RenderTextControl::updateFromElement): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isChecked): (WebCore::RenderTheme::isIndeterminate): (WebCore::RenderTheme::isEnabled): (WebCore::RenderTheme::isReadOnlyControl): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustMenuListStyle): * wml/WMLFormControlElement.cpp: (WebCore::WMLFormControlElement::isFocusable): * wml/WMLFormControlElement.h: (WebCore::WMLFormControlElement::isEnabled): (WebCore::WMLFormControlElement::isReadOnlyControl): (WebCore::WMLFormControlElement::isTextControl): * wml/WMLInputElement.cpp: (WebCore::WMLInputElement::isKeyboardFocusable): (WebCore::WMLInputElement::isMouseFocusable): * wml/WMLInputElement.h: (WebCore::WMLInputElement::isAutofilled): 2009-01-29 Nikolas Zimmermann Not reviewed. Fix WML build - apply same fix as HTMLAnchorElement received. * wml/WMLAElement.cpp: (WebCore::WMLAElement::isKeyboardFocusable): 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-01-29 David Hyatt Move dirtyLinesFromChangedChild into RenderLineBoxList so that it can be shared by RenderBlock and RenderInline. Reviewed by Sam Weinig * rendering/RenderBlock.h: (WebCore::RenderBlock::dirtyLinesFromChangedChild): * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: * rendering/RenderInline.h: (WebCore::RenderInline::dirtyLinesFromChangedChild): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): * rendering/RenderLineBoxList.h: 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-01-29 David Hyatt Move RenderFlow::destroy down into RenderBlock and RenderInline. Reviewed by Anders Carlsson * rendering/RenderBlock.cpp: (WebCore::RenderBlock::destroy): * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::destroy): 2009-01-29 David Kilzer Remove semi-colons from the end of ObjC method implementations Rubber-stamped by Adam Roben. $ find WebCore -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \; * bridge/testbindings.mm: 2009-01-29 Adam Treat Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=23609 Use the two-arg constructor for implicit QUrl->KURL conversion as the single argument ctors assume that KURL::parse has already been called and assert if the parse results in a different string. This was causing an assert for QUrl's with no path and without a trailing slash. * platform/qt/KURLQt.cpp: (WebCore::KURL::KURL): 2009-01-29 Alexey Proskuryakov Rubber-stamped by Darin Adler. Renamed ApplicationCacheResource::Implicit to Master, because that's the word HTML5 uses, and it describes the meaning better. * loader/appcache/ApplicationCache.cpp: * loader/appcache/ApplicationCacheGroup.cpp: * loader/appcache/ApplicationCacheResource.cpp: * loader/appcache/ApplicationCacheResource.h: 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-01-29 David Hyatt Get rid of createAnonymousFlow. It was only called in one spot, so just inline the code. Reviewed by Oliver Hunt * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: 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-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-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-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-01-28 David Hyatt Move hit testing and painting of lines from RenderFlow into RenderLineBoxList. Reviewed by Oliver Hunt * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintContents): (WebCore::RenderBlock::hitTestContents): * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::paint): (WebCore::RenderInline::nodeAtPoint): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::paint): (WebCore::RenderLineBoxList::hitTest): * rendering/RenderLineBoxList.h: 2009-01-28 David Hyatt Fix SVG pixel test regressions. I wish I could say that I understand this fix, but I don't. For some reason the original code returned 0 for RenderSVGInlineText::yPos() and somehow my literal replacement of yPos() with the body of that method changed the results. I am completely baffled, but all SVG pixel tests pass again when I just take the code out. Reviewed by Oliver Hunt * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::computeAbsoluteRectForRange): 2009-01-28 David Hyatt Move dirtyLineBoxes from RenderFlow to RenderInline and RenderBlock. Reviewed by Oliver Hunt * rendering/RenderBlock.cpp: (WebCore::RenderBlock::dirtyLineBoxes): * rendering/RenderBlock.h: * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::dirtyLineBoxes): * rendering/RenderInline.h: * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::dirtyLineBoxes): * rendering/RenderLineBoxList.h: 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-01-28 David Hyatt Move paintOutline and paintOutlineWithLine from RenderFlow to RenderInline, since they only apply to inlines. Tighten up all of the code that called paintOutline to use RenderInline as the type instead of RenderFlow. Reviewed by cpst * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::addContinuationWithOutline): (WebCore::RenderBlock::paintContinuationOutlines): * rendering/RenderFlow.cpp: (WebCore::RenderFlow::paintLines): * rendering/RenderFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutline): (WebCore::RenderInline::paintOutlineForLine): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::paintOutline): * rendering/RenderObject.h: (WebCore::RenderObject::PaintInfo::PaintInfo): 2009-01-28 Darin Fisher Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=23596 XMLHttpRequest.cpp no longer compiles without USE(JSC) * xml/XMLHttpRequest.cpp: 2009-01-28 Darin Fisher Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=23597 Make it possible to compile Database.cpp when USE(JSC) is not defined * storage/Database.cpp: (WebCore::Database::Database): 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-01-28 David Hyatt Move addFocusRingRects from RenderFlow down into RenderBlock and RenderInline. Reviewed by Oliver Hunt * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addFocusRingRects): * rendering/RenderBlock.h: * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::addFocusRingRects): * rendering/RenderInline.h: 2009-01-28 David Hyatt Move localCaretRect from RenderFlow into RenderBlock, since it only applied to blocks anyway and was misplaced from the start. Reviewed by anttik * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): * rendering/RenderBlock.h: * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: 2009-01-28 Sam Weinig Reviewed by Geoff Garen. Add forwarding header. * ForwardingHeaders/debugger/DebuggerActivation.h: Added. 2009-01-28 David Hyatt Move createInlineBox out of RenderFlow and down into RenderInline and RenderBlock. Reviewed by Beth Dakin * rendering/RenderBlock.cpp: (WebCore::RenderBlock::createInlineBox): * rendering/RenderBlock.h: * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::createInlineBox): * rendering/RenderInline.h: * rendering/bidi.cpp: 2009-01-28 David Hyatt Move calcMargins from RenderFlow to RenderInline, since it was only ever called on RenderInlines. Reviewed by Oliver Hunt * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: * rendering/RenderInline.h: (WebCore::RenderInline::calcMargins): * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): 2009-01-28 David Hyatt Refactor the first and last line box member variables from RenderFlow. Encapsulate them into a new class called RenderLineBoxList that manages all modifications to the list. This change will make it easier to give RenderInline and RenderBlock separate versions of the line box list without having to duplicate very much code. Reviewed by Oliver Hunt * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::deleteLine): (WebCore::InlineFlowBox::removeLineBoxFromRenderObject): (WebCore::InlineFlowBox::extractLine): (WebCore::InlineFlowBox::extractLineBoxFromRenderObject): (WebCore::InlineFlowBox::attachLine): (WebCore::InlineFlowBox::attachLineBoxToRenderObject): * rendering/InlineFlowBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::deleteLineBoxTree): * rendering/RenderFlow.cpp: (WebCore::RenderFlow::destroy): (WebCore::RenderFlow::dirtyLineBoxes): (WebCore::RenderFlow::createInlineBox): * rendering/RenderFlow.h: (WebCore::RenderFlow::RenderFlow): (WebCore::RenderFlow::lineBoxes): (WebCore::RenderFlow::firstLineBox): (WebCore::RenderFlow::lastLineBox): * rendering/RenderLineBoxList.cpp: Added. (WebCore::RenderLineBoxList::~RenderLineBoxList): (WebCore::RenderLineBoxList::appendLineBox): (WebCore::RenderLineBoxList::deleteLineBoxTree): (WebCore::RenderLineBoxList::extractLineBox): (WebCore::RenderLineBoxList::attachLineBox): (WebCore::RenderLineBoxList::removeLineBox): (WebCore::RenderLineBoxList::deleteLineBoxes): (WebCore::RenderLineBoxList::checkConsistency): * rendering/RenderLineBoxList.h: Added. (WebCore::RenderLineBoxList::RenderLineBoxList): (WebCore::RenderLineBoxList::firstLineBox): (WebCore::RenderLineBoxList::lastLineBox): (WebCore::RenderLineBoxList::checkConsistency): * rendering/RenderSVGInline.cpp: (WebCore::RenderSVGInline::createInlineBox): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::createInlineBox): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::removeLineBoxFromRenderObject): (WebCore::RootInlineBox::extractLineBoxFromRenderObject): (WebCore::RootInlineBox::attachLineBoxToRenderObject): * rendering/RootInlineBox.h: * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): 2009-01-28 David Kilzer Clean up FontPlatformData constructor Reviewed by David Hyatt. * platform/graphics/mac/FontPlatformData.h: Updated copyright. (WebCore::FontPlatformData::FontPlatformData): Provide readable names for constructor arguments and reformat member variables. * platform/graphics/mac/FontPlatformDataMac.mm: Updated copyright. (WebCore::FontPlatformData::FontPlatformData): Provide readable names for constructor arguments and reformat member variables. 2009-01-28 Tony Chang Reviewed by David Hyatt. https://bugs.webkit.org/show_bug.cgi?id=23593 Compile fixes for RenderThemeChromiumMac and RenderThemeChromiumWin. This is a follow up for hyatt's RenderBox changes. * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::baselinePosition): * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::paintMenuList): 2009-01-28 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=23582 Fix assertions when inline elements have both opacity (or something else that creates a RenderLayer), and transform by ensuring that setHasTransform() is only called for non-inline or replaced elements. We also have to ensure that RenderReplicas will get transforms applied to them by lying about them being replaced. Tests: fast/transforms/transform-on-inline.html fast/transforms/transform-table-row.html * rendering/RenderBox.cpp: (WebCore::RenderBox::styleDidChange): * rendering/RenderReplica.cpp: (WebCore::RenderReplica::RenderReplica): * rendering/RenderTableRow.h: (WebCore::RenderTableRow::requiresLayer): 2009-01-28 Hironori Bono Reviewed by Justin Garcia. https://bugs.webkit.org/show_bug.cgi?id=18835 Spelling underlines disappear when they shouldn't The WebCore::InsertLineBreakCommand::doApply() function splits a text node without copying existing markers. To fix this bug, change code which manually splits a text node into a CompositeEditCommand::splitTextNode() call. Test: editing/spelling/spelling-linebreak.html * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): 2009-01-28 David Hyatt Move the m_lineHeight member variable out of RenderFlow and down into RenderBlock and RenderInline. Shift the line height computation into RenderStyle so that it isn't repeated in three places. Reviewed by Sam Weinig * rendering/RenderBlock.cpp: (WebCore::RenderBlock::RenderBlock): (WebCore::RenderBlock::lineHeight): * rendering/RenderBlock.h: * rendering/RenderFlow.cpp: * rendering/RenderFlow.h: (WebCore::RenderFlow::RenderFlow): * rendering/RenderInline.cpp: (WebCore::RenderInline::RenderInline): (WebCore::RenderInline::lineHeight): * rendering/RenderInline.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::lineHeight): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::computedLineHeight): 2009-01-28 Zachary Kuznia Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=22070 Add an option to allow scripts to close windows. * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setAllowScriptsToCloseWindows): * page/Settings.h: (WebCore::Settings::allowScriptsToCloseWindows): 2009-01-28 Adam Langley Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=23573 Make PlatformWidget on chromium an intptr_t to match changes made in Chromium * platform/chromium/PlatformWidget.h: 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-01-27 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=23576 Work towards eliminating RenderFlow from the tree. Move the m_continuation variable down from RenderFlow into RenderInline and RenderBlock. Since a block can only have an inline continuation following it, the type of the member and methods reflect this (inlineContinuation() and m_inlineContinuation). Since an inline can have either a block or an inline continuation following it, a base class of RenderBox* is used for the type of object returned (in anticipation of the removal of RenderFlow). Since moving the continuation variable down into the subclasses increased the size of RenderInline and RenderBlock by 4 bytes, this patch also moves all of the bitfield members of RenderFlow up to RenderObject. Since they fit within the available bits on RenderObject, this patch actually results in a net savings of 4 bytes on RenderInlines and RenderBlocks! One bitfield member was eliminated rather than moved: m_firstLine. This was really more of a state variable used during line layout only, so I removed it as a member and just passed firstLine down to various methods as needed. Doing so uncovered some potential bugs where the first line state was not being respected when querying for line offsets. Continuations have been completely hidden from all files except for RenderFlow, RenderBlock and RenderInline. All of the code that referenced continuations directly from base classes has been refactored to use virtual methods on RenderBlock and RenderInline instead. RenderFlow still has a common addChildWithContinuation method that is used by both blocks and inlines. Since refactoring that method will be pretty tricky, I've held off on that for a later patch. Reviewed by Oliver Hunt * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::isKeyboardFocusable): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::anchorElement): (WebCore::AccessibilityRenderObject::boundingBoxRect): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::determineSpacingForFlowBoxes): (WebCore::InlineFlowBox::paint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::RenderBlock): (WebCore::RenderBlock::~RenderBlock): (WebCore::RenderBlock::destroy): (WebCore::RenderBlock::addChildToFlow): (WebCore::RenderBlock::makeChildrenNonInline): (WebCore::RenderBlock::removeChild): (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::expandsToEncloseOverhangingFloats): (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::determineHorizontalPosition): (WebCore::RenderBlock::setCollapsedBottomMargin): (WebCore::RenderBlock::layoutOnlyPositionedObjects): (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::addContinuationWithOutline): (WebCore::RenderBlock::setSelectionState): (WebCore::RenderBlock::shouldPaintSelectionGaps): (WebCore::RenderBlock::fillSelectionGaps): (WebCore::RenderBlock::leftSelectionOffset): (WebCore::RenderBlock::rightSelectionOffset): (WebCore::RenderBlock::leftOffset): (WebCore::RenderBlock::leftRelOffset): (WebCore::RenderBlock::rightOffset): (WebCore::RenderBlock::rightRelOffset): (WebCore::RenderBlock::lineWidth): (WebCore::RenderBlock::lowestPosition): (WebCore::RenderBlock::rightmostPosition): (WebCore::RenderBlock::leftmostPosition): (WebCore::RenderBlock::getClearDelta): (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::offsetForContents): (WebCore::RenderBlock::availableWidth): (WebCore::RenderBlock::setDesiredColumnCountAndWidth): (WebCore::RenderBlock::desiredColumnWidth): (WebCore::RenderBlock::desiredColumnCount): (WebCore::RenderBlock::columnRects): (WebCore::RenderBlock::layoutColumns): (WebCore::RenderBlock::adjustPointToColumnContents): (WebCore::RenderBlock::adjustRectForColumns): (WebCore::RenderBlock::absoluteRects): (WebCore::RenderBlock::absoluteQuads): (WebCore::RenderBlock::rectWithOutlineForRepaint): (WebCore::RenderBlock::hoverAncestor): (WebCore::RenderBlock::updateDragState): (WebCore::RenderBlock::outlineStyleForRepaint): (WebCore::RenderBlock::childBecameNonInline): (WebCore::RenderBlock::updateHitTestResult): * rendering/RenderBlock.h: (WebCore::RenderBlock::rightOffset): (WebCore::RenderBlock::leftOffset): (WebCore::RenderBlock::inlineContinuation): (WebCore::RenderBlock::setInlineContinuation): * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteRects): (WebCore::RenderBox::absoluteQuads): (WebCore::RenderBox::addFocusRingRects): (WebCore::RenderBox::containingBlockWidth): * rendering/RenderBox.h: (WebCore::RenderBox::collapsedMarginBottom): (WebCore::RenderBox::childBecameNonInline): * rendering/RenderContainer.cpp: (WebCore::RenderContainer::updateBeforeAfterContentForContainer): (WebCore::RenderContainer::removeLeftoverAnonymousBlock): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox): * rendering/RenderFlow.cpp: (WebCore::nextContinuation): (WebCore::RenderFlow::continuationBefore): (WebCore::RenderFlow::addChildWithContinuation): (WebCore::RenderFlow::addChild): (WebCore::RenderFlow::destroy): (WebCore::RenderFlow::addFocusRingRects): * rendering/RenderFlow.h: (WebCore::RenderFlow::RenderFlow): * rendering/RenderInline.cpp: (WebCore::RenderInline::RenderInline): (WebCore::RenderInline::destroy): (WebCore::RenderInline::inlineContinuation): (WebCore::RenderInline::styleDidChange): (WebCore::RenderInline::addChildToFlow): (WebCore::RenderInline::cloneInline): (WebCore::RenderInline::splitInlines): (WebCore::RenderInline::splitFlow): (WebCore::RenderInline::positionForCoordinates): (WebCore::RenderInline::rectWithOutlineForRepaint): (WebCore::RenderInline::updateDragState): (WebCore::RenderInline::childBecameNonInline): (WebCore::RenderInline::updateHitTestResult): * rendering/RenderInline.h: (WebCore::RenderInline::isRenderInline): (WebCore::RenderInline::continuation): (WebCore::RenderInline::setContinuation): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::positionListMarker): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::RenderListMarker): (WebCore::RenderListMarker::setSelectionState): * rendering/RenderListMarker.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): (WebCore::RenderObject::repaintAfterLayoutIfNeeded): (WebCore::RenderObject::rectWithOutlineForRepaint): (WebCore::RenderObject::handleDynamicFloatPositionChange): (WebCore::RenderObject::updateDragState): (WebCore::RenderObject::updateHitTestResult): (WebCore::RenderObject::getTextDecorationColors): (WebCore::RenderObject::adjustRectForOutlineAndShadow): * rendering/RenderObject.h: (WebCore::RenderObject::isInlineBlockOrInlineTable): (WebCore::RenderObject::childrenInline): (WebCore::RenderObject::setChildrenInline): (WebCore::RenderObject::hasColumns): (WebCore::RenderObject::setHasColumns): (WebCore::RenderObject::cellWidthChanged): (WebCore::RenderObject::setCellWidthChanged): (WebCore::RenderObject::isInlineContinuation): (WebCore::RenderObject::hoverAncestor): (WebCore::RenderObject::outlineStyleForRepaint): (WebCore::RenderObject::setHasMarkupTruncation): (WebCore::RenderObject::hasMarkupTruncation): (WebCore::RenderObject::selectionState): (WebCore::RenderObject::setSelectionState): (WebCore::RenderObject::hasSelectedChildren): (WebCore::RenderObject::isTopMarginQuirk): (WebCore::RenderObject::isBottomMarginQuirk): (WebCore::RenderObject::setTopMarginQuirk): (WebCore::RenderObject::setBottomMarginQuirk): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::RenderReplaced): (WebCore::RenderReplaced::setSelectionState): * rendering/RenderReplaced.h: (WebCore::RenderReplaced::canBeSelectionLeaf): * rendering/RenderTable.cpp: (WebCore::RenderTable::calcWidth): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::updateWidth): (WebCore::RenderTableCell::layout): * rendering/RenderText.cpp: (WebCore::RenderText::RenderText): (WebCore::RenderText::localCaretRect): (WebCore::RenderText::setSelectionState): * rendering/RenderText.h: (WebCore::RenderText::canBeSelectionLeaf): * rendering/RenderView.cpp: (WebCore::RenderView::updateHitTestResult): * rendering/RenderView.h: * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::selectionTop): * rendering/bidi.cpp: (WebCore::RenderBlock::createLineBoxes): (WebCore::RenderBlock::constructLine): (WebCore::RenderBlock::computeHorizontalPositionsForLine): (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::determineStartPosition): (WebCore::RenderBlock::skipTrailingWhitespace): (WebCore::RenderBlock::skipLeadingWhitespace): (WebCore::RenderBlock::fitBelowFloats): (WebCore::RenderBlock::findNextLineBreak): (WebCore::RenderBlock::checkLinesForTextOverflow): 2009-01-28 Adam Treat Reviewed by Nikolas Zimmermann and George Staikos. https://bugs.webkit.org/show_bug.cgi?id=23557 Allow option of hit testing frame content without clipping to the visible viewport. * WebCore.base.exp: * page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint): * page/EventHandler.h: * rendering/HitTestRequest.h: (WebCore::HitTestRequest::HitTestRequest): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::hitTest): 2009-01-28 Simon Hausmann Reviewed by Holger Freyther. Fix the build with Qt on Windows. Make sure that the QTWEBKIT_EXPORT macro becomes the Q_DECL_EXPORT macro instead of the import macro when building the dll, by defining QT_MAKEDLL. SystemTimeWin.cpp is needed on Windows for userIdleTime(), which for the other Qt platforms comes from TemporaryLinkStubs.cpp. * WebCore.pro: 2009-01-28 Ariya Hidayat Reviewed by Simon Hausmann. [Qt] Speed-up clipping: avoid calling expensive QPainter::clipRegion(). Beside, the check is not necessary since QPainter::setClipRect() will work just fine if there is no clip region yet. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::clip): 2009-01-28 Darin Fisher Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=23546 Upstream GoogleURL implementation of KURL * platform/KURL.h: * platform/KURLGoogle.cpp: Added. * platform/KURLGooglePrivate.h: Added. 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-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 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=23360 Use the new container-relative repaint methods to compute post-layout repaints, and repaints using RenderLayer's cached repaintRect() relative to that container, rather than using absolute coords. Replaced lots of boilerplate old/new rect code in various layout methods with a stack-based LayoutRepainter class, and fixed a bug in RenderTable which set didFullRepaint to 'true' every time. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::layout): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::setHasVisibleContent): * rendering/RenderLayer.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintUsingContainer): (WebCore::RenderObject::repaint): (WebCore::RenderObject::repaintRectangle): (WebCore::RenderObject::repaintAfterLayoutIfNeeded): * rendering/RenderObject.h: (WebCore::RenderObject::LayoutRepainter::LayoutRepainter): (WebCore::RenderObject::LayoutRepainter::repaintAfterLayout): (WebCore::RenderObject::LayoutRepainter::checkForRepaint): * rendering/RenderPath.cpp: (WebCore::RenderPath::layout): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::layout): * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::layout): * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::layout): * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): 2009-01-27 Brady Eidson Reviewed by Darin Adler - More groundwork and cleanup for CachedFrames * history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): Make the savePlatformDataToCachedFrame() client call here, and add the code for caching subframes. (WebCore::CachedFrame::clear): * history/CachedFrame.h: Change to be RefCounted (WebCore::CachedFrame::create): (WebCore::CachedFrame::url): * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): (WebCore::CachedPage::restore): * history/CachedPage.h: (WebCore::CachedPage::document): (WebCore::CachedPage::documentLoader): (WebCore::CachedPage::view): (WebCore::CachedPage::url): (WebCore::CachedPage::domWindow): (WebCore::CachedPage::cachedMainFrame): * loader/FrameLoader.cpp: (WebCore::FrameLoader::cachePageForHistoryItem): Move the platform data saving into the CachedFrame itself. 2009-01-27 Simon Fraser Reviewed by Dave Hyatt Flip the arguments of computeRectForRepaint() from computeRectForRepaint(IntRect&, RenderBox* repaintContainer, bool) to computeRectForRepaint(RenderBox* repaintContainer, IntRect&, bool) * rendering/RenderBox.cpp: (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/RenderObject.cpp: (WebCore::RenderObject::computeRectForRepaint): * rendering/RenderObject.h: (WebCore::RenderObject::computeAbsoluteRepaintRect): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::clippedOverflowRectForRepaint): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::clippedOverflowRectForRepaint): (WebCore::RenderTableCell::computeRectForRepaint): * rendering/RenderTableCell.h: * rendering/RenderView.cpp: (WebCore::RenderView::computeRectForRepaint): * rendering/RenderView.h: 2009-01-27 David Kilzer Add missing header guards to AccessibilityObjectWrapper.h Reviewed by Anders Carlsson. * page/mac/AccessibilityObjectWrapper.h: Added missing header guards. 2009-01-27 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=23567 Fix crash of svg/custom/stop-crash.svg testcase because of infinite recursion, as I missed replacing absoluteClippedOverflowRect() with clippedOverflowRectForRepaint() in RenderSVGGradientStop. Also fix a missed conversion in RenderTableCol, and add a couple of comments. * rendering/RenderSVGGradientStop.h: (WebCore::RenderSVGGradientStop::clippedOverflowRectForRepaint): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::imageChanged): * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::clippedOverflowRectForRepaint): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::layout): 2009-01-27 Adele Peterson RS by Dave Hyatt Use the textfield appearance for search fields in themeWin.css so the border/background styling will work correctly on these fields. * css/themeWin.css: 2009-01-27 Dan Bernstein - build fix * bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::JSHTMLInputElement::setSelectionStart): (WebCore::JSHTMLInputElement::setSelectionEnd): (WebCore::JSHTMLInputElement::setSelectionRange): 2009-01-27 Dan Bernstein - build fix * platform/graphics/Gradient.cpp: (WebCore::Gradient::setSpreadMethod): 2009-01-27 Paul Godavari Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=23561 Explicitly send the MIME type from an image dragged from a web page to the desktop, to Chromium so that it can properly generate a file name. * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::clear): (WebCore::ChromiumDataObject::hasData): * platform/chromium/ChromiumDataObject.h: * platform/chromium/ClipboardChromium.cpp: (WebCore::writeImageToDataObject): 2009-01-27 Mads Ager Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=23300 Follow Firefox in throwing exceptions when using selection functions on HTMLInputElements that cannot have selection. This requires custom setSelectionRange, setSelectionStart and setSelectionEnd implementations, but it gets rid of the custom getOwnPropertySlot. * bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::JSHTMLInputElement::selectionStart): (WebCore::JSHTMLInputElement::selectionEnd): (WebCore::JSHTMLInputElement::setSelectionRange): * html/HTMLInputElement.idl: 2009-01-27 Evan Stade Reviewed by Nikolas Zimmermann. https://bugs.webkit.org/show_bug.cgi?id=23435 Make spreadMethod a member of Gradient rather than GraphicsContext. Implement spreadMethod for Skia. * platform/graphics/Gradient.cpp: (WebCore::Gradient::Gradient): * platform/graphics/Gradient.h: (WebCore::Gradient::setSpreadMethod): (WebCore::Gradient::spreadMethod): * platform/graphics/GraphicsContext.cpp: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextPrivate.h: * platform/graphics/GraphicsTypes.h: (WebCore::): * platform/graphics/cairo/GradientCairo.cpp: (WebCore::Gradient::platformGradient): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): * platform/graphics/qt/GradientQt.cpp: (WebCore::Gradient::platformGradient): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): * platform/graphics/skia/GradientSkia.cpp: (WebCore::Gradient::platformGradient): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::buildGradient): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::buildGradient): * svg/graphics/SVGPaintServerGradient.cpp: (WebCore::SVGPaintServerGradient::SVGPaintServerGradient): (WebCore::SVGPaintServerGradient::setup): (WebCore::SVGPaintServerGradient::externalRepresentation): * svg/graphics/SVGPaintServerGradient.h: 2009-01-27 Ariya Hidayat Rubber-stamped by Simon Hausmann. http://www.qtsoftware.com/developer/task-tracker/index_html?id=238662&method=entry [Qt] Map function keys F1 to F24. * platform/qt/PlatformKeyboardEventQt.cpp: (WebCore::windowsKeyCodeForKeyEvent): 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