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