2008-01-02 Alice Liu Reviewed by Maciej. Fixed (problems scrolling in gmail message content area) * platform/ScrollView.h: * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::scroll): Changed return value to bool to reflect success of scroll attempt 2008-01-02 Alexey Proskuryakov Fixed a typo (pointed out in review, but I somehow missed it at first). * editing/EditorCommand.cpp: (WebCore::executeDelete): 2008-01-02 Alexey Proskuryakov Reviewed by Darin. Resolved several FIXMEs in EditorCommand. Made recently added commands hidden from JS again. Removed BackwardDelete implementation, which used to be dead code, but got exposed now. Tests: editing/execCommand/delete-no-scroll.html editing/execCommand/forward-delete-no-scroll.html editing/execCommand/insert-line-break-no-scroll.html * editing/EditorCommand.cpp: (WebCore::executeDelete): (WebCore::executeForwardDelete): (WebCore::executeInsertLineBreak): (WebCore::supportedFromMenuOrKeyBinding): (WebCore::CommandEntry::): 2008-01-02 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=14555 action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice http://bugs.webkit.org/show_bug.cgi?id=14774 Submitted data only includes first input item Reworked encoding of mailto URLs to match other browsers. Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit(). Tests: fast/forms/mailto/advanced-get.html fast/forms/mailto/advanced-put.html fast/forms/mailto/get-multiple-items-text-plain.html fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html fast/forms/mailto/get-multiple-items.html fast/forms/mailto/get-non-ascii.html fast/forms/mailto/get-non-ascii-text-plain.html fast/forms/mailto/get-overwrite-query.html fast/forms/mailto/post-append-query.html fast/forms/mailto/post-multiple-items-multipart-form-data.html fast/forms/mailto/post-multiple-items-text-plain.html fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html fast/forms/mailto/post-multiple-items.html * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::submit): * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): 2008-01-02 Mark Rowe Autotools build fix. * GNUmakefile.am: Remove files before generating them, not after. 2008-01-02 Mark Rowe Rubber-stamped by Alp Toker. Add missing dependencies to some GNUmakefile.am rules. * GNUmakefile.am: 2008-01-02 Mark Rowe Reviewed by Alp Toker. Autotools build fix. Make can expand $@ to any of the targets for the rule, while we always want to use the name of the .cpp file as the output file. * GNUmakefile.am: 2008-01-02 Luca Bruno Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16115 [GTK] ContextMenu and ContextMenuItem lacks an implementation Add context menu support. Based on a patch by Holger Freyther. * platform/gtk/ContextMenuGtk.cpp: (WebCore::menuItemActivated): (WebCore::ContextMenu::ContextMenu): (WebCore::ContextMenu::~ContextMenu): (WebCore::ContextMenu::appendItem): (WebCore::ContextMenu::setPlatformDescription): (WebCore::ContextMenu::releasePlatformDescription): * platform/gtk/ContextMenuItemGtk.cpp: (WebCore::ContextMenuItem::ContextMenuItem): (WebCore::ContextMenuItem::~ContextMenuItem): (WebCore::ContextMenuItem::releasePlatformDescription): (WebCore::ContextMenuItem::type): (WebCore::ContextMenuItem::action): (WebCore::ContextMenuItem::setAction): (WebCore::ContextMenuItem::platformSubMenu): (WebCore::ContextMenuItem::setSubMenu): (WebCore::ContextMenuItem::setChecked): (WebCore::ContextMenuItem::setEnabled): 2008-01-02 Alp Toker GTK+ autotools build fix. Track changes in r29073. * GNUmakefile.am: 2008-01-01 Darin Adler - fix release build * bindings/js/kjs_binding.cpp: (KJS::setDOMException): Initialize to avoid uninitialized variable warning. Removed default so we get a warning if there's a missing case. 2008-01-01 David D. Kilzer Scripting MIME Types application/ecmascript, application/javascript not viewable Reviewed by Darin. This patch consolidates the list of acceptable MIME types for JavaScript source into the MIMETypeRegistry class, and replaces checks for these types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType(). No tests added since viewing JavaScript source is not testable. * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::isTextMIMEType): Use MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single hard-coded MIME type, "application/x-javascript". * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of JavaScript MIME types from here to MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes(). * platform/MIMETypeRegistry.cpp: (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript(). (WebCore::initialiseSupportedNonImageMimeTypes): Remove single hard-coded MIME type, "application/x-javascript", from the list. (WebCore::initialiseMIMETypeRegistry): Initialise supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes with values in supportedJavaScriptMIMETypes. (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added. * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType(). 2008-01-01 Sam Weinig Reviewed by Darin. Patch for http://bugs.webkit.org/show_bug.cgi?id=16691 Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc) - Create JS objects for all the different types of exceptions, each with there own prototype and constructor. - Abstract all the logic and storage for exception classes in to an ExceptionBase class. - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException). Tests: fast/dom/DOMException/EventException.html fast/dom/DOMException/RangeException.html fast/dom/DOMException/XPathException.html http/tests/xmlhttprequest/XMLHttpRequestException.html svg/custom/SVGException.html * DerivedSources.make: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSSVGMatrixCustom.cpp: (WebCore::JSSVGMatrix::inverse): (WebCore::JSSVGMatrix::rotateFromVector): * bindings/js/kjs_binding.cpp: (KJS::setDOMException): * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined in the IDL as the ObjC bindings do. * bindings/scripts/CodeGeneratorObjC.pm: * dom/DOMCoreException.cpp: Removed. * dom/DOMCoreException.h: (WebCore::DOMCoreException::DOMCoreException): * dom/DOMCoreException.idl: * dom/Event.h: * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h. (WebCore::EventException::EventException): (WebCore::EventException::): * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl. * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchEvent): * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp. (WebCore::ExceptionBase::ExceptionBase): (WebCore::ExceptionBase::toString): * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h. (WebCore::ExceptionBase::code): * dom/ExceptionCode.cpp: (WebCore::getExceptionCodeDescription): * dom/ExceptionCode.h: (WebCore::): * dom/Range.cpp: (WebCore::Range::insertNode): (WebCore::Range::checkNodeWOffset): (WebCore::Range::checkNodeBA): (WebCore::Range::selectNode): (WebCore::Range::selectNodeContents): (WebCore::Range::surroundContents): * dom/RangeException.h: (WebCore::RangeException::RangeException): (WebCore::RangeException::): * dom/RangeException.idl: * page/DOMWindow.idl: * svg/SVGColor.cpp: (WebCore::SVGColor::setRGBColor): * svg/SVGException.h: (WebCore::SVGException::SVGException): (WebCore::SVGException::): * svg/SVGException.idl: * svg/SVGLocatable.cpp: (WebCore::SVGLocatable::getTransformToElement): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::dispatchEvent): (WebCore::XMLHttpRequest::open): (WebCore::XMLHttpRequest::send): * xml/XMLHttpRequest.h: * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h. (WebCore::XMLHttpRequestException::XMLHttpRequestException): (WebCore::XMLHttpRequestException::): * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl. * xml/XPathEvaluator.h: * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h. (WebCore::XPathException::XPathException): (WebCore::XPathException::): * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl. * xml/XPathParser.cpp: (WebCore::XPath::Parser::parseStatement): * xml/XPathResult.cpp: (WebCore::XPathResult::convertTo): (WebCore::XPathResult::numberValue): (WebCore::XPathResult::stringValue): (WebCore::XPathResult::booleanValue): (WebCore::XPathResult::singleNodeValue): (WebCore::XPathResult::snapshotLength): (WebCore::XPathResult::iterateNext): (WebCore::XPathResult::snapshotItem): 2008-01-01 Sam Weinig Remove JSDomExceptionConstructor.lut.h from clean step as it no longer exists. * GNUmakefile.am: 2008-01-01 Dan Bernstein - Windows build fix * WebCore.vcproj/WebCore.vcproj: 2008-01-01 Sam Weinig Try again to fix the builds * DerivedSources.make: 2008-01-01 Sam Weinig Fix non-mac builds. * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: 2008-01-01 Eric Seidel Reviewed by Alexey. Don't replace \ with / in data: urls http://bugs.webkit.org/show_bug.cgi?id=16692 Test: fast/loader/url-data-replace-backslash.html * platform/KURL.cpp: (WebCore::KURL::init): 2008-01-01 Alp Toker GTK+ autotools build fix. Track changes in r29051, r29058 and pass the correct parameter to AM_INIT_AUTOMAKE. * GNUmakefile.am: 2007-12-31 Sam Weinig Reviewed by Darin. Patch for http://bugs.webkit.org/show_bug.cgi?id=16637 Acid3 expects ExeceptionCode constants to be defined on DOMException objects - Make DOMException a real JS object. Test: fast/dom/DOMException/prototype-object.html * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: This is no longer needed as the autogenerated classes now includes the constructor. * bindings/js/JSDOMExceptionConstructor.cpp: Removed. * bindings/js/JSDOMExceptionConstructor.h: Removed. Create on demand and use the new class for DOMExceptions. * bindings/js/kjs_binding.cpp: (KJS::setDOMException): Remove no longer needed custom constructor getter. * bindings/js/kjs_window.cpp: (KJS::Window::getValueProperty): Don't expose DOMCoreException as the name of class by special casing the user visible class name to be DOMException. * bindings/scripts/CodeGeneratorJS.pm: The DOMException class/file needs to be named DOMCoreException because there is name conflict with one of the Objective-C bindings classes. It should be renamed to DOMException when the Objective-C bindings are moved into WebKit. * dom/DOMCoreException.cpp: Added. (WebCore::DOMCoreException::DOMCoreException): (WebCore::DOMCoreException::toString): * dom/DOMCoreException.h: Added. (WebCore::DOMCoreException::): (WebCore::DOMCoreException::code): (WebCore::DOMCoreException::name): (WebCore::DOMCoreException::message): * dom/DOMCoreException.idl: Added. * page/DOMWindow.idl: 2007-12-31 Sam Weinig Re-enable querySelector and querySelectorAll and touch the necessary files to not kill the windows build. * WebCore.vcproj/build-generated-files.sh: * bindings/scripts/CodeGeneratorCOM.pm: * dom/Document.idl: * dom/Element.idl: 2007-12-31 Darin Adler - fix Windows build * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing up as pure virtual functions. Sam can fix this later. * dom/Element.idl: Ditto. 2007-12-31 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=14134 REGRESSION (r25353): Whitespace nodes ignored between inline list items Test: fast/dynamic/create-renderer-for-whitespace-only-text.html * dom/Node.cpp: (WebCore::Node::attach): Added code to check if this node's renderer has become the "previous renderer" of any sibling text node, and if so, ensure that that node gets a renderer if it now needs one. (WebCore::Node::createRendererIfNeeded): Removed the assertion that the node is not attached. 2007-12-31 Darin Adler Reviewed by Mitz. - fix http://bugs.webkit.org/show_bug.cgi?id=16641 Acid3 reveals HTMLFormElement.elements fails to update when element name changes Test: fast/dom/HTMLFormElement/elements-not-in-document.html This was a bug specific to forms that are not in the document tree. The fix was to change the code to increment the document version number to match up with other document change tracking. Maybe at some point we can clean these up so we don't have so many competing change notification systems. * dom/ContainerNode.cpp: (WebCore::ContainerNode::replaceChild): Removed bogus comment. (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion call here, since this code path bypasses the subtree-modified event code. * dom/Element.cpp: (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML collections are for things in the document. (WebCore::Element::setAttributeMap): Ditto. * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to incDOMTreeVersion here; covers most cases of tree structure changes. * dom/Node.cpp: (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer has nothing to do with changes to the DOM tree! (WebCore::Node::detach): Ditto. * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion. This is handled at a lower level and doesn't need to be here. (WebCore::HTMLFormElement::removeFormElement): Ditto. 2007-12-31 Henry Mason Reviewed by Darin. Patch for http://bugs.webkit.org/show_bug.cgi?id=14994 Support for MessageEvent and cross-domain messaging Test: http/tests/messaging/cross-domain-message-send.html * DerivedSources.make: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::customGetOwnPropertySlot): Allow cross-domain access to the postMessage function. (WebCore::JSDOMWindow::postMessage): * bindings/js/JSEventCustom.cpp: (WebCore::toJS): * dom/Event.cpp: (WebCore::Event::isMessageEvent): * dom/Event.h: * dom/EventNames.h: New event name * dom/MessageEvent.cpp: Added. * dom/MessageEvent.h: Added. * dom/MessageEvent.idl: Added. * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): Added. * page/DOMWindow.h: * page/DOMWindow.idl: 2007-12-31 Darin Adler Suggested by Antti. - turn ENABLE_VIDEO back off for Windows until we can install QuickTime on the build bots * WebCore.vcproj/WebCore.vcproj: Removed ENABLE_VIDEO. * WebCore.vcproj/build-generated-files.sh: Ditto. 2007-12-30 Alp Toker Reviewed by Dan Bernstein. Silence warning. * dom/NodeList.h: 2007-12-30 Sam Weinig Reviewed by Oliver Hunt. Fix for http://bugs.webkit.org/show_bug.cgi?id=16387 Variable names can be enumerated across domains Test: http/tests/security/cross-frame-access-enumeration.html * bindings/js/kjs_window.cpp: (KJS::Window::getPropertyNames): Override method to test same-origin policy. * bindings/js/kjs_window.h: 2007-12-30 Sam Weinig Reviewed by Oliver Hunt. Patch for http://bugs.webkit.org/show_bug.cgi?id=10686 event instanceof MouseEvent throws exception Add JS constructors for all the Event types. Test: fast/events/event-instanceof.html * WebCore.xcodeproj/project.pbxproj: * dom/KeyboardEvent.idl: * dom/MouseEvent.idl: * dom/MutationEvent.idl: * dom/OverflowEvent.idl: * dom/ProgressEvent.idl: * dom/TextEvent.idl: * dom/UIEvent.idl: * dom/WheelEvent.idl: * page/DOMWindow.idl: 2007-12-30 David Kilzer Reviewed by Darin. - fix http://bugs.webkit.org/show_bug.cgi?id=15359 JPEG image not shown when height is specified as percentage inside a table The problem occurs when a replaced element (image, canvas, etc.) with a percent-height attribute is contained by a table cell with an auto- or percent-height attribute. If there are no other conditions to cause the table cell's height to expand, an available height of zero will always be returned. In these cases, the intrinsic height of the replaced element should be used if it is greater than the available height of the table cell. Tests: fast/replaced/table-percent-height.html tables/mozilla/bugs/bug137388-1.html tables/mozilla/bugs/bug137388-2.html * rendering/RenderBox.cpp: (WebCore::RenderBox::calcReplacedHeightUsing): 2007-12-30 Luca Bruno Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16099 Crash in CURL for empty POST We have to set POST even when the data is empty, otherwise cURL will hang while waiting for a response. * platform/network/curl/ResourceHandleManager.cpp (ResourceHandleManager::setupPOST): allow empty POST 2007-12-29 Jan Michael Alonzo Reviewed by Alp Toker. Move all SVG related stuff inside SVG block. Don't include SVGNames, SVGElementFactory, and XLinkNames when SVG is not enabled * GNUmakefile.am: 2007-12-29 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=14428 FCKEditor: Images disappear on drag/drop and copy/paste Test: editing/pasteboard/drag-image-in-about-blank-frame.html * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use "about:blank" as a base URL, just like we don't use an empty one. 2007-12-29 Jan Michael Alonzo Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16669 autotools update and fixes Autotools update and database/icon database inclusion guard fixes * GNUmakefile.am: - Update autotools config as per -r29012 changes - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn) * dom/Document.cpp: * loader/icon/IconDatabase.h: * page/DOMWindow.cpp: * page/InspectorController.cpp: * page/Settings.cpp: * storage/Database.h: - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead. 2007-12-29 Nikolas Zimmermann Reviewed by Alexey. Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts. (Fixes fonts-elem-05-t.svg in a --svg-fonts build) * svg/SVGFont.cpp: (WebCore::Font::drawGlyphsWithSVGFont): 2007-12-29 Nikolas Zimmermann Reviewed by Oliver. Further SVG Font work. Parse all attributes, using SVGGlyphElement::buildGlyphIdentifier. SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now. * platform/graphics/FontData.cpp: (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function. (WebCore::FontData::ascent): (WebCore::FontData::descent): * platform/graphics/FontData.h: * svg/SVGFont.cpp: (WebCore::isVerticalWritingMode): Add helper function. (WebCore::Font::drawGlyphsWithSVGFont): * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement. * svg/SVGGlyphElement.cpp: (WebCore::parseArabicForm): Helper function. (WebCore::parseOrientation): Ditto. (WebCore::parsePathData): Ditto. (WebCore::SVGGlyphElement::buildGlyphIdentifier): * svg/SVGGlyphElement.h: (WebCore::SVGGlyphElement::rendererIsNeeded): 2007-12-29 Nikolas Zimmermann Reviewed by Oliver. Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString. SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated. * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseMappedAttribute): * svg/SVGParserUtilities.cpp: (WebCore::parseDelimitedString): * svg/SVGParserUtilities.h: 2007-12-29 Nikolas Zimmermann Reviewed by Maciej. Add new helper structure SVGFontData - FontData holds this object as OwnPtr. Store several attribute values there (horiz-adv-x, horiz-origin-x etc..) To optimize for the common case ('FontData' used for HTML rendering) it feels better to hold one OwnPtr in FontData, than several floats. Parse all attributes in SVGFontFaceElement::createFontData. * platform/graphics/FontData.cpp: (WebCore::SVGFontData::SVGFontData): (WebCore::FontData::FontData): (WebCore::FontData::ascent): (WebCore::FontData::descent): * platform/graphics/FontData.h: (WebCore::FontData::isSVGFont): (WebCore::FontData::svgFontData): * svg/SVGFont.cpp: (WebCore::Font::drawGlyphsWithSVGFont): * svg/SVGFontElement.cpp: * svg/SVGFontElement.h: (WebCore::SVGFontElement::rendererIsNeeded): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::unitsPerEm): (WebCore::SVGFontFaceElement::createFontData): 2007-12-28 Darin Adler - try to fix Windows and WX builds (broken by SVG Fonts check-in) * platform/graphics/win/FontWin.cpp: (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it. I can't see how it can be right to require the font size for ascent and descent, but not for other metrics functions in FontData. * platform/graphics/wx/FontWx.cpp: (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent. 2007-12-28 Dan Bernstein Reviewed by Mark Rowe. - fix http://bugs.webkit.org/show_bug.cgi?id=16650 REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs Covered by existing pixel tests. * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawComplexText): Corrected to maintain the style information in the adjusted text run when passing it to ATSUILayoutParameters. Prior to r28298 the style was passed separately. 2007-12-29 Nikolas Zimmermann Build fix, not reviewed. Add wtf/OwnPtr.h include, to fix --svg-fonts build. * css/SVGCSSFontFace.h: 2007-12-29 Nikolas Zimmermann Reviewed by Eric. Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support) Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work. Only local, in-document fonts who declare their glyphs using the path syntax are supported. ( containing arbitary SVG content as child elements, not supported yet). Limited to single char <-> glyph mapping, no ligatures supported yet. (ie. - it ignores the 'AB' glyph definition for now) Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks. No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font attributes are not processed yet, the rendering looks wrong - hence disabled by default.) * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement * WebCore.pro: Updated build system. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement * bindings/objc/DOM.mm: Ditto (for DOMSVG*). (WebCore::createElementClassMap): * bindings/objc/DOMInternal.h: Ditto. * bindings/objc/DOMSVG.h: Ditto. * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source. (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it. (WebCore::CSSFontFaceSrcValue::svgFontFaceElement): (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement): * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts. (WebCore::CSSFontSelector::addFontFaceRule): * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts) (WebCore::SVGCSSFontFace::SVGCSSFontFace): (WebCore::SVGCSSFontFace::~SVGCSSFontFace): (WebCore::SVGCSSFontFace::isValid): (WebCore::SVGCSSFontFace::addSource): (WebCore::SVGCSSFontFace::getFontData): * css/SVGCSSFontFace.h: Added. * platform/graphics/cg/PathCG.cpp: (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path. * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts. (WebCore::Font::ascent): Pass font size to FontData::ascent() call (WebCore::Font::descent): Pass font size to FontData::descent() call (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here. (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font. * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call. (WebCore::TextRun::TextRun): (WebCore::TextRun::referencingRenderObject): (WebCore::TextRun::setReferencingRenderObject): * platform/graphics/FontData.cpp: (WebCore::FontData::FontData): (WebCore::FontData::ascent): (WebCore::FontData::descent): * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont(). (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement. (WebCore::FontData::svgFontFace): * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion. * rendering/SVGRootInlineBox.cpp: (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun * svg/SVGFont.cpp: Added. (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file. * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain objects with unicode values) (WebCore::SVGFontElement::SVGFontElement): (WebCore::SVGFontElement::~SVGFontElement): (WebCore::SVGFontElement::parseMappedAttribute): (WebCore::SVGFontElement::collectGlyphs): (WebCore::SVGFontElement::glyphIdentifierForGlyphCode): * svg/SVGFontElement.h: Added. (WebCore::GlyphHash::hash): (WebCore::GlyphHash::equal): (WebCore::GlyphHashTraits::deletedValue): (WebCore::SVGFontElement::rendererIsNeeded): (WebCore::SVGFontElement::contextElement): * svg/SVGFontElement.idl: Added. * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object (WebCore::SVGFontFaceElement::unitsPerEm): (WebCore::SVGFontFaceElement::fontFamily): (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc.. (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule. (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face. (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement. * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks. * svg/SVGFontFaceElement.idl: Ditto. * svg/SVGFontFaceFormatElement.cpp: Ditto. * svg/SVGFontFaceFormatElement.h: Ditto. * svg/SVGFontFaceFormatElement.idl: Ditto. * svg/SVGFontFaceNameElement.cpp: Ditto. * svg/SVGFontFaceNameElement.h: Ditto. * svg/SVGFontFaceNameElement.idl: Ditto. * svg/SVGFontFaceSrcElement.cpp: Ditto. * svg/SVGFontFaceSrcElement.h: Ditto. * svg/SVGFontFaceSrcElement.idl: Ditto. * svg/SVGFontFaceUriElement.cpp: Ditto. * svg/SVGFontFaceUriElement.h: Ditto. * svg/SVGFontFaceUriElement.idl: Ditto. * svg/SVGDefinitionSrcElement.cpp: Ditto. * svg/SVGDefinitionSrcElement.h: Ditto. * svg/SVGDefinitionSrcElement.idl: Ditto. * svg/SVGGlyphElement.cpp: Added. (WebCore::SVGGlyphElement::SVGGlyphElement): (WebCore::SVGGlyphElement::parseMappedAttribute): (WebCore::SVGGlyphElement::childrenChanged): * svg/SVGGlyphElement.h: Added. (WebCore::SVGGlyphElement::rendererIsNeeded): (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..) (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier): * svg/SVGGlyphElement.idl: Added. * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation) (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement): (WebCore::SVGMissingGlyphElement::parseMappedAttribute): (WebCore::SVGMissingGlyphElement::childrenChanged): * svg/SVGMissingGlyphElement.h: Added. (WebCore::SVGMissingGlyphElement::rendererIsNeeded): * svg/SVGMissingGlyphElement.idl: Added. * svg/svgtags.in: Wrap all SVGFont* elements in ENABLE(SVG_FONTS) block - to assure --no-svg-fonts compilation works (which is the default for now!). 2007-12-27 Dan Bernstein Reviewed by Alexey Proskuryakov. - fix http://bugs.webkit.org/show_bug.cgi?id=16628 ASSERTION FAILED: m_resizeLayer (running layout tests) * rendering/RenderLayer.cpp: (WebCore::RenderLayer::~RenderLayer): Avoid calling EventHandler::resizeLayerDestroyed() if the document is being destroyed. 2007-12-27 Dan Bernstein Reviewed by Oliver Hunt. - fix http://bugs.webkit.org/show_bug.cgi?id=16603 Crash when resizing text field Test: fast/layers/resize-layer-deletion-crash.html The event handler has only a weak reference to the layer that is currently in resize mode, so it is the layer's responsibility to let the event handler know if it has been destroyed while in that mode. * page/EventHandler.cpp: (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets m_resizeLayer to 0. * page/EventHandler.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::~RenderLayer): Added a call to EventHandler::resizeLayerDestroyed() if the layer is in resize mode. 2007-12-27 Collin Jackson Reviewed by Sam Weinig. http://bugs.webkit.org/show_bug.cgi?id=16539 The same-origin check was missing in the implementation of setTimeout, setInterval, addEventListener, and removeEventListener. Suppose contains an iframe to . Now www.badguy.com can steal www.goodguy.com cookies by running this code: setTimeout.call(frames[0], "alert(document.cookie)", 1000); This patch changes the behavior so that setTimeout to does nothing and returns an undefined value if the caller is not permitted to script the window whose setTimeout method is being called. The same applies to setInterval, addEventListener, and removeEventListener. Tests: http/tests/security/cross-frame-access-call.html * bindings/js/kjs_window.cpp: (KJS::WindowProtoFuncSetTimeout::callAsFunction) (KJS::WindowProtoFuncSetInterval::callAsFunction) (KJS::WindowProtoFuncAddEventListener::callAsFunction) (KJS::WindowProtoFuncRemoveEventListener::callAsFunction) 2007-12-27 Dan Bernstein Reviewed by Dave Hyatt and Sam Weinig. - fix Inspector: Disclosure triangle not drawn in node's properties panel until click Test: fast/layers/add-layer-with-nested-stacking.html Test: fast/layers/remove-layer-with-nested-stacking.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::addChild): If the new child is overflow-only but has children of its own, dirty the stacking context's z-order lists since the grandchildren might need to be in them. (WebCore::RenderLayer::removeChild): Similarly for the old child. 2007-12-27 Jan Michael Alonzo Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16353 [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.) Added the flags mentioned in the bug only when doing 'debug' builds. -DGST_DISABLE_DEPRECATED only added when video is enabled. * GNUmakefile.am: * WebCore.pro: 2007-12-27 Dan Bernstein Reviewed by Eric Seidel. - fix http://bugs.webkit.org/show_bug.cgi?id=16490 ASSERT in ~FrameView while viewing/reloading WICD test case Test: fast/dynamic/paused-event-dispatch.html * page/FrameView.cpp: (WebCore::FrameView::~FrameView): (WebCore::FrameView::layout): Changed to always pause event dispatch and always resume event dispatch, regardless of whether the post-layout task timer is active. However, if it is active, assert that event dispatch is still paused. 2007-12-27 Alexey Proskuryakov Reviewed by Maciej. http://bugs.webkit.org/show_bug.cgi?id=14500 need to be more generous about charset declaration with meta tag http://bugs.webkit.org/show_bug.cgi?id=12526 Safari ignores encoding description "charset=Shift_JIS" in invalid html Unlike other browsers, WebKit ignores charset definitions outside the head REGRESSION: Text is garbled when clicking a link inside an Arabic website Tests: fast/encoding/ahram-org-eg.html fast/encoding/bandai-co-jp-releases.html fast/encoding/floraexpress-ru.html fast/encoding/hanarei-blog32-fc2-com.html fast/encoding/yahoo-mail.html * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for until we've seen at least 512 bytes of input. 2007-12-26 Jan Michael Alonzo Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16390 Use autotools or GNU make as the build system for the GTK port * GNUmakefile.am: Added. 2007-12-26 Alexey Proskuryakov Reviewed by Sam Weinig. http://bugs.webkit.org/show_bug.cgi?id=16609 Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http). 2007-12-26 Mark Rowe Windows build fix. * platform/Threading.h: 2007-12-25 Rob Buis Reviewed by Eric. http://bugs.webkit.org/show_bug.cgi?id=15514 with not respected http://bugs.webkit.org/show_bug.cgi?id=16557 SVG circle elements have been clipped away completely, instead of partially. Add toClipPath to get clip path data for the clipping paths. Implement it for , thereby allowing clip paths using use. * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::canvasResource): * svg/SVGStyledTransformableElement.h: (WebCore::SVGStyledTransformableElement::toClipPath): * svg/SVGUseElement.cpp: (WebCore::isDirectReference): (WebCore::SVGUseElement::toClipPath): * svg/SVGUseElement.h: 2007-12-25 Sam Weinig Reviewed by Eric Seidel. Clean up the files relating to NodeLists. * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::ChildNodeList): (WebCore::ChildNodeList::length): (WebCore::ChildNodeList::item): (WebCore::ChildNodeList::nodeMatches): * dom/ChildNodeList.h: * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeList::itemForwardsFromCurrent): (WebCore::DynamicNodeList::itemBackwardsFromCurrent): (WebCore::DynamicNodeList::itemWithName): * dom/DynamicNodeList.h: (WebCore::DynamicNodeList::needsNotifications): * dom/NameNodeList.cpp: (WebCore::NameNodeList::NameNodeList): (WebCore::NameNodeList::rootNodeAttributeChanged): (WebCore::NameNodeList::nodeMatches): * dom/NameNodeList.h: * dom/NodeList.h: * dom/SelectorNodeList.h: 2007-12-25 Sam Weinig Fix non-mac builds. * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: 2007-12-25 Sam Weinig Rubber stamped by Eric Seidel. Move TagNodeList into its own file. * WebCore.xcodeproj/project.pbxproj: * dom/Node.cpp: * dom/TagNodeList.cpp: Copied from dom/Node.cpp. (WebCore::TagNodeList::TagNodeList): * dom/TagNodeList.h: Copied from dom/Node.cpp. 2007-12-25 Sam Weinig Reviewed by Eric Seidel. Simplify the NodeList architecture. - Rename recursiveItem() to item(), since it is not recursive. - Make recursiveLength() iterative and rename to length(). - Remove now unneeded overrides of item() and length() that used to call the recursive variants. * dom/ClassNodeList.cpp: * dom/ClassNodeList.h: * dom/DynamicNodeList.cpp: (WebCore::DynamicNodeList::length): (WebCore::DynamicNodeList::item): (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation into the .cpp file since virtual methods can't be inlined. * dom/DynamicNodeList.h: * dom/NameNodeList.cpp: * dom/NameNodeList.h: * dom/Node.cpp: 2007-12-25 Alp Toker More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in r28981. * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: 2007-12-25 Alp Toker Win build fix for breakage introduced in r28981. * WebCore.vcproj/WebCore.vcproj: 2007-12-25 Alp Toker Wx build fix for breakage introduced in r28981. * WebCoreSources.bkl: 2007-12-25 Alp Toker GTK+/Qt build fix for breakage introduced in r28981. * WebCore.pro: 2007-12-25 David Smith and Sam Weinig Reviewed by Oliver. - http://bugs.webkit.org/show_bug.cgi?id=16587 Implement the most useful part of the W3C Selectors API. * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector() * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList * dom/ChildNodeList.h: * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList * dom/ClassNodeList.h: * dom/Document.idl: Add the new functions * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp. (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList (WebCore::DynamicNodeList::~DynamicNodeList): (WebCore::DynamicNodeList::recursiveLength): (WebCore::DynamicNodeList::itemForwardsFromCurrent): (WebCore::DynamicNodeList::itemBackwardsFromCurrent): (WebCore::DynamicNodeList::recursiveItem): (WebCore::DynamicNodeList::itemWithName): (WebCore::DynamicNodeList::rootNodeChildrenChanged): (WebCore::DynamicNodeList::Caches::Caches): (WebCore::DynamicNodeList::Caches::reset): * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h. (WebCore::DynamicNodeList::rootNodeAttributeChanged): * dom/Element.idl: Add the new functions * dom/NameNodeList.cpp: Change to being a DynamicNodeList (WebCore::NameNodeList::NameNodeList): * dom/NameNodeList.h: (WebCore::NameNodeList::rootNodeAttributeChanged): * dom/Node.cpp: (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList (WebCore::Node::registerDynamicNodeList): (WebCore::Node::unregisterDynamicNodeList): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): (WebCore::Node::querySelector): new (WebCore::Node::querySelectorAll): new * dom/Node.h: * dom/NodeList.cpp: Removed. * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList (WebCore::NodeList::NodeList): (WebCore::NodeList::~NodeList): * dom/SelectorNodeList.cpp: Added. (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector * dom/SelectorNodeList.h: Added. * dom/StaticNodeList.cpp: Added. (WebCore::StaticNodeList::length): (WebCore::StaticNodeList::item): (WebCore::StaticNodeList::itemWithName): * dom/StaticNodeList.h: Added. (WebCore::StaticNodeList::StaticNodeList): (WebCore::StaticNodeList::~StaticNodeList): 2007-12-25 Mark Rowe Reviewed by Sam Weinig. Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64. http://bugs.webkit.org/show_bug.cgi?id=16596 This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded access to a single ThreadSafeShared object. The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation. * platform/Threading.h: (WebCore::atomicIncrement): (WebCore::atomicDecrement): (WebCore::ThreadSafeShared::ThreadSafeShared): (WebCore::ThreadSafeShared::ref): Use lock-free operations if available. (WebCore::ThreadSafeShared::deref): Ditto. (WebCore::ThreadSafeShared::hasOneRef): (WebCore::ThreadSafeShared::refCount): (WebCore::ThreadSafeShared::isThreadSafe): 2007-12-24 Darin Adler * platform/text/PlatformString.h: Removed now-incorrect comment. Added a comment about copy(). * platform/text/StringImpl.h: Added a comment about copy(). 2007-12-24 Darin Adler Reviewed by Maciej. - http://bugs.webkit.org/show_bug.cgi?id=16550 make StringImpl immutable I tried to keep the changes to a minimum. In some cases there is room for optimization -- I didn't try to add in the "single ref count" optimizations and there might be a tiny bit more string copying than we had before. * WebCore.base.exp: Updated. * dom/CharacterData.cpp: (WebCore::CharacterData::appendData): Changed to use String since StringImpl doesn't have mutating functions any more. (WebCore::CharacterData::insertData): Ditto. (WebCore::CharacterData::deleteData): Ditto. (WebCore::CharacterData::replaceData): Ditto. * dom/Text.cpp: (WebCore::Text::splitText): Changed to use substring instead of remove since StringImpl does't have mutating functions any more. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteInsignificantText): Changed to use String instead of StringImpl so we can use remove. * platform/text/PlatformString.h: Removed newUninitialized. Added append that takes a character pointer and length. * platform/text/String.cpp: (WebCore::String::insert): Added an implementation that does not rely on an underlying StringImpl function. (WebCore::String::append): Ditto. (WebCore::String::truncate): Ditto. (WebCore::String::remove): Ditto. (WebCore::String::charactersWithNullTermination): Added an implementation that uses the new StringImpl null termination feature, which does not require modifying a string. * platform/text/StringImpl.cpp: (WebCore::isSpace): Fix comment. (WebCore::StringImpl::StringImpl): Added a new constructor that makes a string with a trailing null character. (WebCore::StringImpl::substring): Marked const. (WebCore::StringImpl::replace): Marked const; had to add quite a few const_cast. Also rewrote one of these to work without modifying the existing string. * platform/text/StringImpl.h: Fixed a mistake where the empty string had m_hasTerminatingNullCharacter uninitialized. Added a type and constructor for creating strings that have a trailing null character. Added a hasTerminatingNullCharacter function. Removed newUninitialized, charactersWithNullTermination, append, insert, truncate, and remove. Marked lots of other functions const. * platform/text/TextCodecLatin1.cpp: (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of newUninitialized. * platform/text/TextCodecUTF16.cpp: (WebCore::TextCodecUTF16::decode): Ditto. * platform/text/TextCodecUserDefined.cpp: (WebCore::TextCodecUserDefined::decode): Ditto. * rendering/RenderStyle.cpp: (WebCore::RenderStyle::setContent): Changed to use String since StringImpl doesn't have mutating functions any more. 2007-12-24 Alexey Proskuryakov Reviewed by Oliver. Fix fast/events/arrow-keys-on-body.html, failing on Windows. * platform/win/KeyEventWin.cpp: (WebCore::isKeypadEvent): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Use HIWORD() macro instead of shifting the value explicitly (no change in behavior). 2007-12-23 Alexey Proskuryakov Fix Debug and Release QTMovieWin bulds. * WebCore.vcproj/QTMovieWin.vcproj: * WebCore.vcproj/debug.vsprops: * WebCore.vcproj/debug_internal.vsprops: * WebCore.vcproj/release.vsprops: Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2. Build release import lib into \lib, not \bin. 2007-12-23 Alp Toker Reviewed by Holger Freyther. http://bugs.webkit.org/show_bug.cgi?id=15382 [CAIRO] Canvas pattern support http://bugs.webkit.org/show_bug.cgi?id=16577 Merge Cairo enhancements from Apollo project Add support for canvas patterns. Make Image::nativeImageForCurrentFrame() public. Fix some typos along the way. The globalAlpha canvas fixes are not included in this patch as they're slightly more intrusive and may conflict conceptually with GraphicsContext::setAlpha(). * html/CanvasPattern.cpp: (WebCore::CanvasPattern::CanvasPattern): (WebCore::CanvasPattern::~CanvasPattern): (WebCore::CanvasPattern::createPattern): * html/CanvasPattern.h: (WebCore::CanvasPattern::platformImage): * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setShadow): (WebCore::CanvasRenderingContext2D::applyShadow): (WebCore::CanvasRenderingContext2D::drawImage): (WebCore::CanvasRenderingContext2D::createPattern): (WebCore::CanvasRenderingContext2D::applyStrokePattern): (WebCore::CanvasRenderingContext2D::applyFillPattern): * platform/graphics/Image.h: (WebCore::Image::nativeImageForCurrentFrame): 2007-12-23 Kevin Ollivier Reviewed by Eric Seidel. Remove getWxBitmap as we have nativeImageForCurrentFrame now, and don't draw a border in fillRect. * platform/graphics/BitmapImage.h: * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::fillRect): * platform/graphics/wx/ImageWx.cpp: 2007-12-23 Alp Toker Reviewed by Holger Freyther. http://bugs.webkit.org/show_bug.cgi?id=16577 Merge Cairo enhancements from Apollo project This patch is based on initial merging work by Brent Fulgham. Adobe's code has been modified in a few places to better suit the existing coding style. Implement more clipping and drawing functions. Save and restore the fill rule manually when clipping. Avoid image surface creation when the image buffer has height zero. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::addInnerRoundedRectClip): (WebCore::GraphicsContext::addPath): (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipOutEllipseInRect): (WebCore::GraphicsContext::fillRoundedRect): * platform/graphics/cairo/ImageSourceCairo.cpp: (WebCore::ImageSource::createFrameAtIndex): 2007-12-23 Nikolas Zimmermann Reviewed by Mark. Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block. * bindings/objc/DOM.mm: (WebCore::createElementClassMap): 2007-12-22 Alp Toker GTK+ build fix GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass empty target flags for now. Check GTK+, not GLib versions, since they are different. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::documentFragment): 2007-12-22 Luca Bruno Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16311 [Gtk] Copy rich text to clipboard as text/plain and text/html. Hook into the WebView to get the correct clipboard object on the appropriate display. This is necessary because GTK+ does not have global clipboards. * WebCore.pro: * platform/Pasteboard.h: (WebCore::Pasteboard::setHelper): added for GTK (WebCore::Pasteboard::m_helper): private added for GTK * platform/gtk/PasteboardGtk.cpp: (WebCore::PasteboardSelectionData): added to support GTK selection data callback (WebCore::clipboard_get_contents_cb): added (WebCore::clipboard_clear_contents_cb): added (WebCore::Pasteboard::~Pasteboard): (WebCore::Pasteboard::setHelper): (WebCore::Pasteboard::writeSelection): copy rich text (WebCore::Pasteboard::documentFragment): (WebCore::Pasteboard::plainText): * platform/gtk/PasteboardHelper.h: Added. 2007-12-22 Nikolas Zimmermann Reviewed by Oliver. Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover) Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox. SVG assumed it's root inline box (for elements) is always of type SVGRootInlineBox, which is not the case for HTML text in . Text selection doesn't work so far as line box offsets are wrong - which is visible in Web Inspector. * rendering/InlineBox.h: (WebCore::InlineBox::isSVGRootInlineBox): * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::svgRootInlineBox): (WebCore::SVGInlineTextBox::closestCharacterToPosition): (WebCore::SVGInlineTextBox::selectionRect): * rendering/SVGRenderTreeAsText.cpp: (WebCore::writeSVGInlineTextBox): * rendering/SVGRootInlineBox.h: (WebCore::SVGRootInlineBox::isSVGRootInlineBox): 2007-12-22 Alp Toker LOW_BANDWIDTH_DISPLAY build fix Track recent KURL DeprecatedString changes. * loader/FrameLoader.cpp: (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): 2007-12-22 Dan Bernstein - Windows build fix * WebCore.vcproj/WebCore.vcproj: 2007-12-22 Xan Lopez Reviewed by Alp Toker. Add missing return 0 to fix a compile warning. * page/gtk/FrameGtk.cpp: (WebCore::Frame::createScriptInstanceForWidget): 2007-12-21 Antti Koivisto Reviewed by Darin, Adam and Steve. Add media playback support for Windows. The implementation uses low level QuickTime API. DLL is needed to work around CF use in both WebKit and QuickTime. This makes Windows build depend on the QuickTime SDK http://developer.apple.com/quicktime/download/ but not QuickTime itself. QTMovieWinTimer contains some copy code from SharedTimerWin. It is used in the QuickTime access DLL which can't use WebCore SharedTimer due to dependency problems. * WebCore.vcproj/QTMovieWin.vcproj: Added. * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/build-generated-files.sh: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setSrc): * platform/graphics/MediaPlayer.cpp: * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added. (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::load): (WebCore::MediaPlayerPrivate::play): (WebCore::MediaPlayerPrivate::pause): (WebCore::MediaPlayerPrivate::duration): (WebCore::MediaPlayerPrivate::currentTime): (WebCore::MediaPlayerPrivate::seek): (WebCore::MediaPlayerPrivate::doSeek): (WebCore::MediaPlayerPrivate::cancelSeek): (WebCore::MediaPlayerPrivate::seekTimerFired): (WebCore::MediaPlayerPrivate::setEndTime): (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded): (WebCore::MediaPlayerPrivate::endPointTimerFired): (WebCore::MediaPlayerPrivate::paused): (WebCore::MediaPlayerPrivate::seeking): (WebCore::MediaPlayerPrivate::naturalSize): (WebCore::MediaPlayerPrivate::hasVideo): (WebCore::MediaPlayerPrivate::setVolume): (WebCore::MediaPlayerPrivate::setMuted): (WebCore::MediaPlayerPrivate::setRate): (WebCore::MediaPlayerPrivate::dataRate): (WebCore::MediaPlayerPrivate::maxTimeBuffered): (WebCore::MediaPlayerPrivate::maxTimeSeekable): (WebCore::MediaPlayerPrivate::maxTimeLoaded): (WebCore::MediaPlayerPrivate::bytesLoaded): (WebCore::MediaPlayerPrivate::totalBytesKnown): (WebCore::MediaPlayerPrivate::totalBytes): (WebCore::MediaPlayerPrivate::cancelLoad): (WebCore::MediaPlayerPrivate::updateStates): (WebCore::MediaPlayerPrivate::didEnd): (WebCore::MediaPlayerPrivate::setRect): (WebCore::MediaPlayerPrivate::setVisible): (WebCore::MediaPlayerPrivate::paint): (WebCore::MediaPlayerPrivate::getSupportedTypes): (WebCore::MediaPlayerPrivate::movieEnded): (WebCore::MediaPlayerPrivate::movieLoadStateChanged): (WebCore::MediaPlayerPrivate::movieTimeChanged): (WebCore::MediaPlayerPrivate::movieNewImageAvailable): * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added. (WebCore::MediaPlayerPrivate::networkState): (WebCore::MediaPlayerPrivate::readyState): * platform/graphics/win/QTMovieWin.cpp: Added. (updateTaskTimer): (QTMovieWinPrivate::QTMovieWinPrivate): (QTMovieWinPrivate::~QTMovieWinPrivate): (taskTimerFired): (QTMovieWinPrivate::startTask): (QTMovieWinPrivate::endTask): (QTMovieWinPrivate::task): (QTMovieWinPrivate::registerDrawingCallback): (QTMovieWinPrivate::drawingComplete): (QTMovieWinPrivate::createGWorld): (QTMovieWinPrivate::setSize): (QTMovieWinPrivate::deleteGWorld): (QTMovieWin::QTMovieWin): (QTMovieWin::~QTMovieWin): (QTMovieWin::play): (QTMovieWin::pause): (QTMovieWin::rate): (QTMovieWin::setRate): (QTMovieWin::duration): (QTMovieWin::currentTime): (QTMovieWin::setCurrentTime): (QTMovieWin::setVolume): (QTMovieWin::setMuted): (QTMovieWin::dataSize): (QTMovieWin::maxTimeLoaded): (QTMovieWin::loadState): (QTMovieWin::getNaturalSize): (QTMovieWin::setSize): (QTMovieWin::setVisible): (QTMovieWin::paint): (QTMovieWin::load): (movieDrawingCompleteProc): (initializeSupportedTypes): (QTMovieWin::countSupportedTypes): (QTMovieWin::getSupportedType): (QTMovieWin::initializeQuickTime): (DllMain): * platform/graphics/win/QTMovieWin.h: Added. * platform/graphics/win/QTMovieWinTimer.cpp: Added. (TimerWindowWndProc): (initializeOffScreenTimerWindow): (setSharedTimerFiredFunction): (timerFired): (setSharedTimerFireDelay): (stopSharedTimer): (setSharedTimerInstanceHandle): (systemTime): * platform/graphics/win/QTMovieWinTimer.h: Added. * rendering/RenderMedia.cpp: (WebCore::MediaControlPlayButtonElement::update): 2007-12-21 Brent Fulgham Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16558 Cairo WebCore Rendering Fails on arc drawing Fix for bug reported (and patched) by Apollo team in which arcs were draw in reverse (resulting in inverted images). Review of the source found that the 'clockwise' term was actually meant to mean 'anticlockwise' so the IDL and supporting classes have been changed to match this. * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::arc): * html/CanvasRenderingContext2D.idl: * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::addArc): (WebCore::Path::addEllipse): * platform/graphics/Path.h: 2007-12-21 Alexey Proskuryakov Reviewed by Oliver. Incorrect display of Danish characters on web site. Test: http/tests/xmlhttprequest/response-encoding.html * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData): Default to UTF-8 for HTML, too. It's unfortunate that we have to use different rules for main content and XHR responses, but this matches both IE and Firefox. 2007-12-20 Jon Honeycutt Reviewed by Kevin Decker. REGRESSION(304-306A10) Safari does not find shockwave plugin on freshly installed OS Look for Director plugin in its native directory. * plugins/win/PluginDatabaseWin.cpp: (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin doesn't start with "np," so special case its filename. (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10" directories to the plugin paths. (WebCore::PluginDatabaseWin::defaultPluginPaths): 2007-12-20 Peter Kasting Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16508 Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly decoded transparent areas. * platform/image-decoders/gif/GIFImageDecoder.cpp: (WebCore::GIFImageDecoder::haveDecodedRow): * platform/image-decoders/gif/GIFImageDecoder.h: * platform/image-decoders/gif/GIFImageReader.cpp: (GIFImageReader::output_row): 2007-12-20 Justin Garcia Reviewed by Oliver Hunt. GoogleDocs: Safari hangs when creating a list from a particular selection Still need to fix similar issues with the other operations that iterate over selected paragraphs, like FormatBlock, Indent and Outdent (). * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME. * editing/IndentOutdentCommand.h: Removed an unused function. * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::modifyRange): Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection. Call the new selectionForParagraphIteration, which a) prevents operations like this one from being performed on a table that isn't fully selected (where the selection starts just before the table and ends inside it), and b) helps prevent paragraph iteration from going past the end of the selection. Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(), since when v is in the last paragraph of the last cell of a table, that expression will return the position after the table, not the start of the next paragraph. * editing/htmlediting.cpp: (WebCore::enclosingListChild): Don't go above a table cell, so that list operations take effect inside the table cell where they are performed. (WebCore::selectionForParagraphIteration): Added, see above. (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp. * editing/htmlediting.h: * editing/visible_units.cpp: (WebCore::startOfNextParagraph): Added, see above. * editing/visible_units.h: * editing/TextIterator.h: (WebCore::TextIterator::exitNode): Added a FIXME. 2007-12-20 Alp Toker Rubber-stamped by Maciej. http://bugs.webkit.org/show_bug.cgi?id=16542 [GTK] Text is missing with old Pango version Back out commits r28880, r28876, r28865, r28864 which added Pango font selection support. These changes caused a regression where no text was displayed with older Pango versions. * platform/graphics/gtk/FontCacheGtk.cpp: (WebCore::FontCache::fontExists): * platform/graphics/gtk/FontDataGtk.cpp: (WebCore::FontData::platformDestroy): (WebCore::FontData::containsCharacters): * platform/graphics/gtk/FontPlatformData.h: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::hash): * platform/graphics/gtk/FontPlatformDataGtk.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::init): (WebCore::FontPlatformData::~FontPlatformData): (WebCore::FontPlatformData::isFixedPitch): (WebCore::FontPlatformData::operator==): * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp: (WebCore::GlyphPage::fill): 2007-12-20 Timothy Hatcher Reviewed by Sam Weinig. Double-clicking on JavaScript console error won't show the line where it occurred Make the URLs clickable in the console, since double clicking is used for word text selection. Makes the word "line" localizable. Messages that don't have a URL will no longer print "undefined". Messages that have a line number less than or equal to 0 will no longer be printed. * English.lproj/InspectorLocalizedStrings.js: Add "%s (line %d)". * page/inspector/ConsolePanel.js: Tweak how the DOM nodes are created and change the click handler to look for a link with the "console-message-url" class name. * page/inspector/SourcePanel.js: Call setupSourceFrameIfNeeded() if a line row is needed. * page/inspector/inspector.css: Update the look of the URL in the console. 2007-12-20 Adam Barth Reviewed and landed by Sam Weinig. http://bugs.webkit.org/show_bug.cgi?id=15313 The same-origin check was incorrect in two cases (both fixed in this patch): A) If both the source and the target have set their document.domain to the same value, the protocol must also match in order for access to be allowed. Without this requirement, the browser is vulnerable to the following attack: 1) Suppose there is an HTTPS site (www.example.com) that sets document.domain = "example.com". 2) A network attacker redirects the browser to http://www.example.com/ a) injects script to set document.domain = "example.com", and b) opens a window to https://www.example.com/ 3) Now the network attacker can inject script into the HTTPS page, stealing cookies and issuing banking transactions. B) If only one of the source and target has set document.domain, then access should be denied. With this behavior, the browser is vulnerable to the following attack: 1) Suppose http://foo.example.com/ opens an iframe to http://foo.example.com/frame.html that a) sets document.domain = "example.com", and b) opens an iframe to http://bar.example.com/ This is a common usage of document.domain for cross-domain communication, see for example: http://www.collinjackson.com/research/papers/fp801-jackson.pdf 2) The inner-most iframe, which is from bar.example.com, sets document.domain = "example.com". 3) Now the inner-most iframe can inject script into the middle iframe (say via document.write). This bar.example.com script now has access to the outer-most frame (from foo.example.com). Both these changes cause WebKit to match the behavior of Firefox 2 and IE6 in these cases. This patch includes regression tests for both issues. Internet Explorer 7 and Opera 9 are more strict in that they require the port numbers to match when both pages have document.domain set. Opera 9 allows access when only one page has set document.domain, but this is a security vulnerability. Tests: http/tests/security/cross-frame-access-child-explicit-domain.html http/tests/security/cross-frame-access-parent-explicit-domain.html * bindings/js/kjs_window.cpp: (KJS::createWindow): (KJS::Window::allowsAccessFrom): * dom/Document.cpp: (WebCore::Document::domain): (WebCore::Document::setDomain): (WebCore::Document::initSecurityOrigin): * dom/Document.h: (WebCore::Document::securityOrigin): * loader/FrameLoader.cpp: (WebCore::FrameLoader::begin): (WebCore::FrameLoader::checkCallImplicitClose): (WebCore::FrameLoader::shouldAllowNavigation): * platform/SecurityOrigin.cpp: (WebCore::SecurityOrigin::setForURL): (WebCore::SecurityOrigin::createForFrame): (WebCore::SecurityOrigin::canAccess): * platform/SecurityOrigin.h: (WebCore::SecurityOrigin::domain): * storage/Database.cpp: (WebCore::Database::openDatabase): (WebCore::Database::Database): (WebCore::Database::securityOriginData): * storage/Database.h: (WebCore::Database::databaseDebugName): * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::canEstablishDatabase): * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::postflightAndCommit): (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): 2007-12-20 Rodney Dawes Reviewed by Darin Adler. Define XP_UNIX when building with plugins on X11. Use new npruntime_internal.h instead of npruntime.h. http://bugs.webkit.org/show_bug.cgi?id=15669 * ForwardingHeaders/bindings/npruntime_internal.h * WebCore.pro: * html/HTMLPlugInElement.h: 2007-12-19 johnnyding.webkit Reviewed by Alexey. Landed by Stephanie. - fix http://bugs.webkit.org/show_bug.cgi?id=16179 | Any attribute name start with a unicode which like #xx00(x could be any hex number[0-9a-f]) will cause HTMLTokenizer parse error Actually any unicode characters which great than 255 in attribute name will cause Webkit parse the attribute name wrong. So after comparing the same scenario in IE 6/7, FireFox 2/3, Opera, we should treat those characters as part of attribute name. * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseEntity): Handle Unicode Entity Name by using ASCII version of findEntity. (WebCore::HTMLTokenizer::parseTag): Let type of ptr match type of cBuffer. * html/HTMLTokenizer.h: Change type of cBuffer from char to UChar. 2007-12-20 Eric Seidel Reviewed by Nikolas Zimmermann. WebKit claims to support SVG feature strings it shouldn't http://bugs.webkit.org/show_bug.cgi?id=15480 * dom/DOMImplementation.cpp: (WebCore::isSVG10Feature): (WebCore::isSVG11Feature): 2007-12-20 John Sullivan Reviewed by Oliver and Geoff - fix Yellow highlight for find results is sometimes shorter than white "hole" behind it * rendering/RenderText.cpp: (WebCore::RenderText::addLineBoxRects): respect useSelectionHeight in all cases; we were only respecting it in one of the two cases 2007-12-20 Dan Bernstein Reviewed by Darin Adler. - fix REGRESSION(3.0.4-ToT): Acid2 test fails to render anything * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::maximumScroll): Changed back to return the maximum scroll offsets even if scrolling is not allowed, because navigation and scrollTo should still work. (WebCore::ScrollView::wheelEvent): Added early return if scrolling is not allowed. 2007-12-17 Tony Chang Reviewed by Darin. - Fix for http://bugs.webkit.org/show_bug.cgi?id=16479 text selection does not always begin at mouse down point Reset the m_dragSrc object on mouse down on all platforms. Test: fast/text/reset-drag-on-mouse-down.html * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::mouseDown): 2007-12-19 Geoffrey Garen Reviewed by Oliver Hunt. Build support: * ForwardingHeaders/kjs/SymbolTable.h: Added. * ForwardingHeaders/wtf/VectorTraits.h: Added. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::customGetOwnPropertySlot): Replaced use of getDirectLocation with getOwnPropertySlot. getDirectLocation is no longer valid, since global declarations are not stored in the property map. (WebCore::JSDOMWindow::customPut): Replaced use of JSObject::put with JSGlobalObject::put. JSObject::put is no longer valid, since global declarations are not stored in the property map. * bindings/js/kjs_window.cpp: Replaced JSObject:: calls with Base:: calls, since JSObject is not our base class. This was always a bug, but the bug is even more apparent after some of my changes. (KJS::Window::clear): Removed call to clearProperties because JSGlobalObject::reset takes care of that now. * history/CachedPage.cpp: * history/CachedPage.h: Added support for saving a symbol table and localStorage to the page cache, and restoring it. 2007-12-19 Dan Bernstein Reviewed by Darin Adler and Dave Hyatt. - Substitute the user's preferred standard font for an unknown primary font before falling back on the platform's last resort font Cannot be tested in DumpRenderTree because it sets the standard font to Times, which is also the hard-coded last resort font on Mac. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::getFontData): Changed the early bail out condition to allow getting generic font families from settings even if there are not @font-face rules. Fixed a typo that mapped fantasy to cursive. Added a mapping from -webkit-standard to the standard family. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): Changed to always create a font selector. (WebCore::CSSRuleSet::addRulesFromSheet): (WebCore::CSSStyleSelector::applyProperty): Changed to always use the font selector. * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::fontSelector): * platform/graphics/FontCache.cpp: (WebCore::FontCache::getFontData): Try the user's preferred standard font before the platform's last resort font. 2007-12-19 Sven Herzberg Reviewed by Alp Toker. Scaled font destruction takes place in FontData::platformDestroy(). No need to do it in FontPlatformData::~FontPlatformData(). Destroying platform data in platformDestroy() is a convention we borrow from the Mac and Win ports. * platform/graphics/gtk/FontPlatformDataGtk.cpp: 2007-12-19 Alice Liu build fix (Windows) Changed uint to unsigned int. uint caused Windows build breakage * page/Page.cpp: (WebCore::Page::markAllMatchesForText): * page/Page.h: 2007-12-19 Christian Dywan Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16222 [GTK] Implement inline search and highlighting of matching strings. Implement search and highlighting logic directly in WebCore. * page/Page.cpp: (WebCore::incrementFrame): (WebCore::Page::findString): (WebCore::Page::markAllMatchesForText): (WebCore::Page::unmarkAllTextMatches): * page/Page.h: 2007-12-19 Geoffrey Garen Reviewed by Sam Weinig, Dan Bernstein. Tiger build fix: restored some graphics code still needed on Tiger. * platform/graphics/GraphicsTypes.h: * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::setCompositeOperation): 2007-12-19 Alp Toker Build fix for Pango < 1.18.0 breakage introduced in r28864. Use Fc and the Pango backend API in these cases. * platform/graphics/gtk/FontPlatformDataGtk.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::~FontPlatformData): 2007-12-19 Alice Liu Reviewed by Darin. Fixed Safari crashed trying to get a motorcycle insurance quote on Geico.com WebCore::Document::inPageCache() Calling Node::willRemove on the focusedNode would immediately tell the document to remove the focused node, and trigger JS events. This means that the document is mutated while the engine is trying to tell all child nodes that it's about to removed. To avoid crashing, we need to hold off on mutating the document until node traversal is finished. * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChild): (WebCore::ContainerNode::removeChildren): * dom/Node.cpp: * dom/Node.h: (WebCore::Node::willRemove): * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): 2007-12-19 Andre Boule Reviewed by Dan Bernstein. Test: fast/canvas/canvas-composite.html Fix for: GraphicsContext::setCompositeOperation should use CGContextSetBlendMode This fix makes setCompositeOperation consistent across all platforms that use CG. The following compositing modes don't pass however that is covered by another bug: source-in source-out destination-in destination-atop copy Some canvas tag compositing modes don't render correctly * platform/graphics/GraphicsTypes.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setCompositeOperation): * platform/graphics/mac/GraphicsContextMac.mm: * platform/win/GraphicsContextWin.cpp: 2007-12-19 Dan Bernstein Reviewed by Dave Hyatt. - fix REGRESSION: major layout problems in svn r28754 WebKit on Vox.com page Test: fast/dynamic/subtree-boundary-percent-height.html * rendering/RenderObject.cpp: (WebCore::objectIsRelayoutBoundary): Do not allow overflows with percent heights because sometimes they compute to 'auto'. 2007-12-19 Sam Weinig Reviewed by Maciej. http://bugs.webkit.org/show_bug.cgi?id=16511 Speed up ClassNodeList and NamedNodeList by using the caching mechanism employed by ChildNodeList. - This give a ~2.15x speedup on the native test @ http://ejohn.org/apps/classname/ * dom/ChildNodeList.cpp: Use the caching NodeList constructor to turn on caching. (WebCore::ChildNodeList::ChildNodeList): * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): * dom/ClassNodeList.h: Move getElementsByName and getElementsByClassName to Node so they can use easily employ the caching already used by ChildNodeLists. In the case of getElementsByClassName, this reduces code duplication in Element as well * dom/Document.cpp: * dom/Document.h: Move getElementsByClassName to Node. * dom/Element.cpp: * dom/Element.h: * dom/NameNodeList.cpp: Use the caching NodeList constructor to turn on caching. (WebCore::NameNodeList::NameNodeList): (WebCore::NameNodeList::item): * dom/NameNodeList.h: Add maps of caches for ClassNodeLists and NameNodeList to NodeListsNodeData. * dom/Node.cpp: (WebCore::TagNodeList::TagNodeList): (WebCore::Node::Node): (WebCore::Node::~Node): (WebCore::Node::childNodes): (WebCore::Node::registerNodeList): (WebCore::Node::getElementsByName): (WebCore::Node::getElementsByClassName): * dom/Node.h: Make m_nodeLists an OwnPtr. Moved getElementsByName and getElementsByClassName here Allow subclasses to choose whether they want to receive the notifications using a new bit. * dom/NodeList.cpp: (WebCore::NodeList::NodeList): * dom/NodeList.h: (WebCore::NodeList::needsNotifications): 2007-12-19 Dave Hyatt Add support for GDI text rendering to WebKit. Reviewed by mitz * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * dom/Document.cpp: (WebCore::Document::recalcStyle): * page/Settings.cpp: (WebCore::Settings::setFontRenderingMode): (WebCore::Settings::fontRenderingMode): * page/Settings.h: * platform/graphics/Font.h: (WebCore::Font::renderingMode): * platform/graphics/FontCache.cpp: (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): (WebCore::FontPlatformDataCacheKey::operator==): (WebCore::computeHash): (WebCore::FontCache::getCachedFontPlatformData): * platform/graphics/FontDescription.h: (WebCore::): (WebCore::FontDescription::FontDescription): (WebCore::FontDescription::renderingMode): (WebCore::FontDescription::setRenderingMode): (WebCore::FontDescription::operator==): * platform/graphics/GraphicsContext.h: * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::fontExists): (WebCore::FontCache::createFontPlatformData): * platform/graphics/win/FontDataWin.cpp: (WebCore::FontData::platformInit): (WebCore::FontData::smallCapsFontData): (WebCore::FontData::containsCharacters): (WebCore::FontData::determinePitch): (WebCore::FontData::platformWidthForGlyph): * platform/graphics/win/FontPlatformData.h: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::useGDI): (WebCore::FontPlatformData::operator==): * platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData): * platform/graphics/win/FontWin.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/win/IconWin.cpp: (WebCore::Icon::paint): * platform/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext): (WebCore::GraphicsContext::releaseWindowsContext): * platform/win/UniscribeController.cpp: (WebCore::UniscribeController::shapeAndPlaceItem): * platform/win/UniscribeController.h: * plugins/win/PluginViewWin.cpp: (WebCore::PluginViewWin::paint): 2007-12-19 Sven Herzberg Reviewed by Alp Toker. Replace the fontconfig/freetype based font management with a pango based one. Fixes: http://bugs.webkit.org/show_bug.cgi?id=15229 * platform/gtk/FontDataGtk.cpp (FontData::platformDestroy()): updated the platform specific destroy code (FontData::containsCharacters()): implemented font coverage with pango * platform/gtk/FontPlatformData.h: replaced fontconfig specific members with pango-specific ones * platform/gtk/FontPlatformDataGtk.cpp: added static members for the FontPlatformData class (FontPlatformData::FontPlatformData()): implemented the font-matching with a PangoFontDescription instead of an FcPattern; initialize the scaled font by using the API for PangoCairoFont (FontPlatformData::init()): initialize the PangoFontMap and set up a hash table to translate the font family name into a font family (FontPlatformData::isFixedPitch()): implemented by querying the PangoFontFamily (FontPlatformData::operator==): compare the FontPlatformData by comparing the font pointers or the described fonts * platform/gtk/GlyphPageTreeNodeGtk.cpp (pango_font_get_glyph()): added a function to query a glyph from a PangoFont (GlyphPage::fill()): implemented the fill function with Pango instead of fontconfig/freetype 2007-12-19 Alp Toker Reviewed by Holger Freyther. Improve graphics operator approximations These changes match Cairo's own CG approximations. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::toCairoOperator): 2007-12-19 Alp Toker Reviewed by Holger Freyther. Check the bounding box before doing a full hit test * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::contains): 2007-12-18 Sam Weinig Reviewed by Geoff. Fix for REGRESSION: fast/events/event-view-toString fails on Leopard This fixes an issue where we were incorrectly setting the lastInPrototypeChain for the JSDOMWindow (the global object) before a call to setPrototype overwrote it. This fixes it by passing the prototype up the constructor chain so that it is set before any calls can be made. * bindings/js/kjs_window.cpp: (KJS::Window::Window): * bindings/js/kjs_window.h: * bindings/scripts/CodeGeneratorJS.pm: 2007-12-18 Beth Dakin Reviewed by Oliver. Fix for SVGs with width and height 100% fail to render when used as or CSS image (16167) This final part of the work fixes the tag. This is the real fix. * rendering/RenderImage.cpp: (WebCore::RenderImage::calcReplacedWidth): Set the container size on the image. Setting the container size only actually sticks if the values are non-zero, so if the container size really was set, use the imageSize that is calculated using the container size. If it did not stick but the image does have relative width (meaning that the container size is 0), set the width to 0 by hand. We want to avoid setting the width before we have a container size or we will end up incorrectly using the default size of 300x150. (WebCore::RenderImage::calcReplacedHeight): Same as above, but for height. A few more pieces of information have to be exposed through cached image to make this happen. * loader/CachedImage.cpp: (WebCore::CachedImage::usesImageContainerSize): As mentioned above, when setContainerSize() is called, the container size is only actually set if the values are non-zero. This call tells you if it was set. (WebCore::CachedImage::imageHasRelativeWidth): (WebCore::CachedImage::imageHasRelativeHeight): * loader/CachedImage.h: * platform/graphics/Image.h: (WebCore::Image::usesContainerSize): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::usesContainerSize): * svg/graphics/SVGImage.h: 2007-12-18 Mark Rowe Rubber-stamped by Maciej Stachowiak. Remove outdated and non-functioning project files for the Apollo port. * WebCore.apolloproj: Removed. 2007-12-18 Steve Falkenburg REGRESSION (304-306A9): Typing 'p' in popup menu for type-to-select brings up Safari Help Need to translate the char back into a key code for posting our WM_KEYDOWN. Reviewed by Ada. * platform/win/PopupMenuWin.cpp: (WebCore::PopupWndProc): 2007-12-18 Steve Falkenburg REGRESSION(r28764-r28765): GDI leak drawing text when no appropriate font is available Our captured metafile from Uniscribe may contain multiple calls to CreateFontIndirect. Only create a font with the last one. Reviewed by Mitz, Darin. * platform/graphics/win/FontCacheWin.cpp: (WebCore::metaFileEnumProc): (WebCore::FontCache::getFontDataForCharacters): 2007-12-17 Brent Fulgham Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=16464 Modify WebCore to use win32 thread primitives Updates to support native windows threading primitives rather than pthreads emulation library. * WebCore.vcproj/WebCore.vcproj: * config.h: * platform/Threading.h: * platform/win/MutexWin.cpp: Added. (WebCore::Mutex::Mutex): (WebCore::Mutex::~Mutex): (WebCore::Mutex::lock): (WebCore::Mutex::tryLock): (WebCore::Mutex::unlock): * platform/win/ThreadConditionWin.cpp: Added. (WebCore::ThreadCondition::ThreadCondition): (WebCore::ThreadCondition::~ThreadCondition): (WebCore::ThreadCondition::wait): (WebCore::ThreadCondition::signal): (WebCore::ThreadCondition::broadcast): * platform/win/ThreadingWin.cpp: (WebCore::threadMapMutex): (WebCore::threadMap): (WebCore::storeThreadHandleByIdentifier): (WebCore::identifierByThreadHandle): (WebCore::threadHandleForIdentifier): (WebCore::clearThreadHandleForIdentifier): (WebCore::createThread): (WebCore::waitForThreadCompletion): (WebCore::detachThread): (WebCore::currentThread): 2007-12-18 Rodney Dawes Reviewed by Darin Adler. Handle EINTR when set by select() and try the select() again http://bugs.webkit.org/show_bug.cgi?id=16071 * platform/network/curl/ResourceHandleManager.cpp: (ResourceHandleManager::downloadTimerCallback): 2007-12-18 Dan Bernstein Reviewed by Dave Hyatt. - avoid the simplified Chinese font linking code for characters that are not in any Windows code page * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::getFontDataForCharacters): 2007-12-18 Brady Eidson Reviewed by Adele REGRESSION: HTTP Auth protected favicon request results in a password sheet Some http-auth protected sites have the main resource(s) unprotected, but many subresources are protected by authentication. Occasionally one can view the main page of a site but the favicon is behind the iron curtain - in these cases, we should *not* prompt for a username and password solely for the favicon. * loader/ResourceLoader.h: Make didReceiveAuthenticationChallenge virtual * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveAuthenticationChallenge): Now that this method is virtual from ResourceLoader, SubresourceLoader can override. First call to the SubresourceLoaderClient. If they cancel the resource load, return early. Otherwise, let ResourceLoader work its magic (resulting in the auth sheet coming down) * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: (WebCore::SubresourceLoaderClient::didReceiveAuthenticationChallenge): * loader/icon/IconLoader.cpp: (WebCore::IconLoader::didReceiveAuthenticationChallenge): Cancel the resource load, since we should never prompt the user for credentials just for a favicon. * loader/icon/IconLoader.h: 2007-12-18 John Sullivan Reviewed by Brady - fixed Initial prompt shows "" for databases with no user-visible name * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::canEstablishDatabase): pass "name" instead of "displayName" if there's no displayName 2007-12-17 Dan Bernstein Reviewed by Maciej Stachowiak. - restore ButtonFace and ThreeDFace to their previous values for non-Mac platforms. The Mac port also uses the same values for now instead of NSColor-based ones. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::systemColor): 2007-12-17 Rodney Dawes Reviewed by Maciej Stachowiak. Define WTF_USE_NPOBJECT and WTF_USE_JAVASCRIPTCORE_BINDINGS for GTK+ Add required Frame::createScriptInstanceForWidget to FrameGtk * config.h: * page/gtk/FrameGtk.cpp (Frame::createScriptInstanceForWidget): 2007-12-17 Alice Liu Reviewed by Adam. Fixed window with no scrollbars can be scrolled * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::maximumScroll): corrected maximumScroll() to account for scrolling not allowed. (WebCore::ScrollView::wheelEvent): 2007-12-14 Juan A. Suarez Romero Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16042 [GTK] Eliminate webkit_init() Move webkit initialization to WebView class init. * WebCore.pro: 2007-12-17 Jon Honeycutt Reviewed by Darin. REGRESSION: Flash content doesn't display (www.adobe.com) We were passing NPEvent** instead of NPEvent* to NPP_HandleEvent. * plugins/win/PluginViewWin.cpp: (WebCore::PluginViewWin::dispatchNPEvent): Changed to take NPEvent&, not NPEvent* (WebCore::PluginViewWin::paint): Pass NPEvent, not NPEvent* (WebCore::PluginViewWin::handleKeyboardEvent): same (WebCore::PluginViewWin::handleMouseEvent): same * plugins/win/PluginViewWin.h: 2007-12-17 Alexey Proskuryakov Reviewed by Darin. Live to the promise of never making AppKit special character codes visible via DOM. Test: fast/events/arrow-keys-on-body.html * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Check for empty keypress characters after disambiguation, to let quirks-aware code strip special charactrers. * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): If not in keyboard event quirks mode, remove the text if it's a special character. 2007-12-17 Mark Rowe Reviewed by Darin Adler. Fix incorrect array size and incorrect array index in convertNSColorToColor. * rendering/RenderThemeMac.mm: (WebCore::convertNSColorToColor): 2007-12-17 Darin Adler Reviewed by Mark Rowe. - fix http://bugs.webkit.org/show_bug.cgi?id=16468 REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database because there's no guarantee it won't lose its last reference otherwise. 2007-12-17 Dan Bernstein Reviewed by Maciej Stachowiak. - fix Some Chinese characters in Text Encoding menu are bold, others are not and Chinese text looks worse on Safari for Windows cf. Safari for Mac * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::getFontDataForCharacters): To ensure that font linking gives consistent results for characters that are exclusive to the simplified Chinese code page and characters that belong to that code page and other code pages, always ask to map to simplified Chinese alone first. 2007-12-17 Christian Dywan Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16378 Implement Icon for Gtk Icon provides a GdkPixbuf containing a themed icon. The icon theme is probed for an icon name according to the Icon Naming Specification or conventional Gnome icon names respectively. See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html * platform/graphics/Icon.h: * platform/graphics/gtk/IconGtk.cpp: (WebCore::Icon::~Icon): (WebCore::lookupIconName): (WebCore::Icon::newIconForFile): (WebCore::Icon::paint): 2007-12-16 Sam Weinig Reviewed by Mitz. Fix for http://bugs.webkit.org/show_bug.cgi?id=16466 Move the JS Location object to its own file - Move Location into its own file and rename it JSLocation. * DerivedSources.make: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/JSDocumentCustom.cpp: * bindings/js/JSLocation.cpp: Copied from WebCore/bindings/js/kjs_window.cpp. (WebCore::): (WebCore::JSLocation::JSLocation): (WebCore::JSLocation::getValueProperty): (WebCore::JSLocation::getOwnPropertySlot): (WebCore::JSLocation::put): (WebCore::JSLocationProtoFuncReplace::callAsFunction): (WebCore::JSLocationProtoFuncReload::callAsFunction): (WebCore::JSLocationProtoFuncAssign::callAsFunction): (WebCore::JSLocationProtoFuncToString::callAsFunction): * bindings/js/JSLocation.h: Copied from WebCore/bindings/js/kjs_window.h. (WebCore::JSLocation::): (WebCore::JSLocation::frame): (WebCore::JSLocation::classInfo): * bindings/js/kjs_window.cpp: (KJS::Window::location): * bindings/js/kjs_window.h: * history/CachedPage.cpp: 2007-12-16 Dan Bernstein Reviewed by Sam Weinig. - make 'cursor: copy' and 'cursor: none' work. Already covered by manual-tests/cursor.html * rendering/RenderStyle.h: Increase the _cursor_style field to 6 bits, needed for the 33rd and 34th cursor values. 2007-12-16 Mark Rowe Reviewed by Maciej Stachowiak. Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation. * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: * loader/NetscapePlugInStreamLoader.h: * loader/mac/NetscapePlugInStreamLoaderMac.mm: Removed. * loader/mac/WebPlugInStreamLoaderDelegate.h: Moved to WebKit. 2007-12-16 Sam Weinig Reviewed by Maciej. Yet more of http://bugs.webkit.org/show_bug.cgi?id=16385 Cleanup kjs_window - Move ScheduledAction into its own file and put it in the WebCore namespace. * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/PausedTimeouts.cpp: * bindings/js/PausedTimeouts.h: * bindings/js/ScheduledAction.cpp: Copied from bindings/js/kjs_window.cpp. (WebCore::ScheduledAction::ScheduledAction): (WebCore::ScheduledAction::execute): * bindings/js/ScheduledAction.h: Copied from bindings/js/kjs_window.h. (WebCore::ScheduledAction::ScheduledAction): * bindings/js/kjs_window.cpp: (KJS::DOMWindowTimer::DOMWindowTimer): (KJS::DOMWindowTimer::action): (KJS::DOMWindowTimer::takeAction): (KJS::Window::installTimeout): (KJS::Window::timerFired): * bindings/js/kjs_window.h: 2007-12-16 Alp Toker Reviewed by Maciej. http://bugs.webkit.org/show_bug.cgi?id=16356 [GTK] Integrate GStreamer video with the graphics backend Integrate the GStreamer media backend with the Cairo graphics backend. There are still some issues: Data is copied more often than necessary, and repaint() is not called, causing transformed video not to update sometimes. * WebCore.pro: * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::currentTime): (WebCore::MediaPlayerPrivate::setEndTime): (WebCore::MediaPlayerPrivate::seeking): (WebCore::MediaPlayerPrivate::naturalSize): (WebCore::MediaPlayerPrivate::setMuted): (WebCore::MediaPlayerPrivate::setRect): (WebCore::MediaPlayerPrivate::setVisible): (WebCore::MediaPlayerPrivate::repaint): (WebCore::MediaPlayerPrivate::paint): (WebCore::MediaPlayerPrivate::createGSTPlayBin): * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: * platform/graphics/gtk/VideoSinkGStreamer.cpp: Added. (webkit_video_sink_base_init): (webkit_video_sink_init): (webkit_video_sink_idle_func): (webkit_video_sink_render): (webkit_video_sink_set_caps): (webkit_video_sink_dispose): (webkit_video_sink_finalize): (webkit_video_sink_set_property): (webkit_video_sink_get_property): (webkit_video_sink_stop): (webkit_video_sink_class_init): (webkit_video_sink_new): (webkit_video_sink_set_surface): (plugin_init): * platform/graphics/gtk/VideoSinkGStreamer.h: Added. 2007-12-16 Mark Rowe Mac build fix. * WebCore.xcodeproj/project.pbxproj: Remove NetscapePlugInStreamLoader.cpp from the WebCore target. Mac currently has its own implementation in NetscapePlugInStreamLoaderMac.mm which conflicts with the new shared implementation. 2007-12-16 Rodney Dawes Reviewed by Maciej Stachowiak. http://bugs.webkit.org/show_bug.cgi?id=16389 Bug 16389: Common Implementation of NetscapePlugInStreamLoader * WebCore.vcproj/WebCore.vcproj: Remove NetscapePlugInStreamLoaderWin.cpp. * loader/NetscapePlugInStreamLoader.cpp: Copy method implementations from NetscapePlugInStreamLoaderWin.cpp. * loader/win/NetscapePlugInStreamLoaderWin.cpp: Removed. 2007-12-16 Grace Kloba Reviewed by Darin Adler. Fix http://bugs.webkit.org/show_bug.cgi?id=16433. Bug 16433: LOW_BANDWIDTH_DISPLAY build is broken * dom/Document.cpp: (WebCore::Document::Document): * loader/FrameLoader.cpp: (WebCore::FrameLoader::addLowBandwidthDisplayRequest): (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): 2007-12-16 Darin Adler Reviewed by Maciej. - fix First form of SQLTransaction.executeSql() fails with TYPE_ERROR dom exception Test: storage/execute-sql-args.html * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): Added exception handling code so that once an exception happens, we won't try to do any more argument processing. Changed processing of the second argument so that we allow an undefined value or null, and simply omit the array. Changed processing of the second argument so that we don't require an actual JavaScript array. Instead, as with the JavaScript array operations themselves, we use the length property and corresponding numeric properties of the object, allowing other objects to act as arrays. Changed processing of the third and fourth arguments to allow the undefined value as well as null; we check the value of the argument rather than looking at the size of the passed-in arguments list. 2007-12-16 Sam Weinig Reviewed by Darin. More of http://bugs.webkit.org/show_bug.cgi?id=16385 Cleanup kjs_window - Move PausedTimeouts into its own file and put it in the WebCore namespace. * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * bindings/js/PausedTimeouts.cpp: Copied from bindings/js/kjs_window.cpp. * bindings/js/PausedTimeouts.h: Copied from bindings/js/kjs_window.h. * bindings/js/kjs_window.cpp: (KJS::Window::pauseTimeouts): * bindings/js/kjs_window.h: * history/CachedPage.cpp: * history/CachedPage.h: * page/Chrome.cpp: 2007-12-16 Beth Dakin Reviewed by Geoff. Make relative-size SVGs work in border-image. * rendering/RenderBox.cpp: (WebCore::RenderBox::calculateBackgroundSize): * rendering/RenderObject.cpp: (WebCore::RenderObject::paintBorderImage): 2007-12-16 Darin Adler - fix Tiger build (my fault it was broken) * rendering/RenderThemeMac.mm: Define NSUInteger if on Tiger. 2007-12-16 Andrew Wellington Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=6129 Incomplete implementation of CSS 2.1 system colors Test: fast/css/css2-system-color.html Based on original patch by Rob Buis. System colors are retrieved from NSColor as appropriate. If the color is a pattern color (and therefore NSColor won't let us retrieve a color from it) we draw a 1x1 image of the color and sample that to get a solid color. * css/CSSStyleSelector.cpp: (WebCore::): (WebCore::colorForCSSValue): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::systemColor): * rendering/RenderTheme.h: * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::getSystemColor): (WebCore::RenderThemeMac::platformColorsDidChange): (WebCore::RenderThemeMac::systemColor): 2007-12-16 Dan Bernstein Reviewed by Darin Adler. - fix http://bugs.webkit.org/show_bug.cgi?id=16426 Divs with overflow:auto: scrollbars not correctly updated when contents change Test: fast/overflow/scrollbar-position-update.html * platform/mac/PlatformScrollBarMac.mm: (WebCore::PlatformScrollbar::updateThumbProportion): Update the NSScroller's value for the new proportions. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed unnecessary repaint(). Scrollbars repaint themselves as needed. 2007-12-16 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=14140 REGRESSION: Complex system KeyBindings don't work properly * dom/KeyboardEvent.h: (WebCore::KeypressCommand::KeypressCommand): (WebCore::KeyboardEvent::keypressCommands): Change stored command class to preserve complete information about commands. * editing/EditorCommand.cpp: (WebCore::CommandEntry::): Mark InsertText as a text insertion command, which it is. Previously, we couldn't do it because WebKit didn't really treat insertText: as a command. * page/EventHandler.cpp: (WebCore::EventHandler::keyEvent): Copy commands saved while interpreting a keydown event into keypress, to avoid losing state when running interpretKeyEvents: again. 2007-12-16 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=16462 REGRESSION: access keys broken on Windows * page/EventHandler.cpp: (WebCore::EventHandler::handleAccessKey): (WebCore::EventHandler::keyEvent): * page/EventHandler.h: Make handleAccessKey a class method; rely on WebKit to call it on Windows and wxWidgets. 2007-12-16 Xan Lopez Reviewed by Alexey Proskuryakov. http://bugs.webkit.org/show_bug.cgi?id=16454 [GTK] Text input doesn't work consistently on PPC * platform/gtk/KeyEventGtk.cpp: (WebCore::singleCharacterString): UChar is 2 bytes (UTF-16), so transform accordingly from gunichar (UCS-4). Fixes keyboard input on big endian systems. 2007-12-15 Darin Adler Reviewed by Mark Rowe. - better build fix for the problem affecting GTK and some other platforms "this time for sure" * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventTargetBase.cpp: Move the include of the .lut.h file here. * bindings/js/JSEventTargetBase.h: Instead of including the .lut.h file in the header, which won't work, declare the tables that are in the .lut.h file in the header. 2007-12-12 Kevin Watters Reviewed by Darin Adler. Fixed the Wx port's FontPlatformData for use in HashTable. - FontPlatformData(Deleted) made unequal to FontPlatformData() * platform/graphics/wx/FontPlatformData 2007-12-15 Dan Bernstein Reviewed by Darin Adler. - fix Text in Georgia, Armenian, Inuktitut, Cree, or Cherokee (KA, HY, IU, CR, CHR) draws as all missing glyphs * platform/graphics/win/FontCacheWin.cpp: (WebCore::metaFileEnumProc): Added. Called during metafile record enumeration and extracts the font from the create font record. (WebCore::FontCache::getFontDataForCharacters): If font linking fails, let Uniscribe draw the characters and see what font it chooses. 2007-12-15 Darin Adler * WebCore.pro: Roll my last change out. Was wrong and didn't fix the build. 2007-12-15 Darin Adler Another try at a GTK build fix. * WebCore.pro: Add JSEventTargetBase.cpp to LUT_TABLE_FILES instead of LUT_FILES. 2007-12-15 Sam Weinig Force windows to regenerate COM DOM bindings. * WebCore.vcproj/build-generated-files.sh: Add license. * bindings/scripts/CodeGeneratorCOM.pm: Use shared WK_ucfirst. 2007-12-15 Sam Weinig Fix Windows and wx builds. * WebCore.vcproj/WebCore.vcproj: * WebCoreSources.bkl: 2007-12-15 Mark Rowe Gtk build fix. Add JSEventTargetBase.cpp to SOURCES. * WebCore.pro: 2007-12-15 Sam Weinig Fix wx build. * WebCoreSources.bkl: 2007-12-15 Nikolas Zimmermann Not reviewed. Build fix for Qt/Gtk. * WebCore.pro: Include JSEventTargetBase.lut.h in generation 2007-12-15 Nikolas Zimmermann Reviewed by Eric. Fixes: http://bugs.webkit.org/show_bug.cgi?id=16445 (Refactor EventTargetNode & JSEventTargetNode for an upcoming SVG patch) Split up JSEventTargetNode in JSEventTargetNode & JSEventTargetBase - where most functionality has been moved down in the base class. Applied the same refactorization to EventTargetNode. This makes it possible for the upcoming patch implementing the EventTarget interface for SVGElementInstance to share as much code as possible with the EventTargetNode classes. * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventTargetBase.cpp: Added. (WebCore::retrieveEventTargetAndCorrespondingNode): (WebCore::eventNameForPropertyToken): * bindings/js/JSEventTargetBase.h: Added. (WebCore::JSEventTargetProperties::): (WebCore::JSEventTargetPrototypeFunctionBase::JSEventTargetPrototypeFunctionBase): (WebCore::JSEventTargetPrototypeFunction::JSEventTargetPrototypeFunction): (WebCore::): (WebCore::::create): (WebCore::JSEventTargetBase::JSEventTargetBase): (WebCore::JSEventTargetBase::getValueProperty): (WebCore::JSEventTargetBase::putValueProperty): (WebCore::JSEventTargetBase::getOwnPropertySlot): (WebCore::JSEventTargetBase::put): (WebCore::JSEventTargetPrototype::JSEventTargetPrototype): (WebCore::JSEventTargetPrototype::self): (WebCore::JSEventTargetPrototype::getOwnPropertySlot): (WebCore::JSEventTargetPrototype::classInfo): * bindings/js/JSEventTargetNode.cpp: (WebCore::JSEventTargetNode::getOwnPropertySlot): (WebCore::JSEventTargetNode::getValueProperty): (WebCore::JSEventTargetNode::put): (WebCore::JSEventTargetNode::putValueProperty): (WebCore::JSEventTargetNode::setListener): (WebCore::toEventTargetNode): * bindings/js/JSEventTargetNode.h: (WebCore::JSEventTargetPrototypeInformation::prototypeClassName): (WebCore::JSEventTargetPrototypeInformation::prototypeIdentifier): * dom/EventTarget.cpp: (WebCore::EventTarget::addEventListener): (WebCore::EventTarget::removeEventListener): (WebCore::EventTarget::dispatchGenericEvent): (WebCore::EventTarget::removeAllEventListeners): (WebCore::EventTarget::insertedIntoDocument): (WebCore::EventTarget::removedFromDocument): (WebCore::EventTarget::handleLocalEvents): (WebCore::EventTarget::applySVGEventTargetRules): (WebCore::forbidEventDispatch): (WebCore::allowEventDispatch): (WebCore::eventDispatchForbidden): * dom/EventTarget.h: (WebCore::EventTarget::preDispatchEventHandler): (WebCore::EventTarget::postDispatchEventHandler): (WebCore::forbidEventDispatch): (WebCore::allowEventDispatch): * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::~EventTargetNode): (WebCore::EventTargetNode::insertedIntoDocument): (WebCore::EventTargetNode::removedFromDocument): (WebCore::EventTargetNode::addEventListener): (WebCore::EventTargetNode::removeEventListener): (WebCore::EventTargetNode::removeAllEventListeners): (WebCore::EventTargetNode::handleLocalEvents): (WebCore::EventTargetNode::dispatchEvent): (WebCore::EventTargetNode::dispatchWindowEvent): * dom/EventTargetNode.h: (WebCore::EventTargetNode::localEventListeners): * svg/SVGElement.cpp: (WebCore::SVGElement::sendSVGLoadEventIfPossible): (WebCore::SVGElement::dispatchEvent): 2007-12-15 Eric Seidel Reviewed by Oliver. Width of SVG elements not applied to container elements http://bugs.webkit.org/show_bug.cgi?id=16305 Added calcPrefWidths for RenderSVGRoot (copied from RenderReplaced) This is caused by poor factoring in the render tree. RenderContainer probably should be a template. svg/css/css-box-min-width.html * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::calcPrefWidths): Added. * rendering/RenderSVGRoot.h: * css/SVGCSSStyleSelector::applySVGProperty: fixed ASSERT in debug builds 2007-12-15 David Kilzer Fix comment after isSafeScript() was renamed to allowsAccessFrom(). * bindings/js/kjs_window.cpp: (KJS::createWindow): 2007-12-15 Alp Toker Reviewed by Mark Rowe. http://bugs.webkit.org/show_bug.cgi?id=16449 cairo_arc() functions hang or crash when passed inf as radius or start/end angle Add checks. This matches a similar workaround for a CG bug in the CG graphics backend: Fixes: fast/canvas/arc-crash.html fast/canvas/canvas-with-incorrect-args.html * platform/graphics/cairo/PathCairo.cpp: (WebCore::Path::addArc): 2007-12-15 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=16078 Google Maps zooming via the scroll wheel (almost) always zooms IN only. * dom/WheelEvent.cpp: (WebCore::WheelEvent::WheelEvent): Ensure that delta is never rounded down to zero - we are getting values less than 1 from many mice on OS X, and Google Maps code assumes scrolling up if event.wheelDelta is zero. 2007-12-14 Dan Bernstein - Windows build fix * WebCore.vcproj/WebCore.vcproj: 2007-12-14 Alp Toker GTK+/Qt build fix. Track added files in r28722. * WebCore.pro: 2007-12-14 Sam Weinig Reviewed by Geoff. Speed up getElementByClassName. - This makes getElementByClassName 33% faster on the stress test linked to at http://bugs.webkit.org/show_bug.cgi?id=15760. * platform/text/StringImpl.cpp: (WebCore::StringImpl::foldCase): Optimize the case when all the characters are ASCII. 2007-12-14 Alp Toker Reviewed by Maciej. http://bugs.webkit.org/show_bug.cgi?id=16432 [GTK] Update license headers Consent has been given by the authors of these files to change license to the LGPL as outlined in the bug report. * platform/gtk/ClipboardGtk.cpp: * platform/gtk/ContextMenuGtk.cpp: * platform/gtk/ContextMenuItemGtk.cpp: * platform/gtk/CookieJarGtk.cpp: * platform/gtk/CursorGtk.cpp: * platform/gtk/DragDataGtk.cpp: * platform/gtk/DragImageGtk.cpp: * platform/gtk/PasteboardGtk.cpp: * platform/gtk/PlatformScreenGtk.cpp: * platform/gtk/PlatformScrollBarGtk.cpp: * platform/gtk/SearchPopupMenuGtk.cpp: * platform/gtk/WidgetGtk.cpp: 2007-12-14 Darin Adler Reviewed by Adele. - fix http://bugs.webkit.org/show_bug.cgi?id=16442 navigation policy delegate gets called twice for each load * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::willSendRequest): Removed call to checkNavigationPolicy. That's handled by FrameLoader. * loader/MainResourceLoader.h: Removed callContinueAfterNavigationPolicy and continueAfterNavigationPolicy. 2007-12-14 Anders Carlsson Reviewed by Brady. Make document.open count as committing a document load, so that -[WebFrame dataSource:] won't return nil in that case. * loader/FrameLoader.cpp: (WebCore::FrameLoader::didExplicitOpen): 2007-12-14 David Smith Reviewed by Mitz. - fix http://bugs.webkit.org/show_bug.cgi?id=14955 Implement getElementsByClassName. This patch also renames AtomicStringList to ClassNames to better reflect its actual use, and takes advantage of admitting that it's class-specific to encapsulate class attribute parsing so it can be shared. It also changes the class to use a Vector, rather than a linked list to store the class names. Tests: fast/dom/getElementsByClassName/001.html fast/dom/getElementsByClassName/002.html fast/dom/getElementsByClassName/003.html fast/dom/getElementsByClassName/004.html fast/dom/getElementsByClassName/005.html fast/dom/getElementsByClassName/006.html fast/dom/getElementsByClassName/007.html fast/dom/getElementsByClassName/008.html fast/dom/getElementsByClassName/009.html fast/dom/getElementsByClassName/010.xml fast/dom/getElementsByClassName/011.xml fast/dom/getElementsByClassName/012.html fast/dom/getElementsByClassName/013.html fast/dom/getElementsByClassName/014.html fast/dom/getElementsByClassName/array/001.html fast/dom/getElementsByClassName/array/002.html fast/dom/getElementsByClassName/array/003.html fast/dom/getElementsByClassName/array/004.html fast/dom/getElementsByClassName/dumpNodeList.html * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::checkOneSelector): * dom/AtomicStringList.h: Removed. * dom/ClassNames.cpp: Added. (WebCore::ClassNames::contains): (WebCore::ClassNames::parseClassAttribute): * dom/ClassNames.h: Copied from WebCore/dom/AtomicStringList.h. (WebCore::ClassNames::ClassNames): (WebCore::ClassNames::size): (WebCore::ClassNames::clear): (WebCore::ClassNames::operator[]): (WebCore::isClassWhitespace): * dom/ClassNodeList.cpp: Added. (WebCore::ClassNodeList::ClassNodeList): (WebCore::ClassNodeList::length): (WebCore::ClassNodeList::item): (WebCore::ClassNodeList::nodeMatches): * dom/ClassNodeList.h: Added. * dom/Document.cpp: (WebCore::Document::getElementsByName): (WebCore::Document::getElementsByClassName): * dom/Document.h: * dom/Document.idl: * dom/Element.cpp: (WebCore::Element::getClassNames): (WebCore::Element::getElementsByClassName): * dom/Element.h: * dom/Element.idl: * dom/NameNodeList.cpp: (WebCore::NameNodeList::NameNodeList): (WebCore::NameNodeList::item): (WebCore::NameNodeList::nodeMatches): * dom/NameNodeList.h: * dom/NamedMappedAttrMap.cpp: (WebCore::NamedMappedAttrMap::clearAttributes): (WebCore::NamedMappedAttrMap::parseClassAttribute): * dom/NamedMappedAttrMap.h: (WebCore::NamedMappedAttrMap::getClassNames): * dom/StyledElement.cpp: (WebCore::StyledElement::getClassNames): * dom/StyledElement.h: 2007-12-14 Darin Adler Reviewed by Sam. - fix http://bugs.webkit.org/show_bug.cgi?id=16351 FontFallbackList.h doesn't include wtf/PassRefPtr.h * platform/graphics/FontFallbackList.h: Added include of * platform/graphics/GlyphPageTreeNode.h: Removed an unneeded include. 2007-12-14 Darin Adler Reviewed by Alexey. - http://bugs.webkit.org/show_bug.cgi?id=16420 change regression tests to use document.execCommand instead of textInputController.doCommand Add a few more operations to document.execCommand. Finished up the transition to the new Editor::Command, including removing the Editor::execCommand function. * WebCore.base.exp: Added Editor::Command::isSupported. * editing/Editor.h: Removed execCommand. * editing/EditorCommand.cpp: (WebCore::expandSelectionToGranularity): Added. (WebCore::verticalScrollDistance): Added; replaces canScroll. (WebCore::executeDeleteBackward): Added. Moved code here from WebHTMLView. (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): Ditto. (WebCore::executeDeleteForward): Ditto. (WebCore::executeDeleteToBeginningOfLine): Ditto. (WebCore::executeDeleteToBeginningOfParagraph): Ditto. (WebCore::executeDeleteToEndOfLine): Ditto. (WebCore::executeDeleteToEndOfParagraph): Ditto. (WebCore::executeMovePageDown): Renamed this command to be consistent with all the other Move commands. They all modify the caret. Reimplemented to match the Mac OS X version by removing the explicit scrolling, and letting it be done automatically by code that makes the caret visible. In some cases the old code would scroll twice which was harmless but unnecessary. (WebCore::executeMovePageDownAndModifySelection): Added. Moved code here from WebHTMLView. (WebCore::executeMovePageUp): See MovePageDown above. (WebCore::executeMovePageUpAndModifySelection): Added. Moved code here from WebHTMLView. (WebCore::executeSelectLine): Ditto. (WebCore::executeSelectParagraph): Ditto. (WebCore::executeSelectSentence): Ditto. (WebCore::executeSelectWord): Ditto. (WebCore::executeSwapWithMark): Some small tweaks. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): Changed to use Editor::command() instead of Editor::execCommand(). This code could be changed to use Editor::Command quite a bit more, but I didn't do that this time. - Removed some obsolete unused code. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::passMouseDownEventToWidget): Removed the special case code for NSTextView. This was left over from when we used NSTextField and NSTextView for form elements and is no longer used at all. * page/mac/WebCoreFrameBridge.h: Removed 20 unused methods that were still on one side of the bridge or another. We really need to find a time to tear down the rest of the bridge, but that's not this patch. * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge addData:]): Changed to get at the _shouldCreateRenderers field directly instead of using a method. (-[WebCoreFrameBridge rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]): Took out obsolete comment about matching enums (we use a single enum now and have for some time). (-[WebCoreFrameBridge selectionGranularity]): Ditto. 2007-12-14 Justin Garcia Reviewed by Darin Adler. GoogleDocs: Hang in SplitElementCommand::doApply when outdenting a list item in a particular list * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::splitTreeToNode): Moved here. * editing/CompositeEditCommand.h: * editing/IndentOutdentCommand.cpp: Moved splitTreeToNode. * editing/IndentOutdentCommand.h: Ditto, and removed unimplemented splitTreeTo. * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): Split ancestors of listChildNode between it and listNode, if they exists, so that moving listChildNode doesn't put it out of order. Added a test case to cover each change. * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::doApply): Added an ASSERT to catch code that tries to split a container at a bogus child, and an early return to avoid a hang in that case. 2007-12-14 Anders Carlsson Reviewed by Darin and Geoff. REGRESSION: 303-304: Embedded YouTube video fails to render- JS errors (16150) (Flash 9) _NPN_CreateScriptObject doesn't take an origin root object anymore. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::createNPObject): * page/Frame.cpp: (WebCore::Frame::windowScriptNPObject): 2007-12-14 Dan Bernstein Reviewed by Darin Adler. - fix text-shadow and box-shadow offsets 1px smaller than specified which is the root cause of: http://bugs.webkit.org/show_bug.cgi?id=12943 box-shadow: small values don't affect shadow position http://bugs.webkit.org/show_bug.cgi?id=14736 Safari implementation of text-shadow off by 1px * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setShadow): Slightly increase the magnitude of the offsets passed to CGContextSetShadow* to ensure that the end result after truncation is the desired integer offsets. 2007-12-13 Alp Toker curl backend build fix for breakage introduced in r28709. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): 2007-12-13 Justin Garcia Reviewed by Oliver Hunt. In Mail, a crash occurs at WebCore::AppendNodeCommand() after dragging image into a
element * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::shouldUseBreakElement): Equip this function to handle editing positions, like [input, 0]; * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): Pass enclosingBlock a node peeled off of a non-editing position, to fix a bug where the enclosing block of [input, 0] was the input element itself. Insert a
when a element is the enclosing block instead of splitting/cloning or nesting a
. 2007-12-13 Alp Toker Reviewed by Oliver Hunt. http://bugs.webkit.org/show_bug.cgi?id=16365 [cURL] Acid2 test segmentation fault This patch makes the Acid2 test pass. Defer the cleanup of cancelled jobs and halt further transfer as early as possible. Bug found by and initial patch provided by Luca Bruno. * platform/network/curl/ResourceHandleManager.cpp: (WebCore::writeCallback): (WebCore::headerCallback): (WebCore::ResourceHandleManager::downloadTimerCallback): (WebCore::ResourceHandleManager::cancel): 2007-12-13 Sam Weinig Reviewed by Mark Rowe. Fix typos and rename InspectorController::moveByUnrestricted to InspectorController::moveWindowBy. * page/InspectorController.cpp: (WebCore::moveByUnrestricted): (WebCore::InspectorController::windowScriptObjectAvailable): (WebCore::InspectorController::moveWindowBy): * page/InspectorController.h: * page/inspector/inspector.js: 2007-12-13 Dan Bernstein Reviewed by Dave Hyatt. - fix explicit cubic-bezier curves all treated as "default" for transition-timing-function Test: fast/css/transition-timing-function.html * css/CSSStyleSelector.cpp: Changed the HANDLE_MULTILAYER_VALUE macro to not reject non-primitive non-list values, and instead made sure that the mapping functions rejected them if necessary. This allows non-primitive timing functions to be mapped. (WebCore::CSSStyleSelector::mapBackgroundAttachment): (WebCore::CSSStyleSelector::mapBackgroundClip): (WebCore::CSSStyleSelector::mapBackgroundComposite): (WebCore::CSSStyleSelector::mapBackgroundOrigin): (WebCore::CSSStyleSelector::mapBackgroundImage): (WebCore::CSSStyleSelector::mapBackgroundRepeat): (WebCore::CSSStyleSelector::mapBackgroundXPosition): (WebCore::CSSStyleSelector::mapBackgroundYPosition): (WebCore::CSSStyleSelector::mapTransitionDuration): (WebCore::CSSStyleSelector::mapTransitionRepeatCount): (WebCore::CSSStyleSelector::mapTransitionTimingFunction): (WebCore::CSSStyleSelector::mapTransitionProperty): * css/CSSTimingFunctionValue.cpp: (WebCore::CSSTimingFunctionValue::cssText): Implemented for use in the regression test. * css/CSSTimingFunctionValue.h: (WebCore::CSSTimingFunctionValue::isTransitionTimingFunctionValue): Added. Returns true. * css/CSSValue.h: (WebCore::CSSValue::isTransitionTimingFunctionValue): Added. Returns false. 2007-12-13 Steve Falkenburg Move source file generation into its own vcproj to fix build dependencies. Reviewed by Adam. * WebCore.vcproj/WebCore.make: * WebCore.vcproj/WebCore.sln: * WebCore.vcproj/WebCore.submit.sln: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreGenerated.vcproj: Added. 2007-12-13 Justin Garcia Reviewed by Oliver Hunt. Undoing a color change of text in a compose window always changes it back to black Some of the operations performed in removeHTMLFontStyle were non-undoable. I'm having trouble writing a layout test for this because I can't get DRT to perform editing operations in separate Undo steps without adding unacceptably long wait times between operations. I filed: Can't get DRT to perform editing operations in separate Undo steps * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeHTMLFontStyle): 2007-12-13 Sam Weinig Reviewed by Anders. Fix for http://bugs.webkit.org/show_bug.cgi?id=16352 Toolbar dragged inspector cannot be moved beyond screen edges * page/InspectorController.cpp: (WebCore::moveByUnrestricted): (WebCore::InspectorController::windowScriptObjectAvailable): (WebCore::InspectorController::moveByUnrestricted): * page/InspectorController.h: * page/inspector/inspector.js: 2007-12-13 Adam Roben Fix Crash on wptv.wp.pl when "make bigger" button is clicked Windows Media Player has a modal message loop that will deliver messages to us at inappropriate times and we will crash if we handle them when they are delivered. In PluginViewWin, we add a quirk for Media Player to set a flag whenever we give the plugin a chance to execute code, and in SharedTimerWin we check if the plugin is executing code and repost messages if so. Reviewed by Anders. * platform/win/SharedTimerWin.cpp: (WebCore::TimerWindowWndProc): Repost messages if we're calling a plugin. * plugins/win/PluginViewWin.cpp: Surround all calls to the plugin with setCallingPlugin(true/false). (WebCore::PluginViewWin::updateWindow): (WebCore::PluginViewWin::dispatchNPEvent): (WebCore::PluginViewWin::setNPWindowRect): (WebCore::PluginViewWin::start): (WebCore::PluginViewWin::stop): (WebCore::PluginViewWin::performRequest): (WebCore::PluginViewWin::bindingInstance): (WebCore::PluginViewWin::determineQuirks): (WebCore::PluginViewWin::setCallingPlugin): Added. (WebCore::PluginViewWin::isCallingPlugin): Added. * plugins/win/PluginViewWin.h: Added a new quirk. 2007-12-13 Alp Toker Add a missing DEPENDPATH. Fixes non-clean builds following networking header changes. * WebCore.pro: 2007-12-13 Dan Bernstein Reviewed by Anders Carlsson. - fix regression in fast/text/international/bidi-override on Tiger * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): Add bidi overrides here too. I forgot to add them when I added them to treatAsZeroWidthSpace in an earlier patch. 2007-12-13 Justin Garcia Reviewed by Darin Adler. GMail Editor: Copied link doesn't paste as a link, just colored text The code that checks the selected Range to see if it's inside an anchor checks ancestors of the Range's commonAncestor() but not the commonAncestor() itself, and so we'd fail to add markup for the enclosing anchor to the pasteboard. Some enclosing element getters check the node passed to the getter and some don't. There were a few places where we incorrectly assumed that enclosing element getters check the node passed to the getter, but this is the only case that I'm able to write a test case for at the moment. In this patch I've: Changed enclosingNodeWithType and enclosingNodeWithTag to take in positions, like the newer enclosing element getters. This is important because we must soon add code to the getters so that they understand that some editing positions inside nodes don't actually refer to positions inside those nodes but positions before and after them. Like [table, 0]. Changed enclosingNodeWithType and enclosingNodeWithTag to check nodes starting with n where [n, o] is the position passed to the getter, instead of starting the the parent of n. This makes all but a few of the enclosing element getters behave consistently. Changed enclosingNodeWithType and enclosingNodeWithTag to not return non-editable nodes if the input position was editable. This fixes a bug that that the above change exposed. Changed enclosingTableCell to simply call enclosingNodeWithType. We should do this for the rest of the getters, or simply remove them in favor of enclosingNodeWithType unless doing so would affect readability, like it would in the case of enclosingTableCell. Ditto for enclosingBlock. * editing/AppendNodeCommand.cpp: (WebCore::AppendNodeCommand::doApply): * editing/DeleteButtonController.cpp: (WebCore::enclosingDeletableElement): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::initializePositionData): (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor): * editing/Editor.cpp: (WebCore::Editor::selectionUnorderedListState): (WebCore::Editor::selectionOrderedListState): * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion): (WebCore::IndentOutdentCommand::outdentParagraph): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::shouldMerge): (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): * editing/TextIterator.cpp: * editing/htmlediting.cpp: (WebCore::enclosingBlock): (WebCore::enclosingNodeWithTag): (WebCore::enclosingNodeOfType): (WebCore::enclosingTableCell): (WebCore::isTableCell): * editing/htmlediting.h: * editing/markup.cpp: (WebCore::appendStartMarkup): (WebCore::createMarkup): 2007-12-13 Alexey Proskuryakov Reviewed by Darin. Turn on keyboard event processing quirks for feed views and old applications on Mac OS X. * WebCore.base.exp: * dom/KeyboardEvent.cpp: (WebCore::KeyboardEvent::charCode): * page/EventHandler.cpp: (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks): (WebCore::EventHandler::keyEvent): * page/EventHandler.h: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setNeedsKeyboardEventDisambiguationQuirks): * page/Settings.h: (WebCore::Settings::needsKeyboardEventDisambiguationQuirks): * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks): * platform/PlatformKeyboardEvent.h: * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): 2007-12-13 Dan Bernstein - build fix * platform/network/cf/ResourceErrorCF.cpp: 2007-12-13 Antti Koivisto Reviewed by Tim Hatcher. Fix Make