WebKit-https.git
12 years agoTiger build fix.
mrowe@apple.com [Fri, 4 Jan 2008 08:16:39 +0000 (08:16 +0000)]
Tiger build fix.

* platform/Threading.h: The OSAtomic functions take non-volatile pointers on Tiger.

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

12 years ago2008-01-04 Alp Toker <alp@atoker.com>
alp@webkit.org [Fri, 4 Jan 2008 08:05:36 +0000 (08:05 +0000)]
2008-01-04  Alp Toker  <alp@atoker.com>

        GTK+ DRT build fix for breakage introduced in r29149.

        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
        (LayoutTestController::execCommand):

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

12 years agoUse platform-provided atomic operations in place of inline assembly to increase porta...
mrowe@apple.com [Fri, 4 Jan 2008 07:55:49 +0000 (07:55 +0000)]
Use platform-provided atomic operations in place of inline assembly to increase portability.

Reviewed by Maciej Stachowiak.

* platform/Threading.h:
(WebCore::atomicIncrement):
(WebCore::atomicDecrement):

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

12 years ago Reviewed by Darin.
ap@webkit.org [Fri, 4 Jan 2008 07:31:40 +0000 (07:31 +0000)]
    Reviewed by Darin.

        <rdar://problem/5463489> A number of layout tests should be using execCommand instead of textInputController

        Added layoutTestController.execCommand to access editor commands that are not available
        via document.execCommand.

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

12 years agoFix <rdar://problem/5668517> REGRESSION: Major under painting issues in SVG (carto...
oliver@apple.com [Fri, 4 Jan 2008 07:15:25 +0000 (07:15 +0000)]
Fix <rdar://problem/5668517> REGRESSION: Major under painting issues in SVG (carto.net dock example)

Revied by Maciej.

We need to cache the absolute bounds of the <image>,
as there's no reliable way to recompute the old bounding
box one we have started layout.

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

12 years ago2008-01-03 Xan Lopez <xan@gnome.org>
alp@webkit.org [Fri, 4 Jan 2008 06:34:56 +0000 (06:34 +0000)]
2008-01-03  Xan Lopez  <xan@gnome.org>

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=16654
        [GTK] Signal "navigation-requested" does not react correctly on
        return TRUE from callbacks

        * WebView/webkitwebview.cpp: use our own accumulator for signals
        returning WebKitNavigationResponse. The emission will be stopped
        when any callback returns anything but
        WEBKIT_NAVIGATION_RESPONSE_ACCEPT.

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

12 years ago2008-01-03 Alp Toker <alp@atoker.com>
alp@webkit.org [Fri, 4 Jan 2008 06:23:42 +0000 (06:23 +0000)]
2008-01-03  Alp Toker  <alp@atoker.com>

        Reviewed by Mark Rowe.

        Support building in Scratchbox, which has a version of make that fails
        on wildcard syntax. Use a vpath to match IDL files instead.

        * GNUmakefile.am:

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

12 years ago - fix Safari build
darin@apple.com [Fri, 4 Jan 2008 06:00:01 +0000 (06:00 +0000)]
    - fix Safari build

        * WebKit.xcodeproj/project.pbxproj: Mark header private (fixes Safari build).

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

12 years agoUpdate Tiger library to a G3-friendly version.
mrowe@apple.com [Fri, 4 Jan 2008 05:41:56 +0000 (05:41 +0000)]
Update Tiger library to a G3-friendly version.

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

12 years ago Reviewed by Sam Weinig.
mitz@apple.com [Fri, 4 Jan 2008 04:38:08 +0000 (04:38 +0000)]
    Reviewed by Sam Weinig.

        - skip tests that are failing because font fallback results in a
          different font being used on Windows than on Mac.

        * platform/win/Skipped:

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

12 years ago2008-01-03 Jon Honeycutt <jhoneycutt@apple.com>
jhoneycutt@apple.com [Fri, 4 Jan 2008 04:22:38 +0000 (04:22 +0000)]
2008-01-03  Jon Honeycutt  <jhoneycutt@apple.com>

        Reviewed by Darin.

        <rdar://problem/5504775> PDF page will not load first time after Adobe
        Reader install, unless browser is relaunched

        Refresh and re-search the plugin database if the MIME type is not
        registered.

        * plugins/win/PluginDatabaseWin.cpp:
        (WebCore::PluginDatabaseWin::isMIMETypeRegistered):
        * plugins/win/PluginDatabaseWin.h:

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

12 years ago Update libraries for <rdar://problem/4106190> Include "Where from" metadata...
adele@apple.com [Fri, 4 Jan 2008 04:03:46 +0000 (04:03 +0000)]
    Update libraries for <rdar://problem/4106190> Include "Where from" metadata in drag-and-dropped images

        * WebKitSystemInterface.h:
        * libWebKitSystemInterfaceLeopard.a:
        * libWebKitSystemInterfaceTiger.a:

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

12 years ago Reviewed by Darin Adler.
mitz@apple.com [Fri, 4 Jan 2008 02:04:24 +0000 (02:04 +0000)]
    Reviewed by Darin Adler.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16548
          <rdar://problem/5659452> REGRESSION(r28810): Font style and sizes are weird for Japanese text

        * platform/graphics/win/FontCacheWin.cpp:
        (WebCore::linkedFontEnumProc): Added. This callback is used to fetch
        a valid LOGFONT for a given family.
        (WebCore::getLinkedFonts): Added. Returns a vector of font families
        linked to the given font family by the Windows registry key
        HKLM\Software\...\FontLink\SystemLink. The registry values typically
        differ based on the installed language version of Windows.
        (WebCore::FontCache::getFontDataForCharacters): Changed to not use MLang
        font mapping, which is Windows code page based, except for characters in
        the range U+2000..U+200F. Instead, this function gets the font Uniscribe
        would use for the character. However, that font might not actually
        contain the character, in which case GDI font linking would substitute a
        different font. Therefore, this function walks the linked font list
        until it finds a font that actually contains the character.

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

12 years agoWebKitTools:
alice.liu@apple.com [Fri, 4 Jan 2008 01:28:27 +0000 (01:28 +0000)]
WebKitTools:

        Reviewed by Darin, Mitz.

        fixed <rdar://5130762> mousedowns in different locations increase the clickcount incorrectly

        the clickcount should not increase if the last click was at a different location.  it's a new click.

        * DumpRenderTree/mac/DumpRenderTree.mm:
        (runTest):
        * DumpRenderTree/mac/EventSendingController.h:
        * DumpRenderTree/mac/EventSendingController.mm:
        (-[EventSendingController mouseDown]):
        (-[EventSendingController mouseUp]):

LayoutTests:

        Reviewed by Darin, Mitz.

        updating expected results after fixing clickcount for
        <rdar://5130762> mousedowns in different locations increase the clickcount incorrectly

        * fast/forms/focus-selection-input-expected.txt:
        * fast/forms/focus-selection-textarea-expected.txt:
        * platform/mac/fast/events/objc-event-api-expected.txt:
        * platform/mac/fast/inline/dirtyLinesForInline-expected.txt:
        * platform/mac/fast/text/textIteratorNilRenderer-expected.txt:
        * platform/mac/svg/custom/pointer-events-image-expected.txt:
        * platform/mac/svg/custom/pointer-events-path-expected.txt:
        * platform/mac/svg/custom/pointer-events-text-expected.txt:
        * platform/mac/svg/custom/text-hit-test-expected.txt:

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

12 years agoWebCore:
darin@apple.com [Fri, 4 Jan 2008 01:17:05 +0000 (01:17 +0000)]
WebCore:

        Reviewed by Mitz.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16723
          tables/mozilla/bugs/bug30418.html test failing due to problems updating dynamic border rules

        Test: fast/table/border-changes.html

        * html/HTMLTableElement.h:
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::parseMappedAttribute): Check the border type before and after
        parsing attributes, rather than doing this only for the rules attribute.
        (WebCore::HTMLTableElement::cellBorders): Added.
        (WebCore::HTMLTableElement::getSharedCellDecl): Changed to use cellBorders to factor out the
        rule about what type of borders to use.

LayoutTests:

        Reviewed by Mitz.

        - test for http://bugs.webkit.org/show_bug.cgi?id=16723
          tables/mozilla/bugs/bug30418.html test failing due to problems updating dynamic border rules

        * fast/table/border-changes-expected.txt: Added.
        * fast/table/border-changes.html: Added.
        * fast/table/resources: Added.
        * fast/table/resources/TEMPLATE.html: Added.
        * fast/table/resources/border-changes.js: Added.

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

12 years ago Replaced the use of editor command "ForwardDelete" with "DeleteForward" to...
adachan@apple.com [Fri, 4 Jan 2008 01:00:19 +0000 (01:00 +0000)]
    Replaced the use of editor command "ForwardDelete" with "DeleteForward" to be consistent
        with our use of "DeleteBackward".

        Rubber-stamped by Jon.

        * WebView.cpp:

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

12 years ago Reviewed by Adam.
darin@apple.com [Fri, 4 Jan 2008 00:13:12 +0000 (00:13 +0000)]
    Reviewed by Adam.

        * Scripts/update-webkit: Make this work a little better for the people at Apple
        who have a directory named Internal.

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

12 years ago Reviewed by Darin.
kdecker@apple.com [Thu, 3 Jan 2008 22:45:13 +0000 (22:45 +0000)]
    Reviewed by Darin.

        Fixed: <rdar://problem/4106190> Include "Where from" metadata in drag-and-dropped images

        * Misc/WebNSFileManagerExtras.h:
        * Misc/WebNSFileManagerExtras.m:
        (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Added new method. Uses WebKitSystemInterface to set
        "Where from:" metadata information.
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Added "Where from:" metadata for drag and dropped images.

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

12 years ago Reviewed by Darin.
weinig@apple.com [Thu, 3 Jan 2008 22:10:34 +0000 (22:10 +0000)]
    Reviewed by Darin.

        Pass the prototype of WebCore JS objects up the constructor chain
        rather than explicitly setting using setPrototype.  This removes many
        redundant settings of the prototype on construction.  To avoid a CG
        hazard, the prototype must be constructed before before calling the
        constructor of the JS object.

        - JS objects that inherit from DOMObject, which all bindings objects
          (except Window) do, now can't implicitly have a jsNull prototype, but
          must explicitly pass it up the construction chain.

        * bindings/js/JSCSSRuleCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSCSSValueCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSEventCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSEventTargetNode.cpp:
        (WebCore::JSEventTargetNode::JSEventTargetNode):
        * bindings/js/JSEventTargetNode.h:
        * bindings/js/JSHTMLAllCollection.h:
        (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
        * bindings/js/JSHTMLAudioElementConstructor.cpp:
        (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
        * bindings/js/JSHTMLCollectionCustom.cpp:
        (WebCore::getNamedItems):
        (WebCore::toJS):
        * bindings/js/JSHTMLElementWrapperFactory.cpp:
        (WebCore::createJSHTMLWrapper):
        * bindings/js/JSHTMLFormElementCustom.cpp:
        (WebCore::JSHTMLFormElement::nameGetter):
        * bindings/js/JSHTMLInputElementBase.cpp:
        (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
        * bindings/js/JSHTMLInputElementBase.h:
        * bindings/js/JSHTMLOptionElementConstructor.cpp:
        (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
        * bindings/js/JSLocation.cpp:
        (WebCore::JSLocation::JSLocation):
        * bindings/js/JSLocation.h:
        * bindings/js/JSNamedNodesCollection.cpp:
        (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
        * bindings/js/JSNamedNodesCollection.h:
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSSVGElementWrapperFactory.cpp:
        (WebCore::createJSSVGWrapper):
        * bindings/js/JSSVGPathSegCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSStyleSheetCustom.cpp:
        (WebCore::toJS):
        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
        (KJS::JSXMLHttpRequestConstructorImp::construct):
        (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
        * bindings/js/JSXMLHttpRequest.h:
        * bindings/js/JSXSLTProcessor.cpp:
        (KJS::JSXSLTProcessor::JSXSLTProcessor):
        (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
        (KJS::XSLTProcessorConstructorImp::implementsConstruct):
        (KJS::XSLTProcessorConstructorImp::construct):
        * bindings/js/JSXSLTProcessor.h:
        * bindings/js/kjs_binding.h:
        (KJS::DOMObject::DOMObject):
        (KJS::cacheDOMObject):
        (KJS::cacheSVGDOMObject):
        * bindings/js/kjs_css.cpp:
        (WebCore::JSRGBColor::JSRGBColor):
        (WebCore::getJSRGBColor):
        * bindings/js/kjs_css.h:
        * bindings/js/kjs_events.cpp:
        (WebCore::JSClipboard::JSClipboard):
        (WebCore::toJS):
        * bindings/js/kjs_events.h:
        * bindings/js/kjs_html.cpp:
        (WebCore::ImageConstructorImp::ImageConstructorImp):
        * bindings/js/kjs_navigator.cpp:
        (KJS::Navigator::Navigator):
        (KJS::PluginBase::PluginBase):
        * bindings/js/kjs_navigator.h:
        * bindings/js/kjs_window.cpp:
        (KJS::Window::Window):
        (KJS::Window::location):
        (KJS::Window::getValueProperty):
        * bindings/js/kjs_window.h:
        * bindings/scripts/CodeGeneratorJS.pm:

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

12 years ago Reviewed by Darin.
ap@webkit.org [Thu, 3 Jan 2008 21:40:40 +0000 (21:40 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=10909
        Hixie's XMLHttpRequest/018.html test fails

        This was fixed earlier, just adding a test case.

        * http/tests/xmlhttprequest/web-apps/018-expected.txt: Added.
        * http/tests/xmlhttprequest/web-apps/018.html: Added.
        * http/tests/xmlhttprequest/web-apps/resources: Added.
        * http/tests/xmlhttprequest/web-apps/resources/018-test.xml: Added.

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

12 years ago Reviewed by Darin.
alice.liu@apple.com [Thu, 3 Jan 2008 21:21:48 +0000 (21:21 +0000)]
    Reviewed by Darin.

        This fixes pageup/down in iframes.  test for this is fast/frames/iframe-scroll-page-up-down.html

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView doCommandBySelector:]):
        Have the editor handle all the commands it supports instead of just text commands.
        If not handled by the editor, the webview will handle the command.

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

12 years ago Regression: backspace stopped working on text inputs
adachan@apple.com [Thu, 3 Jan 2008 19:35:54 +0000 (19:35 +0000)]
    Regression: backspace stopped working on text inputs
        - Replaced the use of editor command "BackwardDelete" with "DeleteBackward" since it's no longer supported.

        Reviewed by Adam.

        * WebEditorClient.cpp:
        (WebEditorClient::textWillBeDeletedInTextField):
        * WebView.cpp:

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

12 years ago2008-01-03 Holger Hans Peter Freyther <zecke@selfish.org>
zecke@webkit.org [Thu, 3 Jan 2008 19:00:17 +0000 (19:00 +0000)]
2008-01-03  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Alp.

        -This is from http://bugs.webkit.org/show_bug.cgi?id=16115

        Change the Gtk ContextMenuItem code to generate the GtkMenuItem
        or GtkCheckMenuItem on the fly. Currently we will create a
        GtkCheckMenuItem if the ContextMenuItem has been checked. What needs
        to be done is to change WebCore to tell the platform code if an item
        is checkable or not.

        * platform/ContextMenuItem.h:
        (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
        * platform/gtk/ContextMenuGtk.cpp:
        (WebCore::ContextMenu::appendItem):
        * platform/gtk/ContextMenuItemGtk.cpp:
        (WebCore::ContextMenuItem::ContextMenuItem):
        (WebCore::ContextMenuItem::~ContextMenuItem):
        (WebCore::ContextMenuItem::createNativeMenuItem):
        (WebCore::ContextMenuItem::releasePlatformDescription):
        (WebCore::ContextMenuItem::type):
        (WebCore::ContextMenuItem::setType):
        (WebCore::ContextMenuItem::action):
        (WebCore::ContextMenuItem::setAction):
        (WebCore::ContextMenuItem::platformSubMenu):
        (WebCore::ContextMenuItem::setSubMenu):
        (WebCore::ContextMenuItem::setChecked):

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

12 years ago Use HTTP::Date instead of Date::Parse because it's installed by Cygwin by...
aroben@apple.com [Thu, 3 Jan 2008 18:37:46 +0000 (18:37 +0000)]
    Use HTTP::Date instead of Date::Parse because it's installed by Cygwin by default

        Rubberstamped by Mark.

        * Scripts/update-webkit-auxiliary-libs:

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

12 years ago Rubber-stamped by Adam Roben.
mitz@apple.com [Thu, 3 Jan 2008 18:28:29 +0000 (18:28 +0000)]
    Rubber-stamped by Adam Roben.

        - update the project hierarchy to match the on-disk organization of
          the platform directory.

        * WebCore.vcproj/WebCore.vcproj:

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

12 years ago Fix Bug 15663: update-webkit re-downloads WebKitAuxiliaryLibrary unnecessarily
aroben@apple.com [Thu, 3 Jan 2008 18:19:15 +0000 (18:19 +0000)]
     Fix Bug 15663: update-webkit re-downloads WebKitAuxiliaryLibrary unnecessarily

         http://bugs.webkit.org/show_bug.cgi?id=15663

         Added a fuzz factor into the Last-Modified comparison for downloading
         WebKitAuxiliaryLibrary.zip.

         The zip file is served from a set of mirrors who give Last-Modified
         times that are off by 1-3 seconds from each other. This was causing
         the build bots to redownload WebKitAuxiliaryLibrary for every build,
         which would then cause all of WebCore to rebuild each time.

         Reviewed by Mark.

         * Scripts/update-webkit-auxiliary-libs: Check if the new zip file is
         at least 30 seconds newer than the old one -- otherwise we assume that
         the difference in time is due to the mirrors being slightly offset
         from each other.
         (sub lastModifiedToUnixTime): Added.

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

12 years ago Reviewed by Darin.
kdecker@apple.com [Thu, 3 Jan 2008 17:15:14 +0000 (17:15 +0000)]
    Reviewed by Darin.

        Fixed: <rdar://problem/5660603> QuickDraw plug-ins can cause a 100% reproducible assertion failure in AppKit (breaks Safari UI)

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView updateAndSetWindow]): Simplified an early return for non-QuickDraw plug-ins and switched
        to using the more NSView friendly version of lockFocus, lockFocusIfCanDraw.

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

12 years ago Fix a buffer overrun and a leak introduced in r29098
aroben@apple.com [Thu, 3 Jan 2008 15:34:34 +0000 (15:34 +0000)]
     Fix a buffer overrun and a leak introduced in r29098

         Reviewed by Mark.

         * platform/text/StringImpl.cpp:
         (WebCore::StringImpl::StringImpl): Only allocate one buffer, and make
         it be big enough to hold the string contents plus the null terminator.

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

12 years ago Windows build fix.
ap@webkit.org [Thu, 3 Jan 2008 14:40:18 +0000 (14:40 +0000)]
    Windows build fix.

        * DumpRenderTree/ForwardingHeaders/wtf/HashTraits.h: Added (needed by COMPtr.h).

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

12 years agoMoved QWebPage::open to QWebFrame::load and added setHtml.
hausmann@webkit.org [Thu, 3 Jan 2008 13:53:08 +0000 (13:53 +0000)]
Moved QWebPage::open to QWebFrame::load and added setHtml.

Signed-off-by: Lars
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29123 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoAdded the first revision of QWebView and started moving functionality from QWebPave...
hausmann@webkit.org [Thu, 3 Jan 2008 13:50:59 +0000 (13:50 +0000)]
Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.

Signed-off-by: Lars
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29122 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 years agoFix compilation with gcc 4.3, include limits.h for INT_MAX
hausmann@webkit.org [Thu, 3 Jan 2008 13:40:46 +0000 (13:40 +0000)]
Fix compilation with gcc 4.3, include limits.h for INT_MAX

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

12 years ago2008-01-03 Alp Toker <alp@atoker.com>
alp@webkit.org [Thu, 3 Jan 2008 12:02:07 +0000 (12:02 +0000)]
2008-01-03  Alp Toker  <alp@atoker.com>

        Suggested by Mark Rowe.

        Fix indentation and remove trailing whitespace.

        * platform/network/curl/ResourceHandleManager.cpp:

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

12 years ago2008-01-03 Luca Bruno <lethalman88@gmail.com>
alp@webkit.org [Thu, 3 Jan 2008 11:04:04 +0000 (11:04 +0000)]
2008-01-03  Luca Bruno  <lethalman88@gmail.com>

        Reviewed by Alp Toker.

        Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
        that the two POST methods don't conflict.

        * platform/network/curl/ResourceHandleManager.cpp:
        (WebCore::ResourceHandleManager::setupPOST):

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

12 years ago * tests/mozilla/expected.html: The fix for bug 16696 also fixed a test
darin@apple.com [Thu, 3 Jan 2008 08:49:35 +0000 (08:49 +0000)]
    * tests/mozilla/expected.html: The fix for bug 16696 also fixed a test
        case, ecma_3/RegExp/perlstress-002.js, so updated results to expect
        that test to succeed.

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

12 years ago * Scripts/do-webcore-rename: Yet more renaming ideas.
weinig@apple.com [Thu, 3 Jan 2008 07:50:46 +0000 (07:50 +0000)]
    * Scripts/do-webcore-rename: Yet more renaming ideas.

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

12 years ago - touched some files to try to get the Windows buildbot building again
darin@apple.com [Thu, 3 Jan 2008 07:44:09 +0000 (07:44 +0000)]
    - touched some files to try to get the Windows buildbot building again

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

12 years agoOops, fix another.
darin@apple.com [Thu, 3 Jan 2008 07:37:41 +0000 (07:37 +0000)]
Oops, fix another.

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

12 years agoOops, fix one.
darin@apple.com [Thu, 3 Jan 2008 07:37:14 +0000 (07:37 +0000)]
Oops, fix one.

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

12 years ago * Scripts/do-webcore-rename: More renaming ideas. (Maciej, please merge yours...
darin@apple.com [Thu, 3 Jan 2008 07:36:11 +0000 (07:36 +0000)]
    * Scripts/do-webcore-rename: More renaming ideas. (Maciej, please merge yours with mine.)

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

12 years ago Reviewed by Sam Weinig.
mitz@apple.com [Thu, 3 Jan 2008 06:47:37 +0000 (06:47 +0000)]
    Reviewed by Sam Weinig.

        - fix small caps rendering

        Covered by an existing test,

        * platform/graphics/win/FontDataWin.cpp:
        (WebCore::FontData::smallCapsFontData):

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

12 years agoJavaScriptCore:
darin@apple.com [Thu, 3 Jan 2008 06:39:50 +0000 (06:39 +0000)]
JavaScriptCore:

        Reviewed by Geoff.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16696
          JSCRE fails fails to match Acid3 regexp

        Test: fast/regex/early-acid3-86.html

        The problem was with the cutoff point between backreferences and octal
        escape sequences. We need to determine the cutoff point by counting the
        total number of capturing brackets, which requires an extra pass through
        the expression when compiling it.

        * pcre/pcre_compile.cpp:
        (CompileData::CompileData): Added numCapturingBrackets. Removed some
        unused fields.
        (compileBranch): Use numCapturingBrackets when calling checkEscape.
        (calculateCompiledPatternLength): Use numCapturingBrackets when calling
        checkEscape, and also store the bracket count at the end of the compile.
        (jsRegExpCompile): Call calculateCompiledPatternLength twice -- once to
        count the number of brackets and then a second time to calculate the length.

LayoutTests:

        Reviewed by Geoff.

        - test for http://bugs.webkit.org/show_bug.cgi?id=16696
          JSCRE fails fails to match Acid3 regexp

        * fast/regex/early-acid3-86-expected.txt: Added.
        * fast/regex/early-acid3-86.html: Added.
        * fast/regex/resources/early-acid3-86.js: Added.

        * fast/regex/test1-expected.txt: Updated for a few cases where we now fail.
        But these "failures" represent us replacing PCRE behavior with semantics
        that are correct for JavaScript regular expressions.

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

12 years ago Reviewed and landed by Darin.
darin@apple.com [Thu, 3 Jan 2008 06:11:10 +0000 (06:11 +0000)]
    Reviewed and landed by Darin.

        * kjs/nodes.cpp:
        (KJS::DoWhileNode::execute): Added a missing return.

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

12 years ago Reviewed by Oliver.
antti@apple.com [Thu, 3 Jan 2008 03:56:40 +0000 (03:56 +0000)]
    Reviewed by Oliver.

        Calculate video position and size within the renderer box in WebCore. This
        way the aspect ratio calculation is not needed in each MediaPlayer implementation.

        This fixes video aspect ratio on Windows.

        Covered by an existing pixel test.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::createQTMovieView):
        * rendering/RenderVideo.cpp:
        (WebCore::RenderVideo::videoBox):
        (WebCore::RenderVideo::paintReplaced):
        (WebCore::RenderVideo::updatePlayer):
        * rendering/RenderVideo.h:

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

12 years ago Fix windows build.
adachan@apple.com [Thu, 3 Jan 2008 02:33:11 +0000 (02:33 +0000)]
    Fix windows build.

        * WebCore.vcproj/WebCore.vcproj:

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

12 years ago Reviewed by Dan Bernstein
sullivan@apple.com [Thu, 3 Jan 2008 02:09:58 +0000 (02:09 +0000)]
    Reviewed by Dan Bernstein

        - fixed <rdar://problem/5579010> REGRESSION: Safari inserts newlines in tab names when U+2028 is present

        * loader/DocumentLoader.cpp:
        (WebCore::canonicalizedTitle):
        in the code that replaces control characters with white space, also replace the unicode line separator
        and paragraph separator characters

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

12 years ago2008-01-02 Holger Hans Peter Freyther <zecke@selfish.org>
zecke@webkit.org [Thu, 3 Jan 2008 02:07:28 +0000 (02:07 +0000)]
2008-01-02  Holger Hans Peter Freyther  <zecke@selfish.org>

        Rubber stamped by Alp.

        Remove GDK_MULTIHEAD_SAFE and GTK_MULTIHEAD_SAFE because they break
        the build. At least people doing a debug build on Ubuntu Hardy will see
        the breakage. I was asked to leave the flags inside the files to ease future
        debugging.

        * GNUmakefile.am:
        * WebKit.pri:

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

12 years ago2008-01-02 Holger Hans Peter Freyther <zecke@selfish.org>
zecke@webkit.org [Thu, 3 Jan 2008 02:05:01 +0000 (02:05 +0000)]
2008-01-02  Holger Hans Peter Freyther  <zecke@selfish.org>

        Rubber stamped by Darin.

        Coding Style fix. Do not use an else because we use a return in the
        if branch.

        * WebView/webkitwebview.cpp:

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

12 years ago - fix buffer overruns seen on buildbot
darin@apple.com [Thu, 3 Jan 2008 02:00:26 +0000 (02:00 +0000)]
    - fix buffer overruns seen on buildbot

        * platform/text/StringImpl.cpp:
        (WebCore::countCharacter): Added this.
        (WebCore::StringImpl::toCoordsArray): Use countCharacter instead of incorrect find expression.
        (WebCore::StringImpl::toLengthArray): Ditto.
        (WebCore::StringImpl::replace): Added assertions.

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

12 years ago * platform/win/Skipped: removing a fixed test
alice.liu@apple.com [Thu, 3 Jan 2008 01:29:06 +0000 (01:29 +0000)]
    * platform/win/Skipped: removing a fixed test
        this was fixed with r28836 but was left behind on the skipped list

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

12 years agoWebCore:
darin@apple.com [Thu, 3 Jan 2008 01:25:51 +0000 (01:25 +0000)]
WebCore:

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16657
          Acid3 failure since table.caption and table.thead do not work for nodes added by appendChild
        - fix http://bugs.webkit.org/show_bug.cgi?id=16659
          Acid3 expects HTMLTableElement.rows to include a <tr> element that is an immediate child of the <table>

        Tests: dom/html/level2/html/HTMLCollection07.html
               dom/html/level2/html/HTMLCollection08.html
               dom/html/level2/xhtml/HTMLCollection07.xhtml
               dom/html/level2/xhtml/HTMLCollection08.xhtml
               fast/dom/HTMLTableElement/early-acid3-65-excerpt.html
               fast/dom/HTMLTableElement/early-acid3-66-excerpt.html

        * GNUmakefile.am: Added HTMLTableRowsCollection.
        * WebCore.pro: Ditto.
        * WebCore.vcproj/WebCore.vcproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * WebCoreSources.bkl: Ditto.

        * dom/XMLTokenizer.cpp: Took out stray include.

        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::itemAfter): Removed all the table rows code, since we now use
        a separate class for that collection. Also got rid of the distinct types for custom collections
        that don't need them (use Other for both).
        * html/HTMLCollection.h: Also made firstItem non-virtual because it doesn't need to be virtual.

        * html/HTMLFormCollection.cpp:
        (WebCore::HTMLFormCollection::HTMLFormCollection): Use Other instead of FormElements
        for the HTMLCollection type.

        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::HTMLTableElement): Eliminated m_head, m_foot, m_firstBody, and m_caption.
        (WebCore::HTMLTableElement::caption): Added non-inline version. Finds the caption rather than
        keeping a pointer to it.
        (WebCore::HTMLTableElement::setCaption): Rewrote.
        (WebCore::HTMLTableElement::tHead): Ditto.
        (WebCore::HTMLTableElement::setTHead): Ditto.
        (WebCore::HTMLTableElement::tFoot): Ditto.
        (WebCore::HTMLTableElement::setTFoot): Ditto.
        (WebCore::HTMLTableElement::createTHead): Ditto.
        (WebCore::HTMLTableElement::deleteTHead): Ditto.
        (WebCore::HTMLTableElement::createTFoot): Ditto.
        (WebCore::HTMLTableElement::deleteTFoot): Ditto.
        (WebCore::HTMLTableElement::createCaption): Ditto.
        (WebCore::HTMLTableElement::deleteCaption): Ditto.
        (WebCore::HTMLTableElement::lastBody): Added.
        (WebCore::HTMLTableElement::insertRow): Rewrote to use a loop based on code in HTMLTableRowsCollection.
        This is different from the old code mainly in how it handles rows outside any section.
        (WebCore::HTMLTableElement::deleteRow): Ditto.
        (WebCore::HTMLTableElement::addChild): Removed code to set the various members. Keeping pointers to
        these was a possible source of serious bugs too, including crashes with stale pointers, although I
        didn't write any test cases to prove those bugs existed.
        (WebCore::HTMLTableElement::parseMappedAttribute): Changed the rules code to visit all cells, not
        just the cells of the first body. I believe this fixed rendering on some table tests. I think the code
        visits too many cells and also the use of recursion is overkill, but I didn't try to fix that.
        (WebCore::HTMLTableElement::rows): Changed to use the new HTMLTableRowsCollection.
        * html/HTMLTableElement.h: Changed functions to return PassRefPtr, which can be important if strange
        things like DOM mutation events take things ot of the tree before they are safely referenced by
        JavaScript wrappers. Also changed functions to take PassRefPtr and added exceptions. Removed unneeded
        firstTBody and setTBody functions and childrenChanged function override, as well as unused Rules and
        Frame enums. Removed m_head, m_foot, m_firstBody, and m_caption, and added lastBody function. Removed
        unneeded friend declaration for HTMLTableCellElement.
        * html/HTMLTableElement.idl: Allow the setteres for caption, tHead, and tFoot to raise exceptions.

        * html/HTMLTableRowsCollection.cpp: Added. Implements the HTML 5 rule for which rows are in the
        collection in which order.
        * html/HTMLTableRowsCollection.h: Added.

        * loader/FTPDirectoryDocument.cpp:
        (WebCore::FTPDirectoryTokenizer::appendEntry): Use the standard insertRow function instead of
        coming up with our own way of inserting a row. Simplifies things -- we can remove the code to
        create a tbody element.

LayoutTests:

        Reviewed by Maciej.

        - test for http://bugs.webkit.org/show_bug.cgi?id=16657
          Acid3 failure since table.caption and table.thead do not work for nodes added by appendChild
        - test for http://bugs.webkit.org/show_bug.cgi?id=16659
          Acid3 expects HTMLTableElement.rows to include a <tr> element that is an immediate child of the <table>

        * fast/dom/HTMLTableElement/early-acid3-65-excerpt-expected.txt: Added.
        * fast/dom/HTMLTableElement/early-acid3-65-excerpt.html: Added.
        * fast/dom/HTMLTableElement/early-acid3-66-excerpt-expected.txt: Added.
        * fast/dom/HTMLTableElement/early-acid3-66-excerpt.html: Added.
        * fast/dom/HTMLTableElement/resources/early-acid3-65-excerpt.js: Added.
        * fast/dom/HTMLTableElement/resources/early-acid3-66-excerpt.js: Added.

        * dom/html/level2/html/HTMLCollection07-expected.txt: Updated to reflect success.
        * dom/html/level2/html/HTMLCollection08-expected.txt: Updated to reflect success.
        * dom/xhtml/level2/html/HTMLCollection07-expected.txt: Updated to reflect success.
        * dom/xhtml/level2/html/HTMLCollection08-expected.txt: Updated to reflect success.

        * fast/dom/HTMLTableElement/resources/rows.js: Changed to expect HTML 5 behavior for rows outside
        table sections.
        * fast/dom/HTMLTableElement/rows-expected.txt: Updated.

        * platform/mac/tables/mozilla/bugs/bug30418-expected.checksum: Updated to reflect better results.
        * platform/mac/tables/mozilla/bugs/bug30418-expected.png: Ditto.
        * platform/mac/tables/mozilla/bugs/bug30418-expected.txt: Ditto.

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

12 years ago - try to fix Qt build
darin@apple.com [Thu, 3 Jan 2008 01:11:10 +0000 (01:11 +0000)]
    - try to fix Qt build

        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::foldCase): Add some missing const.

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

12 years ago Reviewed by Alice and Tim.
darin@apple.com [Thu, 3 Jan 2008 00:58:41 +0000 (00:58 +0000)]
    Reviewed by Alice and Tim.

        - try to fix GTK and Qt builds

        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::scroll): Improve logic slightly for the case of
        vertical scrolling when there's no vertical scroll bar.

        * platform/gtk/ScrollViewGtk.cpp:
        (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
        should be factored differently.
        * platform/qt/ScrollViewQt.cpp:
        (WebCore::ScrollView::scroll): Ditto.

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

12 years ago Reviewed by Anders.
darin@apple.com [Thu, 3 Jan 2008 00:32:19 +0000 (00:32 +0000)]
    Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=16712
          change StringImpl to take and return PassRefPtr instead of raw pointers

        Also eliminated use of const StringImpl. Since StringImpl is immutable there
        is no distinction between a const and non-const one at the moment.

        * WebCore.base.exp: Updated.

        * css/CSSHelper.cpp:
        (WebCore::parseURL): Make String directly, not by making a StringImpl.
        * dom/Attr.cpp:
        (WebCore::Attr::createTextChild): Convert AtomicString to String with domString,
        not via StringImpl.
        (WebCore::Attr::setValue): Remove unneed call to impl() when passing a String
        to a function that takes a String.

        * dom/CDATASection.cpp: Removed unused constructor.
        (WebCore::CDATASection::cloneNode): Added a now-needed .get().
        (WebCore::CDATASection::createNew): Changed function to take a PassRefPtr.
        * dom/CDATASection.h:

        * dom/CharacterData.cpp:
        (WebCore::CharacterData::CharacterData): Removed unneeded initialization and
        ref() now that the string is a RefPtr. Also updated to not call "new StringImpl".
        (WebCore::CharacterData::~CharacterData): Removed unneeded deref() since it's
        a RefPtr.
        (WebCore::CharacterData::setData): More of that.
        (WebCore::CharacterData::substringData): Ditto.
        (WebCore::CharacterData::appendData): Ditto.
        (WebCore::CharacterData::insertData): Ditto.
        (WebCore::CharacterData::deleteData): Ditto.
        (WebCore::CharacterData::replaceData): Ditto.
        (WebCore::CharacterData::nodeValue): Ditto.
        (WebCore::CharacterData::dispatchModifiedEvent): Ditto.
        (WebCore::CharacterData::dump): Ditto.
        * dom/CharacterData.h: Changed to use a RefPtr. I could have used a String
        instead, but since String adds extra branches to handle 0, I figured it was
        more conservative to just use RefPtr. Later it would be good to figure out
        which is preferred style and be more consistent. Maybe we'll phase out
        StringImpl, or maybe we'll go the other way and use it more since it can be
        more efficient.

        * dom/DOMImplementation.cpp:
        (WebCore::addString): Changed set to use String rather than StringImpl.
        (WebCore::isSVG10Feature): Ditto.
        (WebCore::isSVG11Feature): Ditto.
        (WebCore::DOMImplementation::createDocument): Replaced custom code to
        find a colon with a call to String::find.

        * dom/Range.cpp:
        (WebCore::Range::insertNode): Updated since the result of splitText is now
        a PassRefPtr.

        * dom/Text.cpp:
        (WebCore::Text::splitText): Updated since str is now a RefPtr. Also made the
        result of this function be a PassRefPtr.
        (WebCore::Text::createRenderer): Ditto.
        (WebCore::Text::createNew): Made the parameter and result both be PassRefPtr.
        * dom/Text.h:

        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::nodeName): Use String::upper.

        * html/HTMLInputElement.cpp:
        (WebCore::numGraphemeClusters): Remove now-unneeded const.
        (WebCore::numCharactersInGraphemeClusters): Ditto.

        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::processToken): Updated for function name change.

        * platform/text/AtomicString.cpp:
        (WebCore::CStringTranslator::translate): Updated since there is no longer
        a constructor that takes a string.

        * platform/text/PlatformString.h: Added new constructors that take
        PassRefPtr and RefPtr. Removed misleading comment.

        * platform/text/String.cpp:
        (WebCore::String::String): Changed to use StringImpl::create, which handles
        the empty string automatically.
        (WebCore::String::append): Ditto.
        (WebCore::String::charactersWithNullTermination): Similar.
        (WebCore::String::format): Ditto.

        * platform/text/StringHash.h: Took out unneeded const.

        * platform/text/StringImpl.cpp:
        (WebCore::deleteUCharVector): Changed to take a const pointer since the
        buffers are now const UChar buffers.
        (WebCore::StringImpl::StringImpl): Removed some constructors. Got rid of the
        separate init functions. The constructors are now private and used only in
        the create functions and one or two other places.
        (WebCore::StringImpl::containsOnlyWhitespace): Removed now-meaningless const.
        (WebCore::StringImpl::substring): Ditto. Also changed return value to be a
        PassRefPtr.
        (WebCore::StringImpl::characterStartingAt): Ditto.
        (WebCore::StringImpl::toLength): Ditto.
        (WebCore::StringImpl::toCoordsArray): Ditto.
        (WebCore::StringImpl::toLengthArray): Ditto.
        (WebCore::StringImpl::isLower): Ditto.
        (WebCore::StringImpl::lower): Ditto. Changed to use Vector and adopt so we
        don't have to use new directly here. Makes empty string handling more consistent.
        (WebCore::StringImpl::upper): Ditto.
        (WebCore::StringImpl::secure): Ditto.
        (WebCore::StringImpl::foldCase): Ditto.
        (WebCore::StringImpl::stripWhiteSpace): Ditto.
        (WebCore::StringImpl::simplifyWhiteSpace): Ditto.
        (WebCore::StringImpl::capitalize): Ditto.
        (WebCore::StringImpl::toInt): Removed now-meaningless const.
        (WebCore::StringImpl::toInt64): Ditto.
        (WebCore::StringImpl::toUInt64): Ditto.
        (WebCore::StringImpl::toDouble): Ditto.
        (WebCore::StringImpl::toFloat): Ditto.
        (WebCore::StringImpl::find): Ditto.
        (WebCore::StringImpl::reverseFind): Ditto.
        (WebCore::StringImpl::endsWith): Ditto.
        (WebCore::StringImpl::replace): Ditto.
        (WebCore::equal): Ditto.
        (WebCore::equalIgnoringCase): Ditto.
        (WebCore::StringImpl::ascii): Ditto.
        (WebCore::StringImpl::defaultWritingDirection): Ditto.
        (WebCore::StringImpl::createStrippingNullCharacters): Ditto.
        (WebCore::StringImpl::adopt): Added special case so this uses the shared
        empty string like other functions. Also optimized the common case where the
        vector happens to already have the right size so we don't do a fastRealloc
        at all in those cases.
        (WebCore::StringImpl::create): Added. These are now the public functions for
        creating new StringImpl objects. They all implement the shared empty string.
        (WebCore::StringImpl::createWithTerminatingNullCharacter):
        * platform/text/StringImpl.h:

        * platform/text/cf/StringCF.cpp:
        (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
        * platform/text/cf/StringImplCF.cpp:
        (WebCore::StringImpl::createCFString): Removed now-obsolete const.
        * platform/text/mac/StringImplMac.mm:
        (WebCore::StringImpl::operator NSString *): Ditto.
        * platform/text/mac/StringMac.mm:
        (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
        * platform/text/qt/StringQt.cpp:
        (WebCore::String::String): Ditto.
        * platform/text/wx/StringWx.cpp:
        (WebCore::String::String): Ditto.
        * rendering/RenderBR.cpp:
        (WebCore::RenderBR::RenderBR): Ditto.

        * rendering/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::RenderSVGInlineText): Use PassRefPtr.
        * rendering/RenderSVGInlineText.h:

        * rendering/RenderText.cpp:
        (WebCore::charactersAreAllASCII): Removed now-unneeded const.
        * rendering/RenderTextFragment.cpp:
        (WebCore::RenderTextFragment::originalText): Use RefPtr.

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

12 years ago Reviewed by Oliver Hunt.
timothy@apple.com [Thu, 3 Jan 2008 00:07:38 +0000 (00:07 +0000)]
    Reviewed by Oliver Hunt.

        <rdar://problem/5618086> WebInspector does not expand the DOM tree after being closed

        Closing the Web Inspector causes the DOM tree outline to be torn down, clearing the
        internal element lookup tables. The represented DOM node object still holds the identifier
        it was assigned, and a later call to findTreeElement will use that original identifier
        against a cleared lookup table. In that case we need to fallback on DOM ancestor lookup.

        * page/inspector/treeoutline.js:
        (TreeOutline.prototype.findTreeElement): If the DOM node already had a __treeElementIdentifier,
        but the TreeOutline no longer has the element in the _knownTreeElements list do an ancestor lookup
        instead of an early return.

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

12 years agoJavaScriptCore:
alice.liu@apple.com [Wed, 2 Jan 2008 23:53:46 +0000 (23:53 +0000)]
JavaScriptCore:

        Reviewed by Sam Weinig.

        need to export ASCIICType.h for use in DRT

        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * wtf/ASCIICType.h:
        (WTF::isASCIIUpper):

WebKitTools:

        Reviewed by Sam Weinig.

        fixing assertion hit with editing/selection/move-begin-end.html

        * DumpRenderTree/ForwardingHeaders/wtf/ASCIICType.h: Added.
        * DumpRenderTree/win/DumpRenderTree.vcproj:
        * DumpRenderTree/win/EventSender.cpp:
        (keyDownCallback):
        using isupper will cause an assertion for inputs outside of ascii range. use isASCIIUpper instead.

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

12 years ago * Scripts/do-webcore-rename: Some more name change plans.
darin@apple.com [Wed, 2 Jan 2008 23:46:09 +0000 (23:46 +0000)]
    * Scripts/do-webcore-rename: Some more name change plans.

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

12 years agoWebCore:
alice.liu@apple.com [Wed, 2 Jan 2008 22:58:50 +0000 (22:58 +0000)]
WebCore:

        Reviewed by Maciej.

        Fixed <rdar://5283861> (problems scrolling in gmail message content area)

        * platform/ScrollView.h:
        * platform/win/ScrollViewWin.cpp:
        (WebCore::ScrollView::scroll):
         Changed return value to bool to reflect success of scroll attempt

WebKit/win:

        Reviewed by Maciej.

        Fixed <rdar://5283861> (problems scrolling in gmail message content area)

        * WebView.cpp:
        (WebView::keyDown):
        bubble scrolling from a key event

LayoutTests:

        Reviewed by Maciej.

        Added test for <rdar://5283861> (problems scrolling in gmail message content area)

        * fast/frames/iframe-scroll-page-up-down-expected.txt: Added.
        * fast/frames/iframe-scroll-page-up-down.html: Added.
        * fast/frames/resources/iframe-scroll-page-up-down-1.html: Added.
        * fast/frames/resources/iframe-scroll-page-up-down-2.html: Added.

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

12 years ago Reviewed by Maciej.
alice.liu@apple.com [Wed, 2 Jan 2008 22:37:42 +0000 (22:37 +0000)]
    Reviewed by Maciej.

        Added handling for page up and page down in EventSender

        * DumpRenderTree/mac/EventSendingController.mm:
        (-[EventSendingController keyDown:withModifiers:]):
        * DumpRenderTree/win/EventSender.cpp:
        (keyDownCallback):

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

12 years ago * platform/win/Skipped: Added some more failures.
aroben@apple.com [Wed, 2 Jan 2008 22:23:17 +0000 (22:23 +0000)]
    * platform/win/Skipped: Added some more failures.

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

12 years ago Reviewed by Beth Dakin.
weinig@apple.com [Wed, 2 Jan 2008 21:32:39 +0000 (21:32 +0000)]
    Reviewed by Beth Dakin.

        Cleanup error_object.h/cpp.

        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::reset):
        * kjs/error_object.cpp:
        (KJS::):
        (KJS::ErrorInstance::ErrorInstance):
        (KJS::ErrorPrototype::ErrorPrototype):
        (KJS::ErrorProtoFuncToString::ErrorProtoFuncToString):
        (KJS::ErrorProtoFuncToString::callAsFunction):
        (KJS::ErrorObjectImp::ErrorObjectImp):
        (KJS::ErrorObjectImp::implementsConstruct):
        (KJS::ErrorObjectImp::construct):
        (KJS::ErrorObjectImp::callAsFunction):
        (KJS::NativeErrorPrototype::NativeErrorPrototype):
        (KJS::NativeErrorImp::NativeErrorImp):
        (KJS::NativeErrorImp::implementsConstruct):
        (KJS::NativeErrorImp::construct):
        (KJS::NativeErrorImp::callAsFunction):
        (KJS::NativeErrorImp::mark):
        * kjs/error_object.h:
        (KJS::ErrorInstance::classInfo):
        (KJS::NativeErrorImp::classInfo):

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

12 years ago Fixed a typo (pointed out in review, but I somehow missed it at first).
ap@webkit.org [Wed, 2 Jan 2008 21:07:26 +0000 (21:07 +0000)]
    Fixed a typo (pointed out in review, but I somehow missed it at first).

        * editing/EditorCommand.cpp: (WebCore::executeDelete):

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

12 years ago Get the Windows bots closer to green
aroben@apple.com [Wed, 2 Jan 2008 20:24:23 +0000 (20:24 +0000)]
    Get the Windows bots closer to green

        * platform/win/Skipped: Added some new failures.
        * platform/win/fast/dom/Window/window-properties-expected.txt: Updated
        these results.

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

12 years ago Reviewed by Darin.
ap@webkit.org [Wed, 2 Jan 2008 19:14:00 +0000 (19:14 +0000)]
    Reviewed by Darin.

        Fix fast/events/arrow-keys-on-body.html for real.

        * DumpRenderTree/win/EventSender.cpp: (keyDownCallback): Pass proper keyData for WM_KEYUP, too.

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

12 years ago Reviewed by Darin.
ap@webkit.org [Wed, 2 Jan 2008 18:31:13 +0000 (18:31 +0000)]
    Reviewed by Darin.

        Resolved several FIXMEs in EditorCommand.
        Made recently added commands hidden from JS again.
        Removed BackwardDelete implementation, which used to be dead code, but got exposed now.

        Tests: editing/execCommand/delete-no-scroll.html
               editing/execCommand/forward-delete-no-scroll.html
               editing/execCommand/insert-line-break-no-scroll.html

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

12 years ago Reviewed by Darin.
ap@webkit.org [Wed, 2 Jan 2008 17:34:41 +0000 (17:34 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14555
        action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice

        http://bugs.webkit.org/show_bug.cgi?id=14774
        Submitted data only includes first input item

        Reworked encoding of mailto URLs to match other browsers.
        Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit().

        Tests: fast/forms/mailto/advanced-get.html
               fast/forms/mailto/advanced-put.html
               fast/forms/mailto/get-multiple-items-text-plain.html
               fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html
               fast/forms/mailto/get-multiple-items.html
               fast/forms/mailto/get-non-ascii.html
               fast/forms/mailto/get-non-ascii-text-plain.html
               fast/forms/mailto/get-overwrite-query.html
               fast/forms/mailto/post-append-query.html
               fast/forms/mailto/post-multiple-items-multipart-form-data.html
               fast/forms/mailto/post-multiple-items-text-plain.html
               fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html
               fast/forms/mailto/post-multiple-items.html

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submit):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::submitForm):

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

12 years agoAutotools build fix.
mrowe@apple.com [Wed, 2 Jan 2008 16:01:11 +0000 (16:01 +0000)]
Autotools build fix.

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

12 years agoAdd missing dependencies to some GNUmakefile.am rules.
mrowe@apple.com [Wed, 2 Jan 2008 15:14:24 +0000 (15:14 +0000)]
Add missing dependencies to some GNUmakefile.am rules.

Rubber-stamped by Alp Toker.

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

12 years agoAutotools fix. Add missing dependency on grammar.y.
mrowe@apple.com [Wed, 2 Jan 2008 14:42:23 +0000 (14:42 +0000)]
Autotools fix.  Add missing dependency on grammar.y.

Rubber-stamped by Alp Toker.

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

12 years agoAutotools build fix. Make can expand $@ to any of the targets for the rule,
mrowe@apple.com [Wed, 2 Jan 2008 14:42:02 +0000 (14:42 +0000)]
Autotools build fix.  Make can expand $@ to any of the targets for the rule,
while we always want to use the name of the .cpp file as the output file.

Reviewed by Alp Toker.

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

12 years ago2008-01-02 Luca Bruno <lethalman88@gmail.com>
alp@webkit.org [Wed, 2 Jan 2008 12:56:30 +0000 (12:56 +0000)]
2008-01-02  Luca Bruno  <lethalman88@gmail.com>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=16674
        [GTK] run-launcher sets wrong LD_LIBRARY_PATH

        * Scripts/run-launcher:

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

12 years ago2008-01-02 Luca Bruno <lethalman88@gmail.com>
alp@webkit.org [Wed, 2 Jan 2008 10:25:57 +0000 (10:25 +0000)]
2008-01-02  Luca Bruno  <lethalman88@gmail.com>

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=16115
        [GTK] ContextMenu and ContextMenuItem lacks an implementation

        Add context menu support.

        Based on a patch by Holger Freyther.

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

12 years ago2008-01-02 Alp Toker <alp@atoker.com>
alp@webkit.org [Wed, 2 Jan 2008 09:07:31 +0000 (09:07 +0000)]
2008-01-02  Alp Toker  <alp@atoker.com>

        GTK+ autotools build fix. Track changes in r29073.

        * GNUmakefile.am:

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

12 years ago - fix release build
darin@apple.com [Wed, 2 Jan 2008 07:03:21 +0000 (07:03 +0000)]
    - fix release build

        * bindings/js/kjs_binding.cpp:
        (KJS::setDOMException): Initialize to avoid uninitialized variable warning.
        Removed default so we get a warning if there's a missing case.

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

12 years ago Scripting MIME Types application/ecmascript, application/javascript not viewable
ddkilzer@apple.com [Wed, 2 Jan 2008 06:59:10 +0000 (06:59 +0000)]
    Scripting MIME Types application/ecmascript, application/javascript not viewable
        <http://bugs.webkit.org/show_bug.cgi?id=11063>

        Reviewed by Darin.

        This patch consolidates the list of acceptable MIME types for JavaScript
        source into the MIMETypeRegistry class, and replaces checks for these
        types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType().

        No tests added since viewing JavaScript source is not testable.

        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::isTextMIMEType): Use
        MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single
        hard-coded MIME type, "application/x-javascript".

        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of
        JavaScript MIME types from here to
        MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes().

        * platform/MIMETypeRegistry.cpp:
        (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of
        MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript().
        (WebCore::initialiseSupportedNonImageMimeTypes): Remove single
        hard-coded MIME type, "application/x-javascript", from the list.
        (WebCore::initialiseMIMETypeRegistry): Initialise
        supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes
        with values in supportedJavaScriptMIMETypes.
        (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added.

        * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType().

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

12 years agoFix wx build
weinig@apple.com [Wed, 2 Jan 2008 06:54:37 +0000 (06:54 +0000)]
Fix wx build

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

12 years agoJavaScriptCore:
darin@apple.com [Wed, 2 Jan 2008 06:44:22 +0000 (06:44 +0000)]
JavaScriptCore:

        Reviewed by Eric.

        - fix for http://bugs.webkit.org/show_bug.cgi?id=16695
          JSC allows non-identifier codepoints in identifiers (affects Acid3)

        Test: fast/js/kde/parse.html

        * kjs/lexer.cpp:
        (KJS::Lexer::lex): Added additional states to distinguish Unicode escapes at the
        start of identifiers from ones inside identifiers. Rejected characters that don't pass
        the isIdentStart and isIdentPart tests.
        (KJS::Lexer::convertUnicode): Removed incorrect FIXME comment.

        * kjs/lexer.h: Added new states to distinguish \u escapes at the start of identifiers
        from \u escapes inside identifiers.

LayoutTests:

        Reviewed by Eric.

        - test for http://bugs.webkit.org/show_bug.cgi?id=16695
          JSC allows non-identifier codepoints in identifiers (affects Acid3)

        * fast/js/kde/parse-expected.txt: Updated.
        * fast/js/kde/resources/parse.js: Added tests that cover both the
        non-ASCII characters themselves and the same characters parsed as
        \u sequences.

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

12 years agoFix a stray executable bit.
darin@apple.com [Wed, 2 Jan 2008 06:38:08 +0000 (06:38 +0000)]
Fix a stray executable bit.

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

12 years agoWebCore:
weinig@apple.com [Wed, 2 Jan 2008 05:46:41 +0000 (05:46 +0000)]
WebCore:

        Reviewed by Darin.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=16691
        Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)

        - Create JS objects for all the different types of exceptions, each with there own prototype and constructor.
        - Abstract all the logic and storage for exception classes in to an ExceptionBase class.
        - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException).

        Tests: fast/dom/DOMException/EventException.html
               fast/dom/DOMException/RangeException.html
               fast/dom/DOMException/XPathException.html
               http/tests/xmlhttprequest/XMLHttpRequestException.html
               svg/custom/SVGException.html

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * bindings/js/JSSVGMatrixCustom.cpp:
        (WebCore::JSSVGMatrix::inverse):
        (WebCore::JSSVGMatrix::rotateFromVector):
        * bindings/js/kjs_binding.cpp:
        (KJS::setDOMException):
        * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined
        in the IDL as the ObjC bindings do.
        * bindings/scripts/CodeGeneratorObjC.pm:
        * dom/DOMCoreException.cpp: Removed.
        * dom/DOMCoreException.h:
        (WebCore::DOMCoreException::DOMCoreException):
        * dom/DOMCoreException.idl:
        * dom/Event.h:
        * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h.
        (WebCore::EventException::EventException):
        (WebCore::EventException::):
        * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl.
        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchEvent):
        * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp.
        (WebCore::ExceptionBase::ExceptionBase):
        (WebCore::ExceptionBase::toString):
        * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h.
        (WebCore::ExceptionBase::code):
        * dom/ExceptionCode.cpp:
        (WebCore::getExceptionCodeDescription):
        * dom/ExceptionCode.h:
        (WebCore::):
        * dom/Range.cpp:
        (WebCore::Range::insertNode):
        (WebCore::Range::checkNodeWOffset):
        (WebCore::Range::checkNodeBA):
        (WebCore::Range::selectNode):
        (WebCore::Range::selectNodeContents):
        (WebCore::Range::surroundContents):
        * dom/RangeException.h:
        (WebCore::RangeException::RangeException):
        (WebCore::RangeException::):
        * dom/RangeException.idl:
        * page/DOMWindow.idl:
        * svg/SVGColor.cpp:
        (WebCore::SVGColor::setRGBColor):
        * svg/SVGException.h:
        (WebCore::SVGException::SVGException):
        (WebCore::SVGException::):
        * svg/SVGException.idl:
        * svg/SVGLocatable.cpp:
        (WebCore::SVGLocatable::getTransformToElement):
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::dispatchEvent):
        (WebCore::XMLHttpRequest::open):
        (WebCore::XMLHttpRequest::send):
        * xml/XMLHttpRequest.h:
        * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h.
        (WebCore::XMLHttpRequestException::XMLHttpRequestException):
        (WebCore::XMLHttpRequestException::):
        * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl.
        * xml/XPathEvaluator.h:
        * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h.
        (WebCore::XPathException::XPathException):
        (WebCore::XPathException::):
        * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl.
        * xml/XPathParser.cpp:
        (WebCore::XPath::Parser::parseStatement):
        * xml/XPathResult.cpp:
        (WebCore::XPathResult::convertTo):
        (WebCore::XPathResult::numberValue):
        (WebCore::XPathResult::stringValue):
        (WebCore::XPathResult::booleanValue):
        (WebCore::XPathResult::singleNodeValue):
        (WebCore::XPathResult::snapshotLength):
        (WebCore::XPathResult::iterateNext):
        (WebCore::XPathResult::snapshotItem):

LayoutTests:

        Reviewed by Darin.

        Tests for http://bugs.webkit.org/show_bug.cgi?id=16691
        Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)

        * fast/dom/DOMException/EventException-expected.txt: Added.
        * fast/dom/DOMException/EventException.html: Copied from LayoutTests/fast/dom/DOMException/prototype-object.html.
        * fast/dom/DOMException/RangeException-expected.txt: Added.
        * fast/dom/DOMException/RangeException.html: Copied from LayoutTests/fast/dom/DOMException/prototype-object.html.
        * fast/dom/DOMException/XPathException-expected.txt: Added.
        * fast/dom/DOMException/XPathException.html: Copied from LayoutTests/fast/dom/DOMException/prototype-object.html.
        * fast/dom/DOMException/resources/EventException.js: Copied from LayoutTests/fast/dom/DOMException/resources/prototype-object.js.
        * fast/dom/DOMException/resources/RangeException.js: Copied from LayoutTests/fast/dom/DOMException/resources/prototype-object.js.
        * fast/dom/DOMException/resources/XPathException.js: Copied from LayoutTests/fast/dom/DOMException/resources/prototype-object.js.
        * fast/dom/Window/window-properties-expected.txt:
        * http/tests/xmlhttprequest/XMLHttpRequestException-expected.txt: Added.
        * http/tests/xmlhttprequest/XMLHttpRequestException.html: Added.
        * svg/custom/SVGException-expected.txt: Added.
        * svg/custom/SVGException.html: Copied from LayoutTests/fast/dom/DOMException/prototype-object.html.
        * svg/custom/resources/SVGException.js: Copied from LayoutTests/fast/dom/DOMException/resources/prototype-object.js.

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

12 years ago Reviewed by Dan.
ddkilzer@apple.com [Wed, 2 Jan 2008 00:38:18 +0000 (00:38 +0000)]
    Reviewed by Dan.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16700
          Fix -[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]

        * DefaultDelegates/WebDefaultPolicyDelegate.m: Check return value of
        -[NSFileManager fileExistsAtPath:isDirectory:] before using the value
        of isDirectory.

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

12 years ago Remove JSDomExceptionConstructor.lut.h from clean step
weinig@apple.com [Tue, 1 Jan 2008 20:44:05 +0000 (20:44 +0000)]
    Remove JSDomExceptionConstructor.lut.h from clean step
        as it no longer exists.

        * GNUmakefile.am:

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

12 years ago - Windows build fix
mitz@apple.com [Tue, 1 Jan 2008 20:42:46 +0000 (20:42 +0000)]
    - Windows build fix

        * WebCore.vcproj/WebCore.vcproj:

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

12 years agoAttempt to fix the Windows bots until they can get the Windows SDK installed.
pewtermoose@webkit.org [Tue, 1 Jan 2008 19:52:11 +0000 (19:52 +0000)]
Attempt to fix the Windows bots until they can get the Windows SDK installed.

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

12 years ago - rolled scope chain optimization out; it was breaking the world
darin@apple.com [Tue, 1 Jan 2008 19:47:21 +0000 (19:47 +0000)]
    - rolled scope chain optimization out; it was breaking the world

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

12 years ago Reviewed by Geoff.
darin@apple.com [Tue, 1 Jan 2008 19:35:37 +0000 (19:35 +0000)]
    Reviewed by Geoff.

        - http://bugs.webkit.org/show_bug.cgi?id=16685
          eliminate List::empty() to cut down on PIC branches

        Also included one other speed-up -- remove the call to reserveCapacity from
        FunctionBodyNode::processDeclarations in all but the most unusual cases.

        Together these make SunSpider 1.016x as fast.

        * JavaScriptCore.exp: Updated.
        * kjs/ExecState.cpp:
        (KJS::globalEmptyList): Added. Called only when creating global ExecState
        instances.
        (KJS::ExecState::ExecState): Broke constructor up into three separate functions,
        for the three separate node types. Also went through each of the three and
        streamlined as much as possible, removing dead code. This prevents us from having
        to access the global in the function body version of the constructor.

        * kjs/ExecState.h: Added emptyList(). Replaced the constructor with a set of
        three that are specific to the different node types that can create new execution
        state objects.

        * kjs/array_object.cpp:
        (KJS::ArrayProtoFuncToLocaleString::callAsFunction): Use exec->emptyList() instead
        of List::empty().
        (KJS::ArrayProtoFuncConcat::callAsFunction): Ditto.
        (KJS::ArrayProtoFuncSlice::callAsFunction): Ditto.
        (KJS::ArrayProtoFuncSplice::callAsFunction): Ditto.
        (KJS::ArrayProtoFuncFilter::callAsFunction): Ditto.
        * kjs/function.cpp:
        (KJS::FunctionImp::callAsFunction): Updated to call new ExecState constructor.
        (KJS::GlobalFuncImp::callAsFunction): Ditto (for eval).
        * kjs/function_object.cpp:
        (FunctionObjectImp::construct): Use exec->emptyList() instead of List::empty().

        * kjs/list.cpp: Removed List::empty.
        * kjs/list.h: Ditto.

        * kjs/nodes.cpp:
        (KJS::ElementNode::evaluate): Use exec->emptyList() instead of List::empty().
        (KJS::ArrayNode::evaluate): Ditto.
        (KJS::ObjectLiteralNode::evaluate): Ditto.
        (KJS::PropertyListNode::evaluate): Ditto.
        (KJS::FunctionBodyNode::processDeclarations): Another speed-up. Check the capacity
        before calling reserveCapacity, because it doesn't get inlined the local storage
        vector is almost always big enough -- saving the function call overhead is a big
        deal.
        (KJS::FuncDeclNode::makeFunction): Use exec->emptyList() instead of List::empty().
        (KJS::FuncExprNode::evaluate): Ditto.
        * kjs/object.cpp:
        (KJS::tryGetAndCallProperty): Ditto.
        * kjs/property_slot.cpp:
        (KJS::PropertySlot::functionGetter): Ditto.
        * kjs/string_object.cpp:
        (KJS::StringProtoFuncSplit::callAsFunction): Ditto.

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

12 years agoJavaScriptCore:
darin@apple.com [Tue, 1 Jan 2008 19:16:06 +0000 (19:16 +0000)]
JavaScriptCore:

        Reviewed by Geoff.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16648
          REGRESSION (r28165): Yuku.com navigation prints "jsRegExpExecute failed with result -2"
          <rdar://problem/5646486> REGRESSION (r28165): Layout test fast/regex/test1 fails intermittently

        Fixes 34 failing test cases in the fast/regex/test1.html test.

        Restored the stack which prevents infinite loops for brackets that match the empty
        string; it had been removed as an optimization.

        Unfortunately, restoring this stack causes the regular expression test in SunSpider
        to be 1.095x as slow and the overall test to be 1.004x as slow. Maybe we can find
        a correct optimization to restore the speed!

        It's possible the original change was on the right track but just off by one.

        * pcre/pcre_exec.cpp: Add back eptrblock, but name it BracketChainNode.
        (MatchStack::pushNewFrame): Add back the logic needed here.
        (startNewGroup): Ditto.
        (match): Ditto.

LayoutTests:

        Reviewed by Geoff.

        - updated test results for https://bugs.webkit.org/show_bug.cgi?id=16648

        * fast/regex/test1-expected.txt: Update results changed by restoring the logic to
        avoid failing on infinite repeats of brackets that match the empty string.

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

12 years ago Reviewed by Geoff.
darin@apple.com [Tue, 1 Jan 2008 19:13:40 +0000 (19:13 +0000)]
    Reviewed by Geoff.

        - http://bugs.webkit.org/show_bug.cgi?id=16683
          speed up function calls by making ScopeChain::push cheaper

        This gives a 1.019x speedup on SunSpider.

        After doing this, I realized this probably will be obsolete when the optimization
        to avoid creating an activation object is done. When we do that one we should check
        if rolling this out will speed things up, since this does add overhead at the time
        you copy the scope chain.

        * kjs/object.h: Removed the ScopeChain::release function. It was
        marked inline, and called in exactly one place, so moved it there.
        No idea why it was in this header file!

        * kjs/scope_chain.cpp: Removed the overload of the ScopeChain::push
        function that takes another ScopeChain. It was unused. I think we used
        it over in WebCore at one point, but not any more.

        * kjs/scope_chain.h: Changed ScopeChainNode into a struct rather than
        a class, got rid of its constructor so we can have one that's uninitialized,
        and moved the refCount into a derived struct, ScopeChainHeapNode. Made _node
        mutable so it can be changed in the moveToHeap function. Changed the copy
        constructor and assignment operator to call moveToHeap, since the top node
        can't be shared when it's embedded in another ScopeChain object. Updated
        functions as needed to handle the case where the first object isn't on the
        heap or to add casts for cases where it's guaranteed to be. Changed the push
        function to always put the new node into the ScopeChain object; it will get
        put onto the heap when needed later.

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

12 years ago Reviewed by Darin Adler.
ggaren@apple.com [Tue, 1 Jan 2008 18:57:03 +0000 (18:57 +0000)]
    Reviewed by Darin Adler.

        Fixed slight logic error in reserveCapacity, where we would reallocate
        the storage buffer unnecessarily.

        * wtf/Vector.h:
        (WTF::::reserveCapacity): No need to grow the buffer if newCapacity is
        equal to capacity().

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

12 years ago Try again to fix the builds
weinig@apple.com [Tue, 1 Jan 2008 18:05:45 +0000 (18:05 +0000)]
    Try again to fix the builds

        * DerivedSources.make:

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

12 years ago Fix non-mac builds.
weinig@apple.com [Tue, 1 Jan 2008 17:45:22 +0000 (17:45 +0000)]
    Fix non-mac builds.

        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCoreSources.bkl:

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

12 years ago Reviewed by Alexey.
eric@webkit.org [Tue, 1 Jan 2008 10:40:57 +0000 (10:40 +0000)]
    Reviewed by Alexey.

        Don't replace \ with / in data: urls
        http://bugs.webkit.org/show_bug.cgi?id=16692

        Test: fast/loader/url-data-replace-backslash.html

        * platform/KURL.cpp:
        (WebCore::KURL::init):

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

12 years ago2008-01-01 Alp Toker <alp@atoker.com>
alp@webkit.org [Tue, 1 Jan 2008 09:05:54 +0000 (09:05 +0000)]
2008-01-01  Alp Toker  <alp@atoker.com>

        GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
        correct parameter to AM_INIT_AUTOMAKE.

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

12 years ago Reviewed by Oliver.
darin@apple.com [Tue, 1 Jan 2008 08:43:59 +0000 (08:43 +0000)]
    Reviewed by Oliver.

        - http://bugs.webkit.org/show_bug.cgi?id=16684
          eliminate debugger overhead from function body execution

        Speeds SunSpider up 1.003x. That's a small amount, but measurable.

        * JavaScriptCore.exp: Updated.
        * kjs/Parser.h:
        (KJS::Parser::parse): Create the node with a static member function named create() instead
        of using new explicitly.

        * kjs/grammar.y: Changed calls to new FunctionBodyNode to use FunctionBodyNode::create().

        * kjs/nodes.cpp:
        (KJS::ProgramNode::create): Added. Calls new.
        (KJS::EvalNode::create): Ditto.
        (KJS::FunctionBodyNode::create): Ditto, but creates FunctionBodyNodeWithDebuggerHooks
        when a debugger is present.
        (KJS::FunctionBodyNode::execute): Removed debugger hooks.
        (KJS::FunctionBodyNodeWithDebuggerHooks::FunctionBodyNodeWithDebuggerHooks): Added.
        (KJS::FunctionBodyNodeWithDebuggerHooks::execute): Calls the debugger, then the code,
        then the debugger again.

        * kjs/nodes.h: Added create functions, made the constructors private and protected.

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

12 years agoWebCore:
weinig@apple.com [Tue, 1 Jan 2008 03:04:16 +0000 (03:04 +0000)]
WebCore:

        Reviewed by Darin.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
        Acid3 expects ExeceptionCode constants to be defined on DOMException objects

        - Make DOMException a real JS object.

        Test: fast/dom/DOMException/prototype-object.html

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:

        This is no longer needed as the autogenerated classes now includes the
        constructor.
        * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
        * bindings/js/JSDOMExceptionConstructor.h: Removed.

        Create on demand and use the new class for DOMExceptions.
        * bindings/js/kjs_binding.cpp:
        (KJS::setDOMException):

        Remove no longer needed custom constructor getter.
        * bindings/js/kjs_window.cpp:
        (KJS::Window::getValueProperty):

        Don't expose DOMCoreException as the name of class by special casing
        the user visible class name to be DOMException.
        * bindings/scripts/CodeGeneratorJS.pm:

        The DOMException class/file needs to be named DOMCoreException because there is
        name conflict with one of the Objective-C bindings classes.  It should be renamed
        to DOMException when the Objective-C bindings are moved into WebKit.
        * dom/DOMCoreException.cpp: Added.
        (WebCore::DOMCoreException::DOMCoreException):
        (WebCore::DOMCoreException::toString):
        * dom/DOMCoreException.h: Added.
        (WebCore::DOMCoreException::):
        (WebCore::DOMCoreException::code):
        (WebCore::DOMCoreException::name):
        (WebCore::DOMCoreException::message):
        * dom/DOMCoreException.idl: Added.
        * page/DOMWindow.idl:

LayoutTests:

        Reviewed by Darin.

        Test for http://bugs.webkit.org/show_bug.cgi?id=16637
        Acid3 expects ExeceptionCode constants to be defined on DOMException objects

        * fast/dom/DOMException: Added.
        * fast/dom/DOMException/prototype-object-expected.txt: Added.
        * fast/dom/DOMException/prototype-object.html: Added.
        * fast/dom/DOMException/resources: Added.
        * fast/dom/DOMException/resources/prototype-object.js: Added.
        * fast/dom/Window/window-properties-expected.txt:
        * http/tests/xmlhttprequest/connection-error-sync-expected.txt:

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

12 years ago Re-enable querySelector and querySelectorAll and touch the necessary files...
weinig@apple.com [Tue, 1 Jan 2008 02:01:46 +0000 (02:01 +0000)]
    Re-enable querySelector and querySelectorAll and touch the necessary files to not
        kill the windows build.

        * WebCore.vcproj/build-generated-files.sh:
        * bindings/scripts/CodeGeneratorCOM.pm:
        * dom/Document.idl:
        * dom/Element.idl:

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

12 years ago * fast/dom/HTMLFormElement/elements-not-in-document-expected.txt: Updated...
darin@apple.com [Tue, 1 Jan 2008 01:45:15 +0000 (01:45 +0000)]
    * fast/dom/HTMLFormElement/elements-not-in-document-expected.txt: Updated results to expect success.
        I accdidentally landed an expected failure instead!

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

12 years ago - fix Windows build
darin@apple.com [Tue, 1 Jan 2008 01:37:55 +0000 (01:37 +0000)]
    - fix Windows build

        * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing
        up as pure virtual functions. Sam can fix this later.
        * dom/Element.idl: Ditto.

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

12 years agoWebCore:
mitz@apple.com [Tue, 1 Jan 2008 01:32:00 +0000 (01:32 +0000)]
WebCore:

        Reviewed by Darin Adler.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14134
          <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items

        Test: fast/dynamic/create-renderer-for-whitespace-only-text.html

        * dom/Node.cpp:
        (WebCore::Node::attach): Added code to check if this node's renderer
        has become the "previous renderer" of any sibling text node, and if so,
        ensure that that node gets a renderer if it now needs one.
        (WebCore::Node::createRendererIfNeeded): Removed the assertion that the
        node is not attached.

LayoutTests:

        Reviewed by Darin Adler.

        - test and updated results for http://bugs.webkit.org/show_bug.cgi?id=14134
          <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items

        * fast/dynamic/create-renderer-for-whitespace-only-text.html: Added.
        * fast/dynamic/style-access-late-stylesheet-load-expected.txt:
        * platform/mac-leopard/fast/dynamic: Added.
        * platform/mac-leopard/fast/dynamic/create-renderer-for-whitespace-only-text-expected.checksum: Added.
        * platform/mac-leopard/fast/dynamic/create-renderer-for-whitespace-only-text-expected.png: Added.
        * platform/mac/editing/deleting/delete-block-merge-contents-001-expected.txt:
        * platform/mac/editing/deleting/delete-block-merge-contents-019-expected.txt:
        * platform/mac/editing/deleting/delete-block-merge-contents-020-expected.txt:
        * platform/mac/editing/inserting/editable-html-element-expected.txt:
        * platform/mac/editing/inserting/editing-empty-divs-expected.txt:
        * platform/mac/editing/pasteboard/paste-TIFF-expected.txt:
        * platform/mac/editing/selection/4983858-expected.txt:
        * platform/mac/editing/selection/5136696-expected.txt:
        * platform/mac/editing/selection/drag-to-contenteditable-iframe-expected.txt:
        * platform/mac/editing/style/remove-underline-across-paragraph-expected.txt:
        * platform/mac/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
        * platform/mac/editing/style/remove-underline-after-paragraph-expected.txt:
        * platform/mac/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:
        * platform/mac/editing/style/remove-underline-from-stylesheet-expected.txt:
        * platform/mac/fast/dynamic/create-renderer-for-whitespace-only-text-expected.txt: Added.
        * platform/mac/fast/dynamic/move-node-with-selection-expected.txt:
        * platform/mac/fast/forms/input-align-expected.txt:
        * platform/mac/fast/inline/positionedLifetime-expected.txt:

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

12 years agoWebCore:
darin@apple.com [Tue, 1 Jan 2008 01:17:22 +0000 (01:17 +0000)]
WebCore:

        Reviewed by Mitz.

        - fix http://bugs.webkit.org/show_bug.cgi?id=16641
          Acid3 reveals HTMLFormElement.elements fails to update when element name changes

        Test: fast/dom/HTMLFormElement/elements-not-in-document.html

        This was a bug specific to forms that are not in the document tree.
        The fix was to change the code to increment the document version number to match
        up with other document change tracking. Maybe at some point we can clean these up
        so we don't have so many competing change notification systems.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::replaceChild): Removed bogus comment.
        (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion
        call here, since this code path bypasses the subtree-modified event code.

        * dom/Element.cpp:
        (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML
        collections are for things in the document.
        (WebCore::Element::setAttributeMap): Ditto.

        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to
        incDOMTreeVersion here; covers most cases of tree structure changes.

        * dom/Node.cpp:
        (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer
        has nothing to do with changes to the DOM tree!
        (WebCore::Node::detach): Ditto.

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion.
        This is handled at a lower level and doesn't need to be here.
        (WebCore::HTMLFormElement::removeFormElement): Ditto.

LayoutTests:

        Reviewed by Mitz.

        - test for http://bugs.webkit.org/show_bug.cgi?id=16641
          Acid3 reveals HTMLFormElement.elements fails to update when element name changes

        * fast/dom/HTMLFormElement: Added.
        * fast/dom/HTMLFormElement/elements-not-in-document-expected.txt: Added.
        * fast/dom/HTMLFormElement/elements-not-in-document.html: Added.
        * fast/dom/HTMLFormElement/resources: Added.
        * fast/dom/HTMLFormElement/resources/TEMPLATE.html: Added.
        * fast/dom/HTMLFormElement/resources/elements-not-in-document.js: Added.

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

12 years ago Suggested by Antti.
darin@apple.com [Tue, 1 Jan 2008 00:20:19 +0000 (00:20 +0000)]
    Suggested by Antti.

        * Scripts/webkitdirs.pm: Turned off the QuickTime requirement for Windows until
        we get it installed on the build bots.

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