WebKit-https.git
14 years ago Rubber stamped by Darin.
weinig [Thu, 13 Sep 2007 20:51:53 +0000 (20:51 +0000)]
    Rubber stamped by Darin.

        Make DumpRenderTree more cross platform ready.
        - Convert GCController to use the JSCore API instead of the WebScriptObject.
        - Use CF types instead of NS objects.
        - General cleanup.

        * DumpRenderTree/DumpRenderTree.h:
        * DumpRenderTree/DumpRenderTree.mm:
        (dumpRenderTree):
        (dump):
        (runTest):
        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
        * DumpRenderTree/EditingDelegate.m:
        * DumpRenderTree/FrameLoadDelegate.h:
        * DumpRenderTree/FrameLoadDelegate.mm:
        (-[FrameLoadDelegate init]):
        (-[FrameLoadDelegate dealloc]):
        (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
        * DumpRenderTree/GCController.cpp: Added.
        (GCController::GCController):
        (GCController::~GCController):
        (collectCallback):
        (collectOnAlternateThreadCallback):
        (getJSObjectCountCallback):
        (GCController::makeWindowObject):
        (GCController::getJSClass):
        (GCController::staticFunctions):
        * DumpRenderTree/GCController.h:
        * DumpRenderTree/GCController.mm:
        (GCController::collect):
        (GCController::collectOnAlternateThread):
        (GCController::getJSObjectCount):
        * DumpRenderTree/LayoutTestController.cpp:
        (LayoutTestController::makeWindowObject):
        (LayoutTestController::getJSClass):
        * DumpRenderTree/LayoutTestController.h:
        * DumpRenderTree/LayoutTestControllerMac.mm:
        (LayoutTestController::addDisallowedURL):
        (waitUntilDoneWatchdogFired):
        (LayoutTestController::waitUntilDone):
        * DumpRenderTree/ResourceLoadDelegate.m:
        (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25544 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWin32 font improvements.
hyatt [Thu, 13 Sep 2007 20:15:19 +0000 (20:15 +0000)]
Win32 font improvements.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25543 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Try to fix GDK build.
ggaren [Thu, 13 Sep 2007 19:07:10 +0000 (19:07 +0000)]
    Try to fix GDK build.

        * wtf/MathExtras.h:
        (wtf_random_init):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25542 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-12 Geoff Garen <ggaren@apple.com>
ggaren [Thu, 13 Sep 2007 18:52:29 +0000 (18:52 +0000)]
2007-09-12  Geoff Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Fixed <rdar://problem/5429064> 141885 Safari JavaScript: Math.random() slightly less randomly distributed than on Safari / Mac

        Math.random was skewed slightly upward because it assumed that RAND_MAX was outside the range of
        values that rand() might return. This problem was particularly pronounced on Windows because
        the range of values returned by rand() on Windows is 2^16 smaller than the range of values
        return by rand() on Mac.

        Fixed by accounting for RAND_MAX return values. Also, switched Windows over to rand_s, which has
        a range that's equal to rand()'s range on Mac.

        * kjs/config.h:

        * kjs/math_object.cpp:
        (MathFuncImp::callAsFunction): Use the new new thing.

        * wtf/MathExtras.h: Platform abstraction for random numbers, to cover over differences on Windows.
        (wtf_random_init):
        (wtf_random):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25541 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed, tweaked and landed by Anders.
andersca [Thu, 13 Sep 2007 18:10:12 +0000 (18:10 +0000)]
    Reviewed, tweaked and landed by Anders.

        <rdar://problem/5461153>
        http://bugs.webkit.org/show_bug.cgi?id=15143
        Crash seen on Windows

        Null check frame before calling Frame::settings.

        * loader/PluginDocument.cpp:
        (WebCore::PluginTokenizer::writeRawData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25540 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Stephanie.
kmccullo [Thu, 13 Sep 2007 17:25:50 +0000 (17:25 +0000)]
    Reviewed by Stephanie.

        Fix leaks in mac DumpRenderTree.

        * DumpRenderTree/FrameLoadDelegate.mm:
        (-[FrameLoadDelegate init]): Initalize in the correct order.
        (-[FrameLoadDelegate processWork:]): Delete WorkQueueItem's after dequeueing them.
        * DumpRenderTree/LayoutTestController.cpp:
        (decodeHostNameCallback): Put return value in a temporary JSRetainPtr to ensure it gets released.
        (encodeHostNameCallback): ditto.
        * DumpRenderTree/LayoutTestController.h:
        * DumpRenderTree/LayoutTestControllerMac.mm:
        (LayoutTestController::copyDecodedHostName): Rename function to signal that it follows the Create rule.
        (LayoutTestController::copyEncodedHostName): ditto
        (LayoutTestController::queueLoad): Use a JSRetainPtr to ensure the url gets released.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25539 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-12 Holger Hans Peter Freyther <zecke@selfish.org>
zecke [Thu, 13 Sep 2007 17:06:18 +0000 (17:06 +0000)]
2007-09-12 Holger Hans Peter Freyther <zecke@selfish.org>

        Reviewed by Mark.

        Implement the FileChooser for the WebKit/Gtk+ port by using
        the GtkFileChooserDialog and g_path_get_basename to get the
        basename for the current filename.

        * WebCore.pro:
        * platform/gdk/FileChooserGdk.cpp: Added.
        (WebCore::FileChooser::FileChooser):
        (WebCore::FileChooser::~FileChooser):
        (WebCore::FileChooser::openFileChooser):
        (WebCore::FileChooser::basenameForWidth):
        * platform/gdk/TemporaryLinkStubs.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25538 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-12 Holger Hans Peter Freyther <zecke@selfish.org>
zecke [Thu, 13 Sep 2007 17:05:57 +0000 (17:05 +0000)]
2007-09-12 Holger Hans Peter Freyther <zecke@selfish.org>

        Reviewed by Mark.

        Move the "string" functions from the TemporaryLinkStubs.cpp
        to LocalizedStringsGdk.cpp and implement them using the text
        from the win port and glib-i18n (gettext).

        * platform/gdk/LocalizedStringsGdk.cpp: Added.
        (WebCore::submitButtonDefaultLabel):
        (WebCore::inputElementAltText):
        (WebCore::resetButtonDefaultLabel):
        (WebCore::searchableIndexIntroduction):
        (WebCore::fileButtonChooseFileLabel):
        (WebCore::fileButtonNoFileSelectedLabel):
        (WebCore::contextMenuItemTagOpenLinkInNewWindow):
        (WebCore::contextMenuItemTagDownloadLinkToDisk):
        (WebCore::contextMenuItemTagCopyLinkToClipboard):
        (WebCore::contextMenuItemTagOpenImageInNewWindow):
        (WebCore::contextMenuItemTagDownloadImageToDisk):
        (WebCore::contextMenuItemTagCopyImageToClipboard):
        (WebCore::contextMenuItemTagOpenFrameInNewWindow):
        (WebCore::contextMenuItemTagCopy):
        (WebCore::contextMenuItemTagGoBack):
        (WebCore::contextMenuItemTagGoForward):
        (WebCore::contextMenuItemTagStop):
        (WebCore::contextMenuItemTagReload):
        (WebCore::contextMenuItemTagCut):
        (WebCore::contextMenuItemTagPaste):
        (WebCore::contextMenuItemTagNoGuessesFound):
        (WebCore::contextMenuItemTagIgnoreSpelling):
        (WebCore::contextMenuItemTagLearnSpelling):
        (WebCore::contextMenuItemTagSearchWeb):
        (WebCore::contextMenuItemTagLookUpInDictionary):
        (WebCore::contextMenuItemTagOpenLink):
        (WebCore::contextMenuItemTagIgnoreGrammar):
        (WebCore::contextMenuItemTagSpellingMenu):
        (WebCore::contextMenuItemTagShowSpellingPanel):
        (WebCore::contextMenuItemTagCheckSpelling):
        (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
        (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
        (WebCore::contextMenuItemTagFontMenu):
        (WebCore::contextMenuItemTagBold):
        (WebCore::contextMenuItemTagItalic):
        (WebCore::contextMenuItemTagUnderline):
        (WebCore::contextMenuItemTagOutline):
        (WebCore::contextMenuItemTagWritingDirectionMenu):
        (WebCore::contextMenuItemTagDefaultDirection):
        (WebCore::contextMenuItemTagLeftToRight):
        (WebCore::contextMenuItemTagRightToLeft):
        (WebCore::contextMenuItemTagInspectElement):
        (WebCore::searchMenuNoRecentSearchesText):
        (WebCore::searchMenuRecentSearchesText):
        (WebCore::searchMenuClearRecentSearchesText):
        (WebCore::unknownFileSizeText):
        * platform/gdk/TemporaryLinkStubs.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25537 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-10 Holger Hans Peter Freyther <zecke@selfish.org>
zecke [Thu, 13 Sep 2007 17:05:36 +0000 (17:05 +0000)]
2007-09-10 Holger Hans Peter Freyther <zecke@selfish.org>

        Reviewed by Mark.

        EventHandlerGdk::createDraggingClipboard must succeed otherwise an
        ASSERT is hit. Add Clipboard stubs for the Gdk/Gtk+ port and
        instantiate ClipboardGdk from the EventHandlerGdk to make the ASSERT
        go away. In contrast to the Windows and Mac port this clipboard is not
        inheriting CachedResourceClient. This was proposed by Oliver.

        * WebCore.pro:
        * page/gdk/EventHandlerGdk.cpp:
        * platform/gdk/ClipboardGdk.cpp: Added.
        (WebCore::ClipboardGdk::ClipboardGdk):
        (WebCore::ClipboardGdk::~ClipboardGdk):
        (WebCore::ClipboardGdk::clearData):
        (WebCore::ClipboardGdk::clearAllData):
        (WebCore::ClipboardGdk::getData):
        (WebCore::ClipboardGdk::setData):
        (WebCore::ClipboardGdk::types):
        (WebCore::ClipboardGdk::dragLocation):
        (WebCore::ClipboardGdk::dragImage):
        (WebCore::ClipboardGdk::setDragImage):
        (WebCore::ClipboardGdk::dragImageElement):
        (WebCore::ClipboardGdk::setDragImageElement):
        (WebCore::ClipboardGdk::createDragImage):
        (WebCore::ClipboardGdk::declareAndWriteDragImage):
        (WebCore::ClipboardGdk::writeURL):
        (WebCore::ClipboardGdk::writeRange):
        (WebCore::ClipboardGdk::hasData):
        * platform/gdk/ClipboardGdk.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoJavaScriptCore:
antti [Thu, 13 Sep 2007 14:50:22 +0000 (14:50 +0000)]
JavaScriptCore:

        Reviewed by Maciej.

        Small addition to previous path to cover
        http://bugs.webkit.org/show_bug.cgi?id=11399
        window.eval runs in the global scope of the calling window

        Switch variable scope as well.

        * kjs/function.cpp:
        (KJS::GlobalFuncImp::callAsFunction):

LayoutTests:

        Reviewed by Maciej.

        Change test case to cover
        http://bugs.webkit.org/show_bug.cgi?id=11399
        too.

        * fast/js/window-eval-context-expected.txt:
        * fast/js/window-eval-context.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoJavaScriptCore:
antti [Thu, 13 Sep 2007 13:54:12 +0000 (13:54 +0000)]
JavaScriptCore:

        Reviewed by Geoff, Maciej.

        Fix <rdar://problem/5445058>
        REGRESSION: Unable to upload picture to eBay auction due to domain security check

        eBay uses window.eval() between windows. In Firefox window.eval() switches execution
        and security context to the target window, something WebKit did not do. With WebKit
        security tightening in r24781, this broke picture uploads.

        Fix by making WebKit switch context in window.eval().

        * kjs/Context.cpp:
        (KJS::Context::Context):
        (KJS::Context::~Context):
        * kjs/context.h:
        Save and restore interpreter context independently from calling context.

        * kjs/function.cpp:
        (KJS::GlobalFuncImp::callAsFunction):
        If eval is called for global object different than current one, switch execution context
        to that object and push it to scope.

LayoutTests:

        Reviewed by Geoff, Maciej.

        Test for <rdar://problem/5445058>
        REGRESSION: Unable to upload picture to eBay auction due to domain security check

        * fast/js/window-eval-context-expected.txt: Added.
        * fast/js/window-eval-context.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25534 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoForgot to check in this new expected result which reflect corrected selection endpoints.
justing [Thu, 13 Sep 2007 08:03:37 +0000 (08:03 +0000)]
Forgot to check in this new expected result which reflect corrected selection endpoints.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25533 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-12 Oliver Hunt <oliver@apple.com>
oliver [Thu, 13 Sep 2007 06:27:09 +0000 (06:27 +0000)]
2007-09-12  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Corrections missed in previous revision

        * platform/Cursor.h:
        * platform/win/CursorWin.cpp:
        (WebCore::loadCursorByName):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25532 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoLayoutTests:
ddkilzer [Thu, 13 Sep 2007 05:51:58 +0000 (05:51 +0000)]
LayoutTests:

        Reviewed by Darin.

        * plugins/mouse-events.html: Removed invalid return statement.
        * plugins/open-and-close-window-with-plugin.html: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25531 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-12 Oliver Hunt <oliver@apple.com>
oliver [Thu, 13 Sep 2007 05:33:15 +0000 (05:33 +0000)]
2007-09-12  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

WebKit:
        Fixing
            <rdar://problem/5018591> Windows doesn't have a standard vertical text cursor
            <rdar://problem/5224996> Add zoom in and zoom out cursors

        Add images for vertical text and zoom in and out cursors to WebKit resources.

        * WebKit.vcproj/verticalTextCursor.png: Added.
        * WebKit.vcproj/WebKit.rc:
        * WebKit.vcproj/WebKit.vcproj:
        * WebKit.vcproj/resource.h:
        * WebKit.vcproj/zoomInCursor.png: Added.
        * WebKit.vcproj/zoomOutCursor.png: Added.
        * WebKitDLL.cpp:
        (loadResourceIntoBuffer):

WebCore:
        Fixing
            <rdar://problem/5018591> Windows doesn't have a standard vertical text cursor
            <rdar://problem/5224996> Add zoom in and zoom out cursors

        Added SharedCursor for CursorWin so we can correctly track lifetime of custom/image
        based cursors, such as the vertical text and zooming cursors.

        * platform/Cursor.h:
        (WebCore::SharedCursor::SharedCursor):
        (WebCore::SharedCursor::~SharedCursor):
        (WebCore::SharedCursor::nativeCursor):
        * platform/win/CursorWin.cpp:
        (WebCore::Cursor::Cursor):
        (WebCore::loadCursorByName):
        (WebCore::loadSharedCursor):
        (WebCore::pointerCursor):
        (WebCore::crossCursor):
        (WebCore::handCursor):
        (WebCore::iBeamCursor):
        (WebCore::waitCursor):
        (WebCore::helpCursor):
        (WebCore::eastResizeCursor):
        (WebCore::northResizeCursor):
        (WebCore::northEastResizeCursor):
        (WebCore::northWestResizeCursor):
        (WebCore::southResizeCursor):
        (WebCore::southEastResizeCursor):
        (WebCore::southWestResizeCursor):
        (WebCore::westResizeCursor):
        (WebCore::northSouthResizeCursor):
        (WebCore::eastWestResizeCursor):
        (WebCore::northEastSouthWestResizeCursor):
        (WebCore::northWestSouthEastResizeCursor):
        (WebCore::columnResizeCursor):
        (WebCore::rowResizeCursor):
        (WebCore::moveCursor):
        (WebCore::verticalTextCursor):
        (WebCore::progressCursor):
        (WebCore::notAllowedCursor):
        (WebCore::zoomInCursor):
        (WebCore::zoomOutCursor):
        * platform/win/WidgetWin.cpp:
        (WebCore::Widget::setCursor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25530 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Stephanie.
weinig [Thu, 13 Sep 2007 03:10:04 +0000 (03:10 +0000)]
    Reviewed by Stephanie.

        Fix leaks in mac DumpRenderTree.

        * DumpRenderTree/FrameLoadDelegate.mm:
        (-[FrameLoadDelegate init]): Initalize in the correct order.
        (-[FrameLoadDelegate processWork:]): Delete WorkQueueItem's after dequeueing them.
        * DumpRenderTree/LayoutTestController.cpp:
        (decodeHostNameCallback): Put return value in a temporary JSRetainPtr to ensure it gets released.
        (encodeHostNameCallback): ditto.
        * DumpRenderTree/LayoutTestController.h:
        * DumpRenderTree/LayoutTestControllerMac.mm:
        (LayoutTestController::copyDecodedHostName): Rename function to signal that it follows the Create rule.
        (LayoutTestController::copyEncodedHostName): ditto
        (LayoutTestController::queueLoad): Use a JSRetainPtr to ensure the url gets released.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25529 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Initialize SafariTheme early in WebKit's instantiation
aroben [Thu, 13 Sep 2007 02:29:06 +0000 (02:29 +0000)]
    Initialize SafariTheme early in WebKit's instantiation

        New versions of SafariTheme will require this initialization. We have
        to use GetProcAddress for now since the initialize method doesn't
        exist in any released SafariTheme.

        Reviewed by Ada.

        * WebKit.vcproj/debug_internal.vsprops: Pick up the debug SafariTheme.
        * WebKitClassFactory.cpp:
        (WebKitClassFactory::WebKitClassFactory): Call STInitialize.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25528 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Geoffrey Garen.
weinig [Thu, 13 Sep 2007 02:16:50 +0000 (02:16 +0000)]
    Reviewed by Geoffrey Garen.

        <rdar://problem/5478717> JSStringCreateWithCFString leaks when passed a zero length CFStringRef

        * API/JSStringRefCF.cpp:
        (JSStringCreateWithCFString): Special case the zero length string and remove the
        UTF16 optimized path since it will always leak due to the fact that we won't be
        able to free the backing store that the CFStringRef provides.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25527 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Geoff Garen
beidson [Thu, 13 Sep 2007 02:08:53 +0000 (02:08 +0000)]
    Reviewed by Geoff Garen

        <rdar://problem/5478577> - Further improve cold launch time with Icon Database changes

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::open): Store the directory and full path for later usage and access in the API, respectively
          Move the makeAllDirectories() call to the background thread.
        (WebCore::IconDatabase::IconDatabase): Don't set up the timer here...
        (WebCore::IconDatabase::scheduleOrDeferSyncTimer): Create the timer on demand
        (WebCore::IconDatabase::iconDatabaseSyncThread): makeAllDirectories() here where it's not as expensive
        (WebCore::IconDatabase::cleanupSyncThread): Cleanup the directory as well as full path

        * loader/icon/IconDatabase.h: m_syncTimer becomes an OwnPtr, and we add the database directory
          as a member to set it on the main thread and act with it on the background thread

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25526 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago <rdar://problem/5478690> Regression: printing: footer only appears on the...
adachan [Thu, 13 Sep 2007 01:53:01 +0000 (01:53 +0000)]
    <rdar://problem/5478690> Regression: printing: footer only appears on the first page of print

        Reviewed by Adam.

        * WebFrame.cpp:
        (WebFrame::spoolPages): the footer rect is relative to the top left of the current page.  So
        instead of passing pageRect.bottom() as the top of the footer rect (which is relative to the
        document), we should pass in headerHeight plus the height of the pageRect.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25525 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Darin.
kmccullo [Thu, 13 Sep 2007 01:31:20 +0000 (01:31 +0000)]
    Reviewed by Darin.

        - Simplified code paths and extracted out functions to increase encapsulation.

        * Drosera/DebuggerDocument.cpp:
        (DebuggerDocument::breakpointEditorHTMLCallback):
        (DebuggerDocument::isPausedCallback):
        (DebuggerDocument::pauseCallback):
        (DebuggerDocument::resumeCallback):
        (DebuggerDocument::stepIntoCallback):
        (DebuggerDocument::evaluateScriptCallback):
        (DebuggerDocument::currentFunctionStackCallback):
        (DebuggerDocument::localScopeVariableNamesForCallFrameCallback):
        (DebuggerDocument::valueForScopeVariableNamedCallback):
        (DebuggerDocument::logCallback):
        * Drosera/DebuggerDocument.h:
        (DebuggerDocument::getPaused):
        * Drosera/mac/DebuggerClient.mm:
        (-[DebuggerClient pause:]):
        (-[DebuggerClient resume:]):
        (-[DebuggerClient stepInto:]):
        (-[DebuggerClient stepOver:]):
        (-[DebuggerClient stepOut:]):
        (-[DebuggerClient showConsole:]):
        (-[DebuggerClient closeCurrentFile:]):
        (-[DebuggerClient validateUserInterfaceItem:]):
        * Drosera/mac/DebuggerDocumentPlatform.mm: Added.
        (+[NSString stringOrNilFromWebScriptResult:]):
        (DebuggerDocument::platformPause):
        (DebuggerDocument::platformResume):
        (DebuggerDocument::platformStepInto):
        (DebuggerDocument::platformEvaluateScript):
        (DebuggerDocument::getPlatformCurrentFunctionStack):
        (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
        (DebuggerDocument::platformValueForScopeVariableNamed):
        (DebuggerDocument::platformLog):
        * Drosera/mac/Drosera.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Darin (reluctantly).
andersca [Thu, 13 Sep 2007 00:23:13 +0000 (00:23 +0000)]
    Reviewed by Darin (reluctantly).

        <rdar://problem/5320461>
        http://bugs.webkit.org/show_bug.cgi?id=14548
        REGRESSION (r23987-r24061) : Reproducible crash with a local stylesheet file

        Add a workaround which converts the string passed in to an URL if it's a path.

        * WebView.cpp:
        (WebView::updateWebCoreSettingsFromPreferences):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25523 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
justing [Thu, 13 Sep 2007 00:04:01 +0000 (00:04 +0000)]
WebCore:

        Reviewed by Tristan.

        <rdar://problem/5469868>
        GoogleDocs: A hang occurs when applying list styling to a selection in a <table>

        When list insertion moves selected paragraphs into list items, it relies on
        the selection preservation code inside moveParagraphs to iterate over the
        selected paragraphs.  If a selection is ever restored incorrectly (before
        the original, or inside the original) list insertion will go into an infinite loop.

        In this hang, a table was selected and the selection preservation code incorrectly
        restored a selection, placing it inside the table.

        The bug was that a TextIterator, when being used for selection preservation, must
        emit a character between every VisiblePosition in the Range used to create the
        iterator.

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::TextIterator): Renamed the boolean that we use for
        selection preservation.  It used to be m_emitForReplacedElements because
        we believed that replaced elements were the only case where TextIterators
        should have emitted differently when used for selection preservation.
        (WebCore::TextIterator::handleReplacedElement): Ditto.
        (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Represent the
        position before block tables, but only if we are emitting for selection
        preservation.
        (WebCore::TextIterator::shouldEmitSpaceBeforeAndAfterNode): We should emit
        a space before and after block tables if we are emitting for selection
        preservation (because we have VisiblePositions before and after them).
        (WebCore::TextIterator::handleNonTextNode): Use a renamed variable.
        * editing/TextIterator.h: Made shouldEmitSpaceBeforeAndAfterNode a member
        function, because whether or not we emit spaces before and after a block
        table depends we're emitting for selection preservation.

LayoutTests:

        Reviewed by Tristan.

        Demonstrates bug:
        * editing/execCommand/5469868-expected.txt: Added.
        * editing/execCommand/5469868.html: Added.

        Fixed (and moved expected results to platform/mac):
        * editing/style/table-selection-expected.checksum: Removed.
        * editing/style/table-selection-expected.png: Removed.
        * editing/style/table-selection-expected.txt: Removed.
        * platform/mac/editing/style: Added.
        * platform/mac/editing/style/table-selection-expected.checksum: Added.
        * platform/mac/editing/style/table-selection-expected.png: Added.
        * platform/mac/editing/style/table-selection-expected.txt: Added.

        Fixed:
        * platform/mac/editing/execCommand/5432254-2-expected.checksum:
        * platform/mac/editing/execCommand/5432254-2-expected.png:
        * platform/mac/editing/execCommand/5432254-2-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25522 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
bdakin [Wed, 12 Sep 2007 23:53:32 +0000 (23:53 +0000)]
WebCore:

        Reviewed by Hyatt.

        Fix for <rdar://problem/5464998> REGRESSION (9A543): Using Sort
        options takes you back to search screen on zappos.com

        The current mechanism for preserving form elements across removes
        did not work in the case where the input was moved by the parser to
        be out of scope of the form. This fixes that problem by having the
        parser keep track of the preserve boolean rather than the current
        form element.

        * dom/Tokenizer.h:
        (WebCore::Tokenizer::isHTMLTokenizer): New function.
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::HTMLFormElement): Get rid of
        m_preserveAcrossRemove.
        * html/HTMLFormElement.h:
        (WebCore::HTMLFormElement::isMalformed): Get rid of
        m_preserveAcrossRemove.
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLGenericFormElement::removedFromTree): Ask the parser
        if it is currently handling residual style rather than asking the
        form if it wants to preserveAcrossRemove.
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::HTMLParser): New boolean to initialize.
        (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Set
        m_handlingResidualStyleAcrossBlocks to true at the beginning and
        false at the end.
        * html/HTMLParser.h:
        (WebCore::HTMLParser::isHandlingResidualStyleAcrossBlocks):
        * html/HTMLTokenizer.h:
        (WebCore::HTMLTokenizer::isHTMLTokenizer):
        (WebCore::HTMLTokenizer::htmlParser):

LayoutTests:

        Reviewed by Hyatt.

        Test for <rdar://problem/5464998> REGRESSION (9A543): Using Sort
        options takes you back to search screen on zappos.com

        * fast/forms/preserveFormDuringResidualStyle.html: Added.
        * platform/mac/fast/forms/preserveFormDuringResidualStyle-expected.checksum: Added.
        * platform/mac/fast/forms/preserveFormDuringResidualStyle-expected.png: Added.
        * platform/mac/fast/forms/preserveFormDuringResidualStyle-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25521 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoLAnd piece of alt patch I forgot to.
hyatt [Wed, 12 Sep 2007 23:43:27 +0000 (23:43 +0000)]
LAnd piece of alt patch I forgot to.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25520 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebKit:
ddkilzer [Wed, 12 Sep 2007 22:23:51 +0000 (22:23 +0000)]
WebKit:

        Rubber-stamped by Darin and reviewed by Adam.

        Removed import of unused icon database headers.

        * WebCoreSupport/WebFrameBridge.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25519 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoAdd back the -Wno-deprecated-declarations flag to DumpRenderTree.mm. Fixes the build...
thatcher [Wed, 12 Sep 2007 21:12:35 +0000 (21:12 +0000)]
Add back the -Wno-deprecated-declarations flag to DumpRenderTree.mm. Fixes the build on Leopard.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25518 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Build fix for Buildbot.
weinig [Wed, 12 Sep 2007 20:11:42 +0000 (20:11 +0000)]
    Build fix for Buildbot.

        * DumpRenderTree/DumpRenderTree.mm:
        (dump):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25517 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Geof.
kmccullo [Wed, 12 Sep 2007 20:00:18 +0000 (20:00 +0000)]
    Reviewed by Geof.

        - Updated the leaks list for leopard to help identify regressions.

        * Scripts/run-webkit-tests:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25516 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebKitTools:
weinig [Wed, 12 Sep 2007 19:51:58 +0000 (19:51 +0000)]
WebKitTools:

        Rubber stamped by Darin.

        Convert the LayoutTestController to use the JSCore API instead of WebScriptObject.

        * DumpRenderTree/DumpRenderTree.h: Re-order variables.
        * DumpRenderTree/DumpRenderTree.m: Removed.
        * DumpRenderTree/DumpRenderTree.mm: Copied from DumpRenderTree/DumpRenderTree.m.
        (stopJavaScriptThreads): Fix initialization.
        (setDefaultColorProfileToRGB): Add explicit cast from void*.
        (dumpRenderTree): Ditto.
        (runTest):
        Used the WorkQueue from the windows DRT instead of the old NSMutableArray one.

        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
        * DumpRenderTree/FrameLoadDelegate.h: Add LayoutTestController instance variable.
        * DumpRenderTree/FrameLoadDelegate.m: Removed.
        * DumpRenderTree/FrameLoadDelegate.mm: Copied from DumpRenderTree/FrameLoadDelegate.m.
        (-[FrameLoadDelegate init]):
        (-[FrameLoadDelegate dealloc]):
        (-[FrameLoadDelegate processWork:]):
        (-[FrameLoadDelegate webView:locationChangeDone:forDataSource:]):
        (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
        Convert to use the new JSCore based LayoutTestController and the new WorkQueue.

        * DumpRenderTree/LayoutTestController.cpp: Added.
        (LayoutTestController::LayoutTestController):
        (LayoutTestController::~LayoutTestController):
        (dumpAsTextCallback):
        (dumpBackForwardListCallback):
        (dumpChildFramesAsTextCallback):
        (dumpChildFrameScrollPositionsCallback):
        (dumpDOMAsWebArchiveCallback):
        (dumpEditingCallbacksCallback):
        (dumpFrameLoadCallbacksCallback):
        (dumpResourceLoadCallbacksCallback):
        (dumpSelectionRectCallback):
        (dumpSourceAsWebArchiveCallback):
        (dumpTitleChangesCallback):
        (repaintSweepHorizontallyCallback):
        (setCallCloseOnWebViewsCallback):
        (setCanOpenWindowsCallback):
        (setCloseRemainingWindowsWhenCompleteCallback):
        (testRepaintCallback):
        (addFileToPasteboardOnDragCallback):
        (addDisallowedURLCallback):
        (clearBackForwardListCallback):
        (decodeHostNameCallback):
        (displayCallback):
        (encodeHostNameCallback):
        (keepWebHistoryCallback):
        (notifyDoneCallback):
        (queueBackNavigationCallback):
        (queueForwardNavigationCallback):
        (queueLoadCallback):
        (queueReloadCallback):
        (queueScriptCallback):
        (setAcceptsEditingCallback):
        (setCustomPolicyDelegateCallback):
        (setMainFrameIsFirstResponderCallback):
        (setTabKeyCyclesThroughElementsCallback):
        (setUseDashboardCompatibilityModeCallback):
        (setUserStyleSheetEnabledCallback):
        (setUserStyleSheetLocationCallback):
        (setWindowIsKeyCallback):
        (waitUntilDoneCallback):
        (windowCountCallback):
        (LayoutTestController::makeWindowObject):
        (LayoutTestController::getLayoutTestControllerJSClass):
        (LayoutTestController::staticFunctions):
        * DumpRenderTree/LayoutTestController.h: Replaced.
        * DumpRenderTree/LayoutTestController.m: Removed.
        * DumpRenderTree/LayoutTestControllerMac.mm: Added.
        (LayoutTestController::dumpAsText):
        (LayoutTestController::dumpBackForwardList):
        (LayoutTestController::dumpChildFramesAsText):
        (LayoutTestController::dumpChildFrameScrollPositions):
        (LayoutTestController::dumpDOMAsWebArchive):
        (LayoutTestController::dumpEditingCallbacks):
        (LayoutTestController::dumpFrameLoadCallbacks):
        (LayoutTestController::dumpResourceLoadCallbacks):
        (LayoutTestController::dumpSelectionRect):
        (LayoutTestController::dumpSourceAsWebArchive):
        (LayoutTestController::dumpTitleChanges):
        (LayoutTestController::repaintSweepHorizontally):
        (LayoutTestController::setCallCloseOnWebViews):
        (LayoutTestController::setCanOpenWindows):
        (LayoutTestController::setCloseRemainingWindowsWhenComplete):
        (LayoutTestController::testRepaint):
        (LayoutTestController::addFileToPasteboardOnDrag):
        (LayoutTestController::addDisallowedURL):
        (LayoutTestController::clearBackForwardList):
        (LayoutTestController::decodeHostName):
        (LayoutTestController::encodeHostName):
        (LayoutTestController::display):
        (LayoutTestController::keepWebHistory):
        (LayoutTestController::notifyDone):
        (LayoutTestController::queueBackNavigation):
        (LayoutTestController::queueForwardNavigation):
        (LayoutTestController::queueLoad):
        (LayoutTestController::queueReload):
        (LayoutTestController::queueScript):
        (LayoutTestController::setAcceptsEditing):
        (LayoutTestController::setCustomPolicyDelegate):
        (LayoutTestController::setMainFrameIsFirstResponder):
        (LayoutTestController::setTabKeyCyclesThroughElements):
        (LayoutTestController::setUseDashboardCompatibilityMode):
        (LayoutTestController::setUserStyleSheetEnabled):
        (LayoutTestController::setUserStyleSheetLocation):
        (LayoutTestController::setWindowIsKey):
        (+[WaitToDumpWatchdog waitUntilDoneWatchdogFired]):
        (LayoutTestController::waitUntilDone):
        (LayoutTestController::windowCount):
        Use the JSCore API to implement the LayoutTestController.

        * DumpRenderTree/ObjCController.h:
        * DumpRenderTree/ObjCController.m:
        (+[ObjCController isSelectorExcludedFromWebScript:]):
        (+[ObjCController webScriptNameForSelector:]):
        (-[ObjCController accessStoredWebScriptObject]):
        (-[ObjCController storeWebScriptObject:]):
        (-[ObjCController dealloc]):
        (-[ObjCController invokeUndefinedMethodFromWebScript:withArguments:]):
        Move WebScriptObject tests to ObjCController.

        * DumpRenderTree/UIDelegate.m: Removed.
        * DumpRenderTree/UIDelegate.mm: Copied from DumpRenderTree/UIDelegate.m.

        * DumpRenderTree/WorkQueue.cpp: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.cpp.
        * DumpRenderTree/WorkQueue.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueue.h.
        * DumpRenderTree/WorkQueueItem.h: Copied from DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/WorkQueueItem.h.
        (WorkQueueItem::~WorkQueueItem):
        (LoadItem::LoadItem):
        (LoadItem::url):
        (LoadItem::target):
        (ScriptItem::ScriptItem):
        (ScriptItem::script):
        * DumpRenderTree/WorkQueueItemMac.mm: Added.
        (LoadItem::invoke):
        (ReloadItem::invoke):
        (ScriptItem::invoke):
        (BackForwardItem::invoke):
        Copy WorkQueue and WorkQueueItem from windows DRT. Changed the WorkQueueItem to use JSStringRefs instead of wstrings
        to avoid conversion until the last possible moment.  These changes will be merged with the windows DRT when we start
        sharing code.

LayoutTests:

        Rubber stamped by Darin.

        Fix layout tests for new JSCore API based LayoutTestController.

        * fast/dom/resources/wrapper-identity-base.js: Use ObjCController for objective-c tests.
        * http/tests/local/file-url-sent-as-referer.html: Remove unused illegal call that now causes controller to fail due to not allowing undefined method calls.
        * http/tests/xmlhttprequest/default-content-type-dashboard.html: Fix typo in function name.
        * http/tests/xmlhttprequest/svg-created-by-xhr-disallowed-in-dashboard.html: Fix typo in function name.
        * plugins/call-as-function-test-expected.txt:
        * plugins/call-as-function-test.html: Use ObjCController to test WebScriptObject.
        * plugins/root-object-premature-delete-crash.html: Use ObjCController to test WebScriptObject
        * plugins/undefined-property-crash.html: Use ObjCController to test WebScriptObject.
        * svg/custom/embedded-svg-disallowed-in-dashboard.xml: Fix typo in function name.
        * svg/custom/manually-parsed-embedded-svg-disallowed-in-dashboard.html: Fix typo in function name.
        * svg/custom/manually-parsed-svg-disallowed-in-dashboard.html: Fix typo in function name.
        * svg/custom/svg-disallowed-in-dashboard-object.html: Fix typo in function name.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25515 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-12 George Staikos <staikos@kde.org>
staikos [Wed, 12 Sep 2007 18:46:26 +0000 (18:46 +0000)]
2007-09-12  George Staikos  <staikos@kde.org>

        Fix compilation in some configurations for patch I reviewed and missed
        this option on.

        * platform/qt/CursorQt.cpp:
        (WebCore::Cursor::Cursor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25514 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Maciej.
kmccullo [Wed, 12 Sep 2007 18:45:19 +0000 (18:45 +0000)]
    Reviewed by Maciej.

        - Updated Win side to take advantage of the platform separating changes.

        * Drosera/DebuggerDocument.cpp:
        (DebuggerDocument::localScopeVariableNamesForCallFrame):
        * Drosera/DebuggerDocument.h:
        * Drosera/win/DebuggerClient.cpp:
        (DebuggerClient::pause):
        (DebuggerClient::resume):
        (DebuggerClient::stepInto):
        (DebuggerDocument::platformPause):
        (DebuggerDocument::platformResume):
        (DebuggerDocument::platformStepInto):
        (DebuggerDocument::platformEvaluateScript):
        (DebuggerDocument::getPlatformCurrentFunctionStack):
        (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
        (DebuggerDocument::platformValueForScopeVariableNamed):
        (DebuggerDocument::platformLog):
        * Drosera/win/DebuggerClient.h:
        * Drosera/win/Drosera.cpp:
        (Drosera::Drosera):
        (Drosera::windowScriptObjectAvailable):
        (Drosera::initWithServerName):
        (Drosera::switchToServerNamed):
        * Drosera/win/Drosera.h:
        * Drosera/win/Drosera.vcproj/Drosera.vcproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25513 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Tim Hatcher and Kevin Decker
beidson [Wed, 12 Sep 2007 18:39:41 +0000 (18:39 +0000)]
    Reviewed by Tim Hatcher and Kevin Decker

        <rdar://problem/5367045> - Launch time regression due to accessing resource from a different bundle

        When the default icon was moved from WebKit to WebCore, we had to access an entirely new bundle on launch which
        measurably increased time during launch accessing the disk.

        Instead of moving it back to the WebKit bundle, lets make launch time even faster by compiling in the icon.

        * Resources/urlIcon.tiff: Removed.

        * WebCore.xcodeproj/project.pbxproj: Removed urlIcon.tiff

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::defaultIcon): Compile in the icon data here.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25512 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Always specify that slider thumbs are small when painting with SafariTheme
aroben [Wed, 12 Sep 2007 18:15:38 +0000 (18:15 +0000)]
    Always specify that slider thumbs are small when painting with SafariTheme

        This is the only size we support.

        Reviewed by Sam.

        * rendering/RenderThemeSafari.cpp:
        (WebCore::RenderThemeSafari::paintSliderThumb):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25511 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Darin
beidson [Wed, 12 Sep 2007 18:03:26 +0000 (18:03 +0000)]
    Reviewed by Darin

        <rdar://problem/5474753> - ASSERT in IconDatabase ReadySQLStatement

        * loader/icon/IconDatabase.cpp:
        (WebCore::readySQLStatement): This is a LOG_ERROR situation, not really an ASSERT situation

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25510 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Don't ask SafariTheme to draw focus rings around text controls
aroben [Wed, 12 Sep 2007 17:52:13 +0000 (17:52 +0000)]
    Don't ask SafariTheme to draw focus rings around text controls

        We do this ourselves.

        Reviewed by Oliver.

        * rendering/RenderThemeSafari.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25509 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Darin
beidson [Wed, 12 Sep 2007 17:48:34 +0000 (17:48 +0000)]
    Reviewed by Darin

        <rdar://problem/5475639> and http://bugs.webkit.org/show_bug.cgi?id=15185 -
        Prevent two WebKits from fighting over the database schema in the future in case it ever changes again

        By telling the "older schema" WebKit to simply close itself and not bother to do any icon related stuff
        if the database schema is newer, we prevent the possibility of an older webkit run side-by-side with a newer
        WebKit causing icon database issues.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::defaultDatabaseFilename): Rev the icon database filename to be "WebpageIcons.db"  The name is
          more appropriate for what is actually stored in the file, and since we're already not converting v5 to v6 icons,
          making this leap now makes sense and gives us a good "future-proof" baseline
        (WebCore::isValidDatabase): Change the validity check to be "less then" instead of "not equal to" - the
          "greater than" case is now handled in performOpenInitialization()
        (WebCore::IconDatabase::performOpenInitialization): If the schema version is greater than the current, then
          close the database as to not conflict with the newer version.  Also noted that the integrity check failure
          should actually close the sql database, not the icondatabase
        (WebCore::IconDatabase::syncThreadMainLoop): If termination has already been requested, skip straight to cleanup
        (WebCore::IconDatabase::cleanupSyncThread): More correctly set the "sync thread running" flag to false here,
          as the thread can now decide to exit on its own

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25508 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoPatch from Mike Fenton to allow custom cursors.
treat [Wed, 12 Sep 2007 17:16:07 +0000 (17:16 +0000)]
Patch from Mike Fenton to allow custom cursors.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25507 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Rubber stamped by Kevin D.
oliver [Wed, 12 Sep 2007 17:12:45 +0000 (17:12 +0000)]
    Rubber stamped by Kevin D.

        Fix layout test results effected by turning off <use> entirely

        * svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum:
        * svg/W3C-SVG-1.1/animate-elem-40-t-expected.png:
        * svg/W3C-SVG-1.1/animate-elem-40-t-expected.txt:
        * svg/W3C-SVG-1.1/struct-use-01-t-expected.checksum:
        * svg/W3C-SVG-1.1/struct-use-01-t-expected.png:
        * svg/W3C-SVG-1.1/struct-use-01-t-expected.txt:
        * svg/W3C-SVG-1.1/text-text-05-t-expected.checksum:
        * svg/W3C-SVG-1.1/text-text-05-t-expected.png:
        * svg/W3C-SVG-1.1/text-text-05-t-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25506 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Oliver Hunt.
kdecker [Wed, 12 Sep 2007 03:16:45 +0000 (03:16 +0000)]
    Reviewed by Oliver Hunt.

        Fixed: <rdar://problem/5472402> crash due to infinite recursion in expandUseElementsInShadowTree on SVG from wikipedia

        * ksvg2/svg/SVGUseElement.cpp: Added SVG_EXPERIMENTAL #ifdef for expandUseElementsInShadowTree().
        (WebCore::SVGUseElement::buildPendingResource): Ditto.
        (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): Tweaked an ASSERT to not fire on non-experimental builds.
        * ksvg2/svg/SVGUseElement.h: Added SVG_EXPERIMENTAL #ifdef for expandUseElementsInShadowTree().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25505 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Maciej
beidson [Tue, 11 Sep 2007 22:44:35 +0000 (22:44 +0000)]
    Reviewed by Maciej

        Fix for <rdar://problem/5473046> - Crash when resetting all icons

        Originally I'd written the "reset all icons" to be synchronous on the main thread, but it
        was decided that it should be async since it involved I/O.  Turns out it needs to be... both!
        Synchronous removal of all in-memory records of icons, and then continue and clean up the
        on-disk database on the background thread.

        Also, it turns out that resetting all the page url retain counts should *not* be part of
        "reset all icons" because it breaks various contracts the API makes about maintaining retain counts.

        The problem that occured here was removing all the icons, then all the history items that were
        removed as part of "Reset Safari..." would try to release their icon, but their icon doesn't exist
        anymore.

        We get around this by simply leaving the in-memory page url records and retain counts alone - they
        are still wiped from disk.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::removeAllIcons): Clear in-memory records of all icons then tell the thread to
          wipe the on-disk tables
        (WebCore::IconDatabase::removeAllIconsOnThread): Only do the disk cleanup - in-memory maintenance is
          handled on the main thread
        (WebCore::IconDatabase::cleanupSyncThread): Now that it's possible for new "icons to be written to disk"
          to appear while on-disk deleting is occuring, let the cleanup procedure perform 1 final write *after*
          it does the remove all icons
        * loader/icon/IconDatabase.h: Removed unused lock and condition

        * loader/icon/PageURLRecord.cpp:
        (WebCore::PageURLRecord::setIconRecord): Allow setting a NULL icon record, so a PageURLRecord can be
          cleared as part of removeAllIcons()

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25503 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by David Harrison.
tristan [Tue, 11 Sep 2007 22:13:58 +0000 (22:13 +0000)]
    Reviewed by David Harrison.

        <rdar://problem/5467203> CrashTracer: [USER] 1 crash in Mail at <unknown binary>: WebCore::Range::startContainer const

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::addRange):
        (WebCore::SelectionController::setSelectedRange):
        Added a check to make sure the passed in Range* value is not null
        before performing operations on it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25502 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Darin.
thatcher [Tue, 11 Sep 2007 21:50:23 +0000 (21:50 +0000)]
    Reviewed by Darin.

        Remove the unused class_getMethodImplementation function.

        * Misc/WebNSObjectExtras.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25501 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
justing [Tue, 11 Sep 2007 20:59:12 +0000 (20:59 +0000)]
WebCore:

        Reviewed by Maciej.

        <rdar://problem/5458246>
        GoogleDocs: A hang occurs when applying list styling to selection that contains a <HR>

        List insertion moves selected paragraphs into list items, and relies on the selection
        preservation code inside moveParagraphs to iterate over the selected paragraphs.
        When list insertion would try to listify a paragraph that came after a list item
        containing an <hr>, the selection preservation code would set an incorrect ending
        selection because of a TextIterator bug, and we would try to listify the same
        paragraph over and over.

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs): Pass range compliant equivalents to
        the Range constructor here.  The position [hr, 0] is not a valid DOM Range endpoint
        for example.
        * editing/TextIterator.cpp:
        (WebCore::shouldEmitSpaceForNode): Added.
        (WebCore::TextIterator::handleNonTextNode): Emit a space to represent a horizontal rule,
        since it has VisiblePositions before and after it, but only for TextIterators used for
        selection preservation, so innerText will be unaffected.

LayoutTests:

        Reviewed by Maciej.

        * editing/execCommand/5458246-expected.txt: Added.
        * editing/execCommand/5458246.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25500 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Adam.
kmccullo [Tue, 11 Sep 2007 20:57:06 +0000 (20:57 +0000)]
    Reviewed by Adam.

        - Just doing the moves in a separate patch so the changes are easier to see.

        * Drosera/win/DebuggerClient.cpp: Copied from Drosera/win/DebuggerDocumentWin.cpp.
        * Drosera/win/DebuggerClient.h: Copied from Drosera/win/DebuggerDocumentWin.h.
        * Drosera/win/DebuggerDocumentWin.cpp: Removed.
        * Drosera/win/DebuggerDocumentWin.h: Removed.
        * Drosera/win/Drosera.vcproj/Drosera.vcproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25499 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Oliver Hunt.
ggaren [Tue, 11 Sep 2007 18:53:33 +0000 (18:53 +0000)]
    Reviewed by Oliver Hunt.

        Fixed CFNetwork version check so it actually works.

        * Misc/WebKitVersionChecks.h:
        * WebView/WebView.mm:
        (+[WebView _setCacheModel:]): Don't use NSVersionOfLinkTimeLibrary because
        we don't link against CFNetwork directly, so it returns -1. Also, use
        the proper hex encoding instead of decimal numbers.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25498 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago <rdar://problem/5472130> Support NTLM authentication via CFNetwork.
adachan [Tue, 11 Sep 2007 18:29:36 +0000 (18:29 +0000)]
    <rdar://problem/5472130> Support NTLM authentication via CFNetwork.

        Reviewed by Darin.

        * platform/network/ProtectionSpace.h:
        (WebCore::):
        * platform/network/cf/AuthenticationCF.cpp:
        (WebCore::createCF):
        (WebCore::core):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25497 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoRoll out accidentally-checked in change.
darin [Tue, 11 Sep 2007 18:11:12 +0000 (18:11 +0000)]
Roll out accidentally-checked in change.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25496 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago - redo fix for <rdar://problem/5472899> REGRESSION (TOT): Crash in FrameLoadD...
darin [Tue, 11 Sep 2007 18:10:29 +0000 (18:10 +0000)]
    - redo fix for <rdar://problem/5472899> REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery

        * WebView/WebView.mm:
        (getMethod): Added.
        (-[WebView _cacheResourceLoadDelegateImplementations]): Use getMethod.
        (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25495 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
darin [Tue, 11 Sep 2007 17:47:26 +0000 (17:47 +0000)]
WebCore:

        Rubber-stamped by Dave Harrison.

        - fixed pasteboard types here to match WebKit and use constants instead of
          WebKitSystemInterface

        * platform/mac/PasteboardMac.mm: Use constants for all pasteboard type strings.

        * platform/mac/WebCoreSystemInterface.h: Removed wkCreateURLPasteboardFlavorTypeName
        and wkCreateURLNPasteboardFlavorTypeName.

WebKit:

        Rubber-stamped by Dave Harrison.

        * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
        Removed wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25494 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Mark Rowe.
darin [Tue, 11 Sep 2007 16:41:20 +0000 (16:41 +0000)]
    Reviewed by Mark Rowe.

        - fix <rdar://problem/5472899> REGRESSION (TOT): Crash in FrameLoadDelegate loading stationery

        * Misc/WebNSObjectExtras.h:
        (class_getMethodImplementation): Added.
        (method_setImplementation): Added.

        * WebView/WebHTMLView.mm: (+[WebHTMLViewPrivate initialize]):
        * Carbon/HIViewAdapter.m: (+[HIViewAdapter bindHIViewToNSView:nsView:]):
        Remove old-ObjC code path, since WebNSObjectExtras.h now implements everything we need.

        * WebView/WebView.mm:
        (-[WebView _cacheResourceLoadDelegateImplementations]): Don't bother doing a separate
        respondsToSelector call, since class_getMethodImplementation will return 0 for selectors
        that we don't respond to. The bug fix is to actually set the cached pointer to 0.
        Also get rid of the unnecessary use of a macro; instead use the functions from
        WebNSObjectExtras.h on Tiger and the appropriate function directly on Leopard.
        (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25493 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebKitTools:
ddkilzer [Tue, 11 Sep 2007 16:35:17 +0000 (16:35 +0000)]
WebKitTools:

        Don't overwrite LD_LIBRARY_PATH, prepend to it. Fixes:
        http://bugs.webkit.org/show_bug.cgi?id=15176

        * Scripts/run-launcher: don't replace LD_LIBRARY_PATH with
        $projectDir, but prepend $projectDir to LD_LIBRARY_PATH (to preserve
        other paths eg. from jhbuild)

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25492 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Sam, Ollie.
darin [Tue, 11 Sep 2007 16:33:20 +0000 (16:33 +0000)]
    Reviewed by Sam, Ollie.

        * WebView/WebView.mm: (+[WebView _setCacheModel:]): A slightly cleaner 64-bit
        fix for the NSURLCache capacity code in this file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25491 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Rubber-stamped by Mark Rowe.
darin [Tue, 11 Sep 2007 16:00:44 +0000 (16:00 +0000)]
    Rubber-stamped by Mark Rowe.

        * Misc/WebNSPasteboardExtras.mm: Fix incorrect strings in my last check-in.
        The strings I checked in were wrong and were breaking layout tests too.
        These new ones match what WebKitSystemInterface was returning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25490 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-11 Sven Herzberg <sven@imendio.com>
bdash [Tue, 11 Sep 2007 15:03:53 +0000 (15:03 +0000)]
2007-09-11  Sven Herzberg  <sven@imendio.com>

        Reviewed by Mark.

        Remove unnecessary fields in FontPlatformData
        http://bugs.webkit.org/show_bug.cgi?id=15177

        * platform/gdk/FontDataGdk.cpp: removed the destroy code of the fields
        that have been removed
        * platform/gdk/FontPlatformData.h: removed m_fontFace, m_fontMatrix
        and m_options; hask on m_scaledFont
        * platform/gdk/FontPlatformDataGdk.cpp: simplified setFont() by using
        m_scaledFont only; turned the former struct members into local
        variables

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25489 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-11 George Staikos <staikos@kde.org>
staikos [Tue, 11 Sep 2007 05:33:56 +0000 (05:33 +0000)]
2007-09-11  George Staikos  <staikos@kde.org>

        Reviewed by Anders.

        Work around gcc bug with some old gcc versions.

        * platform/qt/WidgetQt.cpp:
        (WebCore::Widget::convertToContainingWindow):
        (WebCore::Widget::convertFromContainingWindow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25488 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-10 Mitz Pettel <mitz@webkit.org>
bdash [Tue, 11 Sep 2007 05:19:57 +0000 (05:19 +0000)]
2007-09-10  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej Stachowiak.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15157
          Image defined in background-position: top center gets unexpectedly truncated
          <rdar://problem/5469095>

        Test: fast/repaint/body-background-image.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::imageChanged): Refined the logic for when the root takes
        over painting the background, to match paintBoxDecorations(). In particular,
        if the root has defined a background, the body should paint its own background.

2007-09-10  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Maciej Stachowiak.

        - repaint test for http://bugs.webkit.org/show_bug.cgi?id=15157
          Image defined in background-position: top center gets unexpectedly truncated
          <rdar://problem/5469095>

        * fast/repaint/body-background-image.html: Added.
        * platform/mac/fast/repaint/body-background-image-expected.checksum: Added.
        * platform/mac/fast/repaint/body-background-image-expected.png: Added.
        * platform/mac/fast/repaint/body-background-image-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25487 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-10 Nigel Tao <nigeltao@gnome.org>
bdash [Tue, 11 Sep 2007 05:17:23 +0000 (05:17 +0000)]
2007-09-10  Nigel Tao  <nigeltao@gnome.org>

        Reviewed by Mark Rowe.

        Fix a typo where webkit_gtk_page_can_copy was declared twice,
        rather than webkit_gtk_page_can_paste.

        * Api/webkitgtkpage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25486 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Fixed 64-bit build (I think).
ggaren [Tue, 11 Sep 2007 03:53:30 +0000 (03:53 +0000)]
    Fixed 64-bit build (I think).

        * WebView/WebView.mm:
        (max): Added. In 64-bit land, -diskCapacity magically starts returning
        unsigned long instead of unsigned, so we define a custom max() that's
        willing to compare unsigned to unsigned long.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25485 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
harrison [Tue, 11 Sep 2007 01:03:00 +0000 (01:03 +0000)]
WebCore:

        Reviewed by Kevin and Tristan.

        Tests added:
        * editing/pasteboard/paste-into-anchor-text.html: Added.
        * editing/pasteboard/paste-table-cells.html: Added.

        Source changes:
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
        Nil check enclosingAnchor.

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeNodeAndPruneAncestors):
        New. Keeps m_firstNodeInserted and m_lastLeafInserted updated.

        (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance):
        Added a comment.

        (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
        Let ReplaceSelectionCommand::removeNodeAndPruneAncestors() update the nodes.

        (WebCore::ReplaceSelectionCommand::doApply):
        Pass originalVisPosBeforeEndBR to shouldRemoveEndBR()

        (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR):
        Don't remove the br if nothing was inserted.

        * editing/ReplaceSelectionCommand.h:
        Add VisiblePosition parameter to shouldRemoveEndBR()

        * editing/markup.cpp:
        (WebCore::createMarkup):
        Wrap orphan tr element with a table element, just like we were doing
        for tobody elements.

LayoutTests:

        Reviewed by Kevin and Tristan.

        <rdar://problem/5456800> Mail crashes at WebCore::nextCandidate() after pasting back into a <table> multiple times

        * editing/pasteboard/paste-into-anchor-text.html: Added.
        * editing/pasteboard/paste-table-cells.html: Added.
        * editing/pasteboard/quirks-mode-br-1-expected.checksum:
        * editing/pasteboard/quirks-mode-br-1-expected.txt:
        * editing/pasteboard/quirks-mode-br-1.html:
        * platform/mac/editing/pasteboard/paste-into-anchor-text-expected.checksum: Added.
        * platform/mac/editing/pasteboard/paste-into-anchor-text-expected.png: Added.
        * platform/mac/editing/pasteboard/paste-into-anchor-text-expected.txt: Added.
        * platform/mac/editing/pasteboard/paste-table-cells-expected.checksum: Added.
        * platform/mac/editing/pasteboard/paste-table-cells-expected.png: Added.
        * platform/mac/editing/pasteboard/paste-table-cells-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25484 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Darin Adler.
thatcher [Tue, 11 Sep 2007 00:16:51 +0000 (00:16 +0000)]
    Reviewed by Darin Adler.

        <rdar://problem/5456224> CrashTracer: [USER] 2 crashes in Toast Titanium at com.apple.CoreServices.CarbonCore: CSMemDisposePtr + 37

        Removed the implementation of these malloc zone functions. We do not have the ability to
        check if a pointer is valid or not, so we can't correctly implement them. The system free
        does not fail if you pass in a bad pointer.

        * wtf/FastMalloc.cpp:
        (WTF::FastMallocZone::size):
        (WTF::FastMallocZone::zoneMalloc):
        (WTF::FastMallocZone::zoneCalloc):
        (WTF::FastMallocZone::zoneFree):
        (WTF::FastMallocZone::zoneRealloc):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25483 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Oliver.
kmccullo [Mon, 10 Sep 2007 23:29:31 +0000 (23:29 +0000)]
    Reviewed by Oliver.

        - Updated Skipped list to remove tests that are now passing.

        * platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25482 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Adam.
kmccullo [Mon, 10 Sep 2007 23:13:17 +0000 (23:13 +0000)]
    Reviewed by Adam.

        - Made an order-of-deletion mistake.

        * Drosera/DebuggerDocument.h:
        * Drosera/ForwardingHeaders/wtf/Assertions.h: Removed.
        * Drosera/ForwardingHeaders/wtf/Noncopyable.h: Removed.
        * Drosera/ForwardingHeaders/wtf/OwnPtr.h: Removed.
        * Drosera/mac/DebuggerClient.mm:
        (DebuggerDocument::platformPause):
        (DebuggerDocument::platformResume):
        (DebuggerDocument::platformStepInto):
        (DebuggerDocument::platformEvaluateScript):
        (DebuggerDocument::getPlatformCurrentFunctionStack):
        (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
        (DebuggerDocument::platformValueForScopeVariableNamed):
        * Drosera/mac/Drosera.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25481 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Darin.
kmccullo [Mon, 10 Sep 2007 22:59:44 +0000 (22:59 +0000)]
    Reviewed by Darin.

        - Renaming DebuggerDocument[platform] to DebuggerClient to be more clear.

        * Drosera/DebuggerDocument.cpp:
        (DebuggerDocument::DebuggerDocument):
        * Drosera/DebuggerDocument.h:
        * Drosera/ForwardingHeaders/wtf/Assertions.h: Added.
        * Drosera/ForwardingHeaders/wtf/Noncopyable.h: Added.
        * Drosera/ForwardingHeaders/wtf/OwnPtr.h: Added.
        * Drosera/mac/DebuggerApplication.mm:
        (-[DebuggerApplication attach:]):
        * Drosera/mac/DebuggerClient.h: Copied from Drosera/mac/DebuggerDocumentMac.h.
        * Drosera/mac/DebuggerClient.mm: Copied from Drosera/mac/DebuggerDocumentMac.mm.
        (DebuggerDocument::platformPause):
        (DebuggerDocument::platformResume):
        (DebuggerDocument::platformStepInto):
        (DebuggerDocument::platformEvaluateScript):
        (DebuggerDocument::getPlatformCurrentFunctionStack):
        (DebuggerDocument::getPlatformLocalScopeVariableNamesForCallFrame):
        (DebuggerDocument::platformValueForScopeVariableNamed):
        (DebuggerDocument::platformLog):
        * Drosera/mac/DebuggerDocumentMac.h: Removed.
        * Drosera/mac/DebuggerDocumentMac.mm: Removed.
        * Drosera/mac/Drosera.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25480 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Tim Hatcher.
darin [Mon, 10 Sep 2007 22:39:12 +0000 (22:39 +0000)]
    Reviewed by Tim Hatcher.

        - <rdar://problem/5471082> Removing WebURLPboardType from headers broke SPI-using applications

        Rolled out my fix for bug 4582212 and fixed it in a much simpler way.

        * Misc/WebNSPasteboardExtras.h:
        * Misc/WebNSPasteboardExtras.mm:
        * WebCoreSupport/WebPasteboardHelper.mm:
        * WebKit.exp:
        * WebView/WebHTMLView.mm:
        * WebView/WebView.mm:
        Rolled out the new PasteboardType functions and changed the PboardType globals to be initialized
        with constant values.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25476 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Remove site-specific hacks that we don't need anymore.
sfalken [Mon, 10 Sep 2007 21:47:34 +0000 (21:47 +0000)]
    Remove site-specific hacks that we don't need anymore.

        Reviewed by Adam.

        * WebView.cpp:
        (WebView::userAgentForKURL):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25475 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Prevent WebKit version numbers from containing "4" in Windows.
sfalken [Mon, 10 Sep 2007 21:32:26 +0000 (21:32 +0000)]
    Prevent WebKit version numbers from containing "4" in Windows.

        Reviewed by Darin.

        * WebKit.vcproj/VERSION: Bump version since our current version ends in 4.
        * WebKit.vcproj/auto-version.sh: Add version checking code.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25474 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
ddkilzer [Mon, 10 Sep 2007 21:23:16 +0000 (21:23 +0000)]
WebCore:

        Rubberstamped by Kevin Decker.

        No test required since there is no change in functionality.

        * history/BackForwardList.cpp:
        (WebCore::BackForwardList::BackForwardList): Fix misspelling of DefaultCapacitiy to DefaultCapacity.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25473 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoDon't double-encode URL fragments
staikos [Mon, 10 Sep 2007 21:21:37 +0000 (21:21 +0000)]
Don't double-encode URL fragments

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25472 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
tristan [Mon, 10 Sep 2007 21:15:41 +0000 (21:15 +0000)]
WebCore:

        Reviewed by Adele Peterson.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15156
          REGRESSION (r24594-r24668): The bottom of styled <select> button text is clipped out
          <rdar://problem/5464301>

        Test: fast/forms/menulist-clip.html

        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::controlClipRect): Use correct coordinates for
        the inner block's content rect.

LayoutTests:

        Reviewed by Adele Peterson.

        - test for http://bugs.webkit.org/show_bug.cgi?id=15156
          REGRESSION (r24594-r24668): The bottom of styled <select> button text is clipped out
          <rdar://problem/5464301>

        * fast/forms/menulist-clip.html: Added.
        * platform/mac/fast/forms/menulist-clip-expected.checksum: Added.
        * platform/mac/fast/forms/menulist-clip-expected.png: Added.
        * platform/mac/fast/forms/menulist-clip-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25471 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Darin, Sam, Oliver, Geoff, probably others - what a fun one to...
beidson [Mon, 10 Sep 2007 21:08:09 +0000 (21:08 +0000)]
   Reviewed by Darin, Sam, Oliver, Geoff, probably others - what a fun one to review!

       <rdar://problem/5471641> - URLs get the wrong icon

       Turns out sqlite3_reset() doesn't clear bindings, so previously bound icons were being
       written out for pages without icons.  Easy fix!

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): For null icons, manually
          bind NULL - otherwise, the previously bound icon will be written out to disk

        * loader/icon/SQLStatement.cpp:
        (WebCore::SQLStatement::bindNull): Access to sqlite3_bind_null
        * loader/icon/SQLStatement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25470 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Oliver and Darin.
andersca [Mon, 10 Sep 2007 21:05:31 +0000 (21:05 +0000)]
    Reviewed by Oliver and Darin.

        <rdar://problem/5468613>
        Using shockwave pages first time after plugin install crashed safari in PluginPing.

        Only restore the window proc if the plugin didn't override it.

        * plugins/win/PluginViewWin.cpp:
        (WebCore::PluginViewWin::stop):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25469 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
justing [Mon, 10 Sep 2007 20:55:40 +0000 (20:55 +0000)]
WebCore:

        Reviewed by Darin.

        <rdar://problem/5467405>
        Revert back behavior of -webkit-user-select to fix widget selection problems

        Rolled out r25086 and r25057.  I will be re-opening:
        <rdar://problem/5333725> -webkit-user-select: none makes selection difficult
        Which we will either to defer or fix by introducing a new value of -webkit-user-select.
        <rdar://problem/5370059> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)
        Which we will either defer or fix with Adele's patch that doesn't involve making
        -webkit-user-select inherited.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::adjustRenderStyle):
        (WebCore::CSSStyleSelector::applyProperty):
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::selectAll):
        * page/EventHandler.cpp:
        (WebCore::EventHandler::selectClosestWordFromMouseEvent):
        (WebCore::EventHandler::handleMousePressEventTripleClick):
        (WebCore::EventHandler::handleMousePressEventSingleClick):
        (WebCore::EventHandler::updateSelectionForMouseDrag):
        (WebCore::EventHandler::selectCursor):
        (WebCore::EventHandler::canMouseDownStartSelect):
        * page/EventHandler.h:
        * rendering/RenderObject.cpp:
        (WebCore::selectStartNode):
        (WebCore::RenderObject::canSelect):
        (WebCore::RenderObject::shouldSelect):
        (WebCore::RenderObject::draggableNode):
        * rendering/RenderObject.h:
        * rendering/RenderStyle.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator==):
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator==):
        (WebCore::RenderStyle::diff):
        * rendering/RenderStyle.h:
        (WebCore::):
        (WebCore::RenderStyle::userSelect):
        (WebCore::RenderStyle::setUserSelect):
        (WebCore::RenderStyle::initialUserSelect):

LayoutTests:

        Reviewed by Darin.

        <rdar://problem/5467405>
        Revert back behavior of -webkit-user-select to fix widget selection problems

        * editing/selection/5333725.html: Removed.
        * editing/selection/5333725.html-disabled: Added.
        * editing/selection/user-select-text-inside-user-select-ignore.html: Removed.
        * editing/selection/user-select-text-inside-user-select-ignore.html-disabled: Added.
        * fast/css/computed-style-expected.txt:
        * fast/css/computed-style-without-renderer-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25468 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Darin.
thatcher [Mon, 10 Sep 2007 17:51:06 +0000 (17:51 +0000)]
    Reviewed by Darin.

        Always animate when calling _scrollTo.

        * WebView/WebFrameView.mm:
        (-[WebFrameView _scrollVerticallyBy:]):
        (-[WebFrameView _scrollHorizontallyBy:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25467 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
antti [Mon, 10 Sep 2007 14:55:11 +0000 (14:55 +0000)]
WebCore:

        Reviewed by Kevin.

        Fix <rdar://problem/5444866>
        REGRESSION: missing text in Acrobat "Getting Started" screen due to change in load ordering of large resources

        Make external scripts loaded using file: wait until all style sheet loads have completed before executing.
        Fixes a class of problems where there is a dependency between script and stylesheet and results would effectively
        get randomized based on which order the resources arrived. In Tiger file loads were effectively serialized by
        lower level components, which is why this regressed.

        Test: http/tests/local/stylesheet-and-script-load-order.html

        * dom/Document.cpp:
        (WebCore::Document::removePendingSheet):
        * dom/Tokenizer.h:
        (WebCore::Tokenizer::executeScriptsWaitingForStylesheets):
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::HTMLTokenizer):
        (WebCore::HTMLTokenizer::begin):
        (WebCore::HTMLTokenizer::executeScriptsWaitingForStylesheets):
        (WebCore::HTMLTokenizer::notifyFinished):
        * html/HTMLTokenizer.h:

LayoutTests:

        Reviewed by Kevin.

        Test for <rdar://problem/5444866>
        REGRESSION: missing text in Acrobat "Getting Started" screen due to change in load ordering of large resources

        * http/tests/local/stylesheet-and-script-load-order-expected.txt: Added.
        * http/tests/local/stylesheet-and-script-load-order.html: Added.
        * http/tests/local/stylesheet-dependent.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25466 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Disable more occasionally failing tests.
weinig [Mon, 10 Sep 2007 04:56:37 +0000 (04:56 +0000)]
    Disable more occasionally failing tests.

        * http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html: Removed.
        * http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html.
        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html: Removed.
        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open.html.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25465 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Maciej Stachowiak.
dsmith [Mon, 10 Sep 2007 03:32:23 +0000 (03:32 +0000)]
    Reviewed by Maciej Stachowiak.

        http://bugs.webkit.org/show_bug.cgi?id=15148
        Bug 15148: Poor performance on crazy DOM raytracer

        Switch data structures to avoid quadratic behavior.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutPositionedObjects): Update for ListHashSet
        (WebCore::RenderBlock::markPositionedObjectsForLayout): Update for ListHashSet
        (WebCore::RenderBlock::insertPositionedObject): Use ListHashSet to avoid expensive uniqueing
        (WebCore::RenderBlock::removePositionedObject): Update for ListHashSet
        (WebCore::RenderBlock::removePositionedObjects): Update for ListHashSet
        (WebCore::RenderBlock::lowestPosition): Update for ListHashSet
        (WebCore::RenderBlock::rightmostPosition): Update for ListHashSet
        (WebCore::RenderBlock::leftmostPosition): Update for ListHashSet
        (WebCore::RenderBlock::rightBottom): Update for ListHashSet
        * rendering/RenderBlock.h: Change m_positionedObjects from DeprecatedPtrList to ListHashSet

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25464 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Rubberstamped by Darin
beidson [Mon, 10 Sep 2007 02:08:21 +0000 (02:08 +0000)]
    Rubberstamped by Darin

        pthread_main_np() is a Darwin thing, not a Mac thing

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::IconDatabase):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25463 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebKitTools:
weinig [Mon, 10 Sep 2007 00:05:08 +0000 (00:05 +0000)]
WebKitTools:

        Reviewed by Mark Rowe.

        Remove 'objC' prefix from methods now in the ObjCController.

        * DumpRenderTree/ObjCController.m:
        (+[ObjCController isSelectorExcludedFromWebScript:]):
        (+[ObjCController webScriptNameForSelector:]):
        (-[ObjCController classNameOf:]):
        (-[ObjCController objectOfClass:]):
        (-[ObjCController identityIsEqual::]):
        (-[ObjCController longLongRoundTrip:]):
        (-[ObjCController unsignedLongLongRoundTrip:]):

LayoutTests:

        Reviewed by Mark Rowe.

        Update tests now that the 'objC' prefix is no longer used for methods of the ObjCController.

        * fast/dom/wrapper-classes.html:
        * platform/mac/fast/objc/longlongTest.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25462 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebKitTools:
weinig [Sun, 9 Sep 2007 23:41:07 +0000 (23:41 +0000)]
WebKitTools:

        Reviewed by Oliver.

        Initial refactor of DumpRenderTree in preparation of making it more platform independent.
        - Move LayoutTestController into its own file.
        - Move Objective-C only functions on LayoutTestController into a new controller called the
          ObjCController.

        * DumpRenderTree/DumpRenderTree.h:
        * DumpRenderTree/DumpRenderTree.m:
        (displayWebView):
        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
        * DumpRenderTree/FrameLoadDelegate.m:
        (-[FrameLoadDelegate webView:didClearWindowObject:forFrame:]):
        * DumpRenderTree/LayoutTestController.h: Added.
        * DumpRenderTree/LayoutTestController.m: Added.
        (+[LayoutTestController isSelectorExcludedFromWebScript:]):
        (+[LayoutTestController webScriptNameForSelector:]):
        (-[LayoutTestController clearBackForwardList]):
        (-[LayoutTestController setUseDashboardCompatibilityMode:]):
        (-[LayoutTestController setCloseRemainingWindowsWhenComplete:]):
        (-[LayoutTestController setCustomPolicyDelegate:]):
        (-[LayoutTestController keepWebHistory]):
        (-[LayoutTestController setCallCloseOnWebViews:]):
        (-[LayoutTestController setCanOpenWindows]):
        (-[LayoutTestController waitUntilDone]):
        (-[LayoutTestController waitUntilDoneWatchdogFired]):
        (-[LayoutTestController notifyDone]):
        (-[LayoutTestController dumpAsText]):
        (-[LayoutTestController addFileToPasteboardOnDrag]):
        (-[LayoutTestController addDisallowedURL:]):
        (-[LayoutTestController setUserStyleSheetLocation:]):
        (-[LayoutTestController setUserStyleSheetEnabled:]):
        (-[LayoutTestController dumpDOMAsWebArchive]):
        (-[LayoutTestController dumpSourceAsWebArchive]):
        (-[LayoutTestController dumpSelectionRect]):
        (-[LayoutTestController dumpTitleChanges]):
        (-[LayoutTestController dumpBackForwardList]):
        (-[LayoutTestController windowCount]):
        (-[LayoutTestController dumpChildFrameScrollPositions]):
        (-[LayoutTestController dumpChildFramesAsText]):
        (-[LayoutTestController dumpEditingCallbacks]):
        (-[LayoutTestController dumpResourceLoadCallbacks]):
        (-[LayoutTestController dumpFrameLoadCallbacks]):
        (-[LayoutTestController setWindowIsKey:]):
        (-[LayoutTestController setMainFrameIsFirstResponder:]):
        (-[LayoutTestController display]):
        (-[LayoutTestController testRepaint]):
        (-[LayoutTestController repaintSweepHorizontally]):
        (-[LayoutTestController invokeUndefinedMethodFromWebScript:withArguments:]):
        (-[LayoutTestController _addWorkForTarget:selector:arg1:arg2:]):
        (-[LayoutTestController _doLoad:target:]):
        (-[LayoutTestController _doBackOrForwardNavigation:]):
        (-[LayoutTestController queueBackNavigation:]):
        (-[LayoutTestController queueForwardNavigation:]):
        (-[LayoutTestController queueReload]):
        (-[LayoutTestController queueScript:]):
        (-[LayoutTestController queueLoad:target:]):
        (-[LayoutTestController setAcceptsEditing:]):
        (-[LayoutTestController setTabKeyCyclesThroughElements:]):
        (-[LayoutTestController storeWebScriptObject:]):
        (-[LayoutTestController accessStoredWebScriptObject]):
        (-[LayoutTestController dealloc]):
        (-[LayoutTestController decodeHostName:]):
        (-[LayoutTestController encodeHostName:]):
        * DumpRenderTree/ObjCController.h: Added.
        * DumpRenderTree/ObjCController.m: Added.
        (+[ObjCController isSelectorExcludedFromWebScript:]):
        (+[ObjCController webScriptNameForSelector:]):
        (-[ObjCController objCClassNameOf:]):
        (-[ObjCController objCObjectOfClass:]):
        (-[ObjCController objCIdentityIsEqual::]):
        (-[ObjCController objCLongLongRoundTrip:]):
        (-[ObjCController objCUnsignedLongLongRoundTrip:]):
        (-[ObjCController testWrapperRoundTripping:]):

LayoutTests:

        Reviewed by Oliver.

        Change objective-c tests to use the new ObjCController.

        * fast/dom/Window/window-properties.html:
        * fast/dom/wrapper-classes.html:
        * platform/mac/fast/dom/wrapper-round-tripping.html:
        * platform/mac/fast/objc/longlongTest.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25461 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-09 Holger Hans Peter Freyther <zecke@selfish.org>
zecke [Sun, 9 Sep 2007 13:23:22 +0000 (13:23 +0000)]
2007-09-09  Holger Hans Peter Freyther  <zecke@selfish.org>

        Build fix for Gtk+ by adding WebCore::callOnMainThread to the TemporaryLinkStubs.

        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::callOnMainThread):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25459 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Rubber-stamped by Oliver.
weinig [Sun, 9 Sep 2007 07:11:23 +0000 (07:11 +0000)]
    Rubber-stamped by Oliver.

        Disable occasionally failing tests until the reason for their failure can be determined.

        * http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open.html: Removed.
        * http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open.html.
        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change.html: Removed.
        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change.html.
        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe.html: Removed.
        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe.html-disabled: Copied from http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe.html.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25458 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agomissed file in previous checkin
staikos [Sun, 9 Sep 2007 05:31:43 +0000 (05:31 +0000)]
missed file in previous checkin

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25457 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoimplement a couple of FileSystem functions and stub out the new thread function
staikos [Sun, 9 Sep 2007 05:14:55 +0000 (05:14 +0000)]
implement a couple of  FileSystem functions and stub out the new thread function
for future implementation

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25456 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-08 Mark Rowe <mrowe@apple.com>
bdash [Sun, 9 Sep 2007 03:13:46 +0000 (03:13 +0000)]
2007-09-08  Mark Rowe  <mrowe@apple.com>

        Build fix for when ENABLE(ICONDATABASE) is not set.

        * loader/icon/IconDatabaseNone.cpp:
        (WebCore::IconDatabase::~IconDatabase):

2007-09-08  Mark Rowe  <mrowe@apple.com>

        Qt build fix.  Move stub method implementations to the right class.

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::didPerformFirstNavigation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25455 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-08 Mark Rowe <mrowe@apple.com>
bdash [Sun, 9 Sep 2007 02:50:16 +0000 (02:50 +0000)]
2007-09-08  Mark Rowe  <mrowe@apple.com>

        More fixes for the Qt and Gtk builds.

        * WebCore.pro: Update for file changes.
        * loader/icon/IconDatabase.cpp: Include errno.h for EDEADLK.
        * loader/icon/PageURLRecord.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25454 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
justing [Sun, 9 Sep 2007 00:22:32 +0000 (00:22 +0000)]
WebCore:

        Backing my change back in without the changes to VisiblePosition::next
        and previous that weren't necessary to fix the bug and were causing some
        layout test failures.  Most of the failures appeared to be fixes but I
        want more time to investigate and have to move to on to another task.

        * editing/Selection.cpp:
        (WebCore::Selection::validate):
        * editing/visible_units.cpp:
        (WebCore::endOfWord):

LayoutTests:

        Re-enabling these tests.

        * editing/selection/5057506-2.html: Added.
        * editing/selection/5057506-2.html-disabled: Removed.
        * editing/selection/5057506.html: Added.
        * editing/selection/5057506.html-disabled: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25453 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Reviewed by Mark Rowe
beidson [Sat, 8 Sep 2007 23:15:40 +0000 (23:15 +0000)]
    Reviewed by Mark Rowe

        Fix the _NSAutoreleaseNoPool() errors on launch - We were using NSFileManager on the secondary
        thread with no NSAutoreleasePool in place

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::iconDatabaseSyncThread):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25452 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Add fix to the correct file.
weinig [Sat, 8 Sep 2007 22:45:55 +0000 (22:45 +0000)]
    Add fix to the correct file.

        * loader/icon/SQLDatabase.h:
        * loader/icon/SQLStatement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25451 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Fix Windows build.
weinig [Sat, 8 Sep 2007 22:25:21 +0000 (22:25 +0000)]
    Fix Windows build.

        * loader/icon/SQLStatement.h: Disable boolean conversion warning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25450 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago YABF (Yet Another Build Fix)
beidson [Sat, 8 Sep 2007 21:44:17 +0000 (21:44 +0000)]
    YABF (Yet Another Build Fix)

        * Api/qwebsettings.cpp:
        (QWebSettings::iconDatabaseEnabled):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25448 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Better build fix
beidson [Sat, 8 Sep 2007 21:35:30 +0000 (21:35 +0000)]
    Better build fix

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::registerForIconNotification):
        * WebCoreSupport/FrameLoaderClientGtk.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25447 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Better build fix
beidson [Sat, 8 Sep 2007 21:30:05 +0000 (21:30 +0000)]
    Better build fix

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClient::registerForIconNotification):
        * WebCoreSupport/FrameLoaderClientQt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25446 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Build fix
beidson [Sat, 8 Sep 2007 21:24:21 +0000 (21:24 +0000)]
    Build fix

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::registerForIconNotification):
        * WebCoreSupport/FrameLoaderClientGtk.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25445 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Build fix
beidson [Sat, 8 Sep 2007 21:19:04 +0000 (21:19 +0000)]
    Build fix

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClient::registerForIconNotification):
        * WebCoreSupport/FrameLoaderClientQt.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25444 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago Build fix for non-Mac platforms that use Icon Database
beidson [Sat, 8 Sep 2007 21:09:22 +0000 (21:09 +0000)]
    Build fix for non-Mac platforms that use Icon Database

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::IconDatabase): Apparently only Mac has the beauty that is pthread_main_np()

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25443 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoVersioning.
bdash [Sat, 8 Sep 2007 20:58:03 +0000 (20:58 +0000)]
Versioning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25442 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years ago2007-09-08 Mark Rowe <mrowe@apple.com>
bdash [Sat, 8 Sep 2007 20:48:15 +0000 (20:48 +0000)]
2007-09-08  Mark Rowe  <mrowe@apple.com>

        Build fix.

        * WebCore.xcodeproj/project.pbxproj: Headers used up in WebKit need to be be "private" rather than "project".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25440 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoWebCore:
beidson [Sat, 8 Sep 2007 20:33:08 +0000 (20:33 +0000)]
WebCore:

        Reviewed by Darin

        <rdar://problem/5434431> - Asynchronous Icon Database

        The IconDatabase API was originally designed to be fully asynchronous - if an icon wasn't read in from disk
        when you asked for it, you would be notified when it was.

        Safari 2 did writes on a background thread, but reads blocked the main thread.

        The current WebCore implementation using SQLite attempted to get rid of the background thread by defering expensive
        writes via timers, but falls short in moderate to extreme usage cases

        Time to make the IconDatabase live up to it's fully asynchronous destiny.

        This should -
        - Make the browser instantly usable while converting Safari 2 icons in the background occurs
        - Remedy any UI slowness/blocking when on slow network home directories
        - Remedy random UI slowness, pauses, and stutters do to random I/O occurring at the exact wrong time or under heavy
          disk usage from swapping or other apps on the system
        - Allow certain long-running procedures to be interruptible (Safari 2 import, reading icons in from disk when trying to quit, etc)

        This will have a noticeable effect on current Safari 2 and Safari 3 beta browsers, including icons not appearing in bookmarks, history,
        or the location field the first time they're asked for, as current released Safari's don't properly listen for these async notifations.
        The second time such a menu or view is brought up, the icon should be there.

        Additionally this includes a SQLite schema change which will be a lot more efficient but will result in the loss of current SQLite icons.
        Converting from Safari 2 style icons will still work.

        WebCore, welcome to multi-threadedness

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCore.vcproj/WebCore.vcproj:

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::iconLoadDecisionAvailable): Called when an Icon becomes available that was requested by this
          DocumentLoader (to support the webView:didReceiveIcon: delegate call in WebKit)
        * loader/DocumentLoader.h:

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::iconLoadDecisionAvailable): Called from the DocumentLoaders who get notified - if the FrameLoader
          ends up not caring because the WebView has transitioned to a new page, nothing occurs.  Otherwise, the FrameLoader possibly
          starts it Icon Loader and possibly sends the webView:didReceiveIcon: delegate call
        (WebCore::FrameLoader::startIconLoader): Instead of "Yes, load the icon now" or "No, don't load it" there is a third possibility -
          "You might be asked to load your icon later."  Add supporting logic for receiving this state, and being called a second time
          when the load decision is finally available.
        * loader/FrameLoader.h:

        * loader/FrameLoaderClient.h: Added "registerForIconNotification" which is a way to tell WebViews "The icon you are interested in might
          become available via the generic WebIconDatabaseDidAddIconNotification instead of a targeted delegate call"
          A WebView can then receive the generic notification and pass on it's own targeted delegate call.

        * loader/icon/IconDataCache.cpp: Removed.
        * loader/icon/IconDataCache.h: Removed.

        * loader/icon/IconDatabase.cpp:
        (WebCore::urlForLogging): Cut a URL down in length for sane logging and debugging
        (WebCore::defaultClient): Return the default, empty IconDatabaseClient incase the API doesn't set one.

        Following block of methods are for the Main thread's usage -
        (WebCore::IconDatabase::setClient):
        (WebCore::makeAllDirectories): Small optimization that checks to see if the entire path exists already, and doesn't try to loop
          through each patch component if the full path is already present
        (WebCore::IconDatabase::open): Makes all directories to the target path and kicks off the background thread - nothing more.
        (WebCore::IconDatabase::close): Signals the thread to quit and waits for it to do so
        (WebCore::IconDatabase::removeAllIcons): Purge the icon database
        (WebCore::IconDatabase::iconForPageURL):
        (WebCore::IconDatabase::readIconForPageURLFromDisk):
        (WebCore::IconDatabase::iconURLForPageURL):
        (WebCore::IconDatabase::defaultIcon):
        (WebCore::IconDatabase::retainIconForPageURL):
        (WebCore::IconDatabase::releaseIconForPageURL):
        (WebCore::IconDatabase::setIconDataForIconURL):
        (WebCore::IconDatabase::setIconURLForPageURL):
        (WebCore::IconDatabase::loadDecisionForIconURL): Determine if an icon loader should load now.  If the decision is "maybe later", then
          mark the DocumentLoader to be notified later when the final decision is available.
        (WebCore::IconDatabase::iconDataKnownForIconURL): Determine if the actual image data has been read from disk (or set from the loader) for
          icon URL in question
        (WebCore::IconDatabase::setEnabled):
        (WebCore::IconDatabase::isEnabled):
        (WebCore::IconDatabase::setPrivateBrowsingEnabled):
        (WebCore::IconDatabase::isPrivateBrowsingEnabled):
        (WebCore::IconDatabase::delayDatabaseCleanup): Restore this method from a year ago, as asynchronous pruning of icons can now occur on a
          background thread.
        (WebCore::IconDatabase::allowDatabaseCleanup):
        (WebCore::IconDatabase::checkIntegrityBeforeOpening):
        (WebCore::IconDatabase::pageURLMappingCount):
        (WebCore::IconDatabase::retainedPageURLCount):
        (WebCore::IconDatabase::iconRecordCount):
        (WebCore::IconDatabase::iconRecordCountWithData):
        (WebCore::IconDatabase::IconDatabase):
        (WebCore::IconDatabase::~IconDatabase):
        (WebCore::IconDatabase::notifyPendingLoadDecisions): Tell all the registered DocumentLoaders "Hey, we've read in all URL mappings from disk,
          so check to see if you are interested in any of them"
        (WebCore::IconDatabase::notifyPendingLoadDecisionsInternal):
        (WebCore::IconDatabase::wakeSyncThread): Wake the sync thread, if it is idle
        (WebCore::IconDatabase::scheduleOrDeferSyncTimer): Even though we're on a background thread, we still defer writing out to disk during
          periods of high activity
        (WebCore::IconDatabase::syncTimerFired): Call wakeSyncThread()

        Following block of methods may be used by either thread -
        (WebCore::IconDatabase::isOpen):
        (WebCore::IconDatabase::databasePath):
        (WebCore::IconDatabase::defaultDatabaseFilename):
        (WebCore::IconDatabase::getOrCreateIconRecord):
        (WebCore::IconDatabase::getOrCreatePageURLRecord):

        Following block of methods are used by the secondary thread only -
        (WebCore::IconDatabase::importIconURLForPageURL): For the Safari 2 import procedure - write a URL mapping directly out to disk
        (WebCore::IconDatabase::importIconDataForIconURL): For the Safari 2 import procedure - write an Icon directly out to disk
        (WebCore::IconDatabase::shouldStopThreadActivity): To check and see if the thread should stop what it is doing now to do something
          more important (such as quit, or delete all icons)
        (WebCore::IconDatabase::iconDatabaseSyncThreadStart):
        (WebCore::IconDatabase::iconDatabaseSyncThread): Entry point for the background thread
        (WebCore::databaseVersionNumber):
        (WebCore::isValidDatabase):
        (WebCore::createDatabaseTables):
        (WebCore::IconDatabase::performOpenInitialization): Open and validate the SQLite database, making sure it's schema jives with what
          is expected
        (WebCore::IconDatabase::checkIntegrity):
        (WebCore::IconDatabase::performURLImport): Import all the Page URL -> Icon URL mappings from the database.  Done "1st thing" on startup,
          this is necessary to be able to give the loader decisions about whether or not it should load icons from the network
        (WebCore::IconDatabase::syncThreadMainLoop): Main loop - sleeps until woken up, then does a read cycle and a write cycle until both cycles
          do no work - then it goes back to sleep.
        (WebCore::IconDatabase::readFromDatabase): Reads icons from the database that clients are waiting on
        (WebCore::IconDatabase::writeToDatabase): Writes any changes page -> icon url mappings to disk, as well as any new image data that has
          been received from the loader
        (WebCore::IconDatabase::pruneUnretainedIcons): Done only once, and only after the first write to the database, this procedure removes all
          icons and page URLs from disk that haven't been retained by any client.  Note that the prune can be delayed by utilizing delayDatabaseCleanup()
        (WebCore::IconDatabase::checkForDanglingPageURLs): Usually part of the prune procedure, prunes any pages who point to icons that no longer exist
          in the database
        (WebCore::IconDatabase::removeAllIconsOnThread): Completely purge both the on-disk and in memory records of all icons
        (WebCore::IconDatabase::deleteAllPreparedStatements): Part of removeAllIcons and the thread cleanup procedure
        (WebCore::IconDatabase::cleanupSyncThread): Write out any last remaining writes to disk, close the database, and then end the thread
        (WebCore::IconDatabase::imported): Checks the DB to see if the Safari 2 import has occured
        (WebCore::IconDatabase::setImported): Sets the "Safari 2 imported" flag
        (WebCore::readySQLStatement):
        (WebCore::IconDatabase::setIconURLForPageURLInSQLDatabase): This and the following "SQLDatabase" suffixed methods are pretty self explanatory
        (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
        (WebCore::IconDatabase::removePageURLFromSQLDatabase):
        (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
        (WebCore::IconDatabase::addIconURLToSQLDatabase):
        (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
        (WebCore::IconDatabase::removeIconFromSQLDatabase):
        (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
        * loader/icon/IconDatabase.h:

        * loader/icon/IconDatabaseClient.h: Added.
        (WebCore::IconDatabaseClient::~IconDatabaseClient):
        (WebCore::IconDatabaseClient::performImport): Perform the Safari 2 import, implemented by WebKit
        (WebCore::IconDatabaseClient::dispatchDidRemoveAllIcons): Send the API notification
        (WebCore::IconDatabaseClient::dispatchDidAddIconForPageURL): Ditto

        * loader/icon/IconDatabaseNone.cpp: Best attempt to keep non icon-DB platforms building
        (WebCore::IconDatabase::defaultDatabaseFilename):
        (WebCore::IconDatabase::readIconForPageURLFromDisk):
        (WebCore::IconDatabase::loadDecisionForIconURL):
        (WebCore::IconDatabase::iconDataKnownForIconURL):
        (WebCore::IconDatabase::setIconURLForPageURL):
        (WebCore::IconDatabase::isEnabled):
        (WebCore::IconDatabase::delayDatabaseCleanup):
        (WebCore::IconDatabase::allowDatabaseCleanup):
        (WebCore::IconDatabase::setClient):

        * loader/icon/IconRecord.cpp: Added.
        (WebCore::IconRecord::IconRecord): IconRecord used to be "IconDataCache" - it is merely a container for the url, timestamp, and image for a site icon.
          It is Shared, and therefore ref counted - PageURLRecords are the owning containers.  This is a tricky way to track how many page urls are retaining
          an IconRecord and therefore tracking when we should try to get rid of one.
        (WebCore::IconRecord::~IconRecord):
        (WebCore::IconRecord::image):
        (WebCore::IconRecord::setImageData):
        (WebCore::IconRecord::loadImageFromResource):
        (WebCore::IconRecord::imageDataStatus): Return whether the image data hasn't been read yet, exists in memory, or is absent (site with no icon)
        (WebCore::IconRecord::snapshot): Returns a snapshot of the icon's data - url, timestamp, and image data - to be written to disk
        * loader/icon/IconRecord.h: Added.
        (WebCore::IconSnapshot::IconSnapshot):
        (WebCore::IconRecord::getTimestamp):
        (WebCore::IconRecord::setTimestamp):
        (WebCore::IconRecord::iconURL):
        (WebCore::IconRecord::retainingPageURLs):

        * loader/icon/PageURLRecord.cpp: Added.
        (WebCore::PageURLRecord::PageURLRecord): PageURLRecord is fundamentally a pairing of a Page URL to an Icon.  It has manual ref counting for the sake
          of "retainIconForPageURL" and "releaseIconForPageURL", and can provide a quick snapshot of it's Page URL -> Icon URL mapping for writing to
          the database
        (WebCore::PageURLRecord::setIconRecord):
        (WebCore::PageURLRecord::snapshot):
        * loader/icon/PageURLRecord.h: Added.
        (WebCore::PageURLSnapshot::PageURLSnapshot):
        (WebCore::PageURLRecord::url):
        (WebCore::PageURLRecord::PageURLRecord::iconRecord):
        (WebCore::PageURLRecord::retain):
        (WebCore::PageURLRecord::release):
        (WebCore::PageURLRecord::retainCount):

        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::copy): Added a deep copy method for the purposes of handing icon data across the thread boundary into the icon database
        * platform/SharedBuffer.h:

        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::registerForIconNotification):

        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::callOnMainThread): Only other IconDatabase utilizing platform - keep their build going

WebKit:

        Reviewed by Darin

        <rdar://problem/5434431> - Asynchronous Icon Database

        WebKit side of things
        Mainly, there are Notifications WebKit has to listen for now that tell it when to either call back into WebCore
        for some purpose or to send the webView:didReceiveIcon: delegate call

        Many smaller tweaks as well.

        * Misc/WebIconDatabase.h:
        * Misc/WebIconDatabase.mm:
        (defaultClient):
        (-[WebIconDatabase init]):
        (+[WebIconDatabase delayDatabaseCleanup]): Accessor so clients can prevent the thread from cleaning up the database
          before they've done all their necessary retaining of icons.
        (+[WebIconDatabase allowDatabaseCleanup]):
        (-[WebIconDatabase removeAllIcons]):
        (-[WebIconDatabase _isEnabled]):
        (-[WebIconDatabase _sendNotificationForURL:]):
        (-[WebIconDatabase _sendDidRemoveAllIconsNotification]):
        (-[WebIconDatabase _databaseDirectory]):

        (-[ThreadEnabler threadEnablingSelector:]): Quick and dirty class to enabled Cocoa multithreading
        (+[ThreadEnabler enableThreading]):
        (importToWebCoreFormat):
        * Misc/WebIconDatabaseInternal.h: Expose the internal methods of WebIconDatabase that are required by WebIconDatabaseClient

        * Misc/WebNSNotificationCenterExtras.h: Added. - Great utility class whose design was borrowed from Colloquy
          that allows the posting of a Cocoa notification on the main thread from *any* thread
        * Misc/WebNSNotificationCenterExtras.m: Added.
        (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:]):
        (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:]):
        (-[NSNotificationCenter postNotificationOnMainThreadWithName:object:userInfo:waitUntilDone:]):
        (+[NSNotificationCenter _postNotificationName:]):

        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::dispatchDidReceiveIcon): Send the webView:didReceiveIcon: delegate call
        (WebFrameLoaderClient::registerForIconNotification):

        * WebCoreSupport/WebIconDatabaseClient.h: Added.
        * WebCoreSupport/WebIconDatabaseClient.mm: Added.
        (WebIconDatabaseClient::performImport):  Perform the Safari 2 icon import
        (WebIconDatabaseClient::dispatchDidRemoveAllIcons): Send the NSNotification
        (WebIconDatabaseClient::dispatchDidAddIconForPageURL): Ditto

        * WebView/WebView.mm:
        (-[WebView _receivedIconChangedNotification:]): Check and see if this notification is for this WebView's current URL by
          calling back into the IconDatabase
        (-[WebView _registerForIconNotification:]): Support for WebIconDatabaseClient
        (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Dispatch this delegate call as well as unregister for the notification
        * WebView/WebViewInternal.h:

        * WebKit.xcodeproj/project.pbxproj:

win:

        <rdar://problem/5434431> - Asynchronous Icon Database

        * WebFrame.cpp:
        (WebFrame::didPerformFirstNavigation): Empty impl for now
        (WebFrame::registerForIconNotification): Ditto
        * WebFrame.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25439 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 years agoSpell Sams name correctly.
oliver [Sat, 8 Sep 2007 04:00:54 +0000 (04:00 +0000)]
Spell Sams name correctly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25438 268f45cc-cd09-0410-ab3c-d52691b4dbfc