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