2008-04-18 Dan Bernstein Reviewed by Brady Eidson. - fix REGRESSION (3.1.1-TOT): Repro crash going to Ortega Park home page Test: fast/dynamic/5872671.html * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): Added a missing null check. 2008-04-18 Sam Weinig Rubber-stamped by Mark Rowe. responseText and responseXML don't throw exceptions so they don't need an ExceptionCode parameter. * bindings/js/JSXMLHttpRequestCustom.cpp: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseText): (WebCore::XMLHttpRequest::responseXML): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: 2008-04-18 Kevin McCullough Reviewed by Sam. - Build fix. * page/Console.cpp: (WebCore::Console::profile): * page/Console.h: * page/Console.idl: 2008-04-18 Eric Seidel Reviewed by darin. Fix probable crasher caused by invalid static_cast https://bugs.webkit.org/show_bug.cgi?id=18585 * page/Frame.cpp: (WebCore::Frame::contentRenderer): (WebCore::Frame::ownerRenderer): * rendering/RenderObject.h: sort the "is*" functions (WebCore::RenderObject::isApplet): (WebCore::RenderObject::isBR): (WebCore::RenderObject::isBlockFlow): (WebCore::RenderObject::isCounter): (WebCore::RenderObject::isFrame): (WebCore::RenderObject::isFrameSet): (WebCore::RenderObject::isImage): (WebCore::RenderObject::isInlineBlockOrInlineTable): (WebCore::RenderObject::isInlineFlow): (WebCore::RenderObject::isListBox): (WebCore::RenderObject::isListItem): (WebCore::RenderObject::isListMarker): (WebCore::RenderObject::isMedia): (WebCore::RenderObject::isMenuList): (WebCore::RenderObject::isRenderBlock): (WebCore::RenderObject::isRenderImage): (WebCore::RenderObject::isRenderInline): (WebCore::RenderObject::isRenderPart): (WebCore::RenderObject::isRenderView): (WebCore::RenderObject::isSlider): (WebCore::RenderObject::isTable): (WebCore::RenderObject::isTableCell): (WebCore::RenderObject::isTableCol): (WebCore::RenderObject::isTableRow): (WebCore::RenderObject::isTableSection): (WebCore::RenderObject::isTextArea): * rendering/RenderPart.h: 2008-04-17 Eric Seidel Reviewed by beth. Rename Frame::renderer() to contentRenderer() and fix uses. * WebCore.base.exp: * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): * loader/FrameLoader.cpp: (WebCore::FrameLoader::gotoAnchor): * page/DragController.cpp: (WebCore::DragController::canProcessDrag): (WebCore::DragController::mayStartDragAtEventLocation): (WebCore::DragController::startDrag): * page/EventHandler.cpp: (WebCore::EventHandler::eventMayStartDrag): (WebCore::EventHandler::updateSelectionForMouseDrag): (WebCore::EventHandler::hitTestResultAtPoint): (WebCore::EventHandler::hoverTimerFired): (WebCore::EventHandler::handleDrag): * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): (WebCore::Frame::contentRenderer): (WebCore::Frame::paint): (WebCore::Frame::markAllMatchesForText): (WebCore::Frame::documentAtPoint): * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::~FrameView): (WebCore::FrameView::adjustViewSize): (WebCore::FrameView::layout): (WebCore::FrameView::scheduleRelayoutOfSubtree): (WebCore::FrameView::needsLayout): (WebCore::FrameView::setNeedsLayout): (WebCore::FrameView::updateControlTints): * rendering/RenderTreeAsText.cpp: (WebCore::write): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::nativeImageForCurrentFrame): 2008-04-18 Antti Koivisto Reviewed by Oliver. https://bugs.webkit.org/show_bug.cgi?id=18551 REGRESSION (r31801?): Crash in ContainerNode::removedFromDocument on many SVG tests Fix for test svg/W3C-SVG-1.1/animate-elem-62-t.svg which was still crashing under guard malloc after the previous fix. If the event base element was a parent of the current element, dereffing it during removedFromDocument() would cause problems. Avoid this by not holding ref pointer to the event base but instead checking from the ref count of the event listener whether it is still alive and in need for unregistering. This shold not be a problem for syncbase pointers since those are always animation elements and leaf nodes. * svg/animation/SVGSMILElement.cpp: (WebCore::ConditionEventListener::ConditionEventListener): (WebCore::ConditionEventListener::unregister): (WebCore::ConditionEventListener::handleEvent): (WebCore::SVGSMILElement::connectConditions): (WebCore::SVGSMILElement::disconnectConditions): (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase): * svg/animation/SVGSMILElement.h: 2008-04-18 Kevin McCullough Reviewed by Sam and Adam. - JavaScript profiler (10928) - Added support for console.profile() and console.profileEnd(). * ForwardingHeaders/kjs/FunctionCallProfile.h: Added. * ForwardingHeaders/kjs/Profiler.h: Added. * page/Console.cpp: (WebCore::Console::profile): (WebCore::Console::profileEnd): * page/Console.h: * page/Console.idl: 2008-04-18 Kevin Ollivier wx build fix. Add the new loader/appcache files. * WebCoreSources.bkl: 2008-04-18 Dan Bernstein Reviewed by Darin Adler. - fix https://bugs.webkit.org/show_bug.cgi?id=17921 Extra white space at the end of right-aligned or justified text with -webkit-line-break: after-white-space Test: fast/text/trailing-white-space.html Made trailing white space on the line always behave like it has the base bidi level of the block, meaning it will always go on the right (left) of the line in a left-to-right (right-to-left) block. Made the trailing white space vanish when it is next to a margin that the text should be touching, and made its width not count when computing the center point for center alignment. * platform/text/BidiResolver.h: (WebCore::::prependRun): Added. * rendering/RenderBlock.h: * rendering/bidi.cpp: (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed the logicallyLastRun parameter to an optional trailingSpaceRun and changed the alignment logic to implement the above rules. (WebCore::RenderBlock::layoutInlineChildren): Added code to identify when there is trailing white space that needs to be split into its own run and optionally re-ordered. (WebCore::RenderBlock::findNextLineBreak): Removed code that split some trailing space into a separate run in one special case. 2008-04-10 Mark Rowe Rubber-stamped by Brady Eidson. Fix builds that do not have DOM storage enabled. * page/DOMWindow.cpp: * page/Page.cpp: * page/PageGroup.cpp: * page/PageGroup.h: 2008-04-18 Timothy Hatcher Fixes the regression where style rules in the Inspector always show "inline stylesheet" for the source of the rule and not the URL or other sources. https://bugs.webkit.org/show_bug.cgi?id=18592 Reviewed by Dan Bernstein. * page/inspector/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.update): Add parentStyleSheet to the anonymous obejct that we make for each matched rule. The parentStyleSheet property is used later to make the subtitle. 2008-04-18 Dean Jackson Fixed marquee suspension on wrong document. Passes current document into Frame::clearTimers. Reviewed by hyatt. * history/CachedPage.cpp: (WebCore::CachedPage::clear): * page/Frame.cpp: (WebCore::Frame::clearTimers): * page/Frame.h: 2008-04-18 Dean Jackson Add 'ease' timing function to transitions and make it the default. See latest specification proposal at: http://webkit.org/specs/CSSVisualEffects/CSSTransitions.html Reviewed by hyatt. NOTE: still working on a way to test animating/transitioning content * css/CSSParser.cpp: (WebCore::CSSParser::parseTransitionTimingFunction): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapTransitionTimingFunction): * css/CSSValueKeywords.in: 2008-04-18 Adam Roben Change JavaScriptDebugListener to use KJS::UString instead of WebCore::String This should reduce the number of string allocations performed while debugging. Reviewed by Tim Hatcher. * page/InspectorController.cpp: Updated JavaScriptDebugListener functions. * page/InspectorController.h: Ditto. * page/JavaScriptDebugListener.h: Changed to use KJS::UString instead of WebCore::String. * page/JavaScriptDebugServer.cpp: Ditto. * platform/win/BString.cpp: (WebCore::BString::BString): Added a constructor that takes a KJS::UString. * platform/win/BString.h: 2008-04-18 Adam Roben Mac build fix * WebCore.xcodeproj/project.pbxproj: Mark JavaScriptDebugListener.h private. 2008-04-18 Adam Roben Make InspectorController a JavaScriptDebugListener I added two new functions to the InspectorController JS object: reloadInspectedPageAndStartDebugging and stopDebugging. These control when the InspectorController adds/removes itself to/from the JavaScriptDebugServer. Reviewed by Tim Hatcher. * page/InspectorController.cpp: (WebCore::reloadInspectedPageAndStartDebugging): Added. Just calls through to InspectorController. (WebCore::stopDebugging): Ditto. (WebCore::InspectorController::~InspectorController): Make sure we stop debugging before we are destroyed so the JavaScriptDebugServer won't be left with a stale pointer. (WebCore::InspectorController::windowScriptObjectAvailable): Added two new functions to our JS object. (WebCore::InspectorController::closeWindow): Stop debugging when the window closes. (WebCore::InspectorController::reloadInspectedPageAndStartDebugging): Added. (WebCore::InspectorController::stopDebugging): Added. (WebCore::InspectorController::didParseSource): (WebCore::InspectorController::failedToParseSource): (WebCore::InspectorController::didEnterCallFrame): (WebCore::InspectorController::willExecuteStatement): (WebCore::InspectorController::willLeaveCallFrame): Added empty implementations of the JavaScriptDebugListener functions. * page/InspectorController.h: 2008-04-17 Adam Roben Rename ExecState* instances from state to exec Requested by Darin Adler and Sam Weinig. * bindings/js/JSConsoleCustom.cpp: 2008-04-17 Adam Roben Clean up InspectorController's use of JSStringRef All JSStringRef creation now happens through a helper function, jsStringRef, which takes either a const char* or a const String& and returns a JSRetainPtr. Reviewed by Mitz Pettel. * page/InspectorController.cpp: Added jsStringRef and converted all callers to JSStringCreateWithUTF8CString or JSStringCreateWithCharacters to use it. 2008-04-17 Adam Roben Add wrappers around InspectorClient::{show,close}Window This will let us perform actions when the window is actually showing/closing (InspectorController::show doesn't always directly show the window). Reviewed by Tim Hatcher. * page/InspectorController.cpp: (WebCore::InspectorController::scriptObjectReady): Call showWindow() instead of m_client->showWindow(). (WebCore::InspectorController::show): Ditto. (WebCore::InspectorController::close): Ditto for closeWindow(). (WebCore::InspectorController::showWindow): (WebCore::InspectorController::closeWindow): * page/InspectorController.h: 2008-04-18 Simon Hausmann Reviewed by Holger. Adapt to the API changes in WebKit/qt/ * platform/graphics/qt/ImageQt.cpp: (loadResourcePixmap): 2008-04-18 Ariya Hidayat Reviewed by Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=18477 No resize indication is shown when moving/hovering over the frame border/splitter. * page/EventHandler.cpp: (WebCore::EventHandler::selectCursor): 2008-04-18 Adam Roben Windows build fix Same as before, but for fabs/fabsf. * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::calculateDistance): Changed to use fabsf and removed narrowPrecisionToFloat. 2008-04-18 Adam Roben Windows build fix In MSVC, sqrt() has three overloads: float, double, and long double. In GCC, sqrt() is only for doubles. Both MSVC and GCC have sqrtf() to operate explicitly on floats. * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::calculateDistance): Changed to use sqrtf and removed narrowPrecisionToFloat. * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::calculateDistance): Ditto. 2008-04-18 Simon Hausmann Fix the build without Database support (fixes the Qt/win build). * page/PageGroup.cpp: (WebCore::PageGroup::localStorage): 2008-04-18 Simon Hausmann Fix the Gtk build on the build bot. * GNUmakefile.am: Back out the previous LocalStorage, etc. additions as they're already listed in another sources group that wasn't used due to a local configure error. 2008-04-18 Simon Hausmann Prospective wx build fix. * webcore-base.bkl: Add loader/appcache to include paths. 2008-04-18 Simon Hausmann Build fix. Back out previous #include fix for PageGroup.h as it broke the Mac build due to forwarding headers. * page/PageGroup.h: 2008-04-18 Simon Hausmann Build fix for Qt and gcc 4.3. * WebCore.pro: Added missing files and include paths, re-ordered the storage/ include path to avoid conflict of storage/LocalStorage.h with kjs/LocalStorage.h * page/PageGroup.h: Include LocalStorage.h instead of forward declaration to fix compilation with gcc 4.3. 2008-04-18 Simon Hausmann Build fix for Gtk and gcc 4.3. * GNUmakefile.am: Added missing files and include paths. * storage/LocalStorage.h: Include LocalStorageArea.h instead of forward declaring it due to the HashMap use where gcc 4.3 needs to see the class. 2008-04-17 Antti Koivisto Reviewed by Oliver. https://bugs.webkit.org/show_bug.cgi?id=18573 Implement supplemental transforms and use them for instead of the transform list. This will allow and combine properly. * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::resetToBaseValue): (WebCore::SVGAnimateMotionElement::calculateAnimatedValue): (WebCore::SVGAnimateMotionElement::applyResultsToTarget): * svg/SVGElement.h: (WebCore::SVGElement::supplementalTransform): * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::animatedLocalTransform): * svg/SVGStyledTransformableElement.h: (WebCore::SVGStyledTransformableElement::supplementalTransform): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::animatedLocalTransform): * svg/SVGTextElement.h: (WebCore::SVGTextElement::supplementalTransform): 2008-04-17 Antti Koivisto Reviewed by Oliver. Implement calcMode=paced. Tested by SVG testsuite tests animate-elem-11-t.svg animate-elem-15-t.svg animate-elem-82-t.svg * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::calculateDistance): * svg/SVGAnimateElement.h: * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::calculateDistance): * svg/SVGAnimateMotionElement.h: * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::calculateDistance): * svg/SVGAnimateTransformElement.h: * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced): (WebCore::SVGAnimationElement::startedActiveInterval): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::calculateDistance): 2008-04-17 David Hyatt Fix a leak in ImageBuffer's clearImage method. Reviewed by olliej * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::clearImage): 2008-04-17 Antti Koivisto Reviewed by Eric. https://bugs.webkit.org/show_bug.cgi?id=12438 More SVG animation: - Make multiple additive animations work - Support animating instance trees * svg/SVGAnimateColorElement.cpp: (WebCore::SVGAnimateColorElement::SVGAnimateColorElement): * svg/SVGAnimateColorElement.h: Made this AnimateElement subclass. All functionality is now provided by AnimateElement. * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::determinePropertyType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): (WebCore::SVGAnimateElement::resetToBaseValue): (WebCore::SVGAnimateElement::applyResultsToTarget): * svg/SVGAnimateElement.h: * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::resetToBaseValue): (WebCore::SVGAnimateMotionElement::calculateAnimatedValue): (WebCore::SVGAnimateMotionElement::applyResultsToTarget): * svg/SVGAnimateMotionElement.h: * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::resetToBaseValue): (WebCore::SVGAnimateTransformElement::calculateAnimatedValue): (WebCore::SVGAnimateTransformElement::calculateFromAndByValues): (WebCore::SVGAnimateTransformElement::applyResultsToTarget): * svg/SVGAnimateTransformElement.h: Switch to new model where - resetToBaseValue() resets the animated value back to the base value - calculateAnimatedValue() computes the value and adds it to the element used for accumulation - applyResultsToTarget() sets the computed value the target element * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::fromValue): (WebCore::SVGAnimationElement::attributeIsCSS): (WebCore::SVGAnimationElement::targetAttributeIsCSS): (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue): Update instances too. (WebCore::SVGAnimationElement::startedActiveInterval): (WebCore::SVGAnimationElement::updateAnimation): (WebCore::SVGAnimationElement::endedActiveInterval): * svg/SVGAnimationElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::SVGSVGElement): * svg/SVGSetElement.cpp: (WebCore::SVGSetElement::SVGSetElement): * svg/SVGSetElement.h: Made this AnimateElement subclass. All functionality is now provided by AnimateElement. * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::SMILTimeContainer): (WebCore::SMILTimeContainer::unschedule): (WebCore::SMILTimeContainer::updateDocumentOrderIndexes): (WebCore::PriorityCompare::PriorityCompare): (WebCore::PriorityCompare::operator()): (WebCore::SMILTimeContainer::sortByPriority): (WebCore::applyOrderSortFunction): (WebCore::sortByApplyOrder): (WebCore::SMILTimeContainer::baseValueFor): (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SMILTimeContainer.h: (WebCore::SMILTimeContainer::create): (WebCore::SMILTimeContainer::setDocumentOrderIndexesDirty): Do additive animation with the following steps - sort active animations based on their priority (begin time, document order). - if not yet saved for each (element, attribute) pair save the base value. - lowest priority animation for each (element, attribute) acts as the result element. - animation results are resolved in priority order and results are accumulated to the result element. - after all active animations have been processed the values in result elements are applied to the target elements. * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::SVGSMILElement): (WebCore::SVGSMILElement::insertedIntoDocument): Invalidate document order index. (WebCore::SVGSMILElement::attributeName): (WebCore::SVGSMILElement::isInactive): (WebCore::SVGSMILElement::isFrozen): (WebCore::SVGSMILElement::beginListChanged): (WebCore::SVGSMILElement::determineActiveState): (WebCore::SVGSMILElement::isContributing): (WebCore::SVGSMILElement::progress): Take care that animations in frozen state still contribute to the total. Since we now build the result starting from the base value, fill="replace" works magically simply by not contributing anything. * svg/animation/SVGSMILElement.h: (WebCore::SVGSMILElement::previousIntervalBegin): (WebCore::SVGSMILElement::documentOrderIndex): (WebCore::SVGSMILElement::setDocumentOrderIndex): 2008-04-17 Jon Honeycutt Reviewed by mrowe. Define HAVE_ACCESSIBILITY in a way that WebKit and WebCore can see it. * config.h: Remove HAVE_ACCESSIBILITY. * page/AccessibilityObject.h: Include wtf/Platform.h to pick up HAVE_ACCESSIBILITY. 2008-04-17 Jon Honeycutt Reviewed by aliu. * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::layoutCount): Check isRenderView() before casting to RenderView. 2008-04-17 Antti Koivisto Reviewed by Oliver. Fix https://bugs.webkit.org/show_bug.cgi?id=18551 Bug 18551: REGRESSION (r31801?): Crash in ContainerNode::removedFromDocument on many SVG tests under guard malloc Freeing a RefPtr that is the last ref to the parent from removedFromDocument() is a bad idea. Caching the target element is too dangerous, let's simply not do it. Getting it is very cheap anyway. * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::removedFromDocument): (WebCore::SVGSMILElement::attributeChanged): (WebCore::SVGSMILElement::targetElement): * svg/animation/SVGSMILElement.h: 2008-04-17 Sam Weinig Reviewed by Anders Carlsson. Autogenerate the XMLHttpRequest javascript binding. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSXMLHttpRequest.cpp: Removed. * bindings/js/JSXMLHttpRequest.h: Removed. * bindings/js/JSXMLHttpRequestConstructor.cpp: Added. (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): (WebCore::JSXMLHttpRequestConstructor::implementsConstruct): (WebCore::JSXMLHttpRequestConstructor::construct): * bindings/js/JSXMLHttpRequestConstructor.h: Added. (WebCore::JSXMLHttpRequestConstructor::classInfo): * bindings/js/JSXMLHttpRequestCustom.cpp: Added. (WebCore::JSXMLHttpRequest::mark): (WebCore::JSXMLHttpRequest::onreadystatechange): (WebCore::JSXMLHttpRequest::setOnreadystatechange): (WebCore::JSXMLHttpRequest::onload): (WebCore::JSXMLHttpRequest::setOnload): (WebCore::JSXMLHttpRequest::responseXML): (WebCore::JSXMLHttpRequest::open): (WebCore::JSXMLHttpRequest::setRequestHeader): (WebCore::JSXMLHttpRequest::send): (WebCore::JSXMLHttpRequest::getResponseHeader): (WebCore::JSXMLHttpRequest::overrideMimeType): (WebCore::JSXMLHttpRequest::addEventListener): (WebCore::JSXMLHttpRequest::removeEventListener): (WebCore::JSXMLHttpRequest::dispatchEvent): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::readyState): (WebCore::XMLHttpRequest::responseText): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: Added. 2008-04-17 Brady Eidson Reviewed by Anders The SessionStorage for a Page has to be copied every time a new Page is created. I thought I had the right choke point for creating new Pages at FrameLoader::createWindow(), but it just so happens there was another - in the ContextMenuController. The *real* choke point for this, then, is in the Chrome itself. * loader/FrameLoader.cpp: (WebCore::FrameLoader::createWindow): Don't do the SessionStorage copy here... * page/Chrome.cpp: (WebCore::Chrome::createWindow): Do it here, instead! 2008-04-17 Alice Liu Reviewed by Jon Honeycutt. Added some asserts to catch undesirable usage of setWrapper and addChildren. * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::addChildren): * page/AccessibilityObject.h: (WebCore::AccessibilityObject::setWrapper): 2008-04-17 Brady Eidson Reviewed by the Mitzpettel Before things get much more intertwined, move away from a global LocalStorage model to a per-PageGroup LocalStorage model. * page/DOMWindow.cpp: (WebCore::DOMWindow::localStorage): Get it from the current PageGroup, not the global LocalStorage (which doesn't exist anymore). * page/Page.cpp: * page/PageGroup.cpp: (WebCore::PageGroup::localStorage): Create a LocalStorage object on demand. * page/PageGroup.h: * storage/LocalStorage.cpp: (WebCore::LocalStorage::LocalStorage): Hold a back pointer to the owning PageGroup. (WebCore::LocalStorage::storageArea): * storage/LocalStorage.h: (WebCore::LocalStorage::create): * storage/LocalStorageArea.cpp: (WebCore::LocalStorageArea::LocalStorageArea): Hold a back pointer to the owning LocalStorage. * storage/LocalStorageArea.h: (WebCore::LocalStorageArea::create): 2008-04-17 Anders Carlsson Fix indentation. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::scheduleArchiveLoad): 2008-04-17 Anders Carlsson Reviewed by Brady. When in the web archive debug mode, don't call didFail immediately. Instead, add the loader to the substitute resource map, but with a null resource, which indicates to substituteResourceDeliveryTimerFired that the load should fail. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired): (WebCore::DocumentLoader::scheduleArchiveLoad): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::load): 2008-04-17 Anders Carlsson Reviewed by Sam. Add JS bindings for the DOMApplicationCache object. * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::add): (WebCore::JSDOMApplicationCache::remove): (WebCore::JSDOMApplicationCache::addEventListener): (WebCore::JSDOMApplicationCache::removeEventListener): (WebCore::JSDOMApplicationCache::dispatchEvent): (WebCore::JSDOMApplicationCache::setOnchecking): (WebCore::JSDOMApplicationCache::onchecking): (WebCore::JSDOMApplicationCache::setOnerror): (WebCore::JSDOMApplicationCache::onerror): (WebCore::JSDOMApplicationCache::setOnnoupdate): (WebCore::JSDOMApplicationCache::onnoupdate): (WebCore::JSDOMApplicationCache::setOndownloading): (WebCore::JSDOMApplicationCache::ondownloading): (WebCore::JSDOMApplicationCache::setOnprogress): (WebCore::JSDOMApplicationCache::onprogress): (WebCore::JSDOMApplicationCache::setOnupdateready): (WebCore::JSDOMApplicationCache::onupdateready): (WebCore::JSDOMApplicationCache::setOncached): (WebCore::JSDOMApplicationCache::oncached): (WebCore::JSDOMApplicationCache::mark): * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::mark): * bindings/js/JSEventTargetBase.cpp: (WebCore::toJS): * loader/appcache/DOMApplicationCache.idl: * page/DOMWindow.idl: 2008-04-17 Eric Carlson Reviewed by Adele. Fix for QTMovieWin returns uninitialized values * platform/graphics/win/QTMovieWin.cpp: (QTMovieWin::rate): (QTMovieWin::setRate): (QTMovieWin::setVolume): (QTMovieWin::getNaturalSize): 2008-04-17 Marco Barisione Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=18335 Pango font backend unable to display japanese properly Different fonts can have different glyph indices, so we need to pass the right font when retrieving a glyph index. * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: (WebCore::pango_font_get_glyph): Temporarily override the font in the PangoAnalysis passed to pango_shape. 2008-04-17 Anders Carlsson According to Sam and David, it's "topLevel", not "toplevel". * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::topLevelApplicationCache): * loader/DocumentLoader.h: * loader/appcache/DOMApplicationCache.cpp: (WebCore::DOMApplicationCache::associatedCache): 2008-04-17 Anders Carlsson Reviewed by Sam. Add DOMApplicationCache implementation. * dom/EventNames.h: Add new event names. * dom/EventTarget.cpp: (WebCore::EventTarget::toDOMApplicationCache): * dom/EventTarget.h: Add EventTarget conversion method. * loader/appcache/ApplicationCacheGroup.h: (WebCore::ApplicationCacheGroup::): (WebCore::ApplicationCacheGroup::status): (WebCore::ApplicationCacheGroup::update): (WebCore::ApplicationCacheGroup::newestCache): Add more stubs. * loader/appcache/DOMApplicationCache.cpp: * loader/appcache/DOMApplicationCache.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::clear): (WebCore::DOMWindow::applicationCache): * page/DOMWindow.h: (WebCore::DOMWindow::optionalApplicationCache): Add ApplicationCache member. 2008-04-17 Anders Carlsson Build fix. * WebCore.vcproj/WebCore.vcproj: 2008-04-17 Dean Jackson Reviewed by Hyatt. Fix for translate method should have Y=0 when only X is present Test: fast/css/transform-default-parameter.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): translate function with only X parameter now leaves the Y parameter as zero. 2008-04-17 Anders Carlsson Reviewed by Sam. Add plumbing for associating document loaders with application caches. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::~DocumentLoader): (WebCore::DocumentLoader::originalURL): (WebCore::DocumentLoader::requestURL): (WebCore::DocumentLoader::responseURL): (WebCore::DocumentLoader::responseMIMEType): (WebCore::DocumentLoader::setCandidateApplicationCacheGroup): (WebCore::DocumentLoader::setApplicationCache): (WebCore::DocumentLoader::toplevelApplicationCache): * loader/DocumentLoader.h: (WebCore::DocumentLoader::candidateApplicationCacheGroup): (WebCore::DocumentLoader::applicationCache): * loader/appcache/ApplicationCacheGroup.h: (WebCore::ApplicationCacheGroup::documentLoaderDestroyed): 2008-04-17 Adam Roben Fix Bug 18544: REGRESSION (r31951): Two fast/xsl tests crash r31951 changed XSLTProcessor::parseErrorFunc to expect a Console* as the context parameter. The caller in XSLTProcessor was changed, but the one in XSLStyleSheet was missed. Reviewed by Alexey Proskuryakov. * xml/XSLStyleSheet.cpp: (WebCore::XSLStyleSheet::parseString): Pass the Console as the context to parseErrorFunc. 2008-04-17 Adam Roben Windows build fix after r31981 * dom/Document.idl: Omit getCSSCanvasContext from the COM bindings. 2008-04-17 Ariya Hidayat Reviewed by Simon. Implemented getFileModificationTime and pathGetFileName for the Qt port. * platform/qt/FileSystemQt.cpp: (WebCore::getFileModificationTime): 2008-04-17 Mark Rowe Fix the non-Mac builds that I broke with my Mac build fix. * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Explicitly use the size_t version of max to avoid making assumptions about sizeof(size_t). 2008-04-17 Mark Rowe Rubber-stamped by Dan Bernstein. Fix the Mac build. * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Update to use size_t in place of unsigned. * dom/NamedNodeMap.h: Ditto. * page/AccessibilityObject.h: Forward-declare AccessibilityObjectWrapper in the non-Objective-C case too. 2008-04-16 Jon Honeycutt Reviewed by Darin. Use size_t instead of unsigned where appropriate. * css/CSSValueList.h: * dom/NamedAttrMap.h: * rendering/RenderStyle.h: 2008-04-15 Jon Honeycutt Reviewed by Darin. Add some methods to check AccessibilityObject state. * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::AccessibilityObject): Assert that the passed renderer is not null. (WebCore::AccessibilityObject::isPasswordField): Refactored to use early return. (WebCore::AccessibilityObject::isPressed): Return true if this is a button in the pressed state. (WebCore::AccessibilityObject::isIndeterminate): Return true if this is a tri-state checkbox in the indeterminate state. (WebCore::AccessibilityObject::isChecked): True if this is a radio button or checkbox in the checked state. (WebCore::AccessibilityObject::isHovered): True if object is currently under the mouse cursor. (WebCore::AccessibilityObject::isMultiSelect): True if this is a select element capable of multi-select. (WebCore::AccessibilityObject::isReadOnly): False if this object has editable content. (WebCore::AccessibilityObject::isOffScreen): True if this object is not in the visible portion of the view. * page/AccessibilityObject.h: Grouped methods into is-state and is-kind. 2008-04-15 Jon Honeycutt Reviewed by Darin. Add AccessibilityObjectWrapper to Windows. * WebCore.vcproj/WebCore.vcproj: Add AccessibilityObjectWrapperWin.h * page/AccessibilityObject.h: Include COMPtr.h, AccessibilityObjectWrapperWin.h on Windows. Define wrapper() and setWrapper() if accessibility is present. Add an m_wrapper on Windows. * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::detach): Clear m_wrapper if accessibility is present. * page/win/AccessibilityObjectWrapperWin.h: Added; defines a wrapper for AccessibilityObjects on Windows. (WebCore::AccessibilityObjectWrapper::attached): Return true if attached to an object. (WebCore::AccessibilityObjectWrapper::accessibilityObject): Return the wrapped object. (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper): 2008-04-15 Jon Honeycutt Reviewed by Darin. Add AXObjectCache to Windows. * WebCore.vcproj/WebCore.vcproj: Add AXObjectCacheWin.cpp. * page/AXObjectCache.h: Add handleFocusedUIElementChanged definition to non-Mac platforms, and added stub for it. Replace PLATFORM(MAC) conditional with HAVE(ACCESSIBILITY) for stubs. (WebCore::AXObjectCache::enableAccessibility): (WebCore::AXObjectCache::accessibilityEnabled): * page/win/AXObjectCacheWin.cpp: Added; contains stubs for the methods below. (WebCore::AXObjectCache::detachWrapper): (WebCore::AXObjectCache::attachWrapper): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::postNotificationToElement): * config.h: Define HAVE_ACCESSIBILITY on Mac and Windows. 2008-04-15 Jon Honeycutt Reviewed by Darin. * WebCore.vcproj/WebCore.vcproj: Fix path to AXObjectCache.h. 2008-04-16 Brady Eidson Reviewed by Darin Adler Merge the StorageAreaClient into the StorageArea class itself as pure virtual methods. Add "LocalStorageArea" and "SessionStorageArea" implementations, and have SessionStorage and LocalStorage instantiate the appropriate type of StorageArea object. This purpose of this change is because while adding the persistent store to LocalStorage, it became obvious that the client approach wasn't scaling well. Additionally, a StorageArea backing a local storage area required vastly different data members compared to one backing a session storage area. This will be much cleaner going forward. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * storage/LocalStorage.cpp: (WebCore::LocalStorage::storageArea): * storage/LocalStorage.h: * storage/LocalStorageArea.cpp: Added. (WebCore::LocalStorageArea::LocalStorageArea): (WebCore::LocalStorageArea::itemChanged): (WebCore::LocalStorageArea::itemRemoved): (WebCore::LocalStorageArea::dispatchStorageEvent): * storage/LocalStorageArea.h: Added. (WebCore::LocalStorageArea::create): * storage/SessionStorage.cpp: (WebCore::SessionStorage::copy): (WebCore::SessionStorage::storageArea): * storage/SessionStorage.h: * storage/SessionStorageArea.cpp: Added. (WebCore::SessionStorageArea::copy): (WebCore::SessionStorageArea::SessionStorageArea): (WebCore::SessionStorageArea::itemChanged): (WebCore::SessionStorageArea::itemRemoved): (WebCore::SessionStorageArea::dispatchStorageEvent): * storage/SessionStorageArea.h: Added. (WebCore::SessionStorageArea::create): (WebCore::SessionStorageArea::page): * storage/StorageArea.cpp: (WebCore::StorageArea::StorageArea): (WebCore::StorageArea::setItem): (WebCore::StorageArea::removeItem): (WebCore::StorageArea::storageMap): * storage/StorageArea.h: * storage/StorageAreaClient.h: Removed. 2008-04-16 David Hyatt Add support for the ability to draw directly into CSS images using CanvasRenderingContext2D. Reviewed by olliej Added fast/canvas/canvas-bg.html * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * css/CSSCanvasValue.cpp: Added. (WebCore::CSSCanvasValue::~CSSCanvasValue): (WebCore::CSSCanvasValue::cssText): (WebCore::CSSCanvasValue::canvasChanged): (WebCore::CSSCanvasValue::canvasResized): (WebCore::CSSCanvasValue::fixedSize): (WebCore::CSSCanvasValue::element): (WebCore::CSSCanvasValue::image): * css/CSSCanvasValue.h: Added. (WebCore::CSSCanvasValue::CSSCanvasValue): (WebCore::CSSCanvasValue::isFixedSize): (WebCore::CSSCanvasValue::setName): * css/CSSGradientValue.cpp: * css/CSSGradientValue.h: * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::generatedImage): * css/CSSImageGeneratorValue.h: (WebCore::CSSImageGeneratorValue::isFixedSize): (WebCore::CSSImageGeneratorValue::fixedSize): * css/CSSParser.cpp: (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseBackgroundImage): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseCanvas): * css/CSSParser.h: * dom/Document.cpp: (WebCore::Document::getCSSCanvasContext): (WebCore::Document::getCSSCanvasElement): * dom/Document.h: * dom/Document.idl: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): (WebCore::HTMLCanvasElement::reset): * html/HTMLCanvasElement.h: (WebCore::HTMLCanvasElement::setSize): * rendering/RenderBox.cpp: (WebCore::RenderBox::calculateBackgroundSize): (WebCore::RenderBox::imageChanged): * rendering/RenderBox.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::imageChanged): * rendering/RenderImage.h: (WebCore::RenderImage::imagePtr): (WebCore::RenderImage::intrinsicSizeChanged): * rendering/RenderImageGeneratedContent.h: (WebCore::RenderImageGeneratedContent::imageSize): (WebCore::RenderImageGeneratedContent::imagePtr): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::layout): (WebCore::RenderListMarker::imageChanged): (WebCore::RenderListMarker::calcPrefWidths): (WebCore::RenderListMarker::getRelativeMarkerRect): * rendering/RenderListMarker.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::paintBorderImage): (WebCore::RenderObject::imageChanged): * rendering/RenderObject.h: (WebCore::RenderObject::imageChanged): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::imageChanged): * rendering/RenderSVGImage.h: * rendering/RenderStyle.cpp: (WebCore::StyleCachedImage::imageSize): (WebCore::StyleGeneratedImage::imageSize): * rendering/RenderStyle.h: (WebCore::StyleCachedImage::data): (WebCore::StyleGeneratedImage::StyleGeneratedImage): (WebCore::StyleGeneratedImage::data): (WebCore::StyleGeneratedImage::imageHasRelativeWidth): (WebCore::StyleGeneratedImage::imageHasRelativeHeight): (WebCore::StyleGeneratedImage::usesImageContainerSize): * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::imageChanged): * rendering/RenderTableCol.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::imageChanged): * rendering/RenderTableRow.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::imageChanged): * rendering/RenderTableSection.h: 2008-04-16 Anders Carlsson Reviewed by Darin. Add manifest parser. * loader/appcache/ManifestParser.cpp: (WebCore::): (WebCore::parseManifest): * loader/appcache/ManifestParser.h: * platform/text/CharacterNames.h: 2008-04-16 Darin Adler Reviewed by Mitz. - fix REGRESSION (r21452-Safari 3.1): Safari does not find words containing ß (German letter sharp-s) Test: fast/text/find-case-folding.html * platform/text/StringImpl.cpp: (WebCore::StringImpl::foldCase): Pass the folded length to foldCase rather than the original string length. Without this, we get an error code every time. 2008-04-16 Anders Carlsson Fix build. * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::ApplicationCache): (WebCore::ApplicationCache::setManifestResource): (WebCore::ApplicationCache::addResource): 2008-04-16 Anders Carlsson Reviewed by Darin. Add new protocolHostAndPortAreEqual function. * platform/KURL.cpp: (WebCore::KURL::host): (WebCore::KURL::setHost): (WebCore::KURL::setHostAndPort): (WebCore::protocolHostAndPortAreEqual): * platform/KURL.h: (WebCore::KURL::hostStart): 2008-04-16 Anders Carlsson Reviewed by Sam. Fix some style nits. * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::ApplicationCache): (WebCore::ApplicationCache::setManifestResource): (WebCore::ApplicationCache::addResource): (WebCore::ApplicationCache::removeResource): (WebCore::ApplicationCache::dump): * loader/appcache/ApplicationCacheGroup.h: 2008-04-16 Anders Carlsson Reviewed by Brady and Sam. Add ApplicationCache implementation. Stub out ApplicationCacheGroup methods needed by ApplicationCache. * loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::ApplicationCache): (WebCore::ApplicationCache::~ApplicationCache): (WebCore::ApplicationCache::setManifestResource): (WebCore::ApplicationCache::addResource): (WebCore::ApplicationCache::removeResource): (WebCore::ApplicationCache::resourceForURL): (WebCore::ApplicationCache::resourceForRequest): (WebCore::ApplicationCache::numDynamicEntries): (WebCore::ApplicationCache::dynamicEntry): (WebCore::ApplicationCache::addDynamicEntry): (WebCore::ApplicationCache::removeDynamicEntry): (WebCore::ApplicationCache::setOnlineWhitelist): (WebCore::ApplicationCache::isURLInOnlineWhitelist): (WebCore::ApplicationCache::dump): * loader/appcache/ApplicationCache.h: (WebCore::ApplicationCache::create): (WebCore::ApplicationCache::manifestResource): (WebCore::ApplicationCache::group): (WebCore::ApplicationCache::begin): (WebCore::ApplicationCache::end): * loader/appcache/ApplicationCacheGroup.h: (WebCore::ApplicationCacheGroup::manifestURL): (WebCore::ApplicationCacheGroup::cacheDestroyed): 2008-04-16 Adam Roben Fix Bug 18505: REGRESSION: Search is disabled and not functional Reviewed by Tim Hatcher. * page/inspector/ResourcesPanel.js: (WebInspector.ResourcesPanel.sourceFrameForResource): Added. * page/inspector/inspector.css: Added back rules for the search field that were removed in r31736. * page/inspector/inspector.html: - Removed the disabled attribute from the search field - Added back the #searchResults and #searchResultsResizer divs which were removed in r31736 * page/inspector/inspector.js: (WebInspector.set showingSearchResults): Updated for class rename panels -> main-panels. (WebInspector.loaded): Added back the mousedown event listener for the search results resizer that was removed in r31736. (WebInspector.searchResultsResizerDrag): Updated for class rename panels -> main-panels. (WebInspector.performSearch): - Changed to use sourceFrameForResource - Changed to use showResource - Changed to save/restore the focused element around the setting of the current panel - Changed to get the source document from the match range instead of by crawling back up to the source view - Changed to bind the onselect handlers to this so that we can access the Elements/Resources panels 2008-04-16 Brady Eidson Reviewed by Sam Weinig Changing ThreadSafeShared to start with a ref count of 1, so updating all users to adoptRef() that initial reference. * bindings/js/JSCustomSQLStatementCallback.h: (WebCore::JSCustomSQLStatementCallback::create): * bindings/js/JSCustomSQLStatementErrorCallback.h: (WebCore::JSCustomSQLStatementErrorCallback::create): * bindings/js/JSCustomSQLTransactionCallback.h: (WebCore::JSCustomSQLTransactionCallback::create): * bindings/js/JSCustomSQLTransactionErrorCallback.h: (WebCore::JSCustomSQLTransactionErrorCallback::create): * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::JSDatabase::transaction): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * dom/Document.cpp: (WebCore::Document::databaseThread): * platform/SecurityOrigin.cpp: (WebCore::SecurityOrigin::create): * platform/sql/SQLiteAuthorizer.h: (WebCore::SQLiteAuthorizer::create): (WebCore::SQLiteAuthorizer::SQLiteAuthorizer): * storage/ChangeVersionWrapper.cpp: (WebCore::ChangeVersionWrapper::performPreflight): (WebCore::ChangeVersionWrapper::performPostflight): * storage/ChangeVersionWrapper.h: (WebCore::ChangeVersionWrapper::create): * storage/Database.cpp: (WebCore::Database::openAndVerifyVersion): (WebCore::Database::markAsDeletedAndClose): (WebCore::Database::changeVersion): (WebCore::Database::transaction): (WebCore::Database::scheduleTransaction): (WebCore::Database::scheduleTransactionStep): (WebCore::Database::tableNames): * storage/DatabaseAuthorizer.h: (WebCore::DatabaseAuthorizer::create): * storage/DatabaseTask.h: (WebCore::DatabaseOpenTask::create): (WebCore::DatabaseCloseTask::create): (WebCore::DatabaseTransactionTask::create): (WebCore::DatabaseTableNamesTask::create): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::scheduleTask): Change to take a PassRefPtr instead of raw (WebCore::DatabaseThread::scheduleImmediateTask): Ditto * storage/DatabaseThread.h: (WebCore::DatabaseThread::create): * storage/SQLError.h: (WebCore::SQLError::create): (WebCore::SQLError::SQLError): * storage/SQLResultSet.h: (WebCore::SQLResultSet::create): * storage/SQLStatement.cpp: (WebCore::SQLStatement::create): (WebCore::SQLStatement::execute): (WebCore::SQLStatement::setDatabaseDeletedError): (WebCore::SQLStatement::setVersionMismatchedError): (WebCore::SQLStatement::setFailureDueToQuota): * storage/SQLStatement.h: * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::create): (WebCore::SQLTransaction::executeSQL): (WebCore::SQLTransaction::openTransactionAndPreflight): (WebCore::SQLTransaction::deliverTransactionCallback): (WebCore::SQLTransaction::handleCurrentStatementError): (WebCore::SQLTransaction::deliverStatementCallback): (WebCore::SQLTransaction::postflightAndCommit): * storage/SQLTransaction.h: 2008-04-16 Anders Carlsson Reviewed by Adam and Brady. Add implementation of ApplicationCacheResource. * loader/appcache/ApplicationCacheResource.cpp: (WebCore::ApplicationCacheResource::ApplicationCacheResource): (WebCore::ApplicationCacheResource::dumpType): * loader/appcache/ApplicationCacheResource.h: (WebCore::ApplicationCacheResource::): (WebCore::ApplicationCacheResource::create): (WebCore::ApplicationCacheResource::type): (WebCore::ApplicationCacheResource::addType): 2008-04-16 Timothy Hatcher Fixes an issue where the source for a resource that had errors would not be shown because the view was created before the resource load finished. The right view is now created, even if the resource isn't finished. The SourceView just makes sure to not load the source until the resource is finished. Only if the category changes, does the view need to be recreated. Reviewed by Adam Roben. * page/inspector/Resource.js: (WebInspector.Resource.prototype.set category): Call recreateViewForResourceIfNeeded. * page/inspector/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.recreateViewForResourceIfNeeded): Added. Tries to make a new view, if the view is the same prototype of the previous view, return early. If they differ, close and detach the old view and associate the resource with the new view. Calling updateErrorsAndWarnings is needed, because the errors and warnings that might have been added to the previous view will be lost, so make the tree element match. (WebInspector.Resource.prototype._createResourceView): Always create a view that matches the resource category. Ignore the loading and failed status. * page/inspector/SourceView.js: (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): Don't setup the frame if the resource hasn't finished or if the load failed. 2008-04-16 Timothy Hatcher Adds a console formatter for Error objects. So typing a expression in the console that ends in an exception will print meaningful info. Also calling console.{log,error,warn,info} with an error object will output nicely. Reviewed by Adam Roben. * page/inspector/Console.js: (WebInspector.Console.prototype._formaterror): Added. Formats an error object by showing it like other exceptions, with a clickable file URL. 2008-04-16 Timothy Hatcher Refactors code that updates the errors and warnings count in the resources sidebar so other functions can easily trigger updates. Reviewed by Adam Roben. * page/inspector/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.addMessageToResource): Call updateErrorsAndWarnings. Removes code that updates the bubbleText and class names. (WebInspector.ResourcesPanel.prototype.clearMessages): Ditto. (WebInspector.ResourceSidebarTreeElement.prototype.updateErrorsAndWarnings): Added. Updates the bubbleText and adds or removes the class names depending on if the values are zero. 2008-04-16 Antti Koivisto Reviewed by Alexey. Fix REGRESSION: Garbage character shown in temperatures in the Weather widget (encoding issue with degree symbol) Parse the encoding attribute in PreloadScanner. Test: fast/encoding/script-preload-encoding.html * html/PreloadScanner.cpp: (WebCore::PreloadScanner::processAttribute): (WebCore::PreloadScanner::emitTag): (WebCore::PreloadScanner::emitCSSRule): * html/PreloadScanner.h: * loader/DocLoader.cpp: (WebCore::DocLoader::preload): * loader/DocLoader.h: 2008-04-16 Anders Carlsson Reviewed by Adam. Generate the DOMApplicationCache JS wrapper, add JSDOMApplicationCacheCustom.cpp and fix typos in the #if line. * DerivedSources.make: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMApplicationCacheCustom.cpp: Added. * loader/appcache/ApplicationCache.cpp: * loader/appcache/ApplicationCache.h: * loader/appcache/ApplicationCacheGroup.cpp: * loader/appcache/ApplicationCacheGroup.h: * loader/appcache/ApplicationCacheResource.cpp: * loader/appcache/ApplicationCacheResource.h: * loader/appcache/DOMApplicationCache.cpp: * loader/appcache/DOMApplicationCache.h: * loader/appcache/DOMApplicationCache.idl: * loader/appcache/ManifestParser.cpp: * loader/appcache/ManifestParser.h: 2008-04-16 Sam Weinig Reviewed by Geoffrey Garen. - To keep the behavior of the WebKit and JavaScriptCore API's the same, we need to hide the fact that the global object and the window object are no longer the same thing, and the the global object now changes on navigations. To do this, only the wrapper should ever be exposed. This fixes the two remaining spots where the internal global object is exposed, the windowScriptObject returned from [WebFrame windowObject] and the object return by calling JSContextGetGlobalObject on [WebFrame globalContext] * bindings/js/JSDOMWindowWrapper.cpp: (WebCore::JSDOMWindowWrapper::putWithAttributes): * bindings/js/JSDOMWindowWrapper.h: Forward this new method so that JSObjectSetProperty doesn't set properties on the wrapper. * page/mac/FrameMac.mm: (WebCore::Frame::windowScriptObject): Return the wrapper instead of the global object. 2008-04-16 David Hyatt Eliminate the paintBuffer and drawImage(ImageBuffer*) methods from GraphicsContext* in favor of just snagging an Image* from the ImageBuffer and drawing that instead. Enhance canvas with a CanvasObserver so that notifications of dirtying or resizing can be tracked by a consumer. Reviewed by olliej * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): (WebCore::HTMLCanvasElement::willDraw): (WebCore::HTMLCanvasElement::reset): (WebCore::HTMLCanvasElement::paint): * html/HTMLCanvasElement.h: (WebCore::CanvasObserver::~CanvasObserver): (WebCore::HTMLCanvasElement::setSize): (WebCore::HTMLCanvasElement::setObserver): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImage): (WebCore::GraphicsContext::drawTiledImage): * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::clearImage): * platform/graphics/cairo/GraphicsContextCairo.cpp: * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::draw): (WebCore::Image::drawPattern): * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::createFrameAtIndex): * platform/graphics/qt/GraphicsContextQt.cpp: * platform/graphics/wx/GraphicsContextWx.cpp: 2008-04-16 Steve Falkenburg Improve timer latency/resolution. The primary timing mechanism is now CreateTimerQueueTimer, with a PostMessage from the callback proc. This event will be delivered sooner than if we used SetTimer(), since it is higher priority than other messages. If there is an input message pending, we'll use we SetTimer() based timers to avoid starving user input. Don't call PostMessage immediately on all timers < 10ms. Only call immediately if timer is already expired. This avoids the case where no timers would be processed, causing the timer to be re-posted via the slower SetTimer method. Don't call PostMessage immediately if there's a pending WM_PAINT, since we don't want to starve all paints when bombarded with a continuous stream of low duration timers. Removed reentrancy check, since we're now looking for specific starvation cases, and will typically defer non-expired timers through CreateTimerQueueTimer. The reason Windows wouldn't starve paints in favor of timers with the old code: When we went to reset the timer when it fired, the timer reset code treated this as a reentrant timer, causing us to hit the slow SetTimer code rather than calling PostMessage, even for timers expiring in < 10ms.  I corrected that, exposing the paint starvation problem. Use timeBeginPeriod/timeEndPeriod to improve resolution of system timers. Limit this resolution change to within 20ms of the last high resolution timer request. Corrected GetQueueStatus to check for specific input (and paint) messages rather than checking QS_ALLINPUT. Contrary to its name, QS_ALLINPUT actually indicates interest in ALL queued messages, not just input messages. Fix SetTimer/KillTimer calls to pass our window handle. Reviewed by Brady. * platform/win/SharedTimerWin.cpp: (WebCore::): (WebCore::TimerWindowWndProc): (WebCore::queueTimerProc): (WebCore::setSharedTimerFireTime): (WebCore::stopSharedTimer): 2008-04-16 Adam Roben Fix console-log-formatting to truly test formatting an undefined value Exceptions thrown by the test will also now be shown as errors. Reviewed by Tim Hatcher. * manual-tests/inspector/console-log-formatting.html: (test): Use console.error to report exceptions. (runTests): Use window.noSuchVariable instead of just noSuchVariable to avoid an exception. 2008-04-16 Anatoli Papirovski Reviewed by David. Optimized the calculation of background-size. * rendering/RenderBox.cpp: (WebCore::RenderBox::calculateBackgroundSize): 2008-04-16 Adam Roben Fix Bug 17228: console.{log,warn,info,error} should support format strings, variable arguments Reviewed by Tim Hatcher. Test: manual-tests/inspector/console-log-formatting.html * page/inspector/Console.js: (WebInspector.ConsoleMessage): Pass any extra arguments down to _format. (WebInspector.ConsoleMessage._format): This method constructs this.formattedMessage. We treat the first parameter as a format string. Any parameters that have not been used after substituting into the format string are concatenated together, separated by spaces. (WebInspector.ConsoleMessage.toMessageElement): Updated to use this.formattedMessage. (WebInspector.ConsoleMessage.toString): Ditto. 2008-04-15 Adam Roben Make String.format return an array of unused substitutions String.format now returns an object with two properties: formattedResult and unusedSubstitutions. Reviewed by Tim Hatcher. * page/inspector/utilities.js: (String.vsprintf): Updated for changes to String.format. We throw away the array of unused substitutions. (String.format): Changed to keep track of which substitutions are used when formatting. We then return both the formatted result and the array of unused substitutions. 2008-04-15 Adam Roben Generalize String.format some more String.format now takes an initial value and an append function which it uses to build the result. Each time a token is processed, append(valueSoFar, newValue) is called. Reviewed by Tim Hatcher. * page/inspector/utilities.js: (String.vsprintf): Pass the empty string for the initial value, and a function that concatenates two strings as the append function. (String.format): Use initialValue and append to build the result instead of only working with strings. 2008-04-15 Adam Roben Add String.format String.format is a more generic form of String.vsprintf that takes a set of formatter functions, one for each supported format specifier. Each formatter function is passed the relevant token and substitution value, and returns the formatted result. Reviewed by Tim Hatcher. * page/inspector/utilities.js: (String.standardFormatters): Added. (String.vsprintf): Changed to call through to String.format. (String.format): Added. Most of the code came from String.vsprintf, except that we use the passed-in formatters to format the substitutions rather than hard-coding how to handle each format specifier. 2008-04-15 Adam Roben Refactor String.vsprintf to separate tokenizing and substituting This will eventually be useful for the various console methods that take a format string. Reviewed by Tim Hatcher. * page/inspector/utilities.js: (String.tokenizeFormatString): Added. This uses the format parsing code from String.vsprintf but just returns an array of "string" and "specifier" tokens. (String.vsprintf): Now calls String.tokenizeFormatString and processes the tokens one at a time. 2008-04-15 Adam Roben Pass all arguments to console.{log,warn,info,error} into the Inspector's JS Part of Bug 17228: console.{log,warn,info,error} should support format strings, variable arguments We don't use the extra arguments yet. Reviewed by Tim Hatcher. * page/Console.cpp: (WebCore::Console::error): Pass the arguments list to InspectorController. (WebCore::Console::info): Ditto. (WebCore::Console::log): Ditto. (WebCore::Console::warn): Ditto. * page/InspectorController.cpp: (WebCore::ConsoleMessage::ConsoleMessage): Added a new constructor that takes an ExecState and a List instead of a String. We wrap and store the JSValues from the List in a Vector >. (WebCore::InspectorController::addMessageToConsole): Added an overload that takes an ExecState and a List. (WebCore::InspectorController::addConsoleMessage): Moved code here from addMessageToConsole. Both overloads of addMessageToConsole now call this helper method. (WebCore::InspectorController::addScriptConsoleMessage): Updated for the new parameter order of WebInspector.ConsoleMessage. If the ConsoleMessage has a non-empty wrappedArguments Vector, we use that instead of the ConsoleMessage's message String. * page/InspectorController.h: * page/inspector/Console.js: (WebInspector.ConsoleMessage): Removed the explicit message parameter. We now get the message from the unnamed 5th parameter. * page/inspector/Resource.js: Updated for the change to WebInspector.ConsoleMessage's parameter order. 2008-04-15 Adam Roben Change calls to Chrome::addMessageToConsole to use Console::addMessage Part of Bug 17228: console.{log,warn,info,error} should support format strings, variable arguments Console now takes care of calling ChromeClient::addMessageToConsole for the appropriate messages (i.e., just messages from JavaScript). If you ever want to add a message to the console, Console is the place to do it. Reviewed by Darin Adler. * WebCore.xcodeproj/project.pbxproj: Mark Console.h Private. * page/Chrome.cpp: Removed addMessageToConsole * page/Chrome.h: Moved MessageSource/MessageLevel to Console.h. * page/Console.cpp: (WebCore::Console::addMessage): Added. Calls ChromeClient::addMessageToConsole for JS messages, and calls InspectorController::addMessageToConsole for all messages. (WebCore::Console::error): Changed to call directly to InspectorController in addition to ChromeClient. (WebCore::Console::info): Ditto. (WebCore::Console::log): Ditto. (WebCore::Console::warn): Ditto. * page/Console.h: Added MessageSource/MessageLevel enums from Chrome.h. 2008-04-15 Adam Roben Pass JSConsole's arguments unmodified to Console Part of Bug 17228: console.{log,warn,info,error} should support format strings, variable arguments All of JSConsole's methods are now custom, so that we can pass the arguments unmodified to Console. Console now handles calling toString() on the first argument. Later it will pass the arguments off to InspectorController. There should be no behavioral changes caused by this patch. Reviewed by Darin Adler. * ForwardingHeaders/kjs/list.h: Added. * GNUmakefile.am: Added JSConsoleCustom.cpp to the project. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCoreSources.bkl: Ditto. * bindings/js/JSConsoleCustom.cpp: Added. (WebCore::JSConsole::error): (WebCore::JSConsole::info): (WebCore::JSConsole::log): (WebCore::JSConsole::warn): * page/Console.cpp: Changed all methods to take an ExecState* and a const List&. The first item in the List is toString()ed and passed to Chrome. (WebCore::Console::error): (WebCore::Console::info): (WebCore::Console::log): (WebCore::Console::warn): * page/Console.h: * page/Console.idl: 2008-04-16 Sam Weinig Reviewed by Darin Adler. Rename kjs_strtod to KJS::strtod. * platform/text/String.cpp: (WebCore::charactersToDouble): 2008-04-16 Alexey Proskuryakov Reviewed by Adam. http://bugs.webkit.org/show_bug.cgi?id=18259 XML+XSLT pages in iframe contains document.location of a parent window Test: fast/xsl/subframe-location.html * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::createDocumentFromSource): Set resulting document URL before opening it, so that the document loader picks a correct URL, too. 2008-04-16 Dan Bernstein Rubber-stamped by John Sullivan. - remove unreachable code which was added in r8802 * rendering/RenderText.cpp: (WebCore::RenderText::caretRect): 2008-04-15 Timothy Hatcher Adds a script resource icon. Update the CSS icon to better match the script icon. https://bugs.webkit.org/show_bug.cgi?id=18499 Rubber-stamped by Adele Peterson. * page/inspector/Images/resourceCSSIcon.png: Updated. * page/inspector/Images/resourceJSIcon.png: Added. * page/inspector/inspector.css: Changed the script icon rule to reference the new image. 2008-04-16 Eric Seidel Reviewed by hyatt. Fix leaky ImageBuffer code. * platform/graphics/GeneratedImage.cpp: (WebCore::GeneratedImage::drawPattern): * platform/graphics/ImageBuffer.h: * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::image): 2008-04-15 Justin Garcia Reviewed by Oliver. REGRESSION (r27369): Paste text into a contenteditable div creates a contenteditable div for each line (16661) * editing/markup.cpp: (WebCore::createFragmentFromText): Don't use clones of the enclosing block to hold paragraphs if the enclosing block is the root editable element. 2008-04-15 Mark Rowe Reviewed by Jon Honeycutt. Don't treat the misnamed NSAccessibilitySortButtonRole as an accessibility role. It is really a subrole of NSAccessibilityButtonRole. As it is not used inside WebCore there is no change in behaviour as a result of doing this. This fixes . * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::canSetFocusAttribute): Remove SortButtonRole as it is unused. * page/AccessibilityObject.h: Ditto. (WebCore::): * page/mac/AccessibilityObjectWrapper.mm: (RoleEntry::): 2008-04-15 Anders Carlsson Fix leaks seen on bot. * loader/SubstituteResource.h: (WebCore::SubstituteResource::~SubstituteResource): Add a virtual destructor. 2008-04-15 Brady Eidson Reviewed by Anders Carlsson Fix for - Crash sometime occurs when interrupting a load. Each SubresourceLoader has a client. That client is often a Loader::Host object. The Loader/Host/CachedResource system predates our ref-counting and ownership models, and therefore manages object lifetime manually. The cause of this crash was that we would sometimes call "didFail()" on a Host object twice - Once when beginning the new navigation, and once when the new navigation is committed. The problem is after the first time Host::didFail() gets called, the Host is almost always deleted shortly thereafter. But the SubresourceLoader had a dangling pointer to the Host which is now invalid. I explored a few options to fix this bug. The one that was most obviously "clean" was to call cancel() on the SubresourceLoader itself, which would end up calling Host::didFail() and doing the appropriate cache cleanup. This problem with that approach was that it had other side effects - when you cut off a load that had already partially displayed in the WebView, images that hadn't finished loading would be invalidated and immediately turn into broken image icons. This was visually jarring and pretty unacceptable. So I decided to follow a much simpler approach, which was to have the Host clear the client pointer from each SubresourceLoader before it forgets about it. This leaves things the same visually and fixes the crash. Note that the layout test for this - if possible - will require other enhancements to DRT including possibly adding support for window.stop(). That task is non-trivial, and is documented in * loader/SubresourceLoader.h: (WebCore::SubresourceLoader::clearClient): Add a method to clear the SubresourceLoaderClient. This is perfectly safe to do on an in-flight SubresourceLoader as they are already designed to be client-less, and already null-check the client before calling it. * loader/loader.cpp: (WebCore::Loader::Host::didFail): The SubresourceLoader itself might not be finished loading and might decide to call into its client later. Since the client has no guaranteed lifetime and is liable to be deleted after didFail() is called, call clearClient() on the SubresourceLoader so such an invalid call can't happen. 2008-04-15 Anders Carlsson Reviewed by Adam. Add empty files for the application cache. * Configurations/WebCore.xcconfig: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/build-generated-files.sh: Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES. * WebCore.xcodeproj/project.pbxproj: * loader/appcache: Added. * loader/appcache/ApplicationCache.cpp: Added. * loader/appcache/ApplicationCache.h: Added. * loader/appcache/ApplicationCacheGroup.cpp: Added. * loader/appcache/ApplicationCacheGroup.h: Added. * loader/appcache/ApplicationCacheResource.cpp: Added. * loader/appcache/ApplicationCacheResource.h: Added. * loader/appcache/DOMApplicationCache.cpp: Added. * loader/appcache/DOMApplicationCache.h: Added. * loader/appcache/DOMApplicationCache.idl: Added. * loader/appcache/ManifestParser.cpp: Added. * loader/appcache/ManifestParser.h: Added. 2008-04-15 Kevin McCullough Reviewed by Tim. - AJAX (XMLHttpRequest) support for the Inspector (17776) - Add XMLHttpRequest support to the inspector. * English.lproj/InspectorLocalizedStrings.js: Specify capitalization instead of using text-transform because XHR must capitalize all the letters. * page/inspector/Resource.js: Assume XHRs are textType even though this may not always be true. Also add the XHR category and let all mime types be consistent with it. * page/inspector/ResourcesPanel.js: Set the XHR category color. * page/inspector/inspector.css: Make XHRs yellow and fonts red because XHRs are more common than fonts and yellow next to orange (scripts) is not as harsh on the eyes as red next to orange. * page/inspector/inspector.js: Specify capitalization again. 2008-04-15 David Hyatt Fix the zoom property so that it works properly with font-size. Reviewed by John Sullivan Added fast/css/zoom-font-size.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::updateFont): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::checkForZoomChange): * css/CSSStyleSelector.h: 2008-04-15 Timothy Hatcher Fixes the bug where a resource view could still be shown after the inspected page navigates to another page. https://bugs.webkit.org/show_bug.cgi?id=18517 Reviewed by Adam Roben. * page/inspector/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.reset): Close the visible resource. Iterate over all the resources and zero errors and warnings and delete the resource view and tree element. Removes all children of resourceViews. Passes true to _updateGraphDividersIfNeeded to force an immediate update. (WebInspector.ResourcesPanel.prototype.removeResource): Added. Closes the resource view if it is visible. Removes the resource from the _resources array. Removes the tree element from the outline tree. Zeros out the errors and warnings properties. Deletes the tree element and resource view properties. (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Null check this._calculator for times when reset is called before the calculator is set. * page/inspector/inspector.js: (WebInspector.removeResource): Call ResourcesPanel.removeResource. 2008-04-15 Anders Carlsson Reviewed by Adam. Rename "archive" to "substitute" in a couple of places. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::clearArchiveResources): (WebCore::DocumentLoader::deliverSubstituteResourcesAfterDelay): (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired): (WebCore::DocumentLoader::isSubstituteLoadPending): (WebCore::DocumentLoader::cancelPendingSubstituteLoad): (WebCore::DocumentLoader::scheduleArchiveLoad): (WebCore::DocumentLoader::setDefersLoading): * loader/DocumentLoader.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::load): (WebCore::ResourceLoader::didCancel): 2008-04-15 Anders Carlsson Reviewed by Adam. Move the URL, response and data to SubstituteResource. * loader/SubstituteResource.h: (WebCore::SubstituteResource::url): (WebCore::SubstituteResource::response): (WebCore::SubstituteResource::data): (WebCore::SubstituteResource::SubstituteResource): * loader/archive/ArchiveResource.cpp: (WebCore::ArchiveResource::ArchiveResource): * loader/archive/ArchiveResource.h: (WebCore::ArchiveResource::frameName): 2008-04-15 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=18467 Make sure to ignore zoom:0. That is not supposed to actually do anything. It's a hack in IE to cause an element to set "hasLayout." Reviewed by Anders Added fast/css/zoom-property-parsing.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2008-04-15 Anders Carlsson Reviewed by Adam. Add a (currently empty) SubstituteResource class and make ArchiveResource inherit from it. * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/SubstituteResource.h: Added. * loader/archive/ArchiveResource.h: 2008-04-15 Antti Koivisto Reviewed by Geoff. Fix REGRESSION: Leak in SVGSVGElement::SVGSVGElement In these strange days RefCounted starts with count of one. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::SVGSVGElement): * svg/animation/SMILTimeContainer.h: (WebCore::SMILTimeContainer::create): 2008-04-15 Anatoli Papirovski Reviewed by hyatt [CSS1, CSS3] Fixed the background-origin calculation for root elements (background-size and background-position are affected), r10794 [CSS3] Fixed the background-size transformation where width is specified in percentage and height is left to auto Test: fast/backgrounds/background-origin-root-element.html * rendering/RenderBox.cpp: (WebCore::RenderBox::calculateBackgroundSize): (WebCore::RenderBox::calculateBackgroundImageGeometry): 2008-04-15 Timothy Hatcher Fixes the regression where the error and warning counts did not show up in the Resources sidebar next to resources. https://bugs.webkit.org/show_bug.cgi?id=18494 Reviewed by Adam Roben. * page/inspector/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.addMessageToResource): Increment errors or warnings on the resource. Set the bubbleText to the total of the errors and warnings. Add a error or warning class to the bubble. (WebInspector.ResourcesPanel.prototype.clearMessages): Zero out the errors and warnings properties on each resource. Set the bubbleText back to an empty string. * page/inspector/SidebarTreeElement.js: (WebInspector.SidebarTreeElement): Create a statusElement. (WebInspector.SidebarTreeElement.prototype.get bubbleText): Return _bubbleText. (WebInspector.SidebarTreeElement.prototype.set bubbleText): Create bubbleElement if needed. Assign the value to _bubbleText and bubbleElement.textContent. (WebInspector.SidebarTreeElement.prototype.onattach): Append statusElement to _listItemNode. * page/inspector/inspector.css: Style rules for bubbles and status elements. 2008-04-15 Timothy Hatcher Fixes the regression where error and warning bubbles would not be added to the source view of a resource. https://bugs.webkit.org/show_bug.cgi?id=18495 Reviewed by Adam Roben. * css/view-source.css: (.webkit-html-message-bubble): Add a min-height to make sure the border-radius has enough room to apply. * page/inspector/Console.js: (WebInspector.Console.prototype.addMessage): Removed code that added messages to resource panels and incremented error and warning counts on resources. Now just call ResourcesPanel.addMessageToResource after assigning the resource to the console message. (WebInspector.Console.prototype.clearMessages): Removed code that cleared error and warning counts from resources an call ResourcesPanel.clearMessages. * page/inspector/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.addMessageToResource): Call addMessage on the resource's view, if it is implemented. (WebInspector.ResourcesPanel.prototype.clearMessages): Call clearMessages on all the resource views for the ones that implement it. (WebInspector.ResourcesPanel.prototype.refreshResource): Call _resourceView to make the resource's view if needed. Use a local view variable. (WebInspector.ResourcesPanel.prototype._resourceView): Added helper function to create a resource view if needed. * page/inspector/SourceView.js: (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded): Delete the _frameNeedsSetup property at the beginning to prevent recursion. Get the length of the messages array when assigning the local length variable. (WebInspector.SourceView.prototype.addMessage): Renamed from addMessageToSource. (WebInspector.SourceView.prototype.clearMessages): Added. Clear all the message bubbles that might be sprinkled in the source. Also clears the messages array. (WebInspector.SourceView.prototype._addMessageToSource): Create the image element in the Inspector's document so we can use relative image URLs. Then adopt the image element into the frame's document. 2008-04-15 Brady Eidson Reviewed by Anders Hook up event dispatching for window.localStorage changes. Tests: storage/domstorage/localstorage/enumerate-storage.html storage/domstorage/localstorage/iframe-events.html storage/domstorage/localstorage/index-get-and-set.html storage/domstorage/localstorage/onstorage-attribute-markup.html storage/domstorage/localstorage/onstorage-attribute-setattribute.html storage/domstorage/localstorage/simple-events.html storage/domstorage/localstorage/simple-usage.html storage/domstorage/localstorage/window-open.html * storage/LocalStorage.cpp: (WebCore::LocalStorage::dispatchStorageEvent): Walk every Page in the PageGroup, adding each Frame that matches the storage area's security origin to a Vector. Then dispatch the StorageEvent to each Frame in the Vector * storage/SessionStorage.cpp: (WebCore::SessionStorage::dispatchStorageEvent): Adopt the technique used in LocalStorage, which is to only add the Frames to the Vector if their security origin matches 2008-04-15 Olivier Goffart Reviewed by Simon. Fixes: copy to clipboard when selecting, and paste when clicking with the middle button * platform/Pasteboard.h: Added Qt-specific selection mode * platform/qt/PasteboardQt.cpp: Choose the clipboard or the selecton according to the selection mode (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::plainText): (WebCore::Pasteboard::documentFragment): (WebCore::Pasteboard::writeURL): (WebCore::Pasteboard::clear): (WebCore::Pasteboard::isSelectionMode): 2008-04-15 Andre Poenitz Reviewed by Simon. Fix compilation with Qt namespaces Qt can be configured to have all of its classes inside a specified namespaces. This is for example used in plugin/component environments like Eclipse. This change makes it possible to let the Qt port compile against a namespaced Qt by the use of macros Qt provides to properly forward declare Qt classes in the namespace. * WebCore.pro: * bridge/qt/qt_class.h: * bridge/qt/qt_instance.h: * html/HTMLCanvasElement.h: * platform/DragData.h: * platform/DragImage.h: * platform/KURL.h: * platform/PlatformKeyboardEvent.h: * platform/PlatformMouseEvent.h: * platform/PlatformWheelEvent.h: * platform/Widget.h: * platform/graphics/Color.h: * platform/graphics/FloatPoint.h: * platform/graphics/FloatRect.h: * platform/graphics/Gradient.h: * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: * platform/graphics/ImageSource.h: * platform/graphics/IntPoint.h: * platform/graphics/IntRect.h: * platform/graphics/IntSize.h: * platform/graphics/Path.h: * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: * platform/graphics/qt/MediaPlayerPrivatePhonon.h: * platform/network/qt/QNetworkReplyHandler.h: * platform/network/qt/ResourceRequest.h: * platform/qt/ClipboardQt.h: * platform/qt/RenderThemeQt.h: * platform/text/PlatformString.h: * platform/text/qt/TextCodecQt.h: * svg/graphics/SVGPaintServer.h: * svg/graphics/SVGPaintServerGradient.h: 2008-04-14 Brady Eidson Reviewed by Anders Lay the underpinnings for LocalStorage. For now, this just exposes window.localStorage to the dom which returns an in-memory Storage object, much like SessionStorage. The primary difference at this point is that the object returned is shared globally, and isn't copied for new top-level browsing contexts like SessionStorage. Later, I'll add proper event dispatch and a persistent storage backing. * GNUmakefile.am: * WebCore.base.exp: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::mark): Mark the optionalLocalStorage * page/DOMWindow.cpp: (WebCore::DOMWindow::clear): (WebCore::DOMWindow::localStorage): * page/DOMWindow.h: (WebCore::DOMWindow::optionalLocalStorage): * storage/LocalStorage.cpp: Added. (WebCore::LocalStorage::sharedLocalStorage): (WebCore::LocalStorage::LocalStorage): (WebCore::LocalStorage::storageArea): (WebCore::LocalStorage::itemChanged): (WebCore::LocalStorage::itemRemoved): (WebCore::LocalStorage::dispatchStorageEvent): * storage/LocalStorage.h: Added. * storage/SessionStorage.cpp: Refactor to use the client interface for event dispatching for sessionStorage objects (WebCore::SessionStorage::SessionStorage): (WebCore::SessionStorage::copy): (WebCore::SessionStorage::storageArea): (WebCore::SessionStorage::itemChanged): (WebCore::SessionStorage::itemRemoved): (WebCore::SessionStorage::dispatchStorageEvent): * storage/SessionStorage.h: * storage/StorageArea.cpp: Add a client parameter, and call to the client when an item is changed or removed. (WebCore::StorageArea::create): (WebCore::StorageArea::StorageArea): (WebCore::StorageArea::copy): (WebCore::StorageArea::setItem): (WebCore::StorageArea::removeItem): (WebCore::StorageArea::setClient): * storage/StorageArea.h: (WebCore::StorageArea::page): (WebCore::StorageArea::securityOrigin): * storage/StorageAreaClient.h: Added. Break out "itemChanged" and "itemRemoved" to a StorageAreaClient This way, both SessionStorage and LocalStorage areas can have different behavior on changes with that behavior managed from a central location. (WebCore::StorageAreaClient::~StorageAreaClient): (WebCore::StorageAreaClient::StorageAreaClient): (WebCore::StorageAreaClient::itemChanged): (WebCore::StorageAreaClient::itemRemoved): 2008-04-14 Brady Eidson Reviewed by Anders Add a hidden pref to debug WebArchive loading. With this pref on, when loading a WebArchive, if the resource isn't in the ArchiveResourceCollection, the loader will not fall back to the network and will instead fail the load with a "cannot show URL" error. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::load): Do the check here. * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setWebArchiveDebugModeEnabled): * page/Settings.h: (WebCore::Settings::webArchiveDebugModeEnabled): 2008-04-14 Antti Koivisto Reviewed by Eric. Some preparations for additive animations and animations in . - Disallow animation elements in instance trees. - Fix buggy SVGUseElement::removeDisallowedElementsFromSubtree(), make it public and static - Invoke it from SVGElementInstance::updateInstance() to clean up the instance tree there as well. - Add mechanism for blocking instance updates when an animation changes the referenced tree. The added assert in SVGSMILElement::insertedIntoDocument() verifies the fixes with the existing test cases. * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::updateInstance): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::updateElementInstance): (WebCore::SVGStyledElement::setInstanceUpdatesBlocked): * svg/SVGStyledElement.h: * svg/SVGUseElement.cpp: (WebCore::isDisallowedElement): (WebCore::SVGUseElement::removeDisallowedElementsFromSubtree): * svg/SVGUseElement.h: * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::insertedIntoDocument): (WebCore::SVGSMILElement::isSMILElement): (WebCore::SVGSMILElement::connectConditions): (WebCore::SVGSMILElement::disconnectConditions): * svg/animation/SVGSMILElement.h: 2008-04-14 Adam Roben Don't let the inspected page overwrite properties of JS objects in the Inspector Reviewed by Sam Weinig and Geoff Garen. Tests (contributed by Adam Barth and Collin Jackson): manual-tests/inspector-wrappers * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: Added new files to the projects. * bindings/js/JSQuarantinedObjectWrapper.cpp: Added. (WebCore::): (WebCore::JSQuarantinedObjectWrapper::asWrapper): Converts a JSValue into a JSQuarantinedObjectWrapper, if the JSValue is in fact a JSQuarantinedObjectWrapper. (WebCore::JSQuarantinedObjectWrapper::cachedValueGetter): Callback to be used with PropertySlot. (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper): Hold onto the object we're wrapping and its global object. Pass the wrapped prototype up to the JSObject constructor. (WebCore::JSQuarantinedObjectWrapper::~JSQuarantinedObjectWrapper): (WebCore::JSQuarantinedObjectWrapper::unwrappedExecStateMatches): Returns true if our underlying object originated from the same global object as the passed-in ExecState. (WebCore::JSQuarantinedObjectWrapper::unwrappedExecState): (WebCore::JSQuarantinedObjectWrapper::transferExceptionToExecState): Wraps and moves an exception from our underlying ExecState to the passed-in one. (WebCore::JSQuarantinedObjectWrapper::mark): Marks ourselves and the objects we're holding references to. (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot): (WebCore::JSQuarantinedObjectWrapper::put): (WebCore::JSQuarantinedObjectWrapper::deleteProperty): (WebCore::JSQuarantinedObjectWrapper::implementsConstruct): (WebCore::JSQuarantinedObjectWrapper::construct): (WebCore::JSQuarantinedObjectWrapper::implementsHasInstance): (WebCore::JSQuarantinedObjectWrapper::hasInstance): (WebCore::JSQuarantinedObjectWrapper::implementsCall): (WebCore::JSQuarantinedObjectWrapper::callAsFunction): (WebCore::JSQuarantinedObjectWrapper::getPropertyNames): JSObject overrides. These each check the appropriate permission before allowing the call to proceed. We wrap all outgoing values using m_wrapOutgoingValue, and we prepare all incoming values with the virtual prepareIncomingValue function. If an exception is raised when calling the underlying object, we transfer the exception in wrapped form to the passed-in ExecState. * bindings/js/JSQuarantinedObjectWrapper.h: Added. (WebCore::JSQuarantinedObjectWrapper::unwrappedObject): (WebCore::JSQuarantinedObjectWrapper::className): We return the underlying object's class name so that we can successfully masquerade as that underlying object when, e.g., Object.prototype.toString is called on us. (WebCore::JSQuarantinedObjectWrapper::classInfo): (WebCore::JSQuarantinedObjectWrapper::allowsGetProperty): (WebCore::JSQuarantinedObjectWrapper::allowsSetProperty): (WebCore::JSQuarantinedObjectWrapper::allowsDeleteProperty): (WebCore::JSQuarantinedObjectWrapper::allowsConstruct): (WebCore::JSQuarantinedObjectWrapper::allowsHasInstance): (WebCore::JSQuarantinedObjectWrapper::allowsCallAsFunction): (WebCore::JSQuarantinedObjectWrapper::allowsGetPropertyNames): These virtual methods let subclasses define the allowed operations on the wrapped object. By default all operations are disabled. * bindings/js/JSInspectedObjectWrapper.cpp: Added. This subclass of JSQuarantinedObjectWrapper is used to wrap objects from the inspected page being passed to the Inspector. (WebCore::wrappers): (WebCore::): (WebCore::JSInspectedObjectWrapper::wrap): Wraps the passed-in object if needed and returns the wrapper. If this object has been wrapped previously we'll return the old wrapper rather than make a new one. (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper): Add ourselves to the wrapper map. (WebCore::JSInspectedObjectWrapper::~JSInspectedObjectWrapper): Remove ourselves from the wrapper map. (WebCore::JSInspectedObjectWrapper::prepareIncomingValue): Ensure that any objects passed to the inspected object are either wrappers around objects from the inspected page (in which case we unwrap them so that the inspected page never sees the wrapper), or wrapped callbacks from the Inspector. * bindings/js/JSInspectedObjectWrapper.h: Added. (WebCore::JSInspectedObjectWrapper::classInfo): (WebCore::JSInspectedObjectWrapper::allowsGetProperty): (WebCore::JSInspectedObjectWrapper::allowsSetProperty): (WebCore::JSInspectedObjectWrapper::allowsDeleteProperty): (WebCore::JSInspectedObjectWrapper::allowsConstruct): (WebCore::JSInspectedObjectWrapper::allowsHasInstance): (WebCore::JSInspectedObjectWrapper::allowsCallAsFunction): (WebCore::JSInspectedObjectWrapper::allowsGetPropertyNames): These all return true so that the Inspector can use objects from the inspected page however it needs. (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue): Wrap all outgoing values as JSInspectedObjectWrappers. * bindings/js/JSInspectorCallbackWrapper.cpp: Added. This subclass of JSQuarantinedObjectWrapper is used to wrap callbacks that the Inspector passes to the inspected page (e.g., for event listeners or client-side storage callbacks). (WebCore::wrappers): (WebCore::): (WebCore::JSInspectorCallbackWrapper::wrap): Wraps the passed-in object if needed and returns the wrapper. If this object has been wrapped previously we'll return the old wrapper rather than make a new one. (WebCore::JSInspectorCallbackWrapper::JSInspectorCallbackWrapper): Add ourselves to the wrapper map. (WebCore::JSInspectorCallbackWrapper::~JSInspectorCallbackWrapper): Remove ourselves from the wrapper map. (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue): Ensure that values passed from the inspected page to an Inspector callback are wrapped in JSInspectedObjectWrappers. We also allow the inspected page to pass ourselves in (which will happen in the case of a client-side storage callback, where the callback itself is passed as the `this` object). In this case we unwrap ourselves so that the Inspector doesn't have to deal with the wrapper. * bindings/js/JSInspectorCallbackWrapper.h: Added. (WebCore::JSInspectorCallbackWrapper::classInfo): (WebCore::JSInspectorCallbackWrapper::allowsCallAsFunction): This is the only allowed operation on a JSInspectorCallbackWrapper. (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue): Wrap all outgoing values as JSInspectorCallbackWrappers. * page/InspectorController.cpp: (WebCore::getResourceDocumentNode): Wrap the Document before passing it to the Inspector. (WebCore::highlightDOMNode): Unwrap the Node that the Inspector passed to us. (WebCore::databaseTableNames): Unwrap the Database that the Inspector passed to us. (WebCore::inspectedWindow): Wrap the Window before passing it to the Inspector. (WebCore::InspectorController::focusNode): Wrap the Node before passing it to the Inspector. (WebCore::wrapCallback): Wraps the passed-in callback in a JSInspectorCallbackWrapper. (WebCore::InspectorController::addDatabaseScriptResource): Wrap the Database beore pasing it to the Inspector. (WebCore::InspectorController::windowScriptObjectAvailable): Add the new wrapCallback function to the InspectorController JS object. * page/inspector/ElementsPanel.js: (WebInspector.ElementsPanel.reset): Wrap the contentLoaded callback. * page/inspector/DatabaseQueryView.js: (WebInspector.DatabaseQueryView._enterKeyPressed): * page/inspector/DatabaseTableView.js: (WebInspector.DatabaseTableView.update): Pass null instead of an empty array to executeSql since we're no longer allowed to pass any unwrapped objects to the inspected page. We now wrap all callbacks being passed to the inspected page using InspectorController.wrapCallback. 2008-04-14 Adam Roben Use prototypes/constructors from the inspected page when operating on objects from the inspected page Reviewed by Tim Hatcher. * page/inspector/Console.js: (WebInspector.ConsolePanel._format): Use the Node constructor from the inspected Window with the instanceof operator. * page/inspector/ElementsPanel.js: (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Use the Element prototype from the inspected Window instead of the Element prototype from this Window. * page/inspector/inspector.js: (WebInspector.performSearch): Ditto for Document prototype. * page/inspector/utilities.js: (Object.type): Now takes an optional Window parameter that is used to find the built-in constructors. 2008-04-14 Adam Roben Don't store objects from the Inspector on CSSStyleRules from the inspected page Reviewed by Tim Hatcher. * page/inspector/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.update): Don't store raw CSSStyleRules from the inspected page in the styleRules array. Instead, always use a wrapper object. This will keep us from setting Inspector objects as properties of inspected objects. 2008-04-14 Timothy Hatcher Fixes a regression where clicking a resource URL in the Console would not show the resource in the Resources panel. https://bugs.webkit.org/show_bug.cgi?id=18493 Reviewed by Adam Roben. * page/inspector/Console.js: (WebInspector.Console.prototype._messagesClicked): Removed console-message-url handling to show resources. This is now handled by WebInspector.showResourceForURL. (WebInspector.ConsoleMessage.prototype.toMessageElement): Add the webkit-html-resource-link class name to the URL anchor. Also add the line number as a property to the anchor. * page/inspector/ResourcesPanel.js: (WebInspector.ResourcesPanel): Add a reference to the tree element to each calculator. (WebInspector.ResourcesPanel.prototype.showResource): Select and reveal the resource in the sidebar. Call showLine on the resource view if it is implemented. (WebInspector.ResourcesPanel.prototype.closeVisibleResource): Select the current calculator's tree element in the sidebar. (WebInspector.ResourcesPanel.prototype._graphSelected): Call closeVisibleResource after the calculator changes since closeVisibleResource uses the calculator. * page/inspector/SourceView.js: (WebInspector.SourceView.prototype.sourceRow): Early return if the line is null/zero. (WebInspector.SourceView.prototype.showLine): Renamed from showSourceLine. * page/inspector/inspector.css: (body.console-visible #main-panels): Made the bottom 24px to match the height of #main-status-bar. (.console-message-url): Make the color important so it wins over the .webkit-html-resource-link rule. (.resource-view .resource-view-content): Made more generic from .image so all resource views get sized correctly. (.resource-view.image .resource-view-content): Removed. * page/inspector/inspector.js: (WebInspector.documentClick): Pass the line number from the anchor to WebInspector.showResourceForURL. (WebInspector.showResourceForURL): Add line number support. Pass the line to ResourcesPanel.showResource. (WebInspector.addMainEventListeners): Use bind for the event listeners. 2008-04-14 Xan Lopez Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=17917 Bug 17917: Cookie support for HTTP soup backend Initial implementation of cookies for the http soup backend. Moved CookieJarGtk to CookieJarSoup in network/soup and left the original one as CookieJarCurl in network/curl. * GNUmakefile.am: * platform/CookieJar.h: * platform/network/curl/CookieJarCurl.cpp: Renamed from WebCore/platform/gtk/CookieJarGtk.cpp. (WebCore::setCookies): (WebCore::cookies): * platform/network/soup/CookieJarSoup.cpp: Added. (WebCore::getCookieJar): (WebCore::setCookies): (WebCore::cookies): * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::start): 2008-04-14 Holger Freyther Reviewed by Alp Toker. https://bugs.webkit.org/show_bug.cgi?id=18411 Enable Page caching and create FrameViews on the fly Create the FrameView on the fly and cache pages - Keep a copy of the GtkAdjustment to be able to reuse it for the FrameViews - Do not initially create a FrameView and update the WebKit code to cope with not having a view. - Cache seven pages by default. * platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollView::setGtkAdjustments): 2008-04-14 David Hyatt Add a new optimized layout path for positioned objects that move. Also avoid always marking the object for layout when it has a percentage height, since the RenderView already does that when its size changes. Reviewed by mjs * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlockChildren): (WebCore::RenderBlock::layoutPositionedObjects): * rendering/RenderBox.h: (WebCore::RenderBox::layoutDoingPositionedMovementOnly): * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): (WebCore::RenderObject::setNeedsLayout): (WebCore::RenderObject::setChildNeedsLayout): (WebCore::RenderObject::setNeedsPositionedMovementLayout): (WebCore::RenderObject::setStyle): * rendering/RenderObject.h: (WebCore::RenderObject::needsLayout): (WebCore::RenderObject::needsPositionedMovementLayoutOnly): (WebCore::RenderObject::layoutDoingPositionedMovementOnly): * rendering/RenderStyle.cpp: (WebCore::positionedObjectMoved): (WebCore::RenderStyle::diff): * rendering/RenderStyle.h: (WebCore::RenderStyle::): 2008-04-14 David Hyatt Add support for gradients in the CSS content property. Reviewed by olliej Added fast/gradients/generated-gradients.html * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * css/CSSParser.cpp: (WebCore::CSSParser::parseContent): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::styleImage): (WebCore::CSSStyleSelector::mapBackgroundImage): * css/CSSStyleSelector.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::attach): * rendering/RenderContainer.cpp: (WebCore::RenderContainer::updateBeforeAfterContentForContainer): * rendering/RenderImage.cpp: (WebCore::RenderImage::RenderImage): (WebCore::RenderImage::setCachedImage): (WebCore::RenderImage::paintReplaced): (WebCore::RenderImage::calcReplacedWidth): (WebCore::RenderImage::calcReplacedHeight): (WebCore::RenderImage::calcAspectRatioWidth): (WebCore::RenderImage::calcAspectRatioHeight): * rendering/RenderImage.h: (WebCore::RenderImage::hasImage): (WebCore::RenderImage::image): (WebCore::RenderImage::errorOccurred): (WebCore::RenderImage::usesImageContainerSize): (WebCore::RenderImage::setImageContainerSize): (WebCore::RenderImage::imageHasRelativeWidth): (WebCore::RenderImage::imageHasRelativeHeight): (WebCore::RenderImage::imageSize): * rendering/RenderImageGeneratedContent.cpp: Added. (WebCore::RenderImageGeneratedContent::RenderImageGeneratedContent): (WebCore::RenderImageGeneratedContent::~RenderImageGeneratedContent): (WebCore::RenderImageGeneratedContent::setStyleImage): * rendering/RenderImageGeneratedContent.h: Added. (WebCore::RenderImageGeneratedContent::hasImage): (WebCore::RenderImageGeneratedContent::image): (WebCore::RenderImageGeneratedContent::errorOccurred): (WebCore::RenderImageGeneratedContent::usesImageContainerSize): (WebCore::RenderImageGeneratedContent::setImageContainerSize): (WebCore::RenderImageGeneratedContent::imageHasRelativeWidth): (WebCore::RenderImageGeneratedContent::imageHasRelativeHeight): (WebCore::RenderImageGeneratedContent::imageSize): * rendering/RenderObject.cpp: (WebCore::RenderObject::createObject): * rendering/RenderStyle.cpp: (WebCore::StyleCachedImage::imageHasRelativeWidth): (WebCore::StyleCachedImage::imageHasRelativeHeight): (WebCore::StyleCachedImage::usesImageContainerSize): (WebCore::RenderStyle::contentDataEquivalent): (WebCore::RenderStyle::setContent): (WebCore::ContentData::clear): * rendering/RenderStyle.h: (WebCore::StyleGeneratedImage::imageHasRelativeWidth): (WebCore::StyleGeneratedImage::imageHasRelativeHeight): (WebCore::StyleGeneratedImage::usesImageContainerSize): (WebCore::BackgroundLayer::setBackgroundImage): (WebCore::ContentData::): (WebCore::RenderStyle::setListStyleImage): 2008-04-14 Brady Eidson Reviewed by Sam, but Anders too, and he was more thorough in his review and thats the only reason Sam beat him Swap the Page and SecurityOrigin arguments when creating a StorageArea. SecurityOrigin is really the primary identifying characteristic of a StorageArea, and StorageAreas that represent LocalStorage won't have an owner Page. * storage/SessionStorage.cpp: (WebCore::SessionStorage::copy): (WebCore::SessionStorage::storageArea): * storage/StorageArea.cpp: (WebCore::StorageArea::create): (WebCore::StorageArea::StorageArea): (WebCore::StorageArea::copy): (WebCore::StorageArea::dispatchStorageEvent): Null check m_page here, as in the future it might be null * storage/StorageArea.h: 2008-04-14 Timothy Hatcher Add support for changing the sort order of the resources. The two sorting methods supported current are Time and Size. Reviewed by Adam Roben. * page/inspector/Images/statusbarMenuButton.png: Added. * page/inspector/Images/statusbarMenuButtonSelected.png: Added. * page/inspector/ResourcesPanel.js: (WebInspector.ResourcesPanel): Create the status bar menu button and setup the event listener to call _changeSortingFunction. Each option in the select references a sorting function. (WebInspector.ResourcesPanel.get statusBarItems): Add the sorting menu to the items returned. (WebInspector.ResourcesPanel._changeSortingFunction): Set the sorting function to the selected option's function in the sorting menu. * page/inspector/inspector.css: Added CSS rules for select elements in status bars. 2008-04-14 Timothy Hatcher Add support for toggling between small and large resource rows in the Resources panel. Reviewed by Adam Roben. * English.lproj/InspectorLocalizedStrings.js: Added new tooltip string. * page/inspector/Images/largerResourcesButtons.png: Added. * page/inspector/Images/resourceDocumentIconSmall.png: Added. * page/inspector/Images/resourcePlainIconSmall.png: Added. * page/inspector/ResourcesPanel.js: (WebInspector.ResourcesPanel): Create the status bar button and setup the event listener to call _toggleLargerResources. (WebInspector.ResourcesPanel.get statusBarItems): Return the status bar button. (WebInspector.ResourcesPanel._toggleLargerResources): Toggle the class names for the resources children list and the status bar button. * page/inspector/inspector.css: New style rules for small resources and the status bar item. 2008-04-14 Chris Fleizach Reviewed by Darin Adler REGRESSION: AXPosition seems to be flipped in nightly build AX was using the wrong method to determine the view to use to create the screen position * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::documentFrameView): * page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper position]): 2008-04-14 David Smith Reviewed by Timothy Hatcher. - Fix https://bugs.webkit.org/show_bug.cgi?id=14258 Response time vs. download time should be shown in the network profile * page/inspector/Resource.js: Change the sorting function to sort by response received time. * page/inspector/ResourcesPanel.js: Hook up the existing infrastructure to two bars instead of one; one for the total time, one for the time post-response. * page/inspector/inspector.css: Add a new rule to make the waiting bar have a lower opacity, and change the total bar opacity to handle the overlap 2008-04-14 Julien Chaffraix Reviewed by Ap. Bug 17403: WebKit Creates Invalid Xhtml Links with Ajax http://bugs.webkit.org/show_bug.cgi?id=17403 The previous code had callbacks for the normal parsing (full document) and fragment parsing. The difference was induced by the method we were using which did not accept a xmlParserCtxt. The code has been refactored to allow us to share the callbacks between the different cases. A drawback is that we have to use xmlParseContent which is an internal libxml method and thus some internal intialization is done in WebCore. Test: fast/parser/ampersand-escaped-parseXMLFragment.xhtml * dom/XMLTokenizer.cpp: (WebCore::createStringParser): Moved didInit in the global scope as it is shared by the 2 create methods. (WebCore::createMemoryParser): Create a memory parser similar to the previous code. Initialize the xmlParserContext to call xmlParseContent in parseXMLDocumentFragment. (WebCore::XMLTokenizer::initializeParserContext): Check m_parsingFragment to know which create method to call. * dom/XMLTokenizer.h: Added parseXMLDocumentFragment as a friend of XMLTokenizer. 2008-04-14 Rob Buis Reviewed by Eric. http://bugs.webkit.org/show_bug.cgi?id=18230 tspan in link not working Implement SVG Errata: "The 'a' element may contain any element that its parent may contain, except itself." * svg/SVGAElement.cpp: (WebCore::SVGAElement::childShouldCreateRenderer): 2008-04-13 David Hyatt Fix for bug 18466, WebKit exhibits slow performance on Opera DHTML benchmark. Improve layout's rect invalidation code to only invalidate a single unioned rect once enough individual little rects have been detected. Reviewed by olliej * page/FrameView.cpp: (WebCore::FrameViewPrivate::reset): (WebCore::FrameView::layout): (WebCore::FrameView::repaintRectangle): (WebCore::FrameView::beginDeferredRepaints): (WebCore::FrameView::endDeferredRepaints): * page/FrameView.h: 2008-04-13 Eric Seidel Reviewed by Oliver. Fix spelling error in function name, no test case. * svg/SVGTextContentElement.cpp: (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): 2008-04-13 Eric Seidel Reviewed by Oliver. Build fix for +SVG_ANIMATION -SVG_FOREIGN_OBJECT build, no tests. * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::hasValidTarget): 2008-04-13 Jan Michael Alonzo Reviewed by Oliver Hunt. http://bugs.webkit.org/show_bug.cgi?id=18239 [Gtk] Build breaks if SVG is enabled but SVG Fonts disabled * svg/SVGAltGlyphElement.idl: Add SVG_FONTS in Conditional 2008-04-13 Julien Chaffraix Reviewed by David. More SVG filters build fix. * svg/graphics/filters/SVGFEImage.cpp: (WebCore::SVGFEImage::~SVGFEImage): (WebCore::SVGFEImage::setCachedImage): 2008-04-13 David Hyatt Fix build bustage on the filters SVG code path (not built by default). * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::~SVGFEImageElement): (WebCore::SVGFEImageElement::parseMappedAttribute): 2008-04-13 Dan Winship Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=18391 return body data incrementally from libsoup backend Fix libsoup backend to pass data to the loader incrementally rather than all at once at the end. * platform/network/soup/ResourceHandleSoup.cpp (ResourceHandle::start): connect to "got-headers" and "got-chunk" signals on the message (gotHeadersCallback): call client->didReceiveResponse() from here (gotChunkCallback): call client->didReceiveData() from here (finishedCallback): renamed from dataCallback. mostly just calls client->didFinishLoading() now. 2008-04-13 Dan Bernstein Reviewed by Jessica Kahn. - remove duplicate condition in canHaveChildrenForEditing() * editing/htmlediting.cpp: (WebCore::canHaveChildrenForEditing): 2008-04-13 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=18307 REGRESSION (r31620): Incorrect Hiragino Kaku Gothic, font-weight:500 Test: fast/css/font-weight-1.html * platform/graphics/mac/FontCacheMac.mm: (WebCore::toAppKitFontWeight): Adjusted the mapping to cover the AppKit weight range from 2 to 12, because AppKit weight 1 never occurs. The new mapping matches font-weight: n00 to ISO weight Wn. * platform/mac/WebFontCache.mm: (betterChoice): Changed the midpoint used when deciding between two candidates that deviate from the desired weight by the same amount. 2008-04-12 David Hyatt Memory management cleanup for the new StyleCachedImage and StyleGeneratedImage classes. Make the back end values hold refptrs to cached front end values. This will avoid malloc churn as RenderStyles get re-resolved. Reviewed by olliej * css/CSSCursorImageValue.cpp: (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): (WebCore::CSSCursorImageValue::cachedImage): * css/CSSCursorImageValue.h: * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::CSSImageGeneratorValue): (WebCore::CSSImageGeneratorValue::generatedImage): * css/CSSImageGeneratorValue.h: * css/CSSImageValue.cpp: (WebCore::CSSImageValue::CSSImageValue): (WebCore::CSSImageValue::~CSSImageValue): (WebCore::CSSImageValue::cachedImage): * css/CSSImageValue.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::createStyleImage): * css/CSSStyleSelector.h: * rendering/RenderStyle.h: (WebCore::StyleCachedImage::cachedImage): (WebCore::StyleGeneratedImage::StyleGeneratedImage): (WebCore::StyleGeneratedImage::data): 2008-04-12 Julien Chaffraix Not reviewed, Qt build fix. * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::parseEndElement): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::clip): * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::setDragImage): 2008-04-12 David Hyatt Add support for list-style-image gradients. Also improve the image comparisons between two RenderStyles to not mistakenly believe that images have changed. Reviewed by olliej Added fast/gradients/list-item-gradient.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::createStyleImage): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::RenderListMarker): (WebCore::RenderListMarker::paint): (WebCore::RenderListMarker::imageChanged): (WebCore::RenderListMarker::calcPrefWidths): * rendering/RenderListMarker.h: * rendering/RenderStyle.cpp: (WebCore::imagesEquivalent): (WebCore::BorderImage::operator==): (WebCore::StyleCachedImage::errorOccurred): (WebCore::BackgroundLayer::operator==): (WebCore::StyleInheritedData::StyleInheritedData): (WebCore::cursorDataEquivalent): (WebCore::StyleInheritedData::operator==): (WebCore::RenderStyle::diff): * rendering/RenderStyle.h: (WebCore::StyleImage::errorOccurred): (WebCore::RenderStyle::listStyleImage): (WebCore::RenderStyle::setListStyleImage): (WebCore::RenderStyle::initialListStyleImage): 2008-04-12 Dan Bernstein - Windows build fix * platform/win/ClipboardWin.cpp: (WebCore::ClipboardWin::setDragImage): 2008-04-12 Kevin Ollivier wx build fix. Update clip to take a FloatRect. * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::clip): 2008-04-12 David Hyatt Add gradient support to border-image (even though it's mostly just weird). Reviewed by Dan Added fast/gradients/border-image-gradient.html fast/gradients/border-image-gradient-sides-and-corners.html * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::imageValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * platform/graphics/GeneratedImage.cpp: (WebCore::GeneratedImage::draw): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations): * rendering/RenderBox.cpp: (WebCore::RenderBox::imageChanged): * rendering/RenderObject.cpp: (WebCore::RenderObject::mustRepaintBackgroundOrBorder): (WebCore::RenderObject::paintBorderImage): (WebCore::RenderObject::paintBorder): (WebCore::RenderObject::updateBackgroundImages): (WebCore::RenderObject::arenaDelete): * rendering/RenderStyle.cpp: (WebCore::StyleCachedImage::isLoaded): * rendering/RenderStyle.h: (WebCore::StyleImage::isLoaded): (WebCore::BorderImage::image): 2008-04-11 Dan Bernstein Reviewed by Dave Hyatt. - fix a regression from r31324 which caused most Arabic text to render as missing glyphs Test: svg/W3C-SVG-1.1/fonts-glyph-02-t.svg * svg/SVGFont.cpp: (WebCore::SVGTextRunWalker::walk): Changed to always process characters in logical order and therefore dispatch the callbacks with a logically- ordered glyph stream. Changed the call to isCompatibleGlyph() to check for compatibility only with the range of characters the candidate glyph is derived from rather than with the entire lookup range. Changed to mark the glyph identifier as valid, to facilitate the use of invalid glyph identifiers to mark font fallback. (WebCore::drawTextUsingSVGFontCallback): Changed to only append the glyph identifier to a vector. (WebCore::drawTextMissingGlyphCallback): Changed to only append the character to a vector and append an invalid glyph identifier to the glyph vector. (WebCore::Font::drawTextUsingSVGFont): Moved the drawing from the callbacks into this function, iterating over the glyph and fallback characters vector in visual order. 2008-04-11 Dirk Schulze Reviewed by eseidel. Attempt to fix Cairo build. * platform/graphics/cairo/GraphicsContextCairo.cpp: * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: 2008-04-11 David Hyatt Rename CachedResource's ref/deref methods to addClient/removeClient. This matches the new StyleImage class and is a more accurate description of what those methods really do. Reviewed by olliej * WebCore.base.exp: * css/CSSCursorImageValue.cpp: (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::CSSFontFaceSource): (WebCore::CSSFontFaceSource::~CSSFontFaceSource): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::~CSSImageValue): (WebCore::CSSImageValue::image): * css/CSSImportRule.cpp: (WebCore::CSSImportRule::~CSSImportRule): (WebCore::CSSImportRule::insertedIntoParent): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::~ProcessingInstruction): (WebCore::ProcessingInstruction::checkStyleSheet): (WebCore::ProcessingInstruction::parseStyleSheet): * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::~XMLTokenizer): (WebCore::XMLTokenizer::endElementNs): (WebCore::XMLTokenizer::notifyFinished): * html/CanvasPattern.cpp: (WebCore::CanvasPattern::CanvasPattern): (WebCore::CanvasPattern::~CanvasPattern): * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::~HTMLImageLoader): (WebCore::HTMLImageLoader::setImage): (WebCore::HTMLImageLoader::updateFromElement): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::~HTMLLinkElement): (WebCore::HTMLLinkElement::process): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::~HTMLScriptElement): (WebCore::HTMLScriptElement::parseMappedAttribute): (WebCore::HTMLScriptElement::insertedIntoDocument): (WebCore::HTMLScriptElement::removedFromDocument): (WebCore::HTMLScriptElement::notifyFinished): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::reset): (WebCore::HTMLTokenizer::scriptHandler): (WebCore::HTMLTokenizer::notifyFinished): * loader/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::addClient): * loader/CachedCSSStyleSheet.h: * loader/CachedFont.cpp: (WebCore::CachedFont::addClient): * loader/CachedFont.h: * loader/CachedImage.cpp: (WebCore::CachedImage::addClient): * loader/CachedImage.h: * loader/CachedResource.cpp: (WebCore::CachedResource::addClient): (WebCore::CachedResource::removeClient): * loader/CachedResource.h: * loader/CachedScript.cpp: (WebCore::CachedScript::addClient): * loader/CachedScript.h: * loader/CachedXBLDocument.h: * loader/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::addClient): * loader/CachedXSLStyleSheet.h: * loader/mac/UserStyleSheetLoader.cpp: (UserStyleSheetLoader::UserStyleSheetLoader): (UserStyleSheetLoader::~UserStyleSheetLoader): * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::setDragImage): * rendering/RenderImage.cpp: (WebCore::RenderImage::~RenderImage): (WebCore::RenderImage::setCachedImage): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::~RenderListMarker): (WebCore::RenderListMarker::setStyle): * rendering/RenderObject.cpp: (WebCore::RenderObject::updateBackgroundImages): (WebCore::RenderObject::arenaDelete): * rendering/RenderStyle.cpp: (WebCore::StyleCachedImage::addClient): (WebCore::StyleCachedImage::removeClient): * svg/SVGImageLoader.cpp: (WebCore::SVGImageLoader::updateFromElement): * xml/XSLImportRule.cpp: (WebCore::XSLImportRule::~XSLImportRule): (WebCore::XSLImportRule::loadSheet): 2008-04-11 David Hyatt This patch adds support for CSS gradients as background images. RenderStyles now hold a StyleImage RefPtr, which is a wrapper for two types of images: CachedImages (loaded from URLs) and generated images (patterns created on the fly such as gradients). All of the features of are supported: gradients can be linear or radial, have multiple stops, and can specify their points as percentages (for reusable gradients across different box sizes). Reviewed by olliej Added fast/gradients/simple-gradients.html * WebCore.xcodeproj/project.pbxproj: * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::imageValue): (WebCore::CSSBorderImageValue::generatorValue): * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSGradientValue.cpp: Added. (WebCore::CSSGradientValue::cssText): (WebCore::CSSGradientValue::createGradient): (WebCore::CSSGradientValue::image): (WebCore::compareStops): (WebCore::CSSGradientValue::sortStopsIfNeeded): (WebCore::CSSGradientValue::resolvePoint): (WebCore::CSSGradientValue::resolveRadius): * css/CSSGradientValue.h: Added. (WebCore::): (WebCore::CSSGradientColorStop::CSSGradientColorStop): (WebCore::CSSGradientValue::CSSGradientValue): (WebCore::CSSGradientValue::type): (WebCore::CSSGradientValue::setType): (WebCore::CSSGradientValue::setFirstX): (WebCore::CSSGradientValue::setFirstY): (WebCore::CSSGradientValue::setSecondX): (WebCore::CSSGradientValue::setSecondY): (WebCore::CSSGradientValue::setFirstRadius): (WebCore::CSSGradientValue::setSecondRadius): (WebCore::CSSGradientValue::addStop): * css/CSSImageGeneratorValue.cpp: Added. (WebCore::CSSImageGeneratorValue::~CSSImageGeneratorValue): (WebCore::CSSImageGeneratorValue::addClient): (WebCore::CSSImageGeneratorValue::removeClient): (WebCore::CSSImageGeneratorValue::getImage): (WebCore::CSSImageGeneratorValue::putImage): * css/CSSImageGeneratorValue.h: Added. (WebCore::CSSImageGeneratorValue::isImageGeneratorValue): * css/CSSImageValue.h: (WebCore::CSSImageValue::isImageValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseBackgroundImage): (WebCore::BorderImageParseContext::commitImage): (WebCore::CSSParser::parseBorderImage): (WebCore::parseGradientPoint): (WebCore::parseGradientColorStop): (WebCore::CSSParser::parseGradient): * css/CSSParser.h: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::createStyleImage): (WebCore::CSSStyleSelector::mapBackgroundImage): * css/CSSStyleSelector.h: * css/CSSValue.h: (WebCore::CSSValue::isImageValue): (WebCore::CSSValue::isImageGeneratorValue): * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::isPointInPath): * platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::dataChanged): (WebCore::BitmapImage::frameCount): * platform/graphics/BitmapImage.h: * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::clipToImageBuffer): * platform/graphics/GraphicsContext.h: * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::cgImage): (WebCore::ImageBuffer::image): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::clipToImageBuffer): (WebCore::GraphicsContext::paintBuffer): (WebCore::GraphicsContext::drawImage): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::create): (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): (WebCore::ImageBuffer::image): (WebCore::ImageBuffer::getImageData): (WebCore::ImageBuffer::putImageData): (WebCore::ImageBuffer::toDataURL): * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::BitmapImage): (WebCore::BitmapImage::draw): (WebCore::Image::drawPattern): * platform/graphics/qt/ImageQt.cpp: (WebCore::BitmapImage::BitmapImage): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBackground): * rendering/RenderBox.cpp: (WebCore::RenderBox::calculateBackgroundSize): (WebCore::RenderBox::imageChanged): (WebCore::RenderBox::paintBackgroundExtended): * rendering/RenderObject.cpp: (WebCore::RenderObject::mustRepaintBackgroundOrBorder): (WebCore::RenderObject::updateBackgroundImages): (WebCore::RenderObject::arenaDelete): * rendering/RenderStyle.cpp: (WebCore::StyleCachedImage::cssValue): (WebCore::StyleCachedImage::canRender): (WebCore::StyleCachedImage::imageSize): (WebCore::StyleCachedImage::setImageContainerSize): (WebCore::StyleCachedImage::addClient): (WebCore::StyleCachedImage::removeClient): (WebCore::StyleCachedImage::image): (WebCore::StyleGeneratedImage::cssValue): (WebCore::StyleGeneratedImage::imageSize): (WebCore::StyleGeneratedImage::setImageContainerSize): (WebCore::StyleGeneratedImage::addClient): (WebCore::StyleGeneratedImage::removeClient): (WebCore::StyleGeneratedImage::image): * rendering/RenderStyle.h: (WebCore::StyleImage::StyleImage): (WebCore::StyleImage::~StyleImage): (WebCore::StyleImage::operator==): (WebCore::StyleImage::canRender): (WebCore::StyleImage::isCachedImage): (WebCore::StyleImage::isGeneratedImage): (WebCore::StyleCachedImage::StyleCachedImage): (WebCore::StyleCachedImage::data): (WebCore::StyleCachedImage::isCachedImage): (WebCore::StyleGeneratedImage::StyleGeneratedImage): (WebCore::StyleGeneratedImage::data): (WebCore::StyleGeneratedImage::isGeneratedImage): (WebCore::BackgroundLayer::backgroundImage): (WebCore::BackgroundLayer::setBackgroundImage): (WebCore::BackgroundLayer::containsImage): (WebCore::RenderStyle::backgroundImage): (WebCore::RenderStyle::initialBackgroundImage): * svg/graphics/cg/SVGPaintServerGradientCg.cpp: (WebCore::SVGPaintServerGradient::teardown): * svg/graphics/cg/SVGResourceMaskerCg.mm: (WebCore::SVGResourceMasker::applyMask): 2008-04-11 Dan Bernstein Reviewed by Oliver Hunt. - add SVGGlyphMap.h to project files * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2008-04-11 Anders Carlsson Fix release build. * WebCore.base.exp: * loader/archive/ArchiveResource.h: (WebCore::ArchiveResource::response): This should be const. 2008-04-11 Antti Koivisto Try to fix Qt build. * svg/animation/SMILTime.cpp: 2008-04-11 Anders Carlsson Reviewed by Brady. Don't create the ArchiveResource response lazily. * loader/archive/ArchiveResource.cpp: (WebCore::ArchiveResource::ArchiveResource): * loader/archive/ArchiveResource.h: (WebCore::ArchiveResource::response): 2008-04-11 Jan Michael Alonzo Reviewed by Mark Rowe. Added missing '\' in the svg include path * GNUmakefile.am: 2008-04-11 Antti Koivisto Another attempted Qt build fix. * WebCore.pro: 2008-04-11 Antti Koivisto Reviewed by Oliver. Fix build when SVG is enabled but SVG_ANIMATION is not. * ChangeLog: * bindings/js/JSSVGElementWrapperFactory.cpp: * bindings/objc/DOM.mm: (WebCore::createElementClassMap): * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): * svg/SVGAnimateColorElement.cpp: * svg/SVGAnimateColorElement.h: * svg/SVGAnimateColorElement.idl: * svg/SVGAnimateMotionElement.h: * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::animationMode): * svg/SVGAnimationElement.h: * svg/SVGAnimationElement.idl: * svg/SVGSetElement.cpp: * svg/SVGSetElement.h: * svg/SVGSetElement.idl: * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::begin): (WebCore::SMILTimeContainer::pause): (WebCore::SMILTimeContainer::resume): (WebCore::SMILTimeContainer::elapsed): (WebCore::SMILTimeContainer::isPaused): (WebCore::SMILTimeContainer::timerFired): * svg/animation/SMILTimeContainer.h: * svg/animation/SVGSMILElement.cpp: * svg/animation/SVGSMILElement.h: * svg/svgtags.in: 2008-04-11 Anders Carlsson Reviewed by Brady. Move archive loading from FrameLoader to DocumentLoader. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::clearArchiveResources): (WebCore::DocumentLoader::deliverArchivedResourcesAfterDelay): (WebCore::DocumentLoader::archiveResourceDeliveryTimerFired): (WebCore::DocumentLoader::isArchiveLoadPending): (WebCore::DocumentLoader::cancelPendingArchiveLoad): (WebCore::DocumentLoader::scheduleArchiveLoad): (WebCore::DocumentLoader::setDefersLoading): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::setDefersLoading): (WebCore::FrameLoader::stopAllLoaders): * loader/FrameLoader.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::load): (WebCore::ResourceLoader::didCancel): 2008-04-11 Timothy Hatcher Fixes the regression where the DOM tree does not update when navigating to another page with the Inspector open. https://bugs.webkit.org/show_bug.cgi?id=18418 Reviewed by Adam Roben. * page/inspector/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.reset): If the inspected document does not have a firstChild yet, add an event listener for DOMContentLoaded. The event listener just sets a proeprty that a polling functions looks for then triggers the reset. (WebInspector.ElementsPanel.prototype._focusedNodeChanged): Always call updateStyles with forceUpdate as true. This makes sure the Styles pane clears when there isn't a focused node. 2008-04-11 Dan Bernstein Reviewed by Timothy Hatcher. - fix http://bugs.webkit.org/show_bug.cgi?id=18412 Inspector truncates text when editing a CSS property * page/inspector/inspector.css: 2008-04-11 Antti Koivisto Try to fix Qt build by including some headers. * ChangeLog: * platform/graphics/UnitBezier.h: * svg/SVGAnimationElement.cpp: * svg/animation/SMILTime.h: * svg/animation/SVGSMILElement.cpp: 2008-04-11 Antti Koivisto Try to fix Windows build by switching to std::sort(). * svg/animation/SVGSMILElement.cpp: (WebCore::sortTimeList): 2008-04-11 Rob Buis Reviewed by Eric. http://bugs.webkit.org/show_bug.cgi?id=18340 Elements with display="none" in a still contribute to clipping path Skip elements in clip-path container that have display=none specified. * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::canvasResource): 2008-04-10 Antti Koivisto Reviewed by Eric. Redo the SVG animation support. It does - Full SMIL interval timing model including syncbase and event base timing (the hard part). - CSS and XML attribute animation. - Linear, discrete and spline calcModes. - Values animation with keyTimes and keySplines. - Link activated animations. - Pretty good support for and animations - Basic support for , and . This passes some 35 of the 56 tests in W3C SVG animation test suite, a bunch more with some subtest failures. What is still missing - Additive animation with multiple animations operating on the same property. This is a major architectural feature in animation code. It shouldn't be too hard to add. - Only implements accumulate. - does not do paths, keypoints, rotate. - does not work correctly in all cases - calcMode paced is missing. - repeat, beginEvent, endEvent are missing. - accesskey() is missing. - JS does not see correct values for baseVal/animVal, changing values that are being animted for a script produces wrong results. This problem needs to be solved outside the animation code. - Some other stuff I forgot or do not know about. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): Use cache notification mechanism to start/stop animations. * svg/SVGAElement.cpp: (WebCore::SVGAElement::defaultEventHandler): Start target animation on link activation. * svg/SVGAnimateColorElement.cpp: (WebCore::SVGAnimateColorElement::applyAnimatedValueToElement): (WebCore::SVGAnimateColorElement::updateAnimatedValue): (WebCore::SVGAnimateColorElement::calculateFromAndToValues): (WebCore::SVGAnimateColorElement::calculateFromAndByValues): * svg/SVGAnimateColorElement.h: * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::SVGAnimateElement): (WebCore::parseNumberValueAndUnit): (WebCore::SVGAnimateElement::applyAnimatedValueToElement): (WebCore::SVGAnimateElement::updateAnimatedValue): (WebCore::isColorAttribute): (WebCore::SVGAnimateElement::calculateFromAndToValues): (WebCore::SVGAnimateElement::calculateFromAndByValues): * svg/SVGAnimateElement.h: (WebCore::SVGAnimateElement::): * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement): (WebCore::SVGAnimateMotionElement::parseMappedAttribute): (WebCore::SVGAnimateMotionElement::updateAnimatedValue): (WebCore::parsePoint): (WebCore::SVGAnimateMotionElement::calculateFromAndToValues): (WebCore::SVGAnimateMotionElement::calculateFromAndByValues): (WebCore::SVGAnimateMotionElement::applyAnimatedValueToElement): (WebCore::SVGAnimateMotionElement::startedActiveInterval): * svg/SVGAnimateMotionElement.h: * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement): (WebCore::SVGAnimateTransformElement::hasValidTarget): (WebCore::SVGAnimateTransformElement::updateAnimatedValue): (WebCore::transformListFor): (WebCore::SVGAnimateTransformElement::applyAnimatedValueToElement): (WebCore::SVGAnimateTransformElement::calculateFromAndToValues): (WebCore::SVGAnimateTransformElement::calculateFromAndByValues): (WebCore::SVGAnimateTransformElement::startedActiveInterval): (WebCore::SVGAnimateTransformElement::parseTransformValue): * svg/SVGAnimateTransformElement.h: Concrete anmation element classes. * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::SVGAnimationElement): (WebCore::SVGAnimationElement::~SVGAnimationElement): (WebCore::parseKeyTimes): (WebCore::parseKeySplines): (WebCore::SVGAnimationElement::parseMappedAttribute): (WebCore::SVGAnimationElement::attributeChanged): (WebCore::SVGAnimationElement::getStartTime): (WebCore::SVGAnimationElement::getCurrentTime): (WebCore::SVGAnimationElement::getSimpleDuration): (WebCore::SVGAnimationElement::beginElement): (WebCore::SVGAnimationElement::beginElementAt): (WebCore::SVGAnimationElement::endElement): (WebCore::SVGAnimationElement::endElementAt): (WebCore::SVGAnimationElement::animationMode): (WebCore::SVGAnimationElement::calcMode): (WebCore::SVGAnimationElement::attributeType): (WebCore::SVGAnimationElement::toValue): (WebCore::SVGAnimationElement::byValue): (WebCore::SVGAnimationElement::fromValue): (WebCore::SVGAnimationElement::attributeName): (WebCore::SVGAnimationElement::isAdditive): (WebCore::SVGAnimationElement::isAccumulated): (WebCore::SVGAnimationElement::hasValidTarget): (WebCore::SVGAnimationElement::targetAttributeIsCSS): (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue): (WebCore::SVGAnimationElement::targetAttributeBaseValue): (WebCore::solveEpsilon): (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): (WebCore::SVGAnimationElement::startedActiveInterval): (WebCore::SVGAnimationElement::applyAnimation): (WebCore::SVGAnimationElement::unapplyAnimation): (WebCore::SVGAnimationElement::endedActiveInterval): * svg/SVGAnimationElement.h: (WebCore::SVGAnimationElement::): This is pretty much a complete rewrite of the SVGAnimationElement. Timing related functionality was refactored to SMILTimingElement class that this class now inherits. * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::startAnimations): * svg/SVGElement.cpp: (WebCore::SVGElement::ownerSVGElement): * svg/SVGSVGElement.cpp: We need to reach the element from too so go out from the shadow tree. (WebCore::SVGSVGElement::SVGSVGElement): (WebCore::SVGSVGElement::~SVGSVGElement): (WebCore::SVGSVGElement::pauseAnimations): (WebCore::SVGSVGElement::unpauseAnimations): (WebCore::SVGSVGElement::animationsPaused): (WebCore::SVGSVGElement::getCurrentTime): (WebCore::SVGSVGElement::willSaveToCache): (WebCore::SVGSVGElement::willRestoreFromCache): * svg/SVGSVGElement.h: (WebCore::SVGSVGElement::timeContainer): * svg/SVGSetElement.cpp: (WebCore::SVGSetElement::applyAnimatedValueToElement): (WebCore::SVGSetElement::calculateFromAndToValues): (WebCore::SVGSetElement::calculateFromAndByValues): (WebCore::SVGSetElement::updateAnimatedValue): * svg/SVGSetElement.h: Concrete anmation element classes. * svg/SVGTimer.cpp: Removed. * svg/SVGTimer.h: Removed. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::removedFromDocument): * svg/TimeScheduler.cpp: Removed. * svg/TimeScheduler.h: Removed. Replaced these with SMILTimeContainer class. * svg/animation: Added. * svg/animation/SMILTime.cpp: Added. (WebCore::operator+): (WebCore::operator-): (WebCore::operator*): * svg/animation/SMILTime.h: Added. (WebCore::SMILTime::SMILTime): (WebCore::SMILTime::unresolved): (WebCore::SMILTime::indefinite): (WebCore::SMILTime::operator=): (WebCore::SMILTime::value): (WebCore::SMILTime::isFinite): (WebCore::SMILTime::isIndefinite): (WebCore::SMILTime::isUnresolved): (WebCore::operator==): (WebCore::operator!=): (WebCore::operator>): (WebCore::operator<): (WebCore::operator>=): (WebCore::operator<=): (WebCore::max): (WebCore::min): A floating point number with special values "indefinite" and "unresolved". Defines math for those. * svg/animation/SMILTimeContainer.cpp: Added. (WebCore::SMILTimeContainer::SMILTimeContainer): (WebCore::SMILTimeContainer::schedule): (WebCore::SMILTimeContainer::unschedule): (WebCore::SMILTimeContainer::elapsed): (WebCore::SMILTimeContainer::isActive): (WebCore::SMILTimeContainer::isPaused): (WebCore::SMILTimeContainer::begin): (WebCore::SMILTimeContainer::pause): (WebCore::SMILTimeContainer::resume): (WebCore::SMILTimeContainer::startTimer): (WebCore::SMILTimeContainer::timerFired): (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SMILTimeContainer.h: Added. Manages the clock and time line for active animations in a document. * svg/animation/SVGSMILElement.cpp: Added. (WebCore::ConditionEventListener::ConditionEventListener): (WebCore::ConditionEventListener::handleEvent): (WebCore::SVGSMILElement::Condition::Condition): (WebCore::SVGSMILElement::SVGSMILElement): (WebCore::SVGSMILElement::~SVGSMILElement): (WebCore::SVGSMILElement::insertedIntoDocument): (WebCore::SVGSMILElement::removedFromDocument): (WebCore::SVGSMILElement::finishParsingChildren): (WebCore::SVGSMILElement::parseOffsetValue): (WebCore::SVGSMILElement::parseClockValue): (WebCore::smilTimeSortFunction): (WebCore::sortTimeList): (WebCore::SVGSMILElement::parseCondition): (WebCore::SVGSMILElement::isTimingElement): (WebCore::SVGSMILElement::parseBeginOrEnd): (WebCore::SVGSMILElement::parseMappedAttribute): (WebCore::SVGSMILElement::attributeChanged): (WebCore::SVGSMILElement::connectConditions): (WebCore::SVGSMILElement::disconnectConditions): (WebCore::SVGSMILElement::reschedule): (WebCore::SVGSMILElement::targetElement): (WebCore::SVGSMILElement::elapsed): (WebCore::SVGSMILElement::restart): (WebCore::SVGSMILElement::fill): (WebCore::SVGSMILElement::xlinkHref): (WebCore::SVGSMILElement::dur): (WebCore::SVGSMILElement::repeatDur): (WebCore::SVGSMILElement::repeatCount): (WebCore::SVGSMILElement::maxValue): (WebCore::SVGSMILElement::minValue): (WebCore::SVGSMILElement::simpleDuration): (WebCore::SVGSMILElement::addBeginTime): (WebCore::SVGSMILElement::addEndTime): (WebCore::SVGSMILElement::findInstanceTime): (WebCore::SVGSMILElement::repeatingDuration): (WebCore::SVGSMILElement::resolveActiveEnd): (WebCore::SVGSMILElement::resolveInterval): (WebCore::SVGSMILElement::resolveFirstInterval): (WebCore::SVGSMILElement::resolveNextInterval): (WebCore::SVGSMILElement::nextProgressTime): (WebCore::SVGSMILElement::beginListChanged): (WebCore::SVGSMILElement::endListChanged): (WebCore::SVGSMILElement::checkRestart): (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat): (WebCore::SVGSMILElement::calculateNextProgressTime): (WebCore::SVGSMILElement::determineActiveState): (WebCore::SVGSMILElement::progress): (WebCore::SVGSMILElement::notifyDependentsIntervalChanged): (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase): (WebCore::SVGSMILElement::addTimeDependent): (WebCore::SVGSMILElement::removeTimeDependent): (WebCore::SVGSMILElement::handleConditionEvent): (WebCore::SVGSMILElement::beginByLinkActivation): * svg/animation/SVGSMILElement.h: Added. (WebCore::SVGSMILElement::timeContainer): (WebCore::SVGSMILElement::): (WebCore::SVGSMILElement::intervalBegin): (WebCore::SVGSMILElement::intervalEnd): (WebCore::SVGSMILElement::Condition::): This abstract class implements the SMIL timing model. As an output it produces calls to these virtual functions: virtual void startedActiveInterval() = 0; virtual void applyAnimation(float percent, unsigned repeat) = 0; virtual void unapplyAnimation() = 0; virtual void endedActiveInterval() = 0; 2008-04-10 Antti Koivisto Reviewed by Eric. Move CurveData out from AnimationController.cpp and rename it to UnitBezier. This makes it possible to reuse this nice class from the SVG animation code. * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/AnimationController.cpp: (WebCore::solveCubicBezierFunction): * platform/graphics/UnitBezier.h: Added. (WebCore::UnitBezier::UnitBezier): (WebCore::UnitBezier::sampleCurveX): (WebCore::UnitBezier::sampleCurveY): (WebCore::UnitBezier::sampleCurveDerivativeX): (WebCore::UnitBezier::solveCurveX): (WebCore::UnitBezier::solve): 2008-04-10 Brady Eidson Reviewed by Sam Weinig The name "OriginStorage" never felt right to a few of us. The HTML5 spec refers to our concept of "OriginStorage" as a "storage area", which makes more sense here. This patch is basically: s/OriginStorage/StorageArea/ * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * loader/FrameLoader.cpp: * page/DOMWindow.cpp: (WebCore::DOMWindow::sessionStorage): * page/Page.cpp: * storage/OriginStorage.cpp: Removed. * storage/OriginStorage.h: Removed. * storage/SessionStorage.cpp: (WebCore::SessionStorage::copy): (WebCore::SessionStorage::storageArea): * storage/SessionStorage.h: * storage/Storage.cpp: (WebCore::Storage::create): (WebCore::Storage::Storage): (WebCore::Storage::length): (WebCore::Storage::key): (WebCore::Storage::getItem): (WebCore::Storage::setItem): (WebCore::Storage::removeItem): (WebCore::Storage::contains): * storage/Storage.h: * storage/StorageArea.cpp: Copied from storage/OriginStorage.cpp. (WebCore::StorageArea::create): (WebCore::StorageArea::StorageArea): (WebCore::StorageArea::~StorageArea): (WebCore::StorageArea::copy): (WebCore::StorageArea::length): (WebCore::StorageArea::key): (WebCore::StorageArea::getItem): (WebCore::StorageArea::setItem): (WebCore::StorageArea::removeItem): (WebCore::StorageArea::contains): (WebCore::StorageArea::dispatchStorageEvent): * storage/StorageArea.h: Copied from storage/OriginStorage.h. 2008-04-10 Xan Lopez Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=18342 Bug #18342 - Add logging to HTTP soup backend Add soup logging facilities to HTTP soup backend. Enable defining WEBKIT_SOUP_LOGGING, with values from 0 to 3 for more verbosity. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::start): 2008-04-10 Timothy Hatcher Fixes floating point precision in the Resources graph labels by using String.sprintf to format the values. Also makes the image view use Number.bytesToString when showing the file size. Makes Number.bytesToString and Number.secondsToString take an optional formatter function so the Inspector can pass WebInspector.UIString, so the format strings can be localized. https://bugs.webkit.org/show_bug.cgi?id=18381 https://bugs.webkit.org/show_bug.cgi?id=14333 Reviewed by Adam Roben. * English.lproj/InspectorLocalizedStrings.js: Added the new strings. * page/inspector/ImageView.js: (WebInspector.ImageView): Use Number.bytesToString to format this.resource.contentLength. * page/inspector/ResourcesPanel.js: (WebInspector.ResourceTransferTimeCalculator.prototype.formatValue): Pass WebInspector.UIString to Number.secondsToString. (WebInspector.ResourceTransferSizeCalculator.prototype.formatValue): Pass WebInspector.UIString to Number.bytesToString. * page/inspector/utilities.js: (Number.secondsToString): Added a formatterFunction argument. Use the formatter and format strings to control the number precision. (Number.bytesToString): Ditto. 2008-04-010 Alice Liu Reviewed by Dan Bernstein. Fixed CrashTracer: [USER] 8384 crashes in WebCore::Widget::getView const + 6 Test: fast/events/mouseout-dead-subframe.html * page/EventHandler.cpp: dispatching a mouse event can change the document structure, necessitating a check for whether we still want to pass the event to the pre-determined subframe (WebCore::EventHandler::handleMouseMoveEvent): 2008-04-10 Antti Koivisto Reviewed by Eric. Fix scale transform. This will be tested by the animation test suite when SVG animation support lands. * svg/SVGTransformDistance.cpp: (WebCore::SVGTransformDistance::SVGTransformDistance): 2008-04-10 David Hyatt Add a gradient fillRect method to GraphicsContext. This is implemented only in the CG port. I stubbed out a method in GraphicsContext.cpp with notImplemented(). Other platforms will need to add their own gradient fill methods. Reviewed by aroben * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::fillRect): * platform/graphics/GraphicsContext.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::fillRect): 2008-04-10 David Hyatt Gradient improvements. Support for adding color stops by Color and not just by String. Add the ability to mark stops as already being sorted. Reviewed by aroben * platform/graphics/Gradient.cpp: (WebCore::Gradient::addColorStop): * platform/graphics/Gradient.h: (WebCore::Gradient::setStopsSorted): 2008-04-10 Timothy Hatcher Fixes the build where some wtf headers would not be copied due to a bug in some older versions of Xcode. Rubber-stamped by Adam Roben. * WebCore.xcodeproj/project.pbxproj: Adds a new script phase to handle the copying of the icu and ForwardingHeaders folder to WebCore's PrivateHeaders. Removes the old copy files phase and the icu and ForwardingHeaders folder references. 2008-04-09 Brady Eidson Reviewed by Mitz Pettel Add the "onstorage" attribute for the body element to provide easy setup of StorageEvent handling. Tests: storage/domstorage/sessionstorage/onstorage-attribute-markup.html storage/domstorage/sessionstorage/onstorage-attribute-setattribute.html * html/HTMLAttributeNames.in: Added "onstorage" * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): Handle this attribute on the body element *only* because that's where the HTML5 spec says StorageEvents go. This might change in the future 2008-04-09 Antti Koivisto Reviewed by Mitz. Remove a less-than-critical bit from Node and replace it with a hash. Those bits are valuable! Also moved setting of the guard to dispatchSimulatedClick for better consistency. No one else calls dispatchSimulatedMouseEvent() currently and this is really a click() specific behavior. * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchSimulatedMouseEvent): (WebCore::EventTargetNode::dispatchSimulatedClick): * dom/Node.cpp: (WebCore::Node::Node): * dom/Node.h: 2008-04-09 Sam Weinig Reviewed by Geoffrey Garen. Fix for https://bugs.webkit.org/show_bug.cgi?id=18389 Crash in JSDOMWindowWrapper::mark loading digg.com - Add a null check to JSDOMWindowWrapper::mark for the case when the collector runs during its allocation. - Cleans up the creation of the window to be a little more straight forward. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate): (WebCore::JSDOMWindowBase::JSDOMWindowBase): (WebCore::JSDOMWindowBase::clear): (WebCore::JSDOMWindowBase::wrapper): * bindings/js/JSDOMWindowBase.h: * bindings/js/JSDOMWindowWrapper.cpp: (WebCore::JSDOMWindowWrapper::JSDOMWindowWrapper): (WebCore::JSDOMWindowWrapper::mark): * bindings/js/JSDOMWindowWrapper.h: * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::initScript): * bindings/scripts/CodeGeneratorJS.pm: 2008-04-09 Brady Eidson Rubberstamped by Mitzpettel Added HTMLAttributeNames.in and HTMLTagNames.in to the xcodeproj for easy editing, and sorted the html group * WebCore.xcodeproj/project.pbxproj: 2008-04-09 Brent Fulgham Reviewed by Mitz. Correct build regression in Windows (Cairo) build due to changes in FontDescription.h signature. (see http://bugs.webkit.org/show_bug.cgi?id=18394) * rendering/RenderThemeWin.cpp: Change for new font methods. (WebCore::RenderThemeWin::systemFont): 2008-04-09 Brady Eidson Reviewed by Sam Weinig When enumerating a Storage object, the Storage built-ins should not be included, but the prototype chain SHOULD be included. * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::customGetPropertyNames): Return false so the prototype chain is walked * storage/Storage.idl: Mark all built-ins as "DontEnum" 2008-04-09 Brady Eidson Reviewed by Adam Roben Per the HTML5 spec, enumerating a Storage object should walk the keys in the storage area, and should not return the built-in properties. Test: storage/domstorage/sessionstorage/enumerate-storage.html * bindings/js/JSLocationCustom.cpp: (WebCore::JSLocation::customGetPropertyNames): Removed the name from an unused parameter * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::customGetPropertyNames): Copy all of the keys into the property names array * storage/Storage.idl: Add CustomGetPropertyNames 2008-04-09 Timothy Hatcher Fixes the regression where resource time/size pills do not update during a load in the Inspector. http://bugs.webkit.org/show_bug.cgi?id=18374 Reviewed by John Sullivan. * page/inspector/ResourcesPanel.js: (ResourcesPanel.prototype.show): Remove an unneeded call to _updateGraphBars, since _updateSidebarWidth already calls _updateGraphBars. (ResourcesPanel.prototype.addResource): Call updateGraphSideWidth. (ResourcesPanel.prototype._updateGraphBars): Ditto. (ResourceSidebarTreeElement.prototype.updateGraphSideWidth): Update the style for graphSideElement with the passed in width. 2008-04-09 Antti Koivisto Reviewed by Mitz. Avoid unnecessary calls to virtual updateStyleAttributeIfNeeded() method. - do the the checking in call sites instead of inside the function - rename to updateStyleAttribute() - use namedAttrMap directly (for getting id attribute) in insertedIntoDocument/removedFromDocument to avoid calling attributes() which may trigger style attribute update. * dom/Element.cpp: (WebCore::Element::attributes): (WebCore::Element::getAttribute): (WebCore::Element::hasAttributes): (WebCore::Element::insertedIntoDocument): (WebCore::Element::removedFromDocument): * dom/Element.h: (WebCore::Element::updateStyleAttribute): * dom/NamedAttrMap.cpp: (WebCore::NamedAttrMap::addAttribute): * dom/StyledElement.cpp: (WebCore::StyledElement::updateStyleAttribute): * dom/StyledElement.h: 2008-04-09 Timothy Hatcher A more complete fix for: can't drag the Web Inspector when grabbing in the toolbar area. Makes dragging under the search field in the empty space work again. http://bugs.webkit.org/show_bug.cgi?id=18373 Reviewed by Adam Roben. * page/inspector/inspector.js: (WebInspector.toolbarDragStart): Prevent dragging if the event target is a toggleable toolbar item. Allow dragging when the target is a normal toolbar item. 2008-04-08 Sam Weinig Reviewed by Timothy Hatcher. Fix for http://bugs.webkit.org/show_bug.cgi?id=18373 REGRESSION: Can't drag the Web Inspector when grabbing in the toolbar area * page/inspector/inspector.css: 2008-04-08 Christian Persch Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=18360 "missing sentinel" warnings in PluginDatabaseGtk.cpp Use NULL, not 0 as sentinel in varargs calls. * plugins/gtk/PluginDatabaseGtk.cpp: (WebCore::PluginDatabase::getPluginPathsInDirectories): (WebCore::PluginDatabase::defaultPluginDirectories): 2008-04-04 Sam Weinig Reviewed by Geoffrey Garen. First step in implementing the "split window" - This patch takes the first step in changing the window navigation model from clearing the window properties on navigation, to replacing an inner window. This is necessary to safely perform security checks using the lexical global object. This first step adds a new class called JSDOMWindowWrapper, which wraps the real window object. All JS calls that would go to the window object now go to it, which it forwards to the current inner window. To accomplish this, the wrapper window is used as the ThisValue wherever the window was used before. * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBase): (WebCore::JSDOMWindowBase::clear): Reset the wrapper windows prototype too. (WebCore::JSDOMWindowBase::toThisObject): (WebCore::JSDOMWindowBase::wrapper): (WebCore::windowProtoFuncAToB): (WebCore::windowProtoFuncBToA): (WebCore::windowProtoFuncOpen): (WebCore::windowProtoFuncSetTimeout): (WebCore::windowProtoFuncClearTimeout): (WebCore::windowProtoFuncSetInterval): (WebCore::windowProtoFuncAddEventListener): (WebCore::windowProtoFuncRemoveEventListener): (WebCore::windowProtoFuncShowModalDialog): (WebCore::windowProtoFuncNotImplemented): (WebCore::toJS): * bindings/js/JSDOMWindowBase.h: Fix to expect the wrapper as the thisObj. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::postMessage): (WebCore::toDOMWindow): * bindings/js/JSDOMWindowWrapper.cpp: Added. (WebCore::): (WebCore::JSDOMWindowWrapper::JSDOMWindowWrapper): (WebCore::JSDOMWindowWrapper::~JSDOMWindowWrapper): (WebCore::JSDOMWindowWrapper::mark): (WebCore::JSDOMWindowWrapper::className): (WebCore::JSDOMWindowWrapper::getOwnPropertySlot): (WebCore::JSDOMWindowWrapper::put): (WebCore::JSDOMWindowWrapper::deleteProperty): (WebCore::JSDOMWindowWrapper::getPropertyNames): (WebCore::JSDOMWindowWrapper::getPropertyAttributes): (WebCore::JSDOMWindowWrapper::defineGetter): (WebCore::JSDOMWindowWrapper::defineSetter): (WebCore::JSDOMWindowWrapper::lookupGetter): (WebCore::JSDOMWindowWrapper::lookupSetter): (WebCore::JSDOMWindowWrapper::toGlobalObject): (WebCore::JSDOMWindowWrapper::impl): (WebCore::JSDOMWindowWrapper::disconnectFrame): (WebCore::JSDOMWindowWrapper::clear): (WebCore::toJS): * bindings/js/JSDOMWindowWrapper.h: Added. (WebCore::JSDOMWindowWrapper::innerWindow): (WebCore::JSDOMWindowWrapper::setInnerWindow): (WebCore::JSDOMWindowWrapper::classInfo): Forward methods to the innerWindow. * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::open): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/kjs_events.cpp: (WebCore::JSAbstractEventListener::handleEvent): * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::~KJSProxy): (WebCore::KJSProxy::evaluate): (WebCore::KJSProxy::clear): (WebCore::KJSProxy::initScript): (WebCore::KJSProxy::clearDocumentWrapper): (WebCore::KJSProxy::processingUserGesture): (WebCore::KJSProxy::attachDebugger): * bindings/js/kjs_proxy.h: (WebCore::KJSProxy::haveWindowWrapper): (WebCore::KJSProxy::windowWrapper): (WebCore::KJSProxy::globalObject): (WebCore::KJSProxy::initScriptIfNeeded): Hold onto the wrapper window instead of global object. As a convenience, keep the globalObject() as a forward to the inner window. * bindings/objc/DOMUtility.mm: (KJS::createDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: * dom/Document.cpp: (WebCore::Document::domWindow): * dom/Document.h: (WebCore::Document::defaultView): * loader/FrameLoader.cpp: (WebCore::FrameLoader::dispatchWindowObjectAvailable): * page/DOMWindow.idl: * page/Frame.cpp: (WebCore::Frame::~Frame): (WebCore::Frame::pageDestroyed): 2008-04-08 Brady Eidson Encourage Windows to rebuild - AGAIN... * WebCore.vcproj/build-generated-files.sh: * bindings/scripts/CodeGenerator.pm: * bindings/scripts/CodeGeneratorJS.pm: * config.h: 2008-04-08 Brady Eidson OMG release builds didn't have this flag Windows build bots I'm so sorry will you ever forgive me? (Found by Stephanie, rubberstamped and landed by Brady) * WebCore.vcproj/WebCore.vcproj: Add ENABLE_DOM_STORAGE for release builds 2008-04-08 Timothy Hatcher Fixes a crash in KJS::JSValue::toObject when closing Safari with Inspector open. http://bugs.webkit.org/show_bug.cgi?id=18371 Reviewed by Adam Roben. * page/InspectorController.cpp: (WebCore::inspectedWindow): NULL check the result of toJSDOMWindow. Return JSNull if JSDOMWindow is 0. * page/inspector/ElementsPanel.js: (ElementsPanel.prototype.reset): NULL check the result of InspectorController.inspectedWindow. 2008-04-08 Adam Roben Wx build fix * webcore-wx.bkl: Removed entry for non-existent file. 2008-04-08 Adam Roben qmake build fixes * WebCore.pro: Removed entries for non-existent files. 2008-04-08 Brady Eidson Rubberstamped by Adam Roben Touch some files to *strongly* encourage Windows to rebuilt with DOM_STORAGE enabled * WebCore.vcproj/build-generated-files.sh: * bindings/scripts/CodeGenerator.pm: * config.h: 2008-04-08 Timothy Hatcher Implements the majority of the Inspector UI refresh as shown at: http://trac.webkit.org/projects/webkit/wiki/ProposedWebInspectorUIRefresh http://bugs.webkit.org/show_bug.cgi?id=17773 A few areas that have not been re-implemented with the new UI are: * Search and search results. * Request and response headers in the Resources panel. * Changing the sorting, grouping or toggling small rows in Resources. * Image and font previews in the icon of resources. Reviewed by Adam Roben. * English.lproj/InspectorLocalizedStrings.js: Updated to match actual strings. * WebCore.vcproj/WebCore.vcproj: Added new files. * page/InspectorController.cpp: (WebCore::InspectorController::setWindowVisible): Call resetScriptObjects() instead of individual clear functions. (WebCore::InspectorController::populateScriptObjects): Renamed from populateScriptResources. (WebCore::InspectorController::addDatabaseScriptResource): Call addDatabase instead of addResource. (WebCore::InspectorController::removeDatabaseScriptResource): Call removeDatabase instead of removeResource. (WebCore::InspectorController::resetScriptObjects): Renamed from clearScriptResources. (WebCore::InspectorController::didCommitLoad): Call resetScriptObjects() instead of individual clear functions. * page/InspectorController.h: Rename functions. * page/inspector/Console.js: Changed the object name to Console from ConsolePanel. Made it inherit the prototype from View. Added code to animate in and out. * page/inspector/Database.js: Removed title updating and Resource pseudo-subclassing. Made more of a Model object that just encapsulates data. Add a getter for table names. * page/inspector/DatabaseQueryView.js: Added. Implements the view seen when selecting a Database in the DatabasesPanel. Implemented as an interactive console-like area. * page/inspector/DatabaseTableView.js: Added. Implements the view seen when selecting a Database Table in the DatabasesPanel. Matches the old Browse view of Database panels. * page/inspector/DatabasesPanel.js: Changed the object name to DatabasesPanel from DatabasePanel. Implements a panel that shows a sidebar of Databases and Database Tables. * page/inspector/ElementsPanel.js: Changed the object name to ElementsPanel from DocumentPanel. Implements the DOM tree that shows the DOM rooted at the main resource. * page/inspector/FontView.js: Use this.contentElement instead of this.element. * page/inspector/ImageView.js: Ditto. * page/inspector/Images/clearConsoleButtons.png: Added. * page/inspector/Images/consoleButtons.png: Added. * page/inspector/Images/darkShadow.png: Flipped. * page/inspector/Images/database.png: Modified to be 32x32. * page/inspector/Images/databaseTable.png: Added. * page/inspector/Images/databasesIcon.png: Added. * page/inspector/Images/disclosureTriangleSmallDown.png: Added. * page/inspector/Images/disclosureTriangleSmallDownBlack.png: Added. * page/inspector/Images/disclosureTriangleSmallDownWhite.png: Added. * page/inspector/Images/disclosureTriangleSmallRight.png: Added. * page/inspector/Images/disclosureTriangleSmallRightBlack.png: Added. * page/inspector/Images/disclosureTriangleSmallRightDown.png: Added. * page/inspector/Images/disclosureTriangleSmallRightDownBlack.png: Added. * page/inspector/Images/disclosureTriangleSmallRightDownWhite.png: Added. * page/inspector/Images/disclosureTriangleSmallRightWhite.png: Added. * page/inspector/Images/dockButtons.png: Added. * page/inspector/Images/elementsIcon.png: Added. * page/inspector/Images/gradientHighlightBottom.png: * page/inspector/Images/resourceCSSIcon.png: Added. * page/inspector/Images/resourceDocumentIcon.png: Added. * page/inspector/Images/resourcePlainIcon.png: Added. * page/inspector/Images/resourcesIcon.png: Added. * page/inspector/Images/resourcesSizeGraphIcon.png: Added. * page/inspector/Images/resourcesTimeGraphIcon.png: Added. * page/inspector/Images/scriptsIcon.png: Added. * page/inspector/Images/segment.png: Modified to fit the taller status bar. * page/inspector/Images/segmentEnd.png: Ditto. * page/inspector/Images/segmentHover.png: Ditto. * page/inspector/Images/segmentHoverEnd.png: Ditto. * page/inspector/Images/segmentSelected.png: Ditto. * page/inspector/Images/segmentSelectedEnd.png: Ditto. * page/inspector/Images/sidebarSelectionBackground.png: Added. * page/inspector/Images/sidebarSelectionBackgroundFocused.png: Added. * page/inspector/Images/sidebarSelectionBackgroundInactive.png: Added. * page/inspector/Images/sidebarSmallSelectionBackground.png: Added. * page/inspector/Images/sidebarSmallSelectionBackgroundFocused.png: Added. * page/inspector/Images/sidebarSmallSelectionBackgroundInactive.png: Added. * page/inspector/Images/statusbarBackground.png: Added. * page/inspector/Images/statusbarBottomBackground.png: Added. * page/inspector/Images/statusbarButtons.png: Added. * page/inspector/Images/statusbarResizerVertical.png: Added. * page/inspector/Images/toolbarItemSelected.png: Added. * page/inspector/Panel.js: Added support for toolbar items and status bar items. Inherits from the View prototype. * page/inspector/Resource.js: Removed title updating and the ResourceTreeElement. Made more of a Model object that just encapsulates data. * page/inspector/ResourceCategory.js: Removed the ResourceCategoryTreeElement. Made more of a Model object that just encapsulates data. * page/inspector/ResourceView.js: A simple base object for Resource views shown in ResourcesPanel. Inherits from the View prototype. * page/inspector/ResourcesPanel.js: Changed the object name to ResourcesPanel from NetworkPanel. Implements the timeline graph, size graph and resource viewing by using ResourceViews. * page/inspector/SidebarTreeElement.js: Added. Inherits from TreeElement and implements a section element and a regular element that has an icon, title and optional subtitle. * page/inspector/SourceView.js: Use this.contentElement instead of this.element. * page/inspector/StylesSidebarPane.js: Null check WebInspector.mainResource. * page/inspector/View.js: Added. A simple object to manage showing and hiding an element. * page/inspector/WebKit.qrc: Added new files. * page/inspector/inspector.css: New and changed style rules to support the new UI. * page/inspector/inspector.html: New and changed HTML for the UI. The search field is disabled until search is reimplemented. * page/inspector/inspector.js: Removed code related to the sidebar and back-forward lists. Also removed code related to navigation to panels. Added code to instantiate the new panels and setup the toolbar. 2008-04-08 Dan Bernstein Reviewed by Antti Koivisto. - fix a regression from r31313 which made the inspector highlight and yellow find highlight for table cells with extra top appear in the wrong position * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): Changed absolutePosition() to absolutePositionForContent(), to get the right position for children of table cells. This is the correct fix for this part of r31313. * rendering/RenderBox.cpp: (WebCore::RenderBox::absolutePosition): Reverted the change from r31313 by changing absolutePosition() to absolutePositionForContent() here too. * rendering/RenderObject.h: (WebCore::RenderObject::absolutePositionForContent): Changed to return the result from absolutePosition(). * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::absoluteClippedOverflowRect): Turned the "else" case into an early return. (WebCore::RenderTableCell::absolutePosition): Reverted the change from r31313. 2008-04-08 Dan Bernstein Reviewed by Antti Koivisto. - fix http://bugs.webkit.org/show_bug.cgi?id=18172 REGRESSION (r31114-31132): Page renders structured almost horizontally (at flickr.com) Test: fast/block/float/br-with-clear-2.html * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): The existing code for handling a float-clearing
in incremental layout had several bugs in it: it only applied when the
was on the last line of the block; it assumed that the
was always the rightmost box on the line (which is false in right-to-left runs); and in some places it looked at the last child of the block instead of the last box on the line. Fixed these bugs. 2008-04-08 Adam Roben Mac build fix * WebCore.xcodeproj/project.pbxproj: Removed MainThread* files which were moved to WTF. 2008-04-08 Timothy Hatcher Change WebInspector.elementDragStart and WebInspector.elementDragEnd to have more state, so calling elementDragEnd does not need the listener functions. Also makes calling elementDragStart again without elementDragEnd work correctly. Reviewed by Adam Roben. * page/inspector/ElementsPanel.js: (DocumentPanel.prototype.rightSidebarResizerDragStart): Just call WebInspector.elementDragStart. Removed code that stored away the listeners now that elementDragStart does it. (DocumentPanel.prototype.rightSidebarResizerDragEnd): Just call WebInspector.elementDragEnd. Removed code that deleted listeners properties now that elementDragEnd does it. * page/inspector/inspector.js: (WebInspector.sidebarResizerDragEnd): Pass less arguments to elementDragEnd. (WebInspector.searchResultsResizerDragEnd): Ditto. (WebInspector.elementDragStart): Store the listeners as private properties on WebInspector. If the properties are already defined, call elementDragEnd first. (WebInspector.elementDragEnd): Remove the event listeners using the stored properties. Delete the private listener properties. 2008-04-08 Adam Roben Build fix * ForwardingHeaders/wtf/MainThread.h: Added. Forgot to commit this. 2008-04-08 Adam Roben Move callOnMainThread to WTF Reviewed by Alexey Proskuryakov. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: Removed MainThread files. * bindings/js/JSCustomSQLTransactionCallback.cpp: * loader/icon/IconDatabase.cpp: (WebCore::iconDatabase): * storage/Database.cpp: (WebCore::Database::Database): * storage/DatabaseTracker.cpp: Updated #includes and replaced calls to WebCore::initializeThreadingAndMainThread with calls to KJS::initializeThreading. * platform/MainThread.cpp: Removed. * platform/MainThread.h: Removed. * platform/gtk/MainThreadGtk.cpp: Removed. * platform/mac/MainThreadMac.mm: Removed. * platform/qt/MainThreadQt.cpp: Removed. * platform/win/MainThreadWin.cpp: Removed. * platform/wx/MainThreadWx.cpp: Removed. 2008-04-07 Timothy Hatcher Makes the Network timeline graph resource sizes on the bar graph when Transfer Size is selected. http://bugs.webkit.org/show_bug.cgi?id=18351 Reviewed by Adam Roben. * page/inspector/Resource.js: (WebInspector.Resource.CompareByTime): Array sorting function for time. Copied from WebInspector.NetworkPanel.timelineEntryCompare. * page/inspector/ResourcesPanel.js: (WebInspector.NetworkPanel): Set the selectedIndex of graphModeSelectElement to make Transfer Time the default graph. (WebInspector.NetworkPanel.prototype.changeGraphMode): Call calculator.reset, _refreshAllResources and _updateGraphDividersIfNeeded. (WebInspector.NetworkPanel.prototype.get totalDuration): Removed. (WebInspector.NetworkPanel.prototype._updateGraphBoundriesIfNeeded): Removed boundary checking code and just call calculator.updateBoundries. (WebInspector.NetworkPanel.prototype._updateGraphDividersIfNeeded): Add a force argument. Use calculator.boundarySpan when computing the slice. If the slice is NaN, don't make a label. Ask the calculator to format the label values for each slice. (WebInspector.NetworkPanel.prototype.clearTimeline): Call calculator.reset. (WebInspector.NetworkPanel.timelineEntryCompare): Call WebInspector.Resource.CompareByTime. (WebInspector.NetworkTimelineEntry.prototype.refresh): Ask the panel's calculator to compute bar graph percentages for a resource. Use those percentages to change the bar style. (WebInspector.ResourceCalculator): Renamed from WebInspector.TimelineValueCalculator. (WebInspector.ResourceCalculator.prototype.computeSummaryValues): Changed the Array.forEach to a normal for loop. Work with resources instead of TimelineEntries. (WebInspector.ResourceCalculator.prototype.computeBarGraphPercentages): Return basic bar graph percents with start always being zero. (WebInspector.ResourceCalculator.prototype.get boundarySpan): Return the difference between maximumBoundary and minimumBoundary. (WebInspector.ResourceCalculator.prototype.updateBoundries): Update maximumBoundary based on _value. The minimumBoundary is always zero. (WebInspector.ResourceCalculator.prototype.reset): Delete maximumBoundary and minimumBoundary. (WebInspector.ResourceCalculator.prototype._value): Takes a Resource instead of TimelineEntry. (WebInspector.ResourceTransferTimeCalculator): Renamed from TransferTimeCalculator. (WebInspector.ResourceTransferTimeCalculator.prototype.computeSummaryValues): Work with resources instead of entries. Changed the Array.forEach to a normal for loop. (WebInspector.ResourceTransferTimeCalculator.prototype.computeBarGraphPercentages): Return percents just like WebInspector.NetworkTimelineEntry.prototype.refresh was doing before. (WebInspector.ResourceTransferTimeCalculator.prototype.updateBoundries): Update minimumBoundary and maximumBoundary just like the checks WebInspector.NetworkPanel.prototype._updateGraphBoundriesIfNeeded was doing. (WebInspector.ResourceTransferSizeCalculator): Renamed from TransferSizeCalculator. (WebInspector.ResourceTransferSizeCalculator.prototype._value): Takes a Resource instead of TimelineEntry. 2008-04-08 Rob Buis Fix the SVG build. * svg/SVGFEFloodElement.cpp: (WebCore::SVGFEFloodElement::filterEffect): 2008-04-08 Alice Liu Reviewed by Dan Bernstein. fixed http://bugs.webkit.org/show_bug.cgi?id=18329 REGRESSION: Assertion failure in -[WebViewFactory endOfTextMarkerRange:] when invoking the Dictionary pop-up * page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): In the section of code where WebCore-equivalents of mac-specific types are prepared, some functions weren't meant to operate on the default initialized values. Checking for nil in certain places will better maintain the original pre-refactoring code path. 2008-04-08 Dan Bernstein Reviewed by Maciej Stachowiak. - fix most of the Windows layout test regressions from the font-weight patch * platform/graphics/win/FontCacheWin.cpp: (WebCore::matchImprovingEnumProc): Changed to be symmetric with respect to italics: always prefer (reject) a candidate that changes the italics trait to (from) the desired value. (WebCore::createGDIFont): Added code to set more members of the LOGFONT structure before creating the font. 2008-04-07 Rob Buis Reviewed by Ollie. http://bugs.webkit.org/show_bug.cgi?id=18354 feFlood in attribute should be removed according to SVG 1.1 Errata Remove the in attribute from SVGFEFlood DOM. * svg/SVGFEFloodElement.cpp: (WebCore::SVGFEFloodElement::parseMappedAttribute): * svg/SVGFEFloodElement.h: * svg/SVGFEFloodElement.idl: 2008-04-07 Brady Eidson Touch JSStorageCustom.cpp to try to FORCE a recompile on bots that haven't gotten the message * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::customPut): 2008-04-07 Brady Eidson Reviewed by John Honeycutt ENABLE_DOM_STORAGE for Windows * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/build-generated-files.sh: 2008-04-07 Brady Eidson Fix build for builds without DOM_STORAGE enabled * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchStorageEvent): * dom/EventTargetNode.h: 2008-04-07 Alice Liu Reviewed by Beth Dakin. * WebCore.vcproj/WebCore.vcproj: Added a few cross-platform accessibility source files * WebCore.xcodeproj/project.pbxproj: Added AXObjectCache.cpp * page/AXObjectCache.cpp: Added. These were made cross-platform: (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::childrenChanged): * page/AXObjectCache.h: These were made platform-specific (WebCore::AXObjectCache::isIDinUse): (WebCore::AXObjectCache::detachWrapper): (WebCore::AXObjectCache::attachWrapper): (WebCore::AXObjectCache::postNotificationToElement): * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::detach): Since only the mac has a wrapper for now, so temporarily wrapping this line in #if PLATFORM(MAC) (WebCore::AccessibilityObject::removeAXObjectID): Since only the mac has uses Accessibility Object IDs, wrap this line in #if PLATFORM(MAC) * page/mac/AXObjectCacheMac.mm: Detaching and attaching the wrapper is platform-specific since each wrapper class is platform-specific. (WebCore::AXObjectCache::detachWrapper): (WebCore::AXObjectCache::attachWrapper): 2008-04-07 Brady Eidson Lovingly reviewed by Sam Weinig - HTML5 SessionStorage and underpinnings for LocalStorage Tests: storage/domstorage/sessionstorage/iframe-events.html storage/domstorage/sessionstorage/index-get-and-set.html storage/domstorage/sessionstorage/simple-events.html storage/domstorage/sessionstorage/simple-usage.html storage/domstorage/sessionstorage/window-open.html storage/domstorage/window-attributes-exist.html * Configurations/WebCore.xcconfig: Define to enable DOM_STORAGE * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::mark): Add optionalSessionStorage case * bindings/js/JSEventCustom.cpp: (WebCore::toJS): Add StorageEvent case * bindings/js/JSStorageCustom.cpp: (WebCore::JSStorage::canGetItemsForName): (WebCore::JSStorage::nameGetter): If the property doesn't exist on the object, call through to getItem() (WebCore::JSStorage::customPut): If the property doesn't exist on the object, call through to setItem() * dom/Event.cpp: (WebCore::Event::isStorageEvent): * dom/Event.h: * dom/EventNames.h: Add "storage" * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchStorageEvent): * dom/EventTargetNode.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::createWindow): After a new page has been created, set its SessionStorage object to a copy of the previous Page's * page/DOMWindow.cpp: (WebCore::DOMWindow::sessionStorage): Accessor to pull the appropriate OriginStorage out of the Page's SessionStorage. (WebCore::DOMWindow::localStorage): To be filled in later * page/DOMWindow.h: (WebCore::DOMWindow::optionalSessionStorage): Return the session Storage object for this window to mark, if any exists * page/DOMWindow.idl: * page/Page.cpp: (WebCore::Page::sessionStorage): Create and/or return the SessionStorage for this Page. (WebCore::Page::setSessionStorage): Set the SessionStorage for this Page - used in FrameLoader after a Window.open(); * page/Page.h: * storage/OriginStorage.cpp: Intermediate layer between individual Storage objects, and shared StorageMap objects. There is one OriginStorage object per SecurityOrigin in each "unique set of storage areas", such as the SessionStorage. This layer forwards DOM-level calls down to the backing StorageMap, handles copy-on-write along with the StorageMap, fires StorageEvents to the DOM when a value is changed, and will eventually handle quota enforcement. (WebCore::OriginStorage::create): (WebCore::OriginStorage::OriginStorage): (WebCore::OriginStorage::~OriginStorage): (WebCore::OriginStorage::copy): (WebCore::OriginStorage::length): (WebCore::OriginStorage::key): (WebCore::OriginStorage::getItem): (WebCore::OriginStorage::setItem): (WebCore::OriginStorage::removeItem): (WebCore::OriginStorage::contains): (WebCore::OriginStorage::dispatchStorageEvent): * storage/OriginStorage.h: * storage/SessionStorage.cpp: From the HTML5 spec: "Each top-level browsing context has a unique set of session storage areas, one for each origin." This object represents that "unique set of session storage areas", and creates or returns the Storage object for the requested SecurityOrigin (WebCore::SessionStorage::create): (WebCore::SessionStorage::SessionStorage): (WebCore::SessionStorage::copy): (WebCore::SessionStorage::originStorage): * storage/SessionStorage.h: (WebCore::SessionStorage::page): * storage/Storage.cpp: Representation of the DOM-level object, wrapped by JSStorage. There is a unique Storage object per Window (per-Frame) that wraps a specific shared OriginStorage object. (WebCore::Storage::create): (WebCore::Storage::Storage): (WebCore::Storage::length): (WebCore::Storage::key): (WebCore::Storage::getItem): (WebCore::Storage::setItem): (WebCore::Storage::removeItem): (WebCore::Storage::contains): * storage/Storage.h: * storage/Storage.idl: * storage/StorageEvent.cpp: (WebCore::StorageEvent::StorageEvent): (WebCore::StorageEvent::initStorageEvent): * storage/StorageEvent.h: (WebCore::StorageEvent::isStorageEvent): * storage/StorageMap.cpp: The physical map of key/value pairs that is shared between OriginStorage objects, and implements copy-on-write semantics whenever a value is changed (WebCore::StorageMap::create): (WebCore::StorageMap::StorageMap): (WebCore::StorageMap::copy): (WebCore::StorageMap::invalidateIterator): Used to support the key(unsigned i) part of the API (WebCore::StorageMap::setIteratorToIndex): Ditto (WebCore::StorageMap::length): (WebCore::StorageMap::key): (WebCore::StorageMap::getItem): (WebCore::StorageMap::setItem): (WebCore::StorageMap::removeItem): (WebCore::StorageMap::contains): * storage/StorageMap.h: 2008-04-07 Timothy Hatcher Renamed various functions that are internal to the Console object to have an underscore prefix. Rubber-stamped by Adam Roben. * page/inspector/Console.js: 2008-04-07 Timothy Hatcher Renamed various functions and properties that are internal to an object to have an underscore prefix. Rubber-stamped by Adam Roben. * page/inspector/Resource.js: * page/inspector/ResourcesPanel.js: 2008-04-07 Timothy Hatcher Fixes coding style for two utility getters. * page/inspector/utilities.js: Fix coding style for the totalOffsetLeft and totalOffsetTop getters. 2008-04-07 Dan Bernstein Reviewed by Dave Hyatt. - fix http://bugs.webkit.org/show_bug.cgi?id=18311 REGRESSION (r31620): Font variants (e.g. Helvetica Neue *Light*) don't render correctly * platform/mac/WebFontCache.mm: (+[WebFontCache internalFontWithFamily:traits:weight:size:]): Changed to match by family name first, and only if that fails, look for a match by full (PostScript) name. Reverted the full name-based match logic to only distinguish between the broad categories of "bold" and "not bold". 2008-04-07 Timothy Hatcher When the WebInspector.currentFocusElement changes, move the caret selection to be inside the focused element. This makes sure the caret moves in and out of the console when the focus changes. Reviewed by Adam Roben. * page/inspector/TextPrompt.js: (TextPrompt.prototype.isCaretInsidePrompt): Just call isInsertionCaretInside. * page/inspector/inspector.js: (WebInspector.set currentFocusElement): Make a caret selection inside the focused element if there isn't a range selection and there isn't already a caret selection inside. * page/inspector/utilities.js: (Element.prototype.isInsertionCaretInside): Added. Tests if the selection is collapsed and is inside the element. 2008-04-07 Brady Eidson Reviewed by Tim Hatcher Add 1 more empty file for upcoming work, as a separate step, to keep all build-systems working * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSStorageCustom.cpp: Added. 2008-04-07 Alexey Proskuryakov Reviewed by Dan Bernstein. Inline frame ISO-8859-1 even though parent character set is UTF-8 Test: fast/loader/inherit-charset-to-empty-frame.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::write): Treat an empty m_encoding the same as null one. 2008-04-07 Timothy Hatcher Rename some Inspector panel objects to facilitate the up-coming UI refresh changes. Reviewed by Adam Roben. * page/inspector/DatabasesPanel.js: Renamed ResourcePanel to ResourceView. * page/inspector/ElementsPanel.js: Renamed SourcePanel to SourceView. * page/inspector/FontView.js: Renamed FontPanel to FontView. * page/inspector/ImageView.js: Renamed ImagePanel to ImageView. * page/inspector/Resource.js: Instantiate the new "View" named objects. * page/inspector/ResourceView.js: Renamed ResourcePanel to ResourceView. * page/inspector/SourceView.js: Renamed SourcePanel to SourceView. 2008-04-07 Timothy Hatcher Fix an exception and remove code that was missed when TextPrompt was added. This makes the Console work again. Reviewed by Adam Roben. * page/inspector/Console.js: Removed code that used non-existent properties. 2008-04-07 Timothy Hatcher Remove the workaround for bug 11399 now that it is fixed. Reviewed by Adam Roben. * page/inspector/Console.js: Removed the 'with' statement around the eval and call eval directly on the inspected window. 2008-04-07 Luca Bruno Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=18297 Bug #18297 - Acid2/Acid3 -tests don't load load with soup. Fixes in the libsoup backend: data url parsing, acid tests, redirects, response headers handling and re-entrancy issues on job cancellation. Thanks to Dan Winship for libsoup hints. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): add m_cancelled and remove unuseful m_session * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::restartedCallback): added to route redirects to webkit (WebCore::dataCallback): add response headers, some checks and fix re-entrancy (WebCore::parseDataUrl): be an idle callback for the main loop (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::cancel): fixed re-entrancy 2008-04-07 Jan Michael Alonzo Build fix, rubber-stamped and landed by ap. * GNUmakefile.am: Fix dom_storage conditional and typo: ENABLE_DOM_STORAG 2008-04-07 Brady Eidson Whoops, idls don't go in the vcproj! * WebCore.vcproj/WebCore.vcproj: 2008-04-06 Brady Eidson Attempt to tickle Windows build into accepting this idl * storage/StorageEvent.idl: 2008-04-06 Brady Eidson Reviewed by Sam HTML5 Session and Local Storage Land a bunch of empty files and interfaces to keep things building while I finish off the rest of the implementation of SessionStorage * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * storage/OriginStorage.cpp: Added. * storage/OriginStorage.h: Added. * storage/SessionStorage.cpp: Added. * storage/SessionStorage.h: Added. * storage/Storage.cpp: Added. (WebCore::Storage::length): (WebCore::Storage::key): (WebCore::Storage::getItem): (WebCore::Storage::setItem): (WebCore::Storage::removeItem): * storage/Storage.h: Added. * storage/Storage.idl: Added. * storage/StorageEvent.cpp: Added. * storage/StorageEvent.h: Added. (WebCore::StorageEvent::key): (WebCore::StorageEvent::oldValue): (WebCore::StorageEvent::newValue): (WebCore::StorageEvent::uri): (WebCore::StorageEvent::source): (WebCore::StorageEvent::initStorageEvent): * storage/StorageEvent.idl: Added. * storage/StorageMap.cpp: Added. * storage/StorageMap.h: Added. 2008-04-05 Kevin Ollivier Reviewed by Mark Rowe. Add CSS to the MIMETypeRegistry, which ensures CSS files get the right MIMEType when loaded from disk. * platform/gtk/MIMETypeRegistryGtk.cpp: (WebCore::): * platform/wx/MimeTypeRegistryWx.cpp: (WebCore::): 2008-04-05 Rob Buis Reviewed by Eric. http://bugs.webkit.org/show_bug.cgi?id=17129 Incorrect style resolution in CSS styled SVG, with multiple style sheets Fix the style resolution on the svg by ensuring xml-stylesheet pseudo attributes title and alternate are transferred to the stylesheet created from the ProcessingInstruction. * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::ProcessingInstruction): (WebCore::ProcessingInstruction::checkStyleSheet): (WebCore::ProcessingInstruction::setCSSStyleSheet): * dom/ProcessingInstruction.h: 2008-04-05 Dan Bernstein Reviewed by Darin Adler. - fix Excessive repainting of cells in tables with non-auto height Test: fast/repaint/table-two-pass-layout-overpaint.html * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): Changed the first pass over the sections to only call calcRowHeight() and recalcOuterBorder() but not layoutRows(), because the section's final height is unknown yet. Removed caching of m_height before the call to calcHeight(), because for non-positioned tables, calcHeight() only calculates the vertical margins and does not change m_height. Added a second pass over the sections, after the table height is known, to call layoutRows() on each section, with additional height if needed. Did minimal cleanup including caching the value of collapseBorders() in a local variable and changing a while loop into a for loop. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowHeight): Changed to return the height of the section based on row height calculations. (WebCore::RenderTableSection::layoutRows): Removed a call to recalcOuterBorder(), which is now done by RenderTable::layout(). * rendering/RenderTableSection.h: Changed calcRowHeight() to have a return value. 2008-04-05 Simon Hausmann Reviewed by Holger. Fixes: Disable "unimplemented" warnings when building WebKit inside Qt. * WebCore.pro: * platform/NotImplemented.h: 2008-04-05 Simon Hausmann Rubber-stamped by Holger Revert "* Load images incrementally. This will show warnings on the console" This rolls out -r29739. This unfortunately caused some crashes and drawing errors. Backing out for now. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::setData): 2008-04-04 Kevin Ollivier Add GradientWx.cpp to the wx build process. * webcore-wx.bkl: 2008-04-04 Dan Bernstein Reviewed by Sam Weinig. - speed up CSSFontSelector::getFontData() * css/CSSFontSelector.cpp: (WebCore::fontDataForGenericFamily): Factored out of getFontData(). (WebCore::CSSFontSelector::getFontData): Changed to call fontDataForGenericFamily() directly if the map is empty. 2008-04-04 Jon Honeycutt Reviewed by Oliver. Replace AccessibilityObject::isRenderImage() with a virtual RenderObject::isRenderImage(). * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::accessibilityIsIgnored): (WebCore::AccessibilityObject::addChildren): * page/AccessibilityObject.h: (WebCore::AccessibilityObject::isDetached): * rendering/RenderImage.h: (WebCore::RenderImage::isRenderImage): * rendering/RenderObject.h: (WebCore::RenderObject::isRenderImage): 2008-04-04 Dan Bernstein - try to fix the wx build * platform/graphics/wx/FontPlatformDataWx.cpp: (WebCore::fontWeightToWxFontWeight): (WebCore::FontPlatformData::FontPlatformData): 2008-04-04 Jon Honeycutt Reviewed by Beth. Some more clean-up of AccessibilityObject: - Rearranged/grouped methods. - Marked many methods const. - Changed many methods to take args by const ref instead of by val. - Made headingLevel() static. - Renamed detached() to isDetached(), loaded() to isLoaded(), documentLinks to getDocumentLinks(). - Made clearChildren(), removeAXObjectID(), isDetached() private. - Added notImplemented() calls for unimplemented methods. - Replaced stringForReplacedNode method with static function. * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::~AccessibilityObject): (WebCore::AccessibilityObject::firstChild): (WebCore::AccessibilityObject::lastChild): (WebCore::AccessibilityObject::previousSibling): (WebCore::AccessibilityObject::nextSibling): (WebCore::AccessibilityObject::parentObject): (WebCore::AccessibilityObject::parentObjectUnignored): (WebCore::AccessibilityObject::headingLevel): (WebCore::AccessibilityObject::anchorElement): (WebCore::AccessibilityObject::actionElement): (WebCore::AccessibilityObject::mouseButtonListener): (WebCore::AccessibilityObject::helpText): (WebCore::AccessibilityObject::textUnderElement): (WebCore::AccessibilityObject::hasIntValue): (WebCore::AccessibilityObject::intValue): (WebCore::AccessibilityObject::stringValue): (WebCore::AccessibilityObject::title): (WebCore::AccessibilityObject::accessibilityDescription): (WebCore::AccessibilityObject::boundingBoxRect): (WebCore::AccessibilityObject::size): (WebCore::AccessibilityObject::linkedUIElement): (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId): (WebCore::AccessibilityObject::accessibilityIsIgnored): (WebCore::AccessibilityObject::isLoaded): (WebCore::AccessibilityObject::layoutCount): (WebCore::AccessibilityObject::textLength): (WebCore::AccessibilityObject::selectedText): (WebCore::AccessibilityObject::selection): (WebCore::AccessibilityObject::selectedTextRange): (WebCore::AccessibilityObject::setSelectedText): (WebCore::AccessibilityObject::setSelectedTextRange): (WebCore::AccessibilityObject::makeRangeVisible): (WebCore::AccessibilityObject::url): (WebCore::AccessibilityObject::isVisited): (WebCore::AccessibilityObject::isFocused): (WebCore::AccessibilityObject::setValue): (WebCore::AccessibilityObject::isEnabled): (WebCore::AccessibilityObject::topRenderer): (WebCore::AccessibilityObject::textControl): (WebCore::AccessibilityObject::widget): (WebCore::AccessibilityObject::axObjectCache): (WebCore::AccessibilityObject::getDocumentLinks): (WebCore::AccessibilityObject::documentFrameView): (WebCore::AccessibilityObject::widgetForAttachmentView): (WebCore::AccessibilityObject::frameViewIfRenderView): (WebCore::AccessibilityObject::visiblePositionRange): (WebCore::AccessibilityObject::doAXTextMarkerRangeForLine): (WebCore::AccessibilityObject::doAXTextMarkerRangeForUnorderedTextMarkers): (WebCore::AccessibilityObject::doAXLeftWordTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXRightWordTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXLeftLineTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXRightLineTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXSentenceTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXParagraphTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXStyleTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::textMarkerRangeForRange): (WebCore::stringForReplacedNode): (WebCore::AccessibilityObject::doAXStringForTextMarkerRange): (WebCore::AccessibilityObject::doAXBoundsForTextMarkerRange): (WebCore::AccessibilityObject::doAXLengthForTextMarkerRange): (WebCore::AccessibilityObject::doSetAXSelectedTextMarkerRange): (WebCore::AccessibilityObject::doAXTextMarkerForPosition): (WebCore::AccessibilityObject::doAXNextTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXNextWordEndTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousWordStartTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXNextLineEndTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousLineStartTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXNextSentenceEndTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousSentenceStartTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXNextParagraphEndTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousParagraphStartTextMarkerForTextMarker): (WebCore::AccessibilityObject::textMarkerForIndex): (WebCore::AccessibilityObject::doAXUIElementForTextMarker): (WebCore::AccessibilityObject::doAXLineForTextMarker): (WebCore::AccessibilityObject::rangeForTextMarkerRange): (WebCore::AccessibilityObject::indexForTextMarker): (WebCore::AccessibilityObject::doAXRangeForLine): (WebCore::AccessibilityObject::doAXRangeForPosition): (WebCore::AccessibilityObject::doAXRangeForIndex): (WebCore::AccessibilityObject::doAXStyleRangeForIndex): (WebCore::AccessibilityObject::doAXStringForRange): (WebCore::AccessibilityObject::doAXBoundsForRange): (WebCore::AccessibilityObject::doAccessibilityHitTest): (WebCore::AccessibilityObject::focusedUIElement): (WebCore::AccessibilityObject::observableObject): (WebCore::AccessibilityObject::roleValue): (WebCore::AccessibilityObject::canSetFocusAttribute): (WebCore::AccessibilityObject::canSetValueAttribute): (WebCore::AccessibilityObject::canSetTextRangeAttributes): (WebCore::AccessibilityObject::hasChildren): (WebCore::AccessibilityObject::axObjectID): * page/AccessibilityObject.h: (WebCore::VisiblePositionRange::VisiblePositionRange): (WebCore::AccessibilityObject::PlainTextRange::PlainTextRange): (WebCore::AccessibilityObject::areaElement): (WebCore::AccessibilityObject::renderer): (WebCore::AccessibilityObject::children): (WebCore::AccessibilityObject::wrapper): (WebCore::AccessibilityObject::isDetached): * page/mac/AccessibilityObjectWrapper.mm: (AXAttributeStringSetHeadingLevel): (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): 2008-04-04 Timothy Hatcher Restore the user entered text when clearing the auto-completion. This is important when the user typed text that is a different case than the completion. This has no affect on the Console, since it matches completions case-sensitively. This is used in the up-coming Database Query view for words like "SELECT" and "INSERT". Reviewed by Adam Roben. * page/inspector/TextPrompt.js: (WebInspector.TextPrompt.prototype.clearAutoComplete): Restore the user typed text in the original DOM range that complete() saved away. (WebInspector.TextPrompt.prototype.complete): Store away the fullWordRange and it's text content so clearAutoComplete can restore it. 2008-04-04 Timothy Hatcher Don't trim whitespace when looking for the current match, this prevents tabbing through matches in the up-coming Database Query view. Reviewed by Adam Roben. * page/inspector/TextPrompt.js: Removed a trimTrailingWhitespace() call. 2008-04-04 Timothy Hatcher Factor out the Console text completion and command history into a new TextPrompt object. This TextPrompt object will be used later other parts of the Inspector that need text completion and history. Not functionality changed, just moved code around. Reviewed by Adam Roben. * WebCore.vcproj/WebCore.vcproj: Add TextPrompt.js. * page/inspector/Console.js: Call the new prompt object and delete all the code that moved. * page/inspector/TextPrompt.js: Added. Moved code from Console.js. * page/inspector/WebKit.qrc: Add TextPrompt.js. * page/inspector/inspector.html: Add TextPrompt.js. 2008-04-04 Timothy Hatcher Makes setting shouldRefreshChildren on a TreeElement perform the refresh immediately if the element is already expanded. Reviewed by Adam Roben. * page/inspector/treeoutline.js: (TreeElement.prototype.get shouldRefreshChildren): Return this._shouldRefreshChildren. (TreeElement.prototype.set shouldRefreshChildren): If changing to true, and already expanded, call expand again to trigger the refresh. Sets this._shouldRefreshChildren. (TreeElement.prototype._attach): Check for this._shouldRefreshChildren. (TreeElement.prototype.expand): Ditto. 2008-04-04 Jon Honeycutt Reviewed by Beth. Some clean up of AccessibilityObject: - Use existing isImage() in more places. - Use existing isTextControl() in more places. - Added isRenderImage(). Check this before casting to RenderImage, since other, non-RenderImage derived RenderObjects (e.g. RenderListMarker) can return true for isImage(). - Fix two copy/paste errors with improper semicolons. * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isImageButton): Use isImage(). (WebCore::AccessibilityObject::isRenderImage): Added. (WebCore::AccessibilityObject::isAnchor): Use isImage(). (WebCore::AccessibilityObject::isAttachment): Same. (WebCore::AccessibilityObject::accessibilityDescription): Same. (WebCore::AccessibilityObject::accessibilityIsIgnored): Use isRenderImage() instead of isImage(). (WebCore::AccessibilityObject::url): Use isImage(). (WebCore::AccessibilityObject::textControl): Remove improper semicolon, and use isTextControl(). (WebCore::AccessibilityObject::textMarkerForIndex): Same. (WebCore::AccessibilityObject::indexForTextMarker): Use isTextControl(). (WebCore::AccessibilityObject::doAXRangeForLine): Same. (WebCore::AccessibilityObject::doAXRangeForIndex): Same (WebCore::AccessibilityObject::doAXStringForRange): Same. (WebCore::AccessibilityObject::roleValue): Use isImage(). (WebCore::AccessibilityObject::addChildren): Use isRenderImage(). * page/AccessibilityObject.h: 2008-04-04 Timothy Hatcher Fixes a null exception when hovering in some areas of the DOM tree. Reviewed by Adam Roben. * page/inspector/treeoutline.js: (TreeOutline.prototype.treeElementFromPoint): Check listNode for null/undefined before accessing any properties. Return null if listNode is null. 2008-04-04 Timothy Hatcher Changing WebInspector.currentFocusElement to/from an input element does not change the actual focus of that input element. You see this in the search field. Reviewed by Adam Roben. * page/inspector/inspector.js: (WebInspector.set currentFocusElement): Call blur and focus if the node implements them. 2008-04-04 David Hyatt Improve the background size heuristic for SVGs used as background images with no intrinsic size specified. Treat them as having a background-size of 100%. This means their maximal size will be the box established by background-origin. Reviewed by Beth * rendering/RenderBox.cpp: (WebCore::RenderBox::calculateBackgroundSize): 2008-04-04 Timothy Hatcher Correctly show DOCTYPE in the breadcrumbs and match the CSS rules from view-source.css for the DOCTYPE in the DOM tree. Reviewed by Adam Roben. * css/view-source.css: Add and correct comments about keeping in-sync with inspector.css. * page/inspector/ElementsPanel.js: (WebInspector.DocumentPanel.prototype.updateBreadcrumb): Add a case for Node.DOCUMENT_TYPE_NODE. * page/inspector/inspector.css: Add a rule for .webkit-html-doctype. * page/inspector/utilities.js: (nodeTitleInfo): Use the webkit-html-doctype class for nodes with Node.DOCUMENT_TYPE_NODE. 2008-04-04 Dan Bernstein - try to fix the Tiger build * icu/unicode/uscript.h: Copied from WebKit/mac/icu/unicode/uscript.h. 2008-04-04 Adam Roben Copy icu/ to PrivateHeaders for WebKit's benefit Rubberstamped by Tim Hatcher. * WebCore.xcodeproj/project.pbxproj: Renamed the Copy Forwarding Headers build phase to Copy Forwarding and ICU Headers, and added the icu/ directory to it. 2008-04-04 Adam Roben Fix Would like to use WebCore's ForwardingHeaders in WebKit without manually creating copies Patch by Tim Hatcher, typed by me. * WebCore.xcodeproj/project.pbxproj: Added a new build phase, Copy Forwarding Headers, that copies the ForwardingHeaders directory to WebCore's PrivateHeaders directory. 2008-04-04 Ada Chan Changed the signature of imageTitleForFilename so we can pass in the width and height as integers. Reviewed by Dan. * page/mac/WebCoreViewFactory.h: * platform/mac/LocalizedStringsMac.mm: (WebCore::imageTitle): 2008-04-03 Dan Bernstein - Windows build fix * platform/graphics/win/FontCacheWin.cpp: (WebCore::matchImprovingEnumProc): 2008-04-03 Kevin Ollivier Fix PlatformGradient so that it's a pointer on all platforms. * platform/graphics/Gradient.h: 2008-04-03 Dan Bernstein - 64-bit build fix * platform/mac/WebFontCache.mm: (+[WebFontCache internalFontWithFamily:traits:weight:size:]): 2008-04-03 Kevin Ollivier wx build fix. Add stubs for gradient class platform functions. * platform/graphics/wx/GradientWx.cpp: Added. (WebCore::Gradient::platformDestroy): (WebCore::Gradient::platformGradient): 2008-04-03 Kevin Ollivier Reviewed by Dan Bernstein. Refactor Gradient.h to have the same API on platforms without a gradient class. * platform/graphics/Gradient.h: 2008-04-03 Dan Bernstein - Qt build fix * platform/graphics/qt/FontQt.cpp: (WebCore::Font::Font): 2008-04-03 Dan Bernstein - Tiger build fix * platform/mac/WebFontCache.mm: * rendering/RenderThemeMac.mm: 2008-04-03 Dan Bernstein - Gtk build fix * platform/graphics/gtk/FontPlatformData.h: (WebCore::FontPlatformData::size): * platform/graphics/gtk/FontPlatformDataGtk.cpp: (WebCore::FontPlatformData::FontPlatformData): * platform/graphics/gtk/FontPlatformDataPango.cpp: (WebCore::FontPlatformData::FontPlatformData): 2008-04-03 Dan Bernstein - project file updates in preparation for build fixes * GNUmakefile.am: * WebCore.pro: * WebCoreSources.bkl: 2008-04-03 Nicholas Shanks Updated by Dan Bernstein. Reviewed by Dave Hyatt. - WebCore part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484 font-weight does not properly support graded weights Tests to come: Build fixes for platforms other than Mac and Windows to come. * WebCore.vcproj/WebCore.vcproj: Added FontDescription.cpp. * WebCore.xcodeproj/project.pbxproj: Ditto. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed to return additional weight value keywords 100, 200, 300, 500, 600, 800 and 900. * css/CSSFontSelector.cpp: (WebCore::hashForFont): Changed the bold parameter into a weight parameter and added the weight to the string to be hashed. (WebCore::CSSFontSelector::addFontFaceRule): Changed to apply all CSS weight values to the font description. (WebCore::CSSFontSelector::getFontData): Updated the fallback logic to go through all weights equal or lighter from the desired weight. For SVG, to also consider heavier weights. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Cleaned up parsing of the font-weight property. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Changed to apply all CSS weight values to the font description. * platform/graphics/Font.h: (WebCore::Font::weight): Updated for the change to FontDescription::weight(). * platform/graphics/FontCache.cpp: (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Replaced the bold component of the key with a weight component. (WebCore::FontPlatformDataCacheKey::operator==): Updated for the above. (WebCore::computeHash): Ditto. (WebCore::FontPlatformDataCacheKeyTraits::deletedValue): Removed unnecessary parameters. (WebCore::FontPlatformDataCacheKeyTraits::emptyValue): Ditto. (WebCore::FontCache::getCachedFontPlatformData): Updated for the change in FontPlatformDataCacheKey. * platform/graphics/FontDescription.cpp: Added. (WebCore::FontDescription::lighterWeight): Added. Returns a lighter CSS font-weight value if there is one, or the lightest value. (WebCore::FontDescription::bolderWeight): Added. Returns a heavier CSS font-weight value if there is one, or the heaviest value. * platform/graphics/FontDescription.h: (WebCore::FontWeight): Added this enumeration. (WebCore::FontDescription::FontDescription): (WebCore::FontDescription::bold): Removed. (WebCore::FontDescription::weight): Changed to return a FontWeight. (WebCore::FontDescription::setBold): Removed. (WebCore::FontDescription::setWeight): Changed to take a FontWeight. * platform/graphics/mac/FontCacheMac.mm: (WebCore::toAppKitFontWeight): Added. Maps a FontWeight to the AppKit font weight scale of 0-15. (WebCore::isAppKitFontWeightBold): Added. (WebCore::FontCache::getFontDataForCharacters): Changed to use a weight instead of the bold trait for custom fonts, and to decide whether to synthesize bold based on the weights rather than the bold trait. (WebCore::FontCache::fontExists): Updated for the change in WebFontCache . (WebCore::FontCache::createFontPlatformData): Ditto. Also changed to decide whether to synthesize bold based on the weights rather than on the bold trait. * platform/graphics/win/FontCacheWin.cpp: (WebCore::toGDIFontWeight): Added. Maps a FontWeight to a GDI font weight constant. (WebCore::isGDIFontWeightBold): Added. (WebCore::adjustedGDIFontWeight): Added. (WebCore::MatchImprovingProcData::MatchImprovingProcData): Added this data structure for use by the following callback. (WebCore::matchImprovingEnumProc): Added. The logic of this method is a simplification of the betterChoice() predicate in WebFontCache.mm, which considers only the italic trait and the weight. (WebCore::createGDIFont): Added. Similarly to +[WebFontCache fontWithFamily:traits:weight:size:], this function finds the closest match in the family for the desired italic bit and weight. (WebCore::FontCache::fontExists): Changed to call createGDIFont(). (WebCore::FontCache::createFontPlatformData): Ditto. Also changed to compute the synthetic bold and synthetic italic flags based on weights and italic bits and pass them to the FontPlatformData constructor. * platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData): Changed the bold and oblique parameters to mean whether these should be synthesized and removed the font enumeration code that used to decide that. * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::smallCapsFontData): Changed to pass the synthetic bold and oblique flags from the full-size FontPlatformData to the FontPlatformData constructor for the small caps font. * platform/mac/WebCoreTextRenderer.h: * platform/mac/WebCoreTextRenderer.mm: (WebCoreFindFont): Added a weight parameter, which is passed to +[WebFontCache fontWithFamily:traits:weight:size:]. * platform/mac/WebFontCache.h: * platform/mac/WebFontCache.mm: (acceptableChoice): (betterChoice): Changed to ignore the bold trait. Changed the logic for deciding based on weights to prefer the font whose weight is closer to the desired one, or, if both candidates' weights are the same distance from the desired weight, the one that is more "off-center". (+[WebFontCache internalFontWithFamily:traits:weight:size:]): Changed to check for weight when matching by full name. Changed to pass the actual desired weight instead of the constant 5 to acceptableChoice() and betterChoice(). Changed to use weights to decide whether to synthesize bold. (+[WebFontCache fontWithFamily:traits:weight:size:]): Added a weight parameter, which is passed to the internal method. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenu::paint): Updated for the change to FontDescription. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::updateFromElement): Ditto. (WebCore::RenderListBox::paintItemForeground): Ditto. * rendering/RenderThemeMac.mm: (WebCore::toFontWeight): Added. Maps the AppKit font weight range of 0-15 to the FontWeight range. (WebCore::RenderThemeMac::systemFont): Updated for the change to FontDescription. * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::systemFont): Ditto. 2008-04-03 Dan Bernstein - another Gtk build fix attempt * platform/graphics/cairo/GradientCairo.cpp: (WebCore::Gradient::platformDestroy): 2008-04-03 Dan Bernstein - attempted Gtk build fix * GNUmakefile.am: 2008-04-03 Dan Bernstein - attempted Qt build fix * platform/graphics/qt/GradientQt.cpp: (WebCore::Gradient::platformDestroy): 2008-04-03 Dan Bernstein - attempted Gtk build fix * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): 2008-04-03 Dan Bernstein - attempted Qt build fix * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): 2008-04-03 Beth Dakin Reviewed by Alice. Build fix for non-Macs. * page/AXObjectCache.h: (WebCore::AXObjectCache::isIDinUse): 2008-04-03 Brent Fulgham Reviewed by Darin. Correct build error due to incomplete merging of changes to project files from Issue 17985. This small project file patch corrects the build issue (see http://bugs.webkit.org/show_bug.cgi?id=18195). * WebCore.vcproj/WebCore.vcproj: 2008-04-02 Beth Dakin Reviewed by Hyatt. This patch eliminates AccessibilityObjectMac. All of the platform- specific code is now in AccessibilityObjectWrapper. * WebCore.xcodeproj/project.pbxproj: * dom/Element.h: (WebCore::Element::isPasswordField): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::isPasswordField): * page/AXObjectCache.h: (WebCore::AXObjectCache::isIDinUse): * page/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isPasswordField): (WebCore::AccessibilityObject::press): (WebCore::AccessibilityObject::widgetForAttachmentView): (WebCore::AccessibilityObject::doAXBoundsForTextMarkerRange): (WebCore::AccessibilityObject::doAXTextMarkerForPosition): * page/AccessibilityObject.h: (WebCore::AccessibilityObject::areaElement): (WebCore::AccessibilityObject::setWrapper): * page/mac/AXObjectCacheMac.mm: * page/mac/AccessibilityObjectMac.mm: Removed. * page/mac/AccessibilityObjectWrapper.h: * page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper attachmentView]): (textMarkerForVisiblePosition): (visiblePositionForTextMarker): (visiblePositionForStartOfTextMarkerRange): (visiblePositionForEndOfTextMarkerRange): (textMarkerRangeFromMarkers): (AXAttributeStringSetFont): (CreateCGColorIfDifferent): (AXAttributeStringSetColor): (AXAttributeStringSetNumber): (AXAttributeStringSetStyle): (blockquoteLevel): (AXAttributeStringSetBlockquoteLevel): (AXAttributeStringSetSpelling): (AXAttributeStringSetHeadingLevel): (AXLinkElementForNode): (AXAttributeStringSetElement): (AXAttributedStringAppendText): (nsStringForReplacedNode): (-[AccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): (textMarkerRangeFromVisiblePositions): (-[AccessibilityObjectWrapper accessibilityActionNames]): (-[AccessibilityObjectWrapper accessibilityAttributeNames]): (-[AccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]): (-[AccessibilityObjectWrapper textMarkerRangeForSelection]): (-[AccessibilityObjectWrapper position]): (createAccessibilityRoleMap): (RoleEntry::): (roleValueToNSString): (-[AccessibilityObjectWrapper role]): (-[AccessibilityObjectWrapper subrole]): (-[AccessibilityObjectWrapper roleDescription]): (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): (-[AccessibilityObjectWrapper accessibilityIsIgnored]): (-[AccessibilityObjectWrapper accessibilityPerformAction:]): (-[AccessibilityObjectWrapper doAXAttributedStringForRange:]): (-[AccessibilityObjectWrapper doAXRTFForRange:]): (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): (-[AccessibilityObjectWrapper accessibilityShouldUseUniqueId]): * platform/ScrollView.h: * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::viewRectToScreen): (WebCore::ScrollView::absolutePointToView): 2008-04-03 David Hyatt Create a new cross-platform Gradient abstraction and make CanvasGradient wrap it. This first step just cleans up CanvasGradient. The code that calls it remains ifdef'd however. Reviewed by olliej * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::toJS): * html/CanvasGradient.cpp: (WebCore::CanvasGradient::CanvasGradient): * html/CanvasGradient.h: (WebCore::CanvasGradient::gradient): (WebCore::CanvasGradient::addColorStop): (WebCore::CanvasGradient::getColor): * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::fill): (WebCore::CanvasRenderingContext2D::stroke): (WebCore::CanvasRenderingContext2D::fillRect): * html/CanvasStyle.h: (WebCore::CanvasStyle::canvasGradient): * platform/graphics/Gradient.cpp: Added. (WebCore::Gradient::Gradient): (WebCore::Gradient::~Gradient): (WebCore::Gradient::addColorStop): (WebCore::compareStops): (WebCore::Gradient::getColor): (WebCore::Gradient::findStop): * platform/graphics/Gradient.h: Added. (WebCore::Gradient::ColorStop::ColorStop): (WebCore::Gradient::platformInit): * platform/graphics/cairo/GradientCairo.cpp: Added. (WebCore::Gradient::platformDestroy): (WebCore::Gradient::platformGradient): * platform/graphics/cg/GradientCG.cpp: Added. (WebCore::Gradient::platformDestroy): (WebCore::gradientCallback): (WebCore::Gradient::platformGradient): * platform/graphics/qt/GradientQt.cpp: Added. (WebCore::Gradient::platformDestroy): (WebCore::Gradient::platformGradient): 2008-04-03 Simon Hausmann Reviewed by Mark Rowe. Roll out r31599 and r31605 again after discussion with Mark Rowe. * history/HistoryItem.cpp: * loader/FrameLoader.cpp: (WebCore::FrameLoader::startIconLoader): * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::iconForPageURL): (WebCore::IconDatabase::readIconForPageURLFromDisk): * loader/icon/IconDatabase.h: * loader/icon/IconDatabaseNone.cpp: 2008-04-03 David Hyatt Fix for bug 18194, resizable text fields get messed up when resizing in the presence of zoom. Reviewed by adele * rendering/RenderLayer.cpp: (WebCore::RenderLayer::resize): 2008-04-03 Oliver Hunt Reviewed by NOBODY (Rollout). Rollout r31566 as there were a few issues i missed during review (thanks to antti for pointing them out) * dom/Element.h: * dom/NamedAttrMap.h: * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::buildLayoutInformation): (WebCore::SVGRootInlineBox::buildTextChunks): * svg/SVGAElement.h: (WebCore::SVGAElement::contextElement): * svg/SVGAltGlyphElement.h: (WebCore::SVGAltGlyphElement::contextElement): * svg/SVGAnimateColorElement.h: * svg/SVGAnimateElement.h: * svg/SVGAnimateMotionElement.h: * svg/SVGAnimateTransformElement.h: * svg/SVGAnimatedTemplate.h: (WebCore::SVGAnimatedTemplate::associatedAttributeName): (WebCore::lookupOrCreateWrapper): * svg/SVGAnimationElement.h: * svg/SVGCircleElement.h: (WebCore::SVGCircleElement::contextElement): * svg/SVGClipPathElement.h: (WebCore::SVGClipPathElement::contextElement): * svg/SVGComponentTransferFunctionElement.cpp: * svg/SVGComponentTransferFunctionElement.h: * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::SVGCursorElement): * svg/SVGCursorElement.h: (WebCore::SVGCursorElement::contextElement): * svg/SVGDefsElement.h: (WebCore::SVGDefsElement::contextElement): * svg/SVGElement.cpp: * svg/SVGElement.h: (WebCore::SVGElement::svgAttributeChanged): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::SVGEllipseElement): * svg/SVGEllipseElement.h: (WebCore::SVGEllipseElement::contextElement): * svg/SVGExternalResourcesRequired.h: * svg/SVGFEBlendElement.h: * svg/SVGFEColorMatrixElement.cpp: * svg/SVGFEColorMatrixElement.h: * svg/SVGFEComponentTransferElement.h: * svg/SVGFECompositeElement.h: * svg/SVGFEDiffuseLightingElement.h: * svg/SVGFEDisplacementMapElement.h: * svg/SVGFEFloodElement.h: * svg/SVGFEGaussianBlurElement.h: * svg/SVGFEImageElement.cpp: * svg/SVGFEImageElement.h: (WebCore::SVGFEImageElement::contextElement): * svg/SVGFELightElement.h: * svg/SVGFEMergeElement.h: * svg/SVGFEMergeNodeElement.h: * svg/SVGFEOffsetElement.h: * svg/SVGFESpecularLightingElement.h: * svg/SVGFETileElement.h: * svg/SVGFETurbulenceElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::SVGFilterElement): * svg/SVGFilterElement.h: (WebCore::SVGFilterElement::contextElement): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes): * svg/SVGFilterPrimitiveStandardAttributes.h: * svg/SVGFitToViewBox.cpp: * svg/SVGFitToViewBox.h: * svg/SVGFontElement.h: * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::SVGForeignObjectElement): * svg/SVGForeignObjectElement.h: (WebCore::SVGForeignObjectElement::contextElement): * svg/SVGGElement.h: (WebCore::SVGGElement::contextElement): * svg/SVGGradientElement.cpp: * svg/SVGGradientElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::SVGImageElement): * svg/SVGImageElement.h: (WebCore::SVGImageElement::contextElement): * svg/SVGLength.cpp: * svg/SVGLength.h: * svg/SVGLengthList.cpp: * svg/SVGLengthList.h: * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::SVGLineElement): * svg/SVGLineElement.h: (WebCore::SVGLineElement::contextElement): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::SVGLinearGradientElement): (WebCore::SVGLinearGradientElement::collectGradientProperties): * svg/SVGLinearGradientElement.h: * svg/SVGMPathElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::SVGMarkerElement): * svg/SVGMarkerElement.h: (WebCore::SVGMarkerElement::contextElement): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::SVGMaskElement): * svg/SVGMaskElement.h: * svg/SVGNumberList.cpp: * svg/SVGNumberList.h: * svg/SVGPathElement.h: (WebCore::SVGPathElement::contextElement): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::collectPatternProperties): * svg/SVGPatternElement.h: * svg/SVGPolyElement.h: (WebCore::SVGPolyElement::contextElement): * svg/SVGPreserveAspectRatio.cpp: * svg/SVGPreserveAspectRatio.h: * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::SVGRadialGradientElement): (WebCore::SVGRadialGradientElement::svgAttributeChanged): (WebCore::SVGRadialGradientElement::collectGradientProperties): * svg/SVGRadialGradientElement.h: * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::SVGRectElement): * svg/SVGRectElement.h: (WebCore::SVGRectElement::contextElement): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::SVGSVGElement): (WebCore::SVGSVGElement::currentView): * svg/SVGSVGElement.h: * svg/SVGScriptElement.h: (WebCore::SVGScriptElement::contextElement): * svg/SVGSetElement.h: * svg/SVGStyledElement.h: * svg/SVGStyledTransformableElement.cpp: * svg/SVGStyledTransformableElement.h: * svg/SVGSwitchElement.h: (WebCore::SVGSwitchElement::contextElement): * svg/SVGSymbolElement.h: (WebCore::SVGSymbolElement::contextElement): * svg/SVGTRefElement.h: (WebCore::SVGTRefElement::contextElement): * svg/SVGTSpanElement.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::SVGTextContentElement): * svg/SVGTextContentElement.h: * svg/SVGTextElement.cpp: * svg/SVGTextElement.h: (WebCore::SVGTextElement::contextElement): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::SVGTextPathElement): * svg/SVGTextPathElement.h: (WebCore::SVGTextPathElement::contextElement): * svg/SVGTextPositioningElement.cpp: * svg/SVGTextPositioningElement.h: * svg/SVGTransformList.cpp: * svg/SVGTransformList.h: * svg/SVGURIReference.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): * svg/SVGUseElement.h: (WebCore::SVGUseElement::contextElement): * svg/SVGViewElement.h: (WebCore::SVGViewElement::contextElement): * svg/SVGViewSpec.cpp: * svg/SVGViewSpec.h: 2008-04-03 Holger Hans Peter Freyther Reviewed by Simon. * Change IconDatabase::iconForPageURL to return more information. E.g. if an image has been found, or if the loading of an image has been scheduled. * Update FrameLoader to use another method to trigger reading from disk * Update the QWebFrame and QWebSettings * history/HistoryItem.cpp: * loader/FrameLoader.cpp: * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::iconForPageURL): (WebCore::IconDatabase::readIconForPageURLFromDisk): (WebCore::IconDatabase::iconURLForPageURL): (WebCore::IconDatabase::defaultIcon): * loader/icon/IconDatabase.h: (WebCore::): 2008-04-03 Dan Bernstein - Mac build fix * WebCore.base.exp: 2008-04-03 Simon Hausmann Fix the build when building without icondatabase. * loader/icon/IconDatabaseNone.cpp: Fix the function signature, no bool cache anymore. 2008-04-03 Holger Hans Peter Freyther Reviewed by Simon. * Remove the unused 'cache' parameter * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::iconForPageURL): * loader/icon/IconDatabase.h: 2008-04-03 Holger Hans Peter Freyther Reviewed by Simon. * Add WebCore/loader/icon to the DEPENDPATH as well * WebCore.pro: 2008-04-02 Brady Eidson Reviewed by Mitz Pettel and http://bugs.webkit.org/show_bug.cgi?id=11839 Webarchive fails to save CSS files in @import statements * css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::addSubresourceURLStrings): Recursively add the URL each @import rule under the current style sheet. * css/CSSStyleSheet.h: * css/StyleSheet.h: (WebCore::StyleSheet::addSubresourceURLStrings): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::getSubresourceAttributeStrings): Add the linked URL as well as all @import rules rooted at the linked stylesheet. * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::getSubresourceAttributeStrings): Walk all @import rules rooted at this stylesheet to add to the list. * html/HTMLStyleElement.h: 2008-04-02 Mark Rowe Reviewed by Oliver Hunt. Ensure that debug symbols are generated for x86_64 and ppc64 builds. * Configurations/Base.xcconfig: 2008-04-02 Christian Persch Reviewed by Alp Toker. GTK+/Pango font backend build fix. * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): 2008-04-02 Eric Seidel No review, build fix only. Speculative build fix for no-svg build. Use #if ENABLE(SVG) instead of #if ENABLE_SVG * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::getPropertyValue): 2008-04-02 Adam Roben Rename instances of ExecState from "state" to "exec" in JavaScriptDebugServer Rename requested by Darin Adler. * page/JavaScriptDebugServer.cpp: 2008-04-02 Adam Roben Make it possible for JavaScriptDebugListeners to listen to specific Pages JavaScriptDebugServer now has overloads of its addListener/removeListener methods that take a Page* to indicate for which Page the JavaScriptDebugListener wishes to receive messages. Reviewed by Darin. * page/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer): Delete all ListenerSets being held in m_pageListenersMap. (WebCore::JavaScriptDebugServer::addListener): Changed to call hasListeners(). (WebCore::JavaScriptDebugServer::removeListener): Ditto. (WebCore::JavaScriptDebugServer::addListener): Added. This overload takes a Page* and puts the listener in the appropriate ListenerSet within m_pageListenersMap. The ListenerSet is allocated and added to m_pageListenersMap when its first listener is added. (WebCore::JavaScriptDebugServer::removeListener): Added. This overload takes a Page* and removes the listener from the appropriate ListenerSet in m_pageListenersMap. The ListenerSet is deleted and removed from m_pageListenersMap when its last listener is removed. (WebCore::toPage): Added. Retrieves the parent Page from an ExecState. (WebCore::JavaScriptDebugServer::sourceParsed): Changed to call dispatchDidParseSource/dispatchDidFailToParseSource for both the global listeners and the Page listeners. (WebCore::dispatchFunctionToListeners): Added. This code was extracted from the JavaScriptDebugServer method of the same name. (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Call dispatchFunctionToListeners for both the global listeners and the Page listeners. * page/JavaScriptDebugServer.h: - Added declarations for new methods. - Made JavaScriptExecutionCallback typedef public so that it could be used by a helper method. - Added new m_pageListenersMap member. 2008-04-02 Simon Hausmann Fix compilation on case-sensitive file systems. * svg/SVGGradientElement.h: Include SVGTransformList.h instead of SVGTRansformlist.h 2008-04-02 Nikolas Zimmermann Reviewed by Oliver. Fixes: http://bugs.webkit.org/show_bug.cgi?id=17779 (SVG 1.1 Errata demands "SVG JavaScript Liveness" support) SVG Errata states: "All SVG DOM objects that directly correspond to an attribute, e.g. the SVGAnimatedLength 'ry' in an SVGRectElement, are live. This means that any changes made to the attribute are immediately reflected in the corresponding SVG DOM object." (see linked URL on bug report) Until now only XML -> SVG DOM changes took affect, aka. changing the 'rx' attribute of a element resuted in changes when accessing 'rx' through SVG DOM (rx.baseVal.value). Add a new synchronization layer to handle SVG DOM -> XML changes. Added Test: svg/custom/svg-xml-dom-sync.html * dom/Element.h: * dom/NamedAttrMap.h: * rendering/SVGRootInlineBox.cpp: (WebCore::nodeToTextContentElement): (WebCore::nodeToTextPositioningElement): (WebCore::SVGRootInlineBox::buildLayoutInformation): (WebCore::SVGRootInlineBox::buildTextChunks): * svg/SVGAElement.h: (WebCore::SVGAElement::contextElement): * svg/SVGAltGlyphElement.h: (WebCore::SVGAltGlyphElement::contextElement): * svg/SVGAnimateColorElement.h: (WebCore::SVGAnimateColorElement::contextElement): * svg/SVGAnimateElement.h: (WebCore::SVGAnimateElement::contextElement): * svg/SVGAnimateMotionElement.h: (WebCore::SVGAnimateMotionElement::contextElement): * svg/SVGAnimateTransformElement.h: (WebCore::SVGAnimateTransformElement::contextElement): * svg/SVGAnimatedTemplate.h: (WebCore::SVGAnimatedTemplate::toString): (WebCore::SVGAnimatedTemplate::associatedAttributeName): (WebCore::lookupOrCreateWrapper): (WebCore::SVGAnimatedAngle::SVGAnimatedAngle): (WebCore::SVGAnimatedAngle::toString): (WebCore::SVGAnimatedBoolean::SVGAnimatedBoolean): (WebCore::SVGAnimatedBoolean::toString): (WebCore::SVGAnimatedEnumeration::SVGAnimatedEnumeration): (WebCore::SVGAnimatedEnumeration::toString): (WebCore::SVGAnimatedInteger::SVGAnimatedInteger): (WebCore::SVGAnimatedInteger::toString): (WebCore::SVGAnimatedLength::SVGAnimatedLength): (WebCore::SVGAnimatedLength::toString): (WebCore::SVGAnimatedLengthList::SVGAnimatedLengthList): (WebCore::SVGAnimatedLengthList::toString): (WebCore::SVGAnimatedNumber::SVGAnimatedNumber): (WebCore::SVGAnimatedNumber::toString): (WebCore::SVGAnimatedNumberList::SVGAnimatedNumberList): (WebCore::SVGAnimatedNumberList::toString): (WebCore::SVGAnimatedPreserveAspectRatio::SVGAnimatedPreserveAspectRatio): (WebCore::SVGAnimatedPreserveAspectRatio::toString): (WebCore::SVGAnimatedRect::SVGAnimatedRect): (WebCore::SVGAnimatedRect::toString): (WebCore::SVGAnimatedString::SVGAnimatedString): (WebCore::SVGAnimatedString::toString): (WebCore::SVGAnimatedTransformList::SVGAnimatedTransformList): (WebCore::SVGAnimatedTransformList::toString): (WebCore::SVGAnimatedType::SVGAnimatedType): * svg/SVGAnimationElement.h: * svg/SVGCircleElement.h: (WebCore::SVGCircleElement::contextElement): * svg/SVGClipPathElement.h: (WebCore::SVGClipPathElement::contextElement): * svg/SVGComponentTransferFunctionElement.cpp: * svg/SVGComponentTransferFunctionElement.h: * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::SVGCursorElement): * svg/SVGCursorElement.h: (WebCore::SVGCursorElement::contextElement): * svg/SVGDefsElement.h: (WebCore::SVGDefsElement::contextElement): * svg/SVGElement.cpp: (WebCore::SVGElement::getAttribute): * svg/SVGElement.h: (LazilyUpdatedType::LazilyUpdatedType): (LazilyUpdatedType::operator=): (LazilyUpdatedType::operator==): (LazilyUpdatedType::operator!=): (LazilyUpdatedType::operator StoredType): (WebCore::SVGElement::invokeSVGPropertySynchronizer): (WebCore::SVGElement::addSVGPropertySynchronizer): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::SVGEllipseElement): * svg/SVGEllipseElement.h: (WebCore::SVGEllipseElement::contextElement): * svg/SVGExternalResourcesRequired.h: * svg/SVGFEBlendElement.h: (WebCore::SVGFEBlendElement::contextElement): * svg/SVGFEColorMatrixElement.cpp: * svg/SVGFEColorMatrixElement.h: (WebCore::SVGFEColorMatrixElement::contextElement): * svg/SVGFEComponentTransferElement.h: (WebCore::SVGFEComponentTransferElement::contextElement): * svg/SVGFECompositeElement.h: (WebCore::SVGFECompositeElement::contextElement): * svg/SVGFEDiffuseLightingElement.h: (WebCore::SVGFEDiffuseLightingElement::contextElement): * svg/SVGFEDisplacementMapElement.h: (WebCore::SVGFEDisplacementMapElement::contextElement): * svg/SVGFEFloodElement.h: (WebCore::SVGFEFloodElement::contextElement): * svg/SVGFEGaussianBlurElement.h: (WebCore::SVGFEGaussianBlurElement::contextElement): * svg/SVGFEImageElement.cpp: * svg/SVGFEImageElement.h: (WebCore::SVGFEImageElement::contextElement): * svg/SVGFELightElement.h: * svg/SVGFEMergeElement.h: (WebCore::SVGFEMergeElement::contextElement): * svg/SVGFEMergeNodeElement.h: (WebCore::SVGFEMergeNodeElement::contextElement): * svg/SVGFEOffsetElement.h: (WebCore::SVGFEOffsetElement::contextElement): * svg/SVGFESpecularLightingElement.h: (WebCore::SVGFESpecularLightingElement::contextElement): * svg/SVGFETileElement.h: (WebCore::SVGFETileElement::contextElement): * svg/SVGFETurbulenceElement.h: (WebCore::SVGFETurbulenceElement::contextElement): * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::SVGFilterElement): * svg/SVGFilterElement.h: (WebCore::SVGFilterElement::contextElement): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes): * svg/SVGFilterPrimitiveStandardAttributes.h: (WebCore::SVGFilterPrimitiveStandardAttributes::contextElement): * svg/SVGFitToViewBox.cpp: * svg/SVGFitToViewBox.h: * svg/SVGFontElement.h: (WebCore::SVGFontElement::contextElement): * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::SVGForeignObjectElement): * svg/SVGForeignObjectElement.h: (WebCore::SVGForeignObjectElement::contextElement): * svg/SVGGElement.h: (WebCore::SVGGElement::contextElement): * svg/SVGGradientElement.cpp: * svg/SVGGradientElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::SVGImageElement): * svg/SVGImageElement.h: (WebCore::SVGImageElement::contextElement): * svg/SVGLength.cpp: (WebCore::SVGLength::SVGLength): (WebCore::SVGLength::operator=): (WebCore::SVGLength::operator==): (WebCore::SVGLength::operator!=): * svg/SVGLength.h: * svg/SVGLengthList.cpp: (WebCore::SVGLengthList::valueAsString): * svg/SVGLengthList.h: * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::SVGLineElement): * svg/SVGLineElement.h: (WebCore::SVGLineElement::contextElement): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::SVGLinearGradientElement): (WebCore::SVGLinearGradientElement::collectGradientProperties): * svg/SVGLinearGradientElement.h: (WebCore::SVGLinearGradientElement::contextElement): * svg/SVGMPathElement.h: (WebCore::SVGMPathElement::contextElement): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::SVGMarkerElement): * svg/SVGMarkerElement.h: (WebCore::SVGMarkerElement::contextElement): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::SVGMaskElement): * svg/SVGMaskElement.h: (WebCore::SVGMaskElement::contextElement): * svg/SVGNumberList.cpp: (WebCore::SVGNumberList::valueAsString): * svg/SVGNumberList.h: * svg/SVGPathElement.h: (WebCore::SVGPathElement::contextElement): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::collectPatternProperties): * svg/SVGPatternElement.h: (WebCore::SVGPatternElement::contextElement): * svg/SVGPolyElement.h: (WebCore::SVGPolyElement::contextElement): * svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::valueAsString): * svg/SVGPreserveAspectRatio.h: * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::SVGRadialGradientElement): (WebCore::SVGRadialGradientElement::svgAttributeChanged): (WebCore::SVGRadialGradientElement::collectGradientProperties): * svg/SVGRadialGradientElement.h: (WebCore::SVGRadialGradientElement::contextElement): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::SVGRectElement): * svg/SVGRectElement.h: (WebCore::SVGRectElement::contextElement): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::SVGSVGElement): (WebCore::SVGSVGElement::currentView): * svg/SVGSVGElement.h: (WebCore::SVGSVGElement::contextElement): * svg/SVGScriptElement.h: (WebCore::SVGScriptElement::contextElement): * svg/SVGSetElement.h: (WebCore::SVGSetElement::contextElement): * svg/SVGStyledElement.h: * svg/SVGStyledTransformableElement.cpp: * svg/SVGStyledTransformableElement.h: * svg/SVGSwitchElement.h: (WebCore::SVGSwitchElement::contextElement): * svg/SVGSymbolElement.h: (WebCore::SVGSymbolElement::contextElement): * svg/SVGTRefElement.h: (WebCore::SVGTRefElement::contextElement): * svg/SVGTSpanElement.h: (WebCore::SVGTSpanElement::contextElement): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::SVGTextContentElement): * svg/SVGTextContentElement.h: * svg/SVGTextElement.cpp: * svg/SVGTextElement.h: (WebCore::SVGTextElement::contextElement): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::SVGTextPathElement): * svg/SVGTextPathElement.h: (WebCore::SVGTextPathElement::contextElement): * svg/SVGTextPositioningElement.cpp: * svg/SVGTextPositioningElement.h: * svg/SVGTransformList.cpp: (SVGTransformList::valueAsString): * svg/SVGTransformList.h: * svg/SVGURIReference.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): * svg/SVGUseElement.h: (WebCore::SVGUseElement::contextElement): * svg/SVGViewElement.h: (WebCore::SVGViewElement::contextElement): * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::SVGViewSpec): (WebCore::SVGViewSpec::contextElement): * svg/SVGViewSpec.h: 2008-04-02 Darin Adler Reviewed by Alexey. - fix storage leak seen on buildbot * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::utiFromMIMEType): Put the result of createCFString() into a RetainPtr. Changed result to be a RetainPtr. (WebCore::ImageBuffer::toDataURL): Tweak a little bit, removing one local variable and some unneeded explicit conversions. 2008-04-01 Darin Adler * WebCore.vcproj/WebCore.vcproj: Added RangeBoundaryPoint.h -- not required, but convenient. 2008-04-01 Darin Adler Reviewed by Sam and Antti. - fix paste performance slowed down with the Range Acid3 changes Added a new class, RangeBoundaryPoint, to use for range boundary points. The "truth" of the offset is now stored as a node pointer, and the offset is computed as and when needed. This allows us to efficiently update when the DOM tree is changed -- computation of the node offsets is deferred until the Range is used later. * WebCore.base.exp: Export nodeIndex(). * WebCore.xcodeproj/project.pbxproj: Added RangeBoundaryPoint.h, removed NodeWithIndexBefore.h and NodeWIthIndexAfter.h. Also let Xcode tweak the file formatting. * dom/ContainerNode.cpp: (WebCore::ContainerNode::childrenChanged): Pass fewer arguments to Document. * dom/Document.cpp: (WebCore::Document::nodeChildrenChanged): Pass fewer arguments to Range. (WebCore::Document::nodeWillBeRemoved): Pass node to range as a raw node pointer; no need for the index. * dom/Document.h: Take fewer arguments. * dom/NodeWithIndexAfter.h: Removed. * dom/NodeWithIndexBefore.h: Removed. * dom/Range.cpp: (WebCore::Range::Range): Changed to use the new RangeBoundaryPoint constructor. (WebCore::Range::create): Updated to use RangeBoundaryPoint instead of Position. (WebCore::Range::~Range): Ditto. (WebCore::Range::startContainer): Ditto. (WebCore::Range::startOffset): Ditto. (WebCore::Range::endContainer): Ditto. (WebCore::Range::endOffset): Ditto. (WebCore::Range::commonAncestorContainer): Ditto. (WebCore::Range::collapsed): Ditto. (WebCore::Range::setStart): Ditto. (WebCore::Range::setEnd): Ditto. (WebCore::Range::collapse): Ditto. (WebCore::Range::isPointInRange): Ditto. (WebCore::Range::comparePoint): Ditto. (WebCore::Range::compareNode): Ditto. (WebCore::Range::compareBoundaryPoints): Ditto. (WebCore::Range::boundaryPointsValid): Ditto. (WebCore::Range::intersectsNode): Ditto. (WebCore::Range::processContents): Ditto. (WebCore::Range::cloneContents): Ditto. (WebCore::Range::insertNode): Updated to use RangeBoundaryPoint. Also simplified the code at the end that updates the range -- not all of it is needed now since most of the fixup is done automatically by the range document mutation machinery. The one bit that remains is arguably a bug, but we need to keep it to keep passing Acid3 until we get clarification that it is indeed a bug (and then Acid3 will probably have to change). (WebCore::Range::toString): Update to use RangeBoundaryPoint instead of Position. (WebCore::Range::text): Ditto. (WebCore::Range::createContextualFragment): Ditto. (WebCore::Range::detach): Ditto. (WebCore::Range::checkNodeWOffset): Changed case where the offset is a node offset to be more efficient by using childNode instead of childNodeCount, and also return the node before which is needed to set the value of a RangeBoundaryPoint. (WebCore::Range::cloneRange): Ditto. (WebCore::Range::setStartAfter): Ditto. (WebCore::Range::setEndBefore): Ditto. (WebCore::Range::setEndAfter): Ditto. (WebCore::Range::selectNode): Ditto. (WebCore::Range::selectNodeContents): Ditto. (WebCore::Range::surroundContents): Ditto. (WebCore::Range::setStartBefore): Ditto. (WebCore::Range::checkDeleteExtract): Ditto. (WebCore::Range::containedByReadOnly): Ditto. (WebCore::Range::firstNode): Ditto. (WebCore::Range::editingStartPosition): Ditto. (WebCore::Range::pastLastNode): Ditto. (WebCore::Range::addLineBoxRects): Ditto. (WebCore::Range::formatForDebugger): Ditto. (WebCore::Range::maxStartOffset): Ditto. (WebCore::Range::maxEndOffset): Ditto. (WebCore::boundaryNodeChildrenChanged): Updated to use RangeBoundaryPoint instead of Position. Also changed name and changed to just call invalidateOffset. (WebCore::Range::nodeChildrenChanged): Changed to take just a container node. (WebCore::boundaryNodeWillBeRemoved): Updated to use RangeBoundaryPoint instead of Position. Also changed name and changed to update childBefore. (WebCore::Range::nodeWillBeRemoved): Changed to just take a Node*. (WebCore::boundaryTextInserted): Updated to use RangeBoundaryPoint instead of Position. Also changed name. (WebCore::Range::textInserted): Ditto. (WebCore::boundaryTextRemoved): Ditto. (WebCore::Range::textRemoved): Ditto. (WebCore::boundaryTextNodesMerged): Ditto. (WebCore::Range::textNodesMerged): Ditto. (WebCore::boundaryTextNodesSplit): Ditto. (WebCore::Range::textNodeSplit): Ditto. * dom/Range.h: Updated to use RangeBoundaryPoint instead of Position. * dom/RangeBoundaryPoint.h: Added. 2008-04-01 Anders Carlsson Reviewed by Sam. Get rid of old "bindings" forwarding headers. * ForwardingHeaders/bindings: Removed. * ForwardingHeaders/bindings/NP_jsobject.h: Removed. * ForwardingHeaders/bindings/npruntime.h: Removed. * ForwardingHeaders/bindings/npruntime_impl.h: Removed. * ForwardingHeaders/bindings/npruntime_internal.h: Removed. * ForwardingHeaders/bindings/runtime.h: Removed. * ForwardingHeaders/bindings/runtime_object.h: Removed. * ForwardingHeaders/bindings/runtime_root.h: Removed. 2008-04-01 Timothy Hatcher Rename DatabasePanel.js to DatabasesPanel.js to facilitate the up-coming UI refresh changes. http://bugs.webkit.org/show_bug.cgi?id=17773 Rubber-stamped by Brady Eidson. * WebCore.vcproj/WebCore.vcproj: Reference DatabasesPanel.js. * page/inspector/DatabasePanel.js: Removed. * page/inspector/DatabasesPanel.js: Copied from page/inspector/DatabasePanel.js. * page/inspector/WebKit.qrc: Reference DatabasesPanel.js. * page/inspector/inspector.html: Reference DatabasesPanel.js. 2008-04-01 Brady Eidson Touch a file to get Windows to rebuild WebCore * platform/ContextMenu.cpp: Alphabetize headers 2008-04-01 Brady Eidson Reviewed by Adam Roben Export loader/archive and loader/archive/cf headers for WebKitWin to use * WebCore.vcproj/WebCore.vcproj: 2008-04-01 Brady Eidson Reviewed by Darin WebArchives need to load on Windows the same way as on Mac, and this change in the finished-loading code path was a big part of that * loader/FrameLoader.cpp: (WebCore::FrameLoader::finishedLoadingDocument): Only call the client's finishedLoading() for non-archive loads 2008-04-01 Dan Bernstein - Mac build fix * WebCore.xcodeproj/project.pbxproj: Made FontRenderingMode.h private. 2008-04-01 Dan Bernstein Reviewed by Darin Adler. - move the FontRenderingMode enumeration into its own header file * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/CachedFont.h: * platform/graphics/FontDescription.h: * platform/graphics/FontRenderingMode.h: Added. (WebCore::): * platform/graphics/gtk/FontCustomPlatformData.h: * platform/graphics/mac/FontCustomPlatformData.h: * platform/graphics/qt/FontCustomPlatformData.h: * platform/graphics/win/FontCustomPlatformData.h: 2008-04-01 Darin Adler Reviewed by Mitz. - fix REGRESSION: Leak in JSCustomXPathNSResolver::create - fix REGRESSION: Leak in CSSStyleSelector::addViewportDependentMediaQueryResult * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::create): Added a missing adoptRef. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::~CSSStyleSelector): Added a missing call to deleteAllValues. 2008-04-01 Darin Adler Reviewed by Sam. - speed up hasChildNodes, which does not need to be virtual * dom/ContainerNode.cpp: Removed hasChildNodes. * dom/ContainerNode.h: Added non-virtual inline hasChildNodes. * dom/Node.cpp: Removed hasChildNodes. * dom/Node.h: Added non-vritual inline hasChildNodes. 2008-04-01 Simon Hausmann Fix the non-mac build. * page/AXObjectCache.h: Don't reference AccessibilityObjects when building without accessibility. * page/AccessibilityObject.h: Don't include RetainPtr.h for non-mac builds. 2008-04-01 Holger Hans Peter Freyther Reviewed by Simon. * Do not store the QWebFrame associated with a ScrollView/FrameView in the WebCore::Widget. * Instead of asking the Widget for the QWebFrame use the QWebFramePrivate::core and QWebFramePrivate::kit function to convert from and to QWebFrame. * platform/Widget.h: * platform/qt/WidgetQt.cpp: (WebCore::WidgetPrivate::WidgetPrivate): (WebCore::Widget::containingWindow): 2008-04-01 Alice Liu Patch by Beth Dakin and Alice Liu Reviewed by Darin. Refactored WebCore Accessibility code. Prior to this patch, WebCore accessibility was implemented in an ObjC class named WebCoreAXObject, with much of the "guts" in C++. This patch the next natural step of factoring out the C++ code into a class named AccessibilityObject, and in order to maintain the required ObjC object ties, also implements an ObjC class named AccessibilityObjectWrapper as a thin wrapper around the C++ object. Internally within WebCore we operate on the C++ object as much as possible, and the ObjC object gets used mostly when we need to return something to AppKit or call something implemented on NSObject. The AXObjectCache still keeps one HashMap, now of RenderObjects to AccessibilityObjects instead of WebCoreAXObjects, and the AccessibilityObject keeps track of its ObjC wrapper. * WebCore.xcodeproj/project.pbxproj: * page/AXObjectCache.h: (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::removeAXID): * page/AccessibilityObject.cpp: Added. (WebCore::AccessibilityObject::AccessibilityObject): (WebCore::AccessibilityObject::~AccessibilityObject): (WebCore::AccessibilityObject::create): (WebCore::AccessibilityObject::detach): (WebCore::AccessibilityObject::firstChild): (WebCore::AccessibilityObject::lastChild): (WebCore::AccessibilityObject::previousSibling): (WebCore::AccessibilityObject::nextSibling): (WebCore::AccessibilityObject::parentObject): (WebCore::AccessibilityObject::parentObjectUnignored): (WebCore::AccessibilityObject::isWebArea): (WebCore::AccessibilityObject::isImageButton): (WebCore::AccessibilityObject::isAnchor): (WebCore::AccessibilityObject::isTextControl): (WebCore::AccessibilityObject::isImage): (WebCore::AccessibilityObject::isAttachment): (WebCore::isPasswordFieldElement): (WebCore::AccessibilityObject::isPasswordField): (WebCore::AccessibilityObject::headingLevel): (WebCore::AccessibilityObject::isHeading): (WebCore::AccessibilityObject::anchorElement): (WebCore::isCheckboxOrRadio): (WebCore::AccessibilityObject::actionElement): (WebCore::AccessibilityObject::mouseButtonListener): (WebCore::AccessibilityObject::helpText): (WebCore::AccessibilityObject::textUnderElement): (WebCore::AccessibilityObject::hasIntValue): (WebCore::AccessibilityObject::intValue): (WebCore::AccessibilityObject::stringValue): (WebCore::labelForElement): (WebCore::AccessibilityObject::title): (WebCore::AccessibilityObject::accessibilityDescription): (WebCore::AccessibilityObject::boundingBoxRect): (WebCore::AccessibilityObject::size): (WebCore::AccessibilityObject::linkedUIElement): (WebCore::AccessibilityObject::accessibilityShouldUseUniqueId): (WebCore::AccessibilityObject::accessibilityIsIgnored): (WebCore::AccessibilityObject::loaded): (WebCore::AccessibilityObject::layoutCount): (WebCore::AccessibilityObject::textLength): (WebCore::AccessibilityObject::selectedText): (WebCore::AccessibilityObject::selection): (WebCore::AccessibilityObject::selectedTextRange): (WebCore::AccessibilityObject::setSelectedText): (WebCore::AccessibilityObject::setSelectedTextRange): (WebCore::AccessibilityObject::makeRangeVisible): (WebCore::AccessibilityObject::url): (WebCore::AccessibilityObject::isVisited): (WebCore::AccessibilityObject::isFocused): (WebCore::AccessibilityObject::setFocused): (WebCore::AccessibilityObject::setValue): (WebCore::AccessibilityObject::isEnabled): (WebCore::AccessibilityObject::press): (WebCore::AccessibilityObject::topRenderer): (WebCore::AccessibilityObject::textControl): (WebCore::AccessibilityObject::widget): (WebCore::AccessibilityObject::axObjectCache): (WebCore::AccessibilityObject::documentLinks): (WebCore::AccessibilityObject::documentFrameView): (WebCore::AccessibilityObject::frameViewIfRenderView): (WebCore::AccessibilityObject::visiblePositionRange): (WebCore::AccessibilityObject::doAXTextMarkerRangeForLine): (WebCore::AccessibilityObject::doAXTextMarkerRangeForUnorderedTextMarkers): (WebCore::AccessibilityObject::doAXLeftWordTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXRightWordTextMarkerRangeForTextMarker): (WebCore::updateAXLineStartForVisiblePosition): (WebCore::AccessibilityObject::doAXLeftLineTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXRightLineTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXSentenceTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::doAXParagraphTextMarkerRangeForTextMarker): (WebCore::startOfStyleRange): (WebCore::endOfStyleRange): (WebCore::AccessibilityObject::doAXStyleTextMarkerRangeForTextMarker): (WebCore::AccessibilityObject::textMarkerRangeForRange): (WebCore::AccessibilityObject::stringForReplacedNode): (WebCore::AccessibilityObject::doAXStringForTextMarkerRange): (WebCore::AccessibilityObject::doAXBoundsForTextMarkerRange): (WebCore::AccessibilityObject::doAXLengthForTextMarkerRange): (WebCore::AccessibilityObject::doSetAXSelectedTextMarkerRange): (WebCore::AccessibilityObject::doAXTextMarkerForPosition): (WebCore::AccessibilityObject::doAXNextTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXNextWordEndTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousWordStartTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXNextLineEndTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousLineStartTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXNextSentenceEndTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousSentenceStartTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXNextParagraphEndTextMarkerForTextMarker): (WebCore::AccessibilityObject::doAXPreviousParagraphStartTextMarkerForTextMarker): (WebCore::AccessibilityObject::textMarkerForIndex): (WebCore::AccessibilityObject::doAXUIElementForTextMarker): (WebCore::AccessibilityObject::doAXLineForTextMarker): (WebCore::AccessibilityObject::rangeForTextMarkerRange): (WebCore::AccessibilityObject::indexForTextMarker): (WebCore::AccessibilityObject::doAXRangeForLine): (WebCore::AccessibilityObject::doAXRangeForPosition): (WebCore::AccessibilityObject::doAXRangeForIndex): (WebCore::AccessibilityObject::doAXStyleRangeForIndex): (WebCore::AccessibilityObject::doAXStringForRange): (WebCore::AccessibilityObject::doAXBoundsForRange): (WebCore::AccessibilityObject::doAXLineForIndex): (WebCore::AccessibilityObject::doAccessibilityHitTest): (WebCore::AccessibilityObject::focusedUIElement): (WebCore::AccessibilityObject::observableObject): (WebCore::AccessibilityObject::roleValue): (WebCore::AccessibilityObject::canSetFocusAttribute): (WebCore::AccessibilityObject::canSetValueAttribute): (WebCore::AccessibilityObject::canSetTextRangeAttributes): (WebCore::AccessibilityObject::childrenChanged): (WebCore::AccessibilityObject::clearChildren): (WebCore::AccessibilityObject::hasChildren): (WebCore::AccessibilityObject::addChildren): (WebCore::AccessibilityObject::axObjectID): (WebCore::AccessibilityObject::setAXObjectID): (WebCore::AccessibilityObject::removeAXObjectID): * page/AccessibilityObject.h: Added. (WebCore::): (WebCore::VisiblePositionRange::VisiblePositionRange): (WebCore::VisiblePositionRange::isNull): (WebCore::AccessibilityObject::detached): (WebCore::AccessibilityObject::PlainTextRange::PlainTextRange): (WebCore::AccessibilityObject::PlainTextRange::isNull): (WebCore::AccessibilityObject::renderer): (WebCore::AccessibilityObject::children): (WebCore::AccessibilityObject::wrapper): (WebCore::AccessibilityObject::setWrapper): * page/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::~AXObjectCache): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::getAXID): (WebCore::AXObjectCache::removeAXID): (WebCore::AXObjectCache::textMarkerForVisiblePosition): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::postNotificationToElement): * page/mac/AccessibilityObjectMac.mm: Added. (createAccessibilityRoleMap): (RoleEntry::): (roleValueToNSString): (AccessibilityObject::attachmentView): (AccessibilityObject::performPressActionForAttachment): (AccessibilityObject::textMarkerRange): (AccessibilityObject::textMarkerForVisiblePosition): (AccessibilityObject::startTextMarker): (AccessibilityObject::visiblePositionForTextMarker): (AccessibilityObject::visiblePositionForStartOfTextMarkerRange): (AccessibilityObject::visiblePositionForEndOfTextMarkerRange): (AccessibilityObject::textMarkerRangeFromVisiblePositions): (AccessibilityObject::textMarkerRangeForSelection): (AccessibilityObject::textMarkerRangeFromMarkers): (AccessibilityObject::convertViewRectToScreenCoords): (AccessibilityObject::convertAbsolutePointToViewCoords): (AccessibilityObject::convertWidgetChildrenToNSArray): (AccessibilityObject::position): (AccessibilityObject::role): (AccessibilityObject::subrole): (AccessibilityObject::roleDescription): (blockquoteLevel): (AccessibilityObject::AXAttributeStringSetElement): (AXAttributeStringSetBlockquoteLevel): (CreateCGColorIfDifferent): (AXAttributeStringSetColor): (AXAttributeStringSetNumber): (AXAttributeStringSetFont): (AXAttributeStringSetStyle): (AccessibilityObject::AXAttributeStringSetHeadingLevel): (AccessibilityObject::AXLinkElementForNode): (AXAttributeStringSetSpelling): (AccessibilityObject::AXAttributedStringAppendText): (nsStringForReplacedNode): (AccessibilityObject::doAXAttributedStringForTextMarkerRange): (AccessibilityObject::doAXAttributedStringForRange): (AccessibilityObject::doAXRTFForRange): * page/mac/AccessibilityObjectWrapper.h: Added. * page/mac/AccessibilityObjectWrapper.mm: Added. (-[AccessibilityObjectWrapper initWithAccessibilityObject:]): (-[AccessibilityObjectWrapper unregisterUniqueIdForUIElement]): (-[AccessibilityObjectWrapper detach]): (-[AccessibilityObjectWrapper accessibilityObject]): (-[AccessibilityObjectWrapper accessibilityActionNames]): (-[AccessibilityObjectWrapper accessibilityAttributeNames]): (-[AccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]): (-[AccessibilityObjectWrapper renderWidgetChildren]): (convertToNSArray): (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]): (-[AccessibilityObjectWrapper accessibilityHitTest:]): (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]): (-[AccessibilityObjectWrapper accessibilityIsIgnored]): (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]): (-[AccessibilityObjectWrapper accessibilityPerformAction:]): (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]): (rendererForView): (-[AccessibilityObjectWrapper _accessibilityParentForSubview:]): (-[AccessibilityObjectWrapper accessibilityActionDescription:]): (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): (-[AccessibilityObjectWrapper accessibilityShouldUseUniqueId]): * page/mac/WebCoreAXObject.h: Removed. * page/mac/WebCoreAXObject.mm: Removed. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::selectElement): * rendering/RenderMenuList.h: 2008-03-31 Dan Bernstein - fix previous attempted fixes * platform/qt/TemporaryLinkStubs.cpp: (PluginDatabase::getPluginPathsInDirectories): * platform/wx/TemporaryLinkStubs.cpp: (PluginDatabase::getPluginPathsInDirectories): 2008-03-31 Dan Bernstein - fix Qt link stubs * platform/qt/TemporaryLinkStubs.cpp: (PluginDatabase::getPluginPathsInDirectories): (PluginDatabase::isPreferredPluginDirectory): 2008-03-31 Dan Bernstein - try to fix the Wx build * platform/wx/TemporaryLinkStubs.cpp: (PluginDatabase::getPluginPathsInDirectories): (PluginDatabase::isPreferredPluginDirectory): 2008-03-31 Dan Bernstein - Gtk and Qt build fixes * platform/graphics/gtk/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/gtk/FontCustomPlatformData.h: * platform/graphics/qt/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/qt/FontCustomPlatformData.h: 2008-03-31 Dan Bernstein - Mac build fix * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: 2008-03-31 Dan Bernstein Reviewed by Darin Adler. - fix @font-face with downloadable fonts doesn't work with GDI text * WebCore.vcproj/WebCore.vcproj: Added GetEOTHeader.{h,cpp} * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): Changed to pass the rendering mode to CachedFont::platformDataFromCustomData(). * loader/CachedFont.cpp: (WebCore::CachedFont::platformDataFromCustomData): Added a rendering mode parameter which is passed down to FontCustomPlatformData::fontPlatformData(). * loader/CachedFont.h: * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::fontExists): Changed the number 5 to the named constant CLEARTYPE_QUALITY. * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Added code to delete the embedded font reference. (WebCore::FontCustomPlatformData::fontPlatformData): Added code to create an HFONT from the embedded font reference and pass it along with the CGFontRef to the FontPlatformData constructor. Added a rendering mode parameter which is passed down to the FontPlatformData constructor. (WebCore::EOTStream::EOTStream): Added this helper class used to feed data to TTLoadEmbeddedFont(). (WebCore::EOTStream::read): Added. (WebCore::readEmbedProc): Added this TTLoadEmbeddedFont() callback. (WebCore::createUniqueFontName): Added. Creates a unique GUID-derived font name. (WebCore::createFontCustomPlatformData): Added code to make the font accessible to GDI by creating an Embedded OpenType stream and activating it in the process under a globally-unique name. * platform/graphics/win/FontCustomPlatformData.h: Added a font reference data member which holds the embedded font. (WebCore::FontCustomPlatformData::FontCustomPlatformData): Added a rendering mode parameter. * platform/graphics/win/FontPlatformData.h: (WebCore::FontPlatformData::FontPlatformData): Made this class always own the CGFontRef and the HFONT by turning these data members into a RetainPtr and a RefPtr around a RefCountedHFONT. Added an HFONT parameter to the CGFontRef-based constructor. Made platformDataInit() private. (WebCore::FontPlatformData::hfont): (WebCore::FontPlatformData::cgFont): (WebCore::FontPlatformData::hash): (WebCore::FontPlatformData::RefCountedHFONT::RefCountedHFONT): Added. (WebCore::FontPlatformData::RefCountedHFONT::~RefCountedHFONT): (WebCore::FontPlatformData::RefCountedHFONT::hfont): (WebCore::FontPlatformData::RefCountedHFONT::hash): * platform/graphics/win/FontPlatformDataCGWin.cpp: (WebCore::FontPlatformData::platformDataInit): Changed to take ownership of the CGFontRef created here. (WebCore::FontPlatformData::FontPlatformData): Added an HFONT parameter and a useGDI flag. * platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData): Changed to take ownership of the HFONT. * platform/graphics/win/GetEOTHeader.cpp: Added. (WebCore::BigEndianUShort::operator unsigned short): (WebCore::BigEndianULong::operator unsigned): (WebCore::appendBigEndianStringToEOTHeader): (WebCore::getEOTHeader): Added. Creates an Embedded OpenType (.eot) header for the given font data, making it suitable as input for TTLoadEmbeddedFont. * platform/graphics/win/GetEOTHeader.h: Added. * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformDestroy): Removed code to delete parts of the FontPlatformData, since they are now always owned and managed by the FontPlatformData. 2008-03-31 Darin Adler Reviewed by Anders. - fix crash seen on buildbot (regression from a recent speedup) * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createElement): Check validity before calling isLower, since that takes care of the null string case. 2008-03-31 Dan Bernstein Reviewed by John Sullivan. - fix Google Maps: cursor and placemarks don't match up * platform/win/CursorWin.cpp: (WebCore::Cursor::Cursor): Set the 1-bit mask for full-alpha cursors to fully opaque. The mask is ignored and the alpha values from the 32-bit image are used except in the case of a fully-transparent image, in which the fully-opaque 1-bit mask is required to get transparency. 2008-03-31 Brady Eidson Reviewed by Jon Honeycutt Move a WebArchive loading check into WebCore * loader/FrameLoader.cpp: (WebCore::FrameLoader::committedLoad): Don't call the client method if currently loading a WebArchive 2008-03-31 Brady Eidson Reviewed by Oliver Hunt "Turn on" WebArchives for Windows Thought I'd done this already, but I hadn't! * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedNonImageMimeTypes): Apply known ArchiveFactory MIME types 2008-03-31 Dan Bernstein Reviewed by Dave Hyatt. - fix http://bugs.webkit.org/show_bug.cgi?id=18076 Box disappears after CSS Transition completes * page/AnimationController.cpp: Changed the BLEND_MAYBE_INVALID_COLOR macro to not blend two invalid colors. * rendering/RenderStyle.cpp: (WebCore::StyleBackgroundData::StyleBackgroundData): Added missing copying of the m_color data member. 2008-03-31 Julien Chaffraix Reviewed by Darin. Bug 18177: m_encoding is used twice in XMLHttpRequest http://bugs.webkit.org/show_bug.cgi?id=18177 - Change XMLHttpRequest variable m_encoding to m_responseEncoding. - Change send local variable m_encoding to encoding. No test case (no functionnal change). * platform/network/ResourceResponseBase.h: Removed unused variable. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Changed local m_encoding to encoding. (WebCore::XMLHttpRequest::didReceiveResponse): m_encoding -> m_responseEncoding. (WebCore::XMLHttpRequest::didReceiveData): Ditto. * xml/XMLHttpRequest.h: Change m_encoding to m_responseEncoding to disambiguate the name as it is only used for response. 2008-03-27 Adam Roben Pass the right ExecStates to toJS when creating JS wrappers for objects from the inspected page We now use an ExecState from the inspected page to create the JS wrappers for objects from the inspected page, rather than use an ExecState from the Inspector. Reviewed by Tim Hatcher. * page/InspectorController.cpp: (WebCore::getResourceDocumentNode): (WebCore::InspectorController::focusNode): (WebCore::InspectorController::addDatabaseScriptResource): 2008-03-31 Adam Roben Stop relying on functions added to prototypes in the Inspector being callable on objects from the inspected window Reviewed by Tim Hatcher. * page/inspector/Console.js: (WebInspector.ConsolePanel._formatnode): Use nodeTitleInfo.call(node) instead of node.titleInfo(). * page/inspector/StylesSidebarPane.js: Changed uses of getShorthandValue, getShorthandPriority, getLonghandProperties, and getUniqueStyleProperties to call them as functions instead of as methods on the CSSStyleDeclaration objects. * page/inspector/utilities.js: Removed Node.prototype.titleInfo, and changed our CSSStyleDeclaration methods to just be standalone functions. 2008-03-26 Adam Roben Fix an exception while adding a message to the console Reviewed by Mark Rowe. * page/inspector/ConsolePanel.js: Don't call addMessageToSource if the panel has no such method. This can happen if we get a message for, e.g., a Database. 2008-03-31 Brady Eidson Reviewed by Darin and Mitz's rubber stamp Remove dataForArchivedSelection(WebCore::Frame*) from the EditorClient - only usage is now directly in WebCore * page/EditorClient.h: * svg/graphics/SVGImageEmptyClients.h: * platform/mac/PasteboardMac.mm: (WebCore::Pasteboard::writeSelection): Make the archive and get the data directly 2008-03-31 Brady Eidson Reviewed by Mitz Pettel Fix for http://bugs.webkit.org/show_bug.cgi?id=18183 Despite the bug reporter's instructions, I have still not been able to actually reproduce this crash and therefore don't know how to make a layout test for it. * loader/archive/ArchiveResource.cpp: (WebCore::ArchiveResource::response): Fix potential null dereference 2008-03-29 Adam Roben Fix Bug 18208: Acid3 test 65 takes >33ms due to plugin refreshing on Windows We now keep track of all the plugin paths found each time refresh() is called. We'll only instantiate PluginPackages if there are new paths or paths with changed timestamps since the last time refresh() was called. Reviewed by Darin Adler and Anders Carlsson. * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::refresh): - Only instantiate PluginPackages if there is a new path or a path with a changed timestamp since we last ran refresh(). - Cache the set of plugin paths found and their timestamps for the next call to refresh(). - Only re-register MIME types if our set of plugins changed. * plugins/PluginDatabase.h: Added a new member to cache plugin paths and their timestamps. 2008-03-29 Adam Roben Separate filesystem crawling from PluginPackage instantiation Part of Bug 18208: Acid3 test 65 takes >33ms due to plugin refreshing on Windows refresh() is now the only place where PluginPackages are instantiated. refresh() now asks for a set of plugins that no longer exist on disk, and the set of all plugin files in our plugin directories. Using these two sets we can update our instantiated plugins without copying any HashSets. The code in refresh() and in the platform-specific methods to crawl the filesystem is now quite a bit simpler. PluginDatabase now stores both a PluginSet and a HashMap that maps plugin paths to PluginPackages. This allows us to quickly determine whether we already have a PluginPackage instantiated for a particular path. The new add/remove methods handle the modification of these two collections. A nice side effect of all this is that refresh() no longer copies any HashSets. Reviewed by Mitz Pettel. * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::refresh): Unload any plugins that have been deleted from disk, and add any plugins that either weren't installed last time, or have changed since last time. (WebCore::PluginDatabase::getDeletedPlugins): Added. (WebCore::PluginDatabase::add): Added. Returns whether or not the PluginPackage was actually added to the database (duplicates won't be added). (WebCore::PluginDatabase::remove): Added. * plugins/PluginDatabase.h: * plugins/PluginPackage.h: (WebCore::PluginPackage::path): Added. (WebCore::PluginPackage::lastModified): Added. * plugins/gtk/PluginDatabaseGtk.cpp: (WebCore::PluginDatabase::getPluginPathsInDirectories): Renamed from getPluginsInDirectories. Now fills a HashSet of Strings instead of instantiated PluginPackages. * plugins/win/PluginDatabaseWin.cpp: (WebCore::addPluginPathsFromRegistry): Ditto. (WebCore::PluginDatabase::getPluginPathsInDirectories): Ditto. 2008-03-29 Adam Roben Change getPluginsInDirectories to use an out parameter This avoids copying a HashSet. Reviewed by Mitz Pettel. * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::refresh): * plugins/PluginDatabase.h: * plugins/gtk/PluginDatabaseGtk.cpp: (WebCore::PluginDatabase::getPluginsInDirectories): * plugins/win/PluginDatabaseWin.cpp: (WebCore::PluginDatabase::getPluginsInDirectories): 2008-03-29 Adam Roben Make some PluginPackage methods return const String& Reviewed by Mitz Pettel. * plugins/PluginPackage.h: 2008-03-29 Adam Roben Rename PluginDatabase's "PluginPaths" to "PluginDirectories" The code expects these paths to all be directories, so it seems good to refer to them as such. This patch just changes "Paths" to "Directories" and "Path" to "Directory". Reviewed by Mitz Pettel. * platform/qt/TemporaryLinkStubs.cpp: * platform/wx/TemporaryLinkStubs.cpp: * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::installedPlugins): (WebCore::PluginDatabase::refresh): * plugins/PluginDatabase.h: (WebCore::PluginDatabase::setPluginDirectories): * plugins/gtk/PluginDatabaseGtk.cpp: (WebCore::PluginDatabase::getPluginsInDirectories): * plugins/win/PluginDatabaseWin.cpp: (WebCore::PluginDatabase::getPluginsInDirectories): (WebCore::safariPluginsDirectory): (WebCore::PluginDatabase::defaultPluginDirectories): (WebCore::PluginDatabase::isPreferredPluginDirectory): * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::compare): 2008-03-29 Adam Roben Remove PlatformFileTime This typedef is time_t on all platforms, so we can just get rid of the typedef. Reviewed by Mitz Pettel. * platform/FileSystem.h: * plugins/PluginPackage.cpp: * plugins/PluginPackage.h: 2008-03-29 Adam Roben Change PlatformFileTime on Windows to be time_t This matches other platforms and our existing functions in FileSystem.h. It will also let us get rid of PlatformFileTime altogether. Reviewed by Mitz Pettel. * platform/FileSystem.h: Change PlatformFileTime to time_t on Windows. * plugins/win/PluginDatabaseWin.cpp: (WebCore::addPluginsFromRegistry): Use getFileModificationTime to get the modification time to pass to PluginPackage::create. (WebCore::PluginDatabase::getPluginsInPaths): Ditto. * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::hash): Updated to use m_lastModified as a time_t. (WebCore::PluginPackage::equal): Ditto. 2008-03-29 Adam Roben Make PluginPackage work like our other RefCounted classes PluginPackage now starts with a ref count of 1, and its createPackage method now returns a PassRefPtr instead of a raw pointer. Reviewed by Darin Adler. * plugins/PluginPackage.cpp: (WebCore::PluginPackage::PluginPackage): Removed explicit call to the RefCounted constructor so that we'll start with a ref count of 1. (WebCore::PluginPackage::createPackage): Changed to return a PassRefPtr. * plugins/PluginPackage.h: * plugins/gtk/PluginDatabaseGtk.cpp: (WebCore::PluginDatabase::getPluginsInPaths): Changed to store the newly-created PluginPackage in a RefPtr. * plugins/win/PluginDatabaseWin.cpp: (WebCore::addPluginsFromRegistry): Ditto. (WebCore::PluginDatabase::getPluginsInPaths): Ditto. 2008-03-29 Adam Roben Fix Bug 18214: WebKit will sometimes load duplicate plugins We now compare 3 things to determine if two PluginPackages are equal: 1) Name 2) Description 3) Supported MIME types This matches Gecko's equality logic for plugins (implemented in nsPluginTag::Equals). Reviewed by Darin Adler. * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::hash): Use the above-mentioned 3 criteria to calculate the hash. (WebCore::PluginPackage::equal): Use the above-mentioned 3 criteria to determine equality. 2008-03-31 Simon Hausmann Fix the Qt build. ResourceHandleInternal.h references ResourceHandle::fireFailure, so include ResourceHandle.h. * platform/network/ResourceHandleInternal.h: 2008-03-31 Rob Buis Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=15595 marker property doesn't show up correctly as "shorthand" in inspector Make sure parsing the marker property sets the individual marker properties as implicit with marker as shorthand. Also let CSSStyleDecleration::getPropertyValue return the correct value for the marker property. * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::getPropertyValue): * css/CSSParser.cpp: * css/CSSParser.h: (WebCore::ShorthandScope::ShorthandScope): (WebCore::ShorthandScope::~ShorthandScope): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): 2008-03-30 Eric Seidel Reviewed by Oliver. Make AMatthews life easier -- fix the SVG_FILTERS build Build fix only, no tests. * svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement): * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement): * svg/SVGFEDiffuseLightingElement.cpp: * svg/SVGFEGaussianBlurElement.cpp: * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::SVGFEImageElement): * svg/SVGFESpecularLightingElement.cpp: * svg/SVGFETurbulenceElement.cpp: * svg/SVGFilterElement.cpp: * svg/SVGFilterPrimitiveStandardAttributes.cpp: * svg/graphics/filters/SVGFEBlend.cpp: * svg/graphics/filters/SVGFEComponentTransfer.cpp: * svg/graphics/filters/SVGFEComposite.cpp: * svg/graphics/filters/SVGFEDiffuseLighting.cpp: * svg/graphics/filters/SVGFEGaussianBlur.cpp: * svg/graphics/filters/SVGFEImage.cpp: * svg/graphics/filters/SVGFEMerge.cpp: * svg/graphics/filters/SVGFEMorphology.cpp: * svg/graphics/filters/SVGFEOffset.cpp: * svg/graphics/filters/SVGFESpecularLighting.cpp: * svg/graphics/filters/SVGFETurbulence.cpp: 2008-03-30 Dan Bernstein Reviewed by Sam Weinig. - fix http://bugs.webkit.org/show_bug.cgi?id=18115 REGRESSION (r31250): Incomplete repaint of GoogleReader sidebar while reading unread posts Test: fast/repaint/lines-with-layout-delta.html * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintRectangle): Made this method take layout delta into account. 2008-03-30 Dan Bernstein Reviewed by Maciej Stachowiak. - fix assertion failure in CSSParser.cpp's equalIgnoringCase() when parsing certain transforms. Test: fast/css/transform-function-lowercase-assert.html * css/CSSParser.cpp: (WebCore::TransformOperationInfo::TransformOperationInfo): Changed to always pass a lowercase string as the second argument of equalIgnoringCase(). 2008-03-30 Mark Rowe ARM build fix. * platform/text/AtomicString.cpp: (WebCore::equal): Use correct variable name. 2008-03-30 Hiroyuki Ikezoe Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=18036 Rendering invalid japanese characters with pango backend. * platform/graphics/gtk/FontPlatformDataPango.cpp: (FontPlatformData::FontPlatformData): Set PangoFontDescription for PangoContext explicitly to use proper font. 2008-03-30 Rob Buis Reviewed by Oliver. http://bugs.webkit.org/show_bug.cgi?id=17633 SVG: modifying x & y attribute of text element from JS fails Make SVG text relayout when x, y attribute is changed from js. * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::isKnownAttribute): * svg/SVGTextContentElement.h: * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::svgAttributeChanged): * svg/SVGTextElement.h: * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::isKnownAttribute): * svg/SVGTextPositioningElement.h: 2008-03-28 Maciej Stachowiak Reviewed by Oliver. - yet still more bindings speedup Make AtomicString straight from UString in handcoded bindings * bindings/js/JSElementCustom.cpp: (WebCore::JSElement::setAttribute): (WebCore::JSElement::setAttributeNS): * dom/Document.cpp: (WebCore::Document::createElement): * dom/Document.h: * html/HTMLDocument.cpp: (WebCore::HTMLDocument::createElement): * html/HTMLDocument.h: 2008-03-29 Sam Weinig Reviewed by Darin Adler. Fix for Since NSURL is allowing invalid urls to be loaded, we need to check the URL validity at the ResourceHandle level and fire off a cannotShowURL error. * loader/FrameLoader.cpp: (WebCore::FrameLoader::cannotShowURLError): * loader/FrameLoader.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::cannotShowURLError): (WebCore::ResourceLoader::wasBlocked): (WebCore::ResourceLoader::cannotShowURL): * loader/ResourceLoader.h: * platform/KURL.h: (WebCore::KURL::isValid): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::create): (WebCore::ResourceHandle::scheduleFailure): (WebCore::ResourceHandle::fireFailure): (WebCore::portAllowed): * platform/network/ResourceHandle.h: (WebCore::ResourceHandle::): * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::cannotShowURL): * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): 2008-03-29 Darin Adler Reviewed by Mitz. - more bindings speedup When I changed the temporary variables to be UString that means that the valueToString functions also need to return UString to avoid converting from UString to String twice. * bindings/js/kjs_binding.cpp: (WebCore::valueToStringWithNullCheck): Changed return value to UString. (WebCore::valueToStringWithUndefinedOrNullCheck): Ditto. * bindings/js/kjs_binding.h: Ditto. 2008-03-29 Darin Adler Reviewed by Sam. * DerivedSources.make: Removed temporary remove-stray-JSRGBColor build rule. 2008-03-29 Darin Adler Reviewed by Sam. - tweak handling of the class attribute to speed up code that sets it but never needs to parse it 6% speedup of Acid3 test 26 * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchRules): Change to use non-virtual classNames function since the hasClass bit can only be set for a StyledElement. (WebCore::CSSStyleSelector::checkOneSelector): Ditto. Also streamlined the code a bit for the tag matching as well. * dom/ClassNames.cpp: (WebCore::hasNonASCIIOrUpper): Added. This function does what other callers seem to want isLower() to do. We should merge this with isLower() in a subsequent cleanup pass. (WebCore::ClassNamesData::createVector): Renamed from parseClassAttribute. Turns the string into a vector. (WebCore::ClassNamesData::containsAll): Added. Used by getElementsByClassName. * dom/ClassNames.h: Added a separate ClassNameData class so we could hold the string and case folding flag as well as the vector. Changed ClassNames to have a set function rather than a parseClassAttribute function. Removed the "static" from isClassWhitespace. There's no reason to ask for internal linkage. * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): Use constructor instead of the parseClassAttribute function. (WebCore::ClassNodeList::nodeMatches): Get rid of unnneeded isElementNode check, since hasClass will only be true for StyledElement nodes. Use the new containsAll function in ClassNames instead of having a loop here. * dom/ClassNodeList.h: Removed unneeded forward declaration. * dom/Document.cpp: Removed unneeded include. * dom/Element.cpp: (WebCore::Element::cloneNode): Changed code to copy attributes to use a function call instead of the assignment operator. This paves the way to making the function more efficient, using a virtual function. (WebCore::Element::setAttributeMap): Updated for PassRefPtr and for name change (element -> m_element). (WebCore::Element::createAttributeMap): Changed to use create function instead of calling the constructor directly. * dom/Element.h: Removed unneeded virtual getClassNames function. Changed the argument to setAttributeMap to be a PassRefPtr. * dom/NamedAttrMap.cpp: (WebCore::NamedAttrMap::NamedAttrMap): Updated for name change (element -> m_element). (WebCore::NamedAttrMap::getNamedItem): Ditto. (WebCore::NamedAttrMap::removeNamedItem): Ditto. (WebCore::NamedAttrMap::setNamedItem): Ditto. (WebCore::NamedAttrMap::item): Ditto. (WebCore::NamedAttrMap::detachFromElement): Ditto. (WebCore::NamedAttrMap::setAttributes): Renamed this from the assignment operator. (WebCore::NamedAttrMap::addAttribute): Ditto. (WebCore::NamedAttrMap::removeAttribute): Ditto. (WebCore::NamedAttrMap::isReadOnlyNode): Ditto. * dom/NamedAttrMap.h: Removed the copy constructor and assignment operator and added a new function, setAttributes, possibly to be made virtual in the future. Made isReadOnlyNode non-virtual. Renamed element -> m_element. Made constructor protected and added a create function. * dom/NamedMappedAttrMap.cpp: (WebCore::NamedMappedAttrMap::NamedMappedAttrMap): Changed constructor parameter to take a StyledElement. (WebCore::NamedMappedAttrMap::setClass): Changed to use the new set function. * dom/NamedMappedAttrMap.h: Made constructor private and added a create function. Replaced theparseClassAttribute function with clearClass and setClass functions. Replaced the getClassNames function with a classNames function returning a reference instead of a pointer. * dom/NamedNodeMap.h: Changed to start refcount at 1 instead of 0. Removed unneeded virtual function isReadOnlyNode. * dom/StyledElement.cpp: (WebCore::StyledElement::parseMappedAttribute): Rewrote class attribute handling to use new function names and took out uneeded special case for null attribute. (WebCore::StyledElement::createAttributeMap): Changed to use create function instead of a direct call to new. * dom/StyledElement.h: Replaced the virtual getClassNames function with a non-virtual inline classNames function. * html/HTMLElement.cpp: (WebCore::HTMLElement::cloneNode): Changed code to copy attributes to use a function call instead of the assignment operator. * html/HTMLTokenizer.cpp: (WebCore::Token::addAttribute): Use create function instead of a a direct call to new. * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::createContainingTable): Use RefPtr and the new create function. (WebCore::HTMLViewSourceDocument::addViewSourceToken): Ditto. (WebCore::HTMLViewSourceDocument::addSpanWithClassName): Ditto. (WebCore::HTMLViewSourceDocument::addLine): Ditto. (WebCore::HTMLViewSourceDocument::addText): Ditto. (WebCore::HTMLViewSourceDocument::addLink): Ditto. * html/HTMLViewSourceDocument.h: Ditto. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Changed code to copy attributes to use a function call instead of the assignment operator. (WebCore::SVGUseElement::transferUseAttributesToReplacedElement): Ditto. 2008-03-29 Sam Weinig Reviewed by Brady Eidson. Fix crash when canceling a resource load while port blocked failure timer is going. Test: fast/loader/cancel-load-during-port-block-timer.html * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::scheduleBlockedFailure): (WebCore::ResourceHandle::fireBlockedFailure): * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): Make the Timer a member variable of ResourceHandleInternal so that it can be canceled if the ResourceHandle is destroyed. 2008-03-28 Stephanie Fix 64bit build * WebCore.LP64.exp: * loader/archive/cf/LegacyWebArchiveMac.mm: (WebCore::createResourceResponseFromMacArchivedData): 2008-03-28 Steve Falkenburg Enabled LTCG on files within "page". Rubber stamped by Oliver. * WebCore.vcproj/WebCore.vcproj: 2008-03-28 Dan Bernstein Reviewed by Dave Hyatt. - fix a percentage background position regression from r31389 Test: fast/backgrounds/background-position-1.html * rendering/Length.h: (WebCore::Length::calcValue): Divide by 100. (WebCore::Length::calcMinValue): Ditto. 2008-03-28 David Hyatt Back out the Ahem font antialiasing hack, since it is now no longer required for LCD antialiased text to match the reference rendering on Acid 3. * platform/graphics/SimpleFontData.h: * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): * platform/graphics/win/FontCGWin.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformInit): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionNewFloats): 2008-03-28 Brady Eidson Reviewed by Darin Adler More Kit->Core WebArchive changes. Create an archive from the current selection in a frame * WebCore.base.exp: * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::createFromSelection): * loader/archive/cf/LegacyWebArchive.h: 2008-03-28 Kevin McCullough - Somehow managed to duplicate code :( * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didFinishLoading): 2008-03-28 Kevin McCullough - Missed some changes in previous checkin. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Get identifier from synchronous loader. (WebCore::XMLHttpRequest::didFinishLoading): 2008-03-28 Kevin McCullough Reviewed by Adam. - XMLHttpRequests do not show response contents, preview images (14313) - XMLHttpRequests should be shown separately and grouped (14315) - XMLHttpRequest: Inspector should show network activity/XHR in Console (17233) - Send the XMLHttpRequest data to the Inspector Controller. * loader/FrameLoader.cpp: Return the identifier for this resource since we need it in the XHR case. (WebCore::FrameLoader::loadResourceSynchronously): * loader/FrameLoader.h: Ditto. * page/InspectorController.cpp: (WebCore::XMLHttpRequestResource::XMLHttpRequestResource): We only need the data since the type will be XHR and the encoding is not used (we decoded earlier). (WebCore::XMLHttpRequestResource::~XMLHttpRequestResource): Locking is necessary when setting and clearing the KJS::UString::Rep. (WebCore::InspectorResource::setXMLHttpRequestProperties): (WebCore::InspectorResource::sourceString): Return the decoded source. (WebCore::addSourceToFrame): No longer do the decoding here, it has been encapsulated in the InspectorResource. (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest): * page/InspectorController.h: Pass a UString instead of copying to a WebCore::String. In case we never ask for the string's contents this will save us an extra copy. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): In the synchronous load case we normally do not keep the identifier but we need it to find the InspectorResource in order to tell it that it was loaded via XHR. (WebCore::XMLHttpRequest::didFinishLoading): Tell the InspectorController that its resource was loaded via XHR. * xml/XMLHttpRequest.h: Ditto. 2008-03-28 Brady Eidson Reviewed by Sam Weinig WebArchive saga continues - Can now make archives from ranges in WebCore Again, previous layout test coverage exercised this code * WebCore.base.exp: * editing/markup.cpp: (WebCore::createFullMarkup): Added a "markup from range" variant that copies the previous WebKit implementation * editing/markup.h: * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/archive/cf/LegacyWebArchive.h: 2008-03-28 Stephanie Lewis windows build fix. * platform/win/MainThreadWin.cpp: (WebCore::initializeThreadingAndMainThread): 2008-03-28 Brady Eidson Reviewed by Sam Weinig More Kit->Core webarchive code movement * WebCore.base.exp: * editing/markup.cpp: (WebCore::createFullMarkup): Replacement for [DOMNode markupString], creating full markup at this node including the document type string, which the WebKit implementation did indirectly * editing/markup.h: 2008-03-28 Darin Adler Reviewed by Maciej. - cut down on copying and refcount churn a little by using references a bit more for KURL and String * bindings/js/JSXMLHttpRequest.cpp: (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Use const KURL& instead of KURL. * css/StyleSheet.h: (WebCore::StyleSheet::href): Return const String& instead of String. (WebCore::StyleSheet::title): Ditto. * dom/Document.cpp: (WebCore::Document::completeURL): Use const KURL* for a local variable instead of KURL to avoid copying the KURL. * dom/Element.cpp: (WebCore::Element::baseURI): Use const KURL& instead of KURL. * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::hostname): Ditto. * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::isURLAllowed): Ditto. * html/HTMLKeygenElement.cpp: Removed unneeded include of KURL. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): Get rid of temporary KURL. * platform/SecurityOrigin.cpp: (WebCore::SecurityOrigin::createForFrame): Use const KURL& instead of KURL. 2008-03-28 Alexey Proskuryakov Reviewed by Sam Weinig. Fix a dtoa thread safety issue. * ForwardingHeaders/kjs/InitializeThreading.h: Added. * platform/MainThread.cpp: * platform/MainThread.h: (WebCore::initializeThreadingAndMainThread): Call KJS::initializeThreading instead of its WTF counterpart. 2008-03-28 Brent Fulgham Reviewed by Maciej, landed by Brady Correct build regression (http://bugs.webkit.org/show_bug.cgi?id=18148) * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::getWindowsContext): (WebCore::GraphicsContext::releaseWindowsContext): 2008-03-28 Brady Eidson Reviewed by Darin "Yet another transitional step" to empty out WebKit-based code for archiving. With this patch, the key operation of "Creating a WebArchive rooted at a single Node" takes place entirely within WebCore, and opens the door to saving WebArchives on Windows. This is another "zero behavior change" patch, and current editing/ and webarchive/ layout tests covered the relevant code * WebCore.base.exp: * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::create): * loader/archive/cf/LegacyWebArchive.h: 2008-03-28 Jasper Bryant-Greene Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=18061 PlatformScrollBarGtk attempts to allocate negative width and/or height for widgets Missing clampNegativeToZero() call meant that we tried to allocate widgets with negative width and/or height. * platform/gtk/PlatformScrollBarGtk.cpp: (PlatformScrollbar::geometryChanged): 2008-03-28 Brady Eidson Reviewed by Darin Using convertUTF16ToUTF8() from WTF, add a helper function that gives you a UTF8 SharedBuffer created from a String. * ForwardingHeaders/wtf/unicode/UTF8.h: Added. * platform/text/PlatformString.h: * platform/text/String.cpp: (WebCore::utf8Buffer): 2008-03-28 Darin Adler Reviewed by Adam. - eliminate a tiny bit of unnecessary refcount churn * bindings/js/JSEventTargetBase.cpp: (WebCore::eventNameForPropertyToken): Return const AtomicString&. * bindings/js/JSEventTargetBase.h: (WebCore::JSEventTargetBase::getValueProperty): Update for above change. (WebCore::JSEventTargetBase::putValueProperty): Ditto. 2008-03-28 Simon Hausmann Fix the Qt build. * rendering/Length.h: Include wtf/MathExtras.h for round(). 2008-03-28 David Hyatt Fix a bug where background-position truncates instead of rounding when it evaluates to fractional pixel values. This matches other browsers. Reviewed by maciej Added fast/backgrounds/background-position-rounding.html * rendering/Length.h: (WebCore::Length::calcValue): (WebCore::Length::calcMinValue): * rendering/RenderBox.cpp: (WebCore::RenderBox::calculateBackgroundImageGeometry): 2008-03-27 Kevin Ollivier wx build fix. Return a default value for operator == when !USE(WXGC) (not implemented in that case). * platform/graphics/wx/AffineTransformWx.cpp: (WebCore::AffineTransform::operator== ): 2008-03-27 Maciej Stachowiak - fix build * svg/SVGGlyphMap.h: (WebCore::GlyphMapNode::create): 2008-03-27 Brady Eidson Forgot a small requested change before committing * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::mainResource): 2008-03-27 Brady Eidson Reviewed by Adam Roben Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore as the push to core-ify WebArchives continues. This patch also introduces a behavior change. WebCore allows ArchiveResources with null or empty data. WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null. Since WebResource is API, I decided to leave it be to avoid a behavior change. But internally created resources (as in "while archiving a page") are accepting of null or empty data. This actually fixes a bug where not all subframes are archived, and resulted in a layout test change. * WebCore.base.exp: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::archiveResourceForURL): Make this const (WebCore::DocumentLoader::mainResource): (WebCore::DocumentLoader::subresource): Make this const and relocate (WebCore::DocumentLoader::getSubresources): * loader/DocumentLoader.h: 2008-03-27 Maciej Stachowiak Reviewed by Darin. - fixed many buildbot leaks in glyph map code * svg/SVGGlyphMap.h: (WebCore::GlyphMapNode::create): Use explicit create pattern, to avoid overreffing and therefore leaking these objects. (WebCore::SVGGlyphMap::add): Call create instead of using new. 2008-03-27 Maciej Stachowiak Rubber stamped by Oliver. - re-fix Acid3, some code was incorrectly moved when fixing the Qt build * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): 2008-03-27 Simon Hausmann Fix compilation against Qt 4.4 and one missing SVG_FONTS #ifdef. * platform/graphics/qt/FontQt.cpp: (WebCore::Font::floatWidth): Forgot to adjust this signture for Qt 4.4. * bindings/js/JSSVGElementWrapperFactory.cpp: Added a missing #ifdef for SVG_FONTS 2008-03-27 Simon Hausmann Reviewed by Eric Seidel. Fix the Qt build and the build without ENABLE(SVG_FONTS) * WebCore.pro: Removed ElementTimeControl.idl as it's ObjC only and removed some SVG_FONTS specific idl files from IDL_BINDINGS for now * bindings/js/JSSVGElementWrapperFactory.cpp: altGlyph is ENABLE(SVG_FONTS) only * platform/graphics/qt/FontQt.cpp: (WebCore::Font::floatWidth): Adjust the function signature to Font.h * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Fix compilation without SVG_FONTS * svg/SVGAltGlyphElement.cpp: Compile only if ENABLE(SVG_FONTS) * svg/SVGAltGlyphElement.h: Ditto * svg/svgtags.in: hkern and altGlyph are SVG_FONTS only. * svg/SVGTSpanElement.cpp: (WebCore::SVGTSpanElement::childShouldCreateRenderer): Compile without SVG_FONTS * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::childShouldCreateRenderer): Ditto * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::childShouldCreateRenderer): 2008-03-26 Timothy Hatcher Rename some Inspector files to facilitate the up-coming UI refresh changes. http://bugs.webkit.org/show_bug.cgi?id=17773 Rubber-stamped by Adam Roben. * WebCore.vcproj/WebCore.vcproj: * page/inspector/Console.js: Copied from page/inspector/ConsolePanel.js. * page/inspector/ConsolePanel.js: Removed. * page/inspector/DocumentPanel.js: Removed. * page/inspector/ElementsPanel.js: Copied from page/inspector/DocumentPanel.js. * page/inspector/FontPanel.js: Removed. * page/inspector/FontView.js: Copied from page/inspector/FontPanel.js. * page/inspector/ImagePanel.js: Removed. * page/inspector/ImageView.js: Copied from page/inspector/ImagePanel.js. * page/inspector/NetworkPanel.js: Removed. * page/inspector/ResourcePanel.js: Removed. * page/inspector/ResourceView.js: Copied from page/inspector/ResourcePanel.js. * page/inspector/ResourcesPanel.js: Copied from page/inspector/NetworkPanel.js. * page/inspector/SourcePanel.js: Removed. * page/inspector/SourceView.js: Copied from page/inspector/SourcePanel.js. * page/inspector/WebKit.qrc: * page/inspector/inspector.html: 2008-03-26 Steve Falkenburg Enable LTCG on css, dom files in WebCore Reviewed by Stephanie. * WebCore.vcproj/WebCore.vcproj: 2008-03-26 Stephanie Lewis Fix Windows Build * WebCore.vcproj/WebCore.vcproj: 2008-03-26 Mark Rowe Speculative GTK build fix. * GNUmakefile.am: 2008-03-26 Mark Rowe Mac build fix. * WebCore.base.exp: Remove nonexistent symbol from the export file. 2008-03-26 Sam Weinig Try and fix Gtk+ again. * GNUmakefile.am: 2008-03-26 Dan Bernstein Reviewed by Dave Hyatt. - fix REGRESSION (r30111-30112): Tahoe web cam website has some text in Chinese or japanese * html/HTMLParser.cpp: (WebCore::HTMLParser::insertNode): Added call to beginParsingChildren() on the new node. (WebCore::HTMLParser::handleError): Ditto. (WebCore::HTMLParser::reopenResidualStyleTags): Ditto. (WebCore::HTMLParser::pushBlock): Removed incorrect call to beginParsingChildren() on the current node. * manual-tests/applet-finish-parsing-children.html: Added. * manual-tests/resources/DrawMessage.class: Added. 2008-03-26 Brady Eidson Reviewed by Darin When we create a WebArchive, we walk every node from some starting point, asking each node along the way "What are your subresource URLs?" That logic is currently in DOMNode in WebKitMac - this patch moves that ability down into WebCore::Node * WebCore.base.exp: * dom/Node.cpp: (WebCore::Node::getSubresourceURLs): (WebCore::Node::getSubresourceAttributeStrings): Virtual and empty. Subclasses of Node that have subresources will override it. * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::getSubresourceAttributeStrings): * dom/ProcessingInstruction.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::getSubresourceAttributeStrings): * html/HTMLBodyElement.h: * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::getSubresourceAttributeStrings): * html/HTMLEmbedElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::getSubresourceAttributeStrings): * html/HTMLImageElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::getSubresourceAttributeStrings): * html/HTMLInputElement.h: * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::getSubresourceAttributeStrings): * html/HTMLLinkElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::getSubresourceAttributeStrings): * html/HTMLObjectElement.h: * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::getSubresourceAttributeStrings): * html/HTMLParamElement.h: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::getSubresourceAttributeStrings): * html/HTMLScriptElement.h: * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::getSubresourceAttributeStrings): * html/HTMLTableCellElement.h: * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::getSubresourceAttributeStrings): * html/HTMLTableElement.h: * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::getSubresourceAttributeStrings): * svg/SVGCursorElement.h: * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::getSubresourceAttributeStrings): * svg/SVGFEImageElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::getSubresourceAttributeStrings): * svg/SVGImageElement.h: * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::getSubresourceAttributeStrings): * svg/SVGScriptElement.h: 2008-03-26 Dan Bernstein Reviewed by Dave Hyatt. - maintain subpixel-antialiasing when drawing text with a simple shadow * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawComplexText): If the shadow has a zero blur radius, draw the shadow by drawing the text at an offset instead of relying on Core Graphics shadows. (WebCore::Font::drawGlyphs): Ditto. * platform/graphics/win/FontCGWin.cpp: (WebCore::Font::drawGlyphs): Ditto. 2008-03-26 Brady Eidson Reviewed by Mark Rowe Part of the continued push to move WebArchive-related code down to WebCore, this moves [WebDataSource subresourceForURL:] down to DocumentLoader->subresource() * WebCore.base.exp: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::subresource): Create an ArchiveResource from a CachedResource if it exists Otherwise, fallback to an ArchiveResource from the current Archive if any. Otherwise, return null * loader/DocumentLoader.h: * loader/archive/ArchiveResource.cpp: (WebCore::ArchiveResource::create): (WebCore::ArchiveResource::ArchiveResource): * loader/archive/ArchiveResource.h: 2008-03-26 Sam Weinig Fix Gtk+ build. * GNUmakefile.am: 2008-03-26 Mark Rowe Rubber-stamped by Brady Eidson. Update FEATURE_DEFINES to be consistent with the other locations in which it is defined. * Configurations/WebCore.xcconfig: 2008-03-26 Brent Fulgham Reviewed by Adam Roben. Add necessary files and build commands to vcproj files to build a Curl-based Windows WebKit. For details, see http://bugs.webkit.org/show_bug.cgi?id=17985 * WebCore.vcproj/WebCore.vcproj: 2008-03-26 Adam Roben Record JS exceptions triggered by the Inspector's use of JSC We now dump all exceptions returned from JavaScriptCore into the Inspector's console. The HANDLE_EXCEPTION macro records the line on which the exception was returned. It calls a new private handleException method on InspectorController. Reviewed by Kevin McCullough. * page/InspectorController.cpp: (WebCore::InspectorController::callSimpleFunction): Made this be a member of InspectorController so that it can call handleException. (WebCore::addSourceToFrame): Pass the exception pointer on to inner JSC calls, and check it after those calls return. (WebCore::getResourceDocumentNode): Ditto. (WebCore::search): Ditto. Also changed the name/type of an existing exception variable to ExceptionCode ec. (WebCore::databaseTableNames): Ditto. (WebCore::moveByUnrestricted): Ditto. (WebCore::InspectorController::~InspectorController): Check for and record exceptions as we call JSC. (WebCore::InspectorController::focusNode): Ditto. (WebCore::InspectorController::scriptObjectReady): Ditto. (WebCore::addHeaders): Added an exception parameter. (WebCore::scriptObjectForRequest): Ditto. (WebCore::scriptObjectForResponse): Ditto. (WebCore::InspectorController::addScriptResource): Check for and record exceptions as we call JSC. (WebCore::InspectorController::addAndUpdateScriptResource): Ditto. (WebCore::InspectorController::removeScriptResource): Ditto. Also moved the call to setScriptObject to before the JSC calls so that it will always be called even if we return early if JSC throws an exception. (WebCore::InspectorController::updateScriptResourceRequest): Check for and record exceptions as we call JSC. (WebCore::InspectorController::updateScriptResourceResponse): Ditto. (WebCore::InspectorController::updateScriptResource): Ditto. (WebCore::InspectorController::addDatabaseScriptResource): Ditto. (WebCore::InspectorController::removeDatabaseScriptResource): Ditto. Also moved the call to setScriptObject to before the JSC calls so that it will always be called even if we return early if JSC throws an exception. (WebCore::InspectorController::addScriptConsoleMessage): Check for and record exceptions as we call JSC. (WebCore::InspectorController::handleException): Added. * page/InspectorController.h: 2008-03-26 Darin Adler Rubber stamped by Maciej. - removed a couple log messages in error cases that are handled internally * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decode): Removed the LOG_ERROR. * platform/text/mac/TextCodecMac.cpp: (WebCore::TextCodecMac::decode): Ditto. 2008-03-26 Sam Weinig Reviewed by Adam Roben. * page/Location.idl: Don't enumerate toString. 2008-03-26 Mark Rowe Release build fix. * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Initialize svgFont to zero. 2008-03-26 Maciej Stachowiak Reviewed by Hyatt and Adam. Coded by me and Darin. - SVG kerning support (horizontal kerning only for now since we don't do vertical text layout right yet) Acid3 100/100 * DerivedSources.make: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/Font.cpp: (WebCore::Font::floatWidth): (WebCore::Font::isSVGFont): * platform/graphics/Font.h: * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::calculateGlyphWidth): (WebCore::SVGInlineTextBox::calculateGlyphBoundaries): * rendering/SVGInlineTextBox.h: * rendering/SVGRootInlineBox.cpp: (WebCore::cummulatedWidthOrHeightOfTextChunk): (WebCore::SVGRootInlineBox::buildLayoutInformation): (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): * rendering/SVGRootInlineBox.h: (WebCore::LastGlyphInfo::LastGlyphInfo): * svg/SVGFont.cpp: (WebCore::SVGTextRunWalker::walk): (WebCore::Font::svgFont): (WebCore::floatWidthOfSubStringUsingSVGFont): (WebCore::Font::floatWidthUsingSVGFont): (WebCore::Font::drawTextUsingSVGFont): (WebCore::Font::selectionRectForTextUsingSVGFont): * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::invalidateGlyphCache): (WebCore::SVGFontElement::ensureGlyphCache): (WebCore::parseUnicodeRange): (WebCore::parseUnicodeRangeList): (WebCore::stringMatchesUnicodeRange): (WebCore::matches): (WebCore::SVGFontElement::getHorizontalKerningPairForStringsAndGlyphs): * svg/SVGFontElement.h: * svg/SVGGlyphElement.cpp: (WebCore::SVGGlyphElement::insertedIntoDocument): (WebCore::SVGGlyphElement::removedFromDocument): * svg/SVGHKernElement.cpp: Added. (WebCore::SVGHKernElement::SVGHKernElement): (WebCore::SVGHKernElement::~SVGHKernElement): (WebCore::SVGHKernElement::insertedIntoDocument): (WebCore::SVGHKernElement::removedFromDocument): (WebCore::SVGHKernElement::buildHorizontalKerningPair): * svg/SVGHKernElement.h: Added. (WebCore::SVGHorizontalKerningPair::SVGHorizontalKerningPair): (WebCore::SVGHKernElement::rendererIsNeeded): * svg/SVGHKernElement.idl: Added. * svg/SVGTextContentElement.cpp: (WebCore::cummulatedCharacterRangeLength): (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): * svg/svgtags.in: 2008-03-26 Sam Weinig Reviewed by Adam Roben. Autogenerate JSLocation. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: Add files. * DerivedSources.make: Add Location, remove JSLocation.lut.h * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate): (WebCore::JSDOMWindowBase::getValueProperty): (WebCore::JSDOMWindowBase::put): (WebCore::JSDOMWindowBase::clearHelperObjectProperties): (WebCore::JSDOMWindowBase::disconnectFrame): * bindings/js/JSDOMWindowBase.h: Remove manuel management of the Location object. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::mark): Add marking of JSLocation. (WebCore::JSDOMWindow::setLocation): Add custom setLocation as we only want to do this when safe and we need to keep Dashboard quirks. * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::location): Fetch the location object using the normal toJS route. * bindings/js/JSLocation.cpp: Removed. * bindings/js/JSLocation.h: Removed. * bindings/js/JSLocationCustom.cpp: Added. (WebCore::JSLocation::customGetOwnPropertySlot): (WebCore::JSLocation::customPut): (WebCore::JSLocation::deleteProperty): (WebCore::JSLocation::customGetPropertyNames): (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::reload): (WebCore::JSLocation::assign): (WebCore::JSLocation::toString): Setter and Functions need custom implementations as they rely on the dynamic global object for determining the behavior of the navigation. * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): (WebCore::CachedPage::restore): (WebCore::CachedPage::clear): * history/CachedPage.h: Removed all the special casing for location as it should be treated like all the other objects hanging off the window. * page/DOMWindow.cpp: (WebCore::DOMWindow::clear): (WebCore::DOMWindow::location): * page/DOMWindow.h: (WebCore::DOMWindow::optionalLocation): * page/DOMWindow.idl: Add Location accessor and pointer getter for marking. * page/Location.cpp: Added. (WebCore::Location::Location): (WebCore::Location::disconnectFrame): (WebCore::Location::url): (WebCore::Location::href): (WebCore::Location::protocol): (WebCore::Location::host): (WebCore::Location::hostname): (WebCore::Location::port): (WebCore::Location::pathname): (WebCore::Location::search): (WebCore::Location::hash): (WebCore::Location::toString): * page/Location.h: Added. (WebCore::Location::create): (WebCore::Location::frame): * page/Location.idl: Added. 2008-03-26 David Hyatt Add support for the rendering and measurement of the element in SVG. This patch brings is half of what's needed to reach 100/100 on Acid3 and pass the test. Maciej has coded up the other half. :) Reviewed by mjs Added svg/custom/altGlyph.svg * svg/SVGAltGlyphElement.cpp: (WebCore::SVGAltGlyphElement::childShouldCreateRenderer): (WebCore::SVGAltGlyphElement::glyphElement): * svg/SVGAltGlyphElement.h: * svg/SVGFont.cpp: (WebCore::SVGTextRunWalker::walk): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::insertedIntoDocument): * svg/SVGGlyphElement.cpp: (WebCore::SVGGlyphElement::insertedIntoDocument): (WebCore::SVGGlyphElement::removedFromDocument): 2008-03-26 Adam Roben Turn on SVG animation on Windows Also touched some files to force things to rebuild/regenerate. * WebCore.vcproj/WebCore.vcproj: Added ENABLE_SVG_ANIMATION. * WebCore.vcproj/build-generated-files.sh: Ditto. * bindings/scripts/CodeGenerator.pm: Touched. * config.h: Touched. * svg/svgtags.in: Touched. 2008-03-26 Justin Garcia Reviewed by Harrison. REGRESSION (Safari 3.1): Mail's plain text reply omits blank line following the attribution * editing/markup.cpp: (WebCore::createFragmentFromText): When asked to create a fragment from "Attribution:\n" with a context from [html, 0] to [html, 0], we'd return "Attribution
". Don't enclose paragraphs in clones of the context's enclosing block if that block is the html or body element. Currently no way to test [DOMHTMLElement createFragmentFromText:]. 2008-03-26 Antti Koivisto Reviewed by Anders. http://bugs.webkit.org/show_bug.cgi?id=17077 Bug 17077: SVG SMIL animation is currently broken (and turned off) (affects Acid3 tests 75 and 76) - enable SVG animation support. - basic implementation of beginElement()/endElement(). Animation definitely will need more work than this, but it is a start! * Configurations/WebCore.xcconfig: * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::SVGAnimationElement): (WebCore::SVGAnimationElement::updateAnimatedValueForElapsedSeconds): (WebCore::SVGAnimationElement::beginElement): (WebCore::SVGAnimationElement::beginElementAt): (WebCore::SVGAnimationElement::endElement): (WebCore::SVGAnimationElement::endElementAt): * svg/SVGAnimationElement.h: 2008-03-26 Mark Rowe Reviewed by David Hyatt. Make the Ahem font antialias correctly on Acid3 on Tiger. * WebCore.Tiger.exp: * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2008-03-26 Simon Hausmann Attempt to fix the Qt build. * platform/text/qt/TextCodecQt.cpp: Adjust function signature. (WebCore::TextCodecQt::decode): * platform/text/qt/TextCodecQt.h: Ditto. 2008-03-26 Dan Bernstein Reviewed by Anders Carlsson. - fix http://bugs.webkit.org/show_bug.cgi?id=18104 REGRESSION: LEAK: 2 InlineBox in editing/inserting/12882.html * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): When deciding to ditch old clean lines (due to changed or newly-added floats), keep the reference to those lines so they can be properly deleted in the end, and use a separate flag to signal that no matching should be attempted. 2008-03-26 Mark Rowe Speculative Windows build fix. * platform/graphics/win/SimpleFontDataCGWin.cpp: 2008-03-25 Steve Falkenburg Turn on link-time-codegen in html and rendering related files. Reviewed by Oliver. * WebCore.vcproj/WebCore.vcproj: 2008-03-26 Maciej Stachowiak Reviewed by Darin. - fixed "SVG multichar glyph matching matches longest instead of first (affects Acid3 test 79)" http://bugs.webkit.org/show_bug.cgi?id=18118 * svg/SVGFont.cpp: (WebCore::SVGTextRunWalker::walk): * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::SVGFontElement): (WebCore::SVGFontElement::addGlyphToCache): (WebCore::SVGFontElement::removeGlyphFromCache): (WebCore::SVGFontElement::ensureGlyphCache): (WebCore::SVGFontElement::getGlyphIdentifiersForString): * svg/SVGFontElement.h: * svg/SVGGlyphElement.h: (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier): * svg/SVGGlyphMap.h: Added. New radix tree based glyph map. (WebCore::GlyphMapNode::GlyphMapNode): (WebCore::SVGGlyphMap::SVGGlyphMap): (WebCore::SVGGlyphMap::add): (WebCore::SVGGlyphMap::compareGlyphPriority): (WebCore::SVGGlyphMap::get): (WebCore::SVGGlyphMap::clear): 2008-03-26 David Hyatt Fix build bustage on Tiger. Tiger will not have the bug fix. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformInit): 2008-03-26 David Hyatt Make the Ahem font antialias correctly on Acid3. Reviewed by Dan * platform/graphics/SimpleFontData.h: * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): * platform/graphics/win/FontCGWin.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformInit): 2008-03-26 Mark Rowe Fix the Mac build. * WebCore.xcodeproj/project.pbxproj: Copy the newly generated header into the right place. 2008-03-26 Adam Roben Fix Bug 17768: REGRESSION (r30146): Inspector no longer shows elements properties We were throwing an exception from Object.describe because of some undefined variables. Reviewed by Tim Hatcher. * page/inspector/utilities.js: (Object.describe): Reinstate the type1 and type2 variables that were removed in r30146. They're still used when formatting a function. 2008-03-26 Eric Seidel Reviewed by darin. Forgot to add braces darin asked for during review. * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::write): 2008-03-26 Eric Seidel Reviewed by darin. Fix, makes us pass Test 70 XML documents should be strict about encoding checks http://bugs.webkit.org/show_bug.cgi?id=17079 Test: fast/encoding/invalid-xml.html * WebCore.base.exp: * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::write): * loader/CachedFont.cpp: (WebCore::CachedFont::ensureSVGFontData): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::TextResourceDecoder): (WebCore::TextResourceDecoder::decode): * loader/TextResourceDecoder.h: * platform/text/TextCodec.h: (WebCore::TextCodec::decode): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decodeToBuffer): (WebCore::ErrorCallbackSetter::ErrorCallbackSetter): (WebCore::ErrorCallbackSetter::~ErrorCallbackSetter): (WebCore::TextCodecICU::decode): * platform/text/TextCodecICU.h: * platform/text/TextCodecLatin1.cpp: * platform/text/TextCodecLatin1.h: * platform/text/TextCodecUTF16.cpp: * platform/text/TextCodecUTF16.h: * platform/text/TextCodecUserDefined.cpp: * platform/text/TextCodecUserDefined.h: * platform/text/TextDecoder.cpp: (WebCore::TextDecoder::checkForBOM): * platform/text/TextDecoder.h: (WebCore::TextDecoder::decode): * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::decode): * platform/text/TextEncoding.h: (WebCore::TextEncoding::decode): * platform/text/mac/TextCodecMac.cpp: (WebCore::TextCodecMac::decode): * platform/text/mac/TextCodecMac.h: 2008-03-26 Antti Koivisto Reviewed by Adam. Add ElementTimeControl interface to SVGAnimationElement. Passes Acid3 test 75. * DerivedSources.make: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/CodeGeneratorObjC.pm: * svg/ElementTimeControl.h: Added. (WebCore::ElementTimeControl::~ElementTimeControl): * svg/ElementTimeControl.idl: Added. * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::beginElement): (WebCore::SVGAnimationElement::beginElementAt): (WebCore::SVGAnimationElement::endElement): (WebCore::SVGAnimationElement::endElementAt): * svg/SVGAnimationElement.h: * svg/SVGAnimationElement.idl: 2008-03-26 Kevin McCullough - LayoutTest fix. Null check. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): 2008-03-26 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=17994 REGRESSION (523-525+) View not updated when changing CSS size via JavaScript - fix http://bugs.webkit.org/show_bug.cgi?id=18063 REGRESSION (r31250): Small bug that just cropped up in WebKit r31275 Tests: fast/repaint/subtree-root-clip.html fast/repaint/subtree-root-clip-2.html fast/repaint/subtree-root-clip-3.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): Changed to not set an initial clip. Since the root is clipping, there is no need to set a clip, and setting the clip based on the container was wrong because often the root was not included in the container's overflow rect because it had its own layer. * rendering/RenderBox.cpp: (WebCore::RenderBox::absolutePosition): Removed code that added table cell's extra top offset only in the slow (recursive) code path. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::absolutePosition): Added code to add the extra top offset in both code paths. 2008-03-26 Simon Hausmann Fix the Qt build. * platform/graphics/qt/FontQt.cpp: (WebCore::Font::floatWidth): 2008-03-24 Maciej Stachowiak Reviewed by Eric. - fixed "SVGTextElement.getStartPositionOfChar does not correctly account for multichar glyphs" http://bugs.webkit.org/show_bug.cgi?id=18046 * platform/graphics/Font.cpp: (WebCore::Font::floatWidth): Allow expressing a run that has extra "context" characters beyond the end, and reporting of how many characters were actually consumed, to support multichar glyphs in SVG fonts. * platform/graphics/Font.h: * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::calculateGlyphWidth): Pass along extra chars in argument and chars consumed out argument. (WebCore::SVGInlineTextBox::calculateGlyphHeight): Pass along extra chars in argument. (WebCore::SVGInlineTextBox::calculateGlyphBoundaries): Add boilerplate; may not handle multichar glyphs right but I don't know what effects this would have. * rendering/SVGInlineTextBox.h: * rendering/SVGRootInlineBox.cpp: (WebCore::cummulatedWidthOrHeightOfTextChunk): Add boilerplate; may not handle multichar glyphs right but again I am not sure what effect this would have. (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Account for multichar glyphs - let glyph selection consider extra chars, and account for the fact that a glyph may have consumed multiple chars. * rendering/SVGRootInlineBox.h: * svg/SVGFont.cpp: (WebCore::SVGTextRunWalker::walk): This is the place where glyph selection happens, so this is where we accout for multichar glyphs (both looking at extra chars past the end of the run, and reporting how many chars were consumed). (WebCore::floatWidthOfSubStringUsingSVGFont): Pass aforementioned info through the layers. (WebCore::Font::floatWidthUsingSVGFont): ditto (WebCore::Font::drawTextUsingSVGFont): ditto (WebCore::Font::selectionRectForTextUsingSVGFont): ditto * svg/SVGTextContentElement.cpp: (WebCore::cummulatedCharacterRangeLength): ditto (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): ditto 2008-03-25 Beth Dakin Reviewed by Oliver. Fix for CSSValueList::item() does not range-check index Check bounds before accessing the item to avoid a crash. itemWithoutBoundsCheck() is still inlined and not bounds-checked to avoid slowing down our internal callers of item(). * css/CSSValueList.cpp: (WebCore::CSSValueList::item): * css/CSSValueList.h: (WebCore::CSSValueList::itemWithoutBoundsCheck): Call itemWithoutBoundsCheck() to avoid slowing down these internal callers. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): * css/CSSStyleSelector.cpp: (WebCore::applyCounterList): (WebCore::CSSStyleSelector::applyProperty): * css/MediaQueryEvaluator.cpp: (WebCore::parseAspectRatio): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::rebuildFontFace): * svg/graphics/SVGPaintServer.cpp: (WebCore::dashArrayFromRenderingStyle): 2008-03-25 Antti Koivisto Reviewed by Oliver. Fix http://bugs.webkit.org/show_bug.cgi?id=18082 REGRESSION (r31287): GMail does not work if user stylesheet is set Oops, my cache refactoring patch was missing these rather essential lines for user stylesheets. They would get reloaded repeatedly. * loader/Cache.cpp: (WebCore::Cache::requestUserCSSStyleSheet): 2008-03-25 Matt Lilek Rubber stamped by Adam Roll out r31300 since it causes assertion failures on page load. See http://bugs.webkit.org/show_bug.cgi?id=18093 * page/InspectorController.cpp: (WebCore::InspectorController::didFinishLoading): (WebCore::InspectorController::didFailLoading): 2008-03-25 Darin Adler Reviewed by Anders. - fix http://bugs.webkit.org/show_bug.cgi?id=17252 Acid3 test removing Nodes during NodeIterator walk fails (affects Acid3 test 2) Test: traversal/acid3-test-2.html * bindings/js/JSNodeIteratorCustom.cpp: (WebCore::JSNodeIterator::nextNode): Update since result is PassRefPtr. (WebCore::JSNodeIterator::previousNode): Ditto. * dom/NodeIterator.cpp: (WebCore::NodeIterator::nextNode): Changed result to PassRefPtr. Added code to track both the current candidate (which needs to move along to the next node if current node is deleted) and the current provisional result (passed to acceptNode, and needs to be returned even if it's deleted). (WebCore::NodeIterator::previousNode): Ditto. (WebCore::NodeIterator::nodeWillBeRemoved): Call updateForNodeRemoval for m_candidateNode as well as m_referenceNode. * dom/NodeIterator.h: Use PassRefPtr for return values. 2008-03-25 Brady Eidson Reviewed by Anders Add the ability to transform a CString into a SharedBuffer to avoid copying data This is valuable to avoid copying a block of data for an upcoming patch * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::adoptVector): * platform/SharedBuffer.h: * platform/text/CString.cpp: (WebCore::CString::releaseBuffer): * platform/text/CString.h: (WebCore::CStringBuffer::releaseBuffer): 2008-03-25 Brady Eidson Attempt to fix .bkl build systems after recent archive additions * webcore-base.bkl: 2008-03-25 Kevin McCullough Reviewed by Adam. - Cleaned up the needless use of RefPtrs, which we may someday no longer use for InspectorResources. * page/InspectorController.cpp: (WebCore::InspectorController::didFinishLoading): (WebCore::InspectorController::didFailLoading): 2008-03-25 Kevin McCullough Reviewed by Adam. - Added a null check * xml/XMLHttpRequest.cpp: Null check (WebCore::XMLHttpRequest::send): 2008-03-25 Kevin McCullough Reviewed by Tim. - XMLHttpRequests do not show response contents, preview images (14313) - XMLHttpRequests should be shown separately and grouped (14315) - XMLHttpRequest: Inspector should show network activity/XHR in Console (17233) - XMLHttpRequestResources now identify themselves to the inspector which caches the data related to the request since no one else caches it. However this is just the plumbing and the Inspector's UI has not been changed to show XHR resources yet. * page/InspectorController.cpp: Add ability to set XHR data on an InspectorResource. (WebCore::XMLHttpRequestResource::XMLHttpRequestResource): (WebCore::XMLHttpRequestResource::data): (WebCore::XMLHttpRequestResource::encoding): (WebCore::InspectorResource::): Add new type. (WebCore::InspectorResource::~InspectorResource): No longer virtual since we are not using inheritance. (WebCore::InspectorResource::type): Ditto. (WebCore::InspectorResource::setXMLHttpRequestResource): (WebCore::InspectorResource::isXHR): (WebCore::InspectorResource::xmlHttpRequestData): (WebCore::InspectorResource::xmlHttpRequestEncoding): (WebCore::InspectorResource::InspectorResource): (WebCore::addSourceToFrame): (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest): * page/InspectorController.h: Add accessor for setting the XHR data. * page/inspector/Resource.js: Keep the XHR resource types in sync with the Inspector Controller. * xml/XMLHttpRequest.cpp: Give the InspectorController the XHR information to cache. (WebCore::XMLHttpRequest::send): 2008-03-25 Adam Roben Add an UnusedParam.h forwarding header for use by testapi Reviewed by Steve Falkenburg. * ForwardingHeaders/wtf/UnusedParam.h: Added. 2008-03-25 Brady Eidson Reviewed by Adam Roben - View Source is empty when view webarchives * WebCore.base.exp: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setParsedArchiveData): (WebCore::DocumentLoader::parsedArchiveData): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::finishedLoadingDocument): Set the archive's MainResource data as the parsedArchiveData in the DocumentLoader 2008-03-25 Eric Seidel Reviewed by Oliver. Speculative crash fix for Acid3 crasher. I couldn't figure out how to make a test case for this? Suggestions welcome. * css/CSSFontSelector.cpp: null check document->renderer() 2008-03-25 Antti Koivisto Reviewed by Geoff Garen. Some memory cache cleanups: - Separate CachedResource loading from construction, initiate load using a separate load() method. - Add special case function to Cache for loading user stylesheets. This allows removal of a bunch of parameters from several methods and CachedResource constructors. - Construct CachedResources with m_inCache set to false which is quite a bit more logical as they are not yet in the cache at that point. - Pass encoding around as const String& instead of const String*. * css/CSSImageValue.cpp: (WebCore::CSSImageValue::image): * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::updateFromElement): * loader/Cache.cpp: (WebCore::createResource): (WebCore::Cache::requestResource): (WebCore::Cache::requestUserCSSStyleSheet): (WebCore::Cache::remove): * loader/Cache.h: * loader/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): * loader/CachedCSSStyleSheet.h: * loader/CachedFont.cpp: (WebCore::CachedFont::CachedFont): (WebCore::CachedFont::load): (WebCore::CachedFont::ref): * loader/CachedFont.h: * loader/CachedImage.cpp: (WebCore::CachedImage::CachedImage): (WebCore::CachedImage::load): * loader/CachedImage.h: * loader/CachedResource.cpp: (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::~CachedResource): (WebCore::CachedResource::load): * loader/CachedResource.h: (WebCore::CachedResource::load): * loader/CachedScript.cpp: (WebCore::CachedScript::CachedScript): * loader/CachedScript.h: * loader/CachedXBLDocument.cpp: (WebCore::CachedXBLDocument::CachedXBLDocument): * loader/CachedXBLDocument.h: * loader/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet): * loader/CachedXSLStyleSheet.h: * loader/DocLoader.cpp: (WebCore::DocLoader::requestImage): (WebCore::DocLoader::requestFont): (WebCore::DocLoader::requestCSSStyleSheet): (WebCore::DocLoader::requestUserCSSStyleSheet): (WebCore::DocLoader::requestScript): (WebCore::DocLoader::requestXSLStyleSheet): (WebCore::DocLoader::requestXBLDocument): (WebCore::DocLoader::requestResource): (WebCore::DocLoader::preload): * loader/DocLoader.h: 2008-03-25 Darin Adler Reviewed by Anders. - avoid converting UString to String and then later to AtomicString 1% speedup on Acid3 test 26 This is inefficient for the case where there's already an AtomicString. By first creating and destroying a String we waste time. * bindings/scripts/CodeGeneratorJS.pm: Use const UString& for string arguments rather than using String; this uses the object as it's produced from toString rather than creating a new temporary object that might not be of the right type. The type conversion happens at the callsite instead. Also eliminate the ability to use the type AtomicString from IDL. * dom/KeyboardEvent.idl: AtomicString -> DOMString. * dom/MouseEvent.idl: Ditto. * dom/MutationEvent.idl: Ditto. * dom/UIEvent.idl: Ditto. * svg/SVGStyleElement.idl: Ditto. 2008-03-25 Brady Eidson Build fix for non-CoreFoundation platforms * loader/archive/ArchiveFactory.cpp: 2008-03-25 Brady Eidson Reviewed by Darin Remove newly obsolete FrameLoaderClient methods * loader/FrameLoaderClient.h: * svg/graphics/SVGImageEmptyClients.h: (WebCore::SVGEmptyFrameLoaderClient::setMainDocumentError): (WebCore::SVGEmptyFrameLoaderClient::finishedLoading): 2008-03-25 Brady Eidson Reviewed by Darin - Support WebArchives on Windows And pave the way for many future WebArchive bug fixes and enhancements This patch accomplishes two main goals: 1 - Consolidates much of the spread out WebKitMac archive code into one place in WebCore. This allows for cleaner refactoring in the future as well as adding more archive formats with ease. 2 - Hooks up WebArchive support on Windows. Safari-style .webarchive files are nothing more than property lists readable by CoreFoundation. While there are still some outstanding issues, including an NSKeyedArchiver chunk of data for the ResourceResponse for each resource, this patch manually parses through the property list on CoreFoundation platforms and gets many archives loading on Windows My goal for this first cut was zero behavior change. As such, I went for a direct port of the WebKitMac code. There will be opportunities for redesign and refactoring as followups. * WebCore.base.exp: * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setupForReplaceByMIMEType): Ported from WebKitMac, WebDataSource (WebCore::DocumentLoader::addAllArchiveResources): (WebCore::DocumentLoader::addArchiveResource): (WebCore::DocumentLoader::archiveResourceForURL): (WebCore::DocumentLoader::popArchiveForSubframe): (WebCore::DocumentLoader::clearArchiveResources): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: Moved WebFrameLoaderClient and WebFrame code down into their more appropriate FrameLoader home (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::setDefersLoading): (WebCore::FrameLoader::deliverArchivedResourcesAfterDelay): (WebCore::FrameLoader::archiveResourceDeliveryTimerFired): (WebCore::FrameLoader::loadURLIntoChildFrame): (WebCore::FrameLoader::loadArchive): (WebCore::FrameLoader::scheduleArchiveLoad): (WebCore::FrameLoader::stopAllLoaders): (WebCore::FrameLoader::cancelPendingArchiveLoad): (WebCore::FrameLoader::isArchiveLoadPending): (WebCore::FrameLoader::finishedLoadingDocument): * loader/FrameLoader.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::load): * loader/archive/Archive.h: Generic "Archive of web resources" class that is only useful when subclassed. Contains a MainResource, subresources, and Archives for subframes (WebCore::Archive::mainResource): (WebCore::Archive::subresources): (WebCore::Archive::subframeArchives): (WebCore::Archive::setMainResource): (WebCore::Archive::addSubresource): (WebCore::Archive::addSubframeArchive): * loader/archive/ArchiveFactory.cpp: A class that will take raw archive data and the MIMEtype, and create the appropriate Archive class for it. Additionally it handles registering the known MIMEtypes for all known archive formats (WebCore::archiveFactoryCreate): (WebCore::archiveMIMETypes): (WebCore::ArchiveFactory::isArchiveMimeType): (WebCore::ArchiveFactory::create): (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes): * loader/archive/ArchiveFactory.h: * loader/archive/ArchiveResource.cpp: Analog to "WebResource" in WebKitMac. Contains the data and other important attributes of an archived resource (WebCore::ArchiveResource::create): (WebCore::ArchiveResource::ArchiveResource): (WebCore::ArchiveResource::response): * loader/archive/ArchiveResource.h: (WebCore::ArchiveResource::data): (WebCore::ArchiveResource::url): (WebCore::ArchiveResource::mimeType): (WebCore::ArchiveResource::textEncoding): (WebCore::ArchiveResource::frameName): (WebCore::ArchiveResource::ignoreWhenUnarchiving): (WebCore::ArchiveResource::shouldIgnoreWhenUnarchiving): * loader/archive/ArchiveResourceCollection.cpp: Analog of "WebUnarchivingState" in WebKitMac. Contains a hash of all the resources for every frame in an archive, and contains the archives for each subframe needed to load a multi-frame archive (WebCore::ArchiveResourceCollection::ArchiveResourceCollection): (WebCore::ArchiveResourceCollection::addAllResources): (WebCore::ArchiveResourceCollection::addResource): (WebCore::ArchiveResourceCollection::archiveResourceForURL): (WebCore::ArchiveResourceCollection::popSubframeArchive): * loader/archive/ArchiveResourceCollection.h: * loader/archive/cf/LegacyWebArchive.cpp: Subclass of Archive specifically for Webkit's Objective-C based ".webarchive" format. Mostly a collection of static methods involved in parsing and serializing a WebKit-style .webarchive. Is mostly supported for any CF platform. (WebCore::createPropertyListRepresentationFromResource): (WebCore::createPropertyListRep): (WebCore::createResourceResponseFromPropertyListData): (WebCore::createResource): (WebCore::LegacyWebArchive::create): (WebCore::LegacyWebArchive::LegacyWebArchive): (WebCore::LegacyWebArchive::init): (WebCore::LegacyWebArchive::extract): (WebCore::LegacyWebArchive::rawDataRepresentation): (WebCore::createResourceResponseFromMacArchivedData): (WebCore::propertyListDataFromResourceResponse): * loader/archive/cf/LegacyWebArchive.h: * loader/archive/cf/LegacyWebArchiveMac.mm: (WebCore::createResourceResponseFromMacArchivedData): (WebCore::propertyListDataFromResourceResponse): * platform/network/mac/ResourceRequest.h: * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::applyWebArchiveHackForMail): Tweak the resource request for Mac clients when loading WebArchives 2008-03-25 David Hyatt Cut and paste error in the zoom code. A width() should have been a height(). Regression tests caught this. * page/DOMWindow.cpp: (WebCore::DOMWindow::innerHeight): 2008-03-24 Darin Adler - try to fix broken Wx build * platform/wx/TemporaryLinkStubs.cpp: (GraphicsContext::setPlatformShadow): (GraphicsContext::clearPlatformShadow): 2008-03-24 Darin Adler Reviewed by Sam. - use AtomicString more consistently for attribute values 1% speedup on Acid3 test 26 * dom/Element.cpp: (WebCore::Element::setAttribute): Changed value argument to AtomicString. Also fixed call to lower() to only be done if the name isn't already lowercase. Also took out one unneeded condition in a cascade of if statements. (WebCore::Element::createAttribute): Ditto. (WebCore::Element::setAttributeNS): Ditto. * dom/Element.h: Ditto. * dom/StyledElement.cpp: (WebCore::StyledElement::createAttribute): Ditto. * dom/StyledElement.h: Ditto. 2008-03-24 Darin Adler Reviewed by Sam. - get rid of extra level of function call in toJS functions for Node 0.6% speedup on Acid3 test 26 * bindings/js/JSNodeCustom.cpp: (WebCore::toJS): Take a raw pointer, not a PassRefPtr, like other toJS functions. * bindings/scripts/CodeGeneratorJS.pm: Add an inlined toJS for EventTargetNode* to avoid ambiguity that otherwise exists between the toJS for EventTarget* and for Node*. 2008-03-24 Darin Adler Reviewed by Hyatt. - add fast path to isValidName that does not use advanced Unicode functions 2% speedup on Acid3 test 26 * dom/Document.cpp: (WebCore::isValidNameNonASCII): Added. Contains the old isValidName function. (WebCore::isValidNameASCII): Added. Contains a simpler function that returns true for most valid names that are also all ASCII. (WebCore::Document::isValidName): Changed to call both of the above functions. The common case is that isValidNameASCII returns true so isValidNameNonASCII is never called. 2008-03-24 David Hyatt Fix for bug 18052, window properties need to respect zoom factor. Reviewed by Beth * page/DOMWindow.cpp: (WebCore::DOMWindow::innerHeight): (WebCore::DOMWindow::innerWidth): (WebCore::DOMWindow::scrollX): (WebCore::DOMWindow::scrollY): (WebCore::DOMWindow::scrollTo): * page/FrameView.cpp: (WebCore::FrameViewPrivate::reset): (WebCore::FrameView::layout): (WebCore::FrameView::performPostLayoutTasks): 2008-03-24 Sam Weinig Reviewed by Darin Adler. Fix http://bugs.webkit.org/show_bug.cgi?id=18048 The "thisObject" parameter to JSEvaluateScript is not used properly * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate): No need to pass a thisObject since we want the global object to be used. * bridge/jni/jni_jsobject.mm: (JavaJSObject::eval): To avoid any change to this function, don't pass a thisObject to keep the same behavior. 2008-03-24 Brady Eidson Reviewed by Darin's rubberstamp Land a load of empty files for upcoming work to make sure I'm not breaking any platform's build * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * loader/archive: Added. * loader/archive/Archive.h: Added. * loader/archive/ArchiveFactory.cpp: Added. * loader/archive/ArchiveFactory.h: Added. * loader/archive/ArchiveResource.cpp: Added. * loader/archive/ArchiveResource.h: Added. * loader/archive/ArchiveResourceCollection.cpp: Added. * loader/archive/ArchiveResourceCollection.h: Added. * loader/archive/cf: Added. * loader/archive/cf/LegacyWebArchive.cpp: Added. * loader/archive/cf/LegacyWebArchive.h: Added. * loader/archive/cf/LegacyWebArchiveMac.mm: Added. 2008-03-24 David Hyatt Fix for bug 18009. Make sure the IE offset/client/scroll*** extensions respect full page zoom. Reviewed by Beth * dom/Element.cpp: (WebCore::localZoomForRenderer): (WebCore::adjustForLocalZoom): (WebCore::adjustForAbsoluteZoom): (WebCore::Element::offsetLeft): (WebCore::Element::offsetTop): (WebCore::Element::offsetWidth): (WebCore::Element::offsetHeight): (WebCore::Element::clientLeft): (WebCore::Element::clientTop): (WebCore::Element::clientWidth): (WebCore::Element::clientHeight): (WebCore::Element::scrollLeft): (WebCore::Element::scrollTop): (WebCore::Element::setScrollLeft): (WebCore::Element::setScrollTop): (WebCore::Element::scrollWidth): (WebCore::Element::scrollHeight): * rendering/RenderBox.cpp: (WebCore::RenderBox::setStyle): * rendering/RenderObject.cpp: (WebCore::RenderObject::offsetParent): * rendering/RenderObject.h: 2008-03-24 Brady Eidson Reviewed by Darin Some style cleanup and add a logging channel for upcoming work * platform/Logging.cpp: * platform/Logging.h: * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes): (WebCore::initializeSupportedNonImageMimeTypes): 2008-03-24 Dan Bernstein Reviewed by Sam Weinig. - fix CrashTracer: [REGRESSION] 60 crashes in Safari at com.apple.WebCore: WebCore::RenderObject::repaintRectangle + 47 Test: fast/repaint/renderer-destruction-by-invalidateSelection-crash.html * page/FrameView.cpp: (WebCore::FrameViewPrivate::reset): Removed repaintRects code. (WebCore::FrameView::layout): Ditto. (WebCore::FrameView::addRepaintInfo): Removed. * page/FrameView.h: Removed addRepaintInfo(). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Changed to call repaintRectangle instead of FrameView::addRepaintInfo(). * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): Ditto. 2008-03-24 Alp Toker GTK+/soup http backend build fix for breakage introduced in r31141. Fix suggested by Xan. * platform/network/ResourceHandle.h: 2008-03-24 Dan Bernstein Reviewed by Sam Weinig. - fix CSS opacity does not work with GDI text - fix non-opaque CSS colors do not work with GDI text (RGBA, HSLA) - fix GDI text can't be stroked/filled independently - make text-shadow work with GDI text - make -webkit-background-clip: text work with GDI text * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::setShadow): Made this a shared method that updates the state and calls the platform-specific method. (WebCore::GraphicsContext::clearShadow): Ditto. (WebCore::GraphicsContext::getShadow): Added. * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::WindowsBitmap): Added this class that represents a bitmap with a Windows device context that GDI can draw into. * platform/graphics/GraphicsContextPrivate.h: (WebCore::GraphicsContextState::GraphicsContextState): Added the shadow parameters to the graphics state. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform- specific implementation to this. (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform- specific implementation to this. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform- specific implementation to this. (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform- specific implementation to this. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform- specific implementation to this. (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform- specific implementation to this. * platform/graphics/win/FontCGWin.cpp: (WebCore::toCGFloat): Added. Converts a Windows FIXED. (WebCore::createPathForGlyph): Added. Retrieves a glyph's hinted outline from GDI and creates a CGPath containing it. (WebCore::Font::drawGlyphs): Added two code paths in the GDI case. The existing code path, which uses GDI to draw text directly to the graphics context, is used for opaque-colored, non-transformed, non-stroked, non-shadowed text in a GDI-backed graphics context that is not in a transparency layer. An additional code path is used for non-stroked text in all other cases. It uses GDI to draw black text into an all-white Windows bitmap, then uses the green channel as a mask to create a bitmap with the desired fill color and alpha. The bitmap is then drawn into the graphics context, at which time transparency layers, transforms and shadows are handled properly. A third code path is used for stroked text. It constructs a path from hinted glyph outlines retrieved from GDI and strokes (and optionally fills) it. * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::getWindowsContext): Added a mayCreateBitmap parameter. When false, prevents this method from creating a Windows device context if the graphics context does not already have one. (WebCore::GraphicsContext::releaseWindowsContext): Added a mayCreateBitmap parameter to match getWindowsContext(). (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap): (WebCore::GraphicsContext::WindowsBitmap::~WindowsBitmap): (WebCore::GraphicsContext::createWindowsBitmap): Added. (WebCore::GraphicsContext::drawWindowsBitmap): Added. Draws the bitmap as a non-alpha-premultiplied image. 2008-03-24 Kevin McCullough - Fixed Changelog 2008-03-24 Marco Barisione Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=17845 [GTK] combo box menu displayed in the wrong position * platform/gtk/PopupMenuGtk.cpp: (WebCore::PopupMenu::show): Change the popup menu vertical position so that the active item is over the combo box. (WebCore::PopupMenu::menuPositionFunction): use the "push in" style like native GTK+ combo boxes to handle menus that don't fit in the screen. 2008-03-24 Adam Roben * WebCore.vcproj/WebCore.vcproj: Add files from WebCore/page/inspector to the project. 2008-03-24 Alexey Proskuryakov Build fix. * WebCore.xcodeproj/project.pbxproj: Added DOMSVGAltGlyphElement.h and DOMSVGAltGlyphElementInternal.h to Copy Generated Headers phase. 2008-03-24 Eric Seidel Build fix, no review. Fix project paths to be group relative instead of project relative * WebCore.xcodeproj/project.pbxproj: 2008-03-23 Maciej Stachowiak Reviewed by Eric. - fixed "SVGTextElement.getNumberOfChars is broken for altGlyph (affects Acid3 test 79)" http://bugs.webkit.org/show_bug.cgi?id=17062 * svg/SVGAltGlyphElement.cpp: Added. Implementation for new element. (WebCore::SVGAltGlyphElement::SVGAltGlyphElement): (WebCore::SVGAltGlyphElement::~SVGAltGlyphElement): (WebCore::SVGAltGlyphElement::setGlyphRef): (WebCore::SVGAltGlyphElement::glyphRef): (WebCore::SVGAltGlyphElement::setFormat): (WebCore::SVGAltGlyphElement::format): (WebCore::SVGAltGlyphElement::childShouldCreateRenderer): (WebCore::SVGAltGlyphElement::createRenderer): For now, this just renders as a tspan, which is right for everything besides the alternate glyph substitution itself. * svg/SVGAltGlyphElement.h: Added. Header for new element. (WebCore::SVGAltGlyphElement::contextElement): * svg/SVGAltGlyphElement.idl: Added. Interface for new element. * svg/SVGTSpanElement.cpp: (WebCore::SVGTSpanElement::childShouldCreateRenderer): Allow altGlyph to render here. * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::childShouldCreateRenderer): ditto * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::childShouldCreateRenderer): ditto * svg/svgtags.in: Add altGlyph * DerivedSources.make: Add new files * GNUmakefile.am: ditto * WebCore.SVG.exp: Add new ObjC DOM class * WebCore.pro: Add new files * WebCore.vcproj/WebCore.vcproj: ditto * WebCore.xcodeproj/project.pbxproj: ditto * bindings/js/JSSVGElementWrapperFactory.cpp: Handle altGlyph * bindings/objc/DOM.mm: (WebCore::createElementClassMap): ditto * bindings/objc/DOMInternal.h: Include altGlyph header * bindings/objc/DOMSVG.h: Include altGlyph header 2008-03-23 Robert Blaut Reviewed by eseidel. Landed by eseidel. Bug 17685: [~=] attribute selector failing to match empty string Test: fast/css/attribute-selector-empty-value.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): 2008-03-22 Marco Barisione Reviewed by Darin Adler. http://bugs.webkit.org/show_bug.cgi?id=16339 Frame scrollbar positions are not updated on page scroll Widget::geometryChanged() was called instead of ScrollViewScrollbar::geometryChanged() because of a missing const. * platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollViewScrollbar::geometryChanged): add the missing const. 2008-03-22 Rodney Dawes Reviewed by Mark Rowe. Bug 17974: REGRESSION: npfunctions.h should not import npruntime_internal.h Include npapi.h and npruntime.h directly in npfunctions.h. Add npfunctions.h and npapi.h to npruntime_internal.h. Replace includes of npfunctions.h with npruntime_internal.h. * bridge/npruntime_internal.h: * plugins/PluginPackage.h: * plugins/PluginStream.h: * plugins/npapi.cpp: * plugins/npfunctions.h: 2008-03-22 Mark Rowe Qt build fix. * bridge/qt/qt_runtime.cpp: (KJS::Bindings::valueRealType): 2008-03-22 Eric Seidel Reviewed by mjs. Unify handling of NAMESPACE_ERR and fix Acid3 test 25 http://bugs.webkit.org/show_bug.cgi?id=16693 Test: fast/dom/DOMImplementation/createDocumentType-err.html * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocumentType): (WebCore::DOMImplementation::createDocument): * dom/DOMImplementation.idl: * dom/Document.cpp: (WebCore::Document::hasPrefixNamespaceMismatch): (WebCore::Document::createElementNS): (WebCore::Document::parseQualifiedName): (WebCore::Document::createAttributeNS): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::setAttributeNS): * editing/FormatBlockCommand.cpp: (WebCore::FormatBlockCommand::doApply): 2008-03-22 Eric Seidel Reviewed by mjs. Fix createElementNS to throw exceptions for invalid qualified names Fixes Acid3 sub-test 23 http://bugs.webkit.org/show_bug.cgi?id=16833 Tests: fast/dom/Document/createAttributeNS-namespace-err.html fast/dom/Document/createElementNS-namespace-err.html * dom/Document.cpp: (WebCore::Document::createElement): (WebCore::hasNamespaceError): (WebCore::Document::createElementNS): (WebCore::Document::createAttributeNS): * dom/Document.idl: 2008-03-21 Cameron Zwarich Reviewed by Oliver Hunt. Bug 13693: REGRESSION (r13615): Acid2 Test Eyes render improperly after a page refresh Do not create bogus history items for unloaded elements, because they cause fallback content to be ignored on reload. * loader/FrameLoader.cpp: (WebCore::FrameLoader::createHistoryItemTree): 2008-03-21 Dan Bernstein Reviewed by Oliver Hunt. - fix http://bugs.webkit.org/show_bug.cgi?id=17988 REGRESSION (r31114-31132): Crash in InlineBox::isDirty() opening chowhound.com Test: fast/css-generated-content/empty-content-with-float-crash.html * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): Added a null check for the case where the block contains no in-flow elements but still lays out as a line flow, which can happen as a result of empty generated content. 2008-03-21 Sam Weinig Reviewed by Oliver Hunt. Fix toDataURL not implemented for Windows (need mapping of MIME type to UTI) Hard code support for just PNG's on windows, the minimum the spec requires. * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypesForEncoding): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::utiFromMIMEType): (WebCore::ImageBuffer::toDataURL): 2008-03-21 Matt Lilek Not reviewed, Mac build fix. * bindings/objc/WebScriptObject.mm: (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bridge/jni/jni_utility.cpp: (KJS::Bindings::convertValueToJValue): * bridge/objc/objc_runtime.mm: (ObjcFallbackObjectImp::callAsFunction): 2008-03-21 Adam Roben Attempt to fix the Mac build * bindings/objc/DOMUtility.mm: (KJS::createDOMWrapper): 2008-03-21 Adam Roben Rename static info members to s_info This avoids conflicts with custom "info" methods, such as the one that will soon be added to Console. Reviewed by Ada Chan and Sam Weinig. 2008-03-21 David Hyatt Zooming should not let non-zero border width become zero Make sure zoomed values that begin >= 1 are not allowed to fall below 1. Reviewed by adele * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthDouble): * loader/CachedImage.cpp: (WebCore::CachedImage::imageSize): (WebCore::CachedImage::imageRect): 2008-03-21 Kevin McCullough Reviewed by Sam. - XMLHttpRequests do not show response contents, preview images (14313) - XMLHttpRequests should be shown separately and grouped (14315) - XMLHttpRequest: Inspector should show network activity/XHR in Console (17233) - Instrument the InspectorController to cache XHR resrouces since they are not cached by WebCore. The resources will be kept in the same map as all other resources so they will have the exact same lifecycle. * ChangeLog: * page/InspectorController.cpp: (WebCore::InspectorCachedXMLHttpRequestResource::type): (WebCore::InspectorCachedXMLHttpRequestResource::setType): (WebCore::InspectorCachedXMLHttpRequestResource::data): (WebCore::InspectorCachedXMLHttpRequestResource::setData): (WebCore::InspectorCachedXMLHttpRequestResource::encoding): (WebCore::InspectorCachedXMLHttpRequestResource::setEncoding): (WebCore::InspectorCachedXMLHttpRequestResource::create): (WebCore::InspectorCachedXMLHttpRequestResource::InspectorCachedXMLHttpRequestResource): 2008-03-21 Rodney Dawes Reviewed by Holger. http://bugs.webkit.org/show_bug.cgi?id=17981 Remove WebCore/ForwardingHeaders from cppflags as it is not needed, and causes build problems with GTK+. * GNUmakefile.am: 2008-03-21 Dan Bernstein Reviewed by Adele Peterson. - fix http://bugs.webkit.org/show_bug.cgi?id=17966 REGRESSION (r31114-r31132): Clearing via br behaves unpredictably Test: fast/block/float/br-with-clear.html * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): Fixed the logic for the very special case of an all-lines-clean block that ends with a float- clearing
by looking for the
at the end of the line rather than at its beginning. 2008-03-21 Adam Roben Don't allow any newly-scheduled plugin requests to be serviced when JS is paused This is a followup to r31199. Reviewed by Tim Hatcher. * plugins/PluginView.cpp: (WebCore::PluginView::requestTimerFired): Added an assertion that JS is not paused. (WebCore::PluginView::scheduleRequest): Don't start the request timer if JS is paused. This is the bug fix. (WebCore::PluginView::setJavaScriptPaused): Replaced the use of m_requestTimerWasActive with a check to see if we have any pending requests. m_requestTimerWasActive would not be accurate if a new request had been scheduled while JS was paused. (WebCore::PluginView::PluginView): Removed initialization of m_requestTimerWasActive. * plugins/PluginView.h: Removed m_requestTimerWasActive. 2008-03-20 Dan Bernstein Reviewed by Anders Carlsson. - fix an assertion failure due to a line being marked dirty during computeVerticalPositionsForLine() due to temporary box destruction Test: fast/inline/clean-after-removing-temp-boxes.html * rendering/RenderText.cpp: (WebCore::RenderText::setTextWithOffset): Added code to dirty lines when this method is called on an empty text node, which has no line boxes. * rendering/bidi.cpp: (WebCore::RenderBlock::computeVerticalPositionsForLine): Mark the line clean in the end. 2008-03-20 Anders Carlsson Reviewed by Maciej. Make some member variables private. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::ResourceLoader): * loader/ResourceLoader.h: 2008-03-20 Anders Carlsson Reviewed by Maciej. Get rid of m_originalURL in ResourceLoader. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::load): Don't store m_originalURL. * loader/ResourceLoader.h: * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): Use the url of the current request instead of the original URL. 2008-03-20 Anders Carlsson Reviewed by Maciej. Small loader cleanups. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::willSendRequest): No need to call setRequest here, ResourceLoader::willSendRequest takes care of that. Also, there is no need to check that newRequest is null here, because we assert earlier that it is not. * loader/ResourceLoader.h: Get rid of setRequest, it is no longer needed. 2008-03-20 Anders Carlsson Get rid of a couple of unnecessary class declarations. * loader/SubresourceLoader.h: 2008-03-20 David Hyatt Add a new value to background-clip, "text", that allows backgrounds to be clipped to foreground text (and associated text decorations like shadows and underlines). Reviewed by Beth * css/CSSParser.cpp: (WebCore::CSSParser::parseBackgroundProperty): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EBackgroundBox): * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::clipToImageBuffer): * platform/graphics/GraphicsContext.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::clipToImageBuffer): * rendering/InlineBox.cpp: (WebCore::InlineBox::paint): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBackgrounds): (WebCore::InlineFlowBox::paintBackground): (WebCore::InlineFlowBox::paintBoxDecorations): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumns): (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::paintFloats): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paintRootBoxDecorations): (WebCore::RenderBox::paintBoxDecorations): (WebCore::RenderBox::paintBackgrounds): (WebCore::RenderBox::paintBackground): (WebCore::RenderBox::paintBackgroundExtended): * rendering/RenderBox.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): * rendering/RenderFlow.cpp: (WebCore::RenderFlow::paintLines): * rendering/RenderObject.h: (WebCore::): (WebCore::RenderObject::paintBackgroundExtended): * rendering/RenderStyle.h: (WebCore::): * rendering/RenderTable.cpp: (WebCore::RenderTable::paintBoxDecorations): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBackgroundsBehindCell): 2008-03-20 Adam Roben Allow pausing/blocking of JS execution by plugins Part of Bug 17133: Should support pausing JavaScript execution without hanging the process This patch doesn't affect Mac, which doesn't use the shared PluginView code. Note that this patch doesn't prevent plugins from executing JS via an NPObject they've already gotten hold of. It just blocks obtaining new NPObjects and pauses any requests to evaluate javascript: URIs. This is probably good enough for now because most plugins seem to always obtain the Window object each time they want to execute JS. Reviewed by Tim Hatcher. * plugins/PluginView.cpp: (WebCore::PluginView::getValue): Return an error if JS is paused. (WebCore::PluginView::setJavaScriptPaused): Stop the request timer if we're pausing, and resume it if we're unpausing. (WebCore::PluginView::PluginView): Initialize new members. * plugins/PluginView.h: 2008-03-20 Adam Roben Allow pausing of callOnMainThread callbacks Part of Bug 17133: Should support pausing JavaScript execution without hanging the process Reviewed by Tim Hatcher. * platform/MainThread.cpp: (WebCore::dispatchFunctionsFromMainThread): If callbacks are paused, don't dispatch the functions. (WebCore::setMainThreadCallbacksPaused): Added. If we're being unpaused, call scheduleDispatchFunctionsOnMainThread so that any queued callbacks will get dispatched in the near future. * platform/MainThread.h: 2008-03-20 Adam Roben Allow blocking of JS event handlers/javascript: URIs per-Frame Part of Bug 17133: Should support pausing JavaScript execution without hanging the process Two new methods are added to KJSProxy: setPaused and isPaused. When setPaused(true) is called, JS event handlers are blocked and javascript: URIs will not be evaluated. Reviewed by Tim Hatcher. * bindings/js/kjs_events.cpp: (WebCore::JSAbstractEventListener::handleEvent): - Removed some old KJS_DEBUGGER code - Don't run the handler if the KJSProxy is paused. * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::KJSProxy): Initialize new member. * bindings/js/kjs_proxy.h: Added new methods. * loader/FrameLoader.cpp: (WebCore::FrameLoader::executeScript): Don't execute the script if the KJSProxy is paused. 2008-03-20 Jon Honeycutt Reviewed by Anders. Fix Windows warning / leak: warning C4150: deletion of pointer to incomplete type 'WebCore::PluginRequest'; no destructor called * plugins/PluginView.cpp: Move PluginRequest class to PluginView.h so Windows PluginView destructor can use WTF::deleteAllValues to clean up m_requests. * plugins/PluginView.h: (WebCore::PluginRequest::PluginRequest): (WebCore::PluginRequest::frameLoadRequest): (WebCore::PluginRequest::notifyData): (WebCore::PluginRequest::sendNotification): (WebCore::PluginRequest::shouldAllowPopups): 2008-03-20 Mark Rowe Reviewed by Sam Weinig. Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit. This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the command-line. * Configurations/WebCore.xcconfig: 2008-03-20 Jon Honeycutt Reviewed by Anders. REGRESSION: http/tests/plugins/cross-frame-object-access.html hangs Windows Layout Tests r30897 changed the way we conditionalize this feature. * plugins/PluginView.cpp: (WebCore::PluginView::getValue): Test ENABLE(NETSCAPE_PLUGIN_API) instead of USE(NPOBJECT). (WebCore::PluginView::bindingInstance): Same. 2008-03-20 Adam Roben Highlight nodes when you hover over them in the Console Part of Bug 16532: Inspector should highlight nodes in page when hovering over nodes in Inspector's interface Reviewed by Tim Hatcher. * page/inspector/ConsolePanel.js: (WebInspector.ConsolePanel._formatnode): Add mouseover/mouseout event listeners to highlight the node and clear the highlight. 2008-03-20 Adam Roben Highlight nodes in the page when you hover over their DOM breadcrumbs Part of Bug 16532: Inspector should highlight nodes in page when hovering over nodes in Inspector's interface Reviewed by Tim Hatcher. * page/inspector/DocumentPanel.js: (WebInspector.DocumentPanel): Add an mouseout event listener to the breadcrumbs element to clear the highlighted node. (WebInspector.DocumentPanel.updateBreadcrumbs): Change the mouseover event listener to highlight the node represented by the hovered breadcrumb. 2008-03-20 Adam Roben Highlight nodes in the page when you hover over them in the DOM tree Part of Bug 16532: Inspector should highlight nodes in page when hovering over nodes in Inspector's interface The inspected node is no longer highlighted (unless, of course, you hover over it). Reviewed by Tim Hatcher. * page/inspector/DocumentPanel.js: (WebInspector.DocumentPanel): - Don't highlight the focused node when the DOM tree is shown - Added mousemove/mouseout event listeners to set/clear the highlighted node. These are added to the root of the DOM tree instead of to each individual list item to avoid flashing as the mouse moves between nodes. (WebInspector.DocumentPanel.set focusedDOMNode): Don't highlight the focused node. (WebInspector.DocumentPanel._onmousemove): Highlight the node under the mouse. 2008-03-20 Adam Roben Show nodes' content/padding/border/margin boxes in the node highlight Part of Bug 17221: Node highlight should show node metrics Outstanding issues: 1) We don't show padding/border/margins for inlines 2) We don't show any numeric metrics, we just draw the boxes 3) We'll probably want to tweak the look of the highlight some, at least to make the boxes better distinguishable Reviewed by Tim Hatcher. * page/InspectorController.cpp: (WebCore::drawOutlinedRect): Added. Just draws a single rect. (WebCore::drawHighlightForBoxes): Added. Takes the rects we calculated for the node and draws the highlight. (WebCore::InspectorController::drawNodeHighlight): Calculates the content/padding/border/margin boxes for blocks and passes them off to drawHighlightForBoxes. The behavior for inlines is for now unchanged. 2008-03-20 Adam Roben Fix RenderContainer's override of addLineBoxRects to match RenderObject's RenderContainer::addLineBoxRects was never getting called because its parameters didn't match those of RenderObject::addLineBoxRects. Reviewed by Mitz Pettel. No test possible. * rendering/RenderContainer.cpp: Added an optional bool useSelectionHeight parameter to match RenderObject's method. * rendering/RenderContainer.h: Ditto. 2008-03-20 Marco Barisione Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=17946 [GTK] Widgets are not clipped * platform/gtk/RenderThemeGtk.cpp: (WebCore::paintMozWidget): pass the clipping rectangle to moz_gtk_widget_paint() instead of just the widget rectangle. 2008-03-20 David Hyatt Fix for http://bugs.webkit.org/show_bug.cgi?id=9279 Make :hover work with the adjacent sibling selector. This fix makes all forms of dynamic changes (class name changes, :hover, :focus, etc.) work properly when used with the + selector. Reviewed by weinig Added fast/css/dynamic-sibling-selector.html * dom/Element.cpp: (WebCore::Element::recalcStyle): 2008-03-20 Aaron Golden Reviewed by Darin and David Kilzer. Addresses , which caused certain marquees to not display. Test: fast/html/marquee-scroll.html * html/HTMLMarqueeElement.cpp: (WebCore::HTMLMarqueeElement::parseMappedAttribute): 2008-03-20 Adam Roben Export InspectorController::drawNodeHighlight Reviewed by Tim Hatcher. * WebCore.base.exp: Also sorted this file. 2008-03-19 Stephanie Lewis Rubber-stamped by Anders. Fix Windows Build * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::createCFData): 2008-03-19 Stephanie Lewis Rubber-stamped by Anders. Fix Windows Build * platform/SharedBuffer.h: 2008-03-19 Justin Garcia Reviewed by Oliver. Copying content with CSS property values that are percentages can cause fidelity issues Elements with height: x%; overflow: visible; overlap what's below them when they are copied from a document in quirksmode and pasted into to one in standards mode. This fix uses the computed the value for a property if its value is a percentage. * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::addParsedProperty): Added so that we don't have to use setProperty from appendStartMarkup. We already have a parsed property value, so we shouldn't use setProperty, since it takes in a String. If we did, we would have to call CSSValue::cssText() for a String only to re-parse it in setProperty. This wasn't extremely important now, but it will be as we compute more properties to fix the rest of the copy/paste fidelity bugs. * css/CSSMutableStyleDeclaration.h: * editing/markup.cpp: (WebCore::appendStartMarkup): Compute values for properties that have percentage values. We could perhaps narrow this special case to only include properties that are effected by quirksmode. 2008-03-19 Sam Weinig Reviewed by Anders Carlsson. Fix for Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file Make the activeExecStates stack per JSGlobalObject instead of static to ensure thread safety. * bindings/objc/WebScriptObject.mm: (+[WebScriptObject throwException:]): Change to throw an exception on the current GlobalObject instead of the top of the static activeExecStates stack. (-[WebScriptObject setException:]): Change to use the top of the rootObjects GlobalObject instead of the top of the static activeExecStates stack. * bridge/c/c_instance.cpp: * bridge/c/c_instance.h: * bridge/jni/jni_instance.cpp: (JavaInstance::virtualBegin): (JavaInstance::virtualEnd): * bridge/jni/jni_instance.h: * bridge/objc/objc_instance.h: * bridge/objc/objc_instance.mm: (ObjcInstance::~ObjcInstance): (ObjcInstance::virtualBegin): (ObjcInstance::virtualEnd): * bridge/runtime.cpp: (KJS::Bindings::Instance::setDidExecuteFunction): (KJS::Bindings::Instance::didExecuteFunction): (KJS::Bindings::Instance::setCurrentGlobalObject): Added. (KJS::Bindings::Instance::currentGlobalObject): Added. (KJS::Bindings::Instance::begin): (KJS::Bindings::Instance::end): * bridge/runtime.h: (KJS::Bindings::Instance::virtualBegin): Renamed from begin(). (KJS::Bindings::Instance::virtualEnd): Renamed from end(). We now store the currently active globalObject everytime we cross the runtime object boundary. To do this, we take advantage of the existing begin/end methods that are called when crossing this boundary, making begin set the current globalObject and then call the old begin, now called virtualBegin. 2008-03-19 Brady Eidson Reviewed by Anders Change SharedBuffer so the wrapping platform data aspect can be shared with all CoreFoundation platforms (Mac and Windows instead of just Mac) * WebCore.vcproj/WebCore.vcproj: Add SharedBufferCF.cpp * WebCore.xcodeproj/project.pbxproj: Ditto * platform/SharedBuffer.cpp: * platform/SharedBuffer.h: Change the private c'tor from NSData to CFDataRef, other PLATFORM tweaks * platform/cf/SharedBufferCF.cpp: Added. (WebCore::SharedBuffer::SharedBuffer): (WebCore::SharedBuffer::createCFData): Non-Mac version of createCFData (WebCore::SharedBuffer::hasPlatformData): (WebCore::SharedBuffer::platformData): (WebCore::SharedBuffer::platformDataSize): (WebCore::SharedBuffer::maybeTransferPlatformData): (WebCore::SharedBuffer::clearPlatformData): * platform/mac/SharedBufferMac.mm: (WebCore::SharedBuffer::wrapNSData): Use the CFDataRef constructor via toll-free bridging (WebCore::SharedBuffer::createCFData): Mac-specific version of createCFData 2008-03-19 Oliver Hunt Reviewed by Antti. Bug 17954: Canvas arc() with radius of 0 throws exception http://bugs.webkit.org/show_bug.cgi?id=17954 Simple fix -- use >= instead of > when validating the radius. * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::arc): 2008-03-19 Justin Garcia Reviewed by Oliver. Acid3: Assertion failure in VisiblePosition::previous when clicking on results (17004) The position inside an empty inline-block was a candidate, but upstream and downstream would move across it without stopping. This confused canonicalPosition, since no more than two candidates should have the same upstream/downstream (be visually equivalent). Code was added intentionally in isCandidate to make VisiblePositions inside empty inline-blocks, so we need to make upstream/downstream understand that. * dom/Position.cpp: (WebCore::endsOfNodeAreVisuallyDistinctPositions): upstream and downstream used to only stop when entering or leaving a non-inline element (referred to as a "block"). We must also avoid entering or leaving an empty inline-block. This will allow a VisiblePosition there, to match up with what the code in isCandidate intended. (WebCore::enclosingVisualBoundary): Removed enclosingBlock and replaced it with this. (WebCore::Position::upstream): Added better comments, called the new functions. (WebCore::Position::downstream): Ditto. * dom/Position.h: 2008-03-19 Dan Bernstein Rubber-stamped by John Sullivan. - change CSS property and value keyword constants from all-caps with underscores to intra-caps. * css/makeprop.pl: * css/makevalues.pl: * All files using the constants 2008-03-19 Adam Roben Make clicking anywhere in a row in the DOM tree select that row's node We now have mousedown and dblclick event listeners on the root of the tree that forward the event to the node on the row the mouse is over. Reviewed by Tim Hatcher. * page/inspector/DocumentPanel.js: (WebInspector.DocumentPanel): Added a dblclick and mousedown event listeners to the root of the tree. (WebInspector.DocumentPanel._treeElementFromEvent): Added. Finds the tree element for the row underneath the mouse. (WebInspector.DocumentPanel._ondblclick): Added. Sends the dblclick event on to the tree element in the current row. (WebInspector.DocumentPanel._onmousedown): Added. Selects the tree element in the current row. * page/inspector/treeoutline.js: (TreeOutline.treeElementFromPoint): Added. (TreeElement.treeElementSelected): Changed to call TreeElement.isEventWithinDisclosureTriangle, and added an early return. (TreeElement.treeElementToggled): Ditto. (TreeElement.isEventWithinDisclosureTriangle): Added. * page/inspector/utilities.js: (Node.enclosingNodeOrSelfWithNodeNameInArray): Added. (Node.enclosingNodeOrSelfWithNodeName): Now just calls enclosingNodeOrSelfWithNodeNameInArray. (Elemnt.get totalOffsetLeft): Added. (Elemnt.get totalOffsetTop): Added. 2008-03-19 Dan Bernstein Reviewed by Sam Weinig. - fix assertion failure in RenderBlock::determineStartPosition() at http://www.wired.com/techbiz/it/magazine/16-04/bz_apple Test: fast/repaint/line-flow-with-floats-10.html * rendering/bidi.cpp: (WebCore::RenderBlock::determineStartPosition): Removed bogus assertion. If the float's top margin has changed and it has not been repositioned yet, we do not have its new y position. 2008-03-19 David Hyatt New implementation of full page zoom. Because of how much doesn't transform when zooming, and because of the need to obey viewport constraints, I decided to take a completely different approach. Now CSS lengths and intrinsic sizes are simply adjusted by the zoom factor. This approach works much better and avoids pixel cracks more than the old approach. In addition widgets "just work", namely plugins zoom and scrollbars do not. This patch also implements the IE zoom CSS property. This property allows fine-grained control over zooming at the element level. It takes values of normal | | to match WinIE. In addition, in the vein of text-size-adjust for text zooming, I have extended the zoom property with an extra value, reset. The reset keyword can be used to prevent a section of the page from scaling at all when a zoom is applied. Reviewed by olliej * css/CSSComputedStyleDeclaration.cpp: (WebCore::): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Support the new 'zoom' property for getComputedStyle. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Code that parses the 'zoom' property. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthInt): (WebCore::CSSPrimitiveValue::computeLengthIntForLength): (WebCore::CSSPrimitiveValue::computeLengthShort): (WebCore::CSSPrimitiveValue::computeLengthFloat): (WebCore::CSSPrimitiveValue::computeLengthDouble): * css/CSSPrimitiveValue.h: Extend all of the computeLength methods to take a multiplier so that lengths can be adjusted by the zoom factor. * css/CSSPropertyNames.in: Add the new zoom property to the list of properties we understand. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyDeclarations): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapBackgroundSize): (WebCore::CSSStyleSelector::mapBackgroundXPosition): (WebCore::CSSStyleSelector::mapBackgroundYPosition): (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::setStyle): Pass in the zoom factor when computing all lengths in CSS. * css/CSSValueKeywords.in: Add support for the 'reset' keyword of the zoom property. * dom/Document.cpp: (WebCore::Document::recalcStyle): Set the 'zoom' CSS property on the RenderView. This is how we implement full page zoom. * html/CanvasRenderingContext2D.cpp: (WebCore::size): Make sure the back end canvas size ignores zooming when rendering images. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::width): (WebCore::HTMLImageElement::height): (WebCore::HTMLImageElement::naturalWidth): (WebCore::HTMLImageElement::naturalHeight): Use the unzoomed width/height if we have no style information in HTMLImageElement.cpp. * loader/CachedImage.cpp: (WebCore::CachedImage::ref): (WebCore::CachedImage::imageSize): (WebCore::CachedImage::imageRect): * loader/CachedImage.h: (WebCore::CachedImage::canRender): Force access to the CachedImage metrics to take a multiplier so that people have to think about the zoom factor. The "intrinsic size" of the image then takes that into account. * loader/ImageDocument.cpp: (WebCore::ImageTokenizer::finish): (WebCore::ImageDocument::scale): (WebCore::ImageDocument::resizeImageToFit): (WebCore::ImageDocument::imageChanged): (WebCore::ImageDocument::restoreImageSize): (WebCore::ImageDocument::imageFitsInWindow): Make sure image documents respect the zoom. * page/AnimationController.cpp: (WebCore::ImplicitAnimation::animate): Make the 'zoom' CSS property work with CSS transitions. * page/Frame.h: (WebCore::Frame::pageZoomFactor): (WebCore::Frame::textZoomFactor): Add accessors for obtaining the pageZoom vs. textZoom. * page/FrameView.cpp: (WebCore::FrameView::adjustViewSize): Remove the old zoom implementation that used transforms. * page/mac/WebCoreAXObject.mm: (-[WebCoreAXObject accessibilityIsIgnored]): Pass in the zoom factor. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBackground): (WebCore::InlineFlowBox::paintBoxDecorations): Pass in the zoom factor when testing for size. * rendering/RenderBox.cpp: (WebCore::RenderBox::calculateBackgroundSize): (WebCore::RenderBox::imageChanged): (WebCore::RenderBox::paintBackgroundExtended): (WebCore::RenderBox::calcHeight): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layout): * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::canvasSizeChanged): * rendering/RenderHTMLCanvas.h: (WebCore::RenderHTMLCanvas::renderName): (WebCore::RenderHTMLCanvas::intrinsicSizeChanged): * rendering/RenderImage.cpp: (WebCore::RenderImage::setImageSizeForAltText): (WebCore::RenderImage::imageChanged): (WebCore::RenderImage::calcReplacedWidth): (WebCore::RenderImage::calcReplacedHeight): * rendering/RenderImage.h: (WebCore::RenderImage::intrinsicSizeChanged): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::layout): (WebCore::RenderListMarker::imageChanged): (WebCore::RenderListMarker::getRelativeMarkerRect): * rendering/RenderObject.cpp: (WebCore::RenderObject::mustRepaintBackgroundOrBorder): (WebCore::RenderObject::paintBorder): Pass in the zoom factor when testing for size. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::RenderReplaced): (WebCore::RenderReplaced::setStyle): (WebCore::RenderReplaced::intrinsicSizeChanged): * rendering/RenderReplaced.h: Added a new call when the zoom factor changes, intrinsicSizeChanged(). Replaced element subclasses respond to this via overrides. * rendering/RenderStyle.cpp: (WebCore::StyleVisualData::StyleVisualData): (WebCore::StyleInheritedData::StyleInheritedData): (WebCore::StyleInheritedData::operator==): (WebCore::RenderStyle::diff): * rendering/RenderStyle.h: (WebCore::StyleVisualData::operator==): (WebCore::RenderStyle::zoom): (WebCore::RenderStyle::zoomInEffect): (WebCore::RenderStyle::setZoom): (WebCore::RenderStyle::setZoomInEffect): (WebCore::RenderStyle::initialZoom): Support for 'zoom' in the RenderStyle. "zoomInEffect" represents the computed zoom taking into account all the zooms specified on ancestors. * rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::imageChanged): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::imageChanged): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::imageChanged): * rendering/RenderVideo.h: (WebCore::RenderVideo::intrinsicSizeChanged): Pass in the zoom factor. * rendering/RenderView.cpp: (WebCore::RenderView::calcHeight): (WebCore::RenderView::calcWidth): (WebCore::RenderView::layout): (WebCore::RenderView::viewHeight): (WebCore::RenderView::viewWidth): * rendering/RenderView.h: (WebCore::RenderView::zoomFactor): Back out the old implementation. 2008-03-19 Adam Roben Rename firstParent* methods to enclosingNode* Rubberstamped by John Sullivan. * page/inspector/ConsolePanel.js: * page/inspector/DocumentPanel.js: * page/inspector/NetworkPanel.js: * page/inspector/inspector.js: * page/inspector/utilities.js: 2008-03-19 Dan Bernstein Reviewed by John Sullivan. - fix CrashTracer: [USER] 33 crashes in Safari at com.apple.WebCore: WebCore::FrameView::layout + 431 Test: fast/dynamic/subtree-parent-static-y.html * rendering/RenderObject.cpp: (WebCore::RenderObject::markContainingBlocksForLayout): Avoid calling this method on the parent if the parent is the new layout subtree root, which would result in marking all the way to the top, when it should actually do nothing. 2008-03-19 Mark Rowe Reviewed by Oliver Hunt. Use WTF::Unicode abstraction rather than using ICU functions directly. * html/PreloadScanner.cpp: (WebCore::PreloadScanner::tokenize): 2008-03-19 Mark Rowe Attempt to fix the Gtk build. * platform/network/curl/ResourceHandleCurl.cpp: (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate): 2008-03-18 Darin Adler Reviewed by Maciej. - Speed up JavaScript built-in properties by changing the hash table to take advantage of the identifier objects 5% speedup for Acid3 test 26 * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::getOwnPropertySlot): Update for change to HashTable. (WebCore::JSDOMWindowBase::put): Ditto. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::customGetOwnPropertySlot): Ditto. * bindings/js/JSHTMLInputElementBase.cpp: (WebCore::JSHTMLInputElementBase::getOwnPropertySlot): Ditto. * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::customGetOwnPropertySlot): Ditto. * bindings/js/JSLocation.cpp: (WebCore::JSLocation::customGetOwnPropertySlot): Ditto. (WebCore::JSLocation::put): Ditto. * bindings/js/kjs_binding.cpp: (WebCore::nonCachingStaticFunctionGetter): Ditto. * bindings/scripts/CodeGeneratorJS.pm: Same changes as in the create_hash_table script. 2008-03-18 Matt Lilek Fix the Gtk build for real this time. * platform/network/curl/AuthenticationChallenge.h: 2008-03-18 Sam Weinig Reviewed by Anders Carlsson. Fix for http://bugs.webkit.org/show_bug.cgi?id=17057 REGRESSION: Frequent random crashes in WebCore::JSNodeList::indexGetter Tests: fast/dom/NodeList/5725058-crash-scenario-1.html fast/dom/NodeList/5725058-crash-scenario-2.html fast/dom/NodeList/5725058-crash-scenario-3.html * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::ChildNodeList): * dom/ChildNodeList.h: Remove rootNodeChildrenChanged() method and fix the constructor to not pass in a needsNotifications argument to DynamicNodeList, as it no longer takes one. * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): Don't pass the needsNotifications argument to DynamicNodeList. * dom/ContainerNode.cpp: (WebCore::ContainerNode::childrenChanged): Rename call to hasNodeLists() to hasNodeListCaches(). * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): Zero out the m_document variable to signify to destructors down the destruction chain that this is a Document type node being destructed, and thus, accessing document() is prohibited. * dom/Document.h: (WebCore::Document::addNodeListCache): Renamed from addNodeList. (WebCore::Document::removeNodeListCache): Renamed from removeNodeList, adds assertion. (WebCore::Document::hasNodeListCaches): Renamed from hasNodeListCaches. Rename m_numNodeLists to m_numNodeListCaches. * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeList::DynamicNodeList): (WebCore::DynamicNodeList::~DynamicNodeList): (WebCore::DynamicNodeList::invalidateCache): (WebCore::DynamicNodeList::Caches::Caches): * dom/DynamicNodeList.h: (WebCore::DynamicNodeList::hasOwnCaches): Remove the needsNotifications concept from DynamicNodeList, instead, manually invalidate the cache for lists that own their own cache. * dom/NameNodeList.cpp: (WebCore::NameNodeList::NameNodeList): * dom/NameNodeList.h: Remove rootNodeAttributeChanged() method and fix the constructor to not pass in a needsNotifications argument to DynamicNodeList, as it no longer takes one. * dom/Node.cpp: (WebCore::Node::~Node): Decrement the document's nodeListCache count if we had a NodeListsNodeData cache and this is not the Document being destructor, as tagged by a null m_document. (WebCore::Node::childNodes): Increment the document's nodeListCache count if we need create the NodeListsNodeData. (WebCore::Node::registerDynamicNodeList): Increment the document's nodeListCache count if we need create the NodeListsNodeData. Change to invalidate all the caches, instead of just the ChildNodeList, if document has had no NodeListCaches. (WebCore::Node::unregisterDynamicNodeList): Change to remove the cache from the m_listsWithCaches set if it is owned by the NodeList and clear the m_nodeLists if it is empty. (WebCore::Node::notifyLocalNodeListsAttributeChanged): Move logic to NodeListsNodeData::invalidateAttributeCaches and clear the cache pointer if it is empty. (WebCore::Node::notifyLocalNodeListsChildrenChanged): Move logic to NodeListsNodeData::invalidateCaches and clear the cache pointer if it is empty. (WebCore::Node::notifyNodeListsChildrenChanged): Cleanup. (WebCore::Node::getElementsByName): Increment the document's nodeListCache count if we need create the NodeListsNodeData. (WebCore::Node::getElementsByClassName): Increment the document's nodeListCache count if we need create the NodeListsNodeData. (WebCore::NodeListsNodeData::invalidateCaches): Added. (WebCore::NodeListsNodeData::invalidateAttributeCaches): Added. (WebCore::NodeListsNodeData::isEmpty): Added. * dom/TagNodeList.cpp: (WebCore::TagNodeList::TagNodeList): Don't pass the needsNotifications argument to DynamicNodeList. 2008-03-18 Matt Lilek Not reviewed, build fix. * platform/network/curl/AuthenticationChallenge.h: 2008-03-18 Brent Fulgham Reviewed by Adam Roben. Provide some stub implementations for things that WebKit uses for performing authentication/challenge activities. This is in support of http://bugs.webkit.org/show_bug.cgi?id=17837 * platform/network/ResourceHandle.h: * platform/network/curl/AuthenticationChallenge.h: (WebCore::AuthenticationChallenge::AuthenticationChallenge): (WebCore::AuthenticationChallenge::sourceHandle): 2008-03-18 Eric Seidel Reviewed by Oliver. Fix SVGImage crash seen once, and obvious via code inspection. I was not able to find a test case for this. * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::setContainerSize): (WebCore::SVGImage::usesContainerSize): (WebCore::SVGImage::hasRelativeWidth): (WebCore::SVGImage::hasRelativeHeight): 2008-03-18 Rodney Dawes Fix Qt build after r31123. Add PluginView methods to TemporaryLinkStubs. * platform/qt/TemporaryLinkStubs.cpp: 2008-03-18 Sam Weinig Reviewed by Darin Adler. - Speed up JavaScript prototype and constructor object creation using a static Identifier in the self() methods to avoid the cost of creating one from a c-string each time. 5% speedup for Acid3 test 26 * bindings/scripts/CodeGeneratorJS.pm: 2008-03-18 Antti Koivisto Reviewed by Mark Rowe. Enable preloading for other platforms besides Mac. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: * html/HTMLTokenizer.cpp: * html/HTMLTokenizer.h: * html/PreloadScanner.cpp: (WebCore::PreloadScanner::tokenize): 2008-03-18 Dan Bernstein Reviewed by Adele Peterson. - fix REGRESSION (r31116): Assertion failure (floatIndex < floats.size()) in RenderBlock::determineStartPosition() at digg.com Test: fast/dynamic/floating-to-positioned.html * rendering/RenderObject.cpp: (WebCore::RenderObject::setStyle): Added code to remove a float from object lists if its position property changes to something other than static, since then it ceases to be a float. 2008-03-18 Adam Roben Windows build fix after r31123 * plugins/win/PluginViewWin.cpp: Add back MozillaUserAgent. 2008-03-18 Dan Bernstein Reviewed by Darin Adler. - eliminate RenderFlow::m_clear * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Removed code to set m_clear. (WebCore::RenderBlock::newLine): Added a 'clear' parameter. * rendering/RenderBlock.h: * rendering/RenderFlow.h: (WebCore::RenderFlow::RenderFlow): Removed initialization of m_clear. * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): Added a local 'clear' variable, passing a pointer to it to findNextLineBreak() and its value to newLine(). (WebCore::RenderBlock::findNextLineBreak): Added a 'clear' parameter, which this method adjusts when it encounters a
. 2008-03-18 Simon Hausmann Reviewed by Holger. Fix the Qt build and clean up the invoke mechanism for dispatching functions in the main thread by using QMetaObject::invokeMethod instead of posting a null event. * platform/qt/MainThreadQt.cpp: 2008-03-18 Rodney Dawes Fix Mac build from commit of r31123. Add a typedef for NSView* to PlatformWidget, remove duplicate PluginMessageThrottlerWin definition. * platform/Widget.h: * WebCore.vcproj/WebCore.vcproj: 2008-03-18 Rodney Dawes Reviewed by Jon Honeycutt. Add PluginView.cpp and npapi.cpp to build files. Copy win/PluginViewWin.cpp to PluginView.cpp for shared code. Split Windows specific code out of PluginView.cpp. Add #if USE(NPOBJECT) around dependant code. Use npruntime_internal.h instead of npapi.h. Add PlatformWidget typedef to Widget.h. Update WidgetGtk.cpp for the PlatformWidget usage. Add needed methods to TemporaryLinkStubs for GTK+ port. * GNUmakefile.am: * WebCore.pro: * WebCoreSources.bkl: * WebCore.vcproj/WebCore.vcproj: * plugins/win/PluginViewWin.cpp: * plugins/PluginView.cpp: * plugins/PluginView.h: * plugins/npapi.cpp: * platform/Widget.h: * platform/gtk/WidgetGtk.cpp: * platform/gtk/TemporaryLinkStubs.cpp: 2008-03-17 Darin Adler Reviewed by Maciej. - speed up document property fetching (eliminate the AtomicString objects made during document property lookup) 3% speedup for Acid3 test 26 * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::getOwnPropertySlot): Use AtomicString::find to locate the AtomicString, only if already present. Also call the new faster versions of the hasNamedItem and hasElementWithId functions that don't ref/deref the AtomicStringImpl, get inlined, etc. * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::canGetItemsForName): Ditto. (WebCore::writeHelper): Use a Vector instead of a String to build up the string to avoid the bad performance of string append. * dom/Document.cpp: Tweaked code and comments a bit. Nothing substantive. * dom/Document.h: Added new hasElementWithId function that's faster than getElementById because it doesn't ref/deref the AtomicStringImpl*, gets inlined, doesn't have to handle the 0 case, and doesn't try to return the element pointer (just a boolean). * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseMappedAttribute): Use AtomicString consistently. Also renamed the data member for clarity. (WebCore::HTMLAppletElement::insertedIntoDocument): Ditto. (WebCore::HTMLAppletElement::removedFromDocument): Ditto. * html/HTMLAppletElement.h: Ditto. * html/HTMLDocument.cpp: (WebCore::addItemToMap): Use AtomicString instead of String. (WebCore::removeItemFromMap): Ditto. (WebCore::HTMLDocument::addNamedItem): Updated for member name change. (WebCore::HTMLDocument::removeNamedItem): Ditto. (WebCore::HTMLDocument::addExtraNamedItem): Ditto. (WebCore::HTMLDocument::removeExtraNamedItem): Ditto. (WebCore::HTMLDocument::clear): Added. Moved code here from the JavaScript bindings. If we're going to have an empty placeholder function, there's no reason to have it in the bindings instead of here. * html/HTMLDocument.h: Added clear. Changed the named item function arguments to AtomicString insted of String. Changed the NameCountMap to use AtomicStringImpl* instead of StringImpl*. Renamed the data members to add a m_ prefix and remove the needless doc prefix. Added hasNamedItem and hasExtraNamedItem functions that are inlined and faster than the old idiom because they doesn't ref/deref the AtomicStringImpl*, get inlined, and don't have to handle the 0 case. * html/HTMLDocument.idl: Removed the [Custom] attribute on clear and took it out of the JavaScript-specific section. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseMappedAttribute): Use AtomicString consistently. Also renamed the data member for clarity. (WebCore::HTMLEmbedElement::insertedIntoDocument): Ditto. (WebCore::HTMLEmbedElement::removedFromDocument): Ditto. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::insertedIntoDocument): Ditto. (WebCore::HTMLFormElement::removedFromDocument): Ditto. (WebCore::HTMLFormElement::parseMappedAttribute): Ditto. * html/HTMLFormElement.h: Ditto. * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::openURL): Renamed m_name to m_frameName for clarity, since the frame name is not the same as the name attribute. (WebCore::HTMLFrameElementBase::parseMappedAttribute): Ditto. (WebCore::HTMLFrameElementBase::setNameAndOpenURL): Ditto. * html/HTMLFrameElementBase.h: Ditto. * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::parseMappedAttribute): Use AtomicString consistently. Also renamed the data member for clarity. (WebCore::HTMLIFrameElement::insertedIntoDocument): Ditto. (WebCore::HTMLIFrameElement::removedFromDocument): Ditto. * html/HTMLIFrameElement.h: Ditto. * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): Ditto. (WebCore::HTMLImageElement::insertedIntoDocument): Ditto. (WebCore::HTMLImageElement::removedFromDocument): Ditto. * html/HTMLImageElement.h: Ditto. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto. (WebCore::HTMLObjectElement::insertedIntoDocument): Ditto. (WebCore::HTMLObjectElement::removedFromDocument): Ditto. (WebCore::HTMLObjectElement::updateDocNamedItem): Ditto. * html/HTMLObjectElement.h: Ditto. * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::isURLAttribute): Use equalIgnoringCase instead of callling lower(). * html/HTMLPlugInElement.h: Changed the type of m_name. The code that uses this is in HTMLAppletElement, HTMLEmbedElement, and HTMLObjectElement. * platform/text/AtomicString.cpp: (WebCore::equal): Moved to an inline so we can share this code between a few different functions. It could move to a header too if we want to use it elsewhere. (WebCore::UCharBufferTranslator::equal): Change to use inline. (WebCore::HashAndCharactersTranslator::hash): Added. (WebCore::HashAndCharactersTranslator::equal): Added. (WebCore::HashAndCharactersTranslator::translate): Added. (WebCore::AtomicString::add): Improved the Identifier and UString overloads to use the already-computed hash code instead of rehashing the string. (WebCore::AtomicString::find): Added. * platform/text/AtomicString.h: Added a find function so we can avoid allocating memory just to look up a string in an atomic string set or map. * platform/text/StringImpl.h: Added declarations needed for the AtomicString changes. 2008-03-17 Timothy Hatcher Reviewed by Mark Rowe. Bug 17908: Various bugs in the Console completion code http://bugs.webkit.org/show_bug.cgi?id=17908 * page/inspector/ConsolePanel.js: (WebInspector.ConsolePanel.complete): Moved the code that checked for the caret being at the end of the prompt into the _caretAtEndOfPrompt helper function. (WebInspector.ConsolePanel.messagesSelectStart): Clear and redo the auto complete when the selection changes. (WebInspector.ConsolePanel._caretInsidePrompt): Fixed a logic error that always caused a false result. (WebInspector.ConsolePanel._caretAtEndOfPrompt): Added. Tests if the selection is a caret at the end of the prompt. (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Changed the offset to use the childNodes length. This makes sure the caret is at the end when there are multiple text nodes in the prompt. 2008-03-17 Dan Bernstein Rubber-stamped by Dave Hyatt. - FloatingObject cleanup Renamed FloatingObject's data members as follows: node -> m_renderer, startY -> m_top, endY -> m_bottom, left -> m_left, width -> m_width, and noPaint -> !m_shouldPaint, reversing the meaning of the flag. Also addressed the FIXME in RenderBlock::containsFloat(). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::repaintOverhangingFloats): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::insertFloatingObject): (WebCore::RenderBlock::removeFloatingObject): (WebCore::RenderBlock::positionNewFloats): (WebCore::RenderBlock::leftRelOffset): (WebCore::RenderBlock::rightRelOffset): (WebCore::RenderBlock::nextFloatBottomBelow): (WebCore::RenderBlock::floatBottom): (WebCore::RenderBlock::floatRect): (WebCore::RenderBlock::lowestPosition): (WebCore::RenderBlock::rightmostPosition): (WebCore::RenderBlock::leftmostPosition): (WebCore::RenderBlock::leftBottom): (WebCore::RenderBlock::rightBottom): (WebCore::RenderBlock::clearFloats): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::addIntrudingFloats): (WebCore::RenderBlock::containsFloat): Changed to return false if the floats lists exists but is empty, since line layout code no longer relies on the buggy behavior. (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::adjustForBorderFit): * rendering/RenderBlock.h: (WebCore::RenderBlock::containsFloats): (WebCore::RenderBlock::FloatingObject::FloatingObject): * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::matchedEndLine): 2008-03-17 Dan Bernstein Reviewed by Dave Hyatt. - allow incremental relayout of blocks that contain floats Tests: fast/repaint/line-flow-with-floats-[1-9].html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::clearFloatsIfNeeded): Cleaned up by moving most of the function body out of an if statement which was replaced with an early return. (WebCore::RenderBlock::insertFloatingObject): Cleaned up by moving most of the function body out of an if statement and moving the ASSERT, which is a crash in release builds, to the beginning. Made this function set the m_isDescendant flag of floating objects it creates. (WebCore::RenderBlock::removeFloatingObject): Added a call to markLinesDirtyInVerticalRange() when removing a float from a block with inline children. (WebCore::RenderBlock::markLinesDirtyInVerticalRange): Added. Marks the lines in the given range as dirty. (WebCore::RenderBlock::clearFloats): Added code to detect changes to the geometry of floats intruding into this block from other blocks and mark any lines whose available width has changed as a result as dirty. * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added a structure to cache a float with its position and size. (WebCore::RenderBlock::FloatingObject::FloatingObject): Added an m_isDescendant flag, used by clearFloats() to distinguish between floats entering the block from outside and floats internal to the block. * rendering/RootInlineBox.h: (WebCore::RootInlineBox::floats): Added. (WebCore::RootInlineBox::floatsPtr): Added. (WebCore::RootInlineBox::Overflow::Overflow): Added a data member to hold the floats originating on the line. * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): Made the existence of floats not force a full layout. Changed to cache the geometry of floats in the block and detect changes to it. If a float's size or position changes, all lines from that point on are treated as dirty. An exception is a change in the dimensions of a float on an otherwise-clean line, which only dirties lines potentially affected by the change (see determineStartPosition()). Added code to update each RootInlineBox's set of floats as lines are laid out. Added code to shift floats belonging to clean lines in the end along with the lines. (WebCore::RenderBlock::determineStartPosition): Made this function look for changes to floats' dimensions and mark lines as dirty accordingly. Also look for new floats and if found, cause a full layout. Added code to re-add floats belonging to clean lines. (WebCore::RenderBlock::matchedEndLine): Added checking that the clean lines in the end can be shifted vertically as needed, i.e. that the available width along the way is uniform. 2008-03-17 Eric Seidel Reviewed by darin. Fix _NPN_IntFromIdentifier (and export the symbol for use!) Test: plugins/netscape-identifier-conversion.html * WebCore.NPAPI.exp: * bridge/npruntime.cpp: (_NPN_IntFromIdentifier): 2008-03-17 Sam Weinig Reviewed by Dan Bernstein. Add HTMLCollection constructor to the Window object. (Omission noticed by Harri Porten) * page/DOMWindow.idl: 2008-03-17 Holger Hans Peter Freyther Unreviewed Gtk+ build fix. * platform/gtk/ScrollViewGtk.cpp: remove const 2008-03-17 Julien Chaffraix Reviewed by Holger. - Implement ResourceHandle::loadResourceSynchronously to dispatch synchronous requests. - Implement WebCoreSynchronousLoader, the ResourceHandleClient which holds the network data, response and error for us during the transfert. * platform/network/ResourceHandleInternal.h: Remove trailing white space. * platform/network/curl/ResourceHandleCurl.cpp: Add WebCoreSynchronousLoader (WebCore::WebCoreSynchronousLoader::resourceResponse): (WebCore::WebCoreSynchronousLoader::resourceError): (WebCore::WebCoreSynchronousLoader::data): (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): (WebCore::WebCoreSynchronousLoader::didReceiveResponse): (WebCore::WebCoreSynchronousLoader::didReceiveData): (WebCore::WebCoreSynchronousLoader::didFinishLoading): (WebCore::WebCoreSynchronousLoader::didFail): (WebCore::ResourceHandle::loadResourceSynchronously): Implement method using WebCoreSynchronousLoader. * platform/network/curl/ResourceHandleManager.cpp: (WebCore::ResourceHandleManager::dispatchSynchronousJob): (WebCore::ResourceHandleManager::startJob): (WebCore::ResourceHandleManager::initializeHandle): Handle initialization method used both for synchronous and asynchronous job. * platform/network/curl/ResourceHandleManager.h: 2008-03-17 Darin Adler - try to fix GTK build * platform/ScrollView.h: Make setGtkAdjustments adjustment. And non-virtual (why was it virtual?). 2008-03-17 Rodney Dawes Fix Bug 17898: Split PluginMessageThrottlerWin into its own files Move the PluginMessageThrottlerWin class into its own files, in preparation for refactoring PluginView code to be shared. Reviewed and tweaked by Adam Roben. * WebCore.vcproj/WebCore.vcproj: * plugins/PluginView.h: * plugins/win/PluginMessageThrottlerWin.cpp: Added. * plugins/win/PluginMessageThrottlerWin.h: Added. * plugins/win/PluginViewWin.cpp: 2008-03-17 Adam Roben More Windows build fixes after r31098 * platform/ScrollView.h: Make some more methods public. 2008-03-17 Adam Roben Windows and Qt build fixes after r31098 * platform/ScrollView.h: Mark methods public that still need to be so. 2008-03-16 Timothy Hatcher Reviewed by Darin Adler. Bug 17883: Console completion should support bracket notation http://bugs.webkit.org/show_bug.cgi?id=17883 Also fixes a bug where the Inspector's window object was used instead of the inspected window object. * page/inspector/ConsolePanel.js: (WebInspector.ConsolePanel.complete): Add a comment about the _backwardsRange call. (WebInspector.ConsolePanel.completions): Add a comment about the _backwardsRange call. Check the last character of the expression for a dot or bracket. Fallback to the InspectorController.inspectedWindow() instead of window, this was a bad bug. If the expression caused an exception, just consider the prefix a window property. When bracket notation is used remember what quote was used and compared property names with that quote surrounding it. Also escape the property name for the quote and backslash. 2008-03-17 Robert Blaut Reviewed by Darin. Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696 Set default margin-bottom for form element in quirk mode and be compatible with Gecko. Tests: fast/css/margin-bottom-form-element-quirk.html fast/css/margin-bottom-form-element-strict.html * css/html4.css: * css/quirks.css: 2008-03-17 Antti Koivisto Reviewed by Darin. Speculative fix for http://bugs.webkit.org/show_bug.cgi?id=17878 Bug 17878: REGRESSION: Acid3 sometimes crashes Webkit under WebCore::Loader::Host::cancelRequests I can't reproduce the crash or make a test case for this one but I'm pretty sure this is the problem. Essentially the same bug as http://bugs.webkit.org/show_bug.cgi?id=17862 except in didFail() instead of didFinishLoading(). * loader/loader.cpp: (WebCore::Loader::Host::didFail): 2008-03-17 Jan Michael Alonzo Reviewed and tweaked by Darin. http://bugs.webkit.org/show_bug.cgi?id=17172 Refactor platform checks in ScrollView.h * platform/ScrollView.h: Change #ifs around. 2008-03-17 Yuzhu Shen Reviewed by Darin. Fix the bug: http://bugs.webkit.org/show_bug.cgi?id=17760 It is necessary to load the image even when src="". Test: fast/images/load-img-with-empty-src.html * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::updateFromElement): isNull rather than isEmpty. 2008-03-17 Rodney Dawes Fix GTK+ build from r31094. * plugins/gtk/PluginDatabaseGtk.cpp: (PluginDatabase::getPluginsInPaths): 2008-03-17 Adam Roben Fix Bug 17876: REGRESSION (r31060): Attempting to visit Ofcom page causes crash Reviewed by John. Test: fast/dom/remove-named-attribute-crash.html * dom/NamedAttrMap.cpp: (WebCore::NamedAttrMap::removeAttribute): Store the Attribute we're going to remove from the m_attributes Vector in a RefPtr so it doesn't get deleted when it is removed from the Vector. 2008-03-17 Rodney Dawes Reviewed by Adam Roben. Implement PluginDatabase for GTK+ with PluginDatabaseGtk.cpp. Remove implemented methods from TemporaryLinkStubs. * GNUmakefile.am: * plugins/gtk: * plugins/gtk/PluginDatabaseGtk.cpp: * platform/gtk/TemporaryLinkStubs.cpp: 2008-03-17 Simon Hausmann Fix the Qt build. * platform/text/qt/TextCodecQt.cpp: (WebCore::TextCodecQt::encode): * platform/text/qt/TextCodecQt.h: 2008-03-16 Maciej Stachowiak Not reviewed, just fixing an incomplete comment from the last commit. * dom/Range.cpp: (WebCore::Range::surroundContents): 2008-03-16 Maciej Stachowiak Reviewed by Darin. - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)" http://bugs.webkit.org/show_bug.cgi?id=17509 This gets us to 92/100 * dom/Range.cpp: (WebCore::Range::surroundContents): Check for HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3 expects exceptional conditions to be tested in the order that the spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If the start point of the range is in a comment node, the node that would be the parent of a partial replacement is actually the comment node's parent (since comment nodes have character indices), so we should do the HIERARCHY_REQUEST_ERR check based on the parent of the comment node, as for text nodes, even though it will fail later with a different exception because it is not allowed to surround a partially selected non-text node. 2008-03-16 Marvin Decker Reviewed by Darin. Fix bug 15119: URL query characters that are unencodable in the request's character set should be converted to XML entities with non-alphanumeric characters escaped. Test: http/tests/uri/escaped-entity.html * html/FormDataList.cpp: (WebCore::FormDataList::appendString): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formData): * platform/KURL.cpp: (WebCore::encodeRelativeString): * platform/text/String.cpp: (WebCore::String::latin1): (WebCore::String::utf8): * platform/text/TextCodec.cpp: (WebCore::TextCodec::unencodableCharReplacement): * platform/text/TextCodec.h: (WebCore::): * platform/text/TextCodecICU.cpp: (WebCore::urlEscapedEntityCallback): (WebCore::gbkUrlEscapedEntityCallack): (WebCore::TextCodecICU::encode): * platform/text/TextCodecICU.h: (WebCore::TextCodecICU::setNeedsGBKFallbacks): * platform/text/TextCodecLatin1.cpp: (WebCore::encodeComplexWindowsLatin1): (WebCore::TextCodecLatin1::encode): * platform/text/TextCodecLatin1.h: * platform/text/TextCodecUTF16.cpp: (WebCore::TextCodecUTF16::encode): * platform/text/TextCodecUTF16.h: * platform/text/TextCodecUserDefined.cpp: (WebCore::encodeComplexUserDefined): (WebCore::TextCodecUserDefined::encode): * platform/text/TextCodecUserDefined.h: * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::encode): * platform/text/TextEncoding.h: * platform/text/mac/TextCodecMac.cpp: (WebCore::TextCodecMac::encode): * platform/text/mac/TextCodecMac.h: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): 2008-03-16 Kevin Ollivier Rubber stamped by Darin. Add set-webkit-configuration support for wx port, and centralize build dir location setting. http://bugs.webkit.org/show_bug.cgi?id=17790 * webcore-base.bkl: 2008-03-16 Darin Adler Reviewed by Mark Rowe. - http://bugs.webkit.org/show_bug.cgi?id=17881 a little cleanup for HTMLTextAreaElement Tests: fast/forms/textarea-default-value-leading-newline.html fast/forms/textarea-linewrap-dynamic.html * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Tweaked names/ (WebCore::HTMLTextAreaElement::selectionStart): Ditto, also use early return and check for < 0 rather than -1 specifically. (WebCore::HTMLTextAreaElement::selectionEnd): Ditto. (WebCore::HTMLTextAreaElement::setSelectionStart): Early return. (WebCore::HTMLTextAreaElement::setSelectionEnd): Ditto. (WebCore::HTMLTextAreaElement::select): Ditto. (WebCore::HTMLTextAreaElement::setSelectionRange): Ditto. (WebCore::HTMLTextAreaElement::parseMappedAttribute): Changed value parsing to treat unknown values as meaning "default" rather than "leave value as-is". Only call setNeedsLayoutAndPrefWidthsRecalc when mode changed. (WebCore::HTMLTextAreaElement::createRenderer): Removed name of unused argument. (WebCore::HTMLTextAreaElement::appendFormData): Updated for name changes. (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Got rid of unnneeded explicit class name in isFocusable call. (WebCore::HTMLTextAreaElement::isMouseFocusable): Ditto. (WebCore::HTMLTextAreaElement::updateFocusAppearance): Tweaked formatting. (WebCore::HTMLTextAreaElement::defaultEventHandler): Ditto. (WebCore::HTMLTextAreaElement::updateValue): Early return. (WebCore::HTMLTextAreaElement::setValue): Got rid of intermediate value to eliminate on small refcount churn. (WebCore::HTMLTextAreaElement::defaultValue): Got rid of unneeded redundant string length checks, since String already checks all indexing and returns 0. (WebCore::HTMLTextAreaElement::setDefaultValue): Added code to normalize line endings and add a leading line ending to fix cases where the first character is a newline. (WebCore::HTMLTextAreaElement::accessKeyAction): Removed name of unused arg. (WebCore::HTMLTextAreaElement::accessKey): Changed return value to avoid refcount churn. (WebCore::HTMLTextAreaElement::selection): Updated names and use < 0 instead of -1 specifically. * html/HTMLTextAreaElement.h: Replaced wrap function with more-specific shouldWrapText one. Changed return value of accessKey. Made WrapMethod enum provate and renamed the values. Renamed cachedSelStart and cachedSelEnd to m_cachedSelectionStart and m_cachedSelectionEnd. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::createInnerTextStyle): Updated for change to HTMLTextAreaElement wrap function. 2008-03-16 Antti Koivisto Reviewed by Mitz. Fix http/tests/security/frame-loading-via-document-write.html which was broken by the preload patch. Don't print error message when preload fails local file security check. Some minor refactoring. * html/PreloadScanner.cpp: (WebCore::PreloadScanner::emitTag): (WebCore::PreloadScanner::emitCSSRule): * loader/Cache.cpp: (WebCore::Cache::requestResource): * loader/Cache.h: * loader/DocLoader.cpp: (WebCore::DocLoader::requestResource): (WebCore::DocLoader::preload): (WebCore::DocLoader::printPreloadStats): * loader/DocLoader.h: 2008-03-16 Antti Koivisto Reviewed by Darin. Fix http://bugs.webkit.org/show_bug.cgi?id=17862 REGRESSION (r31038): Reproducible crash under DocLoader::checkForReload() at marware.com This was a memory smasher introduced by the preloading patch. If a script resource was marked uncacheable, early deletion of the Request object would cause deletion of the CachedResource too if it was referred more than once in a single document. Test: http/tests/misc/uncacheable-script-repeated.html * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): (WebCore::Loader::Host::didFinishLoading): 2008-03-16 Yuzhu Shen Reviewed by Darin. Fix bug http://bugs.webkit.org/show_bug.cgi?id=17714 should go to top of the page. Test: fast/html/empty-fragment-id-goto-top.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::gotoAnchor): 2008-03-16 Thiago Macieira Reviewed by Darin. Don't use RefPtr in classes you haven't seen the implementation of. Forward-declaration and declaration of RefPtr is ok. But you cannot *use* said objects until Foo is defined. This is true even for initialisation with a 0. Seems the HP aCC compiler is more strict here than gcc. * editing/SplitTextNodeCommand.h: * page/FrameTree.h: * xml/XPathExpressionNode.h: 2008-03-16 Darin Adler Reviewed by Mitz. - fix http://bugs.webkit.org/show_bug.cgi?id=14941 textarea value from JavaScript includes extra newline Test: fast/forms/textarea-trailing-newline.html * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::finishText): Added code to strip the trailing newline. It's possible there are some obscure cases where this is not wanted, but I couldn't find any. If someone finds a case where this is bad, we can make the code conditional. 2008-03-16 Darin Adler Reviewed by Mitz. - fix http://bugs.webkit.org/show_bug.cgi?id=17876 Attempting to visit Ofcom page causes crash This is causing intermittent crashes on some existing test cases on the buildbot too; I don't have a 100% test case right now, but it should be easy to add one later and this does fix a crash in a test we already have. * dom/CharacterData.cpp: (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string, not the null string. The class assumes the string can never being null. (WebCore::CharacterData::setData): If asked to set the data to the null string, set it to the empty string instead. This matches what the (non-empty) constructor has always done. 2008-03-15 Timothy Hatcher Reviewed by Adam Roben. Bug 17870: Web Inspector console should feel more like a terminal http://bugs.webkit.org/show_bug.cgi?id=17870 Bug 14390: Console input area should be more noticeable http://bugs.webkit.org/show_bug.cgi?id=14390 Bug 17237: Inspector should tab-complete object properties in the Console http://bugs.webkit.org/show_bug.cgi?id=17237 Adds tab completion, auto completion and a blended input prompt. The prompt is also focused when the console is shown. Implements a new look, that will be part of the UI refresh. * page/inspector/ConsolePanel.js: (WebInspector.ConsolePanel): Renamed a few properties. (WebInspector.ConsolePanel.get/set promptText): Property to set and get the current prompt text. Does not affect command history. (WebInspector.ConsolePanel.show): Make the prompt focus on show. (WebInspector.ConsolePanel.acceptAutoComplete): Accepts any pending auto complete text. (WebInspector.ConsolePanel.clearAutoComplete): Cancels any pending auto complete text. (WebInspector.ConsolePanel.autoCompleteSoon): Sets a timeout to auto complete in 250 ms, only if there isn't a pending auto complete. (WebInspector.ConsolePanel.complete): (WebInspector.ConsolePanel.completions): Generate a list of possible completions based on the prefix and the previous expression ranges. (WebInspector.ConsolePanel._backwardsRange): Helper to scan backwards from a node and offset to find a start node and offset of the first character found in the characters string. (WebInspector.ConsolePanel._evalInInspectedWindow): Helper to eval in the inspected window. (WebInspector.ConsolePanel._caretInsidePrompt): Returns true if the selection is collapsed and is inside the prompt element. (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Moves the selection to the end of the prompt. (WebInspector.ConsolePanel._onTabPressed): Calls complete on tab press. (WebInspector.ConsolePanel._onEnterPressed): Call clearAutoComplete so the autocompletion text is not evaluated. * page/inspector/Images/errorIcon.png: New image. * page/inspector/Images/userInputIcon.png: Added. * page/inspector/Images/userInputPreviousIcon.png: Added. * page/inspector/Images/warningIcon.png: New image. * page/inspector/inspector.css: New refreshed UI. 2008-03-15 Mark Mentovai Reviewed and landed by Darin. - http://bugs.webkit.org/show_bug.cgi?id=17833 use file extensions instead of explicit file types in WebCore's Xcode project * WebCore.xcodeproj/project.pbxproj: Remove unnecessary uses of explicitFileType, preferring lastKnownFileType ("File Type: Default for File" in Xcode's File Info's General tab). Files below that relied on an explicit file type setting other than what would be implied by their extensions have been renamed to have correct extensions. * bridge/jni/jni_jsobject.cpp: Removed. * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp. * loader/mac/LoaderNSURLExtras.m: Removed. * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m. * platform/mac/SharedTimerMac.cpp: Removed. * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp. 2008-03-15 Darin Adler Reviewed by Sam. - fix http://bugs.webkit.org/show_bug.cgi?id=11997 Ranges are not fixed after mutation (affects Acid3 test 13) Test: fast/dom/Range/mutation.html * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h, and NodeWithIndexBefore.h. * dom/CharacterData.cpp: (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers with call to Document::textRemoved. (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers with call to Document::textInserted. (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers and Document::shiftMarkers with call to Document::textRemoved. (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers and Document::shiftMarkers with call to Document::textRemoved and Document::textInserted. (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit. * dom/ContainerNode.cpp: (WebCore::ContainerNode::childrenChanged): Added a call to Document::nodeChildrenChanged when the nmber of children was changed (and not by the parser). (WebCore::dispatchChildRemovalEvents): Updated for name change. * dom/Document.cpp: (WebCore::Document::~Document): Assert that all ranges are gone. (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on all ranges. (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval. Added code to call nodeWillBeRemoved on all ranges. (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and also calls shiftMarkers. (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also calls removeMarkers and shiftMarkers. (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges. (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges. (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges for this document. (WebCore::Document::detachRange): Added. Removes range from the HashSet. * dom/Document.h: Added the new functions and the data member. * dom/Element.cpp: (WebCore::Element::normalizeAttributes): Added. Contains the part of the normalize function that's specific to Element. Better encapsulation to have it here rather than in Node::normalize. * dom/Element.h: Added the new function. * dom/Node.cpp: (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added a call to textNodesMerged after each pair of nodes is merged but before the second node is removed. (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by normalize, but also useful elsewhere. * dom/Node.h: Added the new function. * dom/NodeIterator.cpp: (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval. * dom/NodeIterator.h: Ditto. * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::setData): Call textRemoved. * dom/Range.cpp: (WebCore::NodeWithIndex::index): Added. Computes and stores index. (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index. (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index. (WebCore::Range::Range): Call attachRange. (WebCore::Range::~Range): Call detachRange unless the range is already detached. (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR. It's no longer possible to create a range where the two containers are non-zero and have no common ancestor. (WebCore::Range::isPointInRange): Rewrote expression to be more readable. (WebCore::Range::compareNode): Changed local variable to use int for consistency. (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED. (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and initialization of ec to 0; both are now inside checkDeleteExtract. (WebCore::Range::intersectsNode): Changed local variable to use int for consistency. Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1 and -1. (WebCore::Range::processContents): Changed code to not get the nodeType multiple times on the same node, and tweaked formatting. Removed code to update the range on deletion, because the normal delete logic will take care of that now. (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and initialization of ec to 0; both are now inside checkDeleteExtract. (WebCore::Range::insertNode): Changed local variable to use int for consistency. (WebCore::Range::toString): Changed variable name to pastLast. (WebCore::Range::detach): Call detachRange. (WebCore::Range::checkDeleteExtract): Added check for detached range and code to set ec to 0; moved here from the two callers. Also changed variable name to pastLast. (WebCore::endpointNodeChildrenChanged): Added. (WebCore::Range::nodeChildrenChanged): Added. (WebCore::endpointNodeWillBeRemoved): Added. (WebCore::Range::nodeWillBeRemoved): Added. (WebCore::endpointTextInserted): Added. (WebCore::Range::textInserted): Added. (WebCore::endpointTextRemoved): Added. (WebCore::Range::textRemoved): Added. (WebCore::endpointTextNodesMerged): Added. (WebCore::Range::textNodesMerged): Added. (WebCore::endpointTextNodesSplit): Added. (WebCore::Range::textNodeSplit): Added. * dom/Range.h: Added new member functions. * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same node more than once. * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a node and treats a node pointer of 0 as meaning "before first node in parent container". * dom/NodeWithIndexBefore.h: Added. Similar to NodeWithIndex but treats a node pointer of 0 as meaning "after last node in parent container". * dom/Text.cpp: (WebCore::Text::splitText): Call textNodeSplit. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast. 2008-03-15 Julien Chaffraix Reviewed by Holger. [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL http://bugs.webkit.org/show_bug.cgi?id=16906 Add null checks for httpBody() to match other ports. Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html * platform/network/curl/ResourceHandleManager.cpp: (WebCore::readCallback): Add null check. (WebCore::ResourceHandleManager::setupPOST): Ditto. 2008-03-14 Steve Falkenburg PGO build fixes. * WebCore.vcproj/WebCore.vcproj: 2008-03-14 Anders Carlsson Reviewed by Sam. https://bugs.webkit.org/show_bug.cgi?id=17792 REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame. * bindings/js/JSDOMWindowBase.cpp: (WebCore::createWindow): * loader/FrameLoader.cpp: (WebCore::FrameLoader::createWindow): * loader/FrameLoader.h: 2008-03-14 Dan Bernstein Reviewed by Mark Rowe. - fix shadow offsets are smaller than specified * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setShadow): Made the workaround for unconditional. 2008-03-14 Adam Roben Fix it right this time * platform/MainThread.cpp: Cast to unsigned so we can use %u in the format string. * platform/mac/MainThreadMac.mm: 2008-03-14 Adam Roben Mac build fix * platform/mac/MainThreadMac.mm: Corrected a typo. 2008-03-14 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=17834 REGRESSION: floated first-letter does not work when included in table Test: fast/css/first-letter-float.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): Changed the search for the first text node to stop at a float if that float is an existing first- letter. 2008-03-14 Sam Weinig Fix Mac build * WebCore.xcodeproj/project.pbxproj: 2008-03-13 Adam Roben Make most of callOnMainThread's implementation be cross-platform I took the non-platform-specific parts of MainThreadWin.cpp and moved them to a new MainThread.cpp. Each platform is now responsible for implementing one function, scheduleDispatchFunctionsOnMainThread, which is supposed to set things up so that dispatchFunctionsFromMainThread gets called from the main thread in the near future. Reviewed by Alexey. * GNUmakefile.am: Added MainThread.cpp to the project. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCoreSources.bkl: Ditto. * platform/MainThread.cpp: - Copied from WebCore/platform/win/MainThreadWin.cpp. - Removed the Windows-specific parts. (WebCore::callOnMainThread): Changed to call scheduleDispatchFunctionsOnMainThread instead of PostMessage. * platform/gtk/MainThreadGtk.cpp: (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now just calls dispatchFunctionsFromMainThread. (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through to g_timeout_add. * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to WebCoreMainThreadCaller. (-[WebCoreMainThreadCaller call]): Calls through to dispatchFunctionsFromMainThread. (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new WebCoreMainThreadCaller and calls performSelectorOnMainThread on it. * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent. (WebCore::MainThreadInvoker::event): Chagned to call through to dispatchFunctionsFromMainThread. (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event to the MainThreadInvoker. * platform/win/MainThreadWin.cpp: - Removed the non-Windows-specific parts. - Removed some unnecessary initialization of static variables to 0. (WebCore::ThreadingWindowWndProc): Changed to call dispatchFunctionsFromMainThread. (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to PostMessage. * platform/wx/MainThreadWx.cpp: (WebCore::scheduleDispatchFunctionsOnMainThread): Added. 2008-03-14 Beth Dakin Reviewed by Geoff. Fix for Potential PLT speedup: don't realloc every time inside NamedAttrMap::addAttribute The speed-up for this turned out to be so small that it is mostly imperceptible. It is likely that it is a tiny boost, though, and the new code is much cleaner. * dom/Element.cpp: (WebCore::Element::setAttributeMap): attrs is now called m_attributes * dom/NamedAttrMap.cpp: The array attrs is now the Vector of RefPtrs called m_attributes, and there is no longer any need for the len member variable. (WebCore::NamedAttrMap::NamedAttrMap): (WebCore::NamedAttrMap::item): (WebCore::NamedAttrMap::getAttributeItem): (WebCore::NamedAttrMap::clearAttributes): (WebCore::NamedAttrMap::operator=): (WebCore::NamedAttrMap::addAttribute): (WebCore::NamedAttrMap::removeAttribute): (WebCore::NamedAttrMap::mapsEquivalent): * dom/NamedAttrMap.h: Same. (WebCore::NamedAttrMap::length): (WebCore::NamedAttrMap::attributeItem): (WebCore::NamedAttrMap::shrinkToLength): (WebCore::NamedAttrMap::reserveCapacity): * html/HTMLTokenizer.cpp: One of the benefits of the old array was that it never took up more memory than it needed to. So the tokenizer utilizes new member functions on NamedAttrMap (shrinkToLength and reserveCapacity) to try to keep memory usage at a minimum. (WebCore::Token::addAttribute): (WebCore::HTMLTokenizer::processToken): 2008-03-14 David D. Kilzer BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0. * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard to comment out unused code. 2008-03-14 David D. Kilzer Unify concept of enabling the Mac Java bridge. Reviewed by Darin and Anders. No test cases added since there is no change in functionality. * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro. If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES. * WebCore.JNI.exp: Added. * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp. * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard. * bridge/jni/jni_class.h: Ditto. * bridge/jni/jni_instance.cpp: Ditto. * bridge/jni/jni_instance.h: Ditto. * bridge/jni/jni_jsobject.cpp: Ditto. * bridge/jni/jni_jsobject.h: Ditto. * bridge/jni/jni_objc.mm: Ditto. * bridge/jni/jni_runtime.cpp: Ditto. * bridge/jni/jni_runtime.h: Ditto. * bridge/jni/jni_utility.cpp: Ditto. * bridge/jni/jni_utility.h: Ditto. * bridge/runtime.cpp: Removed unused #include statements. * bridge/runtime.h: (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE) guard for JavaLanguage enum. Also added #if PLATFORM(MAC) guard for ObjectiveCLanguage enum to match corresponding code in runtime.cpp. * config.h: Removed definition of HAVE_JNI. * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard. * page/Frame.cpp: (WebCore::Frame::Frame): Ditto. * page/Frame.h: (WebCore::Frame::initJavaJSBindings): Ditto. * page/mac/FrameMac.mm: (WebCore::Frame::createScriptInstanceForWidget): Ditto. (WebCore::Frame::initJavaJSBindings): Ditto. 2008-03-13 Darin Adler * html/PreloadScanner.h: Corrected license. * html/PreloadScanner.cpp: Corrected license. 2008-03-13 Mark Mentovai Reviewed by darin. Landed by eseidel. * platform/FloatConversion.h: Include a header to get CoreGraphics types when using CoreGraphics types. 2008-03-13 Mark Mentovai Reviewed by eseidel. Landed by eseidel. * WebCore.xcodeproj/project.pbxproj: * css/CSSParser.cpp: * css/makeprop.pl: Move CSSPropertyNames.c to CSSPropertyNames.cpp 2008-03-13 Mark Mentovai Reviewed by eseidel. Landed by eseidel. * platform/Arena.h: Use statement1;statement2 instead of (statement1,statement2) in CLEAR_UNUSED. 2008-03-13 Tommi Komulainen Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=17821 [SOUP] POST requests are empty Send the HTTP request body as well. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::start): 2008-03-13 Dan Bernstein Reviewed by Dave Hyatt. - fix http://bugs.webkit.org/show_bug.cgi?id=17819 Border-collapse: collapse later cell wins on PC, earlier cell on Mac Test: fast/table/border-collapsing/equal-precedence-resolution.html * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::collapsedLeftBorder): When calling compareBorders() with borders that may have the same precedence, made sure to pass the border belonging to the earlier (in document order) element first, since compareBorders() prefers the first argument when there is a tie. (WebCore::RenderTableCell::collapsedRightBorder): Ditto. (WebCore::RenderTableCell::collapsedTopBorder): Ditto. 2008-03-13 Adam Roben wx build fix and Windows leak fix after r31034 * platform/graphics/wx/ImageWx.cpp: (WebCore::Image::loadPlatformResource): Use SharedBuffer::create. * platform/win/SharedBufferWin.cpp: (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were leaking the SharedBuffer here before). 2008-03-13 Antti Koivisto Reviewed by Eric. Correct a few issues spotted by Mike Belshe. * html/PreloadScanner.cpp: (WebCore::PreloadScanner::tokenize): * loader/loader.cpp: (WebCore::Loader::cancelRequests): 2008-03-13 Rodney Dawes Fix GTK+ build for SharedBuffer changes. * platform/graphics/gtk/ImageGtk.cpp: (Image::loadPlatformResource): 2008-03-13 Steve Falkenburg More PGO build fixes. * WebCorePrefix.cpp: 2008-03-13 Antti Koivisto Reviewed by Darin. Make page loads go fast. http://bugs.webkit.org/show_bug.cgi?id=17480 - Implement speculative preloading. When a script load blocks the main parser, use a side parser to pick up more resources. - Implement per-host load queues, prioritize scripts and stylesheets over images. Depending on content and network latency this may speed things up quite a bit. * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::implicitClose): Clear the preloads after laoding completes. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseMappedAttribute): (WebCore::HTMLLinkElement::tokenizeRelAttribute): * html/HTMLLinkElement.h: Make tokenizeRelAttribute() public static so it can be used from elsewhere. Eliminate a pointless bitfield so I can get references. * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::scriptHandler): (WebCore::HTMLTokenizer::scriptExecution): (WebCore::HTMLTokenizer::write): * html/HTMLTokenizer.h: Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of the document while temporary ones are created as needed to scan document.write() output. * html/PreloadScanner.cpp: Added. (WebCore::PreloadScanner::PreloadScanner): (WebCore::PreloadScanner::~PreloadScanner): (WebCore::PreloadScanner::begin): (WebCore::PreloadScanner::end): (WebCore::PreloadScanner::reset): (WebCore::PreloadScanner::write): (WebCore::isWhitespace): (WebCore::PreloadScanner::clearLastCharacters): (WebCore::PreloadScanner::rememberCharacter): (WebCore::PreloadScanner::lastCharactersMatch): (WebCore::legalEntityFor): (WebCore::PreloadScanner::consumeEntity): (WebCore::PreloadScanner::tokenize): (WebCore::PreloadScanner::processAttribute): (WebCore::PreloadScanner::emitCharacter): (WebCore::PreloadScanner::tokenizeCSS): (WebCore::PreloadScanner::emitTag): (WebCore::PreloadScanner::emitCSSRule): * html/PreloadScanner.h: Added. (WebCore::PreloadScanner::inProgress): (WebCore::PreloadScanner::): HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun. * loader/Cache.cpp: (WebCore::Cache::pruneDeadResources): Preloads have zero refcount, avoid kicking them out too early. * loader/CachedResource.cpp: (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::ref): * loader/CachedResource.h: (WebCore::CachedResource::): (WebCore::CachedResource::preloadResult): (WebCore::CachedResource::setRequestedFromNetworkingLayer): (WebCore::CachedResource::canDelete): (WebCore::CachedResource::isPreloaded): (WebCore::CachedResource::increasePreloadCount): (WebCore::CachedResource::decreasePreloadCount): Keep track which resources are preloads. Avoid deleting them. Track at which point of the loading preloads get utilized to enable some interesting statistics. * loader/DocLoader.cpp: (WebCore::DocLoader::~DocLoader): (WebCore::DocLoader::checkForReload): (WebCore::DocLoader::registerPreload): (WebCore::DocLoader::clearPreloads): (WebCore::DocLoader::printPreloadStats): * loader/DocLoader.h: Ensure we utilize preloaded resources during reloads. Keep a list of all preloads in the document. Clear the preloads after parsing is complete. Some debug statistics. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingInAPISense): Avoid signaling that loading is complete too early. * loader/loader.cpp: (WebCore::Loader::Loader): (WebCore::Loader::~Loader): (WebCore::Loader::determinePriority): (WebCore::Loader::load): (WebCore::Loader::scheduleServePendingRequests): (WebCore::Loader::requestTimerFired): (WebCore::Loader::servePendingRequests): (WebCore::Loader::cancelRequests): (WebCore::Loader::Host::Host): (WebCore::Loader::Host::~Host): (WebCore::Loader::Host::addRequest): (WebCore::Loader::Host::hasRequests): (WebCore::Loader::Host::servePendingRequests): (WebCore::Loader::Host::didFinishLoading): (WebCore::Loader::Host::didFail): (WebCore::Loader::Host::didReceiveResponse): (WebCore::Loader::Host::didReceiveData): (WebCore::Loader::Host::cancelPendingRequests): (WebCore::Loader::Host::cancelRequests): * loader/loader.h: (WebCore::Loader::): Distribute load requests to per-host priority queues. Limit the number of loads issued to the networking layer so we have better changes of getting important requests through first. Prioritize scripts > stylesheets > images. 2008-03-13 David Hyatt This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when zooming. The page will still try to constrain to the viewport size even when zoomed. Reviewed by john * dom/Document.cpp: (WebCore::Document::recalcStyle): Make sure to test for transform changes even when there is no zoom. This fixes repainting issues caused by jumping from a zoomed state back to the standard size. * page/FrameView.cpp: (WebCore::FrameView::adjustViewSize): Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view need to handle zoomed coordinates). * rendering/RenderBox.cpp: (WebCore::RenderBox::calcHeight): Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when stretching to fill the viewport. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::setHasVisibleContent): Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView. * rendering/RenderView.cpp: (WebCore::RenderView::calcHeight): (WebCore::RenderView::calcWidth): Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout" behavior. (WebCore::RenderView::layout): When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just the viewport size. (WebCore::RenderView::computeAbsoluteRepaintRect): Patched to take into account transforms set on the RenderView. (WebCore::RenderView::docHeight): (WebCore::RenderView::docWidth): Patched to just always use m_width and m_height initially, since those have already been adjusted for the zoom factor. (WebCore::RenderView::zoomedHeight): (WebCore::RenderView::zoomedWidth): * rendering/RenderView.h: New helper methods for obtaining the adjusted width/height of the viewport taking into account the zoom factor. 2008-03-13 Anders Carlsson Build fix. * WebCore.base.exp: 2008-03-13 Anders Carlsson Reviewed by Adam. Get rid of actualRequest, it is not used anymore. Also, get rid of initialRequest and replace all uses with originalRequest because those are the same thing. * loader/DocumentLoader.cpp: * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::initialRequest): (WebCore::FrameLoader::originalRequestURL): 2008-03-13 Brady Eidson Reviewed by Anders Convert SharedBuffer to start with a refCount of 1 * loader/ImageDocument.cpp: (WebCore::ImageTokenizer::finish): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::addData): (WebCore::ResourceLoader::willStopBufferingData): * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::defaultIcon): (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase): * loader/loader.cpp: (WebCore::Loader::didReceiveData): * platform/SharedBuffer.h: (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1 (WebCore::SharedBuffer::copy): * platform/mac/SharedBufferMac.mm: (WebCore::SharedBuffer::wrapNSData): (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1 2008-03-13 Steve Falkenburg PGO build fixes. Disable PGO for normal release builds. Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets. * WebCore.vcproj/WebCore.vcproj: 2008-03-13 Anders Carlsson Reviewed by Darin. Make a bunch of DocumentLoader setters/getters inline. * loader/DocumentLoader.cpp: * loader/DocumentLoader.h: (WebCore::DocumentLoader::isStopping): (WebCore::DocumentLoader::setCommitted): (WebCore::DocumentLoader::isCommitted): (WebCore::DocumentLoader::isLoading): (WebCore::DocumentLoader::setLoading): (WebCore::DocumentLoader::response): (WebCore::DocumentLoader::mainDocumentError): (WebCore::DocumentLoader::setResponse): (WebCore::DocumentLoader::isClientRedirect): (WebCore::DocumentLoader::setIsClientRedirect): (WebCore::DocumentLoader::overrideEncoding): (WebCore::DocumentLoader::responses): (WebCore::DocumentLoader::triggeringAction): (WebCore::DocumentLoader::setTriggeringAction): (WebCore::DocumentLoader::setOverrideEncoding): (WebCore::DocumentLoader::setLastCheckedRequest): (WebCore::DocumentLoader::lastCheckedRequest): (WebCore::DocumentLoader::title): (WebCore::DocumentLoader::setLoadingFromCachedPage): (WebCore::DocumentLoader::isLoadingFromCachedPage): 2008-03-13 Rodney Dawes Fix builds without SVG enabled. * page/Frame.cpp: (Frame::shouldApplyTextZoom): (Frame::shouldApplyPageZoom): 2008-03-13 Simon Hausmann Fix the Qt build. * bridge/qt/qt_instance.cpp: (KJS::Bindings::QtInstance::getQtInstance): (KJS::Bindings::QtInstance::getRuntimeObject): * bridge/qt/qt_instance.h: (KJS::Bindings::QtInstance::create): * bridge/qt/qt_runtime.cpp: (KJS::Bindings::convertQVariantToValue): (KJS::Bindings::QtConnectionObject::execute): * page/qt/FrameQt.cpp: (WebCore::Frame::createScriptInstanceForWidget): 2008-03-12 Sam Weinig Reviewed by Darin Adler. Fix Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException) Make bridged RuntimeObjects get collected on the main thread only. This is necessary because clients of the bridged objects are unlikely to prepared for a collection on non-main thread, which can happen with a PAC file. * bridge/runtime_object.cpp: (RuntimeObjectImp::RuntimeObjectImp): 2008-03-12 Adam Roben Fix Bug 17815: Inspector's DOM tree should descend into subframes Reviewed by Tim. * page/inspector/DocumentPanel.js: (WebInspector.DocumentPanel.revealNode): Changed to provide _isAncestorIncludingParentFramesWithinPanel and _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent parameters to findTreeElement so that parent frames will be searched. (WebInspector.DocumentPanel.updateBreadcrumb): - Changed while loop to for loop - Use _parentNodeOrFrameElementWithinPanel instead of Node.parentNode to move to the next node - The loop now ends when we reach the DocumentPanel's document node - Traversal past other Document nodes is now allowed - We add the "start" class to the final crumb after the loop exits (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper that returns the node itself if the node is a Document node, or the node's ownerDocument otherwise. (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel): Added. Returns the node's parent node or, in the case of a Document node, the node's window's owning frame element, but will not return a node that is in a parent frame of the DocumentPanel's Document. (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel): Added. Returns true if a is an ancestor of b if a is an ancestor of a frame element whose subframe(s) contain b. (WebInspector.DOMNodeTreeElement): We now consider ourselves to have children if we have a contentDocument. (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild loop into a function so that we can add both children of our contentDocument and children of our node to the tree. (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get the rootDOMNode by traversing the tree outline hierarchy instead of the DOM hierarchy so that we can easily jump up to a parent frame. 2008-03-12 Adam Roben Update the styles/metrics panes and breadcrumb after editing DOM attributes Reviewed by Tim. * page/inspector/DocumentPanel.js: (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update the parts of the DocumentPanel other than the DOM tree into a new function, _focusedNodeChanged. (WebInspector.DocumentPanel._focusedNodeChanged): Added. The forceUpdate parameter specifies whether the update should occur even if the focused node hasn't changed since the last update. (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate parameter. If forceUpdate is true, we always rebuild the breadcrumbs. (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate parameter. If forceUpdate is true, we always rebuild the styles pane. (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a call to DocumentPanel._focusedNodeChanged. We have to force the update because we haven't changed the focused node (the attributes of the node have changed). * page/inspector/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.update): Added a forceUpdate parameter. If forceUpdate is true we always rebuild the styles. 2008-03-12 Mark Rowe Further Gtk and Qt build fixes. * bridge/runtime.cpp: (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr. * page/gtk/FrameGtk.cpp: Add missing include. 2008-03-12 Mark Rowe Fix Gtk and Qt builds. * page/gtk/FrameGtk.cpp: * page/qt/FrameQt.cpp: 2008-03-12 Mark Rowe Mac build fix. * WebCore.base.exp: Remove symbol. 2008-03-12 Steve Falkenburg Build fix. * page/win/FrameWin.cpp: 2008-03-12 Steve Falkenburg Build fix. * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::bindingInstance): 2008-03-12 Darin Adler Reviewed by Anders. - http://bugs.webkit.org/show_bug.cgi?id=17640 eliminate WebCoreFrameBridge * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge to WebFrame in WebKit. * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted WebCoreFrameBridge.h and WebCoreFrameBridge.mm. * page/Frame.cpp: (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by the WebCoreFrameBridge. * page/Frame.h: Added initJavaJSBindings function. * page/mac/FrameMac.mm: (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge. (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function. * page/mac/WebCoreFrameBridge.h: Removed. * page/mac/WebCoreFrameBridge.mm: Removed. 2008-03-12 Sam Weinig Reviewed by Anders Carlsson. Don't go through the Document just to get the frame Element. * page/DOMWindow.cpp: (WebCore::DOMWindow::frameElement): 2008-03-12 Anders Carlsson Reviewed by Geoff and Sam. More Instance cleanup: * Make Instance inherit from RefCounted instead of doing its own refcounting. * Make all Instance subclasses private, add static create methods. * Have Instance start out with a refcount of 1. * Get rid of Instance::createBindingForLanguageInstance and call the individual instance constructor methods instead. * Fix many methods to take and return PassRefPtr to ensure that the refcounting is done correctly. * bridge/c/c_instance.h: (KJS::Bindings::CInstance::create): * bridge/c/c_utility.cpp: (KJS::Bindings::convertNPVariantToValue): * bridge/jni/jni_instance.cpp: (JavaInstance::invokeMethod): * bridge/jni/jni_instance.h: (KJS::Bindings::JavaInstance::create): * bridge/jni/jni_jsobject.cpp: (JavaJSObject::convertJObjectToValue): * bridge/jni/jni_runtime.cpp: (JavaField::valueFromInstance): (JavaArray::valueAt): * bridge/objc/objc_instance.h: (KJS::Bindings::ObjcInstance::create): * bridge/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue): * bridge/qt/qt_instance.cpp: (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp): (KJS::Bindings::QtInstance::getQtInstance): (KJS::Bindings::QtInstance::getRuntimeObject): * bridge/qt/qt_instance.h: * bridge/runtime.cpp: (KJS::Bindings::Instance::Instance): (KJS::Bindings::Instance::createRuntimeObject): * bridge/runtime.h: * bridge/runtime_object.cpp: (RuntimeObjectImp::RuntimeObjectImp): * bridge/runtime_object.h: * page/Frame.h: * page/mac/FrameMac.mm: (WebCore::Frame::createScriptInstanceForWidget): * page/win/FrameWin.cpp: (WebCore::Frame::createScriptInstanceForWidget): * plugins/PluginView.h: * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::bindingInstance): 2008-03-12 Dan Bernstein Suggested by Darin Adler. Reviewed by Dave Hyatt. - speed up BidiIterator::direction() * rendering/bidi.cpp: (WebCore::BidiIterator::current): Made inline and corrected the out-of-bounds condition to work with 0-length text and offsets beyond the end of the text. (WebCore::BidiIterator::direction): Changed to call current() and not call the virtual method isListMarker() most of the time. (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints. (WebCore::appendRunsForObject): Ditto. 2008-03-12 Adam Roben Make URLs not be underlined while editing them in the DOM view Reviewed by Tim. * page/inspector/inspector.css: 2008-03-12 Adam Roben Part of Bug 17224: DOM nodes/attributes should be editable We now start editing if the user single-clicks on an attribute, attribute value, or text node while the parent element is selected. Previously, we started editing on double-click regardless of the selection state of the element. URLs in the DOM tree are now followed on Alt/Option-click, rather than on just click. Reviewed by Tim. * English.lproj/InspectorLocalizedStrings.js: Added four new localized strings. * page/inspector/DocumentPanel.js: (WebInspector.DOMNodeTreeElement.onattach): Call new _makeURLSActivateOnModifiedClick. (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick): Added. Changes the tooltip of each link in this element to indicate that Alt/Option-click will follow the URL, and sets the followOnAltClick property on each link. (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being selected. (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently being selected, start editing. (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start editing here. We block re-rooting of the tree if we're currently editing. (WebInspector.DOMNodeTreeElement._startEditing): - Don't do anything if we're not focused - Pass the event down to _startEditingAttribute. (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do anything if the event target is a URL and the Alt/Option key is pressed -- in this case we want to follow the link. (WebInspector.DOMNodeTreeElement._updateTitle): Call _makeURLsActivateOnClick again since the anchor elements have all been recreated. * page/inspector/inspector.js: (WebInspector.documentClick): If the anchor as a followOnAltClick property and the Alt/Option key is not pressed, do nothing. 2008-03-12 Ada Chan Fixed the initial value of zoom factor. Reviewed by Adam. * page/Frame.cpp: (WebCore::FramePrivate::FramePrivate): 2008-03-12 David Hyatt Make full page zoom vaguely work. This patch uses the CSS transform system to turn on full page zoom at the document level. There are many many bugs that I'm going to file to track all the issues (most of the issues are just bugs with transforms themselves). Reviewed by Adam Roben * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): * dom/Document.cpp: (WebCore::Document::recalcStyle): * page/Frame.cpp: (WebCore::Frame::shouldApplyTextZoom): (WebCore::Frame::shouldApplyPageZoom): * page/Frame.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::setHasVisibleContent): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): * rendering/RenderLayer.h: 2008-03-12 David Hyatt Make the zoom factor a float and not a percent. Reviewed by antti * WebCore.base.exp: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): * page/Frame.cpp: (WebCore::Frame::zoomFactor): (WebCore::Frame::setZoomFactor): * page/Frame.h: * page/FramePrivate.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::currentScale): (WebCore::SVGSVGElement::setCurrentScale): 2008-03-12 David Hyatt Eliminate setTextMultiplier from the bridge. Make Webkit just call setZoomFactor on the frame directly. Reviewed by Tim H. * WebCore.base.exp: * page/mac/WebCoreFrameBridge.h: * page/mac/WebCoreFrameBridge.mm: 2008-03-12 Dan Bernstein Reviewed by Darin Adler and Sam Weinig. - use CoreText API instead of SPI on Leopard Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont and CTFontRef being toll-free bridged. * WebCore.Tiger.exp: * WebCore.base.exp: * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor. * platform/graphics/mac/FontPlatformData.h: Made m_cgFont a RetainPtr on Leopard. (WebCore::toCTFontRef): Added a function that encapsulates the toll-free bridging. (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::cgFont): Added this accessor method. * platform/graphics/mac/FontPlatformDataMac.mm: (WebCore::FontPlatformData::FontPlatformData): Changed to use CoreText API on Leopard. (WebCore::FontPlatformData::setFont): Ditto. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::initFontData): (WebCore::pathFromFont): (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformWidthForGlyph): * platform/mac/WebCoreSystemInterface.mm: 2008-03-12 David Harrison Reviewed by Darin. CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8 The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry. Also saw that cache clearing was missing from Document::detach(), and fixed that. Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected. Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled. * dom/Document.cpp: (WebCore::Document::attach): Assert that there is no AX cache (since there is no renderer). (WebCore::Document::detach): Destroy the AX cache installed on this document. (WebCore::Document::clearAXObjectCache): New. Destroy the AX cache associated with this document. (WebCore::Document::axObjectCache): Added some comments. * dom/Document.h: Declare clearAXObjectCache(). * page/Frame.cpp: (WebCore::Frame::disconnectOwnerElement): Destroy the AX cache associated with this frame's document. * page/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::remove): * page/mac/WebCoreAXObject.mm: (-[WebCoreAXObject initWithRenderer:]): (-[WebCoreAXObject detach]): * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): (WebCore::RenderObject::~RenderObject): * rendering/RenderObject.h: (WebCore::RenderObject::setHasAXObject): (WebCore::RenderObject::hasAXObject): Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::destroy): Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy(). 2008-03-12 Xan Lopez Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=15229 Add Pango font backend. Original patch by Sven Herzberg * GNUmakefile.am: * platform/graphics/gtk/FontCacheGtk.cpp: (WebCore::FontCache::fontExists): * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added. (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::FontCustomPlatformData::fontPlatformData): (WebCore::releaseData): (WebCore::createFontCustomPlatformData): * platform/graphics/gtk/FontPlatformData.h: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::hash): * platform/graphics/gtk/FontPlatformDataPango.cpp: Added. (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::init): (WebCore::FontPlatformData::~FontPlatformData): (WebCore::FontPlatformData::isFixedPitch): (WebCore::FontPlatformData::setFont): (WebCore::FontPlatformData::operator==): * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added. (WebCore::pango_font_get_glyph): (WebCore::GlyphPage::fill): * platform/graphics/gtk/SimpleFontDataPango.cpp: Added. (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformDestroy): (WebCore::SimpleFontData::smallCapsFontData): (WebCore::SimpleFontData::containsCharacters): (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::platformWidthForGlyph): (WebCore::SimpleFontData::setFont): 2008-03-12 Justin Garcia Reviewed by Oliver. Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list Fixes some (but not all) of the instances of: CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241 CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held the old endingSelection(), so we must recompute it. Added a FIXME. Added a few comments. * editing/RemoveFormatCommand.cpp: (WebCore::RemoveFormatCommand::doApply): Added a FIXME. 2008-03-11 Alexey Proskuryakov Reviewed by Darin. REGRESSION (Safari 2-3): Changing subframe encoding rules broke some sites. Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now: if the frame and subframe belong to the same site, then the encoding is inherited from parent frame to subframe. Otherwise, it is not. Always inheriting the encoding would cause a security problem. Tests: http/tests/misc/frame-default-enc-different-domain.html http/tests/misc/frame-default-enc-same-domain.html fast/encoding/frame-default-enc.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null - this function also has code that uses it without checking, so it must be safe. 2008-03-12 Mark Rowe Gtk build fix. * page/Frame.h: Forward-declare FramePrivate. 2008-03-11 Steve Falkenburg Disable LTCG/PGO for all of WebCore for now. We'll re-enable this as part of follow-on PGO work. Reviewed by Oliver. * WebCore.vcproj/WebCore.vcproj: 2008-03-11 Darin Adler Reviewed by Sam. - remove all bridge-related things from WebCore except the bridge itself * WebCore.base.exp: Removed the bridge and setBridge functions. * loader/FrameLoader.cpp: (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's close method. * page/Frame.cpp: (WebCore::Frame::~Frame): Removed call to setBridge(0). (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge. * page/Frame.h: Removed setBridge and bridge functions. * page/FramePrivate.h: Removed m_bridge pointer. * page/mac/FrameMac.mm: Removed setBridge and bridge functions. * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method. Removed bridgeForDOMDocument: and clearFrame methods. * page/mac/WebCoreFrameBridge.mm: Ditto. (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly. (-[WebCoreFrameBridge setWebCoreFrame:]): Added. 2008-03-11 Darin Adler - restored some code I removed in the Range change; this code can't go until the rest of the Range fix is in * dom/Range.cpp: (WebCore::Range::commonAncestorContainer): Added back the check for 0 that I removed erroneously in the Range patch. (WebCore::Range::processContents): Left in assertions I used to debug this. 2008-03-11 Darin Adler - fix Release build * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint. 2008-03-11 Darin Adler Reviewed by Anders. - simplify Mac code for ScrollView, since it's used only for FrameView and not in two different modes like it was historically - remove code depending on the bridge to get from an NSView to a WebCore::Frame * bindings/objc/DOMHTML.mm: (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView. * bridge/jni/jni_jsobject.cpp: (createRootObject): Instead of using WebCoreViewFactory to find the frame given and NSView, use the WebCoreFrameView interface to do it. * editing/mac/EditorMac.mm: (WebCore::Editor::paste): getDocumentView -> documentView. * editing/mac/SelectionControllerMac.mm: (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto. * page/FrameView.h: Fixed comment. * page/InspectorController.cpp: (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts to ScrollView* since FrameView is derived from ScrollView. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView. * page/mac/FrameMac.mm: (WebCore::Frame::imageFromRect): Ditto. * page/mac/WebCoreAXObject.mm: (-[WebCoreAXObject position]): Ditto. (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto. (-[WebCoreAXObject rendererForView:]): Updated code that used to use WebCoreBridgeHolder to use WebCoreFrameView instead. * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]): getDocumentView -> documentView. * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to WebCoreFrameScrollView, since it's a protocol for the scroll view, not the frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView protocol, which returns a WebCore::Frame directly rather than a bridge. * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method. * platform/ScrollView.h: Moved the constructor and destructor out of the class-specific #if blocks. Renamed Mac-specific function that gets the NSView for from getDocumentView to documentView and a scrollView function that returns an appropriately classed NSScrollView. * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView instead of Widget. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast. * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenu::show): getDocumentView -> documentView. * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::ScrollView): Added. (WebCore::ScrollView::~ScrollView): Added. (WebCore::ScrollView::scrollView): Added. (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case. (WebCore::ScrollView::visibleHeight): Ditto. (WebCore::ScrollView::visibleContentRect): Ditto. (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto. (WebCore::ScrollView::contentsWidth): Ditto. (WebCore::ScrollView::contentsHeight): Ditto. (WebCore::ScrollView::contentsX): Ditto. (WebCore::ScrollView::contentsY): Ditto. (WebCore::ScrollView::scrollOffset): Ditto. (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto. (WebCore::ScrollView::setContentsPos): Ditto. (WebCore::ScrollView::setVScrollbarMode): Ditto. (WebCore::ScrollView::setHScrollbarMode): Ditto. (WebCore::ScrollView::setScrollbarsMode): Ditto. (WebCore::ScrollView::vScrollbarMode): Ditto. (WebCore::ScrollView::hScrollbarMode): Ditto. (WebCore::ScrollView::suppressScrollbars): Ditto. (WebCore::ScrollView::addChild): Ditto. (WebCore::ScrollView::resizeContents): Ditto. (WebCore::ScrollView::updateContents): Ditto. (WebCore::ScrollView::contentsToWindow): Ditto. (WebCore::ScrollView::windowToContents): Ditto. (WebCore::ScrollView::setStaticBackground): Ditto. (WebCore::ScrollView::documentView): Renamed and removed unused case. (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment. * platform/mac/WidgetMac.mm: (WebCore::Widget::getOuterView): Update for protocol name change. * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView. (WebCore::RenderThemeMac::paintRadio): Ditto. (WebCore::RenderThemeMac::paintButton): Ditto. (WebCore::RenderThemeMac::paintMenuList): Ditto. (WebCore::RenderThemeMac::paintSliderThumb): Ditto. (WebCore::RenderThemeMac::paintSearchField): Ditto. (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto. (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto. (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto. 2008-03-11 Brent Fulgham Reviewed by Adam Roben. Split CookieJarWin.cpp into CFNet and non-CFNet versions to reduce the massive amount of conditionalization in the file. (see http://bugs.webkit.org/show_bug.cgi?id=17788) * WebCore.vcproj/WebCore.vcproj: * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp. (WebCore::setCookies): (WebCore::cookies): (WebCore::cookiesEnabled): * platform/network/win/CookieJarWin.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookiesEnabled): 2008-03-11 Darin Adler Reviewed by Sam. - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore * page/ChromeClient.h: Added new client functions to replace calls up to WebKit that were formerly handled by the bridge. * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific functions to a ScriptController section. Removed willPopupMenu. * page/mac/ChromeMac.mm: (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder via the client instead of the bridge. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder and makeFirstResponder via the chrome client instead of the bridge. * page/mac/FrameMac.mm: Removed willPopupMenu. * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and SubclassResponsibility category. Also removed some unneeded imports. * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame. * platform/mac/WidgetMac.mm: (WebCore::Widget::setIsSelected): Call functions directly on the view rather than calling via the bridge. 2008-03-11 Darin Adler Reviewed by Mitz. - make some Range improvements (preparation for Range support for DOM mutation) Made constructors private, added create functions. Made refcount start at 1 rather than starting at 0 and being incremented. Made Range use two Position objects for the start/end container/offset pairs. * WebCore.base.exp: Updated. * dom/Document.cpp: (WebCore::Document::createRange): Changed to use Range::create. (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change. * dom/Position.cpp: (WebCore::Position::formatForDebugger): Updated for member variable name change. (WebCore::Position::showTreeForThis): Ditto. (WebCore::startPosition): Changed to use Range::startPosition. (WebCore::endPosition): Changed to use Range::endPosition. * dom/Position.h: Made the data members public and renamed them to container and offset. But since offset() is already a function, temporarily used posOffset for the data member. Later we'll get rid of offset(). Made more functions inline. Removed the constructor that takes a PositionIterator. * dom/PositionIterator.cpp: (WebCore::PositionIterator::operator Position): Added. Replaces the constructor that used to be in Position. * dom/PositionIterator.h: Added conversion operator to produce a Position. Removed friend declaration for Position. * dom/Range.cpp: (WebCore::Range::Range): Updated constructors for data member changes and made them use a refcount of 1. (WebCore::Range::create): Added. (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached is now indicated by m_start.container of 0. Also updated to use m_start instead of the old m_startContainer. (WebCore::Range::startOffset): Ditto. (WebCore::Range::endContainer): Ditto. (WebCore::Range::endOffset): Ditto. (WebCore::Range::commonAncestorContainer): Ditto. (WebCore::Range::collapsed): Ditto. (WebCore::Range::setStart): Ditto. (WebCore::Range::setEnd): Ditto. (WebCore::Range::collapse): Ditto. (WebCore::Range::isPointInRange): Ditto. (WebCore::Range::comparePoint): Ditto. (WebCore::Range::compareNode): Ditto. (WebCore::Range::compareBoundaryPoints): Ditto. (WebCore::Range::boundaryPointsValid): Ditto. (WebCore::Range::deleteContents): Ditto. (WebCore::Range::intersectsNode): Ditto. (WebCore::Range::processContents): Ditto. (WebCore::Range::extractContents): Ditto. (WebCore::Range::cloneContents): Ditto. (WebCore::Range::insertNode): Ditto. (WebCore::Range::toString): Ditto. (WebCore::Range::text): Ditto. (WebCore::Range::createContextualFragment): Ditto. (WebCore::Range::detach): Ditto. (WebCore::Range::checkNodeBA): Changed to use switch statements instead of multiple calls to the virtual nodeType() function. (WebCore::Range::cloneRange): Ditto. (WebCore::Range::setStartAfter): Ditto. (WebCore::Range::setEndBefore): Ditto. (WebCore::Range::setEndAfter): Ditto. (WebCore::Range::selectNode): Ditto. (WebCore::Range::selectNodeContents): Ditto. (WebCore::Range::surroundContents): Ditto. (WebCore::Range::setStartBefore): Ditto. (WebCore::Range::checkDeleteExtract): Ditto. (WebCore::Range::containedByReadOnly): Ditto. (WebCore::Range::firstNode): Ditto. (WebCore::Range::editingStartPosition): Ditto. (WebCore::Range::pastLastNode): Ditto. (WebCore::Range::addLineBoxRects): Ditto. (WebCore::Range::formatForDebugger): Ditto. (WebCore::operator==): Ditto. (WebCore::rangeOfContents): Ditto. (WebCore::Range::maxStartOffset): Ditto. (WebCore::Range::maxEndOffset): Ditto. * dom/Range.h: Made constructors private. Added create functions. Added getters for startContainer/Offset and endContainer/Offset that return 0 instead of an exception for detached ranges that are inline and don't require an ExceptionCode out parameter. Changed the parameters to setStart and setEnd to PassRefPtr. Removed isDetached function. Made ActionType and processContents private. Made startPosition and endPosition inlines and have then return const&. Renamed startNode and pastEndNode to firstNode and pastLastNode to reduce the chance of confusion with startContainer/endContainer. Used Position for m_start and m_end instead of separate container and offset members. Changed maxStartOffset and maxEndOffset into int to match other offsets. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create. (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::inputText): Ditto. (WebCore::CompositeEditCommand::moveParagraphs): Ditto. * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto. * editing/Editor.cpp: (WebCore::Editor::fontForSelection): Changed for pastLastNode name change. (WebCore::Editor::setComposition): Changed to use Range::create. (WebCore::paragraphAlignedRangeForRange): Ditto. (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for isDetached and check for 0 from startContainer instead. (WebCore::Editor::compositionRange): Changed to use Range::create. * editing/EditorCommand.cpp: (WebCore::unionDOMRanges): Ditto. * editing/Selection.cpp: (WebCore::Selection::toRange): Ditto. * editing/TextIterator.cpp: (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode name change. (WebCore::TextIterator::range): Changed to use Range::create. (WebCore::SimplifiedBackwardsTextIterator::range): Ditto. (WebCore::TextIterator::subrange): Ditto. * editing/VisiblePosition.cpp: (WebCore::makeRange): Ditto. * editing/VisiblePosition.h: Added now-needed include. * editing/htmlediting.cpp: (WebCore::indexForVisiblePosition): Changed to use Range::create. (WebCore::avoidIntersectionWithNode): Changed to get rid of check for isDetached and check for 0 instead and to use Range::create. * editing/markup.cpp: (WebCore::renderedText): Changed to use Range::create. (WebCore::createMarkup): Changed to no longer use isDetached and also for new firstNode/pastEndNode names. (WebCore::createFragmentFromText): Ditto. * editing/visible_units.cpp: (WebCore::previousBoundary): Changed to use Range::create. * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use isDetached(). * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create. (WebCore::RenderTextControl::indexForVisiblePosition): Ditto. 2008-03-11 Daniel Zucker Reviewed by Adam Roben. There are a handful of placed where the use of CFNetwork-specific calls are protected by PLATFORM(CF). Revise to use the more specific USE(CFNETWORK) macro. (See http://bugs.webkit.org/show_bug.cgi?id=17783) * platform/network/ProtectionSpace.cpp: Change PLATFORM(CF) to USE(CFNETWORK) * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK) * platform/network/win/CookieJarWin.cpp: Correct error in InternetGetCookie call. Conditionalize 'cookiesEnabled' the same as all other implementations in this file. 2008-03-11 Xan Lopez Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16476 Add libsoup HTTP backend. * GNUmakefile.am: * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/soup/AuthenticationChallenge.h: Added. (WebCore::AuthenticationChallenge::AuthenticationChallenge): * platform/network/soup/ResourceError.h: Added. (WebCore::ResourceError::ResourceError): * platform/network/soup/ResourceHandleSoup.cpp: Added. (WebCore::ResourceHandleInternal::~ResourceHandleInternal): (WebCore::ResourceHandle::~ResourceHandle): (WebCore::dataCallback): (WebCore::parseDataUrl): (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::cancel): (WebCore::ResourceHandle::bufferedData): (WebCore::ResourceHandle::supportsBufferedData): (WebCore::ResourceHandle::setDefersLoading): (WebCore::ResourceHandle::loadsBlocked): (WebCore::ResourceHandle::willLoadFromCache): * platform/network/soup/ResourceRequest.h: Copied from WebCore/platform/network/curl/ResourceRequest.h. (WebCore::ResourceRequest::ResourceRequest): (WebCore::ResourceRequest::doUpdatePlatformRequest): * platform/network/soup/ResourceResponse.h: Added. (WebCore::ResourceResponse::ResourceResponse): (WebCore::ResourceResponse::setResponseFired): (WebCore::ResourceResponse::responseFired): (WebCore::ResourceResponse::doUpdateResourceResponse): 2008-03-11 Rodney Dawes Fix Qt build. * plugins/qt/PluginDataQt.cpp: (PluginData::initPlugins) 2008-03-11 Adam Roben Make attribute quoting in DOM view more consistent with source view Two changes which make the DOM view more consistent with source view: 1) We now quote all attribute values, including URLs 2) The quotes around the values are now purple, matching the left and right angle brackets that surround the tag One bug fixed by these changes: 1) The entire URL is selected for editing when you double-click a URL that is an attribute value. Previously, the first and last characters were not included in the selection. Reviewed by Darin. * page/inspector/DocumentPanel.js: (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't need to account for the quotes around attribute values anymore because the quotes are now outside the webkit-html-attribute-value span. * page/inspector/utilities.js: (nodeTitleInfo): Quote all attribute values, including URLs, and place the quotes outside the webkit-html-attribute-value span. 2008-03-11 Adam Roben Stop including pthread.h in WebCore on Windows Reviewed by Darin. * WebCore.vcproj/WebCore.vcproj: - Changed the include path to not contain pthreads/ - Let VS remove a duplicate FileConfiguration element - Let VS have its way with the file ordering * WebCorePrefix.h: Made the #include of pthread.h be compiled out on Windows. * loader/FTPDirectoryDocument.cpp: Added a Windows-specific #define of localtime_r (pthread.h was providing a macro that substituted plain old localtime before, but localtime_s is "more secure", so I went with that). * loader/FTPDirectoryParser.cpp: Ditto for gmtime_r. 2008-03-11 Adam Roben Roll out r30961 since it broke the default site icon on Windows * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::defaultIcon): 2008-03-11 Dan Bernstein Reviewed by Darin Adler. - clean up line layout code * platform/graphics/GraphicsContext.cpp: (WebCore::TextRunIterator::increment): Removed the resolver parameter. (WebCore::GraphicsContext::drawBidiText): Adjusted for changes to createBidiRunsForLine(), which no longer takes a start parameter. * platform/text/BidiResolver.h: (WebCore::BidiResolver::): Made Noncopyable and removed the m_adjustEmbedding member variable. (WebCore::BidiResolver::position): Added. Returns the resolver's current position. (WebCore::BidiResolver::setPosition): Added. Sets the resolver's current position without changing any other state. (WebCore::BidiResolver::increment): Added. Advances the resolver to the next position, allowing the iterator to push and pop embedding. (WebCore::BidiResolver::appendRun): Removed the resolver parameter in the call to increment(). (WebCore::BidiResolver::embed): Removed code to save, set and restore m_adjustEmbedding. (WebCore::BidiResolver::createBidiRunsForLine): Changed to not take a 'start' iterator. Instead, start at the current position. Removed code to set m_adjustEmbedding. Changed for noncopyability. * rendering/RenderBlock.h: * rendering/bidi.cpp: (WebCore::bidiNext): Made the resolver parameter optional. Changed to null-check the 'end of inline' pointer only twice. (WebCore::bidiFirst): Made the resolver parameter optional. (WebCore::BidiIterator::increment): Ditto. (WebCore::BidiState::increment): Added. Overrides the default BidiResolver::increment() method by passing the resolver to BidiIterator::increment(). (WebCore::checkMidpoints): Removed the resolver parameter. (WebCore::BidiState::appendRun): Removed code to save, set and restore m_adjustEmbedding. Adjusted for change to increment(). (WebCore::RenderBlock::bidiReorderLine): Removed the 'start' parameter and unreachable code. (WebCore::buildCompactRuns): Adjusted for changes to BidiResolver/ (WebCore::RenderBlock::layoutInlineChildren): Moved code to initialize the resolver from this method to determineStartPosition(). Unified the resolver with the 'start' iterator. Removed unreachable code. Moved one statement from the beginning of the while loop to the end. (WebCore::RenderBlock::determineStartPosition): Moved code to initialize the resolver from layoutInlineChildren() into this method. (WebCore::RenderBlock::matchedEndLine): Adjusted for the resolver and the 'start' iterator being one object. (WebCore::skipNonBreakingSpace): Made the parameter const. (WebCore::requiresLineBox): Ditto. (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Adjusted for the change to BidiIterator::increment(). (WebCore::RenderBlock::skipWhitespace): Made two versions of this method, one for BidiIterator and one for BidiState. (WebCore::shouldSkipWhitespaceAfterStartObject): Removed the resolver parameter. (WebCore::RenderBlock::findNextLineBreak): Removed the resolver parameter. Removed calls to setAdjustEmbedding(). Removed the 'previous' variable and changed the 'last' variable to do its job. * rendering/bidi.h: 2008-03-10 Adam Roben Part of Bug 17224: DOM nodes/attributes should be editable This patch makes text nodes editable via double-click. Reviewed by Tim. * page/inspector/DocumentPanel.js: (WebInspector.DOMNodeTreeElement._startEditing): - Moved most of this code to _startEditingAttribute - Calls _startEditingTextNode or _startEditingAttribute as appropriate (WebInspector.DOMNodeTreeElement._startEditingAttribute): Added. Code came from _startEditing. (WebInspector.DOMNodeTreeElement._startEditingTextNode): Added. (WebInspector.DOMNodeTreeElement._textNodeEditingCommitted): Added. (WebInspector.DOMNodeTreeElement._editingCancelled): Renamed from _attributeEditingCancelled. * page/inspector/utilities.js: (nodeTitleInfo): Wrap text nodes in a webkit-html-text-node span so that we can easily recognize/edit them. 2008-03-11 Holger Hans Peter Freyther Reviewed by Darin. r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing to theme this icon and the Gtk+ platform will probably end up with themable icons as well. Remove dead code from the windows port and move the urlIcon from the windows directory to the Resource directory to be used by Qt and other ports. Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but once it does it wants to use this for getting the urlIcon as well. * Resources/urlIcon.png: Renamed from WebKit/win/WebKit.vcproj/urlIcon.png. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::defaultIcon): 2008-03-11 Tor Arne Vestbø Reviewed by Darin. Implemented HTML media element support for QtWebKit, using Phonon. http://bugs.webkit.org/show_bug.cgi?id=17766 * WebCore.pro: * platform/graphics/MediaPlayer.cpp: * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Added. (debugMediaObject): (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::getSupportedTypes): (WebCore::MediaPlayerPrivate::hasVideo): (WebCore::MediaPlayerPrivate::load): (WebCore::MediaPlayerPrivate::cancelLoad): (WebCore::MediaPlayerPrivate::play): (WebCore::MediaPlayerPrivate::pause): (WebCore::MediaPlayerPrivate::paused): (WebCore::MediaPlayerPrivate::seek): (WebCore::MediaPlayerPrivate::seeking): (WebCore::MediaPlayerPrivate::duration): (WebCore::MediaPlayerPrivate::currentTime): (WebCore::MediaPlayerPrivate::setEndTime): (WebCore::MediaPlayerPrivate::maxTimeBuffered): (WebCore::MediaPlayerPrivate::maxTimeSeekable): (WebCore::MediaPlayerPrivate::bytesLoaded): (WebCore::MediaPlayerPrivate::totalBytesKnown): (WebCore::MediaPlayerPrivate::totalBytes): (WebCore::MediaPlayerPrivate::setRate): (WebCore::MediaPlayerPrivate::setVolume): (WebCore::MediaPlayerPrivate::setMuted): (WebCore::MediaPlayerPrivate::dataRate): (WebCore::MediaPlayerPrivate::networkState): (WebCore::MediaPlayerPrivate::readyState): (WebCore::MediaPlayerPrivate::updateStates): (WebCore::MediaPlayerPrivate::setVisible): (WebCore::MediaPlayerPrivate::setRect): (WebCore::MediaPlayerPrivate::loadStateChanged): (WebCore::MediaPlayerPrivate::rateChanged): (WebCore::MediaPlayerPrivate::sizeChanged): (WebCore::MediaPlayerPrivate::timeChanged): (WebCore::MediaPlayerPrivate::volumeChanged): (WebCore::MediaPlayerPrivate::didEnd): (WebCore::MediaPlayerPrivate::loadingFailed): (WebCore::MediaPlayerPrivate::naturalSize): (WebCore::MediaPlayerPrivate::eventFilter): (WebCore::MediaPlayerPrivate::repaint): (WebCore::MediaPlayerPrivate::paint): (WebCore::MediaPlayerPrivate::stateChanged): (WebCore::MediaPlayerPrivate::tick): (WebCore::MediaPlayerPrivate::metaDataChanged): (WebCore::MediaPlayerPrivate::seekableChanged): (WebCore::MediaPlayerPrivate::hasVideoChanged): (WebCore::MediaPlayerPrivate::bufferStatus): (WebCore::MediaPlayerPrivate::finished): (WebCore::MediaPlayerPrivate::currentSourceChanged): (WebCore::MediaPlayerPrivate::aboutToFinish): (WebCore::MediaPlayerPrivate::prefinishMarkReached): (WebCore::MediaPlayerPrivate::totalTimeChanged): * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Added. (WebCore::MediaPlayerPrivate::): (WebCore::MediaPlayerPrivate::isAvailable): 2008-03-10 Sam Weinig Reviewed by Beth Dakin. Throw a SECURITY_ERR when accessing a tainted canvas by CanvasRenderingContext2D::getImageData() and HTMLCanvasElement::toDataURL(). * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::getImageData): * html/CanvasRenderingContext2D.h: * html/CanvasRenderingContext2D.idl: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::toDataURL): * html/HTMLCanvasElement.h: * html/HTMLCanvasElement.idl: 2008-03-10 Justin Garcia Reviewed by Sam. REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::hasCSSPropertyNamePrefix): Fixed a typo. The code was only comparing the first character of the prefix to the first character of the property name. 2008-03-10 Andre Boule Reviewed by Beth. Hold off on initializing the frame to avoid the RenderView getting a null FrameView. This could potentially cause problems. * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): 2008-03-10 Darin Adler - try to fix Qt build * bridge/qt/qt_runtime.cpp: (KJS::Bindings::convertQVariantToValue): Change KJS::UChar to UChar. 2008-03-10 Darin Adler Reviewed by Antti. - fix VIP: links opened in new frame, window, or tab should be redrawn as visited immediately - fix Going "back" a page doesn't change the color of the visited URL at directory.umi - fix http://bugs.webkit.org/show_bug.cgi?id=4941 Visited links should be marked as visited - fix http://bugs.webkit.org/show_bug.cgi?id=7960 REGRESSION: Visited link color doesn't displayed after loading page from cache We now mark all links on a page as "changed" at the appropriate times. * WebCore.base.exp: Update since I made completeURL be a const member function. * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned into locals. Also changed some static data members to file-scoped globals with internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the prefix on m_styleNotYetAvailable to s_styleNotYetAvailable. (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes. (WebCore::parseUASheet): Tweak the comment. (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to use local variables instead of globals where possible. (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so it can store the link in a hash. Also changed it to have a return value instead of having it modify a global variable. Added code to put the hash into a set so we can tell later if this is one of the links that affects this page. (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to checkPseudoState. (WebCore::CSSStyleSelector::matchUARules): Updated for name changes. (WebCore::CSSStyleSelector::styleForElement): Ditto. (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto. (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read the SVG style sheet to use a boolean global and put it right here in the function since this is the only code that needs to know about it. (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes. (WebCore::colorForCSSValue): Moved code inside the function that is not needed anywhere else. (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change to checkPseudoState. (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on all links if there were any in the set. (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all links if the one that changed is in the set. * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made CSSStyleSelector derive from Noncopyable. Made lots of member functions private that didn't need to be public, and removed others that could be made into non-member functions. Changed pseudoStyleRulesForElement to take a const String& instead of a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions. Got rid of unneeded friend declarations. * dom/Document.cpp: (WebCore::Document::completeURL): Made const. (WebCore::findSlashDotDotSlash): Moved here from PageGroup. (WebCore::findSlashSlash): Ditto. (WebCore::findSlashDotSlash): Ditto. (WebCore::containsColonSlashSlash): (WebCore::cleanPath): Ditto. (WebCore::matchLetter): Ditto. (WebCore::needsTrailingSlash): Ditto. (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is the poor-man's completeURL function. The idea of putting it here is that this way it can be alongside the real completeURL function. Later we should figure out a way to make this function share more code with the real thing and match behavior. * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function. * page/DOMWindow.cpp: (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector. * page/Page.cpp: (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all style selectors. (WebCore::Page::visitedStateChanged): Ditto. * page/Page.h: Added the above functions. * page/PageGroup.cpp: (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter. The CSSStyleSelector now handles actually computing the hash, and it does so by calling code in Document. (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share a bit more code. Added code that calls visitedStateChanged if a new link was added. (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged if any visited links are removed. * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct definition here. * platform/text/StringHash.h: (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with the StringImpl::computeHash function, using the same technique for avoiding 0. (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h. (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp. * rendering/RenderStyle.cpp: (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead of getting directly at a data member so the data member could be made private. * loader/FrameLoader.cpp: (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll. (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added. * loader/FrameLoader.h: Added updateHistoryForAnchorScroll. 2008-03-10 Adam Roben Part of Bug 17224: DOM nodes/attributes should be editable This patch makes DOM attributes editable via double-click. Reviewed by Tim. * page/inspector/DocumentPanel.js: (WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if we're being edited, since we want default editing behaviors to work. (WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing before doing anything else. (WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only lets you edit attributes. (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added. Uses a scratch element to get the new attribute(s) parsed, then sets the attribute(s) on the node in the inspected document. (WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added. (WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the representation of the node in the Inspector's DOM tree to reflect the node's current state. * page/inspector/inspector.css: Made the .editing class apply everywhere. * page/inspector/utilities.js: (nodeTitleInfo): Changed to surround attribute name/value pairs in a webkit-html-attribute span so that we can easily edit the pair as a whole. 2008-03-10 David Kilzer Fix 64-bit builds. Reviewed by Stephanie. WebCore.exp only gets generated once for both 32-bit and 64-bit builds, so we must exclude the _NPN symbols when creating WebCore.LP64.exp. * WebCore.xcodeproj/project.pbxproj: Reverted build phase shell code to r30826 to remove _NPN symbols from 64-bit builds in WebCore.LP64.exp. 2008-03-10 Eric Seidel Reviewed by Darin. Remove KJS::UChar, use ::UChar instead http://bugs.webkit.org/show_bug.cgi?id=17017 To functional changes, thus no tests. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::hasCSSPropertyNamePrefix): (WebCore::cssPropertyName): * bindings/js/JSDOMWindowBase.cpp: (WebCore::windowProtoFuncAToB): (WebCore::windowProtoFuncBToA): * bindings/js/JSSVGPODTypeWrapper.h: * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate): * bridge/objc/objc_utility.mm: (KJS::Bindings::throwError): * dom/Document.cpp: (WebCore::Document::parseQualifiedName): * platform/text/AtomicString.cpp: (WebCore::AtomicString::add): * platform/text/String.cpp: (WebCore::String::String): (WebCore::String::operator Identifier): (WebCore::String::operator UString): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decode): * svg/SVGAnimatedTemplate.h: 2008-03-10 Darin Adler Reviewed by Sam. - eliminate keyboard UI mode method from WebCoreFrameBridge * page/ChromeClient.h: Added keyboardUIMode function. (WebCore::ChromeClient::keyboardUIMode): Ditto. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::tabsToAllControls): Call chrome client function instead of bridge function. * page/mac/WebCoreFrameBridge.h: Removed keyboardUIMode method, and other unused ones. * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to change the project. Do not try to fight the Xcode. 2008-03-10 Darin Adler - oops, forgot to save last couple changes from the editor * bindings/js/JSDOMWindowCustom.cpp: (WebCore::markDOMObjectWrapper): Tweaked a tiny bit. (WebCore::JSDOMWindow::mark): Sorted alphabetically. 2008-03-10 Darin Adler Reviewed by Geoff. - fix failing regression test (window.navigator is getting garbage collected and thus losing its custom properties) * bindings/js/JSDOMWindowCustom.cpp: (WebCore::markDOMObject): Added helper function. (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang off the window object. * page/DOMWindow.h: (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without creating it if it's already there. (WebCore::DOMWindow::optionalSelection): Ditto. (WebCore::DOMWindow::optionalHistory): Ditto. (WebCore::DOMWindow::optionalLocationbar): Ditto. (WebCore::DOMWindow::optionalMenubar): Ditto. (WebCore::DOMWindow::optionalPersonalbar): Ditto. (WebCore::DOMWindow::optionalScrollbars): Ditto. (WebCore::DOMWindow::optionalStatusbar): Ditto. (WebCore::DOMWindow::optionalToolbar): Ditto. (WebCore::DOMWindow::optionalConsole): Ditto. (WebCore::DOMWindow::optionalNavigator): Ditto. * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in alphabetical order since there are a lot of them. 2008-03-10 Darin Adler Reviewed by Sam. - eliminate Java applet methods from WebCoreFrameBridge * loader/FrameLoaderClient.h: Added a javaApplet function. * page/mac/FrameMac.mm: (WebCore::Frame::createScriptInstanceForWidget): Streamlined the code. Use the loader client instead of the bridge to get the applet. * page/mac/WebCoreFrameBridge.h: Removed the getAppletInView and pollForAppletInView methods. Also removed other unused things. 2008-03-10 Marc-Antoine Ruel Reviewed by Eric, landed by Darin. http://bugs.webkit.org/show_bug.cgi?id=16095 Move GraphicsContextPrivate to its own header file. Moves GraphicsContextState and GraphicsContextPrivate to its own header * WebCore.vcproj/WebCore.vcproj: * platform/graphics/GraphicsContext.cpp: * platform/graphics/GraphicsContextPrivate.h: Added. (WebCore::GraphicsContextState::GraphicsContextState): (WebCore::GraphicsContextPrivate::GraphicsContextPrivate): 2008-03-10 Julien Chaffraix Reviewed and landed by Darin. bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR. * bindings/js/kjs_binding.cpp: (WebCore::setDOMException): Removed PERMISSION_DENIED code. * dom/ExceptionCode.cpp: Added SECURITY_ERR exception. * dom/ExceptionCode.h: Ditto. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now. * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED. 2008-03-09 Adam Roben Refactor CSS editing code so we can share it with DOM editing Add WebInspector.startEditing, which takes the element to be edited, a committedCallback, a cancelledCallback, and a context parameter. This function takes care of setting up the element for editing, and calls either the cancelledCallback or committedCallback when editing ends. Reviewed by Tim. * page/inspector/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.startEditing): - Call WebInspector.isBeingEdited and WebInspector.startEditing - Removed code now handled by WebInspector.startEditing (WebInspector.StylePropertyTreeElement.editingEnded): - Renamed from endEditing - Removed code now handled by WebInspector.startEditing (WebInspector.StylePropertyTreeElement.editingCancelled): - Renamed from cancelEditing - Changed parameters to match WebInspector.startEditing's cancelledCallback (WebInspector.StylePropertyTreeElement.editingCommitted): - Renamed from commitEditing - Changed parameters to match WebInspector.startEditing's committedCallback * page/inspector/inspector.js: (WebInspector.changeFocus): Changed a call to firstParentWithClassName to firstParentOrSelfWithClassName so that if the focusable element itself is the target it will be recognized. I don't know why this change wasn't needed before this. (WebInspector.isBeingEdited): Added. (WebInspector.startEditing): Added. 2008-03-10 Adam Roben Windows build fix * WebCore.vcproj/WebCore.vcproj: Pick up generated source files out of $(WebKitOutputDir) instead of hard-coding WebKitBuild. 2008-03-10 Darin Adler * DerivedSources.make: Merge plug-in-related changes with the new way of handling autogenerated DOM classes. 2008-03-10 Johnny Ding Reviewed, tweaked and landed by Alexey. - fix http://bugs.webkit.org/show_bug.cgi?id=17732 We didn't have a fallback to frame encoding in the case of loading a script via changing its src attribute. Test: fast/dom/HTMLScriptElement/script-decoding-error-after-setting-src.html * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseMappedAttribute): Use a helper function to get proper charset for correct decoding of script content. (WebCore::HTMLScriptElement::insertedIntoDocument): (WebCore::HTMLScriptElement::scriptCharset): A helper function for getting proper charset for the script (as much as can be determined prior to loading it). * html/HTMLScriptElement.h: * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): Use a helper function to get proper charset for correct decoding of script content. 2008-03-10 Simon Hausmann Reviewed by Lars. Fix reference counting of returned MimeType and Plugin objects created in the array wrappers. * plugins/MimeTypeArray.cpp: * plugins/MimeTypeArray.h: * plugins/Plugin.cpp: * plugins/Plugin.h: * plugins/PluginArray.cpp: * plugins/PluginArray.h: 2008-03-10 Simon Hausmann Wx linking fix. Added missing stubs for PluginData. * platform/wx/TemporaryLinkStubs.cpp: 2008-03-10 Simon Hausmann Windows build fix that I forgot to merge earlier ;( Forward declare Page as class, not struct. * plugins/PluginData.h: 2008-03-10 Simon Hausmann Attempt to fix the Wx build. * WebCoreSources.bkl: 2008-03-07 Simon Hausmann Reviewed by Darin. Done with Lars. http://bugs.webkit.org/show_bug.cgi?id=16815 Ported the manually written JS bindings of window.navigator, window.navigator.plugins and window.navigator.mimeTypes to auto-generated bindings. Moved the globally cached plugin and mimetype information to a per WebCore::Page shared PluginData structure. Implemented window.navigator.plugins.refresh() in a platform-independent way. * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::getValueProperty): * bindings/js/JSMimeTypeArrayCustom.cpp: Added. (WebCore::JSMimeTypeArray::canGetItemsForName): (WebCore::JSMimeTypeArray::nameGetter): * bindings/js/JSNavigatorCustom.cpp: Added. (WebCore::needsYouTubeQuirk): (WebCore::JSNavigator::appVersion): * bindings/js/JSPluginArrayCustom.cpp: Added. (WebCore::JSPluginArray::canGetItemsForName): (WebCore::JSPluginArray::nameGetter): * bindings/js/JSPluginCustom.cpp: Added. (WebCore::JSPlugin::canGetItemsForName): (WebCore::JSPlugin::nameGetter): * bindings/js/kjs_navigator.cpp: Removed. * bindings/js/kjs_navigator.h: Removed. * dom/Clipboard.cpp: * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): * loader/FrameLoader.cpp: (WebCore::FrameLoader::shouldUsePlugin): * page/DOMWindow.cpp: (WebCore::DOMWindow::clear): (WebCore::DOMWindow::navigator): * page/DOMWindow.h: * page/DOMWindow.idl: * page/DragController.cpp: * page/Frame.cpp: * page/Frame.h: * page/Navigator.cpp: Added. (WebCore::Navigator::Navigator): (WebCore::Navigator::~Navigator): (WebCore::Navigator::disconnectFrame): (WebCore::Navigator::appCodeName): (WebCore::Navigator::appName): (WebCore::Navigator::appVersion): (WebCore::Navigator::language): (WebCore::Navigator::userAgent): (WebCore::Navigator::platform): (WebCore::Navigator::plugins): (WebCore::Navigator::mimeTypes): (WebCore::Navigator::product): (WebCore::Navigator::productSub): (WebCore::Navigator::vendor): (WebCore::Navigator::vendorSub): (WebCore::Navigator::cookieEnabled): (WebCore::Navigator::javaEnabled): * page/Navigator.h: Added. (WebCore::Navigator::create): (WebCore::Navigator::frame): * page/Navigator.idl: Added. * page/Page.cpp: (WebCore::Page::refreshPlugins): (WebCore::Page::pluginData): * page/Page.h: * page/Plugin.h: Removed. * page/mac/FrameMac.mm: * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge canProvideDocumentSource]): * page/mac/WebCoreViewFactory.h: * page/qt/FrameQt.cpp: * page/win/FrameWin.cpp: * platform/gtk/TemporaryLinkStubs.cpp: * platform/mac/PlugInInfoStoreMac.mm: Removed. * platform/qt/MIMETypeRegistryQt.cpp: (WebCore::MIMETypeRegistry::getMIMETypeForExtension): * plugins/MimeType.cpp: Added. (WebCore::MimeType::MimeType): (WebCore::MimeType::~MimeType): (WebCore::MimeType::type): (WebCore::MimeType::suffixes): (WebCore::MimeType::description): (WebCore::MimeType::enabledPlugin): * plugins/MimeType.h: Added. (WebCore::MimeType::create): * plugins/MimeType.idl: Added. * plugins/MimeTypeArray.cpp: Added. (WebCore::MimeTypeArray::MimeTypeArray): (WebCore::MimeTypeArray::~MimeTypeArray): (WebCore::MimeTypeArray::length): (WebCore::MimeTypeArray::item): (WebCore::MimeTypeArray::canGetItemsForName): (WebCore::MimeTypeArray::nameGetter): (WebCore::MimeTypeArray::getPluginData): * plugins/MimeTypeArray.h: Added. (WebCore::MimeTypeArray::create): (WebCore::MimeTypeArray::disconnectFrame): * plugins/MimeTypeArray.idl: Added. * plugins/Plugin.cpp: Added. (WebCore::Plugin::Plugin): (WebCore::Plugin::~Plugin): (WebCore::Plugin::name): (WebCore::Plugin::filename): (WebCore::Plugin::description): (WebCore::Plugin::length): (WebCore::Plugin::item): (WebCore::Plugin::canGetItemsForName): (WebCore::Plugin::nameGetter): * plugins/Plugin.h: Added. (WebCore::Plugin::create): * plugins/Plugin.idl: Added. * plugins/PluginArray.cpp: Added. (WebCore::PluginArray::PluginArray): (WebCore::PluginArray::~PluginArray): (WebCore::PluginArray::length): (WebCore::PluginArray::item): (WebCore::PluginArray::canGetItemsForName): (WebCore::PluginArray::nameGetter): (WebCore::PluginArray::refresh): (WebCore::PluginArray::getPluginData): * plugins/PluginArray.h: Added. (WebCore::PluginArray::create): (WebCore::PluginArray::disconnectFrame): * plugins/PluginArray.idl: Added. * plugins/PluginData.cpp: Added. (WebCore::PluginData::PluginData): (WebCore::PluginData::~PluginData): (WebCore::PluginData::supportsMimeType): (WebCore::PluginData::pluginNameForMimeType): * plugins/PluginData.h: Added. (WebCore::PluginData::create): (WebCore::PluginData::disconnectPage): (WebCore::PluginData::page): (WebCore::PluginData::plugins): (WebCore::PluginData::mimes): * plugins/mac/PluginDataMac.mm: Added. (WebCore::PluginData::initPlugins): (WebCore::PluginData::refresh): * plugins/qt/PluginDataQt.cpp: Added. (WebCore::PluginData::initPlugins): * plugins/win/PluginDataWin.cpp: Added. (WebCore::PluginData::initPlugins): (WebCore::PluginData::refresh): 2008-03-10 Simon Hausmann Reviewed by Holger. Replace two printfs() in the Qt port with notImplemented(). * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::applyStrokePattern): (WebCore::CanvasRenderingContext2D::applyFillPattern): 2008-03-10 Simon Hausmann Reviewed by Alp. Compilation fix with gcc 4.3: Include stdio.h for printf. * html/CanvasRenderingContext2D.cpp: * html/HTMLCanvasElement.cpp: 2008-03-09 Steve Falkenburg Stop Windows build if an error occurs in a prior project. Rubber stamped by Darin. * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreGenerated.vcproj: 2008-03-09 Darin Adler * DerivedSources.make: Third try at fixing the build. * bindings/js/JSRGBColor.cpp: And touching this file. 2008-03-09 Darin Adler * DerivedSources.make: One *more* try at fixing the build. 2008-03-09 Darin Adler * DerivedSources.make: One more try at fixing the build. 2008-03-09 Darin Adler * DerivedSources.make: Re-land the change, fixed, and with an attempt to fix the bots by removing the incorrect file. 2008-03-09 Oliver Hunt RS=Mark Rowe Roll out r30909 -- it breaks the build and is a non-trivial fix (according to weinig) * DerivedSources.make: 2008-03-09 Darin Adler Reviewed by Adam. * DerivedSources.make: Put the list of DOM classes into its own variable, and generate the JavaScript bindings and Objective-C bindings dependencies from that. Added some separators to make it a little easier to see the sections of the file. Moved all the Mac-specific rules (except for the SVG conditional part) down to the bottom of the file in a separate section. 2008-03-09 Adam Roben Windows build fix * WebCore.vcproj/WebCore.vcproj: Make sure all Cairo files are excluded from all three CG-based configurations: Debug, Release, and Debug_Internal. 2008-03-08 Mark Rowe Attempt to fix the Qt build. * platform/MIMETypeRegistry.cpp: Add missing include. 2008-03-08 Oliver Hunt Reviewed by Sam W. Bug 16516: canvas image patterns stop working with some transformations Simple fix. We used x/yStep of FLT_MAX to fake a no-repeat-x/y pattern with CG. However any transforms involving FLT_MAX immediately get consumed by the introduced floating point error. yStep had already been clamped to a much smaller arbitrary value, and this patch makes us use that clamp value for xStep as well. * html/CanvasPattern.cpp: (WebCore::CanvasPattern::createPattern): 2008-03-08 Oliver Hunt Reviewed by Mitz. Bug 17728: Canvas.createPattern with null repeat argument throws an exception Trivial fix, we were calling toString on null which produces the string "null", we just needed to switch to using valueToStringWithNullCheck rather than JSValue::toString directly Test: fast/canvas/canvas-pattern-behaviour.html * WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::createPattern): 2008-03-08 Mark Rowe Reviewed by Darin Adler. Fix 64-bit build with GCC 4.2. * bindings/objc/WebScriptObject.mm: Use NSUInteger in place of unsigned where required. * platform/mac/SharedBufferMac.mm: Ditto. 2008-03-08 Dan Bernstein Reviewed by Oliver Hunt. - fix garbage in transparent areas in canvas.toDataURL results * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::toDataURL): Clear the bitmap context before painting the canvas image onto it. 2008-03-08 Darin Adler Reviewed by Adele. - eliminate custom highlight methods from WebCoreFrameBridge * page/Chrome.cpp: (WebCore::ChromeClient::customHighlightRect): Added. (WebCore::ChromeClient::paintCustomHighlight): Added. * page/ChromeClient.h: Added custom highlight functions. * page/Frame.h: Removed custom highlight functions. * page/mac/FrameMac.mm: Ditto. * page/mac/WebCoreFrameBridge.h: Removed custom highlight methods. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintCustomHighlight): Changed code to use the ChromeClient instead of WebCoreFrameBridge to do the custom highlight. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintCustomHighlight): Ditto. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::addHighlightOverflow): Ditto. (WebCore::RootInlineBox::paintCustomHighlight): Ditto. 2008-03-07 Stephanie Lewis Reviewed by Oliver. Fix Windows build. * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::toDataURL): 2008-03-07 David D. Kilzer Unify concept of enabling Netscape Plug-in API (NPAPI). Reviewed by Darin. No test cases since there is no change in functionality. * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro. If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES. * WebCore.NPAPI.exp: Added. * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp. * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except comments) since we now handle exported NPAPI methods via DerivedSources.make. * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h. * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API). (-[DOMElement _NPObject]): * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with ENABLE(NETSCAPE_PLUGIN_API). * bridge/NP_jsobject.h: Ditto. * bridge/c/c_class.cpp: Ditto. * bridge/c/c_class.h: Ditto. * bridge/c/c_instance.cpp: Ditto. * bridge/c/c_instance.h: Ditto. * bridge/c/c_runtime.cpp: Ditto. * bridge/c/c_runtime.h: Ditto. * bridge/c/c_utility.cpp: Ditto. * bridge/c/c_utility.h: Ditto. * bridge/npruntime.cpp: Ditto. * bridge/npruntime_impl.h: Ditto. * bridge/npruntime_priv.h: Ditto. * bridge/runtime.cpp: Ditto. (KJS::Bindings::Instance::createBindingForLanguageInstance): * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API). (WebCore::HTMLPlugInElement::HTMLPlugInElement): (WebCore::HTMLPlugInElement::~HTMLPlugInElement): * html/HTMLPlugInElement.h: Ditto. * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API). (WebCore::Frame::clearScriptObjects): (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API) guard around m_windowScriptNPObject. * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API). * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around m_windowScriptNPObject. * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API). (WebCore::Frame::createScriptInstanceForWidget): 2008-03-07 Alexey Proskuryakov Reviewed by Darin. REGRESSION: Korean decoding doesn't support extended EUC-KR. Test: fast/encoding/char-decoding.html * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerExtendedEncodingNames): Untangle the system of duplicate ICU encoding names by manually registering windows-939-2000, and mapping all other related encodings to it. 2008-03-07 Dan Bernstein Reviewed by Stephanie. - try to fix leaks seen on Tiger after r30840 * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::~CSSStyleSelector): Use the default operator delete, rather than arena delete, to deallocate the root default style. 2008-03-07 Pierre-Luc Beaudoin Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=17681 GtkLauncher fails to render an element with position: fixed Implement the required parts of PlatformScreenGtk. * ChangeLog: * platform/gtk/PlatformScreenGtk.cpp: (WebCore::screenDepth): (WebCore::screenIsMonochrome): (WebCore::screenRect): 2008-03-07 Oliver Hunt Reviewed by Darin Adler. Bug 16610: restore() removes path segments created before it The problem here is that WebKit stored the Path as part of the state, so restore would incorrectly lose changes made to the canvas path. To match Firefox and HTML5 we make two real changes: * Move the context path from the state object directly onto the context. This is responsible for all the changes to the path manipulation functions * Add transform tracking to each state -- this is needed to correctly transform the current path when restore()-ing to a prior state. Test: fast/canvas/canvas-save-restore-with-path.html * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::restore): (WebCore::CanvasRenderingContext2D::scale): (WebCore::CanvasRenderingContext2D::rotate): (WebCore::CanvasRenderingContext2D::translate): (WebCore::CanvasRenderingContext2D::transform): (WebCore::CanvasRenderingContext2D::beginPath): (WebCore::CanvasRenderingContext2D::closePath): (WebCore::CanvasRenderingContext2D::moveTo): (WebCore::CanvasRenderingContext2D::lineTo): (WebCore::CanvasRenderingContext2D::quadraticCurveTo): (WebCore::CanvasRenderingContext2D::arcTo): (WebCore::CanvasRenderingContext2D::arc): (WebCore::CanvasRenderingContext2D::rect): (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode): (WebCore::CanvasRenderingContext2D::fill): (WebCore::CanvasRenderingContext2D::stroke): (WebCore::CanvasRenderingContext2D::clip): (WebCore::CanvasRenderingContext2D::isPointInPath): * html/CanvasRenderingContext2D.h: 2008-03-07 Oliver Hunt Reviewed by Ada. Fix for crash caused by FrameLoader incorrectly assuming it has a RenderWidget In some circumstances an application embedding a WebView may choose to prevent a webview from loading a resource. If that resource was requested by an element then we may fallback to different content which may not produce a RenderWidget. Unfortunately FrameLoader::loadSubframe was assuming that if a renderer was produced it would always be a RenderWidget, and arbitrarily performed what could be an incorrect cast. This could then lead to a crash. We currently don't have anyway of making a test for this. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadSubframe): 2008-03-07 Samuel Weinig Reviewed by Oliver Hunt. Fix for http://bugs.webkit.org/show_bug.cgi?id=16673 lacks toDataURL() Tests: fast/canvas/toDataURL-noData.html fast/canvas/toDataURL-supportedTypes.html * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage): Make message non-global. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::printSecurityExceptionMessage): Log error message indicating that toDataURL has been called on a tainted canvas. (WebCore::HTMLCanvasElement::toDataURL): This does the tainted canvas check, ensures that the canvas has pixel data, checks to see if the MIME type is supported. Unsupported MIME types and the null string (which is made by passing no argument/null/undefined in JavaScript) are treated as being PNG, as per the spec. The actual toDataURL logic is actually done in the ImageBuffer class. * html/HTMLCanvasElement.h: Add function declarations. * html/HTMLCanvasElement.idl: Add function declaration. * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes): (WebCore::initializeSupportedImageMIMETypesForEncoding): (WebCore::initializeSupportedJavaScriptMIMETypes): (WebCore::initializeSupportedNonImageMimeTypes): (WebCore::initializeSupportedMediaMIMETypes): (WebCore::initializeMIMETypeRegistry): (WebCore::MIMETypeRegistry::getMIMETypeForPath): (WebCore::MIMETypeRegistry::isSupportedImageMIMEType): (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType): (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding): (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType): (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType): (WebCore::MIMETypeRegistry::isJavaAppletMIMEType): (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes): (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes): (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding): (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes): (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes): * platform/MIMETypeRegistry.h: Clean up and add new supportedImageMIMETypesForEncoding set which contains the set of MIME types the platform knows how to encode. Currently only implemented for CG and Qt. * platform/graphics/ImageBuffer.h: Add toDataURL method. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::toDataURL): Add stub. * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::create): (WebCore::ImageBuffer::getImageData): (WebCore::ImageBuffer::putImageData): (WebCore::ImageBuffer::toDataURL): Converts the current context to a data: url of the specified MIME type. This method unfortunately has to flip the context, resulting in less than optimal code. * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::toDataURL): Add stub. * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::toDataURL): Add stub. 2008-03-07 Steve Falkenburg Build fix. * WebCore.vcproj/WebCore.vcproj: 2008-03-07 Brent Fulgham Reviewed by Mark Rowe. Correct build intermediary output (http://bugs.webkit.org/show_bug.cgi?id=17713) * WebCore/WebCore.vcproj: Correct intermediary paths 2008-03-07 Brent Fulgham Reviewed by Steve Falkenburg. Add Cairo build requirements to WebCore.vcproj under a new set of targets. Exclude Cairo elements from normal CG build. Exclude CG elements from Cairo builds. (http://bugs.webkit.org/show_bug.cgi?id=17300) * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/webcore.vsprops: Added. 2008-03-07 Darin Adler Reviewed by Adam. - eliminated WebCoreFrameBridge runOpenPanel * page/ChromeClient.h: Added runOpenPanel function. * page/mac/ChromeMac.mm: (WebCore::ChromeClient::runOpenPanel): Added. * platform/FileChooser.cpp: (WebCore::FileChooser::FileChooser): Moved this here. It's no longer platform-specific. Also start the refcount at 1. (WebCore::FileChooser::create): Added adoptRef since the refcount no starts at one. (WebCore::FileChooser::~FileChooser): Moved here. No longer platform-specific. * platform/FileChooser.h: Removed m_controller, which was Macintosh-specific. * platform/gtk/FileChooserGtk.cpp: Removed FileChooser constructor and destructor, since they are no longer platform-specific. * platform/qt/FileChooserQt.cpp: Ditto. * platform/win/FileChooserWin.cpp: Ditto. * platform/wx/TemporaryLinkStubs.cpp: Ditto. * platform/mac/FileChooserMac.mm: (WebCore::FileChooser::openFileChooser): Call the chrome client instead of the bridge to run the open panel. Allows us to get rid of the WebCoreOpenPanelController class and m_controller data member and move the cosntrutor/destructor to platform- independent code. 2008-03-07 Adam Roben Add JavaScriptDebugServer This class is a singleton which allows one or more JavaScriptDebugListeners to receive callbacks during JavaScript execution. Right now all listeners receive callbacks for all Pages in the process. Eventually we will want to support listeners registering for callbacks for specific Pages (e.g., the Inspector will want to listen for execution in just the Page it's inspecting). Pages notify the JavaScriptDebugServer when they are created so that it can install itself as the Page's debugger. Reviewed by Darin. * GNUMakefile.am: Added new files to project. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * WebCoreSources.bkl: Ditto. * page/JavaScriptDebugListener.h: Added. * page/JavaScriptDebugServer.cpp: Added. (WebCore::toFrame): (WebCore::JavaScriptDebugServer::shared): (WebCore::JavaScriptDebugServer::JavaScriptDebugServer): (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer): (WebCore::JavaScriptDebugServer::addListener): Registers as the debugger for all Pages if we're adding our first listener. (WebCore::JavaScriptDebugServer::removeListener): Deregisters as the debugger for all Pages if we're removing our last listner. (WebCore::JavaScriptDebugServer::pageCreated): Registers as the debugger for the newly created Page if we have any listeners. (WebCore::dispatchDidParseSource): Helper function. (WebCore::dispatchFailedToParseSource): Ditto. (WebCore::JavaScriptDebugServer::sourceParsed): Call dispatchDidParseSource or dispatchFailedToParseSource depending on whether there was an error or not. (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Calls the passed-in JavaScriptExecutionCallback on each listener, guarding against re-entry. (WebCore::JavaScriptDebugServer::callEvent): Dispatch didEnterCallFrame. (WebCore::JavaScriptDebugServer::atStatement): Dispatch willExecuteStatement. (WebCore::JavaScriptDebugServer::returnEvent): Dispatch willLeaveCallFrame. (WebCore::JavaScriptDebugServer::exception): Dispatch exceptionWasRaised. * page/JavaScriptDebugServer.h: Added. * page/Page.cpp: (WebCore::Page::Page): Tell the shared JavaScriptDebugServer we were created so it can register as our debugger if needed. 2008-03-07 Darin Adler Reviewed by Brady. - fix a theoretical problem with the visited-link hash table by avoiding collision with the special "deleted" value - improve efficiency of with the visited-link hash table by not hashing twice * page/PageGroup.cpp: (WebCore::avoidDeletedValue): Added. Makes sure we never try to use the "all ones" value, since the hash table uses that for deleted hash table entries. (WebCore::PageGroup::isLinkVisited): Call avoidDeletedValue before using the hash value with the HashSet. (WebCore::PageGroup::addVisitedLink): Ditto. * page/PageGroup.h: Added a new hash function, AlreadyHashed, for unsigned integer values. This assumes that the value is already a hash value, and doesn't try to hash it again. Used this for m_visitedLinkHashes. 2008-03-07 Simon Hausmann Fix the Qt build. * WebCore.pro: 2008-03-06 Sam Weinig with a little help from Oliver Hunt Reviewed by Mitz. Implement the HTML5 canvas tainting rules to prevent potential data leakage Added originClean to HTMLCanvasElement and CanvasPattern to track whether a canvas (or pattern) is tainted by remote data. Use originClean flag to determine whether getImageData should return, well, image data. Test: http/tests/security/canvas-remote-read-remote-image.html * html/CanvasPattern.cpp: (WebCore::CanvasPattern::CanvasPattern): * html/CanvasPattern.h: * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setStrokeStyle): (WebCore::CanvasRenderingContext2D::setFillStyle): (WebCore::CanvasRenderingContext2D::checkOrigin): (WebCore::CanvasRenderingContext2D::drawImage): (WebCore::CanvasRenderingContext2D::drawImageFromRect): (WebCore::CanvasRenderingContext2D::createPattern): (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage): (WebCore::CanvasRenderingContext2D::getImageData): * html/CanvasRenderingContext2D.h: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): * html/HTMLCanvasElement.h: (WebCore::HTMLCanvasElement::setOriginTainted): (WebCore::HTMLCanvasElement::originClean): 2008-03-06 Anders Carlsson Reviewed by Jon. Templatize the JNI call code to reduce the amount of code that has to be duplicated. * bridge/jni/jni_class.cpp: (JavaClass::JavaClass): * bridge/jni/jni_instance.cpp: (JavaInstance::stringValue): (JavaInstance::numberValue): (JavaInstance::booleanValue): (JavaInstance::invokeMethod): * bridge/jni/jni_jsobject.cpp: (JavaJSObject::convertJObjectToValue): * bridge/jni/jni_runtime.cpp: (JavaField::JavaField): (JavaMethod::JavaMethod): * bridge/jni/jni_utility.cpp: * bridge/jni/jni_utility.h: (KJS::Bindings::): (KJS::Bindings::callJNIMethodIDA): (KJS::Bindings::callJNIMethodV): (KJS::Bindings::callJNIMethod): (KJS::Bindings::callJNIStaticMethod): 2008-03-06 Darin Adler Reviewed by Mitz. - fix regression test failures from the visited-link change * WebCore.base.exp: Export PageGroup::setShouldTrackVisitedLinks. * page/PageGroup.cpp: (WebCore::PageGroup::addVisitedLink): Do nothing and return early if shouldTrackVisitedLinks is false. (WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated so the next time a link is queried this will be populated from history. (WebCore::PageGroup::setShouldTrackVisitedLinks): Added. * page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global for now, but it would be better if it was per-page-group instead. 2008-03-06 Adele Peterson Reviewed by Darin. Fixes for for Implement activeElement attribute for HTMLDocument (HTML5) and Implement hasFocus() for HTMLDocument (HTML5) Tests: fast/dom/HTMLDocument/activeElement.html fast/dom/HTMLDocument/hasFocus.html * html/HTMLDocument.cpp: (WebCore::HTMLDocument::activeElement): Added. Returns the focused element, or the body element if nothing's focused. (WebCore::HTMLDocument::hasFocus): Added. Returns whether or not the document has focus (inclusive of sub-frames). * html/HTMLDocument.h: Added methods for activeElement and hasFocus. * html/HTMLDocument.idl: Added definitions for activeElement and hasFocus. 2008-03-06 Dan Bernstein Reviewed by Darin Adler. - fix 154008 WebKit: Some asian language font glyphs are not shown (in Mail and Entourage) Test: fast/text/soft-hyphen-3.html * rendering/bidi.cpp: (WebCore::checkMidpoints): (WebCore::RenderBlock::findNextLineBreak): Made 'pos' unsigned. Made the midpoint after a hyphen always be a valid iterator, not allowing an offset past the end of a text node. Changed the check for consecutive soft hyphens to account for that. 2008-03-06 Darin Adler - try to fix Wx build * WebCoreSources.bkl: Added PageGroup.cpp. 2008-03-06 Darin Adler - fix some builds * GNUmakefile.am: Added PageGroup.cpp. * WebCore.base.exp: Removed WebCoreHistory. * WebCore.pro: Added PageGroup.cpp. 2008-03-06 Alexey Proskuryakov Reviewed by Darin. Need to create a Collator abstraction for WebCore and JavaScriptCore * ForwardingHeaders/wtf/unicode/Collator.h: Added. * xml/XSLTUnicodeSort.cpp: (WebCore::xsltUnicodeSortFunction): * xml/XSLTUnicodeSort.h: 2008-03-06 Darin Adler Reviewed by Mitz. - fix http://bugs.webkit.org/show_bug.cgi?id=17526 REGRESSION: iframes are added to Safari's History menu by separating the visited link machinery from global history This should also make page loading faster due to more efficient visited link coloring. * WebCore.base.exp: Updated. * WebCore.vcproj/WebCore.vcproj: Added PageGroup.h/cpp, removed GlobalHistory.h/cpp. * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed WebCoreHistory.h/m. * css/CSSStyleSelector.cpp: Updated includes. (WebCore::CSSStyleSelector::initElementAndPseudoState): Eliminated code to set currentEncodedURL. (WebCore::checkPseudoState): Moved most of the code inside a new PageGroup::isLinkVisited function. (WebCore::CSSStyleSelector::canShareStyleWithElement): Tightened code a bit by using references and only getting colors when needed. (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto. * css/CSSStyleSelector.h: Removed EncodedURL, m_encodedURL, and setEncodedURL. * dom/Document.cpp: (WebCore::Document::attach): Removed call to setEncodedURL. (WebCore::Document::setURL): Ditto. (WebCore::Document::recalcStyleSelector): Ditto. * loader/FrameLoader.cpp: (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Changed code to use early exit idiom to be a little more readable. (WebCore::FrameLoader::urlsMatchItem): Change to use a reference for slightly better efficiency. (WebCore::FrameLoader::goToItem): Use early exit idiom to be a little more readable. (WebCore::FrameLoader::updateHistoryForStandardLoad): Moved history code back in here and got rid of the helper function updateGlobalHistory, restoring the logic before r30549. Also added a call to the new addVisitedLink function. (WebCore::FrameLoader::updateHistoryForClientRedirect): Added code to call addVisitedLink here. (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Removed comment. (WebCore::FrameLoader::updateHistoryForReload): Removed call to updateGlobalHistory; we can just go without updating global history or visited links here, at least for now, since it's not clear that a reload is a "history event". (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Moved history code back where it was, and added the call to addVisitedLink, just as in updateHistoryForStandardLoad above. * loader/FrameLoader.h: Removed updateGlobalHistory function. * page/Chrome.cpp: (WebCore::ChromeClient::populateVisitedLinks): Added. Empty placeholder so we don't have to implement this for every port all at once. (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Changed to use the new PageGroup class. * page/ChromeClient.h: Added populateVisitedLinks function, used to fill the visited links set from the global history at application startup time. * page/FrameTree.cpp: (WebCore::FrameTree::find): Updated to use the new PageGroup class. * page/GlobalHistory.h: Removed. * page/win/GlobalHistoryWin.cpp: Removed. * page/mac/GlobalHistoryMac.mm: Removed. * platform/mac/WebCoreHistory.h: Removed. * platform/mac/WebCoreHistory.m: Removed. * platform/win/WebCoreHistory.cpp: Removed. * platform/win/WebCoreHistory.h: Removed. * page/Page.cpp: (WebCore::Page::Page): Set m_group to 0. (WebCore::Page::setGroupName): Set up m_group. If the page is not in any group, set it to 0 for now to postpone the cost of creating a group. (WebCore::Page::initGroup): Added. Sets m_group to point to a single-page group; used when getting a group. (WebCore::Page::removeAllVisitedLinks): Added. Calls removeVisitedLinks on all page groups. * page/Page.h: Moved enums inside the WebCore namespace. Removed the frameNamespace function and instead added the group and groupPtr functions. * page/PageGroup.cpp: Added. Contains all the visited code from the CSSStyleSelector in the isVisitedLink function, but more efficient because we don't allocate memory for the buffer. * page/PageGroup.h: Added. * platform/gtk/TemporaryLinkStubs.cpp: Removed historyContains. * platform/qt/TemporaryLinkStubs.cpp: Removed unneeded include. * platform/wx/TemporaryLinkStubs.cpp: Removed historyContains. 2008-03-06 Mark Rowe Fix 64-bit Mac build. * WebCore.xcodeproj/project.pbxproj: Exclude _NPN symbols from the exports list as they are compiled out of 64-bit builds. 2008-03-06 Mark Rowe Leopard build fix. * WebCore.base.exp: 2008-03-05 Kevin Ollivier Fix the wx build after the bindings move. * WebCoreSources.bkl: * webcore-base.bkl: * webcore-wx.bkl: 2008-03-05 Dan Bernstein Reviewed by Adele Peterson. - fix "background-position: inherit" * css/CSSStyleSelector.cpp: Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused macro. 2008-03-05 Alp Toker Add a missing make dependency for derived sources to improve autotools build dependency tracking. Issue spotted by Ori Bernstein. * GNUmakefile.am: 2008-03-05 Alp Toker GTK+ build fix for breakage introduced in r30800. Track moved bridge sources from JavaScriptCore to WebCore. * GNUmakefile.am: 2008-03-05 Justin Garcia Reviewed by Darin. One part of fix for: Copying content with percentage based rules in a style sheet will cause fidelity issues * editing/markup.cpp: (WebCore::appendStartMarkup): Styles from matched rules should take precedence over those in inline style declarations, not the other way around. 2008-03-05 Anders Carlsson Reviewed by Darin. Move JNI specific code from runtime_root over to jni_jsobject, where it is used. * bridge/jni/jni_jsobject.cpp: (completedJavaScriptAccess): (initializeJavaScriptAccessLock): (lockJavaScriptAccess): (unlockJavaScriptAccess): (dispatchToJavaScriptThread): (performJavaScriptAccess): (JavaJSObject::initializeJNIThreading): (isJavaScriptThread): (JavaJSObject::invoke): * bridge/jni/jni_jsobject.h: * bridge/runtime_root.cpp: * bridge/runtime_root.h: * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge init]): 2008-03-05 Darin Adler Reviewed by Sam. - add functions giving offsets within a KURL, slated to replace the EncodedURL object in CSSStyleSelector (in a future "visited link" change) - changed all KURL data members names to use the traditional m_ prefix - initialize all members to 0 in invalid KURLs rather than having all functions check m_isValid * platform/KURL.cpp: (WebCore::KURL::invalidate): Added. Initializes all the fields except for m_string to the "invalid" values. For use in the empty constructor and in the init and parse functions. (WebCore::KURL::init): Tweaked comments. Changed all code paths that return early to use the invalidate() function. Updated for member variable name changes. (WebCore::KURL::hasPath): Updated for member variable name changes. Remove now-unneeded check of m_isValid. (WebCore::KURL::lastPathComponent): Ditto. (WebCore::KURL::protocol): Ditto. (WebCore::KURL::host): Ditto. (WebCore::KURL::port): Ditto. (WebCore::KURL::pass): Ditto. (WebCore::KURL::user): Ditto. (WebCore::KURL::ref): Ditto. (WebCore::KURL::hasRef): Ditto. (WebCore::KURL::protocolIs): Ditto. (WebCore::KURL::query): Ditto. (WebCore::KURL::path): Ditto. (WebCore::KURL::setProtocol): Ditto. (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::prettyURL): Ditto. (WebCore::copyPathRemovingDots): Removed braces to match our code style. (WebCore::KURL::parse): Changed all code paths that return early to use the invalidate function. Moved code to set m_isValid to true to the very end of the function. Removed braces to match our code style. Removed an extra copy of the path/query/fragment code (there were two identical copies in the two sides of an if statement). Removed some commented-out code. Reversed an if statment. Added code to set the new m_pathAfterLastSlash field. Updated for member variable name changes. (WebCore::equalIgnoringRef): Updated for member variable name changes. (WebCore::KURL::isHierarchical): Ditto. * platform/KURL.h: Added a FIXME about ref vs. fragment. Made the empty constructor inline and called the new invalidate function. Added new pathStart, pathEnd, and pathAfterLastSlash functions, for use in the new visited link code. Added an invalidate function. Renamed all the data members to use the m_ prefix. * WebCore.base.exp: Updated. 2008-03-05 Anders Carlsson Reviewed by Sam. * WebCore.xcodeproj/project.pbxproj: Change jni_jsobject.cpp to be Obj-C++ for now. The plan is to merge this with jni_objc.mm and create jni_jsobject.mm. * bridge/jni/jni_jsobject.cpp: (createRootObject): Move createRootObject here from WebCoreFrameBridge. (JavaJSObject::createNative): Call the newly added createRootObject function. * bridge/runtime_root.cpp: (KJS::Bindings::RootObject::initializeJNIThreading): * bridge/runtime_root.h: setCreateRootObject no longer takes a root object, rename it to initializeJNIThreading. * page/mac/FrameMac.mm: (WebCore::Frame::createScriptInstanceForWidget): Just call Frame::createRootObject here. * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge init]): Call initializeJNIThreading. 2008-03-05 Anders Carlsson Reviewed by Sam. Change some static class variables to be regular static variables, making it easier to move the chunk of mac-specific code out of runtime_root.[cpp|h] * bridge/runtime_root.cpp: (KJS::Bindings::completedJavaScriptAccess): (KJS::Bindings::RootObject::dispatchToJavaScriptThread): (KJS::Bindings::performJavaScriptAccess): (KJS::Bindings::RootObject::createRootObject): (KJS::Bindings::RootObject::runLoop): (KJS::Bindings::RootObject::setCreateRootObject): * bridge/runtime_root.h: 2008-03-05 Brent Fulgham Reviewed by Adam Roben. Modify source files to use the USE(SAFARI_THEME) macro, rather than USE_SAFARI_THEME. (http://bugs.webkit.org/show_bug.cgi?id=17683) * WebCore/platform/win/PlatformScrollBarSafari.cpp * WebCore/rendering/RenderThemeSafari.cpp * WebCore/rendering/RenderThemeSafari.h * config.h: Move definition of WTF_USE_SAFARI_THEME here 2008-03-05 Brady Eidson Reviewed by Alexey and Mark Rowe Fix for - Reproducible crash on storage/execute-sql-args.html DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue, removing particular items for Databases that were shutting down. This filtering operation is not atomic, and therefore causes a race condition with the database thread waking up and reading from the message queue. The end result was an attempt to dereference a null DatabaseTask. Timing-wise, this never seemed to happen in a debug build, otherwise an assertion would've caught it. Replacing that assertion with a crash in a release build is what revealed this bug. The fix for the above symptom was entirely in WTF::MessageQueue in JSCore. With this fix in place, another crash popped up in the layout tests that was related to dereferencing a deallocated object - simply because SQLTransaction had a raw pointer to it's Database object when it needed to be a ref pointer. * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::runCurrentStatement): * storage/SQLTransaction.h: Change m_database to be a RefPtr (WebCore::SQLTransaction::database): 2008-03-05 Mark Rowe Build fix. * WebCore.base.exp: Remove symbol that no longer exists from the exports file. 2008-03-05 Adam Roben Export a header/symbol for WebKit Reviewed by Kevin M. * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: 2008-03-05 Adam Roben Move WebCoreScriptDebugger up to WebKit Reviewed by Darin. * WebCore.base.exp: Exported some functions used by WebCoreScriptDebugger, and sorted the list. * WebCore.xcodeproj/project.pbxproj: Removed WebCoreScriptDebugger.{h,mm} from the project and marked a few headers private so that WebKit can use them. * page/mac/WebCoreScriptDebugger.h: Removed. * page/mac/WebCoreScriptDebugger.mm: Removed. 2008-03-05 Anders Carlsson Build bridge/. Copy some headers over to WebKit as part of the post-build step. * WebCore.vcproj/WebCore.vcproj: 2008-03-05 Anders Carlsson Reviewed by Geoff. * WebCore.base.exp: Add the NPN and KJS methods. * WebCore.xcodeproj/project.pbxproj: Bring in bridge/ * config.h: Add HAVE_JNI define. * bindings/js/kjs_html.cpp: * bindings/objc/DOMInternal.mm: * bindings/objc/DOMUtility.mm: * bindings/objc/WebScriptObject.mm: * html/HTMLAppletElement.cpp: * html/HTMLEmbedElement.cpp: * html/HTMLObjectElement.cpp: * html/HTMLPlugInElement.cpp: * page/Frame.cpp: * page/mac/FrameMac.mm: * page/mac/WebCoreFrameBridge.mm: * page/mac/WebCoreScriptDebugger.mm: * plugins/win/PluginViewWin.cpp: Include file changes. 2008-03-04 Anders Carlsson Reviewed by Sam. Rewrite NPRuntime string conversion routines to use WebCore::String * bridge/NP_jsobject.cpp: (_NPN_Evaluate): * bridge/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback): (KJS::Bindings::convertNPVariantToValue): (KJS::Bindings::convertNPStringToUTF16): (KJS::Bindings::identifierFromNPIdentifier): * bridge/c/c_utility.h: 2008-03-05 Oliver Hunt Reviewed by Alexey P. Small performance improvement to putImageData (3-5% on assignment in my tests) * html/CanvasPixelArray.h: (WebCore::CanvasPixelArray::set): 2008-03-04 Sam Weinig Reviewed by Adele. * bindings/js/JSXMLHttpRequest.h: Remove unnecessary override of toBoolean. 2008-03-04 Maciej Stachowiak Reviewed by Sam and Oliver. - fixed http://bugs.webkit.org/show_bug.cgi?id=16289 - fixed Acid3 tests 26 and 27 (not exactly the same issue but related) * bindings/js/JSNodeCustom.cpp: (WebCore::JSNode::mark): When marking a node that's in-document, mark the owner document if it hasn't been already. This means holding on to a single node from an unreferenced document now keeps the whole document alive. We are now at 90/100 on Acid3. 2008-03-04 Sam Weinig Qt build fix. * page/qt/FrameQt.cpp: 2008-03-04 Sam Weinig Reviewed by Mark Rowe. Rename kjs_window to JSDOMWindowBase. - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including JSDOMWindow.h * ChangeLog: * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSCustomVoidCallback.cpp: * bindings/js/JSCustomXPathNSResolver.cpp: * bindings/js/JSDOMWindowBase.cpp: Copied from bindings/js/kjs_window.cpp. * bindings/js/JSDOMWindowBase.h: Copied from bindings/js/kjs_window.h. * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDatabaseCustom.cpp: * bindings/js/JSEventTargetBase.cpp: * bindings/js/JSEventTargetBase.h: * bindings/js/JSEventTargetNode.cpp: * bindings/js/JSHTMLDocumentCustom.cpp: * bindings/js/JSHTMLFrameSetElementCustom.cpp: * bindings/js/JSHistoryCustom.cpp: * bindings/js/JSLocation.cpp: * bindings/js/JSSQLTransactionCustom.cpp: * bindings/js/JSXMLHttpRequest.cpp: * bindings/js/ScheduledAction.cpp: * bindings/js/kjs_binding.cpp: * bindings/js/kjs_events.cpp: * bindings/js/kjs_navigator.cpp: * bindings/js/kjs_proxy.cpp: * bindings/js/kjs_window.cpp: Removed. * bindings/js/kjs_window.h: Removed. * bindings/scripts/CodeGeneratorJS.pm: * history/CachedPage.cpp: * loader/FrameLoader.cpp: * page/Chrome.cpp: * page/InspectorController.cpp: * page/mac/FrameMac.mm: * page/mac/WebCoreFrameBridge.mm: * page/qt/FrameQt.cpp: * page/win/FrameWin.cpp: * plugins/win/PluginViewWin.cpp: 2008-03-04 Mark Rowe Speculative Qt build fix. * platform/qt/PasteboardQt.cpp: 2008-03-04 Anders Carlsson Reviewed by Sam. Update include paths. This code is not used yet. * bridge/NP_jsobject.cpp: * bridge/c/c_class.cpp: * bridge/c/c_instance.cpp: * bridge/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback): #if 0 this out for now. * bridge/jni/jni_class.cpp: * bridge/jni/jni_jsobject.cpp: * bridge/jni/jni_objc.mm: * bridge/jni/jni_runtime.cpp: * bridge/jni/jni_utility.cpp: * bridge/jni/jni_utility.h: * bridge/npruntime.cpp: * bridge/objc/WebScriptObject.h: * bridge/objc/objc_class.h: * bridge/objc/objc_instance.h: * bridge/objc/objc_runtime.h: * bridge/objc/objc_utility.h: * bridge/objc/objc_utility.mm: * bridge/runtime.cpp: * bridge/runtime.h: * bridge/runtime_array.cpp: * bridge/runtime_array.h: * bridge/runtime_method.cpp: * bridge/runtime_method.h: * bridge/runtime_object.cpp: * bridge/runtime_object.h: * bridge/runtime_root.cpp: * bridge/runtime_root.h: 2008-03-04 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=17676 REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work Test: fast/encoding/url-host-name-non-ascii.html * platform/KURL.cpp: (WebCore::appendEncodedHostname): Added an early return in the all-ASCII case to avoid copying the host name twice and corrected the error checking after calling uidna_IDNToASCII(). 2008-03-04 Sam Weinig Reviewed by Dan Bernstein. Use JSDOMWindow exclusively instead of JSDOMWindowBase. * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScheduledAction.h: * bindings/js/kjs_window.cpp: (WebCore::JSDOMWindowBase::timerFired): 2008-03-04 Timothy Hatcher Reviewed by Darin Adler. Browser windows "do nothing" while modal dialog or menu is up due to run loop modes (or while scrolling) Adds a new SchedulePair object that holds a runloop and the mode to use. A HashSet of SchedulePairs is tracked by Page so it can be used for resource loading and, in the future, maybe SharedTimerMac. * WebCore.base.exp: Add new exports for WebKit. * WebCore.xcodeproj/project.pbxproj: Add new files. * loader/mac/DocumentLoaderMac.cpp: Added. (WebCore::scheduleAll): Call schedule all the ResourceLoader handles. (WebCore::unscheduleAll): Call unschedule all the ResourceLoader handles. (WebCore::DocumentLoader::schedule): Schedule all the ResourceLoaders owned by the DocumentLoader. (WebCore::DocumentLoader::unschedule): Unschedule all the ResourceLoaders owned by the DocumentLoader. * loader/DocumentLoader.h: * page/Page.h: (WebCore::Page::scheduledRunLoopPairs): Return m_scheduledRunLoopPairs. * page/mac/PageMac.cpp: (WebCore::Page::addSchedulePair): Add a SchedulePair to m_scheduledRunLoopPairs. (WebCore::Page::removeSchedulePair): Removes a SchedulePair from m_scheduledRunLoopPairs. * platform/cf/SchedulePair.cpp: Added. * platform/cf/SchedulePair.h: Added. * platform/mac/SchedulePairMac.mm: Added. * platform/network/ResourceHandle.h: * platform/network/mac/FormDataStreamMac.mm: (WebCore::advanceCurrentStream): Use the new SchedulePair. (WebCore::formCreate): Ditto. (WebCore::formFinalize): Ditto. (WebCore::formSchedule): Ditto. (WebCore::formUnschedule): Ditto. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): Schedule the connection with all the SchedulePairs that Page holds. If Page has no SchedulePairs, schedule with the current runloop, and pick the mode based on ResourceHandle::loadsDuringCommonRunLoopModes. (WebCore::ResourceHandle::schedule): (WebCore::ResourceHandle::unschedule): 2008-03-04 Sam Weinig Reviewed by Darin Adler. Rename kjs_css to JSRGBColor. * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSRGBColor.cpp: Copied from bindings/js/kjs_css.cpp. * bindings/js/JSRGBColor.h: Copied from bindings/js/kjs_css.h. * bindings/js/kjs_css.cpp: Removed. * bindings/js/kjs_css.h: Removed. * bindings/js/kjs_window.cpp: * bindings/objc/DOMUtility.mm: * bindings/scripts/CodeGeneratorJS.pm: 2008-03-04 Anders Carlsson Fix 64-bit build. * html/HTMLPlugInElement.cpp: 2008-03-04 Nikolas Zimmermann Reviewed by Eric & David. Fixes: http://bugs.webkit.org/show_bug.cgi?id=17078 Fix getSubStringLength() handling, verified by Acid3 test 77. Brings up Acid3 score to 88/100. Added test: svg/custom/acid3-test-77.html svg/custom/getSubStringLength.html * svg/SVGTextContentElement.cpp: (WebCore::cummulatedCharacterRangeLength): Simplify some code. (WebCore::SVGTextContentElement::getSubStringLength): 2008-03-04 Anders Carlsson Mac build fix. Neither me, Sam nor Adam know why we need to do this though :( * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::attachDebugger): * page/Page.cpp: (WebCore::Page::setDebuggerForAllPages): (WebCore::Page::setDebugger): 2008-03-04 Adam Roben Add ExecState.h to ForwardingHeaders Reviewed by Anders. * ForwardingHeaders/kjs/ExecState.h: Added. * page/Page.cpp: Touch this to force WebCore to build and the headers to be copied. 2008-03-04 Adam Roben Make it possible to set a KJS::Debugger on all Frames in a Page and all Pages in the process Reviewed by Kevin M. * ForwardingHeaders/kjs/debugger.h: Added. * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::initScript): Attach the Page's debugger if there is one. (WebCore::KJSProxy::attachDebugger): Attach the passed-in debugger, or detach any existing debugger if none was passed in. * bindings/js/kjs_proxy.h: * page/Page.cpp: (WebCore::Page::Page): Initialize new member. (WebCore::Page::setDebuggerForAllPages): Call setDebugger on each Page in the process. (WebCore::Page::setDebugger): Store the debugger and pass it off to all our Frames. * page/Page.h: 2008-03-04 Sam Weinig Reviewed by Darin Adler. Add ClassInfo to custom constructors so that they toString properly - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp, and XSLTProcessorConstructorImp and prefix all the classes with JS. * bindings/js/JSAudioConstructor.cpp: (WebCore::): Added ClassInfo definition. (WebCore::JSAudioConstructor::JSAudioConstructor): (WebCore::JSAudioConstructor::construct): Cleanup. * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document. (WebCore::JSAudioConstructor::classInfo): Added. * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype to JSHTMLInputElementBasePrototype as seen if toString'ed. (WebCore::): * bindings/js/JSHTMLOptionElementConstructor.cpp: (WebCore::): Added ClassInfo definition. * bindings/js/JSHTMLOptionElementConstructor.h: (WebCore::JSHTMLOptionElementConstructor::classInfo): Added. * bindings/js/JSImageConstructor.cpp: (WebCore::): Added ClassInfo definition. (WebCore::JSImageConstructor::implementsConstruct): Moved here from header. * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::classInfo): Added. * bindings/js/JSXMLHttpRequest.cpp: (WebCore::): Rename XMLHttpRequestPrototype to JSXMLHttpRequestPrototype as seen if toString'ed. (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): (WebCore::JSXMLHttpRequestConstructor::implementsConstruct): (WebCore::JSXMLHttpRequestConstructor::construct): * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to JSXMLHttpRequestConstructor and doc to m_document and (WebCore::JSXMLHttpRequestConstructor::classInfo): Added. * bindings/js/JSXSLTProcessor.cpp: (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and XSLTProcessorConstructorImp to JSXSLTProcessorConstructor. (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor): (WebCore::JSXSLTProcessorConstructor::implementsConstruct): (WebCore::JSXSLTProcessorConstructor::construct): * bindings/js/JSXSLTProcessor.h: (WebCore::JSXSLTProcessorConstructor::classInfo): Added. * bindings/js/kjs_window.cpp: (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names. 2008-03-04 Dan Bernstein Reviewed by Oliver Hunt and Geoffrey Garen. - fix http://bugs.webkit.org/show_bug.cgi?id=17667 REGRESSION (r30587): Document::implicitClose() not called when done loading page (Image does not get scaled to fit) * loader/loader.cpp: (WebCore::Loader::didFinishLoading): Changed to call setLoadInProgress(false) even for 4xx errors, because that triggers load completion check. 2008-03-04 Adele Peterson Reviewed by Beth. Fix for focus() does not work for anchor elements with no content If an anchor has zero size, don't exclude it from being focusable from JS, just exclude it from being keyboard focusable (using the tab key). * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::isFocusable): (WebCore::HTMLAnchorElement::isKeyboardFocusable): 2008-03-04 Chris Fleizach Reviewed by Darin Adler. - fix ER - Seed: Google results do not have AXHeading information * page/mac/WebCoreAXObject.mm: (headingLevel): (-[WebCoreAXObject accessibilityIsIgnored]): 2008-03-04 Sam Weinig GTK+ build fix. * GNUmakefile.am: 2008-03-04 Sam Weinig Reviewed by Darin Adler. Remame ImageConstructorImp to JSImageConstructor and move it into its own file. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSImageConstructor.cpp: Copied from bindings/js/kjs_html.cpp. (WebCore::JSImageConstructor::JSImageConstructor): (WebCore::JSImageConstructor::construct): * bindings/js/JSImageConstructor.h: Copied from bindings/js/kjs_html.h. * bindings/js/kjs_html.cpp: (WebCore::getRuntimeObject): Make this function static since it is only used in this file. * bindings/js/kjs_html.h: * bindings/js/kjs_window.cpp: (WebCore::JSDOMWindowBase::getValueProperty): 2008-03-04 Adam Roben Fix an uninitialized value warning in CodeGeneratorJS.pm * bindings/scripts/CodeGeneratorJS.pm: Remove reference to non-existent $maybeOkParam (this was removed in r30753). 2008-03-04 Sam Weinig Reviewed by Darin Adler. Remove kjs_dom.{h,cpp}. - Removed custom toAttr, which took a boolean ok, and teach CodeGeneratorJS.pm to us a null return value as an indication of failure. (This new logic is used for toVoidCallback as well.) - Move getRuntimeObject to kjs_html where a bunch of other runtime object related functions currently live. - Move checkNodeSecurity to kjs_binding, where other frame security functions currently live. - Remove getNodeConstructor. It had no implementation. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSAttrCustom.cpp: * bindings/js/JSCustomVoidCallback.cpp: (WebCore::toVoidCallback): * bindings/js/JSCustomVoidCallback.h: * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::JSDatabase::transaction): * bindings/js/JSElementCustom.cpp: (WebCore::JSElement::setAttributeNode): (WebCore::JSElement::setAttributeNodeNS): * bindings/js/JSEventTargetBase.cpp: (WebCore::toJS): * bindings/js/JSEventTargetBase.h: * bindings/js/JSHTMLAppletElementCustom.cpp: * bindings/js/JSHTMLElementCustom.cpp: * bindings/js/JSHTMLEmbedElementCustom.cpp: * bindings/js/JSHTMLFormElementCustom.cpp: * bindings/js/JSHTMLFrameElementCustom.cpp: * bindings/js/JSHTMLIFrameElementCustom.cpp: * bindings/js/JSHTMLObjectElementCustom.cpp: * bindings/js/JSNamedNodeMapCustom.cpp: * bindings/js/JSNamedNodesCollection.cpp: * bindings/js/JSNodeFilterCustom.cpp: * bindings/js/JSXSLTProcessor.cpp: * bindings/js/kjs_binding.cpp: (WebCore::checkNodeSecurity): * bindings/js/kjs_binding.h: * bindings/js/kjs_css.cpp: * bindings/js/kjs_dom.cpp: Removed. * bindings/js/kjs_dom.h: Removed. * bindings/js/kjs_events.cpp: * bindings/js/kjs_html.cpp: (WebCore::getRuntimeObject): * bindings/js/kjs_html.h: * bindings/js/kjs_window.cpp: * bindings/scripts/CodeGeneratorJS.pm: * dom/Attr.idl: * html/HTMLPlugInElement.cpp: * page/InspectorController.cpp: 2008-03-04 Adam Roben Win/Qt/GTK+/wx build fix after r30740 * editing/Editor.cpp: Added missing #include. * page/qt/FrameQt.cpp: Removed Frame::dashboardRegionsChanged. * page/win/FrameWin.cpp: Ditto. * platform/wx/TemporaryLinkStubs.cpp: Ditto. 2008-03-04 Alp Toker GTK+ build fix for breakage introduced in r30740. Remove Frame::dashboardRegionsChanged(). There's now a default implementation at ChromeClient::dashboardRegionsChanged(). * page/gtk/FrameGtk.cpp: 2008-03-04 Alp Toker GTK+ build fix suggested by aroben. Remove an unused Mac-specific included introduced in r30740. * page/ChromeClient.h: 2008-03-04 Dan Bernstein Reviewed by Sam Weinig. - fix Burmese text does not render on http://www.myanmarbible.com/bible/Judson/html/index.html Test: platform/win/fast/text/uniscribe-missing-glyph.html Note that default installations of Windows do not have Myanmar fonts. What this patch does is ensure that the Myanmar and other complex scripts are rendered as missing glyphs rather than not rendered at all. The particular page in the bug measures the relative widths of two rendered strings and, if they are rendered as missing glyphs, detects that a Myanmar fonts is not available and substitutes the text with images. By not rendering (and measuring) missing glyphs, WebKit was throwing the page's detection code off. * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::shape): Removed an early return in case shaping resulted in missing glyphs. This is now expected if font fallback failed to produce a font containing glyphs for the character. Also changed two resize()s to shrink()s. 2008-03-04 Darin Adler Reviewed by Adam. - remove WebCoreFrameBridge reapplyStyles method * WebCore.base.exp: Added exports. * page/mac/WebCoreFrameBridge.h: Removed WebCoreDeviceType and reapplyStylesForDeviceType: method. * page/mac/WebCoreFrameBridge.mm: Ditto. 2008-03-04 Darin Adler Reviewed by Adam. - eliminate WebCoreFrameBridge createFrameViewWithNSView * WebCore.base.exp: Added some more exports. * page/mac/WebCoreFrameBridge.h: Deleted createFrameViewWithNSView. * page/mac/WebCoreFrameBridge.mm: Ditto. 2008-03-04 Darin Adler Reviewed by Adam. - removed WebCoreFrameBridge scrollOverflowInDirection * WebCore.base.exp: Export function needed by WebKit. * page/mac/WebCoreFrameBridge.h: Removed WebScrollDirection, WebScrollGranularity, and scrollOverflowInDirection. * page/mac/WebCoreFrameBridge.mm: Removed method. 2008-03-04 Darin Adler Reviewed by Adam. - remove WebCoreFrameBridge installInFrame: method * WebCore.base.exp: Export a few symbols. * WebCore.xcodeproj/project.pbxproj: Export a few files. * page/mac/WebCoreFrameBridge.h: Remove installInFrame:. * page/mac/WebCoreFrameBridge.mm: Ditto. 2008-03-04 Darin Adler Reviewed by Adam. - remove WebCoreFrameBridge window method * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): Get the window by calling window on the NSView instead of using the bridge. The WebKit side wasn't doing anything special, so a call to -[NSView window] is fine. * page/mac/WebCoreFrameBridge.h: Removed the window method. 2008-03-04 Darin Adler Reviewed by Adam. - remove -[WebCoreFrameBridge dashboardRegionsChanged:] * WebCore.base.exp: Updated. * page/Chrome.cpp: (WebCore::ChromeClient::dashboardRegionsChanged): Added. * page/ChromeClient.h: Added virtual function for dashboardRegionsChanged. * page/Frame.h: Removed dashboardRegionsChanged function. * page/FrameView.cpp: (WebCore::FrameView::updateDashboardRegions): Changed to call dashboardRegionsChanged on ChromeClient and to only call it when the regions actually changed. * page/mac/FrameMac.mm: Removed dashboardRegionsChanged function. * page/mac/WebCoreFrameBridge.h: Removed dashboardRegionsChanged: method. 2008-03-04 Darin Adler Reviewed by Adam. - remove WebCoreFrameBridge issuePasteComand method * editing/Editor.cpp: (WebCore::Editor::paste): Moved the Mac-specific part of this to EditorMac. * editing/mac/EditorMac.mm: (WebCore::Editor::paste): Added. Calls paste: on the document view (normally a WebHTMLView). We should get rid of this eventually. * page/Frame.h: Removed issuePasteCommand. * page/mac/FrameMac.mm: Ditto. * page/mac/WebCoreFrameBridge.h: Ditto. 2008-03-04 Alexey Proskuryakov Suggested by Darin, rubber-stamped by Mark. http://bugs.webkit.org/show_bug.cgi?id=17569 REGRESSION (r30571): Buzzword.com doesn't load Rolling out r30571, as determining what is wrong with it proved tricky. * loader/FrameLoader.cpp: (WebCore::FrameLoader::load): (WebCore::FrameLoader::tokenizerProcessedData): (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): 2008-03-04 Sam Weinig Build fix. * bindings/js/kjs_events.cpp: 2008-03-03 Sam Weinig Reviewed by Mark Rowe. Move JSClipboard into its own file. * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSAttrCustom.cpp: * bindings/js/JSClipboardCustom.cpp: Added. (WebCore::JSClipboard::types): (WebCore::JSClipboard::clearData): (WebCore::JSClipboard::getData): (WebCore::JSClipboard::setData): (WebCore::JSClipboard::setDragImage): * bindings/js/JSElementCustom.cpp: * bindings/js/JSEventCustom.cpp: * bindings/js/JSHTMLFrameElementCustom.cpp: * bindings/js/JSHTMLIFrameElementCustom.cpp: * bindings/js/kjs_events.cpp: * bindings/js/kjs_events.h: * bindings/js/kjs_window.cpp: * bindings/scripts/CodeGeneratorJS.pm: * dom/Clipboard.cpp: (WebCore::Clipboard::setDropEffect): (WebCore::Clipboard::setEffectAllowed): * dom/Clipboard.idl: Added. 2008-03-03 Sam Weinig Windows build-fix. * page/Chrome.cpp: * plugins/win/PluginViewWin.cpp: 2008-03-03 Sam Weinig Reviewed by Darin Adler. Cleanup and plumbing in preparation for the great Window split. - Rename KJS::Window to WebCore::JSDOMWindowBase. - Remove KJS::Window::retrieve() and KJS::Window::retrieveWindow() and replace with the new toJSDOMWindow(). - Remove KJS::Window::retrieveActive() and replace with explicit call to exec->dynamicGlobalObject() and toJSDOMWindow(). * bindings/js/JSCustomVoidCallback.cpp: (WebCore::toVoidCallback):. * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::create): * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::JSDatabase::transaction): * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::location): (WebCore::toJS): * bindings/js/JSEventTargetBase.cpp: (WebCore::jsEventTargetAddEventListener): (WebCore::jsEventTargetRemoveEventListener): * bindings/js/JSEventTargetNode.cpp: (WebCore::JSEventTargetNode::setListener): * bindings/js/JSHTMLDocumentCustom.cpp: (WebCore::JSHTMLDocument::nameGetter): (WebCore::JSHTMLDocument::open): * bindings/js/JSHTMLFrameSetElementCustom.cpp: (WebCore::JSHTMLFrameSetElement::nameGetter): * bindings/js/JSLocation.cpp: (WebCore::JSLocation::put): (WebCore::jsLocationProtoFuncReplace): (WebCore::jsLocationProtoFuncReload): (WebCore::jsLocationProtoFuncAssign): * bindings/js/JSLocation.h: * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSVGLazyEventListener.cpp: (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener): (WebCore::JSSVGLazyEventListener::eventParameterName): * bindings/js/JSSVGLazyEventListener.h: * bindings/js/JSXMLHttpRequest.cpp: (WebCore::JSXMLHttpRequest::putValueProperty): (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): (WebCore::jsXMLHttpRequestPrototypeFunctionAddEventListener): (WebCore::jsXMLHttpRequestPrototypeFunctionRemoveEventListener): * bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/js/ScheduledAction.h: * bindings/js/kjs_binding.cpp: (WebCore::allowsAccessFromFrame): (WebCore::printErrorMessageForFrame): * bindings/js/kjs_events.cpp: (WebCore::JSAbstractEventListener::handleEvent): (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener): (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener): (WebCore::JSUnprotectedEventListener::windowObj): (WebCore::JSEventListener::JSEventListener): (WebCore::JSEventListener::~JSEventListener): (WebCore::JSEventListener::windowObj): (WebCore::JSLazyEventListener::JSLazyEventListener): (WebCore::JSLazyEventListener::parseCode): * bindings/js/kjs_events.h: * bindings/js/kjs_navigator.cpp: (WebCore::MimeType::getValueProperty): * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate): (WebCore::KJSProxy::createHTMLEventHandler): (WebCore::KJSProxy::createSVGEventHandler): * bindings/js/kjs_window.cpp: (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate): (WebCore::DOMWindowTimer::DOMWindowTimer): (WebCore::DOMWindowTimer::action): (WebCore::DOMWindowTimer::takeAction): (WebCore::): (WebCore::JSDOMWindowBase::JSDOMWindowBase): (WebCore::JSDOMWindowBase::~JSDOMWindowBase): (WebCore::JSDOMWindowBase::location): (WebCore::JSDOMWindowBase::mark): (WebCore::allowPopUp): (WebCore::createWindow): (WebCore::showModalDialog): (WebCore::JSDOMWindowBase::getValueProperty): (WebCore::JSDOMWindowBase::childFrameGetter): (WebCore::JSDOMWindowBase::indexGetter): (WebCore::JSDOMWindowBase::namedItemGetter): (WebCore::JSDOMWindowBase::getOwnPropertySlot): (WebCore::JSDOMWindowBase::put): (WebCore::JSDOMWindowBase::allowsAccessFrom): (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage): (WebCore::JSDOMWindowBase::allowsAccessFromPrivate): (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage): (WebCore::JSDOMWindowBase::printErrorMessage): (WebCore::JSDOMWindowBase::globalExec): (WebCore::JSDOMWindowBase::shouldInterruptScript): (WebCore::JSDOMWindowBase::setListener): (WebCore::JSDOMWindowBase::getListener): (WebCore::JSDOMWindowBase::findJSEventListener): (WebCore::JSDOMWindowBase::findOrCreateJSEventListener): (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener): (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener): (WebCore::JSDOMWindowBase::clearHelperObjectProperties): (WebCore::JSDOMWindowBase::clear): (WebCore::JSDOMWindowBase::setCurrentEvent): (WebCore::JSDOMWindowBase::currentEvent): (WebCore::windowProtoFuncAToB): (WebCore::windowProtoFuncBToA): (WebCore::windowProtoFuncOpen): (WebCore::windowProtoFuncSetTimeout): (WebCore::windowProtoFuncClearTimeout): (WebCore::windowProtoFuncSetInterval): (WebCore::windowProtoFuncAddEventListener): (WebCore::windowProtoFuncRemoveEventListener): (WebCore::windowProtoFuncShowModalDialog): (WebCore::windowProtoFuncNotImplemented): (WebCore::JSDOMWindowBase::setReturnValueSlot): (WebCore::JSDOMWindowBase::clearAllTimeouts): (WebCore::JSDOMWindowBase::installTimeout): (WebCore::JSDOMWindowBase::pauseTimeouts): (WebCore::JSDOMWindowBase::resumeTimeouts): (WebCore::JSDOMWindowBase::clearTimeout): (WebCore::JSDOMWindowBase::timerFired): (WebCore::JSDOMWindowBase::disconnectFrame): (WebCore::JSDOMWindowBase::jsEventListeners): (WebCore::JSDOMWindowBase::jsHTMLEventListeners): (WebCore::JSDOMWindowBase::jsUnprotectedEventListeners): (WebCore::JSDOMWindowBase::jsUnprotectedHTMLEventListeners): (WebCore::toJS): (WebCore::toJSDOMWindow): (WebCore::toJSDOMWindow): * bindings/js/kjs_window.h: (WebCore::JSDOMWindowBase::impl): (WebCore::JSDOMWindowBase::classInfo): (WebCore::JSDOMWindowBase::): * bindings/objc/DOMUtility.mm: (KJS::createDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): (WebCore::CachedPage::restore): * page/Chrome.cpp: (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): * page/DOMWindow.idl: * page/Frame.cpp: (WebCore::Frame::~Frame): (WebCore::Frame::windowScriptNPObject): (WebCore::Frame::pageDestroyed): * page/InspectorController.cpp: (WebCore::inspectedWindow): * page/mac/FrameMac.mm: (WebCore::Frame::windowScriptObject): * page/mac/WebCoreFrameBridge.mm: (updateRenderingForBindings): * platform/SecurityOrigin.cpp: (WebCore::SecurityOrigin::canAccess): 2008-03-03 Kevin Ollivier wx build fixes after recent Frame-related changes. * platform/wx/PasteboardWx.cpp: * platform/wx/TemporaryLinkStubs.cpp: 2008-03-03 Dan Bernstein Reviewed by Darin Adler. - make :first-letter apply to the first letter in normal flow, skipping floats and positioned objects Test: fast/css/first-letter-skip-out-of-flow.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): 2008-03-03 Ada Chan Fix build. * plugins/win/PluginViewWin.cpp: 2008-03-03 Mark Rowe Reviewed by Dan Bernstein. Fix http://bugs.webkit.org/show_bug.cgi?id=17313 Bug 17313: querySelectorAll() causing crashes when called via dojo.query() wrapper Node::querySelector and SelectorNodeList were not sufficiently initializing the CSSStyleSelector before using it to resolve styles, which lead to it having a stale m_style member in some situations. This stale m_style member resulted in a wild store that would write over whatever object now resided at the location m_style pointed to. Test: fast/dom/SelectorAPI/bug-17313.html * dom/Node.cpp: (WebCore::Node::querySelector): Call initForStyleResolve to further initialize the CSSStyleSelector. * dom/SelectorNodeList.cpp: (WebCore::SelectorNodeList::SelectorNodeList): Ditto. 2008-03-03 Anders Carlsson Reviewed by Darin and Sam. Include fixes, in preparation of using the headers in WebCore/bridge. * bindings/js/kjs_binding.h: * bindings/js/kjs_dom.cpp: * bindings/objc/DOMInternal.mm: * bindings/objc/DOMUtility.mm: * bindings/objc/WebScriptObject.mm: * bindings/objc/WebScriptObjectPrivate.h: * bridge/objc/objc_class.h: * bridge/objc/objc_instance.h: * bridge/objc/objc_runtime.h: * bridge/objc/objc_utility.h: * bridge/runtime.h: * bridge/runtime_object.h: * bridge/runtime_root.h: * html/HTMLAppletElement.cpp: * html/HTMLAppletElement.h: * html/HTMLEmbedElement.cpp: * html/HTMLEmbedElement.h: * html/HTMLObjectElement.cpp: * html/HTMLPlugInElement.cpp: * html/HTMLPlugInElement.h: * page/mac/FrameMac.mm: * page/mac/WebCoreFrameBridge.h: * page/mac/WebCoreFrameBridge.mm: * page/mac/WebCoreScriptDebugger.mm: 2008-03-03 David Hyatt Full page zoom plumbing. Add a notion of whether or not a zoom is text only or a full zoom to the Frame. setTextSizeMultiplier does a text only zoom. Reviewed by Tim H. * page/Frame.cpp: (WebCore::Frame::zoomFactor): (WebCore::Frame::isZoomFactorTextOnly): (WebCore::Frame::setZoomFactor): (WebCore::FramePrivate::FramePrivate): * page/Frame.h: * page/FramePrivate.h: * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge setTextSizeMultiplier:]): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::setCurrentScale): 2008-03-03 David Hyatt Fix for REGRESSION: Google Docs Spreadsheet crash This is also http://bugs.webkit.org/show_bug.cgi?id=17543, fixed table layout corrupts heap. Make sure not to access position -1 of the size 0 vectors. Reviewed by ggaren * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::layout): 2008-03-03 David D. Kilzer Dynamically inserting CSS rule with @media query fails with DOM Exception 12 Reviewed by Darin. Allow any valid rule (@font-face, @import, @media, @page or style) to be parsed when using CSSStyleSheet.insertRule(). Previously only import and style rules were allowed. Note that @page rules always throw an exception because they're not implemented yet, so no test case was added for them. Tests: fast/css/insertRule-font-face.html fast/css/insertRule-media.html * css/CSSGrammar.y: Extracted 'valid_rule' out of 'rule'. Renamed 'ruleset_or_import' to 'valid_rule_or_import' and changed its definition. 2008-03-03 Anders Carlsson Reviewed by Sam. Copy JSC bindings directory over to WebCore/bridge. * bridge: Copied from ../JavaScriptCore/bindings. 2008-03-03 Dan Bernstein Reviewed by Darin Adler. - remove CSSMutableStyleDeclaration::setChanged()'s change type parameter * css/CSSMutableStyleDeclaration.cpp: (WebCore::CSSMutableStyleDeclaration::setChanged): Removed the change type parameter and made this function determine the correct change type based on whether this is an inline style declaration. (WebCore::CSSMutableStyleDeclaration::setProperty): * css/CSSMutableStyleDeclaration.h: (WebCore::CSSMutableStyleDeclaration::clear): Removed this unused method. (WebCore::CSSMutableStyleDeclaration::setChanged): Made private. 2008-03-03 Darin Adler Reviewed by Adam. - some "cleanup" on the path to removing WebCoreFrameBridge * WebCore.base.exp: Exported some stuff we either already use or I am about to use in an upcoming patch. * WebCore.xcodeproj/project.pbxproj: Made FileChooser.h private rather than project, for future use in WebKit. * bindings/objc/WebScriptObject.mm: Removed some dead code. * dom/ContainerNode.cpp: Added a now-needed or soon-to-be-needed include. * editing/Editor.cpp: Ditto. * editing/Editor.h: Removed many unneeded declarations and includes. Removed the unused userVisibleString function. * editing/EditorCommand.cpp: (WebCore::executeYank): Added parameter for triggeringEvent, which no longer has a default value. (WebCore::executeYankAndSelect): Ditto. * editing/mac/EditorMac.mm: Removed userVisibleString. * page/mac/EventHandlerMac.mm: (WebCore::isKeyboardOptionTab): Tweaked formattin. * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge dragSourceMovedTo:]): Get window from -[NSView window] rather than from the bridge. There's no special value in the bridge's window method and we can use NSView directly. (-[WebCoreFrameBridge dragSourceEndedAt:operation:]): Ditto. * platform/graphics/mac/ImageMac.mm: (WebCore::Image::loadPlatformResource): Use a new WebCoreBundleFinder class to find the bundle rather than using WebCoreFrameBridge. * platform/mac/ClipboardMac.mm: Added a now-needed or soon-to-be-needed include. * platform/mac/PasteboardMac.mm: Ditto. * rendering/RenderObject.h: (WebCore::DashboardRegionValue::operator==): Fixed mistake where this wasn't comparing the clip rectangle. (WebCore::DashboardRegionValue::operator!=): Added. Needed by my future work. 2008-03-03 Oliver Hunt Reviewed by Mark Rowe. Bug 17620: getImageData lies http://bugs.webkit.org/show_bug.cgi?id=17620 Correct logic to actually iterate over the source row * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::getImageData): 2008-03-03 Oliver Hunt Reviewed by Mark Rowe. Correct incorrect assertion * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::putImageData): 2008-03-02 Alp Toker Another fix for non-database builds after changes in r30331. Conditionalize a stopDatabases() call. * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): 2008-03-02 Kevin Ollivier Reviewed by Alp Toker. Scrolling fixes. Implement page scrolling, initialize mouse wheel event variables, and remove duplicate event binding for TOP scrolling event. http://bugs.webkit.org/show_bug.cgi?id=17643 * platform/wx/MouseWheelEventWx.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): * platform/wx/ScrollViewWx.cpp: (WebCore::ScrollView::ScrollViewPrivate::bindEvents): (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents): 2008-03-02 Alp Toker Fix building without database support after changes in r30331. * dom/Document.cpp: 2008-03-02 Kevin Ollivier wx build fix for Windows after PageWin.cpp move. * webcore-wx.bkl: 2008-03-02 Kevin Ollivier Reviewed by Dave Hyatt. Gracefully handle a CSS rule containing an invalid value. (Fixes http://bugs.webkit.org/show_bug.cgi?id=16898) * css/CSSGrammar.y: 2008-03-02 Alp Toker Reviewed by Mark Rowe. Improve the Cairo Path::isEmpty() function Use cairo_has_current_point() where available. * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::isEmpty): 2008-03-01 Mark Rowe Reviewed by Tim Hatcher. Update Xcode configuration to support building debug and release from the mysterious future. * Configurations/DebugRelease.xcconfig: 2008-03-01 Oliver Hunt Reviewed by Sam Weinig. Bug 16954: Support putImageData Implement support for HTML5's putImageData for the CG port. All other ports are currently just using stubs for the final blit. Test: fast/canvas/canvas-putImageData.html * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::JSCanvasRenderingContext2D::putImageData): * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::putImageData): * html/CanvasRenderingContext2D.h: * platform/graphics/ImageBuffer.h: * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::putImageData): * platform/graphics/qt/ImageBufferQt.cpp: * platform/graphics/wx/ImageBufferWx.cpp: 2008-03-01 Jon Honeycutt Reviewed by Darin. Crashing viewing page with two VLC plug-in instances The VLC Netscape plug-in crashes if more than one instance is created. Added a quirk that disallows a plug-in from having more than one instance and set this for the VLC plug-in. In addition, we now sort plug-ins that handle the same MIME type to choose the most appropriate one. This sorting first sorts by whether a plug-in has an issue that should put it at the end of the list, then whether it appears in a "preferred" plug-in directory. * plugins/PluginQuirkSet.h: Added PluginQuirkDontAllowMultipleInstances. * plugins/PluginDatabase.cpp: (WebCore::PluginDatabase::preferredPluginCompare): Comparator for sorting plug-ins; calls PluginPackage::compare(). (WebCore::PluginDatabase::pluginForMIMEType): Add all of the plug-ins that handle this MIME type to a list, sort the list, and return the first item. (WebCore::PluginDatabase::MIMETypeForExtension): Add all of the plug-ins that handle this extension to a list, sort the list, and return the MIME type used by the plug-in at the beginning of the list. * plugins/PluginDatabase.h: * plugins/PluginPackage.h: (WebCore::PluginPackage::version): Added; returns the module version. * plugins/win/PluginDatabaseWin.cpp: (WebCore::PluginDatabase::isPreferredPluginPath): Made static; removed const. * plugins/win/PluginPackageWin.cpp: (WebCore::PluginPackage::compare): Sorts plug-ins with known issues to the end, then plug-ins in preferred directories to the beginning, then alphabetically by file name, numerically by version, and alphabetically by parent directory. (WebCore::PluginPackage::determineQuirks): Set the "don't allow multiple instances" quirk for VLC. (WebCore::PluginPackage::load): Return false if the plug-in library has already been loaded and the "don't allow multiple instances" quirk is set. * platform/gtk/TemporaryLinkStubs.cpp: (PluginPackage::compare): Added stub. (PluginDatabase::IsPreferredPluginPath): Update the GTK stub. * platform/qt/TemporaryLinkStubs.cpp: (PluginPackage::compare): Added stub. (PluginDatabase::IsPreferredPluginPath): Update the Qt stub. * platform/wx/TemporaryLinkStubs.cpp: (PluginPackage::compare): Added stub. (PluginDatabase::IsPreferredPluginPath): Update the wx stub. 2008-03-01 Sam Weinig Rubber-stamped by Mark Rowe. Remove reference to the now non-existent bridge directory. * WebCore.xcodeproj/project.pbxproj: 2008-03-01 Sam Weinig Reviewed by Darin Adler. Search the entire prototype chain when doing early prototype lookup in the Window's getOwnPropertySlot method. Makes fast/dom/Window/window-function-name-getter-precedence.html pass all tests. * bindings/js/kjs_window.cpp: (KJS::Window::getOwnPropertySlot): 2008-03-01 Nikolas Zimmermann Reviewed by Oliver. Fixes: http://bugs.webkit.org/show_bug.cgi?id=17568 (SVGForeignObjectElement can't react to width/height SVG DOM changes) As the bug title says, fix all dynamic update problems that occour with SVGForeignObjectElement. Tests: svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr.html svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr.html svg/dynamic-updates/SVGForeignObjectElement-dom-x-attr.html svg/dynamic-updates/SVGForeignObjectElement-dom-y-attr.html svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop.html svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop.html svg/dynamic-updates/SVGForeignObjectElement-svgdom-x-prop.html svg/dynamic-updates/SVGForeignObjectElement-svgdom-y-prop.html * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::parseMappedAttribute): (WebCore::addCSSPropertyAndNotifyAttributeMap): (WebCore::SVGForeignObjectElement::svgAttributeChanged): * svg/SVGForeignObjectElement.h: 2008-02-29 Brady Eidson Reviewed by build-fix karma Bonehead mistake. Revert function to previous version for all non-Windows+CFNetwork platforms * platform/network/ProtectionSpace.cpp: (WebCore::ProtectionSpace::receivesCredentialSecurely): Make my previous change conditionally 2008-02-29 Brady Eidson Reviewed by Darin - Incorrect password handling text in credential sheet * platform/network/ProtectionSpace.cpp: (WebCore::ProtectionSpace::receivesCredentialSecurely): Call functional CFNetwork method to get "secureness" of the auth challenge instead of figuring it out ourselves 2008-02-29 Brent Fulgham http://bugs.webkit.org/show_bug.cgi?id=17483 Implement scrollbars on Windows (Cairo) Reviewed by Adam Roben. * platform/win/PlatfromScrollBarWin.cpp: Duplicate implementation from PlatformScrollBarWinSafari.cpp, then modify to use the native Windows theme engine. Use SOFT_LINK. Use platform 'GetSystemMetrics' call to decide size of scrollbars and buttons. 2008-02-29 Adam Roben Windows build fix * WebCore.vcproj/WebCore.vcproj: Remove bridge/* from the include path and the post-build event, and add page/win to each. Also let VS have its way with the order of the files. * page/win/PageWin.cpp: Copied from bridge/win/PageWin.cpp in r30673 * page/win/GlobalHistoryWin.cpp: Copied from bridge/win/GlobalHistoryWin.cpp in r30673 2008-02-29 Anders Carlsson Build fix. * WebCore.xcodeproj/project.pbxproj: 2008-02-29 Mark Rowe Reviewed by Tim Hatcher. 64-bit build fix. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::pathFromFont): Provide stub implementation of pathFromFont for 64-bit as FMGetATSFontRefFromFont is not available. 2008-02-29 Mark Rowe Build fix. Only declare pathFromFont in debug builds as it is unused in release builds. * platform/graphics/mac/SimpleFontDataMac.mm: 2008-02-29 Anders Carlsson Reviewed by Adam. Copy the remaining files in bridge/ over to page/ * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bridge: Removed. * bridge/AXObjectCache.h: Removed. * bridge/EditorClient.h: Removed. * bridge/GlobalHistory.h: Removed. * bridge/win: Removed. * bridge/win/FrameCGWin.cpp: Removed. * bridge/win/FrameCairoWin.cpp: Removed. * bridge/win/FrameWin.cpp: Removed. * bridge/win/FrameWin.h: Removed. * bridge/win/GlobalHistoryWin.cpp: Removed. * bridge/win/PageWin.cpp: Removed. * page/AXObjectCache.h: Copied from bridge/AXObjectCache.h. * page/EditorClient.h: Copied from bridge/EditorClient.h. * page/GlobalHistory.h: Copied from bridge/GlobalHistory.h. * page/win/FrameCGWin.cpp: Copied from bridge/win/FrameCGWin.cpp. * page/win/FrameCairoWin.cpp: Copied from bridge/win/FrameCairoWin.cpp. * page/win/FrameWin.cpp: Copied from bridge/win/FrameWin.cpp. * page/win/FrameWin.h: Copied from bridge/win/FrameWin.h. 2008-02-29 Robert Blaut Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=17532 Webkit imports styles from element which doesn't have rel=stylesheet defined Test: fast/html/link-rel-stylesheet.html * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): 2008-02-29 Mark Rowe Reviewed by Anders Carlsson. Replace use of WKPathFromFont with implementation in terms of public API. * WebCore.base.exp: Remove unused symbol. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::initFontData): (WebCore::pathFromFont): Implement pathFromFont in terms of public API. (WebCore::SimpleFontData::platformInit): * platform/mac/WebCoreSystemInterface.h: Remove unused symbol. * platform/mac/WebCoreSystemInterface.mm: Ditto. 2008-02-29 Anders Carlsson Reviewed by Adam. Move a bunch of files from bridge/mac to page/mac. * WebCore.xcodeproj/project.pbxproj: * bridge/mac: Removed. * bridge/mac/AXObjectCacheMac.mm: Removed. * bridge/mac/GlobalHistoryMac.mm: Removed. * bridge/mac/WebCoreAXObject.h: Removed. * bridge/mac/WebCoreAXObject.mm: Removed. * bridge/mac/WebCoreScriptDebugger.h: Removed. * bridge/mac/WebCoreScriptDebugger.mm: Removed. * page/mac/AXObjectCacheMac.mm: Copied from bridge/mac/AXObjectCacheMac.mm. * page/mac/GlobalHistoryMac.mm: Copied from bridge/mac/GlobalHistoryMac.mm. * page/mac/WebCoreAXObject.h: Copied from bridge/mac/WebCoreAXObject.h. * page/mac/WebCoreAXObject.mm: Copied from bridge/mac/WebCoreAXObject.mm. * page/mac/WebCoreScriptDebugger.h: Copied from bridge/mac/WebCoreScriptDebugger.h. * page/mac/WebCoreScriptDebugger.mm: Copied from bridge/mac/WebCoreScriptDebugger.mm. 2008-02-29 David Hyatt Fix for http://bugs.webkit.org/show_bug.cgi?id=17559, media query tests crashing under guard malloc. Pass along the style selector so it can be accessed, since it has not yet been assigned into the document's member variable. Reviewed by aroben * css/CSSStyleSelector.cpp: (WebCore::CSSRuleSet::addRulesFromSheet): * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::eval): * css/MediaQueryEvaluator.h: 2008-02-29 David Hyatt REGRESSION: Loading HTML5 spec is 5x slower on TOT than in 3.0.4 Improve the performance of dynamic sibling and CSS3 selectors so that there is no slowdown any more. Be more precise in terms of what nodes we mark dirty. Reviewed by Beth * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkSelector): * dom/Element.cpp: (WebCore::Element::recalcStyle): (WebCore::checkForSiblingStyleChanges): (WebCore::Element::childrenChanged): (WebCore::Element::finishParsingChildren): * rendering/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/RenderStyle.h: (WebCore::RenderStyle::childrenAffectedByPositionalRules): (WebCore::RenderStyle::childrenAffectedByDirectAdjacentRules): (WebCore::RenderStyle::setChildrenAffectedByDirectAdjacentRules): 2008-02-29 Alexey Proskuryakov Reviewed by Darin. REGRESSION (r27151): XMLHttpRequest.abort() resets response status Test: http/tests/xmlhttprequest/status-after-abort.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::getStatus): (WebCore::XMLHttpRequest::getStatusText): Changed to match Firefox more closely (IE just raises an exception in most of those cases). 2008-02-29 Dan Bernstein Reviewed by Darin Adler. - fix a bug where explicit embedding past the end of a line could affect text that line Test: fast/text/embed-at-end-of-pre-wrap-line.html * rendering/bidi.cpp: (WebCore::RenderBlock::skipWhitespace): Removed calls to setAdjustEmbedding(). (WebCore::RenderBlock::findNextLineBreak): Added calls to setAdjustEmbedding() around skipWhitespace() only where needed. 2008-02-29 Mark Rowe Reviewed by Oliver Hunt. Don't use WKSupportsMultipartXMixedReplace on Leopard as multipart/x-mixed-replace is always handled by NSURLRequest. * platform/mac/WebCoreSystemInterface.h: Don't declare WKSupportsMultipartXMixedReplace on Leopard. * platform/mac/WebCoreSystemInterface.mm: Ditto. * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdatePlatformRequest): Don't call WKSupportsMultipartXMixedReplace on Leopard. * WebCore.Tiger.exp: Move Tiger-only symbol here. * WebCore.base.exp: 2008-02-29 Mark Rowe Rubber-stamped by Eric Seidel. Remove unneeded includes of WebCoreSystemInterface.h. * loader/mac/LoaderNSURLExtras.m: * page/mac/FrameMac.mm: * page/mac/WebCoreFrameBridge.mm: * platform/MIMETypeRegistry.cpp: * platform/graphics/mac/ImageMac.mm: * platform/mac/PasteboardMac.mm: 2008-02-29 Mark Rowe Reviewed by Oliver Hunt and Oliver Hunt. WebKit should use CGEventSourceSecondsSinceLastEventType in place of WKSecondsSinceLastInputEvent SPI. * platform/mac/SystemTimeMac.cpp: Replace use of WKSecondsSinceLastInputEvent with CGEventSourceSecondsSinceLastEventType. * platform/mac/WebCoreSystemInterface.h: Remove unused symbol. * platform/mac/WebCoreSystemInterface.mm: Ditto. * WebCore.base.exp: Ditto. 2008-02-28 Mark Rowe Reviewed by Dave Hyatt. Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call. * DerivedSources.make: Add Tiger-only symbols to the export file when running on Tiger. * WebCore.Tiger.exp: Added. Move Tiger-only symbol here from WebCore.base.exp. * WebCore.base.exp: * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): Use Leopard APIs when building on Leopard. * platform/mac/WebCoreSystemInterface.h: Don't declare wkGetFontMetrics on Leopard as it is unused. * platform/mac/WebCoreSystemInterface.mm: Ditto. 2008-02-28 Matt Lilek Reviewed by Tim Hatcher. Bug 16535: Stylesheets loaded with @import are not editable http://bugs.webkit.org/show_bug.cgi?id=16535 Sheets loaded using @import were incorrectly being flagged as non-editable user agent sheets because their parent sheet doesn't have an ownerNode. We now check to make sure sheets also don't have a href before restricting their editability. * page/inspector/StylesSidebarPane.js: 2008-02-28 Rodney Dawes Reviewed by Adam Roben. Copy PluginPackageWin.cpp to shared PluginPackage.cpp. Add PluginPackage.cpp to build configurations. Remove PluginPackage destructor from TemporaryLinkStubs.cpp. Use cross-platform pathGetFilename method. Remove platform-specific code from shared PluginPackage implementation. Remove shared code from PluginPackageWin.cpp. * GNUmakefile.am: * WebCore.pro: * WebCoreSources.bkl: * WebCore.vcproj/WebCore.vcproj: * platform/gtk/TemporaryLinkStubs.cpp: * platform/qt/TemporaryLinkStubs.cpp: * platform/wx/TemporaryLinkStubs.cpp: * plugins/PluginPackage.cpp: * plugins/win/PluginPackageWin.cpp: 2008-02-28 Justin Garcia Reviewed by Darin Adler. REGRESSION: Paste As Quotation pastes black text instead of blue Add a second style span at copy time to hold document default styles. This helps us differentiate between those and user applied styles at paste time, where we'll want to let Mail's Paste As Quotation blockquote override document default styles, but not others. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed the unit type used for -webkit-text-stroke-width from CSS_NUMBER to CSS_PX, to match other properties that are thick | medium | thin | . Before, there was a mismatch between the unit type of -webkit-text-stroke-width property values in a CSSComputedStyleDeclaration for an element and that element's inlineStyleDecl(), causing identical values to always appear different to diff(). * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::handlePasteAsQuotationNode): Fixed. Don't just change the class to an empty string, completely remove it, it's no longer needed. (WebCore::handleStyleSpansBeforeInsertion): Moved the optimization from doApply here. (WebCore::ReplaceSelectionCommand::handleStyleSpans): Added, replaces removeRedundantStyles. We aren't (yet) removing all redundant styles, just those on style spans, so I removed the unused code and renamed the function. There won't be more than two style spans that we need to consider, the one with the source document's default styles and styles on the commonAncestor of the copied Range, so don't look for more than two. Let elements that wrap the incoming fragment override the source document's styles. (WebCore::ReplaceSelectionCommand::doApply): Moved code to handleStyleSpansBeforeInsertion and call the renamed handleStyleSpans. * editing/ReplaceSelectionCommand.h: * editing/markup.cpp: (WebCore::removeDefaultStyles): Added. Don't add document defaults to the style span that holds user applied styles, since they'll be added to their own style span. (WebCore::createMarkup): Add a second style span that holds just the document defaults. This lets us differentiate between those and user applied styles at paste time. Mail blockquotes are just another type of special element, moved their handling there. This also lets paste code make assumptions about the position of the two style spans (they are *always* parent-child). 2008-02-28 Brent Fulgham http://bugs.webkit.org/show_bug.cgi?id=17576 Modify RenderThemeWin to use SOFT_LINK Reviewed by Adam Roben. * rendering/RenderThemeWin.h: Remove unneeded library handle * rendering/RenderThemeWin.cpp: Change to use SOFT_LINK rather than hand-coded load library calls. 2008-02-28 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=17590 ASSERTION FAILED: subject in jsRegExpExecute() * page/mac/FrameMac.mm: (WebCore::Frame::matchLabelsAgainstElement): Added an early return in case the element name is empty. 2008-02-28 Justin Garcia Reviewed by Dan Bernstein Small editing speed up. * dom/Position.cpp: (WebCore::Position::upstream): Don't check for a change in editability if the current node hasn't changed. (WebCore::Position::downstream): Ditto. 2008-02-27 Dan Bernstein Reviewed by John Sullivan. - fix Single letter surrounded by soft hyphens can disappear Test: fast/text/soft-hyphen-2.html * rendering/bidi.cpp: (WebCore::chopMidpointsAt): Changed to iterate midpoints backwards, so that if there are two midpoints at the given position, only the last one will be chopped off. 2008-02-27 Dan Bernstein Reviewed by Darin Adler. - make centered text in right-to-left blocks spill over to the left Test: fast/text/align-center-rtl-spill.html * rendering/bidi.cpp: (WebCore::RenderBlock::computeHorizontalPositionsForLine): 2008-02-27 Dan Bernstein Reviewed by Darin Adler. - more bidi.cpp cleanup * platform/text/BidiResolver.h: (WebCore::BidiCharacterRun::destroy): Added. Overridden by BidiRun . (WebCore::BidiResolver::addRun): Moved BidiState::addRun() here. (WebCore::BidiResolver::appendRun): Changed to use addRun(). (WebCore::BidiResolver::deleteRuns): Changed to use destroy(), avoiding the need to specialize this method in BidiState. * rendering/bidi.cpp: (WebCore::BidiRun::destroy): Removed the RenderArena parameter. (WebCore::BidiState::deleteRuns): Removed now-unnecessary specialization. (WebCore::BidiState::addRun): Removed now-unnecessary specialization. (WebCore::RenderBlock::createLineBoxes): (WebCore::RenderBlock::constructLine): (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added a FIXME. (WebCore::RenderBlock::computeVerticalPositionsForLine): (WebCore::buildCompactRuns): (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::determineStartPosition): (WebCore::RenderBlock::determineEndPosition): (WebCore::RenderBlock::matchedEndLine): (WebCore::skipNonBreakingSpace): (WebCore::RenderBlock::skipWhitespace): (WebCore::shouldSkipWhitespaceAfterStartObject): * rendering/bidi.h: (WebCore::BidiRun): Added m_ prefixes to several member variables. 2008-02-27 Sam Weinig Reviewed by Darin. Fix for - Don't allow cross-origin calls using window.functionName.call(otherFrame) syntax. * bindings/js/JSLocation.cpp: (WebCore::jsLocationProtoFuncToString): Do same-origin check. * bindings/js/kjs_window.cpp: (KJS::windowProtoFuncAToB): Ditto. (KJS::windowProtoFuncBToA): Ditto. (KJS::windowProtoFuncOpen): Ditto. (KJS::windowProtoFuncClearTimeout): Ditto. * bindings/scripts/CodeGeneratorJS.pm: Ditto. 2008-02-27 David Hyatt More cleanup in preparation for fixing the HTML5 spec performance regression. Reviewed by Sam Weinig * dom/Attr.cpp: (WebCore::Attr::childrenChanged): * dom/Attr.h: * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::removeChildren): (WebCore::ContainerNode::appendChild): (WebCore::ContainerNode::addChild): (WebCore::ContainerNode::childrenChanged): * dom/ContainerNode.h: * dom/Document.cpp: (WebCore::Document::childrenChanged): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::childrenChanged): * dom/Element.h: * dom/Node.h: (WebCore::Node::childrenChanged): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::childrenChanged): * html/HTMLObjectElement.h: * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::childrenChanged): * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::childrenChanged): * html/HTMLOptionElement.h: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::childrenChanged): * html/HTMLScriptElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): * html/HTMLSelectElement.h: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::childrenChanged): * html/HTMLStyleElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::childrenChanged): * html/HTMLTextAreaElement.h: * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::childrenChanged): * html/HTMLTitleElement.h: * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::childrenChanged): * svg/SVGClipPathElement.h: * svg/SVGDefinitionSrcElement.cpp: (WebCore::SVGDefinitionSrcElement::childrenChanged): * svg/SVGDefinitionSrcElement.h: * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::childrenChanged): * svg/SVGFontFaceElement.h: * svg/SVGFontFaceFormatElement.cpp: (WebCore::SVGFontFaceFormatElement::childrenChanged): * svg/SVGFontFaceFormatElement.h: * svg/SVGFontFaceSrcElement.cpp: (WebCore::SVGFontFaceSrcElement::childrenChanged): * svg/SVGFontFaceSrcElement.h: * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::childrenChanged): * svg/SVGFontFaceUriElement.h: * svg/SVGGElement.cpp: (WebCore::SVGGElement::childrenChanged): * svg/SVGGElement.h: * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::childrenChanged): * svg/SVGGradientElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::childrenChanged): * svg/SVGMarkerElement.h: * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::childrenChanged): * svg/SVGMaskElement.h: * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::childrenChanged): * svg/SVGPatternElement.h: * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::childrenChanged): * svg/SVGStyleElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::childrenChanged): * svg/SVGStyledElement.h: * svg/SVGTitleElement.cpp: (WebCore::SVGTitleElement::childrenChanged): * svg/SVGTitleElement.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::childrenChanged): * svg/SVGUseElement.h: 2008-02-27 Julien Chaffraix Reviewed by Alexey. http://bugs.webkit.org/show_bug.cgi?id=17481 Several consecutive calls to XMLHttpRequest::open should dispatch only one readyState event Test: http/tests/xmlhttprequest/xmlhttprequest-multiple-open.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): 2008-02-27 Sriram Neelakandan Reviewed, tweaked and landed by ap. http://bugs.webkit.org/show_bug.cgi?id=17487 HTMLInput mysteriously fails to work if ICU dat file is missing * platform/text/TextBreakIteratorICU.cpp: (WebCore::setUpIterator): Assert that the iterator has been opened. 2008-02-27 Adam Roben Windows build fix after r30616 * platform/win/ClipboardWin.cpp: 2008-02-27 Nikolas Zimmermann Reviewed by Simon. Small style cleanup, and obvious fix: SVGGElement reacted on 'clipPathUnits' changes, which is a funny copy&paste error. * svg/SVGGElement.cpp: (WebCore::SVGGElement::parseMappedAttribute): (WebCore::SVGGElement::svgAttributeChanged): (WebCore::SVGGElement::createRenderer): 2008-02-27 Nikolas Zimmermann Reviewed by Simon. Cleanup coding style. Still on my way to fix dynamic updates of all SVG elements. Currently at SVGF*. SVGDefs/DescElement don't need any dyn update fixes but cleanups. * svg/SVGDefsElement.cpp: (WebCore::SVGDefsElement::createRenderer): * svg/SVGDefsElement.h: * svg/SVGDescElement.h: 2008-02-26 Antti Koivisto Reviewed by Darin. Fix REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang) Generate better code with VS: - Use ALWAYS_INLINE macro to guarantee versions of allowsAccessFrom() are reduced to single functions - Refactor error reporting so that there is no need to construct/destruct Strings in common cases - Add a separate version of the function for cases where error messages are not wanted * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::customGetOwnPropertySlot): * bindings/js/kjs_window.cpp: (KJS::Window::allowsAccessFrom): (KJS::Window::allowsAccessFromNoErrorMessage): (KJS::Window::allowsAccessFromPrivate): (KJS::Window::crossDomainAccessErrorMessage): * bindings/js/kjs_window.h: 2008-02-26 Sam Weinig Reviewed by Dave Hyatt. - remove DeprecatedCString, DeprecatedArray, and ArrayImpl. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * platform/ArrayImpl.cpp: Removed. * platform/ArrayImpl.h: Removed. * platform/DeprecatedArray.h: Removed. * platform/DeprecatedCString.cpp: Removed. * platform/DeprecatedCString.h: Removed. * platform/text/CString.cpp: (WebCore::CString::length): * platform/text/CString.h: 2008-02-26 David Hyatt Cleanup of childrenChanged in preparation for fixing the HTML5 spec slowdown. Reviewed by Sam Weinig * dom/Attr.cpp: (WebCore::Attr::childrenChanged): * dom/ContainerNode.cpp: (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::removeChildren): (WebCore::ContainerNode::appendChild): (WebCore::ContainerNode::addChild): (WebCore::ContainerNode::childrenChanged): * dom/ContainerNode.h: * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): * dom/EventTargetNode.h: * dom/NamedAttrMap.cpp: (WebCore::NamedAttrMap::addAttribute): (WebCore::NamedAttrMap::removeAttribute): 2008-02-26 Darin Adler Reviewed by Sam. - remove use of DeprecatedCString from Windows pasteboard code * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::createGlobalData): Added an overload for Vector. Streamlined the logic a bit. (WebCore::append): Added. Helper functions for appending to a Vector. (WebCore::markupToCF_HTML): Rewrote to use Vector instead of DeprecatedCString. Also simplified the logic a bit and used macros to handle the integer width. (WebCore::urlToMarkup): Use Vector instead of String. (WebCore::replaceNewlinesWithWindowsStyleNewlines): Tweaked. * platform/win/ClipboardUtilitiesWin.h: Update type of return value from markupToCF_HTML. Did a bit of streamlining too. * platform/win/ClipboardWin.cpp: (WebCore::writeURL): Update for above changes. (WebCore::ClipboardWin::declareAndWriteDragImage): Ditto. (WebCore::ClipboardWin::writeRange): Ditto. * platform/win/PasteboardWin.cpp: (WebCore::Pasteboard::writeSelection): Ditto. (WebCore::Pasteboard::writeURL): Ditto. 2008-02-26 Timothy Hatcher Reviewed by Adam Roben. REGRESSION: Arrow up/down in inspector source list does not scroll when item at edge is reached (16572) Use scrollIntoViewIfNeeded() instead of the hand-rolled scrollToElement we were using in utilities.js. * page/inspector/DocumentPanel.js: Use scrollIntoViewIfNeeded instead of scrollToElement. * page/inspector/Resource.js: Ditto. * page/inspector/inspector.js: Ditto. * page/inspector/SourcePanel.js: Use scrollIntoViewIfNeeded instead of scrollIntoView, so the source line is centered in the view if needed. * page/inspector/utilities.js: Removed scrollToElement(). 2008-02-26 David Hyatt Reviewed by Dan http://bugs.webkit.org/show_bug.cgi?id=17485 Refine our behavior for empty inlines so that they work more correctly with margins/borders/padding. Fixes a regression on huffingtonpost.com. New tests added to fast/inline * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesVertically): (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren): * rendering/RenderFlow.cpp: (WebCore::RenderFlow::calcMargins): * rendering/RenderFlow.h: * rendering/RenderObject.h: (WebCore::RenderObject::hasHorizontalBordersPaddingOrMargin): (WebCore::RenderObject::hasHorizontalBordersOrPadding): * rendering/bidi.cpp: (WebCore::getBorderPaddingMargin): (WebCore::RenderBlock::layoutInlineChildren): (WebCore::inlineFlowRequiresLineBox): 2008-02-26 Sam Weinig Fix Windows build. * platform/text/PlatformString.h: (WebCore::reverseFind): 2008-02-26 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=17555 REGRESSION (r27351): Thumbnails positioned wrong on Getty Images results page Test: fast/dynamic/subtree-table-cell-height.html * rendering/RenderObject.cpp: (WebCore::objectIsRelayoutBoundary): Exclude table cells, since their height depends on their contents even if the CSS height property is fixed. 2008-02-25 Sam Weinig Reviewed by Dan Bernstein. Make the cleanPath function in CSSStyleSelector more efficient by using a Vector. * css/CSSStyleSelector.cpp: (WebCore::cleanPath): Make this function work on a Vector instead of a String. Also remove unnecessary reverseFind call that could be acomplished with two compares. (WebCore::checkPseudoState): Remove reserveCapacity calls now that we are using a stack buffer. * platform/text/PlatformString.h: (WebCore::find): Make this find generic enough that it can be used for String::find. (WebCore::reverseFind): Implement reverseFind so that it can be used for with a UChar* and length. * platform/text/StringImpl.cpp: (WebCore::StringImpl::find): Use implementation in PlatformString.cpp (WebCore::StringImpl::reverseFind): Ditto, 2008-02-26 Satoshi Nakagawa Reviewed by Darin. Tweaked and landed by Alexey. http://bugs.webkit.org/show_bug.cgi?id=17411 Ideographic comma and full stop should be treated as line-breakable characters Test: fast/text/line-breaks-after-ideographic-comma-or-full-stop.html * platform/text/CharacterNames.h: Added ideographicComma and ideographicFullStop. * rendering/break_lines.cpp: (WebCore::shouldBreakAfter): Added a workaround for an issue in Unicode 5.0 that is causing this. 2008-02-26 MorganL Reviewed by eseidel. Landed by eseidel Fix improperly initialized m_isUpToDate member variable. Fixs 50+ layout tests when run on Tiger. http://bugs.webkit.org/show_bug.cgi?id=17549 * platform/network/cf/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): * platform/network/mac/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): 2008-02-25 Dan Bernstein Reviewed by Sam Weinig. - fix http://bugs.webkit.org/show_bug.cgi?id=17152 Paragraphs indented with :first-letter and text-align CSS render incorrectly Test: fast/text/apply-start-width-after-skipped-text.html * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Improved the logic for when to figure in the padding, border and margin before a text node when the line begins inside a text node. 2008-02-25 Kevin Ollivier Windows build fix for wx port. * loader/FTPDirectoryDocument.cpp: 2008-02-25 Mark Rowe Windows build fix. * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformCompare): Implement platformCompare for ResourceResponseCFNet.cpp. 2008-02-25 Beth Dakin Reviewed by Geoff. Fixed for REGRESSION: Assertion failure in Document::removePendingSheet() from r30438 r30438 added a call to CachedResource::error() from inside Loader::didReceiveData() if a CSS file 4xxs. There was an assumption in the loader, though, that either error() would be called, or didFinishLoading() would be called, so some work is duplicated in each. Now that we are calling an error() on files that will also make it to didFinishLoading() (since they succeeded in the network layer), we need to make sure we do not duplicate the work. CachedCSSStyleSheet::error() calls checkNotify, which ends up decrementing the document's pending style sheet counter. checkNotify() was still getting called, though, through the normal didFinishLoading code path, and the counter was being decremented twice. Bad! * loader/loader.cpp: (WebCore::Loader::didFinishLoading): (WebCore::Loader::didReceiveData): 2008-02-25 Mark Rowe Fix the Gtk, wx and Qt builds. * GNUmakefile.am: Add new files. * WebCore.pro: Ditto. * WebCoreSources.bkl: Ditto. * platform/network/AuthenticationChallengeBase.h: Fix up argument types. 2008-02-25 MorganL Reviewed by Darin Adler. Eliminate some #ifdefs from headers in platform/network. http://bugs.webkit.org/show_bug.cgi?id=17210 * WebCore.base.exp: * WebCore.order: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/XMLTokenizer.cpp: * loader/ResourceLoader.h: * platform/network/AuthenticationChallenge.cpp: Removed. * platform/network/AuthenticationChallenge.h: Removed. * platform/network/AuthenticationChallengeBase.cpp: Copied from platform/network/AuthenticationChallenge.cpp. (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase): (WebCore::AuthenticationChallengeBase::previousFailureCount): (WebCore::AuthenticationChallengeBase::proposedCredential): (WebCore::AuthenticationChallengeBase::protectionSpace): (WebCore::AuthenticationChallengeBase::failureResponse): (WebCore::AuthenticationChallengeBase::error): (WebCore::AuthenticationChallengeBase::isNull): (WebCore::AuthenticationChallengeBase::nullify): (WebCore::AuthenticationChallengeBase::compare): * platform/network/AuthenticationChallengeBase.h: Copied from platform/network/AuthenticationChallenge.h. (WebCore::AuthenticationChallengeBase::platformCompare): (WebCore::operator==): (WebCore::operator!=): * platform/network/ResourceError.cpp: Removed. * platform/network/ResourceError.h: Removed. * platform/network/ResourceErrorBase.cpp: Copied from platform/network/ResourceError.cpp. (WebCore::ResourceErrorBase::lazyInit): (WebCore::ResourceErrorBase::compare): * platform/network/ResourceErrorBase.h: Copied from platform/network/ResourceError.h. (WebCore::ResourceErrorBase::isNull): (WebCore::ResourceErrorBase::domain): (WebCore::ResourceErrorBase::errorCode): (WebCore::ResourceErrorBase::failingURL): (WebCore::ResourceErrorBase::localizedDescription): (WebCore::ResourceErrorBase::ResourceErrorBase): (WebCore::ResourceErrorBase::platformLazyInit): (WebCore::ResourceErrorBase::platformCompare): (WebCore::operator==): * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::isHTTP): (WebCore::ResourceResponseBase::url): (WebCore::ResourceResponseBase::setUrl): (WebCore::ResourceResponseBase::mimeType): (WebCore::ResourceResponseBase::setMimeType): (WebCore::ResourceResponseBase::expectedContentLength): (WebCore::ResourceResponseBase::setExpectedContentLength): (WebCore::ResourceResponseBase::textEncodingName): (WebCore::ResourceResponseBase::setTextEncodingName): (WebCore::ResourceResponseBase::suggestedFilename): (WebCore::ResourceResponseBase::setSuggestedFilename): (WebCore::ResourceResponseBase::httpStatusCode): (WebCore::ResourceResponseBase::setHTTPStatusCode): (WebCore::ResourceResponseBase::httpStatusText): (WebCore::ResourceResponseBase::setHTTPStatusText): (WebCore::ResourceResponseBase::httpHeaderField): (WebCore::ResourceResponseBase::setHTTPHeaderField): (WebCore::ResourceResponseBase::httpHeaderFields): (WebCore::ResourceResponseBase::isAttachment): (WebCore::ResourceResponseBase::setExpirationDate): (WebCore::ResourceResponseBase::expirationDate): (WebCore::ResourceResponseBase::setLastModifiedDate): (WebCore::ResourceResponseBase::lastModifiedDate): (WebCore::ResourceResponseBase::lazyInit): (WebCore::ResourceResponseBase::compare): * platform/network/ResourceResponseBase.h: (WebCore::ResourceResponseBase::ResourceResponseBase): (WebCore::ResourceResponseBase::platformLazyInit): (WebCore::ResourceResponseBase::platformCompare): (WebCore::operator==): * platform/network/cf/AuthenticationCF.cpp: (WebCore::AuthenticationChallenge::AuthenticationChallenge): (WebCore::AuthenticationChallenge::platformCompare): * platform/network/cf/AuthenticationChallenge.h: Added. (WebCore::AuthenticationChallenge::AuthenticationChallenge): (WebCore::AuthenticationChallenge::sourceHandle): (WebCore::AuthenticationChallenge::cfURLAuthChallengeRef): * platform/network/cf/ResourceError.h: Added. (WebCore::ResourceError::ResourceError): * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::ResourceError): (WebCore::ResourceError::platformLazyInit): (WebCore::ResourceError::platformCompare): (WebCore::ResourceError::operator CFStreamError): * platform/network/cf/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit): * platform/network/curl/AuthenticationChallenge.h: Added. (WebCore::AuthenticationChallenge::AuthenticationChallenge): * platform/network/curl/ResourceError.h: Added. (WebCore::ResourceError::ResourceError): * platform/network/curl/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): * platform/network/mac/AuthenticationChallenge.h: Added. (WebCore::AuthenticationChallenge::AuthenticationChallenge): (WebCore::AuthenticationChallenge::sender): (WebCore::AuthenticationChallenge::nsURLAuthenticationChallenge): * platform/network/mac/AuthenticationMac.mm: (WebCore::AuthenticationChallenge::AuthenticationChallenge): (WebCore::AuthenticationChallenge::platformCompare): * platform/network/mac/ResourceError.h: Added. (WebCore::ResourceError::ResourceError): * platform/network/mac/ResourceErrorMac.mm: (WebCore::ResourceError::platformLazyInit): (WebCore::ResourceError::platformCompare): * platform/network/mac/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit): (WebCore::ResourceResponse::platformCompare): * platform/network/qt/AuthenticationChallenge.h: Added. (WebCore::AuthenticationChallenge::AuthenticationChallenge): * platform/network/qt/ResourceError.h: Added. (WebCore::ResourceError::ResourceError): * platform/network/qt/ResourceResponse.h: (WebCore::ResourceResponse::ResourceResponse): * xml/XSLTProcessor.cpp: 2008-02-25 Anders Carlsson Reviewed by Darin. Move remaining render style objects over to start with a refcount of 1 and get rid of DeprecatedDataRef. * rendering/DataRef.h: (WebCore::DataRef::operator*): (WebCore::DataRef::operator->): * rendering/RenderStyle.h: * rendering/SVGRenderStyle.cpp: (WebCore::SVGRenderStyle::SVGRenderStyle): * rendering/SVGRenderStyle.h: (WebCore::SVGRenderStyle::create): (WebCore::SVGRenderStyle::copy): * rendering/SVGRenderStyleDefs.cpp: (StyleFillData::StyleFillData): (StyleStrokeData::StyleStrokeData): (StyleStopData::StyleStopData): (StyleTextData::StyleTextData): (StyleClipData::StyleClipData): (StyleMaskData::StyleMaskData): (StyleMarkerData::StyleMarkerData): (StyleMiscData::StyleMiscData): * rendering/SVGRenderStyleDefs.h: (WebCore::StyleFillData::create): (WebCore::StyleFillData::copy): (WebCore::StyleStrokeData::create): (WebCore::StyleStrokeData::copy): (WebCore::StyleStopData::create): (WebCore::StyleStopData::copy): (WebCore::StyleTextData::create): (WebCore::StyleTextData::copy): (WebCore::StyleClipData::create): (WebCore::StyleClipData::copy): (WebCore::StyleMaskData::create): (WebCore::StyleMaskData::copy): (WebCore::StyleMarkerData::create): (WebCore::StyleMarkerData::copy): (WebCore::StyleMiscData::create): (WebCore::StyleMiscData::copy): 2008-02-25 Dan Bernstein Reviewed by Dave Hyatt. - remove file-static BidiRun variables from bidi.cpp * platform/text/BidiResolver.h: (WebCore::BidiResolver::): Initialize m_logicallyLastRun. (WebCore::BidiResolver::logicallyLastRun): Added. (WebCore::BidiResolver::runCount): Made unsigned. (WebCore::::reverseRuns): Changed ints to unsigned. (WebCore::::createBidiRunsForLine): Made this function set m_logicallyLastRun. * rendering/RenderBlock.h: * rendering/bidi.cpp: (WebCore::BidiState::addRun): Removed setting of sLogicallyLastBidiRun. (WebCore::RenderBlock::constructLine): Removed unused start parameter and added run count and first and last run parameters. Replaced end parameter with lastLine boolean and endObject pointer. (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added first and logically last run parameters. (WebCore::RenderBlock::computeVerticalPositionsForLine): Added firstRun parameter. (WebCore::RenderBlock::bidiReorderLine): Removed setting of static variables. (WebCore::RenderBlock::layoutInlineChildren): Changed to use BidiState accessors instead of file statics. 2008-02-25 Rodney Dawes Reviewed by Jon Honeycutt. http://bugs.webkit.org/show_bug.cgi?id=16924 Bug 16924: Shared PluginDatabase, PluginPackage, and PlugInInfoStore implementations Add PluginInfoStore.cpp and new PluginDatabase.cpp to GTK+ and Qt ports. Remove old PlugInInfoStoreQt.cpp as it is obsoleted by shared code. Add PluginInfoStore, PluginDatabase, and PluginStream files to Wx build. Add new PluginDatabase.cpp to Windows build. Add temporary stubs for new PluginDatabase and PluginPackage. shared classes to GTK+, Qt, and Wx ports. Copy PluginDatabaseWin.cpp to PluginDatabase.cpp to preserve history. Remove shared code from PluginDatabaseWin.cpp. Remove Windows-specific code from PluginDatabase.cpp. Use PlatformModule and PlatformFileTime instead of HMODULE and FILETIME. Remove extraneous PluginPackage:: from hash() class method prototype. Subsume storeFileVersion into PluginPackage::fetchInfo. Add cross-platform PlatformModuleVersion type definition. Use PlatformModuleVersion to store the module version. Rename m_fileVersion[ML]S to m_moduleVersion. Change compareFileVersion to use PlatformModuleVersion as the argument. Move PluginView::determineQuirks and m_quirks to PluginPackage. Updated determineQuirks for the PlatformModuleVersion. * GNUmakefile.am: * WebCore.pro: * WebCoreSources.bkl: * webcore-base.bkl: * WebCore.vcproj/WebCore.vcproj: * Platform/FileSystem.h: * platform/qt/PlugInInfoStoreQt.cpp: * platform/gtk/TemporaryLinkStubs.cpp: * platform/qt/TemporaryLinkStubs.cpp: * platform/wx/TemporaryLinkStubs.cpp: * plugins/PluginDatabase.cpp: * plugins/PluginDatabase.h: * plugins/win/PluginDatabaseWin.cpp: * plugins/PluginPackage.h: * plugins/win/PluginPackageWin.cpp: * plugins/PluginView.h: * plugins/win/PluginViewWin.cpp: 2008-02-25 Anders Carlsson Reviewed by Darin. Make more style objects start out with a refcount of 1. * rendering/RenderStyle.cpp: (WebCore::StyleSurroundData::StyleSurroundData): (WebCore::StyleBoxData::StyleBoxData): (WebCore::StyleVisualData::StyleVisualData): (WebCore::StyleBackgroundData::StyleBackgroundData): (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleInheritedData::StyleInheritedData): * rendering/RenderStyle.h: (WebCore::StyleSurroundData::create): (WebCore::StyleSurroundData::copy): (WebCore::StyleBoxData::create): (WebCore::StyleBoxData::copy): (WebCore::StyleVisualData::create): (WebCore::StyleVisualData::copy): (WebCore::StyleBackgroundData::create): (WebCore::StyleBackgroundData::copy): (WebCore::StyleBackgroundData::~StyleBackgroundData): (WebCore::StyleRareNonInheritedData::create): (WebCore::StyleRareNonInheritedData::copy): (WebCore::StyleRareInheritedData::create): (WebCore::StyleRareInheritedData::copy): (WebCore::StyleInheritedData::create): (WebCore::StyleInheritedData::copy): 2008-02-25 Anders Carlsson Reviewed by Darin. Make some of the refcounted style objects start out with a refcount of 1. * rendering/DataRef.h: Make a DeprecatedDataRef class which is just a copy of the old DataRef class. Change DataRef to use ::create() and ::copy() instead of the constructors. Change DataRef's pointer to be a RefPtr instead. * rendering/RenderStyle.cpp: (WebCore::StyleMarqueeData::StyleMarqueeData): (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleMultiColData::StyleMultiColData): (WebCore::StyleTransformData::StyleTransformData): Start with a RefCount of 1. * rendering/RenderStyle.h: * rendering/SVGRenderStyle.h: Add ::create() and ::copy() methods. Make not yet converted classes use DeprecatedDataRef. 2008-02-25 Darin Adler Reviewed by Anders. Based on a patch by Tim Steele . - fix http://bugs.webkit.org/show_bug.cgi?id=17186 Fragment navigation within a page permanently cancels meta refresh Test: fast/loader/meta-refresh-anchor-click.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::load): When load type is FrameLoadTypeRedirectWithLockedHistory, always do a real load. This makes sure that meta refresh loads are treated as real loads rather than anchor scrolls. Also tweaked formatting a bit. (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): This function is an alternate way to complete a load, so it needs to start the redirection timer if redirection has already been scheduled. 2008-02-25 Dan Bernstein Reviewed by Darin Adler. - avoid counting spaces in non-justified text * rendering/bidi.cpp: Removed file-static numSpaces. (WebCore::BidiState::addRun): Removed space counting. (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added space counting, conditional on the block having the text-align: justify property value. (WebCore::RenderBlock::bidiReorderLine): Removed initialization of numSpaces. 2008-02-25 Darin Adler Requested by Steve. * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::createFrameAtIndex): Put the string into a global variable (because CFSTR is inefficient on Windows). 2008-02-25 Darin Adler Reviewed by Adam. * WebCore.base.exp: Export blankURL, and sort the file. 2008-02-25 Simon Hausmann Reviewed by Mark Rowe. Fix compilation with gcc 4.3, added stdio.h and unistd.h inclusions. * dom/Position.cpp: * dom/Range.cpp: * editing/Selection.cpp: * editing/SelectionController.cpp: * editing/VisiblePosition.cpp: * history/HistoryItem.cpp: * loader/Cache.cpp: * loader/FTPDirectoryParser.cpp: * platform/KURL.cpp: * platform/gtk/FileSystemGtk.cpp: * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: * platform/text/TextCodecLatin1.cpp: * platform/text/TextCodecUserDefined.cpp: * rendering/CounterNode.cpp: * rendering/RenderObject.cpp: 2008-02-25 Johnny Ding Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=17444 In HTMLTokenizer::write, the code checks 'pendingScripts.isEmpty()' to decide whether to save prependingSrc or not. However, in HTMLTokenizer::scriptHandler and HTMLTokenizer::scriptExecution, the code checks testBit:LoadingExtScript to decide whether to save prependingSrc or not. The later behavior is not right because, in scriptHandler and scriptExecution, even the pendingScripts queue is empty, the testBit:LoadingExtScript might be TRUE. Test: fast/tokenizer/nested-multiple-scripts.html * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::scriptHandler): check pendingScripts.isEmpty() instead of checking state.loadingExtScript(). (WebCore::HTMLTokenizer::scriptExecution): check pendingScripts.isEmpty() instead of checking state.loadingExtScript(). 2008-02-24 Darin Adler * dom/Document.h: Removed stray duplicate declaration of RegisteredEventListenerList. 2008-02-24 Darin Adler * dom/Range.cpp: (WebCore::Range::surroundContents): Removed incorrect comment. I added it a while ago, and I was just mixed up. 2008-02-24 Darin Adler - quick follow-up to that last check-in * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::createFrameAtIndex): Use CFEqual instead of WebCore::String's == for speed. 2008-02-24 Michael Knaup Reviewed by Darin. Bug 8749: XBM rendered incorrectly as black on white xbm images are now created and rendered using black on a transparent background (same behavior as in Firefox) Test: platform/mac/fast/canvas/canvas-draw-xbm-image.html * platform/graphics/cg/ImageSourceCG.cpp: (WebCore::ImageSource::createFrameAtIndex): 2008-02-24 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=17471 REGRESSION (r30438): Crash in deleteLineBoxes in cursor-adjusting code browsing Acid3 Test: http/tests/misc/object-image-error.html * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::attach): Added an early return in case updateFromElement() has changed the object to use fallback content. 2008-02-24 Dan Bernstein Reviewed by Darin Adler. - fix float positioning when a float that does not fit on the line is followed by a float that does Test: fast/block/float/narrow-after-wide.html * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Changed to not position any more floats on the line once a float that does not fit is encountered. That float should be pushed to the next line, and so should all floats that follow, regardless of whether they can fit on the current line. 2008-02-24 Darin Adler Reviewed by Sam. - fix http://bugs.webkit.org/show_bug.cgi?id=16770 Acid3 expects :visited styled links to restyle on iframe load Disentangle global history updating from the back/forward history. There are many cases where we don't want to create a new back/forward item, but we do still want to add to the global history (used for visited link coloring) in those cases. Test: fast/history/subframe-is-visited.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::updateGlobalHistory): Renamed from addHistoryForCurrentLocation and removed the back/forward handling. (WebCore::FrameLoader::updateHistoryForStandardLoad): Streamlined logic a bit. Replaced call to addHistoryForCurrentLocation with a call to addBackForwardItemClippedAtTarget. Added an unconditional call to updateGlobalHistory. (WebCore::FrameLoader::updateHistoryForClientRedirect): Added a FIXME; why doesn't this function update global history? (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Ditto. (WebCore::FrameLoader::updateHistoryForReload): Replaced the direct call the client with a call to the new updateGlobalHistory function. (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Did the same changes as for updateHistoryForStandardLoad. * loader/FrameLoader.h: More of the same. * loader/FrameLoaderClient.h: Removed updateGlobalHistoryForReload and renamed updateGlobalHistoryForStandardLoad to updateGlobalHistory. * svg/graphics/SVGImageEmptyClients.h: (WebCore::SVGEmptyFrameLoaderClient::updateGlobalHistory): Updated to match the above. 2008-02-23 Darin Adler Reviewed by Sam. - fix http://bugs.webkit.org/show_bug.cgi?id=17508 REGRESSION (r30535): mailto regression tests failing * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): Restore the old logic, with its unpleasant trip through String do to the replace operation. It's inefficient, but there's no real reason to worry about the efficiency of mailto forms, since that feature is nearly obsolete. 2008-02-23 Darin Adler Reviewed by Sam. - replace SegmentedString's use of DeprecatedValueList with Deque Testing indicates this is a slight speed-up for page loading. * platform/text/SegmentedString.cpp: (WebCore::SegmentedString::length): Update to use Deque. (WebCore::SegmentedString::setExcludeLineNumbers): Ditto. (WebCore::SegmentedString::append): Ditto. (WebCore::SegmentedString::prepend): Ditto. (WebCore::SegmentedString::advanceSubstring): Ditto. (WebCore::SegmentedString::toString): Ditto. * platform/text/SegmentedString.h: Tweak formatting. Don't bother making an entire class private with a single friend. Change m_sbstrings from a DeprecatedValueList to a Deque. 2008-02-23 Darin Adler Reviewed by Anders. - fix http://bugs.webkit.org/show_bug.cgi?id=17506 REGRESSION (r30535): ASSERTION FAILED: i < size() * loader/TextResourceDecoder.cpp: (WebCore::findTextEncoding): Fix off-by-one in code that null-terminates the C string here. 2008-02-23 Matt Lilek Not reviewed, build fix. * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::httpBodyFromRequest): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::handlePost): 2008-02-23 Dan Bernstein - fix a typo * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: (WebCore::GlyphPage::fill): * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: (WebCore::GlyphPage::fill): 2008-02-23 Dan Bernstein Reviewed by Anders Carlsson. - fix GlyphPage::fill() logic for partial page fills * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: (WebCore::GlyphPage::fill): Changed the test for non-BMP characters to work correctly when the length parameter is less than a full page size. Also updated the comment. * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: (WebCore::GlyphPage::fill): Ditto. 2008-02-23 Kevin Ollivier Reviewed by Darin Adler. Move text drawing into wxcode, as we need platform-dependent APIs for drawing non-kerned text, which wx doesn't yet have. (But hopefully will, once these APIs are fleshed out on all platforms!) http://bugs.webkit.org/show_bug.cgi?id=17396 * platform/graphics/wx/FontWx.cpp: (WebCore::Font::drawGlyphs): * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Added. * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: Added. * platform/wx/wxcode/non-kerned-drawing.h: Added. * platform/wx/wxcode/win/non-kerned-drawing.cpp: Added. * webcore-wx.bkl: 2008-02-23 Darin Adler Pointed out by Mitz. * loader/TextResourceDecoder.cpp: (WebCore::find): Fix a "==" that was supposed to be ">". (WebCore::findIgnoringCase): Ditto. 2008-02-23 Darin Adler Reviewed by Sam. * html/HTMLFormElement.cpp: (WebCore::appendEncodedString): Fix buffer overrun in the code I just landed. 2008-02-23 Darin Adler Reviewed by Sam. - remove all but 1 remaining use of DeprecatedCString - change FormData to start refcount at 1 * html/HTMLFormElement.cpp: (WebCore::appendString): Added. Helpers for Vector. (WebCore::appendEncodedString): Renamed from encodeCString and changed to append to an existing Vector to cut down a bit on memory allocation. (WebCore::HTMLFormElement::formData): Replace the DeprecatedCString called enc_string with a Vector called encodedData. Change to use the new FormData::create function. (WebCore::HTMLFormElement::submit): Same thing, for the mailto form code. * loader/TextResourceDecoder.cpp: (WebCore::find): Added. Helper for searching in char* with length. (WebCore::findIgnoringCase): Ditto. (WebCore::findTextEncoding): Added. Helper for looking up a text encoding when we have a char* with length rather than a null-terminated char*. (WebCore::findXMLEncoding): Changed to use char* and length rather than DeprecatedCString. Also fixed some things that would be one-character buffer overruns in a string that's not null-terminated. (WebCore::TextResourceDecoder::checkForCSSCharset): Change to use findTextEncoding rather than constructing a CString to pass to the TextEncodingconstructor. (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto. * platform/network/FormData.cpp: (WebCore::FormData::FormData): Changed to start refcount at 1. (WebCore::FormData::create): Added. (WebCore::FormData::copy): Call adoptRef since refcount starts at 1. * platform/network/FormData.h: Made constructor private. Added create functions. * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): Call FormData::create. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Ditto. 2008-02-23 Darin Adler Reviewed by Anders. - http://bugs.webkit.org/show_bug.cgi?id=17067 eliminate attributes parameter from JSObject::put for speed/clarity * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::customPut): Remove attributes argument. * bindings/js/JSCanvasPixelArrayCustom.cpp: (WebCore::JSCanvasPixelArray::indexGetter): Use early exit idiom. (WebCore::JSCanvasPixelArray::indexSetter): Moved length check into the CanvasPixelArray object, for consistency with the getter. Removed attributes argument. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::customPut): Removed special case for variable initialization, which is not needed since that does use put any more. Removed attributes argument. * bindings/js/JSEventTargetBase.h: (WebCore::JSEventTargetBase::putValueProperty): Removed attributes argument. (WebCore::JSEventTargetBase::put): Ditto. (WebCore::JSEventTargetPrototype::self): Removed Internal flag. * bindings/js/JSEventTargetNode.cpp: (WebCore::JSEventTargetNode::put): Removed attributes argument. (WebCore::JSEventTargetNode::putValueProperty): Ditto. * bindings/js/JSEventTargetNode.h: Ditto. * bindings/js/JSHTMLAppletElementCustom.cpp: (WebCore::JSHTMLAppletElement::customPut): Ditto. * bindings/js/JSHTMLEmbedElementCustom.cpp: (WebCore::JSHTMLEmbedElement::customPut): Ditto. * bindings/js/JSHTMLInputElementBase.cpp: (WebCore::JSHTMLInputElementBase::put): Ditto. (WebCore::JSHTMLInputElementBase::putValueProperty): Ditto. * bindings/js/JSHTMLInputElementBase.h: Ditto. * bindings/js/JSHTMLObjectElementCustom.cpp: (WebCore::JSHTMLObjectElement::customPut): Ditto. * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::indexSetter): Ditto. * bindings/js/JSHTMLSelectElementCustom.cpp: (WebCore::JSHTMLSelectElement::indexSetter): Ditto. * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::customPut): Ditto. * bindings/js/JSLocation.cpp: (WebCore::JSLocation::put): Ditto. * bindings/js/JSLocation.h: Ditto. * bindings/js/JSXMLHttpRequest.cpp: (WebCore::JSXMLHttpRequest::put): Ditto. (WebCore::JSXMLHttpRequest::putValueProperty): Ditto. * bindings/js/JSXMLHttpRequest.h: Ditto. * bindings/js/kjs_dom.cpp: (WebCore::getRuntimeObject): Changed return type to JSObject*. * bindings/js/kjs_dom.h: Ditto. * bindings/js/kjs_events.cpp: (WebCore::JSClipboard::put): Removed attributes argument. (WebCore::JSClipboard::putValueProperty): Ditto. * bindings/js/kjs_events.h: Ditto. * bindings/js/kjs_html.cpp: (WebCore::runtimeObjectGetter): Updated for change to getRuntimeObject to return a JSObject. Used early exit idiom. (WebCore::runtimeObjectPropertyGetter): Ditto. (WebCore::runtimeObjectCustomGetOwnPropertySlot): Ditto. (WebCore::runtimeObjectCustomPut): Use hasProperty to check for properties that we should put with the property syntax instead of canPut. (WebCore::runtimeObjectImplementsCall): Ditto. (WebCore::runtimeObjectCallAsFunction): Ditto. * bindings/js/kjs_html.h: Removed attributes argument to runtimeObjectCustomPut. * bindings/js/kjs_window.cpp: (KJS::Window::put): Removed attributes argument. * bindings/js/kjs_window.h: Ditto. * bindings/scripts/CodeGeneratorJS.pm: Removed attributes argument from put, putValueProperty, customPut, and indexSetter. * html/CanvasPixelArray.h: (WebCore::CanvasPixelArray::set): Added index checking here, as in the get function. Before, the checking was done in the JavaScript bindings for set. 2008-02-23 Brent Fulgham Reviewed by Adam and Darin. http://bugs.webkit.org/show_bug.cgi?id=17442 Correct the Windows Cairo implementation of GraphicsContext so that Windows 'WorldTransform' is kept in sync with the Cairo transormations. Also corrects an uninitialized variable in the Cairo Windows image drag handler. WARNING: NO TEST CASES ADDED OR CHANGED * platform/graphics/cairo/GraphicsContextCairo.cpp: Modify methods to call GraphicsContextPlatformPrivate calls, just as is done for the CoreGraphics version. These calls are nop's for everything but Windows. (WebCore::GraphicsContext::savePlatformState): (WebCore::GraphicsContext::restorePlatformState): (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): (WebCore::GraphicsContext::translate): (WebCore::GraphicsContext::concatCTM): Re-enable for Windows (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): (WebCore::GraphicsContext::rotate): (WebCore::GraphicsContext::scale): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: * platform/graphics/win/GraphicsContextCGWin.cpp: Move common code for handling WorldTransform calls to parent class. * platform/graphics/win/GraphicsContextCairoWin.cpp: Add common code for handling WorldTransform calls. (WebCore::GraphicsContextPlatformPrivate::concatCTM): Change implementation so that it only handles WorldTransform. The Cairo update is done in GraphicsContextCairo.cpp * platform/graphics/win/GraphicsContextWin.cpp: Call platform-private methods to keep WorldTransform in sync. (WebCore::GraphicsContextPlatformPrivate::save): (WebCore::GraphicsContextPlatformPrivate::restore): (WebCore::GraphicsContextPlatformPrivate::clip): (WebCore::GraphicsContextPlatformPrivate::scale): (WebCore::GraphicsContextPlatformPrivate::rotate): (WebCore::GraphicsContextPlatformPrivate::translate): * platform/win/DragImageCairoWin.cpp: (WebCore::createDragImageFromImage): Correct uninitialized value 2008-02-23 Dan Bernstein Reviewed by Dave Hyatt. - make non-autowrapping text clear floats Test: fast/text/whitespace/nowrap-clear-float.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nextFloatBottomBelow): Renamed nearestFloat() to this and changed to avoid comparing bottom to 0 in each iteration. (WebCore::RenderBlock::getClearDelta): Updated comment for the rename. * rendering/RenderBlock.h: * rendering/bidi.cpp: (WebCore::RenderBlock::fitBelowFloats): Added. Factored out of findNextLineBreak() and simplified. (WebCore::RenderBlock::findNextLineBreak): Changed to call fitBelowFloats(). Fixed the bug by trying to fit below floats in the case of non-wrapping text. Removed some redundancy. 2008-02-23 Sam Weinig Reviewed by Oliver Hunt. Fix for http://bugs.webkit.org/show_bug.cgi?id=17504 Speed up DOM lists array subscription syntax by using the fast getOwnPropertySlot and set paths - 6x speed improvement on Oliver's ImageData put test. * bindings/scripts/CodeGeneratorJS.pm: Add fast path for getOwnPropertySlot and put when an indexGetter or indexSetter is used. We can not use the fast path if an overridingNameGetter is used as there would be no way to override. 2008-02-23 Kevin Ollivier wx build fix after JSImageData.cpp was added. * WebCoreSources.bkl: 2008-02-23 Alexey Proskuryakov Windows build fix - move ThreadCondition implementation from WebCore to WTF. * WebCore.vcproj/WebCore.vcproj: * platform/win/ThreadConditionWin.cpp: Removed. 2008-02-23 Alexey Proskuryakov Reviewed by Darin. Move basic threading support from WebCore to WTF. One call that remains in WebCore is callOnMainThread(), and it has its own header now. * ForwardingHeaders/wtf/Locker.h: Added. * ForwardingHeaders/wtf/MessageQueue.h: Added. * ForwardingHeaders/wtf/Threading.h: Added. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSCustomSQLTransactionCallback.cpp: * dom/XMLTokenizer.cpp: * loader/icon/IconDatabase.cpp: (WebCore::iconDatabase): * loader/icon/IconDatabase.h: * platform/Locker.h: Removed. * platform/MainThread.h: Copied from WebCore/platform/Threading.h. (WebCore::initializeThreadingAndMainThread): * platform/MessageQueue.h: Removed. * platform/SecurityOrigin.h: * platform/Threading.h: Removed. * platform/ThreadingNone.cpp: Removed. * platform/gtk/MainThreadGtk.cpp: Copied from WebCore/platform/gtk/ThreadingGtk.cpp. * platform/gtk/ThreadingGtk.cpp: Removed. * platform/mac/MainThreadMac.mm: Copied from WebCore/platform/mac/Threading.mm. * platform/mac/Threading.mm: Removed. * platform/pthreads: Removed. * platform/pthreads/ThreadingPthreads.cpp: Removed. * platform/qt/MainThreadQt.cpp: Copied from WebCore/platform/qt/ThreadingQt.cpp. * platform/qt/ThreadingQt.cpp: Removed. * platform/sql/SQLValue.h: * platform/sql/SQLiteAuthorizer.h: * platform/sql/SQLiteDatabase.h: * platform/win/MainThreadWin.cpp: Copied from WebCore/platform/win/ThreadingWin.cpp. (WebCore::initializeThreadingAndMainThread): * platform/win/MutexWin.cpp: Removed. * platform/win/ThreadingWin.cpp: Removed. * platform/wx/MainThreadWx.cpp: Copied from WebCore/platform/wx/ThreadingWx.cpp. * platform/wx/ThreadingWx.cpp: Removed. * storage/Database.cpp: (WebCore::Database::Database): * storage/Database.h: * storage/DatabaseTask.h: * storage/DatabaseThread.h: * storage/DatabaseTracker.cpp: * storage/OriginQuotaManager.h: * storage/SQLError.h: * storage/SQLResultSet.h: * storage/SQLStatement.h: * storage/SQLStatementCallback.h: * storage/SQLStatementErrorCallback.h: * storage/SQLTransaction.h: * storage/SQLTransactionCallback.h: * storage/SQLTransactionErrorCallback.h: * webcore-wx.bkl: 2008-02-23 David Kilzer Please clarify licensing for some files Reviewed by Darin. * bindings/objc/WebScriptObject.h: Added Apple BSD-style license. * bindings/objc/WebScriptObjectPrivate.h: Ditto. * platform/text/mac/ShapeArabic.c: Added ICU license from WebCore/icu/LICENSE. 2008-02-22 Justin Garcia Reviewed by Anders Carlsson. Add document.getSelection() Add a synonym for window.getSelection() that FF supports. There were requests in this bugs dupes to also support the IE only document.selection, but IE's Selection object is too different than ours currently for that to be safe (specifically, we don't support enough of IE's TextRange methods on our DOM Range object yet). I filed to cover that. * dom/Document.cpp: (WebCore::Document::getSelection): Added. * dom/Document.h: * dom/Document.idl: Ditto. JS only since this is about web compatibility. 2008-02-22 Oliver Hunt WX build fixes * WebCoreSources.bkl: 2008-02-22 Oliver Hunt Once more with the cairo/qt/wx build fixing * platform/graphics/cairo/ImageBufferCairo.cpp: * platform/graphics/qt/ImageBufferQt.cpp: * platform/graphics/wx/ImageBufferWx.cpp: 2008-02-22 Mark Rowe Windows build fix. Add missing include of DeprecatedCString.h and sort existing includes. * platform/win/PasteboardWin.cpp: 2008-02-22 Mark Rowe Speculative Windows build fix. * platform/win/ClipboardUtilitiesWin.cpp: Add missing include of DeprecatedCString.h and sort existing includes. * platform/win/ClipboardWin.cpp: Ditto. 2008-02-22 Oliver Hunt Build fix for windows, wx and qt * html/CanvasPixelArray.h: (WebCore::CanvasPixelArray::set): 2008-02-22 Oliver Hunt Unbreak windows vcproj * WebCore.vcproj/WebCore.vcproj: 2008-02-22 Oliver Hunt Reviewed by Sam W. Support Canvas.getImageData and Canvas.createImageData This patch adds support for all the pixel reading portions of the HTML5 Canvas spec. There are two new types ImageData and CanvasPixelArray which are used to provide the HTML5 ImageData object, and the required semantics for assignment to the ImageData data array. We only implement the CG version of ImageBuffer::getImageData, but the logic is null safe, so this will not introduce any crashes into other platforms, unfortunately it will result in JS Object detection "lying" on non-CG platforms. Tests: fast/canvas/canvas-ImageData-behaviour.html fast/canvas/canvas-getImageData.html * DerivedSources.make: * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSCanvasPixelArrayCustom.cpp: Added. (WebCore::JSCanvasPixelArray::indexGetter): (WebCore::JSCanvasPixelArray::indexSetter): (WebCore::toJS): * bindings/js/JSCanvasRenderingContext2DCustom.cpp: * bindings/scripts/CodeGeneratorJS.pm: * html/CanvasPixelArray.cpp: Added. (WebCore::CanvasPixelArray::create): * html/CanvasPixelArray.h: Added. (WebCore::CanvasPixelArray::data): (WebCore::CanvasPixelArray::length): (WebCore::CanvasPixelArray::set): (WebCore::CanvasPixelArray::get): * html/CanvasPixelArray.idl: Added. * html/CanvasRenderingContext2D.cpp: (WebCore::createEmptyImageData): (WebCore::CanvasRenderingContext2D::createImageData): (WebCore::CanvasRenderingContext2D::getImageData): * html/CanvasRenderingContext2D.h: * html/CanvasRenderingContext2D.idl: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::convertLogicalToDevice): (WebCore::HTMLCanvasElement::createImageBuffer): * html/HTMLCanvasElement.h: * html/ImageData.cpp: Added. (WebCore::ImageData::create): (WebCore::ImageData::ImageData): * html/ImageData.h: Added. (WebCore::ImageData::width): (WebCore::ImageData::height): (WebCore::ImageData::data): * html/ImageData.idl: Added. * platform/graphics/ImageBuffer.h: * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::getImageData): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::getImageData): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::getImageData): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::getImageData): 2008-02-22 Sam Weinig Rubber-stamped by Adam Roben. Rid the project of the Devil known as DeprecatedString! * GNUmakefile.am: * WebCore.base.exp: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * dom/Node.h: * html/HTMLFormElement.cpp: * platform/DeprecatedString.cpp: Removed. * platform/DeprecatedString.h: Removed. * platform/graphics/qt/IconQt.cpp: * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: * platform/gtk/CookieJarGtk.cpp: * platform/gtk/CursorGtk.cpp: * platform/gtk/KeyEventGtk.cpp: * platform/mac/DeprecatedStringMac.mm: Removed. * platform/network/qt/ResourceHandleQt.cpp: * platform/network/win/CookieJarWin.cpp: (WebCore::cookies): * platform/qt/ClipboardQt.cpp: * platform/qt/CookieJarQt.cpp: * platform/qt/CursorQt.cpp: * platform/symbian/DeprecatedStringSymbian.cpp: Removed. * platform/text/AtomicString.cpp: * platform/text/AtomicString.h: * platform/text/PlatformString.h: * platform/text/String.cpp: * platform/text/StringImpl.cpp: * platform/text/qt/StringQt.cpp: (WebCore::String::String): * platform/text/wx/StringWx.cpp: * platform/win/BString.cpp: * platform/win/BString.h: * platform/win/PasteboardWin.cpp: 2008-02-22 Sam Weinig Reviewed by Geoff Garen. - Remove use of DeprecatedString in CSSStyleSelector. * css/CSSStyleSelector.cpp: (WebCore::findHash): Removed. Use find instead. (WebCore::findSlashDotDotSlash): Changed to take a UChar* and a length. (WebCore::findSlashSlash): Ditto. (WebCore::findSlashDotSlash): Ditto. (WebCore::containsColonSlashSlash): Ditto. (WebCore::cleanPath): Change to operate on a String. (WebCore::checkPseudoState): Changed to use a Vector as a buffer. 2008-02-22 Geoffrey Garen Reviewed by Sam Weinig. Fixed Repro leak of JSXMLHttpRequest and associated objects @ www.viamichelin.it, which was probably an underlying cause of Gmail out of memory (17455) If SubresourceLoader::create returned NULL, we would ref() / gcProtect() the XMLHttpRequest but think we hadn't, therefore never calling deref() / gcUnprotect(). This could happen at gmail.com, since gmail.com attempts to send XMLHttpRequests from unload handlers in order to gather usage statistics. (According to comments in the code, SubresourceLoader::create returns NULL when called from an unload handler.) The solution is to ref() / gcProtect() only if SubresourceLoader::create doesn't return NULL. This make sense, since we only need to protect the request as long as it has an outstanding network transaction. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): (WebCore::XMLHttpRequest::send): 2008-02-22 Darin Adler Reviewed, tweaked and landed by Sam. - Make RegularExpression operate on Strings instead of DeprecatedStrings. * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::isXMLMIMEType): Use string instead of DeprecatedString to build up the RegularExpression. * page/Frame.cpp: (WebCore::createRegExpForLabels): Use String instead of DeprecatedString. (WebCore::Frame::searchForLabelsAboveCell): Ditto. (WebCore::Frame::searchForLabelsBeforeElement): Ditto. (WebCore::Frame::matchLabelsAgainstElement): Ditto. * page/Frame.h: * page/mac/FrameMac.mm: (WebCore::regExpForLabels): Ditto. (WebCore::Frame::searchForNSLabelsAboveCell): Ditto. (WebCore::Frame::searchForLabelsBeforeElement): Ditto. (WebCore::Frame::matchLabelsAgainstElement): Ditto. * platform/text/RegularExpression.cpp: (WebCore::RegularExpression::Private::Private): (WebCore::RegularExpression::Private::compile): (WebCore::RegularExpression::RegularExpression): (WebCore::RegularExpression::operator=): (WebCore::RegularExpression::pattern): (WebCore::RegularExpression::match): (WebCore::RegularExpression::search): (WebCore::RegularExpression::searchRev): (WebCore::replace): Added. * platform/text/RegularExpression.h: Change functions to take Strings as input instead of DeprecatedStrings and reduce the complexity of the class by removing unneeded globbing support. 2008-02-22 Jon Honeycutt Reviewed by Anders. REGRESSION(r30376): Crash loading plugin page during stress test (after only 5 min) - null dereference Full-frame plug-ins create PluginStream objects without loaders, as the PluginView receives the loading callbacks. We were trying to call setDefersLoading on these null pointers. * plugins/PluginStream.cpp: (WebCore::PluginStream::startStream): Add null check. (WebCore::PluginStream::destroyStream): Same. (WebCore::PluginStream::deliverData): Same. 2008-02-22 Darin Adler Reviewed and tweaked by Jon Honeycutt. Reviewed and landed by Sam. - Remove uses of DeprecatedString in Windows plugin code. * plugins/win/PluginPackageWin.cpp: (WebCore::getVersionInfo): Cleanup formatting. (WebCore::PluginPackage::freeLibraryTimerFired): Remove un-needed variable name. (WebCore::PluginPackage::storeFileVersion): Move casts. (WebCore::PluginPackage::fetchInfo): Use OwnArrayPtr and switch to more efficient use of Vectors. (WebCore::PluginPackage::load): Fix whitespace. (WebCore::PluginPackage::hash): Make the hashCodes const * plugins/win/PluginViewWin.cpp: (WebCore::makeURL): Use String instead of DeprecatedString. (WebCore::parseRFC822HeaderFields): Ditto. (WebCore::PluginView::handlePost): Ditto. (WebCore::PluginView::status): Ditto. 2008-02-22 Darin Adler Reviewed, tweaked and landed by Sam. - Don't use DeprecatedString in HTMLTokenizer. * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::finish): * platform/text/PlatformString.h: (WebCore::find): 2008-02-21 Sam Weinig Reviewed by Anders Carlsson. Fix for - Parse URLs before checking whether they are javascript: urls (which require security checks). * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::setValue): * bindings/js/JSElementCustom.cpp: (WebCore::allowSettingSrcToJavascriptURL): * bindings/js/JSHTMLFrameElementCustom.cpp: (WebCore::allowSettingJavascriptURL): * bindings/js/JSHTMLIFrameElementCustom.cpp: (WebCore::JSHTMLIFrameElement::setSrc): 2008-02-21 Ada Chan Buffer overrun in DeprecatedCString::find() in WebCore We could get a buffer overrun in DeprecatedCString::find() if the end of the string matches a beginning portion of the substring, for example, if string is "a" but the substring is "ab". The code as is also will not match things correctly under certain situations since the inner while loop increments the index. For example, we wouldn't find a match if the string is "aab..." and the substring is "ab". Changed the inner while loop to increment a temporary index into str. Test: fast/loader/charset-parse.html Reviewed by Dan Berstein. * platform/DeprecatedCString.cpp: (WebCore::DeprecatedCString::find): 2008-02-21 David Hyatt Fix for bug 17301. CSS media queries need to use the correct viewport when contained in documents inside iframes (rather than always using the top-level document's viewport). CSS media queries based on the viewport also needed to be dynamic and update as you resize the window (this is a HOT feature). :) This patch gets Acid3 up to 86/100 with 3 colored boxes filled in. Reviewed by olliej Added fast/media/viewport-media-query.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::addViewportDependentMediaQueryResult): (WebCore::CSSStyleSelector::affectedByViewportChange): * css/CSSStyleSelector.h: (WebCore::MediaQueryResult::MediaQueryResult): * css/MediaQueryEvaluator.cpp: (WebCore::MediaQueryEvaluator::MediaQueryEvaluator): (WebCore::MediaQueryEvaluator): (WebCore::MediaQueryEvaluator::eval): (WebCore::colorMediaFeatureEval): (WebCore::monochromeMediaFeatureEval): (WebCore::device_aspect_ratioMediaFeatureEval): (WebCore::device_pixel_ratioMediaFeatureEval): (WebCore::gridMediaFeatureEval): (WebCore::device_heightMediaFeatureEval): (WebCore::device_widthMediaFeatureEval): (WebCore::heightMediaFeatureEval): (WebCore::widthMediaFeatureEval): (WebCore::min_colorMediaFeatureEval): (WebCore::max_colorMediaFeatureEval): (WebCore::min_monochromeMediaFeatureEval): (WebCore::max_monochromeMediaFeatureEval): (WebCore::min_device_aspect_ratioMediaFeatureEval): (WebCore::max_device_aspect_ratioMediaFeatureEval): (WebCore::min_device_pixel_ratioMediaFeatureEval): (WebCore::max_device_pixel_ratioMediaFeatureEval): (WebCore::min_heightMediaFeatureEval): (WebCore::max_heightMediaFeatureEval): (WebCore::min_widthMediaFeatureEval): (WebCore::max_widthMediaFeatureEval): (WebCore::min_device_heightMediaFeatureEval): (WebCore::max_device_heightMediaFeatureEval): (WebCore::min_device_widthMediaFeatureEval): (WebCore::max_device_widthMediaFeatureEval): * css/MediaQueryEvaluator.h: * css/MediaQueryExp.cpp: (WebCore::MediaQueryExp::~MediaQueryExp): * css/MediaQueryExp.h: (WebCore::MediaQueryExp::value): (WebCore::MediaQueryExp::isViewportDependent): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::pickMedia): * page/FrameView.cpp: (WebCore::FrameView::layout): 2008-02-21 Anders Carlsson Reviewed by Sam. Make more classes start out with a refcount of 1. * dom/QualifiedName.cpp: (WebCore::QNameComponentsTranslator::translate): (WebCore::QualifiedName::QualifiedName): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::create): (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl): * history/BackForwardList.cpp: (WebCore::BackForwardList::BackForwardList): * history/BackForwardList.h: (WebCore::BackForwardList::create): * page/Page.cpp: (WebCore::Page::Page): * platform/text/CString.cpp: (WebCore::CString::init): (WebCore::CString::newUninitialized): (WebCore::CString::copyBufferIfNeeded): * platform/text/CString.h: (WebCore::CStringBuffer::create): (WebCore::CStringBuffer::CStringBuffer): 2008-02-21 Kevin Ollivier wx build fix for the domString() -> string() rename in r30443. * platform/graphics/wx/FontPlatformDataWx.cpp: (WebCore::FontPlatformData::FontPlatformData): 2008-02-21 Antti Koivisto Reviewed by Sam Weinig. REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang) Ensure all versions of allowsAccessFrom are inlined to single functions. This is a 2% win in browser hosted Sunspider. * bindings/js/kjs_window.cpp: (KJS::Window::allowsAccessFrom): (KJS::Window::allowsAccessFromPrivate): * bindings/js/kjs_window.h: 2008-02-21 Dan Bernstein Reviewed by Sam Weinig. - minor cleanup * rendering/bidi.cpp: (WebCore::bidiNext): Removed redundant isBR() check -- isText() returns true for RenderLineBreak. (WebCore::bidiFirst): Ditto. (WebCore::shouldSkipWhitespaceAfterStartObject): (WebCore::RenderBlock::findNextLineBreak): 2008-02-21 Geoffrey Garen Reviewed by David Harrison. Fixed REGRESSION: A crash occurs at WebCore::Frame::scriptProxy() when completing a search with Package Tracker widget Test: fast/dom/script-element-without-frame-crash.html * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): Added back a NULL check that was accidentally removed in r30325. 2008-02-21 Rodney Dawes GTK+ build fix. s/domString()/string()/ * platform/graphics/gtk/FontPlatformDataGtk.cpp: (FontPlatformData::FontPlatformData): 2008-02-20 Dan Bernstein Reviewed by Dave Hyatt. - fix http://bugs.webkit.org/show_bug.cgi?id=17465 REGRESSION:
tokenized into Div if still searching for DOCTYPE Test: fast/tokenizer/doctype-search-reset.html * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): 2008-02-20 Dan Bernstein Reviewed by Dave Hyatt. - fix http://bugs.webkit.org/show_bug.cgi?id=17464 REGRESSION: Crash in RenderBlock::findNextLineBreak reading r30444 commit email in GMail Test: fast/text/wbr-in-pre-crash.html * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): 2008-02-20 Oliver Hunt Reviewed by Hyatt. Bug 17303: Canvas crash in ImageBuffer We handle a null GraphicsContext everywhere, but we weren't checking for a null ImageBuffer, which is what will result in a null GraphicsContext in the first place. Test: fast/canvas/access-zero-sized-canvas.html * html/HTMLCanvasElement.cpp: 2008-02-20 David Hyatt Fix the layout test failure that never should have passed in the first place by making changes to media lists actually result in the recomputation of the style selector. Now it passes for the right reasons and not because of dumb luck. Reviewed by Sam Weinig * css/MediaList.cpp: (WebCore::MediaList::deleteMedium): (WebCore::MediaList::setMediaText): (WebCore::MediaList::appendMedium): (WebCore::MediaList::notifyChanged): * css/MediaList.h: * dom/Document.cpp: (WebCore::Document::attach): 2008-02-20 Darin Adler Reviewed, tweaked and landed by Sam. - make markup functions not use DeprecatedString. * editing/markup.cpp: (WebCore::append): Added. (WebCore::escapeContentText): Build up string using a Vector. (WebCore::appendStartMarkup): Use String instead of DeprecatedString. 2008-02-20 Darin Adler Reviewed, tweaked and landed by Sam. - make TextIterator use a Vector instead of a DeprecatedString. * editing/TextIterator.cpp: (WebCore::CharacterIterator::string): Build up the String using a Vector. (WebCore::WordAwareIterator::advance): Switch to using Vector functions. (WebCore::WordAwareIterator::length): Ditto. (WebCore::WordAwareIterator::characters): Ditto. * editing/TextIterator.h: Use a Vector for the buffer instead of DeprecatedString. 2008-02-20 Darin Adler Reviewed, tweaked and landed by Sam. - make HTMLInterchange return a String instead of a DeprecatedString * editing/HTMLInterchange.cpp: (WebCore::): Return a String from convertedSpaceString. (WebCore::convertHTMLTextToInterchangeFormat): Use a Vector instead of a DeprecatedString to build up the return String. * editing/HTMLInterchange.h: 2008-02-20 Eric Seidel Reviewed by Oliver. Remove m_drawingContext and change m_data to m_imageBuffer * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): (WebCore::HTMLCanvasElement::reset): (WebCore::HTMLCanvasElement::paint): (WebCore::HTMLCanvasElement::createImageBuffer): (WebCore::HTMLCanvasElement::buffer): (WebCore::HTMLCanvasElement::createPlatformImage): * html/HTMLCanvasElement.h: 2008-02-20 Anders Carlsson Reviewed by Sam. Rename AtomicString::domString() to AtomicString::string(). * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::getFontData): * dom/Attr.cpp: (WebCore::Attr::createTextChild): * dom/Comment.cpp: (WebCore::Comment::nodeName): * dom/Document.cpp: (WebCore::Document::recalcStyleSelector): (WebCore::Document::setHTMLWindowEventListener): (WebCore::Document::formElementsState): * dom/StyledElement.cpp: (WebCore::StyledElement::parseMappedAttribute): * dom/Text.cpp: (WebCore::Text::nodeName): * editing/SelectionController.cpp: (WebCore::SelectionController::debugRenderer): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::checkForNameMatch): * html/HTMLElement.cpp: (WebCore::HTMLElement::nodeName): (WebCore::HTMLElement::setHTMLEventListener): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::getNamedFormItem): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): (WebCore::HTMLImageElement::isURLAttribute): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseMappedAttribute): (WebCore::HTMLLinkElement::tokenizeRelAttribute): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::isURLAttribute): (WebCore::HTMLObjectElement::containsJavaApplet): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::isURLAttribute): * html/HTMLParser.cpp: (WebCore::HTMLParser::handleIsindex): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::insertedIntoDocument): (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::parseMappedAttribute): * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag): * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addViewSourceToken): * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): * page/FrameTree.cpp: (WebCore::FrameTree::uniqueChildName): * platform/text/AtomicString.h: (WebCore::AtomicString::string): (WebCore::AtomicString::contains): (WebCore::AtomicString::find): (WebCore::AtomicString::startsWith): (WebCore::AtomicString::endsWith): * rendering/RenderPartObject.cpp: (WebCore::RenderPartObject::updateWidget): * svg/SVGElement.cpp: (WebCore::SVGElement::addSVGEventListener): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::addSVGWindowEventListener): * xml/XPathFunctions.cpp: (WebCore::XPath::FunLocalName::evaluate): (WebCore::XPath::FunNamespaceURI::evaluate): (WebCore::XPath::FunName::evaluate): 2008-02-20 Brent Fulgham Reviewed by Dan. http://bugs.webkit.org/show_bug.cgi?id=17336 Provide implementations for Windows (Cairo) build of WebKit that handles font formatting. - Split font implementation files to allow maximal code sharing between CG and Cairo back-ends. * WebCore.vcproj/WebCore.vcproj: * platform/graphics/SimpleFontData.h: Add signatures for private win initialization functions. * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::platformInit): (WebCore::FontCache::createFontPlatformData): * platform/graphics/win/FontCairoWin.cpp: Removed. Universal version is now part of platform/graphics/cairo. * platform/graphics/win/FontCustomPlatformDataCairo.cpp: Added. (WebCore::FontCustomPlatformDataCairo::~FontCustomPlatformDataCairo): (WebCore::FontCustomPlatformDataCairo::fontPlatformData): (WebCore::releaseData): (WebCore::createFontCustomPlatformData): * platform/graphics/win/FontCustomPlatformDataCairo.h: Added. (WebCore::FontCustomPlatformDataCairo::FontCustomPlatformDataCairo): * platform/graphics/win/FontPlatformData.h: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::fontFace): (WebCore::FontPlatformData::scaledFont): (WebCore::FontPlatformData::operator==): * platform/graphics/win/FontPlatformDataCGWin.cpp: Copied from WebCore/platform/graphics/win/FontPlatformDataWin.cpp. (WebCore::FontPlatformData::platformDataInit): * platform/graphics/win/FontPlatformDataCairoWin.cpp: Added. (WebCore::FontPlatformData::platformDataInit): (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::setFont): * platform/graphics/win/FontPlatformDataWin.cpp: Moved CG-specific code to FontPlatformDataCG.cpp. (WebCore::FontPlatformData::FontPlatformData): * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp. * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp. (WebCore::GlyphPage::fill): * platform/graphics/win/GlyphPageTreeNodeWin.cpp: Removed. Replaced with CG- and Cairo-specific versions. * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformDestroy): (WebCore::SimpleFontData::platformWidthForGlyph): * platform/graphics/win/SimpleFontDataCairoWin.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformDestroy): (WebCore::SimpleFontData::platformWidthForGlyph): (WebCore::SimpleFontData::setFont): * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::initGDIFont): (WebCore::SimpleFontData::platformCommonDestroy): (WebCore::SimpleFontData::widthForGDIGlyph): 2008-02-20 Darin Adler Reviewed by Sam. * dom/Node.h: Took out unneeded forward declaration of TextStream. 2008-02-20 Darin Adler Reviewed by Sam. * rendering/RenderObject.h: Took out unneeded forward declaration of TextStream. 2008-02-20 David Hyatt Fix for bug 16760, incorrect MIME type handling and fallback handling. Reviewed by darin * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::notifyFinished): If the image had an error, make sure to do fallback. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::renderFallbackContent): Before doing fallback check if there is a MIME type mismatch between an image type and a non-image type. If so, detach and re-attach after storing the correct MIME type. * loader/loader.cpp: (WebCore::Loader::didReceiveData): Consider it an error when a 404 is encountered on a CachedResource load. 2008-02-20 Anders Carlsson Reviewed by Sam. StringImpl constructors used by AtomicString should start with a refcount of 1. * platform/text/AtomicString.cpp: (WebCore::AtomicString::add): * platform/text/AtomicString.h: * platform/text/StringImpl.cpp: (WebCore::StringImpl::StringImpl): 2008-02-20 Darin Adler * bindings/js/kjs_navigator.cpp: (WebCore::needsYouTubeQuirk): Tweak comments. 2008-02-20 Anders Carlsson Reviewed by Darin. Change all refcounted classes in page/ to start with a refcount of 1. * page/BarInfo.cpp: (WebCore::BarInfo::BarInfo): * page/BarInfo.h: (WebCore::BarInfo::create): * page/Console.cpp: (WebCore::Console::Console): * page/Console.h: (WebCore::Console::create): * page/DOMSelection.cpp: (WebCore::DOMSelection::DOMSelection): * page/DOMSelection.h: (WebCore::DOMSelection::create): * page/DOMWindow.cpp: (WebCore::DOMWindow::DOMWindow): (WebCore::DOMWindow::screen): (WebCore::DOMWindow::history): (WebCore::DOMWindow::locationbar): (WebCore::DOMWindow::menubar): (WebCore::DOMWindow::personalbar): (WebCore::DOMWindow::scrollbars): (WebCore::DOMWindow::statusbar): (WebCore::DOMWindow::toolbar): (WebCore::DOMWindow::console): (WebCore::DOMWindow::getSelection): * page/DOMWindow.h: (WebCore::DOMWindow::create): * page/Frame.cpp: (WebCore::Frame::domWindow): * page/History.cpp: (WebCore::History::History): * page/History.h: (WebCore::History::create): * page/InspectorController.cpp: (WebCore::InspectorResource::create): (WebCore::InspectorResource::InspectorResource): (WebCore::InspectorDatabaseResource::create): (WebCore::InspectorDatabaseResource::InspectorDatabaseResource): (WebCore::InspectorController::didLoadResourceFromMemoryCache): (WebCore::InspectorController::identifierForInitialRequest): (WebCore::InspectorController::didOpenDatabase): * page/Plugin.h: (WebCore::Plugin::create): (WebCore::Plugin::Plugin): * page/Screen.cpp: (WebCore::Screen::Screen): * page/Screen.h: (WebCore::Screen::create): 2008-02-20 Sam Weinig Reviewed by Darin and Geoff. - work around missing video on YouTube front page with a site-specific hack * WebCore.base.exp: Updated. * bindings/js/kjs_navigator.cpp: (WebCore::needsYouTubeQuirk): Added. Return true on Windows only when the quirk is needed. (WebCore::Navigator::getValueProperty): For the appVersion property, if needsYouTubeQuirk return true, then return the empty string. * page/Settings.cpp: (WebCore::Settings::Settings): Set m_needsSiteSpecificQuirks to false. (WebCore::Settings::setNeedsSiteSpecificQuirks): Added. * page/Settings.h: Added m_needsSiteSpecificQuirks. (WebCore::Settings::needsSiteSpecificQuirks): Added. 2008-02-20 David Hyatt Fix for bug 12751, doctype nodes aren't part of the Document (Acid3). Reviewed by Sam Weinig Many tests added in fast/doctypes. * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createDocument): (WebCore::DOMImplementation::createHTMLDocument): * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::setDocType): (WebCore::Document::attach): (WebCore::Document::getImageMap): * dom/Document.h: (WebCore::Document::doctype): (WebCore::Document::): (WebCore::Document::determineParseMode): (WebCore::Document::setParseMode): (WebCore::Document::parseMode): (WebCore::Document::inCompatMode): (WebCore::Document::inAlmostStrictMode): (WebCore::Document::inStrictMode): * dom/DocumentType.cpp: (WebCore::DocumentType::cloneNode): (WebCore::DocumentType::insertedIntoDocument): (WebCore::DocumentType::removedFromDocument): * dom/DocumentType.h: * dom/Node.cpp: (WebCore::Node::childAllowed): * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::internalSubset): (WebCore::): * editing/markup.cpp: (WebCore::appendStartMarkup): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createRenderer): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::HTMLDocument): (WebCore::HTMLDocument::childAllowed): (WebCore::HTMLDocument::determineParseMode): * html/HTMLDocument.h: * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::parseMappedAttribute): * html/HTMLParamElement.cpp: (WebCore::HTMLParamElement::parseMappedAttribute): * html/HTMLParser.cpp: (WebCore::HTMLParser::parseDoctypeToken): * html/HTMLParser.h: * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::reset): (WebCore::HTMLTokenizer::parseDoctype): (WebCore::HTMLTokenizer::parseTag): (WebCore::HTMLTokenizer::write): (WebCore::HTMLTokenizer::finish): (WebCore::HTMLTokenizer::processDoctypeToken): * html/HTMLTokenizer.h: (WebCore::): (WebCore::DoctypeToken::DoctypeToken): (WebCore::DoctypeToken::reset): (WebCore::DoctypeToken::state): (WebCore::DoctypeToken::setState): (WebCore::HTMLTokenizer::State::inDoctype): (WebCore::HTMLTokenizer::State::setInDoctype): (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling): (WebCore::HTMLTokenizer::State::): * html/HTMLViewSourceDocument.cpp: (WebCore::HTMLViewSourceDocument::addViewSourceToken): (WebCore::HTMLViewSourceDocument::addViewSourceDoctypeToken): * html/HTMLViewSourceDocument.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::write): (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): * page/Frame.cpp: (WebCore::Frame::documentTypeString): * page/inspector/utilities.js: * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::createDocumentFromSource): 2008-02-20 Anders Carlsson Reviewed by Darin. Change most SVG related classes to start out with a ref count of 1. * bindings/js/JSSVGPointListCustom.cpp: (WebCore::JSSVGPointList::initialize): (WebCore::JSSVGPointList::insertItemBefore): (WebCore::JSSVGPointList::replaceItem): (WebCore::JSSVGPointList::appendItem): * bindings/js/JSSVGTransformListCustom.cpp: (WebCore::JSSVGTransformList::initialize): (WebCore::JSSVGTransformList::insertItemBefore): (WebCore::JSSVGTransformList::replaceItem): (WebCore::JSSVGTransformList::appendItem): * rendering/SVGCharacterLayoutInfo.h: (WebCore::SVGCharOnPath::create): (WebCore::SVGCharOnPath::SVGCharOnPath): * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseBeginOrEndValue): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::canvasResource): * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::childNodes): * svg/SVGElementInstanceList.cpp: (WebCore::SVGElementInstanceList::SVGElementInstanceList): * svg/SVGElementInstanceList.h: (WebCore::SVGElementInstanceList::create): * svg/SVGFitToViewBox.cpp: (WebCore::SVGFitToViewBox::SVGFitToViewBox): * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::SVGGradientElement): (WebCore::SVGGradientElement::canvasResource): * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::SVGImageElement): * svg/SVGLengthList.h: (WebCore::SVGLengthList::create): * svg/SVGList.h: (WebCore::SVGList::SVGList): (WebCore::SVGPODListItem::create): (WebCore::SVGPODListItem::copy): (WebCore::SVGPODListItem::SVGPODListItem): (WebCore::SVGPODList::initialize): (WebCore::SVGPODList::insertItemBefore): (WebCore::SVGPODList::replaceItem): (WebCore::SVGPODList::appendItem): (WebCore::SVGPODList::SVGPODList): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::canvasResource): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::canvasResource): * svg/SVGNumberList.h: (WebCore::SVGNumberList::create): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::createSVGPathSegClosePath): (WebCore::SVGPathElement::createSVGPathSegMovetoAbs): (WebCore::SVGPathElement::createSVGPathSegMovetoRel): (WebCore::SVGPathElement::createSVGPathSegLinetoAbs): (WebCore::SVGPathElement::createSVGPathSegLinetoRel): (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs): (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel): (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs): (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel): (WebCore::SVGPathElement::createSVGPathSegArcAbs): (WebCore::SVGPathElement::createSVGPathSegArcRel): (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs): (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel): (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs): (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel): (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs): (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel): (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs): (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel): (WebCore::SVGPathElement::pathSegList): * svg/SVGPathElement.h: * svg/SVGPathSeg.h: (WebCore::SVGPathSeg::SVGPathSeg): * svg/SVGPathSegArc.h: (WebCore::SVGPathSegArcAbs::create): (WebCore::SVGPathSegArcRel::create): * svg/SVGPathSegClosePath.h: (WebCore::SVGPathSegClosePath::create): * svg/SVGPathSegCurvetoCubic.h: (WebCore::SVGPathSegCurvetoCubicAbs::create): (WebCore::SVGPathSegCurvetoCubicRel::create): * svg/SVGPathSegCurvetoCubicSmooth.h: (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create): (WebCore::SVGPathSegCurvetoCubicSmoothRel::create): * svg/SVGPathSegCurvetoQuadratic.h: (WebCore::SVGPathSegCurvetoQuadraticAbs::create): (WebCore::SVGPathSegCurvetoQuadraticRel::create): * svg/SVGPathSegCurvetoQuadraticSmooth.h: (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create): (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create): * svg/SVGPathSegLineto.h: (WebCore::SVGPathSegLinetoAbs::create): (WebCore::SVGPathSegLinetoRel::create): * svg/SVGPathSegLinetoHorizontal.h: (WebCore::SVGPathSegLinetoHorizontalAbs::create): (WebCore::SVGPathSegLinetoHorizontalRel::create): * svg/SVGPathSegLinetoVertical.h: (WebCore::SVGPathSegLinetoVerticalAbs::create): (WebCore::SVGPathSegLinetoVerticalRel::create): * svg/SVGPathSegList.h: (WebCore::SVGPathSegList::create): * svg/SVGPathSegMoveto.h: (WebCore::SVGPathSegMovetoAbs::create): (WebCore::SVGPathSegMovetoRel::create): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::SVGPatternElement): (WebCore::SVGPatternElement::canvasResource): * svg/SVGPointList.h: (WebCore::SVGPointList::create): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::points): * svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio): * svg/SVGPreserveAspectRatio.h: (WebCore::SVGPreserveAspectRatio::create): * svg/SVGRenderingIntent.h: (WebCore::SVGRenderingIntent::SVGRenderingIntent): * svg/SVGStringList.h: (WebCore::SVGStringList::create): * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement): * svg/SVGTests.cpp: (WebCore::SVGTests::requiredFeatures): (WebCore::SVGTests::requiredExtensions): (WebCore::SVGTests::systemLanguage): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::SVGTextElement): * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::SVGTextPositioningElement): * svg/SVGTransformList.h: (WebCore::SVGTransformList::create): * svg/SVGUnitTypes.h: (WebCore::SVGUnitTypes::SVGUnitTypes): * svg/SVGViewElement.cpp: (WebCore::SVGViewElement::viewTarget): * svg/SVGViewSpec.cpp: (WebCore::SVGViewSpec::SVGViewSpec): * svg/graphics/SVGPaintServer.cpp: (WebCore::SVGPaintServer::sharedSolidPaintServer): * svg/graphics/SVGPaintServer.h: * svg/graphics/SVGPaintServerGradient.h: (WebCore::SVGPaintServerGradient::SharedStopCache::create): (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache): * svg/graphics/SVGPaintServerLinearGradient.h: (WebCore::SVGPaintServerLinearGradient::create): * svg/graphics/SVGPaintServerPattern.h: (WebCore::SVGPaintServerPattern::create): * svg/graphics/SVGPaintServerRadialGradient.h: (WebCore::SVGPaintServerRadialGradient::create): * svg/graphics/SVGPaintServerSolid.h: (WebCore::SVGPaintServerSolid::create): * svg/graphics/SVGResource.cpp: (WebCore::SVGResource::SVGResource): * svg/graphics/SVGResource.h: * svg/graphics/SVGResourceClipper.h: (WebCore::SVGResourceClipper::create): * svg/graphics/SVGResourceMarker.h: (WebCore::SVGResourceMarker::create): * svg/graphics/SVGResourceMasker.h: (WebCore::SVGResourceMasker::create): * svg/graphics/cg/SVGPaintServerGradientCg.cpp: (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache): 2008-02-20 Darin Adler Reviewed by Sam. - make conversion from CSS ParseString to String and AtomicString automatic and remove all the explicit calls to do the conversion - fix CSS parsing to do fewer allocations, mostly by using the equalIgnoringCase function in CSSParser * css/CSSGrammar.y: Take out all the explicit atomicString and domString calls now that ParseString knows how to convert itself. * css/CSSParser.cpp: (WebCore::equal): Added. (WebCore::equalIgnoringCase): Allow non-lettters. (WebCore::ParseString::lower): Used charactersAreAllASCII. (WebCore::unitFromString): Use equal. (WebCore::CSSParser::parseValue): Removed unneeded call to domString. (WebCore::CSSParser::parseContent): Use equalIgnoringCase. (WebCore::CSSParser::parseBackgroundImage): Removed unneeded call to domString. (WebCore::CSSParser::parseTransitionTimingFunction): Use equalIgnoringCase. (WebCore::CSSParser::parseDashboardRegions): More of the same. (WebCore::CSSParser::parseCounterContent): Ditto. (WebCore::CSSParser::parseShape): Use equalIgnoringCase. (WebCore::CSSParser::parseFontFamily): Removed unneeded calls to domString. (WebCore::CSSParser::parseFontFaceSrc): More. (WebCore::CSSParser::parseFontFaceUnicodeRange): More. (WebCore::CSSParser::parseColor): Don't lowercase here -- setNamedColor now handles the case folding. (WebCore::CSSParser::parseColorFromValue): More. (WebCore::CSSParser::parseBorderImage): More. (WebCore::CSSParser::parseCounter): More. (WebCore::TransformOperationInfo::TransformOperationInfo): More. (WebCore::CSSParser::parseTransform): More. (WebCore::CSSParser::createCharsetRule): More. (WebCore::CSSParser::createImportRule): More. * css/CSSParser.h: Removed domString and atomicString functions. (WebCore::ParseString::operator String): Added. Allows conversion to String without an explicit function call. (WebCore::ParseString::operator AtomicString): Ditto. * css/MediaQueryExp.cpp: (WebCore::MediaQueryExp::MediaQueryExp): Removed a call to domString. * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): Removed calls to domString. * platform/graphics/Color.cpp: (WebCore::findNamedColor): Call toASCIILower on each character as we copy it into the 8-bit character buffer to make the operation fold case. 2008-02-20 Justin Garcia Reviewed by Darin Adler. Typing (esp. deleting) is slower due to TOT WebCore changes * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::initializeStartEnd): The common case here is where there are no special elements. Avoid creating VisiblePositions in that case. Additionally, this change postpones the more expensive creation of an upstream VisiblePosition until the last possible moment. (WebCore::DeleteSelectionCommand::saveTypingStyleState): (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Add an early return for a common case: deleting characters that are all inside the same text node. In that case the style at the start of the selection will not change during the delete, so there is no need to save/recompute it. (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor): Early return before VisiblePosition creation if the ends of the selection aren't enclosed by an anchor. * editing/TypingCommand.cpp: (WebCore::TypingCommand::markMisspellingsAfterTyping): Early return if spell checking isn't enabled. 2008-02-20 Alexey Proskuryakov Incorporates some improvements made by Dan Bernstein. Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=17106 Debug build ASSERTs on page load Test: fast/encoding/GBK/close-gbk-converter.html * platform/text/TextCodecICU.cpp: (WebCore::getGbkEscape): Changed to use a switch instead of a HashMap, as there are only four values. (WebCore::gbkCallbackEscape): Check the reason why the function is called, and do not attempt getting an escape character if it's not UCNV_UNASSIGNED. (WebCore::gbkCallbackSubstitute): Ditto. 2008-02-20 Alexey Proskuryakov Build fix. * xml/XMLHttpRequest.cpp: (WebCore::isSafeRequestHeader): (WebCore::XMLHttpRequest::setRequestHeader): 2008-02-20 Alexey Proskuryakov Reviewed by Darin. Unable to set the Referer header in Dashboard using XMLHttpRequest Cannot be tested in DRT. * xml/XMLHttpRequest.cpp: (WebCore::canSetRequestHeader): Assume that a request that can load local files can also set any headers. 2008-02-19 Darin Adler Reviewed by Sam. - removed use of DeprecatedString for font family names * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): Update for name change. * css/CSSParser.cpp: (WebCore::CSSParser::parseFontFamily): Update to use new appendSpaceSeparated function and String rather than DeprecatedString. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Updated for name change. * css/FontFamilyValue.cpp: (WebCore::FontFamilyValue::FontFamilyValue): Replaced code using a regular expression with code that does the same thing more efficiently. (WebCore::FontFamilyValue::appendSpaceSeparated): Added. (WebCore::FontFamilyValue::cssText): Updated for name change. * css/FontFamilyValue.h: Changed DeprecatedString to String. Renamed fontName to familyName and parsedFontName to m_familyName. Removed unused genericFamilyType and m_genericFamilyType. Added appendSpaceSeparated so that m_familyName can be private instead of public. 2008-02-19 Darin Adler - fix build when SVG is not enabled * rendering/RenderTreeAsText.cpp: Added include of "TextStream.h". 2008-02-19 Anders Carlsson Reviewed by Darin. Change all classes in xml/ to start out with a ref count of 1. * bindings/js/JSCustomXPathNSResolver.h: * bindings/js/JSXMLHttpRequest.cpp: (WebCore::JSXMLHttpRequest::JSXMLHttpRequest): * bindings/js/JSXSLTProcessor.cpp: (WebCore::JSXSLTProcessor::JSXSLTProcessor): * bindings/objc/DOMCustomXPathNSResolver.h: (WebCore::DOMCustomXPathNSResolver::create): * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorObjC.pm: * dom/Document.cpp: (WebCore::Document::applyXSLTransform): (WebCore::Document::createExpression): (WebCore::Document::createNSResolver): (WebCore::Document::evaluate): * xml/DOMParser.h: (WebCore::DOMParser::create): (WebCore::DOMParser::DOMParser): * xml/NativeXPathNSResolver.h: (WebCore::NativeXPathNSResolver::create): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): * xml/XMLHttpRequest.h: (WebCore::XMLHttpRequest::create): * xml/XMLSerializer.h: (WebCore::XMLSerializer::create): (WebCore::XMLSerializer::XMLSerializer): * xml/XPathEvaluator.cpp: (WebCore::XPathEvaluator::createNSResolver): * xml/XPathEvaluator.h: (WebCore::XPathEvaluator::create): (WebCore::XPathEvaluator::XPathEvaluator): * xml/XPathExpression.cpp: (WebCore::XPathExpression::createExpression): (WebCore::XPathExpression::evaluate): * xml/XPathExpression.h: (WebCore::XPathExpression::create): (WebCore::XPathExpression::XPathExpression): * xml/XPathNSResolver.h: * xml/XPathResult.cpp: (WebCore::XPathResult::XPathResult): * xml/XPathResult.h: (WebCore::XPathResult::create): * xml/XPathValue.cpp: (WebCore::XPath::Value::modifiableNodeSet): * xml/XPathValue.h: (WebCore::XPath::ValueData::create): (WebCore::XPath::ValueData::ValueData): (WebCore::XPath::Value::Value): * xml/XSLTProcessor.h: (WebCore::XSLTProcessor::create): (WebCore::XSLTProcessor::XSLTProcessor): 2008-02-19 Darin Adler Reviewed by Sam. - Trimmed down TextStream and weaned it from DeprecatedString. * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge renderTreeAsExternalRepresentation]): Removed now-unneeded call to getNSString. * platform/text/TextStream.cpp: Removed unused functions. Use snprintf instead of sprintf, for better security. (WebCore::TextStream::release): Added. * platform/text/TextStream.h: Removed lots of unneeded stuff. * rendering/RenderTreeAsText.cpp: (WebCore::externalRepresentation): Changed to use String instead of DeprecatedString. * rendering/RenderTreeAsText.h: Ditto. * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeSVGInlineTextBox): Use "\n" instead of endl. (WebCore::write): Ditto. (WebCore::writeRenderResources): Ditto. 2008-02-19 Justin Garcia Reviewed by Darin Adler. Typing (esp. deleting) is slower due to TOT WebCore changes This brings performance on the phone back to old levels. Andre and I are doing some formal testing to see exactly where we stand. * dom/Position.cpp: (WebCore::enclosingBlockIgnoringEditability): Added. This is enclosingBlock without the expensive editability checks. upstream and downstream can avoid those because they do their own editability checking. (WebCore::Position::upstream): (WebCore::Position::downstream): 2008-02-19 Chris Fleizach Reviewed by Darin. AXLink for a "name" (anchor) on same page should include an AXLinkedUIElementAttribute * bridge/mac/WebCoreAXObject.mm: (-[WebCoreAXObject linkedUIElement]): Returns the linked-to AX object (if the specified one is ignored by accessibility, returns the next un-ignored one by traversing the DOM). (-[WebCoreAXObject accessibilityAttributeNames]): (-[WebCoreAXObject accessibilityAttributeValue:]): Support NSAccessibilityLinkedUIElementsAttribute. 2008-02-19 Darin Adler Reviewed by Sam. - Removed old debugging aids, Node::dump, RenderObject::dump, and RenderObject::information, that used DeprecatedString. * dom/CharacterData.cpp: Removed override of Node::dump. * dom/CharacterData.h: Ditto. * dom/Element.cpp: Ditto. * dom/Element.h: Ditto. * dom/EventTargetNode.cpp: Ditto. * dom/EventTargetNode.h: Ditto. * dom/Node.cpp: Removed Node::dump. * dom/Node.h: Ditto. * rendering/RenderBlock.cpp: Removed override of RenderObject::dump. * rendering/RenderBlock.h: Ditto. * rendering/RenderFrameSet.cpp: Ditto. * rendering/RenderFrameSet.h: Ditto. * rendering/RenderObject.cpp: Removed RenderObject::dump and RenderObject::information. * rendering/RenderObject.h: Ditto. * rendering/RenderTable.cpp: Removed override of RenderObject::dump. * rendering/RenderTable.h: Ditto. * rendering/RenderTableCell.cpp: Ditto. * rendering/RenderTableCell.h: Ditto. * rendering/RenderTableCol.cpp: Ditto. * rendering/RenderTableCol.h: Ditto. * rendering/RenderTableSection.cpp: Ditto. * rendering/RenderTableSection.h: Ditto. * rendering/RenderTreeAsText.h: Removed unneeded include of TextStream.h and added forward declarations as appropriate. * svg/SVGSVGElement.cpp: Removed unneeded include of TextStream.h. * svg/graphics/SVGResourceClipper.cpp: And here. * svg/graphics/SVGResourceFilter.cpp: Ditto. * svg/graphics/filters/SVGFEBlend.cpp: Ditto. * svg/graphics/filters/SVGFEComponentTransfer.cpp: Ditto. * svg/graphics/filters/SVGFEComposite.cpp: Ditto. * svg/graphics/filters/SVGFEDiffuseLighting.cpp: Ditto. * svg/graphics/filters/SVGFEGaussianBlur.cpp: Ditto. * svg/graphics/filters/SVGFEImage.cpp: Ditto. * svg/graphics/filters/SVGFEMerge.cpp: Ditto. * svg/graphics/filters/SVGFEMorphology.cpp: Ditto. * svg/graphics/filters/SVGFEOffset.cpp: Ditto. * svg/graphics/filters/SVGFESpecularLighting.cpp: Ditto. * svg/graphics/filters/SVGFETurbulence.cpp: Ditto. * svg/graphics/filters/SVGFilterEffect.cpp: Ditto. 2008-02-19 Beth Dakin Reviewed by Sam. Fix for Seed: Crash in RenderButton::setStyle at http://www.dinorpg.com Inputs should not honor first-letter. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::updateFirstLetter): 2008-02-19 Dan Bernstein Reviewed by Darin Adler. - fix CrashTracer: [REGRESSION] 620 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::setStaticY + 15 Test: fast/text/wbr-styled.html Changed RenderWordBreak to inherit from RenderText instead of RenderInline. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::calcInlinePrefWidths): * rendering/RenderFlow.h: * rendering/RenderText.cpp: (WebCore::RenderText::renderName): (WebCore::RenderText::isTextFragment): (WebCore::RenderText::isWordBreak): * rendering/RenderText.h: * rendering/RenderWordBreak.cpp: (WebCore::RenderWordBreak::RenderWordBreak): * rendering/RenderWordBreak.h: * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): 2008-02-19 Anders Carlsson Reviewed by Darin. * WebCore.base.exp: * loader/mac/LoaderNSURLExtras.h: * loader/mac/LoaderNSURLExtras.m: Move unused functions to WebKit (where they are used) (vectorContainsString): Use const references. * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: Remove wkNSURLProtocolClassForReqest. 2008-02-19 Justin Garcia Reviewed by Darin Adler. Typing (esp. deleting) is slower due to TOT WebCore These changes bring deleting performance back to old levels on the phone except for deleting the first space to the right of a word, which we are still working on. * dom/Position.cpp: (WebCore::Position::upstream): Avoid the use of enclosingBlock when determining if we have left the original enclosing block or entered a new one, and avoid rootEditableElement for determining if we have changed editability. These operations are expensive. (WebCore::Position::downstream): Ditto. 2008-02-19 Darin Adler Rubber stamped by Anders. - removed explicit initialization to 1 for RefCounted; that's now the default * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::ResourceLoader): Removed RefCounted initializer. * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::ResourceHandle): Ditto. * platform/text/StringImpl.cpp: (WebCore::StringImpl::StringImpl): Ditto. 2008-02-18 Anders Carlsson Reviewed by Darin. Make ResourceLoader and ResourceHandle start out with a refcount of 1. * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::create): * loader/NetscapePlugInStreamLoader.cpp: (WebCore::NetscapePlugInStreamLoader::create): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::ResourceLoader): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::ResourceHandle): (WebCore::ResourceHandle::create): 2008-02-19 Alp Toker Reviewed by Mark Rowe. http://bugs.webkit.org/show_bug.cgi?id=16863 [GTK] tab focusing doesn't work GDK_MOD2_MASK doesn't always mean meta so we can't use it to identify the meta key state. Use GDK_META_MASK where available, otherwise do not support the meta key. This matches the behaviour of other applications. Also add a comment noting that the platform event constructors need to be kept in sync (it's not obvious that there are multiple places that check the key state). * platform/gtk/KeyEventGtk.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/gtk/MouseEventGtk.cpp: (WebCore::PlatformMouseEvent::PlatformMouseEvent): * platform/gtk/WheelEventGtk.cpp: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2008-02-18 Brady Eidson Reviewed by Sam Weinig's white rhino tusk stamp SQLiteTransaction::stop() should also reset the transaction-in-progress flag in its parent SQLiteDatabase * platform/sql/SQLiteTransaction.cpp: (WebCore::SQLiteTransaction::stop): 2008-02-18 Brady Eidson Reviewed by Darin Fix for - ObjC Exception can cause JSLock to never be released Test: platform/mac/plugins/webScriptObject-exception-deadlock.html * bindings/objc/WebScriptObject.mm: (-[WebScriptObject valueForKey:]): The line `resultObj = [super valueForKey:key]; // defaults to throwing an exception` says it all - it throws an exception. This method also happens to hold the JSLock. Problematically, when the exeception is thrown and the method exited, the JSLock is never released. Fix that without otherwise changing behavior by holding the JSLock in two individual scopes - Right before the exception and right after. 2008-02-18 Darin Adler Reviewed by Sam. - reduce use of DeprecatedString and memory allocations in processing of CSS - remove unnecessary double -> float -> double trip in the CSS parser - cleaned up names and structure in CSS grammar * css/CSSGrammar.y: Remove getPropertyID and getValueID. Both are now in CSSParser.cpp instead, and they now work on ParseString and String objects and don't require the caller to put the string into a char*. Gave members of the %union more sensible names, removed duplicates, and sorted into a logical order. Put the %expect back in, rather than leaving it commented out. * css/CSSParser.cpp: (WebCore::equalIgnoringCase): Added. (WebCore::hasPrefix): Added. (WebCore::CSSParser::parseTransitionProperty): Changed to call the new cssPropertyID, which obviates the need to call lower() and utf8() or to allocate memory at all. Also used equalIgnoringCase rather than putting the value into a String just to compare it. (WebCore::CSSParser::lex): Replaced convertASCIIToFloat with charactersToDouble. This change along with the CSSGrammar.y change, removes the double -> float -> double round trip, and affects the result of one layout test. (WebCore::cssPropertyID): Added. Gets the property ID from the gperf hash table, but without allocating any memory. (WebCore::cssValueKeywordID): Ditto. * css/CSSParser.h: Removed declaration for deprecatedString function (now used only in CSSParser.cpp; soon to be deleted). Added cssPropertyID and cssValueKeywordID functions. * css/CSSStyleDeclaration.cpp: (WebCore::CSSStyleDeclaration::getPropertyCSSValue): Call cssPropertyID instead of propertyID. (WebCore::CSSStyleDeclaration::getPropertyValue): Ditto. (WebCore::CSSStyleDeclaration::getPropertyPriority): Ditto. (WebCore::CSSStyleDeclaration::getPropertyShorthand): Ditto. (WebCore::CSSStyleDeclaration::isPropertyImplicit): Ditto. (WebCore::CSSStyleDeclaration::setProperty): Ditto. (WebCore::CSSStyleDeclaration::removeProperty): Ditto. (WebCore::CSSStyleDeclaration::isPropertyName): Ditto. * css/CSSStyleDeclaration.h: Removed unnecessary includes, unnecessary Noncopyable boilerplate, and the getPropertyID function declaration along with its associated apology comment. * css/makevalues.pl: Generate constants instead of macros for CSS value numbers (but not an enumeration, like properties, since you rarely have any reason to handle all values, but often have a reason to handle all properties). Renamed the constant for the number of CSS value keywords from CSS_VAL_TOTAL to numCSSValueKeywords, and added maxCSSValueKeywordLength. * platform/text/String.cpp: (WebCore::charactersToDouble): Made this function more efficient by using a stack buffer rather than a CString. 2008-02-18 Dan Bernstein Reviewed by Dave Hyatt. - fix crash in svgFontAndFaceElementForFontData on digitalstrom.org/cms Test: fast/css/font-face-multiple-remote-sources.html * css/CSSFontFace.cpp: (WebCore::CSSFontFace::fontLoaded): * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::fontLoaded): 2008-02-18 Darin Adler Reviewed by Sam. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::hasCSSPropertyNamePrefix): Added. (WebCore::cssPropertyName): Reimplement to not use DeprecatedString. Also made faster by using a Vector and eliminating all the string operations. 2008-02-18 Stephanie Lewis Reviewed by Adam. Remove workaround for . * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::doUpdateResourceResponse): 2008-02-18 Samuel Weinig Reviewed by Geoff Garen. Fix for http://bugs.webkit.org/show_bug.cgi?id=17419 Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::initScript): 2008-02-18 Alp Toker Reviewed by Mark Rowe. http://bugs.webkit.org/show_bug.cgi?id=17381 [CURL] Regression: data URL parsing broken after DeprecatedString removal (Acid2) This patch resolves the regression for the GTK+ port. * platform/network/curl/ResourceHandleManager.cpp: (WebCore::parseDataUrl): 2008-02-18 Darin Adler Reviewed by Sam. * platform/network/win/ResourceHandleWin.cpp: (WebCore::ResourceHandle::onHandleCreated): Use String instead of DeprecatedString. (WebCore::ResourceHandle::start): Ditto. 2008-02-18 Darin Adler Reviewed by Sam. * platform/network/win/CookieJarWin.cpp: (WebCore::setCookies): Use String instead of DeprecatedString. (WebCore::cookies): Ditto. 2008-02-18 Darin Adler Reviewed by Sam. - removed use of DeprecatedString in the Color class * platform/graphics/Color.cpp: (WebCore::Color::parseHexColor): Streamlined logic a bit with early returns. Used toASCIIHexValue a character at a time rather than using toIntStrict in base 16 mode. (WebCore::findNamedColor): Added. Uses a fixed-size char buffer to look up a color using the gperf-generated findColor function. Saves a memory allocation vs. the old version that called DeprecatedString::latin1(). (WebCore::Color::setNamedColor): Changed to use findNamedColor. 2008-02-18 Darin Adler Reviewed by Sam. * editing/htmlediting.cpp: (WebCore::stringWithRebalancedWhitespace): Changed to use String instead of DeprecatedString. 2008-02-18 Darin Adler Reviewed by Sam. * editing/SelectionController.cpp: (WebCore::SelectionController::debugRenderer): Changed to use String instead of DeprecatedString. 2008-02-18 Darin Adler Reviewed and landed by Sam. Remove DeprecatedStringList. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * editing/markup.cpp: * platform/DeprecatedStringList.cpp: Removed. * platform/DeprecatedStringList.h: Removed. * platform/mac/DeprecatedStringListMac.mm: Removed. 2008-02-18 Darin Adler Reviewed by Sam. * css/CSSPrimitiveValueMappings.h: Add default cases to all the switch statements. This will ease the way some day if we decide to use an enum instead of int; otherwise we'll have a ton of "unhandled enum value" warnings here. 2008-02-18 Alp Toker Build fix for GTK+ < 2.10. Fall back to simple text clipboard copy with older GTK+ versions for now. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeSelection): 2008-02-18 Darin Adler Reviewed by Sam. * WebCore.base.exp: Export a couple of WebCore::String functions we plan to use in the future in WebKit. 2008-02-18 Darin Adler Reviewed by Sam. * DerivedSources.make: Added the scripts to the ENABLE_SVG versions of the rules for CSSPropertyNames.h and CSSValueKeywords.h. Somehow that got left out, so the files would not be regenerated if the scripts were changed (but would if SVG was disabled). 2008-02-18 Alexey Proskuryakov Suggested by Darin. * platform/KURL.h: (WebCore::KURL::operator const String&): Added, to avoid unexpected conversion via UString (as in bug 17418). 2008-02-18 Jon Honeycutt Reviewed by Darin. Crash in Flash when clicking "Yes" to abort slow script Flash 9 dialog at http://www.kidzui.com When navigating to a new page, we stop all outstanding PluginStreams. Flash hangs in the call to NPP_URLNotify. It eventually displays the "slow script" dialog, which relinquishes control to the system. While this dialog is running, the request we are in the process of cancelling completes, and we re-enter Flash to deliver the data. When the dialog is dismissed, the internal state of Flash has changed, and Flash crashes with a null dereference. To work around this, we can defer loading before entering plug-in code, so that even if a plug-in yields to the system, we won't get callbacks while we're handling a callback. * plugins/PluginStream.cpp: (WebCore::PluginStream::startStream): Defers loads while calling into plug-in. (WebCore::PluginStream::destroyStream): Same. (WebCore::PluginStream::deliverData): Same. (WebCore::PluginStream::didFail): Protect 'this' from deletion by destroyStream. Null out m_loader only after destroyStream returns. (WebCore::PluginStream::didFinishLoading): Same. 2008-02-18 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=17418 REGRESSION: Assertion failure dragging image (JSLock::lockCount() > 0) * platform/win/ClipboardWin.cpp: (WebCore::ClipboardWin::declareAndWriteDragImage): Explicitly convert from KURL to String, as an implicit conversion uses UString and thus needs a JSLock. 2008-02-17 Sam Weinig Roll out r30360. * loader/FrameLoader.cpp: (WebCore::FrameLoader::changeLocation): 2008-02-17 Sam Weinig Mac build fix. * WebCore.xcodeproj/project.pbxproj: 2008-02-17 Alp Toker Attempt to fix the Wx build (has been broken all weekend). Stub out some graphics functions. * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginPath): (WebCore::GraphicsContext::addPath): * platform/graphics/wx/PathWx.cpp: (WebCore::Path::isEmpty): 2008-02-17 Julien Chaffraix Reviewed by Alexey Proskuryakov. http://bugs.webkit.org/show_bug.cgi?id=16989 bug 16989 : Add send() flag checks in XmlHttpRequest Splitted XmlHttpRequest::abort into abort (called from JavaScript) and internalAbort that perform the cancellation and is called mainly from internal methods. Tests: http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html http/tests/xmlhttprequest/xmlhttprequest-test-send-flag.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::open): Now call internalAbort() and moved readyState change into method (WebCore::XMLHttpRequest::send): Added m_loader check (WebCore::XMLHttpRequest::abort): Now update readyState and clear the request headers as specified in the spec (WebCore::XMLHttpRequest::internalAbort): Perform cancellation internal operations (no readyState update) (WebCore::XMLHttpRequest::setRequestHeader): Added m_loader check (WebCore::XMLHttpRequest::processSyncLoadResults): Now call internalAbort() instead of abort() (WebCore::XMLHttpRequest::willSendRequest): Ditto (WebCore::XMLHttpRequest::cancelRequests): Ditto (WebCore::XMLHttpRequest::detachRequests): Ditto * xml/XMLHttpRequest.h: Added the private internalAbort method 2008-02-17 Sam Weinig Reviewed by Dan Bernstein. Fix for http://bugs.webkit.org/show_bug.cgi?id=17365 document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR - Updated fast/events/event-instanceof.html to test document.createEvent("MessageEvent"). * DerivedSources.make: Generate Objective-C binding for DOMProgressEvent which was missing. * WebCore.xcodeproj/project.pbxproj: Add missing DOMProgressEvent files to the project. * bindings/js/JSEventCustom.cpp: (WebCore::toJS): Clean up and add case for SVGZoomEvent that was missing. * bindings/objc/DOMEvents.mm: (+[DOMEvent _wrapEvent:WebCore::]): Clean up and add cases for ProgressEvent and MessageEvent that were missing. * dom/Document.cpp: (WebCore::Document::createEvent): Add case for MessageEvent. 2008-02-17 Adam Treat Reviewed by Eric Seidel. http://bugs.webkit.org/show_bug.cgi?id=17008 Meta refresh does not work with cache turned off Fix for issue noticed on http://adserver.vivox.com/2 * loader/FrameLoader.cpp: (WebCore::FrameLoader::changeLocation): 2008-02-17 Alp Toker Reviewed by Sam Weinig. Fix for change made in r30355. Issue noticed by İsmail Dönmez. Verify SSL certs by default, but allow checks to be disabled with an environment variable (WEBKIT_IGNORE_SSL_ERRORS) for now. * platform/network/curl/ResourceHandleManager.cpp: (WebCore::ResourceHandleManager::startJob): 2008-02-17 Bin Chen Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=17404 Bug 17404: curl certification problem Disable SSL cert verification until we have a way of distributing certs and/or reporting SSL errors to the user. * platform/network/curl/ResourceHandleManager.cpp: (WebCore::ResourceHandleManager::startJob): 2008-02-17 Alp Toker Reviewed by Mark Rowe. DevHelp fails to load local files; URL truncated by one character. Fix a file:// URL regression introduced in KURL.cpp r30243. * platform/KURL.cpp: (WebCore::KURL::KURL): 2008-02-17 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=17033 REGRESSION: Really long