2007-11-19 Doug Turner Reviewed by Alp Toker. http://bugs.webkit.org/show_bug.cgi?id=16054 Crash when GlyphPage::fill is called with more than 256 bytes of data http://bugs.webkit.org/show_bug.cgi?id=14446 [GDK] Crash on http://www.wikipedia.org/ setGlyphDataForIndex() uses a fixed array of size 256 which we can't exceed. We need to return failure if the buffer has Unicode supplementary characters for now. This strategy matches the Win port, which also doesn't support this case yet. Add an assertion so nobody makes this mistake again. * platform/GlyphPageTreeNode.h: (WebCore::GlyphPage::setGlyphDataForIndex): * platform/gtk/GlyphPageTreeNodeGtk.cpp: (WebCore::GlyphPage::fill): 2007-11-19 Doug Turner Reviewed by Timothy Hatcher. http://bugs.webkit.org/show_bug.cgi?id=16050 sqlite3_prepare16_v2 build bustage. Using the correct SQLITE_VERSION_NUMBER around sqlite_prepare16_v2 to fix build bustage. * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::prepare): 2007-11-19 Mark Rowe Build fix. Don't over-qualify the constructor name. * storage/DatabaseDetails.h: 2007-11-19 Brady Eidson Reviewed by Maciej Stub out the WebCore parts of the WebKit API * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: * storage/DatabaseDetails.h: Added. Simple container for vitals on a specific database (WebCore::DatabaseDetails::DatabaseDetails::DatabaseDetails): (WebCore::DatabaseDetails::DatabaseDetails): (WebCore::DatabaseDetails::isValid): (WebCore::DatabaseDetails::name): (WebCore::DatabaseDetails::version): (WebCore::DatabaseDetails::displayName): (WebCore::DatabaseDetails::expectedUsage): (WebCore::DatabaseDetails::currentUsage): * storage/DatabaseTracker.cpp: Added various methods for API usage (WebCore::DatabaseTracker::detailsForNameAndOrigin): (WebCore::DatabaseTracker::usageForOrigin): (WebCore::DatabaseTracker::quotaForOrigin): (WebCore::DatabaseTracker::setQuota): * storage/DatabaseTracker.h: 2007-11-19 Kevin Ollivier wx port build fix. * platform/graphics/wx/AffineTransformWx.cpp: (WebCore::AffineTransform::operator== ): m_transform is only available when using wxGraphicsContext. 2007-11-19 Alp Toker Reviewed by Mark Rowe. GTK+ drawing fixes. Add a check to avoid crashing when the GraphicsContext is not associated with a GdkDrawable. This was noticed when adding printing support but might be triggered in other situations too. Do not render themes when painting is disabled. This is an optimisation for cases where GraphicsContext is used to calculate page dimensions etc. without actually rendering. * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::gdkDrawable): * platform/gtk/RenderThemeGtk.cpp: (WebCore::paintMozWidget): 2007-11-13 Rahul Abrol Reviewed by Tim Hatcher. http://bugs.webkit.org/show_bug.cgi?id=15977 Resizing images preference now toggles default image state. * loader/ImageDocument.cpp: (WebCore::ImageDocument::ImageDocument): (WebCore::ImageDocument::createDocumentStructure): (WebCore::ImageDocument::imageChanged): 2007-11-19 Kevin Ollivier Update wx port build sources with recent changes, update wx FontPlatformData to be a class (MSVC7 gets confused otherwise...) and implement its hash() method. Reviewed by Adam. * WebCoreSources.bkl: * platform/wx/FontPlatformData.h: (WebCore::FontPlatformData::hash): 2007-11-19 Julien Chaffraix Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=12194 Bug 12194: Trying to access XMLHttpRequest.responseText or responseXML when they are not available should raise an exception Tests: http/tests/xmlhttprequest/xmlhttprequest-responseText-exception.html http/tests/xmlhttprequest/xmlhttprequest-responseXML-exception.html * bindings/js/JSXMLHttpRequest.cpp: (KJS::JSXMLHttpRequest::getValueProperty): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::getResponseText): (WebCore::XMLHttpRequest::getResponseXML): * xml/XMLHttpRequest.h: 2007-11-19 Peter Kasting Reviewed by Darin Adler. http://bugs.webkit.org/show_bug.cgi?id=15971 The GIF decoder should not fail decoding if the caller asks it to decode again when no new data has arrived since the last call. * platform/image-decoders/gif/GIFImageReader.cpp: (GIFImageReader::read): 2007-11-18 Brady Eidson Reviewed by Eric Fix a crash hashing a default SecurityOriginData object * storage/DatabaseTracker.cpp: (WebCore::SecurityOriginDataHash::hash): The default object has some default strings with NULL StringImpls - don't try to hash those! 2007-11-18 Timothy Hatcher Reviewed by Sam Weinig. Bug 16043: Remove InspectorController.log now that console.log works http://bugs.webkit.org/show_bug.cgi?id=16043 Remove the last uses of InspectorController.log. Once use was no longer needed, checking an erro case that can't happen anymore. The other case now uses console.error. * page/InspectorController.cpp: Remove the log function. (WebCore::InspectorController::windowScriptObjectAvailable): Remove the log function from InspectorController script class. * page/inspector/DocumentPanel.js: Remove a use of InspectorController.log that isn't needed. * page/inspector/Panel.js: Change InspectorController.log to console.log and early return. 2007-11-18 Timothy Hatcher Reviewed by Brady. Bug 16041: REGRESSION: the Database panel in the Inspector stopped showing errors http://bugs.webkit.org/show_bug.cgi?id=16041 * page/inspector/DatabasePanel.js: Implement error callbacks to pass to executeSql() and transaction(). Refactored some code for the success and error callbacks to use. 2007-11-18 Alexey Proskuryakov Reviewed by Maciej. Whitespace handling doesn't match HTML5. HTML5 definition is the same as MSIE's, with the exception that the latter strips null characters. Firefox also treats U+0008 as whitespace, but not U+000B or U+000C. Test: fast/parser/html-whitespace.html * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseSpecial): (WebCore::HTMLTokenizer::parseTag): Use isASCIISpace, which matches HTML5 definition of whitespace, and also what we use to check for whitespace almost everywhere. 2007-11-17 Mark Rowe Reviewed by Darin Adler. Fix: REGRESSION: testapi exits with assertion failure in debug build JSGlobalContextCreate throws away globalObjectClass's prototype http://bugs.webkit.org/show_bug.cgi?id=16033 Update for changes in Interpreter method signatures. * bindings/js/kjs_binding.cpp: (KJS::ScriptInterpreter::ScriptInterpreter): * bindings/js/kjs_window.cpp: (KJS::Window::clear): 2007-11-17 Timothy Hatcher Reviewed by Mark Rowe. Bug 13470: i18n: The Web Inspector is not localizable http://bugs.webkit.org/show_bug.cgi?id=13470 Add support for localization to the Web Inspector. Clients need to implement localizedStringsURL() to return the URL of the InspectorLocalizedStrings.js that best matches the user's language. * English.lproj: Added. * English.lproj/InspectorLocalizedStrings.js: Added. * WebCore.xcodeproj/project.pbxproj: Add InspectorLocalizedStrings.js. * page/InspectorClient.h: Add localizedStringsURL. * page/InspectorController.cpp: Add localizedStringsURL that calls the client. Also added a version exposed to JavaScript. * page/InspectorController.h: Add localizedStringsURL. * page/inspector/ConsolePanel.js: Call WebInspector.UIString for user visible strings. * page/inspector/DatabasePanel.js: Ditto. * page/inspector/DocumentPanel.js: Ditto. * page/inspector/ImagePanel.js: Ditto. * page/inspector/MetricsSidebarPane.js: Ditto. * page/inspector/NetworkPanel.js: Ditto. * page/inspector/Panel.js: Ditto. * page/inspector/PropertiesSidebarPane.js: Ditto. * page/inspector/Resource.js: Ditto. * page/inspector/ResourceCategory.js: Ditto. * page/inspector/SourcePanel.js: Ditto. * page/inspector/StylesSidebarPane.js: Ditto. * page/inspector/inspector.css: Use pre-wrap so database errors can use \n. * page/inspector/inspector.html: Remove some user visible strings. * page/inspector/inspector.js: Added WebInspector.UIString and call WebInspector.UIString for user visible strings. Some code needed to be moved to WebInspector.loaded to use UIString after the localized strings get loaded. * platform/graphics/svg/SVGImageEmptyClients.h: (WebCore::SVGEmptyFrameLoaderClient::redirectDataToPlugin): Remove WebCore:: prefix. (WebCore::SVGEmptyInspectorClient::createPage): Ditto. (WebCore::SVGEmptyInspectorClient::localizedStringsURL): Add empty stub. (WebCore::SVGEmptyInspectorClient::highlight): Remove WebCore:: prefix. (WebCore::SVGEmptyInspectorClient::inspectedURLChanged): Ditto. 2007-11-17 Timothy Hatcher Reviewed by Adam. Reworte String.sprintf to fix many bad bugs and to not use RegExp. Also added String.vsprintf so it can be used later for the localization function. This version only supports argument reordering, precision for floats, and these format characters: d, f, s and @. Any unsupported format characters are logged and substituted like strings. * page/inspector/utilities.js: 2007-11-17 Alexey Proskuryakov Windows build fix. * editing/Editor.h: Made canSmartCopyOrDelete public, as Windows WebView still needs it. 2007-11-17 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=15969 Eliminate Editor::deleteRange() No change in functionality. * editing/CompositeEditCommand.h: Removed unimplemented deleteKeyPressed(). * editing/Editor.cpp: (WebCore::Editor::deleteWithDirection): (WebCore::Editor::cut): (WebCore::Editor::performDelete): * editing/Editor.h: Moved relevant Editor::deleteRange() functionality to its callers. Removed deleteSelectionWithSmartDelete(void), which was more confusing than helpful in my opinion. * editing/mac/EditorMac.mm: (WebCore::initializeKillRingIfNeeded): (WebCore::Editor::addToKillRing): (WebCore::Editor::yank): (WebCore::Editor::yankAndSelect): (WebCore::Editor::setMark): (WebCore::unionDOMRanges): (WebCore::Editor::deleteToMark): (WebCore::Editor::selectToMark): (WebCore::Editor::swapWithMark): Pushed kill ring handling down from WebCore. * page/mac/WebCoreFrameBridge.h: * page/mac/WebCoreFrameBridge.mm: Removed setMarkDOMRange (the corresponding getter is still needed). * WebCore.base.exp: No longer need to export Editor::deleteRange() and Editor::insertTextWithoutSendingTextEvent(). Export the new kill ring functions. 2007-11-16 Ryan Leavengood Reviewed by David Kilzer. Build fix: the needed headers for POSIX file functions were not included. * platform/posix/FileSystemPOSIX.cpp: 2007-11-16 Dan Bernstein Reviewed by Darin Adler. - fix the common case of REGRESSION: Incomplete repaint of CSS image substitution Test: fast/repaint/clip-with-layout-delta.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): Account for layout delta when pushing additional clip. 2007-11-16 Antti Koivisto Reviewed by Adele. Seeking related fixes, updates to match the latest specification - rename loopCount of HTMLMediaElement to playCount - add explicit seeking attribute to HTMLMediaElement to get semantics right - implement the specification behavior that currentTime must immediately return seeked position in HTMLMediaElement instead of MoviePrivateQTKit - fix broken behavior when seeking past end of the media, add tests - replace Movie didEnd callback with broader timeChanged callback (which gets called in didEnd case too) - use setDelayCallbacks: in various MoviePrivateQTKit methods to avoid bug prone synchronous callbacks from QT, make HTMLMediaElement not depend on synchronous callbacks - do some cleanups and simplifications in MoviePrivateQTKit, get rid of m_rateBeforeSeek and m_blockStateUpdate variables Tests: http/tests/media/video-seekable-stall.html media/video-seeking.html media/video-seek-past-end-paused.html media/video-seek-past-end-playing.html * html/HTMLAttributeNames.in: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::load): (WebCore::HTMLMediaElement::movieNetworkStateChanged): (WebCore::HTMLMediaElement::setReadyState): (WebCore::HTMLMediaElement::seek): (WebCore::HTMLMediaElement::seeking): (WebCore::HTMLMediaElement::currentTime): (WebCore::HTMLMediaElement::ended): (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::pause): (WebCore::HTMLMediaElement::playCount): (WebCore::HTMLMediaElement::setPlayCount): (WebCore::HTMLMediaElement::checkIfSeekNeeded): (WebCore::HTMLMediaElement::movieTimeChanged): (WebCore::HTMLMediaElement::endedPlayback): (WebCore::HTMLMediaElement::updateMovie): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * platform/graphics/Movie.cpp: (WebCore::Movie::timeChanged): * platform/graphics/Movie.h: (WebCore::MovieClient::movieTimeChanged): * platform/graphics/mac/MoviePrivateQTKit.h: * platform/graphics/mac/MoviePrivateQTKit.mm: (WebCore::MoviePrivate::MoviePrivate): (WebCore::MoviePrivate::load): (WebCore::MoviePrivate::play): (WebCore::MoviePrivate::pause): (WebCore::MoviePrivate::currentTime): (WebCore::MoviePrivate::seek): (WebCore::MoviePrivate::doSeek): (WebCore::MoviePrivate::cancelSeek): (WebCore::MoviePrivate::seekTimerFired): (WebCore::MoviePrivate::startCuePointTimerIfNeeded): (WebCore::MoviePrivate::paused): (WebCore::MoviePrivate::updateStates): (WebCore::MoviePrivate::timeChanged): (WebCore::MoviePrivate::didEnd): 2007-11-16 Anders Carlsson Reviewed by Adam. XMLHttpRequest readyState 3 & responseText buffer issues. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest): Add new parameter which controls whether content sniffing should be turned off. (WebCore::ResourceHandle::loadResourceSynchronously): Always content sniff sync loads. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest): If the ResourceRequest already has a backing CFURLRequest, make a copy of it. This preserves any properties set on the CFURLRequest. 2007-11-16 Jon Honeycutt Reviewed by Ollie. Crash closing or leaving window with ViewPoint Media player plugin ViewPoint plugin requires that we pass a valid NPSavedData* to NPP_Destroy. * plugins/win/PluginViewWin.cpp: Pass a valid NPSavedData* to NPP_Destroy. If the plugin allocates data, discard it 2007-11-16 Mark Rowe Reviewed by Tim Hatcher. Build WebCore as a sub-framework of WebKit in all configurations. * Configurations/WebCore.xcconfig: * WebCore.xcodeproj/project.pbxproj: 2007-11-16 Doug Turner Reviewed by Alp. http://bugs.webkit.org/show_bug.cgi?id=16018 build bustage when building on debian 4.0 Fix build bustage on GTK+ with older versions of Pango. Don't cache the return value since the docs say it can change. * platform/gtk/Language.cpp: (WebCore::defaultLanguage): 2007-11-16 Brady Eidson Build fix * platform/SecurityOriginData.h: (WebCore::operator!=): Whoops! 2007-11-16 Brady Eidson Reviewed by Sam Further purify DatabaseTracker to use SecurityOriginData instead of "a String" * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: * WebCore.vcproj/WebCore.vcproj * WebCore.pro * platform/SecurityOriginData.cpp: Added. (WebCore::SecurityOriginData::SecurityOriginData): Add a constructor that takes a "stringIdentifier"-style string, since that form is what will be stored in the Databases.db on disk (WebCore::SecurityOriginData::stringIdentifier): * platform/SecurityOriginData.h: (WebCore::SecurityOriginData::protocol): (WebCore::SecurityOriginData::host): (WebCore::SecurityOriginData::port): * storage/DatabaseTracker.cpp: (WebCore::SecurityOriginDataHash::hash): Follow the pattern Darin set in FontCache.cpp to make a decent hash for a SecurityOriginData object (WebCore::SecurityOriginDataHash::equal): (WebCore::SecurityOriginDataTraits::deletedValue): "file::1" will never exist in normal operation (WebCore::SecurityOriginDataTraits::emptyValue): "file::2" will never exist in normal operation (WebCore::DatabaseTracker::fullPathForDatabase): (WebCore::DatabaseTracker::populateOrigins): (WebCore::DatabaseTracker::origins): (WebCore::DatabaseTracker::addDatabase): * storage/DatabaseTracker.h: 2007-11-16 Alexey Proskuryakov Windows build fix. * WebCore.vcproj/WebCore.vcproj: Removed VoidCallback.cpp, added JSCustomVoidCallback.{h,cpp}. 2007-11-16 Nikolas Zimmermann Reviewed by Eric. Fixes: http://bugs.webkit.org/show_bug.cgi?id=12290 Implement all SVGTextContentElement DOM methods. This is the last missing SVG text feature. SVG fonts is next. Added testcase: svg/custom/text-dom-01-f.svg (tests all new methods) * ksvg2/svg/SVGTextContentElement.cpp: (WebCore::cummulatedCharacterRangeLength): (WebCore::SVGInlineTextBoxQueryWalker::): (WebCore::SVGInlineTextBoxQueryWalker::SVGInlineTextBoxQueryWalker): (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): (WebCore::SVGInlineTextBoxQueryWalker::setQueryInputParameters): (WebCore::SVGInlineTextBoxQueryWalker::longResult): (WebCore::SVGInlineTextBoxQueryWalker::floatResult): (WebCore::SVGInlineTextBoxQueryWalker::pointResult): (WebCore::SVGInlineTextBoxQueryWalker::rectResult): (WebCore::SVGInlineTextBoxQueryWalker::stopProcessing): (WebCore::findInlineTextBoxInTextChunks): (WebCore::rootInlineBoxForTextContentElement): (WebCore::executeTextQuery): (WebCore::SVGTextContentElement::getNumberOfChars): (WebCore::SVGTextContentElement::getComputedTextLength): (WebCore::SVGTextContentElement::getSubStringLength): (WebCore::SVGTextContentElement::getStartPositionOfChar): (WebCore::SVGTextContentElement::getEndPositionOfChar): (WebCore::SVGTextContentElement::getExtentOfChar): (WebCore::SVGTextContentElement::getRotationOfChar): (WebCore::SVGTextContentElement::getCharNumAtPosition): (WebCore::SVGTextContentElement::selectSubString): * ksvg2/svg/SVGTextContentElement.h: * rendering/SVGInlineTextBox.h: 2007-11-15 Adele Peterson Reviewed by Oliver. Fix for CrashTracer: [USER] 3 crashes in Safari at HTMLSelectElement::menuListDefaultEventHandler (reproducible on mactc30.com) Test: fast/forms/menulist-no-renderer-onmousedown.html * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::defaultEventHandler): Nil check the renderer here. None of the default behavior makes sense if there's no renderer. (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Moved the nil check to the main defaultEventHandler. 2007-11-15 Antti Koivisto Reviewed by Adele. Fix The movie tag should do initialization on need and not during startup. Initialize Movie MIME type hash on demand * platform/MIMETypeRegistry.cpp: (WebCore::initialiseSupportedMovieMIMETypes): (WebCore::initialiseMIMETypeRegistry): (WebCore::MIMETypeRegistry::isSupportedMovieMIMEType): (WebCore::MIMETypeRegistry::getSupportedMovieMIMETypes): 2007-11-15 Mark Rowe Build fix for Qt on Windows. * xml/XPathStep.cpp: (WebCore::XPath::Step::nodesInAxis): 2007-11-15 Timothy Hatcher Reviewed by Mark Rowe. Bug 14761: Web Inspector leaks JS objects and DOM nodes http://bugs.webkit.org/show_bug.cgi?id=14761 * page/InspectorController.cpp: (WebCore::InspectorController::~InspectorController): Change the tear down order so that inspectorDestroyed() is called before InspectorController private data is set to Zero. The inspectorDestroyed() call ends up closing the WebView and triggering InspectorController::close() which unprotects m_scriptObject. This didn't happen when the private data was cleared before calling inspectorDestroyed(). 2007-11-15 Mark Rowe Gtk build fix. * WebCore.pro: 2007-11-15 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=15989 XPath queries with predicates incorrectly retains the current node across unions Test: fast/xpath/union-context-node.xhtml * xml/XPathPath.cpp: (WebCore::XPath::LocationPath::evaluate): Restore context after evaluation. * xml/XPathStep.cpp: (WebCore::XPath::Step::evaluate): Do not backup context, as we can easily re-create it. 2007-11-15 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=15988 REGRESSION: XPath preceding-axis query misses nested elements Test: fast/xpath/preceding-axis.xhtml * xml/XPathStep.cpp: (WebCore::XPath::Step::nodesInAxis): Hopefully correct this time. 2007-11-15 Timothy Hatcher Reviewed by Mark Rowe and Sam. This corrects a couple of issues in the Web Inspector where selected search results would not have the right text color when the window is inactive or the results are focused. * page/inspector/inspector.css: 2007-11-15 Timothy Hatcher Reviewed by Sam. Bug 16007: REGRESSION: Disclosure triangle click zone for resource categories is off by 10 pixels http://bugs.webkit.org/show_bug.cgi?id=16007 Makes the click width an option on TreeElement and make ResourceCategoryTreeElement a true subclass of TreeElement. The click width for ResourceCategoryTreeElement is 20 pixels, and the default is 10 pixels. * page/inspector/ResourceCategory.js: * page/inspector/treeoutline.js: 2007-11-15 Anders Carlsson Reviewed by Brady. Pass a VoidCallback to Database::transaction and Database::changeVersion. This is not yet hooked up to the database machinery. * WebCore.vcproj/WebCore.vcproj: * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): (WebCore::JSDatabase::transaction): * storage/Database.cpp: (WebCore::Database::changeVersion): (WebCore::Database::transaction): * storage/Database.h: 2007-11-15 Timothy Hatcher Reviewed by Adam. Bug 16005: Hovering in the breadcrumbs causes jumpy behavior http://bugs.webkit.org/show_bug.cgi?id=16005 Hovering over cumbs no longer exposes new crumbs. Clicking on a collapsed crumb will expose as many hidden crumbs as possible to the user. Also crumbs that have ID attributes will compact to the ID over the tag name. * page/inspector/DocumentPanel.js: 2007-11-15 Anders Carlsson Reviewed by Sam. Make the VoidCallback DOM interface behave more like our other DOM interfaces. * bindings/js/JSCustomVoidCallback.h: Added. * bindings/js/JSCustomVoidCallback.cpp: Added. (WebCore::JSCustomVoidCallback::JSCustomVoidCallback): (WebCore::JSCustomVoidCallback::handleEvent): VoidCallback implementation that wraps a JS object. (WebCore::toVoidCallback): New method that creates a VoidCallback implementation given a JS object. * bindings/scripts/CodeGeneratorJS.pm: Specify that VoidCallback can fail conversion and add a custom conversion function. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::movieCuePointReached): Call handleEvent on the callback. (WebCore::HTMLMediaElement::removeCuePoint): Comment out parts of this method, it has already been removed in the HTML5 spec and it relies on overriding VoidCallback equality. * html/VoidCallback.cpp: Removed. * html/VoidCallback.h: (WebCore::VoidCallback::VoidCallback): (WebCore::VoidCallback::~VoidCallback): Make this an abstract class with a pure virtual handleEvent method. 2007-11-15 Adam Roben Fix Type-select while a element's selectedIndex changed. Reviewed by Adele. * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenu::updateFromElement): Update the focused index from the client's selected index. (WebCore::PopupWndProc): When we receive a WM_CHAR message for a printable character, manufacture a WM_KEYDOWN message for it and post both that and the current WM_CHAR message to the WebView. 2007-11-15 Brady Eidson Build fix * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::fullPathForDatabase): (WebCore::DatabaseTracker::databaseNamesForOrigin): 2007-11-15 Brady Eidson Reviewed by John and Sam Stubbing out everything required for a WebKit API for databases Biggest change in WebCore is that we passed around SecurityOriginData as the representation of a SecurityOrigin, instead of a String or a SecurityOrigin itself (which is an opaque object that has a different purpose besides just hanging on to the data) * WebCore.base.exp: * WebCore.xcodeproj/project.pbxproj: * platform/SecurityOrigin.cpp: * platform/SecurityOrigin.h: * platform/SecurityOriginData.h: Added. Simple object to encapsulate the 3 pieces of data in the SecurityOrigin tuple (WebCore::SecurityOriginData::SecurityOriginData): (WebCore::SecurityOriginData::protocol): (WebCore::SecurityOriginData::host): (WebCore::SecurityOriginData::port): (WebCore::SecurityOriginData::toString): Simple concatenation of the 3 components, colon separated * storage/Database.cpp: (WebCore::Database::Database): Use SecurityOriginData instead * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::fullPathForDatabase): (WebCore::DatabaseTracker::databaseNamesForOrigin): (WebCore::DatabaseTracker::deleteDatabasesWithOrigin): (WebCore::DatabaseTracker::deleteDatabase): * storage/DatabaseTracker.h: * storage/DatabaseTrackerClient.h: Added. For dispatching notifications up to WebKit (WebCore::DatabaseTrackerClient::~DatabaseTrackerClient):2007-11-15 Jon Honeycutt 2007-11-15 Jon Honeycutt Reviewed by Anders. NP_ASFILEONLY streams should not buffer data in m_deliveryData. * plugins/win/PluginStreamWin.cpp: (WebCore::PluginStreamWin::didReceiveData): 2007-11-15 Justin Garcia Reviewed by Adele Peterson. Crash at Node::isDescendantOf when switching out of Edit HTML Source mode A textarea that contained the selection was removed but the selection wasn't cleared, and we'd crash in code that assumed a valid, in-document selection. * editing/SelectionController.cpp: (WebCore::removingNodeRemovesPosition): Clear the selection if the node being removed is the shadowAncestorNode of the node that contains the position, not just if the node being removed contains that shadowAncestorNode. 2007-11-15 Nikolas Zimmermann Reviewed by Maciej. Fix logic error: calculateGlyphBoundaries takes RTL text into account itself, no need to adjust offsets before. * rendering/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback): (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback): 2007-11-15 Anders Carlsson Reviewed by Brady. openDatabase does not work when the version string is empty If the string is empty, pass a real empty string to sqlite3_bind_text16. * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::bindText): 2007-11-15 Anders Carlsson Reviewed by Brady. Get rid of SQLiteStatement::bindText and rename bindText16 to bindText. Remove the copy parameter from bindText and bindBlob and always copy passed in data instead. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase): (WebCore::IconDatabase::removePageURLFromSQLDatabase): (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase): (WebCore::IconDatabase::addIconURLToSQLDatabase): (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase): (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::prepare): * platform/sql/SQLiteStatement.h: * storage/Database.cpp: (WebCore::setTextValueInDatabase): * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::fullPathForDatabase): (WebCore::DatabaseTracker::databaseNamesForOrigin): (WebCore::DatabaseTracker::addDatabase): 2007-11-14 Brady Eidson Rubberstamped by Sam * platform/SecurityOrigin.h: Lets make this an unsigned short and *not* rule out half the possible ports? 2007-11-14 Alexey Proskuryakov Reviewed by Justin Garcia. http://bugs.webkit.org/show_bug.cgi?id=15781 REGRESSION: Ligatures fail to form when typing in Devanagari (because WebKit can't handle a marked range that covers half of a composed character sequence) Test: platform/mac/editing/input/devanagari-ligature.html This fix is somewhat of a hack, as it asks editing commands to work with invalid selections. However, this is not entirely new for them, as Roman accents are typed in a similar manner. In the future, we probably want to make commands work with ranges (or Positions explicitly). * editing/Editor.cpp: (WebCore::Editor::selectComposition): Force selection to composition range. * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Force ending selection to inserted text range. 2007-11-14 Beth Dakin Reviewed by Hyatt. Fix for REGRESSION: Combination of client- side image map and tag is not working properly (15522) * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::checkDTD): Allow to have both block and inline children rather than just block children. This matches Firefox. 2007-11-14 Justin Garcia Reviewed by Alexey Proskuryakov. CrashTracer: [USER] 362 crashes at WebCore::DeleteSelectionCommand::mergeParagraphs * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::handleGeneralDelete): Removed an irrelevant FIXME. (WebCore::DeleteSelectionCommand::mergeParagraphs): If the block that contained the end of the selection hasn't been removed but has been emptied by deletion, we would to try and fail to create a VisiblePosition inside that block, which could lead to a crash. If that happens, there's no content in the block to move, so just remove the block and return. Preserve m_needPlaceholder during the call to moveParagraphs, since it may change it and since it does its own placeholder insertion when necessary. (WebCore::DeleteSelectionCommand::doApply): No need to check m_needPlaceholder before calling mergeParagraphs, because it handles preserving m_needPlaceholder when it calls moveParagraphs. 2007-11-14 Timothy Hatcher Reviewed by Adam. Bug 14380: Long DOM ancestry breadcrumb lists get cut off http://bugs.webkit.org/show_bug.cgi?id=14380 The breadcumbs will now be compacted and collapsed if there isn't enough room to show everything. The collapsing algorithm always affects the crumbs that are farthest away from the selected or hovered crumb first. * page/inspector/DocumentPanel.js: * page/inspector/inspector.css: 2007-11-14 Anders Carlsson Use the correct include path. * platform/Cursor.h: * plugins/win/PluginPackageWin.h: * plugins/win/PluginStreamWin.h: 2007-11-13 Brady Eidson Reviewed by Adam http://bugs.webkit.org/show_bug.cgi?id=15976 - ASSERT/crash when SQLTransactionCallback throws an exception * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::deliverTransactionCallback): Make a transaction error for the case where the SQLTransactionCallback fails (WebCore::SQLTransaction::deliverTransactionErrorCallback): Don't assert on the error callback, but null check it and make the commit/rollback decision accordingly 2007-11-13 Oliver Hunt Reviewed by Anders. calling dataWithPDFInsideRect on an SVG with a gradient crashes (14780) When drawing directly to PDF CG may delay the use of the gradient function until outside our standard drawing path, which in turn could let us invalidate the caches before they were used. To work around this we now store the cached stops in a RefCounted object, so that we can ensure that cache exists as long as required. * platform/graphics/svg/SVGPaintServerGradient.cpp: (WebCore::SVGPaintServerGradient::SVGPaintServerGradient): * platform/graphics/svg/SVGPaintServerGradient.h: * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp: (WebCore::cgGradientCallback): (WebCore::CGShadingRefForLinearGradient): (WebCore::CGShadingRefForRadialGradient): (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache): 2007-11-13 Anders Carlsson Fix Windows build. * platform/Cursor.h: * plugins/win/PluginPackageWin.h: * plugins/win/PluginStreamWin.h: 2007-11-13 Geoffrey Garen Reviewed by Anders Carlsson. Renamed Shared to RefCounted. * ForwardingHeaders/wtf/RefCounted.h: Copied from WebCore/ForwardingHeaders/wtf/Shared.h. * ForwardingHeaders/wtf/Shared.h: Removed. * bindings/js/JSSVGPODTypeWrapper.h: * css/CSSFontFace.h: * css/CSSRuleList.h: * css/Counter.h: * css/Pair.h: * css/Rect.h: * css/StyleBase.h: * css/StyleSheetList.h: * dom/Attribute.h: * dom/Clipboard.h: * dom/DOMImplementation.h: * dom/Event.h: * dom/EventListener.h: * dom/NamedNodeMap.h: * dom/NodeFilter.h: * dom/NodeFilterCondition.h: * dom/NodeList.h: * dom/QualifiedName.h: * dom/Range.h: * dom/RangeException.h: * dom/RegisteredEventListener.h: * dom/Traversal.h: * editing/EditCommand.h: * history/BackForwardList.h: * history/CachedPage.h: * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): * history/HistoryItem.h: * html/CanvasGradient.h: * html/CanvasPattern.h: * html/CanvasRenderingContext2D.h: * html/CanvasStyle.h: * html/HTMLCollection.h: * html/MediaError.h: * html/TimeRanges.h: * html/VoidCallback.h: * ksvg2/css/SVGRenderStyle.cpp: (WebCore::SVGRenderStyle::SVGRenderStyle): * ksvg2/css/SVGRenderStyle.h: * ksvg2/css/SVGRenderStyleDefs.cpp: (StyleFillData::StyleFillData): (StyleStrokeData::StyleStrokeData): (StyleStopData::StyleStopData): (StyleTextData::StyleTextData): (StyleClipData::StyleClipData): (StyleMaskData::StyleMaskData): (StyleMarkerData::StyleMarkerData): (StyleMiscData::StyleMiscData): * ksvg2/css/SVGRenderStyleDefs.h: * ksvg2/svg/SVGAngle.cpp: (WebCore::SVGAngle::SVGAngle): * ksvg2/svg/SVGAngle.h: * ksvg2/svg/SVGAnimatedTemplate.h: * ksvg2/svg/SVGElementInstanceList.h: * ksvg2/svg/SVGException.h: * ksvg2/svg/SVGList.h: * ksvg2/svg/SVGPathSeg.h: * ksvg2/svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio): * ksvg2/svg/SVGPreserveAspectRatio.h: * ksvg2/svg/SVGRenderingIntent.h: * ksvg2/svg/SVGTransform.h: * ksvg2/svg/SVGUnitTypes.h: * loader/DocumentLoader.h: * loader/FormState.h: * loader/ResourceLoader.h: * loader/TextResourceDecoder.h: * loader/icon/IconRecord.h: * page/BarInfo.h: * page/Console.h: * page/DOMSelection.h: * page/DOMWindow.h: * page/Frame.h: * page/History.h: * page/InspectorController.cpp: * page/Plugin.h: * page/Screen.h: * platform/ArrayImpl.h: * platform/CString.h: * platform/Cursor.h: * platform/DeprecatedValueListImpl.cpp: (WebCore::DeprecatedValueListImpl::Private::Private): * platform/FileChooser.h: * platform/FontFallbackList.h: * platform/FontFamily.cpp: (WebCore::FontFamily::FontFamily): * platform/FontFamily.h: * platform/FontSelector.h: * platform/GlyphPageTreeNode.h: * platform/PopupMenu.h: * platform/RegularExpression.cpp: * platform/ScrollBar.h: * platform/SharedBuffer.h: * platform/StringImpl.h: * platform/graphics/Icon.h: * platform/graphics/svg/SVGResource.h: * platform/network/FormData.cpp: (WebCore::FormData::FormData): * platform/network/FormData.h: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.h: * rendering/RenderStyle.cpp: (WebCore::StyleSurroundData::StyleSurroundData): (WebCore::StyleBoxData::StyleBoxData): (WebCore::StyleVisualData::StyleVisualData): (WebCore::StyleBackgroundData::StyleBackgroundData): (WebCore::StyleMarqueeData::StyleMarqueeData): (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleMultiColData::StyleMultiColData): (WebCore::StyleTransformData::StyleTransformData): (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleInheritedData::StyleInheritedData): * rendering/RenderStyle.h: * rendering/SVGCharacterLayoutInfo.h: (WebCore::SVGCharOnPath::SVGCharOnPath): * storage/SQLResultSetRowList.h: * xml/DOMParser.h: * xml/XMLHttpRequest.h: * xml/XMLSerializer.h: * xml/XPathEvaluator.h: * xml/XPathExpression.h: * xml/XPathNSResolver.h: * xml/XPathResult.h: * xml/XPathValue.h: * xml/XSLTProcessor.h: 2007-11-13 Brady Eidson Reviewed by Mark Rowe Remove errantly added files, and fix the idl (for reference's sake) * storage/JSCustomSQLStatementCallback.h: Removed. * storage/JSCustomSQLStatementErrorCallback.h: Removed. * storage/JSCustomSQLTransactionCallback.h: Removed. * storage/JSCustomSQLTransactionErrorCallback.h: Removed. * storage/SQLStatementCallback.idl: 2007-11-13 Adam Roben Fix a bug and improve upon Brady's fix Reviewed by Anders. * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): Made the code a little clearer and more correct. * loader/icon/IconDatabase.cpp: Put parentheses around the expansion of IS_ICON_SYNC_THREAD() so that ASSERT_NOT_SYNC_THREAD() does the comparison it meant to. 2007-11-13 Sam Weinig Fix Qt and Gtk builds. * WebCore.pro: Remove non-generated idl files. 2007-11-13 Mark Rowe Remove removed file from the project. * WebCore.pro: 2007-11-13 Brady Eidson Release build fix * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): 2007-11-13 Adam Roben Add WindowMessageBroadcaster This class is used to listen in on messages sent to HWNDs. Multiple WindowMessageListeners can be notified about messages sent to a single HWND, and one WindowMessageListener can listen to messages from multiple HWNDs. Reviewed by Ada. * WebCore.vcproj/WebCore.vcproj: Added new files to project. * platform/win/WindowMessageBroadcaster.cpp: Added. (WebCore::instancesMap): Static helper. (WebCore::WindowMessageBroadcaster::addListener): Registers a listener for a particular HWND. (WebCore::WindowMessageBroadcaster::removeListener): Removes a listener for a particular HWND. (WebCore::WindowMessageBroadcaster::WindowMessageBroadcaster): (WebCore::WindowMessageBroadcaster::~WindowMessageBroadcaster): (WebCore::WindowMessageBroadcaster::destroy): Removes this broadcaster from the instancesMap, removes all of its listeners, unsubclasses the window, and deletes the broadcaster. (WebCore::WindowMessageBroadcaster::unsubclassWindow): Unsubclasses the window (which means that SubclassedWndProc won't be called again for this window). (WebCore::WindowMessageBroadcaster::SubclassedWndProc): Notifies all the listeners about every message sent to the HWND * platform/win/WindowMessageBroadcaster.h: Added. (WebCore::WindowMessageBroadcaster::listeners): (WebCore::WindowMessageBroadcaster::originalWndProc): * platform/win/WindowMessageListener.h: Added. 2007-11-13 Geoffrey Garen Reviewed by Sam Weinig. Moved Shared.h into wtf so it could be used in more places. Retained TreeShared, but moved it to its own file, TreeShared.h. * ForwardingHeaders/wtf/Shared.h: Added. * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSSVGPODTypeWrapper.h: * css/CSSFontFace.h: * css/CSSRuleList.h: * css/Counter.h: * css/Pair.h: * css/Rect.h: * css/StyleBase.h: * css/StyleSheetList.h: * dom/Clipboard.h: * dom/DOMImplementation.h: * dom/Event.h: * dom/EventListener.h: * dom/NamedNodeMap.h: * dom/NodeFilterCondition.h: * dom/NodeList.h: * dom/Range.h: * dom/RangeException.h: * dom/RegisteredEventListener.h: * dom/Traversal.h: * history/BackForwardList.h: * history/CachedPage.h: * history/HistoryItem.h: * html/CanvasGradient.h: * html/CanvasPattern.h: * html/HTMLCollection.h: * html/MediaError.h: * html/TimeRanges.h: * html/VoidCallback.h: * ksvg2/css/SVGRenderStyleDefs.h: * ksvg2/svg/SVGAnimatedTemplate.h: * ksvg2/svg/SVGElementInstanceList.h: * ksvg2/svg/SVGList.h: * ksvg2/svg/SVGPathSeg.h: * ksvg2/svg/SVGPreserveAspectRatio.h: * ksvg2/svg/SVGRenderingIntent.h: * ksvg2/svg/SVGTransform.h: * ksvg2/svg/SVGUnitTypes.h: * loader/DocumentLoader.h: * loader/FormState.h: * loader/ResourceLoader.h: * loader/TextResourceDecoder.h: * loader/icon/IconRecord.h: * page/BarInfo.h: * page/Console.h: * page/DOMSelection.h: * page/DOMWindow.h: * page/History.h: * page/InspectorController.cpp: * page/Plugin.h: * page/Screen.h: * platform/ArrayImpl.h: * platform/CString.h: * platform/DeprecatedValueListImpl.cpp: * platform/FontFallbackList.h: * platform/FontFamily.h: * platform/FontSelector.h: * platform/GlyphPageTreeNode.h: * platform/PopupMenu.h: * platform/RegularExpression.cpp: * platform/ScrollBar.h: * platform/Shared.h: Removed. * platform/SharedBuffer.h: * platform/StringImpl.h: * platform/graphics/Icon.h: * platform/graphics/svg/SVGResource.h: * platform/network/FormData.h: * platform/network/ResourceHandleClient.h: * rendering/RenderStyle.h: * rendering/SVGCharacterLayoutInfo.h: * storage/SQLResultSetRowList.h: * xml/DOMParser.h: * xml/XMLSerializer.h: * xml/XPathEvaluator.h: * xml/XPathExpression.h: * xml/XPathNSResolver.h: * xml/XPathResult.h: 2007-11-13 Brady Eidson JS bindings by Anders, reviewed by Brady WebCore changes by Brady, reviewed by Anders and Tim Adapt to the new iteration of the HTML5 client-side storage spec. Based largely on implementation feedback we generated in landing our first version of this API and also on the input of others in the community, the database spec went through a large overhaul that addresses many concerns. Amongst other changes/improvements: - SQLTransaction object is added and all transactions are explicit. In addition, since the API manages transactions explicitly, transaction-related language in SQL statements is disallowed - executeSql() is now on a transaction object instead of the database object. - Database.changeVersion() now takes place within the context of a transaction. Therefore the version change can be atomic along with the statements that modify the DB schema Most of the logic now takes place during the "transaction steps," which the specification clearly lays out as a chain of events on the SQLTransaction object where processing is handed off between being processed asynchronously and calling back up to javascript. To accomplish this voodoo, SQLTransaction has a series of methods that roughly match up with the "transaction steps" and it keeps a pointer to the next step. * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDatabaseCustom.cpp: (WebCore::JSDatabase::changeVersion): Adapt to the new API (WebCore::JSDatabase::transaction): Added * bindings/js/JSSQLTransactionCustom.cpp: Added. (WebCore::JSSQLTransaction::executeSql): Added * page/DOMWindow.cpp: (WebCore::DOMWindow::openDatabase): Add the new arguments * page/DOMWindow.h: * page/DOMWindow.idl: * page/inspector/DatabasePanel.js: Use the new API * storage/ChangeVersionWrapper.cpp: Added. Implementation of "SQLTransactionWrapper" that enforces changing the version of the database (WebCore::ChangeVersionWrapper::ChangeVersionWrapper): (WebCore::ChangeVersionWrapper::performPreflight): (WebCore::ChangeVersionWrapper::performPostflight): * storage/ChangeVersionWrapper.h: Added. (WebCore::ChangeVersionWrapper::sqlError): * storage/Database.cpp: Removed the "main thread" and "background thread" sqlite handles as all sqlite operations can now happen solely on the background thread - most of these changes result from that change (WebCore::Database::Database): Removed an obsolete FIXME (WebCore::Database::openAndVerifyVersion): (WebCore::Database::getVersionFromDatabase): (WebCore::Database::setVersionInDatabase): (WebCore::Database::versionMatchesExpected): Atomically guarantee that the current version and expected version are the same (WebCore::Database::performOpenAndVerify): (WebCore::Database::performTransactionStep): Added, as a hook for the DatabaseTransactionTask on the DatabaseThread (WebCore::Database::changeVersion): Changed for the new API from JS (WebCore::Database::transaction): Added, for the new API from JS (WebCore::Database::scheduleTransaction): Add a transaction to this Database's transaction queue (WebCore::Database::scheduleTransactionStep): Schedule the current transaction to be called on the background thread (WebCore::Database::scheduleTransactionCallback): Schedule the current transaction to perform a callback on the main thread (WebCore::Database::performGetTableNames): (WebCore::Database::deliverAllPendingCallbacks): (WebCore::Database::deliverPendingCallback): (WebCore::Database::setExpectedVersion): * storage/Database.h: * storage/Database.idl: * storage/DatabaseTask.cpp: Changed DatabaseTask to create a mutex on demand, and use the existence of that mutex to replace the m_synchronous flag (WebCore::DatabaseTask::performTask): (WebCore::DatabaseTask::lockForSynchronousScheduling): (WebCore::DatabaseTask::waitForSynchronousCompletion): (WebCore::DatabaseTransactionTask::DatabaseTransactionTask): * storage/DatabaseTask.h: * storage/SQLError.h: New API object * storage/SQLResultSet.cpp: (WebCore::SQLResultSet::SQLResultSet): Small changes to the API object * storage/SQLResultSet.h: * storage/SQLResultSet.idl: * storage/SQLStatement.cpp: Added. (WebCore::SQLStatement::SQLStatement): (WebCore::SQLStatement::execute): Actually execute the sql statement on the SQLiteDatabase if it's still valid (WebCore::SQLStatement::setVersionMismatchedError): Flag this statement as bad before it even starts in case of an actual version vs. expected version mismatch (WebCore::SQLStatement::performCallback): Call the right callback (SQLStatement or SQLStatementError) for this statement * storage/SQLStatement.h: Added. (WebCore::SQLStatement::hasStatementCallback): (WebCore::SQLStatement::hasStatementErrorCallback): (WebCore::SQLStatement::sqlError): Get the error for this statement, if any * storage/SQLTransaction.cpp: Added. (WebCore::SQLTransaction::SQLTransaction): (WebCore::SQLTransaction::executeSQL): Entry point for the API from JS (WebCore::SQLTransaction::enqueueStatement): Add a new statement onto the queue (WebCore::SQLTransaction::performNextStep): Call the method for the next step (WebCore::SQLTransaction::performPendingCallback): Call the method for the pending callback (WebCore::SQLTransaction::openTransactionAndPreflight): Open a transaction to the database and preflight using the SQLTransactionWrapper, if any (WebCore::SQLTransaction::deliverTransactionCallback): Deliver the transaction callback to the javascript thread (WebCore::SQLTransaction::scheduleToRunStatements): Convinience to schedule this transaction on the database thread and make runStatements() the next step (WebCore::SQLTransaction::runStatements): Start running the sql statements queued up for this transaction (WebCore::SQLTransaction::getNextStatement): Bring the next statement off the queue (WebCore::SQLTransaction::runCurrentStatement): Execute the current statement (WebCore::SQLTransaction::deliverStatementCallback): Deliver the SQLStatementCallback for this statement (WebCore::SQLTransaction::postflightAndCommit): Postflight the transaction using SQLTransactionWrapper and commit it (WebCore::SQLTransaction::handleTransactionError): Make the right call for any error that occurred on the Transaction (WebCore::SQLTransaction::deliverTransactionErrorCallback): Deliver the SQLTransactionErrorCallback (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Either do a final commit or rollback to cleanup the transaction after it error'ed out * storage/SQLTransaction.h: (WebCore::SQLTransactionWrapper::~SQLTransactionWrapper): (WebCore::SQLTransaction::database): * storage/SQLTransaction.idl: The following were made obsolete by the new version of the API: * bindings/js/JSCustomSQLCallback.cpp: Removed. * bindings/js/JSCustomSQLCallback.h: Removed. * bindings/js/JSCustomVersionChangeCallback.cpp: Removed. * bindings/js/JSCustomVersionChangeCallback.h: Removed. * storage/DatabaseCallback.cpp: Removed. * storage/DatabaseCallback.h: Removed. * storage/SQLCallback.h: Removed. * storage/SQLCallback.idl: Removed. * storage/VersionChangeCallback.h: Removed. * storage/VersionChangeCallback.idl: Removed. 2007-11-13 Dan Bernstein Reviewed by Beth Dakin. - fix REGRESSION: Cursor does not change to arrow on "X" button in google maps, making it hard to click * css/html4.css: Added a 'cursor: auto' rule for links. * manual-tests/link-cursor-auto.html: Added. 2007-11-13 Dan Bernstein Reviewed by Beth Dakin. - fix Reproducible crash in RenderObject::setStyle involving going Back from a non-HTML document (Bookmarks view, PDF view) The root cause for the crash is that when a non-HTML view enters the frame, the frame's document pointer keeps pointing at the last HTML-type document it contained. This patch does not address the root cause, but makes changes to account for that condition. * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedMainResourceError): Do not change the frame's current document's page cache state here. (WebCore::FrameLoader::invalidateCurrentItemCachedPage): If the frame's current document is in fact the history item being invalidated, then set its page cache state here. 2007-11-12 Antti Koivisto Reviewed by Adele. Fix that 'timeupdate' and 'waiting' events were never dispatched. Add explicit m_paused attribute instead of trying to derive paused state from underlying media. Call updatePlayState() to start/stop media playback when any attribute that affects active playback state changes. This matches specification text. Test: http/tests/media/video-play-stall.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::setReadyState): (WebCore::HTMLMediaElement::paused): (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::pause): (WebCore::HTMLMediaElement::checkIfSeekNeeded): (WebCore::HTMLMediaElement::movieDidEnd): (WebCore::HTMLMediaElement::updatePlayState): * html/HTMLMediaElement.h: 2007-11-13 John Sullivan Reviewed by Darin. removed recently-added PreferredType concept; we found a better way to do what ths was accomplishing * bridge/WindowFeatures.h: (WebCore::WindowFeatures::WindowFeatures): removed definition of PreferredType * page/ContextMenuController.cpp: (WebCore::openNewWindow): removed use of PreferredType 2007-11-12 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=15954 Move DOM Selection operations out of SelectionController No change in functionality. * editing/SelectionController.cpp: (WebCore::SelectionController::setSelectedRange): * editing/SelectionController.h: * page/DOMSelection.cpp: (WebCore::DOMSelection::anchorNode): (WebCore::DOMSelection::baseNode): (WebCore::DOMSelection::anchorOffset): (WebCore::DOMSelection::baseOffset): (WebCore::DOMSelection::focusNode): (WebCore::DOMSelection::extentNode): (WebCore::DOMSelection::focusOffset): (WebCore::DOMSelection::extentOffset): (WebCore::DOMSelection::isCollapsed): (WebCore::DOMSelection::type): (WebCore::DOMSelection::rangeCount): (WebCore::DOMSelection::collapse): (WebCore::DOMSelection::collapseToEnd): (WebCore::DOMSelection::collapseToStart): (WebCore::DOMSelection::empty): (WebCore::DOMSelection::setBaseAndExtent): (WebCore::DOMSelection::setPosition): (WebCore::DOMSelection::modify): (WebCore::DOMSelection::extend): (WebCore::DOMSelection::getRangeAt): (WebCore::DOMSelection::removeAllRanges): (WebCore::DOMSelection::addRange): (WebCore::DOMSelection::deleteFromDocument): (WebCore::DOMSelection::containsNode): (WebCore::DOMSelection::selectAllChildren): (WebCore::DOMSelection::toString): * page/DOMSelection.h: Moved all DOM API methods to DOMSelection; changed SelectionController::setSelectedRange() to return its result directly instead of via an ExceptionCode that no caller wanted. * editing/Editor.cpp: (WebCore::Editor::deleteRange): (WebCore::Editor::removeFormattingAndStyle): (WebCore::Editor::selectComposition): (WebCore::Editor::setComposition): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Adapted for SelectionController::setSelectedRange() now returning a bool. SelectionController::toString() is no longer avasilable, use plainText() explicitly. * WebCore.base.exp: Changed SelectionController::setSelectedRange() signature. 2007-11-12 Dan Bernstein Reviewed by Darin Adler. - Most of www.aol.com still redraws unnecessarily when headline/photo section changes Test: fast/repaint/invisible-objects.html Avoid repainting invisible blocks if they are enclosed in a layer that contains no visible objects. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): * rendering/RenderBox.cpp: (WebCore::RenderBox::absoluteClippedOverflowRect): 2007-11-12 Timothy Hatcher Reviewed by Mark Rowe. Prevent selecting a word in the breadcrumb or the styles section when double clicking on a DOM node in the outline tree. * page/inspector/DocumentPanel.js: Call preventDefault() when a mousedown event with a detail of 2 or higher comes in. This prevents the selection. * page/inspector/inspector.css: Mark the breadcrumb as user-select: none. 2007-11-12 Oliver Hunt Reviewed by John S. REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460) EventHandler needs to reset these fields when a drag terminates, otherwise EventHandler is left in an inconsistent state when a drag is initiated on a page with multiple frames. * page/EventHandler.cpp: (WebCore::EventHandler::cancelDragAndDrop): (WebCore::EventHandler::performDragAndDrop): (WebCore::EventHandler::clearDragState): * page/EventHandler.h: 2007-11-12 Oliver Hunt Reviewed by Darin and Antti. Return behaviour for 0 sized pattern back to what it was prior to r27704 This change in behaviour broke two layout tests in DRT, so correcting it corrects existing tests. * platform/graphics/cg/ImageBufferCG.cpp: 2007-11-12 Timothy Hatcher Reviewed by John. REGRESSION (Safari 2-3): Exception thrown when calling -[WebDataSource subresources] * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]): If the SharedBuffer is null insert an empty NSData instead of nil. 2007-11-12 Darin Adler Reviewed by Tim. - http://bugs.webkit.org/show_bug.cgi?id=15947 speed up page loading a bit by inlining * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange): Factored out the slow case of isScheduledLocationChangePending into this. * loader/FrameLoader.h: (WebCore::FrameLoader::isScheduledLocationChangePending): Added an inline check of the far and away most common case, where m_scheduledRedirection is 0; the rest is in the isLocationChange function. 2007-11-12 George Staikos Reviewed by Tim. Extract the text match marker highlight color into RenderTheme instead of the hardcoded yellow. * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintTextMatchMarker): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::platformTextSearchHighlightColor): * rendering/RenderTheme.h: 2007-11-12 Mark Rowe Fix deadlock on launch on the Mac. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): Restore unlock that was mistakenly removed in r27717. 2007-11-12 Justin Haygood Reviewed by Brady. http://bugs.webkit.org/show_bug.cgi?id=15955 Reimplement threading functions in IconDatabase and SQLiteDatabase in terms of the threading abstractions * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): (WebCore::IconDatabase::close): * loader/icon/IconDatabase.h: * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::open): (WebCore::SQLiteDatabase::close): * platform/sql/SQLiteDatabase.h: 2007-11-12 Adam Roben Windows build fix * config.h: Touch because VS apparently can't figure out which files depend on ResourceResponse.h. * WebCore.vcproj/WebCore.vcproj: Add ResourceResponseBase files to project and remove old ResourceResponse files. 2007-11-12 Julien Chaffraix Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=15334 Split ResourceResponse into platform specific files * WebCore.base.exp: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/network/ResourceResponse.cpp: Removed. * platform/network/ResourceResponse.h: Removed. * platform/network/ResourceResponseBase.cpp: Copied from platform/network/ResourceResponse.cpp. (WebCore::ResourceResponseBase::asResourceResponse): (WebCore::ResourceResponseBase::isHTTP): (WebCore::ResourceResponseBase::url): (WebCore::ResourceResponseBase::setUrl): (WebCore::ResourceResponseBase::mimeType): (WebCore::ResourceResponseBase::setMimeType): (WebCore::ResourceResponseBase::expectedContentLength): (WebCore::ResourceResponseBase::setExpectedContentLength): (WebCore::ResourceResponseBase::textEncodingName): (WebCore::ResourceResponseBase::setTextEncodingName): (WebCore::ResourceResponseBase::suggestedFilename): (WebCore::ResourceResponseBase::setSuggestedFilename): (WebCore::ResourceResponseBase::httpStatusCode): (WebCore::ResourceResponseBase::setHTTPStatusCode): (WebCore::ResourceResponseBase::httpStatusText): (WebCore::ResourceResponseBase::setHTTPStatusText): (WebCore::ResourceResponseBase::httpHeaderField): (WebCore::ResourceResponseBase::setHTTPHeaderField): (WebCore::ResourceResponseBase::httpHeaderFields): (WebCore::ResourceResponseBase::isAttachment): (WebCore::ResourceResponseBase::setExpirationDate): (WebCore::ResourceResponseBase::expirationDate): (WebCore::ResourceResponseBase::setLastModifiedDate): (WebCore::ResourceResponseBase::lastModifiedDate): (WebCore::ResourceResponseBase::updateResourceResponse): * platform/network/ResourceResponseBase.h: Copied from platform/network/ResourceResponse.h. (WebCore::ResourceResponseBase::ResourceResponseBase): * platform/network/cf/ResourceResponse.h: Added. (WebCore::ResourceResponse::ResourceResponse): * platform/network/curl/ResourceResponse.h: Added. (WebCore::ResourceResponse::ResourceResponse): (WebCore::ResourceResponse::doUpdateResourceResponse): * platform/network/mac/ResourceResponse.h: Added. (WebCore::ResourceResponse::ResourceResponse): * platform/network/qt/ResourceResponse.h: Added. (WebCore::ResourceResponse::ResourceResponse): (WebCore::ResourceResponse::doUpdateResourceResponse): 2007-11-11 Justin Haygood Reviewed by Adam Roben. http://bugs.webkit.org/show_bug.cgi?id=15939 Adds a currentThread API for use by SQLiteDatabase, etc. * platform/Threading.h: * platform/ThreadingNone.cpp: (WebCore::currentThread): * platform/gtk/ThreadingGtk.cpp: (WebCore::identifierByGthreadHandle): (WebCore::): * platform/pthreads/ThreadingPthreads.cpp: (WebCore::identifierByPthreadHandle): (WebCore::currentThread): 2007-11-11 Dan Bernstein Reviewed by Adam Roben. - fix http://bugs.webkit.org/show_bug.cgi?id=15942 REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange()) Test: editing/selection/cleared-by-relayout.html * editing/Selection.cpp: (WebCore::Selection::toRange): Check if the selection has been cleared by updating layout. 2007-11-11 Darin Adler Reviewed by Mark Rowe. - fix line numbers that were off since my recent patch * platform/SegmentedString.h: (WebCore::SegmentedSubstring::SegmentedSubstring): Reversed the sense of m_excludeLineNumbers and rename it to m_doNotExcludeLineNumbers. (WebCore::SegmentedSubstring::excludeLineNumbers): Updated. (WebCore::SegmentedSubstring::doNotExcludeLineNumbers): Added. (WebCore::SegmentedSubstring::setExcludeLineNumbers): Updated. (WebCore::SegmentedString::advance): Use doNotExcludeLineNumbers to reverse the sense and fix the regression, but keep the speediness. I accidentally had removed a ! here. * platform/SegmentedString.cpp: (WebCore::SegmentedString::advanceSlowCase): Use doNotExcludeLineNumbers. 2007-11-11 Oliver Hunt Reviewed by Darin. Fix for numfuzz: integer overflows opening malformed SVG file in WebCore::ImageBuffer::create. Add protection against a potential overflow. * platform/graphics/cg/ImageBufferCG.cpp: 2007-11-11 Antti Koivisto Reviewed by Darin. Fix a bunch of cases where the exception code is checked by the function but is not zeroed first. * bindings/js/kjs_binding.cpp: (KJS::setDOMException): * dom/Attr.cpp: (WebCore::Attr::setPrefix): * dom/Document.cpp: (WebCore::Document::createElement): * dom/Element.cpp: (WebCore::Element::setPrefix): * dom/Range.cpp: (WebCore::Range::setStart): (WebCore::Range::setEnd): (WebCore::Range::isPointInRange): (WebCore::Range::comparePoint): (WebCore::Range::compareBoundaryPoints): (WebCore::Range::deleteContents): (WebCore::Range::processContents): (WebCore::Range::extractContents): (WebCore::Range::insertNode): (WebCore::Range::setStartAfter): (WebCore::Range::setEndBefore): (WebCore::Range::setEndAfter): (WebCore::Range::selectNode): (WebCore::Range::surroundContents): (WebCore::Range::setStartBefore): * editing/TextIterator.cpp: (WebCore::TextIterator::TextIterator): * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::createPattern): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::pause): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::add): (WebCore::HTMLSelectElement::setOption): * xml/XPathEvaluator.cpp: (WebCore::XPathEvaluator::evaluate): 2007-11-11 Darin Adler Reviewed by Mitz. - http://bugs.webkit.org/show_bug.cgi?id=15945 speed up GraphicsContextCG typical case by skipping roundToDevicePixels * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::restorePlatformState): Clear the flag since we no longer know if the transform is identity or not. (WebCore::GraphicsContext::strokeArc): Removed an extra set of redundant CGContextSave/RestoreGState. (WebCore::GraphicsContext::beginTransparencyLayer): Clear the flag since we no longer know if the transform is identity or not. (WebCore::GraphicsContext::endTransparencyLayer): Ditto. (WebCore::GraphicsContext::scale): Ditto. (WebCore::GraphicsContext::rotate): Ditto. (WebCore::GraphicsContext::translate): Ditto. (WebCore::GraphicsContext::concatCTM): Ditto. (WebCore::GraphicsContext::roundToDevicePixels): Return quickly if the transform is known to be identity, and record that fact when we discover it otherwise. * platform/graphics/cg/GraphicsContextPlatformPrivate.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Added a m_userToDeviceTransformKnownToBeIdentity flag, initialized to false. 2007-11-11 Darin Adler Reviewed by Mitz. - http://bugs.webkit.org/show_bug.cgi?id=15944 streamline SegmentedString to speed up parsing I measured a speed-up of the page load test while developing this patch. I don't have a precise figure, though. * html/HTMLTokenizer.h: Removed unneeded lineNumberPtr() function. Also renamed lineno to m_lineNumber. * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::processListing): Don't pass 0 to the advance function since we don't want to update a line number. (WebCore::HTMLTokenizer::parseSpecial): Ditto. (WebCore::HTMLTokenizer::parseComment): Pass the line number data member directly instead of lineNumberPtr() since the advance function now takes a reference. (WebCore::HTMLTokenizer::parseServer): Ditto. (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto. (WebCore::HTMLTokenizer::parseText): Ditto. (WebCore::HTMLTokenizer::parseEntity): Ditto. (WebCore::HTMLTokenizer::parseTag): Ditto. (WebCore::HTMLTokenizer::write): Ditto. * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::write): * loader/TextDocument.cpp: (WebCore::TextTokenizer::write): Don't pass 0 to the advance function. * platform/SegmentedString.h: (WebCore::SegmentedString::advance): Streamlined the most common case, and pushed less common cases into a separate function that is not inlined. Also got rid of a branch by separating the case with a line number from the case without one. * platform/SegmentedString.cpp: (WebCore::SegmentedString::advanceSlowCase): Added. The aforementioned less common cases are here. 2007-11-11 Antti Koivisto Forgot to do this review change (and test HTTP commit). * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::play): 2007-11-11 Antti Koivisto Reviewed by Darin. - Update play() and pause() to match current HTML5 draft - send events asynchronously - add timeupdate event to pause - rethrow load() exception, not others - Use list for async events to get ordering right Tests: media/video-pause-empty-events.html media/video-play-empty-events.html media/video-play-pause-events.html media/video-play-pause-exception.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::dispatchEventAsync): (WebCore::HTMLMediaElement::asyncEventTimerFired): (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::pause): * html/HTMLMediaElement.h: 2007-11-11 Nikolas Zimmermann Reviewed by Eric. Fixes: http://bugs.webkit.org/show_bug.cgi?id=6424 (, dominant-baseline attribute is not respected) Add (basic) support for dominant-baseline / alignment-baseline text properties. Note: there are no official testcases, and no-one implemented it before. Only ASV3 supported dominant-baseline, but not correct it seems. * rendering/SVGRootInlineBox.cpp: (WebCore::dominantBaselineToShift): (WebCore::alignmentBaselineToShift): (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): 2007-11-11 Adam Roben Add wrappers around CoCreateInstance to COMPtr I followed the example of the Query constructor and query method by adding a Create constructor and create method. Reviewed by Darin. * platform/win/COMPtr.h: (COMPtr::COMPtr): Added a new constructor that calls CoCreateInstance. (COMPtr::create): Added. (COMPtr::createInstance): Added. 2007-11-11 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=15896 More editing cleanup No functionality changes. * dom/Node.h: Moved several editing-related methods elsewhere. * dom/Node.cpp: (WebCore::Node::maxCharacterOffset): Renamed from maxOffset() to highlight that it is a match to offsetInCharacters(), and much different from other offset-related methods. Added ASSERT_NOT_REACHED(), as callers are supposed to check offsetInCharacters() before calling this. * dom/CharacterData.cpp: (WebCore::CharacterData::maxCharacterOffset): * dom/CharacterData.h: (WebCore::CharacterData::isCharacterDataNode): Updated for above renamings. * dom/Comment.{h,cpp}: Removed an override for offsetInCharacters(), which is already present in CharacterData. * dom/Document.{h,cpp}: Folded updateSelection() into Frame::selectionLayoutChanged(). * dom/Position.h: * dom/Position.cpp: (WebCore::Position::uncheckedPreviousOffset): Moved from Node::previousOffset(). (WebCore::Position::uncheckedNextOffset): Moved from Node::NextOffset(). (WebCore::Position::previous): Adapted to the above move. (WebCore::Position::next): Ditto. (WebCore::Position::upstream): Removed an isBR() check, since a non-BR element cannot have a BR renderer (I think), and BR elements are covered by editingIgnoresContent(). (WebCore::Position::downstream): Ditto. (WebCore::caretMaxRenderedOffset): Moved from Node::caretMaxRenderedOffset(). (WebCore::Position::rendersInDifferentPosition): Updated for the above moves. * dom/PositionIterator.h: Added a comment describing this class from the original check-in. * dom/PositionIterator.cpp: (WebCore::PositionIterator::increment): Updated for the above moves. (WebCore::PositionIterator::decrement): Ditto. * dom/ProcessingInstruction.h: * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::maxCharacterOffset): ProcessingInstruction was already returning true from offsetInCharacters(), but didn't override maxCharacterOffset(). I think that implementing it has no actual effect, as PIs are not rendered, but it looks cleaner this way. * dom/Range.cpp: (WebCore::Range::selectNodeContents): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): (WebCore::ApplyStyleCommand::applyInlineStyle): (WebCore::maxRangeOffset): (WebCore::ApplyStyleCommand::removeInlineStyle): (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded): (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded): (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded): (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded): (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::insertNodeAt): (WebCore::CompositeEditCommand::positionOutsideTabSpan): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::handleGeneralDelete): * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::insertTab): * editing/visible_units.cpp: (WebCore::previousLinePosition): (WebCore::nextLinePosition): Updated for the above moves. * editing/Editor.cpp: (WebCore::Editor::advanceToNextMisspelling): Added a missing rangeCompliantEquivalent() call. * editing/TextIterator.cpp: (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Changed the condition to obviously match a maxCharacterOffset() call made after it; hopefully, this doesn't break any border cases. (WebCore::SimplifiedBackwardsTextIterator::advance): Updated for the above moves. * editing/htmlediting.h: * editing/htmlediting.cpp: (WebCore::canHaveChildrenForEditing): Removed a bogus comment: I don't thin BRs have a special ability to accept child nodes, other than via DOM manipulation, which is not specific to BRs. (WebCore::rangeCompliantEquivalent): Removed a check for BR, which is already covered by editingIgnoresContent(). (WebCore::maxDeepOffset): Ditto. (WebCore::caretMinOffset): Moved from Node. Changed some runtime checks that seemingly cannot fail into assertions. (WebCore::caretMaxOffset): Ditto. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): Pass 0 to VisiblePosition constructor instead of caretMinOffset. I didn't want to include htmlediting.h here, and I think that VisiblePosition constructor will take care of adjusting the offset. * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): Folded Document::updateSelection() here. * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]): Added missing rangeCompliantEquivalent() calls. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForRenderer): Changed to not round-trip via editing. Changed some runtime checks that seemingly cannot fail into assertions. 2007-11-11 Darin Adler Reviewed by Sam. - updated for JSRegExp function changes * platform/RegularExpression.cpp: (WebCore::RegularExpression::Private::compile): (WebCore::RegularExpression::match): 2007-11-10 Mark Rowe Qt Linux build fix. * platform/UnicodeRange.h: 2007-11-10 Mark Rowe Qt Windows build fix. * platform/UnicodeRange.h: 2007-11-10 Nikolas Zimmermann Reviewed by Eric. Fixes: http://bugs.webkit.org/show_bug.cgi?id=15937 (Add glyph-orientation-horizontal/vertical support) Fixes: http://bugs.webkit.org/show_bug.cgi?id=13971 (text-anchor support on vertical text seems slightly off) Add glyph-orientation-* support for text & textPath. (90/180/270 and 'auto') Also fix all vertical text handling - for text & textPath! (especially latin1 characters auto orientation in vertical writing modes) * WebCore.pro: Add platform/UnicodeRange.cpp to build * WebCore.xcodeproj/project.pbxproj: Dito. * rendering/SVGCharacterLayoutInfo.cpp: Respect orientationShiftX/Y & angle in characterTransform() (WebCore::SVGChar::characterTransform): * rendering/SVGCharacterLayoutInfo.h: New variables. (WebCore::SVGCharOnPath::SVGCharOnPath): (WebCore::SVGChar::SVGChar): * rendering/SVGRootInlineBox.cpp: Added glyph-orientation-* handling. (WebCore::glyphOrientationToAngle): (WebCore::glyphOrientationIsMultiplyOf180Degrees): (WebCore::calculateGlyphAdvanceAndShiftRespectingOrientation): (WebCore::cummulatedHeightOfInlineBoxCharacterRange): (WebCore::cummulatedWidthOrHeightOfTextChunk): (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): 2007-11-10 Timothy Hatcher Reviewed by Sam Weinig. * page/inspector/StylesSidebarPane.js: Fix the wording of a comment and switch over to use getUniqueProperties in another place. 2007-11-10 John Sullivan Reviewed by Sam Weinig Rest of fix for 5394877 * bindings/js/kjs_window.cpp: (KJS::Window::isSafeScript): Don't log unsafe JavaScript attempts in the other version of isSafeScript() if in private browsing mode either. 2007-11-10 Nikolas Zimmermann Reviewed by Oliver. Fix function name difference - header said 'unicodeRangeForCharacter', actually implemented function is 'findCharUnicodeRange'. They are not compiled yet. * platform/UnicodeRange.h: 2007-11-10 Dan Bernstein Reviewed by Darin Adler. - fix Control-clicking text in a link can surprisingly select only part of the link, should select entire link No test because context menu events cannot be tested in DumpRenderTree. * page/EventHandler.cpp: (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Added. If the click occurred in an active link, selects the entire link element. Otherwise selects the closest word. (WebCore::EventHandler::sendContextMenuEvent): Call selectClosestWordOrLinkFromMouseEvent(). * page/EventHandler.h: 2007-11-10 John Sullivan Reviewed by Tim Hatcher - fixed Safari should not log unsafe JavaScript attempts when in private browsing mode (only an issue if Log JavaScript Exceptions is turned on) * bindings/js/kjs_window.cpp: (KJS::Window::isSafeScript): Don't log unsafe JavaScript attempts to console or chromeClient if in private browsing mode 2007-11-10 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=15922 Implement more of Mozilla Selection API Tests: editing/selection/containsNode.html editing/selection/deleteFromDocument.html editing/selection/extend.html editing/selection/selectAllChildren.html * editing/SelectionController.cpp: (WebCore::SelectionController::deleteFromDocument): (WebCore::SelectionController::containsNode): (WebCore::SelectionController::selectAllChildren): (WebCore::SelectionController::extend): * editing/SelectionController.h: Added deleteFromDocument(), containsNode(), and selectAllChildren(). Reimplemented extend(), which existed, but didn't match Firefox behavior and wasn't exposed via bindings. Removed a comment mentioning removeRange(), as this method makes no sense without multiple selection range support. * page/DOMSelection.cpp: (WebCore::DOMSelection::extend): (WebCore::DOMSelection::deleteFromDocument): (WebCore::DOMSelection::containsNode): (WebCore::DOMSelection::selectAllChildren): * page/DOMSelection.h: * page/DOMSelection.idl: Exposed the new methods. 2007-11-10 Alexey Proskuryakov Reviewed by Darin. http://bugs.webkit.org/show_bug.cgi?id=15892 DOM Range operations are not implemented for ProcessingInstruction nodes Test: fast/dom/Range/range-processing-instructions.html * dom/Range.cpp: (WebCore::Range::processContents): Implemented ProcessingInstruction cases. (WebCore::Range::checkNodeWOffset): Removed a FIXME - yes, I think that we are supposed to use ProcessingInstruction.data. 2007-11-09 Timothy Hatcher Reviewed by Mark Rowe. Bug 12054: Ability to serialize an element subtree (into clipboard?) from the DOM inspector http://bugs.webkit.org/show_bug.cgi?id=12054 - Add support code for routing copy events to the focused element. - Implement copying the currently selected DOM node. The node and it's subtree is copied to the clipboard. If the node has no outerHTML, the nodeValue is copied (text nodes, etc.) - Implement copy for the resource sidebar. The URL is copied for the currently selected resource. * page/inspector/DocumentPanel.js: * page/inspector/inspector.js: 2007-11-09 Antti Koivisto Reviewed by Adele. Fix occasional blank video with poster attribute. * ChangeLog: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::load): (WebCore::HTMLMediaElement::didRestoreFromCache): Just calling updateFromElement() does the right thing for both poster image and video. 2007-11-04 Sam Weinig Reviewed by Adam Roben. The COM bindings for the DOM should be autogenerated like the other DOM bindings Initial commit of the autogeneration of the COM DOM Bindings. No behavior change is being introduced in this patch and to insure that no conflicts arise, a temporary prefix of "GEN_" has been used for all the new classes. The build architecture for these bindings differs slightly from the other autogenerated bindings. Instead of building in WebCore and migrating the resuting code to WebKit (as is done for the Objective-C bindigs currently), the IDLs and generation scripts are migrated to WebKit and built there. This is done with a series of scripts and Makefiles. This commit includes: - Hand rolled root class/Interface GEN_DOMObject used to facilated object creation and ref-counting. - Generating all of the Core DOM and most of HTML and CSS - Generating Event, EventTarget, and EventListener * WebCore.vcproj/MigrateIDLAndScripts.make: Added. * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/migrate-idls.sh: Added. * bindings/scripts/CodeGenerator.pm: * bindings/scripts/CodeGeneratorCOM.pm: Added. * dom/EventListener.h: Make the isWindowEvent parameter default to false to allow autogeneration based on the IDL. 2007-11-09 Tristan O'Tierney Reviewed by Timothy Hatcher. This patch is for the WebKit side of . We need a way to tell context menu navigations, such as "Open in New Window" to override any sort of browser preference for tab based navigation. * bridge/WindowFeatures.h: (WebCore::WindowFeatures::WindowFeatures): Added a new struct member var, preferredType and an accompanying enum type PreferredType to send a window type recommendation up to the Chrome. * page/ContextMenuController.cpp: (WebCore::openNewWindow): Set the window features to recommend a new Window for "Open in New Window" context menu action. 2007-11-08 Adam Roben Fix Pressing Enter on selected buttons should fire onclick We now match the behavior of Firefox and IE, which is to always just send a click event to the focused button when the Enter key is pressed (previously we were submitting forms directly in some cases). Reviewed by Adele. Test: fast/forms/enter-clicks-buttons.html * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::defaultEventHandler): Don't do anything fancy when Enter is pressed on a