WebKit-https.git
13 years ago Not reviewed - test case fixes.
mjs [Mon, 20 Aug 2007 07:01:55 +0000 (07:01 +0000)]
    Not reviewed - test case fixes.

        - fix some test cases where expected results were altered by the last change
        (I reviewed all the new results.)

        * fast/events/focusingUnloadedFrame-expected.txt:
        * http/tests/loading/simple-subframe-expected.txt:
        * tables/mozilla_expected_failures/bugs/bug137388-1-expected.txt:
        * tables/mozilla_expected_failures/bugs/bug137388-2-expected.txt:
        * webarchive/loading/test-loading-archive-expected.txt:

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

13 years ago Gtk+ build fix.
aroben [Mon, 20 Aug 2007 00:04:13 +0000 (00:04 +0000)]
    Gtk+ build fix.

        * platform/gdk/TemporaryLinkStubs.cpp: Removed const.

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

13 years ago Fix <rdar://5395835> REGRESSION (r24527): Context menu for edit fields is...
aroben [Sun, 19 Aug 2007 22:07:28 +0000 (22:07 +0000)]
    Fix <rdar://5395835> REGRESSION (r24527): Context menu for edit fields is missing "Font & Writing Direction"

        The problem was that ContextMenuItem::setSubMenu was just copying the
        HMENU from the ContextMenu passed in on Windows, but that HMENU was
        later getting destroyed when the ContextMenu went out of scope.

        I added a new ContextMenu::releasePlatformDescription method that is
        used in setSubMenu instead. I think an ultimately better design would
        be for setSubMenu to take ownership of the ContextMenu that's passed in
        (as should insertItem and appendItem), but I decided to be conservative
        and just make the changes needed to fix the bug.

        Reviewed by Darin.

        No test possible.

        * platform/ContextMenu.h: Added releasePlatformDescription.
        * platform/gdk/TemporaryLinkStubs.cpp: Added stub implementation.
        * platform/mac/ContextMenuMac.mm:
        (WebCore::ContextMenu::releasePlatformDescription): Implemented, though
        it's never called on this platform.
        * platform/qt/ContextMenuQt.cpp:
        (WebCore::ContextMenu::releasePlatformDescription): Ditto.
        * platform/win/ContextMenuItemWin.cpp:
        (WebCore::ContextMenuItem::setSubMenu): Call releasePlatformDescription
        since we need to take ownership of the HMENU.
        * platform/win/ContextMenuWin.cpp:
        (WebCore::ContextMenu::releasePlatformDescription): Implemented.

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

13 years agoLayoutTests:
mjs [Sun, 19 Aug 2007 21:40:39 +0000 (21:40 +0000)]
LayoutTests:

        Reviewed by Darin.

        - update for fix to <rdar://problem/5198272> REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)

        No longer expect windowScriptObject delegate method in frames that never
        use script.

        * http/tests/loading/bad-scheme-subframe-expected.txt:
        * http/tests/loading/bad-server-subframe-expected.txt:
        * http/tests/loading/empty-subframe-expected.txt:
        * http/tests/loading/slow-parsing-subframe-expected.txt:

WebCore:

        Reviewed by Darin.

        - fixed <rdar://problem/5198272> REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)

        There were three main cuases of extra time due to creating the initial empty document:

        1) Creating an extra WebHTMLView and swapping it for a new one for each frame created.
        2) Parsing the minimal markup for the initial document's contents.
        3) Clearing the Window object an extra time and dispatching the corresponding delegate method.

        The WebCore part of the fixes addresses 2 and 3.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::init): Don't parse "<html><body>" for the initial
        empty document; it turns out not to be needed.
        (WebCore::FrameLoader::dispatchWindowObjectAvailable): Don't
        dispatch the delegate if we haven't created a ScriptInterpreter yet.
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::initScriptIfNeeded): Dispatch the window object
        delegate when we first create the interpreter, since that is now done
        lazily.
        * loader/FrameLoader.h:
        (WebCore::FrameLoader::committingFirstRealLoad): Helper for WebKit
        to know when to reuse a WebHTMLView.

WebKit:

        Reviewed by Darin.

        - fixed <rdar://problem/5198272> REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)

        There were three main cuases of extra time due to creating the initial empty document:

        1) Creating an extra WebHTMLView and swapping it for a new one for each frame created.
        2) Parsing the minimal markup for the initial document's contents.
        3) Clearing the Window object an extra time and dispatching the corresponding delegate method.

        The WebKit part of the fixes addresses 1.

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::makeDocumentView): When switching from the initial
        empty document to the first real document, reuse the WebHTMLView.

        It might actually be a significant performance improvement to always
        reuse the WebHTMLView, but that is a much riskier change and not
        needed to fix the regression right now.

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

13 years agoLayoutTests:
pewtermoose [Sun, 19 Aug 2007 18:26:55 +0000 (18:26 +0000)]
LayoutTests:
2007-08-19  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adam Roben.

        - test for http://bugs.webkit.org/show_bug.cgi?id=15008
          ASSERTION FAILED: !firstLineBox() == !lastLineBox() setting content on image

        * fast/images/text-content-crash-2-expected.txt: Added.
        * fast/images/text-content-crash-2.html: Added.

WebCore:
2007-08-19  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adam Roben.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15008
          ASSERTION FAILED: !firstLineBox() == !lastLineBox() setting content on image

        Test: fast/images/text-content-crash-2.html

        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::setImage): Added a check that the renderer is an
        image.
        (WebCore::HTMLImageLoader::updateFromElement): Ditto.
        (WebCore::HTMLImageLoader::notifyFinished): Ditto.

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

13 years agoDon't export ICO symbols
staikos [Sun, 19 Aug 2007 17:10:54 +0000 (17:10 +0000)]
Don't export ICO symbols

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

13 years agoLayoutTests:
ddkilzer [Sun, 19 Aug 2007 16:51:01 +0000 (16:51 +0000)]
LayoutTests:

        Reviewed by Adam and Geoff within one minute of each other.

        Tests that the '-apple-opacity', '-khtml-opacity' and '-webkit-opacity' styles
        all map to the 'opacity' style.

        * fast/css/legacy-opacity-styles-expected.txt: Added.
        * fast/css/legacy-opacity-styles.html: Added.

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

13 years ago2007-08-19 Mark Rowe <mrowe@apple.com>
bdash [Sun, 19 Aug 2007 12:07:01 +0000 (12:07 +0000)]
2007-08-19  Mark Rowe  <mrowe@apple.com>

        Update expected results.  The results that were landed with the test did not match the wording
        in the test that was landed.

        * fast/encoding/namespace-tolerance-expected.txt:

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

13 years ago2007-08-19 Oleg Sukhodolsky <son.two@gmail.com>
zecke [Sun, 19 Aug 2007 11:13:54 +0000 (11:13 +0000)]
2007-08-19  Oleg Sukhodolsky  <son.two@gmail.com>

        Reviewed by Mark.

        -fixes http://bugs.webkit.org/show_bug.cgi?id=14632

        * Scripts/webkitdirs.pm:
        qt and gtk ports now explicitly pass debug (or release) mode to qmake.

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

13 years agoFix compilation
staikos [Sun, 19 Aug 2007 05:15:15 +0000 (05:15 +0000)]
Fix compilation

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

13 years ago2007-08-18 Holger Hans Peter Freyther <zecke@selfish.org>
zecke [Sat, 18 Aug 2007 18:20:12 +0000 (18:20 +0000)]
2007-08-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Build fix. Add const to the first parameter of createPlugin

        * WebCoreSupport/FrameLoaderClientGtk.cpp:

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

13 years agoWebCore:
mjs [Sat, 18 Aug 2007 03:48:59 +0000 (03:48 +0000)]
WebCore:

        Reviewed by Darin.

        - WebCore part of fix to scrollbar suppression hack for Leopard

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::transitionToCommitted): Suppress scrollbars earlier, so it happens
        before any potential view swap.

WebKit:

        Reviewed by Darin.

        - WebKit part of fix to scrollbar suppression hack for Leopard

        * WebView/WebDynamicScrollBarsView.m:
        (-[WebDynamicScrollBarsView reflectScrolledClipView:]): Don't call the superclass method
        when scrollbars are suppressed.
        (-[WebDynamicScrollBarsView setScrollBarsSuppressed:repaintOnUnsuppress:]): Instead call it
        here, when unsuppressing.

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

13 years ago Fix <rdar://5192578> Inspect Element should not appear in context menu in non-debug...
aroben [Sat, 18 Aug 2007 02:00:40 +0000 (02:00 +0000)]
 Fix <rdar://5192578> Inspect Element should not appear in context menu in non-debug mode

        We now follow the same logic as Mac WebKit for displaying the Inspect Element item:
            1) If DisableWebKitDeveloperExtras is set to true, don't display it
            2) If not, and we're in a debug build, display it
            3) If not, and we're in a release build, display it if
               WebKitDeveloperExtras is set to true

        Reviewed by Ada.

        * Interfaces/IWebPreferencesPrivate.idl: Added.
        * WebKit.vcproj/Interfaces.vcproj: Add new IWebPreferencesPrivate.idl
        file to project.
        * WebKit.vcproj/WebKitGUID.vcproj: Added generated .c file for
        IWebPreferencesPrivate to project.
        * WebPreferenceKeysPrivate.h: Added new keys.
        * WebPreferences.cpp: Added IID_WebPreferences.
        (WebPreferences::postPreferencesChangesNotification): Added an explicit
        cast needed now that WebPreferences implements two interfaces.
        (WebPreferences::QueryInterface): Added new cases.
        (WebPreferences::setDeveloperExtrasEnabled): Added.
        (WebPreferences::developerExtrasEnabled): Added.
        (WebPreferences::developerExtrasDisabledByOverride): Added.
        * WebPreferences.h: Now implements IWebPreferencesPrivate.
        * WebView.cpp:
        (WebView::updateWebCoreSettingsFromPreferences): Call developerExtrasEnabled.
        (WebView::developerExtrasEnabled): Ported from -[WebView _developerExtrasEnabled].
        * WebView.h:

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

13 years ago Add WebPreferences::sharedStandardPreferences
aroben [Sat, 18 Aug 2007 02:00:30 +0000 (02:00 +0000)]
 Add WebPreferences::sharedStandardPreferences

         This is a convenience method to get the standard preferences object so
         that within WebKit we don't have to deal with the fact that COM doesn't
         support static methods.

         Reviewed by Ada.

         * WebHistory.cpp:
         (WebHistory::WebHistory): Use sharedStandardPreferences.
         * WebIconDatabase.cpp:
         (WebIconDatabase::init): Ditto.
         * WebPreferences.cpp:
         (WebPreferences::sharedStandardPreferences): Added.
         (WebPreferences::getInstanceForIdentifier): Use sharedStandardPreferences.
         (WebPreferences::standardPreferences): Ditto.
         * WebPreferences.h:
         * WebView.cpp:
         (WebView::preferences): Ditto.

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

13 years ago Reviewed by Oliver Hunt.
darin [Sat, 18 Aug 2007 01:23:12 +0000 (01:23 +0000)]
    Reviewed by Oliver Hunt.

        - don't look for Apple-style localizable strings in the GTK version of WebKit

        * Scripts/extract-localizable-strings: Add a feature where you can pass in the
        name of subdirectories to skip.
        * Scripts/update-webkit-localizable-strings: Pass WebKit/gtk as a subdirectory
        to skip.

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

13 years ago Reviewed by Maciej.
darin [Sat, 18 Aug 2007 01:08:35 +0000 (01:08 +0000)]
    Reviewed by Maciej.

        - fix <rdar://problem/5414518> Use root URL as origin URL when quarantining downloads

        * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::setOriginalURLForDownload):
        Extract only the scheme and host name and make the originating URL from that.

        * WebKit/StringsNotToBeLocalized.txt: Updated for recent changes.

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

13 years ago Build fix.
andersca [Sat, 18 Aug 2007 00:04:57 +0000 (00:04 +0000)]
    Build fix.

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

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

13 years agoFix a spelling mistake.
thatcher [Sat, 18 Aug 2007 00:01:51 +0000 (00:01 +0000)]
Fix a spelling mistake.

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

13 years ago Reviewed by Darin.
thatcher [Fri, 17 Aug 2007 23:53:09 +0000 (23:53 +0000)]
    Reviewed by Darin.

        <rdar://problem/5398301> Xcode threw mutation exception while enumerating subviews (GC only)

        I was never able to reproduce this exception. But there can be cases where layout will
        trigger JavaScript or plugin code that can modify the WebView view hierarchy during a
        recursive enumeration of all the subviews.

        This patch does two things:
        1) Adds a check in debug builds that will LOG when any view is added or removed during layout.
        Noting that added views will not recieve layout this round and might paint without first recieving layout.

        2) Recursivly builds up an array of descendant WebHTMLViews before calling layout on them.
        This matches the behavior of makeObjectsPerformSelector: in the non-GC case (making a copy
        before enumerating.)

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _web_setPrintingModeRecursive]): Use _web_addDescendantWebHTMLViewsToArray to build up an array
        of WebHTMLViews to enumerate.
        (-[WebHTMLView _web_clearPrintingModeRecursive]): Ditto.
        (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]): Ditto.
        (-[WebHTMLView _web_layoutIfNeededRecursive]): Ditto.
        (-[WebHTMLView _layoutIfNeeded]): Moved to WebHTMLViewFileInternal category.
        (-[WebHTMLView didAddSubview:]): LOG in debug builds.
        (-[WebHTMLView willRemoveSubview:]): Ditto.
        (-[NSView _web_addDescendantWebHTMLViewsToArray:]): Recursivly build an array of descendant WebHTMLViews.
        * WebView/WebHTMLViewInternal.h: Added a BOOL in WebHTMLViewPrivate to track subview changes (debug only.)

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

13 years ago Build fix.
andersca [Fri, 17 Aug 2007 23:45:20 +0000 (23:45 +0000)]
    Build fix.

        * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
        (NPP_SetWindow):

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

13 years agoLayoutTests:
antti [Fri, 17 Aug 2007 23:29:50 +0000 (23:29 +0000)]
LayoutTests:

        Reviewed by Hyatt.

        Test for <rdar://problem/5403773>
        CrashTracer: [USER] 88 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 846

        Changed results for fast/dynamic/containing-block-change.html are progression
        (even though new results don't match Firefox and old ones did!)

        * fast/dynamic/ancestor-to-absolute-expected.txt: Added.
        * fast/dynamic/ancestor-to-absolute.html: Added.
        * fast/dynamic/containing-block-change-expected.checksum:
        * fast/dynamic/containing-block-change-expected.png:
        * fast/dynamic/containing-block-change-expected.txt:

WebCore:

        Reviewed by Hyatt.

        Fix <rdar://problem/5403773>
        CrashTracer: [USER] 88 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 846

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::removePositionedObjects):

        Fix crash in http://www.infobae.com/interior/home.html
        Positioned objects removed from m_positionedObjects would in some cases not get added back to any
        positioned objects list. Adding objects happens in block layout but since layout was not invalidated
        correctly in removePositionedObjects() it would not get invoked. As a result some positioned objects
        would stay in layout dirty state leading to crashes and other bad things.

        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::paint):

        Add needLayout() guard to eliminate this class of crashes from release builds.
        Assert commented out for now since one existing layout test can't handle it.

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

13 years ago Build fix.
andersca [Fri, 17 Aug 2007 22:58:31 +0000 (22:58 +0000)]
    Build fix.

        * WebFrame.cpp:
        (WebFrame::createPlugin):
        * WebFrame.h:

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

13 years ago Reviewed by Darin.
kdecker [Fri, 17 Aug 2007 22:48:17 +0000 (22:48 +0000)]
    Reviewed by Darin.

        <rdar://problem/5252836> Adobe Help Viewer: Japanese characters in the Help Tree structure are shown as garbage
        This test ensures a UTF-8 encoding is properly set. The code tests compatibility of documents which:
          (1) use namespace prefixes on HTML elements
          (2) specify a non-latin charset
          (3) contain non-latin characters

        If this test passes, the UTF-8 character below should exactly match the character the character in namespace-tolerance-expected.txt.

        * fast/encoding/namespace-tolerance-expected.txt: Added.
        * fast/encoding/namespace-tolerance.html: Added.

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

13 years ago2007-08-17 Kevin Decker <kdecker@apple.com>
kdecker [Fri, 17 Aug 2007 22:45:20 +0000 (22:45 +0000)]
2007-08-17  Kevin Decker <kdecker@apple.com>

        Code change by Darin, landed and reviewed by me.

        Fixed: <rdar://problem/5252836> Adobe Help Viewer: Japanese characters in the Help Tree structure are shown as garbage
        Added fast/encoding/namespace-tolerance.html test.

        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForHeadCharset): Slightly loosen the charset decoder heuristic by tweaking it
        to ignore namespaces. This restores compatibility to documents which (1) use namespace prefixes on HTML elements
        (2) specify a non-latin charset and (3) contain non-latin characters.

        Added fast/encoding/namespace-tolerance.html test.

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

13 years agoLayoutTests:
andersca [Fri, 17 Aug 2007 22:12:56 +0000 (22:12 +0000)]
LayoutTests:

        Reviewed by Dave Hyatt.

        <rdar://problem/5379040>
        REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes

        Add test.

        * plugins/netscape-plugin-setwindow-size-expected.txt: Added.
        * plugins/netscape-plugin-setwindow-size.html: Added.

WebCore:

        Reviewed by Dave Hyatt.

        <rdar://problem/5379040>
        REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes

        Instantiate plug-ins during the first layout instead of doing so when creating the renderer.
        This ensures that the plug-in widget will have a correct initial size.

        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::getInstance):
        Force a layout if the plug-in doesn't have an instance.

        (WebCore::HTMLEmbedElement::attach):
        Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.

        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::attach):
        Pass false to updateWidget, this will only create subframes anyway.

        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::getInstance):
        Force a layout if the plug-in doesn't have an instance.

        (WebCore::HTMLObjectElement::attach):
        Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadPlugin):
        Get the size from the renderer and pass it to the client.

        * loader/FrameLoaderClient.h:
        * page/mac/WebCoreFrameBridge.h:
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyFrameLoaderClient::createPlugin):
        Update declarations.

        * rendering/RenderPart.cpp:
        (WebCore::RenderPart::setWidget):
        No need to mark the renderer as dirty here.

        * rendering/RenderPartObject.h:
        * rendering/RenderPartObject.cpp:
        (WebCore::RenderPartObject::updateWidget):
        Add a parameter, onlyCreateNonPlugins. If this is true the widget
        will only be created if it's not a plug-in.

        (WebCore::RenderPartObject::layout):
        Call updateWidget here if m_widget is 0, causing the plug-in to be instantiated.

WebKit:

        Reviewed by Dave Hyatt.

        <rdar://problem/5379040>
        REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes

        Pass the right size when creating the views.

        * WebCoreSupport/WebFrameBridge.mm:
        (-[WebFrameBridge viewForPluginWithFrame:URL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::createPlugin):

WebKitTools:

        Reviewed by Dave Hyatt.

        <rdar://problem/5379040>
        REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes

        Add a way for the plug-in to dump the width and height when it gets its  NPP_SetWindow call.

        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
        (pluginAllocate):
        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
        * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
        (NPP_New):
        (NPP_SetWindow):

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

13 years agoCorrect ChangeLog to reference correct person
oliver [Fri, 17 Aug 2007 20:10:31 +0000 (20:10 +0000)]
Correct ChangeLog to reference correct person

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

13 years agoLayoutTests:
oliver [Fri, 17 Aug 2007 08:42:38 +0000 (08:42 +0000)]
LayoutTests:

        Reviewed by Maciej.

        Simple test to ensure we don't crash when creating a pattern

        * fast/canvas/create-pattern-does-not-crash-expected.txt: Added.
        * fast/canvas/create-pattern-does-not-crash.html: Added.

WebCore:

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=14189
        <rdar://problem/5319511> REPRODUCIBLE CRASH: Canvas createPattern(canvas, ...) crashes on Windows (14189)

        Ensure that we actually retain the CG pattern correctly.

        Credit to Philip Taylor <excors@gmail.com> for finding the cause of this.

        * html/CanvasPattern.cpp:
        (WebCore::CanvasPattern::~CanvasPattern):
        (WebCore::CanvasPattern::createPattern):
        * html/CanvasPattern.h:
        (WebCore::CanvasPattern::platformImage):

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

13 years agoVersioning.
bdash [Fri, 17 Aug 2007 05:29:53 +0000 (05:29 +0000)]
Versioning.

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

13 years ago Build fix. (Maybe?)
ggaren [Fri, 17 Aug 2007 03:10:11 +0000 (03:10 +0000)]
    Build fix. (Maybe?)

        * loader/Cache.cpp:
        (WebCore::Cache::pruneLiveResources):
        (WebCore::Cache::pruneDeadResources):

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

13 years agoLayoutTests:
justing [Fri, 17 Aug 2007 00:29:36 +0000 (00:29 +0000)]
LayoutTests:

        Reviewed by Harrison.

        <rdar://problem/5378473> Undoing a deletion that is part of an open typing command fails to reinsert the caret

        * editing/undo/5378473.html: Added.
        * platform/mac/editing: Added.
        * platform/mac/editing/undo: Added.
        * platform/mac/editing/undo/5378473-expected.checksum: Added.
        * platform/mac/editing/undo/5378473-expected.png: Added.
        * platform/mac/editing/undo/5378473-expected.txt: Added.

WebCore:

        Reviewed by Harrison.

        <rdar://problem/5378473>
        REGRESSION: Undoing a deletion that is part of an open typing command fails to reinsert the caret

        We recently made Undo of a series of deletes select all of the
        characters that were deleted, not just the most recently deleted
        character.  But the code that did this set a new starting selection
        after every delete, even those that were part of an open typing
        command that started with character insertions or forward deletes,
        operations that when undone, remove the starting selection being
        set from the document.

        After this change we only set a new starting selection if the open typing
        command was opened by a backward delete. The new behavior matches TextEdit.
        We don't do something similar or forward deletes because TextEdit opens
        and closes a new typing command on forward delete (added a FIXME about this).

        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::TypingCommand): Initialize
        m_openedByBackwardDelete.
        (WebCore::TypingCommand::forwardDeleteKeyPressed): Added a FIXME about
        how in TextEdit, forward deletes open and close a new typing command.
        (WebCore::TypingCommand::doApply): Set m_openedByBackwardDelete
        appropriately.
        (WebCore::TypingCommand::deleteKeyPressed): Only set the starting
        selection if this delete is the first one in an open typing command
        or one in a series of deletes that opened the typing command.
        * editing/TypingCommand.h: Added m_openedByBackwardDelete.

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

13 years agoWebCore:
ggaren [Thu, 16 Aug 2007 23:43:43 +0000 (23:43 +0000)]
WebCore:

        Reviewed by Dave Hyatt.

        Tweaked the cache eviction model to better balance between live and
        dead resources.

        For the sake of avoiding evictions during the PLT, the old model
        required the sum of dead and live resources to grow to twice the cache
        capacity before evicting, and would then evict dead or live down to 0
        if necessary. This was a too-high high water mark, which would nullify
        much of the value of eviction, and a too-low low water mark, which
        would nullify much of the value of the LRU-SP strategy.

        This patch changes the model in 3 ways.

        1. The new model for dead resources is a flexible window with a fixed
        minimum and maximum. The dead resource window is big when live resource
        pressure is small, and vice versa. This has the immediate advantage of
        cutting the high water mark by up to 50%. It also enables the following
        tunable optimizations in future patches:
            a. A dead resource limit of 0 for clients who want that. (Just set
            the fixed maximum to 0.)
            b. A much higher low water mark. (Just set the fixed minimum to,
            say, 25% of the cache's capacity.)
            c. A much lower high water mark for users who browse simple pages
            in one tab. (Just set the fixed maximum to, say, 50% of the cache's
            capacity.)

        I plan to make the changes that actually take advantage of these
        tunable optimizations in another check-in.

        The new model won't hurt the PLT because it will notice the PLT's low
        live resource size, and up the dead resource capacity in response. For
        the same reason, the new model should establish a good balance in
        real-world use.

        2. Live resource eviction is now based on size(), not encodedSize().
        So, a page with lots of large, encoded images will start evicting
        resources, if necessary, even before all the images paint. This allows
        you to more accurately stipulate an exact high water mark.

        3. When pruning, prune to a small percentage below capacity, to avoid
        just having to prune again immediately.

        Layout tests pass. PLT shows no regression.

        * history/PageCache.cpp:
        (WebCore::PageCache::releaseAutoreleasedPagesNow): Updated for rename.

        * loader/Cache.cpp: Implemented the algorithm explained above.
        * loader/Cache.h: Removed explicit tracking of decoded data size, since
        it was unused.

        * loader/CachedResource.cpp: ditto on tracking of decoded data size

WebKit:

        Reviewed by Dave Hyatt.

        WebKit changes to support new cache eviction model in WebCore.

        * WebView/WebPreferences.m:
        (+[WebPreferences initialize]): Modified to reflect new API in WebCore.
        * WebView/WebView.mm:
        (+[WebView _initializeCacheSizesIfNecessary]): Slightly increased cache
        size on low memory systems to avoid affecting the PLT for now.

win:

        Reviewed by Dave Hyatt.

        WebKit changes to support new cache eviction model in WebCore.

        * WebPreferences.cpp:
        (WebPreferences::initialize):

        * WebView/WebPreferences.m: Modified to reflect new API in WebCore.
        * WebView.cpp:
        (WebView::initializeCacheSizesIfNecessary): Slightly increased cache
        size on low memory systems to avoid affecting the PLT for now.

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

13 years ago Removed a fixed test from the skip list. r25112 fixed this test.
aliceli1 [Thu, 16 Aug 2007 23:12:19 +0000 (23:12 +0000)]
    Removed a fixed test from the skip list.  r25112 fixed this test.

        * platform/mac-leopard/Skipped:

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

13 years ago Reviewed by Maciej.
aliceli1 [Thu, 16 Aug 2007 23:09:03 +0000 (23:09 +0000)]
    Reviewed by Maciej.

        Fix <rdar://problem/5360135> REGRESSION (Leopard only): editing/selection/5354455-1.html is causing subsequent tests to fail

        * DumpRenderTree/DumpRenderTree.m:
        (createWebView):
        Create a DumpRenderTreeWindow instead of a NSWindow, now that a DumpRenderTreeWindow no longer poses as a NSWindow.
        (dumpRenderTree):
        Don't pose as a NSWindow, since when the spelling panel gets created, it creates an NSWindow which ends up creating a DumpRenderTreeWindow.

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

13 years ago Reviewed by Hyatt.
bdakin [Thu, 16 Aug 2007 20:50:10 +0000 (20:50 +0000)]
    Reviewed by Hyatt.

        Changing this test to get it to pass again after http://
        trac.webkit.org/projects/webkit/changeset/25098

        The test is changing because our new behavior seems correct, though
        not completely consistent. http://bugs.webkit.org/show_bug.cgi?
        id=14979 is tracking the fact that the behavior is not consistent
        regarding style elements that are not in the document.

        * fast/css/css-selector-text.html:

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

13 years agoLayoutTests:
kmccullo [Thu, 16 Aug 2007 19:05:17 +0000 (19:05 +0000)]
LayoutTests:

        Reviewed by Adam.

        - Added tests for regressions in other components.  In this case we also need to add a skipped list for Tiger since this functionality didn't exist in 10.4.

        * fast/cookies: Added.
        * fast/cookies/local-file-can-set-cookies-expected.txt: Added.
        * fast/cookies/local-file-can-set-cookies.html: Added.
        * platform/mac-tiger: Added.
        * platform/mac-tiger/Skipped: Added.

WebKitTools:

        Reviewed by Adam.

        - Added tests for regressions in other components.  In this case we also need to add a skipped list for Tiger since this functionality didn't exist in 10.4.

        * Scripts/run-webkit-tests:

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

13 years ago Reviewed by Tim Hatcher.
darin [Thu, 16 Aug 2007 18:52:17 +0000 (18:52 +0000)]
    Reviewed by Tim Hatcher.

        - fix <rdar://problem/5415029> In Mail, a crash occurs at WebCore::Node::isDescendantOf()
          when attempting to delete a selection in a table

        The bug was caused by createMarkup trying to operate on a range that
        has an endpoint in the delete button DOM, because it removes that DOM
        during its operation! Still working on a regression test -- it's hard
        to make the kind of bad selection that's needed with the DOM, so I might
        have to use the eventSender.

        * editing/DeleteButtonController.h: Made some of the identifiers private.
        We can make them public if we need to use them. Added a getter function
        for the container element so we can figure out if a given node is inside
        the DOM added for the delete button.

        * editing/markup.cpp:
        (WebCore::moveEndpointsBeforeNode): Added. General purpose helper function
        that moves endpoints of a range to before a given node -- we do this before
        removing the delete button, so the endpoint is where the delete button was,
        rather than having an endpoint that's not in the document.
        (WebCore::createMarkup): Always return empty string, not null string.
        Get the document by calling ownerDocument on the range rather than getting
        the document of the commonAncestorContainer. That's because we need to
        get at the delete button before calling commonAncestorContainer. Call
        moveEndpointsBeforeNode to move the range endpoints out of the delete
        button interface before calling disable() which will remove it from the
        DOM if it's in there. Added an early return for the case where commonAncestor
        is non-0. If this happens, we would crash later because pastEndNode would
        not be in the tree. This change alone would prevent the crash, but we'd get
        bad markup, so we need the moveEndpointsBeforeNode fix. Added null checks
        for the frame to the range version as in the single-node version so this
        won't crash immediately on documents that are not in a frame. For the
        single-node version, added a check if a ndoe of 0 and a node inside the
        delete button user interface, and return the empty string for those cases.

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

13 years agoLayoutTests:
justing [Thu, 16 Aug 2007 18:51:39 +0000 (18:51 +0000)]
LayoutTests:

        Reviewed by Maciej.

        <rdar://problem/5378847>
        After creating and removing a ToDo, the caret disappears as soon as I start to type

        * editing/inserting/5378847-expected.txt: Added.
        * editing/inserting/5378847.html: Added.

WebCore:

        Reviewed by Maciej.

        <rdar://problem/5378847> After creating and removing a ToDo, the caret disappears as soon as I start to type

        * editing/InsertTextCommand.cpp:
        (WebCore::InsertTextCommand::input): A whitespace text node inserted by Mail
        when a ToDo is removed is completely removed by deleteInsignificantWhitespace,
        and since it contains the text insertion position, insertion fails.
        Save the position before the node where text insertion will occur,
        and if that node is removed, use the saved position for insertion.

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

13 years ago Reviewed by Adele.
darin [Thu, 16 Aug 2007 16:29:48 +0000 (16:29 +0000)]
    Reviewed by Adele.

        - fix <rdar://problem/5413488> REGRESSION: every DOM element is about 40
          bytes bigger because it has a Timer

        Moved the timer to the document from the element.

        * dom/Document.h: Made frame() inline. Added updateFocusApperanceSoon(),
        cancelFocusAppearanceUpdate(), m_updateFocusAppearanceTimer,
        clearXMLVersion(), and updateFocusAppearanceTimerFired(). Also made
        everything that was previously protected be private instead.
        * dom/Document.cpp:
        (WebCore::Document::Document): Initialize m_updateFocusAppearanceTimer.
        (WebCore::Document::updateFocusAppearanceSoon): Added. Starts timer.
        (WebCore::Document::cancelFocusAppearanceUpdate): Added. Stops timer.
        (WebCore::Document::updateFocusAppearanceTimerFired): Added. If the
        focused node is a focusable element, then calls
        updateFocusAppearance(false) on it.

        * dom/Element.h: Removed default value of the boolean parameter to
        updateFocusAppareance. Removed needsFocusAppearanceUpdate(),
        setNeedsFocusAppearanceUpdate(), updateFocusAppearanceTimerFired(),
        stopUpdateFocusAppearanceTimer(), m_updateFocusAppearanceTimer, and
        m_needsFocusAppearanceUpdate. Added
        updateFocusAppearanceSoonAfterAttach() and cancelFocusAppearanceUpdate().
        * dom/Element.cpp:
        (WebCore::ElementRareData::ElementRareData): Added initializer for
        m_needsFocusAppearanceUpdateSoonAfterAttach.
        (WebCore::Element::Element): Removed initializers for
        m_updateFocusAppearanceTimer and m_needsFocusAppearanceUpdate.
        (WebCore::Element::attach): Updated code that starts the focus
        appearance timer to instead call updateFocusAppearanceSoon() on the
        document.
        (WebCore::Element::detach): Replaced call to
        stopUpdateFocusAppearanceTimer with call to cancelFocusAppearanceUpdate.
        (WebCore::Element::focus): Added check for node that's already focused,
        to match the logic that's in the derived classes. This makes it safe for
        us to remove the override in the derived classes. Also replaced the code
        that called setNeedsFocusAppearanceUpdate(true) with code to set the
        rare data flag m_needsFocusAppearanceUpdateSoonAfterAttach and added a
        call to cancelFocusAppearanceUpdate() in the case where there's no focus
        appearance update.
        (WebCore::Element::blur): Replaced call to
        stopUpdateFocusAppearanceTimer with call to cancelFocusAppearanceUpdate.
        (WebCore::Element::cancelFocusAppearanceUpdate): Added. Sets
        m_needsFocusAppearanceUpdateSoonAfterAttach to false, and then calls
        cancelFocusAppearanceUpdate() on the document, but only if the element
        is the focused node of the document.

        * html/HTMLDocument.cpp:
        (WebCore::HTMLDocument::HTMLDocument): Replaced code that sets
        m_xmlVersion directly with a call to a new inline clearXMLVersion()
        function.
        (WebCore::HTMLDocument::setCookie): Replaced use of m_policyBaseURL with
        policyBaseURL().
        (WebCore::HTMLDocument::createTokenizer): Replaced uses of m_frame with
        frame().
        (WebCore::HTMLDocument::determineParseMode): Replaced code that sets
        pMode and hMode directly with calls to setParseMode and setHTMLMode.
        Replaced use of m_styleSelector with styleSelector().

        * html/HTMLInputElement.h: Removed now-unneed override of focus().
        Removed default value of the boolean parameter to updateFocusAppareance.
        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateFocusAppearance):
        Pass the restorePreviousSelection boolean through -- while it's ignored,
        it no longer has a default value.

        * html/HTMLTextAreaElement.h: Removed now-unneed override of focus().
        Removed default value of the boolean parameter to updateFocusAppareance.
        * html/HTMLTextAreaElement.cpp: Ditto.

        * WebCore.exp: Removed the Document::frame() symbol, since it's now inline.

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

13 years agoLayoutTests:
antti [Thu, 16 Aug 2007 16:13:28 +0000 (16:13 +0000)]
LayoutTests:

        Reviewed by Maciej.

        Test for <rdar://problem/5388936>
        Crash while setting display:none for a table cell with selection

        * fast/table/destroy-cell-with-selection-crash-expected.txt: Added.
        * fast/table/destroy-cell-with-selection-crash.html: Added.

WebCore:

        Reviewed by Maciej.

        Fix <rdar://problem/5388936>
        Crash while setting display:none for a table cell with selection

        Super class destroy() could (through some selection code in removeChild()) trigger section recalc
        in middle of RenderTableCell::destroy(), cleaning section dirty bit. This would later crash in
        layout since cell grid would still have refence to the dead cell.

        Ensure table sections are dirty when leaving destroy method.

        I can't figure out tests for row and section changes but they look like
        they could crash in similar way as cell.

        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::destroy):
        * rendering/RenderTableRow.cpp:
        (WebCore::RenderTableRow::destroy):
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::destroy):

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

13 years ago2007-08-15 Maciej Stachowiak <mjs@apple.com>
mjs [Thu, 16 Aug 2007 04:34:11 +0000 (04:34 +0000)]
2007-08-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5389696> leak of 32-byte NSData object (and more?) in WebIconDatabase code path with each refresh of http://www.apple.com

        * platform/graphics/BitmapImage.h: Use RetainPtr for m_nsImage and m_tiffRep
        * platform/graphics/mac/ImageMac.mm:
        (WebCore::BitmapImage::initPlatformData): No need to do anything now
        (WebCore::BitmapImage::invalidatePlatformData): Simplify
        (WebCore::BitmapImage::getTIFFRepresentation): Use RetainPtr to avoid leaks
        (WebCore::BitmapImage::getNSImage): Use RetainPtr to avoid leaks

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

13 years ago Reviewed by Geoff.
mjs [Thu, 16 Aug 2007 03:56:54 +0000 (03:56 +0000)]
    Reviewed by Geoff.

        <rdar://problem/5389696> leak of 32-byte NSData object (and more?) in WebIconDatabase code path with each refresh of http://www.apple.com

        * platform/graphics/BitmapImage.h: Use RetainPtr for m_nsImage and m_tiffRep
        * platform/graphics/mac/ImageMac.mm:
        (WebCore::BitmapImage::initPlatformData): No need to do anything now
        (WebCore::BitmapImage::invalidatePlatformData): Simplify
        (WebCore::BitmapImage::getTIFFRepresentation): Use RetainPtr to avoid leaks
        (WebCore::BitmapImage::getNSImage): Use RetainPtr to avoid leaks

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

13 years ago Reviewed by Anders.
darin [Thu, 16 Aug 2007 03:10:00 +0000 (03:10 +0000)]
    Reviewed by Anders.

        - fix <rdar://problem/5094895> REGRESSION (r19094): JavaScript timers don't
          work inside showModalDialog; caret also doesn't blink

        * platform/Timer.h: Added fireTimersInNestedEventLoop.
        * platform/Timer.cpp:
        (WebCore::TimerBase::fireTimers): Added code to exit if the timersReadyToFire
        is cleared. This indicates that someone fired the timers in the nested event
        loop, so we should not fire any more timers ourselves.
        (WebCore::TimerBase::fireTimersInNestedEventLoop): Added. Sets timersReadyToFire
        to 0 so we won't return early and do nothing if the shared timer first. Then
        calls updateSharedTimer() so the shared timer will get scheduled as needed based
        on any pending timers.

        * page/Chrome.cpp: (WebCore::Chrome::runModal): Call
        fireTimersInNestedEventLoop before calling runModal on the client.

        * manual-tests/modal-dialog.html: Added a test that uses a timeout.
        * manual-tests/show-modal-dialog-test.html: Fixed a typo.

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

13 years ago Reviewed by Darin.
thatcher [Wed, 15 Aug 2007 23:27:50 +0000 (23:27 +0000)]
    Reviewed by Darin.

        <rdar://problem/5410937> HIWebView in SimpleCarbonWeb doesn't seem to be getting adequate invalidation when window is resized

        HIWebViewCreate now just returns a HIViewRef created with HICocoaViewCreate. This eliminates lots of old code and
        makes HIWebView a better citizen starting with Leopard. The old code paths are still needed for Tiger, so now
        most of the files in the WebKit/Carbon directory are #ifdef BUILDING_ON_TIGER.

        The Tiger code is unchanged and dosen't exhibit the invalidation problem when the window resizes.

        * Carbon/CarbonUtils.m:
        (WebInitForCarbon): #ifdef BUILDING_ON_TIGER portions of this code that is not needed on Leopard.
        * Carbon/CarbonWindowAdapter.h: #ifdef BUILDING_ON_TIGER
        * Carbon/CarbonWindowAdapter.m: Ditto.
        * Carbon/CarbonWindowContentView.h: Ditto.
        * Carbon/CarbonWindowContentView.m: Ditto.
        * Carbon/CarbonWindowFrame.h: Ditto.
        * Carbon/CarbonWindowFrame.m: Ditto.
        * Carbon/HIViewAdapter.h: Ditto.
        * Carbon/HIViewAdapter.m: Ditto.
        * Carbon/HIWebView.h: Consolidate two #ifdef __OBJC__ blocks into one.
        * Carbon/HIWebView.m: Implement Leopard specific HIWebViewCreate, HIWebViewCreateWithClass and HIWebViewGetWebView.
        (HIWebViewCreate): Call HIWebViewCreateWithClass passing [WebView class].
        (HIWebViewCreateWithClass): Call HICocoaViewCreate with an instance of the class passed in.
        (HIWebViewGetWebView): Call HICocoaViewGetView.

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

13 years agoLayoutTests:
justing [Wed, 15 Aug 2007 21:29:27 +0000 (21:29 +0000)]
LayoutTests:

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14971
        REGRESSION: cannot select reporter's e-mail in bugzilla

        * editing/selection/14971-expected.checksum: Added.
        * editing/selection/14971-expected.png: Added.
        * editing/selection/14971-expected.txt: Added.
        * editing/selection/14971.html: Added.

WebCore:

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14971
        REGRESSION: cannot select reporter's e-mail in bugzilla

        * page/EventHandler.cpp:
        (WebCore::EventHandler::canMouseDragExtendSelect): Allow drag-selecting inside
        a -webkit-user-select:ignore region.

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

13 years agoClear a stray executable bit.
darin [Wed, 15 Aug 2007 20:47:10 +0000 (20:47 +0000)]
Clear a stray executable bit.

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

13 years ago Test for new support of empty style sheets.
bdakin [Wed, 15 Aug 2007 20:10:11 +0000 (20:10 +0000)]
    Test for new support of empty style sheets.

        * fast/css/emptyStyleTag-expected.txt: Added.
        * fast/css/emptyStyleTag.html: Added.

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

13 years ago Reviewed by Hyatt.
bdakin [Wed, 15 Aug 2007 20:04:22 +0000 (20:04 +0000)]
    Reviewed by Hyatt.

        Rolling back in. I made a silly mistake in XMLTokenizer that caused
        this patch to crash SVG tests. It's fixed now!

        Refactor of change for <rdar://problem/5404899> REGRESSION: Mail
        crash in WebCore::FontFallbackList::fontDataAt() after dragging
        image into text multiple times

        The original fix that I made last night prevents the pending style
        sheet count from being incremented until the element is in the
        document. This fix prevents the style sheet from loading at all
        until it is in the document.

        Here is the fix.
        * dom/StyleElement.cpp:
        (WebCore::StyleElement::insertedIntoDocument): Call process.
        (WebCore::StyleElement::removedFromDocument): This can be reverted
        to its original state before my patch last night.
        (WebCore::StyleElement::process): childrenChanged is now called
        process. Return early if your not in the document.
        (WebCore::StyleElement::createSheet): Revert change from last
        night. The inDocument check is now in caller childrenChanged.
        * dom/StyleElement.h: insertedIntoDocument() must now accept an
        element in addition to a document.

        This is an optimization to prevent calling updateStyleSelector()
        too frequently.
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::startElementNs):
        * html/HTMLStyleElement.cpp:
        (WebCore::HTMLStyleElement::HTMLStyleElement):
        (WebCore::HTMLStyleElement::finishedParsing):
        (WebCore::HTMLStyleElement::insertedIntoDocument):
        (WebCore::HTMLStyleElement::childrenChanged):
        (WebCore::HTMLStyleElement::sheetLoaded):
        * html/HTMLStyleElement.h:
        * ksvg2/svg/SVGStyleElement.cpp:
        (WebCore::SVGStyleElement::SVGStyleElement):
        (WebCore::SVGStyleElement::finishedParsing):
        (WebCore::SVGStyleElement::insertedIntoDocument):
        (WebCore::SVGStyleElement::childrenChanged):
        (WebCore::SVGStyleElement::sheetLoaded):
        * ksvg2/svg/SVGStyleElement.h:
        (WebCore::SVGStyleElement::setCreatedByParser):

        This is a name change. Document::stylesheetLoaded()
        is now Document::removePendingSheet()
        * dom/Document.cpp:
        (WebCore::Document::removePendingSheet):
        * dom/Document.h:
        * dom/ProcessingInstruction.cpp:
        (WebCore::ProcessingInstruction::sheetLoaded):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::~HTMLLinkElement):
        (WebCore::HTMLLinkElement::setDisabledState):
        (WebCore::HTMLLinkElement::process):
        (WebCore::HTMLLinkElement::sheetLoaded):
        * page/Frame.cpp:
        (WebCore::UserStyleSheetLoader::~UserStyleSheetLoader):
        (WebCore::UserStyleSheetLoader::setCSSStyleSheet):

        This is another name change. closeRenderer() is now
        finishedParsing()
        * dom/Node.h:
        (WebCore::Node::finishedParsing):
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::endElementNs):
        (WebCore::):
        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::finishedParsing):
        * html/HTMLAppletElement.h:
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLFormControlElementWithState::finishedParsing):
        * html/HTMLGenericFormElement.h:
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::finishedParsing):
        * html/HTMLObjectElement.h:
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::insertNode):
        (WebCore::HTMLParser::popOneBlockCommon):
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::finishedParsing):
        * html/HTMLScriptElement.h:
        (WebCore::HTMLStyleElement::setCreatedByParser):
        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::finishedParsing):
        * ksvg2/svg/SVGAnimationElement.h:
        * ksvg2/svg/SVGElement.cpp:
        (WebCore::SVGElement::finishedParsing):
        * ksvg2/svg/SVGElement.h:

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

13 years ago Look for the new Xcode 3 preference key (PBXApplicationwideBuildSettings...
thatcher [Wed, 15 Aug 2007 18:45:22 +0000 (18:45 +0000)]
    Look for the new Xcode 3 preference key (PBXApplicationwideBuildSettings) for the global build locations.
        The value of PBXApplicationwideBuildSettings is a dictionary, so we have to pull the SYMROOT out of it.

        Also pass xcodebuild OBJROOT with the same value as SYMROOT if we fallback to the default WebKitBuild,
        this prevents making "build" directories in each project folder.

        * Scripts/webkitdirs.pm:

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

13 years agoAdd trailing newlines.
darin [Wed, 15 Aug 2007 18:41:32 +0000 (18:41 +0000)]
Add trailing newlines.

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

13 years agoAdd a copy of the ICU license to the copy of ICU headers that's there for
darin [Wed, 15 Aug 2007 18:37:33 +0000 (18:37 +0000)]
Add a copy of the ICU license to the copy of ICU headers that's there for
building on Mac OS X 10.4, for clarity. We might want to move these icu
directories inside a "mac/tiger" subdirectory at some point to make sure
people don't get confused about why these are here.

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

13 years ago Reviewed by Antti Koivisto.
harrison [Wed, 15 Aug 2007 15:06:04 +0000 (15:06 +0000)]
    Reviewed by Antti Koivisto.

        <rdar://problem/5411803> Bumpercar crashes when loading a partial URL (FrameLoader::receivedMainResourceError())

        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::receivedError):
        Nil check for the FrameLoader.

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

13 years agoRoll out r25082 and the associated tests in r25083 as it introduced crashes in the...
bdash [Wed, 15 Aug 2007 07:48:22 +0000 (07:48 +0000)]
Roll out r25082 and the associated tests in r25083 as it introduced crashes in the SVG layout tests.

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

13 years ago Reviewed by Adam.
kmccullo [Wed, 15 Aug 2007 02:50:10 +0000 (02:50 +0000)]
    Reviewed by Adam.

        - Updated Skipped list to reflect recent fixes.

        * platform/win/Skipped:

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

13 years ago <rdar://problem/5411482> Windows user agent language always returns "en"
sfalken [Wed, 15 Aug 2007 02:04:53 +0000 (02:04 +0000)]
    <rdar://problem/5411482> Windows user agent language always returns "en"

        Reviewed by Oliver.

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

13 years agoLayoutTests:
weinig [Wed, 15 Aug 2007 01:23:51 +0000 (01:23 +0000)]
LayoutTests:

        Reviewed by Geoff and Oliver.

        Add test for <rdar://problem/5267870>
        Mangleme: Reproducible assertion failure in -[WebCoreFrameBridge installInFrame:]

        * http/tests/misc/embedCrasher-expected.txt: Added.
        * http/tests/misc/embedCrasher.html: Added.

WebCore:

        Reviewed by Geoff and Oliver.

        Fix for <rdar://problem/5267870>
        Mangleme: Reproducible assertion failure in -[WebCoreFrameBridge installInFrame:]

        - Change embed/plugin code path to detach the frame on willRemove instead of detach.
          This matches what frame and iframe do.

        Test: http/tests/misc/embedCrasher.html

        * html/HTMLPlugInElement.cpp:
        (WebCore::HTMLPlugInElement::willRemove):
        * html/HTMLPlugInElement.h:

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

13 years agoLayoutTests:
adele [Wed, 15 Aug 2007 01:17:35 +0000 (01:17 +0000)]
LayoutTests:

        Reviewed by Maciej.

        Test for <rdar://problem/5370059> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)

        * editing/selection/user-select-text-inside-user-select-ignore-expected.txt: Added.
        * editing/selection/user-select-text-inside-user-select-ignore.html: Added.
        * fast/css/computed-style-expected.txt: Updated now that we've eliminated the auto value.
        * fast/css/computed-style-without-renderer-expected.txt: ditto.

WebCore:

        Reviewed by Maciej.

        Fix for <rdar://problem/5370059> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)

        This change makes -webkit-user-select an inherited css property.  For "user-select: none" we were already
        acting like it was an inheritable property, where we let user-select:text on the children override its parent's user-select:none.
        By making user-select really inherited (instead of inherited for some values), we eliminate the need for crawling up the tree to see
        if an ancestor has user-select ignore set.

        * page/EventHandler.cpp: (WebCore::EventHandler::canMouseDownStartSelect):
          Now that user-select is inherited, you don't need to walk up the render tree looking for ancestors with user-select:ignore set.

        * css/CSSStyleSelector.cpp: Eliminate SELECT_AUTO.
        (WebCore::CSSStyleSelector::adjustRenderStyle):
        (WebCore::CSSStyleSelector::applyProperty):
        * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

        * rendering/RenderStyle.h:
        (WebCore::): Eliminate SELECT_AUTO.  Make userSelect inherited.
        (WebCore::RenderStyle::userSelect):
        (WebCore::RenderStyle::setUserSelect):
        (WebCore::RenderStyle::initialUserSelect):
        * rendering/RenderStyle.cpp:
        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
        (WebCore::StyleRareNonInheritedData::operator==):
        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
        (WebCore::StyleRareInheritedData::operator==):
        (WebCore::RenderStyle::diff):

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

13 years agoJavaScriptCore:
andrew [Wed, 15 Aug 2007 01:07:06 +0000 (01:07 +0000)]
JavaScriptCore:

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit
        conversions of wtf::Vector<T> to T* by explicitly calling .data()

        * API/JSCallbackConstructor.cpp:
        (KJS::JSCallbackConstructor::construct):
        * API/JSCallbackFunction.cpp:
        (KJS::JSCallbackFunction::callAsFunction):
        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::construct):
        (KJS::JSCallbackObject::callAsFunction):
        * bindings/c/c_instance.cpp:
        (KJS::Bindings::CInstance::invokeMethod):
        (KJS::Bindings::CInstance::invokeDefaultMethod):
        * kjs/number_object.cpp:
        (integer_part_noexp):
        (char_sequence):
        * kjs/ustring.cpp:
        (KJS::UString::UTF8String):

WebCore:

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit
        conversions of wtf::Vector<T> to T* by explicitly calling .data()

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::saveState):
        * platform/KURL.cpp:
        (WebCore::KURL::KURL):
        (WebCore::KURL::init):
        (WebCore::KURL::decode_string):
        (WebCore::KURL::parse):
        (WebCore::KURL::encode_string):
        * platform/cf/KURLCFNet.cpp:
        (WebCore::KURL::KURL):
        * platform/mac/KURLMac.mm:
        (WebCore::KURL::KURL):
        * rendering/RenderFrameSet.cpp:
        (WebCore::RenderFrameSet::layOutAxis):

win:

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit
        conversions of wtf::Vector<T> to T* by explicitly calling .data()

        * WebView.cpp:
        (getCompositionString):

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

13 years ago Reviewed by Darin, Hyatt.
darin [Wed, 15 Aug 2007 00:23:03 +0000 (00:23 +0000)]
    Reviewed by Darin, Hyatt.

        - fix <rdar://problem/5407795> -apple-line-clamp should never display less than one line

        * rendering/RenderFlexibleBox.cpp:(WebCore::RenderFlexibleBox::layoutVerticalBox): Use
        max to make sure it never computes a minimum of less than one line.

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

13 years ago Test for new support of empty style sheets.
bdakin [Tue, 14 Aug 2007 23:46:36 +0000 (23:46 +0000)]
    Test for new support of empty style sheets.

        * fast/css/emptyStyleTag-expected.txt: Added.
        * fast/css/emptyStyleTag.html: Added.

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

13 years ago Reviewed by Hyatt.
bdakin [Tue, 14 Aug 2007 23:30:41 +0000 (23:30 +0000)]
    Reviewed by Hyatt.

        Refactor of change for <rdar://problem/5404899> REGRESSION: Mail
        crash in WebCore::FontFallbackList::fontDataAt() after dragging
        image into text multiple times

        The original fix that I made last night prevents the pending style
        sheet count from being incremented until the element is in the
        document. This fix prevents the style sheet from loading at all
        until it is in the document.

        Here is the fix.
        * dom/StyleElement.cpp:
        (WebCore::StyleElement::insertedIntoDocument): Call process.
        (WebCore::StyleElement::removedFromDocument): This can be reverted
        to its original state before my patch last night.
        (WebCore::StyleElement::process): childrenChanged is now called
        process. Return early if your not in the document.
        (WebCore::StyleElement::createSheet): Revert change from last
        night. The inDocument check is now in caller childrenChanged.
        * dom/StyleElement.h: insertedIntoDocument() must now accept an
        element in addition to a document.

        This is an optimization to prevent calling updateStyleSelector()
        too frequently.
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::startElementNs):
        * html/HTMLStyleElement.cpp:
        (WebCore::HTMLStyleElement::HTMLStyleElement):
        (WebCore::HTMLStyleElement::finishedParsing):
        (WebCore::HTMLStyleElement::insertedIntoDocument):
        (WebCore::HTMLStyleElement::childrenChanged):
        (WebCore::HTMLStyleElement::sheetLoaded):
        * html/HTMLStyleElement.h:
        * ksvg2/svg/SVGStyleElement.cpp:
        (WebCore::SVGStyleElement::SVGStyleElement):
        (WebCore::SVGStyleElement::finishedParsing):
        (WebCore::SVGStyleElement::insertedIntoDocument):
        (WebCore::SVGStyleElement::childrenChanged):
        (WebCore::SVGStyleElement::sheetLoaded):
        * ksvg2/svg/SVGStyleElement.h:
        (WebCore::SVGStyleElement::setCreatedByParser):

        This is a name change. Document::stylesheetLoaded()
        is now Document::removePendingSheet()
        * dom/Document.cpp:
        (WebCore::Document::removePendingSheet):
        * dom/Document.h:
        * dom/ProcessingInstruction.cpp:
        (WebCore::ProcessingInstruction::sheetLoaded):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::~HTMLLinkElement):
        (WebCore::HTMLLinkElement::setDisabledState):
        (WebCore::HTMLLinkElement::process):
        (WebCore::HTMLLinkElement::sheetLoaded):
        * page/Frame.cpp:
        (WebCore::UserStyleSheetLoader::~UserStyleSheetLoader):
        (WebCore::UserStyleSheetLoader::setCSSStyleSheet):

        This is another name change. closeRenderer() is now
        finishedParsing()
        * dom/Node.h:
        (WebCore::Node::finishedParsing):
        * dom/XMLTokenizer.cpp:
        (WebCore::XMLTokenizer::endElementNs):
        (WebCore::):
        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::finishedParsing):
        * html/HTMLAppletElement.h:
        * html/HTMLGenericFormElement.cpp:
        (WebCore::HTMLFormControlElementWithState::finishedParsing):
        * html/HTMLGenericFormElement.h:
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::finishedParsing):
        * html/HTMLObjectElement.h:
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::insertNode):
        (WebCore::HTMLParser::popOneBlockCommon):
        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::finishedParsing):
        * html/HTMLScriptElement.h:
        (WebCore::HTMLStyleElement::setCreatedByParser):
        * ksvg2/svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::finishedParsing):
        * ksvg2/svg/SVGAnimationElement.h:
        * ksvg2/svg/SVGElement.cpp:
        (WebCore::SVGElement::finishedParsing):
        * ksvg2/svg/SVGElement.h:

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

13 years agoWebCore:
beidson [Tue, 14 Aug 2007 23:08:51 +0000 (23:08 +0000)]
WebCore:

        Reviewed by Darin, John, Maciej, Oliver, and Tim

        <rdar://problem/5394708> - Crash on launch with corrupt icon database

        The main part of the fix is to not disable SQLite's default level of protection - to leave the sync options at their normal,
        mostly safe levels.

        But in case lightning strikes at the exact right moment and someone ends up with a corrupt database, add some support code to
        detect that condition and recover from it.

        This is mainly accomplished by exposing the "PRAGMA integrity_check;" facilities of sqlite through IconDatabase SPI as well as
        running that integrity check if a journal file is detected at launch (a strong indication that the last quit was not clean).
        There's also a method exposed to allow clients to tell the icon database "I suspect something bad happened, please check integrity"

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::checkIntegrityBeforeOpening): Allow clients to suggest an integrity check
        (WebCore::IconDatabase::open): Add a check to see if the journal file for the database exists.  If it does, run the integrity
          check.  Also run the check if a client has suggested it to be necessary.
          If the integrity-check fails, we sadly have to destroy the database and recreate from scratch.
          Also - quite importantly - do not adjust the default sync preferences for the SQLDatabase.  They were an optimization that
          might have been valid at one time but no longer affects any benchmarks we care about.
        (WebCore::IconDatabase::checkIntegrity): Perform the SQLite integrity_check pragma
        * loader/icon/IconDatabase.h:

        * loader/icon/IconDatabaseNone.cpp:
        (WebCore::IconDatabase::checkIntegrity): Keep IconDatabaseNone users building
        (WebCore::IconDatabase::checkIntegrityBeforeOpening): Ditto

        * loader/icon/SQLDatabase.cpp:
        (WebCore::SQLDatabase::open): Make a copy of the path string so we don't accidentally mutate anyone else's string on ::close()

        * platform/FileSystem.h: Added. Begin a long-needed platform file system abstraction
        * platform/mac/FileSystemMac.mm: Added.
        (WebCore::fileExists): Check if a file exists
        (WebCore::deleteFile): Delete a file

        * platform/gdk/TemporaryLinkStubs.cpp:
        (WebCore::fileExists):
        (WebCore::deleteFile):
        * platform/qt/TemporaryLinkStubs.cpp:
        (WebCore::fileExists):
        (WebCore::deleteFile):
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::fileExists):
        (WebCore::deleteFile):

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

WebKit:

        Reviewed by Darin, John, Maciej, Oliver, and Tim

        <rdar://problem/5394708> - Crash on launch with corrupt icon database

        Expose some new SPI to help recover from this case should it happen again

        * Misc/WebIconDatabase.mm:
        (-[WebIconDatabase init]): Use the new _databaseDirectory to determine where to open the database on disk
        (+[WebIconDatabase _checkIntegrityBeforeOpening]): Tell the icon database to check integrity when it opens
        (-[WebIconDatabase _databaseDirectory]): Moved the database-directory-determining logic here as it's now used in two places
        * Misc/WebIconDatabasePrivate.h: Added _checkIntegrityBeforeOpening SPI for clients to give hints about when the
          integrity check should run

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

13 years ago2007-08-14 Jon Honeycutt <jhoneycutt@apple.com>
honeycutt [Tue, 14 Aug 2007 23:00:52 +0000 (23:00 +0000)]
2007-08-14  Jon Honeycutt  <jhoneycutt@apple.com>

        Reviewed by Steve.

        Build fix for Windows.

        * html/HTMLFormElement.cpp:

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

13 years agoOne-line obvious fix for context menus: don't connect the signal once for each
staikos [Tue, 14 Aug 2007 22:37:57 +0000 (22:37 +0000)]
One-line obvious fix for context menus: don't connect the signal once for each
action, only once for the menu.

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

13 years ago Reviewed by Sam.
darin [Tue, 14 Aug 2007 22:19:04 +0000 (22:19 +0000)]
    Reviewed by Sam.

        - fix <rdar://problem/5410570> Global initializer introduced by use of std::numeric_limits in r24919

        * kjs/ustring.cpp:
        (KJS::overflowIndicator): Turned into a function.
        (KJS::maxUChars): Ditto.
        (KJS::allocChars): Use the functions.
        (KJS::reallocChars): Ditto.
        (KJS::UString::expandedSize): Ditto.

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

13 years ago Reviewed by Kevin Mccullough.
ggaren [Tue, 14 Aug 2007 22:10:09 +0000 (22:10 +0000)]
    Reviewed by Kevin Mccullough.

        Removed special case that didn't belong. (It would allow a global
        initializer to sneak into production builds, which would cause a
        system-wide performance regression on Mac OS X.)

        * Scripts/check-for-global-initializers:

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

13 years agoLayoutTests:
justing [Tue, 14 Aug 2007 22:05:53 +0000 (22:05 +0000)]
LayoutTests:

        Reviewed by Tim.

        <rdar://problem/5408255> REGRESSION: In Mail, clicking the containing element's UI closebox doesn't delete element

        * editing/deleting/5408255.html: Added.
        * editing/deleting/5408255-expected.checksum: Added.
        * editing/deleting/5408255-expected.png: Added.
        * editing/deleting/5408255-expected.txt: Added.

WebCore:

        Reviewed by Tim.

        <rdar://problem/5408255> REGRESSION: In Mail, clicking the containing element's UI closebox doesn't delete element

        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::show): Use -webkit-user-select:ignore for
        the deletion UI.

WebKitTools:

        Reviewed by Tim.

        <rdar://problem/5408255> REGRESSION: In Mail, clicking the containing element's UI closebox doesn't delete element

        * DumpRenderTree/EditingDelegate.m:
        (-[EditingDelegate webView:shouldShowDeleteInterfaceForElement:]): Added, return YES
        only for elements with the class needsDeletionUI.

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

13 years ago Store user defaults in a non-mutable CFDictionaryRef
aroben [Tue, 14 Aug 2007 21:24:38 +0000 (21:24 +0000)]
    Store user defaults in a non-mutable CFDictionaryRef

        Also renamed WebPreferences' static members:
            m_standardPreferences -> s_standardPreferences
            m_standardUserDefaults -> s_defaultSettings

        Reviewed by Darin and John.

        * WebPreferences.cpp:
        (WebPreferences::getInstanceForIdentifier):
        (WebPreferences::initializeUserDefaults): Construct the dictionary as a
        local CFMutableDictionaryRef, then assign it to the non-mutable static
        member.
        (WebPreferences::valueForKey):
        (WebPreferences::removeDefaultsIfNeeded):
        (WebPreferences::standardPreferences):
        * WebPreferences.h:

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

13 years ago Fix <rdar://problem/5214504> No way to change WebPreferences defaults (all...
aroben [Tue, 14 Aug 2007 21:24:28 +0000 (21:24 +0000)]
    Fix <rdar://problem/5214504> No way to change WebPreferences defaults (all preferences get written to disk)

        We now only write to disk values that have been explicitly set, and
        never write any default values.

        This is not enough, however, as anyone who has used WebKit prior to
        this change will have the default values sitting in their preferences
        plist on disk. To remedy this, we perform a one-time removal of any
        key-value pairs that match a pair in the defaults dictionary.

        Reviewed by Steve, John, Ada, and Darin.

        * WebPreferenceKeysPrivate.h: Added new key to ensure we only remove
        the defaults once.
        * WebPreferences.cpp:
        (WebPreferences::initializeDefaultSettings): Renamed from initialize, and
        made sure we only set up the defaults dictionary once. Now that the
        defaults dictionary is never modified after creation, we don't need to
        check whether the keys are already present.
        (WebPreferences::setStringValue): Don't modify the defaults dictionary.
        (WebPreferences::setIntegerValue): Ditto.
        (WebPreferences::setBoolValue): Ditto.
        (WebPreferences::save): Write out the user's preferences, not the defaults.
        (WebPreferences::load):
           - Removed gotos and early declarations now that we're using
             RetainPtr everywhere.
           - Initialize m_privatePrefs with an empty dictionary if we didn't
             read in a plist.
           - Call migrateDefaultSettingsFromSafari3Beta after loading.
        (WebPreferences::migrateDefaultSettingsFromSafari3Beta): Added.
        (WebPreferences::removeValuesMatchingDefaultSettings): Added.
        (WebPreferences::initWithIdentifier): Don't initialize m_privatePrefs
        -- load() does this now.
        * WebPreferences.h: Updated/added declarations.

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

13 years ago Use RetainPtr to store WebPreferences::m_privatePrefs
aroben [Tue, 14 Aug 2007 21:24:18 +0000 (21:24 +0000)]
    Use RetainPtr to store WebPreferences::m_privatePrefs

        Reviewed by Darin.

        * WebPreferences.cpp:
        (WebPreferences::setStringValue):
        (WebPreferences::setIntegerValue):
        (WebPreferences::setBoolValue):
        (WebPreferences::initWithIdentifier):
        * WebPreferences.h:

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

13 years ago Reviewed by Brady.
adele [Tue, 14 Aug 2007 20:20:06 +0000 (20:20 +0000)]
    Reviewed by Brady.

        Test for http://bugs.webkit.org/show_bug.cgi?id=14746
        <rdar://problem/5401041> REGRESSION: Form state not saved for forms that submit via HTTPS even if they do not contain a password field

        * http/tests/navigation/resources/restore-form-state-https-1.html: Added.
        * http/tests/navigation/restore-form-state-https-expected.txt: Added.
        * http/tests/navigation/restore-form-state-https.html: Added.

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

13 years agoLayoutTests:
antti [Tue, 14 Aug 2007 19:18:58 +0000 (19:18 +0000)]
LayoutTests:

        Reviewed by Darin.

        Add test for <rdar://problem/5143183>
        Air Mail postmark shows up wrong in Firefox due to use of CSS background-position-x/y

        Also update a few tests to expect background-position instead of background-position-x/y

        * fast/css/background-position-serialize-expected.txt: Added.
        * fast/css/background-position-serialize.html: Added.
        * fast/css/computed-style-expected.txt:
        * fast/css/computed-style-without-renderer-expected.txt:
        * fast/css/remove-shorthand-expected.txt:

WebCore:

        Reviewed by Darin.

        Fix <rdar://problem/5143183>
        Air Mail postmark shows up wrong in Firefox due to use of CSS background-position-x/y

        Safari was using non-standard background-position-x/y properties when serializing style, both normal
        and computed. As a result Safari generated CSS would not render correctly in Firefox.

        Use standard background-position property instead.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::):
        * css/CSSMutableStyleDeclaration.cpp:
        (WebCore::CSSMutableStyleDeclaration::cssText):

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

13 years agoWebKitTools:
ddkilzer [Tue, 14 Aug 2007 18:07:27 +0000 (18:07 +0000)]
WebKitTools:

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14965
          svn-create-patch uses deprecated tail switch

        * Scripts/svn-create-patch: Use 'tail -n +3' instead of 'tail +3'.

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

13 years ago Reviewed by Brady and Dr. Harrison.
weinig [Tue, 14 Aug 2007 17:36:21 +0000 (17:36 +0000)]
    Reviewed by Brady and Dr. Harrison.

        Fix typo.  'whitespace' property is spelled 'white-space'.

        * page/inspector/inspector.css:

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

13 years ago Reviewed by Maciej.
bdakin [Tue, 14 Aug 2007 05:41:01 +0000 (05:41 +0000)]
    Reviewed by Maciej.

        Fix for <rdar://problem/5404899> REGRESSION: Mail crash in
        WebCore::FontFallbackList::fontDataAt() after dragging image into
        text multiple times

        We were crashing because style information was not up-to-date. This
        patch fixes the problem in two ways:

        Style information was not up to date at the time of the crash
        because the document thought there was still a pending style sheet.
        The pending style sheet counter was incremented when a call to
        cloneNode from Mail cloned a style node with an imported style
        sheet. Because Mail disables the cache, the style sheet did not
        load immediately for the cloned node, and we do not check again to
        see if it has loaded in time to decrement the pending style sheet
        counter before the crash point. The fix here is only to increment
        the pending style sheet counter for elements that are already in
        the document.
        * dom/StyleElement.cpp:
        (WebCore::StyleElement::insertedIntoDocument): If we have a CSS
        style sheet that is currently loading, increment the pending style
        sheet counter. This should keep the counter accurate in the case
        where a style node is cloned and then immediately inserted into the
        document.
        (WebCore::StyleElement::removedFromDocument): If we have a CSS
        style sheet that is currently loading, decrement the pending style
        sheet count. This is required to keep the correct balance, given
        the change above.
        (WebCore::StyleElement::createSheet): Only addPendingSheet() and
        checkLoaded() if we are in the document.

        Here is Darin's original fix. It seems worth keeping this fix too.
        Font style information should not cause a crash if there are still
        pending style sheets. This is good belt-and-suspenders in case
        there is another way to run into this bug with a wacky timing
        issue.
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::styleForElement): Update the font.

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

13 years ago Reviewed by Darin.
ap [Tue, 14 Aug 2007 05:39:28 +0000 (05:39 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14635
        rdar://problem/5340188
        Uploading file with non-ASCII character in path fails

        File upload cannot be tested in DumpRenderTree.

        * html/HTMLFormElement.cpp:
        (WebCore::pathGetFilename): A cross-platform helper that extracts a file name from a path.
        (WebCore::HTMLFormElement::formData): Use the above helper instead of code that doesn't
        work on Windows.

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

13 years ago http://bugs.webkit.org/show_bug.cgi?id=14951
ap [Tue, 14 Aug 2007 05:24:05 +0000 (05:24 +0000)]
    bugs.webkit.org/show_bug.cgi?id=14951
        REGRESSION: page interpreted as UTF-8 because of stray <?xml> after <head>

        Test: fast/encoding/misplaced-xml-declaration.html

        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::checkForHeadCharset): Only honor XML declaration
        at the very beginning of the file.

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

13 years ago rs=sam
oliver [Tue, 14 Aug 2007 02:04:39 +0000 (02:04 +0000)]
    rs=sam

        Correct accidentally modified code.

        * platform/mac/FontDataMac.mm:
        (WebCore::FontData::platformInit):

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

13 years ago Reviewed by Brady.
adele [Tue, 14 Aug 2007 01:52:01 +0000 (01:52 +0000)]
    Reviewed by Brady.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14746
        <rdar://problem/5401041> REGRESSION: Form state not saved for forms that submit via HTTPS even if they do not contain a password field

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): Restore our old behavior that will save form state for secure forms.
          This will also match Firefox behavior.

        * dom/Document.cpp: Removed secureFormAdded(), secureFormRemoved(), hasSecureForm() which are no longer used.
        * dom/Document.h:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::attach):
        (WebCore::HTMLFormElement::parseMappedAttribute):

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

13 years ago Reviewed by Maciej.
oliver [Tue, 14 Aug 2007 01:44:16 +0000 (01:44 +0000)]
    Reviewed by Maciej.

        <rdar://problem/5386183> REGRESSION (9A504-9A508): Underline of inline hole is too thin
        on Japanese DotMac page

        Hack the line metrics for the Hiragino font families so that they always allow space for
        the marked text underline.

        * platform/mac/FontDataMac.mm:
        (WebCore::FontData::platformInit):

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

13 years ago Reviewed by Kevin McCullough.
weinig [Tue, 14 Aug 2007 00:19:23 +0000 (00:19 +0000)]
    Reviewed by Kevin McCullough.

        Another attempt at getting these to pass reliably.

        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foriegn-domain-subframe-location-change.html:
        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foriegn-domain-subframe.html:

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

13 years ago Reviewed by aroben
hyatt [Tue, 14 Aug 2007 00:13:06 +0000 (00:13 +0000)]
    Reviewed by aroben

        <rdar://problem/5400446> messed up content on calendar.yahoo.com and my.yahoo.com

        Fix some more bad assumptions about <html> being the first child of the document now that we
        properly support HTML5's model (where a comment node preceding <html> will in fact be its sibling).

        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleError):
        (WebCore::HTMLParser::createHead):

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

13 years ago Reviewed by Geoff.
weinig [Mon, 13 Aug 2007 22:41:37 +0000 (22:41 +0000)]
    Reviewed by Geoff.

        Ensure that these tests don't fail intermittently.

        * http/tests/security/dataURL/resources/foreign-domain-data-url-accessor-opened-frame.html:
        * http/tests/security/dataURL/xss-DENIED-from-data-url-in-foriegn-domain-window-open-expected.txt:
        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foriegn-domain-subframe-location-change.html:
        * http/tests/security/dataURL/xss-DENIED-to-data-url-in-foriegn-domain-subframe.html:

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

13 years agoBump version for submit
sfalken [Mon, 13 Aug 2007 21:24:08 +0000 (21:24 +0000)]
Bump version for submit

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

13 years agoLayoutTests:
justing [Mon, 13 Aug 2007 19:14:49 +0000 (19:14 +0000)]
LayoutTests:

        Reviewed by Darin.

        <rdar://problem/5333725> -webkit-user-select: none makes selection difficult

        * editing/selection/5333725-expected.checksum: Added.
        * editing/selection/5333725-expected.png: Added.
        * editing/selection/5333725-expected.txt: Added.
        * editing/selection/5333725.html: Added.

        Added a workaround for a bug where -webkit-user-select:none
        has no effect on the body if placed on the html element:
        * editing/selection/select-all-user-select-none.html:

WebCore:

        Reviewed by Darin.

        <rdar://problem/5333725> -webkit-user-select: none makes selection difficult

        Let users create selections if they mouse down in a -webkit-user-select:none
        region, just (continue to) disallow selection endpoints in those regions, and
        don't paint those regions as selected if they are fully enclosed by a selection.
        For example, in xxyyyxx where x is -webkit-user-select:none, a user can mouse down
        between the first two xs and drag across yyy to the second two xs to create a
        selection xx^yyy^xx.

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::selectAll): Allow selectAll inside a root
        that has -webkit-user-select:none, because it may contain content that
        is selectable (VisiblePosition and Selection creation will keep Selection
        endpoints out of -webkit-user-select:none regions).
        * page/EventHandler.cpp:
        (WebCore::EventHandler::selectClosestWordFromMouseEvent): Use canMouseDownStartSelect
        instead of the ambiguously named shouldSelect().
        (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
        (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
        (WebCore::EventHandler::updateSelectionForMouseDrag): Use canMouseDragExtendSelect.
        (WebCore::EventHandler::selectCursor): Paint an ibeam in -webkit-user-select:none regions,
        because you can click in those regions to create a selection.
        (WebCore::EventHandler::canMouseDownStartSelect): Now fires the selectStart event, and
        returns true in -webkit-user-select: none regions.
        (WebCore::EventHandler::canMouseDragExtendSelect): This is identical to
        canMouseDownStartSelect because of 12823, even though it seems strange that we would fire
        the selectStart event here.
        * page/EventHandler.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::draggableNode): Only -webkit-user-select:ignore regions will
        prevent selection creation.
        * rendering/RenderObject.h:

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

13 years agoLayoutTests:
andersca [Mon, 13 Aug 2007 19:02:20 +0000 (19:02 +0000)]
LayoutTests:

        Reviewed by Maciej.

        <rdar://problem/5360748>
        REGRESSION (r21002-r21003): Flash widget sniffer doesn't work (affects iWeb)

        Update test case to handle the case where the node list is accessed after
        the document has finished loading.

        * fast/dom/NodeList/invalidate-node-lists-when-parsing-expected.txt:
        * fast/dom/NodeList/invalidate-node-lists-when-parsing.html:

WebCore:

        Reviewed by Maciej.

        <rdar://problem/5360748>
        REGRESSION (r21002-r21003): Flash widget sniffer doesn't work (affects iWeb)

        Don't check whether the document is being parsed or not, because the node list
        could be accessed after the document has finished parsing.

        * dom/Node.cpp:
        (WebCore::Node::registerNodeList):

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

13 years ago Reviewed by Adam Roben.
weinig [Mon, 13 Aug 2007 18:02:20 +0000 (18:02 +0000)]
    Reviewed by Adam Roben.

        Use the cygwin specific Apache config file under cygwin.

        * Scripts/run-webkit-httpd:

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

13 years agono need to update regions that are not visible on the webpage.
lars [Mon, 13 Aug 2007 12:06:11 +0000 (12:06 +0000)]
no need to update regions that are not visible on the webpage.

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

13 years agoLayoutTests:
mjs [Mon, 13 Aug 2007 03:25:11 +0000 (03:25 +0000)]
LayoutTests:

        Reviewed by Darin and Sam.

        - test cases for <rdar://problem/5395213> cross-domain access to individual components of location object should be denied.

        * http/tests/security/cross-frame-access-location-expected.txt: This test's results changed, there are more debug messages due to access being legitimately denied.

        The remainder are new tests and support:

        * http/tests/security/resources/xss-DENIED-assign-location-hash-attacker.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-host-attacker.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-host-failure.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-hostname-attacker.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-hostname-failure.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-nonstandardProperty-attacker.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-pathname-attacker.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-pathname-failure.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-protocol-attacker.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-protocol-failure.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-reload-attacker.html: Added.
        * http/tests/security/resources/xss-DENIED-assign-location-search-attacker.html: Added.
        * http/tests/security/xss-DENIED-assign-location-hash-expected.txt: Added.
        * http/tests/security/xss-DENIED-assign-location-hash.html: Added.
        * http/tests/security/xss-DENIED-assign-location-host-expected.txt: Added.
        * http/tests/security/xss-DENIED-assign-location-host.html: Added.
        * http/tests/security/xss-DENIED-assign-location-hostname-expected.txt: Added.
        * http/tests/security/xss-DENIED-assign-location-hostname.html: Added.
        * http/tests/security/xss-DENIED-assign-location-nonstandardProperty-expected.txt: Added.
        * http/tests/security/xss-DENIED-assign-location-nonstandardProperty.html: Added.
        * http/tests/security/xss-DENIED-assign-location-pathname-expected.txt: Added.
        * http/tests/security/xss-DENIED-assign-location-pathname.html: Added.
        * http/tests/security/xss-DENIED-assign-location-protocol-expected.txt: Added.
        * http/tests/security/xss-DENIED-assign-location-protocol.html: Added.
        * http/tests/security/xss-DENIED-assign-location-reload-expected.txt: Added.
        * http/tests/security/xss-DENIED-assign-location-reload.html: Added.
        * http/tests/security/xss-DENIED-assign-location-search-expected.txt: Added.
        * http/tests/security/xss-DENIED-assign-location-search.html: Added.

WebCore:

        Reviewed by Darin and Sam.

        <rdar://problem/5395213> cross-domain access to individual components of location object should be denied.

        * bindings/js/kjs_window.cpp:
        (KJS::Location::put): Add the appropriate cross-domain access checks.

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

13 years ago Reviewed by John Sullivan.
darin [Mon, 13 Aug 2007 03:06:46 +0000 (03:06 +0000)]
    Reviewed by John Sullivan.

        - fix <rdar://problem/5403724> REGRESSION: text inputs are not scrolled to make inline input visible (14912)

        * editing/Editor.h: Made setIgnoreMarkedTextSelectionChange no longer inline.
        It now has a side effect of revealing the selection when you set it to false.
        Added private revealSelectionAfterEditingOperation helper.
        * editing/Editor.cpp:
        (WebCore::Editor::deleteRange): Calls revealSelectionAfterEditingOperation instead
        of calling m_frame->revealSelection directly.
        (WebCore::Editor::replaceSelectionWithFragment): Ditto.
        (WebCore::Editor::insertOrderedList): Ditto.
        (WebCore::Editor::insertUnorderedList): Ditto.
        (WebCore::Editor::increaseSelectionListLevel): Ditto.
        (WebCore::Editor::increaseSelectionListLevelOrdered): Ditto.
        (WebCore::Editor::increaseSelectionListLevelUnordered): Ditto.
        (WebCore::Editor::decreaseSelectionListLevel): Ditto.
        (WebCore::Editor::insertLineBreak): Ditto.
        (WebCore::Editor::insertParagraphSeparator): Ditto.
        (WebCore::Editor::replaceMarkedText): Ditto.
        (WebCore::Editor::revealSelectionAfterEditingOperation): Added. Calls revealSelection,
        unless we are in the ignoreMarkedTextSelectionChange state. If we are in that state,
        we're in the middle of a composite editing operation and we shouldn't try to scroll
        to reveal the selection until the operation is done.
        (WebCore::Editor::setIgnoreMarkedTextSelectionChange): Made no longer inline. If
        changing the state from true to false, then calls revealSelectionAfterEditingOperation.

        * WebCore.exp: Add new entry point for no-longer-inline setter function.

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

13 years agoJavaScriptCore:
darin [Mon, 13 Aug 2007 02:42:17 +0000 (02:42 +0000)]
JavaScriptCore:

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14931
          <rdar://problem/5403816> JavaScript regular expression non-participating capturing parentheses
          fail in 3 different ways

        Test: fast/js/regexp-non-capturing-groups.html

        * kjs/string_object.cpp:
        (KJS::replace): Add missing code to handle undefined backreferences; before we'd get the empty string
        instead of a JavaScript "undefined" value.
        (KJS::StringProtoFunc::callAsFunction): Implemented backreference support for split.
        * pcre/pcre_exec.c: (match): Made backreferences to undefined groups match the empty string instead
        of always failing. Only in JAVASCRIPT mode.

        * tests/mozilla/expected.html: Add a new expected test success, since this fixed one test result.

LayoutTests:

        Reviewed by Maciej.

        - test for http://bugs.webkit.org/show_bug.cgi?id=14931
          JavaScript regular expression non-participating capturing groups behave incorrectly in edge cases

        * fast/js/regexp-non-capturing-groups-expected.txt: Added.
        * fast/js/regexp-non-capturing-groups.html: Added.
        * fast/js/resources/regexp-non-capturing-groups.js: Added.

        * fast/js/resources/js-test-pre.js: Updated to add a special case for array
        results, since there are some array results in the test. Also cut down on the
        verbosity of failures when the type of the actual result is the same as the type
        of the expected result. And get rid of the special case function just for NaN.

        * fast/js/regexp-unicode-overflow.html: Let the make-js-test-wrappers script
        regenerate this file (it removed one of the trailing newlines).

        * fast/js/kde/encode_decode_uri-expected.txt: This test now passes. I'm not sure
        why it was failing before.

        * fast/js/char-at-expected.txt: Removed all the periods at the end of NaN
        test PASS messages; they are now consistent with all the other tests.
        * fast/js/date-parse-comments-test-expected.txt: Ditto.
        * fast/js/date-parse-test-expected.txt: Ditto.

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

13 years ago Reviewed by Maciej Stachowiak, Dave Hyatt.
ggaren [Mon, 13 Aug 2007 02:41:29 +0000 (02:41 +0000)]
    Reviewed by Maciej Stachowiak, Dave Hyatt.

        Changed the dead resource LRU-SP algorithm to measure an object's
        total size, not just its encoded size. This will allow us to make
        better decisions about what data to evict when the cache is small. For
        example, the PLT can now run with a 16MB cache without fully evicting
        any resources.

        (Previously, we had assumed that decoded size would be an OK estimate
        of encoded size, but that is not true of GIF, whose decoded size can be
        orders of magnitude greater than its encoded size.)

        Subtly, destroying a resource's decoded data now increases its recency
        by moving it to the head of a smaller LRU list. This is slightly odd,
        but, since all resources get the same treatment, it shouldn't hurt
        the eviction algorithm.

        * history/PageCache.cpp:
        (WebCore::PageCache::releaseAutoreleasedPagesNow): Make sure that a
        dead resource eviction doesn't happen until we've released all of our
        dead pages. Otherwise, the cache will make terrible decisions about
        what to evict because all of our dead resources will seem live.

        * loader/Cache.cpp:
        (WebCore::Cache::Cache):
        (WebCore::Cache::pruneLiveResources):
        (WebCore::Cache::pruneDeadResources): Removed call to
        removeFromLiveDecodedResourcesList because this happens automatically
        now as a part of the process of changing the resource's decoded size.
        (WebCore::Cache::lruListFor): *** The key change. *** Compute the
        appropriate LRU list based on total size, not encoded size.
        (WebCore::Cache::dumpLRULists): Added debug logging function to help
        visualize the cache.

        * loader/Cache.h:
        (WebCore::Cache::setDeadResourcePruneEnabled):
        (WebCore::Cache::deadResourcePruneEnabled):

        * loader/CachedImage.cpp: Moved decoded size tracking code from here
        up into the base class. Currently, only CachedImage has a use for that
        functionality, but other subclasses might need it in the future, and
        the base class is already responsible for similar code related to
        encoded size tracking.
        (WebCore::CachedImage::decodedSizeChanged):
        * loader/CachedImage.h:

        * loader/CachedResource.cpp:
        (WebCore::CachedResource::CachedResource):
        (WebCore::CachedResource::setDecodedSize): Move us in the LRU-SP list
        just like setEncodedSize does, since decoded size counts now, too.
        (WebCore::CachedResource::setEncodedSize): Changed slightly to match
        the style of setDecodedSize.

        * loader/CachedResource.h:
        (WebCore::CachedResource::decodedSize):

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

13 years ago Reviewed by Darin.
ap [Sun, 12 Aug 2007 19:20:50 +0000 (19:20 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=4648
        Shockwave unable to load GZip'd text resources when server sends Content-Length header

        * Plugins/WebBaseNetscapePluginStream.mm:
        (-[WebBaseNetscapePluginStream startStreamWithResponse:]): Don't trust
        -[NSURLResponse expectedContentLength] if Content-Encoding is not identity.

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

13 years ago Generate results for new tests in a more logical location
aroben [Sun, 12 Aug 2007 11:31:41 +0000 (11:31 +0000)]
    Generate results for new tests in a more logical location

        New platform-specific tests always have their results generated right
        next to the test. New cross-platform tests will have their results
        generated a) in the cross-platform directory, if they are text-only,
        or b) in the least-specific platform directory, if they are render
        tree dumps.

        Reviewed by Lars.

        * Scripts/run-webkit-tests:

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

13 years ago Print the actual directory where new results are generated.
aroben [Sun, 12 Aug 2007 11:31:30 +0000 (11:31 +0000)]
     Print the actual directory where new results are generated.

         Before, we were printing an unpredictable, context-specific substring
         of the directory.

         Reviewed by Lars.

         * Scripts/run-webkit-tests:

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

13 years ago Factor some common code into a stripExtension() subroutine.
aroben [Sun, 12 Aug 2007 11:31:14 +0000 (11:31 +0000)]
     Factor some common code into a stripExtension() subroutine.

         Reviewed by Lars.

         * Scripts/run-webkit-tests: Also removed some debugging output.

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

13 years agoCorrect wrong URL in ChangeLog entry
antti [Sun, 12 Aug 2007 10:08:48 +0000 (10:08 +0000)]
Correct wrong URL in ChangeLog entry

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

13 years ago Reviewed by Darin.
antti [Sun, 12 Aug 2007 10:05:31 +0000 (10:05 +0000)]
    Reviewed by Darin.

        Add test for http://bugs.webkit.org/attachment.cgi?id=15818&action=edit which
        Mitz fixed in r24973.

        I had a fix for <rdar://problem/5267021>
        REGRESSION: Loading Slashdot Firehose is 9X slower on Safari 3.0 than Safari 2.0
        which turned out to be a dublicate.

        At least we can use the layout test I did.

        * http/tests/local/style-access-before-stylesheet-loaded-expected.txt: Added.
        * http/tests/local/style-access-before-stylesheet-loaded.html: Added.

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

13 years ago Fix <rdar://problem/5278790> Hole for find-on-page match in subframe isn't clipped...
aroben [Sun, 12 Aug 2007 09:18:23 +0000 (09:18 +0000)]
 Fix <rdar://problem/5278790> Hole for find-on-page match in subframe isn't clipped by frame bounds

        Reviewed by Maciej.

        * WebView.cpp:
        (WebView::rectsForTextMatches): Ported fix from r23586.

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

13 years ago Prevent an ASSERT on launch by initializing AtomicString in WebKitGraphics
aroben [Sun, 12 Aug 2007 09:18:13 +0000 (09:18 +0000)]
 Prevent an ASSERT on launch by initializing AtomicString in WebKitGraphics

         Reviewed by Maciej.

         * WebKitGraphics.cpp:
         (makeFont):

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

13 years agoForgot to remove this directory
pewtermoose [Sat, 11 Aug 2007 20:55:39 +0000 (20:55 +0000)]
Forgot to remove this directory

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