2009-06-10 Tor Arne Vestbø Reviewed by Simon Hausmann. Fix the build of PluginView on Qt with 64-bit where we disable plugins at compile time. Use the FooNone.cpp files at compile-time. * plugins/PluginPackageNone.cpp: * plugins/mac/PluginPackageMac.cpp: * plugins/mac/PluginViewMac.cpp: 2009-06-08 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Don't enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH on Windows This define was brought in after refactoring some code from PluginPackage(Qt|Gtk).cpp into the shared PluginPackage.cpp. * WebCore.pro: 2009-06-08 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Use $QMAKE_PATH_SEP instead of hardcoded / to fix Windows build * WebCore.pro: 2009-06-08 Laszlo Gombos Reviewed by Ariya Hidayat. [Qt] Build fix when NETSCAPE_PLUGIN_API support is turned off https://bugs.webkit.org/show_bug.cgi?id=26244 * WebCore.pro: Define PLUGIN_PACKAGE_SIMPLE_HASH only if NETSCAPE_PLUGIN_API is turned on * plugins/PluginPackage.cpp: Guard initializeBrowserFuncs() * plugins/PluginViewNone.cpp: Match guards with PluginView.h 2009-06-07 Dan Bernstein Reviewed by Sam Weinig. - fix -[WebView _selectionIsAll] returns YES when the selection is inside a text field. * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::isAll): Return false if the selection is in a shadow tree. 2009-06-07 Gustavo Noronha Silva Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=26106 [GTK] Crashes when you keep a combo open during a page transition, then close it Hide the combo popup and disconnect from its signals during PopupMenu destruction to handle this exceptional case with no crash. * platform/gtk/PopupMenuGtk.cpp: (WebCore::PopupMenu::~PopupMenu): (WebCore::PopupMenu::menuUnmapped): 2009-06-06 Sam Weinig Reviewed by Dan Bernstein. Fix for REGRESSION (r43797): Serif and fantasy font-family names are wrong in result of getComputedStyle Test: fast/css/font-family-builtins.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::identifierForFamily): Fix typo. Fantasy family should be -webkit-fantasy not, -webkit-serif. 2009-06-06 Sam Weinig Reviewed by Brady Eidson. Fix for Need to support StorageEvent.storageArea to meet the Web Storage spec * storage/LocalStorageArea.cpp: (WebCore::LocalStorageArea::dispatchStorageEvent): Pass the localStorage for the frame being dispatched to. * storage/SessionStorageArea.cpp: (WebCore::SessionStorageArea::dispatchStorageEvent): Ditto, only for sessionStorage. * storage/StorageEvent.cpp: (WebCore::StorageEvent::StorageEvent): (WebCore::StorageEvent::initStorageEvent): * storage/StorageEvent.h: (WebCore::StorageEvent::create): (WebCore::StorageEvent::storageArea): * storage/StorageEvent.idl: Add storageArea member. 2009-06-05 Nikolas Zimmermann Reviewed by Anders Carlsson. Fix WMLInputElement initialization code. Don't call initialize() on attach(), let WMLCardElement handle initialization once, after the document has been parsed. To keep layout tests working introduce a new function in Document.idl: initializeWMLPageState(). WMLTestCase.js (the wml/ layout test framework) will use it to simulate a regular WML document, whose variable state gets initialized on WMLDocument::finishedParsing(). Force initialization of the WML variable state, right after the dynamically created elements have been inserted into the tree. * dom/Document.cpp: (WebCore::Document::initializeWMLPageState): * dom/Document.h: * dom/Document.idl: * wml/WMLCardElement.cpp: (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded): * wml/WMLDocument.cpp: (WebCore::WMLDocument::finishedParsing): (WebCore::WMLDocument::initialize): * wml/WMLDocument.h: * wml/WMLInputElement.cpp: (WebCore::WMLInputElement::initialize): * wml/WMLInputElement.h: 2009-06-05 Sam Weinig Reviewed by Anders Carlsson. Add ononline and onoffline attributes for the element. * html/HTMLAttributeNames.in: Added ononlineAttr and onofflineAttr. * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): Map ononlineAttr and onofflineAttr to window event listeners. 2009-06-05 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Add missing includes of config.h * platform/qt/QWebPopup.cpp: * platform/text/qt/TextBreakIteratorQt.cpp: 2009-06-05 Fumitoshi Ukai Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=26215 Try to fix the Chromium build. * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp: (WebCore::fillBMPGlyphs): (WebCore::fillNonBMPGlyphs): 2009-06-05 Shinichiro Hamaji Bug 26160: Compile fails in MacOSX when GNU fileutils are installed Reviewed by Alexey Proskuryakov. Use /bin/ln instead of ln for cases where this command is used with -h option. As this option is not supported by GNU fileutils, this change helps users who have GNU fileutils in their PATH. * WebCore.xcodeproj/project.pbxproj: 2009-06-03 Ben Murdoch HTML5 Database stops executing transactions if the URL hash changes while a transaction is open and an XHR is in progress. Reviewed by Alexey Proskuryakov. Fix a bug that causes database transactions to fail if a history navigation to a hash fragment of the same document is made while resources (e.g. an XHR) are loading Test: storage/hash-change-with-xhr.html * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::stopLoading): * loader/DocumentLoader.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): (WebCore::FrameLoader::stopAllLoaders): * loader/FrameLoader.h: * loader/FrameLoaderTypes.h: (WebCore::): * page/Page.cpp: (WebCore::Page::goToItem): * WebCore.base.exp: 2009-06-03 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Make sure the correct config.h is included when shadowbuilding * WebCore.pro: 2009-06-05 Tor Arne Vestbø Reviewed by Simon Hausmann. Fix Qt build after r44452 * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandler::sendResponseIfNeeded): 2009-06-05 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Remove some dead code (MenuEventProxy) * WebCore.pro: * platform/ContextMenu.h: * platform/qt/ContextMenuQt.cpp: * platform/qt/MenuEventProxy.h: Removed. 2009-06-05 Xan Lopez More build fixes. * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: (WebCore::GlyphPage::fill): 2009-06-05 Xan Lopez Fix the GTK+ build. * GNUmakefile.am: * platform/graphics/gtk/FontCacheGtk.cpp: (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp: (WebCore::GlyphPage::fill): 2009-06-05 Antti Koivisto Try to fix Windows (and possibly other platforms) build. Restore ResourceResponseBase::lastModifiedDate() and setLastModifiedDate() removed in previous commit. for now since PluginStream used on some platforms expects them and calculations differ from plain Last-modified header value. Also include to get isfinite(). * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::adopt): (WebCore::ResourceResponseBase::copyData): (WebCore::ResourceResponseBase::setLastModifiedDate): (WebCore::ResourceResponseBase::lastModifiedDate): * platform/network/ResourceResponseBase.h: * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit): 2009-06-03 Antti Koivisto Reviewed by Dave Kilzer. https://bugs.webkit.org/show_bug.cgi?id=13128 Safari not obeying cache header Implement RFC 2616 cache expiration calculations in WebKit instead of relying on the networking layer. * ForwardingHeaders/runtime/DateMath.h: Added. * WebCore.base.exp: * loader/Cache.cpp: (WebCore::Cache::revalidationSucceeded): * loader/CachedResource.cpp: (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::isExpired): (WebCore::CachedResource::currentAge): (WebCore::CachedResource::freshnessLifetime): (WebCore::CachedResource::setResponse): (WebCore::CachedResource::updateResponseAfterRevalidation): (WebCore::CachedResource::mustRevalidate): * loader/CachedResource.h: * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::ResourceResponseBase): (WebCore::ResourceResponseBase::adopt): (WebCore::ResourceResponseBase::copyData): (WebCore::ResourceResponseBase::setHTTPHeaderField): (WebCore::ResourceResponseBase::parseCacheControlDirectives): (WebCore::ResourceResponseBase::cacheControlContainsNoCache): (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate): (WebCore::ResourceResponseBase::cacheControlMaxAge): (WebCore::parseDateValueInHeader): (WebCore::ResourceResponseBase::date): (WebCore::ResourceResponseBase::age): (WebCore::ResourceResponseBase::expires): (WebCore::ResourceResponseBase::lastModified): (WebCore::ResourceResponseBase::isAttachment): (WebCore::ResourceResponseBase::compare): * platform/network/ResourceResponseBase.h: * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::ResourceResponse::platformLazyInit): * platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::platformLazyInit): 2009-06-04 Roland Steiner Reviewed by Eric Seidel. Bug 26201: Remove superfluous 'if' statements in RenderTable::addChild https://bugs.webkit.org/show_bug.cgi?id=26201 * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): remove superfluous 'if' statements 2009-06-04 Roland Steiner Reviewed by Eric Seidel. Bug 26202: add macros for primitive values to simplify CSSStyleSelector::applyProperty https://bugs.webkit.org/show_bug.cgi?id=26202 * css/CSSStyleSelector.cpp: add HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE[_WITH_VALUE] macros (WebCore::CSSStyleSelector::applyProperty): use new macros 2009-06-04 Roland Steiner Reviewed by Eric Seidel Bug 26203: Move parsing of 'attr(X)' values to own method https://bugs.webkit.org/show_bug.cgi?id=26203 * css/CSSParser.cpp: (WebCore::CSSParser::parseAttr): new method (WebCore::CSSParser::parseContent): use new parseAttr method * css/CSSParser.h: (WebCore::CSSParser::parseAttr): new method 2009-06-04 Roland Steiner Reviewed by Eric Seidel. Bug 26205: RenderTableSection::addChild : correct comment https://bugs.webkit.org/show_bug.cgi?id=26205 * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild): correct comment 2009-06-04 Roland Steiner Reviewed by Eric Seidel. Bug 26204: RenderBlock : simplify handleSpecialChild, comment correction https://bugs.webkit.org/show_bug.cgi?id=26204 * rendering/RenderBlock.cpp: (WebCore::RenderBlock::handleSpecialChild): simplify usage (WebCore::RenderBlock::handlePositionedChild): simplify usage (WebCore::RenderBlock::handleFloatingChild): simplify usage (WebCore::RenderBlock::handleRunInChild): simplify usage (WebCore::RenderBlock::layoutBlock): correct comment (WebCore::RenderBlock::layoutBlockChildren): simplify loop, change call to handleSpecialChild * rendering/RenderBlock.h: (WebCore::RenderBlock::handleSpecialChild): change signature (WebCore::RenderBlock::handlePositionedChild): change signature (WebCore::RenderBlock::handleFloatingChild): change signature (WebCore::RenderBlock::handleRunInChild): change signature 2009-06-04 Dan Bernstein - retry to fix the Tiger build * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::initFontData): 2009-06-04 Dan Bernstein - try to fix the Tiger build * platform/graphics/SimpleFontData.h: 2009-06-04 Dan Bernstein - try to fix the Leopard and Tiger builds * platform/graphics/SimpleFontData.h: 2009-06-04 Dan Bernstein - try to fix the Windows build * platform/graphics/win/UniscribeController.cpp: (WebCore::UniscribeController::shapeAndPlaceItem): 2009-06-04 Dan Bernstein Reviewed by Sam Weinig. - make SimpleFontData's data members private - rename SimpleFontData's m_font member to m_platformData * platform/graphics/Font.h: (WebCore::Font::spaceWidth): * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): * platform/graphics/SimpleFontData.h: (WebCore::SimpleFontData::platformData): (WebCore::SimpleFontData::spaceWidth): (WebCore::SimpleFontData::adjustedSpaceWidth): (WebCore::SimpleFontData::syntheticBoldOffset): (WebCore::SimpleFontData::spaceGlyph): (WebCore::SimpleFontData::getNSFont): (WebCore::SimpleFontData::getQtFont): (WebCore::SimpleFontData::getWxFont): * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advance): * platform/graphics/cairo/FontCairo.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::smallCapsFontData): (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::platformWidthForGlyph): * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::smallCapsFontData): (WebCore::SimpleFontData::containsCharacters): (WebCore::SimpleFontData::platformWidthForGlyph): * platform/graphics/gtk/FontGtk.cpp: (WebCore::setPangoAttributes): * platform/graphics/gtk/SimpleFontDataGtk.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::containsCharacters): (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::platformWidthForGlyph): (WebCore::SimpleFontData::setFont): * platform/graphics/gtk/SimpleFontDataPango.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::containsCharacters): (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::platformWidthForGlyph): (WebCore::SimpleFontData::setFont): * platform/graphics/mac/CoreTextController.cpp: (WebCore::CoreTextController::adjustGlyphsAndAdvances): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/mac/FontMacATSUI.mm: (WebCore::initializeATSUStyle): (WebCore::overrideLayoutOperation): (WebCore::ATSULayoutParameters::initialize): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::initFontData): (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformCharWidthInit): (WebCore::SimpleFontData::smallCapsFontData): (WebCore::SimpleFontData::containsCharacters): (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::platformWidthForGlyph): (WebCore::SimpleFontData::checkShapesArabic): (WebCore::SimpleFontData::getCTFont): * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): (WebCore::Font::drawGlyphs): * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformCharWidthInit): (WebCore::SimpleFontData::platformWidthForGlyph): * platform/graphics/win/SimpleFontDataCairoWin.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformDestroy): (WebCore::SimpleFontData::platformWidthForGlyph): (WebCore::SimpleFontData::setFont): * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::initGDIFont): (WebCore::SimpleFontData::smallCapsFontData): (WebCore::SimpleFontData::containsCharacters): (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::widthForGDIGlyph): (WebCore::SimpleFontData::scriptFontProperties): * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::platformWidthForGlyph): 2009-06-04 Paul Godavari Reviewed by Eric Seidel. Initialize the width of PopupMenuListBox properly for Mac Chromium. Added a test that works only with this patch applied. The test is a manual one, since the hit testing infrastructure in the layout tests sends keyboard and mouse events to the main window and not the cocoa control that implements the popup up, which means we can't select items from the popup up. https://bugs.webkit.org/show_bug.cgi?id=25904 * manual-tests/select-narrow-width.html: Added. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::PopupListBox): (WebCore::PopupContainer::showExternal): 2009-06-04 Brent Fulgham Unreviewed Windows build correction. * WebCore.vcproj/WebCore.vcproj: Add missing 'ReplaceNodeWithSpanCommand.cpp' and 'ReplaceNodeWithSpanCommand.h' 2009-02-03 Eric Seidel Reviewed by Justin Garcia. Make sure execCommand("bold") on test only removes the bold and not the underline. https://bugs.webkit.org/show_bug.cgi?id=23496 Test: editing/execCommand/convert-style-elements-to-spans.html * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleDeclaration.h: (WebCore::CSSStyleDeclaration::isEmpty): * dom/NamedAttrMap.h: (WebCore::NamedAttrMap::isEmpty): * editing/ApplyStyleCommand.cpp: (WebCore::isUnstyledStyleSpan): (WebCore::isSpanWithoutAttributesOrUnstyleStyleSpan): (WebCore::ApplyStyleCommand::applyBlockStyle): (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle): (WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes): (WebCore::ApplyStyleCommand::removeCSSStyle): (WebCore::ApplyStyleCommand::applyTextDecorationStyle): (WebCore::ApplyStyleCommand::removeInlineStyle): (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): * editing/ApplyStyleCommand.h: * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::replaceNodeWithSpanPreservingChildrenAndAttributes): * editing/CompositeEditCommand.h: * editing/RemoveNodePreservingChildrenCommand.cpp: (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand): * editing/ReplaceNodeWithSpanCommand.cpp: Added. (WebCore::ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand): (WebCore::swapInNodePreservingAttributesAndChildren): (WebCore::ReplaceNodeWithSpanCommand::doApply): (WebCore::ReplaceNodeWithSpanCommand::doUnapply): * editing/ReplaceNodeWithSpanCommand.h: Added. (WebCore::ReplaceNodeWithSpanCommand::create): 2009-06-04 Brent Fulgham Unreviewed build fix for Windows Cairo target. Add missing post-build command to copy history/cf contents to output directory. * WebCore.vcproj/WebCore.vcproj: Update Debug_Cairo and Release_Cairo target post-build steps with copy commands. 2009-06-04 Pierre d'Herbemont Reviewed by Simon Fraser. Movie controller thumb fails to scale with full page zoom Account for zoom level when drawing media controller thumb on Windows. * rendering/RenderMediaControls.cpp: (WebCore::RenderMediaControls::adjustMediaSliderThumbSize): 2009-06-04 David Hyatt Reviewed by Sam Weinig. Move DOM window focus/blur out of SelectionController and into FocusController. Make sure it fires on the focused frame when the page activation state changes also. This is covered by an existing layout test (albeit badly). I have modified the test to be correct. * editing/SelectionController.cpp: (WebCore::SelectionController::setFocused): * page/FocusController.cpp: (WebCore::FocusController::setFocusedFrame): (WebCore::FocusController::setActive): 2009-06-04 Albert J. Wong Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=26148 Adding in empty files to stage the extract of RenderThemeChromiumSkia from RenderThemeChromiumLinux and RenderThemeChromiumWindows. * rendering/RenderThemeChromiumSkia.cpp: Added. * rendering/RenderThemeChromiumSkia.h: Added. 2009-06-04 Andrei Popescu Reviewed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=25562 Potential crash after ApplicationCacheStorage::storeNewestCache() fails Fix the crash by checking the return value of cacheStorage().storeNewestCache(this) in WebCore::ApplicationCacheGroup::checkIfLoadIsComplete. If storeNewestCache failed, we run the cache failure steps: 1. Fire the error events to all pending master entries, as well any other cache hosts currently associated with a cache in this group. 2. Disassociate the pending master entries from the failed new cache. 3. Reinstate the old "newest cache", if there was one. We also introduce two other changes: 1. a mechanism to rollback storageID changes to the in-memory resource objects when the storing of an ApplicationCache object fails. 2. defer removing the pending master entries from the list of pending master entries until the entire load is complete. This matches the HTML 5 spec better. To track if the load is complete we now introduce a counter for those pending master entries that haven't yet finshed downloading. * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): initializes the new counter to 0 (WebCore::ApplicationCacheGroup::selectCache): increments the counter when a new pending master entry is added. (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): decrements the counter instead of removing the pending master entry. (WebCore::ApplicationCacheGroup::failedLoadingMainResource): decrements the counter instead of removing the pending master entry. (WebCore::ApplicationCacheGroup::setNewestCache): removes an assertion that no longer holds true. In particular, the newest cache is not necessarily new anymore. We can set an old cache as the new cache. This can happen if we failed to store a newly downloaded cache to the database and we are now reinstating the former newest cache. (WebCore::ApplicationCacheGroup::manifestNotFound): resets the counter to 0. (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): check if the loading is complete based on the counter instead of the list of pending master entries. Empty the list of master entries if the load is complete. * loader/appcache/ApplicationCacheGroup.h: add the new counter. * loader/appcache/ApplicationCacheStorage.cpp: introduce the journaling mechanism for in-memory resource objects. (WebCore::ResourceStorageIDJournal::~ResourceStorageIDJournal): (WebCore::ResourceStorageIDJournal::add): (WebCore::ResourceStorageIDJournal::commit): (WebCore::ResourceStorageIDJournal::Record::Record): (WebCore::ResourceStorageIDJournal::Record::restore): (WebCore::ApplicationCacheStorage::store): log the changes to the in-memory resource objects. (WebCore::ApplicationCacheStorage::storeNewestCache): create the journal object. * loader/appcache/ApplicationCacheStorage.h: modify the signature of bool store(ApplicationCache*) to add a pointer to the logger object used to trace the changes to the storageID of the resource objects. 2009-06-04 Jeremy Orlow Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=26154 Allow underscores in the hostnames we parse out of databaseIdentifiers. This code is used for HTML 5 database support. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::createFromDatabaseIdentifier): 2009-06-04 Mihnea Ovidenie Reviewed by Darin Adler. Bug 26084: Multiple missing images in webkit-mask-image prevent rendering https://bugs.webkit.org/show_bug.cgi?id=26084 When painting multiple images, make sure that at least one image is valid before pushing a transparency layer. Added a manual test. * manual-tests/mask-composite-missing-images.html: Added. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintMaskImages): 2009-06-04 Jeremy Orlow Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=26180 Add a fast path for SecurityOrigin::equal. If "other == this" (where other is the other security origin), then we really don't need to do all the other (expensive) comparisons. We know it's equal. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::equal): 2009-06-03 David Hyatt Reviewed by Sam Weinig. Improvements in how selection behaves with focus/activation and a reversion back to using isActive in the scrollbar theme code to remove a Chromium ifdef. * editing/SelectionController.cpp: (WebCore::SelectionController::SelectionController): Make the controller set its focused state correctly upon initial creation. (WebCore::SelectionController::setSelection): Make selection willing to shift the focus node if the selection is focused even if the selection is not active. Whether or not the Page is active is irrelevant to focus changes. (WebCore::SelectionController::setFocused): * editing/SelectionController.h: (WebCore::SelectionController::isFocused): Add a new isFocused() method so that code can check if the Selection is focused without caring about the active state. * page/Frame.cpp: (WebCore::Frame::setFocusedNodeIfNeeded): Allow focus shifts even when the selection is not active. * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::paint): Revert Dan's change to directly talk to AppKit for checking active state. Now that the WebCore isActive method works, ditch the Chromium-specific #ifdef and go back to the original code. 2009-06-04 Pierre d'Herbemont Reviewed by Darin Adler. Test: media/before-load-member-access.html https://bugs.webkit.org/show_bug.cgi?id=26081 * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::played): Ensure that if m_playedTimeRanges, is not initialized we return a valid range, and don't attempt to use it. 2009-06-03 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Implement a way to invalidate the FontCache used by the Qt port. * platform/graphics/qt/FontCacheQt.cpp: (WebCore::FontCache::invalidate): 2009-06-04 Laszlo Gombos Reviewed by Ariya Hidayat. https://bugs.webkit.org/show_bug.cgi?id=26015 [Qt] Single-threaded QtWebKit configuration Turn off Database, DOM storage, icon database and Web Workers support when ENABLE_SINGLE_THREADED is turned on. Set SQLITE_THREADSAFE to false to turn off SQLite mutexes when ENABLE_SINGLE_THREADED is turned on. * WebCore.pro: 2009-06-03 Dan Bernstein Reviewed by Sam Weinig. - add some assertions that Font methods are used on the main thread * platform/graphics/Font.cpp: (WebCore::Font::setShouldUseSmoothing): * platform/graphics/Font.h: (WebCore::Font::primaryFont): * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): 2009-06-03 Dan Bernstein - Windows build fix Rolled out apparently-accidental changes to config.h from r44398. These were not part of the patch as reviewed. * config.h: 2009-06-03 Dmitry Titov Not reviewed, Chromium build fix. https://bugs.webkit.org/show_bug.cgi?id=26177 Reverting 'private' to 'protected' on 2 classes. Chromium glue layer (not yet in Webkit tree) relies on ability to derive Chromium-specific platform classes and access the data members. See bug for more details. * platform/PlatformMouseEvent.h: * platform/PlatformWheelEvent.h: 2009-06-03 Chris Marrin Reviewed by Simon Fraser . Fixed https://bugs.webkit.org/show_bug.cgi?id=26162 This corrects an error when destroying an animation or transition where endAnimation was never getting called and therefore the hardware animation was never getting removed. This includes a manual-test since it's really impossible to make a meaningful automatic test for an animation bug like this. This has no effect unless accelerated compositing is enabled. * manual-tests/interrupted-compound-transform.html: Added. * page/animation/ImplicitAnimation.cpp: (WebCore::ImplicitAnimation::~ImplicitAnimation): * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::~KeyframeAnimation): 2009-06-03 Adam Langley Reviewed by Eric Seidel. Make the scrollbar thumb size twice the width for Chromium Linux. This matches Firefox on Linux. This will need layout test pixel results to be rebaselined in the Chromium tree. http://code.google.com/p/chromium/issues/detail?id=12602 https://bugs.webkit.org/show_bug.cgi?id=26176 * platform/chromium/ScrollbarThemeChromiumLinux.cpp: (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength): * platform/chromium/ScrollbarThemeChromiumLinux.h: 2009-06-03 Adam Langley Reviewed by Eric Seidel. Change Chromium scrollbar theme code to use different classes on Windows and Linux rather than suppling symbols. The ScrollbarTheme class is already using virtual dispatch, so there's no reason not to. This should not affect any layout tests. https://bugs.webkit.org/show_bug.cgi?id=26174 * platform/chromium/ScrollbarThemeChromium.cpp: * platform/chromium/ScrollbarThemeChromium.h: * platform/chromium/ScrollbarThemeChromiumLinux.cpp: (WebCore::ScrollbarTheme::nativeTheme): (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness): (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece): (WebCore::ScrollbarThemeChromiumLinux::paintButton): (WebCore::ScrollbarThemeChromiumLinux::paintThumb): (WebCore::ScrollbarThemeChromiumLinux::buttonSize): * platform/chromium/ScrollbarThemeChromiumLinux.h: Added. * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarTheme::nativeTheme): (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness): (WebCore::ScrollbarThemeChromiumWin::invalidateOnMouseEnterExit): (WebCore::ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin): (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece): (WebCore::ScrollbarThemeChromiumWin::paintButton): (WebCore::ScrollbarThemeChromiumWin::paintThumb): (WebCore::ScrollbarThemeChromiumWin::getThemeState): (WebCore::ScrollbarThemeChromiumWin::getThemeArrowState): (WebCore::ScrollbarThemeChromiumWin::getClassicThemeState): (WebCore::ScrollbarThemeChromiumWin::buttonSize): * platform/chromium/ScrollbarThemeChromiumWin.h: Added. 2009-06-03 Pavel Feldman Reviewed by Timothy Hatcher. Enabling debugger requires that Scripts panel is already attached to the render tree. The reason is that recompile events result in script sources being added into the source frames. Prior to the global options introduced, debugger was enabled from the Scripts panel, so that it was guaranteed to exist. The InspectorController::enableDebugger API calls with no inspector frontend showing were failing though. https://bugs.webkit.org/show_bug.cgi?id=26145 * WebCore.base.exp: * inspector/InspectorController.cpp: (WebCore::InspectorController::setWindowVisible): (WebCore::InspectorController::scriptObjectReady): (WebCore::InspectorController::enableDebuggerFromFrontend): (WebCore::InspectorController::enableDebugger): * inspector/InspectorController.h: * inspector/InspectorController.idl: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::attachDebuggerWhenShown): * inspector/InspectorFrontend.h: * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.show): (WebInspector.ScriptsPanel.prototype.attachDebuggerWhenShown): * inspector/front-end/inspector.js: (WebInspector.attachDebuggerWhenShown): 2009-06-03 Dan Bernstein Reviewed by Anders Carlsson. - fix a regression from the previous patch * platform/graphics/Font.cpp: Initialize shouldUseFontSmoothing to true. 2009-06-03 Dan Bernstein Reviewed by Anders Carlsson. - eliminate WebCoreTextRenderer * WebCore.base.exp: Updated. * WebCore.xcodeproj/project.pbxproj: Removed WebCoreTextRenderer.{h,mm} and promoted WebFontCache.h to private. * platform/graphics/Font.cpp: (WebCore::Font::setShouldUseSmoothing): Added this static setter for a new file-static boolean. (WebCore::Font::shouldUseSmoothing): Added this static getter. * platform/graphics/Font.h: Decleared setShouldUseSmoothing() and shouldUseSmoothing(). * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): Use Font::shouldUseSmoothing() instead of WebCoreShouldUseFontSmoothing(). * platform/graphics/mac/WebLayer.mm: Removed unneeded #import. * platform/mac/WebCoreTextRenderer.h: Removed. * platform/mac/WebCoreTextRenderer.mm: Removed. 2009-06-03 David Levin Reviewed by Dimitri Glazkov. v8's ScriptController::evaluate should protect the Frame like the jsc version. https://bugs.webkit.org/show_bug.cgi?id=26172 This change is simply copying protections done for Frame in the method WebCore::ScriptController::evaluate in the file js/ScriptController.cpp. * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::evaluate): 2009-06-03 Dan Bernstein Reviewed by John Sullivan. - fix Use CTFontManager notifications instead of ATS notifications * platform/graphics/FontCache.h: Made it an error to destroy a FontCache instance. * platform/graphics/mac/FontCacheMac.mm: (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Added this notification callback for the kCTFontManagerRegisteredFontsChangedNotification, which calls invalidate(). (WebCore::FontCache::platformInit): Register for kCTFontManagerRegisteredFontsChangedNotification. 2009-06-03 Kevin Watters Reviewed by Kevin Ollivier. Use CGContextShowGlyphsWithAdvances to get more accurate text rendering on Mac. https://bugs.webkit.org/show_bug.cgi?id=26161 * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: (WebCore::drawTextWithSpacing): 2009-06-03 Pavel Feldman Reviewed by Timothy Hatcher. Reorder ResourcesPanel components initialization to unfreeze resource list scroller. https://bugs.webkit.org/show_bug.cgi?id=26159 * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel): 2009-06-03 Pavel Feldman Reviewed by Timothy Hatcher. - Fix for crash (preceded by assertion) in InspectorController::didCommitLoad when reloading or navigating with the Inspector open. - Fix for Inspector's Elements panel being empty when Inspector first appears. https://bugs.webkit.org/show_bug.cgi?id=26134 https://bugs.webkit.org/show_bug.cgi?id=26135 * inspector/InspectorController.cpp: (WebCore::InspectorController::scriptObjectReady): (WebCore::InspectorController::didLoadResourceFromMemoryCache): (WebCore::InspectorController::identifierForInitialRequest): (WebCore::InspectorController::ensureResourceTrackingSettingsLoaded): * inspector/InspectorController.h: 2009-06-03 Adam Roben Windows build fix after r44379 * svg/graphics/SVGImage.cpp: Move EmptyClients.h back down below the other #includes to fix a compiler warning on Windows. 2009-06-02 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Add workaround for crash in Linux Flash Player when hosted by another toolkit than GTK+. Bug fixed at the Flash Player bugzilla, issue (FP-2140). * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::setNPWindowIfNeeded): 2009-06-01 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Refactor the Qt plugin code to use NPP_SetWindow correctly, to make resizing of plugins work. Attention was paid to make sure that the windowed plugins scroll synchronized with the page view. A manual test has been added. * manual-tests/qt/plugin-iframe.html: Added. * plugins/PluginView.cpp: (WebCore::PluginView::setFrameRect): (WebCore::PluginView::frameRectsChanged): * plugins/PluginView.h: * plugins/qt/PluginContainerQt.cpp: (PluginContainerQt::PluginContainerQt): * plugins/qt/PluginContainerQt.h: * plugins/qt/PluginPackageQt.cpp: (WebCore::PluginPackage::load): * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::updatePluginWidget): (WebCore::PluginView::paint): (WebCore::PluginView::setParent): (WebCore::PluginView::setNPWindowRect): (WebCore::PluginView::setNPWindowIfNeeded): (WebCore::PluginView::handlePostReadFile): (WebCore::PluginView::getValue): (WebCore::PluginView::invalidateRect): (WebCore::PluginView::init): 2009-06-02 Darin Adler Reviewed by David Hyatt. Bug 26112: viewless WebKit -- make events work https://bugs.webkit.org/show_bug.cgi?id=26112 The main fix here is to make mouse and wheel event coordinates in the coordinate system of the top level NSView rather than the NSWindow when in the viewless mode. This is the design Hyatt chose, but the event part of it wasn't done yet. Also fix FrameView to do normal reference counting instead of a strange model with an explicit deref near creation time. * WebCore.base.exp: Updated. * page/EventHandler.cpp: (WebCore::EventHandler::eventLoopHandleMouseUp): Moved this function into the file to reduce conditionals in the header. (WebCore::EventHandler::eventLoopHandleMouseDragged): Ditto. * page/EventHandler.h: Reduced includes. Fixed formatting of Objective-C types. Made currentNSEvent a static member function. Added sendContextMenuEvent and eventMayStartDrag functions that takes NSEvent * so the conversion to PlatformMouseEvent can be done here rather than in WebKit. Reduced #if by making eventLoopHandleMouseUp and eventLoopHandleMouseDragged unconditional. * page/Frame.cpp: (WebCore::Frame::setView): Made this take a PassRefPtr since it takes ownership. (WebCore::Frame::createView): Changed to use RefPtr and FrameView::create and remove the explicit deref. * page/Frame.h: Changed setView to take a PassRefPtr. * page/FrameTree.cpp: Added newly-needed include. * page/FrameView.cpp: (WebCore::FrameView::FrameView): Got rid of one of the two constructors, and removed the initialization of m_refCount and call to show from the reamining one. (WebCore::FrameView::create): Added two create functions that do what the two constructors did before, except that they return a PassRefPtr to make sure the reference counting is handled correctly. (WebCore::FrameView::~FrameView): Removed assertion from when FrameView implemented its own reference counting. * page/FrameView.h: Inherit from RefCounted for reference counting. Made the constructor private and added create functions. Got rid of the hand-implemented reference counting in this class. * page/mac/EventHandlerMac.mm: (WebCore::currentNSEventSlot): Renamed currentEvent to currentNSEventSlot to make it more clear how it relates to currentNSEvent. (WebCore::EventHandler::currentNSEvent): Updated. (WebCore::CurrentEventScope::CurrentEventScope): Added. Use to set/reset the current event in a foolproof way. (WebCore::CurrentEventScope::~CurrentEventScope): Ditto. (WebCore::EventHandler::wheelEvent): Use CurrentEventScope. Pass the platform window in when constructing the PlatformWheelEvent. (WebCore::EventHandler::keyEvent): Use CurrentEventScope. (WebCore::lastEventIsMouseUp): Use currentNSEvent. (WebCore::EventHandler::passMouseDownEventToWidget): Ditto. (WebCore::EventHandler::eventLoopHandleMouseDragged): Ditto. (WebCore::EventHandler::eventLoopHandleMouseUp): Ditto. (WebCore::EventHandler::passSubframeEventToSubframe): Use currentPlatformMouseEvent to get a mouse event that has the appropriate platform window passed to create it. (WebCore::EventHandler::passWheelEventToWidget): Ditto. (WebCore::EventHandler::mouseDown): Ditto. (WebCore::EventHandler::mouseDragged): Ditto. (WebCore::EventHandler::mouseUp): Ditto. (WebCore::EventHandler::mouseMoved): Ditto. (WebCore::EventHandler::currentPlatformMouseEvent): Added. Passes the platform window that's now needed to create a PlatformMouseEvent. (WebCore::EventHandler::sendContextMenuEvent): Added. (WebCore::EventHandler::eventMayStartDrag): Added. * platform/HostWindow.h: Removed unneeded includes and constructor definition. * platform/PlatformMouseEvent.h: Sorted things in alphabetical order. Changed Mac constructor to take a windowView as well as the event. This is needed in viewless mode, since the "window" is actually an NSView, so the event has to know which view to compute the coordinates with. Made the same change to pointForEvent. * platform/PlatformWheelEvent.h: Ditto. * platform/mac/PlatformMouseEventMac.mm: (WebCore::pointForEvent): Convert point from window coordinates to view coordinates if a windowView is passed in. This is used in viewless mode. (WebCore::PlatformMouseEvent::PlatformMouseEvent): Ditto. * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): Ditto. * platform/mac/WidgetMac.mm: (WebCore::Widget::convertFromContainingWindow): Fixed case where there is no platform widget and no parent. Before it would yield unpredictable results because of dispatching to a nil object and returning a structure. Now it returns the point without changing coordinates at all, which is what we need for this case in viewless mode. * rendering/RenderApplet.cpp: Removed unneeded includes. (WebCore::RenderApplet::intrinsicSize): Use widget function. (WebCore::RenderApplet::createWidgetIfNecessary): Ditto. * rendering/RenderApplet.h: Make more things private. Get rid of unneeded explicit destructor. * rendering/RenderFrame.cpp: Removed unneeded includes. (WebCore::RenderFrame::edgeInfo): Updated to use node function so header doesn't have to define element function. (WebCore::RenderFrame::viewCleared): Ditto. Also changed to use widget function. * rendering/RenderFrame.h: Removed unneeded includes. Made some things private. Got rid of element function. * rendering/RenderPart.cpp: Removed unneeded includes. (WebCore::RenderPart::~RenderPart): Changed to use clearWidget function. (WebCore::RenderPart::setWidget): Changed to use widget function. (WebCore::RenderPart::deleteWidget): Changed to use passed-in widget. This is now only called by the clearWidget function. * rendering/RenderPart.h: Removed unneeded forward declarations. Made more functions private. Updated deleteWidget to take widget argument. * rendering/RenderPartObject.cpp: (WebCore::RenderPartObject::~RenderPartObject): use frameView function instead of getting at m_view directly. (WebCore::RenderPartObject::updateWidget): Ditto. (WebCore::RenderPartObject::layout): Ditto. Same for widget and m_widget. (WebCore::RenderPartObject::viewCleared): Ditto. * rendering/RenderPartObject.h: Made some functions private. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::RenderWidget): Initialize m_frameView with construction syntax instead of assignment. (WebCore::RenderWidget::destroy): Updated for name change of m_view to m_frameView. (WebCore::RenderWidget::~RenderWidget): Use clearWidget to delete the widget. (WebCore::RenderWidget::setWidget): Use clearWidget. (WebCore::RenderWidget::paint): Updated for name change of m_view to m_frameView. (WebCore::RenderWidget::deleteWidget): Changed to use passed-in widget. * rendering/RenderWidget.h: Made many functions protected, others private and made all data members private. * svg/animation/SMILTime.h: Removed unhelpful max and min functions. These just do what std::max and std::min will already do automatically for this type, so they are not helpful. * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::SVGImage): Removed unneeded initial values for types that initialize to zero without anything explicit. (WebCore::SVGImage::~SVGImage): Update since m_frame and m_frameView are no longer stored. (WebCore::SVGImage::setContainerSize): Ditto. (WebCore::SVGImage::usesContainerSize): Ditto. (WebCore::SVGImage::size): Ditto. (WebCore::SVGImage::hasRelativeWidth): Ditto. (WebCore::SVGImage::hasRelativeHeight): Ditto. (WebCore::SVGImage::draw): Ditto. (WebCore::SVGImage::nativeImageForCurrentFrame): Ditto. (WebCore::SVGImage::dataChanged): Ditto. * svg/graphics/SVGImage.h: Removed unneeded includes and unneeded data members m_document, m_frame, m_frameView, and m_minSize. 2009-06-02 Adam Langley Reviewed by Eric Seidel. The previous code was assuming that we'll be painting buttons on the scrollbar which isn't true on Linux. To reproduce, resize a page with scrollbars until they are less than two widths high. This will need pixel test baselines to be updated in the Chromium tree. * platform/chromium/ScrollbarThemeChromium.cpp: move this function... * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromium::trackRect): ... to here * platform/chromium/ScrollbarThemeChromiumLinux.cpp: (WebCore::ScrollbarThemeChromium::trackRect): add an alternative which doesn't remove the track when the scrollbar is less than two widths high. 2009-06-02 Mark Rowe Reviewed by Anders Carlsson. Remove workaround that was added to address as it no longer affects our Tiger builds. * Configurations/Base.xcconfig: 2009-06-02 Eric Seidel Reviewed by Maciej Stachowiak. Insert*List on an stand-alone image in a content editable region ASSERTS ASSERTION FAILED: isStartOfParagraph(startOfParagraphToMove) https://bugs.webkit.org/show_bug.cgi?id=19066 Attempt to fix this by noticing that we inserted the list inside the selection which includes the image, and re-adjust the selection to not include the list before trying to move the image into the list item. Test: editing/execCommand/list-wrapping-image-crash.html * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): 2009-06-02 Eric Seidel Reviewed by Darin Adler. Rename PositionIterator members in hope of further clarity https://bugs.webkit.org/show_bug.cgi?id=24854 Rename m_parent to m_anchorNode (since although it's always the parent of the previous m_child member, it is not always the parent of the effective position) Rename m_child to m_nodeAfterPositionInAnchor to make clear that it's the node directly following the position. This member is often NULL, but is always a child of m_parent, now m_anchorNode if set. Rename m_offset to m_offsetInAnchor (since it's interpreted relative to m_anchorNode) * dom/PositionIterator.cpp: (WebCore::PositionIterator::operator Position): (WebCore::PositionIterator::increment): (WebCore::PositionIterator::decrement): (WebCore::PositionIterator::atStart): (WebCore::PositionIterator::atEnd): (WebCore::PositionIterator::atStartOfNode): (WebCore::PositionIterator::atEndOfNode): (WebCore::PositionIterator::isCandidate): * dom/PositionIterator.h: (WebCore::PositionIterator::PositionIterator): (WebCore::PositionIterator::node): (WebCore::PositionIterator::offsetInLeafNode): 2009-06-02 Julien Chaffraix Reviewed by Eric Seidel. Bug 17167: Failures in fast/dom/Node/initial-values.html This partly solve a compatibility issue with other browsers. It will also make us more consistent while handling XHTML element. The issue is that when we create an XHTML element inside an HTML document (as it is the case when calling createElementNS), we default to the HTML behaviour in nodeName. As we cannot test if an HTMLElement is an XHTML element, our fix is to check whether it has a prefix and then default to XML behaviour for nodeName. * html/HTMLElement.cpp: (WebCore::HTMLElement::nodeName): Add a prefix check before returning the uppercase tagName (HTML behaviour). 2009-06-02 Eric Seidel Reviewed by Maciej Stachowiak. Add a compareBoundaryPoints which takes RangeBoundaryPoints https://bugs.webkit.org/show_bug.cgi?id=25500 I noticed the need for this function when removing compareBoundaryPoints(Position, Position) This patch is almost entirely minus lines. No functional changes, thus no tests. * dom/Range.cpp: (WebCore::Range::setStart): (WebCore::Range::setEnd): (WebCore::Range::compareBoundaryPoints): (WebCore::Range::boundaryPointsValid): * dom/Range.h: 2009-06-02 Eric Seidel Reviewed by Maciej Stachowiak. Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in bug 25056 https://bugs.webkit.org/show_bug.cgi?id=25500 Darin indicated the Range should deal only with primitive DOM node/offset pairs, and that Position (which is a more robust editing construct) should have its own comparison functions and that Range.h should not mention Position at all. Turns out that Position already has a comparePositions() function (which knows how to additionally handled positions in shadow trees). So I've just changed all callers of compareBoundaryPoints(Position, Position) to use the existing comparePositions() function. I've also added a comparePositions which takes VisiblePositions for convenience. * dom/Range.cpp: * dom/Range.h: * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::updateStartEnd): (WebCore::ApplyStyleCommand::applyBlockStyle): (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange): (WebCore::ApplyStyleCommand::applyInlineStyle): (WebCore::ApplyStyleCommand::applyInlineStyleToRange): (WebCore::ApplyStyleCommand::removeInlineStyle): (WebCore::ApplyStyleCommand::nodeFullySelected): (WebCore::ApplyStyleCommand::nodeFullyUnselected): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteInsignificantText): (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): (WebCore::CompositeEditCommand::moveParagraphs): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::initializeStartEnd): (WebCore::DeleteSelectionCommand::handleGeneralDelete): (WebCore::DeleteSelectionCommand::mergeParagraphs): * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved): * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::toNormalizedRange): * editing/htmlediting.cpp: (WebCore::comparePositions): * editing/htmlediting.h: * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEventSingleClick): 2009-06-02 Albert J. Wong Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=26122 Upstream v8_utility.h functions into V8Utilities.h. This patch has some transitional code to make upstreaming easier. This code will be deleted in a few days. * bindings/v8/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::construct): NewInstance -> newInstance. * bindings/v8/V8Utilities.h: (WebCore::AllowAllocation::AllowAllocation): Function added. (WebCore::AllowAllocation::~AllowAllocation): Function added. (WebCore::SafeAllocation::NewInstance): Function added. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): NewInstance -> newInstance. (WebCore::WorkerContextExecutionProxy::toV8): NewInstance -> newInstance. 2009-06-02 Dan Bernstein Reviewed by John Sullivan. - fix Search field’s focus ring is outset * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::adjustSearchFieldStyle): Set the focused search field outline offset to -2. 2009-06-02 Sam Weinig Reviewed by Alexey Proskuryakov. Add list of unimplemented event handlers to DOMWindow. * page/DOMWindow.idl: 2009-06-02 Alexey Proskuryakov Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=26133 Adapt and import py-dom-xpath tests Tests: fast/xpath/py-dom-xpath/abbreviations.html fast/xpath/py-dom-xpath/axes.html fast/xpath/py-dom-xpath/data.html fast/xpath/py-dom-xpath/expressions.html fast/xpath/py-dom-xpath/functions.html fast/xpath/py-dom-xpath/nodetests.html fast/xpath/py-dom-xpath/paths.html fast/xpath/py-dom-xpath/predicates.html Fix bugs found with this test suite: - name and local-name were incorrect for processing instructions (XPath expanded-name doesn't match DOM exactly); - name, local-name and namespace functions should crash on attribute nodes; - attemps to make node sets from other types were not detected as errors. No performance impact. * xml/XPathExpressionNode.h: Track type conversion errors that happen during evaluation. An error won't stop evaluation, but an exception will be raised afterwards. We could also detect conversion errors at compile time, but not if we're going to support XPath variables (which is unnecessary for XPathEvaluator, but will be necessary if we decide to make our own XSLT one day). * xml/XPathExpression.cpp: (WebCore::XPathExpression::evaluate): Check whether a type conversion exception occurred during evaluation, and raise an excpetion if it did. * xml/XPathFunctions.cpp: (WebCore::XPath::expandedNameLocalPart): (WebCore::XPath::expandedName): XPath name(), local-name() and namespace-uri() functions are defined in terms of expanded-name, which doesn't match anything available via DOM exactly. Calculate the expanded name properly. (WebCore::XPath::FunNamespaceURI::evaluate): This function could crash if used with an attribute node, because it released what was possibly the only reference to attribute node before using it. Changed the function to avoid such situation. (WebCore::XPath::FunLocalName::evaluate): Ditto. Also, used the new expandedNameLocalPart() to work properly with processing instruction nodes. (WebCore::XPath::FunName::evaluate): Ditto (using expandedName()). (WebCore::XPath::FunCount::evaluate): Signal an error if the argument is not a node-set (by using toNodeSet unconditionally, which will raise an error, and return an empty set). * xml/XPathPath.cpp: (WebCore::XPath::Filter::evaluate): Signal an error if the expression evaluation result is not a node-set. * xml/XPathPath.h: (WebCore::XPath::Filter::resultType): A Filter's result is actually always a node-set (this is not so for FilterExpr production in the spec, but is for us, because we don't naively map BNF productions to classes). * xml/XPathPredicate.cpp: (WebCore::XPath::Union::evaluate): Signal an error if either side is not a node-set. * xml/XPathStep.cpp: Removed an unnecesary include. * xml/XPathValue.cpp: (WebCore::XPath::Value::toNodeSet): Signal an error if conversion fails. (WebCore::XPath::Value::modifiableNodeSet): Ditto. (WebCore::XPath::Value::toNumber): Don't allow inputs that don't match XPath Number production (in particular, those using exponential notation). 2009-06-01 Sam Weinig Reviewed by Brady Eidson. Part of https://bugs.webkit.org/show_bug.cgi?id=26100 Add missing event handler properties to the DOMWindow Added oncontextmenu, oninput, and onmessage event handlers to the DOMWindow. Aditionally, the onloadstart, onprogress, onstalled, and onsuspend event handlers were implemented but not added to DOMWindow.idl. * page/DOMWindow.cpp: (WebCore::DOMWindow::oninput): (WebCore::DOMWindow::setOninput): (WebCore::DOMWindow::onmessage): (WebCore::DOMWindow::setOnmessage): (WebCore::DOMWindow::oncontextmenu): (WebCore::DOMWindow::setOncontextmenu): * page/DOMWindow.h: * page/DOMWindow.idl: 2009-06-01 Jeremy Orlow Reviewed by Darin Adler. Landed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=26123 Remove a redundant checkEncodedString call when constructing a KURL object from a string. * platform/KURL.cpp: (WebCore::KURL::KURL): 2009-06-01 Dimitri Glazkov Unreviewed, build fix. Reposition platform guard, improperly placed by http://trac.webkit.org/changeset/44340 Bad Dimitri. * platform/KeyboardCodes.h: Repositioned the guard to avoid nested WebCore namespace declarations. 2009-06-01 Dimitri Glazkov Unreviewed, build fix. * platform/KeyboardCodes.h: Integrated contents of platform/chromium/KeyboardCodes.h with a stern FIXME. * platform/chromium/KeyboardCodes.h: Removed. 2009-06-01 Nikolas Zimmermann Reviewed by Eric Seidel. Fix assertion error in --filters enabled debug builds. Instead of using RefPtr as keys for the hash maps in SVGFilterBuilder, just use AtomicString objects. * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::SVGFilterBuilder): (WebCore::SVGFilterBuilder::add): (WebCore::SVGFilterBuilder::getEffectById): * svg/graphics/filters/SVGFilterBuilder.h: 2009-06-01 Nikolas Zimmermann Reviewed by Eric Seidel. Fix --filters enabled build on Mac. Remove unnecessary 'boundingBox' parameter from finishRenderSVGContent() method. Kill several warnings, to make build pass. * rendering/RenderPath.cpp: (WebCore::RenderPath::paint): * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::paint): * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint): * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paint): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::finishRenderSVGContent): * rendering/SVGRenderSupport.h: * rendering/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBoxPaintWalker::chunkEndCallback): * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::setStdDeviation): * svg/graphics/filters/SVGFEFlood.cpp: (WebCore::FEFlood::FEFlood): 2009-06-01 Dimitri Glazkov Reviewed by Dave Hyatt. Fix Chromium build by adding an #ifdef, restoring the code path to that before http://trac.webkit.org/changeset/44287. * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::paint): Added an #ifdef. 2009-06-01 Dirk Schulze Reviewed by Nikolas Zimmermann. Remove last pieces of the old SVG filter system. They are not usable with our current filter system. The new filter effects will replace the functionality step by step. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * svg/graphics/cairo: Removed. * svg/graphics/cairo/SVGResourceFilterCairo.cpp: Removed. * svg/graphics/cg: Removed. * svg/graphics/cg/SVGResourceFilterCg.cpp: Removed. * svg/graphics/cg/SVGResourceFilterCg.mm: Removed. * svg/graphics/filters/SVGFilterEffect.cpp: Removed. * svg/graphics/filters/SVGFilterEffect.h: Removed. * svg/graphics/filters/cg: Removed. * svg/graphics/filters/cg/SVGFEHelpersCg.h: Removed. * svg/graphics/filters/cg/SVGFEHelpersCg.mm: Removed. * svg/graphics/filters/cg/SVGFilterEffectCg.mm: Removed. * svg/graphics/filters/cg/WKArithmeticFilter.cikernel: Removed. * svg/graphics/filters/cg/WKArithmeticFilter.h: Removed. * svg/graphics/filters/cg/WKArithmeticFilter.m: Removed. * svg/graphics/filters/cg/WKComponentMergeFilter.cikernel: Removed. * svg/graphics/filters/cg/WKComponentMergeFilter.h: Removed. * svg/graphics/filters/cg/WKComponentMergeFilter.m: Removed. * svg/graphics/filters/cg/WKDiffuseLightingFilter.cikernel: Removed. * svg/graphics/filters/cg/WKDiffuseLightingFilter.h: Removed. * svg/graphics/filters/cg/WKDiffuseLightingFilter.m: Removed. * svg/graphics/filters/cg/WKDiscreteTransferFilter.cikernel: Removed. * svg/graphics/filters/cg/WKDiscreteTransferFilter.h: Removed. * svg/graphics/filters/cg/WKDiscreteTransferFilter.m: Removed. * svg/graphics/filters/cg/WKDisplacementMapFilter.cikernel: Removed. * svg/graphics/filters/cg/WKDisplacementMapFilter.h: Removed. * svg/graphics/filters/cg/WKDisplacementMapFilter.m: Removed. * svg/graphics/filters/cg/WKDistantLightFilter.cikernel: Removed. * svg/graphics/filters/cg/WKDistantLightFilter.h: Removed. * svg/graphics/filters/cg/WKDistantLightFilter.m: Removed. * svg/graphics/filters/cg/WKGammaTransferFilter.cikernel: Removed. * svg/graphics/filters/cg/WKGammaTransferFilter.h: Removed. * svg/graphics/filters/cg/WKGammaTransferFilter.m: Removed. * svg/graphics/filters/cg/WKIdentityTransferFilter.h: Removed. * svg/graphics/filters/cg/WKIdentityTransferFilter.m: Removed. * svg/graphics/filters/cg/WKLinearTransferFilter.cikernel: Removed. * svg/graphics/filters/cg/WKLinearTransferFilter.h: Removed. * svg/graphics/filters/cg/WKLinearTransferFilter.m: Removed. * svg/graphics/filters/cg/WKNormalMapFilter.cikernel: Removed. * svg/graphics/filters/cg/WKNormalMapFilter.h: Removed. * svg/graphics/filters/cg/WKNormalMapFilter.m: Removed. * svg/graphics/filters/cg/WKPointLightFilter.cikernel: Removed. * svg/graphics/filters/cg/WKPointLightFilter.h: Removed. * svg/graphics/filters/cg/WKPointLightFilter.m: Removed. * svg/graphics/filters/cg/WKSpecularLightingFilter.cikernel: Removed. * svg/graphics/filters/cg/WKSpecularLightingFilter.h: Removed. * svg/graphics/filters/cg/WKSpecularLightingFilter.m: Removed. * svg/graphics/filters/cg/WKSpotLightFilter.cikernel: Removed. * svg/graphics/filters/cg/WKSpotLightFilter.h: Removed. * svg/graphics/filters/cg/WKSpotLightFilter.m: Removed. * svg/graphics/filters/cg/WKTableTransferFilter.cikernel: Removed. * svg/graphics/filters/cg/WKTableTransferFilter.h: Removed. * svg/graphics/filters/cg/WKTableTransferFilter.m: Removed. * svg/graphics/mac: Removed. * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h: Removed. * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm: Removed. * svg/graphics/qt: Removed. * svg/graphics/qt/SVGResourceFilterQt.cpp: Removed. * svg/graphics/skia: Removed. * svg/graphics/skia/SVGResourceFilterSkia.cpp: Removed. 2009-06-01 Dmitry Titov Fix the previous checkin (ttp://trac.webkit.org/changeset/44327). This adds a comment suggested during review. * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::~ThreadGlobalData): Add comment clarifying the change. 2009-06-01 Dmitry Titov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25973 Avoid calling CurrentThread() in thread-specific destructors in OSX Chromium. Pthreads invoke thread-specific destructors after WTF::detachThread() is called and ThreadIdentifier for the thread removed from the WTF thread map. Calling CurrentThread() in such destructor causes the ThreadIdentifier to be re-created and inserted into the map again. Since Pthreads on OSX reuse the pthread_t between threads, the next created thread will have the same pthread_t and cause an assert in establishIdentifierForPthreadHandle() since the id is already in the map. The behavior is covered by existing test LayoutTests/fast/workers/worker-terminate.html, which currently fails on OSX Chromium and will stop failing after this change. * platform/ThreadGlobalData.h: * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::~ThreadGlobalData): Store the result of "isMainThread()" in a member variable during construction of thread-specific data to avoid calling IsMainThread() in destructor, since the latter calls CurrentThread() in OSX Chromium. 2009-06-01 David Levin Reviewed by Darin Alder and Maciej Stachowiak. Bug 26057: StringImpl should share buffers with UString. https://bugs.webkit.org/show_bug.cgi?id=26057 This change results in the following performance improvements: On http://www.hixie.ch/tests/adhoc/perf/dom/artificial/core/001.html the time went from 78ms to 40ms for append (other times remained constant). On http://www.hixie.ch/tests/adhoc/perf/dom/artificial/core/002.html, the time went from 3900ms to 2600ms. For http://dromaeo.com/?dom, the time for DomModification improved by ~6%. Other tests in dom seemed to be faster across several runs but within the margin of error (except DOM Attributes which was slightly ~1.5% worse). Existing tests cover this code and there is no new functionality that is exposed to test. * platform/text/AtomicString.cpp: (WebCore::AtomicString::add): * platform/text/String.cpp: (WebCore::String::String): (WebCore::String::operator UString): * platform/text/StringImpl.cpp: (WebCore::StringImpl::StringImpl): (WebCore::StringImpl::~StringImpl): (WebCore::StringImpl::create): Consumes a shared buffer. (WebCore::StringImpl::ustring): Shares the StringImpl's buffer with the UString. (WebCore::StringImpl::sharedBuffer): Exposes the buffer that may be shared. * platform/text/StringImpl.h: (WebCore::StringImpl::hasTerminatingNullCharacter): (WebCore::StringImpl::inTable): (WebCore::StringImpl::setInTable): Converted the bools to be inside of PtrAndFlags to avoid growing StringImpl in size. 2009-06-01 Dimitri Glazkov Unreviewed, build fix. V8 bindings follow-up to to DOMWindow-related cleanup: http://trac.webkit.org/changeset/44215 * bindings/v8/ScriptController.cpp: Removed disconnectFrame(), relocated its body to destructor. * bindings/v8/ScriptController.h: Removed disconnectFrame() decl. 2009-05-28 Pavel Feldman Reviewed by Timothy Hatcher. - Add panel enabler to the resources panel. - Add session / always options into the panel enabler. - Make enabled status for three panels sticky (globally). - Persist enabled status using InspectorController::Settings - Make InspectorController produce no network-related overhead when resources panel is not enabled. https://bugs.webkit.org/show_bug.cgi?id=26046 * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::setWindowVisible): (WebCore::InspectorController::populateScriptObjects): (WebCore::InspectorController::identifierForInitialRequest): (WebCore::InspectorController::willSendRequest): (WebCore::InspectorController::didReceiveResponse): (WebCore::InspectorController::didReceiveContentLength): (WebCore::InspectorController::didFinishLoading): (WebCore::InspectorController::didFailLoading): (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest): (WebCore::InspectorController::scriptImported): (WebCore::InspectorController::enableResourceTracking): (WebCore::InspectorController::disableResourceTracking): (WebCore::InspectorController::startUserInitiatedProfiling): (WebCore::InspectorController::enableProfiler): (WebCore::InspectorController::disableProfiler): (WebCore::InspectorController::enableDebugger): (WebCore::InspectorController::disableDebugger): * inspector/InspectorController.h: (WebCore::InspectorController::Setting::Setting): (WebCore::InspectorController::resourceTrackingEnabled): * inspector/InspectorController.idl: * inspector/InspectorFrontend.cpp: (WebCore::InspectorFrontend::resourceTrackingWasEnabled): (WebCore::InspectorFrontend::resourceTrackingWasDisabled): * inspector/InspectorFrontend.h: * inspector/front-end/PanelEnablerView.js: (WebInspector.PanelEnablerView.enableOption): (WebInspector.PanelEnablerView): (WebInspector.PanelEnablerView.prototype._windowResized): (WebInspector.PanelEnablerView.prototype.alwaysWasChosen): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._enableProfiling): (WebInspector.ProfilesPanel.prototype._toggleProfiling): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel): (WebInspector.ResourcesPanel.prototype.get statusBarItems): (WebInspector.ResourcesPanel.prototype.resourceTrackingWasEnabled): (WebInspector.ResourcesPanel.prototype.resourceTrackingWasDisabled): (WebInspector.ResourcesPanel.prototype.reset): (WebInspector.ResourcesPanel.prototype._updateSidebarWidth): (WebInspector.ResourcesPanel.prototype._enableResourceTracking): (WebInspector.ResourcesPanel.prototype._toggleResourceTracking): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._enableDebugging): (WebInspector.ScriptsPanel.prototype._toggleDebugging): * inspector/front-end/inspector.css: * inspector/front-end/inspector.js: (WebInspector.resourceTrackingWasEnabled): (WebInspector.resourceTrackingWasDisabled): 2009-06-01 Drew Wilson Reviewed by Darin Adler. Landed (and tweaked) by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=25902 Added WorkerContext.close() Test: fast/workers/worker-close.html * workers/WorkerContext.cpp: (WebCore::WorkerContext::close): * workers/WorkerContext.h: * workers/WorkerContext.idl: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal): 2009-06-01 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=12471 XPathResult not invalidated for documents retrieved via XMLHttpRequest Test: fast/xpath/detached-subtree-invalidate-iterator.html and existing tests in dom/svg/level3/xpath. Use DOM tree version instead of DOMSubtreeModified events to invalidate, which is more reliable and much faster. * xml/XPathExpression.cpp: (WebCore::XPathExpression::evaluate): * xml/XPathResult.cpp: (WebCore::XPathResult::XPathResult): (WebCore::XPathResult::~XPathResult): (WebCore::XPathResult::invalidIteratorState): (WebCore::XPathResult::iterateNext): * xml/XPathResult.h: (WebCore::XPathResult::create): 2009-06-01 Brett Wilson Reviewed by Darin Adler. Landed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=25750 Test: fast/transforms/bounding-rect-zoom.html Make getClientRects and getBoundingClientRect account for ther zoom factor. * dom/Element.cpp: (WebCore::adjustFloatPointForAbsoluteZoom): (WebCore::adjustFloatQuadForAbsoluteZoom): (WebCore::adjustIntRectForAbsoluteZoom): (WebCore::Element::getClientRects): (WebCore::Element::getBoundingClientRect): 2009-06-01 Tony Chang Reviewed by Dimitri Glazkov. Landed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=26026 Fix an infinite loop when using the keyboard in Chromium select popups. Not testable since it involves sending a keyboard event to the popup, which is not possible (eventSender sends the key events through webview, we want to go through the webwidget). * platform/chromium/PopupMenuChromium.cpp: 2009-06-01 Nate Chapin Reviewed by Dimitri Glazkov. Landed by Adam Barth. If a url with an anchor is being loaded, ensure that the anchor remains locked in view until the page has finished loading compeltely or the user has manually scrolled. Refreshing an anchor url after scrolling to a new location on the page will still result in jumping to the new location. https://bugs.webkit.org/show_bug.cgi?id=26034 * loader/FrameLoader.cpp: (WebCore::FrameLoader::gotoAnchor): Set anchor lock after navigating to anchor. (WebCore::FrameLoader::completed): Release anchor lock. * page/FrameView.cpp: (WebCore::FrameView::FrameView): Ensure anchor lock starts unset. (WebCore::FrameView::reset): Ensure anchor lock starts unset. (WebCore::FrameView::layout): If anchor lock is set, force a gotoAnchor() after layout. (WebCore::FrameView::scrollRectIntoViewRecursively): Release anchor lock if a programmatic scroll begins. (WebCore::FrameView::setWasScrolledByUser): Release anchor lock if user manually scrolls. (WebCore::FrameView::setScrollPosition): Release anchor lock if a programmatic scroll begins. * page/FrameView.h: (WebCore::FrameView::lockedToAnchor): Added. (WebCore::FrameView::setLockedToAnchor): Added. 2009-05-31 Dirk Schulze Reviewed by Nikolas Zimmermann. WebKit needs cross-platform filter system [https://bugs.webkit.org/show_bug.cgi?id=19991] A short clean-up. FilterBuilder is SVG specific. Move it to svg/graphics/filters and rename it to SVGFilterBuilder. * GNUmakefile.am: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * svg/FilterBuilder.cpp: Removed. * svg/FilterBuilder.h: Removed. * svg/SVGFilterElement.cpp: * svg/SVGFilterPrimitiveStandardAttributes.h: * svg/graphics/SVGResourceFilter.cpp: (WebCore::SVGResourceFilter::SVGResourceFilter): * svg/graphics/SVGResourceFilter.h: (WebCore::SVGResourceFilter::builder): * svg/graphics/filters/SVGFilterBuilder.cpp: Added. (WebCore::SVGFilterBuilder::SVGFilterBuilder): (WebCore::SVGFilterBuilder::add): (WebCore::SVGFilterBuilder::getEffectById): (WebCore::SVGFilterBuilder::clearEffects): * svg/graphics/filters/SVGFilterBuilder.h: Added. (WebCore::SVGFilterBuilder::lastEffect): 2009-05-31 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=13233 Need to implement an optimizing XPath evaluator Avoid sorting results of hierarchical paths that are naturally sorted. On a flat data structure with 128K nodes and a simple XPath expression, this changes evaluation time from 1.5 minutes to 33 ms. * xml/XPathNodeSet.h: Keep track of whether subtrees rooted at nodes in set are disjoint, which is useful for optimization. (WebCore::XPath::NodeSet::NodeSet): Removed, it was identical to compiler generated one. (WebCore::XPath::NodeSet::operator=): Ditto. (WebCore::XPath::NodeSet::swap): Ditto. (WebCore::XPath::NodeSet::isSorted): Single element sets are always sorted, even if sort() was never called. (WebCore::XPath::NodeSet::markSubtreesDisjoint): Just like being sorted, the new flag is maintained by callers. (WebCore::XPath::NodeSet::subtreesAreDisjoint): A single element set only has one subtree. Currently, the only way for a set to gain this flag is to be produced from a single element set with a hierarchical location path. * xml/XPathPath.cpp: (WebCore::XPath::LocationPath::evaluate): Use the new flag to avoid maintaining a set of unique nodes, and to avoid sorting the result. 2009-05-31 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=13233 Need to implement an optimizing XPath evaluator This patch adds some infrastructure and simple optimizations. Namely, - we now avoid building a full NodeSet just to evaluate a predicate in some cases; - "/descendant-or-self::node()/child::" is optimized to iterate the tree once when possible; * xml/XPathExpressionNode.cpp: (WebCore::XPath::Expression::Expression): * xml/XPathExpressionNode.h: (WebCore::XPath::Expression::addSubExpression): (WebCore::XPath::Expression::isContextNodeSensitive): (WebCore::XPath::Expression::isContextPositionSensitive): (WebCore::XPath::Expression::isContextSizeSensitive): (WebCore::XPath::Expression::setIsContextNodeSensitive): (WebCore::XPath::Expression::setIsContextPositionSensitive): (WebCore::XPath::Expression::setIsContextSizeSensitive): XPath expression now knows its result type, and whether evaluation depends on context. * xml/XPathFunctions.cpp: (WebCore::XPath::FunLast::resultType): (WebCore::XPath::FunLast::FunLast): (WebCore::XPath::FunPosition::resultType): (WebCore::XPath::FunPosition::FunPosition): (WebCore::XPath::FunCount::resultType): (WebCore::XPath::FunId::resultType): (WebCore::XPath::FunLocalName::resultType): (WebCore::XPath::FunLocalName::FunLocalName): (WebCore::XPath::FunNamespaceURI::resultType): (WebCore::XPath::FunNamespaceURI::FunNamespaceURI): (WebCore::XPath::FunName::resultType): (WebCore::XPath::FunName::FunName): (WebCore::XPath::FunString::resultType): (WebCore::XPath::FunString::FunString): (WebCore::XPath::FunConcat::resultType): (WebCore::XPath::FunStartsWith::resultType): (WebCore::XPath::FunContains::resultType): (WebCore::XPath::FunSubstringBefore::resultType): (WebCore::XPath::FunSubstringAfter::resultType): (WebCore::XPath::FunSubstring::resultType): (WebCore::XPath::FunStringLength::resultType): (WebCore::XPath::FunStringLength::FunStringLength): (WebCore::XPath::FunNormalizeSpace::resultType): (WebCore::XPath::FunNormalizeSpace::FunNormalizeSpace): (WebCore::XPath::FunTranslate::resultType): (WebCore::XPath::FunBoolean::resultType): (WebCore::XPath::FunNot::resultType): (WebCore::XPath::FunTrue::resultType): (WebCore::XPath::FunFalse::resultType): (WebCore::XPath::FunLang::resultType): (WebCore::XPath::FunLang::FunLang): (WebCore::XPath::FunNumber::resultType): (WebCore::XPath::FunNumber::FunNumber): (WebCore::XPath::FunSum::resultType): (WebCore::XPath::FunFloor::resultType): (WebCore::XPath::FunCeiling::resultType): (WebCore::XPath::FunRound::resultType): (WebCore::XPath::Function::setArguments): Set optimization details for the expression. Normally, a function does not introduce context node set dependency, but some use context node as default argument, or otherwise use the context. * xml/XPathFunctions.h: Tweaked style. * xml/XPathPath.cpp: (WebCore::XPath::Filter::Filter): A filter is as context node set sensitive as its expression is. (WebCore::XPath::LocationPath::LocationPath): A location path can only be context node sensitive, and only if the path relative. (WebCore::XPath::LocationPath::appendStep): Invoke compile-time Step optimizations. (WebCore::XPath::LocationPath::insertFirstStep): Ditto. (WebCore::XPath::Path::Path): A path is as context node set sensitive as its filter is. * xml/XPathPath.h: (WebCore::XPath::Filter::resultType): Result type of a filter is the same as of its expression (useful filters return NodeSets, of course). (WebCore::XPath::LocationPath::setAbsolute): An absolute location path if context node set insensitive. (WebCore::XPath::LocationPath::resultType): A path's result is always a node set. (WebCore::XPath::Path::resultType): Ditto. * xml/XPathPredicate.h: (WebCore::XPath::Number::resultType): Return a proper result type. (WebCore::XPath::StringExpression::resultType): Ditto. (WebCore::XPath::Negative::resultType): Ditto. (WebCore::XPath::NumericOp::resultType): Ditto. (WebCore::XPath::EqTestOp::resultType): Ditto. (WebCore::XPath::LogicalOp::resultType): Ditto. (WebCore::XPath::Union::resultType): Ditto. (WebCore::XPath::Predicate::isContextPositionSensitive): A predicate can be context position sensitive even if its expression is not, because e.g. [5] is a shortcut for [position()=5]. (WebCore::XPath::Predicate::isContextSizeSensitive): This matches expression result. * xml/XPathStep.h: (WebCore::XPath::Step::NodeTest::Kind): Removed unused ElementNodeTest, which was previously borrowed from XPath 2.0 to express some optimizations. (WebCore::XPath::Step::NodeTest::mergedPredicates): To avoid building a huge node set and filtering it with predicates, we now try to apply predicates while enumerating an axis. (WebCore::XPath::Step::nodeTest): Expose m_nodeTest. * xml/XPathStep.cpp: (WebCore::XPath::Step::~Step): The step owns NodeTest merged predicates, so it is still possible to copy NodeTests. (WebCore::XPath::Step::optimize): Merge predicates into NodeTest if possible. (WebCore::XPath::optimizeStepPair): Optimize some expressions containing "//". (WebCore::XPath::Step::predicatesAreContextListInsensitive): The above optimization is only possible if there are no context sensitive predicates for "//". (WebCore::XPath::Step::evaluate): Track context position for the first merged predicate. (WebCore::XPath::nodeMatchesBasicTest): Check whether the node matches node test, ignoring merged predicates. (WebCore::XPath::nodeMatches): Additionally check merged predicates, and update position. (WebCore::XPath::Step::nodesInAxis): Check merged predicates in optimized attribute code path. * xml/XPathVariableReference.h: (WebCore::XPath::VariableReference::resultType): Variable references are not used with XPathEvaluator, so we'll only need them if we decide to reimplement XSLT. The type of variable reference is not known at compile time. 2009-05-31 Sam Weinig Rubber-stamped by Dan Bernstein. Remove unused JSEventTargetBase.h * GNUmakefile.am: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSEventTargetBase.h: Removed. 2009-05-31 Sam Weinig Reviewed by Dan Bernstein. Part of https://bugs.webkit.org/show_bug.cgi?id=26100 Add missing event handler properties to the DOMWindow Add missing oncanplay, oncanplaythrough, ondurationchange, onemptied, onended, onloadeddata, onloadedmetadata, onpause, onplay, onplaying, onratechange, onseeked, onseeking, ontimeupdate, onvolumechange, onwaiting, onloadstart, onprogress, onstalled, onsuspend, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart and ondrop event handlers to the DOMWindow. * page/DOMWindow.cpp: (WebCore::DOMWindow::ondrag): (WebCore::DOMWindow::setOndrag): (WebCore::DOMWindow::ondragend): (WebCore::DOMWindow::setOndragend): (WebCore::DOMWindow::ondragenter): (WebCore::DOMWindow::setOndragenter): (WebCore::DOMWindow::ondragleave): (WebCore::DOMWindow::setOndragleave): (WebCore::DOMWindow::ondragover): (WebCore::DOMWindow::setOndragover): (WebCore::DOMWindow::ondragstart): (WebCore::DOMWindow::setOndragstart): (WebCore::DOMWindow::ondrop): (WebCore::DOMWindow::setOndrop): (WebCore::DOMWindow::oncanplay): (WebCore::DOMWindow::setOncanplay): (WebCore::DOMWindow::oncanplaythrough): (WebCore::DOMWindow::setOncanplaythrough): (WebCore::DOMWindow::ondurationchange): (WebCore::DOMWindow::setOndurationchange): (WebCore::DOMWindow::onemptied): (WebCore::DOMWindow::setOnemptied): (WebCore::DOMWindow::onended): (WebCore::DOMWindow::setOnended): (WebCore::DOMWindow::onloadeddata): (WebCore::DOMWindow::setOnloadeddata): (WebCore::DOMWindow::onloadedmetadata): (WebCore::DOMWindow::setOnloadedmetadata): (WebCore::DOMWindow::onpause): (WebCore::DOMWindow::setOnpause): (WebCore::DOMWindow::onplay): (WebCore::DOMWindow::setOnplay): (WebCore::DOMWindow::onplaying): (WebCore::DOMWindow::setOnplaying): (WebCore::DOMWindow::onratechange): (WebCore::DOMWindow::setOnratechange): (WebCore::DOMWindow::onseeked): (WebCore::DOMWindow::setOnseeked): (WebCore::DOMWindow::onseeking): (WebCore::DOMWindow::setOnseeking): (WebCore::DOMWindow::ontimeupdate): (WebCore::DOMWindow::setOntimeupdate): (WebCore::DOMWindow::onvolumechange): (WebCore::DOMWindow::setOnvolumechange): (WebCore::DOMWindow::onwaiting): (WebCore::DOMWindow::setOnwaiting): (WebCore::DOMWindow::onloadstart): (WebCore::DOMWindow::setOnloadstart): (WebCore::DOMWindow::onprogress): (WebCore::DOMWindow::setOnprogress): (WebCore::DOMWindow::onstalled): (WebCore::DOMWindow::setOnstalled): (WebCore::DOMWindow::onsuspend): (WebCore::DOMWindow::setOnsuspend): * page/DOMWindow.h: * page/DOMWindow.idl: 2009-05-31 Sam Weinig Reviewed by Anders Carlsson. Part of https://bugs.webkit.org/show_bug.cgi?id=26100 Add missing event handler properties to the DOMWindow Add missing onstorage event handler to the DOMWindow. * page/DOMWindow.cpp: (WebCore::DOMWindow::onstorage): (WebCore::DOMWindow::setOnstorage): * page/DOMWindow.h: * page/DOMWindow.idl: 2009-05-30 Sam Weinig Reviewed by Mark Rowe. Fix for https://bugs.webkit.org/show_bug.cgi?id=26110 Update online/offline events to match the current spec. - Also adds window.ononline and window.onoffline event handler properties. * page/DOMWindow.cpp: (WebCore::DOMWindow::onoffline): (WebCore::DOMWindow::setOnoffline): (WebCore::DOMWindow::ononline): (WebCore::DOMWindow::setOnonline): * page/DOMWindow.h: * page/DOMWindow.idl: * page/Page.cpp: (WebCore::networkStateChanged): 2009-05-31 Dirk Schulze Reviewed by Nikolas Zimmermann. WebKit needs cross-platform filter system [https://bugs.webkit.org/show_bug.cgi?id=19991] Make use of the new filter system in WebCore for SVG. Deleted Mac bindings and replace it by a platform independent code. Calculation of subRegions is missing but needed for a first filter effect. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/Filter.h: (WebCore::Filter::~Filter): (WebCore::Filter::setSourceImage): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::prepareToRenderSVGContent): (WebCore::SVGRenderBase::finishRenderSVGContent): * svg/FilterBuilder.h: (WebCore::FilterBuilder::lastEffect): * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::SVGFEBlendElement): (WebCore::SVGFEBlendElement::build): * svg/SVGFEBlendElement.h: * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement): (WebCore::SVGFEColorMatrixElement::build): * svg/SVGFEColorMatrixElement.h: * svg/SVGFEComponentTransferElement.cpp: (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement): (WebCore::SVGFEComponentTransferElement::build): * svg/SVGFEComponentTransferElement.h: * svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::SVGFECompositeElement): (WebCore::SVGFECompositeElement::build): * svg/SVGFECompositeElement.h: * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement): (WebCore::SVGFEDiffuseLightingElement::build): * svg/SVGFEDiffuseLightingElement.h: * svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement): (WebCore::SVGFEDisplacementMapElement::build): * svg/SVGFEDisplacementMapElement.h: * svg/SVGFEFloodElement.cpp: (WebCore::SVGFEFloodElement::SVGFEFloodElement): (WebCore::SVGFEFloodElement::build): * svg/SVGFEFloodElement.h: * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement): (WebCore::SVGFEGaussianBlurElement::build): * svg/SVGFEGaussianBlurElement.h: * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::SVGFEImageElement): (WebCore::SVGFEImageElement::notifyFinished): (WebCore::SVGFEImageElement::build): * svg/SVGFEImageElement.h: * svg/SVGFEMergeElement.cpp: (WebCore::SVGFEMergeElement::SVGFEMergeElement): (WebCore::SVGFEMergeElement::build): * svg/SVGFEMergeElement.h: * svg/SVGFEOffsetElement.cpp: (WebCore::SVGFEOffsetElement::SVGFEOffsetElement): (WebCore::SVGFEOffsetElement::build): * svg/SVGFEOffsetElement.h: * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement): (WebCore::SVGFESpecularLightingElement::build): * svg/SVGFESpecularLightingElement.h: * svg/SVGFETileElement.cpp: (WebCore::SVGFETileElement::SVGFETileElement): (WebCore::SVGFETileElement::build): * svg/SVGFETileElement.h: * svg/SVGFETurbulenceElement.cpp: (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement): (WebCore::SVGFETurbulenceElement::build): * svg/SVGFETurbulenceElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::canvasResource): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes): * svg/SVGFilterPrimitiveStandardAttributes.h: (WebCore::SVGFilterPrimitiveStandardAttributes::contextElement): * svg/graphics/SVGResourceFilter.cpp: (WebCore::SVGResourceFilter::SVGResourceFilter): (WebCore::SVGResourceFilter::addFilterEffect): (WebCore::SVGResourceFilter::filterBBoxForItemBBox): (WebCore::SVGResourceFilter::prepareFilter): (WebCore::SVGResourceFilter::applyFilter): (WebCore::SVGResourceFilter::externalRepresentation): * svg/graphics/SVGResourceFilter.h: (WebCore::SVGResourceFilter::filterBoundingBox): (WebCore::SVGResourceFilter::setFilterBoundingBox): (WebCore::SVGResourceFilter::itemBoundingBox): (WebCore::SVGResourceFilter::setItemBoundingBox): (WebCore::SVGResourceFilter::builder): 2009-05-31 Dirk Schulze Reviewed by Nikolas Zimmermann. WebKit needs cross-platform filter system [https://bugs.webkit.org/show_bug.cgi?id=19991] Adding 'in1' attribute support for , as specified in SVG 1.1. This change helps creating test cases, once filters are activated. * svg/SVGFEFloodElement.cpp: (WebCore::SVGFEFloodElement::SVGFEFloodElement): (WebCore::SVGFEFloodElement::parseMappedAttribute): (WebCore::SVGFEFloodElement::build): * svg/SVGFEFloodElement.h: * svg/SVGFEFloodElement.idl: * svg/graphics/filters/SVGFEFlood.cpp: (WebCore::FEFlood::FEFlood): (WebCore::FEFlood::create): * svg/graphics/filters/SVGFEFlood.h: 2009-05-31 Dirk Schulze Reviewed by Nikolas Zimmermann. WebKit needs cross-platform filter system [https://bugs.webkit.org/show_bug.cgi?id=19991] Replace all occurrences of SVGResourceFilter by Filter. This is the last step for a SVG independent filter system. Every other part of WebCore can use the filter system by creating a new Filter object. * GNUmakefile.am: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/filters/FEBlend.cpp: (WebCore::FEBlend::apply): * platform/graphics/filters/FEBlend.h: * platform/graphics/filters/FEColorMatrix.cpp: (WebCore::FEColorMatrix::apply): * platform/graphics/filters/FEColorMatrix.h: * platform/graphics/filters/FEComponentTransfer.cpp: (WebCore::FEComponentTransfer::apply): * platform/graphics/filters/FEComponentTransfer.h: * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::apply): * platform/graphics/filters/FEComposite.h: * platform/graphics/filters/Filter.h: Added. (WebCore::Filter::setSourceImage): (WebCore::Filter::sourceImage): * platform/graphics/filters/FilterEffect.h: * platform/graphics/filters/SourceAlpha.cpp: (WebCore::SourceAlpha::apply): * platform/graphics/filters/SourceAlpha.h: * platform/graphics/filters/SourceGraphic.cpp: (WebCore::SourceGraphic::apply): * platform/graphics/filters/SourceGraphic.h: * svg/Filter.cpp: Removed. * svg/Filter.h: Removed. * svg/graphics/filters/SVGFEConvolveMatrix.cpp: (WebCore::FEConvolveMatrix::apply): * svg/graphics/filters/SVGFEConvolveMatrix.h: * svg/graphics/filters/SVGFEDiffuseLighting.cpp: (WebCore::FEDiffuseLighting::apply): * svg/graphics/filters/SVGFEDiffuseLighting.h: * svg/graphics/filters/SVGFEDisplacementMap.cpp: (WebCore::FEDisplacementMap::apply): * svg/graphics/filters/SVGFEDisplacementMap.h: * svg/graphics/filters/SVGFEFlood.cpp: (WebCore::FEFlood::apply): * svg/graphics/filters/SVGFEFlood.h: * svg/graphics/filters/SVGFEGaussianBlur.cpp: (WebCore::FEGaussianBlur::apply): * svg/graphics/filters/SVGFEGaussianBlur.h: * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::apply): * svg/graphics/filters/SVGFEImage.h: * svg/graphics/filters/SVGFEMerge.cpp: (WebCore::FEMerge::apply): * svg/graphics/filters/SVGFEMerge.h: * svg/graphics/filters/SVGFEMorphology.cpp: (WebCore::FEMorphology::apply): * svg/graphics/filters/SVGFEMorphology.h: * svg/graphics/filters/SVGFEOffset.cpp: (WebCore::FEOffset::apply): * svg/graphics/filters/SVGFEOffset.h: * svg/graphics/filters/SVGFESpecularLighting.cpp: (WebCore::FESpecularLighting::apply): * svg/graphics/filters/SVGFESpecularLighting.h: * svg/graphics/filters/SVGFETile.cpp: (WebCore::FETile::apply): * svg/graphics/filters/SVGFETile.h: * svg/graphics/filters/SVGFETurbulence.cpp: (WebCore::FETurbulence::apply): * svg/graphics/filters/SVGFETurbulence.h: * svg/graphics/filters/SVGFilter.cpp: Added. (WebCore::SVGFilter::SVGFilter): (WebCore::SVGFilter::calculateEffectSubRegion): (WebCore::SVGFilter::create): * svg/graphics/filters/SVGFilter.h: Added. 2009-05-30 Kevin Ollivier Build fix for platforms without plugins support. * plugins/PluginViewNone.cpp: (WebCore::PluginView::userAgentStatic): (WebCore::PluginView::getValueStatic): 2009-05-30 Nikolas Zimmermann Reviewed by Darin Adler. Fixes: https://bugs.webkit.org/show_bug.cgi?id=25979 Fix regression, local WML files won't load anymore, as the mimetype isn't correctly detected. Bug filed at to cover this CFNetwork limitation. * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): 2009-05-29 Sam Weinig Reviewed by Anders Carlsson. Fix for https://bugs.webkit.org/show_bug.cgi?id=26091 Make storage events match the current spec. - Storage event listeners are added to the window. - Storage events are dispatched to the window. Updated existing tests. * dom/Document.cpp: (WebCore::Document::dispatchWindowEvent): * dom/Document.h: * dom/Node.cpp: * dom/Node.h: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseMappedAttribute): * storage/LocalStorageArea.cpp: (WebCore::LocalStorageArea::dispatchStorageEvent): * storage/SessionStorageArea.cpp: (WebCore::SessionStorageArea::dispatchStorageEvent): 2009-05-30 Darin Adler Reviewed by Adele Peterson. Bug 26097: REGRESSION (r44283): Tab key doesn't work when focus is on a . This patch adds WMLSelectElement, providing the same functionality HTMLSelectElement has. The WML specific features will follow soon. Add simple testcase covering support) Added a site specific quirk for mail.google.com which returns "text" when getting the type of an * bindings/js/JSHTMLInputElementCustom.cpp: (WebCore::needsGmailQuirk): (WebCore::JSHTMLInputElement::type): * html/HTMLInputElement.idl: 2009-05-14 Dimitri Glazkov Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25810 Upstream V8 DOM Wrapper map declarations. No behavior change, so no tests. * bindings/v8/V8DOMMap.h: (WebCore::WeakReferenceMap::WeakReferenceMap): Added. (WebCore::WeakReferenceMap::~WeakReferenceMap): Added. (WebCore::WeakReferenceMap::get): Added. (WebCore::WeakReferenceMap::set): Added. (WebCore::WeakReferenceMap::forget): Added. (WebCore::WeakReferenceMap::contains): Added. (WebCore::WeakReferenceMap::impl): Added. (WebCore::DOMWrapperMap::DOMWrapperMap): Added. 2009-05-15 Simon Fraser Reviewed by Dave Hyatt https://bugs.webkit.org/show_bug.cgi?id=25773 Rename GraphicsLayer::graphicsContextsFlipped() to GraphicsLayer::compositingCoordinatesOrientation() in order to clarify the usage. Clean up code around the GraphicsLayer "contents" layer that makes use of this flag, by removing the setHasContentsLayer() method, and just using setContentsLayer(), which can then always do the flipping if necessary. Only affects ACCELERATED_COMPOSITING builds. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::): * platform/graphics/mac/GraphicsLayerCA.h: (WebCore::GraphicsLayerCA::contentsLayer): * platform/graphics/mac/GraphicsLayerCA.mm: (WebCore::GraphicsLayer::compositingCoordinatesOrientation): (WebCore::GraphicsLayerCA::setBackgroundColor): (WebCore::GraphicsLayerCA::clearBackgroundColor): (WebCore::GraphicsLayerCA::setContentsToImage): (WebCore::GraphicsLayerCA::clearContents): (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): (WebCore::GraphicsLayerCA::setContentsLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::ensureRootPlatformLayer): 2009-05-15 Chris Marrin Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25765 Avoid calling setNeedsStyleRecalc() when we are putting an animated page in the cache. This avoids the assert and subsequent problems with a dirty page going into the cache. * page/animation/KeyframeAnimation.cpp: (WebCore::KeyframeAnimation::endAnimation): 2009-05-15 Francisco Tolmasky BUG 25467: JavaScript debugger should use function.displayName as the function's name in the call stack Reviewed by Adam Roben. * inspector/JavaScriptCallFrame.cpp: (WebCore::JavaScriptCallFrame::functionName): Use calculatedFunctionName which takes into account displayName * inspector/front-end/CallStackSidebarPane.js: Remove "|| anonymous function" since it is handled internally just like in profiles (WebInspector.CallStackSidebarPane.prototype.update): 2009-05-15 Alexey Proskuryakov Windows build fix (and a matching Mac change, to avoid unnecessarily diverging the implementations). * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::start): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): Check strings with isEmpty(), not relying on any implicit conversions. 2009-05-15 Alexey Proskuryakov Reviewed by Darin Adler, Brady Eidson and Eric Carlson. REGRESSION: Unable to download file with FTP URL that includes username and password (Lightwave 9.6 for Mac from Newtek site) CFNetwork only invokes didReceiveAuthenticationChallenge for HTTP requests. Credentials for other protocols (including FTP) should be included as part of the URL. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::start): (WebCore::WebCoreSynchronousLoader::load): * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]): Put credentials in URL for non-HTTP requests. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest): Bail out quickly if the URL is non-HTTP. Cross-origin requests require specific HTTP headers to be received, so they cannot work with other protocols. 2009-05-15 Ariya Hidayat Reviewed by Holger Freyther. [Qt] In the image decoder, remove the raw image data represented as QImage once the image is converted to QPixmap and inserted in the pixmap cache. This effectively reduces the heap usage when running on graphics system other than raster (i.e the case where QImage != QPixmap). * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::imageAtIndex): Nullified the image on purpose. * platform/graphics/qt/ImageDecoderQt.h: Made m_imageList mutable. 2009-05-15 Ariya Hidayat Reviewed by Holger Freyther. [Qt] Refactor alpha channel detection the image decoder. Sets the boolean flag as soon as the image is being read. * platform/graphics/qt/ImageDecoderQt.cpp: (WebCore::ImageDecoderQt::ImageDecoderQt): Initialized m_hasAlphaChannel. (WebCore::ImageDecoderQt::setData): Set the flag when appropriate. (WebCore::ImageDecoderQt::supportsAlpha): Simplified. (WebCore::ImageDecoderQt::reset): Resetted the flag. * platform/graphics/qt/ImageDecoderQt.h: Added m_hasAlphaChannel. 2009-05-15 Laszlo Gombos Reviewed by Darin Adler. Finish support for disabling the JavaScript Debugger and Profiler at compile time in WebCore https://bugs.webkit.org/show_bug.cgi?id=24917 * bindings/js/JSInspectorControllerCustom.cpp: ENABLE_JAVASCRIPT_DEBUGGER guard * bindings/js/JSJavaScriptCallFrameCustom.cpp: Ditto. * inspector/JavaScriptCallFrame.cpp: Ditto. * inspector/JavaScriptCallFrame.h: Ditto. * inspector/JavaScriptCallFrame.idl: Ditto. * inspector/JavaScriptDebugListener.h: Ditto. * inspector/JavaScriptDebugServer.cpp: Ditto. * inspector/JavaScriptDebugServer.h: Ditto. * inspector/JavaScriptProfile.cpp: Ditto. * inspector/JavaScriptProfile.h: Ditto. * inspector/JavaScriptProfileNode.cpp: Ditto. * inspector/JavaScriptProfileNode.h: Ditto. * page/Console.cpp: Use guard ENABLE(JAVASCRIPT_DEBUGGER) instead of USE(JSC) * page/Console.h: Ditto. * page/Console.idl: Use guard ENABLE(JAVASCRIPT_DEBUGGER) instead of !defined(V8_BINDING) 2009-05-15 Jungshik Shin Reviewed by Dimitri Glazkov http://bugs.webkit.org/show_bug.cgi?id=25464 Improve the font fallback for characters belonging to 'common' scripts in ChromiumWin port. Make characters like Danda, Double Danda (punctuation marks in North Indian scripts) and currency signs (e.g. Thai Baht) rendered correctly in Chromium on Win. Tests: fast/text/international/danda-space.html fast/text/international/thai-baht-space.html * platform/graphics/chromium/FontUtilsChromiumWin.cpp: (WebCore::FontMap::getScriptBasedOnUnicodeBlock): (WebCore::FontMap::getScript): (WebCore::getFallbackFamily): 2009-05-15 Laszlo Gombos Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=25731 [Qt] Cleanup - move files exclusive to XPATH and XSLT under the appropriate build section * WebCore.pro: 2009-05-14 Evan Martin Reviewed by Eric Seidel and Darin Fisher. Fix a font-related leak in Chromium's Skia backend found by Valgrind. https://bugs.webkit.org/show_bug.cgi?id=25760 * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): Use caches instead of "new" on every call. 2009-05-14 Rahul Kuchhal Reviewed by Eric Seidel. Initialize m_spreadMethod in the second constructor too. Not sure if a test case can be written, so no test case. https://bugs.webkit.org/show_bug.cgi?id=25814 No test possible: spreadMethod() is only used by SVG, doesn't seem possible to hit this case, since several other SVG tests already should be calling spreadMethod(). * platform/graphics/Gradient.cpp: (WebCore::Gradient::Gradient): 2009-05-14 Simon Fraser No review. Fix Windows build after renaming MediaControlElements to MediaControlElementType. * rendering/RenderMediaControls.cpp: (WebCore::RenderMediaControls::paintMediaControlsPart): * rendering/RenderMediaControls.h: 2009-05-14 Simon Fraser Reviewed by Darin Adler Movie controller’s play button does not change into a pause button Fix a controls repaint issue when the playing state of a video changes by educating the MediaControlInputElements about the state they are currently displaying, and making them repaint when that state changes. This applies to the play/pause and mute/unmute buttons, which both have two states. * rendering/MediaControlElements.cpp: (WebCore::MediaControlInputElement::MediaControlInputElement): (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Pass in and initialize the MediaControlElementType. (WebCore::MediaControlInputElement::update): Update the display type too (WebCore::MediaControlInputElement::setDisplayType): (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): (WebCore::MediaControlMuteButtonElement::updateDisplayType): Choose muted vs. unmuted display. (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): (WebCore::MediaControlPlayButtonElement::updateDisplayType): Choose play vs. paused display. * rendering/MediaControlElements.h: Renamed the MediaControlElements enum to MediaControlElementType. (WebCore::MediaControlInputElement::updateDisplayType): Add a MediaControlElementType member variable with a setter to allow the element to know what type it is displaying. 2009-05-14 Dean Jackson Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25197 Add support for aspect-ratio and orientation media queries. Tests: fast/media/mq-aspect-ratio.html fast/media/mq-orientation.html * css/MediaFeatureNames.h: * css/MediaQueryEvaluator.cpp: (WebCore::orientationMediaFeatureEval): (WebCore::aspect_ratioMediaFeatureEval): (WebCore::min_aspect_ratioMediaFeatureEval): (WebCore::max_aspect_ratioMediaFeatureEval): * css/MediaQueryExp.h: (WebCore::MediaQueryExp::isViewportDependent): 2009-05-14 Kevin McCullough - Resubmitting previous patch, correctly this time. * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::splitTreeToNode): * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::outdentParagraph): 2009-05-14 Kevin McCullough - Rolling out to fix a bug and the build * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::splitTreeToNode): * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::outdentParagraph): 2009-05-14 Kevin McCullough Reviewed by Dan Bernstein. In some situations message content is messed up when indentation is decreased * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::splitTreeToNode): Calling recursively here served to do nothing because this function will return if the second argument is the parent of the first. Not only does this now work as intended, but is necessary for the rest of this fix. * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::outdentParagraph): To determine if we are the last node in a
, and can therefore remove the
we need the endOfEnclosingBlock to extend to the end of the
not just the next block, which could be a
, for example. - Also If a
is removed, but it's the child of another
then its children are now children of the top
. In this case we want to split the parent
because the next paragraph assumes that it is the first node in its
and if that is not true, various bugs arise. 2009-05-14 Brady Eidson Build fix. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::setDefaultMIMEType): 2009-05-14 Brady Eidson Reviewed by Adam Roben. Fix http/tests/xmlhttprequest/cache-override.html on Windows * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::setDefaultMIMEType): Modify the previous response so it maintains all of its data. (WebCore::didReceiveResponse): Call setDefaultMIMEType() when needed. (WebCore::WebCoreSynchronousLoader::load): Ditto. 2009-05-14 Paul Godavari Reviewed by Dimitri Glazkov. Bug: Mac Chromium popup menus are not positioned correctly on scrolled pages: https://bugs.webkit.org/show_bug.cgi?id=25772 Fix Mac Chromium popup menu placement by taking into account any scrolling in the current window. This mirrors the positioning done in PopupContainer::show(), which is used on Chromium Windows and linux. Also fixed indenting for this method. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupContainer::showExternal): 2009-05-14 Drew Wilson Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25774 Upstream V8MessagePortCustom.cpp from the chromium repository. * bindings/v8/custom/V8MessagePortCustom.cpp: Added. (WebCore::ACCESSOR_GETTER): (WebCore::ACCESSOR_SETTER): (WebCore::CALLBACK_FUNC_DECL): 2009-05-14 Simon Fraser Reviewed by Darin Adler https://bugs.webkit.org/show_bug.cgi?id=25777 StyleGeneratedImage::imageSize() needs to take zooming into account for fixed-size images (i.e. canvas) so that canvas-as-image-background renders correctly with zooming. Test: fast/canvas/canvas-bg-zoom.html * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::imageSize): 2009-05-14 Alexey Proskuryakov Reviewed by Darin Adler. Patch originally by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25796 Shouldn't set referer and origin in Loader::Host::servePendingRequests(). Test: http/tests/security/credentials-in-referer.html * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): This will be done in SubresourceLoader::create() anyway. 2009-05-14 Chris Fleizach Reviewed by Darin Adler. Bug 25797: Pages with image maps are not properly read with Voiceover https://bugs.webkit.org/show_bug.cgi?id=25797 * page/AccessibilityImageMapLink.h: (WebCore::AccessibilityImageMapLink::isEnabled): 2009-05-14 Brady Eidson Reviewed by Darin Adler. and https://bugs.webkit.org/show_bug.cgi?id=25790 Nuke the bogus ASSERT and add a legitimate ASSERT with a little help from a new accessor. * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::shouldContentSniff): * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): (WebCore::didReceiveResponse): 2009-05-14 Eric Carlson Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25791 Bug 25791: HTMLMediaElement: implement 'startTime' attribute Support the recently added HTMLMediaElement 'startTime' attribute. This is a read-only value that only the media engine can know, so we just need to add the attribute to HTMLMediaElement and add methods to MediaPlayer and MediaPlayerPrivateInterface so the engine can make it available. Test: media/media-startTime.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::startTime): New. * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::startTime): New. * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::startTime): New. 2009-05-14 Kenneth Rohde Christiansen Reviewed by Ariya Hidayat. Only create a QWidget wrapper for the plugin in the case it is not in the Qt window mapper, and thus receiving events from the Qt event system. Native Qt based plugins running in process, will already be in the window mapper, and thus creating a wrapper, stops them from getting events from Qt, as they are redirected to the wrapper. * plugins/qt/PluginContainerQt.cpp: (PluginContainerQt::on_clientIsEmbedded): 2009-05-14 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25784 Leaks seen on HTTP tests We should change ResourceHandleMac.mm to use smart pointers some day, but this is a minimal fix. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::loadResourceSynchronously): Release mutable request copy made for disabling content sniffing, matching the normal code path. (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Release m_user and m_pass before overwriting. (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Ditto. 2009-05-14 Yury Semikhatsky Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25418 Remove new lines from event handler wrapper to make line numbers in the wrapped script conside with the lines in the original script. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::getListenerFunction): (WebCore::V8LazyEventListener::getWrappedListenerFunction): 2009-05-14 Dimitri Glazkov Reviewed by Alexey Proskuryakov. Remove a JSC-specific include that is already added by including ScriptController. No change in behavior, so no tests. * dom/Document.cpp: Removed JSDOMBinding include. 2009-05-14 Alexey Proskuryakov Reviewed by Brady Eidson. Downloaded non-ASCII file name becomes garbled Hopefully, a final stroke. When updating ResourceRequest from a platform request, a wrong CFString function was used, so a user-friendly name was stored in encoding fallback array. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdateResourceRequest): * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdateResourceRequest): 2009-05-14 Ben Murdoch Reviewed by Darin Adler. Add more ENABLE_DATABASE guards. https://bugs.webkit.org/show_bug.cgi?id=25616 See also https://bugs.webkit.org/show_bug.cgi?id=24776 (original set of guards) * bindings/js/JSSQLResultSetRowListCustom.cpp: * bindings/v8/custom/V8CustomSQLStatementCallback.cpp: * bindings/v8/custom/V8CustomSQLStatementCallback.h: * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: * bindings/v8/custom/V8CustomSQLStatementErrorCallback.h: * bindings/v8/custom/V8CustomSQLTransactionCallback.cpp: * bindings/v8/custom/V8CustomSQLTransactionCallback.h: * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.cpp: * bindings/v8/custom/V8CustomSQLTransactionErrorCallback.h: * bindings/v8/custom/V8DatabaseCustom.cpp: * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: * bindings/v8/custom/V8SQLTransactionCustom.cpp: * storage/Database.cpp: * storage/DatabaseDetails.h: * storage/OriginUsageRecord.cpp: * storage/OriginUsageRecord.h: * storage/SQLError.h: * storage/SQLError.idl: * storage/SQLResultSet.cpp: * storage/SQLResultSet.h: * storage/SQLResultSet.idl: * storage/SQLResultSetRowList.cpp: * storage/SQLResultSetRowList.h: * storage/SQLResultSetRowList.idl: * storage/SQLStatementCallback.h: * storage/SQLStatementErrorCallback.h: * storage/SQLTransactionCallback.h: * storage/SQLTransactionErrorCallback.h: 2009-05-11 Holger Hans Peter Freyther Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25787 Gtk was the last platform to not unregister plugins when the plugin is stopped. Catch up with r43550. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::stop): 2009-05-14 Adam Roben Make WebCore.vcproj's pre-build event work again * WebCore.vcproj/WebCore.vcproj: Removed empty override of the pre-build event that was accidentally left in when the pre-build event was moved to WebCoreCommon.vsprops. 2009-05-14 Darin Adler * manual-tests/right-click-crash.html: Added. 2009-05-14 Mark Rowe Rubber-stamped by Darin Adler. When building with Xcode 3.1.3 should be using gcc 4.2 The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode. Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not. * Configurations/Base.xcconfig: 2009-05-13 Anders Carlsson Fix build. * WebCore.NPAPI.exp: 2009-05-13 Eric Seidel Reviewed by Oliver Hunt. Fix invalid memory write seen in HTMLCanvasElement by Valgrind https://bugs.webkit.org/show_bug.cgi?id=25759 I can't think of any way to catch this with a layout test, so no test. * css/CSSCanvasValue.cpp: (WebCore::CSSCanvasValue::canvasDestroyed): * css/CSSCanvasValue.h: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::~HTMLCanvasElement): * html/HTMLCanvasElement.h: 2009-05-13 Dan Bernstein Reviewed by Anders Carlsson. - fix Replies in Mail are drawn first without the user style sheet and then redrawn with the style sheet Test: platform/mac/fast/loader/user-stylesheet-fast-path.html * page/mac/FrameMac.mm: (WebCore::Frame::setUserStyleSheetLocation): For data URLs with base64-encoded UTF-8 data, just decode the style sheet here an apply it synchronously instead of invoking an asynchronous loader. 2009-05-13 Chris Fleizach Bug 25755: Implement ARIA grid role https://bugs.webkit.org/show_bug.cgi?id=25755 Fix build bustage from last checkin. * page/AccessibilityAriaGrid.cpp: (WebCore::AccessibilityAriaGrid::addChild): 2009-05-13 Chris Fleizach Reviewed by Beth Dakin. Bug 25755: Implement ARIA grid role https://bugs.webkit.org/show_bug.cgi?id=25755 Test: accessibility/aria-tables.html * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * page/AXObjectCache.cpp: (WebCore::AXObjectCache::nodeIsAriaType): (WebCore::AXObjectCache::getOrCreate): * page/AXObjectCache.h: * page/AccessibilityAriaGrid.cpp: Added. (WebCore::AccessibilityAriaGrid::AccessibilityAriaGrid): (WebCore::AccessibilityAriaGrid::~AccessibilityAriaGrid): (WebCore::AccessibilityAriaGrid::create): (WebCore::AccessibilityAriaGrid::addChild): (WebCore::AccessibilityAriaGrid::addChildren): (WebCore::AccessibilityAriaGrid::cellForColumnAndRow): * page/AccessibilityAriaGrid.h: Added. (WebCore::AccessibilityAriaGrid::isAriaTable): * page/AccessibilityAriaGridCell.cpp: Added. (WebCore::AccessibilityAriaGridCell::AccessibilityAriaGridCell): (WebCore::AccessibilityAriaGridCell::~AccessibilityAriaGridCell): (WebCore::AccessibilityAriaGridCell::create): (WebCore::AccessibilityAriaGridCell::parentTable): (WebCore::AccessibilityAriaGridCell::rowIndexRange): (WebCore::AccessibilityAriaGridCell::columnIndexRange): * page/AccessibilityAriaGridCell.h: Added. * page/AccessibilityAriaGridRow.cpp: Added. (WebCore::AccessibilityAriaGridRow::AccessibilityAriaGridRow): (WebCore::AccessibilityAriaGridRow::~AccessibilityAriaGridRow): (WebCore::AccessibilityAriaGridRow::create): (WebCore::AccessibilityAriaGridRow::parentTable): (WebCore::AccessibilityAriaGridRow::headerObject): * page/AccessibilityAriaGridRow.h: Added. * page/AccessibilityList.cpp: (WebCore::AccessibilityList::accessibilityIsIgnored): * page/AccessibilityList.h: * page/AccessibilityObject.h: (WebCore::): * page/AccessibilityRenderObject.cpp: (WebCore::RoleEntry::): * page/AccessibilityTable.cpp: (WebCore::AccessibilityTable::AccessibilityTable): (WebCore::AccessibilityTable::isTableExposableThroughAccessibility): * page/AccessibilityTable.h: (WebCore::AccessibilityTable::isAriaTable): * page/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::parentTable): (WebCore::AccessibilityTableCell::isTableCell): (WebCore::AccessibilityTableCell::titleUIElement): * page/AccessibilityTableCell.h: * page/AccessibilityTableColumn.cpp: (WebCore::AccessibilityTableColumn::setParentTable): (WebCore::AccessibilityTableColumn::headerObject): * page/AccessibilityTableRow.cpp: (WebCore::AccessibilityTableRow::isTableRow): (WebCore::AccessibilityTableRow::parentTable): * page/AccessibilityTableRow.h: * page/mac/AccessibilityObjectWrapper.mm: (RoleEntry::): 2009-05-13 David Levin Reviewed by Dimitri Glazkov. Bug 25763: Need to move v8 custom binding to the custom directory. https://bugs.webkit.org/show_bug.cgi?id=25763 No test due to no change in behavior. * bindings/v8/custom/V8CanvasPixelArrayCustom.cpp: Renamed from WebCore/bindings/v8/V8CanvasPixelArrayCustom.cpp. 2009-05-13 Nate Chapin Reviewed by Dimitri Glazkov. Fix LayoutTests/fast/dom/Element/attr-param-typechecking.html crashing with V8. https://bugs.webkit.org/show_bug.cgi?id=25758 * bindings/v8/custom/V8ElementCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): return the result of throwError() if it is called. 2009-05-13 Jeremy Moskovich Reviewed by Dave Hyatt. Fix a number of bugs relating to RTL and text-overflow:ellipsis. Also refactor the relevant code to make it a little clearer. This CL fixes 3 fundamental issues: - Corrects behavior if the truncated InlineTextBox's directionality is different from the overall flow direction - bug 25135. - Make decoration drawing in InlineFlowbox RTL-aware - bug 24206. - Full truncation on InlineBoxes in RTL flow - bug 24186 - Add tests for the above + reorder/cleanup tests for easier interpretation of outcome. The code for placing ellipsis has been refactored to use left/right notation rather than a single variable whose meaning could differ based on flow directionality. To support differing inline directionality vs flow directionality, different variables are now used in InlineTextBox::placeEllipsisBox to track the two. The drawing mode for underlines in standards mode now correctly handles RTL truncation and relevant test where added. https://bugs.webkit.org/show_bug.cgi?id=24186 https://bugs.webkit.org/show_bug.cgi?id=25135 https://bugs.webkit.org/show_bug.cgi?id=24206 Tests: fast/css/text-overflow-ellipsis-bidi.html fast/css/text-overflow-ellipsis-strict.html * rendering/InlineBox.cpp: (WebCore::InlineBox::placeEllipsisBox): * rendering/InlineBox.h: * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintTextDecorations): (WebCore::InlineFlowBox::placeEllipsisBox): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::placeEllipsisBox): (WebCore::InlineTextBox::paint): * rendering/InlineTextBox.h: * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::placeEllipsis): (WebCore::RootInlineBox::placeEllipsisBox): * rendering/RootInlineBox.h: * rendering/bidi.cpp: (WebCore::RenderBlock::checkLinesForTextOverflow): 2009-05-13 Dmitry Titov Rubber-stamped by Mark Rowe. https://bugs.webkit.org/show_bug.cgi?id=25746 Revert http://trac.webkit.org/changeset/43507 which caused crash in PPC nightlies with Safari 4. * dom/XMLTokenizerLibxml2.cpp: (WebCore::matchFunc): (WebCore::openFunc): (WebCore::createStringParser): (WebCore::createMemoryParser): * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::close): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread): * storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::LocalStorageThread): (WebCore::LocalStorageThread::start): (WebCore::LocalStorageThread::localStorageThread): (WebCore::LocalStorageThread::scheduleImport): (WebCore::LocalStorageThread::scheduleSync): (WebCore::LocalStorageThread::terminate): * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::start): 2009-05-13 David Hyatt Reviewed by Beth Dakin. Fix for REGRESSION (r41896-42143): First letter cut off in styled select menus Make sure to do rounded clipping for overflow and controls relative to the border box and not to the overflow/control clip rect (which is typically clipped to the padding or content box). Doing so was causing rounded clips to be incorrectly applied to padding and content. Added fast/overflow/border-radius-clipping.html * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): 2009-05-13 Darin Adler Revert the parser arena change. It was a slowdown, not a speedup. Better luck next time (I'll break it up into pieces). 2009-05-13 David Hyatt Reviewed by Beth Dakin and Darin Adler. Fix for REGRESSION (r41203): Facebook friend suggestions disappear on update. Make sure that renderers are marked for layout if a style change causes them to switch from having a self-painting layer to a non-self-painting layer (and vice versa). Move misplaced layer repainting code that was in RenderBox up into RenderBoxModelObject so that inlines with layers repaint properly on opacity changes, etc. Added fast/repaint/opacity-change-on-overflow-float.html. * rendering/RenderBox.cpp: (WebCore::RenderBox::styleWillChange): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleWillChange): (WebCore::RenderBoxModelObject::styleDidChange): * rendering/RenderBoxModelObject.h: 2009-05-13 Dimitri Glazkov Not reviewed, build fix. Move an include, needed by Debugger under the corresponding guard. * inspector/InspectorController.cpp: Moved parser/SourceCode under JAVASCRIPT_DEBUGGER guard. 2009-05-13 David Levin Reviewed by Darin Adler. Bug 25394: REGRESSION: crash in DocumentLoader::addResponse due to bad |this| pointer https://bugs.webkit.org/show_bug.cgi?id=25394 Test: http/tests/xmlhttprequest/frame-unload-abort-crash.html * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create): Add another check to subresource loader to avoid doing any loads in frames when the loaders are being stopped. 2009-05-13 Stephan Haller Reviewed by Gustavo Noronha. Wrong handling of file upload if no file selected https://bugs.webkit.org/show_bug.cgi?id=25649 Fixed returned path if path is empty * WebCore/platform/gtk/FileSystemGtk.cpp: 2009-05-13 Dan Bernstein Reviewed by Dave Hyatt. - fix REGRESSION (r42348): Notes flicker white when loading Tests: fast/frames/content-opacity-1.html fast/frames/content-opacity-2.html * page/FrameView.cpp: (WebCore::FrameView::reset): Reset m_contentIsOpaque to false. (WebCore::FrameView::useSlowRepaints): Use slow repaints if the content is not known to be opaque. (WebCore::FrameView::setContentIsOpaque): Added. Sets m_contentIsOpaque and enables or disables fast repaints accordingly. * page/FrameView.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): Removed the document()->haveStylesheetsLoaded() condition in determining whether the root is opaque. This is what was causing the bug, as iframes were considered to be opaque, and thus painted an opaque white background, whenever they were pending a style sheet load. Changed to call FrameView::setContentIsOpaqe() instead of setUseSlowRepaints(), which allows the frame to go back to fast repaints if the content becomes opaque. Corrected the check for background color opacity: any alpha value other than 255--not just zero--is not opaque. 2009-05-13 Ariya Hidayat Reviewed by Sam Weinig. [Qt] Fix "lighther" composition mode. QPainter::CompositionMode_Plus is the right match. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::toQtCompositionMode): 2009-05-13 Darin Adler Reviewed by Cameron Zwarich. Bug 25674: syntax tree nodes should use arena allocation https://bugs.webkit.org/show_bug.cgi?id=25674 * bindings/js/JSDOMBinding.h: Removed include of JSFunction.h. We don't want the entire DOM binding to depend on that file. * bindings/js/JSAudioConstructor.cpp: Added include of Error.h. Before we inherited this automatically because JDDOMBinding.h included JSFunction.h, but that was excessive. * bindings/js/JSDOMWindowCustom.cpp: Ditto. * bindings/js/JSHTMLInputElementCustom.cpp: Ditto. * bindings/js/JSImageConstructor.cpp: Ditto. * bindings/js/JSLazyEventListener.cpp: Ditto, but for JSFunction.h. * bindings/js/JSMessageChannelConstructor.cpp: Ditto. * bindings/js/JSOptionConstructor.cpp: Ditto. * bindings/js/JSWorkerConstructor.cpp: Ditto. * bindings/js/JSXMLHttpRequestConstructor.cpp: Ditto. * bridge/jni/jni_jsobject.mm: Ditto, but for SourceCode.h. * inspector/InspectorController.cpp: Ditto. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::recompileAllJSFunctions): Moved mose of this function into the base class in JavaScriptCore, so the details of compilation don't have to be exposed. 2009-05-13 Douglas R. Davidson Reviewed by Darin Adler. Generate a contextual menu item allowing autocorrections to easily be changed back. Refrain from re-correcting items that have already been autocorrected once. * dom/DocumentMarker.h: * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): (WebCore::Editor::changeBackToReplacedString): * editing/Editor.h: * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): * page/mac/WebCoreViewFactory.h: * platform/ContextMenu.cpp: (WebCore::ContextMenu::populate): (WebCore::ContextMenu::checkOrEnableIfNeeded): * platform/ContextMenuItem.h: * platform/LocalizedStrings.h: * platform/mac/LocalizedStringsMac.mm: (WebCore::contextMenuItemTagChangeBack): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::replacedString): * rendering/HitTestResult.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::computeRectForReplacementMarker): (WebCore::InlineTextBox::paintDocumentMarkers): * rendering/InlineTextBox.h: 2009-05-13 Holger Hans Peter Freyther Rubber Stamped by Oliver Hunt. [GTK] Fix Gtk+/X11 build on OSX Including the CoreFoundation header here and X11 headers later will result in different definitions of Boolean. The CoreFoundation include does not seem to be necessary here and my mac build was successfull without it. I will remove it for now. If the build bots disagree this will be replaced by a #if PLATFORM(CF). * platform/FileSystem.h: 2009-05-13 Holger Hans Peter Freyther Rubber Stamped by Gustavo Noronha. [GTK] Move the #ifdef around for a buildfix for Gtk+ on OSX When building Gtk+ on OSX we ended up declaring setNPWindowIfNeeded twice. Fix that by moving the #if PLATFORM(GTK) up and using elif instead of else. * plugins/PluginView.h: 2009-05-13 Holger Hans Peter Freyther Reviewed by Xan Lopez. https://bugs.webkit.org/show_bug.cgi?id=25685 [GTK] Middle click paste form the pasteboard The kit wants to paste from at least two different clipboards. By introducing getCurrentTarget to the PasteboardHelper interface we can make this decision in the kit. Use the new method in PasteboardGtk to get the right GdkClipboard for the paste operation. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::documentFragment): (WebCore::Pasteboard::plainText): * platform/gtk/PasteboardHelper.h: 2009-05-13 Eric Carlson Reviewed by Darin Adler. QTMoviePreferredTransformAttribute only supported on SnowLeopard QTMovieOpenForPlaybackAttribute only supported on SnowLeopard QTMoviePreferredTransformAttribute and QTMovieOpenForPlaybackAttribute are not supported on Tiger or Leopard. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setNetworkState): Remove invalid ASSERT. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivate::createQTMovie): Only request QTMoviePreferredTransformAttribute when !BUILDING_ON_TIGER and !BUILDING_ON_LEOPARD. (WebCore::MediaPlayerPrivate::cacheMovieScale): Only ask for QTMovieOpenForPlaybackAttribute when !BUILDING_ON_TIGER and !BUILDING_ON_LEOPARD, 2009-05-12 Roland Steiner Reviewed by Eric Seidel. Bug 25738: Skia: CSS border style not cleared for SVG object https://bugs.webkit.org/show_bug.cgi?id=25738 If no dashing is set, this change reverts to solid stroke (previously the code bailed and left the old setting, whatever it was) Test case listed in above bug entry. (Additional complications due to each platform rendering dotted lines differently - c.f. https://bugs.webkit.org/show_bug.cgi?id=25737) * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::setLineDash): 2009-05-11 Erik Arvidsson Reviewed by Eric Seidel. Bug 21903: Adds DOM bindings for the placeholder property of the HTMLInputElement. https://bugs.webkit.org/show_bug.cgi?id=21903 Test: fast/forms/placeholder-dom-property.html * dom/InputElement.cpp: (WebCore::InputElement::updatePlaceholderVisibility): * dom/InputElement.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::placeholder): (WebCore::HTMLInputElement::setPlaceholder): * html/HTMLInputElement.h: * html/HTMLInputElement.idl: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): * wml/WMLInputElement.h: (WebCore::WMLInputElement::placeholder): (WebCore::WMLInputElement::setPlaceholder): 2009-05-12 Adam Barth Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25706 Change V8 bindings to match JSC bindings with respect to using the lexical or dynamic global object. Tests: http/tests/security/aboutBlank/security-context-grandchildren-lexical.html http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): 2009-03-19 Oliver Hunt Reviewed by Darin Adler. Incorrect bound check in SVGList::insertItemBefore SVGList::insertItemBefore would not perform a bounds check on the index it was provided, potentially leading to a buffer overflow. Test: svg/dom/svglist-exception-on-out-bounds-error.html * svg/SVGList.h: (WebCore::SVGList::insertItemBefore): 2009-05-12 Paul Godavari Reviewed by Dimitri Glazkov. Bug 25708: Cannot choose menu items in popups with many entries in Chromium https://bugs.webkit.org/show_bug.cgi?id=25708 This change sets the window size for popups on Mac to include all items in the menu. This is required for hit testing on Mac, where we use native controls to manage the popups and don't want to artificially limit the valid hit testing region to a limited scroll window. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::layout): 2009-05-12 Stephen White Reviewed by Dimitri Glazkov. Fixes to build with latest skia: SkTypeface::Create() is now SkTypeface::CreateFromName(); computeBounds() has been reworked as getBounds(). The changes are placed behind an #ifdef for now, so that we can roll back the skia version in Chromium if necessary without having to roll back this change. https://bugs.webkit.org/show_bug.cgi?id=25705 * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::createFontPlatformData): * platform/graphics/skia/PathSkia.cpp: (WebCore::Path::boundingRect): (WebCore::boundingBoxForCurrentStroke): * platform/graphics/skia/SkiaUtils.cpp: (WebCore::SkPathContainsPoint): 2009-05-12 Nate Chapin Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25732 Update V8ElementCustom.cpp to match the current API of V8Proxy. (WebCore::ACCESSOR_SETTER): Change retrieveActiveFrame() to retrieveFrameForEnteredContext(). 2009-05-12 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25694 HTMLParser::createHead() ASSERT: Creating an element, calling document.open() and writing to the document NULL ptr Test: fast/parser/implicit-head-in-fragment-crash.html * html/HTMLParser.cpp: (WebCore::HTMLParser::bodyCreateErrorCheck): Do not try to implicitly create when parsing a fragment. 2009-05-12 Soren Gjesse Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25687 Missing check for valid function in V8 bindings for toString function for event listeners. * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::getWrappedListenerFunction): Added empty handle checks. 2009-05-11 Yael Aharon Reviewed by Holger Freyther. Change Qt port to match the mac and windows ports, and unregister plugins when plugins are stopped. Not doing that can cause assersion failure. https://bugs.webkit.org/show_bug.cgi?id=25702 * plugins/qt/PluginViewQt.cpp: (WebCore::PluginView::stop): 2009-05-11 Laszlo Gombos Reviewed by Holger Freyther. Bug 25714: [Qt] Decouple HTML5 Database support from the SQLite/generic database support in the Qt port * WebCore.pro: 2009-05-11 Chris Fleizach Reviewed by Beth Dakin. Bug 25713: AX: Control Elements not identified in HTML content https://bugs.webkit.org/show_bug.cgi?id=25713 Test: accessibility/onclick-handlers.html * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::mouseButtonListener): 2009-05-11 Darin Adler Reviewed by Dan Bernstein. REGRESSION: TextIterator generates an extra newline for ranges that start outside of body * editing/TextIterator.cpp: (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Check startPos for null, not just currPos. 2009-05-11 Chris Fleizach Reviewed by Darin Adler. Bug 25700: Regression:WebKit:cmd-left and cmd-right use to go to the beginning and end of a line in Mail https://bugs.webkit.org/show_bug.cgi?id=25700 Keyboard selection movement handlers need to also watch for the Cmd key when Accessibility is enabled. Note: This code is only used when accessibility is enabled. * page/EventHandler.cpp: (WebCore::EventHandler::handleKeyboardSelectionMovement): 2009-05-11 David Kilzer Bug 25087: Test for ENABLE_FOO macros consistently in IDL files Reviewed by Timothy Hatcher. Change tests for ENABLE macros to check for both existence and value: - Negative: #if !defined(ENABLE_FOO) || !ENABLE_FOO - Positive: #if defined(ENABLE_FOO) && ENABLE_FOO * css/CSSCharsetRule.idl: * css/CSSPrimitiveValue.idl: * css/RGBColor.idl: * dom/Attr.idl: * dom/DOMCoreException.idl: * dom/DOMImplementation.idl: * dom/Document.idl: * dom/Element.idl: * dom/Event.idl: * dom/EventException.idl: * dom/KeyboardEvent.idl: * dom/MessagePort.idl: * dom/MouseEvent.idl: * dom/Node.idl: * dom/ProcessingInstruction.idl: * dom/Range.idl: * dom/RangeException.idl: * dom/WheelEvent.idl: * html/CanvasPixelArray.idl: * html/HTMLAnchorElement.idl: * html/HTMLAppletElement.idl: * html/HTMLAreaElement.idl: * html/HTMLBaseFontElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLDocument.idl: * html/HTMLElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLFrameElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLImageElement.idl: * html/HTMLInputElement.idl: * html/HTMLLinkElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLSelectElement.idl: * html/HTMLStyleElement.idl: * html/ImageData.idl: * inspector/InspectorController.idl: * loader/appcache/DOMApplicationCache.idl: * page/Console.idl: * page/Coordinates.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/Geoposition.idl: * page/History.idl: * page/Location.idl: * page/Navigator.idl: * svg/SVGElementInstance.idl: * svg/SVGException.idl: * workers/WorkerContext.idl: * xml/XMLHttpRequestException.idl: * xml/XPathException.idl: 2009-05-11 Norbert Leser Reviewed by Darin Adler. Bug 24538: class/struct mixup in forward declarations https://bugs.webkit.org/show_bug.cgi?id=24538 * inspector/InspectorResource.h: * loader/CachedFont.h: * loader/appcache/ApplicationCache.h: * rendering/RenderBlock.h: * rendering/RootInlineBox.h: * rendering/SVGInlineTextBox.h: * svg/SVGGlyphElement.h: * svg/SVGHKernElement.h: 2009-05-11 Norbert Leser Reviewed by Darin Adler. Bug 24539: Unresolved CSSMutableStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=24539 The Symbian tools can't compile and link this without this include. It's not clear why this is different from other toolsets or why it affects only this header file, but adding the include for now. * editing/RemoveCSSPropertyCommand.h: Added include of CSSMutableStyleDeclaration.h. 2009-05-11 Alice Liu Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=25701 REGRESSION(r38788 & r42020): styled searchfields look wrong on Windows, affects Facebook Test: fast/forms/search-styled.html * css/themeWin.css: Remove the overriding of -webkit-appearance for searchfields. This will cause background images to not be honored when styling searchfields * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::adjustSearchFieldStyle): * rendering/RenderThemeWin.h: Re-instate final adjustments to searchfield styling that were removed in r42020 2009-05-11 Brady Eidson Fix Windows build * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): 2009-05-11 Nate Chapin Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25626 Update V8ElementCustom.cpp to match the current API of Node. * bindings/v8/custom/V8ElementCustom.cpp: (WebCore::ACCESSOR_SETTER): Changed a couple of method names to match current names. (WebCore::ACCESSOR_GETTER): Changed a method name to match current name. 2009-05-11 Brady Eidson Fix Windows build * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): (WebCore::WebCoreSynchronousLoader::load): 2009-05-11 Brady Eidson Fix Windows build * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): 2009-05-11 Nate Chapin Reviewed by Dimitri Glazkov. V8CustomBinding.cpp is missing a header file https://bugs.webkit.org/show_bug.cgi?id=25644 * bindings/v8/custom/V8CustomBinding.cpp: Added #include "V8Proxy.h". 2009-05-11 Aaron Boodman Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25634 Change V8Proxy::retrieveActiveFrame() call sites to V8Proxy::retrieveFrameForEnteredContext(). Also, change instances of ScriptController::retrieveActiveFrame() to V8::retrieveFrameForEnteredContext() for consistency. See http://codereview.chromium.org/113085 for the corresponding Chromium change. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8Custom::WindowSetLocation): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::CALLBACK_FUNC_DECL): * bindings/v8/custom/V8LocationCustom.cpp: (WebCore::navigateIfAllowed): (WebCore::ACCESSOR_SETTER): (WebCore::CALLBACK_FUNC_DECL): 2009-05-11 Brady Eidson Reviewed by Darin Adler. Local image files (BMP, ico) can be misidentified as HTML. First part of the fix - Disable content sniffing for file resources which never should've been happening anyways. Second part of the fix - If the networking layer doesn't give us back a MIME type default to "application/octet-stream". * platform/MIMETypeRegistry.cpp: (WebCore::defaultMIMEType): "application/octet-stream" * platform/MIMETypeRegistry.h: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::create): If content sniffing is true, double check with "shouldContentSniffRequest()" which might override it to false. (WebCore::ResourceHandle::shouldContentSniffURL): Return false for file:// urls, true for everything else. * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::createCFURLResponseWithDefaultMIMEType): Create a copy of the CFURLRequest with the default MIME type instead of null. (WebCore::didReceiveResponse): If the MIME type for the response is null, create a copy with the default MIME type. (WebCore::WebCoreSynchronousLoader::load): Use shouldContentSniffRequest() to make synchronous loads have the same sniffing policy as asynchronous loads. Also, correct a null MIME type by creating a copy with the default type. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::loadResourceSynchronously): Use shouldContentSniffRequest() to make synchronous loads have the same sniffing policy as asynchronous loads. (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Set up the [NSURLResponse MIMEType] swizzling if it hasn't been set up yet. (_web_NSURLResponse_MIMEType): Either return the actual MIME type of the response, or the default MIME type if it's nil. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::loadRequestAsynchronously): Remove the workaround added in r29370 as it will now be covered by the new mechanism. 2009-05-11 David Kilzer Fix typo "APPLICATION_CAHE_DYNAMIC_ENTRIES" to "APPLICATION_CACHE_DYNAMIC_ENTRIES" This was added in r39816 to disable dynamic entries. They are still disabled after fixing the typo since this feature define is never set anywhere. * bindings/js/JSDOMApplicationCacheCustom.cpp: * loader/appcache/DOMApplicationCache.idl: 2009-05-11 Dmitry Titov Reviewed by Alexey Proskuryakov and Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=25348 Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap. Most of the change is in WTF. Unless noted, all the following files changed to use the new ThreadIdentifier::isValid() method instead of just doing 'if(m_threadID)' kind of checks, since ThreadIdentifier is now a class rather then an integer. Also, there is no need to initialize threadID in constructors to 0 now. * dom/XMLTokenizerLibxml2.cpp: (WebCore::libxmlLoaderThread): use DEFINE_STATIC_LOCAL and accessor function for static thread id, since now ThreadIdentifier needs construction and we avoid having global initializers. (WebCore::matchFunc): use the new accessor function. (WebCore::openFunc): ditto. (WebCore::createStringParser): ditto. (WebCore::createMemoryParser): ditto. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::close): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread): remove m_threadID from debug output. * storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::start): (WebCore::LocalStorageThread::scheduleImport): (WebCore::LocalStorageThread::scheduleSync): (WebCore::LocalStorageThread::terminate): * workers/WorkerThread.cpp: (WebCore::WorkerThread::start): (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::start): 2009-05-11 Brady Eidson Reviewed by Darin Adler. Remove unused header that declared one function which was never defined anywhere. * WebCore.vcproj/WebCore.vcproj: * platform/network/cf/ResourceResponseCFNet.cpp: Change to include ResourceResponse.h (which really means platform/network/cf/ResourceResponse.h) * platform/network/cf/ResourceResponseCFNet.h: Removed. 2009-05-11 Dimitri Glazkov Reviewed by Timothy Hatcher. https://bugs.webkit.org/show_bug.cgi?id=25213 Fix assert during Inspector destruction. * inspector/InspectorController.cpp: (WebCore::InspectorController::inspectedPageDestroyed): Moved closing inspector above removing InspectorController object to fix JS errors, added clearing inspector page ptr. 2009-05-11 Laszlo Gombos Reviewed by Holger Freyther. [Qt] Make sure that public APIs are properly exported on all Qt platforms https://bugs.webkit.org/show_bug.cgi?id=25601 * WebCore.pro: Define QT_MAKEDLL for all non-static builds, not just for win 2009-05-11 Csaba Osztrogonac Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=24284 * WebCore.pro: duplicated values removed from INCLUDEPATH 2009-05-11 Laszlo Gombos Reviewed by Eric Seidel. Build fix Symbian; clean Up WebKit/Qt if ENABLE_NETSCAPE_PLUGIN_API=0 https://bugs.webkit.org/show_bug.cgi?id=24688 * WebCore.pro: Use platform independent plugin stubs if ENABLE_NETSCAPE_PLUGIN_API=0 * platform/qt/TemporaryLinkStubs.cpp: Remove stub functions for plugins 2009-05-10 Dan Bernstein Reviewed by Darin Adler. - fix a crash when deactivating a document that had adopted a
element Test: fast/dom/HTMLFormElement/document-deactivation-callback-crash.html * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::didMoveToNewOwnerDocument): Corrected the logic here: elements should be registered for document activation callbacks if and only if autocomplete is off. 2009-05-10 Alexey Proskuryakov Reviewed by Dan Bernstein. REGRESSION (r42483): Have to enter credentials twice when trying to view protected MobileMe video Add a temporary workaround. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): Added an m_useSiteSpecificQuirks boolean (Mac-only). A Frame pointer is only available when starting a request, so we need to store this data for later use. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): Initialize m_useSiteSpecificQuirks. (WebCore::ResourceHandle::receivedCredential): Use per-session credentials with gallery.me.com. 2009-05-10 Alexey Proskuryakov Reviewed by Dan Bernstein. Have to enter credentials twice when downloading from a protected page * platform/network/cf/AuthenticationCF.cpp: * platform/network/cf/AuthenticationCF.h: (WebCore::WebCoreCredentialStorage::set): (WebCore::WebCoreCredentialStorage::get): * platform/network/cf/ResourceHandleCFNet.cpp: Move WebCore credential storage to AuthenticationCF, so that WebKit could use it (macthing an earlier Mac change). 2009-05-10 Alexey Proskuryakov Reviewed by Dan Bernstein. Match newer XMLHttpRequest draft and make withCredential setter raise an exception when called at a wrong time. No test, because we are waiting for a newer version of system frameworks to test the attribute. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setWithCredentials): * xml/XMLHttpRequest.h: * xml/XMLHttpRequest.idl: Raise INVALID_STATE_ERR if the state is not OPENED, or if the send() flag is true. 2009-05-10 Dan Bernstein Reviewed by Dave Kilzer. - fix https://bugs.webkit.org/show_bug.cgi?id=25602 REGRESSION: fast/overflow/overflow-focus-ring.html seems double-drawn on ToT Test: fast/layers/self-painting-outline.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): Paint the layer's own outline only if it is a self-painting layer. 2009-05-09 Dan Bernstein Reviewed by Geoffrey Garen and Mark Rowe. - fix https://bugs.webkit.org/show_bug.cgi?id=25666 Assertion failure in Node::setDocument() (willMoveToNewOwnerDocumentWasCalled) when adopting a element Test: fast/dom/HTMLFormElement/adopt-assertion.html * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::willMoveToNewOwnerDocument): Overrides of this method are required to call the base class implementation. Do it. (WebCore::HTMLFormElement::didMoveToNewOwnerDocument): Ditto. 2009-03-29 Kevin Ollivier Reviewed by Maciej Stachowiak. WebCore::DocumentLoader::mainReceivedError now asserts if error.isNull(), so make sure CURL does not create empty ResourceError() objects. https://bugs.webkit.org/show_bug.cgi?id=24927 * platform/network/curl/ResourceHandleManager.cpp: (WebCore::ResourceHandleManager::downloadTimerCallback): 2009-05-09 Gustavo Noronha Silva Build fix, adding missing files to make dist. * GNUmakefile.am: 2009-05-08 Simon Fraser Reviewed by Dan Bernstein https://bugs.webkit.org/show_bug.cgi?id=25656 Reduce the inline capacity of CSSParserValueList's m_values vector to reduce the size of CSSParserValueList from 544 to 160 bytes in 64-bit. * css/CSSParserValues.h: 2009-05-08 Nikolas Zimmermann Not reviewed. Used sort-Xcode-project-file to sort the XCode project file - it hasn't been done for a while. * WebCore.xcodeproj/project.pbxproj: 2009-05-08 Dan Bernstein Reviewed by Darin Adler. - fix REGRESSION: Crash below ApplyStyleCommand::applyInlineStyleToRange when reviewing a patch in Bugzilla Test: editing/style/apply-through-end-of-document.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyleToRange): Added a null check for the case of a range extending through the end of the document, in which pastEndNode is 0. 2009-05-08 Douglas R. Davidson Reviewed by Beth Dakin. REGRESSION (Safari 3-4): Contraction base marked as misspelled even though contraction is a word Make sure spelling underline does not persist on words like . * editing/TypingCommand.cpp: (WebCore::TypingCommand::typingAddedToOpenCommand): 2009-05-08 Kevin Watters Reviewed by Kevin Ollivier. Make sure the path's refdata isn't deleted before we're done with the object. https://bugs.webkit.org/show_bug.cgi?id=25652 * platform/graphics/wx/PathWx.cpp: (WebCore::Path::~Path): (WebCore::Path::Path): (WebCore::Path::translate): 2009-05-08 Kevin Watters Reviewed by Darin Adler. Fix for memory leak on Mac. https://bugs.webkit.org/show_bug.cgi?id=25650 * platform/wx/wxcode/mac/carbon/fontprops.cpp: (wxFontProperties::wxFontProperties): 2009-05-08 Beth Dakin Reviewed by Dan Bernstein. REGRESSION (r37591): Cannot print or preview from maps.yandex.ru We need to fall into the stretchesToViewHeight() quirk when we are printing and we are the root and the root has percentage height OR when we are the body and the root has percentage height. Otherwise we have a height of 0 and can run into painting troubles. * rendering/RenderBox.cpp: (WebCore::RenderBox::calcHeight): 2009-05-08 Douglas Davidson Reviewed by Darin Adler. Fixes for . Prevent text checking replacement immediately after an apostrophe and automatic link addition except immediately after typing. * editing/Editor.cpp: (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): 2009-05-08 Eric Carlson Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25627 Bug 25627: HTMLMediaElement: some errors should fire on elements Update for HTML5 spec change to fire 'error' events on element when there is a failure while processing/loading a . Test: media/video-source-error.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::enqueueEvent): Remove white-space. (WebCore::HTMLMediaElement::loadInternal): Call cancelPendingEventsAndCallbacks instead of just calling m_pendingEvents.clear() as we now also need to cancel pending errors on all element. (WebCore::HTMLMediaElement::selectMediaResource): Call isSafeToLoadURL() here instead of in loadResource() as we need to report errors differently depending on the type of failure. Use KURL instead of String. (WebCore::HTMLMediaElement::loadNextSourceChild): nextSourceChild -> selectNextSourceChild. Fail silently when there are no more canditates because that is what spec mandates. Keep url as KURL instead of converting to String. (WebCore::HTMLMediaElement::loadResource): ASSERT that the URL is safe to load as we now assume the safety check now done before this function. Takes KURL instead of String. (WebCore::HTMLMediaElement::isSafeToLoadURL): New, checks to see if a url is safe to load, logs failure if not. (WebCore::HTMLMediaElement::noneSupported): MEDIA_ERR_NONE_SUPPORTED -> MEDIA_ERR_SRC_NOT_SUPPORTED (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): New, clear all events pending on the media and all source elements. (WebCore::HTMLMediaElement::setNetworkState): Fire an error on the source element when the the failure happened while processing one. Only call nonSupported() when the failure happened while processing media element 'src' attribute. (WebCore::HTMLMediaElement::havePotentialSourceChild): nextSourceChild -> selectNextSourceChild. Deal with selectNextSourceChild returning a KURL instead of a String. (WebCore::HTMLMediaElement::selectNextSourceChild): Renamed from nextSourceChild, add optional param to control whether or not errors are fired on a source element when it will not be used. Check safety of url here instead of waiting until loadResource(). Return a KURL instead of a String. (WebCore::HTMLMediaElement::initialURL): nextSourceChild -> selectNextSourceChild. Keep url as a KURL instead of a String. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::): * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::HTMLSourceElement): Initialize timer related variables. (WebCore::HTMLSourceElement::scheduleErrorEvent): New, start one-shot timer to fire an error event ASAP. (WebCore::HTMLSourceElement::cancelPendingErrorEvent): New, cancel pending error event. (WebCore::HTMLSourceElement::errorEventTimerFired): New, fire error event if it has not been cancelled. * html/HTMLSourceElement.h: * html/MediaError.h: (WebCore::MediaError::): MEDIA_ERR_NONE_SUPPORTED -> MEDIA_ERR_SRC_NOT_SUPPORTED * html/MediaError.idl: Ditto 2009-05-08 Dan Bernstein Reviewed by Maciej Stachowiak. - fix Undoing typed text after selecting all leaves non-text areas highlighted Test: fast/repaint/selection-clear.html When RenderView::clearSelection() is called from SelectionController::nodeWillBeRemoved(), selected renderers may already be marked for layout, which means that they can no longer compute their selection repaint info. Instead, an empty IntRect (or GapRects) is returned, leading to incomplete repaint. The fix is not to rely on individual renderers when clearing the selection, but instead, cache the bounding rectangle of the selected blocks' GapRects when setting the selection, and invalidate that entire rectangle when clearing it. * rendering/RenderView.cpp: (WebCore::RenderView::setSelection): Added a parameter saying whether the repainting of selected blocks should include both previously-selected areas and newly-selected areas or only newly-selected areas. The default is both. Also compute m_cachedSelectionBounds to be the bounding rectangle of the new selection's BlockSelectionInfos' GapRects. (WebCore::RenderView::clearSelection): Repaint m_cachedSelectionBounds, and tell setSelection() that it should not paint areas that were in the old selection's BlockSelectionInfos' GapRects. * rendering/RenderView.h: (WebCore::RenderView::): 2009-05-08 Alexey Proskuryakov Reviewed by Maciej Stachowiak. NPN_GetAuthenticationInfo does not work with non-permanent credentials * WebCore.base.exp: * platform/network/mac/AuthenticationMac.h: (WebCore::WebCoreCredentialStorage::set): (WebCore::WebCoreCredentialStorage::get): * platform/network/mac/AuthenticationMac.mm: * platform/network/mac/ResourceHandleMac.mm: Moved WebCoreCredentialStorage to AuthenticationMac, so that it could be used from WebKit. 2009-05-08 Jedrzej Nowacki Reviewed by Simon Hausmann. Fix the Qt build, add missing JSC_HOST_CALL macros to the runtime call methods. * bridge/qt/qt_runtime.h: 2009-05-08 Jan Michael Alonzo Reviewed by Mark Rowe. Add missing strings to localizedStrings.js https://bugs.webkit.org/show_bug.cgi?id=25635 Add the strings "Delete", "Key", "Refresh" and "Value". * English.lproj/localizedStrings.js: 2009-05-08 Robert Hogan Reviewed, tweaked and landed by Alexey Proskuryakov. https://bugs.webkit.org/show_bug.cgi?id=24992 [Qt] crash at http://browserspy.dk/browser.php This cannot be easily tested in DRT, because it relies on interaction with QApplication, but the added assertions guard against re-introducing this issue. * loader/FrameLoader.cpp: (WebCore::FrameLoader::didOpenURL): Don't make client calls while the frame is being constructed, because the intermediate state without a document is something we don't want to expose. * page/Frame.cpp: (WebCore::Frame::setJSStatusBarText): Assert that the frame has a document, which is an approximation of it being in a consistent state for client calls. (WebCore::Frame::setJSDefaultStatusBarText): Ditto. 2009-05-07 Mark Rowe Rubber-stamped by Oliver Hunt. Fix . Bug 25640: Crash on quit in r43384 nightly build on Leopard w/ Safari 4 beta installed Roll out r43366 as it removed symbols that Safari 4 Beta uses. * dom/XMLTokenizerLibxml2.cpp: (WebCore::matchFunc): (WebCore::openFunc): (WebCore::createStringParser): (WebCore::createMemoryParser): * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::close): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::DatabaseThread): (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread): * storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::LocalStorageThread): (WebCore::LocalStorageThread::start): (WebCore::LocalStorageThread::localStorageThread): (WebCore::LocalStorageThread::scheduleImport): (WebCore::LocalStorageThread::scheduleSync): (WebCore::LocalStorageThread::terminate): * workers/WorkerThread.cpp: (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::start): 2009-05-08 Xan Lopez Reviewed by Gustavo Noronha. Unify scrolling code via adjustments and keys. Use the WebCore defined constants, since that's what people are most used to at this point. * platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollView::platformHandleHorizontalAdjustment): (WebCore::ScrollView::platformHandleVerticalAdjustment): 2009-05-07 David Levin Reviewed by NOBODY. Suggested by Oliver Hunt. Rolling back http://trac.webkit.org/changeset/43385 because we have to use mac artwork for the underline on OSX. * platform/graphics/cg/GraphicsContextCG.cpp: * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::createPatternColor): (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::setCGStrokeColor): (WebCore::spellingPatternColor): (WebCore::grammarPatternColor): (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): 2009-05-07 John Grabowski Reviewed by Simon Fraser. https://bugs.webkit.org/show_bug.cgi?id=25573 Unify use of CG-common routine for drawLineForMisspellingOrBadGrammar. Cleanup for WebKit, but required for Chromium happiness. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::spellingPatternColor): (WebCore::grammarPatternColor): (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): * platform/graphics/mac/GraphicsContextMac.mm: * platform/graphics/win/GraphicsContextCGWin.cpp: 2009-05-07 Darin Adler Reviewed by Simon Fraser. Bug 25575: Registered mutation event listener crashes HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=25575 Test: fast/media/video-controls-with-mutation-event-handler.html * rendering/MediaControlElements.cpp: (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Don't call setAttribute. * rendering/RenderMedia.cpp: (WebCore::RenderMedia::createTimeline): Call setAttribute here. 2009-05-07 Simon Fraser Rubber Stamped by Dave Hyatt Shuffle the data members to minimize padding. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::RenderTableSection): * rendering/RenderTableSection.h: 2009-05-07 Simon Fraser Rubber Stamped by Dave Hyatt Shuffle the data members to make Events 8 bytes smaller in 64-bit. * dom/Event.cpp: (WebCore::Event::Event): * dom/Event.h: 2009-05-07 Eric Seidel Reviewed by Beth Dakin. Fix regression caused by r41469, add test case to prevent it from happening again. https://bugs.webkit.org/show_bug.cgi?id=25252 hasLayer() was true during removeOnlyThisLayer()/ updateLayerPositions() which caused updateLayerPosition()'s walk up the render tree to include offsets from the layer we were about to remove. I'm not 100% convinced that this wasn't a bug in updateLayerPosition() or in RenderBoxModelObject::styleDidChange, because the layer in question is not the containing block for the block which gets laid out wrong. But this restores the previous behavior and adds a test. So the next time someone is in here re- factoring, they will at least know if they break something. Test: fast/layers/remove-only-this-layer-update.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::destroyLayer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::removeOnlyThisLayer): * rendering/RenderObject.cpp: (WebCore::RenderObject::destroy): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::destroy): 2009-05-07 Dmitry Titov Attempt to fix GTK build. * platform/graphics/GlyphPageTreeNode.h: add #include to ensure memcpy and memset are defined. 2009-05-07 Oliver Hunt Reviewed by Gavin Barraclough. Improve native call performance Add calling convention declarations where necessary, and update bindings script to generate them as well. * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::callHTMLCollection): * bindings/js/JSNodeListCustom.cpp: (WebCore::callNodeList): * bindings/js/JSPluginElementFunctions.cpp: (WebCore::callPlugin): * bindings/js/JSQuarantinedObjectWrapper.h: * bindings/scripts/CodeGeneratorJS.pm: * bridge/runtime_method.cpp: (JSC::callRuntimeMethod): * bridge/runtime_object.cpp: (JSC::callRuntimeObject): 2009-05-07 Nikolas Zimmermann Reviewed by Dave Hyatt. Fixes: https://bugs.webkit.org/show_bug.cgi?id=25617 Fix memory/performance regression because of too much form control related abstraction just for WMLs sake. Remove FormControlElement and FormControlElementWithState base classes, as the overhead is too high for the gain. HTML has no benefit of that kind of abstraction, so we're going to move the functionality to Element directly. The functions now living in FormControlElement(WithState) lived in Node/Element/HTMLFormControlElement before. This patches moves all of them in a central place in Element.h, as virtual functions with an inline default implementation. To avoid confusion like isEnabled() living on Node, before the creation of the FormControlElement abstraction layer, all methods are renamed to clarify where they belong to. All renames are listed here: From FormControlElement: - isEnabled() -> isEnabledFormControl() - isReadOnly() -> isReadOnlyFormControl() - isTextControl() -> isTextFormControl() - valueMatchesRenderer() -> formControlValueMatchesRenderer() - setValueMatchesRenderer() -> setFormControlValueMatchesRenderer() - name() -> formControlName() - type() -> formControlType() From FormControlElementWithState: - saveState() -> saveFormControlState() - restoreState() -> restoreFormControlState() A lot of Element -> FormControlElement(WithState) casting is gone again, so it's not only a memory, but also a performance progression. No testcases affected, no new tests needed. * GNUmakefile.am: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * WebCoreSources.bkl: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * dom/Document.cpp: (WebCore::Document::formElementsState): * dom/Document.h: (WebCore::Document::registerFormElementWithState): (WebCore::Document::unregisterFormElementWithState): * dom/Element.h: (WebCore::Element::isFormControlElement): (WebCore::Element::isEnabledFormControl): (WebCore::Element::isReadOnlyFormControl): (WebCore::Element::isTextFormControl): (WebCore::Element::formControlValueMatchesRenderer): (WebCore::Element::setFormControlValueMatchesRenderer): (WebCore::Element::formControlName): (WebCore::Element::formControlType): (WebCore::Element::saveFormControlState): (WebCore::Element::restoreFormControlState): * dom/FormControlElement.cpp: Removed. * dom/FormControlElement.h: Removed. * dom/FormControlElementWithState.cpp: Removed. * dom/FormControlElementWithState.h: Removed. * dom/InputElement.cpp: (WebCore::InputElement::setValueFromRenderer): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::formControlType): * html/HTMLButtonElement.h: * html/HTMLFieldSetElement.cpp: (WebCore::HTMLFieldSetElement::formControlType): * html/HTMLFieldSetElement.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::attach): (WebCore::HTMLFormControlElement::formControlName): (WebCore::HTMLFormControlElement::willValidate): (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState): (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState): (WebCore::HTMLFormControlElementWithState::willMoveToNewOwnerDocument): (WebCore::HTMLFormControlElementWithState::didMoveToNewOwnerDocument): (WebCore::HTMLFormControlElementWithState::finishParsingChildren): * html/HTMLFormControlElement.h: (WebCore::HTMLFormControlElement::isTextFormControl): (WebCore::HTMLFormControlElement::isEnabledFormControl): (WebCore::HTMLFormControlElement::formControlValueMatchesRenderer): (WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer): (WebCore::HTMLFormControlElement::isReadOnlyFormControl): (WebCore::HTMLFormControlElement::type): (WebCore::HTMLFormControlElement::name): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::formControlName): (WebCore::HTMLInputElement::formControlType): (WebCore::HTMLInputElement::saveFormControlState): (WebCore::HTMLInputElement::restoreFormControlState): (WebCore::HTMLInputElement::parseMappedAttribute): (WebCore::HTMLInputElement::detach): (WebCore::HTMLInputElement::setValue): (WebCore::HTMLInputElement::setFileListFromRenderer): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::readOnly): (WebCore::HTMLInputElement::isTextFormControl): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::formControlType): * html/HTMLKeygenElement.h: * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::formControlType): * html/HTMLLegendElement.h: * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::formControlType): * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::formControlType): * html/HTMLOptionElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::formControlType): (WebCore::HTMLSelectElement::saveFormControlState): (WebCore::HTMLSelectElement::restoreFormControlState): * html/HTMLSelectElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): (WebCore::HTMLTextAreaElement::formControlType): (WebCore::HTMLTextAreaElement::saveFormControlState): (WebCore::HTMLTextAreaElement::restoreFormControlState): (WebCore::HTMLTextAreaElement::updateValue): (WebCore::HTMLTextAreaElement::setValue): * html/HTMLTextAreaElement.h: (WebCore::HTMLTextAreaElement::readOnly): (WebCore::HTMLTextAreaElement::isTextFormControl): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isEnabled): (WebCore::AccessibilityRenderObject::canSetFocusAttribute): * page/DragController.cpp: (WebCore::DragController::concludeEditDrag): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemIsEnabled): * rendering/RenderTextControl.cpp: (WebCore::updateUserModifyProperty): (WebCore::RenderTextControl::setInnerTextValue): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::subtreeHasChanged): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isEnabled): (WebCore::RenderTheme::isReadOnlyControl): * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::adjustMenuListStyle): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustMenuListStyle): * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::adjustMenuListStyle): * wml/WMLFormControlElement.cpp: * wml/WMLFormControlElement.h: (WebCore::WMLFormControlElement::isReadOnlyFormControl): (WebCore::WMLFormControlElement::isTextFormControl): (WebCore::WMLFormControlElement::formControlValueMatchesRenderer): (WebCore::WMLFormControlElement::setFormControlValueMatchesRenderer): * wml/WMLInputElement.cpp: (WebCore::WMLInputElement::WMLInputElement): (WebCore::WMLInputElement::isKeyboardFocusable): (WebCore::WMLInputElement::isMouseFocusable): (WebCore::WMLInputElement::dispatchBlurEvent): (WebCore::WMLInputElement::formControlType): (WebCore::WMLInputElement::formControlName): (WebCore::WMLInputElement::setValue): (WebCore::WMLInputElement::saveFormControlState): (WebCore::WMLInputElement::restoreFormControlState): (WebCore::WMLInputElement::parseMappedAttribute): (WebCore::WMLInputElement::detach): (WebCore::WMLInputElement::appendFormData): (WebCore::WMLInputElement::init): * wml/WMLInputElement.h: (WebCore::WMLInputElement::isTextFormControl): * wml/WMLOptGroupElement.cpp: (WebCore::WMLOptGroupElement::formControlType): * wml/WMLOptGroupElement.h: * wml/WMLOptionElement.cpp: (WebCore::WMLOptionElement::formControlType): * wml/WMLOptionElement.h: 2009-05-07 Dmitry Titov Reviewed by Alexey Proskuryakov and Adam Roben. https://bugs.webkit.org/show_bug.cgi?id=25348 Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap. Most of the change is in WTF. Unless noted, all the following files changed to use the new ThreadIdentifier::isValid() method instead of just doing 'if(m_threadID)' kind of checks, since ThreadIdentifier is now a class rather then an integer. Also, there is no need to initialize threadID in constructors to 0 now. * dom/XMLTokenizerLibxml2.cpp: (WebCore::libxmlLoaderThread): use DEFINE_STATIC_LOCAL and accessor function for static thread id, since now ThreadIdentifier needs construction and we avoid having global initializers. (WebCore::matchFunc): use the new accessor function. (WebCore::openFunc): ditto. (WebCore::createStringParser): ditto. (WebCore::createMemoryParser): ditto. * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::open): * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::close): * storage/DatabaseThread.cpp: (WebCore::DatabaseThread::start): (WebCore::DatabaseThread::databaseThread): remove m_threadID from debug output. * storage/LocalStorageThread.cpp: (WebCore::LocalStorageThread::start): (WebCore::LocalStorageThread::scheduleImport): (WebCore::LocalStorageThread::scheduleSync): (WebCore::LocalStorageThread::terminate): * workers/WorkerThread.cpp: (WebCore::WorkerThread::start): (WebCore::WorkerThread::WorkerThread): (WebCore::WorkerThread::start): 2009-05-07 Simon Fraser Rubber Stamped by Dave Hyatt Shuffle the data members to minimize padding. * dom/ClassNames.h: 2009-05-07 Simon Fraser Reviewed by Darin Adler Shrink GlyphPage from 4112 to 2576 bytes in 64-bit https://bugs.webkit.org/show_bug.cgi?id=25605 Shrink GlyphPage by splitting the array of GlyphData, which has lots of padding, into separate Glyph and SimpleFontData* arrays. * platform/graphics/Font.h: glyphDataForCharacter has to return a GlyphData by value now. * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): Return GlyphData by value. * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): Better encapsulation of GlyphPage, using the new methods. * platform/graphics/Font.h: * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataForCharacter): * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): * platform/graphics/GlyphPageTreeNode.h: (WebCore::GlyphData::GlyphData): (WebCore::GlyphPage::indexForCharacter): (WebCore::GlyphPage::glyphDataForCharacter): (WebCore::GlyphPage::glyphDataForIndex): (WebCore::GlyphPage::glyphAt): (WebCore::GlyphPage::fontDataForCharacter): (WebCore::GlyphPage::setGlyphDataForCharacter): (WebCore::GlyphPage::setGlyphDataForIndex): (WebCore::GlyphPage::copyFrom): (WebCore::GlyphPage::clear): 2009-05-07 Dimitri Glazkov Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25625 Implement Image/Option constructors in V8 bindings. * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::NAMED_PROPERTY_GETTER): Removed old JS-based code. * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: Added. * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: Added. 2009-05-07 Brady Eidson I hate myself for doing this, but need to fix that ChangeLog entry. * ChangeLog: 2009-05-07 Brady Eidson Rubberstamped by Darin Adler * html/HTMLParser.cpp: Use the correct style of BUILDING_ON_* for WebCore. * html/HTMLParser.h: Ditto 2009-05-07 David Hyatt Restore intrinsic margins to all form controls on Mac and Windows. Some of this regressed in 43007 when textareas were given explicit margins. Some of it had already regressed earlier whenever intrinsic margins were turned off in themeWin.css. Reviewed by Beth Dakin. * css/html4.css: * css/themeWin.css: 2009-05-07 Brady Eidson Reviewed by Darin Adler and Alexey Proskuryakov. Exception occurs in Mail when attempting to create signatures due to element creation * dom/Document.cpp: (WebCore::Document::implicitClose): Check shouldCreateImplicitHead() before creating it. * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Check shouldCreateImplicitHead() before creating it. (WebCore::HTMLParser::bodyCreateErrorCheck): Ditto. (WebCore::shouldCreateImplicitHead): For Tiger/Leopard when running under Mail, the implicit shouldn't be created. * html/HTMLParser.h: (WebCore::shouldCreateImplicitHead): Inline implementation for non-Tiger/Leopard platforms 2009-05-07 Antony Sargent Reviewed by Darin Fisher. Fix a memory leak in V8EventListenerList::remove. https://bugs.webkit.org/show_bug.cgi?id=25618 No new functionality so no new tests. * bindings/v8/V8EventListenerList.cpp: (WebCore::V8EventListenerList::remove): 2009-05-07 Darin Fisher Fix Chromium build bustage. * bindings/v8/custom/V8HTMLFormElementCustom.cpp: Add missing HTMLCollection.h include. 2009-05-07 Chris Fleizach Reviewed by Beth Dakin. Bug 25598: AX: if a radio button has a label and a title, the label is not exposed https://bugs.webkit.org/show_bug.cgi?id=25598 Test: accessibility/radio-button-title-label.html * page/AccessibilityObject.h: (WebCore::AccessibilityObject::exposesTitleUIElement): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::exposesTitleUIElement): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): * page/AccessibilityRenderObject.h: 2009-05-07 Darin Fisher Fix Chromium build bustage. * bindings/v8/custom/V8HTMLFormElementCustom.cpp: (WebCore::INDEXED_PROPERTY_GETTER): ":" should be "::" 2009-05-07 Xan Lopez Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=25610 [GTK] text.caretOffset is reportedly always 0 Use the right function to get the caret offset in an element. selectionStart() would only work for text controls (there's even an ASSERT when calculating the selected text range). Instead just get the selection and get the offset of the start position. * page/gtk/AccessibilityObjectWrapperAtk.cpp: 2009-05-07 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Fix support for antialiased CSS border-radius WebKit implements border-radius by drawing a double-size border, and then letting the clip constrain the border to the right width and position. This requires support for antialiased clipping, as well as painting, to get a nice smooth border. Qt only does antialiased clipping if the anti-alias flag is set at the time of clipping, so we have to enable this in the method addInnerRoundedRectClip(), as well as when we draw the border. Currently the raster-engine is the only Qt paint engine to support anti-aliased clipping, but the OpenGL and Mac paint engines could potentially support this in the future. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::addInnerRoundedRectClip): 2009-05-07 Adam Langley Reviewed by Eric Seidel. Render empty optgroup elements. https://bugs.webkit.org/show_bug.cgi?id=24900 Currently, optgroup elements which are empty are not rendered. The HTML specification gives no guidance on this situation. However, the test for being empty is that they have no children, thus this will not render: while this /will/ render (because of the text node child): This patch will cause both cases to render which matches IE's and Firefox's behaviour. The difference only appears when opening the select element and does not appear in the render tree. Thus, a manual layout-test is required. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::recalcListItems): * manual-tests/optgroup-empty-and-nested.html: Added. 2009-05-06 Julie Parent Reviewed by Eric Seidel. Bug 25608: Unused m_frame in ChromiumClipboard. https://bugs.webkit.org/show_bug.cgi?id=25608 * platform/chromium/ClipboardChromium.h: No tests added as this is only removing dead code, no functional changes. 2009-05-06 Dan Bernstein Reviewed by Simon Fraser and Justin Garcia. - fix another part of Triple-click quoted line and type Return creates an extra quoted blank line Test: editing/inserting/6703873-2.html * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): Corrected the logic for determining the first node that should go into the new blockquote given the split position: if it is at the end of a container, use the next node after the container. Otherwise, use the child at the position's offset. 2009-05-06 Kevin Ollivier wx build fix, fixes for wx trunk builds. * platform/graphics/wx/ImageWx.cpp: (WebCore::BitmapImage::draw): * platform/wx/RenderThemeWx.cpp: * platform/wx/wxcode/mac/carbon/fontprops.cpp: (wxFontProperties::wxFontProperties): 2009-05-06 Albert J. Wong Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25597 Fix API drift compile errors that occurred while this was ifdef-ed out. The two big issues were that RenderObject::element() became RenderObject::node() and some of the wk* drawing functions had an extra theme parameter added to the argument list. * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::paintMediaFullscreenButton): (WebCore::RenderThemeChromiumMac::paintMediaMuteButton): (WebCore::RenderThemeChromiumMac::paintMediaPlayButton): (WebCore::RenderThemeChromiumMac::paintMediaSeekBackButton): (WebCore::RenderThemeChromiumMac::paintMediaSeekForwardButton): (WebCore::RenderThemeChromiumMac::paintMediaSliderTrack): (WebCore::RenderThemeChromiumMac::paintMediaSliderThumb): 2009-05-06 Jian Li Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25385 Upstream changes to V8 bindings for supporting nested workers. * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::ToV8Object): (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::getEventListener): (WebCore::ACCESSOR_SETTER WorkerOnmessage): (WebCore::CALLBACK_FUNC_DECL WorkerAddEventListener): 2009-05-06 Dave Moore Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25513 The V8 bindings convert every javascript property to its associated css style name. It then calls functions that convert that name to an id. This makes getting or setting css styles on elements slow. The patch fixes this by caching the results of the transformation, mapping a javascript property name to its css property id. It then calls the already public webkit methods that take the id in place of the string property names. * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: 2009-05-06 Nate Chapin Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25591 Upstream V8HTMLFormElement from the Chromium repository. * bindings/v8/custom/V8HTMLFormElementCustom.cpp: (WebCore::INDEXED_PROPERTY_GETTER HTMLFormElement): Upstreamed from Chromium repository (WebCore::NAMED_PROPERTY_GETTER HTMLFormElement): Changed empty element return case to return notHandledByInterceptor(); (WebCore::CALLBACK_FUNC_DECL HTMLFormElementSubmit): Upstreamed from Chromium repository 2009-05-06 Albert J. Wong Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25595 Upstream V8CanvasPixelArrayCustom from chromium port tree. * bindings/v8/V8CanvasPixelArrayCustom.cpp: Added. 2009-05-06 Simon Fraser Rubber-stampted by Eric Seidel Add braces to clarify logic flow in RenderObject::adjustStyleDifference. Only affects ACCELERATED_COMPOSITING builds. * rendering/RenderObject.cpp: (WebCore::RenderObject::adjustStyleDifference): 2009-05-06 Simon Fraser Reviewed by Dan Bernstein Reduce size of RenderText in 64-bit Rearrange data members of RenderText so that an int comes first, to minimize padding. * rendering/RenderText.cpp: (WebCore::RenderText::RenderText): * rendering/RenderText.h: 2009-05-06 Simon Fraser Reviewed by Dan Bernstein Reduce size of RenderStyle in 64-bit Rearrange data members of RenderStyle to minimize padding when building for 64-bit. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::): 2009-05-06 Darin Fisher Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25596 Fixes Chromium build bustage caused by r43317 (making RefCountedBase::m_refCount private) * page/chromium/AccessibilityObjectWrapper.h: (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper): 2009-05-06 Hin-Chung Lam Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=25593 Refactor for MediaPlayerPrivate for Chromium port. Remove the implementation of MediaPlayerPrivateInferface from it. * platform\graphics\chromium\MediaPlayerPrivateChromium.h: 2009-05-06 Simon Fraser Reviewed by Dave Hyatt, Dan Bernstein Reduce the size of FontFallbackList in 64-bit Re-order the data members of FontFallbackList to save 8 bytes when building 64-bit. * platform/graphics/FontFallbackList.cpp: (WebCore::FontFallbackList::FontFallbackList): * platform/graphics/FontFallbackList.h: 2009-05-06 Simon Fraser Reviewed by Darin Adler, Dan Bernstein Reduce size of InlineBox in 64-bit Re-order the data members of InlineBox to save 8 bytes when building 64-bit. * rendering/InlineBox.h: (WebCore::InlineBox::InlineBox): 2009-05-06 David Levin Reviewed by Dimitri Glazkov. https://bugs.webkit.org/show_bug.cgi?id=25588 Adding the custom v8 bindings Document.location. * bindings/v8/custom/V8DocumentLocationCustom.cpp: Added. 2009-05-06 Kevin McCullough -Clarified a comment * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): 2009-05-06 Nikolas Zimmermann Not reviewed. Fix WML enabled builds by including "MappedAttribute.h" in several places. * wml/WMLAElement.cpp: * wml/WMLAccessElement.cpp: * wml/WMLBRElement.cpp: * wml/WMLCardElement.cpp: * wml/WMLDoElement.cpp: * wml/WMLElement.cpp: * wml/WMLFieldSetElement.cpp: * wml/WMLGoElement.cpp: * wml/WMLImageElement.cpp: * wml/WMLInputElement.cpp: * wml/WMLMetaElement.cpp: * wml/WMLOnEventElement.cpp: * wml/WMLOptGroupElement.cpp: * wml/WMLOptionElement.cpp: * wml/WMLPElement.cpp: * wml/WMLPostfieldElement.cpp: * wml/WMLSetvarElement.cpp: * wml/WMLTableElement.cpp: * wml/WMLTemplateElement.cpp: * wml/WMLTimerElement.cpp: 2009-05-06 Xan Lopez Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=25526 [Gtk] Additional support is needed for caret browsing Emit AtkText::text-selection-changed when the selection changes and the current selection is of Range (ie, the start and end positions are different) type. This seems to match what Gecko does. * editing/gtk/SelectionControllerGtk.cpp: (WebCore::SelectionController::notifyAccessibilityForSelectionChange): 2009-05-05 Xan Lopez Reviewed by Gustavo Noronha. https://bugs.webkit.org/show_bug.cgi?id=25526 [Gtk] Additional support is needed for caret browsing Emit AtkText::text-caret-moved when selection changes. * GNUmakefile.am: * editing/SelectionController.h: * editing/gtk/SelectionController.cpp: Added. (WebCore::SelectionController::notifyAccessibilityForSelectionChange): 2009-05-06 Holger Hans Peter Freyther Reviewed by Gustavo Noronha. Use mozilla cursors for the previously not implemented cursors. The manual-tests/cursor.html is looking complete now. * platform/gtk/CursorGtk.cpp: (WebCore::cellCursor): (WebCore::noDropCursor): (WebCore::progressCursor): (WebCore::noneCursor): (WebCore::notAllowedCursor): (WebCore::grabCursor): (WebCore::grabbingCursor): * platform/gtk/CursorGtk.h: 2009-05-06 Holger Hans Peter Freyther Reviewed by Xan Lopez. Properly indent the header file. * platform/gtk/CursorGtk.h: 2009-05-06 Holger Hans Peter Freyther Reviewed by Gustavo Noronha. Use the mozilla copyright header. Use MPL1.1/GPL2.0 and LGPL2.1 as the license compared to LGPL2.0. * platform/gtk/CursorGtk.h: 2009-05-06 Holger Hans Peter Freyther Reviewed by Gustavo Noronha. Move PluginView::invalidateRegion from the TemporaryLinkStubs to PluginViewGtk.cpp and implement it with a call to Widget::invalidate() just like mac is doing. Optimisations would have to be window system specific. * platform/gtk/TemporaryLinkStubs.cpp: * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::invalidateRegion): 2009-05-06 Jan Michael Alonzo Reviewed by Holger Freyther. Misc fixes to InspectorClientGtk. * GNUmakefile.am: Add localizedStrings.js to webinspector_DATA. This prevents copious amounts "Localized string not found" errors in the console 2009-05-06 Simon Hausmann Reviewed by Ariya Hidayat. Fix the Qt build on Windows. * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::shouldIncludeChildWindows): Implemented dummy accessor. 2009-05-06 Simon Hausmann Reviewed by Tor Arne Vestbø. Tweak WebCore.pro for being able to override the generated sources dir for the generated_files target. * WebCore.pro: 2009-05-06 Simon Hausmann Reviewed by Holger Freyther. Fix the Qt/Windows build, use iface instead of interface to avoid conflict with VS2005 headers. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkPseudoState): 2009-05-06 Joerg Bornemann Reviewed by Simon Hausmann. We need to include StringExtras.h on Windows CE to access the strdup function. * plugins/PluginStream.cpp: 2009-05-06 Soren Gjesse Reviewed by Eric Seidel. Changed the toString behaviour for non document dom node event handlers in the V8 bindings. https://bugs.webkit.org/show_bug.cgi?id=25544 In the V8 bindings non document dom node event handlers are wrapped in a number of with blocks and uses an inner function. This causes the default toString on such a handler to return all this wrapper code. As some web sites use the source of an event handler to create new functions this wrapper code causes compatibility problems. Create a specific toString function for these handlers which will return a function source compatible with the source returned by the JSC bindings and other browsers. Test: fast/events/event-function-toString.html * bindings/v8/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::V8LazyEventListener): (WebCore::V8LazyEventListener::getListenerFunction): (WebCore::V8LazyEventListenerToString): (WebCore::V8LazyEventListener::getWrappedListenerFunction): * bindings/v8/V8LazyEventListener.h: (WebCore::V8LazyEventListener::create): 2009-05-06 Tor Arne Vestbø Reviewed by Simon Hausmann. Build QtWebKit as a framework on Mac This implies both debug and release build by default, unless one of the --debug or --release config options are passed to the build-webkit script. Frameworks can be disabled by passing CONFIG+=webkit_no_framework to the build-webkit script. To be able to build both debug and release targets in parallel we have to use separate output directories for the generated sources, which is not optimal, but required to avoid race conditions. An optimization would be to only require this spit-up on Mac. * WebCore.pro: 2009-05-06 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Use $$GENERATED_SOURCES_DIR as output when running bison A couple of the generators left the bison output file in the source tree, and then moved it into $$GENERATED_SOURCES_DIR, which did not work well when building release and debug configurations in parallel. * WebCore.pro: 2009-05-06 Dan Bernstein Reviewed by Justin Garcia. - fix an assertion failure in RemoveNodeCommand() when deleting a
between a block and a mail blockquote Test: editing/deleting/removeNodeCommand-assert.html * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Pass the start block to prune() instead of passing m_upstreamStart.node(), because the latter may have been removed already. 2009-05-05 Eric Seidel No review, roll out only. Roll out r23072 since it broke layout tests * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): 2009-05-05 Ben Murdoch Reviewed by Eric Seidel. Add #if ENABLE(DATABASE) guards around database code so toggling ENABLE_DATABASE off does not break builds. https://bugs.webkit.org/show_bug.cgi?id=24776 No functional changes, thus no tests. * bindings/js/JSCustomSQLStatementCallback.cpp: * bindings/js/JSCustomSQLStatementCallback.h: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: * bindings/js/JSCustomSQLStatementErrorCallback.h: * bindings/js/JSCustomSQLTransactionCallback.cpp: * bindings/js/JSCustomSQLTransactionCallback.h: * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: * bindings/js/JSCustomSQLTransactionErrorCallback.h: * bindings/js/JSDatabaseCustom.cpp: * bindings/js/JSSQLTransactionCustom.cpp: * loader/EmptyClients.h: * page/ChromeClient.h: * storage/ChangeVersionWrapper.cpp: * storage/ChangeVersionWrapper.h: * storage/Database.cpp: (WebCore::Database::databaseInfoTableName): * storage/Database.h: * storage/Database.idl: * storage/DatabaseTask.cpp: * storage/DatabaseTask.h: * storage/DatabaseThread.cpp: * storage/DatabaseThread.h: * storage/DatabaseTracker.cpp: * storage/DatabaseTracker.h: * storage/DatabaseTrackerClient.h: * storage/OriginQuotaManager.cpp: * storage/OriginQuotaManager.h: * storage/SQLStatement.cpp: * storage/SQLStatement.h: * storage/SQLTransaction.cpp: * storage/SQLTransaction.h: * storage/SQLTransaction.idl: 2009-05-05 Jeremy Moskovich Reviewed by Eric Seidel. Add some documentation to InlineBox::x(),y(). https://bugs.webkit.org/show_bug.cgi?id=25378 * rendering/InlineBox.h: 2009-05-05 Laszlo Gombos Reviewed by Eric Seidel. Disable all the SVG features for WebKit/Qt if ENABLE_SVG=0 https://bugs.webkit.org/show_bug.cgi?id=24693 * WebCore.pro: 2009-05-05 Sankar Aditya Tanguturi Reviewed by Eric Seidel. Anonymous blocks should not be exposed in accessibility tree. Part of https://bugs.webkit.org/show_bug.cgi?id=23072 Tests: accessibility/ignore-anonymous-block.html platform/win/accessibility/document-role.html * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):Return true for Anonymous blocks. Matching Firefox 2.0.0.14 2009-05-05 Jungshik Shin Reviewed by Alexey Proskuryakov. http://bugs.webkit.org/show_bug.cgi?id=25487 For euc-kr and other 8bit Korean encodings (similar to euc-kr/windows-949), make document.charset return EUC-KR instead of windows-949. The latter is not recognized by Korean web servers. Add domName method to TextEncoding to deal with cases where our internal encoding name does not match what's widely recognized by web servers. Currently, the only case is 'windows-949' (internal name) vs 'EUC-KR'. Test: fast/encoding/euckr-name.html * dom/Document.cpp: (WebCore::Document::encoding): Call TextEncoding.domName() instead of TextEncoding.name(). * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::domName): For the canonical name 'windows-949', return 'EUC-KR'. Otherwise, just return the canonical name. * platform/text/TextEncoding.h: 2009-05-05 Adam Langley Reviewed by Darin Adler. Rendering fix for element from display:none to default display, we would fail to invalidate the parent's pref widths in some situations: When attaching the element, RenderMenuList::updateOptionsWidth would call setNeedsLayoutAndPrefWidthsRecalc before the parent pointer was set. This would mark the pref widths as dirty, but not for any parent objects. When RenderObjectChildList::appendChildNode later calls setNeedsLayoutAndPrefWidthsRecalc again, with a valid parent pointer, nothing would be done because the pref widths were already dirty for. the RenderMenuList. * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateOptionsWidth): 2009-05-05 Antony Sargent Reviewed by Dimitri Glazkov. Switch V8EventListenerList to use HashTable. https://bugs.webkit.org/show_bug.cgi?id=25496 This avoids some tricky issues with event listener removal in the current implementation and has slightly better performance. No new functionality so no new tests. * bindings/v8/V8EventListenerList.cpp: Added V8EventListenerListIterator. * bindings/v8/V8EventListenerList.h: (WebCore::V8EventListenerList::size): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): 2009-05-05 Darin Fisher Fixing build bustage. Add some missing includes to fix the Chromium build. * bindings/v8/custom/V8DOMWindowCustom.cpp: * bindings/v8/custom/V8HTMLDocumentCustom.cpp: 2009-05-05 Darin Fisher Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=25570 history.{back,forward,go} should always be dispatched asynchronously, even when the history navigation would just result in scrolling the page. This matches the behavior of other browsers like IE and FF. Test: fast/history/back-forward-is-asynchronous.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::scheduleHistoryNavigation): 2009-05-05 Eric Seidel Reviewed by Simon Fraser. Add an ASSERT(useTransforms) to mapLocalToContainer implementations in SVG. https://bugs.webkit.org/show_bug.cgi?id=25532 https://bugs.webkit.org/show_bug.cgi?id=25568 Adding this ASSERT exposed a bug in SVGPaintServerPattern::setup which was causing transformed SVG text when filled/stroked with a pattern using patternUnits=objectBoundingBox to draw incorrectly. I fixed the incorrect drawing (by removing the broken code) and added two test cases to test the fix: * svg/transforms/text-with-pattern-inside-transformed-html.xhtml * svg/transforms/text-with-pattern-with-svg-transform.svg * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::mapLocalToContainer): * svg/graphics/SVGPaintServerPattern.cpp: (WebCore::SVGPaintServerPattern::setup): 2009-05-05 Greg Bolsinga Reviewed by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=25554 Support HTML5 text control input types: email, number, tel, url Test: fast/html/text-field-input-types.html * bindings/objc/DOMHTML.mm: (-[DOMHTMLInputElement _isTextField]): Call HTMLInputElement::isTextField directly. * html/HTMLInputElement.cpp: Use the new types where appropriate. (WebCore::HTMLInputElement::setInputType): (WebCore::HTMLInputElement::type): (WebCore::HTMLInputElement::saveState): (WebCore::HTMLInputElement::restoreState): (WebCore::HTMLInputElement::accessKeyAction): (WebCore::HTMLInputElement::rendererIsNeeded): (WebCore::HTMLInputElement::createRenderer): (WebCore::HTMLInputElement::appendFormData): (WebCore::HTMLInputElement::valueWithDefault): (WebCore::HTMLInputElement::storesValueSeparateFromAttribute): (WebCore::HTMLInputElement::defaultEventHandler): * html/HTMLInputElement.h: Ditto. (WebCore::HTMLInputElement::): (WebCore::HTMLInputElement::isTextField): 2009-04-01 miggilin Reviewed by Kevin Ollivier. Mouse wheel scrolling and keyboard shortcut support for wx. https://bugs.webkit.org/show_bug.cgi?id=24797 * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/wx/KeyboardEventWx.cpp: (WebCore::windowsKeyCodeForKeyEvent): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): * platform/wx/ScrollViewWx.cpp: (WebCore::ScrollView::platformSetScrollPosition): 2009-05-05 Kevin Ollivier wx build fix for Windows, add missing include. https://bugs.webkit.org/show_bug.cgi?id=24798 * platform/wx/wxcode/win/non-kerned-drawing.cpp: 2009-05-05 Chris Fleizach Reviewed by Beth Dakin. Bug 25574: AXImageMap children links don't respond properly to accessibilityHitTest: https://bugs.webkit.org/show_bug.cgi?id=25574 Enable accessibility hit-testing for image map links. Allow image map links to return AXURLs and AXAccessKey information. Test: platform/mac/accessibility/imagemap-hittest.html * page/AccessibilityImageMapLink.cpp: (WebCore::AccessibilityImageMapLink::url): * page/AccessibilityImageMapLink.h: * page/AccessibilityObject.h: (WebCore::AccessibilityObject::minValueForRange): * page/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): (WebCore::AccessibilityRenderObject::doAccessibilityHitTest): * page/AccessibilityRenderObject.h: * page/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeNames]): 2009-05-05 Kevin McCullough Reviewed by Dan Bernstein. Select a quote line and paste elsewhere, you get that line and an extra quoted blank line Triple-click a quoted header line, copy, paste onto an empty line makes an extra quoted line - When pasting a blockquote with a newline, make sure we put the newline outside of the blockquote so that it is not quoted. * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): 2009-05-05 Jan Michael Alonzo Reviewed by Xan Lopez. Call moz_gtk_shutdown on RenderThemeGtk destruction. * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::~RenderThemeGtk): * platform/gtk/RenderThemeGtk.h: 2009-05-05 Darin Adler Reviewed by Steve Falkenburg. REGRESSION: can't drag local HTML files into Safari because CFURLCreateWithFileSystemPath inserts "localhost" * platform/win/ClipboardUtilitiesWin.cpp: (WebCore::urlFromPath): Remove localhost. 2009-05-05 Peter Kasting Reviewed by Brady Eidson. Safety-check m_documentLoader before dereferencing. While it seems unlikely this could fail (as Safari 3 shipped without this), technically almost any call can change or reset m_documentLoader. * loader/FrameLoader.cpp: (WebCore::FrameLoader::receivedFirstData): 2009-05-05 Dan Bernstein - Tiger build fix * css/CSSComputedStyleDeclaration.cpp: (WebCore::toCSSIdentifier): 2009-05-05 Peter Kasting Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=25303 No need to ref the internal buffer inside the Skia ImageDecoder. * platform/image-decoders/skia/ImageDecoder.h: (WebCore::RGBA32Buffer::RGBA32Buffer): (WebCore::RGBA32Buffer::operator=): (WebCore::RGBA32Buffer::clear): (WebCore::RGBA32Buffer::copyBitmapData): (WebCore::RGBA32Buffer::bitmap): (WebCore::RGBA32Buffer::setSize): (WebCore::RGBA32Buffer::width): (WebCore::RGBA32Buffer::height): (WebCore::RGBA32Buffer::hasAlpha): (WebCore::RGBA32Buffer::setStatus): (WebCore::RGBA32Buffer::setHasAlpha): (WebCore::RGBA32Buffer::setRGBA): 2009-05-05 Dan Bernstein Reviewed by Darin Adler. - fix https://bugs.webkit.org/show_bug.cgi?id=24192 Replying to a Mail message that contains fixed width text can change the size of the text Covered by existing tests: editing/pasteboard/5027857.html editing/pasteboard/paste-pre-002.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword): Added. If the font-size is keyword-based, returns the keyword value instead of the pixel size. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): If font-family is a generic family, return the generic family instead of the the internal string -webkit-[serif|sans-serif|cursive|fantasy |monospace]. (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties): For the font-size property, prefer a keyword value over a pixel size. * css/CSSComputedStyleDeclaration.h: * editing/ApplyStyleCommand.cpp: (WebCore::StyleChange::currentlyHasStyle): For the font-size property, call getFontSizeCSSValuePreferringKeyword(). * platform/graphics/FontDescription.h: (WebCore::FontDescription::keywordSize): Changed the return type to unsigned. (WebCore::FontDescription::setKeywordSize): Changed the parameter type to unsigned. (WebCore::FontDescription::m_keywordSize): Changed the type of this 4-bit field to unsigned, because it takes values as high as 8. 2009-05-05 Oliver Hunt Reviewed by Maciej Stachowiak. Fix http/tests/misc/DOMContentLoaded-event.html The native call performance improvement removed a few places where we unintentionally performed a toThisObject conversion. This patch updates the bindings codegen to not rely on this bug. * bindings/scripts/CodeGeneratorJS.pm: 2009-05-05 Holger Hans Peter Freyther Reviewed by Xan Lopez and Gustavo Noronha. Implement WebCore::directoryName for Gtk+. * platform/gtk/FileSystemGtk.cpp: (WebCore::directoryName): 2009-05-05 Eric Seidel Reviewed by Adam Roben. Fix mappedAttributes() access without NULL check https://bugs.webkit.org/show_bug.cgi?id=25553 SVGStyledElement::getPresentationAttribute was using mappedAttributes() without checking for NULL. HTMLInputElement::setInputType also doesn't NULL check, but I was not able to get it to crash with a test case so I just added an ASSERT. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setInputType): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::getPresentationAttribute): 2009-05-05 Holger Hans Peter Freyther Reviewed by Xan Lopez. Implement WebCore::imageTitle for Gtk+. * platform/gtk/LocalizedStringsGtk.cpp: (WebCore::imageTitle): 2009-05-05 Oliver Hunt Reviewed by Gavin Barraclough. Bug 25559: Improve native function call performance Add forwarding header necessary for compilation, and fix debugger to correctly account for change in JSFunction behaviour. * ForwardingHeaders/jit/JITCode.h: Added. * inspector/JavaScriptDebugServer.cpp: (WebCore::JavaScriptDebugServer::recompileAllJSFunctions): 2009-05-05 Simon Hausmann Reviewed by Ariya Hidayat. Make convertValueToQVariant more robust against null JSValues. Don't require the caller to do the null check. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): 2009-05-05 Eric Seidel No review, just a revert. Roll out http://trac.webkit.org/changeset/43213 as it caused 4 tests to crash. * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::mapLocalToContainer): * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::mapLocalToContainer): 2009-05-04 Alexey Proskuryakov Reviewed by Dave Hyatt. REGRESSION (r35185): Cannot watch Flash movies on omg.yahoo.com The problem was caused by missing element - we used to create it when moving a misplaced